796 - Critical Links

All about problems in Volume 7. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

shtorm941
New poster
Posts: 7
Joined: Sat Mar 10, 2012 5:46 pm

Re: 796. Critical links.(WA on Java) please, help!

Post by shtorm941 » Mon Jul 23, 2012 2:33 am

brianfry713 wrote:1. Print a blank line after every test cases - including the last one.
Thanks, it helped me.

Mukit Chowdhury
Learning poster
Posts: 98
Joined: Fri Aug 17, 2012 9:23 pm
Location: Dhaka
Contact:

Re: Correction Please.... :)

Post by Mukit Chowdhury » Sat Nov 17, 2012 10:08 pm

fernando wrote:Maybe this input is useful for those geting WA:

Code: Select all

2
0 (1) 1
1 (1) 0

20
0 (1) 1
1 (4) 0 2 4 5
2 (4) 1 5 6 10
3 (1) 4
4 (4) 1 3 5 8
5 (6) 1 2 4 8 9 10
6 (3) 2 10 13
7 (1) 8
8 (4) 4 5 7 9
9 (3) 5 8 10
10 (4) 2 5 9 6
11 (3) 12 13 17
12 (3) 11 14 15
13 (5) 6 11 14 17 18
14 (4) 12 13 15 18
15 (4) 12 14 16 18
16 (1) 15
17 (3) 11 13 19
18 (3) 13 14 15
19 (1) 17

19
0 (2) 1 2
1 (2) 0 3
2 (2) 0 3
3 (3) 1 2 4
4 (6) 5 6 3 10 7 8
5 (2) 4 6
6 (2) 5 4
7 (3) 9 8 4
8 (2) 4 7
9 (1) 7
10 (3) 11 12 4
11 (2) 10 13
12 (2) 10 13
13 (3) 11 12 14
14 (3) 13 15 16
15 (2) 14 16
16 (4) 14 15 17 18
17 (2) 16 18
18 (2) 16 17

7
0 (3) 1 2 4
1 (3) 0 2 3
2 (3) 1 0 3
3 (4) 0 1 2 4
4 (3) 3 6 5
5 (1) 4
6 (1) 4
And the AC output is

Code: Select all

1 critical links
0 - 1

6 critical links
0 - 1
3 - 4
6 - 13
7 - 8
15 - 16
17 - 19

4 critical links
3 - 4
4 - 10
7 - 9
13 - 14

3 critical links
3 - 4
4 - 5
4 - 6
For your last input

Code: Select all

7
0 (3) 1 2 4
1 (3) 0 2 3
2 (3) 1 0 3
3 (4) 0 1 2 4
4 (3) 3 6 5
5 (1) 4
6 (1) 4
output must be....

Code: Select all

2 critical links
4 - 5
4 - 6
3-4 can never be a critical link... because if we delete link 3-4,we can easily go to node 5 and 6 using 0-4... Hope the administrator will check it....

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 796 - Critical Links

Post by brianfry713 » Tue Nov 20, 2012 3:48 am

You are correct 3-4 is not a critical link in that test case.
Check input and AC output for thousands of problems on uDebug!

Mukit Chowdhury
Learning poster
Posts: 98
Joined: Fri Aug 17, 2012 9:23 pm
Location: Dhaka
Contact:

Re: 796 - Critical Links

Post by Mukit Chowdhury » Tue Nov 20, 2012 12:03 pm

brianfry713 wrote:You are correct 3-4 is not a critical link in that test case.
Thanks brianfry713.... :)

TheSavageKoder
New poster
Posts: 4
Joined: Sat Jan 26, 2013 9:57 pm

Re: 796 - Critical Links

Post by TheSavageKoder » Sat Jan 26, 2013 11:42 pm

Can someone help? I keep getting WA :/

Code: Select all

AC
Last edited by TheSavageKoder on Thu Jan 31, 2013 7:12 pm, edited 1 time in total.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 796 - Critical Links

Post by brianfry713 » Mon Jan 28, 2013 10:48 pm

For the sample input you're not printing the second output "0 critical links" on my system. Try changing your loop to
while(cin >> n)
Check input and AC output for thousands of problems on uDebug!

TheSavageKoder
New poster
Posts: 4
Joined: Sat Jan 26, 2013 9:57 pm

Re: 796 - Critical Links

Post by TheSavageKoder » Tue Jan 29, 2013 2:08 am

I apologize. Those were some last minute changes I made to the code because I was beginning to think it was mishandling input. I didn't realize I messed it up. However, I still get WA.

Code: Select all

AC
Last edited by TheSavageKoder on Thu Jan 31, 2013 7:12 pm, edited 1 time in total.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 796 - Critical Links

Post by brianfry713 » Tue Jan 29, 2013 11:05 pm

The output for the data set is followed by an empty line. You should also print a blank line after the last data set.
Check input and AC output for thousands of problems on uDebug!

TheSavageKoder
New poster
Posts: 4
Joined: Sat Jan 26, 2013 9:57 pm

Re: 796 - Critical Links

Post by TheSavageKoder » Wed Jan 30, 2013 3:15 pm

Still gets WA :/
Last edited by TheSavageKoder on Thu Jan 31, 2013 7:12 pm, edited 1 time in total.

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 796 - Critical Links

Post by brianfry713 » Wed Jan 30, 2013 9:23 pm

That won't work if the no_of_direct_connections is greater than 9.
Check input and AC output for thousands of problems on uDebug!

TheSavageKoder
New poster
Posts: 4
Joined: Sat Jan 26, 2013 9:57 pm

Re: 796 - Critical Links

Post by TheSavageKoder » Thu Jan 31, 2013 7:11 pm

:o :cry:
Thanks brianfry!

shikhar_at
New poster
Posts: 2
Joined: Sun May 27, 2012 7:37 pm

Re: 796 - Critical Links

Post by shikhar_at » Sun May 26, 2013 2:24 am

Code: Select all

#include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<algorithm>
#include<cstring>
#include<map>
#include<sstream>
#define U unsigned long long int
#define L long long int
#define INF 12345678
#define NIL -1
#define LIM 1000

using namespace std;

int at[LIM],dbe[LIM],t,visit[LIM],parent[LIM],arr[LIM][LIM];
vector<int> v[LIM];
vector<int> n1;
vector< pair<int,int> > p;

