QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#560947#8221. 多方计算ktq_cppCompile Error//C++14474b2024-09-12 19:06:042024-09-12 19:06:04

Judging History

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

  • [2024-09-12 19:06:04]
  • 评测
  • [2024-09-12 19:06:04]
  • 提交

answer

#include"mpc.h"
const int B=10,C=3;
int n,m;
int precalc(int _n,int _m){
	n=_n,m=_m;
	return n+m+3;
}
bool transmit(players& player,int round,int position){
	int id=round-position-1,o=player.last_message;
	if(id<0){
		if(id>=-B)id=id+m+C;
		else id=id+m+B+11;
	}
	if(id<0)return 0;
	if(o){
		int x=id;
		while(player.memory[x])player.memory[x]=0,++x;
		player.memoty[x]=1;
	}
	bool u=player.memory[id];
	if(position!=n)player.memory[id]=0;
	return u;
}

Details

answer.code:8:15: error: ‘bool transmit’ redeclared as different kind of entity
    8 | bool transmit(players& player,int round,int position){
      |               ^~~~~~~
In file included from answer.code:1:
mpc.h:7:6: note: previous declaration ‘bool transmit(player&, int, int)’
    7 | bool transmit(player &player, int round,int position);
      |      ^~~~~~~~
answer.code:8:15: error: ‘players’ was not declared in this scope; did you mean ‘player’?
    8 | bool transmit(players& player,int round,int position){
      |               ^~~~~~~
      |               player
answer.code:8:30: error: expected primary-expression before ‘,’ token
    8 | bool transmit(players& player,int round,int position){
      |                              ^
answer.code:8:31: error: expected primary-expression before ‘int’
    8 | bool transmit(players& player,int round,int position){
      |                               ^~~
answer.code:8:41: error: expected primary-expression before ‘int’
    8 | bool transmit(players& player,int round,int position){
      |                                         ^~~