Educational Codeforces Round 31】的更多相关文章

B. Japanese Crosswords Strike Back time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A one-dimensional Japanese crossword can be represented as a binary string of length x. An encoding of thi…
A. Book Reading time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish r…
A. Book Reading time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish r…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 最后肯定会形成若干个环的. 把最大的两个环合在一起就好. 每个环贡献: 假设x=环的大小 ->x*x 注意int的溢出 [代码] #include <bits/stdc++.h> using namespace std; const int N = 1e5; int n,a[N+10]; bool flag[N+10]; vector <long long> v; int main(){ #ifdef LOC…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 所有数字的和加上n-1,如果为x则唯一,否则不唯一 [代码] #include <bits/stdc++.h> using namespace std; int n,x,tot; int main(){ #ifdef LOCAL_DEFINE freopen("rush_in.txt", "r", stdin); #endif scanf("%d%d",&n,…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 水模拟 [代码] #include <bits/stdc++.h> using namespace std; const int N = 100; int n,t,a[N+10]; int main(){ #ifdef LOCAL_DEFINE freopen("rush_in.txt", "r", stdin); #endif scanf("%d%d",&n…
http://codeforces.com/contest/888 A Local Extrema[水] [题意]:计算极值点个数 [分析]:除了第一个最后一个外,遇到极值点ans++,包括极大和极小 [代码]: #include<bits/stdc++.h> using namespace std; int main() { +]; int maxn,minn; maxn=minn=; cin>>n; ;i<=n;i++) { cin>>a[i]; } ;i&l…
Educational Codeforces Round 17 A. k-th divisor 水题,把所有因子找出来排序然后找第\(k\)大 view code //#pragma GCC optimize("O3") //#pragma comment(linker, "/STACK:1024000000,1024000000") #include<bits/stdc++.h> using namespace std; function<voi…
[Educational Codeforces Round 16]E. Generate a String 试题描述 zscoder wants to generate an input file for some programming competition problem. His input is a string consisting of n letters 'a'. He is too lazy to write a generator so he will manually ge…
[Educational Codeforces Round 16]D. Two Arithmetic Progressions 试题描述 You are given two arithmetic progressions: a1k + b1 and a2l + b2. Find the number of integers x such that L ≤ x ≤ R andx = a1k' + b1 = a2l' + b2, for some integers k', l' ≥ 0. 输入 Th…