Java vs C++

Revision en2, by dp_hunter, 2016-09-01 15:46:46

Hi codeforces.

I tried to solve this problem and for my interest I wrote the same problem in Java and after this in C++.

And this are the results :

Java = 1092ms;

C++ = 421ms;

So C++ is ~ 2,5 faster than Java, so this difference can make you win or lose a problem during the contest.

Maybe I make something wrong in Java and Java is faster than I think? So I have few day since I start to solve in Java ,hope to receive from you good hints for making my Java program run faster.

I didn't make any changes in C++ program, just rewrite the same program from Java in C++

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English dp_hunter 2016-09-01 15:47:16 4 Tiny change: 'from Java in C++**\n ' -> 'from Java to C++**\n '
en2 English dp_hunter 2016-09-01 15:46:46 96
en1 English dp_hunter 2016-09-01 15:42:59 671 Initial revision (published)