Submission #743179

# Submission time Handle Problem Language Result Execution time Memory
743179 2023-05-17T08:38:23 Z vjudge1 Rice Hub (IOI11_ricehub) C++17
0 / 100
26 ms 1876 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 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 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 0 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 0 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 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 0 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 0 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Incorrect 0 ms 212 KB Output isn't correct
20 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 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 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 284 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 0 ms 212 KB Output isn't correct
16 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 724 KB Output is correct
2 Correct 3 ms 756 KB Output is correct
3 Correct 21 ms 1780 KB Output is correct
4 Correct 26 ms 1868 KB Output is correct
5 Correct 5 ms 1104 KB Output is correct
6 Correct 6 ms 1100 KB Output is correct
7 Correct 18 ms 1828 KB Output is correct
8 Correct 17 ms 1820 KB Output is correct
9 Correct 6 ms 1104 KB Output is correct
10 Correct 6 ms 1100 KB Output is correct
11 Correct 20 ms 1856 KB Output is correct
12 Correct 23 ms 1876 KB Output is correct
13 Incorrect 6 ms 1036 KB Output isn't correct
14 Halted 0 ms 0 KB -