## Search found 74 matches

Mon Apr 13, 2009 7:43 am
Forum: Volume 8 (800-899)
Topic: 884 - Factorial Factors
Replies: 49
Views: 26482

### Re: 884 - Factorial Factors

Yes.
Since in your program u are not precomputing all the prime numbers before taking the input which increases your time a lot.
Sun Apr 12, 2009 5:44 pm
Forum: Volume 8 (800-899)
Topic: 884 - Factorial Factors
Replies: 49
Views: 26482

### Re: 884 - Factorial Factors

use sieve and try to compute everything within the sieve function.
Sun Apr 12, 2009 2:36 pm
Forum: Volume 114 (11400-11499)
Topic: 11404 - Palindromic Subsequence
Replies: 25
Views: 13694

### Re: 11404 - Palindromic Subsequence

Sun Apr 12, 2009 12:44 pm
Forum: Volume 116 (11600-11699)
Topic: 11604 - General Sultan
Replies: 7
Views: 1497

### Re: 11604 General Sultan

Try the following input

Input

Code: Select all

``````4
a 1
b 110
c 11
d 10
0
``````
Output

Code: Select all

``````Case #1: Ambiguous.
``````
Sun Apr 12, 2009 11:36 am
Forum: Volume 116 (11600-11699)
Topic: 11602 - SMS for Blind
Replies: 3
Views: 1103

### 11602 - SMS for Blind

Sun Apr 12, 2009 10:59 am
Forum: Volume 116 (11600-11699)
Topic: 11604 - General Sultan
Replies: 7
Views: 1497

### Re: 11604 General Sultan

Consider the case 1+110 == 11 + 10.
The output for the above case should be ambiguous.
Hope it helps.
Sat Apr 11, 2009 9:31 am
Forum: Volume 114 (11400-11499)
Topic: 11404 - Palindromic Subsequence
Replies: 25
Views: 13694

### Re: 11404 - Palindromic Subsequence

Now I have recoded it again to get a WA. I pass all the inputs in this forum. can someone please help me. :cry: :cry: :cry: #include<iostream> #include<vector> using namespace std; char ss[1008],ch[1008][1008]; int len[1008][1008],pos[1008][1008],fw[1008],re[1008],st,en; bool vis[1001][1001]; int re...
Sun Apr 05, 2009 4:53 am
Forum: Volume 115 (11500-11599)
Topic: 11583 - Alien DNA
Replies: 5
Views: 1143

### Re: 11583 - Alien DNA

Thanx a lot 4 u reply. It was very helpful for me. I finally managed to solve it.
Sat Apr 04, 2009 11:30 am
Forum: Volume 115 (11500-11599)
Topic: 11583 - Alien DNA
Replies: 5
Views: 1143

### Re: 11583 - Alien DNA

I am unable to understand this problem. Can someone please explain it to me??
Sat Apr 04, 2009 10:07 am
Forum: Volume 115 (11500-11599)
Topic: 11539 - Another Word Game
Replies: 6
Views: 2677

### Re: 11539 - Another new game

Can someone please help me on how to reduce the time on this question. I am getting TLE. I used tries for looking up the dictionary and also use memorization for storing the maximum value between any 2 indices once its computed. Any help is appreciated. Thanx in advance. #include <iostream> #define ...
Fri Mar 13, 2009 7:00 pm
Forum: Volume 100 (10000-10099)
Topic: 10054 - The Necklace
Replies: 62
Views: 30892

### Re: 10054 - The Necklace

Code: Select all

``````1

4
1 2
2 2
2 1
1 1
``````
Wed Mar 11, 2009 8:50 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 27958

this one is same as the 3n+1 problem memorization can be done by the following way:- Suppose u are calculating the cycle length of a number 'a' and during this u arrive to an intermediate value b whose cycle length had been found initially den just add the the cycle length of b to the current length...
Wed Mar 11, 2009 2:42 pm
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7026

### Re: 11585 - Nurikabe

I am still not able to get an Acc for this problem. Can someone plz help me by posting some test i/o.
Thnx
Tue Mar 10, 2009 6:42 pm
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7026

### Re: 11585 - Nurikabe

Hi vahid,
Can u tell him how did u incorporate such a thing in ur code in which the number of dots given in the description is less then the actual dots present in the nurikabe??

Tue Mar 10, 2009 12:59 pm
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7026

### Re: 11585 - Nurikabe

I have a doubt. Can thr be such type of input :-

Code: Select all

``````1
3 4 2
0 3 1
1 1 1
###.
#.##
.##.
``````
the description tells that there are only 2 dots but there are 4 in the actual nurikabe.
If yes what should be the answer