B. Error Correct System time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Ford Prefect got a job as a web developer for a small company that makes towels. His current work task is to create…
C. Glass Carving time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Leonid wants to become a glass carver (the person who creates beautiful artworks by cutting the glass). He already has a re…
B. Error Correct System time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Ford Prefect got a job as a web developer for a small company that makes towels. His current work task is to create…
Error Correct System time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Ford Prefect got a job as a web developer for a small company that makes towels. His current work task is to create a s…
Error Correct System Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 527B Description Ford Prefect got a job as a web developer for a small company that makes towels. His current work ta…
A. Playing with Paper 如果a是b的整数倍,那么将得到a/b个正方形,否则的话还会另外得到一个(b, a%b)的长方形. 时间复杂度和欧几里得算法一样. #include <iostream> #include <cstdio> using namespace std; //const int maxn = ; int main() { //freopen("in.txt", "r", stdin); ; scanf(&q…
 Error Correct System Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 527B Description Ford Prefect got a job as a web developer for a small company that makes towels. His current work t…
CF Round #551 (Div. 2) D 链接 https://codeforces.com/contest/1153/problem/D 思路 不考虑赋值和贪心,考虑排名. 设\(dp_i\)是子树i中的i是第dp_i大的(相同大小放在后面). \(opt=1,dp_u=max(dp[v])(v\in G)\) \(opt=0,dp_u=\sum\limits _{v\in G}{dp[v]}\) dp[1]是1到k中第dp[1]大的,就是k-dp[1]+1 然后\(ans=k-dp[…
前言:没想到那么快就打了第二场,题目难度比CF Round #509 (Div. 2)这场要难些,不过我依旧菜,这场更是被\(D\)题卡了,最后\(C\)题都来不及敲了..最后才\(A\)了\(3\)题,幸好\(Rating\)没掉. A. Benches Description 有\(n\)个位置,给出每个位置上原本有\(a[i]\)个人.现有\(m\)个人,把他们安排到这\(n\)个位置上,设安排完后位置上人数最多的位置有\(k\)个人,求最大的\(k\)和最小的\(k\). Solutio…
Codeforces Round #296 (Div. 1)C. Data Center Drama Time Limit: 2 Sec  Memory Limit: 256 MBSubmit: xxx  Solved: 2xx 题目连接 http://codeforces.com/contest/528/problem/C Description The project of a data center of a Big Software Company consists of n compu…