QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#791860#9246. Dominating Pointxiaolei338WA 0ms5704kbC++201.2kb2024-11-28 21:25:222024-11-28 21:25:23

Judging History

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

  • [2024-11-28 21:25:23]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:5704kb
  • [2024-11-28 21:25:22]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
const int N = 2e5 + 10, mod = 998244353, INF = 0x3f3f3f3f;
random_device rd;
mt19937_64 rng(rd());

LL n, m;
// LL a[N];
bitset<5000> a[5010], b[5010];
void solve()
{
    cin >> n;
    for(int i = 0; i < n; i ++)
    {
        for(int j = 0; j < n; j ++)
        {
            char c;
            cin >> c;
            if(c == '1')a[i][j] = b[i][j] = 1;
        }
    }
    vector<int> ans;
    for(int i = 0; i < n; i ++)
    {
        for(int j = 0; j < n; j ++)
        {
            if(i == j)continue;
            if(a[i][j])continue;
            if((a[i] & b[j]).any())continue;
            ans.push_back(i);
            break;
        }
        if(ans.size() >= 3)continue;
    }
    if(ans.size() < 3)cout << "NOT FOUND\n";
    else{
        for(int i = 0; i < 3; i ++)cout << ans[i] + 1 << ' ';
        cout << '\n';
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    LL _T = 1;
    // cin >> _T;
    while(_T --)
    {
        solve();
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 5704kb

input:

6
011010
000101
010111
100001
010100
100010

output:

1 2 4 

result:

wrong answer Wrong Answer, Point not dominating.