結果
| 問題 | No.2442 線形写像 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-10 11:38:56 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 588 bytes |
| 記録 | |
| コンパイル時間 | 821 ms |
| コンパイル使用メモリ | 32,000 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-01-02 17:33:43 |
| 合計ジャッジ時間 | 17,201 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 TLE * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
main.cpp:12:41: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | for(int i = 0; i < n; i++) scanf("%llu", &a[i]);
| ~~~~~^~~~~~~~~~~~~~~
ソースコード
#pragma GCC optimize ("O3","unroll-loops")
#pragma GCC target("avx512f")
#include <stdio.h>
using namespace std;
using ull = unsigned long long;
int main(){
int n;
scanf("%d", &n);
n = 1 << n;
ull a[n];
for(int i = 0; i < n; i++) scanf("%llu", &a[i]);
if(a[0]){
puts("No");
return 0;
}
for(register int i = 0; i < n; i++){
register ull b = a[i];
for(register int j = 0; j < i; j++){
if(b ^ a[i ^ j] ^ a[j]){
puts("No");
return 0;
}
}
}
puts("Yes");
}