Submission #590116

# Submission time Handle Problem Language Result Execution time Memory
590116 2022-07-05T14:33:03 Z LIF Connecting Supertrees (IOI20_supertrees) C++14
100 / 100
230 ms 26620 KB
#include "supertrees.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;
int checkx[1005][1005];
int f[1005];
int find(int x)
{
	if(f[x] == x)
	{
		return x;
	}
	return f[x] = find(f[x]);
}
int construct(std::vector<std::vector <int> > p) {
	int n = p[0].size();
	for(int i=0;i<n;i++)
	{
		f[i] = i;
	}
	bool flag = 1;
	bool flagk = 1;
	bool flagy = 1;
	bool flagall = 1;
	vector <vector<int> > ans;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(p[i][j] == 3)
			{
				return 0;
			}
			if(p[i][j]!=1)
			{
				flag = 0; 
			}
			if(p[i][j] !=0&&p[i][j]!=1)
			{
				flagk = 0;
			}
			if(p[i][j]!=0 &&p[i][j]!=2)
			{
				if(i==j)continue;
				flagy = 0;
			}
			if(p[i][j]!=0&&p[i][j]!=1&&p[i][j]!=2)
			{
				flagall = 0;
				
			}
		}
	}
	if(flag == 1) //that means all distance is 1;
	{
		for(int i=0;i<p[0].size()-1;i++)
		{
			checkx[i][i+1] = true;
			checkx[i+1][i] = true;	
		}
	}
	else
	{
		if(flagk == 1)//that means all distance is 0 or 1;
		{
			for(int i=0;i<n;i++)
			{
				for(int j=i+1;j<n;j++)
				{
					if(find(i)!=find(j))
					{
						if(p[i][j] == 1)
						{
							int xx = find(i);
							for(int kk=0;kk<n;kk++)
							{
								if(find(kk) == xx) //that means they are in the same group
								{
									if(p[xx][j]==0) //that means they can't go to each other,however their father can go to each other.it can't be implented 
									{
										return 0;
										break;
									}
								}
							}
							//if it hasn't return,that means it can be implented.
							checkx[i][j] = true;
							checkx[j][i] = true;	
							//and we should add the j in the same group;
							f[find(j)] = find(i);
						}
						else
						{
							continue;
						}
					}
					else//that means they are in the same set.
					{
						if(p[i][j] == 1)
						{
							continue;
						} 
						else
						{
							if(p[i][j] == 0)
							{
								return 0;
								break;
							}
						}
					}	
				}
			}
		}
		else
		{
			if(flagy == 1)//that means the distance are all 0 or 2; 
			{
				for(int i=0;i<n;i++)
				{
					for(int j=i+1;j<n;j++)
					{
						if(find(i)!=find(j))
						{
							if(p[i][j] == 0)continue;
							else//they have the way to go each other.
							{
								for(int kk=0;kk<n;kk++)
								{
									if(find(kk) == find(i))
									{
										if(p[kk][j] == 0)
										{
											return 0;
											break;
										}	
									}
								
								}
							}
							f[find(j)] = find(i);
						}
						else //they means they have same father
						{
							if(p[i][j] == 0) //it is impossible
							{
								return 0;
								break;
							}
						}
					}
				}
				
				vector<int> nod[1005];
				for(int i=0;i<n;i++)
				{
					int xx = find(i);
					nod[xx].push_back(i);
				}
				for(int i=0;i<n;i++)
				{
					if(nod[i].size()!=0)
					{
						if(nod[i].size()==2)
						{
							return 0;
							break;
						}
						else
						{
							for(int j=0;j<nod[i].size()-1;j++)
							{
								int xx = nod[i][j];
								int yy = nod[i][j+1];
							
								checkx[xx][yy]= true;
								checkx[yy][xx] = true;
							}
							int m = nod[i].size();
							int xx = nod[i][m-1];
							int yy = nod[i][0];
							checkx[xx][yy] = true;
							checkx[yy][xx] = true;
						}
					}
				}
			}
			else //that means they are all 0,1,2;
			{
				if(flagall == 1)
				{
					for(int i=0;i<n;i++)
					{
						for(int j=i+1;j<n;j++)
						{
							if(find(i)!=find(j))
							{
								if(p[i][j] == 0)continue;
								//that means they are some ways to go.
								for(int kk=0;kk<n;kk++)
								{
									if(find(kk) == find(i)) //that means they are in the same group
									{
										if(p[kk][j] == 0)
										{
											return 0;
											break;
										}
									}
								}
								f[find(j)] = find(i);
							}
							else //that means they are in the same group
							{
								if(p[i][j] == 0) //that means they are in the same group,but no ways to go to each other
								{
									return 0;
									break;
								} 	
							}
						}
					}
					//and we can know the different kinds of node.
					vector<int> nod[1005];
					for(int i=0;i<n;i++)
					{
						int xx = find(i);
						nod[xx].push_back(i);
					}
					//reset the merge and query set.
					for(int i=0;i<n;i++)
					{
						f[i] = i;
					}
					vector<int> edge[1005]; 
					
					for(int i=0;i<n;i++)
					{
						for(int j=0;j<n;j++)
						{
							edge[j].clear();
						}
						if(nod[i].size() == 0||nod[i].size()==1)continue;
						for(int j=0;j<nod[i].size();j++)
						{
							int xx = nod[i][j];
							edge[xx].push_back(xx);
						}
						for(int j=0;j<nod[i].size();j++)
						{
							for(int k=j+1;k<nod[i].size();k++)
							{
								int jj = nod[i][j];
								int kk = nod[i][k];
								if(p[jj][kk] == 0)continue;
								else
								{
									if(find(jj) !=find(kk)) //that means they are not in the same edge.
									{
										if(p[jj][kk] == 1)
										{
											int temp = find(jj);
											for(int pp=0;pp<edge[temp].size();pp++)
											{
												int pp2 = edge[temp][pp];
												if(p[pp2][kk] == 2)return 0;
											}
											edge[temp].push_back(kk);
											edge[kk].pop_back();
											checkx[jj][kk] = true;
											checkx[kk][jj] = true;
											f[find(kk)] = find(jj);
										}
										else//that means p[j][k] = 2
										{
											int temp = find(jj);
											for(int pp=0;pp<edge[temp].size();pp++)
											{
												int pp2 = edge[temp][pp];
												if(p[pp2][kk] == 1) //if only one ways;
												{
													return 0;
												}
											}
										}
									}
										
								}
							}
						}
						vector<int> pq;
						//and, we have finished disclpined all of the edge. 
						pq.clear();
						for(int j=0;j<n;j++)
						{
							if(edge[j].size()!=0)//it is for this set.
							{
								pq.push_back(edge[j][0]);
							}
						}
						if(pq.size()==2)//that means the count of edge is 2
						{
							vector<int> x1;
							for(int j=0;j<n;j++)
							{
								if(edge[j].size()!=0)
								{
									x1.push_back(j);
								}
							}
							int k1 = x1[0];
							int k2 = x1[1];
							for(int j=0;j<edge[k1].size();j++)
							{
								for(int k=0;k<edge[k2].size();k++)
								{
									int fst = edge[k1][j];
									int sd = edge[k2][k];
									if(p[fst][sd] == 2)
									{
										return 0;
									}
								}
							}
						}
						
						for(int j=0;j<pq.size()-1;j++)
						{
							int fst = pq[j];
							int sd = pq[j+1];
							checkx[fst][sd] = true;
							checkx[sd][fst] = true;
						}
						int m = pq.size();
						int fst = pq[0];
						int sd = pq[m-1];
						checkx[fst][sd] = true;
						checkx[sd][fst] = true;
						
						
					}
				}
			}
			
		}
	}
		for(int i=0;i<p[0].size();i++)
		{
			vector<int> v;
			for(int j=0;j<p[0].size();j++)
			{
				if(i==j)
				{
					v.push_back(0);
				}
				else
				{
					if(checkx[i][j] == true)
					{
						v.push_back(1);
					}
					else
					{
						v.push_back(0);
					}
				}
			}
				ans.push_back(v);		
		}

	build(ans);
	return 1;
}

