제출 #1205283

#제출 시각아이디문제언어결과실행 시간메모리
1205283Andrey스핑크스 (IOI24_sphinx)C++20
36 / 100
32 ms936 KiB
#include "sphinx.h" #include<bits/stdc++.h> using namespace std; int n; bool check(int p, int c, vector<int> haha) { int np = 1-p; vector<int> wow(n,c); for(int i = p; i < n; i+=2) { wow[i] = n; } for(int v: haha) { wow[v] = -1; } if(perform_experiment(wow) < n) { return true; } else { return false; } } int dude(int p, int c, vector<int> haha) { if(haha.size() == 1) { return haha[0]; } vector<int> wow(0); vector<int> wut(0); for(int i = 0; i < haha.size()/2; i++) { wow.push_back(haha[i]); } for(int i = haha.size()/2; i < haha.size(); i++) { wut.push_back(haha[i]); } if(check(p,c,wow)) { return dude(p,c,wow); } else { return dude(p,c,wut); } } std::vector<int> find_colours(int N, std::vector<int> x, std::vector<int> y) { n = N; vector<int> ans(n,-1); for(int i = 0; i < n; i++) { while(true) { vector<int> wow(0); for(int j = 0; j < n; j+=2) { if(ans[j] == -1) { wow.push_back(j); } } if(check(0,i,wow)) { ans[dude(0,i,wow)] = i; } else { break; } } while(true) { vector<int> wow(0); for(int j = 1; j < n; j+=2) { if(ans[j] == -1) { wow.push_back(j); } } if(check(1,i,wow)) { ans[dude(1,i,wow)] = i; } else { break; } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...