結果

問題 No.908 うしたぷにきあくん文字列
ユーザー test
提出日時 2020-09-12 02:37:34
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 424 bytes
コンパイル時間 1,752 ms
コンパイル使用メモリ 192,620 KB
最終ジャッジ日時 2025-01-14 12:55:33
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

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

bool isFunc(const string &s) {
  for (int i = 1; i < s.size(); i += 2)
    if (s[i] != ' ') return false;
  for (int i = 0; i < s.size(); i += 2)
    if (s[i] == ' ') return false;
  return true;
}

void solve() {
  string s;
  getline(cin, s);
  cout << (isFunc(s) ? "Yes" : "No") << endl;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  getchar();
}
0