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

×

Lightning rectangle question test cases seems weak or wrong

4
3

in this problem https://www.codechef.com/problems/RECTLIT (snackdown problem 1)

1
3 10
0 5
2 3
2 7

picking up any top AC solutions from

https://www.codechef.com/status/RECTLIT?sort_by=All&sorting_order=asc&language=All&status=15&handle=&Submit=GO

gives the result yes on this test case while the correct ans should be no.

some of my verified solutions are :

https://www.codechef.com/viewsolution/21812372

https://www.codechef.com/viewsolution/21842230

https://www.codechef.com/viewsolution/21837549

not all but most of the solutions passed with wrong logic and this case was a strong edge case in it. so many got ac without handling this case. test cases seem to be weak.

asked 09 Dec '18, 14:55

helloworld0001's gravatar image

0★helloworld0001
412
accept rate: 0%

edited 10 Dec '18, 08:26

Light source at (0 5) lights toward bottom right direction, (2,3) toward top right and (2,7) toward top left.

(09 Dec '18, 16:58) taran_14076★

@taran_1407 still point 1,6 is left dark

(09 Dec '18, 19:12) helloworld00010★
1

Sorry, I read the coordinates as (0,5),(3,2),(7,2). My Bad

The answer for the test case you mentioned is no.

(10 Dec '18, 00:53) taran_14076★
2

@taran_1407 I have updated bit details in the question. It seems like the test cases were weak in this question.

(10 Dec '18, 07:55) helloworld00010★

@taran_1407 @helloworld0001 same problem for me my code is getting is getting WA since i consider this case as no but all teams which considered yes are getting an AC. @admin2 @vijju123 can u look into it please.it will be helpful?

(10 Dec '18, 16:18) lokesh20024★
4

Wow, in a problem based on casework they forgot to put in all cases.

(10 Dec '18, 19:53) meooow ♦6★
3

@meooow welcome to codechef XD

(10 Dec '18, 19:59) abdullah7685★

@lokesh2002 you don't appear to have submitted a solution to this problem in codechef - did you submit under a team name? The problem described here is the opposite of your claim; this is about a case that isn't tested, so incomplete solutions are getting AC. If you are unexpectedly getting WA, it's more likely your code has an error.

(11 Dec '18, 06:20) joffan5★
showing 5 of 8 show all

So I did not feel like studying for exams and spent my evening analyzing accepted solutions for RECTLIT. I found that out of 363 accepted solutions in C++, only 253 pass the above test case. I did not check the solutions in other languages, however there are only 23 of them. So approximately 30% of all accepted solutions in C++ should get WA. Make of it what you will ¯\_(ツ)_/¯

link

answered 11 Dec '18, 03:12

meooow's gravatar image

6★meooow ♦
7.1k718
accept rate: 48%

edited 11 Dec '18, 03:15

Just curious, how did you test them all?

(11 Dec '18, 13:11) abdullah7685★

I wrote scripts to fetch all the accepted C++ solutions and run them locally.

(11 Dec '18, 16:22) meooow ♦6★

Oh nice,Is the API open to common public now?

(11 Dec '18, 17:42) abdullah7685★
1

You wish. I don't think CodeChef API will become public in my lifetime.

(11 Dec '18, 18:05) meooow ♦6★

"An ideal problem has no test data."

alt text

link

answered 11 Dec '18, 13:40

aryanc403's gravatar image

6★aryanc403
2.5k1516
accept rate: 10%

Lost my chance at winning a t-shirt because of this... One of the Python solutions I've found answers no if there are no points on the perimeter but still got accepted.

link

answered 11 Dec '18, 18:44

justin97530's gravatar image

2★justin97530
1
accept rate: 0%

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:

×483
×161
×118

question asked: 09 Dec '18, 14:55

question was seen: 623 times

last updated: 11 Dec '18, 18:44