#include<iostream>
#include<iomanip>
using namespace std;
int y,x;
struct node//使用数组结果超时
{
int x,y,z;
}t[1001];
int juzhen(int k,int x)
{
for(int i=0;i<k;i++)
if(x==t[i].z)
{
y=1;
break;
}
if(y==1)cout<<"OK"<<endl;
if(y==0)cout<<"ERROR"<<endl;
}
int main()
{
int n,m,k;
while (cin>>m>>n>>k)
{
y=0;
for(int i=0;i<k;i++)
cin>>t[i].x>>t[i].y>>t[i].z;
cin>>x;
juzhen(k,x);
}
}
3348 数据结构实验之数组二:稀疏矩阵
最新推荐文章于 2020-03-14 16:34:21 发布