結果
問題 | No.908 うしたぷにきあくん文字列 |
ユーザー |
![]() |
提出日時 | 2020-08-04 15:21:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 348 bytes |
コンパイル時間 | 1,207 ms |
コンパイル使用メモリ | 64,384 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 16:36:15 |
合計ジャッジ時間 | 1,432 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <iostream>#include <string>using namespace std;int main(){string S;getline(cin, S);int N = S.size();bool ok = true;for (int i = 0; i < N; i++){if (i % 2 == 0 && S[i] == ' '){ok = false;}if (i % 2 == 1 && S[i] != ' '){ok = false;}}if (ok){cout << "Yes" << endl;} else {cout << "No" << endl;}}