Submission #1085569

# Submission time Handle Problem Language Result Execution time Memory
1085569 2024-09-08T12:32:56 Z I_am_Polish_Girl Maze (JOI23_ho_t3) C++14
8 / 100
804 ms 452084 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 <int> deep;
	
	
	vector <string> vs(n);
	for (int i = 0; i < n; i++)
		cin >> vs[i];
	

	int X = 2;
	int c = 1;

	int sz = 0;

	int K = 2 * k - 1;

	
	while (c * X <= K)
	{
		c *= X;
		sz++;
	}

	sz++;

	vector <vector <vector<int>>> bin(n);

	vector <vector <int>> g(n*m*(2*sz));


	for (int i = 0; i < n; i++)
	{
		bin[i].resize(m);
		for (int j = 0; j < m; j++)
		{
			bin[i][j].resize(sz);
		}
	}

	int f = 0;

	vector <pair <int, int>> vp(n * m);


	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < m; j++)
		{
			bin[i][j][0] = f;
			
			vp[f] = { i , j };

			f++;
		}
	}

	int f2 = f;

	int y = 1;
	for (int k_ = 1; k_ < sz; k_ ++)
	{
		for (int i = 0; i < n; i++)
		{
			for (int j = 0; j < m; j++)
			{
				bin[i][j][k_] = f;

				for (int x = 0; x < X; x++)
				{
					g[f].push_back(bin[i][min(j + y * x, m - 1)][k_ - 1]);
				}
				
				f++;
			}
		}

		y *= X;
	}


	y /= X;



	vector <vector <vector<int>>> bin2(n);


	for (int i = 0; i < n; i++)
	{
		bin2[i].resize(m);
		for (int j = 0; j < m; j++)
		{
			bin2[i][j].resize(sz);
		}
	}


	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < m; j++)
		{
			bin2[i][j][0] = bin[i][j][0];
		}
	}

	y = 1;
	for (int k_ = 1; k_ < sz; k_++)
	{
		for (int i = 0; i < n; i++)
		{
			for (int j = 0; j < m; j++)
			{
				bin2[i][j][k_] = f;

				for (int x = 0; x < X; x++)
				{
					g[f].push_back(bin2[min(i + y * x, n - 1)][j][k_ - 1]);
				}

				f++;
			}
		}

		y *= X;
	}

	y /= X;






	deep.resize(g.size() ,inf);

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

	q[0].push_back(bin[i_st][j_st][0]);
	deep[bin[i_st][j_st][0]] = 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 ind__ = q[d][ind];

			if (ind__ < f2)
			{
				int i_ = vp[ind__].first;
				int j_ = vp[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[bin[i__][j__][0]] > d)
							{
								if (vs[i__][j__] == '.')
								{
									deep[bin[i__][j__][0]] = d;
									q[d].push_back(bin[i__][j__][0]);
								}
							}
						}
					}
				}
			}
			else
			{
				for (int i = 0; i < g[ind__].size(); i++)
				{
					int ind_s = g[ind__][i];

					if (deep[ind_s] > d)
					{	
						deep[ind_s] = d;
						q[d].push_back(ind_s);
					}
				}
			}
		}



		for (int ind = 0; ind < q[d].size(); ind++)
		{
			int ind__ = q[d][ind];

			if (ind__ < f2)
			{
				int i_ = vp[ind__].first;
				int j_ = vp[ind__].second;


				if (i_ >= k) 
				{
					int l = j_ - (k - 1);
					int r = j_ + (k - 1);

					l = max(l, 0ll);
					r = min(r, m - 1);

					int i__ = i_ - k;
					int j__ = l;

					int lenth = r - l + 1;

					int c = 0;
					int x = 1;

					while (x * X <= lenth)
					{
						x *= X;
						c++;
					}

					for (int c_ = 0; c_ < (lenth / x); c_++)
					{
						if (deep[bin[i__][j__ + (c_ * x)][c]] == inf)
						{
							deep[bin[i__][j__ + (c_ * x)][c]] = d + 1;
							q[d + 1].push_back(bin[i__][j__ + (c * x)][c]);
						}
					}

					if (deep[bin[i__][r - x + 1][c]] == inf)
					{
						deep[bin[i__][r - x + 1][c]] = d + 1;
						q[d + 1].push_back(bin[i__][r - x + 1][c]);
					}
					//q[d + 1].push_back(bin[i__][r - x+1][c]);
				}

				if (i_+ k < n) 
				{
					int l = j_ - (k - 1);
					int r = j_ + (k - 1);

					l = max(l, 0ll);
					r = min(r, m - 1);

					int i__ = i_ + k;
					int j__ = l;

					int lenth = r - l + 1;

					int c = 0;
					int x = 1;

					while (x * X <= lenth)
					{
						x *= X;
						c++;
					}

					for (int c_ = 0; c_ < (lenth / x); c_++)
					{
						if (deep[bin[i__][j__ + (c_ * x)][c]] == inf)
						{
							deep[bin[i__][j__ + (c_ * x)][c]] = d + 1;
							q[d + 1].push_back(bin[i__][j__ + (c_ * x)][c]);
						}
					}

					if (deep[bin[i__][r - x + 1][c]] == inf)
					{
						deep[bin[i__][r - x + 1][c]] = d + 1;
						q[d + 1].push_back(bin[i__][r - x + 1][c]);
					}
				}
				




				if (j_ >= k)
				{
					int l = i_ - (k - 1);
					int r = i_ + (k - 1);

					l = max(l, 0ll);
					r = min(r, n - 1);

					int i__ = l;
					int j__ = j_ - k;

					int lenth = r - l + 1;

					int c = 0;
					int x = 1;

					while (x * X <= lenth)
					{
						x *= X;
						c++;
					}

					for (int c_ = 0; c_ < (lenth / x); c_++)
					{
						if (deep[bin2[i__ + (c_ * x)][j__][c]] > d + 1)
						{
							deep[bin2[i__ + (c_ * x)][j__][c]] = d + 1;
							q[d + 1].push_back(bin2[i__ + (c_ * x)][j__][c]);
						}
					}


					if (deep[bin2[r - x + 1][j__][c]] > d + 1)
					{
						deep[bin2[r - x + 1][j__][c]] = d + 1;
						q[d + 1].push_back(bin2[r - x + 1][j__][c]);
					}

					//q[d + 1].push_back(bin[l - x+1][j__][c]);
				}


				if (j_+k < m)
				{
					int l = i_ - (k - 1);
					int r = i_ + (k - 1);

					l = max(l, 0ll);
					r = min(r, n - 1);

					int i__ = l;
					int j__ = j_ + k;

					int lenth = r - l + 1;

					int c = 0;
					int x = 1;

					while (x * X <= lenth)
					{
						x *= X;
						c++;
					}

					for (int c_ = 0; c_ < (lenth / x); c_++)
					{
						if (deep[bin2[i__ + (c_ * x)][j__][c]] > d + 1)
						{
							deep[bin2[i__ + (c_ * x)][j__][c]] = d + 1;
							q[d + 1].push_back(bin2[i__ + (c_ * x)][j__][c]);
						}
					}


					if (deep[bin2[r - x + 1][j__][c]] > d + 1)
					{
						deep[bin2[r - x + 1][j__][c]] = d + 1;
						q[d + 1].push_back(bin2[r - x + 1][j__][c]);
					}

					//q[d + 1].push_back(bin[l - x+1][j__][c]);
				}


			}
		}
	}


	//cout << deep[i_f][j_f] << "\n";

	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < m; j++)
		{
			if (abs(i - i_f) <= k)
			{
				if (abs(j - j_f) <= k)
				{
					if ((abs(i - i_f) + abs(j - j_f)) != 2 * k)
					{
						deep[bin[i_f][j_f][0]] = min(deep[bin[i_f][j_f][0]], deep[bin[i][j][0]] + 1);
					}
				}
			}
		}
	}

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

