11013 - Get Straight

All about problems in Volume 110. 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
User avatar
Hadi
Learning poster
Posts: 63
Joined: Mon Aug 29, 2005 8:13 am
Location: Tebriz
Contact:

11013 - Get Straight

Post by Hadi » Mon Mar 20, 2006 3:00 pm

Why a solution which got Accepted during the online contest should get WA now?
:-?

Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel » Mon Mar 20, 2006 5:08 pm

Because the admins forgot to add the special judge for this problem, so currently it only accepts output which is identical to the judge output.

luishhh
New poster
Posts: 26
Joined: Mon Oct 25, 2004 8:11 pm
Location: Spain

Post by luishhh » Tue Mar 21, 2006 5:45 pm

I suppose eveything is ok now, because I got WA twice ot three times yesterday and today this problem appears in my list of AC
"From lost to the river" --> Spanish quote

Adrian Kuegel
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel » Tue Mar 21, 2006 6:01 pm

Yes, you are right, this issue is fixed. Yesterday I wrote an email to the admins about it.

annhy
New poster
Posts: 40
Joined: Sun May 27, 2007 1:42 am
Location: Taiwan

Post by annhy » Mon Sep 10, 2007 9:07 am

I submit my code to the new system.
I had wait for 10 minutes and the new online-judge system still shows these information in "My Submissions" page:

Code: Select all

#          Problem       Verdict     Language    Run Time    Memory Used    Submission Time
5909477    Get Straight                  C++                               2007-09-10 06:53:50
I don't know what's wrong to my code or to the new online-judge system.

moxlotus
New poster
Posts: 31
Joined: Sat Sep 17, 2011 6:47 am

Re: 11013 - Get Straight WA

Post by moxlotus » Mon Jan 19, 2015 9:14 pm

I have passed all the random input from udebug. But I am still getting WA.
Can someone provide more random inputs?
  • 7D TD 5C 4H AC
    AD 8H TS JH 5H
    #
My output for the above list is:
Exchange TD
Exchange AD

The output from udebug is:
Exchange AC
Exchange 5H

Can someone tell me why is there a difference between my output and udebug's output? The expected value for both outputs are the same.

moxlotus
New poster
Posts: 31
Joined: Sat Sep 17, 2011 6:47 am

Re: 11013 - Get Straight

Post by moxlotus » Tue Jan 20, 2015 7:09 am

AC

Test Case that caused my code to fail.
AD AH AS KD KH
AC Output:
Stay

Hope this helps =)

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

Re: 11013 - Get Straight

Post by brianfry713 » Tue Jan 20, 2015 8:59 pm

If there is more than one optimal strategy for a given deal, print any one of them. A special judge will evaluate your output.
Check input and AC output for thousands of problems on uDebug!

forthright48
New poster
Posts: 37
Joined: Wed Mar 14, 2012 11:57 am
Location: Bangladesh
Contact:

Re: 11013 - Get Straight

Post by forthright48 » Fri Jan 23, 2015 8:49 pm

What is the output for:

Code: Select all

JS 9H 9S JH QH
#
I get "Stay" but on uDebug I get "Exchange 9H". According to my calculation staying is better than exchanging 9H. Am I missing something?
What ever happens, happens for good. Even when we get WA :p
http://www.forthright48.com

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

Re: 11013 - Get Straight

Post by brianfry713 » Tue Jan 27, 2015 10:24 pm

If you stay with that input, you'll have a Dutch so end up losing 1.
If you exchange one of the 9's, you'll have a:
4/47 chance of getting a 8 and a Double Dutch, win 1
4/47 chance of getting a 10 and an Invite-the-Neighbours, win 10
3/47 chance of getting a Q and a Double Dutch, win 1
4/47 chance of getting a K and a Menage-a-Trois, win 3
Expected earning of: 4/47 * 1 + 4/47 * 10 + 3/47 * 1 + 4/47 * 3 - 2 = -35/47 = -.74 dollar, which is better than staying at -1.
Check input and AC output for thousands of problems on uDebug!

morris821028
New poster
Posts: 13
Joined: Thu Dec 06, 2012 4:07 pm

Re: 11013 - Get Straight

Post by morris821028 » Wed Mar 04, 2015 11:33 am

my program detect some invalid format in test data. the card maybe have a duplicate.

like this,

Code: Select all

4H 4H 5H 3H 3H
Can someone explain this ?

Some Input:

Code: Select all

4H 4C 5H 3H 3C
3H 4C TH 3C 4H 
6C 8D TD 6H TH 
6H 5H KS 4D 6D 
KS QH AS 7D TD 
2C AC 9H 6D JH 
7H 2H 3H 5S 3D 
4H 3H QS JC 7S 
4C 7D 2C 5H KC 
KH 3C 4H 3S QH 
QC 9C TH 9S 5S 
AH TH 3D 8C QS 
TH JH QH KH AH
2H TC 5D 3S 6C
2S 5S 8D JC JH
AH 5H 9C 2D 5C
AH KH 3H 4H 5C 
TH QH AH 3H 5H
my WA program output

Code: Select all

Stay
Stay
Stay
Exchange 6H
Exchange 7D
Exchange 6D
Exchange 3H
Exchange 7S
Exchange KC
Exchange 3S
Exchange 9S
Stay
Stay
Exchange TC
Stay
Stay
Exchange KH
Stay
?? Taiwan ! ??????????

dibery
Learning poster
Posts: 76
Joined: Sat Feb 23, 2013 4:16 pm
Location: Taiwan, Taipei
Contact:

Re: 11013 - Get Straight

Post by dibery » Fri Apr 03, 2015 7:31 am

My accepted output:

Code: Select all

Stay
Stay
Stay
Exchange 6H
Exchange 7D
Exchange 6D
Exchange 3H
Exchange 7S
Exchange KC
Exchange 3C
Exchange 9C
Stay
Stay
Exchange TC
Stay
Stay
Exchange KH
Stay
I didn't handle duplicates.
My code just count them as once. (But still regard them as 2 or more cards.)

For your input 4H 4H 5H 3H 3H
My program gives stay.

PS. I'm also from Taiwan. Nice to meet you.
Life shouldn't be null.

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

Re: 11013 - Get Straight

Post by brianfry713 » Thu Apr 09, 2015 2:44 am

I ignore the suit and only look at the value of each card. You're right there are cases where cards are duplicated, but there are no cases where there are 5 cards with the same value.
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 110 (11000-11099)”