Search found 16 matches

by lgarcia
Thu Apr 21, 2011 9:05 pm
Forum: Volume 119 (11900-11999)
Topic: 11960 - Divisor Game
Replies: 19
Views: 5304

Re: 11960 Divisor Game Getting WA!!

Some cases, I hope it helps.

Input:

Code: Select all

20
1
10
100
1000
10000
100000
1000000
2
3
4
5
6
7
8
50
534534
32423
12354
8980
2332
Output:

Code: Select all

1
10
96
840
9240
98280
997920
2
3
4
4
6
6
8
48
498960
30240
10080
7560
2160
by lgarcia
Wed Mar 09, 2011 3:50 pm
Forum: Volume 119 (11900-11999)
Topic: 11935 - Through the Desert
Replies: 10
Views: 4701

Re: 11935 - Through the Desert

It happens :wink:
by lgarcia
Wed Mar 09, 2011 2:51 pm
Forum: Volume 119 (11900-11999)
Topic: 11935 - Through the Desert
Replies: 10
Views: 4701

Re: 11935 - Through the Desert

Change "long int" to "int" and you will got AC.
by lgarcia
Sat Mar 05, 2011 5:45 pm
Forum: Volume 119 (11900-11999)
Topic: 11935 - Through the Desert
Replies: 10
Views: 4701

Re: 11935 - Through the Desert

I did exactly what you did in the first version. The only thing you didn't name was to check the fuel used between the start (or last gas station) and the goal. Other than that, I don't see any difference. Maybe add some epsilon when you print the result.
by lgarcia
Tue Feb 08, 2011 3:23 pm
Forum: Volume 119 (11900-11999)
Topic: 11920 - 0 s, 1 s and ? Marks
Replies: 17
Views: 4370

Re: 11920

My critical input was this:

Code: Select all

1
00??0?11
Output:

Code: Select all

Case 1: 2
by lgarcia
Sat Jan 29, 2011 1:52 pm
Forum: Volume 119 (11900-11999)
Topic: 11904 - One Unit Machine
Replies: 3
Views: 2455

Re: 11904 one unit machine

You can solve it with binomial coefficients and modular multiplicative inverse.
by lgarcia
Fri Oct 15, 2010 3:38 pm
Forum: Volume 118 (11800-11899)
Topic: 11829 - L's in a Circle
Replies: 6
Views: 2115

Re: L's in a Circle

Ok, I did. You may want to remove your e-mail address to avoid spammers.
by lgarcia
Wed Oct 13, 2010 11:57 pm
Forum: Volume 118 (11800-11899)
Topic: 11829 - L's in a Circle
Replies: 6
Views: 2115

Re: L's in a Circle

Yes, if you increase the distance between them, the radius becomes larger. But if you make it smaller, eventually the upper 'v' also makes the circle bigger. With ternary search you can get the optimum distance.
by lgarcia
Wed Oct 13, 2010 11:42 pm
Forum: Volume 118 (11800-11899)
Topic: 11829 - L's in a Circle
Replies: 6
Views: 2115

Re: L's in a Circle

Almost, I actually solved with Ternary Search and I took the distance between the two opposite upper blocks as my variable, that was enough.
by lgarcia
Wed Aug 18, 2010 3:30 am
Forum: Volume 9 (900-999)
Topic: 952 - Uno game
Replies: 1
Views: 2182

Re: 952 - Uno game

In the third move, the fourth player takes the R2 card from the draw pile and then he put it in the discard pile, he doesn't keep it.
by lgarcia
Mon Jul 12, 2010 6:07 pm
Forum: Off topic (General chit-chat)
Topic: How old are you? Statistics.
Replies: 121
Views: 175368

Re: How old are you? Statistics.

Well, by now I'm 20 and I started to submit in June 2009. I have ~660 accepted problems!
by lgarcia
Mon Jun 28, 2010 1:53 am
Forum: Volume 117 (11700-11799)
Topic: 11795 - Mega Man's Mission
Replies: 6
Views: 3183

Re: 11795 - Mega Man's Mission

It's more like a DP problem, think about what states you have, a robot can be destroyed or not, and for any combination of destroyed robots you can destroy others (independently of the order they were destroyed). I hope it was helpful.
by lgarcia
Mon Jan 18, 2010 1:46 am
Forum: Volume 117 (11700-11799)
Topic: 11760 - Brother Arif, Please feed us!
Replies: 15
Views: 4100

Re: 11760(brother arif please feed us!) Wrong Answer

That was the problem (the two of them). I could say it directly, but people here don't let it be so easy. By the way, you have to keep trying, I needed several months to get one accepted and I have ~350 problems accepted by now.

And yes, you should delete the code after you got it accepted.
by lgarcia
Sun Jan 17, 2010 3:50 pm
Forum: Volume 117 (11700-11799)
Topic: 11760 - Brother Arif, Please feed us!
Replies: 15
Views: 4100

Re: 11760(brother arif please feed us!) Wrong Answer

Check this.

Input:

Code: Select all

5 5 1
4 4
0 0
5 5 2
1 1
3 3
2 2
0 0 0
Output:

Code: Select all

Case 1: Escaped again! More 2D grid problems!
Case 2: Escaped again! More 2D grid problems!
by lgarcia
Mon Sep 14, 2009 10:18 pm
Forum: Volume 116 (11600-11699)
Topic: 11666 - Logarithms
Replies: 16
Views: 6104

Re: 11666 Logarithms WA again and agian

I'm sorry, I should be more clear. We get this from the problem, ln(n) = L + ln(1 - x) => n = e^L * (1 - x) Also we have this, |x| < 1 => -1 < x < 1 => 0 < 1 - x < 2 Then, e^L * (1 - x) < 2 * e^L => n < 2 * e^L => ln(n) < ln(2) + L => ln(n) - ln(2) < L Since we don't get (or I didn't see) any other ...

Go to advanced search