Submission #1122711

#TimeUsernameProblemLanguageResultExecution timeMemory
1122711aaaaaarrozSphinx's Riddle (IOI24_sphinx)C++20
0 / 100
0 ms412 KiB
#include <bits/stdc++.h> using namespace std; int perform_experiment(vector<int> E); vector<int> find_colours(int n,vector<int> x,vector<int> y){ vector<int>color(n); for(int i=0;i<n;i++){ vector<int>nodos; for(int j=0;j<n;j++){ if(j!=i){ nodos.push_back(j); } } int l=0,r=n-1; while(l<r){ int mid=(l+r)/2; vector<int>exp(n,l); exp[i]=-1; int node=0; for(int j=l;j<=mid;j++){ exp[nodos[node]]=j; node++; } int experimento=perform_experiment(exp); if(experimento==(mid-l)){ r=mid; } else{ l=mid+1; } } color[i]=l; } return color; }
#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...