Submission #866048

# Submission time Handle Problem Language Result Execution time Memory
866048 2023-10-25T10:44:53 Z ElenaBM Cluedo (IOI10_cluedo) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;
vector<int>a, b, c;
vector<int>ans(3);
vector<int> Solve (){
    a.clear();
    b.clear();
    c.clear();
    for (int i  = 1; i <= 6; ++i){
        a.push_back(i);
        c.push_back(i);
    }
    for (int i = 1; i <= 10; ++i)b.push_back(i);
    int x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]);
    while (x != 0){
        if (x == 1) a.pop_back();
        if (x== 2) b.pop_back();
        else c.pop_back();
        x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]);
    }
    ans[0] = a[(int)a.size() - 1];
    ans[1] = b[(int)b.size()-1];
    ans[2] = c[(int)c.size()-1)];
    return ans;
}

int main()
{
    

    return 0;
}

Compilation message

cluedo.cpp: In function 'std::vector<int> Solve()':
cluedo.cpp:15:80: error: expected ']' before ')' token
   15 |     int x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]);
      |                                                                                ^
      |                                                                                ]
cluedo.cpp:15:13: error: 'Theory' was not declared in this scope
   15 |     int x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]);
      |             ^~~~~~
cluedo.cpp:20:80: error: expected ']' before ')' token
   20 |         x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]);
      |                                                                                ^
      |                                                                                ]
cluedo.cpp:24:31: error: expected ']' before ')' token
   24 |     ans[2] = c[(int)c.size()-1)];
      |                               ^
      |                               ]
cluedo.cpp:24:31: error: expected ';' before ')' token
   24 |     ans[2] = c[(int)c.size()-1)];
      |                               ^
      |                               ;