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...
//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...
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...
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..