結果

問題 No.908 うしたぷにきあくん文字列
ユーザー sbite
提出日時 2019-10-18 21:36:22
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,042 bytes
コンパイル時間 1,422 ms
コンパイル使用メモリ 160,224 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-25 15:09:42
合計ジャッジ時間 2,133 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ll long long
#define lld long double
#define ALL(x) x.begin(), x.end()
#ifdef DEBUG
#define line() cerr << "[" << __LINE__ << "] ";
#define dump(i) cerr << #i ": " << i << " ";
#define dumpl(i) cerr << #i ": " << i << endl;
#else
#define line(i)
#define dump(i)
#define dumpl(i)
#endif
using namespace std;
int main(int argc, char const *argv[])
{
    string s;

    getline(cin, s);
    rep(i, s.size())
    {
        if (i % 2 == 0)
        {
            if (!('a' <= s[i] && s[i] <= 'z'))
            {
                cout << "No" << endl;
                return 0;
            }
        }
        else
        {
            if (!(s[i] == ' '))
            {
                cout << "No" << endl;
                return 0;
            }
        }
    }
    cout << "Yes" << endl;
    return 0;
}
0