QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#429538 | #8221. 多方计算 | Register | Compile Error | / | / | C++20 | 351b | 2024-06-02 16:40:31 | 2024-06-02 16:40:32 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘bool transmit(player&, int, int)’: answer.code:2:298: error: ‘position’ was not declared in this scope 2 | const int B=8,C=4;int N,M;int precalc(int n,int m){N=n,M=m;return n+m+3;}bool transmit(player&a,int r,int p){int np=r-p-1,o=a.last_message,lp;if(np<0){if(np>=-B)np=np+M+C;else np=np+M+B+11;}if(np<0)return 0;if(o){lp=np;while(a.memory[lp])a.memory[lp]=0,++lp;a.memory[lp]=1;}bool u=a.memory[np];if(position!=N)a.memory[np]=0;return u;} | ^~~~~~~~