Pagini recente » Cod sursa (job #17383) | Cod sursa (job #1025873) | Cod sursa (job #2447992) | Cod sursa (job #1869441) | Cod sursa (job #1515936)
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("ubuntzei.in");
ofstream fout ("ubuntzei.out");
const int MAX = 2005;
const int BMOD = 50;
const int INF = 1e9;
char buffer[BMOD + 1];
int e = BMOD - 1,D[MAX],v[16];
vector < pair < int,int > > G[MAX];
set < pair < int, int > > T;
inline void parsare(int &x)
{
while(!isdigit(buffer[e])){
e++;
if(e == BMOD)
e = 0,fin.read(buffer,BMOD);
}
x = 0;
while(isdigit(buffer[e])){
x = x * 10 + (buffer[e] - '0');
e++;
if(e == BMOD)
e = 0,fin.read(buffer,BMOD);
}
}
int main()
{
int m.x,y,c,p;
parsare(n); parsare(m); parsare(p);
v[0] = 1;
for(int i = 1; i <= p ; i++)
parsare(v[i]);
v[p] = n;
for(int i = 1; i <= m; i++){
parsare(x); parsare(y); parsare(c);
G[x].push_back({c,y});
G[y].push_back({c,x});
}
cout << "Hello world!" << endl;
return 0;
}