結果

問題 No.2655 Increasing Strides
ユーザー i_taku
提出日時 2025-03-27 15:51:22
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 413 bytes
コンパイル時間 2,044 ms
コンパイル使用メモリ 195,344 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-03-27 15:51:26
合計ジャッジ時間 3,463 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

    int n; cin >> n;
    vector<int> odd, even;
    for (int i = 1; i <= n; i++) {
        if (i % 2 == 0) even.push_back(i);
        else odd.push_back(i);
    }

    bool res1 = (even.size() - 1) / 2 & 1;
    bool res2 = odd.size() / 2 & 1;

    cout << (res1 && res2 ? "Yes" : "No") << endl;
}
0