QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#560026#8221. 多方计算zqiaorCompile Error//C++11304b2024-09-12 11:32:532024-09-12 11:32:55

Judging History

你现在查看的是最新测评结果

  • [2024-09-12 11:32:55]
  • 评测
  • [2024-09-12 11:32:53]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int precalc(int n,int m){N=n,M=m;return n+m+__lg(n);}
bool transmit(player &X,int t,int x){
	int now=t-x-1,la=X.last_message,Now;
	if(t-x-1<0)return 0;
	if(la){
		while(X.memory[Now])X.memory[Now++]=0;
		X.memory[Now]=1;
	}
	return X.memory[now];
}

Details

answer.code: In function ‘int precalc(int, int)’:
answer.code:3:26: error: ‘N’ was not declared in this scope
    3 | int precalc(int n,int m){N=n,M=m;return n+m+__lg(n);}
      |                          ^
answer.code:3:30: error: ‘M’ was not declared in this scope
    3 | int precalc(int n,int m){N=n,M=m;return n+m+__lg(n);}
      |                              ^
answer.code: At global scope:
answer.code:4:15: error: ‘player’ was not declared in this scope
    4 | bool transmit(player &X,int t,int x){
      |               ^~~~~~
answer.code:4:23: error: ‘X’ was not declared in this scope
    4 | bool transmit(player &X,int t,int x){
      |                       ^
answer.code:4:25: error: expected primary-expression before ‘int’
    4 | bool transmit(player &X,int t,int x){
      |                         ^~~
answer.code:4:31: error: expected primary-expression before ‘int’
    4 | bool transmit(player &X,int t,int x){
      |                               ^~~
answer.code:4:36: error: expression list treated as compound expression in initializer [-fpermissive]
    4 | bool transmit(player &X,int t,int x){
      |                                    ^