/*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:220:25: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  220 |   for (int ind = 0; ind < q[d].size(); ind++)
      |                     ~~~~^~~~~~~~~~~~~
Main.cpp:252:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  252 |     for (int i = 0; i < g[ind__].size(); i++)
      |                     ~~^~~~~~~~~~~~~~~~~
Main.cpp:267:25: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  267 |   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 0 ms 604 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 1 ms 456 KB Output is correct
8 Correct 0 ms 604 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 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 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 23 ms 17460 KB Output is correct
20 Correct 9 ms 11356 KB Output is correct
21 Correct 21 ms 17852 KB Output is correct
22 Correct 22 ms 17604 KB Output is correct
23 Correct 17 ms 17452 KB Output is correct
24 Correct 12 ms 13912 KB Output is correct
25 Correct 16 ms 14940 KB Output is correct
26 Correct 21 ms 17356 KB Output is correct
27 Correct 21 ms 17552 KB Output is correct
28 Correct 20 ms 17604 KB Output is correct
29 Correct 61 ms 49108 KB Output is correct
30 Correct 13 ms 14172 KB Output is correct
31 Correct 52 ms 48832 KB Output is correct
32 Correct 65 ms 48832 KB Output is correct
33 Correct 54 ms 48832 KB Output is correct
34 Correct 27 ms 34012 KB Output is correct
35 Correct 33 ms 36836 KB Output is correct
36 Correct 70 ms 48832 KB Output is correct
37 Correct 69 ms 48832 KB Output is correct
38 Correct 70 ms 48832 KB Output is correct
39 Correct 801 ms 451984 KB Output is correct
40 Correct 49 ms 38736 KB Output is correct
41 Correct 38 ms 42004 KB Output is correct
42 Correct 96 ms 51032 KB Output is correct
43 Correct 61 ms 55180 KB Output is correct
44 Correct 213 ms 167252 KB Output is correct
45 Correct 230 ms 181260 KB Output is correct
46 Correct 618 ms 452084 KB Output is correct
47 Correct 804 ms 451904 KB Output is correct
48 Correct 720 ms 451764 KB Output is correct
49 Correct 400 ms 337464 KB Output is correct
50 Correct 288 ms 361204 KB Output is correct
51 Correct 792 ms 451952 KB Output is correct
52 Correct 773 ms 451900 KB Output is correct
53 Correct 740 ms 451844 KB Output is correct
# 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 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 1 ms 452 KB Output is correct
8 Correct 0 ms 456 KB Output is correct
9 Correct 0 ms 604 KB Output is correct
10 Correct 1 ms 604 KB Output is correct
11 Correct 1 ms 604 KB Output is correct
12 Correct 2 ms 1372 KB Output is correct
13 Correct 2 ms 1372 KB Output is correct
14 Correct 2 ms 1372 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Runtime error 1 ms 1628 KB Execution killed with signal 11
20 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 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 1 ms 604 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 2 ms 1372 KB Output is correct
10 Correct 2 ms 1372 KB Output is correct
11 Correct 1 ms 1372 KB Output is correct
12 Correct 0 ms 604 KB Output is correct
13 Correct 0 ms 456 KB Output is correct
14 Runtime error 2 ms 1628 KB Execution killed with signal 11
15 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 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 1 ms 452 KB Output is correct
8 Correct 0 ms 456 KB Output is correct
9 Correct 0 ms 604 KB Output is correct
10 Correct 1 ms 604 KB Output is correct
11 Correct 1 ms 604 KB Output is correct
12 Correct 2 ms 1372 KB Output is correct
13 Correct 2 ms 1372 KB Output is correct
14 Correct 2 ms 1372 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Runtime error 1 ms 1628 KB Execution killed with signal 11
20 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 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 1 ms 452 KB Output is correct
8 Correct 0 ms 456 KB Output is correct
9 Correct 0 ms 604 KB Output is correct
10 Correct 1 ms 604 KB Output is correct
11 Correct 1 ms 604 KB Output is correct
12 Correct 2 ms 1372 KB Output is correct
13 Correct 2 ms 1372 KB Output is correct
14 Correct 2 ms 1372 KB Output is correct
15 Correct 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Runtime error 1 ms 1628 KB Execution killed with signal 11
20 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 0 ms 604 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 1 ms 456 KB Output is correct
8 Correct 0 ms 604 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 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 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 23 ms 17460 KB Output is correct
20 Correct 9 ms 11356 KB Output is correct
21 Correct 21 ms 17852 KB Output is correct
22 Correct 22 ms 17604 KB Output is correct
23 Correct 17 ms 17452 KB Output is correct
24 Correct 12 ms 13912 KB Output is correct
25 Correct 16 ms 14940 KB Output is correct
26 Correct 21 ms 17356 KB Output is correct
27 Correct 21 ms 17552 KB Output is correct
28 Correct 20 ms 17604 KB Output is correct
29 Correct 61 ms 49108 KB Output is correct
30 Correct 13 ms 14172 KB Output is correct
31 Correct 52 ms 48832 KB Output is correct
32 Correct 65 ms 48832 KB Output is correct
33 Correct 54 ms 48832 KB Output is correct
34 Correct 27 ms 34012 KB Output is correct
35 Correct 33 ms 36836 KB Output is correct
36 Correct 70 ms 48832 KB Output is correct
37 Correct 69 ms 48832 KB Output is correct
38 Correct 70 ms 48832 KB Output is correct
39 Correct 801 ms 451984 KB Output is correct
40 Correct 49 ms 38736 KB Output is correct
41 Correct 38 ms 42004 KB Output is correct
42 Correct 96 ms 51032 KB Output is correct
43 Correct 61 ms 55180 KB Output is correct
44 Correct 213 ms 167252 KB Output is correct
45 Correct 230 ms 181260 KB Output is correct
46 Correct 618 ms 452084 KB Output is correct
47 Correct 804 ms 451904 KB Output is correct
48 Correct 720 ms 451764 KB Output is correct
49 Correct 400 ms 337464 KB Output is correct
50 Correct 288 ms 361204 KB Output is correct
51 Correct 792 ms 451952 KB Output is correct
52 Correct 773 ms 451900 KB Output is correct
53 Correct 740 ms 451844 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 1 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 1 ms 452 KB Output is correct
61 Correct 0 ms 456 KB Output is correct
62 Correct 0 ms 604 KB Output is correct
63 Correct 1 ms 604 KB Output is correct
64 Correct 1 ms 604 KB Output is correct
65 Correct 2 ms 1372 KB Output is correct
66 Correct 2 ms 1372 KB Output is correct
67 Correct 2 ms 1372 KB Output is correct
68 Correct 0 ms 604 KB Output is correct
69 Correct 0 ms 604 KB Output is correct
70 Correct 1 ms 604 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Runtime error 1 ms 1628 KB Execution killed with signal 11
73 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 0 ms 604 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 1 ms 456 KB Output is correct
8 Correct 0 ms 604 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 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 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 23 ms 17460 KB Output is correct
20 Correct 9 ms 11356 KB Output is correct
21 Correct 21 ms 17852 KB Output is correct
22 Correct 22 ms 17604 KB Output is correct
23 Correct 17 ms 17452 KB Output is correct
24 Correct 12 ms 13912 KB Output is correct
25 Correct 16 ms 14940 KB Output is correct
26 Correct 21 ms 17356 KB Output is correct
27 Correct 21 ms 17552 KB Output is correct
28 Correct 20 ms 17604 KB Output is correct
29 Correct 61 ms 49108 KB Output is correct
30 Correct 13 ms 14172 KB Output is correct
31 Correct 52 ms 48832 KB Output is correct
32 Correct 65 ms 48832 KB Output is correct
33 Correct 54 ms 48832 KB Output is correct
34 Correct 27 ms 34012 KB Output is correct
35 Correct 33 ms 36836 KB Output is correct
36 Correct 70 ms 48832 KB Output is correct
37 Correct 69 ms 48832 KB Output is correct
38 Correct 70 ms 48832 KB Output is correct
39 Correct 801 ms 451984 KB Output is correct
40 Correct 49 ms 38736 KB Output is correct
41 Correct 38 ms 42004 KB Output is correct
42 Correct 96 ms 51032 KB Output is correct
43 Correct 61 ms 55180 KB Output is correct
44 Correct 213 ms 167252 KB Output is correct
45 Correct 230 ms 181260 KB Output is correct
46 Correct 618 ms 452084 KB Output is correct
47 Correct 804 ms 451904 KB Output is correct
48 Correct 720 ms 451764 KB Output is correct
49 Correct 400 ms 337464 KB Output is correct
50 Correct 288 ms 361204 KB Output is correct
51 Correct 792 ms 451952 KB Output is correct
52 Correct 773 ms 451900 KB Output is correct
53 Correct 740 ms 451844 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 1 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 1 ms 452 KB Output is correct
61 Correct 0 ms 456 KB Output is correct
62 Correct 0 ms 604 KB Output is correct
63 Correct 1 ms 604 KB Output is correct
64 Correct 1 ms 604 KB Output is correct
65 Correct 2 ms 1372 KB Output is correct
66 Correct 2 ms 1372 KB Output is correct
67 Correct 2 ms 1372 KB Output is correct
68 Correct 0 ms 604 KB Output is correct
69 Correct 0 ms 604 KB Output is correct
70 Correct 1 ms 604 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Runtime error 1 ms 1628 KB Execution killed with signal 11
73 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 0 ms 604 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 1 ms 604 KB Output is correct
7 Correct 1 ms 456 KB Output is correct
8 Correct 0 ms 604 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 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 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 23 ms 17460 KB Output is correct
20 Correct 9 ms 11356 KB Output is correct
21 Correct 21 ms 17852 KB Output is correct
22 Correct 22 ms 17604 KB Output is correct
23 Correct 17 ms 17452 KB Output is correct
24 Correct 12 ms 13912 KB Output is correct
25 Correct 16 ms 14940 KB Output is correct
26 Correct 21 ms 17356 KB Output is correct
27 Correct 21 ms 17552 KB Output is correct
28 Correct 20 ms 17604 KB Output is correct
29 Correct 61 ms 49108 KB Output is correct
30 Correct 13 ms 14172 KB Output is correct
31 Correct 52 ms 48832 KB Output is correct
32 Correct 65 ms 48832 KB Output is correct
33 Correct 54 ms 48832 KB Output is correct
34 Correct 27 ms 34012 KB Output is correct
35 Correct 33 ms 36836 KB Output is correct
36 Correct 70 ms 48832 KB Output is correct
37 Correct 69 ms 48832 KB Output is correct
38 Correct 70 ms 48832 KB Output is correct
39 Correct 801 ms 451984 KB Output is correct
40 Correct 49 ms 38736 KB Output is correct
41 Correct 38 ms 42004 KB Output is correct
42 Correct 96 ms 51032 KB Output is correct
43 Correct 61 ms 55180 KB Output is correct
44 Correct 213 ms 167252 KB Output is correct
45 Correct 230 ms 181260 KB Output is correct
46 Correct 618 ms 452084 KB Output is correct
47 Correct 804 ms 451904 KB Output is correct
48 Correct 720 ms 451764 KB Output is correct
49 Correct 400 ms 337464 KB Output is correct
50 Correct 288 ms 361204 KB Output is correct
51 Correct 792 ms 451952 KB Output is correct
52 Correct 773 ms 451900 KB Output is correct
53 Correct 740 ms 451844 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 1 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 1 ms 452 KB Output is correct
61 Correct 0 ms 456 KB Output is correct
62 Correct 0 ms 604 KB Output is correct
63 Correct 1 ms 604 KB Output is correct
64 Correct 1 ms 604 KB Output is correct
65 Correct 2 ms 1372 KB Output is correct
66 Correct 2 ms 1372 KB Output is correct
67 Correct 2 ms 1372 KB Output is correct
68 Correct 0 ms 604 KB Output is correct
69 Correct 0 ms 604 KB Output is correct
70 Correct 1 ms 604 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Runtime error 1 ms 1628 KB Execution killed with signal 11
73 Halted 0 ms 0 KB -