結果
問題 |
No.2071 Shift and OR
|
ユーザー |
|
提出日時 | 2022-09-16 21:32:51 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 355 bytes |
コンパイル時間 | 1,737 ms |
コンパイル使用メモリ | 193,144 KB |
最終ジャッジ日時 | 2025-02-07 06:08:42 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 19 WA * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main () { int N; cin >> N; int ans = 0; for (int i = 0; i < N; i ++) { int a; cin >> a; int kj = ans; for (int j = 0; j < 16; j ++) { ans = max(ans, kj | a); a = (a >> 1) | ((a & 1) << 15); } } cout << ans << endl; }