Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
When the code scales so poorly in the face of large inputs that it cannot complete in a reasonable amount of time, use this instead of the [performance] tag.
2
votes
3
answers
194
views
Calculating number of variations
I was practicing for the upcoming zco in CodeChef, where I came across this problem:
Given some number \$K\$ and a list of \$N\$ numbers, count the number of pairs (\$i\$, \$j\$) such that \$1 \le …
1
vote
2
answers
128
views
Code for calculating number of variations
Following up from my previous question where I put up a solution in brute for algorithm to this problem from codechef.
Given some number \$K\$ and a list of \$N\$ numbers, count the number of pair …
0
votes
1
answer
109
views
Recovering permutation from its image sequence
Recently while practicing I came across this problem , here is an excerpt from it,
A permutation of the numbers 1, ..., N is a rearrangment of these
numbers. For example
2 4 5 1 7 6 3 …
7
votes
4
answers
1k
views
Code for calculating citizens beheaded
Recently I came across this problem ,
A despotic king decided that his kingdom needed to be rid of
corruption and disparity. He called his prime minister and ordered
that all corrupt citizens …
3
votes
2
answers
500
views
Code for calculating the books dispatched
Recently I came across this, here is an excerpt from it,
This is another problem about Indraneel's library. His library has one
long shelf. His books are numbered and he identifies the books by
…
1
vote
3
answers
1k
views
Code for calculating best possible combination in an array
The problem here , requires me to find the best possible combination of values in an array which is nearest to 0 and are adjacent to each other , here is an little excerpt from it,
The government …
3
votes
1
answer
530
views
Code for dividing gifts equally
I recently came across this problem:
It is Lavanya's birthday and several families have been invited for
the birthday party. As is customary, all of them have brought gifts
for Lavanya as well …
8
votes
5
answers
3k
views
Counting pairs of integers whose sum is less than a given threshold
Recently I was going through this codechef problem while practicing for the upcoming zoc.
The problem asks to calculate number of combinations of the given numbers where the sum is less than another …
1
vote
3
answers
90
views
Finding the nth machine encountered on the journey
Recently I came across this problem in the IARCS server,here is an little excerpt from it,
A well-known bandit who used to haunt the forests around Siruseri was
eliminated by the policemen a few …
4
votes
1
answer
1k
views
Finding the max cost from the minimum cost incurred on travelling
This problem is from INOI 2014 , where I have find out the maximum cost of traveling through the cities but taking the minimum possible route cost , here is an excerpt from it,
Indian National Olympi …