Can someone help me as to why I am getting a memory limit exceeded result in problem F of last contest question:https://codeforces.net/contest/1675/problem/F my solution:https://codeforces.net/contest/1675/submission/156068401
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Can someone help me as to why I am getting a memory limit exceeded result in problem F of last contest question:https://codeforces.net/contest/1675/problem/F my solution:https://codeforces.net/contest/1675/submission/156068401
I was solving this questions:https://codeforces.net/contest/1334/problem/C My solution:https://codeforces.net/contest/1334/submission/141932259
Could someone tell me why is this exceeding the time limit even though it is a O(n) solution?
So I was solving this question-https://codeforces.net/contest/1608/problem/C This is my solution-https://codeforces.net/contest/1608/submission/138765806 Approach-First I consider the first array which is given to us and sort it in decreasing order. Now I traverse this vector from start and i insert all the elements from the second vector in a set. :-the first element is the greatest so it would be able to defeat all the players. Then when we go to the second player,it can defeat all the players except the players who are before him in the array.So i use the set and see if any of the players can defeat the the first element in the second map(not the data structure). and this way i traverse the whole vector
Now i do the same steps performed above by putting strengths of second map in vector,sort and put the strengths of first map in a set and do the same thing done above.
I was solving this problem-https://codeforces.net/problemset/problem/1613/E This is my solution-https://codeforces.net/contest/1613/submission/138713743 Can pls someone tell me what is wrong here.
Название |
---|