Search found 3 matches

by Rafiq123
Thu Oct 30, 2014 2:18 pm
Forum: Volume 110 (11000-11099)
Topic: 11060 - Beverages
Replies: 96
Views: 32814

11060 Beverages Why Time Limit ???? Help Anyone Please...

#include<cstdio> #include<map> #include<algorithm> #include<cstring> #include<string> #include<queue> #include<iostream> #define MAX 300 using namespace std; int mat[MAX][MAX],indegree[MAX],cnt,color[MAX]; string a,X,Y,stor; map<string,int>mymap; map<int,string>my; void TOP(int N) { queue<int>Q; in...
by Rafiq123
Sun Jun 29, 2014 8:43 pm
Forum: Volume 115 (11500-11599)
Topic: 11503 - Virtual Friends
Replies: 49
Views: 17689

11503 - Virtual Friends

#include<cstdio> #include<cstring> #include<algorithm> #include<map> #include<iostream> #include<string> #include<vector> using namespace std; int par[100005]; void makeset(int element) { par[element]=element; } int find_rep(int r); void Union(int a,int b) { int u,v; u = find_rep(a); v = find_rep(b)...
by Rafiq123
Sun Jun 29, 2014 7:25 pm
Forum: Volume 115 (11500-11599)
Topic: 11503 - Virtual Friends
Replies: 49
Views: 17689

11503 - Virtual Friends....TLE ....please help....

#include<cstdio> #include<cstring> #include<algorithm> #include<map> #include<iostream> #include<string> #include<vector> using namespace std; int par[100005]; void makeset(int element) { par[element]=element; } int find_rep(int r); void Union(int a,int b) { int u,v; u = find_rep(a); v = find_rep(b)...

Go to advanced search