답안 #1067418

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1067418 2024-08-20T16:47:55 Z ender 경주 (Race) (IOI11_race) C++17
0 / 100
1 ms 2392 KB
#include "race.h"
#include <bits/stdc++.h>

using namespace std;

int best_path(int N, int K, int H[][2], int L[])
{

  int ans = INT32_MAX;

  for(int i = 0; i < N; ++i){

    int act = 0;
    int s = 0;

    for(int j = i; j < N; ++j){

      if(act + L[j] > K) break;

      act += L[j];
      s++;

    }

    if(act == K) {

      ans = min(ans, s);

    }

  }

  return ans;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 ms 348 KB Output isn't correct
4 Halted 0 ms 0 KB -