Common Board| Show all threads Hide all threads Show all messages Hide all messages | | I think i am correct ! But why wa14? pls help.(fw: code) | muhammad | 1287. Mars Canals | 20 Jul 2010 17:45 | 1 | [code deleted] sorry.stupid mistake.AC Edited by author 20.07.2010 18:09 | | Question | SKYDOS | 1414. Astronomical Database | 19 Jul 2010 22:38 | 3 | Is it possible to solve this problem using suffix tree? or it will get MLE? I solved it with std::set. Just use lower_bound() and upper_bound() functions. Applying lower_bound() is quite straightforwardly(yourSetObject.lower_bound(string)), but upper_bound() requires additinal {max_word_len-string.len} 'z' symbols. Read documentation and you will understand why. That's all! I am using C# and dont really know if there is something like lower_bound(), thats why I am asking about suffix tree/array :) | | If two squares don't intersect | Mato_No1 | 1006. Square Frames | 19 Jul 2010 17:23 | 2 | For example, xxx┌────┐xxxxx xxx│xxxxxx│x┌──┐ xxx│xxxxxx│x│xxx│ xxx│xxxxxx│x│xxx│ xxx│xxxxxx│x└──┘ xxx└────┘xxxxx Should I output the left first, or the right first? Edited by author 19.07.2010 15:39 | | Why I got WA?Help me! | Z H Pascal | 1324. Extra Spaces | 19 Jul 2010 01:42 | 2 | Here is my program:program Space; var L, R, I, J, K : longint; s : array [1.. 1000] of longint; begin readln (L); if L < 2 then R := 0; for I := 1 to 1000 do s [I] := 0; if L > 1 then begin I := 2; J := 2; s [1] := 2; R := 1; repeat if L > J then begin inc (R); s [R] := I; if R > 3 then inc (s [R]); I := J + 1; J := (I + 2 - s [R]) * s [R] - 2; end; until L <= J; end; writeln (R); for I := R downto 1 do writeln (s [I]); end. As for me - I don't try to create solution by "jumps". I go from 2 to N and some times add i/2+1 to answer. | | Oh! There are more than one tests. | Mato_No1 | 1004. Sightseeing Trip | 18 Jul 2010 20:51 | 1 | | | [WA #2] why my code got WA #2 | Luke Fang | 1078. Segments | 18 Jul 2010 18:42 | 1 | This is my code. I don't know why got the WA #2. But When I use the sample in the forum, I got the same answer as result in the forum. Could someone tell my which place take wrong? I really appreciate you. #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct{ int right; int left; int index; int win; int lose; }segment; int contain(segment a,segment b){ if (a.left > b.left && a.right < b.right ) return 1; else return 0; }
int main(){ int i,j,m,num; segment point[500],tmp; memset(point , '\0' , sizeof(point) ); scanf("%d",&num); if(num < 0 || num > 500) exit(0); for(i = 0 ; i < num ; i++){ scanf("%d %d",&point[i].left , &point[i].right ); if(point[i].left > 10000 || point[i].left < -10000) exit(0); else if(point[i].right > 10000 || point[i].right < -10000) exit(0); point[i].index = i; } for(i = 0 ; i < num ; i++){ if(point[i].left > point[i].right){ m = point[i].left; point[i].left = point[i].right; point[i].right = m ; } } /* for(i = 0 ; i < num ; i ++){ printf("%2d %2d\n",point[i].left , point[i].right); } */ for (i = 0 ; i < num ; i++){ for(j = 0; j < num; j++){ if( ( i != j ) && ( contain( point[i] , point[j] ) ) ){ /* printf("i = %d j = %d \n" , i, j); */ point[i].lose ++; point[j].win ++; } } } /* for(i = 0 ; i < num ; i ++){ printf("%2d %2d\n",point[i].win , point[i].lose); } */ for(i = 0 ; i < num ; i ++){ for(j = i ; j < num ; j++ ){ if ( point[i].lose < point[j].lose ){
tmp = point[i]; point[i] = point[j]; point[j] = tmp ; } } } for(i = point[0].lose ; i < num ; i ++){ for(j = i ; j < num ; j++ ){ if ( point[i].win < point[j].win ){ tmp = point[i]; point[i] = point[j]; point[j] = tmp ; } } }
printf("%d\n",point[0].lose + 1);
for(i = 0 ; i <= point[0].lose ; i ++){ printf("%d ",point[i].index+1); } return 0; } | | WA on test 3 ! | Alexandru Popa | 1341. Device | 18 Jul 2010 12:47 | 3 | Can anybody help me with this test, please ? 56 179 1111 Understand What Wrong? Coordinat's must be at [-180..180] Edited by author 18.07.2010 12:52 | | [WA #2] why my code got WA #2 HELP!! | Luke Fang | 1049. Brave Balloonists | 18 Jul 2010 00:30 | 1 | I dont know why my code got WA #2. Someone help me. Thank you. I use sample test. The result is correct. When I upload to Judge. It always appear WA#2. #include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> typedef struct{ int number; int sieve_number[10000]; int sq[10000]; }sieve; int main(){ int i,j,l, k,count=0,tmp,a; sieve p[11]; memset( p,'\0',sizeof(p) ); for(i = 0 ; i < 10 ; i++){ scanf("%d\n",&p[i].number); if(p[i].number < 1 || p[i].number > 10000) exit(0); } /* for(i=0;i<10;i++) printf("%d\n",p[i].number); */ for(k=0 ; k < 10 ; k++){ l=0; for (i=1; i<=p[k].number; i++) { for (j=2; j<i; j++){ if(i%j == 0){ count++; goto Next; } } p[k].sieve_number[l]=i; l++; Next:; } } /* printf("\n\n"); for(i=0;i<10;i++){ l=0; while (p[i].sieve_number[l] != 0){ printf("%d\n",p[i].sieve_number[l]); l++; } printf("\n"); } printf("=======================\n"); */ for( k = 0 ; k < 10 ;k++){ tmp = p[k].number; for( i=1 ; i <= tmp ; i++ , l++ ){ a = p[k].sieve_number[i]; while(1){ if ( a == 0 || tmp == 1 ) break; else if ( tmp % a == 0 ){ p[k].sq[i]++; tmp=tmp/a; } else break; } if(tmp == 0 || tmp == 1) break; } } for(i=0;i<10;i++){ /* printf("number %d\n",p[i].number); */ j = 1; while (j <= p[i].number){ if (p[i].sq[j] != 0){ /* printf("%d = %d\n",p[i].sieve_number[j],p[i].sq[j]); */ p[10].sieve_number[j]=p[i].sieve_number[j]; p[10].sq[j]+=p[i].sq[j]; } j++; } /* printf("\n"); */ } /* j=1; while (j < 10000){ if (p[i].sq[j] != 0){ printf("%d = %d\n",p[10].sieve_number[j],p[10].sq[j]); } j++; } */ a = 1; j=1; while (j < 10000){ if (p[10].sq[j] != 0){ a *= ( ( p[10].sq[j] )+1 ); } j++; } if ( a >= 0 && a <= 9 ) printf("%d",a); else exit(0); return 0; } /* http://www.manpagez.com/man/3/fmod/ */ | | Memory limit exceeded | Dim@N_SS47 | 1001. Reverse Root | 17 Jul 2010 18:18 | 3 | #include <stdlib.h> #include <stdio.h> #include <math.h> #define DOUBLES_NUM 64 #define int64 long long typedef struct list { long double nums[DOUBLES_NUM]; struct list *prev; } list; int main() { unsigned char ind = 0; unsigned int64 temp; list *temppl, *pl = malloc(sizeof(list)); pl->prev = NULL; while(scanf("%I64", &temp) != EOF) { pl->nums[ind] = sqrt((long double) temp); if(++ind >= DOUBLES_NUM - 1) { temppl = malloc(sizeof(list)); temppl->prev = pl; pl = temppl; ind = 0; } } while(1) { while(ind--) printf("%.4Lf\n", pl->nums[ind]); if(pl->prev == NULL) { free(pl); break; } temppl = pl->prev; free(pl); pl = temppl; ind = DOUBLES_NUM; } return 0; } Why? these is ver simple input will like this while(cin >> n) { } and array a[1024*128] I know that reading input could be done much simpler. What I don't understand is why it uses over 16MB of memory. Edited by author 18.07.2010 00:49 | | What will answer for 1000000000 ?, Could you write output of this test? | Esssential | 1683. Fridge | 17 Jul 2010 12:54 | 2 | Edited by author 17.07.2010 00:34 Possible answer in first test is: 6 3 1 1 Now try to think whats the best way to make minimal "cuts" :) And when n=1000000000 the answer is: 30 500000000 250000000 125000000 62500000 31250000 15625000 7812500 3906250 1953125 976562 488281 244141 122070 61035 30518 15259 7629 3815 1907 954 477 238 119 60 30 15 7 4 2 1 Edited by author 17.07.2010 12:55 | | [WA #1] why my code got WA #1 | Luke Fang | 1201. Which Day Is It? | 17 Jul 2010 08:03 | 1 | According to the discussion board. I reference one code on here and change some thing. But why still got the wrong answer. I use the sample test to test. The answer is right. But when I upload to judgement. Alway got the WA #1. Someone can tell me why. Thank you. Below is my code. #include<stdio.h> #include<stdlib.h> int is_leap_year(int y){ return ( ( y%4==0 ) && (y%100!=0||y%400==0) ); } int days_per_year(int y){ if(is_leap_year(y)) return 366; else return 365; } int days_per_month(int m,int y){ const int days[12]={31,28,31,30,31,30,31,31,30,31,30,31}; if(m!=2) return days[m-1]; else if(is_leap_year(y)) return 29; else return 28; } int get_day_of_week(int m,int d,int y){ int day=4; /* Key point */ int i; for(i=1600;i<y;i++) day+=days_per_year(i); for(i=1;i<m;i++) day+=days_per_month(i,y); day+=d;
return day%7; } void print_calendar(int m,int d,int y) { const char* day_name[7]={"mon","tue","wed","thu","fri","sat","sun"}; int days=days_per_month(m,y); int day_begin=1-get_day_of_week(m,1,y); int more_print = (day_begin + days)%7;
int i,j,flag;
flag = 0; for(i=0;i<7;i++){ printf("%s",day_name[i]); for(j=day_begin+i ; j <= days + more_print ; j+=7 )
if( j<1 || j>days ) printf("....");
else if(j==d){ flag = 1; if(j<10) printf("..[%d]",j); else printf("..[%2d]",j); } else{ if(j<day_begin+7){ if(flag){ printf("..%d",j); flag = 0 ; } else{ printf("...%d",j); } } else if(j >= day_begin+7 && j<10){ if(flag){ printf("...%d",j); flag = 0 ; } else{ printf("....%d",j); } } else if(j>=10 && j<= days){ if(flag){ printf("..%2d",j); flag = 0 ; } else{ printf("...%2d",j); } } else{ printf("...."); } }/* if( j<1 || j>days ) */ printf("\n"); }/* for(i=0;i<7;i++) */ } int main() { int d,m,y; scanf("%d %d %d",&d,&m,&y); if( y < 1600 || y > 2400) exit(0); if( m < 1 || m > 12 ) exit(0); if( d < 1 || d > 31 ) exit(0);
print_calendar(m,d,y);
exit (0); } | | DP is better | muhammad | 1200. Horns and Hoofs | 16 Jul 2010 17:45 | 1 | I think dp is much better.Math soln must have too many boundary conditions. I always got wa with math. can anybody send me math soln. email:radi_cse@yahoo.com | | Help, please, I have AC. | Blum | 1354. Palindrome. Again Palindrome | 16 Jul 2010 15:46 | 5 | I've got AC constructing suffix tree (mcc algo). Now, who also has O(N) solution simplier than mine, please tell me your idea. And is O(N*N) anough to get AC? Thanks. Oh, yes. How stupid I was. Thanks a lot. Now I have AC with kmp) I've got AC constructing suffix tree (mcc algo). Now, who also has O(N) solution simplier than mine, please tell me your idea. And is O(N*N) anough to get AC? Thanks. yes. It is a little strange, but O(n^2) really gets AC How to solve this problem using KMP? Somthing with prefix function or what? Help me pls, 'cause I solved this only with O(n^2). | | WA2 | Matrosov Mike (NNSU) | 1006. Square Frames | 16 Jul 2010 13:48 | 3 | WA2 Matrosov Mike (NNSU) 6 May 2007 16:52 Why I have WA on test 2. Give me some tests, please! Me too. Look my code. //1006.cpp #include<iostream> #include<string.h> #include<vector> using namespace std; const int n=20, m=50; unsigned char a[n][m+1]; int br; struct frame { int x,y,l; }; vector<frame> v; void read() { int i; for(i=0;i<n;i++) cin>>a[i]; } void trace(int i,int j) { if(i<0 || i>=n || j<0 || j>=m || a[i][j]==192) return; br++; trace(i+1,j); } void solve() { frame f; int i,j; for(i=0;i<n;i++) for(j=0;j<m;j++) if(a[i][j]==218) { f.x=j; f.y=i; br=1; trace(i+1,j); f.l=br+1; v.push_back(f); } } void write() { int i; cout<<v.size()<<endl; for(i=0;i<v.size();i++) cout<<v[i].x<<' '<<v[i].y<<' '<<v[i].l<<endl; } int main() { read(); solve(); write(); return 0; } If anyone can help I will be very thankfull? Re: WA2 Phan Hoài Nam - Đại học Ngoại ngữ Tin Học TP.HCM 16 Jul 2010 13:48 try some test cases: ..........ÚÄÄÄÄÄÄÄ¿............................... ..........³ÄÄÄÄÄÄijÄÄÄÄÄ¿...............ÚÄÄÄÄÄÄ¿.. ..........³.......³.....³.ÚÄÄÄÄÄÄÄ¿.....³......³.. .ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿...³.....³.³....ÚÄÄÄÄÄÄÄÄÄÄÄ¿¿..³.. .³³.......³ÄÄijÄÄij¿....³.³....³..³.....³..³³.ÚÄ¿. .³³.....ÚÄ¿...³...³³....³.³....³..³.....³Úij³Ä³³³. .³³.....³.³...³...³³....³.³....³..³.....³³.³³.ÀÄÙ. .³³.....ÀÄÙ...³...³³....³.³....³..³.....³³.³³..³.. .³³.......ÀÄÄijÄÄÄÙ³....³.³....³..³.....ÀÄij³ÄÄÙ.. .³³.......³...³³...³....³.³....³..³......³.³³..³.. .³³.......³...³³...³....³.ÀÄÄÚÄÄÄÄÄÄ¿....³.³³..³.. .³ÀÄÄÄÄÄÄij...³³...³....³....³.³....³....Àij³ÄÄÙ.. .³........³...³ÀÄÄij....³....³.³....³......³³..... .³........ÀÄÄijÄÄÄÄÙ....³....³.³....³......³³..... .³........³...³.........³....³.³....³......³³..... .³........ÀÄÄijÄÄÄÄÄÄÄÄÄÙ....³.ÀÄÄÄijÄÄÄÄÄÄÙ³..... .ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ..............³.ÀÄÄÄijÄÄÄÄÄÄÄÙ..... .............................ÀÄÄÄÄÄÄÙ.³........... ...................................ÀÄÄÙ........... .................................................. 15 35 15 4 15 8 5 2 3 9 10 1 15 10 4 10 10 0 9 8 5 3 41 5 7 40 1 8 46 4 3 26 2 9 31 3 14 31 3 13 29 10 8 1 3 14 ....ÚÄÄÄÄÚÄÄÄÄÄÄÄÄÄÄÄ¿................ÚÄÄÄÄÄÄÄ¿... ....³....³........³..³................³.......³... ....³....³........³..³................³.......³... ....³..ÚijÄÄÄ¿ÚÄÄijÄijÄÄÄÄÄÄÄ¿.ÚÄÄÄÄÄÄÄÄÄÚÄÄÄÄÄÄÄ¿ ....³ÚijijÄÄÄÚÄÄÄ¿³..³.......³.³...ÚÄÄÄÄij....³³.³ ....³³.³.³...³³..³³..³.......³.³...³..³..³....³³.³ ....³³.³.³...³³ÚijÄÄijÄÄÄÄ¿..³.³...³..³..³ÚÄ¿.³³.³ ....³³Ú³Ä³...³³³.³³..³....³..³.³...³..³..³³.³.³³.³ ...ÚÄÄijijÄÄÄÀÄÄÄÙ³..³....³..³.³...³..ÀÄijÀÄÙÄÙ³.³ ...³³³³ÀijÄÄÄÙ³³..³..³....³..³.³...³.....³.....³.³ ...³³³ÀÄij...³³³..³..³....³..³.³...ÀÄÄÄÄij.....³.³ ...³³³...³...³³³..³..³....³..³.³.........ÀÄÄÄÄÄÄÄÙ ...³³³...ÀÄÄÄÄÄÄÄÄÄÄÄÙ....³..³.³...............³.. ...³³ÀÄÄÄÄÄÄijٳ..³.......³..³.³...............³.. ...³ÀÄÄÄÄÄÄÄijijÄÄÙ.......³..³.³...............³.. ...³.........³³³..........³..³.³...............³.. ...³.........³³³..........³..ÚÄ¿...............³.. ...³.........³³ÀÄÄÄÄÄÄÄÄÄÄÙ..³.³...............³.. ...ÀÄÄÄÄÄÄÄÄÄÙÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÀÄÙ...............³.. ...............................ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ.. 15 6 7 4 38 0 9 14 3 16 31 3 17 29 16 3 42 6 3 5 4 10 4 0 15 3 8 11 7 3 7 15 6 12 13 4 5 35 4 7 41 3 9 9 0 13 ..................ÚÄÄÄÄÄÄÄ¿....................... ...ÚÄÄÄÚÄÄÄÄÄÄÄÄÄijÄÄÄÄÄ¿.³..ÚÄÄÄÄÄ¿ÚÄÄÄÄÄ¿....... ...ÚÄÄij........³.³ÚÄÄÄ¿³.³..³.....³³.....³....... .ÚÄÄÄÄijÄÄÄÄÄÄÄ¿³.³³...³³.³..³..ÚÄijÄÄÄÄ¿.³....... .³.³...³.......³³.³³...³³.³..³..³..³³...³.³....... .³.³...³.......³³.³³...³³.³..³..³.ÚÄÄÄÄÄÄÄÄÄ¿..... .³.ÀÄÄij.......³³.³ÀÄÄÄÙ³.³..³..³.³³³...³.³.³..... .³.³...³...ÚÄÄÄÄÄij¿....³.³ÄÄÀÄÄÄijÙÀÄÄijÄÙ.³..... .³.³...³...³...³³.ÀÄÄÄÄÄÄÄÙ¿....³.³..³..³...³..... .³.³...³...³...³³..³...³³.³³....³.³..³..³...³..... .³.³...³...³...³³..³...³³.³³....³.³..³..³...³..... .³.³...³...³...³³..³...³³.³³....ÀijÄÄÄÄÄÙ...³..... .³.³...³...³...³³..³ÚÄÄÀÄÄÄÙ......³..³......³..... .³.³...³...³...³³..³³..³³.³.......³..³......³..... .³.ÀÄÄijÄÄijÄÄijÙ..³³..³³.³.......³..³......³..... .³.....³...ÀÄÄÄÄÄÄÄÙÀÄÄÙ³.³.ÚÄÄÄ¿.ÀÄÄÄÄÄÄÄÄÄÙ..... .³.....³.......³........³.³.³...³....³............ .ÀÄÄÄÄijÄÄÄÄÄÄÄÙ........³.³.³...³....³............ .......ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ.ÀÄÄÄÄÄÄÄÄÄÄÙ............ ............................ÀÄÄÄÙ................. 15 3 1 14 3 2 5 20 12 4 28 15 5 26 7 12 1 3 15 7 1 18 23 8 5 19 2 5 36 1 7 32 3 9 29 1 7 11 7 9 18 0 9 34 5 11 ...........................ÚÄÄÄÄÄÄÄ¿.............. ........................ÚÄÄÄÄÄÄ¿...³.............. ...ÚÄÄÄÄ¿ÄÄÄÄÄÄÄÄÄÄ¿....³..³...³...³.............. ...³....³..........³....³..³...³...³.............. ...³....³..........³....³..³...³...³.............. ...³Ä¿..³..........³....³..³...³...³.............. ...³.³..³..........³....³..³...³...³.............. ...ÀÄÄÄÄÙ..........³....³..³...³...³.....ÚÄ¿...... ....ÚÄÄij¿.........³....ÀÄÄÄÄÄÄÙÄÄÄÙ.ÚÄÄijijÄÄ¿... ....³...³³ÚÄÄÄÄÄÄÄijÚÄÄ¿.............³...ÀÄÙ..³... ....³...³³³........³³..³ÄÄÄÄÄÄÄ¿.....³ÄÄÄÄÄÄÄij... ....³...³³³..ÚÄÄÄÄÄ¿³..³.......³.....³........³... ....³...³³³..³.....³ÀÄÄÙ.......³.....³........³... ....ÀÄÄÄÀÄÄÄijÄÄÄÄij...³.......ÚÄÄĿڳĿ......³... ..........³..³.....³...³.......³...³³³.³......³... ..........³..³.....³...³.......³...³³³.³......³... ..........³..³.....³...³.......³...³À³ÄÙ......³... ..........³..ÀÄÄÄÄÄÙ...³.......ÀÄÄÄÙ.ÀÄÄÄÄÄÄÄÄÙ... ..........ÀÄÄÄÄÄÄÄÄÙ...ÀÄÄÄÄÄÄÄÙ.....³........³... .....................................ÀÄÄÄÄÄÄÄÄÙ... 15 3 5 3 36 13 4 37 10 10 37 8 10 41 7 3 23 10 9 20 9 4 31 13 5 4 8 6 10 9 10 8 2 12 3 2 6 13 11 7 27 0 9 24 1 8 .........................ÚÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿...... .......................ÚÄij¿ÚÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿...... ....................ÚÄijij³³³³³Ä³ÄÄ¿.......³...... ..........ÚÄÄÄÄÄ¿...³..³.³³³³³³Ä³ÄÄÄÄÄÄÄÄÄijĿ.... ..........³.....³...³..³.³³³³³³.³..³.......³.³.... ..........³.....³...³..ÀÄijÙÀ³ÄÄÙ..³ÚÄÄÄÄÄ¿³ÚÄ¿... ..........³...ÚijÄÄij¿....³..³³....³³.....³³³³³... ..........³...³.³ÄÄÄÄÄÄÄÄijĿ³ÄÄÄÄÄÄÄÄÄÄ¿.³³ÀÄÙ... ..........³...³.³...³³....³.³³³....³³...³.³³.³.... ..........ÀÄÄÄÄÄÙ...³³....³.³³³....³³...³.³³.³.... ..............³.³...³³....³.³³³....³³...³.³³.³.... ..............³.³...³³....³.³³³....³ÀÄÄijÄÙ³.³.... ..............³.³...³³....³.³³³....³....³..³.³.... ..............ÀijÄÄijÙ....³.³³³....³....³..³.³.... ................³.³.³.....³Ä³³³¿...³....³..³.³.... ................³.Àij.....³.³ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ.³.... ................³...³.....³.³³³³...³....³..³.³.... ................³...ÀÄÄÄÄÄÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ.³.... ................³.........³.³ÀÄÄÄÄÄÄÄÄÄÄÙÄÄÄÄÙ.... ................ÀÄÄÄÄÄÄÄÄÄÄÄÙÄÄÙ.................. 16 18 13 3 26 14 6 14 6 8 20 2 16 30 3 16 25 0 6 44 5 3 28 1 5 23 1 5 36 5 7 20 7 11 16 7 13 10 3 7 29 7 12 26 0 18 29 1 15 ÚÄÄÄÄÄÄÄÄÄÄÄ¿.ÚÄÄÄÄÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ÄÄÄÄÄÄ¿..... ³...........³.³ÄÄÄijÄÄÄÄÄÄ¿...³......³......³..... ³...ÚÄÄÄÄÄÄÄÄÄÄ¿...³......³...³......³......³..... ³ÄÄij.......³.³³...³......³...³......³......³..... ³...³.......³.³³...³.....ÚÄÄ¿.³......³......³..... ³...³.......³.³³ÚÄijÄÄÄÄ¿³³.³.³ÄÄÄÄÄijÄÄÄÄ¿.³..... ³...³.......³.³³³..³....³³³.³.³......³....³.³..... ³ÄÄij.......³.³³³..³....³ÀÄÄÙ.³......³ÄÄÄÄÄÄÙ..... ³...³.......³.³³³..³....³.³...³......³....³....... ³...³.ÚÄÄÄÄÄÄ¿³³³..³....³.³...³......³....³....... ³...³.³.....³³³³³..³....³.³...³ÚÄ¿...³....³....... ³...³.³.....³³³³³..³....³.³...³³.³...³....³....... ÀÄÄijijÄÄÄÄÚij³³Ä¿Ú³¿...³.³...³ÀÄÙ...³....³....... ....ÀijÄÄÄÄÄijÄÙijijÄÄÄÄÄÄÙ...³......³....³....... ......³.³..³.³³..³À³Ù.........³......³....³....... ......³.ÀÄij.³³..³.³..........³......³....³....... ......ÀÄÄÄÄÄÄÙÀÄÄÄijÄÄÄÄÄÄÄÄÄÄÙ......³....³....... ...........³.....³.³..........ÀÄÄÄÄÄijÄÄÄÄÙ....... ...........ÀÄÄÄÄÄÙ.ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ............ .................................................. 15 18 12 3 8 12 4 0 3 5 31 10 3 16 5 9 14 1 13 25 4 4 0 0 13 11 12 7 30 5 13 37 0 8 14 0 17 4 2 12 6 9 8 19 0 19 | | How many frames are there on screen? | zinccopper | 1006. Square Frames | 16 Jul 2010 13:36 | 4 | In the description, it first says "N square frames (1 ≤ N ≤ 15) were sequentially drawn on screen". Then it says "However, it should not contain more than 2000 frames". How many frames are there on screen, 15 or 2000? I want to ask that, too would somebody help? The solution may output more frames than were initially drawn - if two frames overlap and it detects a third frame made from the overlapping parts. It should still be accepted if the total number of frames < 2000. That said, it shouldn't be a concern if you output at most one frame per input char (i.e., you don't output frames with no reason at all) because there are less input chars than 2000 (20x50 = 1000). In reference to the problem statement, there are 1 - 15 square frames on the screen and there are 1 - 2000 frames (characters other than dots) on the screen | | MAYBE WEAK TESTS ! | Phan Hoài Nam - Đại học Ngoại ngữ Tin Học TP.HCM | 1006. Square Frames | 16 Jul 2010 13:32 | 1 | I have created some test cases with N = 15 and then solve it, for some test cases my program outputs K = 15 but FOR SOME TEST CASES MY PROGRAM OUTPUTS K = 16! ... | | Mistake in russian statement | Alipov Vyacheslav [Tomsk PU] | 1418. Military Story | 15 Jul 2010 22:43 | 2 | В слове "подаваться" На выход должно подвааться единственное целое число -> На выход должно подаваться единственное целое число | | And is it very easy to use long arithmetic. I was writing it.But then I saw that this is going to be very long.And I thought to myself this way isn't true. | Qafqaz_Ferhad Cebiyev | 1206. Sum of Digits of the Sum of Numbers | 15 Jul 2010 21:38 | 1 | | | How to use long aritmetics in C++? I haven't use it before. | Qafqaz_Ferhad Cebiyev | 1206. Sum of Digits of the Sum of Numbers | 15 Jul 2010 21:26 | 1 | How to use long aritmetics in C++? I haven't use it before. | | How to use long aritmetics in C++? I haven't use it before. | Qafqaz_Ferhad Cebiyev | | 15 Jul 2010 16:48 | 1 | |
|
|