ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2040. Palindromes and Super Abilities 2

Fast reading
Posted by Aisultan Kali 14 Feb 2015 16:38
If you have TLE on 9 and you are using Palindomic tree, You should write cin/cout
with "ios_base::sync_with_stdio (false);" instead of scanf/printf
Re: Fast reading
Posted by Olympic Bear (Nikolay Dubchuk) 23 May 2016 20:14
cin/cout with "ios_base::sync_with_stdio (false);" got TLE on 9 for me.

But these lines are faster:

scanf("%s", input);
.....
puts(answer);

where input and answer are char arrays.