QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#728269#9570. Binary Treeucup-team159#Compile Error//C++23439b2024-11-09 14:52:372024-11-09 14:52:53

Judging History

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

  • [2024-11-09 14:52:53]
  • 评测
  • [2024-11-09 14:52:37]
  • 提交

answer

						int X = sz[x], Y = sz[y], R = num_on - X - Y;
						if(max({X,Y,R}) <= num_on/2){
							int t = ask(x,y);
							auto d0 = get_dist(x);
							auto d1 = get_dist(y);
							rep(v,N){
								bool valid = false;
								if(t == 0 && d0[v] < d1[v]) valid = true;
								if(t == 1 && d0[v] == d1[v]) valid = true;
								if(t == 2 && d0[v] > d1[v]) valid = true;
								on[v] = on[v] && valid;
							}
							goto done;

详细

answer.code:1:57: error: ‘sz’ was not declared in this scope
    1 |                                                 int X = sz[x], Y = sz[y], R = num_on - X - Y;
      |                                                         ^~
answer.code:1:60: error: ‘x’ was not declared in this scope
    1 |                                                 int X = sz[x], Y = sz[y], R = num_on - X - Y;
      |                                                            ^
answer.code:2:49: error: expected unqualified-id before ‘if’
    2 |                                                 if(max({X,Y,R}) <= num_on/2){
      |                                                 ^~
answer.code:2:63: error: expected unqualified-id before ‘)’ token
    2 |                                                 if(max({X,Y,R}) <= num_on/2){
      |                                                               ^