Submission #743105

# Submission time Handle Problem Language Result Execution time Memory
743105 2023-05-17T08:06:13 Z vjudge1 Rice Hub (IOI11_ricehub) C++17
0 / 100
22 ms 2892 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/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;
}
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 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 1 ms 212 KB Output is correct
7 Correct 1 ms 308 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 312 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 312 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 308 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 -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 312 KB Output is correct
3 Correct 1 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 1 ms 212 KB Output is correct
7 Correct 1 ms 340 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 312 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 312 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 -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 816 KB Output is correct
2 Correct 3 ms 852 KB Output is correct
3 Correct 21 ms 2892 KB Output is correct
4 Correct 21 ms 2884 KB Output is correct
5 Correct 6 ms 1476 KB Output is correct
6 Correct 6 ms 1488 KB Output is correct
7 Correct 18 ms 2620 KB Output is correct
8 Correct 20 ms 2536 KB Output is correct
9 Correct 7 ms 1436 KB Output is correct
10 Correct 7 ms 1432 KB Output is correct
11 Correct 22 ms 2844 KB Output is correct
12 Correct 22 ms 2812 KB Output is correct
13 Incorrect 6 ms 1488 KB Output isn't correct
14 Halted 0 ms 0 KB -