結果
| 問題 |
No.2655 Increasing Strides
|
| コンテスト | |
| ユーザー |
SnowBeenDiding
|
| 提出日時 | 2024-03-01 21:24:20 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 465 bytes |
| コンパイル時間 | 4,895 ms |
| コンパイル使用メモリ | 307,868 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-09-29 13:27:05 |
| 合計ジャッジ時間 | 5,860 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 34 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace std;
using namespace atcoder;
typedef long long ll;
int main() {
ll n;
cin >> n;
bool ok1 = false, ok2 = false;
ll ev = n / 2;
ll od = n - ev;
if (od % 2 == 0) ok1 = true;
if ((ev * (ev + 1) / 2) % 2 == 0) ok2 = true;
if (ok1 && ok2)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
SnowBeenDiding