Search found 3 matches

by Nazim Gazi
Fri May 01, 2015 6:54 am
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 21421

Re: 444 - Encoder and Decoder

Why I am getting WA. Please help... #include<bits/stdc++.h> #include<algorithm> #include<cmath> #include<cstdlib> #include<cstdio> using namespace std; #define rep(i,n) for(__typeof(n) i=0;i<(n);i++) #define REP(i,a,b) for(__typeof(b) i=(a);i<=(b);i++) #define INF (1<<31) #define pb push_back #defin...
by Nazim Gazi
Sun Jan 18, 2015 7:01 pm
Forum: Volume 101 (10100-10199)
Topic: 10147 - Highways
Replies: 67
Views: 20458

Re: 10147 - Highways

Why I am getting WA . I cann't understand. Please help. :-? :-? :-? :-? #include<bits/stdc++.h> #define MAX 800 using namespace std; typedef pair<double,pair<int,int> > edge; vector<edge>e; int par[MAX]; int f_set(int x) { if(par[x]==x) return x; return par[x]=f_set(par[x]); } bool u_set(int x,int y...
by Nazim Gazi
Thu Jan 08, 2015 7:39 pm
Forum: Volume 101 (10100-10199)
Topic: 10147 - Highways
Replies: 67
Views: 20458

Re: 10147 - Highways

Getting runtime error . Please Help. struct edge { int a,b; double cost; bool operator <(const edge& p)const { return cost<p.cost; } }; vector<edge>e; int par[760]; int x[760],y[760]; int f_parent(int u) { if(par[u]==u) return u; par[u]=f_parent(par[u]); return par[u]; } void mst(int n) { edge ed; i...

Go to advanced search