My strategy is the following:
Sort edges in decreasing order
For each edge that connects two different components, check if each component is a candidate (this edge less than min edge in the component and size > 1), if so, add its size. Join the components.
Update the min size of the new ...
Search found 3 matches
- Fri Aug 12, 2016 11:12 pm
- Forum: Volume 12 (1200-1299)
- Topic: 1265 - Tour Belt
- Replies: 3
- Views: 2671
- Thu May 26, 2016 5:02 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11222 - Only I did it!
- Replies: 14
- Views: 9831
Re: 11222 - Only I did it!
I keep getting WA, but it passes all the tests in uDebug. Can somebody give me a hint on what's wrong?
if __name__ == '__main__':
n = int(input())
for i in range(1, n + 1):
print("Case #", i, ":", sep = "")
f1 = set(input().split()[1:])
f2 = set(input().split()[1:])
f3 = set(input().split ...
if __name__ == '__main__':
n = int(input())
for i in range(1, n + 1):
print("Case #", i, ":", sep = "")
f1 = set(input().split()[1:])
f2 = set(input().split()[1:])
f3 = set(input().split ...
- Tue Oct 28, 2014 2:01 am
- Forum: Volume 4 (400-499)
- Topic: 402 - M*A*S*H
- Replies: 56
- Views: 21702
Re: 402 - M*A*S*H
I cannot find the error in this code. I keep getting WA even though I can pass all test cases I've thought of. Can somebody give me a hand? Preferably by posting some test case that doesn't work.
Code: Select all
Accepted