skrcode's blog

By skrcode, 10 years ago, In English

Always getting runtime error in test case 25... would appreciate any advice to remove it... :) http://mirror.codeforces.com/contest/141/submission/7691568

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

»
10 years ago, # |
  Vote: I like it -11 Vote: I do not like it
int main(){
...
    int h[30005];
    bool taken[30005];
...
}

It is dangerous to put a such large array insize main().

Declare them as global variables.

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

I had made a mistake in the sort function. Did not make adjustments for the " = " case. Thnx anyways..!! :)