Submission #754274

# Submission time Handle Problem Language Result Execution time Memory
754274 2023-06-07T11:43:39 Z tolbi Fountain Parks (IOI21_parks) C++17
55 / 100
1877 ms 53120 KB
#pragma optimize("Bismillahirrahmanirrahim")
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█■█
//█─█─█▄─█▄─█─█─█─█
//Allahuekber
//ahmet23 orz...
//Sani buyuk Osman Pasa Plevneden cikmam diyor.
//FatihSultanMehmedHan
//YavuzSultanSelimHan
//AbdulhamidHan
#define author tolbi
#include <bits/stdc++.h>
using namespace std;
template<typename X, typename Y> istream& operator>>(istream& in, pair<X,Y> &pr) {return in>>pr.first>>pr.second;}
template<typename X, typename Y> ostream& operator<<(ostream& os, pair<X,Y> pr) {return os<<pr.first<<" "<<pr.second;}
template<typename X> istream& operator>>(istream& in, vector<X> &arr) {for(auto &it : arr) in>>it; return in;}
template<typename X> ostream& operator<<(ostream& os, vector<X> arr) {for(auto &it : arr) os<<it<<" "; return os;}
template<typename X, size_t Y> istream& operator>>(istream& in, array<X,Y> &arr) {for(auto &it : arr) in>>it; return in;}
template<typename X, size_t Y> ostream& operator<<(ostream& os, array<X,Y> arr) {for(auto &it : arr) os<<it<<" "; return os;}
template<typename T> vector<int32_t> normalize(vector<T> &arr){vector<int> rv;rv.resize(arr.size());for (int i = 0; i < rv.size(); ++i){rv[i]=arr[i];}return rv;}
#define endl '\n'
#define vint(x) vector<int> x
#define deci(x) int x;cin>>x;
#define decstr(x) string x;cin>>x;
#define cinarr(x) for (auto &it : x) cin>>it;
#define coutarr(x) for (auto &it : x) cout<<it<<" ";cout<<endl;
#define sortarr(x) sort(x.begin(),x.end())
#define sortrarr(x) sort(x.rbegin(),x.rend())
#define det(x) cout<<"NO\0YES"+x*3<<endl;
#define INF LONG_MAX
#define rev(x) reverse(x.begin(),x.end());
#define ios ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define tol(bi) (1LL<<((int)(bi)))
const int MOD = 1e9+7;
mt19937 ayahya(chrono::high_resolution_clock().now().time_since_epoch().count());
#include "parks.h"
struct DSU{
	vector<int> par;
	DSU(int n){
		par.resize(n);
		iota(par.begin(), par.end(), 0ll);
	}
	int find(int node){
		if (par[node]==node) return node;
		return par[node]=find(par[node]);
	}
	void merge(int a, int b){
		a=find(a);
		b=find(b);
		if (ayahya()%2) swap(a,b);
		par[a]=b;
	}
};
int construct_roads(vector<int> x, vector<int> y) {
	map<pair<int,int>,int> mp;
	int n = x.size();
	for (int i = 0; i < n; ++i)
	{
		mp[{x[i],y[i]}]=i;
	}
	map<pair<int,int>,int> dikey;
	map<pair<int,int>,int> yatay;
	vector<bool> yat;
	vector<int> u;
	vector<int> v;
	vector<int> a;
	vector<int> b;
	DSU dsu(n);
	for (int i = 0; i < n; i++){
		int xv = x[i];
		int yv = y[i];
		if (mp.count({xv+2,yv})){
			if (dsu.find(i)!=dsu.find(mp[{xv+2,yv}])){
				dsu.merge(i,mp[{xv+2,yv}]);
				yatay[{xv,yv}]=u.size();
				u.push_back(i);
				v.push_back(mp[{xv+2,yv}]);
				yat.push_back(true);
				a.push_back(-23);
				b.push_back(-23);
			}
		}
		if (mp.count({xv,yv+2})){
			if (dsu.find(i)!=dsu.find(mp[{xv,yv+2}])){
				dsu.merge(i,mp[{xv,yv+2}]);
				dikey[{xv,yv}]=u.size();
				u.push_back(i);
				v.push_back(mp[{xv,yv+2}]);
				yat.push_back(false);
				a.push_back(-23);
				b.push_back(-23);
			}
		}
	}
	if (u.size()!=n-1) return 0;
	map<pair<int,int>,bool> kap;
	int mini = *min_element(x.begin(), x.end());
	int minj = *min_element(y.begin(), y.end());
	int mani = *max_element(x.begin(), x.end());
	int manj = *max_element(y.begin(), y.end());
	vector<int> sir;
	vector<int> viss(u.size(),false);
	for (int i = 0; i < u.size(); i++){
		if (x[u[i]]==mini && !yat[i]){
			a[i]=x[u[i]]-1;
			b[i]=y[u[i]]+1;
			viss[i]=true;
			continue;
		}
		if (x[u[i]]==mani && !yat[i]){
			a[i]=x[u[i]]+1;
			b[i]=y[u[i]]+1;
			viss[i]=true;
			continue;
		}
		if (y[u[i]]==minj & yat[i]){
			a[i]=x[u[i]]+1;
			b[i]=y[u[i]]-1;
			viss[i]=true;
			continue;
		}
		if (y[u[i]]==manj && yat[i]){
			a[i]=x[u[i]]+1;
			b[i]=y[u[i]]+1;
			viss[i]=true;
			continue;
		}
	}
	for (int i = 0; i < u.size(); ++i)
	{
		if (viss[i]) continue;
		int xv = x[u[i]];
		int yv = y[u[i]];
		int ss = yatay.count({xv,yv}) + dikey.count({xv,yv}) + yatay.count({xv-2,yv}) + dikey.count({xv,yv-2});
		if (ss==4){
			sir.push_back(i);
			viss[i]=true;
		}
	}
	for (int i = 0; i < u.size(); ++i)
	{
		if (viss[i]) continue;
		int xv = x[u[i]];
		int yv = y[u[i]];
		int ss = yatay.count({xv,yv}) + dikey.count({xv,yv}) + yatay.count({xv-2,yv}) + dikey.count({xv,yv-2});
		int kk = yatay.count({xv,yv}) + yatay.count({xv-2,yv});
		if (ss>=3 && (kk>(ss-kk)) == yat[i]){
			sir.push_back(i);
			viss[i]=true;
		}
	}
	for (int i = 0; i < u.size(); ++i)
	{
		if (viss[i]) continue;
		sir.push_back(i);
	}
	for (int i = 0; i < sir.size(); i++){
		queue<int> q;
		q.push(sir[i]);
		while (q.size()){
			int ed = q.front();
			q.pop();
			if (a[ed]!=-23) continue;
			if (yat[ed]){
				if (!kap[{x[u[ed]]+1,y[u[ed]]+1}]){
					kap[{x[u[ed]]+1,y[u[ed]]+1}]=true;
					a[ed]=x[u[ed]]+1;
					b[ed]=y[u[ed]]+1;
				}
				else {
					if (kap[{x[u[ed]]+1,y[u[ed]]-1}]) return 0;
					kap[{x[u[ed]]+1,y[u[ed]]-1}]=true;
					a[ed]=x[u[ed]]+1;
					b[ed]=y[u[ed]]-1;
				}
			}
			else {
				if (!kap[{x[u[ed]]+1,y[u[ed]]+1}]){
					kap[{x[u[ed]]+1,y[u[ed]]+1}]=true;
					a[ed]=x[u[ed]]+1;
					b[ed]=y[u[ed]]+1;
				}
				else {
					if (kap[{x[u[ed]]-1,y[u[ed]]+1}]) return 0;
					kap[{x[u[ed]]-1,y[u[ed]]+1}]=true;
					a[ed]=x[u[ed]]-1;
					b[ed]=y[u[ed]]+1;
				}
			}
			pair<int,int> pr;
			pr={a[ed]-1,b[ed]-1};
			if (yatay.count(pr) && yatay[pr]!=ed && a[yatay[pr]]==-23){
				q.push(yatay[pr]);
			}
			pr={a[ed]-1,b[ed]+1};
			if (yatay.count(pr) && yatay[pr]!=ed && a[yatay[pr]]==-23){
				q.push(yatay[pr]);
			}			
			pr={a[ed]-1,b[ed]-1};
			if (dikey.count(pr) && dikey[pr]!=ed && a[dikey[pr]]==-23){
				q.push(dikey[pr]);
			}			
			pr={a[ed]+1,b[ed]-1};
			if (dikey.count(pr) && dikey[pr]!=ed && a[dikey[pr]]==-23){
				q.push(dikey[pr]);
			}
		}
	}
	build(u,v,a,b);
	return 1;
}

