Search found 39 matches

by SilVer DirectXer
Thu Jan 01, 2004 6:41 am
Forum: Volume 105 (10500-10599)
Topic: 10578 - The Game of 31
Replies: 11
Views: 4823

10578 The Game of 31

i do minimax search on it. but WA. can anyone give me some cases that my code doesnt work? [cpp] #include <stdio.h> #include <stdlib.h> #include <string.h> int i,j,k; char in[30]; int cards[35]; int sum; int minimax(int n,int state,int card1,int card2,int card3,int card4,int card5,int card6); void m...
by SilVer DirectXer
Sat Nov 15, 2003 8:45 pm
Forum: Volume 6 (600-699)
Topic: 691 - Triangle Partition
Replies: 2
Views: 1992

yes, you are right.....

I am busy right now.
If i have time.
Let me write a "random algorithm", which randomly generate points and test if it satisify the conditions.

Lol~~
by SilVer DirectXer
Fri Aug 29, 2003 6:59 am
Forum: Volume 100 (10000-10099)
Topic: 10029 - Edit Step Ladders
Replies: 70
Views: 19415

Thanks!
fully understand!
by SilVer DirectXer
Thu Aug 28, 2003 9:15 pm
Forum: Volume 3 (300-399)
Topic: 333 - Recognizing Good ISBNs
Replies: 166
Views: 20696

XX-0000000000-XX is correct???

why?

how about
AA-0000000000-AA?

oh, hard to identify if it is valid or not..
by SilVer DirectXer
Thu Aug 28, 2003 4:50 am
Forum: Volume 3 (300-399)
Topic: 333 - Recognizing Good ISBNs
Replies: 166
Views: 20696

my code is quie ugly, because i forced it to process the example appears here correctly. However, i am still WA....please help [cpp] #include <stdio.h> #include <string.h> #include <stdlib.h> char s1[100]; char news1[100]; int temp[100]; int ps[100]; int i,j,k; int counter,l; int c,sum,cc,damn,act; ...
by SilVer DirectXer
Mon Aug 04, 2003 5:10 am
Forum: Volume 103 (10300-10399)
Topic: 10393 - The One-Handed Typist
Replies: 40
Views: 10726

thanks anyway!
i got a AC now
by SilVer DirectXer
Sun Aug 03, 2003 6:17 pm
Forum: Volume 103 (10300-10399)
Topic: 10393 - The One-Handed Typist
Replies: 40
Views: 10726

UFP2161 wrote:SilVer DirectXer:

Check your "check for duplicates" code again. It's not entirely correct.
thanks UFP2161 , i have updated the code and checked repeated before putting to v[].(see above)
however. seems i am still WA....
why?
by SilVer DirectXer
Sat Aug 02, 2003 8:00 pm
Forum: Volume 103 (10300-10399)
Topic: 10393 - The One-Handed Typist
Replies: 40
Views: 10726

i got a WA too, i have checked if repeated words...why WA? [cpp] #include <stdio.h> #include <string.h> char words[1002][52]; char v[1002][52]; char tempch[52]; int i,j,k,l,m,n; char dummy[100]; char cant[100]; int counter,vcounter; int ok; int maxlen; void main() { while (1) { scanf("%d",&n); if (f...
by SilVer DirectXer
Sat Aug 02, 2003 7:28 pm
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 31602

Larry wrote:Use sieve for your prime checker..
thanks....
but, could you explain more details?
how to use a sieve for the prime checker?
by SilVer DirectXer
Fri Aug 01, 2003 3:06 pm
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 31602

Thanx Michniewski! u r right......... :P eric! try with the following one :wink: for(m= 6 ; m < x; m+=6) if(prime(m-1) && prime(m+1)) printf("%ld %ld\n", m-1, m+1); the algorithm is great. but..how do u guys discover that all twins prime are subset of (6*k-1,6*k+1), for k is integers? however, i am...
by SilVer DirectXer
Wed Jul 30, 2003 8:22 pm
Forum: Volume 104 (10400-10499)
Topic: 10400 - Game Show Math
Replies: 32
Views: 17396

10400 math game show..TLE using DP?

hi all..I use DP to solve it. could anyone figure out why..TLE? [cpp] #include <stdio.h> int i,j,k,l,m,n,p; int input[105]; int q[101][20000]; int parenti[101][20000]; int parentj[101][20000]; char op[101][20000]; int qcounter[101]; int qto[101]; int tempnum; int ok; int need; int needtobreak; int n...
by SilVer DirectXer
Tue Jul 22, 2003 7:34 pm
Forum: Volume 100 (10000-10099)
Topic: 10029 - Edit Step Ladders
Replies: 70
Views: 19415

10029

input: cat dig dog fig fin fine fog log wine output: 5 why it is 5? maybe i am misunderstanding the question. the task is that we need to find out the smallest step for transforming each pairs of word from the top one by one..(cat->dig),(dig ->dog), (dog->fig),..... and among these smallest number, ...
by SilVer DirectXer
Sun Jul 20, 2003 3:11 pm
Forum: Volume 100 (10000-10099)
Topic: 10036 - Divisibility
Replies: 37
Views: 10566

10036 Divisibility WA

[cpp] #include <iostream> #include <math.h> using namespace std; int n,k,i,j,l; int input[10005]; int oper[10005]; int apv; int sum; int carry; int ncase; int ok; void main(void) { cin>>ncase; for (l=1;l<=ncase;l++) { for (i=1;i<=10001;i++) oper =0; apv=0; cin>>n>>k; for (i=1;i<=n;i++) { cin>>input ...
by SilVer DirectXer
Sun Jul 06, 2003 7:27 am
Forum: General
Topic: SECURITY FLAW IN ONLINE JUDGE
Replies: 34
Views: 8366

oh shamim, you must in a ACM team of a Uni, ha~

pc2 is the submittion program for "real" ACM competition, i remember...written in Java..
by SilVer DirectXer
Sat Jul 05, 2003 2:41 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 18939

i am Time Limit too. But my code run fast... why?[cpp] #include <stdio.h> #include <math.h> int alpha,N,height,rest_c,a,b; int finished; int ans1; double ans2; int i; void main(void) { while (1) { scanf("%d",&height); scanf("%d",&rest_c); if (height==0 && rest_c==0) break; if (height==1) { printf("0...

Go to advanced search