結果

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

ソースコード

diff #

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

bool f(vector<int>& A) {
    return (A.size() - 1) / 2 & 1;
}

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);
    }

    cout << (f(even) && f(odd) ? "Yes" : "No") << endl;
}
0