QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#507592#9156. 百万富翁Farmer_DCompile Error//C++171.5kb2024-08-06 19:34:332024-08-06 19:34:34

详细

answer.code: In function ‘void read(T&)’:
answer.code:15:27: error: there are no arguments to ‘getchar’ that depend on a template parameter, so a declaration of ‘getchar’ must be available [-fpermissive]
   15 |     FF=0;int RR=1;char ch=getchar();
      |                           ^~~~~~~
answer.code:15:27: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
answer.code:16:11: error: there are no arguments to ‘isdigit’ that depend on a template parameter, so a declaration of ‘isdigit’ must be available [-fpermissive]
   16 |     for(;!isdigit(ch);ch=getchar()) if(ch=='-') RR=-1;
      |           ^~~~~~~
answer.code:16:26: error: there are no arguments to ‘getchar’ that depend on a template parameter, so a declaration of ‘getchar’ must be available [-fpermissive]
   16 |     for(;!isdigit(ch);ch=getchar()) if(ch=='-') RR=-1;
      |                          ^~~~~~~
answer.code:17:10: error: there are no arguments to ‘isdigit’ that depend on a template parameter, so a declaration of ‘isdigit’ must be available [-fpermissive]
   17 |     for(;isdigit(ch);ch=getchar()) FF=(FF<<1)+(FF<<3)+ch-48;
      |          ^~~~~~~
answer.code:17:25: error: there are no arguments to ‘getchar’ that depend on a template parameter, so a declaration of ‘getchar’ must be available [-fpermissive]
   17 |     for(;isdigit(ch);ch=getchar()) FF=(FF<<1)+(FF<<3)+ch-48;
      |                         ^~~~~~~
answer.code: In function ‘void solve(std::vector<int>)’:
answer.code:24:31: error: invalid declarator before ‘b’
   24 |     vector<int> a,vector<int> b;
      |                               ^
answer.code:30:63: error: ‘b’ was not declared in this scope
   30 |         F(j,0,SZ(pos[i])) F(k,j+1,SZ(pos[i])) a.pb(pos[i][j]),b.pb(pos[i][k]);
      |                                                               ^
answer.code:33:27: error: ‘b’ was not declared in this scope
   33 |     vector<int> ret=ask(a,b);
      |                           ^
answer.code:37:47: error: ‘w’ was not declared in this scope
   37 |         F(j,0,SZ(pos[i])) F(k,j+1,SZ(pos[i])) w[j][k]=w[k][j]=ret[st[i]]+cnt,cnt++;
      |                                               ^
answer.code:40:40: error: ‘w’ was not declared in this scope
   40 |             F(k,0,SZ(pos[i])) if(j!=k&&w[j][k]!=j) fl=0;
      |                                        ^