Search found 17 matches

by receme
Sat Jun 18, 2011 11:29 pm
Forum: Volume 9 (900-999)
Topic: 902 - Password Search
Replies: 68
Views: 32021

Re: 902 - Password Search

I got ac... my process is... I find every sub string by using substr() function and use a map to count the frequency of those substring. just like this. map<string,int>mp; string b=input.substr(address,length); mp ++; then I found the max frequncy simply by linear search. But, by this process..... i...
by receme
Fri Jun 10, 2011 1:20 pm
Forum: Volume 100 (10000-10099)
Topic: 10009 - All Roads Lead Where?
Replies: 60
Views: 14484

Re: 10009 - All Roads Lead Where?

I have got RE.... Please help.


Here is my code.

Code: Select all

Got accepted. Silly mistake....
by receme
Sun Jun 05, 2011 9:03 pm
Forum: Volume 118 (11800-11899)
Topic: 11892 - ENimEN
Replies: 9
Views: 3227

Re: 11892-EnimEn

Thank you. I have got ac now...actually I didn't understand the problem. I thought a player can take only one object. But it is wrong. It is possible to take any number of object. Thanks to maccy who opened my eyes. I was a fool.
by receme
Sun Jun 05, 2011 10:31 am
Forum: Volume 118 (11800-11899)
Topic: 11892 - ENimEN
Replies: 9
Views: 3227

Re: 11892-EnimEn

got ac......
by receme
Sun Feb 27, 2011 7:19 am
Forum: Volume 119 (11900-11999)
Topic: 11934 - Magic Formula
Replies: 6
Views: 3146

11934 - Magic Formula

what's wrong with this problem?? f (n) = a x 2 + b x + c .... here what should I think?? Is it b*x or 'x' is here for multiplication.If so....where is other variable?? Again..... test cases are also confusing. 3rd and 4th test case are same but answer is different. :-? Plz...help. I got WA. I didn't...
by receme
Thu Feb 10, 2011 10:00 pm
Forum: Volume 119 (11900-11999)
Topic: 11920 - 0 s, 1 s and ? Marks
Replies: 17
Views: 4422

Re: 11920

@ suneast: I did not solve this problem using greedy method. Actually I have't learn this method yet. Need to study a lot.... :(

I solved this problem using simple brute force considering some test cases.
by receme
Wed Feb 09, 2011 9:47 am
Forum: Volume 119 (11900-11999)
Topic: 11920 - 0 s, 1 s and ? Marks
Replies: 17
Views: 4422

Re: 11920

just got ac.... :)

My code was giving WA for these test case....
input:

Code: Select all

1
1?00?1
0?11?0
output:

Code: Select all

Case 1: 2
Case 2: 2
by receme
Wed Feb 09, 2011 7:27 am
Forum: Volume 119 (11900-11999)
Topic: 11920 - 0 s, 1 s and ? Marks
Replies: 17
Views: 4422

Re: 11920

I tried a lot. but all I got is WA. Should I consider blank line for input??? Plz...give some more inputs.
by receme
Tue Feb 08, 2011 8:47 pm
Forum: Volume 119 (11900-11999)
Topic: 11920 - 0 s, 1 s and ? Marks
Replies: 17
Views: 4422

Re: 11920

I have tried all the test cases and got correct answer. but still WA. Althougth my code is not follow greedy stategy, but I cannot find my mistake. I need some more test cases.
by receme
Sun Feb 06, 2011 9:12 pm
Forum: Volume 119 (11900-11999)
Topic: 11920 - 0 s, 1 s and ? Marks
Replies: 17
Views: 4422

11920 - 0 s, 1 s and ? Marks

Anyone can give some critical test case??? I got continuous WA...plz help.... :(
by receme
Sat Jan 22, 2011 7:56 pm
Forum: Volume 115 (11500-11599)
Topic: 11518 - Dominos 2
Replies: 24
Views: 8641

Re: 11518 - Dominos 2

I get TLE...Help me...I can't understand how can I reduce the time....here is my code.... #include<stdio.h> #include <iostream> #include <queue> using namespace std; int r,s,i,j,k,n,m,cas,l,l1,N,G[10001][10001],co,v[10001],flag,f[10001],lp; queue<int> q; void BFS(int start_v, int n) { v[start_v]=1; ...
by receme
Sat Jan 22, 2011 10:27 am
Forum: Volume 115 (11500-11599)
Topic: 11548 - Blackboard Bonanza
Replies: 17
Views: 5411

Re: 11548 - Blackboard Bonanza

The original statement was something like: Given N strings, find two that can give you the largest number of matched characters between them if you write one underneath the another. You can see that there are so many problems with that statement but, in retrospect, it would have been less confusing...
by receme
Sat Dec 11, 2010 6:57 am
Forum: Volume 8 (800-899)
Topic: 895 - Word Problem
Replies: 23
Views: 12590

Re: 895 - Word Problem

Solved a moment ago :) ...I used LCS. It takes 0.020 sec.
by receme
Fri Dec 10, 2010 6:45 pm
Forum: Volume 7 (700-799)
Topic: 763 - Fibinary Numbers
Replies: 40
Views: 15922

Re: 763 - Fibinary Numbers

what is wrong?? I get correct output but still WA. Is there any difficulty in getting input?Here says there is a blank line between two input. But if I get input with scanf("%s %s",a,b)...should I consider the blank line? My output is correct for the given output in the other post. And also I do not...
by receme
Mon Nov 08, 2010 9:57 am
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 13040

Re: 11800 - Determine the Shape

I cannot find what is wrong. But contiously get WA. Here is my code. #include<stdio.h> #include<math.h> long i,j,k,n,l,m,t1,t2; long a1,b1,a2,b2,a3,b3,a4,b4,flag; float d1,d2,d3,d4,r1,r2; void set(); int main(){ scanf("%ld",&m); for(l=0;l<m;l++){ scanf("%ld %ld %ld %ld %ld %ld %ld %ld",&a1,&b1,&a2,&...

Go to advanced search