![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
cf
抠脚老騷
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #786 (Div. 3)
Codeforces Round #786 (Div. 3)A - Number Transformation#include <bits/stdc++.h>#pragma GCC optimize(2)using namespace std;#define int long longtypedef long long LL;typedef long long ll;const int INF = 0x3f3f3f3f;//const int inf = 1e18;cons原创 2022-05-07 21:34:18 · 142 阅读 · 0 评论 -
Codeforces Round #740 (Div. 2, based on VK Cup 2021 - Final (Engine))
Codeforces Round #740 (Div. 2, based on VK Cup 2021 - Final (Engine))A. Simply Strange Sort#include <bits/stdc++.h>#pragma GCC optimize(2)using namespace std;#define int long longtypedef long long LL;typedef long long ll;const int INF = 0x3f原创 2021-09-03 13:17:49 · 74 阅读 · 0 评论 -
Codeforces Round #705 (Div. 2)
Codeforces Round #705 (Div. 2)B - Planet Lapituletti#include <bits/stdc++.h>#pragma GCC optimize(2)using namespace std;//#define int long longtypedef long long LL;typedef long long ll;int gcd(int a, int b) { return !b ? a : gcd(b, a % b); }原创 2021-04-02 16:12:23 · 102 阅读 · 0 评论 -
Codeforces Round #709 (Div. 2, based on Technocup 2021 Final Round)
Codeforces Round #709 (Div. 2, based on Technocup 2021 Final Round)B - Restore Modulo#include <bits/stdc++.h>#pragma GCC optimize(2)using namespace std;#define int long longtypedef long long LL;typedef long long ll;const int INF = 0x3f3f3f3f原创 2021-03-23 15:26:57 · 416 阅读 · 1 评论 -
Codeforces Round #707 (Div. 2, based on Moscow Open Olympiad in Informatics)
Codeforces Round #707 (Div. 2, based on Moscow Open Olympiad in Informatics)C - Going Home#include <bits/stdc++.h>#pragma GCC optimize(2)using namespace std;#define int long longtypedef long long LL;typedef long long ll;const int INF = 0x3f3原创 2021-03-21 16:58:31 · 77 阅读 · 0 评论 -
Educational Codeforces Round 103 (Rated for Div. 2)
Educational Codeforces Round 103 (Rated for Div. 2)A. K-divisible Sum先保证sum大于k,ans=(sum+k-1)/k#include <bits/stdc++.h>#pragma GCC optimize(2)#define int long longusing namespace std;//const int mod = 998244353;const int inf=1e18;const int m原创 2021-01-30 10:35:14 · 200 阅读 · 2 评论 -
Codeforces Round #696 (Div. 2)
Codeforces Round #696 (Div. 2)A. Puzzle From the Future贪心#include <bits/stdc++.h>//#pragma GCC optimize(2)#define int long longusing namespace std;//const int mod = 998244353;const int mod = 1e9 + 7;const int maxn = 2e5 + 10;void solve()原创 2021-01-27 22:01:47 · 132 阅读 · 0 评论 -
Codeforces Round #697 (Div. 3)
Codeforces Round #697 (Div. 3)A. Odd Divisor只有为1和2^n时没有Odd Divisor#include <bits/stdc++.h>//#pragma GCC optimize(2)#define int long longusing namespace std;//const int mod = 998244353;const int mod = 1e9 + 7;const int maxn = 2e5 + 10;voi原创 2021-01-26 18:59:44 · 117 阅读 · 0 评论 -
Educational Codeforces Round 102 (Rated for Div. 2)
Educational Codeforces Round 102 (Rated for Div. 2)A. Replacing Elements看最小的俩数之和是否大于d,或者所有的数都不大于d#include <bits/stdc++.h>//#pragma GCC optimize(2)#define int long longusing namespace std;//const int mod = 998244353;const int mod = 1e9 + 7;c原创 2021-01-18 15:50:49 · 144 阅读 · 0 评论 -
Codeforces Round #695 (Div. 2)
Codeforces Round #695 (Div. 2)A. Wizard of Orz本来应该是987。。。的,因为这里可以操作一个数所以可以偷一个989然后就012。。。往后接。可以让他最大。#include <bits/stdc++.h>#define int long longusing namespace std;//const int mod = 998244353;const int mod = 1e9 + 7;const int maxn = 1e6 + 1原创 2021-01-13 23:02:41 · 116 阅读 · 1 评论 -
2019-2020 ICPC Asia Hong Kong Regional Contest
2019-2020 ICPC Asia Hong Kong Regional ContestB. Binary Tree#include <bits/stdc++.h>#define int long longusing namespace std;const int mod = 998244353;const int maxn = 1e6 + 10;void solve() { int n; cin>>n; for (int i = 1;原创 2020-12-06 17:07:42 · 1117 阅读 · 0 评论 -
300iq Contest 3
300iq Contest 3B. Best Tree首先n==2使只有一对;n!=2时,如果1的个数比别的个数多,即别的点都和1匹配如果1个个数比别的个数少,所有点即可俩俩匹配,#include <bits/stdc++.h>#define int long longusing namespace std;const int mod = 998244353;const int maxn = 1e6 + 10;void solve() { int n,x;原创 2020-12-04 16:47:10 · 456 阅读 · 0 评论 -
Educational Codeforces Round 99 (Rated for Div. 2)
Educational Codeforces Round 99 (Rated for Div. 2)A. Strange Functions输出位数即可#include <bits/stdc++.h>#define int long longusing namespace std;const int mod = 1e9 + 7;const int maxn = 2e5 + 10;void solve() { string s; cin>>s;原创 2020-12-03 13:59:57 · 199 阅读 · 0 评论 -
Codeforces Round #687 (Div. 2, based on Technocup 2021 Elimination Round 2)
Codeforces Round #687 (Div. 2, based on Technocup 2021 Elimination Round 2)A. Prison Break#include <bits/stdc++.h>using namespace std;const int maxn = 3e5 + 5;const int INF=0x7f7f7f7f; //2139062143void solve(){ int n,m,r,c; cin>>原创 2020-12-01 12:40:36 · 127 阅读 · 0 评论 -
Codeforces Round #673 (Div. 1)
Codeforces Round #673 (Div. 1)A. k-Amazing Numbers对于一个k有一个数满足是k-amazing即这个数之间的最大间隔不大于k#include <bits/stdc++.h>using namespace std;const int maxn = 3e5 + 5;const int INF=0x7f7f7f7f; //2139062143void solve() { int n; cin>>n;原创 2020-11-29 17:17:37 · 121 阅读 · 0 评论 -
Codeforces Round #678 (Div. 2)
Codeforces Round #678 (Div. 2)A. Reorder#include <bits/stdc++.h>#define int long longusing namespace std;typedef long long ll;const int maxn = 2e5 + 5;const int N = (1 << 16) + 1;void solve() { int n,m; int sum=0; cin>&原创 2020-11-28 00:17:20 · 133 阅读 · 0 评论 -
Codeforces Round #685 (Div. 2)
Codeforces Round #685 (Div. 2)A. Subtract or Divide#include <bits/stdc++.h>#define int long longusing namespace std;typedef long long ll;const int maxn = 1e5 + 5;const int N = 2e7 + 5;void solve() { int n; cin>>n; if(n<原创 2020-11-23 23:38:47 · 108 阅读 · 0 评论 -
Educational Codeforces Round 98 (Rated for Div. 2)
Educational Codeforces Round 98 (Rated for Div. 2)A. Robot Program#include <bits/stdc++.h>#define int llusing namespace std;typedef long long ll;const int maxn=2e5+5;void solve() { int x,y; cin>>x>>y; cout<<max(x原创 2020-11-21 17:11:19 · 103 阅读 · 0 评论 -
Codeforces Round #684 (Div. 2)
Codeforces Round #684 (Div. 2)A. Buy the String#include <bits/stdc++.h>#define int llusing namespace std;typedef long long ll;const int maxn=2e5+5;void solve() { int n,c1,c0,h,sum=0; cin>>n>>c0>>c1>>h; c0=m原创 2020-11-21 16:32:34 · 102 阅读 · 0 评论 -
Codeforces Round #683 (Div. 2, by Meet IT)
Codeforces Round #683 (Div. 2, by Meet IT)A. Add Candies#include <bits/stdc++.h>#define int llusing namespace std;typedef long long ll;const int maxn=2e5+5;void solve() { int n; cin>>n; cout<<n<<"\n"; for(int原创 2020-11-21 16:02:33 · 128 阅读 · 0 评论 -
Codeforces Round #682 (Div. 2)
Codeforces Round #682 (Div. 2)A. Specific Tastes of Andre#include <bits/stdc++.h>#define int llusing namespace std;typedef long long ll;const int maxn = 3e4 + 10;const int mod = 998244353;void solve() { int n; cin>>n; for原创 2020-11-16 23:37:48 · 287 阅读 · 0 评论 -
2020 China Collegiate Programming Contest Weihai Site
2020 China Collegiate Programming Contest Weihai SiteA Golden Spirit#include <bits/stdc++.h>#define int llusing namespace std;typedef long long ll;const int maxn = 1e5 + 10;const int mod = 998244353;void solve() { ll n, x, t; cin &g原创 2020-11-11 17:24:08 · 195 阅读 · 0 评论 -
Codeforces Round #679 (Div. 2, based on Technocup 2021 Elimination Round 1)
Codeforces Round #679 (Div. 2, based on Technocup 2021 Elimination Round 1)A. Finding Sasuke#include <bits/stdc++.h>#define int llusing namespace std;typedef long long ll;const int maxn = 1e6 + 10;const int mod = 998244353;void solve() {原创 2020-11-10 22:28:50 · 104 阅读 · 0 评论 -
Codeforces Round #680 (Div. 2, based on Moscow Team Olympiad)
Codeforces Round #680 (Div. 2, based on Moscow Team Olympiad)A. Array Rearrangment#include <bits/stdc++.h>using namespace std;const int maxn=55;int a[maxn];int b[maxn];void solve(){ int n,x; cin>>n>>x; for(int i=0;i<原创 2020-11-04 22:44:16 · 118 阅读 · 0 评论 -
Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final)
Codeforces Round #681 (Div. 2, based on VK Cup 2019-2020 - Final)A. Kids Seating#include<bits/stdc++.h>using namespace std;void solve(){ int n; cin>>n; int res=4*n-2; for(int i=1;i<=n;i++) { cout<<res&原创 2020-11-03 23:12:03 · 138 阅读 · 0 评论 -
第十七届中国计量大学程序设计竞赛
第十七届中国计量大学程序设计竞赛B Broken Pad#include <bits/stdc++.h>//#define int llusing namespace std;//#pragma GCC optimize(2)typedef long long ll;const ll mod = 1e9 + 7;const int maxn = 1e5 + 10;void solve() { string a, b,e; set<int> c,原创 2020-09-26 23:47:21 · 338 阅读 · 0 评论 -
Codeforces Round #672 (Div. 2)
Codeforces Round #672 (Div. 2)A. Cubes Sorting#include <bits/stdc++.h>//#define int llusing namespace std;#pragma GCC optimize(2)typedef long long ll;const ll mod = 1e9 + 7;const int maxn = 1e5 + 10;void solve() { int n; cin>&g原创 2020-09-25 21:28:19 · 1637 阅读 · 0 评论 -
Educational Codeforces Round 95 (Rated for Div. 2)
Educational Codeforces Round 95 (Rated for Div. 2)A. Buying Torches#include <bits/stdc++.h>using namespace std;typedef long long ll;//const int INF = 0x3f3f3f3f;const int mod = 1e9 + 7;const int maxn = 3e3+ 10;void solve() { ll x,y,k;原创 2020-09-23 18:19:52 · 120 阅读 · 0 评论 -
Codeforces Round #670 (Div. 2)
Codeforces Round #670 (Div. 2)A. Subset Mex#include <bits/stdc++.h>#define int llusing namespace std;typedef long long ll;const int INF = 0x3f3f3f3f3f;const int mod =1e9+7;const int maxn =1e5+10;int a[101];void solve() { int n; ci原创 2020-09-13 21:04:43 · 169 阅读 · 0 评论 -
Codeforces Round #669 (Div. 2)
Codeforces Round #669 (Div. 2)A. Ahahahahahahahaha#include <bits/stdc++.h>#define int lltypedef long long ll;const int INF = 0x3f3f3f3f3f;const int mod = 1e9 + 7;const int maxn = 1e6 + 10;const int N = 50;using namespace std;void solve()原创 2020-09-09 21:35:10 · 261 阅读 · 0 评论 -
Codeforces Round #668 (Div. 2)
Codeforces Round #668 (Div. 2)A. Permutation Forgery#include <bits/stdc++.h>#define int lltypedef long long ll;const int INF = 0x3f3f3f3f3f;const int mod = 1e9 + 7;const int maxn = 1e6 + 10;const int N=205;using namespace std;void solve(原创 2020-09-07 21:01:47 · 199 阅读 · 0 评论 -
Codeforces Round #667 (Div. 3)
Codeforces Round #667 (Div. 3)A. Yet Another Two Integers Problem#include <bits/stdc++.h>#define int lltypedef long long ll;const int INF = 0x3f3f3f3f;const int mod = 1e9 + 7;const int maxn = 1e4 + 10;using namespace std;void solve() {原创 2020-09-05 21:06:55 · 174 阅读 · 0 评论 -
Codeforces Round #666 (Div. 2)
Codeforces Round #666 (Div. 2)A. Juggling Letters#include <bits/stdc++.h>#define int lltypedef long long ll;const int INF = 0x3f3f3f3f;const int mod = 1e9 + 7;const int maxn = 1e5 + 10;using namespace std;void solve() { int n,a[50]={0},原创 2020-08-31 21:44:37 · 190 阅读 · 0 评论 -
Educational Codeforces Round 94 (Rated for Div. 2)
Educational Codeforces Round 94 (Rated for Div. 2)A - String Similarity#include <bits/stdc++.h>//#define int lltypedef long long ll;const int INF = 0x3f3f3f3f;const int mod = 1e9 + 7;const int MAX = 2e5 + 10;using namespace std;void solve()原创 2020-08-26 23:01:49 · 172 阅读 · 0 评论 -
Codeforces Round #665 (Div. 2)
#include <bits/stdc++.h>using namespace std;typedef long long ll;const int MAX = 2e5 + 10;const int INF=0x3f3f3f3f;const int mod=1e9+7;void solve() { int n,k; cin>>n>>k; k>n?cout<<k-n<<endl:cout<<((原创 2020-08-23 16:35:05 · 182 阅读 · 0 评论 -
Codeforces Round #664 (Div. 2)
Codeforces Round #664 (Div. 2)A. Boboniu Likes to Color Balls#include<bits/stdc++.h>using namespace std;int main(){ int t,r,g,b,w; for (cin>>t;t--;cout<<(w<2||w>2&&r*g*b?"Yes\n":"No\n")){ cin>>r>原创 2020-08-13 16:54:14 · 138 阅读 · 0 评论 -
Codeforces Round #663 (Div. 2)
Codeforces Round #663 (Div. 2)A. Suborrays#include<bits/stdc++.h>using namespace std;typedef long long ll;const int MAX=1e5+10,mod=1e9+7;void solve(){ int n,i; for (cin>>n,i=1; i<n;++i) cout<<i<<" "; cout<&l原创 2020-08-10 21:01:09 · 395 阅读 · 0 评论 -
cf-div2-Codeforces Round #662 (Div. 2)
Codeforces Round #662 (Div. 2A - Rainbow Dash, Fluttershy and Chess Coloring#include<bits/stdc++.h>using namespace std;typedef long long ll;const int MAX=1e6+10;const int mod=10; void solve(){ int n; cin>>n; cout<<(n/2原创 2020-08-08 20:12:41 · 277 阅读 · 0 评论 -
Codeforces Round #661 (Div. 3)
Codeforces Round #661 (Div. 3) C#include<bits/stdc++.h>using namespace std;typedef long long ll;int main(){ int t; cin>>t; while (t--){ int n,i,a[55],maxx=0;; for(cin>>n,i=1;i<=n;i++)cin>>a[i];原创 2020-08-07 22:31:58 · 112 阅读 · 0 评论