답안 #417844

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
417844 2021-06-04T11:51:49 Z rGamer 전선 연결 (IOI17_wiring) C++17
13 / 100
28 ms 1868 KB
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll min_total_length(vector<int> r, vector<int> b) {
  int n = r.size(), m = b.size();
  if(r[n-1] < b[0]) {
    ll ans = 0;
    int i = 0, j = 0;
    while(i < n or j < m) {
      if(i < n and j < m)
        ans += b[j++] - r[i++];
      else if(i == n)
        ans += b[j++] - r[n - 1];
      else
        ans += b[0] - r[i++];
    }
    return ans;
  }
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB 3rd lines differ - on the 1st token, expected: '25859', found: '0'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 20 ms 1412 KB Output is correct
4 Correct 20 ms 1404 KB Output is correct
5 Correct 21 ms 1380 KB Output is correct
6 Correct 27 ms 1848 KB Output is correct
7 Correct 27 ms 1868 KB Output is correct
8 Correct 27 ms 1868 KB Output is correct
9 Correct 28 ms 1852 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Incorrect 0 ms 204 KB 3rd lines differ - on the 1st token, expected: '17703', found: '0'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB 3rd lines differ - on the 1st token, expected: '27', found: '0'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 204 KB 3rd lines differ - on the 1st token, expected: '25859', found: '0'
2 Halted 0 ms 0 KB -