ACM-ICPC Cheat Sheets : Contents from Personal Library of ACM-ICPC


Hey, Guys I know many of you are so passionate about ACM-ICPC and other upcoming Competitive Programming events.I think it’ll help you a lot because it’s an ACM/ICPC SELF TRAINING kit.
In my view, it’s good for ACM-ICPC because it contains some important stuff which can be found only in ACM-ICPC Personal library but if you’re new you can’t access a personal library of ACM-ICPC because it can only access by registered members.
So, I think it’ll help you in upcoming events of ACM-ICPC.

How can you get it for free?

You can fork it on your git repo or download it from below link:
It contains some facts actually.If you want you can go through it.


  • StreamTokenizer and PrintWriter is faster than Scanner and System.out
  • Reform of Token from StreamTokenizer is necessary: (int)input.nextToken()
  • Use multiple Scanner in one program will cause problem (Runtime Error).
  • Java cannot manipulate each elements in the string (read only). So, if you don’t like subString() method, you can easily use toCharArray() method to do such operation.
  • Generally, Java is slower than C++ (especially for manipulating character and IO)
  • If you want to duplicate an array in a short time, use clone() method
  • Java’s split() method is a masterpiece, can make code shorter.
  • Arrays.sort() has range [1,n). So if you are sorting an Array with 1~n, you should call Arrays.sort(a,1,n+1).
  • BigInteger and BigDecimal is good to use, but very very slow.
  • replace() method in String is a little bitch, so be careful.


    • This code will redirect standard IO stream to file IO stream: freopen("input.in","r",stdin);freopen("output.out","w",stdout); Use such code, you can read data from the file directly with andcin cout.
    • Although removing a character in the string is a bit difficult, however, if you can change the character you want to remove to a unique character, it will look like being removed.
    • Remember to use EOF when there is no end. (can’t be seen in keyboard input, but can use a file to demonstrate.

Want to know more

Download or fork it right now from here

{Code With Code@ter}

Leave a Reply