Compilation message

parks.cpp:1: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
    1 | #pragma optimize("Bismillahirrahmanirrahim")
      | 
parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:95:14: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   95 |  if (u.size()!=n-1) return 0;
      |      ~~~~~~~~^~~~~
parks.cpp:103:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  103 |  for (int i = 0; i < u.size(); i++){
      |                  ~~^~~~~~~~~~
parks.cpp:116:14: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
  116 |   if (y[u[i]]==minj & yat[i]){
parks.cpp:129:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  129 |  for (int i = 0; i < u.size(); ++i)
      |                  ~~^~~~~~~~~~
parks.cpp:140:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  140 |  for (int i = 0; i < u.size(); ++i)
      |                  ~~^~~~~~~~~~
parks.cpp:152:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  152 |  for (int i = 0; i < u.size(); ++i)
      |                  ~~^~~~~~~~~~
parks.cpp:157:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  157 |  for (int i = 0; i < sir.size(); i++){
      |                  ~~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 244 ms 19808 KB Output is correct
10 Correct 13 ms 2424 KB Output is correct
11 Correct 78 ms 10872 KB Output is correct
12 Correct 24 ms 3404 KB Output is correct
13 Correct 54 ms 7364 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 4 ms 596 KB Output is correct
16 Correct 259 ms 19856 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 244 ms 19808 KB Output is correct
10 Correct 13 ms 2424 KB Output is correct
11 Correct 78 ms 10872 KB Output is correct
12 Correct 24 ms 3404 KB Output is correct
13 Correct 54 ms 7364 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 4 ms 596 KB Output is correct
16 Correct 259 ms 19856 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1070 ms 43916 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 3 ms 468 KB Output is correct
26 Correct 5 ms 724 KB Output is correct
27 Correct 5 ms 852 KB Output is correct
28 Correct 355 ms 17812 KB Output is correct
29 Correct 489 ms 26476 KB Output is correct
30 Correct 728 ms 35224 KB Output is correct
31 Correct 1050 ms 43900 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 3 ms 596 KB Output is correct
44 Correct 5 ms 724 KB Output is correct
45 Correct 469 ms 22024 KB Output is correct
46 Correct 710 ms 31716 KB Output is correct
47 Correct 675 ms 31736 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 244 ms 19808 KB Output is correct
10 Correct 13 ms 2424 KB Output is correct
11 Correct 78 ms 10872 KB Output is correct
12 Correct 24 ms 3404 KB Output is correct
13 Correct 54 ms 7364 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 4 ms 596 KB Output is correct
16 Correct 259 ms 19856 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1070 ms 43916 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 3 ms 468 KB Output is correct
26 Correct 5 ms 724 KB Output is correct
27 Correct 5 ms 852 KB Output is correct
28 Correct 355 ms 17812 KB Output is correct
29 Correct 489 ms 26476 KB Output is correct
30 Correct 728 ms 35224 KB Output is correct
31 Correct 1050 ms 43900 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 3 ms 596 KB Output is correct
44 Correct 5 ms 724 KB Output is correct
45 Correct 469 ms 22024 KB Output is correct
46 Correct 710 ms 31716 KB Output is correct
47 Correct 675 ms 31736 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Incorrect 867 ms 34140 KB Solution announced impossible, but it is possible.
56 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 244 ms 19808 KB Output is correct
10 Correct 13 ms 2424 KB Output is correct
11 Correct 78 ms 10872 KB Output is correct
12 Correct 24 ms 3404 KB Output is correct
13 Correct 54 ms 7364 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 4 ms 596 KB Output is correct
16 Correct 259 ms 19856 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 1063 ms 52924 KB Output is correct
21 Correct 1445 ms 52812 KB Output is correct
22 Correct 1234 ms 52824 KB Output is correct
23 Correct 706 ms 36224 KB Output is correct
24 Correct 337 ms 16728 KB Output is correct
25 Correct 659 ms 32308 KB Output is correct
26 Correct 655 ms 32452 KB Output is correct
27 Correct 1590 ms 52780 KB Output is correct
28 Correct 1562 ms 52664 KB Output is correct
29 Correct 1619 ms 52744 KB Output is correct
30 Correct 1633 ms 52780 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 62 ms 4308 KB Output is correct
33 Correct 93 ms 8512 KB Output is correct
34 Correct 1476 ms 52860 KB Output is correct
35 Correct 15 ms 1876 KB Output is correct
36 Correct 99 ms 8224 KB Output is correct
37 Correct 261 ms 16280 KB Output is correct
38 Correct 577 ms 21384 KB Output is correct
39 Correct 970 ms 29212 KB Output is correct
40 Correct 1206 ms 36980 KB Output is correct
41 Correct 1459 ms 45080 KB Output is correct
42 Correct 1801 ms 53120 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 0 ms 212 KB Output is correct
46 Correct 0 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 0 ms 212 KB Output is correct
54 Correct 3 ms 596 KB Output is correct
55 Correct 4 ms 724 KB Output is correct
56 Correct 382 ms 21876 KB Output is correct
57 Correct 686 ms 31756 KB Output is correct
58 Correct 683 ms 31708 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 1 ms 212 KB Output is correct
62 Correct 649 ms 39400 KB Output is correct
63 Correct 689 ms 39432 KB Output is correct
64 Correct 713 ms 39300 KB Output is correct
65 Correct 7 ms 852 KB Output is correct
66 Correct 12 ms 1492 KB Output is correct
67 Correct 533 ms 23328 KB Output is correct
68 Correct 910 ms 34824 KB Output is correct
69 Correct 1402 ms 46432 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 244 ms 19808 KB Output is correct
10 Correct 13 ms 2424 KB Output is correct
11 Correct 78 ms 10872 KB Output is correct
12 Correct 24 ms 3404 KB Output is correct
13 Correct 54 ms 7364 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 4 ms 596 KB Output is correct
16 Correct 259 ms 19856 KB Output is correct
17 Correct 621 ms 39400 KB Output is correct
18 Correct 939 ms 46112 KB Output is correct
19 Correct 1381 ms 52960 KB Output is correct
20 Correct 1769 ms 51660 KB Output is correct
21 Correct 1626 ms 46072 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 172 ms 8672 KB Output is correct
24 Correct 35 ms 3480 KB Output is correct
25 Correct 175 ms 11468 KB Output is correct
26 Correct 421 ms 19548 KB Output is correct
27 Correct 782 ms 26452 KB Output is correct
28 Correct 993 ms 33076 KB Output is correct
29 Correct 1336 ms 39736 KB Output is correct
30 Correct 1659 ms 46308 KB Output is correct
31 Correct 1877 ms 52728 KB Output is correct
32 Correct 1039 ms 44004 KB Output is correct
33 Correct 639 ms 39456 KB Output is correct
34 Correct 7 ms 1108 KB Output is correct
35 Correct 17 ms 1828 KB Output is correct
36 Correct 492 ms 23232 KB Output is correct
37 Correct 1010 ms 34808 KB Output is correct
38 Correct 1419 ms 46328 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 244 ms 19808 KB Output is correct
10 Correct 13 ms 2424 KB Output is correct
11 Correct 78 ms 10872 KB Output is correct
12 Correct 24 ms 3404 KB Output is correct
13 Correct 54 ms 7364 KB Output is correct
14 Correct 2 ms 468 KB Output is correct
15 Correct 4 ms 596 KB Output is correct
16 Correct 259 ms 19856 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 1070 ms 43916 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 3 ms 468 KB Output is correct
26 Correct 5 ms 724 KB Output is correct
27 Correct 5 ms 852 KB Output is correct
28 Correct 355 ms 17812 KB Output is correct
29 Correct 489 ms 26476 KB Output is correct
30 Correct 728 ms 35224 KB Output is correct
31 Correct 1050 ms 43900 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 0 ms 212 KB Output is correct
43 Correct 3 ms 596 KB Output is correct
44 Correct 5 ms 724 KB Output is correct
45 Correct 469 ms 22024 KB Output is correct
46 Correct 710 ms 31716 KB Output is correct
47 Correct 675 ms 31736 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Incorrect 867 ms 34140 KB Solution announced impossible, but it is possible.
56 Halted 0 ms 0 KB -