## Search found 63 matches

Wed Dec 26, 2007 10:52 am
Forum: Volume 5 (500-599)
Topic: 558 - Wormholes
Replies: 30
Views: 15442
I got Acc...

There is a silly bug in my DFS code and so the complexity of DFS is O(n^3). So first time i got TLE

And there is a solution like Warshal where all time source is 0 .......
Wed Dec 26, 2007 1:21 am
Forum: Volume 5 (500-599)
Topic: 558 - Wormholes
Replies: 30
Views: 15442
Hi all....

My algorithm is:

1) Run DFS(0)
if there is a cycle then calculate the total cost of the cycle. if it is negative return

What is the problem i got TLE....
Tue Dec 25, 2007 8:12 pm
Forum: Volume 109 (10900-10999)
Topic: 10925 - Krakovia
Replies: 50
Views: 22119
You use 2D for Big Integer Arithmatic....

I think it does not need...

You got RTE because problem description says 1 ≤ N ≤ 1000

but you used only 29

and another things ur algo may be worng becasue when i changed the array size then i got wa in ur code
Mon Dec 24, 2007 9:01 pm
Forum: Volume 109 (10900-10999)
Topic: 10925 - Krakovia
Replies: 50
Views: 22119
Some IO: Input: 2 1 1 0 2 2 1 0 3 3 5400000000 5400000000 5400000000 3 2 5400000000 5400000000 9000000001 6 3 1 2 3 4 5 6 11 3 1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000 10000000000 11 3 10000000000 1000000000 100000000 10000000 1000000 100000 10000 1000 100 10 1 2 10 999999999...
Sun Dec 23, 2007 5:39 pm
Forum: Volume 106 (10600-10699)
Topic: 10600 - ACM Contest and Blackout
Replies: 34
Views: 14011
what is the output of the following input?
1
2 1
1 2 3

I think the output should be: 3 3

is it ok??
Sun Dec 23, 2007 12:00 am
Forum: Volume 106 (10600-10699)
Topic: 10600 - ACM Contest and Blackout
Replies: 34
Views: 14011

### Got TLE

After TLE.... I got WA.... need some io.. here is my code: #include <stdio.h> #include <stdlib.h> #define INF 10000 typedef struct st { int weight; int v1,v2; }edges; st e[305],sav[305]; int nver,nedges,u[105],v[105],used[105],uused[105]; char intree[500]; int Min(int a,int b) { if(a<b) return a; el...
Sat Dec 22, 2007 3:50 pm
Forum: Volume 113 (11300-11399)
Topic: 11336 - DRM
Replies: 6
Views: 4107

### 11336 - DRM

//Remove After ACC... :) My Program is failed for Input: graph1 a b a c * * * graph2 a c a d d b * * * graph1 a b a c c d * * * graph2 a c c d a d d b * * * END Output should be: YES: graph2 is a more detailed version of graph1 NO: graph2 is not a more detailed version of graph1 Misunderstood the p...
Fri Dec 21, 2007 5:22 pm
Forum: Volume 105 (10500-10599)
Topic: 10596 - Morning Walk
Replies: 41
Views: 15153

### ACC

Thanks to Sohel Vhai....

I got ACC...
Fri Dec 21, 2007 1:31 pm
Forum: Volume 105 (10500-10599)
Topic: 10596 - Morning Walk
Replies: 41
Views: 15153

### WA

what's the problem in my code? I got WA...:( while(scanf("%d %d",&n,&m)==2) { for(i = 0;i<n;i++) for(j = 0;j<n;j++) G[i][j] = 0; for(i = 0;i<m;i++) { scanf("%d %d",&x,&y); G[x][y]++; } for(i = 0,flag = 1;i<n;i++) { if(flag) { x = inDegree(i); y = outDegree(i); if((x+y)==0||(x+y)%2==1) flag = 0; } } ...
Fri Dec 21, 2007 2:14 am
Forum: Volume 106 (10600-10699)
Topic: 10699 - Count the factors
Replies: 27
Views: 11759

### Thanks

I got ACC:)

Thanks to Martin Macko

The running time is 0.020 ...
how way i can improve my running time.....

thanks in advanced..
Thu Dec 20, 2007 11:17 pm
Forum: Volume 7 (700-799)
Topic: 793 - Network Connections
Replies: 102
Views: 32398

### Getting WA

I got WA..
What's the problem??

Here is my code:

Code: Select all

``````I have a simple mistake....
Delete After ACC...
``````

Thanks in Advanced...
Mon Dec 03, 2007 10:25 pm
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14585
To Sedefcho:

Plz correct ur i/o set....

To algoJo:
The problem statement:
all pancakes separated by a space.

So, there is no such Input that u given...
Mon Dec 03, 2007 7:45 pm
Forum: Volume 1 (100-199)
Topic: 122 - Trees on the level
Replies: 103
Views: 11309
I got WA. Here is my code: #include <stdio.h> #include <string.h> #include <stdlib.h> struct node { int value; char path[300]; }n[300]; int cmp(const void *a,const void *b) { char c[300],d[300]; int e,f; strcpy(c,((node*)a)->path); strcpy(d,((node*)b)->path); e = ((node*)a)->value; f = ((node*)b)->v...
Wed Nov 14, 2007 7:04 am
Forum: Volume 113 (11300-11399)
Topic: 11340 - Newspaper
Replies: 154
Views: 45805

### Read Carefully

Before post anything u must read the previous posts carefully....
Wed Nov 07, 2007 4:40 am
Forum: Volume 108 (10800-10899)
Topic: 10849 - Move the bishop
Replies: 44
Views: 16743
I have a problem:

I can not find any output greater than 2.

my algo is:

1. x1,y1,x2,y2 <------- take input
2. if x1+y1 and x2+y2 both odd or even
a) if x1+y1 and x2+y2 are equal
number of move is 1
b) else
number of move is 2
3. else
no move

am i right..