結果

問題 No.908 うしたぷにきあくん文字列
ユーザー gemygemy
提出日時 2023-11-22 10:26:04
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 2,286 ms
コンパイル使用メモリ 201,776 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2023-11-22 10:26:08
合計ジャッジ時間 3,808 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
6,676 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 2 ms
6,676 KB
testcase_11 AC 2 ms
6,676 KB
testcase_12 WA -
testcase_13 AC 2 ms
6,676 KB
testcase_14 WA -
testcase_15 AC 2 ms
6,676 KB
testcase_16 WA -
testcase_17 AC 2 ms
6,676 KB
testcase_18 WA -
testcase_19 AC 1 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
    // Input
    string S;
    cin >> S;

    // Judge
    bool ok = true;
    rep(i, S.size()) {
        if (i % 2 == 0 && !('a' <= S[i] && S[i] <= 'z')) ok = false;
        if (i % 2 == 1 && S[i] != ' ') ok = false;
    }

    // Output
    cout << (ok ? "Yes" : "No") << endl;
}
0