QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#49235#4675. Multiple Communicationsiee0 0ms0kbC++141.1kb2022-09-19 19:55:482023-02-04 00:36:08

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:36:08]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2022-09-19 19:55:48]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
mt19937 eng(922114514);
int main() {
	freopen("clara.in", "r", stdin), freopen("clara.out", "w", stdout);
	string S;
	cin >> S;
	if (S[0] == 'A' || S[0] == 'B') {
		string T[105];
		for (int i = 1; i <= 100; ++i) cin >> T[i];
		string out;
		for (int i = 1; i <= 30; ++i) {
			int w = eng() % 1000;
			for (int j = 1; j <= 100; ++j) out += T[j][w];
		}
		cout << out;
	} else {
		string A, B;
		cin >> A >> B;
		vector<int> W;
		for (int i = 1; i <= 30; ++i)
			W.push_back(eng() % 1000);
		int T = 100;
		while (T--) {
			string C;
			cin >> C;
			auto ok = [&] (int x, int y) {
				x -= 1, y -= 1;
				for (int i = 0; i < 30; ++i) {
					int w = W[i];
					int gA = A[i * 100 + x] - '0', gB = B[i * 100 + y] - '0';
					if ((gA ^ gB) != C[w] - '0') {
						return false;
					}
				}
				return true;
			};
			for (int x = 1; x <= 100; ++x)
				for (int y = 1; y <= 100; ++y)
					if (ok(x, y)) {
						cout << x << ' ' << y << '\n';
						goto nxt;
					}
			cout << 1 << ' ' << 1 << '\n';
			nxt:;
		}
	}
}

详细

Test #1:

score: 0
Instance #0 Dangerous Syscalls

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: