QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#65186#4675. Multiple CommunicationsT3alaadl3k2olyehymn3k#0 0ms0kbC++201.1kb2022-11-27 23:16:252023-02-04 00:38:43

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-04 00:38:43]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2022-11-27 23:16:25]
  • 提交

answer

#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")

#include "bits/stdc++.h"

using namespace std;
const int N = 100;
bitset<1000> a[N], b[N];
unordered_map<bitset<1000>, pair<int, int>> ans;

void input() {
    string s;
    cin >> s;
    for (int i = 0; i < 100; i++) {
        string t;
        cin >> t;
        bitset<1000> bs(t);
        a[i] = bs;
    }
    cin >> s;
    for (int i = 0; i < 100; i++) {
        string t;
        cin >> t;
        bitset<1000> bs(t);
        a[i] = bs;
    }
    for (int i = 0; i < 100; i++) {
        for (int j = 0; j < 100; j++) {
            ans[a[i] ^ b[j]] = {i + 1, j + 1};
        }
    }
    cin >> s;
    int Q;
    cin >> Q;
    while (Q--) {
        string s;
        cin >> s;
        bitset<1000> bs(s);
        pair<int, int> tmp = ans[bs];
        cout << tmp.first << ' ' << tmp.second << endl;
    }
}

int main() {
    ios::sync_with_stdio(false);
    cout.tie(nullptr);
    cin.tie(nullptr);
    input();
    return 0;
}

详细

Test #1:

score: 0
Instance #0 Time Limit Exceeded

First Run Input

Alice
111101001110010010001100100110111010100101011011100010101101001000010111100100110100000111101101111110010010000110000110111000111101010101011000000011011110000001000101110110101110010011110110110000100101110111000010010101010110011010001101100111001010100011001000100101100101010110000100001110...

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: