QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#780552 | #9246. Dominating Point | maxiaomeng | WA | 998ms | 6700kb | C++14 | 611b | 2024-11-25 11:31:31 | 2024-11-25 11:31:32 |
Judging History
answer
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
const int N=5005;
bitset<N>a[N],b,c,z;
int n;
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n;
for(int i=1;i<=n;i++){
c.set(i);
for(int j=1;j<=n;j++){
char x;
cin>>x;
if(x&1)a[i].set(j);
}
}
for(int i=1;i<=n;i++){
b=a[i];
b[i]=1;
for(int j=1;j<=n;j++){
if(a[i][j])b|=a[j];
}
if(b==c)z[i]=1;
}
if(z.count()<3)return cout<<"NOT FOUND",0;
int c=0;
for(int i=1;i<=n;i++){
if(z[i])cout<<i<<' ';
if(c==3)return 0;
++c;
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3576kb
input:
6 011010 000101 010111 100001 010100 100010
output:
1 3 4
result:
ok OK, Answer correct.
Test #2:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
3 011 001 000
output:
NOT FOUND
result:
ok OK, Answer correct.
Test #3:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
3 010 001 100
output:
1 2 3
result:
ok OK, Answer correct.
Test #4:
score: -100
Wrong Answer
time: 998ms
memory: 6700kb
input:
4994 0100001010011001010101110010101000111101111100100001110010000111100000000100110100101000001010100000010010010110110110111010010010100110100000110110111001010111010111010111011001000101001000010001010111110000000100001100000111100011001010010111011100111010101110011000010111101011111110001111110...
output:
1 2 3 4
result:
wrong output format Extra information in the output file