Show all threads Hide all threads Show all messages Hide all messages |
Overrated | andreyDagger | 1094. E-screen | 18 Dec 2021 13:32 | 1 |
Damn, how is this problem 440 difficulty, I solved it in 10 minutes |
If you're using segment tree and getting RE | andreyDagger | 2109. Tourism on Mars | 17 Dec 2021 21:07 | 1 |
|
Don't waste your time if you can't solve this problem | mksdbk | 1260. Nudnik Photographer | 16 Dec 2021 21:09 | 1 |
The DP version actually harder than you think. The solution with magic formula is disappointing. Go solve other problems and come back later. The score of problems are calculated by number of accepted solutions, and some problems are very popular and people find out answers and send ready solutions. |
Advices after almost a week spent on this task. | prituladima | 1307. Archiver | 14 Dec 2021 16:37 | 1 |
0. I wanted to implement universal approach with Huffman coding + compressing binary code to 64 base code. Not just eng text property (I was upset, because for so interesting task so stupid solution works). 1. I'm Java developer, and I afraid that Java consume too much memory even for input. So I have to rewrite all to cpp. 2. Thinks that costs me a lot of time. Input in cpp. (If you can explain what is wrong. please do ) WRONG inputData = ""; std::string line = ""; while (std::getline(std::cin, line)) { inputData += line; //inputData.push_back('\r');//todo maybe we need \r\n inputData.push_back('\n'); } CORRECT inputData = ""; int c; while ((c = getchar()) != EOF) inputData.push_back((char)c); 3. Escaping characters to produce cpp code: std::string escape(char ch) { switch (ch) { case '\'': return "\\'"; case '\"': return "\\\""; case '\\': return "\\\\"; case '\b': return "\\b"; case '\f': return "\\f"; case '\n': return "\\n"; case '\r': return "\\r"; case '\t': return "\\t"; default: return {ch}; } } I finally got AC. So I wish you good luck with this problem and thank to author so interesting problem. |
Для решения через regex wrong answer | Igor | 1001. Reverse Root | 12 Dec 2021 05:18 | 1 |
import re pattern = re.compile(r"\d+") matches = re.findall(pattern, input()) for i in matches[::-1]: print(f"{float(i)**0.5:.4f}") Input: " 1427 0 \n 876652098643267843 \n5276538" |
No way | andreyDagger | 1000. A+B Problem | 11 Dec 2021 16:04 | 1 |
No way andreyDagger 11 Dec 2021 16:04 No way, this become harder than 1293. Eniya. We did it, guys!!! |
How to get 0.015 solution on python? | Egor Sibriaev | 1000. A+B Problem | 11 Dec 2021 15:11 | 1 |
|
Против Угнетения Колдовских Народов-Изгоев(ПУКНИ) ахахахахахахахахах | Egor Sibriaev | 1446. Sorting Hat | 9 Dec 2021 19:15 | 1 |
|
WA3 test | Gleb | 1134. Cards | 9 Dec 2021 12:06 | 3 |
Some useful tests for WA3: 3 3 2 2 3 answer: NO 4 3 2 2 3 answer: YES No these won't help for WA at 3. |
Use C++ | Конобейцев Иван Олегович | 1120. Sum of Sequential Numbers | 8 Dec 2021 15:39 | 1 |
Use C++ Конобейцев Иван Олегович 8 Dec 2021 15:39 Bruteforse gets TL on Python but works on c++ |
Problem 1013. K-based Numbers, Version 3 was changed | Vladimir Yakovlev (USU) | 1013. K-based Numbers. Version 3 | 6 Dec 2021 02:06 | 2 |
The limitations and input/output format were changed. Old submission were moved to the problem 1012. Shouldn't the complexity of the problem be changed as well? Not sure that the complexity 189 corresponds to the intended solution for the new limitation. |
WA #11 HELP | Furkat Ahrolov | 1931. Excellent Team | 5 Dec 2021 02:10 | 1 |
What is test 11? Edited by author 05.12.2021 02:11 |
Why p is prime? | Dirichlet | 1560. Elementary Symmetric Functions | 3 Dec 2021 20:36 | 6 |
Is it possible to use somehow that p is prime? My AC solution doesn't use this fact, but I'm wondering is there a simpler way to solve this task. Complexity is (M + N) * log N, where N is a size of the array and M is a number of queries I needed primality of 'p' when I calculated S(K) from sums of powers for Ai. I needed to divide by 2, 6 or 24 in the end. Primality plays important role when you find inverse of these divisors modulo 'p'. Also the fact that S>1000 was also convenient fact because some multiplications would turn to zero for quite small p. This problem is named "Elementary Symmetric Functions". There is formula (by Newton) that gives relation between elementary symmetric polynomials and "power sums" (that are symmetric too). Formula used division that can be done in general case only by prime modulo. But it can be solved without knowing any special about these polynomials. In this case solution doesn't need the primality of P. And then we have a data structure problem only, not number theoretical :) I used interval tree and memoization of sums on subsegments. And still the 4 seconds limitation is too large. upd: Fenwick tree is better ;) Edited by author 10.09.2011 23:40 I understand how to solve the problem with combinatoric formula and 4 segment trees, can you please explain the second way? |
Мне жалко этого дедушку | Виталий Черков | 1457. Heating Main | 3 Dec 2021 09:16 | 5 |
А мне жалко стану, которая до сих пор живёт так( Да боже. Вы, тупые нытики, даже на сайте с программированием ноете. Как же вы задолбали уже. Никто так не живёт |
Hint for everybody! : ) | Pavel Nikolov | 1084. Goat in the Garden | 2 Dec 2021 10:06 | 6 |
Hi I think that we should help each other. If someone resolves a problem he/she must help the others with materials or links where the algorithm/formula is explained. This is the reason we are users of such sites - because we want to improve our programming skills. So I decided to help all of you who find this problem difficult. Here you can find help: http://en.wikipedia.org/wiki/Circular_segment http://www.mathopenref.com/segmentarea.html The rest is up to you! HTH Edited by author 22.10.2013 12:23 thanks dude, i didn't even understood what the question was asking :) Thanks, bro, you are real man! |
C++ wrong answer test1 | hjkhg | 1877. Bicycle Codes | 30 Nov 2021 13:38 | 2 |
i checked it manually and answer was correct. Why does if fail? Code: #include <iostream> int main(){ std::string lock1, lock2; std::string result = "yes"; int code = 1; int lock_val1, lock_val2, cur_value; bool lock_state = false; std::cin>>lock1; std::cin>>lock2; lock_val1 = std::stoi(lock1); lock_val2 = std::stoi(lock2); while (code < 10000) { if (lock_state == true){ cur_value = lock_val1; } else{ cur_value = lock_val2; } if (code > lock_val1 && code > lock_val2){ result = "no"; break; } if (code == cur_value){ break; } lock_state = !lock_state; ++code; }
std::cout << result << std::endl; return 0; } Edited by author 30.11.2021 13:19 Edited by author 30.11.2021 13:19 Edited by author 30.11.2021 13:24 Edited by author 30.11.2021 13:37 It passed, there was a typo. |
Test 10 Division by zero | andreyDagger | 1291. Gear-wheels | 29 Nov 2021 16:59 | 1 |
When i used dfs, i was getting "Division by zero" on 10 test. Then' i switched to bfs and got AC. Can you explain me: WHY? |
For WA#12 | springWaltz | 1145. Rope in the Labyrinth | 29 Nov 2021 14:49 | 1 |
|
give me some test please!!! | bilol | 1701. Ostap and Partners | 28 Nov 2021 23:44 | 7 |
Check this test 4 3 1 2 100 3 0 100 1 3 -100 Impossible after 3 statements Edited by author 04.04.2009 22:09 But I think the answer should be "Impossible after 1 statements"...I used BFS and I also got WA on test 7 afte statement 1 it will be: 0 100 0 problem?!?!? Edited by author 17.05.2014 22:59 before AC my prog failed on these tests: 1) 7 3 2 1 1000000000 3 1 15 4 5 -20 answer: Possible 0 0 1000000000 15 0 20 0 2) 7 4 2 1 1000000000 3 1 15 4 5 -20 4 2 1 answer: Impossible after 4 statements 3) 8 4 1 2 200 2 3 999999800 3 1 -1000000000 4 0 5 answer: Possible 0 1000000000 999999800 0 5 0 0 0 Test 2 is not correct due to statement restrictions. |
Stupid task (RTE 13) | andreyDagger | 1941. Scary Martian Word | 28 Nov 2021 11:47 | 1 |
Length of the first string can be bigger than length of the second string. I spent 15 submissions to realise this |