
CodeForces
PeterBishop0
一起进步!
展开
-
501B Misha and Changing Handles(map)
#include <cstdio>#include <cstring> //题意是说一对用户改名字,可能有一个用户改了很多名字,求用户数目struct node{ char old[25];//旧的名字 char new[25];//新的名字 }a[1010];int main(){ int n; scanf("%d",&n); int nu...原创 2018-07-12 09:32:22 · 304 阅读 · 0 评论 -
Codeforces Round #497 (Div. 2)1007A 1008A 1008B 总结
A题没啥好说的,题目读完再动手!!!B题真的难受了,一开始想复杂了,其实就三种情况讨论#include<iostream>#include<algorithm>using namespace std;int main() { int n, ma = 0x7fffffff; cin >> n; while (n--) { int a, b; s...原创 2018-07-14 12:45:33 · 492 阅读 · 0 评论 -
Codeforces Round #503(Div.2) 1020A 1020B 1019A总结
A题我肿么会脑残一开始去搜索呢?明摆着只要分情况算就好了啊不说了真的傻了分清楚两个y的相对位置#include<stdio.h>int abs(int a){ if (a > 0) return a; return -a;}int main(){ int n, h, a, b, k; while (~scanf("%d %d %d %d %d",...原创 2018-08-12 15:13:47 · 442 阅读 · 0 评论 -
Codeforces Round #504 (Div. 1 + Div. 2) 1023A 1023B 1023C总结
A题卡了一个小时,真实。。。。看了wa6,相同长度的字符串,坑在代码里面写了,凉凉难受。题目其实很清楚,就是从两头去比较是否相同。#include<stdio.h>#include<string.h>int main(){ int n, m; while (~scanf("%d %d", &n, &m)) { char s1[30...原创 2018-08-18 10:32:02 · 272 阅读 · 0 评论 -
Educational Codeforces Round 52 [Rated for Div. 2] 1065A 1065B 1065C
A题良心秒切,没啥好说的#include<iostream>using namespace std;int main() { long long t; while (cin >> t) { while (t--){ long long s, a, b, c; cin >> s >> a >> b >&...原创 2018-10-13 10:42:15 · 324 阅读 · 0 评论 -
Hello 2019
2019重新回到codeforces,发现菜的不行,搜索居然卡半天A(简单查找)#include<stdio.h>#include<string.h>int main() { char a[2]; while (~scanf("%s", a)) { char b[5][2]; int f = 0; //printf("%s", a)...原创 2019-01-05 10:50:39 · 331 阅读 · 0 评论 -
Educational Codeforces Round 58 (Rated for Div. 2)
昨晚太太天真题目虽然简单但是方法用的很蠢。。。。A(简单数学)#include<stdio.h>int n,l,r,p;main(){ scanf("%d",&n); while(n--) { scanf("%d%d%d",&l,&r,&p); printf("%d\n",p<l?p:(r/p+1)*p);//这个原创 2019-01-12 17:18:57 · 274 阅读 · 0 评论