답안 #114404

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
114404 2019-06-01T08:25:44 Z sebinkim World of Tank (innopolis2018_final_E) C++14
77 / 100
237 ms 22620 KB
#include <bits/stdc++.h>

using namespace std;

typedef pair <int, int> pii;

bool B[2020202][2];
vector <int> X;
int D[2020202][2];
int dp[2020202][2], C[2020202][2];

int n, m1, m2, t;

void print(int y)
{
	vector <int> V1;
	vector <pii> V2;
	
	int i, j, l, r;
	
	for(i=0; i<n; i++){
		if(C[i][y]){
			y = 1 - y;
			V1.push_back(X[i]);
		}
		
		l = dp[i][y] - X[i + 1] + X[i]; r = dp[i][y];
//		printf("%d %d\n", l, r);
		if(l >= 0) continue;
		for(j=-(l+1)/t; j>=0 && -j*t <= r; j--){
			V2.emplace_back(X[i] + (r + j*t), y);
		}
	}
	
	sort(V2.begin(), V2.end());
	
	printf("Yes\n");
	
	printf("%d\n", V1.size());
	for(int &t: V1) printf("%d ", t); printf("\n");
	
	printf("%d\n", V2.size());
	for(pii &t: V2) printf("%d %d\n", t.first, t.second + 1);
}

int main()
{
	int i, j, k, x;
	
	scanf("%d%d%d%d", &n, &m1, &m2, &t);
	
	if(n > 1e6) return 0;
	
	for(i=1; i<=m1; i++){
		scanf("%d", D[i]);
		X.push_back(D[i][0]);
		X.push_back(D[i][0] + 1);
	}
	
	for(i=1; i<=m2; i++){
		scanf("%d", D[i] + 1);
		X.push_back(D[i][1]);
		X.push_back(D[i][1] + 1);
	}
	
	X.push_back(0); X.push_back(n + 1);
	sort(X.begin(), X.end());
	X.erase(unique(X.begin(), X.end()), X.end());
	
	for(i=1; i<=m1; i++){
		k = lower_bound(X.begin(), X.end(), D[i][0]) - X.begin();
		B[k][0] = 1;
	}
	
	for(i=1; i<=m2; i++){
		k = lower_bound(X.begin(), X.end(), D[i][1]) - X.begin();
		B[k][1] = 1;
	}
	
	n = X.size() - 1;
	
	dp[n][0] = 1e9;
	dp[n][1] = 1e9;
	
	for(i=n-1; i>=0; i--){
		for(j=0; j<2; j++){
			if(B[i][j]){
				dp[i][j] = min(-1, dp[i + 1][j] - t + 1);
				
				if(!B[i][1 - j]){
					if(dp[i + 1][1 - j] >= -1 && dp[i][j] < min(-1, dp[i + 1][1 - j] - t + 1)){
						C[i][j] = 1;
						dp[i][j] = min(-1, dp[i + 1][1 - j] - t + 1);
					}
				}
			}
			else{
				dp[i][j] = dp[i + 1][j] + X[i + 1] - X[i];
				
				if(!B[i][1 - j]){
					if(dp[i + 1][1 - j] >= -X[i + 1] + X[i] && dp[i][j] < dp[i + 1][1 - j] + X[i + 1] - X[i]){
						C[i][j] = 1;
						dp[i][j] = dp[i + 1][1 - j] + X[i + 1] - X[i];
					}
				}
			}
		}
	}
	
	if(dp[0][0] >= t) print(0);
	else if(dp[0][1] >= t) print(1);
	else printf("No\n");
	
	return 0;
}

Compilation message

E.cpp: In function 'void print(int)':
E.cpp:39:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
  printf("%d\n", V1.size());
                 ~~~~~~~~~^
E.cpp:40:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int &t: V1) printf("%d ", t); printf("\n");
  ^~~
E.cpp:40:36: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  for(int &t: V1) printf("%d ", t); printf("\n");
                                    ^~~~~~
