c++题解
2026-07-05 16:22:11
发布于:浙江
2阅读
0回复
0点赞
直接上代码。
#include <bits/stdc++.h>
using namespace std;
int n,m,q,mp[105][105];
int main()
{
cin >> n >> m >> q;
memset(mp,0,sizeof(mp));
for(int i = 1;i <= m;i ++)
{
int x,y;
cin >> x >> y;
mp[x][y] = 1;
}
for(int i = 1;i <= q;i ++)
{
int x,y;
cin >> x >> y;
if(mp[x][y] == 0 && mp[y][x] == 0) cout << "Accepted" << endl;
else cout << "Cancel" << endl;
}
return 0;
}
这里空空如也


有帮助,赞一个