Submission #590115

# Submission time Handle Problem Language Result Execution time Memory
590115 2022-07-05T14:28:23 Z LIF Connecting Supertrees (IOI20_supertrees) C++14
100 / 100
231 ms 27908 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 1 ms 340 KB Output is correct
2 Correct 0 ms 312 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 2060 KB Output is correct
7 Correct 192 ms 26260 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 312 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 2060 KB Output is correct
7 Correct 192 ms 26260 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 308 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 9 ms 1220 KB Output is correct
13 Correct 190 ms 22384 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 4 ms 1108 KB Output is correct
17 Correct 93 ms 10532 KB Output is correct
18 Correct 1 ms 316 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 49 ms 7884 KB Output is correct
21 Correct 209 ms 26176 KB Output is correct
22 Correct 197 ms 25792 KB Output is correct
23 Correct 224 ms 26256 KB Output is correct
24 Correct 184 ms 22588 KB Output is correct
25 Correct 84 ms 12312 KB Output is correct
26 Correct 75 ms 10580 KB Output is correct
27 Correct 197 ms 26312 KB Output is correct
28 Correct 204 ms 22536 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 312 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 1236 KB Output is correct
9 Correct 185 ms 22348 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 9 ms 2004 KB Output is correct
13 Correct 214 ms 26400 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 4 ms 724 KB Output is correct
17 Correct 94 ms 8456 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 48 ms 7960 KB Output is correct
22 Correct 223 ms 26208 KB Output is correct
23 Correct 209 ms 26156 KB Output is correct
24 Correct 220 ms 26292 KB Output is correct
25 Correct 81 ms 10732 KB Output is correct
26 Correct 85 ms 8492 KB Output is correct
27 Correct 202 ms 26152 KB Output is correct
28 Correct 213 ms 26248 KB Output is correct
29 Correct 79 ms 10764 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 49 ms 7900 KB Output is correct
5 Correct 212 ms 26276 KB Output is correct
6 Correct 192 ms 25724 KB Output is correct
7 Correct 212 ms 26240 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 49 ms 8032 KB Output is correct
10 Correct 188 ms 26288 KB Output is correct
11 Correct 205 ms 26232 KB Output is correct
12 Correct 219 ms 26376 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 52 ms 8128 KB Output is correct
17 Correct 201 ms 27908 KB Output is correct
18 Correct 231 ms 27648 KB Output is correct
19 Correct 204 ms 27652 KB Output is correct
20 Correct 178 ms 24220 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 312 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 2060 KB Output is correct
7 Correct 192 ms 26260 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 308 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 9 ms 1220 KB Output is correct
13 Correct 190 ms 22384 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 4 ms 1108 KB Output is correct
17 Correct 93 ms 10532 KB Output is correct
18 Correct 1 ms 316 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 49 ms 7884 KB Output is correct
21 Correct 209 ms 26176 KB Output is correct
22 Correct 197 ms 25792 KB Output is correct
23 Correct 224 ms 26256 KB Output is correct
24 Correct 184 ms 22588 KB Output is correct
25 Correct 84 ms 12312 KB Output is correct
26 Correct 75 ms 10580 KB Output is correct
27 Correct 197 ms 26312 KB Output is correct
28 Correct 204 ms 22536 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 312 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 1236 KB Output is correct
37 Correct 185 ms 22348 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 9 ms 2004 KB Output is correct
41 Correct 214 ms 26400 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 4 ms 724 KB Output is correct
45 Correct 94 ms 8456 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 0 ms 340 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 48 ms 7960 KB Output is correct
50 Correct 223 ms 26208 KB Output is correct
51 Correct 209 ms 26156 KB Output is correct
52 Correct 220 ms 26292 KB Output is correct
53 Correct 81 ms 10732 KB Output is correct
54 Correct 85 ms 8492 KB Output is correct
55 Correct 202 ms 26152 KB Output is correct
56 Correct 213 ms 26248 KB Output is correct
57 Correct 79 ms 10764 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 5 ms 724 KB Output is correct
61 Correct 88 ms 8612 KB Output is correct
62 Correct 1 ms 340 KB Output is correct
63 Correct 1 ms 308 KB Output is correct
64 Correct 1 ms 340 KB Output is correct
65 Correct 60 ms 8020 KB Output is correct
66 Correct 102 ms 10172 KB Output is correct
67 Correct 77 ms 10204 KB Output is correct
68 Correct 83 ms 10188 KB Output is correct
69 Correct 78 ms 10248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 0 ms 312 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 2060 KB Output is correct
7 Correct 192 ms 26260 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 308 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 9 ms 1220 KB Output is correct
13 Correct 190 ms 22384 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 4 ms 1108 KB Output is correct
17 Correct 93 ms 10532 KB Output is correct
18 Correct 1 ms 316 KB Output is correct
19 Correct 1 ms 340 KB Output is correct
20 Correct 49 ms 7884 KB Output is correct
21 Correct 209 ms 26176 KB Output is correct
22 Correct 197 ms 25792 KB Output is correct
23 Correct 224 ms 26256 KB Output is correct
24 Correct 184 ms 22588 KB Output is correct
25 Correct 84 ms 12312 KB Output is correct
26 Correct 75 ms 10580 KB Output is correct
27 Correct 197 ms 26312 KB Output is correct
28 Correct 204 ms 22536 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 312 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 1236 KB Output is correct
37 Correct 185 ms 22348 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 340 KB Output is correct
40 Correct 9 ms 2004 KB Output is correct
41 Correct 214 ms 26400 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 4 ms 724 KB Output is correct
45 Correct 94 ms 8456 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 0 ms 340 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 48 ms 7960 KB Output is correct
50 Correct 223 ms 26208 KB Output is correct
51 Correct 209 ms 26156 KB Output is correct
52 Correct 220 ms 26292 KB Output is correct
53 Correct 81 ms 10732 KB Output is correct
54 Correct 85 ms 8492 KB Output is correct
55 Correct 202 ms 26152 KB Output is correct
56 Correct 213 ms 26248 KB Output is correct
57 Correct 79 ms 10764 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 1 ms 340 KB Output is correct
61 Correct 49 ms 7900 KB Output is correct
62 Correct 212 ms 26276 KB Output is correct
63 Correct 192 ms 25724 KB Output is correct
64 Correct 212 ms 26240 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
66 Correct 49 ms 8032 KB Output is correct
67 Correct 188 ms 26288 KB Output is correct
68 Correct 205 ms 26232 KB Output is correct
69 Correct 219 ms 26376 KB Output is correct
70 Correct 1 ms 340 KB Output is correct
71 Correct 1 ms 340 KB Output is correct
72 Correct 1 ms 340 KB Output is correct
73 Correct 52 ms 8128 KB Output is correct
74 Correct 201 ms 27908 KB Output is correct
75 Correct 231 ms 27648 KB Output is correct
76 Correct 204 ms 27652 KB Output is correct
77 Correct 178 ms 24220 KB Output is correct
78 Correct 1 ms 340 KB Output is correct
79 Correct 1 ms 340 KB Output is correct
80 Correct 5 ms 724 KB Output is correct
81 Correct 88 ms 8612 KB Output is correct
82 Correct 1 ms 340 KB Output is correct
83 Correct 1 ms 308 KB Output is correct
84 Correct 1 ms 340 KB Output is correct
85 Correct 60 ms 8020 KB Output is correct
86 Correct 102 ms 10172 KB Output is correct
87 Correct 77 ms 10204 KB Output is correct
88 Correct 83 ms 10188 KB Output is correct
89 Correct 78 ms 10248 KB Output is correct
90 Correct 1 ms 340 KB Output is correct
91 Correct 1 ms 340 KB Output is correct
92 Correct 4 ms 724 KB Output is correct
93 Correct 112 ms 10112 KB Output is correct
94 Correct 1 ms 416 KB Output is correct
95 Correct 1 ms 320 KB Output is correct
96 Correct 0 ms 340 KB Output is correct
97 Correct 19 ms 2764 KB Output is correct
98 Correct 70 ms 10124 KB Output is correct
99 Correct 70 ms 10112 KB Output is correct
100 Correct 75 ms 10120 KB Output is correct
101 Correct 74 ms 10124 KB Output is correct
102 Correct 85 ms 10116 KB Output is correct
103 Correct 82 ms 10112 KB Output is correct
104 Correct 83 ms 10120 KB Output is correct
105 Correct 82 ms 10120 KB Output is correct