C. Make a Square time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given a positive integer n, written without leading zeroes (for example, the number 04 is incorrect). In one operation…
C. Make a Square time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a positive integer nn, written without leading zeroes (for example, the number 04 is incorrect). In one opera…
http://codeforces.com/contest/962/problem/E E. Byteland, Berland and Disputed Cities time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The cities of Byteland and Berland are located on the a…
http://codeforces.com/contest/962/problem/D D. Merge Equals time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given an array of positive integers. While there are at least two equal…
http://codeforces.com/contest/962/problem/F 求没有被两个及以上的简单环包含的边 解法:双联通求割顶,在bcc中看这是不是一个简单环,是的话把整个bcc的环加到答案中即可(正确性显然,因为bcc一定是环了,然后如果一个bcc不是简单环,那么所有边一定包含在两个简单环中) //#pragma comment(linker, "/stack:200000000") //#pragma GCC optimize("Ofast,no-stac…
A. Equator(模拟) 找权值的中位数,直接模拟.. 代码写的好丑qwq.. #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; ; inline int read() { , f = ; ; c = getchar();} + c - ', c = getchar(); return x * f; } int N; in…
B. Students in Railway Carriage time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are nn consecutive seat places in a railway carriage. Each place is either empty or occupied by a pass…
A. Equator time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Polycarp has created his own training plan to prepare for the programming contests. He will train for nn days, all days are numbe…
模拟题,运用强大的stl. #include <iostream> #include <map> #include <algorithm> #include <set> #define N 150005 using namespace std; typedef long long Int; ; map<long long, set<int> > mapp; long long a[N]; int main() { int n; cin…
D. Merge Equals time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given an array of positive integers. While there are at least two equal elements, we will perform the following operatio…