이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |