SPJ代码如下:
#include "testlib.h"
#include<bits/stdc++.h>
string key[10];
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
long long uid = ouf.readLong();
int a = ouf.readInt();
int b = ouf.readInt();
int c = ans.readInt();
int d = ans.readInt();
int num = ans.readInt();
char need;
for(int i = 2;i <= 10;i ++)
key[1] += char((uid % i + uid % 14 + i * 3 / 2) % 65 + 'a');
for(int i = 1;i <= 8;i ++)
key[2] += char((uid * i) % 65 + ' ');
for(int i = 1;i <= 8;i ++)
key[3] += char((uid / i * 3 / i + i - i * 3 / 2) % 65 + 'A');
for(int i = 1;i <= 8;i ++)
key[4] += char((4 * i / 5 * 2 + 23 * i / 34 + 234 - 123) % 65 + '-');
need = key[num][1];
if(a == c && b == d)
quitf(_ok, "%c",need);
else
quitf(_wa, "WA 掉了");
}
报错
/tmp/compiler_2jqp_0i4/src: In function ‘int main(int, char**)’:
/tmp/compiler_2jqp_0i4/src:15:9: 错误:‘string’ was not declared in this scope; did you mean ‘std::string’?
15 | string key[10];
| ^~~~~~
| std::string