QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#560082#8221. 多方计算zqiaorCompile Error//C++17370b2024-09-12 12:15:222024-09-12 12:15:22

Judging History

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

  • [2024-09-12 12:15:22]
  • 评测
  • [2024-09-12 12:15:22]
  • 提交

answer

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

详细

answer.code: In function ‘bool transmit(player&, int, int)’:
answer.code:9:29: error: ‘n’ was not declared in this scope
    9 |                 now+=M+__lg(n-1)+1;
      |                             ^