Submission #1085490

# Submission time Handle Problem Language Result Execution time Memory
1085490 2024-09-08T10:35:19 Z I_am_Polish_Girl Maze (JOI23_ho_t3) C++14
27 / 100
2000 ms 205228 KB
#pragma target("arch=icelake-server")

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <stack> 
#include <queue>
#include <cmath>
#include <random>
#include <chrono>
#include <iomanip>
#include <bitset>

using namespace std;

#define int long long

typedef long long ll;
typedef long double ld;

int log_ = 21;
int inf = 4000000007000000007;

long long mod = 998244353;

int p = 499;

int NADIYA = 39;

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int n, m, k;
	cin >> n >> m >> k;

	int i_st, j_st;
	cin >> i_st >> j_st;

	i_st--;
	j_st--;

	int i_f, j_f;
	cin >> i_f >> j_f;

	i_f--;
	j_f--;


	vector <vector <int>> deep(n);
	vector <vector <int>> t(n);

	for (int i = 0; i < n; i++)
	{
		deep[i].resize(m , inf);
		t[i].resize(m, false);
	}

	vector <string> vs(n);
	for (int i = 0; i < n; i++)
		cin >> vs[i];
	

	vector <vector < pair <int, int>>> q(n*m+2);

	q[0].push_back({i_st , j_st});
	deep[i_st][j_st] = 0;

	vector <pair <int, int>> go;

	go.push_back({ 1 , 0 });
	go.push_back({ -1 , 0 });
	go.push_back({ 0 , 1 });
	go.push_back({ 0 , -1 });


	vector <pair <int, int>> go2;

	for (int i = -n; i <= n; i++)
	{
		for (int j = -n; j <= n; j++)
		{
			go2.push_back({ i , j });
		}
	}
	


	for (int d = 0 ; d < n*m+1  ; d++)
	{
		if (q[d].size() == 0)
			break;

		for (int ind = 0; ind < q[d].size(); ind++)
		{
			int i_ = q[d][ind].first;
			int j_ = q[d][ind].second;


			for (int i = 0; i < 4; i++)
			{
				int i__ = i_ + go[i].first;
				int j__ = j_ + go[i].second;

				if ((i__ >= 0) and (i__ < n))
				{
					if ((j__ >= 0) and (j__ < m))
					{
						if (deep[i__][j__] > d)
						{
							if (vs[i__][j__] == '.')
							{
								deep[i__][j__] = d;
								q[d].push_back({i__ , j__});
							}
						}
					}
				}
			}
		}

		for (int ind = 0; ind < q[d].size(); ind++)
		{
			int i_ = q[d][ind].first;
			int j_ = q[d][ind].second;

			for (int i = -k; i <= k; i++)
			{
				for (int j = -k; j <= k; j++)
				{
					if (abs(i) + abs(j) == 2 * k)
						continue;

					int i__ = i_ + i;
					int j__ = j_ + j;

					if ((i__ >= 0) and (i__ < n))
					{
						if ((j__ >= 0) and (j__ < m))
						{
							if (deep[i__][j__] == inf)
							{
								deep[i__][j__] = d + 1;
								q[d+1].push_back({i__ , j__});
							}
						}
					}
				}
			}
		}
		
	}

	cout << deep[i_f][j_f];
}

/*5
1 2 1
2 3 1
2 4 1
1 5 4
*/

Compilation message

Main.cpp:1: warning: ignoring '#pragma target ' [-Wunknown-pragmas]
    1 | #pragma target("arch=icelake-server")
      | 
Main.cpp: In function 'int main()':
Main.cpp:100:25: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  100 |   for (int ind = 0; ind < q[d].size(); ind++)
      |                     ~~~~^~~~~~~~~~~~~
Main.cpp:128:25: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  128 |   for (int ind = 0; ind < q[d].size(); ind++)
      |                     ~~~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 1 ms 856 KB Output is correct
