Radwan_'s blog

By Radwan_, history, 6 years ago, In English

Why in some problems I find myself in the choice of using C or C++ to solve the problem and accept it. for example this code in java https://codeforces.net/contest/433/submission/42722521 Time limit in the last test case test 46 which this test must take less time than which the code pass but when I use the same code in C++ https://codeforces.net/contest/433/submission/42722213 accepted in time ( 186 ms ) and test 46 took ( 15 ms )

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

| Write comment?
»
6 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

try like this solution

also you can write faster Scanner