void dfs(int u)
{
	visit[u]=1;
	at[u]=dbe[u]=t++;
		for(int i=0;i<v[u].size();i++)
		{
			if(!visit[v[u].at(i)])
			{
				parent[v[u].at(i)]=u;
				dfs(v[u].at(i));
				dbe[u]=min(dbe[u],dbe[v[u].at(i)]);
				if(dbe[v[u].at(i)] > at[u])
				{
					p.push_back(make_pair(u,v[u].at(i)));
					n1.push_back(u);
				}
			}
			else if(v[u].at(i)!=parent[u])
			{
				dbe[u]=min(dbe[u],at[v[u].at(i)]);
			}	
		}
		return;	
}

int main()
{
	int n;
	while(cin>>n)
	{
		n1.clear();
		p.clear();
		if(n==0)printf("0 critical links\n");
		else
		{
		memset(arr,0,sizeof(arr));
		for(int i=0;i<n;i++)
		{
			visit[i]=0;
			parent[i]=NIL;
			v[i].clear();
		}
		t=0;
		for(int i=0;i<n;i++)
		{
			int a,b;
			scanf("%d (%d)",&a, &b);
			//cout<<ch<<a<<"#"<<b<<endl;
			for(int j=0;j<b;j++)
			{
				int d;
				scanf("%d", &d);
				arr[a][d]=1;
				arr[d][a]=1;
			}
			
		}
		for(int i=0;i<n;i++)
		{
			for(int j=0;j<n;j++)
			{
				if(arr[i][j])
				{
					v[i].push_back(j);
				}
			}
		}
		for(int i=0;i<n;i++)
		{
			if(!visit[i])dfs(i);
		}
			printf("%d critical links\n",n1.size());
			sort(p.begin(),p.end());
			for(int i=0;i<p.size();i++)
			{
			    int x=p.at(i).first,y=p.at(i).second;
			    if(x>y)
			    {
			    	printf("%d - %d\n",y,x);
			    }
			    else
			    printf("%d - %d\n",x,y);
			}
		}
		cout<<endl;
	}
}
can someone plz tell what is the problem with my code...i hav already tried it many times...still WA...plz help

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 796 - Critical Links

Post by brianfry713 » Thu May 30, 2013 2:44 am

Input:

Code: Select all

14
0 (9) 2 3 5 7 8 10 11 12 13
1 (9) 2 3 7 8 9 10 11 12 13
2 (8) 0 1 3 4 6 9 10 12
3 (7) 0 1 2 5 6 10 12
4 (4) 2 6 11 13
5 (4) 0 3 7 10
6 (7) 2 3 4 7 10 12 13
7 (9) 0 1 5 6 8 9 10 12 13
8 (5) 0 1 7 9 12
9 (8) 1 2 7 8 10 11 12 13
10 (9) 0 1 2 3 5 6 7 9 12
11 (5) 0 1 4 9 13
12 (10) 0 1 2 3 6 7 8 9 10 13
13 (8) 0 1 4 6 7 9 11 12

16
0 (6) 1 3 6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
3 (6) 0 1 5 6 8 13
4 (9) 0 1 2 5 6 7 9 12 13
5 (10) 0 1 2 3 4 6 7 9 11 13
6 (9) 0 2 3 4 5 7 8 9 10
7 (9) 0 2 4 5 6 9 10 12 13
8 (6) 2 3 6 9 10 13
9 (9) 0 1 4 5 6 7 8 10 12
10 (9) 0 2 6 7 8 9 11 12 13
11 (4) 0 2 5 10
12 (6) 1 4 7 9 10 13
13 (9) 0 1 3 4 5 7 8 10 12

1
0 (0)

0

18
0 (6) 3 9 10 12 14 17
1 (6) 2 3 4 6 8 11
2 (6) 1 7 9 13 14 16
3 (12) 0 1 4 5 6 9 10 11 13 14 16 17
4 (12) 1 3 6 7 8 9 10 12 13 15 16 17
5 (7) 3 8 10 12 13 16 17
6 (7) 1 3 4 11 13 15 17
7 (7) 2 4 8 13 14 16 17
8 (10) 1 4 5 7 9 10 11 12 15 17
9 (11) 0 2 3 4 8 10 11 12 13 14 16
10 (9) 0 3 4 5 8 9 12 14 17
11 (9) 1 3 6 8 9 13 15 16 17
12 (8) 0 4 5 8 9 10 13 17
13 (10) 2 3 4 5 6 7 9 11 12 17
14 (7) 0 2 3 7 9 10 16
15 (6) 4 6 8 11 16 17
16 (10) 2 3 4 5 7 9 11 14 15 17
17 (13) 0 3 4 5 6 7 8 10 11 12 13 15 16

12
0 (5) 4 7 8 9 10
1 (4) 3 4 5 7
2 (4) 5 8 10 11
3 (5) 1 5 6 8 9
4 (4) 0 1 10 11
5 (7) 1 2 3 6 7 9 10
6 (5) 3 5 8 9 10
7 (5) 0 1 5 8 9
8 (6) 0 2 3 6 7 11
9 (6) 0 3 5 6 7 10
10 (6) 0 2 4 5 6 9
11 (3) 2 4 8

6
0 (5) 1 2 3 4 5
1 (4) 0 2 3 5
2 (4) 0 1 4 5
3 (2) 0 1
4 (2) 0 2
5 (3) 0 1 2

4
0 (3) 1 2 3
1 (2) 0 2
2 (2) 0 1
3 (1) 0

19
0 (9) 3 4 5 9 10 11 15 17 18
1 (11) 2 3 4 5 6 7 10 13 14 17 18
2 (9) 1 3 4 5 6 12 13 17 18
3 (7) 0 1 2 7 8 11 17
4 (10) 0 1 2 5 7 8 11 15 16 17
5 (10) 0 1 2 4 9 10 11 13 15 18
6 (5) 1 2 9 11 12
7 (7) 1 3 4 11 12 17 18
8 (9) 3 4 9 10 12 15 16 17 18
9 (10) 0 5 6 8 11 12 14 15 17 18
10 (7) 0 1 5 8 15 16 18
11 (10) 0 3 4 5 6 7 9 12 17 18
12 (11) 2 6 7 8 9 11 13 14 15 16 17
13 (7) 1 2 5 12 15 17 18
14 (7) 1 9 12 15 16 17 18
15 (10) 0 4 5 8 9 10 12 13 14 18
16 (5) 4 8 10 12 14
17 (12) 0 1 2 3 4 7 8 9 11 12 13 14
18 (12) 0 1 2 5 7 8 9 10 11 13 14 15