5 Correct 0 ms 604 KB Output is correct
6 Correct 0 ms 604 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 344 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 0 ms 604 KB Output is correct
18 Correct 0 ms 604 KB Output is correct
19 Correct 9 ms 7880 KB Output is correct
20 Correct 5 ms 3676 KB Output is correct
21 Correct 10 ms 8648 KB Output is correct
22 Correct 12 ms 7552 KB Output is correct
23 Correct 12 ms 7880 KB Output is correct
24 Correct 4 ms 4188 KB Output is correct
25 Correct 5 ms 4700 KB Output is correct
26 Correct 10 ms 7624 KB Output is correct
27 Correct 10 ms 7624 KB Output is correct
28 Correct 8 ms 7740 KB Output is correct
29 Correct 25 ms 23080 KB Output is correct
30 Correct 6 ms 4328 KB Output is correct
31 Correct 25 ms 23236 KB Output is correct
32 Correct 30 ms 23240 KB Output is correct
33 Correct 26 ms 23240 KB Output is correct
34 Correct 9 ms 9956 KB Output is correct
35 Correct 17 ms 10984 KB Output is correct
36 Correct 28 ms 23240 KB Output is correct
37 Correct 25 ms 23240 KB Output is correct
38 Correct 25 ms 23176 KB Output is correct
39 Correct 244 ms 193640 KB Output is correct
40 Correct 15 ms 11100 KB Output is correct
41 Correct 14 ms 12260 KB Output is correct
42 Correct 22 ms 16480 KB Output is correct
43 Correct 22 ms 16044 KB Output is correct
44 Correct 63 ms 47700 KB Output is correct
45 Correct 72 ms 51644 KB Output is correct
46 Correct 230 ms 205228 KB Output is correct
47 Correct 255 ms 193752 KB Output is correct
48 Correct 244 ms 193588 KB Output is correct
49 Correct 100 ms 95992 KB Output is correct
50 Correct 111 ms 105976 KB Output is correct
51 Correct 263 ms 193588 KB Output is correct
52 Correct 268 ms 193736 KB Output is correct
53 Correct 238 ms 193584 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 428 KB Output is correct
10 Correct 0 ms 604 KB Output is correct
11 Correct 1 ms 604 KB Output is correct
12 Correct 6 ms 628 KB Output is correct
13 Correct 7 ms 604 KB Output is correct
14 Correct 6 ms 604 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 456 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 1 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 0 ms 604 KB Output is correct
32 Correct 1 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 456 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 604 KB Output is correct
8 Correct 0 ms 604 KB Output is correct
9 Correct 6 ms 604 KB Output is correct
10 Correct 5 ms 604 KB Output is correct
11 Correct 6 ms 632 KB Output is correct
12 Correct 1 ms 344 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 1 ms 348 KB Output is correct
22 Correct 1 ms 600 KB Output is correct
23 Correct 1 ms 600 KB Output is correct
24 Correct 7 ms 604 KB Output is correct
25 Correct 6 ms 3036 KB Output is correct
26 Correct 15 ms 3924 KB Output is correct
27 Correct 10 ms 8644 KB Output is correct
28 Execution timed out 2072 ms 8648 KB Time limit exceeded
29 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 428 KB Output is correct
10 Correct 0 ms 604 KB Output is correct
11 Correct 1 ms 604 KB Output is correct
12 Correct 6 ms 628 KB Output is correct
13 Correct 7 ms 604 KB Output is correct
14 Correct 6 ms 604 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 456 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 1 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 0 ms 604 KB Output is correct
32 Correct 1 ms 604 KB Output is correct
33 Correct 9 ms 7880 KB Output is correct
34 Correct 6 ms 604 KB Output is correct
35 Correct 1 ms 604 KB Output is correct
36 Correct 6 ms 3036 KB Output is correct
37 Correct 4 ms 3572 KB Output is correct
38 Correct 14 ms 3920 KB Output is correct
39 Correct 9 ms 8656 KB Output is correct
40 Correct 9 ms 7624 KB Output is correct
41 Correct 9 ms 7880 KB Output is correct
42 Execution timed out 2093 ms 8648 KB Time limit exceeded
43 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 428 KB Output is correct
10 Correct 0 ms 604 KB Output is correct
11 Correct 1 ms 604 KB Output is correct
12 Correct 6 ms 628 KB Output is correct
13 Correct 7 ms 604 KB Output is correct
14 Correct 6 ms 604 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 456 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 1 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 0 ms 604 KB Output is correct
32 Correct 1 ms 604 KB Output is correct
33 Correct 9 ms 7880 KB Output is correct
34 Correct 6 ms 604 KB Output is correct
35 Correct 1 ms 604 KB Output is correct
36 Correct 6 ms 3036 KB Output is correct
37 Correct 4 ms 3572 KB Output is correct
38 Correct 14 ms 3920 KB Output is correct
39 Correct 9 ms 8656 KB Output is correct
40 Correct 9 ms 7624 KB Output is correct
41 Correct 9 ms 7880 KB Output is correct
42 Execution timed out 2093 ms 8648 KB Time limit exceeded
43 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 1 ms 856 KB Output is correct
5 Correct 0 ms 604 KB Output is correct
6 Correct 0 ms 604 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 344 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 0 ms 604 KB Output is correct
18 Correct 0 ms 604 KB Output is correct
19 Correct 9 ms 7880 KB Output is correct
20 Correct 5 ms 3676 KB Output is correct
21 Correct 10 ms 8648 KB Output is correct
22 Correct 12 ms 7552 KB Output is correct
23 Correct 12 ms 7880 KB Output is correct
24 Correct 4 ms 4188 KB Output is correct
25 Correct 5 ms 4700 KB Output is correct
26 Correct 10 ms 7624 KB Output is correct
27 Correct 10 ms 7624 KB Output is correct
28 Correct 8 ms 7740 KB Output is correct
29 Correct 25 ms 23080 KB Output is correct
30 Correct 6 ms 4328 KB Output is correct
31 Correct 25 ms 23236 KB Output is correct
32 Correct 30 ms 23240 KB Output is correct
33 Correct 26 ms 23240 KB Output is correct
34 Correct 9 ms 9956 KB Output is correct
35 Correct 17 ms 10984 KB Output is correct
36 Correct 28 ms 23240 KB Output is correct
37 Correct 25 ms 23240 KB Output is correct
38 Correct 25 ms 23176 KB Output is correct
39 Correct 244 ms 193640 KB Output is correct
40 Correct 15 ms 11100 KB Output is correct
41 Correct 14 ms 12260 KB Output is correct
42 Correct 22 ms 16480 KB Output is correct
43 Correct 22 ms 16044 KB Output is correct
44 Correct 63 ms 47700 KB Output is correct
45 Correct 72 ms 51644 KB Output is correct
46 Correct 230 ms 205228 KB Output is correct
47 Correct 255 ms 193752 KB Output is correct
48 Correct 244 ms 193588 KB Output is correct
49 Correct 100 ms 95992 KB Output is correct
50 Correct 111 ms 105976 KB Output is correct
51 Correct 263 ms 193588 KB Output is correct
52 Correct 268 ms 193736 KB Output is correct
53 Correct 238 ms 193584 KB Output is correct
54 Correct 0 ms 344 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 428 KB Output is correct
63 Correct 0 ms 604 KB Output is correct
64 Correct 1 ms 604 KB Output is correct
65 Correct 6 ms 628 KB Output is correct
66 Correct 7 ms 604 KB Output is correct
67 Correct 6 ms 604 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 1 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 456 KB Output is correct
75 Correct 1 ms 348 KB Output is correct
76 Correct 1 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 0 ms 344 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 0 ms 348 KB Output is correct
83 Correct 0 ms 604 KB Output is correct
84 Correct 0 ms 604 KB Output is correct
85 Correct 1 ms 604 KB Output is correct
86 Correct 0 ms 344 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 456 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 0 ms 348 KB Output is correct
91 Correct 0 ms 348 KB Output is correct
92 Correct 1 ms 604 KB Output is correct
93 Correct 0 ms 604 KB Output is correct
94 Correct 6 ms 604 KB Output is correct
95 Correct 5 ms 604 KB Output is correct
96 Correct 6 ms 632 KB Output is correct
97 Correct 1 ms 344 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 348 KB Output is correct
100 Correct 0 ms 348 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 1 ms 348 KB Output is correct
106 Correct 1 ms 348 KB Output is correct
107 Correct 1 ms 600 KB Output is correct
108 Correct 1 ms 600 KB Output is correct
109 Correct 7 ms 604 KB Output is correct
110 Correct 6 ms 3036 KB Output is correct
111 Correct 15 ms 3924 KB Output is correct
112 Correct 10 ms 8644 KB Output is correct
113 Execution timed out 2072 ms 8648 KB Time limit exceeded
114 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 1 ms 856 KB Output is correct
5 Correct 0 ms 604 KB Output is correct
6 Correct 0 ms 604 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 344 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 0 ms 604 KB Output is correct
18 Correct 0 ms 604 KB Output is correct
19 Correct 9 ms 7880 KB Output is correct
20 Correct 5 ms 3676 KB Output is correct
21 Correct 10 ms 8648 KB Output is correct
22 Correct 12 ms 7552 KB Output is correct
23 Correct 12 ms 7880 KB Output is correct
24 Correct 4 ms 4188 KB Output is correct
25 Correct 5 ms 4700 KB Output is correct
26 Correct 10 ms 7624 KB Output is correct
27 Correct 10 ms 7624 KB Output is correct
28 Correct 8 ms 7740 KB Output is correct
29 Correct 25 ms 23080 KB Output is correct
30 Correct 6 ms 4328 KB Output is correct
31 Correct 25 ms 23236 KB Output is correct
32 Correct 30 ms 23240 KB Output is correct
33 Correct 26 ms 23240 KB Output is correct
34 Correct 9 ms 9956 KB Output is correct
35 Correct 17 ms 10984 KB Output is correct
36 Correct 28 ms 23240 KB Output is correct
37 Correct 25 ms 23240 KB Output is correct
38 Correct 25 ms 23176 KB Output is correct
39 Correct 244 ms 193640 KB Output is correct
40 Correct 15 ms 11100 KB Output is correct
41 Correct 14 ms 12260 KB Output is correct
42 Correct 22 ms 16480 KB Output is correct
43 Correct 22 ms 16044 KB Output is correct
44 Correct 63 ms 47700 KB Output is correct
45 Correct 72 ms 51644 KB Output is correct
46 Correct 230 ms 205228 KB Output is correct
47 Correct 255 ms 193752 KB Output is correct
48 Correct 244 ms 193588 KB Output is correct
49 Correct 100 ms 95992 KB Output is correct
50 Correct 111 ms 105976 KB Output is correct
51 Correct 263 ms 193588 KB Output is correct
52 Correct 268 ms 193736 KB Output is correct
53 Correct 238 ms 193584 KB Output is correct
54 Correct 0 ms 344 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 428 KB Output is correct
63 Correct 0 ms 604 KB Output is correct
64 Correct 1 ms 604 KB Output is correct
65 Correct 6 ms 628 KB Output is correct
66 Correct 7 ms 604 KB Output is correct
67 Correct 6 ms 604 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 1 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 456 KB Output is correct
75 Correct 1 ms 348 KB Output is correct
76 Correct 1 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 0 ms 344 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 0 ms 348 KB Output is correct
83 Correct 0 ms 604 KB Output is correct
84 Correct 0 ms 604 KB Output is correct
85 Correct 1 ms 604 KB Output is correct
86 Correct 0 ms 344 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 456 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 0 ms 348 KB Output is correct
91 Correct 0 ms 348 KB Output is correct
92 Correct 1 ms 604 KB Output is correct
93 Correct 0 ms 604 KB Output is correct
94 Correct 6 ms 604 KB Output is correct
95 Correct 5 ms 604 KB Output is correct
96 Correct 6 ms 632 KB Output is correct
97 Correct 1 ms 344 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 348 KB Output is correct
100 Correct 0 ms 348 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 1 ms 348 KB Output is correct
106 Correct 1 ms 348 KB Output is correct
107 Correct 1 ms 600 KB Output is correct
108 Correct 1 ms 600 KB Output is correct
109 Correct 7 ms 604 KB Output is correct
110 Correct 6 ms 3036 KB Output is correct
111 Correct 15 ms 3924 KB Output is correct
112 Correct 10 ms 8644 KB Output is correct
113 Execution timed out 2072 ms 8648 KB Time limit exceeded
114 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 1 ms 856 KB Output is correct
5 Correct 0 ms 604 KB Output is correct
6 Correct 0 ms 604 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 344 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 0 ms 604 KB Output is correct
18 Correct 0 ms 604 KB Output is correct
19 Correct 9 ms 7880 KB Output is correct
20 Correct 5 ms 3676 KB Output is correct
21 Correct 10 ms 8648 KB Output is correct
22 Correct 12 ms 7552 KB Output is correct
23 Correct 12 ms 7880 KB Output is correct
24 Correct 4 ms 4188 KB Output is correct
25 Correct 5 ms 4700 KB Output is correct
26 Correct 10 ms 7624 KB Output is correct
27 Correct 10 ms 7624 KB Output is correct
28 Correct 8 ms 7740 KB Output is correct
29 Correct 25 ms 23080 KB Output is correct
30 Correct 6 ms 4328 KB Output is correct
31 Correct 25 ms 23236 KB Output is correct
32 Correct 30 ms 23240 KB Output is correct
33 Correct 26 ms 23240 KB Output is correct
34 Correct 9 ms 9956 KB Output is correct
35 Correct 17 ms 10984 KB Output is correct
36 Correct 28 ms 23240 KB Output is correct
37 Correct 25 ms 23240 KB Output is correct
38 Correct 25 ms 23176 KB Output is correct
39 Correct 244 ms 193640 KB Output is correct
40 Correct 15 ms 11100 KB Output is correct
41 Correct 14 ms 12260 KB Output is correct
42 Correct 22 ms 16480 KB Output is correct
43 Correct 22 ms 16044 KB Output is correct
44 Correct 63 ms 47700 KB Output is correct
45 Correct 72 ms 51644 KB Output is correct
46 Correct 230 ms 205228 KB Output is correct
47 Correct 255 ms 193752 KB Output is correct
48 Correct 244 ms 193588 KB Output is correct
49 Correct 100 ms 95992 KB Output is correct
50 Correct 111 ms 105976 KB Output is correct
51 Correct 263 ms 193588 KB Output is correct
52 Correct 268 ms 193736 KB Output is correct
53 Correct 238 ms 193584 KB Output is correct
54 Correct 0 ms 344 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 428 KB Output is correct
63 Correct 0 ms 604 KB Output is correct
64 Correct 1 ms 604 KB Output is correct
65 Correct 6 ms 628 KB Output is correct
66 Correct 7 ms 604 KB Output is correct
67 Correct 6 ms 604 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 1 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 456 KB Output is correct
75 Correct 1 ms 348 KB Output is correct
76 Correct 1 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 0 ms 344 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 0 ms 348 KB Output is correct
83 Correct 0 ms 604 KB Output is correct
84 Correct 0 ms 604 KB Output is correct
85 Correct 1 ms 604 KB Output is correct
86 Correct 0 ms 344 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 456 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 0 ms 348 KB Output is correct
91 Correct 0 ms 348 KB Output is correct
92 Correct 1 ms 604 KB Output is correct
93 Correct 0 ms 604 KB Output is correct
94 Correct 6 ms 604 KB Output is correct
95 Correct 5 ms 604 KB Output is correct
96 Correct 6 ms 632 KB Output is correct
97 Correct 1 ms 344 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 0 ms 348 KB Output is correct
100 Correct 0 ms 348 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 348 KB Output is correct
103 Correct 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 1 ms 348 KB Output is correct
106 Correct 1 ms 348 KB Output is correct
107 Correct 1 ms 600 KB Output is correct
108 Correct 1 ms 600 KB Output is correct
109 Correct 7 ms 604 KB Output is correct
110 Correct 6 ms 3036 KB Output is correct
111 Correct 15 ms 3924 KB Output is correct
112 Correct 10 ms 8644 KB Output is correct
113 Execution timed out 2072 ms 8648 KB Time limit exceeded
114 Halted 0 ms 0 KB -