Search found 209 matches

by asif_rahman0
Fri Nov 24, 2006 6:46 pm
Forum: Volume 2 (200-299)
Topic: 216 - Getting in Line
Replies: 57
Views: 24901

Re: Help.

MajidIust wrote:ok for all test case in this place but get WA.
Help.

Code: Select all

.............
#include <stdio.h>
#define MAXNODES 8
using namespace std;
class Node
...................
really..........!!!! Have you checked with my output...YET!!
You did the basic error. The highest limit is 8. So change it 9 or 10.
by asif_rahman0
Wed Nov 22, 2006 9:58 pm
Forum: Volume 108 (10800-10899)
Topic: 10815 - Andy's First Dictionary
Replies: 116
Views: 31679

You missed the problem statement!!! sorted in alphabetical order So add the following line to sort in map<const char *s,int,cmm> struct cmm{ bool operator()(const char *str1,const char *str2) const { return strcmp(str1,str2)<0; } }; btw, how did you check all posts? Even have you checked Sample I/O!!!
by asif_rahman0
Fri Nov 17, 2006 9:33 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 59508

Your code is wrong for the following input:

Code: Select all

591
209
bye
rabbi
by asif_rahman0
Wed Nov 01, 2006 6:25 pm
Forum: Volume 7 (700-799)
Topic: 721 - Invitation Cards
Replies: 25
Views: 8709

use vector with pair.
by asif_rahman0
Wed Nov 01, 2006 5:53 am
Forum: Algorithms
Topic: Single Source Shortest Path With Spare Graph
Replies: 2
Views: 1687

another straightforward is 10986(Sending email).
by asif_rahman0
Sun Oct 29, 2006 7:30 pm
Forum: C++
Topic: moduler design with "extern keyword"
Replies: 2
Views: 1843

moduler design with "extern keyword"

Can someone help me? just practicing with a program. It is compiling but not working when i run it. Here i paste it(three parts). part 1 //////////////////////// //file name is : m1.h //////////////////////// #ifndef __M1_H__ #define __M1_H__ #include <stdlib.h> #include <ctype.h> #include <string.h...
by asif_rahman0
Sat Oct 28, 2006 8:38 pm
Forum: Volume 111 (11100-11199)
Topic: 11137 - Ingenuous Cubrency
Replies: 16
Views: 9315

nymo also right. But in your own code you need..... that was a typo val[0]=0; for(i=1;i<=21;++i){ val[i]=i*i*i; } for(j=0;j<=10000;++j)memo[j]=1; for( j = 1 ; j <= 21 ; ++j ){ for(i=val[j];i<10001;++i){ memo[i] += memo[i-val[j]]; } } i dont think u got your code. right?? just change j=2 instead of j...
by asif_rahman0
Sat Oct 28, 2006 7:51 pm
Forum: Volume 111 (11100-11199)
Topic: 11137 - Ingenuous Cubrency
Replies: 16
Views: 9315

i did it recursively. It seems easy to me.
But my program took too much time(0.x4.xx) where others took 0.00.04/06.
Can someone tell me is there any other method without DP?
by asif_rahman0
Fri Oct 27, 2006 5:21 pm
Forum: Volume 7 (700-799)
Topic: 743 - The MTM Machine
Replies: 12
Views: 7632

Hi technobug,
i think you program doesn't give correct output for the following input:

Code: Select all

22225
225
check it out.
bye
by asif_rahman0
Tue Oct 24, 2006 11:21 am
Forum: Volume 106 (10600-10699)
Topic: 10664 - Luggage
Replies: 20
Views: 14127

Kallol wrote:.......For parttioning into two parts I can imagine a way .......Whats goin to be a better algorithm ?
But i think 0/1 knapsack. You can try with it. From ranklist its not better
algorithm. Mine is 0.00.248 with memory (10152). So lowest. ;)
by asif_rahman0
Thu Oct 12, 2006 12:25 pm
Forum: Volume 102 (10200-10299)
Topic: 10219 - Find the ways !
Replies: 33
Views: 10529

HINTS:
think about log. We can find the number of digit by log(10 base, not ln).
Ex: if log(12334), then we get 4.
Finally the formula will be

Code: Select all

floor(log[n])+1.
by asif_rahman0
Tue Oct 10, 2006 8:23 am
Forum: Volume 111 (11100-11199)
Topic: 11115 - Uncle Jack
Replies: 25
Views: 15960

Yes, missed.
For your 10^25 my compiler generates wrong answer when i used double.
so i think long double must be same as double.
So follow Vexorian.
by asif_rahman0
Tue Oct 10, 2006 8:09 am
Forum: Volume 111 (11100-11199)
Topic: 11111 - Generalized Matrioshkas
Replies: 19
Views: 11117

input:

Code: Select all

-9 -7 7 -2 2 9
-9 -2 2 -1 1 -6 6 9
-9 -2 2 -1 -5 5 1 9
-9 -2 2 -1 1 -2 5 9
-9 -2 2 -1 1 -1 1 9
Output:

Code: Select all

:-( Try again.
:-( Try again.
:-( Try again.
:-( Try again.
:-) Matrioshka!
by asif_rahman0
Mon Oct 09, 2006 10:16 pm
Forum: Volume 111 (11100-11199)
Topic: 11111 - Generalized Matrioshkas
Replies: 19
Views: 11117

I dont solve this problem, yet. But i think for your input, output should be:

Code: Select all

:-( Try again.
:-( Try again.
by asif_rahman0
Mon Oct 09, 2006 10:08 am
Forum: Algorithms
Topic: about maxflow
Replies: 2
Views: 1818

i think, not metflow, its maxflow.
So make a program for ur spelling check first then try this. ;)

563, 753, 820, 10122, 10330, 10511, 10735
820 is so easy!


bye

Go to advanced search