Submission #725678

#TimeUsernameProblemLanguageResultExecution timeMemory
725678kyanl9Cluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define F first #define S second using namespace std; typedef long long ll; typedef pair<int,int> pii; /* int m=2,l=3,w=4,counter=0; int Theory(int M, int L, int W){ int c=0; if(M!=m) c++; if(L!=l) c++; if(W!=w) c++; return c; }*/ void solve(){ int c=-1; vector<int> vect,mid; for(int i=1;i<=6;i++){ int v=Theory(i,i,i); if(v==3) c=i; if(v<=2) vect.pb(i); } for(int i=7;i<=10;i++){ if(Theory(c,i,c)!=3) mid.pb(i); } if(int(mid.size()==0)){ // middle empty if(int(vect.size())==3){ // all different numbers; if(Theory(vect[0],vect[1],vect[2])) return; if(Theory(vect[0],vect[2],vect[1])) return; if(Theory(vect[1],vect[0],vect[2])) return; if(Theory(vect[1],vect[2],vect[0])) return; if(Theory(vect[2],vect[1],vect[0])) return; if(Theory(vect[2],vect[0],vect[1])) return; } else if(int(vect.size()==1)) return; else{ if(Theory(vect[0],vect[0],vect[1])) return; if(Theory(vect[0],vect[1],vect[1])) return; if(Theory(vect[1],vect[0],vect[0])) return; if(Theory(vect[1],vect[1],vect[0])) return; if(Theory(vect[1],vect[0],vect[1])) return; if(Theory(vect[0],vect[1],vect[0])) return; } } else{ if(int(vect.size()==2)){ if(Theory(vect[0],mid[0],vect[1])) return; if(Theory(vect[1],mid[0],vect[0])) return; } else{ if(Theory(vect[1],mid[0],vect[1])) return; if(Theory(vect[0],mid[0],vect[0])) return; } } } /* int main(){ ios::sync_with_stdio(0);cin.tie(0); }*/

Compilation message (stderr)

cluedo.cpp: In function 'void solve()':
cluedo.cpp:23:9: error: 'Theory' was not declared in this scope
   23 |   int v=Theory(i,i,i);
      |         ^~~~~~
cluedo.cpp:28:6: error: 'Theory' was not declared in this scope
   28 |   if(Theory(c,i,c)!=3) mid.pb(i);
      |      ^~~~~~
cluedo.cpp:32:7: error: 'Theory' was not declared in this scope
   32 |    if(Theory(vect[0],vect[1],vect[2])) return;
      |       ^~~~~~
cluedo.cpp:33:7: error: 'Theory' was not declared in this scope
   33 |    if(Theory(vect[0],vect[2],vect[1])) return;
      |       ^~~~~~
cluedo.cpp:34:7: error: 'Theory' was not declared in this scope
   34 |    if(Theory(vect[1],vect[0],vect[2])) return;
      |       ^~~~~~
cluedo.cpp:35:7: error: 'Theory' was not declared in this scope
   35 |    if(Theory(vect[1],vect[2],vect[0])) return;
      |       ^~~~~~
cluedo.cpp:36:7: error: 'Theory' was not declared in this scope
   36 |    if(Theory(vect[2],vect[1],vect[0])) return;
      |       ^~~~~~
cluedo.cpp:37:7: error: 'Theory' was not declared in this scope
   37 |    if(Theory(vect[2],vect[0],vect[1])) return;
      |       ^~~~~~
cluedo.cpp:41:7: error: 'Theory' was not declared in this scope
   41 |    if(Theory(vect[0],vect[0],vect[1])) return;
      |       ^~~~~~
cluedo.cpp:42:7: error: 'Theory' was not declared in this scope
   42 |    if(Theory(vect[0],vect[1],vect[1])) return;
      |       ^~~~~~
cluedo.cpp:43:7: error: 'Theory' was not declared in this scope
   43 |    if(Theory(vect[1],vect[0],vect[0])) return;
      |       ^~~~~~
cluedo.cpp:44:7: error: 'Theory' was not declared in this scope
   44 |    if(Theory(vect[1],vect[1],vect[0])) return;
      |       ^~~~~~
cluedo.cpp:45:7: error: 'Theory' was not declared in this scope
   45 |    if(Theory(vect[1],vect[0],vect[1])) return;
      |       ^~~~~~
cluedo.cpp:46:7: error: 'Theory' was not declared in this scope
   46 |    if(Theory(vect[0],vect[1],vect[0])) return;
      |       ^~~~~~
cluedo.cpp:51:7: error: 'Theory' was not declared in this scope
   51 |    if(Theory(vect[0],mid[0],vect[1])) return;
      |       ^~~~~~
cluedo.cpp:52:7: error: 'Theory' was not declared in this scope
   52 |    if(Theory(vect[1],mid[0],vect[0])) return;
      |       ^~~~~~
cluedo.cpp:55:7: error: 'Theory' was not declared in this scope
   55 |    if(Theory(vect[1],mid[0],vect[1])) return;
      |       ^~~~~~
cluedo.cpp:56:7: error: 'Theory' was not declared in this scope
   56 |    if(Theory(vect[0],mid[0],vect[0])) return;
      |       ^~~~~~