QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#559673 | #8221. 多方计算 | The_cosmos | Compile Error | / | / | C++14 | 492b | 2024-09-12 08:16:58 | 2024-09-12 08:16:58 |
Judging History
answer
#include "mpc.h"
int qn, qm;
int precalc(int n, int m) {
qn = n, qm = m;
return n + m + 3;
}
bool transmit(player& player, int round, int position) {
int p = round - position - 1;
if(p < 0) {
if(p > -9) p += qm + 4;
else p += qm + 19;
}
if(p < 0) return false;
if(player.last_message) {
int q = p;
while(player.memory[q]) player.memory[q ++] = 0;
player.memory[q] = 1;
}
bool r = player.memory[p];
if(position != n) player.memory[p] = 0;
return r;
}
Details
answer.code: In function ‘bool transmit(player&, int, int)’: answer.code:20:24: error: ‘n’ was not declared in this scope 20 | if(position != n) player.memory[p] = 0; | ^