Page 1 of 1

11013 - Get Straight

Posted: Mon Mar 20, 2006 3:00 pm
by Hadi
Why a solution which got Accepted during the online contest should get WA now?
:-?

Posted: Mon Mar 20, 2006 5:08 pm
by Adrian Kuegel
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.

Posted: Tue Mar 21, 2006 5:45 pm
by luishhh
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

Posted: Tue Mar 21, 2006 6:01 pm
by Adrian Kuegel
Yes, you are right, this issue is fixed. Yesterday I wrote an email to the admins about it.

Posted: Mon Sep 10, 2007 9:07 am
by annhy
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.

Re: 11013 - Get Straight WA

Posted: Mon Jan 19, 2015 9:14 pm
by moxlotus
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.

Re: 11013 - Get Straight

Posted: Tue Jan 20, 2015 7:09 am
by moxlotus
AC

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

Hope this helps =)

Re: 11013 - Get Straight

Posted: Tue Jan 20, 2015 8:59 pm
by brianfry713
If there is more than one optimal strategy for a given deal, print any one of them. A special judge will evaluate your output.

Re: 11013 - Get Straight

Posted: Fri Jan 23, 2015 8:49 pm
by forthright48
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?

Re: 11013 - Get Straight

Posted: Tue Jan 27, 2015 10:24 pm
by brianfry713
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.

Re: 11013 - Get Straight

Posted: Wed Mar 04, 2015 11:33 am
by morris821028
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

Re: 11013 - Get Straight

Posted: Fri Apr 03, 2015 7:31 am
by dibery
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.

Re: 11013 - Get Straight

Posted: Thu Apr 09, 2015 2:44 am
by brianfry713
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.