# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1027578 | Gangsta | Gap (APIO16_gap) | C++14 | 20 ms | 2856 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/stdc++.h"
#include "gap.h"
#define ll long long
#define pb push_back
#define pii pair<ll,ll>
#define ff first
#define ss second
#define sz size()
const int N = 2e5 + 1;
using namespace std;
ll ans;
// void MinMax(ll s, ll t, ll &mn, ll &mx){
// int a, b;
// cin >> a >> b;
// mn = a;
// mx = b;
// }
ll findGap(int t, int n){
ll mn = 1, mx = 1e18, tmp, tmp1;
if(t == 1){
while(1){
tmp = mn, tmp1 = mx;
MinMax(mn, mx, &mn+1, &mx-1);
// cout << mn << ' ' << mx << '\n';
if(mn == -1) return ans;
ans = max({ans,mn-tmp, tmp1-mx});
}
}
}
// int main(){
// int n, t;
// cin >> t >> n;
// cout << findGap(t, n);
// }
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |