結果

問題 No.2442 線形写像
ユーザー ripityripity
提出日時 2023-08-25 21:42:51
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 562 bytes
コンパイル時間 4,281 ms
コンパイル使用メモリ 260,204 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-25 21:42:57
合計ジャッジ時間 6,317 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 WA -
testcase_05 AC 1 ms
4,380 KB
testcase_06 WA -
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 WA -
testcase_10 AC 4 ms
4,376 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 3 ms
4,376 KB
testcase_14 AC 112 ms
4,380 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 286 ms
4,380 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#include <atcoder/all>
using namespace atcoder;

int main() {
	int N;
	cin >> N;
	vector<long long> A(1<<N);
	for( int i = 0; i < 1<<N; i++ ) {
		cin >> A[i];
	}
	string ans = "Yes";
	for( int k = 0; k < N; k++ ) {
		for( int i = 0; i < 1<<N; i++ ) {
			if( A[k] != A[i]^A[i^k] ) ans = "No";
		}
	}
	random_device seed_gen;
	mt19937 rnd(seed_gen());
	for( int t = 0; t < 100; t++ ) {
		int k = rnd()%(1<<N);
		for( int i = 0; i < 1<<N; i++ ) {
			if( A[k] != A[i]^A[i^k] ) ans = "No";
		}
	}
	cout << ans << endl;
}
0