結果

問題 No.2655 Increasing Strides
ユーザー aaaaaaaaaa2230
提出日時 2024-03-01 22:38:26
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 2,557 ms
コンパイル使用メモリ 244,180 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-09-29 14:36:23
合計ジャッジ時間 3,759 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;



int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;

    int odd = (n+1)/2;
    int even = n/2;

    if (odd%2) {
        cout << "No" << endl;
        return 0;
    }

    long long s = even * (even+1)/2;
    if (s%2){
        cout << "No" << endl;
    } else {
        cout << "Yes" << endl;
    }


    return 0;
}
0