| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| Simulation Time Complexity | taodaling | 1777. Племя аниндилъяква | 3 авг 2023 13:18 | 1 |
Let's assume delta is the difference between the nearest number in our set. Then we can approve delta will decrease by half (at least) in every 2 rounds. So the simulation will be executed at most 2log 10^18 time, it's about 120. |
| Very interesting problem, thanks! | coder | 2049. Химия | 1 авг 2023 17:26 | 1 |
k = 1 k = 2^m for some m k = n k = n-1 cases are enough for solve problem :) |
| C++ accepted | Evgeny | 1225. Флаги | 31 июл 2023 19:58 | 1 |
#include <iostream> #include <vector> using namespace std; int main() { int N = 45; int M; cin >> M; vector <long long> a(N+2); a[0] = 2, a[1] = 2;
for (int i = 0; i < N; i++) { a[i+2] = (a[i+1] + a[i]); }
//Fibonacci sequence
// F0 = 2; // F1 = 2; // Fn = Fn-1 + Fn-2 cout << a[M-1]; return 0; } |
| New problems | Sandro (USU) | | 27 июл 2023 17:36 | 1 |
Problems 2158-2173 from Ural School Programming Contests 2021 and 2022 were added to the Problem set. |
| Who can throw suitable tests which can not work? | Andrey | 1997. Это не те дроиды, которых вы ищете | 26 июл 2023 20:53 | 2 |
This is my tests: <Test 1> input: 10 5 8 1 0 2 0 3 1 4 1 5 0 6 0 15 1 16 1 output: No reason 5 15 6 16 1 3 2 4 <Test 2> input: 11 1 18 1 0 2 0 3 0 4 0 6 0 7 0 8 0 9 0 11 0 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 output: Liar <Test 3> input: 4 2 8 7 0 8 0 9 0 19 1 20 0 21 1 22 1 23 1 output: No reason 20 21 7 19 8 23 9 22 Edited by author 29.03.2023 21:01 Your output for test 2 is incorrect. My AC solution gives: No reason 1 13 2 14 3 15 4 16 6 17 7 18 8 19 9 20 11 12 |
| Hint: use DP | Raphael Osipov | 1353. Миллиардная Функция Васи | 25 июл 2023 20:54 | 1 |
try think like dp[length of string][sum of string] = count of numbers, answer is dp[9][s]. |
| If you got WA#3 or WA#16 | <<~Kossack~>> | 1600. Аэропорт | 24 июл 2023 18:06 | 9 |
ds:=sqr(b)-a*c; the checking must look like this if ds+0.000000000001>=0 then ... Also when I calculated square roots for a*t^2 + 2*b*t + c = 0 as t1,2 = (-b +- sqrt(b^2 - a*c)) / a I had wa3. When I use b = 2.0 * b t1,2 = (-b +- sqrt(b^2 - 4.0*a*c)) / (2.0*a) I got AC. It is very curiously... I has WA#3. Even, i use check ds+0.000000000001>=0. I don't understand what's wrong. :( Can you talk me what in test 3? If ds passes this test, it may be less than zero. so, if it is less than zero, reset it to zero. otherwise, sqrt won't perform as expected. Also check for possible -0.000 replies (that happens in printf("%.3lf") when number is negative, but becomes zero after round-up). Some checkers do not like that. Is negative time a possible answer? :( There is curious fact, that you can get AC with eps = .1! Most important do not forget about: If ds passes this test, it may be less than zero. so, if it is less than zero, reset it to zero. otherwise, sqrt won't perform as expected. I also checked abs(ds) < eps , then t = -b/(2*a) Without it, it was WA3 |
| WA 14 | anotherworld | 1325. Грязь | 24 июл 2023 00:15 | 1 |
WA 14 anotherworld 24 июл 2023 00:15 THIS TEST 6 5 1 3 6 3 11112 22221 11112 22212 21112 22222 ANS:7 1 |
| easy bfs | 👑TIMOFEY👑`~ | 2140. BitMazeCraft | 23 июл 2023 14:34 | 1 |
|
| TL so strict | Silomett | 1434. Автобусы города Васюки | 23 июл 2023 07:56 | 1 |
qwq Edited by author 23.07.2023 08:21 |
| WA4 | MyRoot | 1871. Сейсмические волны | 23 июл 2023 01:14 | 3 |
WA4 MyRoot 22 окт 2018 19:29 I am using Dijkstra's algorithm(and skip first vertex). I output a list of names whose shortest distance is less 141. I can't find the tests that crack my solution... Give me tests, please) When a user retweets, It is NOT their name that is added to the line! Re: WA4 InstouT94 23 июл 2023 01:14 OMG, I had the same stupid mistake! |
| WA 3 | Cat36 | 1590. Шифр Бэкона | 22 июл 2023 18:05 | 5 |
WA 3 Cat36 11 ноя 2008 23:42 Give me some tests, please Edited by author 11.11.2008 23:43 Re: WA 3 Aleksandr oO Shvarkunov [Pskov SPI Kamikaze] 2 фев 2009 20:14 abab answer - 7 It helped me with WA3 (Z-function O(N^2) solution) rthfdffdfdfffffdddffdgdfdfdg answer - 349 hshhflgseiuajsliouew answer - 202 gggfffgggghhhhghh answer - 126 aaaabbbbfghjjlltrgttcdssdbnpoiuyewtdarsuorprpooeuyywdgfxsdkkvcjbidfryieiue answer - 2713 Edited by author 02.02.2009 20:14 Edited by author 02.02.2009 20:21 If you use Z-function don't forget re-initialize z-array before each iteration!!! z[0]..z[i] = {0} hm... This are tests successful, but error on 1 test try bbbabbbababb answer is 51 |
| Give you some testcases,maybe can help you | Sihang | 1066. Гирлянда | 21 июл 2023 17:45 | 3 |
999 987.23 answer 934270.79 3 100 answer 0.00 4 1000 answer 0.00 5 12 answer 0.00 thank you. Try this if you have WA3. |
| WA26 | andreyDagger`~ | 1913. Руины титанов: расстановка сил | 21 июл 2023 00:03 | 1 |
WA26 andreyDagger`~ 21 июл 2023 00:03 eps >= 1e-9 - WA26 eps = 1e-7 - AC |
| Time limited | Тимур | 2117. Полифемовы тройки | 18 июл 2023 22:31 | 2 |
Obviously sqrt(1e18) operations will TLE. You need to do factorization smarter. Perhaps some divisors are not needed to find the solution? |
| easy bfs | 👑TIMOFEY👑`~ | 1301. Кубик в лабиринте | 17 июл 2023 08:22 | 1 |
|
| WA6 | 👑TIMOFEY👑`~ | 2147. Градостроение | 16 июл 2023 23:49 | 1 |
WA6 👑TIMOFEY👑`~ 16 июл 2023 23:49 4 5 4 5 1 2 2 1 2 3 3 2 3 4 ans: 14 |
| test 7 wrong | Andrewq | 1005. Куча камней | 15 июл 2023 06:08 | 1 |
Edited by author 15.07.2023 07:47 |
| Damned solution | andreyDagger`~ | 1148. Building Towers | 15 июл 2023 01:29 | 1 |
I used my own hash map with modulo 1e5, and buckets with size equal to one |
| WA7 | Parassat Kyzyrkanov | 1574. Математики и скобки | 14 июл 2023 12:24 | 1 |
WA7 Parassat Kyzyrkanov 14 июл 2023 12:24 it's the case where count of '(' is greater than ')'. For example: (( or (() |