## Search found 49 matches

Sun Dec 30, 2007 3:07 pm
Forum: Volume 113 (11300-11399)
Topic: 11374 - Airport Express
Replies: 15
Views: 6360
my idea was to first find the sp from start to all other vertices (say its d0[]) and end to all other vertices( say it is d1[]). then for each edge(u,v) in the commercial express i checked wheather i hav a smaller d0 + w(u,v) + d1[v] lenght(i cheked it for bothe (u,v) and (v,u) ), if a smaller lengt...
Sat Dec 01, 2007 6:23 pm
Forum: Volume 110 (11000-11099)
Topic: 11015 - 05-2 Rendezvous
Replies: 48
Views: 16331
ordering of the FW loop should e for(k) for(i) for(j)
Tue May 22, 2007 10:25 pm
Forum: Volume 9 (900-999)
Topic: 988 - Many Paths, One Destination
Replies: 9
Views: 7099

### getting WA

a simple graph problem. but getting wa. i don no why. plz somebody provide some suggetions, i/o. #include <stdio.h> #include <vector> #include <queue> #include <string.h> using namespace std; #define MAXN 1000 vector <int> adj[MAXN]; int path[MAXN]; bool visited[MAXN]; int v; int BFS() { int i,u,nex...
Sat May 19, 2007 9:45 pm
Forum: Volume 111 (11100-11199)
Topic: 11175 - From D to E and Back
Replies: 18
Views: 8631
can somebody plz post some i/o. already got several WA with this one.
Fri May 18, 2007 11:24 pm
Forum: Volume 109 (10900-10999)
Topic: 10917 - Walk Through the Forest
Replies: 19
Views: 9965

### lots of WA

What i've done is: 1. Find shortest path from 2 to all vertex using dijkstra 2. build another di graph with edges (u,v) such that d > d[v] in the original graph. that is length of any path from v to 2 is shorter than length of any path from u to 2; 3. count the number of paths from 1 to 2 in the new...
Mon Feb 05, 2007 11:00 pm
Forum: Volume 108 (10800-10899)
Topic: 10804 - Gopher Strategy
Replies: 39
Views: 23014

### So many WA's in this prob

I am doing bin search on distance and running mbm. I'm getting wa in this. #include <stdio.h> #include <queue> #include <vector> #include <string.h> #include <algorithm> #include <math.h> using namespace std; #define NIL -1 #define MAXN 110 typedef struct Point_ { double x,y; } Point_; double maxDis...
Thu Jan 18, 2007 9:58 pm
Forum: Volume 9 (900-999)
Topic: 928 - Eternal Truths
Replies: 11
Views: 5133

### Getting WA in 928. Hlp

Hi all, i'm getting WA in 928 with my BFS code. Can some1 provide hlp plz (suggetions,i/o......) #include <stdio.h> #include <queue> #include <string.h> using namespace std; #define MAXN 300 #define _min(a,b) (a) < (b) ? (a) : (b) typedef struct state_ { int r,c,nm; } state_; int row,col; char maze[...
Fri Nov 24, 2006 3:12 pm
Forum: Volume 4 (400-499)
Topic: 408 - Uniform Generator
Replies: 48
Views: 3586
Can somenone plz give explanation or proof why STEP and MOD are good choices if gcd(STEP,MOD) == 1.

-Shihab
Wed Aug 23, 2006 3:59 pm
Forum: Volume 100 (10000-10099)
Topic: 10061 - How many zero's and how many digits ?
Replies: 43
Views: 20692
Thanx. Got AC NOW. .
Tue Aug 22, 2006 9:30 pm
Forum: Volume 100 (10000-10099)
Topic: 10061 - How many zero's and how many digits ?
Replies: 43
Views: 20692

### WA in 10061

Getting WA in this prob. My code passed all the inputs posted in the prev posts. I still don't know my fault. I'm giving my code.

Code: Select all

``````
Cut after AC

``````
Mon Aug 21, 2006 10:09 pm
Forum: Volume 103 (10300-10399)
Topic: 10354 - Avoiding Your Boss
Replies: 47
Views: 20864

### WA in 10354

Getiing WA in this problem. Here's the code: #include<stdio.h> #include<vector> #include<string.h> using namespace std; #define NIL 0 #define MAX 500 #define INF 99999999 typedef struct Node_ { int id,d; } Node_; bool visited[MAX+1]; bool visitedByBoss[MAX+1]; vector<Node_> adj[MAX+1]; int d[MAX+1],...
Thu Aug 17, 2006 11:02 pm
Forum: Volume 103 (10300-10399)
Topic: 10330 - Power Transmission
Replies: 43
Views: 15532

### 10330 - Getting WA. Plz Hlp

Hi all, I'm getting WA in this prob. I've used EKarp MaxFlow to solve it. I've splitted each vertex(other than source and sink) in two and have places a edge between them having capacity equal to the given node capacity. I've tested my code with several inputs (also the ones given in prev posts), an...
Tue Aug 15, 2006 10:13 pm
Forum: Volume 103 (10300-10399)
Topic: 10344 - 23 out of 5
Replies: 81
Views: 26387

### 10344

Hi all, I'm getting TLE in 10344. I've used recursion to denerate all possible strings of "+*-". since there are 4 slots for operators and 5 operands. so there can be at most 3^4 * 5! or 9720 possible expressions. I think this can be evaluated within time. But i'm getting TLE.some1 plz hlp. #include...
Sun Jul 23, 2006 10:06 pm
Forum: Volume 110 (11000-11099)
Topic: 11051 - Dihedral groups
Replies: 8
Views: 2406
Thanx 4 ur I/Os. Got AC now.
Sun Jul 23, 2006 8:39 pm
Forum: Volume 110 (11000-11099)
Topic: 11051 - Dihedral groups
Replies: 8
Views: 2406

### 11051 - Dihedral groups

Hi all,

I'm getting WA in this problem. Can some1 give me some I/O.