Submission #787607

# Submission time Handle Problem Language Result Execution time Memory
787607 2023-07-19T10:13:47 Z yeyso Mars (APIO22_mars) C++17
36 / 100
107 ms 2868 KB
#include "mars.h"
#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> m;
vector<vector<int>> v;
void dfs(int i, int j, int z){
	
	if(!v[i][j] and m[i][j] != 48){
		v[i][j] = z;
		
		if(i < m.size() - 1) dfs(i+1, j, z);
		if(j < m.size() - 1) dfs(i, j+1, z);
		if(i > 0) dfs(i-1, j, z);
		if(j > 0) dfs(i, j-1, z);
	}
}
void comp(int grid){

}
vector<vector<int>> decode(string z, int x){
	for(int i = 0; i < x; i ++){
		
	}

}
string encode(vector<vector<int>> matrix){

}

string process(vector<vector<string>> a, int i, int j, int k, int n){
	/*
	Phase 1 - Each corner stores 1 bit of info
	Phase 2 - Each corner stores 4 bits of info
	Phase 3 - Each corner stores 9 bits of info
	Each corner stores phase ^ 2 bits of info

	Phase 2 - info from 2s are combined into info of 3
	    0   1
	3 0 2 0 1
	0 0 0 0 0
	2 0 2 0 1
	0 0 0 0 0
	1 0 1 0 1

	1 2 1 2 1
	3 4 3 4 3
	1 2 1 2 1
	3 4 3 4 3
	1 2 1 2 1
	*/
	string z(100, '0');
	
	k += 1;
	
		int x = 0;
		vector<vector<int>> grid(k+1, vector<int>(k+1, 0));
		for(int r = 0; r < k * k; r ++){
			grid[r / k][r % k + 1] = a[0][2][r];
			grid[r / k + 1][r % k + 1] = a[2][2][r];
			grid[r / k + 1][r % k] = a[2][0][r];
			grid[0][0] = a[0][0][0];
		}
		if(k != n){
			for(int r = 0; r < grid.size(); r ++){
				for(int c = 0; c < grid[r].size(); c ++){
					//cout << grid[r][c] << " ";
					z[x] = grid[r][c];
					x += 1;

				} //cout << "\n";
			}
		}
	

	if(k == n){
		vector<vector<int>> grid01(k + 1, vector<int>(k, 0));
		vector<vector<int>> grid10(k, vector<int>(k + 1, 0));
		vector<vector<int>> grid11(k, vector<int>(k, 0));

		for(int r = 0; r < k * k; r ++){
			grid01[r / (k)][r % k] = a[0][1][r];
			grid01[r / (k) + 1][r % k] = a[2][1][r];

			grid10[r / k][r % k] = a[1][0][r];
			grid10[r / k][r % k + 1] = a[1][2][r]; 

			grid11[r / k][r % k] = a[1][1][r];
		}

		vector<vector<int>> matrix(2 * k + 1, vector<int>(2 * k + 1, 0));
		v = matrix;
		for(int r = 0; r < grid.size(); r ++){
			for(int c = 0; c < grid[r].size(); c ++){
				matrix[r * 2][c * 2] = grid[r][c];
			}
		}
		for(int r = 0; r < grid01.size(); r ++){
			for(int c = 0; c < grid01[r].size(); c ++){
				matrix[r * 2][c * 2 + 1] = grid01[r][c];
			}
		}
		for(int r = 0; r < grid10.size(); r ++){
			for(int c = 0; c < grid10[r].size(); c ++){
				matrix[r * 2 + 1][c * 2] = grid10[r][c];
			}
		}
		for(int r = 0; r < grid11.size(); r ++){
			for(int c = 0; c < grid11[r].size(); c ++){
				matrix[r * 2 + 1][c * 2 + 1] = grid11[r][c];
			}
		}
		int zz = 1;
		m = matrix;
		cout << "\n";
		for(int r = 0; r < matrix.size(); r ++){
			for(int c = 0; c < matrix[r].size(); c ++){
				dfs(r, c, zz);
				zz += 1;
				//if(matrix[r][c] == 48) cout << 0 << " ";
				//if(matrix[r][c] == 49) cout << 1 << " ";
				//cout << matrix[r][c] << " ";
			} //cout << "\n";
		}

		set<int> is;
		for(int i = 0; i < v.size(); i ++){
			for(int j = 0; j < v[i].size(); j ++){
				//cout << v[i][j] << " ";
				is.insert(v[i][j]);
			} //cout << "\n";
		}
		if(is.size() - 1 == 0 and v[0][0] != 0){
			z = bitset<100>(is.size()).to_string();
		} else {
			z = bitset<100>(is.size() - 1).to_string();
		}
		reverse(z.begin(), z.end());
		return z;
		
	}
	
	//if(k == 2) cout << "\n";
	return z;

	
	
}

