結果
問題 |
No.1717 Levi-Civita Triangle
|
ユーザー |
![]() |
提出日時 | 2021-08-04 23:01:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 556 bytes |
コンパイル時間 | 3,219 ms |
コンパイル使用メモリ | 223,784 KB |
最終ジャッジ日時 | 2025-01-23 14:06:35 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 42 |
ソースコード
#pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #pragma GCC target("popcnt,bmi2,fma,fma4,avx512f,avx512dq,avx512cd,avx512bw,avx512vl") #include <bits/stdc++.h> using namespace std; int a[200001], b[200001]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; for(int i = 0; i < 2 * n + 1; i++) cin >> a[i]; while(n--) { for(int i = 0; i < n * 2 + 1; i++) { b[i] = a[i] + a[i + 1] + a[i + 2] == 3 ? a[i + 1] - a[i] == 1 or a[i + 1] - a[i] == -2 ? 1 : 2 : 0; } swap(a, b); } cout << a[0] << endl; }