結果
| 問題 |
No.2655 Increasing Strides
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-01 21:26:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 453 bytes |
| コンパイル時間 | 1,969 ms |
| コンパイル使用メモリ | 194,944 KB |
| 最終ジャッジ日時 | 2025-02-19 22:18:33 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
bitset<300001> dp, dp2;
dp[150000] = 1;
dp2[150000] = 1;
for(int i = 1; i <= n; i++){
if(i & 1){
dp >>= i;
dp |= dp << 2 * i;
}else{
dp2 >>= i;
dp2 <<= 2 * i;
}
}
cout << (dp[150000] && dp2[150000] ? "Yes" : "No") << '\n';
}