| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| How to reach high efficiency | kumiya | 1005. Куча камней | 7 янв 2022 22:29 | 4 |
My Python program solved this problem using 0.7+ seconds and 64000+KB memory. However, I saw some people solved it with Python using just about 0.1 secs and 500KB mem. Can anyone give me a hint about how to reach that efficiency? Try to use bitmasks instead of using recursion;) You can solve this task with (n/2) * 2^(n/2) complexity using meet in the middle |
| Hint | andreyDagger | 1439. Поединок с И-Так-Понятно-Кем | 3 янв 2022 14:16 | 1 |
Hint andreyDagger 3 янв 2022 14:16 |
| WA35 | andreyDagger | 1643. Атака Тёмной крепости | 2 янв 2022 21:24 | 1 |
WA35 andreyDagger 2 янв 2022 21:24 There can be more than one portal of same type |
| Why WA at # test 8? | SerailHydra | 1588. Ямайка | 2 янв 2022 15:26 | 5 |
I've WA#8 too.Interesting, what test is it?Thank!!! Edited by author 27.10.2007 17:54 And I had WA too; because of stupid mistakes. This tests helped me to figure them out: 5 0 0 0 2 1 1 2 0 2 2 9 0 0 0 10 0 20 10 0 10 10 10 20 20 0 20 10 20 20 The thing is that if you order edges by an angle (atan) and length and do binsearch it's still possible that there will be edges with an appropriate angle, bigger length but not the one you are looking for, so binsearch in this case will give you a wrong result, so try to find a way to order them simple test is 6 0 0 10 0 10 10 10 20 0 10 0 20 and the answer is 171 |
| I think everything is okay but i got WA.... | onevoltman | 1263. Выборы | 2 янв 2022 06:40 | 1 |
#include <stdio.h> int main () { int n, m; scanf("%d %d", &n, &m); int ara[n+1]{0}, temp; double result{0}; for (int i = 1; i <= m; i++) { scanf("%d", &temp); ara[temp]++; temp = 0; } for (int i = 1; i <= n; i++) { if(m == 0) { printf("0.00%\n"); continue; } result = (100.0 * ara[i] / m); printf("%2.2lf", result); printf("%\n"); } return 0; } |
| test 4 | Enots: Revolution | 1742. Тим-билдинг | 1 янв 2022 12:08 | 5 |
test 4 Enots: Revolution 24 янв 2010 08:52 What is test nubmer 4? Anybody know? Re: test 4 Zayakin Andrey[PermSU] 24 янв 2010 13:23 maybe 6 1 1 1 1 1 1 My program can`t pass this test and i have WA4. It's like this: 15 2 5 6 3 8 2 3 6 10 10 12 13 14 15 11 The right answer is: 5 8 Edited by author 24.01.2010 23:08 No the right answer is 3 8 |
| AC | Kirill~ | 1120. Сумма последовательных чисел | 31 дек 2021 10:46 | 1 |
AC Kirill~ 31 дек 2021 10:46 for (long double N = 1; N < sqrt(2*S)+3; N++) { } |
| AC,but have question | Felix_Mate | 1091. Тмутараканские экзамены | 30 дек 2021 12:57 | 2 |
Я решил с помощью ДП: f[i,k,d]-число способов выбрать k чисел от i до s, нод которых d. Работает 0.031 sec. Вопрос: как решить эту задачу именно с помощью теории чисел( я использовал в динамике только один факт: gcd(a1,a2,...,ak)=gcd(a1,gcd(a2,...,ak)))? Актуально ли это) но здесь можно решать еще с помощью формулуы включений-исключений. Предподсчитаем простые числа. Признаки в формуле - делимость на i. сочетаниями подсчитаем кол-во способов выбрать наборы. сочетания посчитаем динамикой |
| if you have WA9/WA11... | Egor Sibriaev | 1864. Посиделки у Дена | 30 дек 2021 00:44 | 1 |
I have problems with english. Sorry for example you answer is = int(ans) but use int(ans + 0.00001) and you will get AC |
| Small hint | Конобейцев Иван Олегович | 1127. Кубики | 29 дек 2021 14:25 | 1 |
Small hint Конобейцев Иван Олегович 29 дек 2021 14:25 There are only 6 available combinations. Take a dice and think if you can make it so that 1 is adjacent to 6? 2 to 5? 3 to 4? |
| Is it correct? | 👾_challenger128_[PermSU] | 1521. Военные учения 2 | 29 дек 2021 01:04 | 2 |
Test case: 5 5 Ans: 5 1 3 4 2 Test case: 10 2 Ans: 2 4 6 8 1 5 9 7 3 Is it correct ans? Of course 2nd one is wrong, it skips 10. I think, the correct answer for your second test is: 2 4 6 8 10 3 7 1 9 5 |
| WA on test 10 | yuety25 | 1471. Расстояние в дереве | 29 дек 2021 00:51 | 1 |
Can anybody tell me test 10? |
| If you have WA2 | s_shshsh | 1643. Атака Тёмной крепости | 28 дек 2021 23:39 | 1 |
"Impossible" should start with uppercase 'I' |
| Chinese translation | LightningUZ | 1310. Диагностика ACM | 26 дек 2021 13:19 | 1 |
参考 百度知道 给定L,M,K,N,求序列A的数量。满足: 1. A的长度为L 2. A中元素均在 [1,M] 间的正整数 3. A的元素之和为K的倍数 求字典序第N小的序列A,排名从0开始标号 (即,称最小为“第0小”) L<=100,M<=50,K<=50 N范围题目没有给 Edited by author 26.12.2021 13:22 Edited by author 26.12.2021 13:22 |
| WA 28 | LaVuna [NULP] | 1519. Формула 1 | 25 дек 2021 20:35 | 2 |
WA 28 LaVuna [NULP] 25 дек 2021 20:21 Can you help me with test 28? Yea, sure. Just try 6 6 ****** ****** **..** **..** ****** ****** answer: 1 |
| WA #6 | Kipsasjaujoj | 2000. Grand Theft Array V | 25 дек 2021 19:59 | 4 |
WA #6 Kipsasjaujoj 20 окт 2014 00:26 Anyone has any tests for WA #6? I am out of ideas already. The problem seems too simple... This test helps you: 10 1 2 3 4 5 6 7 8 9 0 4 3 answer: 39 6 |
| Special Judge? | fishpear | 1752. Дерево 2 | 24 дек 2021 16:14 | 2 |
The problem says the program only needs to print out any of the answers. but why i WA in the first test but can pass all my tests? |
| hint | Pavel | 1989. Подпалиндромы | 23 дек 2021 13:16 | 1 |
hint Pavel 23 дек 2021 13:16 If you are storing hashes in a segtree and using some custom prime divider the values of the parent nodes can be less than the child nodes because the remainder "makes a round", so to subtract u have to add that round, I think this is what is actually happening in test 2. |
| Can Vova go down by cableways? | Yermak | 1841. Канатные дороги | 23 дек 2021 06:43 | 6 |
Subj. Btw, what is the problem with the 23rd test? it's help me for wa23 4 0 4 0 4 0 1 0 1 1 0 1 1000000 0 1000000 0 Indeed! Thank you very much! Thank you very much! it's realy helpful!!! Very help!! Thank you again! |
| WA #6 | Furkat Ahrolov | 1207. Медиана на плоскости | 22 дек 2021 04:28 | 1 |
WA #6 Furkat Ahrolov 22 дек 2021 04:28 Help please!! What is test 6???? |