QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#158803#7112. XOR Cliqueucup-team1157#Compile Error//C++20655b2023-09-02 17:02:352023-09-02 17:02:35

详细

answer.code:3:17: error: expected initializer before numeric constant
    3 | const int MAX_N 100000;
      |                 ^~~~~~
answer.code: In function ‘void solve()’:
answer.code:19:22: error: ‘MAX_N’ was not declared in this scope
   19 |         int sequence[MAX_N];
      |                      ^~~~~
answer.code:21:30: error: ‘sequence’ was not declared in this scope
   21 |                 scanf("%d", &sequence[i]);
      |                              ^~~~~~~~
answer.code:27:34: error: ‘sequence’ was not declared in this scope
   27 |                 count[count_ones(sequence[i])]++;
      |                                  ^~~~~~~~
answer.code:31:33: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   31 |                 mx = (mx > count[i]) ? mx : count[i];
      |                                 ^
answer.code:31:50: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   31 |                 mx = (mx > count[i]) ? mx : count[i];
      |                                                  ^
answer.code:18:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   18 |         scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~