比赛 |
防止isaac的小练习day2 |
评测结果 |
WWWWWWWWW |
题目名称 |
道路重建 |
最终得分 |
0 |
用户昵称 |
蜗牛哲 |
运行时间 |
0.019 s |
代码语言 |
C++ |
内存使用 |
0.36 MiB |
提交时间 |
2016-11-02 11:53:36 |
显示代码纯文本
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<climits>
#include<cstdlib>
#include<ctime>
#include<cctype>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<deque>
#include<string>
#include<sstream>
#include<iomanip>
using namespace std;
//=====================struct declaration======================
//=====================var declarartion========================
const int maxn=100+10;
int a[maxn][maxn];
int n,m,d,s,f,min1=INT_MAX;
//=====================function declaration====================
//=====================main code===============================
int main()
{
freopen("rebuild.in","r",stdin);
freopen("rebuild.out","w",stdout);
cin>>n>>m;
for(int ii=1; ii<=m; ii++)
{
int i,j,k;
cin>>i>>j>>k;
a[i][j]=k; a[j][i]=k;
}
cin>>d;
for(int ii=1; ii<=d; ii++)
{
int i,j;
cin>>i>>j;
if(a[i][j]<min1) min1=a[i][j];
}
cin>>s>>f;
cout<<min1<<endl;
return 0;
}
//=====================function code===========================