622C - Not Equal on a Segment 15943480 It gives TLE on test case number 14!
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
622C - Not Equal on a Segment 15943480 It gives TLE on test case number 14!
Given an array of integers and a range find the count of subarrays whose sum lies in the given range. Do so in less than O(n^2) complexity.
Given a number n, how to perform atmost k swap operations on number's digits to get the largest number. Ex- n=7899, k=2 ans=9987
Given an array of 3 different colored balls, we have to sort it using minimum number of swaps. It could be done in O(n) using 3-pointers and two traversals(one to count no. of occurrences of each color and other to sort). Could this be implemented in one traversal(count is not known before).
Link to problem:- http://www.codechef.com/problems/SUBARRAY
Link to solution:- http://www.codechef.com/viewsolution/7071035 Can anyone tell me the testcase my code gives wrong output for.
int main()
{
//Beauty is in relaxed hard work.
//SSGCA :)
//Keep doing your thing, complexity would turn into simplicity! :)
unsigned short int a=0xffff;
~a;
printf("%x",a);
return 0;
}
Why does this program output 'ffff' and not 0000?
Hey, could anyone please share problems on codeforces based on vertex cover problem. Thanks :)
The problem statement can be found here-> (http://www.codechef.com/DBYZ15/problems/DBYZ15C).
Why do many programmers use assert() function in their codes giving as its argument the answer to be outputed?
Name |
---|