AtCoder Beginner Contest 279 《D - Freefall》 二分,三分 二分写法 其实可以算出T=x*b+a/sqrt(x+1); 然后让我们求T的最小值,因为很容易看出这个函数是大概如图 ,其实就是对T求导,然后找到让T’=0的x(二分找,因为这个时候导函数的图形是单调的),因为要求的是整数x,所以可能二分出来的x有偏差,要...
可以发现这是一个单峰函数,其函数图像如下: 既然是单峰,即可以三分来求解。不会三分可在此处学习 intm1=l×2+r3,m2=l+r×23;intm1=l×2+r3,m2=l+r×23; if(f(m1)>f(m2))l=m1;if(f(m1)>f(m2))l=m1; elser=m2;elser=m2; 代码:code F - BOX (并查集变式) 我们可以给每个盒子维护一个b...
给定参数a, b, c, d,输出(a + b) * (c - d)加一个名字即可。 代码: signedmain(){int a,b,c,d;cin>>a>>b>>c>>d;cout<<(a+b)*(c-d)<<endl;puts("Takahashi");} B - Rectangle Detection 模拟 题意: 输入一个10 * 10的矩阵,求#的矩阵的左上角和右下角。 分析: 根据题意模拟即...
AtCoder Beginner Contest 269「A」「B」「C 二进制枚举」「D 暴力dfs」「E 二分答案」「F 等差数列+推式子」 https://suryxin.blog.csdn.net/article/details/126974824 AtCoder Beginner Contest 269(E-EX) https://www.bilibili.com/opus/707445585544740886 ...
·AtCoder Beginner Contest (ABC) 这是最频繁且最简单的入门赛,通常情况下每月至少举行2次。2019年4月27日(含)之前,每场比赛共4题,时长100分钟,满分1000分且Rating超过1199的选手不计Rating值。自2019年5月19日起改版升级为6道题目,时长不变,满分2100分且Rating值超过1999的选手不计Rating值。改版之后比赛质量...
I could not find the usual discussion post about the most recent atcoder contest, so I'm posting here. How to solve problem G?atcoder, beginner, contest, 294 +13 Ghassane 23 months ago 7 Comments (6) Show archived | Write comment? chromate00 23 months ago, # | +20 G: ...
AtCoder Beginner Contest 193 部分题解 E - Oversleeping 求是否存在\(t\)满足\(t=t_1(mod (2X+2Y)) and t=t_2(mod (P+Q))\) 注意到\(Q\)和\(Y\)非常小,直接枚举套个\(exCRT\)就行了(虽然赛场上没看出来,\(exCRT\)也忘了记得快速乘...
We will hold AtCoder Beginner Contest 272. Contest URL: https://atcoder.jp/contests/abc272 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20221008T2100&p1=248 Duration: 100 minutes Number of Tasks: 8 Writer: PCTprobability, nok0, kyopro_friends, Nyaan Tester: ...
AtCoder Beginner Contest 400 A-F LHao OMRON Corporation Programming Contest 2025 (AtCoder Beginner Contest 397)(A~E) A题目题目大意给你一个数,大于等于38输出1,大于等于37.5小于38输出2,小于37.5输出3 思路如题目大意描述 难度 0颗星参考代码 #include<bits/stdc++.h> using namespace std; cons...
()(i) bi 的位置1的位置 做法: 由于不执行操作(i),我们可以尝试预处理操作(1),(2)..(i−1)之后1所在的位置。然后我们考虑倒序执行bi,可以知道,交换bi数组的值等价交换ai,在执行过程中顺便交换bi即可,细节详见代码。 code: //写题解的时候a,b的含义搞反了,注意甄别代码 one[1] = 1;//1的位置 ...