0

17
0 (7) 2 3 6 8 9 10 14
1 (9) 2 4 6 7 8 9 10 13 14
2 (11) 0 1 3 4 6 7 8 9 12 13 15
3 (13) 0 2 4 5 6 7 8 9 12 13 14 15 16
4 (10) 1 2 3 7 8 9 10 11 12 16
5 (8) 3 6 7 9 10 14 15 16
6 (12) 0 1 2 3 5 8 9 10 11 13 15 16
7 (10) 1 2 3 4 5 10 11 12 14 15
8 (7) 0 1 2 3 4 6 14
9 (11) 0 1 2 3 4 5 6 10 11 13 15
10 (10) 0 1 4 5 6 7 9 11 13 15
11 (7) 4 6 7 9 10 13 15
12 (7) 2 3 4 7 13 14 15
13 (10) 1 2 3 6 9 10 11 12 14 16
14 (9) 0 1 3 5 7 8 12 13 15
15 (11) 2 3 5 6 7 9 10 11 12 14 16
16 (6) 3 4 5 6 13 15

16
0 (7) 1 2 5 6 8 9 11
1 (10) 0 3 5 6 7 9 12 13 14 15
2 (8) 0 6 8 9 10 11 14 15
3 (6) 1 4 7 9 12 13
4 (4) 3 5 7 13
5 (10) 0 1 4 7 8 9 10 11 12 15
6 (7) 0 1 2 9 12 13 14
7 (7) 1 3 4 5 8 9 12
8 (8) 0 2 5 7 10 13 14 15
9 (10) 0 1 2 3 5 6 7 10 12 15
10 (8) 2 5 8 9 11 12 13 15
11 (6) 0 2 5 10 12 15
12 (9) 1 3 5 6 7 9 10 11 14
13 (7) 1 3 4 6 8 10 15
14 (6) 1 2 6 8 12 15
15 (9) 1 2 5 8 9 10 11 13 14

1
0 (0)

13
0 (7) 1 2 3 4 8 9 12
1 (8) 0 2 6 7 8 9 10 11
2 (7) 0 1 3 6 7 8 11
3 (7) 0 2 4 8 9 10 11
4 (6) 0 3 5 8 10 12
5 (2) 4 7
6 (4) 1 2 8 12
7 (6) 1 2 5 9 10 12
8 (7) 0 1 2 3 4 6 11
9 (4) 0 1 3 7
10 (5) 1 3 4 7 12
11 (5) 1 2 3 8 12
12 (6) 0 4 6 7 10 11

3
0 (0)
1 (0)
2 (0)

13
0 (7) 1 4 5 7 8 10 12
1 (7) 0 3 4 7 8 10 11
2 (6) 3 5 6 9 11 12
3 (5) 1 2 8 9 12
4 (8) 0 1 5 6 7 8 9 10
5 (9) 0 2 4 6 8 9 10 11 12
6 (5) 2 4 5 9 10
7 (5) 0 1 4 8 11
8 (7) 0 1 3 4 5 7 10
9 (6) 2 3 4 5 6 12
10 (8) 0 1 4 5 6 8 11 12
11 (5) 1 2 5 7 10
12 (6) 0 2 3 5 9 10

8
0 (6) 1 3 4 5 6 7
1 (6) 0 2 4 5 6 7
2 (5) 1 3 4 6 7
3 (5) 0 2 4 5 6
4 (6) 0 1 2 3 5 7
5 (6) 0 1 3 4 6 7
6 (5) 0 1 2 3 5
7 (5) 0 1 2 4 5

16
0 (6) 2 6 8 10 11 15
1 (6) 2 3 4 6 8 10
2 (6) 0 1 6 12 14 15
3 (7) 1 5 6 7 9 13 14
4 (5) 1 7 10 13 15
5 (7) 3 6 8 10 11 12 15
6 (11) 0 1 2 3 5 8 9 10 13 14 15
7 (9) 3 4 8 9 10 12 13 14 15
8 (8) 0 1 5 6 7 11 12 14
9 (8) 3 6 7 11 12 13 14 15
10 (8) 0 1 4 5 6 7 12 13
11 (6) 0 5 8 9 12 14
12 (10) 2 5 7 8 9 10 11 13 14 15
13 (9) 3 4 6 7 9 10 12 14 15
14 (9) 2 3 6 7 8 9 11 12 13
15 (9) 0 2 4 5 6 7 9 12 13

6
0 (4) 1 2 4 5
1 (4) 0 2 3 5
2 (5) 0 1 3 4 5
3 (4) 1 2 4 5
4 (3) 0 2 3
5 (4) 0 1 2 3

1
0 (0)

10
0 (6) 1 2 3 5 8 9
1 (6) 0 2 4 5 8 9
2 (4) 0 1 3 6
3 (7) 0 2 5 6 7 8 9
4 (4) 1 5 6 9
5 (6) 0 1 3 4 7 9
6 (5) 2 3 4 8 9
7 (4) 3 5 8 9
8 (6) 0 1 3 6 7 9
9 (8) 0 1 3 4 5 6 7 8

17
0 (7) 3 5 8 13 14 15 16
1 (7) 3 4 6 10 11 12 15
2 (11) 4 5 8 9 10 11 12 13 14 15 16
3 (10) 0 1 6 8 9 10 12 14 15 16
4 (7) 1 2 5 6 8 14 15
5 (9) 0 2 4 6 7 8 12 15 16
6 (8) 1 3 4 5 7 9 10 16
7 (7) 5 6 9 10 14 15 16
8 (8) 0 2 3 4 5 9 13 15
9 (9) 2 3 6 7 8 11 12 15 16
10 (7) 1 2 3 6 7 11 14
11 (7) 1 2 9 10 12 14 16
12 (8) 1 2 3 5 9 11 13 16
13 (6) 0 2 8 12 15 16
14 (8) 0 2 3 4 7 10 11 16
15 (10) 0 1 2 3 4 5 7 8 9 13
16 (11) 0 2 3 5 6 7 9 11 12 13 14

17
0 (12) 3 4 5 6 8 9 10 11 12 13 14 15
1 (8) 2 7 9 10 11 13 14 15
2 (10) 1 3 4 6 7 8 9 13 14 15
3 (7) 0 2 5 6 7 10 11
4 (8) 0 2 5 6 7 10 12 14
5 (8) 0 3 4 7 8 9 11 15
6 (8) 0 2 3 4 9 10 12 13
7 (7) 1 2 3 4 5 11 14
8 (8) 0 2 5 9 11 13 15 16
9 (8) 0 1 2 5 6 8 11 16
10 (7) 0 1 3 4 6 11 15
11 (10) 0 1 3 5 7 8 9 10 13 14
12 (6) 0 4 6 13 15 16
13 (9) 0 1 2 6 8 11 12 14 16
14 (7) 0 1 2 4 7 11 13
15 (8) 0 1 2 5 8 10 12 16
16 (5) 8 9 12 13 15

16
0 (8) 1 5 8 9 10 12 13 14
1 (8) 0 2 4 9 11 12 13 15
2 (8) 1 6 7 10 11 12 13 15
3 (4) 8 10 11 15
4 (8) 1 6 8 9 10 13 14 15
5 (6) 0 7 9 11 12 15
6 (5) 2 4 9 10 13
7 (8) 2 5 8 11 12 13 14 15
8 (7) 0 3 4 7 9 14 15
9 (8) 0 1 4 5 6 8 10 13
10 (9) 0 2 3 4 6 9 13 14 15
11 (8) 1 2 3 5 7 12 14 15
12 (7) 0 1 2 5 7 11 15
13 (9) 0 1 2 4 6 7 9 10 15
14 (6) 0 4 7 8 10 11
15 (11) 1 2 3 4 5 7 8 10 11 12 13

14
0 (6) 3 4 7 9 10 12
1 (3) 6 11 12
2 (5) 3 5 8 9 13
3 (9) 0 2 5 6 7 9 10 12 13
4 (7) 0 5 6 8 9 11 13
5 (9) 2 3 4 6 7 8 11 12 13
6 (6) 1 3 4 5 9 10
7 (7) 0 3 5 9 10 11 12
8 (5) 2 4 5 11 13
9 (8) 0 2 3 4 6 7 10 13
10 (7) 0 3 6 7 9 11 13
11 (6) 1 4 5 7 8 10
12 (6) 0 1 3 5 7 13
13 (8) 2 3 4 5 8 9 10 12

19
0 (8) 3 5 8 12 13 15 16 18
1 (9) 2 5 7 12 13 15 16 17 18
2 (7) 1 5 11 13 14 15 18
3 (7) 0 6 11 12 14 16 18
4 (5) 9 12 14 16 18
5 (10) 0 1 2 6 7 8 9 11 15 16
6 (10) 3 5 7 8 11 12 13 14 16 18
7 (8) 1 5 6 8 9 10 12 17
8 (10) 0 5 6 7 9 10 11 12 15 18
9 (7) 4 5 7 8 10 14 17
10 (8) 7 8 9 11 13 15 17 18
11 (8) 2 3 5 6 8 10 13 18
12 (9) 0 1 3 4 6 7 8 16 17
13 (7) 0 1 2 6 10 11 17
14 (7) 2 3 4 6 9 16 18
15 (9) 0 1 2 5 8 10 16 17 18
16 (10) 0 1 3 4 5 6 12 14 15 18
17 (7) 1 7 9 10 12 13 15
18 (12) 0 1 2 3 4 6 8 10 11 14 15 16

2
0 (0)
1 (0)

13
0 (3) 2 11 12
1 (6) 4 6 7 10 11 12
2 (7) 0 4 5 7 8 10 11
3 (7) 4 5 7 8 10 11 12
4 (6) 1 2 3 5 6 7
5 (6) 2 3 4 7 9 11
6 (4) 1 4 9 11
7 (6) 1 2 3 4 5 12
8 (5) 2 3 9 11 12
9 (3) 5 6 8
10 (4) 1 2 3 11
11 (8) 0 1 2 3 5 6 8 10
12 (5) 0 1 3 7 8

14
0 (2) 2 5
1 (4) 4 7 11 12
2 (7) 0 3 4 5 6 8 10
3 (2) 2 13
4 (9) 1 2 5 6 7 8 9 10 11
5 (5) 0 2 4 6 7
6 (6) 2 4 5 7 10 13
7 (7) 1 4 5 6 10 11 12
8 (5) 2 4 11 12 13
9 (2) 4 11
10 (7) 2 4 6 7 11 12 13
11 (7) 1 4 7 8 9 10 12
12 (6) 1 7 8 10 11 13
13 (5) 3 6 8 10 12

19
0 (7) 6 8 11 13 16 17 18
1 (9) 2 4 6 7 8 11 13 16 17
2 (8) 1 6 7 8 10 12 13 17
3 (9) 4 5 6 11 13 15 16 17 18
4 (10) 1 3 5 6 10 12 13 14 16 17
5 (11) 3 4 8 9 10 11 13 14 15 17 18
6 (10) 0 1 2 3 4 7 11 14 16 17
7 (7) 1 2 6 8 9 13 14
8 (9) 0 1 2 5 7 11 12 14 16
9 (6) 5 7 11 12 14 17
10 (7) 2 4 5 13 14 16 18
11 (8) 0 1 3 5 6 8 9 18
12 (6) 2 4 8 9 15 18
13 (9) 0 1 2 3 4 5 7 10 14
14 (10) 4 5 6 7 8 9 10 13 16 18
15 (6) 3 5 12 16 17 18
16 (9) 0 1 3 4 6 8 10 14 15
17 (10) 0 1 2 3 4 5 6 9 15 18
18 (9) 0 3 5 10 11 12 14 15 17

3
0 (1) 2
1 (1) 2
2 (2) 0 1

16
0 (9) 1 2 3 4 5 6 9 11 15
1 (8) 0 6 7 8 10 11 12 14
2 (8) 0 5 6 7 8 11 13 14
3 (9) 0 5 7 8 10 11 12 14 15
4 (7) 0 5 8 10 11 14 15
5 (8) 0 2 3 4 6 7 8 12
6 (8) 0 1 2 5 8 9 12 13
7 (7) 1 2 3 5 9 12 14
8 (10) 1 2 3 4 5 6 11 12 13 14
9 (8) 0 6 7 11 12 13 14 15
10 (7) 1 3 4 12 13 14 15
11 (8) 0 1 2 3 4 8 9 12
12 (10) 1 3 5 6 7 8 9 10 11 15
13 (6) 2 6 8 9 10 14
14 (9) 1 2 3 4 7 8 9 10 13
15 (6) 0 3 4 9 10 12

11
0 (5) 2 6 7 8 10
1 (5) 3 4 5 7 9
2 (8) 0 3 4 5 6 7 8 9
3 (3) 1 2 6
4 (5) 1 2 7 8 10
5 (3) 1 2 6
6 (6) 0 2 3 5 7 8
7 (7) 0 1 2 4 6 8 10
8 (6) 0 2 4 6 7 10
9 (2) 1 2
10 (4) 0 4 7 8

18
0 (8) 1 2 4 7 10 15 16 17
1 (10) 0 3 4 5 7 8 10 11 13 14
2 (10) 0 3 4 6 10 11 13 14 15 16
3 (10) 1 2 4 6 8 9 11 13 14 15
4 (11) 0 1 2 3 5 6 7 9 14 15 17
5 (6) 1 4 9 10 14 15
6 (9) 2 3 4 8 10 11 13 15 16
7 (7) 0 1 4 8 12 13 16
8 (6) 1 3 6 7 12 13
9 (8) 3 4 5 10 12 13 16 17
10 (10) 0 1 2 5 6 9 11 14 15 17
11 (7) 1 2 3 6 10 12 17
12 (5) 7 8 9 11 14
13 (9) 1 2 3 6 7 8 9 14 17
14 (9) 1 2 3 4 5 10 12 13 16
15 (8) 0 2 3 4 5 6 10 16
16 (7) 0 2 6 7 9 14 15
17 (6) 0 4 9 10 11 13

8
0 (6) 1 2 3 4 5 7
1 (3) 0 3 6
2 (3) 0 5 6
3 (5) 0 1 4 5 6
4 (3) 0 3 6
5 (5) 0 2 3 6 7
6 (5) 1 2 3 4 5
7 (2) 0 5

0

19
0 (11) 2 4 5 6 7 9 12 13 14 16 18
1 (7) 3 4 5 6 7 11 18
2 (8) 0 3 6 7 9 10 11 13
3 (11) 1 2 4 6 9 10 12 13 15 16 17
4 (10) 0 1 3 6 8 11 12 13 14 18
5 (9) 0 1 10 11 12 13 15 17 18
6 (12) 0 1 2 3 4 8 11 12 13 14 16 18
7 (12) 0 1 2 8 9 11 12 13 14 15 16 18
8 (6) 4 6 7 10 16 18
9 (10) 0 2 3 7 11 13 15 16 17 18
10 (9) 2 3 5 8 11 13 14 15 18
11 (12) 1 2 4 5 6 7 9 10 13 14 15 18
12 (8) 0 3 4 5 6 7 15 17
13 (14) 0 2 3 4 5 6 7 9 10 11 14 15 16 18
14 (9) 0 4 6 7 10 11 13 15 16
15 (12) 3 5 7 9 10 11 12 13 14 16 17 18
16 (9) 0 3 6 7 8 9 13 14 15
17 (5) 3 5 9 12 15
18 (12) 0 1 4 5 6 7 8 9 10 11 13 15

16
0 (3) 2 6 13
1 (7) 3 4 9 11 13 14 15
2 (8) 0 4 5 6 8 10 11 15
3 (7) 1 5 6 8 10 12 13
4 (10) 1 2 5 6 8 10 11 12 13 15
5 (8) 2 3 4 8 10 11 14 15
6 (8) 0 2 3 4 7 8 10 14
7 (5) 6 10 11 12 13
8 (10) 2 3 4 5 6 9 10 11 14 15
9 (3) 1 8 15
10 (11) 2 3 4 5 6 7 8 11 12 14 15
11 (9) 1 2 4 5 7 8 10 14 15
12 (4) 3 4 7 10
13 (6) 0 1 3 4 7 15
14 (7) 1 5 6 8 10 11 15
15 (10) 1 2 4 5 8 9 10 11 13 14

7
0 (4) 1 4 5 6
1 (4) 0 2 5 6
2 (4) 1 3 4 5
3 (3) 2 5 6
4 (3) 0 2 5
5 (6) 0 1 2 3 4 6
6 (4) 0 1 3 5

5
0 (3) 1 2 4
1 (2) 0 2
2 (3) 0 1 4
3 (0)
4 (2) 0 2

4
0 (2) 2 3
1 (1) 2
2 (2) 0 1
3 (1) 0

17
0 (10) 1 2 6 8 10 11 12 13 14 16
1 (7) 0 3 4 5 8 13 16
2 (10) 0 3 4 5 6 7 9 10 15 16
3 (4) 1 2 8 9
4 (8) 1 2 8 9 10 13 14 15
5 (8) 1 2 6 7 9 10 13 16
6 (11) 0 2 5 7 9 10 12 13 14 15 16
7 (7) 2 5 6 8 11 12 16
8 (9) 0 1 3 4 7 10 13 14 16
9 (10) 2 3 4 5 6 10 12 14 15 16
10 (9) 0 2 4 5 6 8 9 12 14
11 (3) 0 7 16
12 (8) 0 6 7 9 10 13 15 16
13 (10) 0 1 4 5 6 8 12 14 15 16
14 (8) 0 4 6 8 9 10 13 16
15 (6) 2 4 6 9 12 13
16 (12) 0 1 2 5 6 7 8 9 11 12 13 14

1
0 (0)

10
0 (3) 1 7 8
1 (3) 0 5 8
2 (5) 3 6 7 8 9
3 (3) 2 6 7
4 (4) 5 6 7 9
5 (4) 1 4 6 9
6 (6) 2 3 4 5 8 9
7 (4) 0 2 3 4
8 (5) 0 1 2 6 9
9 (5) 2 4 5 6 8

5
0 (3) 1 2 4
1 (3) 0 2 3
2 (3) 0 1 3
3 (2) 1 2
4 (1) 0

