Submission #199530

#TimeUsernameProblemLanguageResultExecution timeMemory
199530Markomafko972Cluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#include "grader.h" #include "cluedo.h" #include<bits/stdc++.h> using namespace std; set<int> s[5]; void Solve { for (int i = 1; i <= 10; i++) { s[2].insert(i); if (i <= 6) { s[1].insert(i); s[3].insert(i); } } while (s[1].size() > 1 || s[2].size() > 1 || s[3].size() > 1) { int t = Theory(*s[1].begin(), *s[2].begin(), *s[3].begin()); if (t == 0) return; s[t].erase(s[t].begin()); } int t = Theory(*s[1].begin(), *s[2].begin(), *s[3].begin()); return; }

Compilation message (stderr)

cluedo.cpp:7:6: error: variable or field 'Solve' declared void
 void Solve {
      ^~~~~
cluedo.cpp:9:2: error: expected primary-expression before 'for'
  for (int i = 1; i <= 10; i++) {
  ^~~
cluedo.cpp:9:2: error: expected '}' before 'for'
cluedo.cpp:9:18: error: 'i' does not name a type
  for (int i = 1; i <= 10; i++) {
                  ^
cluedo.cpp:9:27: error: 'i' does not name a type
  for (int i = 1; i <= 10; i++) {
                           ^
cluedo.cpp:17:2: error: expected unqualified-id before 'while'
  while (s[1].size() > 1 || s[2].size() > 1 || s[3].size() > 1) {
  ^~~~~
cluedo.cpp:24:2: error: expected unqualified-id before 'return'
  return;
  ^~~~~~
cluedo.cpp:25:1: error: expected declaration before '}' token
 }
 ^