QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#97360 | #5672. Connectivity Problem | aguo123 | Compile Error | / | / | C++11 | 692b | 2023-04-16 17:55:54 | 2023-04-16 17:55:57 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-04-16 17:55:57]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-04-16 17:55:54]
- 提交
answer
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cstring>
#include<map>
using namespace std;
typedef long long LL;
const int N=2e5+10;
int n,T;
int ans;
int p[1100];
int find(int x){
if(p[x]!=x)p[x]=find(p[x]);
retunr p[x];
}
int main()
{
T=1;
while(T--){
ans=0;
cin>>n;
for(int i=0;i<=1000;i++)p[i]=i;
for(int i=1;i<=n;i++){
int a,b;
cin>>a>>b;
int pa=find(a),pb=find(b);
if(pa!=pb){
puts("N");
p[pa]=pb;
}else puts("Y");
}
// cout<<ans<<endl;
}
return 0;
}
詳細信息
answer.code: In function ‘int find(int)’: answer.code:15:4: error: ‘retunr’ was not declared in this scope 15 | retunr p[x]; | ^~~~~~ answer.code:16:1: warning: no return statement in function returning non-void [-Wreturn-type] 16 | } | ^