这是一个水模拟,但是因为图片看不清,手打比较烧脑,我们错了好多次才过 #include<stdio.h> #include<iostream> #include<string.h> #include<queue> #include<algorithm> using namespace std; ///0 Pock 1 Dcissors 2 Paper int Judge(char *a,char *b) { if(!strcmp(a,"…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=29373 [题意]:模拟光标输入 [题解]:用双向列表模拟实现,这里用其他模拟会超时,注意内存的释放 [code]: #include <iostream> #include <stdio.h> #include <math.h> #include <algorithm> #include <list> #include <string>…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=20838 [题意]: 有点长,略. [code]: #include <iostream> #include <stdio.h> #include <string> #include <string.h> #include <math.h> #include <algorithm> using namespace std; ][]; ][…
各种杂题,水题,模拟,包括简单数论. 1001 A+B 1002 A+B+C 1009 Fat Cat 1010 The Angle 1011 Unix ls 1012 Decoding Task 1019 Grandpa's Other Estate 1034 Simple Arithmetics 1036 Complete the sequence! 1043 Maya Calendar 1054 Game Prediction 1057 Mileage Bank 1067 Rails 10…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=4207 [题意]:中文题,略 [题解]:模拟 [code]: #include <iostream> #include <stdio.h> #include <algorithm> using namespace std; struct Nod { int t,sh; }node[][]; void init() { //XsugarX node[][].t = ; nod…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=20832 [题意]: 给你一串字符串,求一个ST(0<ST<=10000),对字符串中字符分别加上(ST-'A'),然后得到的数组分别连起来组成字符串,相邻两个字符相加,取各位数,赋值到下一行,每行讲减少一个字符,直到出现3个字符为100时,输出这时候的ST [题解]: 完全暴力模拟[code]: #include <iostream> #include <stdio.h>…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=33648 [题解]:结果先对MOD*2取模,才能得到结果是否是正确的奇偶问题,得到最后结果之后再对MOD取模... [code]: #include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <queue> using namespa…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=1057 [题意]:给定x的值,带入f(x)求函数值 [题解]:注意第一个数的符号可能是'+',这里把我坑死了... [code]: #include <iostream> #include <stdio.h> #include <math.h> #include <string.h> #include <algorithm> using namesp…
http://www.bnuoj.com/bnuoj/problem_show.php?pid=27987 [题意]:给定坐标输出图形 [题解]:处理坐标上的小技巧 [code]: #include <iostream> #include <stdio.h> #include <string.h> #include <math.h> using namespace std; #define N 100 ][N*]; void init() { int i,j…
http://www.bnuoj.com/bnuoj/contest_show.php?cid=2876#problem/31796 [题意]: 如题,注意大小写情况 [code]: #include <iostream> #include <stdio.h> #include <string.h> #include <ctype.h> #include <algorithm> #include <queue> using names…