This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| vector<int>edges[1000]; | |
| queue<int>q; | |
| int color[1000],visited[1000],tn; | |
| int bipartite(int s) | |
| { | |
| int j,k,fr; | |
| memset(color,-1,sizeof color); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| vector<int>edges[1000]; | |
| queue<int>q; | |
| vector<int>item; | |
| int color[1000],visited[1000],tn,c,d,x,j,ch,sum; | |
| int bipartite(int s) | |
| { | |
| int k,fr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define p pair<long long int,long long int> | |
| vector < p >edges[50005]; | |
| priority_queue <p,vector <p>,greater<p> >q; | |
| long long int sp[50005],visited[50005]; | |
| int pr[50005]; | |
| long long int dijkstra(long long int s, long long int d) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define p pair<long long int,long long int> | |
| vector < p >edges[100005]; | |
| priority_queue <p,vector <p>,greater<p> >q; | |
| long long int sp[100005],visited[100005]; | |
| vector<long long int>vec; | |
| int pr[100005]; | |
| long long int dijkstra(long long int s, long long int d) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| vector <pair<int,int> >edges[1000]; | |
| priority_queue <pair<int,int>,vector <pair<int,int> >,greater<pair<int,int> > >q; | |
| int pr[1000],sp[1000]; | |
| int dijkstra(int s, int d) | |
| { | |
| pair <int,int >t; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| vector<int>edges[100]; | |
| stack<int>q; | |
| vector<int>item; | |
| int level[100],parent[100],visited[100],tn,v[100]; | |
| void dfs(int s) | |
| { | |
| int j, k, fr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| vector<int>edges[100]; | |
| queue<int>q; | |
| vector<int>item; | |
| int level[100],color[100],visited[100],tn; | |
| int bipartite(int s) | |
| { | |
| int j,k,fr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| vector<int>edges[100]; | |
| queue<int>q; | |
| vector<int>item; | |
| int level[100],parent[100],visited[100],tn; | |
| void bfs(int s) | |
| { | |
| int j,k,fr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| int main() | |
| { | |
| int i,j,n,e,u,v,g[100][100]; | |
| cin>>n>>e; | |
| for(i=1;i<=e;i++) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| vector<int>edges[1000]; | |
| vector<int>cost[1000]; | |
| vector<int>outdegree; | |
| vector<int>indegree[100]; | |
| vector<int>indeg; | |
| int main() | |
| { | |
| int i,j,n,e,u,v,k,c,l,m; |
NewerOlder