# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
725685 |
2023-04-17T21:17:34 Z |
kyanl9 |
Cluedo (IOI10_cluedo) |
C++17 |
|
1 ms |
288 KB |
#include <bits/stdc++.h>
#include "grader.h"
#include "cluedo.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;
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)){
if(int(vect.size())==3){
Theory(vect[0],vect[1],vect[2]);
Theory(vect[0],vect[2],vect[1]);
Theory(vect[1],vect[0],vect[2]);
Theory(vect[1],vect[2],vect[0]);
Theory(vect[2],vect[1],vect[0]);
Theory(vect[2],vect[0],vect[1]);
}
else if(int(vect.size()==1)) return;
else{
Theory(vect[0],vect[0],vect[1]);
Theory(vect[0],vect[1],vect[1]);
Theory(vect[1],vect[0],vect[0]);
Theory(vect[1],vect[1],vect[0]);
Theory(vect[1],vect[0],vect[1]);
Theory(vect[0],vect[1],vect[0]);
}
}
else{
if(int(vect.size()==2)){
Theory(vect[0],mid[0],vect[1]);
Theory(vect[1],mid[0],vect[0]);
}
else{
Theory(vect[1],mid[0],vect[1]);
Theory(vect[0],mid[0],vect[0]);
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
288 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |