Beware of input where a club is listed twice in the club list.
PersonA PartyA ClubA ClubA
After taking care of this I've got AC.
Original code and analysis deleted after AC
Search found 4 matches
- Sat Jan 03, 2015 1:26 am
- Forum: Volume 105 (10500-10599)
- Topic: 10511 - Councilling
- Replies: 26
- Views: 16185
- Wed Dec 31, 2014 9:56 pm
- Forum: Volume 1 (100-199)
- Topic: 186 - Trip Routing
- Replies: 15
- Views: 6946
Re: 186 - Trip Routing
I think he means this. In the sample input:
...
San Luis Obispo,Santa Barbara,US-101,106
San Luis Obispo,Santa Barbara,CA-1,113
...
Same source, same destination, different routes.
And of course, there is no point picking the longer route.
Use a diff tool to compare sample output against ...
...
San Luis Obispo,Santa Barbara,US-101,106
San Luis Obispo,Santa Barbara,CA-1,113
...
Same source, same destination, different routes.
And of course, there is no point picking the longer route.
Use a diff tool to compare sample output against ...
- Sat Dec 27, 2014 5:45 pm
- Forum: Volume 3 (300-399)
- Topic: 341 - Non-Stop Travel
- Replies: 39
- Views: 30271
Re: 341 - Non-Stop Travel
Be careful with disconnected graph.
Expected output:
Code: Select all
4
1 2 3
0
1 3 4
0
1 2
0
Code: Select all
Case 1: Path = 1 2; 3 second delay
- Mon Sep 29, 2014 6:28 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10505 - Montesco vs Capuleto
- Replies: 73
- Views: 47677
Re: 10505 - Montesco vs Capuleto
Wouldn't the problem becomes the maximum independent set problem (which is NP complete) if the graph is allowed to be non-bipartite?
For example,
1 is enemy of 2
2 is enemy of 3
1 is enemy of 3
We can still invite 1.
This problem is full of problems
!
For example,
1 is enemy of 2
2 is enemy of 3
1 is enemy of 3
We can still invite 1.
This problem is full of problems
