結果
| 問題 |
No.2442 線形写像
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-10 15:22:29 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 883 bytes |
| コンパイル時間 | 1,578 ms |
| コンパイル使用メモリ | 162,268 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-01-02 20:49:39 |
| 合計ジャッジ時間 | 28,541 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 TLE * 12 |
ソースコード
#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 * 1980;
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';
}