QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#884495#4675. Multiple Communicationschy_is_a_fish0 0ms0kbC++141.3kb2025-02-06 08:52:192025-02-06 08:52:21

Judging History

This is the latest submission verdict.

  • [2025-02-06 08:52:21]
  • Judged
  • Verdict: 0
  • Time: 0ms
  • Memory: 0kb
  • [2025-02-06 08:52:19]
  • Submitted

answer

#include <bits/stdc++.h>
using namespace std;
const int N = 3005, L = 1000, K = 100;
mt19937 rnd(23472347);
unsigned int R() {return (rnd() & ((1u << 30) - 1)) ^ 24352134u;}
string name;
unsigned int val[L], a[N], b[N];
string A, B, num, w;
int main()
{
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    cin >> name;
    for (int i = 0; i < L; i++) val[i] = R();
    if (name[0] != 'C')
    {
        for (int i = 1; i <= K; i++) 
        {
            cin >> num; unsigned int ret = 0;
            for (int j = 0; j < L; j++) if (num[j] == '1') ret ^= val[j];
            for (int j = 0; j < 30; j++) cout << ((ret >> j) & 1);
        }
    }
    else
    {
        cin >> A >> B; int pa = 0, pb = 0;
        for (int i = 1; i <= K; i++)
            for (int j = 0; j < 30; j++) if (A[pa++] == '1') a[i] |= (1 << j);
        for (int i = 1; i <= K; i++)
            for (int j = 0; j < 30; j++) if (B[pb++] == '1') b[i] |= (1 << j);
        for (int _ = 1; _ <= K; _++)
        {
            cin >> w; unsigned int ret = 0;
            for (int j = 0; j < L; j++) if (w[j] == '1') ret ^= val[j];
            for (pa = 1; pa <= K; pa++) for (pb = 1; pb <= K; pb++)
                if (!(a[pa] ^ b[pb] ^ ret)) {cout << pa << " " << pb << "\n"; break;}
            cout << n << " " << n << "\n";
        } 
    }
    return 0;
}

詳細信息

Test #1:

score: 0
Instance #0 Judgement Failed

First Run Input


First Run Output


Second Run Input


Second Run Output


Third Run Input


Third Run Output


Manager to Checker

WA
Wrong Answer on First Run: the length of the output should be exactly 3000.

result: