New answers tagged time-limit-exceeded
0
votes
Codeforces #806 Problem D: Double Strings
Move solution into a separate function
Doing this greatly improves code readability.
...
4
votes
Codeforces #806 Problem D: Double Strings
You are failing with the datastructures.
What you need is:
A string to mark your answers.
Start with all no.
A std::vector to collect your strings.
A way to ...
4
votes
Decibinary for xth number (Python code)
First there's some script cleanups I want to mention.
...
4
votes
Accepted
Time limit error in 'The Minion Game' using python in Hacker Rank
The number of substrings with a fixed starting point is just the length of the remaining string. Also you might want to use the string module a bit + some literals instead of ord. Additionally ...
2
votes
Find a secret word given an array of triplets? (codewars problem)
After some thought, I fixed some issues on the code:
The most important change was realizing that I didn't have to loop through each char in the array. I only needed to do it for the first char of ...
1
vote
Accepted
USACO Training - Section 1.5 - Arithmetic Progressions
The link you provided for an optimization suggested using a Boyer-Moore like algorithm. That got me thinking about using string.find() and then ...
2
votes
USACO Training - Section 1.5 - Arithmetic Progressions
PEP-8: consider renaming to calculate_bisquares()
and check_num().
Also, definitely make it lint clean with ...
Top 50 recent answers are included
Related Tags
time-limit-exceeded × 1020programming-challenge × 497
python × 370
algorithm × 241
c++ × 205
java × 166
python-3.x × 138
performance × 109
primes × 65
beginner × 61
javascript × 51
c × 50
strings × 49
c# × 43
mathematics × 38
python-2.x × 37
combinatorics × 35
graph × 33
dynamic-programming × 33
array × 30
complexity × 30
ruby × 25
sorting × 25
excel × 25
vba × 24