結果

問題 No.908 うしたぷにきあくん文字列
ユーザー nayuta
提出日時 2019-10-18 21:25:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 354 bytes
コンパイル時間 1,541 ms
コンパイル使用メモリ 165,596 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-25 14:50:07
合計ジャッジ時間 2,006 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
  string s;
  cin >> s;

  for (int i = 0; i < s.size(); i++) {
    if ((i + 1) % 2) {
      if (s[i] == ' ') {
        cout << "No\n";
        return 0;
      }
    } else {
      if (s[i] != ' ') {
        cout << "No\n";
        return 0;
      }
    }
  }
  cout << "Yes\n";

  return 0;
}
0