Search found 74 matches

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

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.
by Chirag Chheda
Sun Apr 12, 2009 5:44 pm
Forum: Volume 8 (800-899)
Topic: 884 - Factorial Factors
Replies: 49
Views: 26926

Re: 884 - Factorial Factors

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

Re: 11404 - Palindromic Subsequence

Can someone please reply.
by Chirag Chheda
Sun Apr 12, 2009 12:44 pm
Forum: Volume 116 (11600-11699)
Topic: 11604 - General Sultan
Replies: 7
Views: 1546

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.
by Chirag Chheda
Sun Apr 12, 2009 11:36 am
Forum: Volume 116 (11600-11699)
Topic: 11602 - SMS for Blind
Replies: 3
Views: 1145

11602 - SMS for Blind

Can someone please help me how to proceed with this problem.
Thanx in advance
by Chirag Chheda
Sun Apr 12, 2009 10:59 am
Forum: Volume 116 (11600-11699)
Topic: 11604 - General Sultan
Replies: 7
Views: 1546

Re: 11604 General Sultan

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

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...
by Chirag Chheda
Sun Apr 05, 2009 4:53 am
Forum: Volume 115 (11500-11599)
Topic: 11583 - Alien DNA
Replies: 5
Views: 1183

Re: 11583 - Alien DNA

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

Re: 11583 - Alien DNA

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

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 ...
by Chirag Chheda
Fri Mar 13, 2009 7:00 pm
Forum: Volume 100 (10000-10099)
Topic: 10054 - The Necklace
Replies: 62
Views: 31287

Re: 10054 - The Necklace

Your program gives wrong answer for the input

Code: Select all

1

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

Re: 371 - Ackermann Functions #TLE. Please Help!

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...
by Chirag Chheda
Wed Mar 11, 2009 2:42 pm
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7183

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
by Chirag Chheda
Tue Mar 10, 2009 6:42 pm
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7183

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??

waiting for ur reply :cry:
by Chirag Chheda
Tue Mar 10, 2009 12:59 pm
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7183

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

Go to advanced search