|
|
Общий форум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 you should output edges in input order 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()) Check that you use only shortest routes. I don't have any tests, but when I started checking this, then I got ACC. Таким образом, если для данного перекрёстка нет подразделений СКБ Контур находящихся ближе, чем в 6 кварталах, то мы обозначим его числом 0. Carefully read this part of text. Try n = 100000 and remember that 1e6 * 1e6 > 2e9. 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! To enter variables correctly is more difficult then solve this problem. I think, it isn't very good idea to issue input like this. please help me. i have some problems in test 5. please help me! 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 ترو خدا؟؟؟ ناموسا ایرانی هستی؟ ای کلک -> 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 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? You need to check the possibility of a shot. The enemy may be out of your sight. kostan3 Rating 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 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 ? 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 If you have TLE on 17-th test , try to use clang compiler. For me it worked)) 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 Let's construct the resulting sequence from N to 1 by keeping merged segments in stack. What is the condition for merging two segments? They are touching by one of the sides (r_1+1=l_2 or r_2+1=l_1). The last part of the solution is trivial (make a tree of merges, ...). |
|
|