| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| WA9 | Stanislav Beskorovainiy | 1123. Зарплата | 19 дек 2016 19:29 | 1 |
WA9 Stanislav Beskorovainiy 19 дек 2016 19:29 I don't understand what's wrong in my program. Give me test 9 please |
| Why this problem rejudged?? | Shen Yang | 1415. Мобильная жизнь | 19 дек 2016 13:11 | 1 |
is there something invalid in test cases?? |
| What is in the test 26? | [kubsu] Eugene Kudinov | 1378. Искусственный интеллект | 18 дек 2016 22:11 | 1 |
Help! What is in the test 26? |
| How to get speed 0.001 seconds ???? | Ruben Ashughyan | 1048. Сверхдлинные суммы | 18 дек 2016 15:47 | 5 |
-- use fread | fwrite; -- do not use << if >> statement or minimize it; -- minimize div and mod operations ( % , / operators); -- instead of % , / operators may to use pre-calculated arrays. -- and last, need lucky :) 10^6 numbers --> input file size ~4 Mbytes, and output file size ~1 Mbytes. MY PC i-core 3 , 3 GB RAM, gcc 5.4.0 with option: g++ -Wall -O3 -std=c++14 reads/writes took 6-9 milliseconds. So there need something magic tricky to solve this with time < 1 milliseconds !!!!! I got 0.001s AC!! buffered i/o helped me. Your program ate 12 Mb memory. So I suppose you are reading the whole numbers and then do addition. It isn't necessary. It's possible to add numbers digit by digit (yes, from high digits to low) without any arrays usage - 0.3s even using scanf/printf. And yes, use fread/fwrite. Edited by author 13.12.2016 22:15 |
| Heeeh) Wa8 | Rocky.B | 1741. Монстр общения | 17 дек 2016 20:13 | 1 |
Forgot to sort the updates :) |
| WA #22 | TR Sriram | 1611. Децимация | 16 дек 2016 18:58 | 2 |
WA #22 TR Sriram 8 сен 2015 20:27 I am getting WA in 22nd case! I cant find my mistake. Can someone help me ? Re: WA #22 Tolstobrov Anatoliy[Ivanovo SPU] 16 дек 2016 18:58 Try this: 20 1 00000000100000000001 Answer: 0 1 15 |
| WA 23 | zahisho | 1238. Folding | 15 дек 2016 23:18 | 1 |
WA 23 zahisho 15 дек 2016 23:18 Please could anybody give me the test case? Thanks |
| If you get WA on #7/#15/#17 | WagJK | 1297. Палиндромы | 15 дек 2016 16:12 | 2 |
If you are using int(s[i]) to get the representation for any alphabet, you may need to enlarge your counting sort table and counting sort iteration limit. I thought 200 was enough for latin alphabets, but actually I tried several times and succeeded at about 1100. I don't even know why... |
| 34 WA | Vadimzzz | 1820. Уральские бифштексы | 15 дек 2016 12:56 | 2 |
34 WA Vadimzzz 15 дек 2016 12:50 |
| Why read text with std::getc got AC 0.001s and fread got AC 0.015s for C++ compilers ???? | c_pp | 1027. Снова D++ | 15 дек 2016 00:14 | 1 |
char s[16384] ; unsigned n = 0; // AC 0.001s with this code. for(int c = std::getc(stdin); c != EOF; c = std::getc(stdin)) s[n++] = c; // and AC 0.015s with n = fread(s,1,sizeof(s)-1,stdin); code. // I'm wonder that the std::getc faster than fread!! |
| Formula | Sanatbek_Matlatipov | 1902. Нео-Венеция | 14 дек 2016 22:51 | 2 |
Formula Sanatbek_Matlatipov 7 окт 2015 23:29 System.out.printf("%.6f\n",(t+s+ss[i])/2d); It have solution with no arrays, lol) And (t+x+si)/2.0 right too, but some simply) I know, that my English bad( |
| WA on test #28 | Shen Yang | 1399. Экономный директор | 14 дек 2016 20:03 | 5 |
any one help?? I need help... I use radom to generate 200 chain list,and then cut the chain list, using O(polynomial) dynamic programming, it is WA on test # 26, then I use regular brute_force search times>=1e7 return, it WA on test #28... anyone give some ideas?? I think cut the chain method get WA is because though between two rows there is at most one same buyer, but there maybe more then two rows have same buyers for exmaple ,structure of solution maybe 0--1---2--3--4--5---0 0--1--6--0 0--2--7--0 0--3--8--0 0--4--9--0 0--5--10--0
Edited by author 14.12.2016 14:14 AC now it is some stupid bugs on my code?? btw , I think this problem is much easier than ural 1394 why not find accuarcy solution? |
| Puzzled by test #5 | deserts | 1093. Дартс | 14 дек 2016 19:56 | 5 |
I'm sure my source code is perfect. But it never passed test #5. Can anyone help me? #include <stdio.h> #include <math.h>
int main() { double cx,cy,cz,nx,ny,nz,r,sx,sy,sz,vx,vy,vz,t; double x,y,z; double a,b,c; int hit; scanf("%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf",&cx,&cy,&cz,&nx,&ny,&nz,&r,&sx,&sy,&sz,&vx,&vy,&vz); b=nx*vx+ny*vy+nz*vz; c=nx*(sx-cx)+ny*(sy-cy)+nz*(sz-cz); a=-5*nz; if(b*b-4*a*c<-1e-8) printf("MISSED\n"); else if((b+sqrt(b*b-4*a*c))/nz<-1e-8 && (b-sqrt(b*b-4*a*c))/nz<-1e-8) printf("MISSED\n"); else { hit=0; t=(b-sqrt(b*b-4*a*c))/(10*nz); if(t>1e-8) { x=sx+vx*t; y=sy+vy*t; z=sz+vz*t-5*t*t; if(r-sqrt(pow(x-cx,2)+pow(y-cy,2)+pow(z-cz,2))>1e-8) ++hit; }
t=(b+sqrt(b*b-4*a*c))/(10*nz); if(t>1e-8) { x=sx+vx*t; y=sy+vy*t; z=sz+vz*t-5*t*t; if(r-sqrt(pow(x-cx,2)+pow(y-cy,2)+pow(z-cz,2))>1e-8) ++hit; } if(hit) printf("HIT\n"); else printf("MISSED\n"); } return 0; } I couldn't pass fifth test too, and I had mistake described above. Maybe, there is another mistake in your program. The test 5 in TIMUS is the case when the trace of dart only touches the dartboard in one point (i.e. like the parabola touches the plane). When I had understood this fact I got AC. Edited by author 21.03.2009 17:26 Edited by author 21.03.2009 17:26 So if it touches the plane should we consider it as a hit? My solution also fails WA#5 and I don't understand why... any hints guys? |
| How to get 0.001 sec? | Alexey | 1052. Охота на зайцев | 14 дек 2016 01:12 | 2 |
I solved it in 0.015 with g++, but i can't optimize anymore Edited by author 22.06.2015 13:32 |
| Easy problem! | Majin Boo | 1370. Волшебник | 13 дек 2016 22:52 | 1 |
It's just the array rotation problem asked of a different way. |
| Help Needed | Toufik Zaman | 1577. Электронная почта | 13 дек 2016 17:53 | 2 |
Please help me with test case 16 |
| Test #12 Output Limit Exceeded | Cebotari Vladislav | 1074. Очень короткая задача | 13 дек 2016 14:59 | 1 |
Hey guys any hints here? All examples from forum works on my program but this one exceeds. I guess it's because more than 200 characters are written, but I cannot find any test case that will require less written characters but the output will have more length |
| WA 2 | Combatcook | 2106. Десериализация | 12 дек 2016 16:36 | 3 |
WA 2 Combatcook 12 дек 2016 01:57 Does anyone know some tests to overcome WA 2? Re: WA 2 Jane Soboleva (SumNU) 12 дек 2016 07:23 Fixed mine after realizing that FFFFFFFF won't fit properly into a signed type. Thanks, Jane, the same problem - forgot to replace longint on int64 before submit :) |
| Accepted for changing the reading | 4EJ | 1846. НОД 2010 | 11 дек 2016 11:04 | 1 |
I use a sement tree, gave tle in test 17 and when I changed the scanf by the following "std :: ios :: sync_with_stdio (false)" I have acepted with time of 0.358 s |
| Regarding a result - The sequence of ships in each row should also be ordered in a certain way. | organmusic | 1394. Корабли. Версия 2 | 11 дек 2016 07:20 | 1 |
Since there can be more than one acceptable solution, I think, it could give a more unambiguous result. |