## Search found 4 matches

Sat Apr 19, 2003 4:30 pm
Forum: Volume 104 (10400-10499)
Topic: 10462 - Is There A Second Way Left?
Replies: 29
Views: 14357
For this problem i consider following thing's but got WA:Look plz: 1.when i take the input i consider the lowest cost edge. Like: if 1 2 10 1 2 5 1 2 11 in this case i consider 5 and all the other store in a struct and finaly all the extra cost sort according to there cost.i.e, 2 3 10 3 2 5 3 4 5 th...
Fri Apr 11, 2003 4:47 pm
Forum: Volume 3 (300-399)
Topic: 314 - Robot
Replies: 30
Views: 6279
Thax all i got Ac.

shohag
Tue Apr 01, 2003 2:23 pm
Forum: Volume 3 (300-399)
Topic: 314 - Robot
Replies: 30
Views: 6279

### 314 - Robot

#include<stdio.h> #include<string.h> #define MAX_R 51 #define MAX_C 51 #define INF -1 int what_dir(const char *p); void enqueue(int r,int c,int d); void dequeue(int& r,int& c,int& d); long cost[MAX_R][MAX_C][4]; int queue[MAX_R*MAX_C*4+4]; int head,tail; int dr[]={-1,0,1,0}; int dc[]={0,1,0,-1}; ch...
Wed Aug 07, 2002 8:26 am
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 23771

### p-160 by shohag

I think this is not good.
There is a good process.Like,
Below or equal 5 all prime are 2,3,5.
and for 5 the power of 2 is

k1=5/2;
k2=2/2;
sum=k1+k2;

total power of 2 is 3.
This process for 2,until ki<=2.
Same process for 3,5.

So, for 5

5!=2^3*3^1*5^1;

Is this a good process.