/*
g++ -Wall -lm -static -DEVAL -o mars -O2 mars.cpp grader.cpp -std=c++17
1
2
1 1 0 1 1
1 1 0 0 1
1 0 0 1 1
0 0 0 0 0
1 0 1 1 1

1
8
1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1


1
1
1 1 0 
1 1 0 
1 0 1 

1 0 1 0 1

*/

Compilation message

mars.cpp: In function 'void dfs(int, int, int)':
mars.cpp:11:8: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |   if(i < m.size() - 1) dfs(i+1, j, z);
      |      ~~^~~~~~~~~~~~~~
mars.cpp:12:8: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |   if(j < m.size() - 1) dfs(i, j+1, z);
      |      ~~^~~~~~~~~~~~~~
mars.cpp: In function 'std::vector<std::vector<int> > decode(std::string, int)':
mars.cpp:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
   25 | }
      | ^
mars.cpp: In function 'std::string encode(std::vector<std::vector<int> >)':
mars.cpp:28:1: warning: no return statement in function returning non-void [-Wreturn-type]
   28 | }
      | ^
mars.cpp: In function 'std::string process(std::vector<std::vector<std::__cxx11::basic_string<char> > >, int, int, int, int)':
mars.cpp:64:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   64 |    for(int r = 0; r < grid.size(); r ++){
      |                   ~~^~~~~~~~~~~~~
mars.cpp:65:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   65 |     for(int c = 0; c < grid[r].size(); c ++){
      |                    ~~^~~~~~~~~~~~~~~~
mars.cpp:92:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   92 |   for(int r = 0; r < grid.size(); r ++){
      |                  ~~^~~~~~~~~~~~~
mars.cpp:93:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   93 |    for(int c = 0; c < grid[r].size(); c ++){
      |                   ~~^~~~~~~~~~~~~~~~
mars.cpp:97:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   97 |   for(int r = 0; r < grid01.size(); r ++){
      |                  ~~^~~~~~~~~~~~~~~
mars.cpp:98:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   98 |    for(int c = 0; c < grid01[r].size(); c ++){
      |                   ~~^~~~~~~~~~~~~~~~~~
mars.cpp:102:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  102 |   for(int r = 0; r < grid10.size(); r ++){
      |                  ~~^~~~~~~~~~~~~~~
mars.cpp:103:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  103 |    for(int c = 0; c < grid10[r].size(); c ++){
      |                   ~~^~~~~~~~~~~~~~~~~~
mars.cpp:107:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  107 |   for(int r = 0; r < grid11.size(); r ++){
      |                  ~~^~~~~~~~~~~~~~~
mars.cpp:108:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  108 |    for(int c = 0; c < grid11[r].size(); c ++){
      |                   ~~^~~~~~~~~~~~~~~~~~
mars.cpp:115:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  115 |   for(int r = 0; r < matrix.size(); r ++){
      |                  ~~^~~~~~~~~~~~~~~
mars.cpp:116:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  116 |    for(int c = 0; c < matrix[r].size(); c ++){
      |                   ~~^~~~~~~~~~~~~~~~~~
mars.cpp:126:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  126 |   for(int i = 0; i < v.size(); i ++){
      |                  ~~^~~~~~~~~~
mars.cpp:127:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  127 |    for(int j = 0; j < v[i].size(); j ++){
      |                   ~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
7 Correct 8 ms 2064 KB Output is correct
8 Correct 8 ms 1948 KB Output is correct
9 Correct 9 ms 2084 KB Output is correct
10 Correct 9 ms 1968 KB Output is correct
11 Correct 8 ms 2140 KB Output is correct
12 Correct 9 ms 2040 KB Output is correct
13 Correct 8 ms 1860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
7 Correct 8 ms 2064 KB Output is correct
8 Correct 8 ms 1948 KB Output is correct
9 Correct 9 ms 2084 KB Output is correct
10 Correct 9 ms 1968 KB Output is correct
11 Correct 8 ms 2140 KB Output is correct
12 Correct 9 ms 2040 KB Output is correct
13 Correct 8 ms 1860 KB Output is correct
14 Correct 17 ms 2640 KB Output is correct
15 Correct 26 ms 2404 KB Output is correct
16 Correct 23 ms 2448 KB Output is correct
17 Correct 27 ms 2544 KB Output is correct
18 Correct 26 ms 2536 KB Output is correct
19 Correct 24 ms 2480 KB Output is correct
20 Correct 23 ms 2512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
7 Correct 8 ms 2064 KB Output is correct
8 Correct 8 ms 1948 KB Output is correct
9 Correct 9 ms 2084 KB Output is correct
10 Correct 9 ms 1968 KB Output is correct
11 Correct 8 ms 2140 KB Output is correct
12 Correct 9 ms 2040 KB Output is correct
13 Correct 8 ms 1860 KB Output is correct
14 Correct 17 ms 2640 KB Output is correct
15 Correct 26 ms 2404 KB Output is correct
16 Correct 23 ms 2448 KB Output is correct
17 Correct 27 ms 2544 KB Output is correct
18 Correct 26 ms 2536 KB Output is correct
19 Correct 24 ms 2480 KB Output is correct
20 Correct 23 ms 2512 KB Output is correct
21 Correct 40 ms 2592 KB Output is correct
22 Correct 53 ms 2696 KB Output is correct
23 Correct 53 ms 2680 KB Output is correct
24 Correct 52 ms 2720 KB Output is correct
25 Correct 54 ms 2580 KB Output is correct
26 Correct 56 ms 2720 KB Output is correct
27 Correct 59 ms 2672 KB Output is correct
28 Correct 54 ms 2820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
7 Correct 8 ms 2064 KB Output is correct
8 Correct 8 ms 1948 KB Output is correct
9 Correct 9 ms 2084 KB Output is correct
10 Correct 9 ms 1968 KB Output is correct
11 Correct 8 ms 2140 KB Output is correct
12 Correct 9 ms 2040 KB Output is correct
13 Correct 8 ms 1860 KB Output is correct
14 Correct 17 ms 2640 KB Output is correct
15 Correct 26 ms 2404 KB Output is correct
16 Correct 23 ms 2448 KB Output is correct
17 Correct 27 ms 2544 KB Output is correct
18 Correct 26 ms 2536 KB Output is correct
19 Correct 24 ms 2480 KB Output is correct
20 Correct 23 ms 2512 KB Output is correct
21 Correct 40 ms 2592 KB Output is correct
22 Correct 53 ms 2696 KB Output is correct
23 Correct 53 ms 2680 KB Output is correct
24 Correct 52 ms 2720 KB Output is correct
25 Correct 54 ms 2580 KB Output is correct
26 Correct 56 ms 2720 KB Output is correct
27 Correct 59 ms 2672 KB Output is correct
28 Correct 54 ms 2820 KB Output is correct
29 Correct 75 ms 2744 KB Output is correct
30 Correct 99 ms 2868 KB Output is correct
31 Correct 103 ms 2812 KB Output is correct
32 Correct 103 ms 2840 KB Output is correct
33 Correct 99 ms 2820 KB Output is correct
34 Correct 102 ms 2832 KB Output is correct
35 Correct 107 ms 2836 KB Output is correct
36 Correct 96 ms 2840 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
7 Correct 8 ms 2064 KB Output is correct
8 Correct 8 ms 1948 KB Output is correct
9 Correct 9 ms 2084 KB Output is correct
10 Correct 9 ms 1968 KB Output is correct
11 Correct 8 ms 2140 KB Output is correct
12 Correct 9 ms 2040 KB Output is correct
13 Correct 8 ms 1860 KB Output is correct
14 Correct 17 ms 2640 KB Output is correct
15 Correct 26 ms 2404 KB Output is correct
16 Correct 23 ms 2448 KB Output is correct
17 Correct 27 ms 2544 KB Output is correct
18 Correct 26 ms 2536 KB Output is correct
19 Correct 24 ms 2480 KB Output is correct
20 Correct 23 ms 2512 KB Output is correct
21 Correct 40 ms 2592 KB Output is correct
22 Correct 53 ms 2696 KB Output is correct
23 Correct 53 ms 2680 KB Output is correct
24 Correct 52 ms 2720 KB Output is correct
25 Correct 54 ms 2580 KB Output is correct
26 Correct 56 ms 2720 KB Output is correct
27 Correct 59 ms 2672 KB Output is correct
28 Correct 54 ms 2820 KB Output is correct
29 Correct 75 ms 2744 KB Output is correct
30 Correct 99 ms 2868 KB Output is correct
31 Correct 103 ms 2812 KB Output is correct
32 Correct 103 ms 2840 KB Output is correct
33 Correct 99 ms 2820 KB Output is correct
34 Correct 102 ms 2832 KB Output is correct
35 Correct 107 ms 2836 KB Output is correct
36 Correct 96 ms 2840 KB Output is correct
37 Runtime error 20 ms 500 KB Execution killed with signal 6
38 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
7 Correct 8 ms 2064 KB Output is correct
8 Correct 8 ms 1948 KB Output is correct
9 Correct 9 ms 2084 KB Output is correct
10 Correct 9 ms 1968 KB Output is correct
11 Correct 8 ms 2140 KB Output is correct
12 Correct 9 ms 2040 KB Output is correct
13 Correct 8 ms 1860 KB Output is correct
14 Correct 17 ms 2640 KB Output is correct
15 Correct 26 ms 2404 KB Output is correct
16 Correct 23 ms 2448 KB Output is correct
17 Correct 27 ms 2544 KB Output is correct
18 Correct 26 ms 2536 KB Output is correct
19 Correct 24 ms 2480 KB Output is correct
20 Correct 23 ms 2512 KB Output is correct
21 Correct 40 ms 2592 KB Output is correct
22 Correct 53 ms 2696 KB Output is correct
23 Correct 53 ms 2680 KB Output is correct
24 Correct 52 ms 2720 KB Output is correct
25 Correct 54 ms 2580 KB Output is correct
26 Correct 56 ms 2720 KB Output is correct
27 Correct 59 ms 2672 KB Output is correct
28 Correct 54 ms 2820 KB Output is correct
29 Correct 75 ms 2744 KB Output is correct
30 Correct 99 ms 2868 KB Output is correct
31 Correct 103 ms 2812 KB Output is correct
32 Correct 103 ms 2840 KB Output is correct
33 Correct 99 ms 2820 KB Output is correct
34 Correct 102 ms 2832 KB Output is correct
35 Correct 107 ms 2836 KB Output is correct
36 Correct 96 ms 2840 KB Output is correct
37 Runtime error 20 ms 500 KB Execution killed with signal 6
38 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
7 Correct 8 ms 2064 KB Output is correct
8 Correct 8 ms 1948 KB Output is correct
9 Correct 9 ms 2084 KB Output is correct
10 Correct 9 ms 1968 KB Output is correct
11 Correct 8 ms 2140 KB Output is correct
12 Correct 9 ms 2040 KB Output is correct
13 Correct 8 ms 1860 KB Output is correct
14 Correct 17 ms 2640 KB Output is correct
15 Correct 26 ms 2404 KB Output is correct
16 Correct 23 ms 2448 KB Output is correct
17 Correct 27 ms 2544 KB Output is correct
18 Correct 26 ms 2536 KB Output is correct
19 Correct 24 ms 2480 KB Output is correct
20 Correct 23 ms 2512 KB Output is correct
21 Correct 40 ms 2592 KB Output is correct
22 Correct 53 ms 2696 KB Output is correct
23 Correct 53 ms 2680 KB Output is correct
24 Correct 52 ms 2720 KB Output is correct
25 Correct 54 ms 2580 KB Output is correct
26 Correct 56 ms 2720 KB Output is correct
27 Correct 59 ms 2672 KB Output is correct
28 Correct 54 ms 2820 KB Output is correct
29 Correct 75 ms 2744 KB Output is correct
30 Correct 99 ms 2868 KB Output is correct
31 Correct 103 ms 2812 KB Output is correct
32 Correct 103 ms 2840 KB Output is correct
33 Correct 99 ms 2820 KB Output is correct
34 Correct 102 ms 2832 KB Output is correct
35 Correct 107 ms 2836 KB Output is correct
36 Correct 96 ms 2840 KB Output is correct
37 Runtime error 20 ms 500 KB Execution killed with signal 6
38 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
7 Correct 8 ms 2064 KB Output is correct
8 Correct 8 ms 1948 KB Output is correct
9 Correct 9 ms 2084 KB Output is correct
10 Correct 9 ms 1968 KB Output is correct
11 Correct 8 ms 2140 KB Output is correct
12 Correct 9 ms 2040 KB Output is correct
13 Correct 8 ms 1860 KB Output is correct
14 Correct 17 ms 2640 KB Output is correct
15 Correct 26 ms 2404 KB Output is correct
16 Correct 23 ms 2448 KB Output is correct
17 Correct 27 ms 2544 KB Output is correct
18 Correct 26 ms 2536 KB Output is correct
19 Correct 24 ms 2480 KB Output is correct
20 Correct 23 ms 2512 KB Output is correct
21 Correct 40 ms 2592 KB Output is correct
22 Correct 53 ms 2696 KB Output is correct
23 Correct 53 ms 2680 KB Output is correct
24 Correct 52 ms 2720 KB Output is correct
25 Correct 54 ms 2580 KB Output is correct
26 Correct 56 ms 2720 KB Output is correct
27 Correct 59 ms 2672 KB Output is correct
28 Correct 54 ms 2820 KB Output is correct
29 Correct 75 ms 2744 KB Output is correct
30 Correct 99 ms 2868 KB Output is correct
31 Correct 103 ms 2812 KB Output is correct
32 Correct 103 ms 2840 KB Output is correct
33 Correct 99 ms 2820 KB Output is correct
34 Correct 102 ms 2832 KB Output is correct
35 Correct 107 ms 2836 KB Output is correct
36 Correct 96 ms 2840 KB Output is correct
37 Runtime error 20 ms 500 KB Execution killed with signal 6
38 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 2048 KB Output is correct
2 Correct 7 ms 2116 KB Output is correct
3 Correct 5 ms 1964 KB Output is correct
4 Correct 7 ms 2048 KB Output is correct
5 Correct 8 ms 2168 KB Output is correct
6 Correct 7 ms 1944 KB Output is correct
7 Correct 8 ms 2064 KB Output is correct
8 Correct 8 ms 1948 KB Output is correct
9 Correct 9 ms 2084 KB Output is correct
10 Correct 9 ms 1968 KB Output is correct
11 Correct 8 ms 2140 KB Output is correct
12 Correct 9 ms 2040 KB Output is correct
13 Correct 8 ms 1860 KB Output is correct
14 Correct 17 ms 2640 KB Output is correct
15 Correct 26 ms 2404 KB Output is correct
16 Correct 23 ms 2448 KB Output is correct
17 Correct 27 ms 2544 KB Output is correct
18 Correct 26 ms 2536 KB Output is correct
19 Correct 24 ms 2480 KB Output is correct
20 Correct 23 ms 2512 KB Output is correct
21 Correct 40 ms 2592 KB Output is correct
22 Correct 53 ms 2696 KB Output is correct
23 Correct 53 ms 2680 KB Output is correct
24 Correct 52 ms 2720 KB Output is correct
25 Correct 54 ms 2580 KB Output is correct
26 Correct 56 ms 2720 KB Output is correct
27 Correct 59 ms 2672 KB Output is correct
28 Correct 54 ms 2820 KB Output is correct
29 Correct 75 ms 2744 KB Output is correct
30 Correct 99 ms 2868 KB Output is correct
31 Correct 103 ms 2812 KB Output is correct
32 Correct 103 ms 2840 KB Output is correct
33 Correct 99 ms 2820 KB Output is correct
34 Correct 102 ms 2832 KB Output is correct
35 Correct 107 ms 2836 KB Output is correct
36 Correct 96 ms 2840 KB Output is correct
37 Runtime error 20 ms 500 KB Execution killed with signal 6
38 Halted 0 ms 0 KB -