11222 - Only I did it!

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

Moderator: Board moderators

Post Reply
sapnil
Experienced poster
Posts: 106
Joined: Thu Apr 26, 2007 2:40 pm
Location: CSE-SUST
Contact:

11222 - Only I did it!

Post by sapnil » Mon Jun 11, 2007 9:19 pm

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

sunny
Experienced poster
Posts: 124
Joined: Sun Sep 11, 2005 10:22 pm
Location: Civil-BUET

Post by sunny » Mon Jun 11, 2007 9:34 pm

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

sapnil
Experienced poster
Posts: 106
Joined: Thu Apr 26, 2007 2:40 pm
Location: CSE-SUST
Contact:

Post by sapnil » Mon Jun 11, 2007 10:37 pm

Thank you very much........
I got ACC.
sapnil

Parleen
New poster
Posts: 5
Joined: Wed Jun 20, 2007 8:27 pm
Location: DreamTown

Post by Parleen » Sun Jul 08, 2007 2:00 pm

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
Somebody help me

clare
New poster
Posts: 7
Joined: Wed Aug 23, 2006 5:19 pm

Post by clare » Wed Jul 11, 2007 7:09 pm

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

User avatar
Fuad Hassan EWU
New poster
Posts: 38
Joined: Tue Jul 17, 2007 3:21 pm
Location: East West University

....

Post by Fuad Hassan EWU » Tue Sep 25, 2007 7:30 pm

this code is giving PE. why?

Code: Select all


AC

Eagle er moto daana meley urbo

mirage
New poster
Posts: 11
Joined: Sat Jan 19, 2008 9:37 pm

gettin runtime error...plz help

Post by mirage » Mon Feb 11, 2008 1:02 am

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

allenlam
New poster
Posts: 8
Joined: Tue Jun 09, 2009 6:46 am

Re: 11222 - Only I did it!

Post by allenlam » Fri Sep 04, 2009 6:38 pm

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?

User avatar
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

Re: 11222 - Only I did it!

Post by uDebug » Wed Mar 05, 2014 2:47 pm

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
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.

User avatar
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

Re:

Post by uDebug » Wed Mar 05, 2014 2:48 pm

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.
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.

BlackBeard
New poster
Posts: 18
Joined: Wed Dec 17, 2014 9:44 pm

Re: 11222 - Only I did it!

Post by BlackBeard » Wed Jan 07, 2015 3:44 pm

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
Last edited by BlackBeard on Sat Jan 10, 2015 7:45 pm, edited 1 time in total.

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

Re: 11222 - Only I did it!

Post by brianfry713 » Thu Jan 08, 2015 1:41 am

Input:

Code: Select all

1
1 1
1 2
0
AC output:

Code: Select all

Case #1:
1 1 1
2 1 2
Check input and AC output for thousands of problems on uDebug!

BlackBeard
New poster
Posts: 18
Joined: Wed Dec 17, 2014 9:44 pm

Re: 11222 - Only I did it!

Post by BlackBeard » Sat Jan 10, 2015 7:46 pm

Thanks I got AC... :D

CrockpotKid
New poster
Posts: 1
Joined: Sun May 22, 2016 3:16 am

Re: 11222 - Only I did it!

Post by CrockpotKid » Sun May 22, 2016 3:22 am

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!

fabikw
New poster
Posts: 3
Joined: Tue Oct 28, 2014 1:59 am

Re: 11222 - Only I did it!

Post by fabikw » Thu May 26, 2016 5:02 pm

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)))

Post Reply

Return to “Volume 112 (11200-11299)”