17
0 (11) 1 2 5 6 7 8 9 11 12 13 14
1 (9) 0 4 5 6 7 8 13 14 16
2 (8) 0 5 7 9 11 13 14 15
3 (6) 4 8 9 10 14 15
4 (7) 1 3 7 8 10 12 14
5 (9) 0 1 2 8 9 11 12 15 16
6 (8) 0 1 7 12 13 14 15 16
7 (11) 0 1 2 4 6 9 10 11 12 14 16
8 (11) 0 1 3 4 5 9 10 11 14 15 16
9 (12) 0 2 3 5 7 8 10 11 13 14 15 16
10 (8) 3 4 7 8 9 11 12 16
11 (9) 0 2 5 7 8 9 10 12 16
12 (8) 0 4 5 6 7 10 11 14
13 (7) 0 1 2 6 9 15 16
14 (12) 0 1 2 3 4 6 7 8 9 12 15 16
15 (8) 2 3 5 6 8 9 13 14
16 (10) 1 5 6 7 8 9 10 11 13 14

11
0 (5) 1 2 6 7 8
1 (4) 0 5 7 8
2 (7) 0 3 5 6 7 8 9
3 (3) 2 7 8
4 (3) 7 8 9
5 (3) 1 2 7
6 (3) 0 2 10
7 (8) 0 1 2 3 4 5 9 10
8 (6) 0 1 2 3 4 9
9 (4) 2 4 7 8
10 (2) 6 7

10
0 (5) 1 2 5 7 8
1 (7) 0 2 3 4 5 7 8
2 (5) 0 1 4 7 9
3 (5) 1 4 5 6 9
4 (6) 1 2 3 6 8 9
5 (6) 0 1 3 7 8 9
6 (4) 3 4 7 9
7 (6) 0 1 2 5 6 9
8 (5) 0 1 4 5 9
9 (7) 2 3 4 5 6 7 8

0

16
0 (5) 1 6 9 11 12
1 (10) 0 2 3 4 5 6 10 12 13 15
2 (7) 1 3 6 11 13 14 15
3 (9) 1 2 5 6 10 11 12 13 14
4 (6) 1 7 11 13 14 15
5 (7) 1 3 6 7 8 10 12
6 (9) 0 1 2 3 5 7 8 9 13
7 (6) 4 5 6 8 11 14
8 (5) 5 6 7 11 12
9 (5) 0 6 11 14 15
10 (4) 1 3 5 14
11 (7) 0 2 3 4 7 8 9
12 (7) 0 1 3 5 8 14 15
13 (5) 1 2 3 4 6
14 (8) 2 3 4 7 9 10 12 15
15 (6) 1 2 4 9 12 14

18
0 (7) 2 10 11 12 13 16 17
1 (13) 3 4 6 7 8 9 10 12 13 14 15 16 17
2 (9) 0 3 5 6 10 11 12 15 17
3 (8) 1 2 4 5 7 11 12 17
4 (4) 1 3 6 16
5 (9) 2 3 9 10 11 12 14 15 16
6 (10) 1 2 4 8 10 11 12 13 16 17
7 (9) 1 3 9 10 12 13 14 16 17
8 (5) 1 6 15 16 17
9 (5) 1 5 7 12 14
10 (9) 0 1 2 5 6 7 11 13 17
11 (8) 0 2 3 5 6 10 14 15
12 (9) 0 1 2 3 5 6 7 9 15
13 (6) 0 1 6 7 10 14
14 (6) 1 5 7 9 11 13
15 (7) 1 2 5 8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 (10) 0 2 3 5 9 11 13 14 16 17
5 (12) 0 1 2 3 4 6 9 11 12 14 16 17
6 (9) 1 2 5 7 8 11 13 14 16
7 (7) 0 6 10 12 13 14 15
8 (7) 2 6 9 10 13 15 16
9 (11) 2 3 4 5 8 11 12 13 14 15 16
10 (7) 0 3 7 8 12 13 14
11 (8) 1 4 5 6 9 13 14 15
12 (10) 3 5 7 9 10 13 14 15 16 17
13 (9) 1 4 6 7 8 9 10 11 12
14 (11) 3 4 5 6 7 9 10 11 12 16 17
15 (8) 0 2 7 8 9 11 12 16
16 (8) 4 5 6 8 9 12 14 15
17 (6) 0 3 4 5 12 14

16
0 (8) 1 3 5 8 11 12 14 15
1 (10) 0 2 3 4 5 7 8 9 10 11
2 (5) 1 4 5 8 12
3 (8) 0 1 4 7 9 11 12 13
4 (8) 1 2 3 5 6 8 9 13
5 (7) 0 1 2 4 6 9 12
6 (8) 4 5 8 10 11 12 13 15
7 (7) 1 3 8 9 12 13 15
8 (9) 0 1 2 4 6 7 11 13 15
9 (8) 1 3 4 5 7 12 13 15
10 (5) 1 6 11 12 14
11 (8) 0 1 3 6 8 10 12 14
12 (12) 0 2 3 5 6 7 9 10 11 13 14 15
13 (9) 3 4 6 7 8 9 12 14 15
14 (5) 0 10 11 12 13
15 (7) 0 6 7 8 9 12 13

7
0 (6) 1 2 3 4 5 6
1 (3) 0 3 6
2 (3) 0 5 6
3 (3) 0 1 4
4 (4) 0 3 5 6
5 (4) 0 2 4 6
6 (5) 0 1 2 4 5

19
0 (9) 2 3 4 5 8 9 11 13 17
1 (8) 6 11 12 13 15 16 17 18
2 (10) 0 5 6 7 8 11 14 15 17 18
3 (11) 0 4 6 7 9 10 11 14 15 16 17
4 (10) 0 3 5 6 8 10 11 16 17 18
5 (11) 0 2 4 6 7 9 11 12 13 16 18
6 (9) 1 2 3 4 5 10 11 12 13
7 (7) 2 3 5 8 10 12 14
8 (13) 0 2 4 7 9 10 11 12 13 15 16 17 18
9 (12) 0 3 5 8 10 12 13 14 15 16 17 18
10 (10) 3 4 6 7 8 9 11 13 15 16
11 (13) 0 1 2 3 4 5 6 8 10 12 14 16 18
12 (9) 1 5 6 7 8 9 11 17 18
13 (10) 0 1 5 6 8 9 10 14 16 18
14 (7) 2 3 7 9 11 13 18
15 (7) 1 2 3 8 9 10 16
16 (11) 1 3 4 5 8 9 10 11 13 15 17
17 (10) 0 1 2 3 4 8 9 12 16 18
18 (11) 1 2 4 5 8 9 11 12 13 14 17

