| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1199635 | liza | 경주 (Race) (IOI11_race) | C++20 | 15 ms | 1352 KiB |
#include "race.h"
#include <bits/stdc++.h>
int best_path(int N, int K, int H[][2], int L[])
{
int sum=0;
int j =0;
int rez=-1;
int c=0;
for(int i = 0; i < N-1; i++)
{
sum+=L[i];
while(sum > K || L[j]==0)
{
sum-=L[j];
j++;
}
if(sum==K &&((i-j+1 < rez)||(rez==-1)))
{
rez = i-j+1;
}
}
return rez;
}
| # | 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... | ||||
