摘要:#include using namespace std; const int dr[] = { -1,-1,0,1,1, 1, 0,-1 }; const int dc[] = { 0, 1,1,1,0,-1,-1,-1 }; char col; char board[15][15]; char cmd[5]; bool legal(int r, int c) { return r > ...
阅读全文
摘要:#include #include #include #include using namespace std; map weight2count; char s[1= '0'&&s[k] second)max = it->second; printf("%d\n", sum-max); } return 0; }
阅读全文
摘要:#include #include #include using namespace std; int tokens[105]; vector in[105], out[105]; int NP, NT, NF; int solve() { int count = 0, tran_i; for (tran_i = 0;tran_i = 0;i--) { ...
阅读全文
摘要:#include #include #include char s[1005]; int in[27], out[27]; int g[27][27]; int vis[27]; //int same[27]; int Euler()//返回1表示在图全连通的条件下,是欧拉道路 { int n = 0; for (int i = 1;i 1)return 0; ...
阅读全文
摘要:记笔记记笔记 #include <stdio.h>#include <math.h>char table[10000003] = {0};void print_table(int h){ int m = sqrt(h + 0.5); for (int i = 4;i <= h;i += 2) tab
阅读全文
摘要:TLE--待我去消化佳爷代码,改了一下过了,90MS,好像没比佳爷慢很多的样子,时间差不多-- #include <cstdio>int inv;const int maxd = 100003;int r[maxd],l[maxd];//int a[maxd];int n, m;int cmd[3]
阅读全文
摘要:虽然简洁度跟佳爷完全没法比,至少accepted很开心了 #include <iostream>#include <string>using namespace std;const int maxd = 100003;char text[maxd];int mynext[maxd];void ini
阅读全文
摘要:没去试能不能AC,总是要搞好久,留着自己看看而已 #include <iostream>#include <algorithm>using namespace std;const int maxd = 10003;#define point pair<int,int>point arr[maxd];
阅读全文
摘要:先挂着以后来debug 受不了了(- #include <iostream>const int maxd = 10003;//最大绝对值10000const int maxsize = 1003;int m[2*maxd][2 * maxd];//int memory[2 * maxsize];in
阅读全文
摘要://两重for遍历tle //a alien born less lien never nevertheless new newborn the zebra //60ms #include <iostream>#include <set>#include <string>using namespac
阅读全文
摘要://附上自己被碾压的代码 #include <cstdio>#include <set>#include <map>#include <vector>using namespace std;map <pair<int, int>, int> Map;//从pair映射到每一个pair的数量vecto
阅读全文