답안 #743181

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
743181 2023-05-17T08:38:48 Z vjudge1 쌀 창고 (IOI11_ricehub) C++17
0 / 100
26 ms 1868 KB
#include "ricehub.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 1;
priority_queue<long long, vector<long long>, greater<long long>> q;
int besthub(int R, int L, int X[], long long B)
{
  for(int i=0;i<R;i++) {
    q.push(abs(X[i] - X[(R+1)/2]));
  }
  long long ans = 0 , cou = 0;
  while (!q.empty()) {
    long long t = q.top(); q.pop();
    cou += t;
    if (cou>B) break;
    ans++;
  }
  return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Incorrect 1 ms 212 KB Output isn't correct
20 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Incorrect 1 ms 212 KB Output isn't correct
16 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 724 KB Output is correct
2 Correct 4 ms 724 KB Output is correct
3 Correct 20 ms 1820 KB Output is correct
4 Correct 23 ms 1868 KB Output is correct
5 Correct 6 ms 1104 KB Output is correct
6 Correct 6 ms 1104 KB Output is correct
7 Correct 22 ms 1868 KB Output is correct
8 Correct 21 ms 1792 KB Output is correct
9 Correct 9 ms 1104 KB Output is correct
10 Correct 8 ms 1104 KB Output is correct
11 Correct 26 ms 1844 KB Output is correct
12 Correct 21 ms 1812 KB Output is correct
13 Incorrect 6 ms 1104 KB Output isn't correct
14 Halted 0 ms 0 KB -