結果

問題 No.908 うしたぷにきあくん文字列
ユーザー Konton7
提出日時 2019-11-22 23:01:45
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 586 ms
コンパイル使用メモリ 68,260 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-11 04:36:56
合計ジャッジ時間 1,343 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>

using namespace std;

int main(){
    string s;
    getline(cin,s);
    int l = s.size();
    string ans = "Yes";
    for ( int i = 0; i < l;  i++ ) {
        if ( i % 2 == 0 && s[i] == ' ' ) {
            ans  = "No";
        }
        else if ( i % 2 == 1 && s[i] != ' ' ) {
            ans  = "No";
        }
    }
    
    cout << ans << endl;
    return 0;
}
0