You are not logged in. Please login at www.codechef.com to post your questions!

×

UVa 11283 - Playing Boggle

Problem My solution

I can't understand why my solution is giving WA even I tried random cases with a AC solution (on github)

asked 24 Nov '17, 17:18

anushi's gravatar image

4★anushi
24617
accept rate: 15%


There is a tiny mistake in your score() function.

int score(int x){
    if(x<5)
        return 1;
    else if(x>3 and x<7)
        return x-3;
    else if(x==7)
        return 5;
    else
        return 11;
}

Just replace it with above, you will get AC.

link

answered 24 Nov '17, 21:29

bansal1232's gravatar image

5★bansal1232
2.8k1419
accept rate: 16%

edited 24 Nov '17, 21:30

Thanks @bansal1232

My silly mistakes -.-

(24 Nov '17, 23:02) anushi4★

You just need to fix score() function. Its not giving expected output for score(7)
Link to my code https://codepad.co/snippet/6SEoiyCa

link

answered 24 Nov '17, 23:16

muditsaxena1's gravatar image

1★muditsaxena1
212
accept rate: 0%

edited 24 Nov '17, 23:18

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×726
×349
×1

question asked: 24 Nov '17, 17:18

question was seen: 276 times

last updated: 24 Nov '17, 23:18