Submission #1091279

# Submission time Handle Problem Language Result Execution time Memory
1091279 2024-09-20T10:38:59 Z owieczka Gap (APIO16_gap) C++17
0 / 100
52 ms 3400 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 (ll 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 (ll 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:21: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |    for (ll i = 1; i < points.size(); i++)
      |                   ~~^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Incorrect 0 ms 344 KB Output isn't correct
3 Incorrect 0 ms 344 KB Output isn't correct
4 Incorrect 0 ms 344 KB Output isn't correct
5 Incorrect 0 ms 344 KB Output isn't correct
6 Incorrect 0 ms 344 KB Output isn't correct
7 Incorrect 1 ms 344 KB Output isn't correct
8 Incorrect 1 ms 344 KB Output isn't correct
9 Incorrect 1 ms 344 KB Output isn't correct
10 Incorrect 0 ms 344 KB Output isn't correct
11 Incorrect 1 ms 344 KB Output isn't correct
12 Incorrect 1 ms 344 KB Output isn't correct
13 Incorrect 1 ms 344 KB Output isn't correct
14 Incorrect 1 ms 344 KB Output isn't correct
15 Incorrect 1 ms 344 KB Output isn't correct
16 Incorrect 9 ms 1236 KB Output isn't correct
17 Incorrect 10 ms 1236 KB Output isn't correct
18 Incorrect 9 ms 1236 KB Output isn't correct
19 Incorrect 9 ms 1236 KB Output isn't correct
20 Incorrect 5 ms 1236 KB Output isn't correct
21 Incorrect 37 ms 3268 KB Output isn't correct
22 Incorrect 52 ms 3268 KB Output isn't correct
23 Incorrect 42 ms 3268 KB Output isn't correct
24 Incorrect 39 ms 3276 KB Output isn't correct
25 Incorrect 35 ms 3264 KB Output isn't correct
26 Incorrect 36 ms 3268 KB Output isn't correct
27 Incorrect 38 ms 3276 KB Output isn't correct
28 Incorrect 35 ms 3296 KB Output isn't correct
29 Incorrect 46 ms 3268 KB Output isn't correct
30 Incorrect 23 ms 3364 KB Output isn't correct
31 Incorrect 0 ms 344 KB Output isn't correct
32 Incorrect 0 ms 344 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Incorrect 0 ms 344 KB Output isn't correct
3 Incorrect 0 ms 344 KB Output isn't correct
4 Incorrect 0 ms 344 KB Output isn't correct
5 Incorrect 1 ms 344 KB Output isn't correct
6 Incorrect 0 ms 344 KB Output isn't correct
7 Incorrect 0 ms 344 KB Output isn't correct
8 Incorrect 1 ms 344 KB Output isn't correct
9 Incorrect 1 ms 344 KB Output isn't correct
10 Incorrect 0 ms 344 KB Output isn't correct
11 Incorrect 1 ms 344 KB Output isn't correct
12 Incorrect 1 ms 344 KB Output isn't correct
13 Incorrect 1 ms 344 KB Output isn't correct
14 Incorrect 1 ms 344 KB Output isn't correct
15 Incorrect 1 ms 344 KB Output isn't correct
16 Incorrect 10 ms 1276 KB Output isn't correct
17 Incorrect 9 ms 1224 KB Output isn't correct
18 Incorrect 9 ms 1236 KB Output isn't correct
19 Incorrect 10 ms 1236 KB Output isn't correct
20 Incorrect 6 ms 1236 KB Output isn't correct
21 Incorrect 38 ms 3268 KB Output isn't correct
22 Incorrect 37 ms 3268 KB Output isn't correct
23 Incorrect 40 ms 3252 KB Output isn't correct
24 Incorrect 38 ms 3276 KB Output isn't correct
25 Incorrect 36 ms 3400 KB Output isn't correct
26 Incorrect 36 ms 3276 KB Output isn't correct
27 Incorrect 38 ms 3276 KB Output isn't correct
28 Incorrect 39 ms 3272 KB Output isn't correct
29 Incorrect 45 ms 3276 KB Output isn't correct
30 Incorrect 25 ms 3276 KB Output isn't correct
31 Incorrect 0 ms 344 KB Output isn't correct
32 Incorrect 0 ms 344 KB Output isn't correct