結果
問題 | No.2442 線形写像 |
ユーザー |
|
提出日時 | 2023-06-10 15:30:14 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 221 ms / 2,000 ms |
コード長 | 882 bytes |
コンパイル時間 | 1,554 ms |
コンパイル使用メモリ | 168,652 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 07:57:48 |
合計ジャッジ時間 | 5,159 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ull = unsigned long long; unsigned long long xor64() { static unsigned long long x = (unsigned long long)(chrono::duration_cast<chrono::nanoseconds>( chrono::high_resolution_clock::now().time_since_epoch()).count()) * 10150724397891781847ULL; x ^= x << 7; return x ^= x >> 9; } int main(){ clock_t finish = clock() + CLOCKS_PER_SEC / 1000 * 200; ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; n = 1 << n; vector<ull> a(n); for(auto &&v : a) cin >> v; if(a[0]){ cout << "No" << '\n'; return 0; } while(clock() <= finish){ int i = xor64() % n, j = xor64() % n; if(a[i] ^ a[j] ^ a[i ^ j]){ cout << "No" << '\n'; exit(0); } } cout << "Yes" << '\n'; }