Compilation message

supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:56:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   56 |   for(int i=0;i<p[0].size()-1;i++)
      |               ~^~~~~~~~~~~~~~
supertrees.cpp:171:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  171 |        for(int j=0;j<nod[i].size()-1;j++)
      |                    ~^~~~~~~~~~~~~~~~
supertrees.cpp:244:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  244 |       for(int j=0;j<nod[i].size();j++)
      |                   ~^~~~~~~~~~~~~~
supertrees.cpp:249:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  249 |       for(int j=0;j<nod[i].size();j++)
      |                   ~^~~~~~~~~~~~~~
supertrees.cpp:251:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  251 |        for(int k=j+1;k<nod[i].size();k++)
      |                      ~^~~~~~~~~~~~~~
supertrees.cpp:263:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  263 |            for(int pp=0;pp<edge[temp].size();pp++)
      |                         ~~^~~~~~~~~~~~~~~~~~
supertrees.cpp:277:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  277 |            for(int pp=0;pp<edge[temp].size();pp++)
      |                         ~~^~~~~~~~~~~~~~~~~~
supertrees.cpp:313:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  313 |        for(int j=0;j<edge[k1].size();j++)
      |                    ~^~~~~~~~~~~~~~~~
supertrees.cpp:315:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  315 |         for(int k=0;k<edge[k2].size();k++)
      |                     ~^~~~~~~~~~~~~~~~
