Submission #560714

#TimeUsernameProblemLanguageResultExecution timeMemory
560714Tien_NoobGap (APIO16_gap)C++17
Compilation error
0 ms0 KiB
//Make CSP great again //Vengeance #include <bits/stdc++.h> #include <gap.h> #define TASK "TESTCODE" #define Log2(x) 31 - __builtin_clz(x) using namespace std; long long findGap(int t, int n) { long long res = 0; long long mn, mx; MinMax(0, 1e18, mn, mx); long long maxPre = -1; for (long long l = mn; l <= mx; l += (mx - mn + 1)/n) { MinMax(l, l + (mx - mn + 1)/n - 1, mn, mx); if (mn == -1) { continue; } if (maxPre != -1) { res = max(res, mn - maxPre); } maxPre = mx; } return res; } /*void read() { } void solve() { } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); if (fopen(TASK".INP", "r")) { freopen(TASK".INP", "r", stdin); //freopen(TASK".OUT", "w", stdout); } int t = 1; bool typetest = false; if (typetest) { cin >> t; } for (int __ = 1; __ <= t; ++ __) { //cout << "Case " << __ << ": "; read(); solve(); } }*/

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:12:21: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   12 |     MinMax(0, 1e18, mn, mx);
      |                     ^~
      |                     |
      |                     long long int
In file included from gap.cpp:4:
gap.h:1:35: note:   initializing argument 3 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
    1 | void MinMax(long long, long long, long long*, long long*);
      |                                   ^~~~~~~~~~
gap.cpp:12:25: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   12 |     MinMax(0, 1e18, mn, mx);
      |                         ^~
      |                         |
      |                         long long int
In file included from gap.cpp:4:
gap.h:1:47: note:   initializing argument 4 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
    1 | void MinMax(long long, long long, long long*, long long*);
      |                                               ^~~~~~~~~~
gap.cpp:16:44: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   16 |         MinMax(l, l + (mx - mn + 1)/n - 1, mn, mx);
      |                                            ^~
      |                                            |
      |                                            long long int
In file included from gap.cpp:4:
gap.h:1:35: note:   initializing argument 3 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
    1 | void MinMax(long long, long long, long long*, long long*);
      |                                   ^~~~~~~~~~
gap.cpp:16:48: error: invalid conversion from 'long long int' to 'long long int*' [-fpermissive]
   16 |         MinMax(l, l + (mx - mn + 1)/n - 1, mn, mx);
      |                                                ^~
      |                                                |
      |                                                long long int
In file included from gap.cpp:4:
gap.h:1:47: note:   initializing argument 4 of 'void MinMax(long long int, long long int, long long int*, long long int*)'
    1 | void MinMax(long long, long long, long long*, long long*);
      |                                               ^~~~~~~~~~