Submission #1017795

#TimeUsernameProblemLanguageResultExecution timeMemory
1017795socpiteCluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "cluedo.h" int a[4] = {1, 1, 1, 1}; void Solve(){ int r; while(int tmp = Theory(a[1], a[2], [3]))a[tmp]++; }

Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:8:40: error: expected identifier before numeric constant
    8 |    while(int tmp = Theory(a[1], a[2], [3]))a[tmp]++;
      |                                        ^
cluedo.cpp: In lambda function:
cluedo.cpp:8:42: error: expected '{' before ')' token
    8 |    while(int tmp = Theory(a[1], a[2], [3]))a[tmp]++;
      |                                          ^
cluedo.cpp: In function 'void Solve()':
cluedo.cpp:8:42: error: invalid user-defined conversion from 'Solve()::<lambda()>' to 'int' [-fpermissive]
cluedo.cpp:8:39: note: candidate is: 'Solve()::<lambda()>::operator void (*)()() const' (near match)
    8 |    while(int tmp = Theory(a[1], a[2], [3]))a[tmp]++;
      |                                       ^
cluedo.cpp:8:39: note:   no known conversion from 'void (*)()' to 'int'
In file included from cluedo.cpp:1:
grader.h:1:30: note:   initializing argument 3 of 'int Theory(int, int, int)'
    1 | int Theory(int M, int L, int W);
      |                          ~~~~^
cluedo.cpp:7:8: warning: unused variable 'r' [-Wunused-variable]
    7 |    int r;
      |        ^