Submission #1122712

#TimeUsernameProblemLanguageResultExecution timeMemory
1122712aaaaaarrozSphinx's Riddle (IOI24_sphinx)C++20
24 / 100
47 ms656 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+1)){ 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...