| Show all threads Hide all threads Show all messages Hide all messages |
| AC in 0.156 sec. Who is better? (-) | Vedernikoff Sergey | 1342. Enterprise | 20 Jun 2011 19:59 | 4 |
What's your algorithm's complexity? I don't know - it's iterative heuristic. Actually, I still can speed it up... Edited by author 04.08.2008 14:45 Edited by author 20.06.2011 20:08 |
| Please Help WA 8 | Ildar | 1701. Ostap and Partners | 19 Jun 2011 21:07 | 2 |
Please help. You could not will lay out an approximate kind 8 tests. Edited by author 12.05.2010 03:28 Try tests: Input 3 1 1 2 100 Output 0 100 0 Input 3 1 1 2 -100 Output 0 0 100 Edited by author 21.06.2011 11:44 |
| Test 4 | Arsenal911 | 1087. The Time to Take Stones | 19 Jun 2011 18:37 | 1 |
Test 4 Arsenal911 19 Jun 2011 18:37 |
| the statement of the problem is not full, help please | Alias (Alexander Prudaev) | 1400. Cellular Characters | 19 Jun 2011 02:00 | 14 |
example N = 11, M = 3; 123 456 789 ab the cell "3" can reach from the cell "9", pushing an arrow key only once? I mean "arrow down"? No! You can't reach "3" from "9" pushing only one key. Because, there is nothing about this kind of actions in the task! From the key "9" you can only reach "1", "8", "6". there is not such words in statement. statement of the problem is not full. There are discribed all avaliable actions in statement and nothing more. So I can't agree with you)) You said that we can reach "1" from "9". How? If we push "Right" we'll reach "a", I think... Push "Left" and you'll reach "9" from "1")) No, sorry, my mistake... "9" from "3"! You said that we can reach "9" from "3". I just pushed wrong digit... I didn't say it. You can reach "3" from "9" by pushing 2 keys!) Edited by author 30.04.2007 22:31 1. You said Because, there is nothing about this kind of actions in the task! From the key "9" you can only reach "1", "8", "6". So, how we can reach "1" from "9"? 2.Later you said "Push "Left" and you'll reach "9" from "1"))" We'll reach "b" by pushing Left. Edited by author 01.05.2007 00:11 Oh! I got it!)) I meant the field 1 2 3 4 5 6 7 8 9 So you are right!) Sorry!) It's not clear from problem statement because meaning of "moving cursor up" and "moving cursor down" depends on topology. We'd assume default flat topology with boundaries, but special rules for LEFT/RIGHT makes us thinking that there are similar rules for UP/DOWN. At least moving down from row Y-1 to empty cell in row Y could result in stop at the last character. Edited by author 02.08.2008 13:07 example N = 11, M = 3; Mean = 1.55 2 1 2 1 0 1 2 1 2 3 2 |
| For the ones who has WA36 | Borozdin Kirill | 1408. Polynomial Multiplication | 18 Jun 2011 21:08 | 1 |
This test looks something like 1 -1 ______ -1 Good luck! |
| WA#16 | TheDreamCatcher | 1285. Thread in a Hyperspace | 17 Jun 2011 16:18 | 2 |
WA#16 TheDreamCatcher 4 Dec 2010 10:50 Re: WA#16 molphys fti UFU (Ekaterinburg) 17 Jun 2011 16:18 the same reason as WA #4 of 1075 |
| :-))) | Qafqaz Sehriyar Novruzov | 1056. Centers of the Net | 17 Jun 2011 15:51 | 1 |
:-))) Qafqaz Sehriyar Novruzov 17 Jun 2011 15:51 |
| what algo should i use,I had memory limit,then time limit and now again time limi 2.046s 1.037kb? | Hrayr | 1056. Centers of the Net | 17 Jun 2011 14:34 | 2 |
what algo should i use,I had memory limit,then time limit and now again time limit 2.046s 1.037kb? |
| O(V^2*E) passes TL! (+) | Vedernikoff Sergey (HSE: EconomicsForever!) | 1421. Credit Operations | 17 Jun 2011 12:34 | 5 |
Usual generic preflow algo got AC in 0.093 sec. Maybe, it worth to decrease timelimit? I think it is a bad idea. BS Flow by dfs not works. So it's very nice problem. Even simple bfs & dfs combination gets AC in 0.187=) (using scaling, of course). And its' complexity is higher than O(V^2*E).I think, it is closer to (E^2*logU) Dfs works. I got AC with 0.21 sec by using some tricky dfs with scalling. Simple preflow push algo O(N^2*E) passed on Java in 0.14. |
| HINT TEST #1 | Qafqaz Sehriyar Novruzov | 1003. Parity | 17 Jun 2011 05:05 | 1 |
if you are get wrong answer #1 or time limit #1 , probably your bug is that,you don't read input to end..I was get time limit #1..Because I didn't read input to end..when I find correct answer I break..then I found my bug and I read input to end..finally I got AC..If you don't read input to end , probably , your bug is that..you must read input to end.. Edited by author 17.06.2011 05:11 |
| Pls, give me test 3 | MMMMM | 1019. Line Painting | 17 Jun 2011 04:08 | 3 |
Pls, give me test 3. I tested my prog with maybe 30 tests and every I passed. But I have wa 3. Why? Help me. Give me test 3 or some tests. 10x ;) Sorry for poor english ;) Maybe, 3 0 1000000000 b 1 4 w 7 10 w Answer is 1 4 Your test is incorrect! 0 < ai < bi < 10^9. |
| Crash <acces violant> on test 3! Pls help | Roman Furko | 1452. Pascal vs. C++ | 17 Jun 2011 01:41 | 1 |
Why Crash (acces violant) I use vector < map <int,int> > ! Are the problem in it? P.S Sorry for my bad English #include <cstdio> #include <vector> #include <algorithm> #include <map> #include <iostream> #include <cstdlib> using namespace std; struct neww{ int x,n; }; int abss(int x) { if (x>=0) return x; else return (-x); } bool funcsort(neww a, neww b) { if (a.x < b.x) return true; else return false; } int main() { int n,i,j,x,maxn; neww a[2200]; scanf("%d",&n); vector < map <int,int> > b(12000); vector < map <int,int> > pi(12000); vector < map <int,int> > pj(12000);
for (i = 0; i < n; ++i) { scanf("%d",&a[i].x); a[i].n = i + 1; } sort(a,a+n,funcsort); if (n == 1) { printf("1\n"); printf("%d\n",1); exit(0); }
for (i = n - 1; i >= 0; --i) { for (j = n - 1; j > i; --j) if (a[j].x-a[i].x > 0) { b[i][a[j].x-a[i].x] = max(b[i][a[j].x-a[i].x],b[j][a[j].x-a[i].x] + 1); if (b[i][a[j].x - a[i].x] = b[j][a[j].x-a[i].x] + 1) { pi[i][a[j].x-a[i].x] = j; pj[i][a[j].x-a[i].x] = a[j].x - a[i].x; } } } maxn = 0; int numb,ost; for (i = 0; i < n; ++i) for (j = i; j < n; ++j) if (b[i][abss(a[i].x - a[j].x)] > maxn) { maxn = b[i][abss(a[i].x-a[j].x)]; numb = i; ost = abss(a[i].x - a[j].x); } printf("%d\n",maxn+1); printf("%d",a[numb].n); while (maxn) { int nm = pi[numb][ost]; int ot = pj[numb][ost];
printf(" %d",a[nm].n);
numb = nm; ost = ot; --maxn; } printf("\n");
} Edited by author 17.06.2011 01:42 |
| Where is my problem ?!?! | Rosen | 1014. Product of Digits | 16 Jun 2011 22:53 | 2 |
Finally I`ve made it! It works properly,but when I submit it-Compilation error ... #include<iostream> #include<math.h> using namespace std; int main () { int p; cin>>p; for(int i=1;i<=sqrt(p);i++) {if(p%i==0 && p/i!=p) {cout<<i<<p/i<<" ";} if(p%i==1) return -1;} system("pause"); } for(int i=1;i<=sqrt(p);i++) see definition of sqrt : http://www.cplusplus.com/reference/clibrary/cmath/sqrt/ you can not pass sqrt int value ; you must pass it double fload long long and ect.... but not int; instead use This method : for(int i=1; i*i<=p ;i++) :) Edited by author 16.06.2011 22:54 |
| I can't understand,that why WA on test 1!!!???? | ilya_romanenko | 1196. History Exam | 15 Jun 2011 21:24 | 3 |
It's my solution: #include<iostream> #include<stdio.h> #include<time.h> using namespace std; int main() { #ifndef ONLINE_JUDGE time_t start,end; start=clock(); freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif int a,b,c,d=0,i,j; int *m,*m1; m=new int [100000000]; m1=new int [100000000]; cin>>a; for(i=0;i<a;i++) cin>>m[i]; cin>>b; for(i=0;i<b;i++) cin>>m1[i]; for(i=0;i<a;i++) { c=m[i]; for(j=0;j<b;j++) if(m[i]==m[j]){ m[j]=0; d++; } } cout<<d; delete [] m; delete [] m1; return 0; } Это решение даёт правильный ответ,но не проходит... Почему???? I can't understand it too. It should be MLE: m=new int [100000000]; or TLE: for(i=0;i<a;i++) ... for(j=0;j<b;j++) maybe you shouldn't use freopen... |
| How to slove this problem? | fen | 1640. Circle of Winter | 15 Jun 2011 20:54 | 1 |
I don't how to slove this problem.who can help me? |
| test #5 | Flybird | 1134. Cards | 15 Jun 2011 16:44 | 3 |
i tryed all possible tests but i am still getting mistake on the fifth test. can somebody give me some tricky tests to help me? i have got this test too=( in this problem,sorting and greedy approach works.after sorting given card outcomes, we must iterate through these numbers and serve that card which has smallest possible number.using this,we make more chance to the next card to serve for the next outcome, i.e outcomes are ordered. |
| Wrong answer #10 | Hrayr | 1083. Factorials!!! | 15 Jun 2011 15:57 | 2 |
Edited by author 15.06.2011 16:39 Edited by author 15.06.2011 16:39 |
| WA 3 or 6 | voral | 1011. Conductors | 15 Jun 2011 15:17 | 2 |
Now I have: Input: 10 10 Answer: 10 Input: 13 14.1 Answer: 15 but: float p, q; scanf ("%f %f", &p, &q); p/=100; q/=100; result: WA6 but: float p, q; scanf ("%f %f", &p, &q); p=(float)((int)(p*100))/10000.00; q=(float)((int)(q*100))/10000.00; //Only 2 digits after dot result: WA3 Why? PS (ceil(p*cnt)-((int)(q*cnt)))>1e-7 |
| If you have WA 23. | Strekalovsky Oleg [Vologda SPU] | 1767. The House of Doctor Dee | 15 Jun 2011 12:52 | 1 |
Try to check situation, when rectangles touch and when rectangles don't have intersection. |
| wrong answer(pascal) | Bobby Salim | 1001. Reverse Root | 15 Jun 2011 11:51 | 4 |
var a:real; begin read(a); writeln(sqrt(a):0:4) end. why is my answer wrong?? :( because you read only one number using the operator: eof() because you can only read one number and you can only write one too. and you should use eof. |