摘要: Code struct circularVec{ int vec[N]; int front, rear; int cnt; void init(){ memset(vec, 0, sizeof(vec)); front = rear = cnt = 0; } bool fullQ(){return 阅读全文
posted @ 2021-10-08 10:43 Mojibake 阅读(58) 评论(0) 推荐(0) 编辑
摘要: Prob 社团的一道水题。 Input 共三行,第一行是一个正整数,表示需要转换的数的进制n(2≤n≤16),第二行是一个n进制数,若n>10则用大写字母A-F表示数码10-15,并且该n进制数对应的十进制的值不超过1000000000,第三行也是一个正整数,表示转换之后的数的进制m(2≤m≤16) 阅读全文
posted @ 2021-09-26 13:48 Mojibake 阅读(84) 评论(0) 推荐(0) 编辑
摘要: Code #include <cstdio> #include <algorithm> using namespace std; const int N = 1000001; bool primeQ[N]; int prime[N / 10]; int cnt; int a, d, n, cur; 阅读全文
posted @ 2021-09-18 20:41 Mojibake 阅读(50) 评论(0) 推荐(0) 编辑
摘要: Code #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; const int N = 128; struct bigInt{ int num[N]; // 阅读全文
posted @ 2021-09-18 10:01 Mojibake 阅读(46) 评论(0) 推荐(0) 编辑
摘要: Code #include <cstdio> #include <cmath> #include <algorithm> using namespace std; const int N = 1000001; int prime[N]; bool primeQ[N]; int x, cur, cnt 阅读全文
posted @ 2021-09-15 23:36 Mojibake 阅读(52) 评论(0) 推荐(0) 编辑
摘要: Code #include <cstdio> #include <algorithm> #include <cstring> using namespace std; const int N = 512; int t, n, m, cnt; int cori[N], flag[N]; inline 阅读全文
posted @ 2021-09-14 22:15 Mojibake 阅读(48) 评论(0) 推荐(0) 编辑
摘要: Code #include <cstdio> using namespace std; const int PRIME[]={0, 2, 5, 10, 17, 28, 41, 58, 77, 100, 129, 160, 197, 238, 281, 328, 381, 440, 501, 568, 阅读全文
posted @ 2021-09-11 13:20 Mojibake 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 随着主力回归Windows,也需要Windows下的对拍脚本,于是从紫书附录上抄了一份。 @echo off :again data.exe > input me.exe < input > output.me std.exe < input > output.std fc output.me ou 阅读全文
posted @ 2021-09-08 21:08 Mojibake 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Code #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int MAX_LENGTH = 100; char str1[MAX_LENGTH], str2[MAX_LENGTH 阅读全文
posted @ 2021-09-08 20:58 Mojibake 阅读(60) 评论(0) 推荐(0) 编辑
摘要: Code #include <iostream> #include <iomanip> #include <cmath> using namespace std; const double IMPOS = 1024; char ch; double t = IMPOS, d = IMPOS, e, 阅读全文
posted @ 2021-09-06 20:49 Mojibake 阅读(69) 评论(0) 推荐(0) 编辑
知识共享许可协议
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。