QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#306073#7604. Find the Vertex11d10xyWA 6ms19404kbC++14353b2024-01-16 12:05:492024-01-16 12:05:50

Judging History

你现在查看的是最新测评结果

  • [2024-01-16 12:05:50]
  • 评测
  • 测评结果:WA
  • 用时:6ms
  • 内存:19404kb
  • [2024-01-16 12:05:49]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int n,m,d[500010];
basic_string<int>G[500010];
int main(){
   cin>>n;
   for(int i=1;i<=n;i++)scanf("%d",&d[i]);
   for(int u,v;m--;)scanf("%d%d",&u,&v),G[u]+=v,G[v]+=u;
   for(int i=1;i<=n;i++)if(!d[i]&&all_of(begin(G[i]),end(G[i]),[](int u){return d[u]==1;}))
   return cout<<i,0;
   return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 6ms
memory: 19404kb

input:

5 6
1 0 1 1 2
5 4
1 2
3 2
3 4
4 2
1 5

output:

3

result:

wrong answer 1st numbers differ - expected: '2', found: '3'