제출 #1175242

#제출 시각아이디문제언어결과실행 시간메모리
1175242wernklungCluedo (IOI10_cluedo)C++20
컴파일 에러
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);
    }
   }
}

컴파일 시 표준 에러 (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];
      |                   ^