随笔分类 - PAT
摘要:http://www.patest.cn/contests/pat-a-practise/1088 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 typedef long long LL; 8 9 ...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1059 1 #include 2 #include 3 4 using namespace std; 5 6 const int MAXN = 100000; 7 int prime[MAXN]; 8 b...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1028 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 const int MAXN = 100; 8 int C; 9 10 ...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1020根据后序遍历和中序遍历求层序遍历 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 const int MAXN = 100...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1021STL慎用啊, 不是超时就是超内存 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 usin...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1046 1 #include 2 3 using namespace std; 4 5 #define MIN(X, Y) ((X) *y) {14 int tmp = *x;15 ...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1023 1 n = input() 2 n2 = n << 1 3 list_n = sorted(list(str(n))) 4 list_n2 = sorted(list(str(n * 2))) 5 i...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1041 1 #include 2 #include 3 int num[11000]; 4 int bet_num[100000 + 5]; 5 6 int main() { 7 int n; 8 ...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1084 1 #include 2 3 using namespace std; 4 5 int hash[256]; 6 char s1[100]; 7 char s2[100]; 8 9 void t...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1015#include #includeusing namespace std;int n, d;char s[1000];int toRadix(int x, int d) { int result ...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1031 1 #include 2 #include 3 4 using namespace std; 5 6 char s[1000]; 7 8 int main() { 9 scanf("%s...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1014 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 const int MAXN...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1050简单题 1 #include 2 #include 3 4 #define MAXN 11000 5 int hash[256]; 6 7 char s1[MAXN]; 8 char s2[MAXN...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1057treap 求第k大的数 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; ...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1039#include#include#include#includeusing namespace std;int n, k;char str[20];int myhash(char *s) { re...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1013n个节点形成一棵树需n-1条边, 减去已有的边数就是需要重新修建的#include#include#include#define MAXN 1100*1100int p[MAXN];int u[MAXN...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1012这题比较坑啊, 没说明白如果成绩相同怎么排序, 例如 1 2 2 3 那3是排第三还是排第四? 两个2怎么排, 两个第二, 没有第三, 3排第四 1 #include 2 #include 3 #inc...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1011 1 #include 2 #include 3 4 const int eps = 1e-9; 5 6 char bet[] = {'W', 'T', 'L'}; 7 double odds[3]...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1079和1090一样的 1 #include 2 #include 3 #include 4 #include 5 6 #define MAXN 100010 7 #define MAX(A, B) ((A...
阅读全文
摘要:http://www.patest.cn/contests/pat-a-practise/1090 1 #include 2 #include 3 #include 4 #include 5 6 #define MAXN 100010 7 #define MAX(A, B) ((A) > (B) ...
阅读全文

浙公网安备 33010602011771号