Submission #1175242

#TimeUsernameProblemLanguageResultExecution timeMemory
1175242wernklungCluedo (IOI10_cluedo)C++20
Compilation error
0 ms0 KiB
#include "grader.h" #include "cluedo.h" #include <bits/stdc++.h> using namespace std; void Solve() { set<int> m_choice = {1,2,3,4,5,6}; set<int> l_choice = {1,2,3,4,5,6,7,8,9,10}; set<int> w_choice = {1,2,3,4,5,6}; while(true){ int m=m_choice[0]; int l=l_choice[0]; int w=w_choice[0]; int result = Theory(m,l,w); if(result == 0){ break; } else if(result == 1){ m_choice.erase(m); } else if(result == 2){ l_choice.erase(l); } else if(result == 3){ l_choice.erase(w); } } }

Compilation message (stderr)

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:12:19: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
   12 |     int m=m_choice[0];
      |                   ^
cluedo.cpp:13:19: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
   13 |     int l=l_choice[0];
      |                   ^
cluedo.cpp:14:19: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
   14 |     int w=w_choice[0];
      |                   ^