| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1232389 | LeonidCuk | 스핑크스 (IOI24_sphinx) | C++17 | 35 ms | 656 KiB |
#include "sphinx.h"
#include <bits/stdc++.h>
using namespace std;
int n;
bool check(int x,int l,int r)
{
vector<int>temp(n);
int l1=l,k=0;
for(int i=0;i<n;i++)
{
if(i==x)temp[i]=-1;
else if(l<=r)
{
temp[i]=l;l++;
}
else {
temp[i]=n;k=1;
}
}
int a=perform_experiment(temp);
if(a==r-l1+1+k)return true;
else return false;
}
vector<int> find_colours(int N,vector<int> X,vector<int> Y) {
n=N;
vector<int>res(n);
for(int i=0;i<n;i++)
{
int l=0,r=n-1;
while(r>l)
{
int m=(l+r)/2;
if(check(i,m+1,r))l=m+1;
else r=m;
}
res[i]=l;
}
return res;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
