## Search found 20 matches

Sat Aug 09, 2008 8:29 am
Forum: Volume 113 (11300-11399)
Topic: 11332 - Summing Digits
Replies: 17
Views: 9831

### Re: 11332 - Summing Digits

my algorithm is

Code: Select all

``````
1. int sum = add every digit of n, since n is at most 2,000,000,000, sum has two digits at most.

2. int temp = sum/10 + sum %10

3. if temp < 10,  print temp
else  print temp / 10 + temp % 10

``````
this algorithm isn't very fast, but it works
Sat Aug 09, 2008 8:01 am
Forum: Volume 114 (11400-11499)
Topic: 11461 - Square Numbers
Replies: 15
Views: 7298

### Re: 11461 - Square Number

Hey, sirius I solved this problem minutes ago. my algorithm is 1. calculate from 1 to b how many numbers are square numbers. 2. calculate from 1 to a - 1 how my numbers are square numbers. (If a = 1, the obvious answer is 0) 3. step 1 - step 2 , and print the answer to calculate the square numbers, ...
Sat Aug 09, 2008 7:39 am
Forum: Volume 100 (10000-10099)
Topic: 10057 - A mid-summer night's dream.
Replies: 21
Views: 10148

### Re: 10057 - A Mid-summer Night’s Dream

Hello, kbr_iut:

I solved this problem this morning. I think your program failed on the following case

Code: Select all

``````7
1 2 2 3 4 5 7
``````

Code: Select all

``````2 3 1
``````
while my AC program returns

Code: Select all

``````3 1 1
``````
Sat Jul 26, 2008 3:43 pm
Forum: Volume 3 (300-399)
Topic: 389 - Basically Speaking
Replies: 94
Views: 23361

### Re: 389 WA why?

Hey, everybody, my code also gives WA, and I don't know why. Can anybody help? Thanks in advance #include <iostream> #include <cstdlib> #include <string.h> #include <iomanip> #include <math.h> using namespace std; bool k; char answer[100]; int power(int base, int p); int original(char ar[], int a); ...
Sun Nov 05, 2006 12:07 pm
Forum: Off topic (General chit-chat)
Topic: I win !!
Replies: 361
Views: 125430
Everyone plays this game, so I want to participate and WIN for a while ~~
Sun Nov 05, 2006 12:05 pm
Forum: Volume 5 (500-599)
Topic: 544 - Heavy Cargo
Replies: 32
Views: 14801
I try to solve this problem, but always WA !!
Can anyone of you give me some critical IO ???

Sat Nov 04, 2006 5:31 pm
Forum: Volume 5 (500-599)
Topic: 534 - Frogger
Replies: 41
Views: 18037
I've try to solve this problem ~~ But always WA

Can you give me more critical IO (my program gave correct output for the above IO) ??

Sat Nov 04, 2006 5:29 pm
Forum: Volume 5 (500-599)
Topic: 534 - Frogger
Replies: 41
Views: 18037
Can someone please look at my code and tell me what's wrong?? I've got BOUNDLESS WA !! :cry: I think it's just an application of Floyd, so where's my wrong?? any comment is welcome !! Thanks in advance ~~ // Q534 Frogger // select the minimum of longest jumps ~~ minimax #include<iostream> #include<c...
Mon Oct 16, 2006 3:10 pm
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 8442

### WA Q476

I don't know why I get so many WA on this easy question. I have read all the thread on Q476, but none of them solved my problem. Can anyone give me a hand ??? Every suggestion is appreciated !!! :D Here's my code: // Q476 Points in figure: Rectangles #include<iostream> #include<cstdlib> #include<alg...
Tue Aug 29, 2006 8:04 am
Forum: Volume 101 (10100-10199)
Topic: 10192 - Vacation
Replies: 58
Views: 15195
I think it's better not to post your code ~~
Because that way anyone can get ACC immediately by posting your code.
That's not fair !!
Tue Aug 29, 2006 6:13 am
Forum: Volume 100 (10000-10099)
Topic: 10090 - Marbles
Replies: 43
Views: 22799
Thanks for your test cases !!

My code gives the correct output, but still WA !!
How come ~~ I am frustrated !!

Can you give me more tricky test cases ??
Or tell me how you solve the problem ~~

Sun Aug 27, 2006 3:16 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 37529
Thank you very much! it could be accepted. and may i have another question? "Warning: Your program would get a Presentation Error in a true contest. The 24-hours judge interpretes it as an "Accepted" problem. " what did it mean? You get PE for this problem. It means your answer is correct, but your...
Sun Aug 27, 2006 12:07 pm
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 25399
I've just solved this problem today !! I do not look throught your code, but my algorithm is like this: (1) use sieve of Eratosthnenes to find all the prime numbers up tp 1000000 (2) add the smallest prime number and the largest prime number which is smaller than n (3) if the sum is equal to n, prin...
Fri Aug 25, 2006 2:57 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 37529
I do not understand why you write this:

Code: Select all

``   char k=1; ``
it should be like this:

Code: Select all

``   int k=1;``
modify it and you'll get ACC. I have already tried it and the program got ACC immediately !! Good Luck !!
Fri Aug 18, 2006 1:43 pm
Forum: Volume 101 (10100-10199)
Topic: 10192 - Vacation
Replies: 58
Views: 15195
I think you can simply solve Q10192 bu using LCS algorithm ~~ There's no trick in this problem. :lol: Check your code one more time ~~ If you still can't find the error, send PM to me and I'll send my ACC code to you !! But I think there isn't much difference between our codes ~~ Hope it will help !...