# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1091278 |
2024-09-20T10:35:54 Z |
owieczka |
Gap (APIO16_gap) |
C++17 |
|
2000 ms |
524288 KB |
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
vector<ll> points;
long long findGap(int T, int N)
{
ll s = 0;
ll t = 1e18;
ll b, e;
ll n = N;
MinMax(s, t, &b, &e);
// musze podzielic na przedziały
ll prz = (e - b)/n + 1;
ll mn, mx;
points.push_back(b);
for (int i = b + 1; i < e; i+=prz)
{
MinMax(i, i + prz - 1, &mn, &mx);
points.push_back(mn);
points.push_back(mx);
}
mx = 0;
for (int i = 1; i < points.size(); i++)
{
mx = max(points[i] - points[i-1], mx);
}
return mx;
}
Compilation message
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:25:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
25 | for (int i = 1; i < points.size(); i++)
| ~~^~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
444 ms |
524288 KB |
Execution killed with signal 9 |
2 |
Runtime error |
684 ms |
524288 KB |
Execution killed with signal 9 |
3 |
Runtime error |
651 ms |
524288 KB |
Execution killed with signal 9 |
4 |
Runtime error |
780 ms |
524288 KB |
Execution killed with signal 9 |
5 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
6 |
Runtime error |
985 ms |
524288 KB |
Execution killed with signal 9 |
7 |
Runtime error |
964 ms |
524288 KB |
Execution killed with signal 9 |
8 |
Runtime error |
969 ms |
524288 KB |
Execution killed with signal 9 |
9 |
Runtime error |
933 ms |
524288 KB |
Execution killed with signal 9 |
10 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
11 |
Runtime error |
1340 ms |
524288 KB |
Execution killed with signal 9 |
12 |
Runtime error |
1328 ms |
524288 KB |
Execution killed with signal 9 |
13 |
Runtime error |
1417 ms |
524288 KB |
Execution killed with signal 9 |
14 |
Runtime error |
1325 ms |
524288 KB |
Execution killed with signal 9 |
15 |
Execution timed out |
2031 ms |
524288 KB |
Time limit exceeded |
16 |
Runtime error |
1940 ms |
524288 KB |
Execution killed with signal 9 |
17 |
Runtime error |
1744 ms |
524288 KB |
Execution killed with signal 9 |
18 |
Runtime error |
1795 ms |
524288 KB |
Execution killed with signal 9 |
19 |
Runtime error |
1860 ms |
524288 KB |
Execution killed with signal 9 |
20 |
Incorrect |
5 ms |
1236 KB |
Output isn't correct |
21 |
Execution timed out |
2215 ms |
524288 KB |
Time limit exceeded |
22 |
Execution timed out |
2179 ms |
524288 KB |
Time limit exceeded |
23 |
Execution timed out |
2060 ms |
524288 KB |
Time limit exceeded |
24 |
Execution timed out |
2182 ms |
524288 KB |
Time limit exceeded |
25 |
Execution timed out |
3066 ms |
319856 KB |
Time limit exceeded |
26 |
Execution timed out |
2167 ms |
524288 KB |
Time limit exceeded |
27 |
Execution timed out |
2108 ms |
524288 KB |
Time limit exceeded |
28 |
Execution timed out |
2228 ms |
524288 KB |
Time limit exceeded |
29 |
Execution timed out |
2225 ms |
524288 KB |
Time limit exceeded |
30 |
Incorrect |
24 ms |
3276 KB |
Output isn't correct |
31 |
Runtime error |
1206 ms |
524288 KB |
Execution killed with signal 9 |
32 |
Runtime error |
997 ms |
524288 KB |
Execution killed with signal 9 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
523 ms |
524288 KB |
Execution killed with signal 9 |
2 |
Runtime error |
671 ms |
524288 KB |
Execution killed with signal 9 |
3 |
Runtime error |
668 ms |
524288 KB |
Execution killed with signal 9 |
4 |
Runtime error |
759 ms |
524288 KB |
Execution killed with signal 9 |
5 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
6 |
Runtime error |
928 ms |
524288 KB |
Execution killed with signal 9 |
7 |
Runtime error |
1012 ms |
524288 KB |
Execution killed with signal 9 |
8 |
Runtime error |
859 ms |
524288 KB |
Execution killed with signal 9 |
9 |
Runtime error |
898 ms |
524288 KB |
Execution killed with signal 9 |
10 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
11 |
Runtime error |
1289 ms |
524288 KB |
Execution killed with signal 9 |
12 |
Runtime error |
1337 ms |
524288 KB |
Execution killed with signal 9 |
13 |
Runtime error |
1366 ms |
524288 KB |
Execution killed with signal 9 |
14 |
Runtime error |
1342 ms |
524288 KB |
Execution killed with signal 9 |
15 |
Runtime error |
1987 ms |
524288 KB |
Execution killed with signal 9 |
16 |
Runtime error |
1968 ms |
524288 KB |
Execution killed with signal 9 |
17 |
Execution timed out |
2040 ms |
524288 KB |
Time limit exceeded |
18 |
Runtime error |
1858 ms |
524288 KB |
Execution killed with signal 9 |
19 |
Runtime error |
1843 ms |
524288 KB |
Execution killed with signal 9 |
20 |
Incorrect |
7 ms |
1236 KB |
Output isn't correct |
21 |
Execution timed out |
2191 ms |
524288 KB |
Time limit exceeded |
22 |
Execution timed out |
2132 ms |
524288 KB |
Time limit exceeded |
23 |
Execution timed out |
2187 ms |
524288 KB |
Time limit exceeded |
24 |
Execution timed out |
2333 ms |
524288 KB |
Time limit exceeded |
25 |
Execution timed out |
3040 ms |
524288 KB |
Time limit exceeded |
26 |
Execution timed out |
2050 ms |
524288 KB |
Time limit exceeded |
27 |
Execution timed out |
2151 ms |
524288 KB |
Time limit exceeded |
28 |
Execution timed out |
2157 ms |
524288 KB |
Time limit exceeded |
29 |
Execution timed out |
2229 ms |
524288 KB |
Time limit exceeded |
30 |
Incorrect |
24 ms |
3276 KB |
Output isn't correct |
31 |
Runtime error |
1095 ms |
524288 KB |
Execution killed with signal 9 |
32 |
Runtime error |
997 ms |
524288 KB |
Execution killed with signal 9 |