| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| SPOILER. Hint | andreyDagger | 2065. Различные суммы | 25 сен 2021 20:31 | 1 |
Fill n - k + 1 elements with zeros |
| Questions on statement | Jane Soboleva (SumNU) | 1524. Men in Black | 25 сен 2021 13:11 | 2 |
1. There's a «pair stat» thing... then, there are 4 quest descriptions above. In those formulas, it's not quite clear whether i should use pair stat or individual stat in each case. For instance, «The time needed to perform investigation by an agent with intelligence i is mint/i where mint is the minimal time required to perform this investigation. After completing the investigation the agent gets (1−x)·i/mint experience, where x is agent's experience before the operation. His intelligence increases by (1−i)·i/mint.» — should i use pair int or individual int in each case? I assumed that for mint/i we use group i to make it faster, and for latter two formulas we use individual exp and int (calculation as if everyone completed the quest by himself...) Of course, judging by accuracy stat, which being used in a group makes it only worse (or at least not better), it's very likely i should also use other similar stats as group stats, but... 2. I'm also wondering about quest talk (negotiations), should i use group stats there at all? For kill, there's «The number of monster kinds (at most 50), after that for each monster kind: the minimal experience needed to kill a monster of this kind, minimal intelligence needed to kill a monster of this kind»; For investigation, there's a «minimal intelligence required to perform the investigation» given; But for negotiations, there's given «the minimal experience >>>of an agent<<< that can take part in negotiations» — does that mean that i should use group stats in 2 and 3, but not in 4? 3. For negotiations quest, if there's an agent with good exp (0.9) but bad wlk and drv (0.01 each) + agent with 0.99 drv and a car, to make it fast; but with slightly worse exp of 0.85; and the minimal exp required for negotiations is 0.8. So: if for question 2 above, i shouldn't use group stats in here, but only individual ones — then, are they both forced to take part in discussions, resulting in a time of 0.85exp usage; or 0.85exp guy can safely ignore the negotiations part? And if he does that, will he receive exp too in the end? UPD: 4. Agent A (0.9drv) and Agent B (0.8drv) go together in a car. A levels up driving after the quest. Does B too? 4.1. If he doesn't, then if A with 0.9drv and B with 0.9drv go to the quest (say, they're obliged to, because they have 0.5exp both, and monster requires 0.51, which would be met for a pair exp), then which one receives driving exp? UPD: 5. Should stats be rounded to 2 digits after modifying? So many questions, so little answers... Edited by author 03.06.2016 04:02 5. Should stats be rounded to 2 digits after modifying? |
| Strange approach | andreyDagger | 1047. Простые вычисления | 24 сен 2021 18:05 | 1 |
I bruteforced for all integers in range(-2000,2000) and got the best approximation for value a1. Then I brutforced for all doubles in range(a1-100;a1+100) and got AC |
| If you are getting WA12 | andreyDagger | 1184. Cable Master | 24 сен 2021 16:07 | 1 |
Try this: 1 5 1.00 answer: 0.20 |
| WA7 | zwqzwq | 1271. Лоцман | 24 сен 2021 13:16 | 1 |
WA7 zwqzwq 24 сен 2021 13:16 try longdouble XD I used longdouble instead of double and got AC |
| TL | Arseniy | 1152. Кривые зеркала | 24 сен 2021 06:10 | 3 |
TL Arseniy 30 апр 2016 23:29 My sulution a has n^2 * 2 ^ n and get TL accepted solution supposed to be O(n * 2^n), right? Re: TL Jane Soboleva (SumNU) 1 май 2016 01:03 You can manage with a blunt force solution, but you have to make it at least slightly optimized. I got AC in 1.8s by recursively searching for available combos of 3, and if on another step there were none, i searched for positions to destroy at least one. Re: TL Stepan 24 сен 2021 06:10 1000 1000 1000 50 50 1000 1000 1000 1 1 1 1000 1000 1000 50 50 in this case you need to shot combos of 2 (50 50) earlier then combos of 3 (1 1 1) (when combos (1000 1000 1000) are shoted) |
| I have some tests... | Dim | 1255. Кладбище мафии | 23 сен 2021 15:15 | 10 |
I have some tests for my program: N K Result 3 2 4 4 3 5 4 2 8 5 2 12 5 3 8 5 4 6 6 2 18 6 3 12 6 4 8 6 5 7 7 2 24 7 3 16 7 4 12 7 5 9 7 6 8 8 2 32 8 3 21 8 4 16 8 5 12 Check my answers, please! Thank you. > I have some tests for my program: > N K Result > 3 2 4 > 4 3 5 > 4 2 8 > 5 2 12 > 5 3 8 > 5 4 6 > 6 2 18 > 6 3 12 > 6 4 8 > 6 5 7 > 7 2 24 > 7 3 16 > 7 4 12 > 7 5 9 > 7 6 8 > 8 2 32 > 8 3 21 > 8 4 16 > 8 5 12 > Check my answers, please! > Thank you. Some you tests are wrong... For example: 8 5 -> 11, 7 4 ->10, etc... Edited by author 15.08.2008 16:19 Edited by author 09.12.2012 18:28 Edited by author 09.12.2012 18:28 for 8 5 correct answer is 12 1 1 1 2 2 2 2 2 1 1 1 2 2 2 2 2 1 1 1 2 2 2 2 2 1 1 1 x x 3 3 3 1 1 1 x x 3 3 3 4 4 4 4 4 3 3 3 4 4 4 4 4 3 3 3 4 4 4 4 4 3 3 3 Thanks for tests! It helped me got AC. |
| Hint | joaopfg | 1410. Трещина | 23 сен 2021 05:48 | 2 |
Hint joaopfg 29 июл 2018 07:18 Take care in the cases of multiple lines. I was thinking it wasn't possible and it was giving me WA5. When I took care of it I got AC. |
| WA#4 | LittleStuart | 1084. Пусти козла в огород | 23 сен 2021 01:28 | 1 |
WA#4 LittleStuart 23 сен 2021 01:28 Why I have WA? #include <iostream> #include <cmath> using namespace std; int main() { double const pi = 3.14159265358979323846; double a; double r; cin >> a >> r; long double s = pi * r * r; if (r <= a / 2) { cout << roundl(s * 1000) / 1000; } else if (r >= ((a / 2) * sqrt(2))) { cout << (int) (a * a) << endl; } else { double cosx; cosx = (a / 2) / r; double rad; rad = acos(cosx) * 2; double segm = (r * r / 2) * (rad - sin(rad)); s = s - 4 * segm; cout << round(s * 1000) / 1000 << endl; } return 0; } |
| Another approach | andreyDagger | 1684. Последнее слово Джека | 22 сен 2021 20:34 | 1 |
Solved with Z-function in 17 rows of code (if don't count 10 rows for Z-function) |
| WA#25 any hints? | zwqzwq | 1199. Мышка | 22 сен 2021 17:21 | 2 |
I've got AC My heap was so small...(Could anyone talls me why 400 is unenough?) Edited by author 22.09.2021 17:55 Is there any special test? |
| TL | andreyDagger | 1603. Эрудит | 20 сен 2021 15:25 | 1 |
TL andreyDagger 20 сен 2021 15:25 If you use mask as two-dimensional array you probably will get TLE, instead of this use bitset from STL Edited by author 20.09.2021 15:25 |
| Some tests for... :-) | Oleg Strekalovsky [Vologda SPU] | 1494. Монобильярд | 20 сен 2021 14:03 | 4 |
5 2 4 3 1 5 Not a proof 5 2 4 1 3 5 Cheater I thought he could only come in the end. Thanks :) Удалил сообщение, т.к. понял свою ошибку. Edited by author 20.09.2021 14:14 |
| test for WA6 | vegetable | 1796. Парк аттракционов | 19 сен 2021 22:50 | 1 |
|
| DP | vegetable | 1044. Счастливые билеты. Easy! | 17 сен 2021 19:11 | 1 |
DP vegetable 17 сен 2021 19:11 n/=2; dp[n][n*9]; dp[i][j] = dp[i-1][j]+dp[i-1][j-1] + ... + dp[i-1][j-9]; ans = dp[n][0]*dp[n][0] + ... + dp[n][n*9]*dp[n][n*9]; Edited by author 17.09.2021 19:12 Edited by author 17.09.2021 19:12 |
| SPOILER. Hint | andreyDagger | 1125. Классики | 16 сен 2021 16:21 | 1 |
Precalculate pythagorean tripples |
| Weak tast | zwqzwq | 1128. Деление на группы | 15 сен 2021 19:08 | 1 |
9 3 9 8 2 3 7 3 1 2 4 2 2 5 3 3 7 6 4 3 9 8 5 2 5 2 2 6 1 2 6 1 Please try this data,please My progame can't pass this,but I got AC |
| test 30 100 eng text "GOV Chronicles" = 4 | vegetable | 1881. Длинное условие задачи | 14 сен 2021 22:10 | 1 |
|
| What's wrong? test 3 WA | Alex | 1263. Выборы | 13 сен 2021 21:19 | 1 |
My code: n,m = map(int, input().split()) dct = dict() for i in range(m): a = input() if a not in dct: dct[a] = 1 else: dct[a] += 1 for i in dct: print("{0:.2f}%".format((dct[i]/m)*100)) Where is mistake? Edited by author 13.09.2021 21:32 |
| Difficulty is overrated | 👾_challenger128_[PermSU] | 1049. Отважные воздухоплаватели | 13 сен 2021 20:50 | 3 |
Hint: you should only know fundamental theorem of arithmetic It's easy if you know that number of divisors is (n_1+1)*(n_2+1)*...*(n_k+1), where n_i is power of prime that is included in number decomposition |