11222 - Only I did it!
Moderator: Board moderators
11222 - Only I did it!
What is the output for this input:
2
3 1 2 3
3 4 5 6
3 7 8 9
3 7 8 9
3 7 8 9
3 7 8 9
Thanks.
Sapnil
2
3 1 2 3
3 4 5 6
3 7 8 9
3 7 8 9
3 7 8 9
3 7 8 9
Thanks.
Sapnil
Code: Select all
Case #1:
1 3 1 2 3
2 3 4 5 6
3 3 7 8 9
Case #2:
1 0
2 0
3 0
while i was trying to post my wrong answer code here, i tried to make some test case to post here and suddenly found my very silly mistake. but this test can really help anybody.
hope these help
Code: Select all
4
3 1 2 3
3 2 1 3
3 0 1 2
3 3 2 1
3 4 2 1
4 5 9 6 2
2 1 0
2 1 0
2 1 0
3 4 6 5
3 6 5 4
3 9 8 7
my accepted answer
Case #1:
3 1 0
Case #2:
3 3 5 6 9
Case #3:
1 0
2 0
3 0
Case #4:
3 3 7 8 9
hope these help
Somebody help me
Hello everyone!
I keep getting WA all the time. A tried all the inputs above but it seems to be working just fine. Could anyone give me a hint.
Here is my code:
Thanx in advance!
![:D](./images/smilies/icon_biggrin.gif)
I keep getting WA all the time. A tried all the inputs above but it seems to be working just fine. Could anyone give me a hint.
![:(](./images/smilies/icon_frown.gif)
Here is my code:
Code: Select all
Code removed. Silly mistake
![:)](./images/smilies/icon_smile.gif)
![:D](./images/smilies/icon_biggrin.gif)
-
- New poster
- Posts: 38
- Joined: Tue Jul 17, 2007 3:21 pm
- Location: East West University
gettin runtime error...plz help
My code works just fine on the local compiler but the online judge is showing a runtime error.
is thr any input for which my program would be causing an RE...
plz help......
is thr any input for which my program would be causing an RE...
plz help......
Code: Select all
AC now
Re: 11222 - Only I did it!
INPUT
For the above input, what's the correct output?
Code: Select all
2
0
1 8
1 8
2 1 3
2 1 3
1 1
Re: 11222 - Only I did it!
My AC program gives the following output:allenlam wrote:For the above input, what's the correct output?
Code: Select all
Case #1:
1 0
2 0
3 0
Case #2:
1 0
2 0
3 0
Re:
Thanks for sharing these test cases. This was really helpful.Parleen wrote:while i was trying to post my wrong answer code here, i tried to make some test case to post here and suddenly found my very silly mistake. but this test can really help anybody.
-
- New poster
- Posts: 18
- Joined: Wed Dec 17, 2014 9:44 pm
Re: 11222 - Only I did it!
Hello! I've tried all the inputs in my code. Don't know why I'm getting WA. Please help...
![:(](./images/smilies/icon_frown.gif)
Code: Select all
Got AC
Last edited by BlackBeard on Sat Jan 10, 2015 7:45 pm, edited 1 time in total.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 11222 - Only I did it!
Input:AC output:
Code: Select all
1
1 1
1 2
0
Code: Select all
Case #1:
1 1 1
2 1 2
Check input and AC output for thousands of problems on uDebug!
-
- New poster
- Posts: 18
- Joined: Wed Dec 17, 2014 9:44 pm
Re: 11222 - Only I did it!
Thanks I got AC... ![:D](./images/smilies/icon_biggrin.gif)
![:D](./images/smilies/icon_biggrin.gif)
-
- New poster
- Posts: 1
- Joined: Sun May 22, 2016 3:16 am
Re: 11222 - Only I did it!
If this thread is still active, could someone please help me with this problem? I've passed all the test cases in this thread as well as the two tests on https://www.udebug.com/UVa/11222 and a bunch of random test cases I generated. I keep getting wrong answer though. If anyone could give me extra test cases or look through my code (http://notepad.pw/uvahelp) it would be a great help!
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?
Code: Select all
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()[1:])
s1 = f1.difference(f2, f3)
s2 = f2.difference(f1, f3)
s3 = f3.difference(f1, f2)
t = []
l = []
if len(s1) >= len(s2) and len(s1) >= len(s3):
l.append(list(map(int, s1)))
t.append(1)
if len(s2) >= len(s1) and len(s2) >= len(s3):
l.append(list(map(int, s2)))
t.append(2)
if len(s3) >= len(s1) and len(s3) >= len(s2):
l.append(list(map(int, s3)))
t.append(3)
for el, tt in zip(l, t):
el.sort()
if len(el) == 0:
print(tt, "0")
else:
print(tt, len(el), " ".join(map(str, el)))