When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

filo's blog

By filo, 10 years ago, In English

Hey guys,recently I've been stuck on this problem,I've written greedy solution and on the test cases I've tried the solution I've submitted gives the correct answer,anyways on judge I've WA.Here's my code . I'll describe algorithm later,if it is necessary.Thanks in advance ;)

UPDATE:

got AC,had to add one if statement :|

  • Vote: I like it
  • +9
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

could you provide me with some testcases please i am suffering WA since days ...