답안 #1027561

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1027561 2024-07-19T07:34:49 Z Gangsta Gap (APIO16_gap) C++14
0 / 100
2000 ms 2900 KB
#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){

// }

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, &mx);
			if(mn == -1) return ans;
			ans = max({ans,mn-tmp, tmp1-mx});
		}
	}
}

// int main(){
//     int n, t;
//     cin >> t >> n;
//     cout << findGap(t, n);
// }

Compilation message

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type]
   30 | }
      | ^
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3028 ms 344 KB Time limit exceeded
2 Execution timed out 3052 ms 2392 KB Time limit exceeded
3 Execution timed out 3026 ms 2392 KB Time limit exceeded
4 Execution timed out 3063 ms 2392 KB Time limit exceeded
5 Execution timed out 3034 ms 2392 KB Time limit exceeded
6 Execution timed out 3066 ms 2392 KB Time limit exceeded
7 Execution timed out 3074 ms 2392 KB Time limit exceeded
8 Execution timed out 3038 ms 2392 KB Time limit exceeded
9 Execution timed out 3064 ms 2392 KB Time limit exceeded
10 Execution timed out 3004 ms 2392 KB Time limit exceeded
11 Execution timed out 3063 ms 2392 KB Time limit exceeded
12 Execution timed out 3030 ms 2392 KB Time limit exceeded
13 Execution timed out 3068 ms 2392 KB Time limit exceeded
14 Execution timed out 3066 ms 2392 KB Time limit exceeded
15 Execution timed out 3072 ms 2392 KB Time limit exceeded
16 Execution timed out 3028 ms 2392 KB Time limit exceeded
17 Execution timed out 3048 ms 2392 KB Time limit exceeded
18 Execution timed out 3051 ms 2392 KB Time limit exceeded
19 Execution timed out 3067 ms 2392 KB Time limit exceeded
20 Execution timed out 3059 ms 2392 KB Time limit exceeded
21 Execution timed out 3070 ms 2648 KB Time limit exceeded
22 Execution timed out 3013 ms 2648 KB Time limit exceeded
23 Execution timed out 3055 ms 2788 KB Time limit exceeded
24 Execution timed out 3037 ms 2792 KB Time limit exceeded
25 Execution timed out 3057 ms 2616 KB Time limit exceeded
26 Execution timed out 3052 ms 2648 KB Time limit exceeded
27 Execution timed out 3037 ms 2900 KB Time limit exceeded
28 Execution timed out 3054 ms 2648 KB Time limit exceeded
29 Execution timed out 3065 ms 2724 KB Time limit exceeded
30 Execution timed out 3064 ms 2648 KB Time limit exceeded
31 Execution timed out 3058 ms 2392 KB Time limit exceeded
32 Execution timed out 3054 ms 2644 KB Time limit exceeded
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3031 ms 2392 KB Time limit exceeded
2 Execution timed out 3028 ms 2392 KB Time limit exceeded
3 Execution timed out 3058 ms 2392 KB Time limit exceeded
4 Execution timed out 3074 ms 2392 KB Time limit exceeded
5 Execution timed out 3019 ms 2392 KB Time limit exceeded
6 Execution timed out 3071 ms 2392 KB Time limit exceeded
7 Execution timed out 3023 ms 2392 KB Time limit exceeded
8 Execution timed out 3058 ms 2392 KB Time limit exceeded
9 Execution timed out 3036 ms 2644 KB Time limit exceeded
10 Execution timed out 3025 ms 2392 KB Time limit exceeded
11 Execution timed out 3068 ms 2392 KB Time limit exceeded
12 Execution timed out 3032 ms 2392 KB Time limit exceeded
13 Execution timed out 3057 ms 2392 KB Time limit exceeded
14 Execution timed out 3023 ms 2392 KB Time limit exceeded
15 Execution timed out 3078 ms 2392 KB Time limit exceeded
16 Execution timed out 3014 ms 2392 KB Time limit exceeded
17 Execution timed out 3042 ms 2392 KB Time limit exceeded
18 Execution timed out 3071 ms 2392 KB Time limit exceeded
19 Execution timed out 3049 ms 2392 KB Time limit exceeded
20 Execution timed out 3048 ms 2392 KB Time limit exceeded
21 Execution timed out 3018 ms 2648 KB Time limit exceeded
22 Execution timed out 3065 ms 2648 KB Time limit exceeded
23 Execution timed out 3049 ms 2648 KB Time limit exceeded
24 Execution timed out 3039 ms 2648 KB Time limit exceeded
25 Execution timed out 3062 ms 2648 KB Time limit exceeded
26 Execution timed out 3059 ms 2808 KB Time limit exceeded
27 Execution timed out 3056 ms 2648 KB Time limit exceeded
28 Execution timed out 3056 ms 2648 KB Time limit exceeded
29 Execution timed out 3066 ms 2652 KB Time limit exceeded
30 Execution timed out 3071 ms 2648 KB Time limit exceeded
31 Execution timed out 3048 ms 2392 KB Time limit exceeded
32 Execution timed out 3052 ms 2392 KB Time limit exceeded