QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#559321 | #8221. 多方计算 | -xcxxx- | Compile Error | / | / | C++14 | 1.1kb | 2024-09-11 21:21:53 | 2024-09-11 21:21:56 |
Judging History
This is the latest submission verdict.
- [2024-09-11 21:21:56]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-09-11 21:21:53]
- Submitted
answer
#include<bits/stdc++.h>
#include "grader.cpp"
// #include "mpc.h"
using namespace std;
int rd() {int x=0,f=1;char c=getchar();while(!isdigit(c))f=c=='-'?-1:f,c=getchar();while(isdigit(c))x=x*10+(c^48),c=getchar();return x*f;}
int n,m;
int precalc(int n,int m) {
::n=n,::m=m;
return n+m+3;
}
int calc(int pos,int round) {
int res=round-pos-1;
if(res<0) res+=m+__lg(n)+1;
if(res<0) res+=m+__lg(n)+1;
if(res>=0) return res;
return -1;
}
bool transmit(player &player,int round,int pos) {
int p=calc(pos-1,round-1);
if(p!=-1) {
player.memory[p]+=player.last_message;
for(int i=p;i<m+__lg(n)+1;i++) {
if(player.memory[i]>1) player.memory[i+1]++,player.memory[i]-=2;
else break;
}
}
p=calc(pos,round);
if(p==-1) return 0;
// fprintf(stderr,"pos=%d round=%d trans=%d\n",pos,round,p);
// for(int i=0;i<20;i++) fprintf(stderr,"%d",player.memory[i]);
// fprintf(stderr,"\n");
int v=player.memory[p];
if(pos!=n) player.memory[p]=0;
return v;
}
Details
answer.code:2:10: fatal error: grader.cpp: No such file or directory 2 | #include "grader.cpp" | ^~~~~~~~~~~~ compilation terminated.