結果
| 問題 | No.908 うしたぷにきあくん文字列 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-15 19:01:27 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 373µs | |
| コード長 | 378 bytes |
| 記録 | |
| コンパイル時間 | 808 ms |
| コンパイル使用メモリ | 183,116 KB |
| 実行使用メモリ | 9,780 KB |
| 最終ジャッジ日時 | 2026-08-31 12:11:23 |
| 合計ジャッジ時間 | 2,132 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
getline(cin, s);
bool ans = true;
for (int i = 0; i < s.size(); i++) {
if (i % 2 == 0) {
if (s[i] == ' ') ans = false;
}
if (i % 2 == 1) {
if (s[i] != ' ') ans = false;
}
}
if (ans) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
return 0;
}