E.cpp:42:26: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<std::pair<int, int> >::size_type {aka long unsigned int}' [-Wformat=]
  printf("%d\n", V2.size());
                 ~~~~~~~~~^
E.cpp: In function 'int main()':
E.cpp:48:15: warning: unused variable 'x' [-Wunused-variable]
  int i, j, k, x;
               ^
E.cpp:50:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d%d%d", &n, &m1, &m2, &t);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E.cpp:55:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", D[i]);
   ~~~~~^~~~~~~~~~~~
E.cpp:61:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", D[i] + 1);
   ~~~~~^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 20, m2 = 0, t = 20
2 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 509, m2 = 491, t = 5000
3 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 764, m2 = 736, t = 5000
4 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 698, m2 = 802, t = 5000
5 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 720, m2 = 780, t = 5000
6 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 734, m2 = 766, t = 5000
7 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 997, m2 = 1003, t = 5000
8 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 1021, m2 = 979, t = 5000
9 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1006, m2 = 995, t = 5000
10 Correct 8 ms 512 KB [OK, No] n = 5000, m1 = 1017, m2 = 984, t = 5000
11 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1495, m2 = 1506, t = 5000
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 20, m2 = 0, t = 20
2 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 509, m2 = 491, t = 5000
3 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 764, m2 = 736, t = 5000
4 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 698, m2 = 802, t = 5000
5 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 720, m2 = 780, t = 5000
6 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 734, m2 = 766, t = 5000
7 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 997, m2 = 1003, t = 5000
8 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 1021, m2 = 979, t = 5000
9 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1006, m2 = 995, t = 5000
10 Correct 8 ms 512 KB [OK, No] n = 5000, m1 = 1017, m2 = 984, t = 5000
11 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1495, m2 = 1506, t = 5000
12 Correct 2 ms 512 KB [OK, Yes] n = 5000, m1 = 974, m2 = 1026, t = 2501
13 Correct 3 ms 512 KB [OK, Yes] n = 5000, m1 = 1022, m2 = 978, t = 2501
14 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 1019, m2 = 981, t = 2501
15 Correct 0 ms 512 KB [OK, Yes] n = 5000, m1 = 1298, m2 = 1367, t = 2501
16 Correct 2 ms 512 KB [OK, No] n = 5000, m1 = 1301, m2 = 1360, t = 2501
17 Correct 3 ms 512 KB [OK, Yes] n = 5000, m1 = 1320, m2 = 1315, t = 2501
18 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1195, m2 = 1135, t = 2501
19 Correct 4 ms 512 KB [OK, No] n = 5000, m1 = 1148, m2 = 1202, t = 2501
20 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1147, m2 = 1179, t = 2501
21 Correct 2 ms 512 KB [OK, No] n = 5000, m1 = 1163, m2 = 1146, t = 2501
22 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1145, m2 = 1184, t = 2501
23 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1172, m2 = 1150, t = 2501
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 12, m2 = 9, t = 3
2 Correct 2 ms 384 KB [OK, Yes] n = 10, m1 = 4, m2 = 2, t = 2
3 Correct 2 ms 384 KB [OK, Yes] n = 10, m1 = 6, m2 = 0, t = 2
4 Correct 2 ms 384 KB [OK, Yes] n = 10, m1 = 2, m2 = 4, t = 1
5 Correct 2 ms 384 KB [OK, No] n = 20, m1 = 4, m2 = 11, t = 2
6 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 7, m2 = 8, t = 1
7 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 7, m2 = 8, t = 2
8 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 0, m2 = 10, t = 2
9 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 4, m2 = 6, t = 2
10 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 1, t = 2
11 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 10, m2 = 9, t = 2
12 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 10, t = 2
13 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 0, m2 = 0, t = 3
14 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 5, m2 = 4, t = 3
15 Correct 2 ms 384 KB [OK, Yes] n = 9, m1 = 4, m2 = 3, t = 3
16 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 8, m2 = 8, t = 3
17 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 7, t = 3
18 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 10, t = 7
19 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 7, m2 = 10, t = 8
20 Correct 2 ms 380 KB [OK, Yes] n = 20, m1 = 13, m2 = 10, t = 4
21 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 9, t = 8
22 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 10, m2 = 11, t = 3
23 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 11, m2 = 11, t = 3
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 20, m2 = 0, t = 20
2 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 509, m2 = 491, t = 5000
3 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 764, m2 = 736, t = 5000
4 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 698, m2 = 802, t = 5000
5 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 720, m2 = 780, t = 5000
6 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 734, m2 = 766, t = 5000
7 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 997, m2 = 1003, t = 5000
8 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 1021, m2 = 979, t = 5000
9 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1006, m2 = 995, t = 5000
10 Correct 8 ms 512 KB [OK, No] n = 5000, m1 = 1017, m2 = 984, t = 5000
11 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1495, m2 = 1506, t = 5000
12 Correct 2 ms 512 KB [OK, Yes] n = 5000, m1 = 974, m2 = 1026, t = 2501
13 Correct 3 ms 512 KB [OK, Yes] n = 5000, m1 = 1022, m2 = 978, t = 2501
14 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 1019, m2 = 981, t = 2501
15 Correct 0 ms 512 KB [OK, Yes] n = 5000, m1 = 1298, m2 = 1367, t = 2501
16 Correct 2 ms 512 KB [OK, No] n = 5000, m1 = 1301, m2 = 1360, t = 2501
17 Correct 3 ms 512 KB [OK, Yes] n = 5000, m1 = 1320, m2 = 1315, t = 2501
18 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1195, m2 = 1135, t = 2501
19 Correct 4 ms 512 KB [OK, No] n = 5000, m1 = 1148, m2 = 1202, t = 2501
20 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1147, m2 = 1179, t = 2501
21 Correct 2 ms 512 KB [OK, No] n = 5000, m1 = 1163, m2 = 1146, t = 2501
22 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1145, m2 = 1184, t = 2501
23 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1172, m2 = 1150, t = 2501
24 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 197, m2 = 53, t = 2
25 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 189, m2 = 61, t = 3
26 Correct 2 ms 384 KB [OK, No] n = 500, m1 = 66, m2 = 184, t = 4
27 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 248, m2 = 252, t = 1
28 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 248, m2 = 252, t = 1
29 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 205, m2 = 295, t = 1
30 Correct 92 ms 12612 KB [OK, Yes] n = 1000000, m1 = 183472, m2 = 66528, t = 7
31 Correct 85 ms 12516 KB [OK, Yes] n = 1000000, m1 = 206211, m2 = 43789, t = 6
32 Correct 83 ms 12264 KB [OK, Yes] n = 1000000, m1 = 229445, m2 = 20555, t = 7
33 Correct 165 ms 18396 KB [OK, No] n = 1000000, m1 = 261335, m2 = 238665, t = 2
34 Correct 174 ms 22620 KB [OK, Yes] n = 1000000, m1 = 374819, m2 = 125181, t = 3
35 Correct 194 ms 22492 KB [OK, Yes] n = 1000000, m1 = 88376, m2 = 411624, t = 3
36 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 125, m2 = 125, t = 2
37 Correct 237 ms 17380 KB [OK, Yes] n = 1000000, m1 = 250000, m2 = 250000, t = 2
38 Correct 83 ms 8932 KB [OK, Yes] n = 1000000, m1 = 94957, m2 = 94938, t = 12
39 Correct 80 ms 9252 KB [OK, Yes] n = 1000000, m1 = 94972, m2 = 95007, t = 10
40 Correct 13 ms 1916 KB [OK, Yes] n = 1000000, m1 = 14064, m2 = 13936, t = 200
41 Correct 16 ms 2044 KB [OK, Yes] n = 1000000, m1 = 15990, m2 = 16010, t = 139
42 Correct 27 ms 3704 KB [OK, Yes] n = 1000000, m1 = 32291, m2 = 32404, t = 34
43 Correct 76 ms 7972 KB [OK, Yes] n = 1000000, m1 = 88230, m2 = 88238, t = 13
44 Correct 38 ms 4972 KB [OK, Yes] n = 1000000, m1 = 44550, m2 = 44400, t = 34
45 Correct 30 ms 3824 KB [OK, Yes] n = 1000000, m1 = 31778, m2 = 31772, t = 44
46 Correct 114 ms 9336 KB [OK, No] n = 1000000, m1 = 147142, m2 = 147242, t = 10
47 Correct 2 ms 384 KB [OK, Yes] n = 1000, m1 = 416, m2 = 417, t = 77
48 Correct 2 ms 384 KB [OK, Yes] n = 1000, m1 = 412, m2 = 414, t = 111
49 Correct 2 ms 384 KB [OK, Yes] n = 1000, m1 = 422, m2 = 423, t = 62
50 Correct 2 ms 384 KB [OK, Yes] n = 800, m1 = 279, m2 = 270, t = 33
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 20, m2 = 0, t = 20
2 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 509, m2 = 491, t = 5000
3 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 764, m2 = 736, t = 5000
4 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 698, m2 = 802, t = 5000
5 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 720, m2 = 780, t = 5000
6 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 734, m2 = 766, t = 5000
7 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 997, m2 = 1003, t = 5000
8 Correct 2 ms 384 KB [OK, Yes] n = 5000, m1 = 1021, m2 = 979, t = 5000
9 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1006, m2 = 995, t = 5000
10 Correct 8 ms 512 KB [OK, No] n = 5000, m1 = 1017, m2 = 984, t = 5000
11 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1495, m2 = 1506, t = 5000
12 Correct 2 ms 512 KB [OK, Yes] n = 5000, m1 = 974, m2 = 1026, t = 2501
13 Correct 3 ms 512 KB [OK, Yes] n = 5000, m1 = 1022, m2 = 978, t = 2501
14 Correct 3 ms 384 KB [OK, Yes] n = 5000, m1 = 1019, m2 = 981, t = 2501
15 Correct 0 ms 512 KB [OK, Yes] n = 5000, m1 = 1298, m2 = 1367, t = 2501
16 Correct 2 ms 512 KB [OK, No] n = 5000, m1 = 1301, m2 = 1360, t = 2501
17 Correct 3 ms 512 KB [OK, Yes] n = 5000, m1 = 1320, m2 = 1315, t = 2501
18 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1195, m2 = 1135, t = 2501
19 Correct 4 ms 512 KB [OK, No] n = 5000, m1 = 1148, m2 = 1202, t = 2501
20 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1147, m2 = 1179, t = 2501
21 Correct 2 ms 512 KB [OK, No] n = 5000, m1 = 1163, m2 = 1146, t = 2501
22 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1145, m2 = 1184, t = 2501
23 Correct 3 ms 512 KB [OK, No] n = 5000, m1 = 1172, m2 = 1150, t = 2501
24 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 12, m2 = 9, t = 3
25 Correct 2 ms 384 KB [OK, Yes] n = 10, m1 = 4, m2 = 2, t = 2
26 Correct 2 ms 384 KB [OK, Yes] n = 10, m1 = 6, m2 = 0, t = 2
27 Correct 2 ms 384 KB [OK, Yes] n = 10, m1 = 2, m2 = 4, t = 1
28 Correct 2 ms 384 KB [OK, No] n = 20, m1 = 4, m2 = 11, t = 2
29 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 7, m2 = 8, t = 1
30 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 7, m2 = 8, t = 2
31 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 0, m2 = 10, t = 2
32 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 4, m2 = 6, t = 2
33 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 1, t = 2
34 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 10, m2 = 9, t = 2
35 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 10, t = 2
36 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 0, m2 = 0, t = 3
37 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 5, m2 = 4, t = 3
38 Correct 2 ms 384 KB [OK, Yes] n = 9, m1 = 4, m2 = 3, t = 3
39 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 8, m2 = 8, t = 3
40 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 7, t = 3
41 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 10, t = 7
42 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 7, m2 = 10, t = 8
43 Correct 2 ms 380 KB [OK, Yes] n = 20, m1 = 13, m2 = 10, t = 4
44 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 9, m2 = 9, t = 8
45 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 10, m2 = 11, t = 3
46 Correct 2 ms 384 KB [OK, Yes] n = 20, m1 = 11, m2 = 11, t = 3
47 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 197, m2 = 53, t = 2
48 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 189, m2 = 61, t = 3
49 Correct 2 ms 384 KB [OK, No] n = 500, m1 = 66, m2 = 184, t = 4
50 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 248, m2 = 252, t = 1
51 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 248, m2 = 252, t = 1
52 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 205, m2 = 295, t = 1
53 Correct 92 ms 12612 KB [OK, Yes] n = 1000000, m1 = 183472, m2 = 66528, t = 7
54 Correct 85 ms 12516 KB [OK, Yes] n = 1000000, m1 = 206211, m2 = 43789, t = 6
55 Correct 83 ms 12264 KB [OK, Yes] n = 1000000, m1 = 229445, m2 = 20555, t = 7
56 Correct 165 ms 18396 KB [OK, No] n = 1000000, m1 = 261335, m2 = 238665, t = 2
57 Correct 174 ms 22620 KB [OK, Yes] n = 1000000, m1 = 374819, m2 = 125181, t = 3
58 Correct 194 ms 22492 KB [OK, Yes] n = 1000000, m1 = 88376, m2 = 411624, t = 3
59 Correct 2 ms 384 KB [OK, Yes] n = 500, m1 = 125, m2 = 125, t = 2
60 Correct 237 ms 17380 KB [OK, Yes] n = 1000000, m1 = 250000, m2 = 250000, t = 2
61 Correct 83 ms 8932 KB [OK, Yes] n = 1000000, m1 = 94957, m2 = 94938, t = 12
62 Correct 80 ms 9252 KB [OK, Yes] n = 1000000, m1 = 94972, m2 = 95007, t = 10
63 Correct 13 ms 1916 KB [OK, Yes] n = 1000000, m1 = 14064, m2 = 13936, t = 200
64 Correct 16 ms 2044 KB [OK, Yes] n = 1000000, m1 = 15990, m2 = 16010, t = 139
65 Correct 27 ms 3704 KB [OK, Yes] n = 1000000, m1 = 32291, m2 = 32404, t = 34
66 Correct 76 ms 7972 KB [OK, Yes] n = 1000000, m1 = 88230, m2 = 88238, t = 13
67 Correct 38 ms 4972 KB [OK, Yes] n = 1000000, m1 = 44550, m2 = 44400, t = 34
68 Correct 30 ms 3824 KB [OK, Yes] n = 1000000, m1 = 31778, m2 = 31772, t = 44
69 Correct 114 ms 9336 KB [OK, No] n = 1000000, m1 = 147142, m2 = 147242, t = 10
70 Correct 2 ms 384 KB [OK, Yes] n = 1000, m1 = 416, m2 = 417, t = 77
71 Correct 2 ms 384 KB [OK, Yes] n = 1000, m1 = 412, m2 = 414, t = 111
72 Correct 2 ms 384 KB [OK, Yes] n = 1000, m1 = 422, m2 = 423, t = 62
73 Correct 2 ms 384 KB [OK, Yes] n = 800, m1 = 279, m2 = 270, t = 33
74 Incorrect 2 ms 256 KB Expected Yes or No but "" was found
75 Halted 0 ms 0 KB -