14
0 (12) 1 2 3 4 6 7 8 9 10 11 12 13
1 (7) 0 4 6 7 9 10 13
2 (7) 0 6 7 10 11 12 13
3 (7) 0 4 9 10 11 12 13
4 (6) 0 1 3 10 11 13
5 (2) 7 11
6 (5) 0 1 2 9 11
7 (7) 0 1 2 5 8 12 13
8 (5) 0 7 9 11 12
9 (7) 0 1 3 6 8 10 12
10 (8) 0 1 2 3 4 9 11 13
11 (9) 0 2 3 4 5 6 8 10 12
12 (8) 0 2 3 7 8 9 11 13
13 (8) 0 1 2 3 4 7 10 12

5
0 (4) 1 2 3 4
1 (2) 0 3
2 (1) 0
3 (3) 0 1 4
4 (2) 0 3

8
0 (3) 2 4 7
1 (3) 2 5 6
2 (4) 0 1 4 5
3 (3) 5 6 7
4 (2) 0 2
5 (3) 1 2 3
6 (2) 1 3
7 (2) 0 3

14
0 (8) 1 2 5 6 8 10 11 12
1 (7) 0 3 6 9 10 11 12
2 (6) 0 3 4 6 7 13
3 (7) 1 2 4 8 9 10 11
4 (7) 2 3 5 7 10 11 12
5 (8) 0 4 6 8 9 10 12 13
6 (10) 0 1 2 5 7 8 9 11 12 13
7 (5) 2 4 6 8 12
8 (5) 0 3 5 6 7
9 (6) 1 3 5 6 11 13
10 (8) 0 1 3 4 5 11 12 13
11 (8) 0 1 3 4 6 9 10 13
12 (7) 0 1 4 5 6 7 10
13 (6) 2 5 6 9 10 11

2
0 (0)
1 (0)

15
0 (6) 1 5 6 7 9 10
1 (7) 0 2 5 6 7 8 11
2 (5) 1 4 11 13 14
3 (6) 4 5 6 8 10 11
4 (8) 2 3 7 9 10 11 12 13
5 (7) 0 1 3 6 7 11 12
6 (8) 0 1 3 5 7 8 9 11
7 (10) 0 1 4 5 6 9 10 12 13 14
8 (5) 1 3 6 9 13
9 (7) 0 4 6 7 8 12 13
10 (6) 0 3 4 7 11 14
11 (9) 1 2 3 4 5 6 10 13 14
12 (5) 4 5 7 9 14
13 (6) 2 4 7 8 9 11
14 (5) 2 7 10 11 12

2
0 (0)
1 (0)

17
0 (7) 2 4 6 8 9 10 13
1 (8) 2 3 5 6 7 12 13 15
2 (5) 0 1 3 8 12
3 (9) 1 2 5 7 8 9 12 14 15
4 (6) 0 7 9 12 14 15
5 (11) 1 3 6 7 9 10 11 12 14 15 16
6 (8) 0 1 5 8 12 13 15 16
7 (10) 1 3 4 5 8 9 11 12 13 16
8 (9) 0 2 3 6 7 10 12 14 16
9 (9) 0 3 4 5 7 11 13 14 16
10 (6) 0 5 8 11 14 16
11 (7) 5 7 9 10 13 15 16
12 (11) 1 2 3 4 5 6 7 8 13 15 16
13 (9) 0 1 6 7 9 11 12 14 15
14 (8) 3 4 5 8 9 10 13 15
15 (9) 1 3 4 5 6 11 12 13 14
16 (8) 5 6 7 8 9 10 11 12

3
0 (0)
1 (1) 2
2 (1) 1

1
0 (0)

10
0 (2) 2 8
1 (3) 6 7 9
2 (4) 0 4 5 6
3 (1) 5
4 (6) 2 5 6 7 8 9
5 (6) 2 3 4 6 8 9
6 (6) 1 2 4 5 8 9
7 (2) 1 4
8 (4) 0 4 5 6
9 (4) 1 4 5 6

13
0 (8) 2 3 4 6 7 8 9 12
1 (6) 3 4 5 8 9 11
2 (5) 0 3 4 10 12
3 (10) 0 1 2 4 5 8 9 10 11 12
4 (6) 0 1 2 3 6 9
5 (5) 1 3 6 8 10
6 (5) 0 4 5 7 10
7 (7) 0 6 8 9 10 11 12
8 (6) 0 1 3 5 7 12
9 (7) 0 1 3 4 7 10 12
10 (6) 2 3 5 6 7 9
11 (3) 1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 0 1 2 3 5

9
0 (6) 1 2 3 4 7 8
1 (5) 0 2 4 6 8
2 (4) 0 1 4 5
3 (4) 0 5 6 8
4 (4) 0 1 2 5
5 (4) 2 3 4 8
6 (4) 1 3 7 8
7 (3) 0 6 8
8 (6) 0 1 3 5 6 7

3
0 (0)
1 (0)
2 (0)

4
0 (1) 3
1 (1) 3
2 (1) 3
3 (3) 0 1 2

1
0 (0)

8
0 (5) 1 2 4 5 7
1 (3) 0 3 6
2 (3) 0 5 6
3 (1) 1
4 (1) 0
5 (3) 0 2 7
6 (3) 1 2 7
7 (3) 0 5 6

19
0 (10) 2 3 5 7 8 10 11 13 17 18
1 (12) 2 3 4 5 6 7 10 12 14 15 16 18
2 (12) 0 1 4 7 8 9 10 11 12 13 14 18
3 (10) 0 1 4 6 9 10 13 14 15 18
4 (11) 1 2 3 6 7 10 11 12 14 16 17
5 (13) 0 1 6 7 8 9 11 12 13 15 16 17 18
6 (11) 1 3 4 5 8 9 10 11 13 17 18
7 (10) 0 1 2 4 5 10 11 13 15 18
8 (11) 0 2 5 6 9 10 12 13 14 17 18
9 (9) 2 3 5 6 8 10 11 13 16
10 (12) 0 1 2 3 4 6 7 8 9 14 15 18
11 (11) 0 2 4 5 6 7 9 12 14 16 17
12 (8) 1 2 4 5 8 11 15 18
13 (11) 0 2 3 5 6 7 8 9 14 15 17
14 (9) 1 2 3 4 8 10 11 13 17
15 (8) 1 3 5 7 10 12 13 17
16 (5) 1 4 5 9 11
17 (10) 0 4 5 6 8 11 13 14 15 18
18 (11) 0 1 2 3 5 6 7 8 10 12 17

