## Search found 29 matches

Tue Aug 09, 2011 6:48 am
Forum: Volume 120 (12000-12099)
Topic: 12032 - The Monkey and the Oiled Bamboo
Replies: 23
Views: 7095

### Re: 12032

oh.. im sorry.. here's the input i intended to post

Code: Select all

``````1
4
3 5 7 9
``````
Mon Aug 08, 2011 3:59 pm
Forum: Volume 120 (12000-12099)
Topic: 12032 - The Monkey and the Oiled Bamboo
Replies: 23
Views: 7095

### Re: 12032

naseef, check your output for following input.

Code: Select all

``````1
3
3 2 2
``````
Mon Jun 13, 2011 2:06 pm
Forum: Volume 116 (11600-11699)
Topic: 11651 - Krypton Number System
Replies: 5
Views: 3069

### Re: 11651

hmm.. i reduced my matrix multiplication part from 2*n^3 to n^3.. and now getting WA
im doing all calculation on unsigned long without any mod operation and its giving me right answer in my compiler.. is it wrong ? should i use mod operation ?
Mon Jun 13, 2011 2:04 am
Forum: Volume 116 (11600-11699)
Topic: 11651 - Krypton Number System
Replies: 5
Views: 3069

### Re: 11651

im using matrix expo but it seems to be slow on input sets algo: expo( p ) { if( p==1 ) return base else { a = expo(p/2); b = a*a; if(p%2==1) a = a*base return a; } so, for odd values of "p" im doing 2 matrix multiplication. so my algorithms complexity is actually 2*3^n*log(p). any idea how to reduc...
Sun Mar 27, 2011 1:38 pm
Forum: Volume 101 (10100-10199)
Topic: 10157 - Expressions
Replies: 23
Views: 12250

### Re: 10157 - Expressions

Code: Select all

``````32767
5828185
8558854
2937932
404984
22536
403
1
0
0
0``````
Thu Feb 10, 2011 1:51 pm
Forum: Volume 119 (11900-11999)
Topic: 11908 - Skyscraper
Replies: 6
Views: 2136

### Re: 11908 - Skyscrapper

after reading taman's post, i looked at my code again and cant decide whether it would be dp or greedy. but i think its a close resembelance to LIS algorithm with a bit of greedy choice. sorry if it makes anyone misguided. :( here's my algo, 1. sort (criteria is yours to decide) 2. now, for i'th pos...
Sun Feb 06, 2011 3:28 pm
Forum: Volume 119 (11900-11999)
Topic: 11908 - Skyscraper
Replies: 6
Views: 2136

### Re: 11908 - Skyscrapper

greedy will do..
Thu Jan 20, 2011 4:19 pm
Forum: Volume 119 (11900-11999)
Topic: 11904 - One Unit Machine
Replies: 3
Views: 2489

### 11904 - One Unit Machine

can anyone give me any hint.
Tue Jan 11, 2011 11:29 pm
Forum: Volume 119 (11900-11999)
Topic: 11902 - Dominator
Replies: 20
Views: 9389

### Re: 11902 - dominator

@tanmoy, i think all of the graph in your i/o is not DAG. but strangly, in problem statement, 2nd graph contains a self loop. although i treated given graph as a DAG and got AC.
Sat Dec 25, 2010 8:03 am
Forum: Volume 100 (10000-10099)
Topic: 10032 - Tug of War
Replies: 91
Views: 32762

### Re: 10032 - Tug of War

there's an easy problem which is quite similar with this one, 562 : dividing coins.
Sun Nov 28, 2010 9:59 pm
Forum: Volume 100 (10000-10099)
Topic: 10096 - The Richest Man of the Universe
Replies: 42
Views: 16660

### Re: 10096 - Richest Man of the Universe

for PI use this

Code: Select all

``````#define PI acos(0.0)
``````
and for floating number comparison use

Code: Select all

``````fabs(a-b)<=0.000000001
``````
Thu Oct 14, 2010 12:38 am
Forum: Volume 100 (10000-10099)
Topic: 10086 - Test the Rods
Replies: 10
Views: 4671

### Re: 10086 - Test the Rods

its a DP problem...
Sat Mar 13, 2010 7:20 pm
Forum: Volume 101 (10100-10199)
Topic: 10123 - No Tipping
Replies: 2
Views: 2216

### Re: 10123 - No Tipping

sometime wrote:Have your 10123 - No Tipping Accepted? My code is Time Limit Exceeded.
Could you help me? Thank you.
anyone help me?? thank you very much~~~
i used memoization to solve this task. think abt it. if u hav trouble then PM me
Sat Mar 06, 2010 6:31 pm
Forum: Volume 102 (10200-10299)
Topic: 10275 - Guess the Number!
Replies: 4
Views: 2918

### Re: 10275 - Guess the Number!

i am unsuccessfully trying to solve this problem.... here's my algo 1. generate digit[x] -> number of digit(s) in x^x ( using log ) 2. take input and binary search in digit[] to get a approx 3. use fast exponentiation to evaluate x^x 4. check whether calculated x^x is equal as given input string and...
Sat Mar 06, 2010 8:44 am
Forum: Volume 102 (10200-10299)
Topic: 10283 - The Kissing Circles
Replies: 13
Views: 5736

### Re: 10283 - The Kissing Circles

for input 10000 100, ur output can be different than ACed output posted by red scorpion. i solved this problem using 3 different equation and all of them produced different output for above case but all of those code have gotten AC.