제출 #390936

#제출 시각아이디문제언어결과실행 시간메모리
390936BlagojceGap (APIO16_gap)C++11
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #define fr(i, n, m) for(int i = (n); i < (m); i ++) #define pb push_back #define st first #define nd second #define pq priority_queue #define all(x) begin(x), end(x) using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; const int mxn = 1e5; #include "gap.h" long long findGap(int T, int N) { ll a1, an; MinMax(0, 1e18, &a1, &an); ll d = (an - a1)/(N-1); ll pr = a1; ll ans = 0; for(int i = 0; a1 + 1 + i*d < an; i++){ ll ai, aj; MinMax(a1+1 + i*d, min(a1 + (i+1)*d, an-1), &ai, &aj); if(ai != -1){ ans = max(ans, ai-pr); pr = aj; } } ans = max(ans, an-pr); return ans }

컴파일 시 표준 에러 (stderr) 메시지

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:41:12: error: expected ';' before '}' token
   41 |  return ans
      |            ^
      |            ;
   42 | }
      | ~