We will hold AtCoder Regular Contest 181. Contest URL: https://atcoder.jp/contests/arc181 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20240804T2100&p1=248 Duration: 120 minutes Number of Tasks: 6 Writer: chinerist Tester: maspy, sigma425 Rated range: — 2799...
E:用二进制表示放的数字,然后状压$DP$。 F:$biset$优化$DP$预处理,乱搞贪心。 ARC 059 D:傻题,存在长的合法子串就一定会存在短的。 E:前缀和优化$DP$。 F:每个长度为$len$的串出现的概率是相同的,求到长度为$len$的方案数然后除$2^{len}$。 ARC 060 D:对$b$分大于根号和小于根号讨论。 E:倍增...
Time limit : 2sec /Memory limit : 256MB Score :300points Problem Statement We haveNsticks with negligible thickness. The length of thei-th stick isAi. Snuke wants to select four different sticks from these sticks and form a rectangle (including a square), using the sticks as its sides. F...
AtCoder Regular Contest 081 C - Make a Rectangle从大到小贪心即可。# include <bits/stdc++.h> using namespace std; map<int,int>m; int main() { int n, a; scanf("%d",&n); while(n--) scanf("%d",&a), m[a]++; int r=0, c=0; for(auto i:m) if(i.second>3) r=c=i....
We will hold AtCoder Regular Contest 186. Contest URL:https://atcoder.jp/contests/arc186 Start Time:http://www.timeanddate.com/worldclock/fixedtime.html?iso=20241027T2100&p1=248 Duration: 120 minutes Number of Tasks: 5 Writer:nuip ...
将答案数组赋初值为1,2,...,n,将约束条件a_i从小到大排序。 对于每一个x\in a,因为每一个排列必须包含1,所以就让res_1,res_2...,res_x不是一个排列。 每次交换res_x和res_{x+1}可以保证符合要求,且字典序最小。 考虑无解的情况。
首先题意告诉我们,小于等于K的在前面,大于K的在后面,那么不难想到,当K是正数的时候,可以按从小到大的顺序排列。因为有Y0=0,当K是负数时,按从小到大顺序排列便不合法,需要从大到小排列。 考虑如何判定无解的情况,当K小于等于0时,因为Y0=0,若想要从大到小排列,那么Y0=0就是最大数,需要保证排列的和大于等...
AtCoder Regular Contest 062 题解 C - AtCoDeerくんと選挙速報 / AtCoDeer and Election Report Time Limit: 2 sec / Memory Limit: 256 MB Score : 300300 points Problem Statement AtCoDeer the deer is seeing a quick report of election results on TV. Two candidates are standing for the ...
164 -- 1:43:11 App [6/8] AtCoder Beginner Contest 286 (unrated) 181 -- 27:25 App [6/6] VP AtCoder Beginner Contest 166 (随机 VP) 441 1 2:00:59 App [5/7] Educational Codeforces Round 142 (1660 ⭜ 1889) 468 -- 42:43 App AtCoder Beginner Contest 334 A 至 G 題...
前面四道题都比较简单,后面两道题的题面到现在都没有加载出来。 A - Bridge and Sheets 直接计算就好了。具体而言,使用一个变量记录前面一个木板右端点是哪里,然后在看当前木板的时候,如果中间有空隙就加上,然后接着维护下去就行了。 intN;longlongW,L;intmain(){cin>>N>>L>>W;longlongr=0;longlongans...