水题
invoKer-
这个作者很懒,什么都没留下…
展开
-
CodeForces - 33D Knights【水题】
题目链接:https://codeforces.com/contest/33/problem/D#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-05-03 19:56:29 · 189 阅读 · 0 评论 -
CodeForces - 33C Wonderful Randomized Sum【水题】
题目链接:https://codeforces.com/contest/33/problem/C#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-05-01 23:28:19 · 164 阅读 · 0 评论 -
CodeForces - 33B String Problem【水题】
题目链接:https://codeforces.com/contest/33/problem/B#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-05-01 17:15:27 · 134 阅读 · 0 评论 -
CodeForces - 33A What is for dinner?【水题】
题目链接:https://codeforces.com/contest/33/problem/A#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-05-01 16:52:45 · 151 阅读 · 0 评论 -
CodeForces - 32D Constellation【水题】
题目链接:https://codeforces.com/contest/32/problem/D#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-05-01 15:35:21 · 131 阅读 · 0 评论 -
CodeForces - 32B Borze【水题】
题目链接:https://codeforces.com/contest/32/problem/B#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-05-01 13:21:53 · 266 阅读 · 0 评论 -
CodeForces - 32A Reconnaissance【水题】
题目链接:https://codeforces.com/contest/32/problem/A#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-05-01 13:15:56 · 153 阅读 · 0 评论 -
CodeForces - 31C Schedule【水题】
题目链接:https://codeforces.com/contest/31/problem/C#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-04-22 21:59:45 · 141 阅读 · 0 评论 -
CodeForces - 31B Sysadmin Bob【水题】
题目链接:https://codeforces.com/contest/31/problem/B#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-04-22 21:40:28 · 141 阅读 · 0 评论 -
CodeForces - 31A Worms Evolution【水题】
题目链接:https://codeforces.com/contest/31/problem/A#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-04-22 21:24:39 · 223 阅读 · 0 评论 -
CodeForces - 30B Codeforces World Finals【水题】
题目链接:https://codeforces.com/contest/30/problem/B#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-02-15 20:54:37 · 180 阅读 · 0 评论 -
CodeForces - 30A Accounting【水题】
题目链接:https://codeforces.com/contest/30/problem/A感觉这个题这么搜可以hack掉#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector原创 2021-02-15 18:37:11 · 107 阅读 · 0 评论 -
CodeForces - 29B Traffic Lights【水题】
题目链接:https://codeforces.com/contest/29/problem/B#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-02-09 20:28:54 · 186 阅读 · 0 评论 -
CodeForces - 29A Spit Problem【水题】
题目链接:https://codeforces.com/contest/29/problem/A#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-02-09 17:35:06 · 101 阅读 · 0 评论 -
CodeForces - 28A Bender Problem【水题】
题目链接:https://codeforces.com/contest/28/problem/A#include <iostream>#include <cmath>#include <cstring>using namespace std;typedef double db;static const int MAXN=500+10;static const db EPS=1e-10;struct Point{ int x,y; void原创 2021-01-22 23:56:41 · 203 阅读 · 0 评论 -
CodeForces - 27C Unordered Subsequence【水题】【构造】
题目链接:https://codeforces.com/contest/27/problem/C#include <iostream>using namespace std;static const int MAXN=1e5+10;int n;int a[MAXN];int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&a[i]); if(n>=原创 2020-11-09 18:21:00 · 109 阅读 · 0 评论 -
CodeForces - 27B Tournament【水题】
题目链接:https://codeforces.com/contest/27/problem/B#include <iostream>using namespace std;static const int MAXN=50+10;int g[MAXN][MAXN];int cnt[MAXN];int n;int main(){ scanf("%d",&n); for(int i=1;i<n*(n-1)/2;i++) { int原创 2020-11-09 18:19:56 · 147 阅读 · 0 评论 -
CodeForces - 27A Next Test【水题】
题目链接:https://codeforces.com/contest/27/problem/A#include <iostream>using namespace std;static const int MAXN=3000+10;bool vis[MAXN];int n,x;int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) { scanf("%d",&x);原创 2020-11-08 21:42:32 · 172 阅读 · 0 评论 -
CodeForces - 26B Regular Bracket Sequence【水题】【贪心】【栈】
题目链接:https://codeforces.com/contest/26/problem/B#include <iostream>using namespace std;static const int MAXN=1e6+10;char s[MAXN];int cnt,ans;int main(){ scanf("%s",s); for(int i=0;s[i];i++) if(s[i]=='(') cnt++; else if(原创 2020-11-07 20:54:36 · 147 阅读 · 0 评论 -
CodeForces - 26A Almost Prime【水题】【分解质因数】
题目链接:https://codeforces.com/contest/26/problem/A#include <iostream>using namespace std;static const int MAXN=3000+10;int n,ans;int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) { int t=i,cnt=0; for(int j=2;j&l原创 2020-11-07 20:41:26 · 257 阅读 · 0 评论 -
CodeForces - 25B Phone numbers【水题】
题目链接:https://codeforces.com/contest/25/problem/B#include <iostream>using namespace std;static const int MAXN=100+10;int n;char s[MAXN];int main(){ scanf("%d%s",&n,s); for(int i=0;s[i];) { if(n-i==2) printf("%c%c",s[i],s原创 2020-11-05 17:48:39 · 91 阅读 · 0 评论 -
CodeForces - 25A IQ test【水题】
题目链接:https://codeforces.com/contest/25/problem/A#include <iostream>using namespace std;int num[2],pos[2];int n;int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) { int x; scanf("%d",&x); num[x%2]++;原创 2020-11-05 17:33:01 · 103 阅读 · 0 评论 -
CodeForces - 24C Sequence of points【思维】
题目链接:https://codeforces.com/contest/24/problem/C关键 走2n次会回到原点#include <iostream>using namespace std;static const int MAXN=1e5+10;struct Point{ int x,y; void input() { scanf("%d%d",&x,&y); }}a[MAXN],m;int n;long long j;int main原创 2020-11-05 13:38:07 · 91 阅读 · 0 评论 -
CodeForces - 24B F1 Champions【水题】
题目链接:https://codeforces.com/contest/24/problem/B#include <iostream>#include <cstring>#include <unordered_map>#include <algorithm>using namespace std;static const int score[55]={0,25,18,15,12,10,8,6,4,2,1};static const int MAX原创 2020-11-05 12:53:51 · 159 阅读 · 0 评论 -
CodeForces - 24A Ring road【水题】
题目链接:https://codeforces.com/contest/24/problem/A#include <iostream>#include <cstring>using namespace std;static const int MAXN=100+10;static const int MAXM=200+10;int h[MAXN],e[MAXM],ne[MAXM],f[MAXM],idx;int d[MAXN],pre[MAXN];void add(i原创 2020-11-03 21:37:15 · 225 阅读 · 2 评论 -
CodeForces - 23A You‘re Given a String...【水题】
题目链接:https://codeforces.com/contest/23/problem/A#include <iostream>#include <algorithm>using namespace std;static const int MAXN=100+10;char s[MAXN];int ans;int main(){ scanf("%s",s); for(int i=0;s[i];i++) for(int j=i+1;原创 2020-10-29 17:42:46 · 145 阅读 · 0 评论 -
CodeForces - 22B Bargaining Table【水题】
题目链接:https://codeforces.com/contest/22/problem/B#include <iostream>#include <algorithm>using namespace std;static const int MAXN=25+2;char g[MAXN][MAXN];int sum[MAXN][MAXN];int n,m;int maxAns;int main(){ scanf("%d%d",&n,&m原创 2020-10-28 19:12:13 · 186 阅读 · 0 评论 -
CodeForces - 22A Second Order Statistics【水题】
题目链接:https://codeforces.com/contest/22/problem/A#include <iostream>#include <vector>#include <algorithm>using namespace std;vector<int> v;int n;int main(){ scanf("%d",&n); for(int i=0;i<n;i++) { in原创 2020-10-28 19:11:13 · 220 阅读 · 0 评论 -
CodeForces - 21A Jabber ID【水题】
题目链接:https://codeforces.com/contest/21/problem/A#include <iostream>#include <vector>#include <cstring>#include <queue>using namespace std;static const int MAXN=1e5+10;struct Node { int v, w; bool operator<(const No原创 2020-10-27 14:18:23 · 147 阅读 · 1 评论 -
CodeForces - 20B Equation【水题】
题目链接:https://codeforces.com/contest/20/problem/B#include <iostream>#include <cmath>using namespace std;long long a,b,c;int main(){ scanf("%lld%lld%lld",&a,&b,&c); long long delta=b*b-4*a*c; if(!a && !b &原创 2020-10-25 22:33:42 · 90 阅读 · 0 评论 -
CodeForces - 20A BerOS file system【水题】
题目链接:https://codeforces.com/contest/20/problem/A#include <iostream>using namespace std;static const int MAXN=100+10;char s[MAXN],ss[MAXN];int main(){ scanf("%s",s); int j=0; for(int i=0;s[i];i++) { if(s[i]=='/')原创 2020-10-25 22:32:29 · 95 阅读 · 0 评论 -
CodeForces - 18C Stripe【水题】【前缀和】
题目链接:https://codeforces.com/contest/18/problem/C#include <iostream>using namespace std;static const int MAXN=1e5+10;int n;int a[MAXN];int sum[MAXN];int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) { scanf("%d",&原创 2020-10-14 10:51:30 · 132 阅读 · 0 评论 -
CodeForces - 16D Logging【水题】
题目链接:https://codeforces.com/contest/16/problem/D#include <iostream>#include <cstdio>#include <cstring>#include <string>using namespace std;string s;int n;int res,cnt;int main(){ scanf("%d",&n); getchar(); i原创 2020-10-05 19:22:40 · 99 阅读 · 0 评论 -
CodeForces - 16C Monitor【水题】
题目链接:https://codeforces.com/contest/16/problem/C#include <iostream>using namespace std;int gcd(int a,int b) { return b?gcd(b,a%b):a; }int main(){ int a,b,x,y; scanf("%d%d%d%d",&a,&b,&x,&y); int d=gcd(x,y); x/=d; y原创 2020-10-04 17:14:22 · 129 阅读 · 0 评论 -
CodeForces - 16B Burglar and Matches【水题】
题目链接:https://codeforces.com/contest/16/problem/B#include <iostream>#include <algorithm>using namespace std;static const int MAXN=20+10;struct Node{ int a,b; bool operator<(const Node &o)const{ return b>o.b; }原创 2020-10-04 16:45:24 · 284 阅读 · 0 评论 -
CodeForces - 16A Flag【水题】
题目链接:https://codeforces.com/contest/16/problem/A#include <iostream>using namespace std;static const int MAXN=100+10;char g[MAXN][MAXN];int main(){ int n,m; scanf("%d%d",&n,&m); for(int i=0;i<n;i++) scanf("%s",g[i]); b原创 2020-09-30 20:00:47 · 110 阅读 · 0 评论 -
CodeForces - 15A Cottage Village【水题】
题目链接:https://codeforces.com/contest/15/problem/A#include <iostream>#include <algorithm>using namespace std;typedef pair<int,int> PII;static const int MAXN=1000+10;PII a[MAXN];int n,t;int main(){ scanf("%d%d",&n,&t);原创 2020-09-29 19:12:36 · 79 阅读 · 0 评论 -
CodeForces - 14C Four Segments【水题】【计算几何】
题目链接:https://codeforces.com/contest/14/problem/C给出4条线段判断是否构成矩形。判断是否平行于坐标轴,是否平行x轴y轴的各2条,重合点个数是否为4个即可。#include <iostream>#include <map>using namespace std;int main(){ bool flag=true; map<pair<int,int>,int> _hash; in原创 2020-09-29 09:18:40 · 108 阅读 · 0 评论 -
CodeForces - 14B Young Photographer【水题】
题目链接:https://codeforces.com/contest/14/problem/B找区间交集#include <iostream>#include <cmath>#include <algorithm>using namespace std;static const int MAXN=100+10;int n,x0;int main(){ scanf("%d %d",&n,&x0); int x=0,y=10原创 2020-09-29 09:07:26 · 149 阅读 · 0 评论 -
CodeForces - 14A Letter【水题】
题目链接:https://codeforces.com/contest/14/problem/A找到x轴和y轴的最大和最小边界输出子矩阵#include <iostream>using namespace std;static const int MAXN=50+5;int n,m;char g[MAXN][MAXN];int main(){ scanf("%d%d",&n,&m); for(int i=1;i<=n;i++)原创 2020-09-25 14:02:19 · 176 阅读 · 0 评论