supertrees.cpp:327:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  327 |       for(int j=0;j<pq.size()-1;j++)
      |                   ~^~~~~~~~~~~~
supertrees.cpp:347:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  347 |   for(int i=0;i<p[0].size();i++)
      |               ~^~~~~~~~~~~~
supertrees.cpp:350:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  350 |    for(int j=0;j<p[0].size();j++)
      |                ~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 12 ms 2004 KB Output is correct
7 Correct 169 ms 26500 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 12 ms 2004 KB Output is correct
7 Correct 169 ms 26500 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 312 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 11 ms 1292 KB Output is correct
13 Correct 190 ms 22616 KB Output is correct
14 Correct 1 ms 312 KB Output is correct
15 Correct 1 ms 308 KB Output is correct
16 Correct 5 ms 1108 KB Output is correct
17 Correct 90 ms 10712 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 46 ms 8064 KB Output is correct
21 Correct 201 ms 26444 KB Output is correct
22 Correct 182 ms 26012 KB Output is correct
23 Correct 224 ms 26620 KB Output is correct
24 Correct 176 ms 22772 KB Output is correct
25 Correct 97 ms 12648 KB Output is correct
26 Correct 80 ms 10912 KB Output is correct
27 Correct 205 ms 26520 KB Output is correct
28 Correct 181 ms 22800 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 8 ms 1304 KB Output is correct
9 Correct 173 ms 22608 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 10 ms 2004 KB Output is correct
13 Correct 187 ms 26280 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 5 ms 724 KB Output is correct
17 Correct 85 ms 8464 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 48 ms 8056 KB Output is correct
22 Correct 184 ms 26308 KB Output is correct
23 Correct 185 ms 26256 KB Output is correct
24 Correct 204 ms 26308 KB Output is correct
25 Correct 88 ms 10784 KB Output is correct
26 Correct 111 ms 8500 KB Output is correct
27 Correct 196 ms 26256 KB Output is correct
28 Correct 195 ms 26316 KB Output is correct
29 Correct 75 ms 10700 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 49 ms 7828 KB Output is correct
5 Correct 207 ms 26216 KB Output is correct
6 Correct 207 ms 25656 KB Output is correct
7 Correct 230 ms 26164 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 60 ms 8016 KB Output is correct
10 Correct 182 ms 26276 KB Output is correct
11 Correct 182 ms 26260 KB Output is correct
12 Correct 194 ms 26268 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 308 KB Output is correct
15 Correct 0 ms 340 KB Output is correct
16 Correct 47 ms 7580 KB Output is correct
17 Correct 184 ms 26200 KB Output is correct
18 Correct 191 ms 25880 KB Output is correct
19 Correct 221 ms 25808 KB Output is correct
20 Correct 175 ms 22440 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 12 ms 2004 KB Output is correct
7 Correct 169 ms 26500 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 312 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 11 ms 1292 KB Output is correct
13 Correct 190 ms 22616 KB Output is correct
14 Correct 1 ms 312 KB Output is correct
15 Correct 1 ms 308 KB Output is correct
16 Correct 5 ms 1108 KB Output is correct
17 Correct 90 ms 10712 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 46 ms 8064 KB Output is correct
21 Correct 201 ms 26444 KB Output is correct
22 Correct 182 ms 26012 KB Output is correct
23 Correct 224 ms 26620 KB Output is correct
24 Correct 176 ms 22772 KB Output is correct
25 Correct 97 ms 12648 KB Output is correct
26 Correct 80 ms 10912 KB Output is correct
27 Correct 205 ms 26520 KB Output is correct
28 Correct 181 ms 22800 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 8 ms 1304 KB Output is correct
37 Correct 173 ms 22608 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 10 ms 2004 KB Output is correct
41 Correct 187 ms 26280 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 0 ms 340 KB Output is correct
44 Correct 5 ms 724 KB Output is correct
45 Correct 85 ms 8464 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 1 ms 340 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 48 ms 8056 KB Output is correct
50 Correct 184 ms 26308 KB Output is correct
51 Correct 185 ms 26256 KB Output is correct
52 Correct 204 ms 26308 KB Output is correct
53 Correct 88 ms 10784 KB Output is correct
54 Correct 111 ms 8500 KB Output is correct
55 Correct 196 ms 26256 KB Output is correct
56 Correct 195 ms 26316 KB Output is correct
57 Correct 75 ms 10700 KB Output is correct
58 Correct 0 ms 340 KB Output is correct
59 Correct 0 ms 340 KB Output is correct
60 Correct 4 ms 596 KB Output is correct
61 Correct 79 ms 8220 KB Output is correct
62 Correct 0 ms 340 KB Output is correct
63 Correct 1 ms 340 KB Output is correct
64 Correct 0 ms 340 KB Output is correct
65 Correct 48 ms 7628 KB Output is correct
66 Correct 101 ms 8368 KB Output is correct
67 Correct 82 ms 8336 KB Output is correct
68 Correct 88 ms 8244 KB Output is correct
69 Correct 76 ms 8364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 12 ms 2004 KB Output is correct
7 Correct 169 ms 26500 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 312 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 11 ms 1292 KB Output is correct
13 Correct 190 ms 22616 KB Output is correct
14 Correct 1 ms 312 KB Output is correct
15 Correct 1 ms 308 KB Output is correct
16 Correct 5 ms 1108 KB Output is correct
17 Correct 90 ms 10712 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 46 ms 8064 KB Output is correct
21 Correct 201 ms 26444 KB Output is correct
22 Correct 182 ms 26012 KB Output is correct
23 Correct 224 ms 26620 KB Output is correct
24 Correct 176 ms 22772 KB Output is correct
25 Correct 97 ms 12648 KB Output is correct
26 Correct 80 ms 10912 KB Output is correct
27 Correct 205 ms 26520 KB Output is correct
28 Correct 181 ms 22800 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 340 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 1 ms 340 KB Output is correct
36 Correct 8 ms 1304 KB Output is correct
37 Correct 173 ms 22608 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 10 ms 2004 KB Output is correct
41 Correct 187 ms 26280 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 0 ms 340 KB Output is correct
44 Correct 5 ms 724 KB Output is correct
45 Correct 85 ms 8464 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 1 ms 340 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 48 ms 8056 KB Output is correct
50 Correct 184 ms 26308 KB Output is correct
51 Correct 185 ms 26256 KB Output is correct
52 Correct 204 ms 26308 KB Output is correct
53 Correct 88 ms 10784 KB Output is correct
54 Correct 111 ms 8500 KB Output is correct
55 Correct 196 ms 26256 KB Output is correct
56 Correct 195 ms 26316 KB Output is correct
57 Correct 75 ms 10700 KB Output is correct
58 Correct 0 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 0 ms 340 KB Output is correct
61 Correct 49 ms 7828 KB Output is correct
62 Correct 207 ms 26216 KB Output is correct
63 Correct 207 ms 25656 KB Output is correct
64 Correct 230 ms 26164 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
66 Correct 60 ms 8016 KB Output is correct
67 Correct 182 ms 26276 KB Output is correct
68 Correct 182 ms 26260 KB Output is correct
69 Correct 194 ms 26268 KB Output is correct
70 Correct 1 ms 340 KB Output is correct
71 Correct 1 ms 308 KB Output is correct
72 Correct 0 ms 340 KB Output is correct
73 Correct 47 ms 7580 KB Output is correct
74 Correct 184 ms 26200 KB Output is correct
75 Correct 191 ms 25880 KB Output is correct
76 Correct 221 ms 25808 KB Output is correct
77 Correct 175 ms 22440 KB Output is correct
78 Correct 0 ms 340 KB Output is correct
79 Correct 0 ms 340 KB Output is correct
80 Correct 4 ms 596 KB Output is correct
81 Correct 79 ms 8220 KB Output is correct
82 Correct 0 ms 340 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 0 ms 340 KB Output is correct
85 Correct 48 ms 7628 KB Output is correct
86 Correct 101 ms 8368 KB Output is correct
87 Correct 82 ms 8336 KB Output is correct
88 Correct 88 ms 8244 KB Output is correct
89 Correct 76 ms 8364 KB Output is correct
90 Correct 0 ms 340 KB Output is correct
91 Correct 0 ms 340 KB Output is correct
92 Correct 3 ms 596 KB Output is correct
93 Correct 69 ms 8340 KB Output is correct
94 Correct 0 ms 340 KB Output is correct
95 Correct 0 ms 340 KB Output is correct
96 Correct 0 ms 340 KB Output is correct
97 Correct 19 ms 2336 KB Output is correct
98 Correct 74 ms 8268 KB Output is correct
99 Correct 67 ms 8252 KB Output is correct
100 Correct 71 ms 8332 KB Output is correct
101 Correct 67 ms 8268 KB Output is correct
102 Correct 66 ms 8336 KB Output is correct
103 Correct 65 ms 8340 KB Output is correct
104 Correct 62 ms 8336 KB Output is correct
105 Correct 71 ms 8272 KB Output is correct