11
0 (5) 6 7 8 9 10
1 (5) 2 3 4 5 10
2 (4) 1 5 6 8
3 (5) 1 6 7 9 10
4 (3) 1 6 8
5 (5) 1 2 7 8 9
6 (7) 0 2 3 4 7 8 10
7 (5) 0 3 5 6 10
8 (6) 0 2 4 5 6 10
9 (4) 0 3 5 10
10 (7) 0 1 3 6 7 8 9
AC output:

Code: Select all

0 critical links

0 critical links

2 critical links
0 - 2
1 - 2

0 critical links

0 critical links

0 critical links

1 critical links
0 - 1

1 critical links
0 - 4

0 critical links

2 critical links
0 - 3
1 - 3

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

1 critical links
0 - 3

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

2 critical links
0 - 2
1 - 2

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

3 critical links
0 - 2
0 - 3
1 - 2

0 critical links

0 critical links

0 critical links

1 critical links
0 - 4

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

3 critical links
0 - 3
1 - 2
2 - 3

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

1 critical links
0 - 2

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

0 critical links

1 critical links
1 - 2

0 critical links

1 critical links
3 - 5

0 critical links

2 critical links
0 - 5
1 - 3

0 critical links

2 critical links
0 - 1
4 - 5

0 critical links

0 critical links

2 critical links
0 - 2
5 - 6

3 critical links
0 - 2
1 - 6
2 - 4

0 critical links

0 critical links

1 critical links
0 - 1

0 critical links

0 critical links

0 critical links

0 critical links

3 critical links
0 - 3
1 - 3
2 - 3

0 critical links

2 critical links
0 - 4
1 - 3

0 critical links

0 critical links

Check input and AC output for thousands of problems on uDebug!

dhruba07
New poster
Posts: 20
Joined: Tue May 21, 2013 9:02 pm
Location: BUET

Re: 796 - Critical Links

Post by dhruba07 » Mon Nov 04, 2013 5:39 pm

If all the input case given above shows the right output , the code will get accepted . There will be always bidirectional edges in the input.Testcase like this :

Code: Select all

7
0 (3) 1 2 4
1 (3) 0 2 3
2 (3) 1 0 3
3 (4) 0 1 2 4
4 (3) 3 6 5
5 (1) 4
6 (1) 4
will not be given.My in my AC code I took all the edges according to input and got AC.

Code: Select all

got AC
Accept who you are :)

vsha041
New poster
Posts: 35
Joined: Wed Feb 12, 2014 10:04 am

Re: 796 - Critical Links

Post by vsha041 » Fri Apr 25, 2014 4:59 am

Here a single large test case with 100 nodes.

Code: Select all

100
2 (1) 0 
18 (15) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 
39 (30) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
13 (10) 0 1 2 3 4 5 6 7 8 9 
83 (38) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
7 (1) 0 
97 (1) 0 
67 (7) 0 1 2 3 4 5 6 
29 (8) 0 1 2 3 4 5 6 7 
96 (29) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 
34 (7) 0 1 2 3 4 5 6 
25 (9) 0 1 2 3 4 5 6 7 8 
31 (5) 0 1 2 3 4 
86 (50) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 
48 (34) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 
10 (5) 0 1 2 3 4 
30 (9) 0 1 2 3 4 5 6 7 8 
98 (84) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 
44 (10) 0 1 2 3 4 5 6 7 8 9 
28 (13) 0 1 2 3 4 5 6 7 8 9 10 11 12 
60 (17) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 
75 (34) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 
27 (10) 0 1 2 3 4 5 6 7 8 9 
99 (38) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
53 (18) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 
16 (9) 0 1 2 3 4 5 6 7 8 
42 (34) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 
52 (27) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
4 (0) 
12 (8) 0 1 2 3 4 5 6 7 
70 (23) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 
66 (23) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 
82 (1) 0 
14 (8) 0 1 2 3 4 5 6 7 
71 (27) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
9 (8) 0 1 2 3 4 5 6 7 
92 (72) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 
46 (29) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 
87 (32) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 
63 (27) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
11 (6) 0 1 2 3 4 5 
89 (67) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 
95 (14) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 
35 (20) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 
38 (1) 0 
55 (40) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 
33 (10) 0 1 2 3 4 5 6 7 8 9 
36 (19) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 
5 (3) 0 1 2 
81 (1) 0 
72 (12) 0 1 2 3 4 5 6 7 8 9 10 11 
37 (14) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 
1 (0) 
15 (12) 0 1 2 3 4 5 6 7 8 9 10 11 
3 (1) 0 
78 (32) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 
32 (5) 0 1 2 3 4 
24 (11) 0 1 2 3 4 5 6 7 8 9 10 
61 (52) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 
43 (21) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
85 (70) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 
73 (38) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
19 (8) 0 1 2 3 4 5 6 7 
56 (49) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 
49 (42) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 
88 (61) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 
84 (58) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 
41 (31) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 
91 (7) 0 1 2 3 4 5 6 
57 (16) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 
45 (19) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 
68 (14) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 
0 (0) 
50 (30) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
26 (18) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 
20 (13) 0 1 2 3 4 5 6 7 8 9 10 11 12 
74 (21) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
79 (31) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 
94 (84) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 
80 (60) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 
47 (43) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 
21 (5) 0 1 2 3 4 
69 (67) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 
8 (0) 
76 (75) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 
62 (44) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 
40 (21) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
59 (56) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 
90 (34) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 
51 (33) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 
54 (41) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 
65 (45) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 
23 (9) 0 1 2 3 4 5 6 7 8 
22 (17) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 
58 (42) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 
17 (6) 0 1 2 3 4 5 
6 (4) 0 1 2 3 
93 (30) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
77 (54) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 
64 (34) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 
Output

Code: Select all

1 critical links
0 - 97


Notice that there are two blank lines after 0 - 97 and that's because a blank line needs to be printed after every test case's output - even the last one.

Post Reply

Return to “Volume 7 (700-799)”