Search found 13 matches

by georgemouse
Fri Feb 03, 2006 9:48 am
Forum: Volume 4 (400-499)
Topic: 484 - The Department of Redundancy Department
Replies: 103
Views: 20374

Thank you ,Wei-Ming Chen!!!
I've misunderstood the problem.
Now I have accepted.
Thank you very much!!!!

Best regards,
by georgemouse
Tue Jan 31, 2006 3:46 pm
Forum: Volume 4 (400-499)
Topic: 484 - The Department of Redundancy Department
Replies: 103
Views: 20374

problem 484 WA plz help

I have tried all the possible input and all are right.
But I still got WA.
Can someone tell me what is wrong??
Thanks!!!

//acm484
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
char *p,in[100000];
int find,c,n,t=0,times[100000][2];
for(n=0;n<100000;n++) times[n][1]=1 ...
by georgemouse
Mon Jan 30, 2006 7:17 pm
Forum: Volume 104 (10400-10499)
Topic: 10451 - Ancient Village Sports
Replies: 22
Views: 13570

10451 WA... plz help

I've changed many ways to do this problem......but still WA.
What is wrong? Can someone tell me....

Code: Select all

removed after AC
by georgemouse
Thu Dec 08, 2005 7:00 am
Forum: Volume 109 (10900-10999)
Topic: 10905 - Children's Game
Replies: 66
Views: 35061

Now I have accepted.
Thank you very much, misof and SRX!!
Best wishes,
by georgemouse
Wed Dec 07, 2005 7:12 am
Forum: Volume 109 (10900-10999)
Topic: 10905 - Children's Game
Replies: 66
Views: 35061

Thank you for your help, misof!!

But I still got WA after increasing the array size.

Could someone tell me where is wrong??

My method is to find the order that makes the number combination bigger (the function compare)
,and then use bubble sort.

Code: Select all

 removed after AC
by georgemouse
Tue Dec 06, 2005 5:09 pm
Forum: Volume 109 (10900-10999)
Topic: 10905 - Children's Game
Replies: 66
Views: 35061

10905 - Children’s Game

I've tried all the inputs listed before but still can't find where is wrong.
I am very confused :-? .
Can someone help me?
Thanks a lot!!!!

My method is to find the order that makes the number combination bigger (the function compare)
,and then use bubble sort.

Code: Select all

 removed after AC
by georgemouse
Tue Sep 13, 2005 3:18 pm
Forum: Volume 107 (10700-10799)
Topic: 10780 - Again Prime? No Time.
Replies: 40
Views: 34635

I'm sorry that I mis-interpreted the input.
Thank you!!! :D
Now I know why I can't accept!!
by georgemouse
Mon Sep 12, 2005 3:03 pm
Forum: Volume 107 (10700-10799)
Topic: 10780 - Again Prime? No Time.
Replies: 40
Views: 34635

If you consider the largest prime only, you will fail with N=9, M=48.
My output is 11 ,is it wrong??

9's largest prime factor is 3
48/3=16
16/3=5
5/3=1
16+5+1=22
then 9=3^2
22/2=11

Another way

In 1~48 3's multiples:

3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48
1 1 2 .1 .1 ...2 .1 ...1 .3 ...1 ...
by georgemouse
Mon Sep 12, 2005 7:16 am
Forum: Volume 107 (10700-10799)
Topic: 10780 - Again Prime? No Time.
Replies: 40
Views: 34635

The way I used is to find the largest prime factor in M (the largest prime factor is K)
then find the largest power of M that divides N:
if K^a divides N!,
then I'll find the largest 'b' that k^b divides M.
At last, I'll output a/b (if it's 0 , output "Impossible to divide").

example:
if N=11,M=8 ...
by georgemouse
Mon Sep 12, 2005 7:04 am
Forum: Volume 107 (10700-10799)
Topic: 10780 - Again Prime? No Time.
Replies: 40
Views: 34635

10780 WA plz help!!!!!

I tried all the input posted in former topics and all he output is right.
BUT I still got WA!!!!!Why? :(
Can someone tell me what's wrong in my code?
Thanks!!!!!!

Code: Select all

removed after AC
by georgemouse
Wed Aug 31, 2005 1:26 pm
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 41106

To artem:
Thank you!!!
I have accepted!!!!
by georgemouse
Sun Aug 28, 2005 7:57 pm
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 41106

To artem:
Your code really works!!

But I still got TLE...........Why???
Is my method to find the pair of prime too slow?
I tried to modify my method to find the pair, but it seems no use.....

Can anyone tell me what's wrong in my code?

Code: Select all

 removed after AC
by georgemouse
Sun Aug 28, 2005 3:44 pm
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 41106

543

:cry: I got tle but I don't know how to make it faster!!
Can someone help me?
thanks!!!!

Here is my code:

Code: Select all

removed after AC

Go to advanced search