QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#884500#4675. Multiple Communicationschy_is_a_fish0 1ms3712kbC++141.3kb2025-02-06 08:53:332025-02-06 08:53:36

Judging History

This is the latest submission verdict.

  • [2025-02-06 08:53:36]
  • Judged
  • Verdict: 0
  • Time: 1ms
  • Memory: 3712kb
  • [2025-02-06 08:53:33]
  • 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);}
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 << K << " " << K << "\n";
        } 
    }
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3712kb

First Run Input

Alice
111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...

First Run Output

011010010100100000110111110001010100100111001001001011010101101001001011111011100001100110011110110000110111100111101100101011101000101110010101001001100010010000001110100100010110000100111111100100101101010000011011011110100010001110111100001101000010110010110111001110110100111111100101000100000010...

Second Run Input

Bob
00000011100010001101011001011110011000101110001001000111010100011010001011101011100001110101110110110101111101110000110101010101000111101000110110001000010010100100100000110101000110110110111110100000101111101010100111000111100011000011111000000110000101101101001100111010001110110001101011101111...

Second Run Output

100000001011010010010101010100100001001010111010000110011001000011000011111100110010100100001101110001000010000001010111010001000010001101000010011110101100000011000100001010110010101111101010111000011001000010010011101111111100101000111111000110010000001011001110001100101000110100000111001010001011...

Third Run Input

Clara
011010010100100000110111110001010100100111001001001011010101101001001011111011100001100110011110110000110111100111101100101011101000101110010101001001100010010000001110100100010110000100111111100100101101010000011011011110100010001110111100001101000010110010110111001110110100111111100101000100...

Third Run Output

11 8
100 100
68 89
100 100
74 70
100 100
92 97
100 100
28 58
100 100
6 82
100 100
53 98
100 100
29 9
100 100
68 8
100 100
95 31
100 100
61 74
100 100
99 37
100 100
84 44
100 100
2 25
100 100
74 69
100 100
39 25
100 100
76 92
100 100
77 67
100 100
74 95
100 100
1 10
100 100
100 23
100 100
12 3
100 10...

Manager to Checker

WA
You answered 1 (out of 100) questions correctly

result:

wrong answer WA