| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| If you got WA | Rumter (1) | 1018. Двоичная яблоня | 7 авг 2020 13:08 | 23 |
0) AC solve is DP on tree. 1) In DP inf = 1e9. 2) All test in the forum: 5 5 3 1 1 4 1 10 2 3 20 3 5 20 ans = 21 7 4 1 2 10 1 3 20 2 4 30 2 5 0 3 6 0 3 7 40 ans = 100 4 1 1 2 1 1 3 2 2 4 3 ans = 2 5 1 1 2 1 1 5 0 2 3 0 2 4 0 ans = 1 7 3 1 2 1 1 3 39 2 4 40 2 5 40 3 6 39 3 7 39 ans = 117 5 2 1 3 1 1 4 10 2 3 20 3 5 20 ans = 21 Edited by author 12.05.2008 19:54 thanks a lot for your test cases! Thank you for test data. I suppose there is typo in case #1. Correct answer must be 51. Why in the first example ans=21? I think it must be 51. Why in the first example ans=21? I think it must be 51. First test is incorrect. Q must be <=N-1. I could AC all your tests, but I still got WA. My falt was that my inf was too litlle ^^ thx a lot! 吃粪汁啦 第一组和第三组数据吃粪一样的。。。第一组很明显不可能啦 第三组这叫一个苹果“二叉”树 Edited by author 03.12.2011 06:51 Edited by author 03.12.2011 06:51 3-rd test case is incorrect, because "any biparous branch splits up to exactly two new branches" Remember that the tree should always be a tree (you can't split it into several components)... are you sure i think 5 5 mean we must have all vertex ans ans is 51 5 5 3 1 1 4 1 10 2 3 20 3 5 20 ans = 51 |
| hint | Rodion | 1924. Четыре чертёнка | 6 авг 2020 20:30 | 1 |
hint Rodion 6 авг 2020 20:30 no matter who plays first and which sign is between numbers |
| tests ;) | Mapu | 1931. Отличная команда | 5 авг 2020 20:10 | 2 |
5 5 4 3 2 1 (2) 1 1 (1) 10 3 3 4 2 5 6 1 9 9 3 (4) wrong answer on 1st test obmanul suka |
| output format hint (wa1) | Olerinskiy | 1160. Network | 5 авг 2020 18:01 | 1 |
you should output edges in input order |
| Why Run Time error? 1WA Python | CatGirl | 1877. Велосипедные коды | 5 авг 2020 17:56 | 3 |
a,b = map(int,input().split()) if (a % 2 == 0 and b % 2 != 0): print("yes") else: print("no") because data type should be string, not integer sorry, my bad. data type is correct, but you should input like that: a=int(input()) b=int(input()) |
| WA8: hint | KostyaRychkov`~ | 2034. Корованы | 3 авг 2020 17:58 | 1 |
Check that you use only shortest routes. I don't have any tests, but when I started checking this, then I got ACC. |
| Wa3 | Михаил | 1121. Филиалы | 3 авг 2020 14:43 | 1 |
Wa3 Михаил 3 авг 2020 14:43 Таким образом, если для данного перекрёстка нет подразделений СКБ Контур находящихся ближе, чем в 6 кварталах, то мы обозначим его числом 0. Carefully read this part of text. |
| If you have RE5 | KostyaRychkov`~ | 1860. Фибориалы | 1 авг 2020 01:05 | 1 |
Try n = 100000 and remember that 1e6 * 1e6 > 2e9. |
| This problem is simpler than the rating he has )) | KostyaRychkov`~ | 1091. Тмутараканские экзамены | 31 июл 2020 21:31 | 1 |
The most important thing is that you shouldn't keep finding sets when you've already found 10,000. Then you can optimize a little simple search and you get ACC. Good luck! |
| INPUT | Berdnikov Sergey | 1242. Оборотень | 31 июл 2020 21:16 | 2 |
INPUT Berdnikov Sergey 26 янв 2017 04:10 To enter variables correctly is more difficult then solve this problem. I think, it isn't very good idea to issue input like this. |
| What is test 5? | mr.erfan | 1930. Машина инженера Ивана | 31 июл 2020 21:05 | 1 |
please help me. i have some problems in test 5. please help me! |
| Very Simple Only a DFS!! | Pooya | 1039. Юбилейная вечеринка | 31 июл 2020 13:58 | 10 |
Why not BFS? Maigo Akisame (maigoakisame@yahoo.com.cn) 10 июн 2004 04:07 my DFS is TLE does DFS don't TLE? can someone give me some help? ppsxy you should write DP of course. what's more my program doesn't TLE.Instead it WAs on #12 ناموسا ایرانی هستی؟ ای کلک |
| Easy Approach HINT | Sai Teja Chokkarapu | 1353. Миллиардная Функция Васи | 31 июл 2020 12:42 | 1 |
-> think of doing this problem first -> count of n digits numbers whose sum is equal to x. ->First try to think for smaller numbers less than 1000 i.e from 1 to 999. -> Create the tree for the same i.e numbers less than 999. -> after finding f(n,sum)(n is the number of digits and sum is the required sum). -> you can find f(9,sum)for all numbers less than 1000000000. -> now finally you need to handle for one number 1000000000. Cheers Edited by author 31.07.2020 12:43 |
| #WA 3 | LaVuna [KHNURE] | 2148. Безумный выстрел | 30 июл 2020 14:25 | 2 |
#WA 3 LaVuna [KHNURE] 28 июн 2020 20:06 I calculated two points of intersection from line that go through two points((x_mid, y_mid) and (x_circle,y_circle)) and then picked nearest two given two points.But this gives me WA3. What should i do? Re: #WA 3 Kairom `Ekexity 💻 30 июл 2020 14:25 You need to check the possibility of a shot. The enemy may be out of your sight. |
| Rating | kostan3 | | 29 июл 2020 23:41 | 1 |
Rating kostan3 29 июл 2020 23:41 Is it possible to return my profile to the rating and under what conditions? Edited by author 04.08.2020 00:40 |
| I don't under the meaning of this problem.Could somebody explain? | Yuanming YU, Frank | 1261. Чаевые | 28 июл 2020 19:57 | 5 |
A programmer has a set of banknotes valued 1, 3, 9 ..., 3^k,... one each. He has to pay N in a restaurant (provided) He must pay that much M so: M can be paid with banknotes the programmer has, i.e. he cannot pay 5, because he does not have 2 bank notes with value of 1; and M-N must be represented the same way, i.e. if N is 4, M cannot be 9, because 5 cannot be represented as a sum of 3^K, one or less for each K. So if asked 4, a programmer must pay 13, 13=9+3+1, 13-4=9. I hope you will understand this clumsy explanation. Thanks for the explanation. here 4 can be represented as 1+3^1 . why i have to pay 13 ? I failed to understand the problem ? |
| Step to solve this | rayhan28 | 1079. Максимум | 26 июл 2020 04:49 | 1 |
1.declare an array.size 1000000 2.genarate all number according the problem description. 3.input the value n. 4.declare a container and take the value of the array .vector<int>v(a,a+n); 5.sort the container. 5.at last print v[n]; Edited by author 26.07.2020 04:57 Edited by author 26.07.2020 04:58 |
| TLE #17 - Hint | LaVuna [KHNURE] | 1846. НОД 2010 | 25 июл 2020 14:27 | 1 |
If you have TLE on 17-th test , try to use clang compiler. For me it worked)) |
| Test for WA5 | Vladimir Plyashkun [USU] | 1930. Машина инженера Ивана | 24 июл 2020 17:15 | 2 |
try this: 3 2 1 3 2 3 1 2 answear: 1 You realy snooze a lot my code have wrong in test5 and the ansear this test is correct:( Please do not waste the rest of your time Edited by author 25.07.2020 15:37 Edited by author 25.07.2020 15:37 |
| TLE18? | Михаил | 2062. Амбициозный эксперимент | 23 июл 2020 19:51 | 1 |
TLE18? Михаил 23 июл 2020 19:51 |