# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
659020 | 2022-11-15T19:59:22 Z | Cristian | Rabbit Carrot (LMIO19_triusis) | C++14 | 135 ms | 13176 KB |
#include <iostream> #include <set> #include <vector> using namespace std; const int NMAX = 200005; int v[NMAX]; vector <int> a; multiset <int> s; int main() { int n, m, i; cin >> n >> m; for(i = 1; i <= n; i++) { cin >> v[i]; if(i*m - v[i] >= 0) a.push_back(i*m - v[i]); } for(i = 0; i < a.size(); i++) { auto it = s.upper_bound(a[i]); if(it != s.end()) s.erase(it); s.insert(a[i]); } cout << n - s.size(); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 316 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 | 1 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 1 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 | 312 KB | Output is correct |
14 | Correct | 0 ms | 312 KB | Output is correct |
15 | Correct | 1 ms | 212 KB | Output is correct |
16 | Correct | 1 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 316 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 | 1 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 1 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 | 312 KB | Output is correct |
14 | Correct | 0 ms | 312 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 | Correct | 1 ms | 212 KB | Output is correct |
20 | Correct | 1 ms | 468 KB | Output is correct |
21 | Correct | 2 ms | 596 KB | Output is correct |
22 | Correct | 1 ms | 340 KB | Output is correct |
23 | Correct | 3 ms | 596 KB | Output is correct |
24 | Correct | 3 ms | 596 KB | Output is correct |
25 | Correct | 3 ms | 580 KB | Output is correct |
26 | Correct | 2 ms | 596 KB | Output is correct |
27 | Correct | 2 ms | 460 KB | Output is correct |
28 | Correct | 2 ms | 596 KB | Output is correct |
29 | Correct | 2 ms | 596 KB | Output is correct |
30 | Correct | 2 ms | 468 KB | Output is correct |
31 | Correct | 2 ms | 468 KB | Output is correct |
32 | Correct | 2 ms | 468 KB | Output is correct |
33 | Correct | 3 ms | 488 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 468 KB | Output is correct |
5 | Correct | 2 ms | 596 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
7 | Correct | 3 ms | 596 KB | Output is correct |
8 | Correct | 3 ms | 596 KB | Output is correct |
9 | Correct | 3 ms | 580 KB | Output is correct |
10 | Correct | 2 ms | 596 KB | Output is correct |
11 | Correct | 2 ms | 460 KB | Output is correct |
12 | Correct | 2 ms | 596 KB | Output is correct |
13 | Correct | 2 ms | 596 KB | Output is correct |
14 | Correct | 2 ms | 468 KB | Output is correct |
15 | Correct | 2 ms | 468 KB | Output is correct |
16 | Correct | 2 ms | 468 KB | Output is correct |
17 | Correct | 3 ms | 488 KB | Output is correct |
18 | Correct | 0 ms | 212 KB | Output is correct |
19 | Correct | 1 ms | 212 KB | Output is correct |
20 | Correct | 0 ms | 212 KB | Output is correct |
21 | Correct | 1 ms | 316 KB | Output is correct |
22 | Correct | 0 ms | 212 KB | Output is correct |
23 | Correct | 1 ms | 212 KB | Output is correct |
24 | Correct | 1 ms | 212 KB | Output is correct |
25 | Correct | 1 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 1 ms | 212 KB | Output is correct |
28 | Correct | 0 ms | 212 KB | Output is correct |
29 | Correct | 1 ms | 212 KB | Output is correct |
30 | Correct | 1 ms | 312 KB | Output is correct |
31 | Correct | 0 ms | 312 KB | Output is correct |
32 | Correct | 1 ms | 212 KB | Output is correct |
33 | Correct | 1 ms | 212 KB | Output is correct |
34 | Correct | 3 ms | 324 KB | Output is correct |
35 | Correct | 3 ms | 320 KB | Output is correct |
36 | Correct | 3 ms | 468 KB | Output is correct |
37 | Correct | 2 ms | 596 KB | Output is correct |
38 | Correct | 3 ms | 468 KB | Output is correct |
39 | Correct | 3 ms | 596 KB | Output is correct |
40 | Correct | 2 ms | 468 KB | Output is correct |
41 | Correct | 2 ms | 324 KB | Output is correct |
42 | Correct | 2 ms | 468 KB | Output is correct |
43 | Correct | 2 ms | 468 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 324 KB | Output is correct |
2 | Correct | 3 ms | 320 KB | Output is correct |
3 | Correct | 3 ms | 468 KB | Output is correct |
4 | Correct | 2 ms | 596 KB | Output is correct |
5 | Correct | 3 ms | 468 KB | Output is correct |
6 | Correct | 3 ms | 596 KB | Output is correct |
7 | Correct | 2 ms | 468 KB | Output is correct |
8 | Correct | 2 ms | 324 KB | Output is correct |
9 | Correct | 2 ms | 468 KB | Output is correct |
10 | Correct | 2 ms | 468 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 | 1 ms | 468 KB | Output is correct |
15 | Correct | 2 ms | 596 KB | Output is correct |
16 | Correct | 1 ms | 340 KB | Output is correct |
17 | Correct | 3 ms | 596 KB | Output is correct |
18 | Correct | 3 ms | 596 KB | Output is correct |
19 | Correct | 3 ms | 580 KB | Output is correct |
20 | Correct | 2 ms | 596 KB | Output is correct |
21 | Correct | 2 ms | 460 KB | Output is correct |
22 | Correct | 2 ms | 596 KB | Output is correct |
23 | Correct | 2 ms | 596 KB | Output is correct |
24 | Correct | 2 ms | 468 KB | Output is correct |
25 | Correct | 2 ms | 468 KB | Output is correct |
26 | Correct | 2 ms | 468 KB | Output is correct |
27 | Correct | 3 ms | 488 KB | Output is correct |
28 | Correct | 0 ms | 212 KB | Output is correct |
29 | Correct | 1 ms | 212 KB | Output is correct |
30 | Correct | 0 ms | 212 KB | Output is correct |
31 | Correct | 1 ms | 316 KB | Output is correct |
32 | Correct | 0 ms | 212 KB | Output is correct |
33 | Correct | 1 ms | 212 KB | Output is correct |
34 | Correct | 1 ms | 212 KB | Output is correct |
35 | Correct | 1 ms | 212 KB | Output is correct |
36 | Correct | 0 ms | 212 KB | Output is correct |
37 | Correct | 1 ms | 212 KB | Output is correct |
38 | Correct | 0 ms | 212 KB | Output is correct |
39 | Correct | 1 ms | 212 KB | Output is correct |
40 | Correct | 1 ms | 312 KB | Output is correct |
41 | Correct | 0 ms | 312 KB | Output is correct |
42 | Correct | 1 ms | 212 KB | Output is correct |
43 | Correct | 1 ms | 212 KB | Output is correct |
44 | Correct | 88 ms | 11656 KB | Output is correct |
45 | Correct | 72 ms | 2940 KB | Output is correct |
46 | Correct | 92 ms | 3452 KB | Output is correct |
47 | Correct | 95 ms | 3500 KB | Output is correct |
48 | Correct | 88 ms | 10584 KB | Output is correct |
49 | Correct | 106 ms | 12084 KB | Output is correct |
50 | Correct | 114 ms | 8240 KB | Output is correct |
51 | Correct | 135 ms | 13176 KB | Output is correct |
52 | Correct | 98 ms | 7396 KB | Output is correct |
53 | Correct | 56 ms | 2300 KB | Output is correct |
54 | Correct | 109 ms | 9760 KB | Output is correct |
55 | Correct | 105 ms | 9796 KB | Output is correct |