ENG
RUS
Timus 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
Discussion of Problem
2040
. Palindromes and Super Abilities 2
Show all threads
Hide all threads
Show all messages
Hide all messages
A way to reduce memory
Igor Parfenov
2040
. Palindromes and Super Abilities 2
18 May 2020 14:00
1
A way to reduce memory
Igor Parfenov
18 May 2020 14:00
Maybe I'm an addict, but since n<=5e6<2^24 I used unsigned short + unsigned char in order to immitate 3 byte integer type.
Fast reading
Aisultan Kali
2040
. Palindromes and Super Abilities 2
23 May 2016 20:14
2
Fast reading
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
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.
try this test case:
Adhambek
2040
. Palindromes and Super Abilities 2
4 Jan 2015 22:13
1
try this test case:
Adhambek
4 Jan 2015 22:13
aaabbbababbaaaa
ans:
111111111111001
Edited by author 04.01.2015 22:13
Edited by author 04.01.2015 22:15
New topic
Style:
flat
|
tree
|
nested
Thread Order:
bubble
|
fixed
© 2000–2024
Timus Online Judge Team
. All rights reserved.