| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| WA 29 test | momo | 1830. Справка в НацОС | 13 май 2020 15:22 | 4 |
Does anybody know what is so special about test no 29? I am positive that my solution is correct (which is obviously not the case) but it gets WA 29. I even compared it with a slow solution (BFS) but I did not find any differences. Please, I would really appreciate some help because I have tested all possible input combination for length 8 and the slow and fast solution produce the same answers. I FOUND MY MISTAKE :) Edited by author 17.06.2011 19:06 Edited by author 17.06.2011 19:06 test: 50 0000000000000000000000000000000000000000000000000000000000001 - 50 times 0000000000000000000000000000000000000000000000000000000000000 ans=2^50-1 : __int64 test: 50 0000000000000000000000000000000000000000000000000000000000001 - 50 times 0000000000000000000000000000000000000000000000000000000000000 ans=2^50-1 : __int64 Well, the length of the strings you provided are not 50 but 61, so the answer for this test is (2^61)-1 The correct test is 50 00000000000000000000000000000000000000000000000001 00000000000000000000000000000000000000000000000000 |
| hint | ajay jadhav | 2034. Корованы | 11 май 2020 23:21 | 1 |
hint ajay jadhav 11 май 2020 23:21 robbers dont know the path, so at each point take farthest node from robbers.do these fo for the length of shortest path and in the end take minimum of these. |
| for WA#5 | ajay jadhav | 1890. Деньги из воздуха | 10 май 2020 23:51 | 1 |
for lazy node propagation I did tree[n]+=(end-start+1)*lazy[n]; when start and end were integers. tree[n]+=(end-start+1)*(1ll)*lazy[n]; corrected error. |
| Is task solvable in python? | Anatoly [sesc 17] | 2102. Миша и криптография | 10 май 2020 06:26 | 4 |
I was able to reach 28 test in Python 3. Я дошел до 28 теста на Python 3. Edited by author 24.11.2016 23:52 Yes, I solved this problem using Python Yes, you just have to do some optimizations |
| stop asking #3 WA - HINT here | melkiy | 1603. Эрудит | 10 май 2020 04:24 | 8 |
To all of you who cannot overcome #3 !!! All the suggestions about redundant '\n' and about that the dictionary may have repeated words have nothing to do with WA #3 (read condition carefully). If you use any kind of backward tracking, be it recursion or DFS, check the "no luck" condition attentively. First i used checking the next letter to be '\0' at the beginning of my recursion function, and if so returned 'true'. This is wrong! You must make word-end check BEFORE you make the next step, otherwise you may get "deadlock" "there is no direction to go" though there is no need to go anymore!!! Test word for the example table rabadaabracabrac: YES (starting from [3,1] in C-like indices). How did you get rabadaabracabrac: YES In the condition there is said,that words could not have self-intersections. But if you don't intersect you will not get this word. My program writes NO on this test Thank you, melkiy! I made the same mistake :( My program got YES on this test, by have WA#3 It's not a test case for WA#3: rabadaabracabrac: YES and it's not working. My reason for WA #3 was that I tried to use 1d char array to store the table and used i -> i - 1 to go left and i -> i + 1 to go right, however, if you are in the first column you can't go left and if you're on the 4th row you can't go right |
| DP+BIT | ajay jadhav | 1523. K-инверсии | 9 май 2020 21:55 | 1 |
DP+BIT ajay jadhav 9 май 2020 21:55 similar to strictly increasing subsequnce of length k just query and update BIT in reverse. |
| different c++ implementations - completely different results | imaginary friend | 1915. Руины титанов: воссоздание былого | 9 май 2020 10:45 | 2 |
Clang++ 4.0.1 - 0.39s - Accepted G++ 7.1 - 0.421 - Accepted Visual C++ 2017 - 1.029 - Time limit exceeded rofl in general i noticed that for the most problems clang is usually faster then g++ or ms c++ Edited by author 21.08.2018 03:53 I got it the other way - TLE #42 using G++ and Clang++, but AC 0.687 Visual C++ |
| WA3 and WA12 | Levon Oganesyan | 1651. Кратчайшая подцепь | 8 май 2020 21:50 | 3 |
For WA3 try this: 3 1 2 1 Ans: 1 For WA12 try this: 5 1 2 3 1 5 Ans: 1 5 We have correct answers but on test 7 we have wrong answer Edited by author 08.05.2020 21:50 |
| My mistake for WA #6 | ajay jadhav | 1930. Машина инженера Ивана | 8 май 2020 20:33 | 1 |
I had maintained dis[n+1][2] for distance. But visited array was vis[n+1], changed it to vis[n+1][2] and simple bfs. |
| WA 9 help please | Ivan | 1139. Городские кварталы | 8 май 2020 18:17 | 1 |
|
| give some tests | {AESC MSU}Vadim Kaushanskiy | 1628. Белые полосы | 8 май 2020 10:58 | 4 |
Input #1: 1 1 0 Output #1: 1 Input #2: 1 1 1 1 1 Output #2: 0 Input #3: 30000 1 0 Output #3: 1 Input #4: 30000 30000 0 Output #4: 60000 Input #5: 3 3 1 2 2 Output #5: 4 Input #6: 3 3 4 1 2 2 1 2 3 3 2 Output #6: 5 Input #7: 3 3 2 2 1 2 2 Output #7: 3 Input #4: 30000 30000 0 Output #4: 60000 why? I think the answer should be 2 |
| Test | insi | 1756. Полтора землекопа | 7 май 2020 22:35 | 11 |
Test insi 13 мар 2010 14:44 I have WA #2 .. Can somebody give me some tests, please ?:) Edited by author 13.03.2010 14:57 5 2 3 Ans: 3 3 4 5 6 4 Ans: 7 7 8 8 My program: 5 2 3 -> 1 1 8 5 6 4 -> 1 1 1 27 Are these answers correct ? find less diggers solution insi your answers are not correct. You need to keep an even distribution. Edited by author 27.09.2014 11:20 Edited by author 27.09.2014 11:21 Re: Test Yashar Abbasov 13 апр 2010 02:03 for test 5 6 4 is answer 7 7 7 9 correct? Edited by author 13.04.2010 02:05 Edited by author 13.04.2010 02:05 Re: Test dAFTc0d3r [Yaroslavl SU] 13 апр 2010 22:23 No. 8 8 7 7 id correct. Because max(7,7,7,9) = 9 > 8 = max(8,8,7,7) and we need to minimize that max. Also acceptable answer: 8 8 8 6 |
| AC one LINE | matvey22122 | 1243. Развод семи гномов | 7 май 2020 20:05 | 1 |
|
| WA#25 | petr | 1444. Накормить элефпотама | 7 май 2020 02:41 | 2 |
WA#25 petr 12 май 2014 01:53 I can not make tests for which the program gives an incorrect result. Help please My program failed at WA#25 because my 'getAngle' function returned negative results instead of [0; 360), so try to check your sorting code |
| Key hint | ajay jadhav | 1494. Монобильярд | 5 май 2020 23:55 | 1 |
Inspector can come at any point. after 1 ball pocketed after 2 ball pocketed or even at the end when n balls are pocketed Inspector can collect any number of available balls e.g if he comes after ball 3 is pocketed he can take just 3, or 3 2 or all 3 2 1 |
| 0.031s 312KB C++ sulotion | panhantao | 1028. Звёзды | 5 май 2020 19:56 | 7 |
I've been stuck in this problem for a very long time, but today I got the idea of Binary Indexed Tree from wikipedia and finally solved this problem :) Binary Indexed Tree,or BIT, can be viewed as a simplified version of Segment Tree,easier to code and less function to perform. But It's enough to solve this problem #include<iostream> #include<cstdio> using namespace std; const int Max = 32005; int n; int c[Max] = {0}; int level[Max] = {0}; int lowbit(int x) { return x&(-x); } int sum(int i) { int s = 0; while(i > 0) { s += c[i]; i -= lowbit(i); } return s; } void update(int pos,int val) { while(pos <= Max) { c[pos] += val; pos += lowbit(pos); } } int main() { scanf("%d",&n); for(int i = 0; i < n; i ++) { int x,y; scanf("%d%d",&x,&y); x ++; level[ sum(x) ] ++; update(x,1); }
for(int i = 0; i < n; i ++) printf("%d\n",level[i]); } How can this even be correct if you don't use the y-coordinates at all? Because in statement there was written that y-coordinates are already sorted in function main,why you use "x ++"? cose in problem x in [0,32000 ] so 0 is bad value for binary :) so we just shift all x on some const ( just 1) so all value between 1 and power(2,someN) Why do you use 32005 as a size of an array? Because it is given in constraint. That x and y values will be less than 32000. |
| Doubt about my AC. | ajay jadhav | 1586. Трипростые числа | 5 май 2020 00:31 | 1 |
I have two loops which calls recursive function for 1 to 9 for 0 to 9 ans+=f(n-2,j,i) // f(rem,prev,prev_prev) function f(i,j,k) has dp[1001][10][10] memoized solution.why doesnt it timeout. I'm having hard time understanding my own solution although it is ACd in one trial. |
| What is test 6? | Keiby | 2035. Очередной пробный тур | 4 май 2020 18:52 | 3 |
may be anybody know? Edited by author 13.09.2016 16:35 Edited by author 13.09.2016 16:35 Edited by author 04.05.2020 18:52 |
| mayus are very important my guys | lRider | 2012. Про Гришу Н. | 3 май 2020 22:20 | 1 |
|
| Hint and tutorial | blunder woman | 1039. Юбилейная вечеринка | 3 май 2020 13:34 | 2 |
I did not write this tutorial btw |