№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | djm03178 | 152 |
I observed a weird thing today in the Visual Studio IDE while solving the second question of Hourrank 25. This the the code.
On my local machine, the value of pre[0][0], automatically becomes 1 randomly anywhere inside the while loop. However, the weird thing is, if I initialise the value of fact[0] to 0, then everything becomes normal again. This is weird because the computation of fact has nothing to do with the value of pre[0][0].
I feel silly asking this, but what am I missing? The code which is giving wrong answer on the local machine , gives the correct answer on Ideone, and also fetches full marks after submission.
Can someone please help.
Thanks. Peace.
Let's discuss the hackerearth december circuits here.
The link to the competition is this.
This problem was the 6th problem in the last Educational Round. It requires the use of bitmask dp. I read through the editorial, but I can't understand, how the dp states are being defined. It would be really nice, if someone could help me with that.
Peace.
This was the fourth question in the November Lunchtime. I am not able to understand it, even after reading the editorial. Can someone please explain it in a bit more detail?
Contest link Problem Link Official Editorial Link Unofficial Editorial Link
I can not udnerstand anything in the official editorial.
I can't understand the dp states in the unofficial editorial, and also how to use the treap data structure being discussed in the editorial.
Why am I getting WA in this code?
I am dividing 'x' by all the prime numbers. To find the prime numbers, I am using the sieve. I know, it can be done without using the sieve, but when I am using the sieve, I am getting WA. Can someone please help ?
It would be really kind if someone could point out the bug.
Can someone give hints for the third and the fourth problems for the Codechef October Lunctime.
This is the problem link. This is my submission. It is getting TLE. I read another guy's recursive approach. It got full points. I don't understand, why this code is getting accepted, but mine is not.
Any help would be really appreciated.
Peace.
The problem is this.
After going through the tutorial, and through the discussions, and reading a lot of submitted solutions, I am not exactly able to grasp the concept behind this problem.
I am pretty sure, there's some underlying topic, which I am unaware of.
Can someone please suggest some underlying concepts to better understand this problem? It would be really kind.
Thanks.
This is the problem .
According to the accepted solution of other coders, the following test case gives a "Yes". But, shouldn't it give a "No" ?
6 1 2 1 1 1 1 1 1 6
Any help would be really appreciated.
The question is 459C.
I have understood the logic behind it. But, in order to generate the possible permutations, I am using DFS.
It gives a WA on test 7, saying that my code prints ":". But, I am not printing ":" anywhere in my code.
Any help would be really appreciated.
The problem is this.
The editorial says this:-
We need some observation: There exists an optimal solution such that: in any pile, the box on the higher position will have a smaller strength.
Let k be the minimal number of piles, then there exists an optimal solution such that: The height of all piles is n/k or n/k+1 (if n%k=0, then all of them have the height n/k).
We can prove them by exchange argument: from an optimal solution, swap the boxes in it to make above property holds, and we can ensure it will remain valid while swapping. Then for a given k, we can check whether there exist a solution: the i-th (indexed from 0) smallest strength needs to be at least i/k. So we can do binary search (or just enumerate, since n is only 100) on k.
Doubt:
Why does the ith index need to be atleast i /k ?
I am getting a WA on this problem. Can someone suggest, what is wrong with my logic?
Problem: http://codeforces.me/contest/85/problem/C
My submission: http://codeforces.me/contest/85/submission/30241748
I am getting a TLE on this problem using DFS. This is my submission. Can someone suggest some optimizations?
I am getting a WA on test 9 on this DIV 1A.
Is there a problem with my 'poss' function or the very dfs function itself?
This is my submission.
The question is this.
The solution is something like this:
dp[1] = 1, dp[2] =3 ;
for(int i =3; i <= n ; i++) dp[i] = dp[i — 1] + dp[ i- 2] + 2;
How did one come with the formulation dp[i] = dp[ i — 1 ] + dp[i — 2] + 2 ?
Any help would be really appreciated.
Peace!
Is anyone able to see the test cases on the submitted solutions?
Can someone from Codeforces comment on how long will we have to face this problem?
I thought this was a temporary glitch :-(
The question is this-> 757C
I am unable to understand anything in the editorial, as well as the given code. Can someone please help?
I am solving this DIV 2C. This is my submission which got accepted.
My question is this:
Why isn't updating the parent of a node, an O(n) operation ?
I am solving the problem DIV 1A. My submission is getting a TLE error. I went through the successful submissions as well, but I don't see any other logic. Any help would be appreciated.
I have doing competitive programming for 2 years.I solved all the DIV 2B problems, and then, I have been solving the DIV 2C problems topicwise. Unfortunately, I have stuck between the 1300- 1500 level for the two years. I am feeling very discouraged. Can you guys please suggest me what am I doing wrong? How should I practice?
I am getting "Accepted" when I am using C++ lower_bound function -> Submission
I am getting wrong answer using the binary search -> Submission
Can somebody please help?
I am getting a WA on testCase 6.
Question — Div 2C
Can someone please tell me what's wrong with the code?
In this problem Div 2C, how can the difference between the maximum visited and the minimum visted be more than 1 ?
Название |
---|