ksaveljev / UVa-online-judge

Collection of my solutions for some of the problems found at http://uva.onlinejudge.org/
104 stars 68 forks source link

Solution UVa-online-judge/501.cpp is wrong #2

Closed canhnht closed 8 years ago

canhnht commented 8 years ago

I tested the solution 501 UVA with this testcase:

1

3 5
10 20 30
3 3 3 3 3

It gave Segmentation fault (core dumped)

ksaveljev commented 8 years ago

Hey, it's been quite some time since the solution has been added but looking at the problem statement it does say that N is less or equal than M, and in your test case M = 3 and N = 5... so it is not a valid input?

canhnht commented 8 years ago

Oh, my bad. Sorry, it's invalid input. :)