| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1296008 | eri16 | 기지국 (IOI20_stations) | C++20 | 2 ms | 476 KiB |
#include "stations.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
vector<int> lbl(n);
for (int i=0; i<n; i++){
lbl[i]=i;
}
}
int find_next_station(int s, int t, vector <int> c){
if (c.size()==1){return c[0];}
else if(s==0){
int lb=c[0];
int rb=c[0];
while (rb<=1000){
lb=lb*2+1;
rb=rb*2+2;
if (lb<=t && t<=rb){return c[0];}
}
return c[1];
}
else{
int lb=c[1];
int rb=c[1];
while (rb<=1000){
lb=lb*2+1;
rb=rb*2+2;
if (lb<=t && t<=rb){return c[1];}
}
if (c.size()==3){
lb=c[2];
rb=c[2];
while (rb<=1000){
lb=lb*2+1;
rb=rb*2+2;
if (lb<=t && t<=rb){return c[2];}
}
}
return c[0];
}
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
