Page 1 of 1

11222 - Only I did it!

Posted: Mon Jun 11, 2007 9:19 pm
by sapnil
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

Posted: Mon Jun 11, 2007 9:34 pm
by sunny

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

Posted: Mon Jun 11, 2007 10:37 pm
by sapnil
Thank you very much........
I got ACC.
sapnil

Posted: Sun Jul 08, 2007 2:00 pm
by Parleen
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.

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

Posted: Wed Jul 11, 2007 7:09 pm
by clare
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:

Code: Select all

 Code removed. Silly mistake 
Thanx in advance! :) :D

....

Posted: Tue Sep 25, 2007 7:30 pm
by Fuad Hassan EWU
this code is giving PE. why?

Code: Select all


AC


gettin runtime error...plz help

Posted: Mon Feb 11, 2008 1:02 am
by mirage
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......

Code: Select all

AC now

Re: 11222 - Only I did it!

Posted: Fri Sep 04, 2009 6:38 pm
by allenlam
INPUT

Code: Select all

2

0
1 8
1 8

2 1 3
2 1 3
1 1
For the above input, what's the correct output?

Re: 11222 - Only I did it!

Posted: Wed Mar 05, 2014 2:47 pm
by uDebug
allenlam wrote:For the above input, what's the correct output?
My AC program gives the following output:

Code: Select all

Case #1:
1 0
2 0
3 0
Case #2:
1 0
2 0
3 0

Re:

Posted: Wed Mar 05, 2014 2:48 pm
by uDebug
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.
Thanks for sharing these test cases. This was really helpful.

Re: 11222 - Only I did it!

Posted: Wed Jan 07, 2015 3:44 pm
by BlackBeard
Hello! I've tried all the inputs in my code. Don't know why I'm getting WA. Please help... :(

Code: Select all

Got AC

Re: 11222 - Only I did it!

Posted: Thu Jan 08, 2015 1:41 am
by brianfry713
Input:

Code: Select all

1
1 1
1 2
0
AC output:

Code: Select all

Case #1:
1 1 1
2 1 2

Re: 11222 - Only I did it!

Posted: Sat Jan 10, 2015 7:46 pm
by BlackBeard
Thanks I got AC... :D

Re: 11222 - Only I did it!

Posted: Sun May 22, 2016 3:22 am
by CrockpotKid
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!

Posted: Thu May 26, 2016 5:02 pm
by fabikw
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)))