結果
| 問題 |
No.908 うしたぷにきあくん文字列
|
| コンテスト | |
| ユーザー |
dgd1724
|
| 提出日時 | 2019-10-26 10:59:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 547 bytes |
| コンパイル時間 | 518 ms |
| コンパイル使用メモリ | 62,344 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 03:11:27 |
| 合計ジャッジ時間 | 1,332 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include <fstream>
#include <iostream>
#include <utility> //pair
#include <string>
#include <cmath> //pow
int main() {
//std::ifstream inf("Text.txt"); std::cin.rdbuf(inf.rdbuf());
std::string S;
std::getline(std::cin, S);
bool flg = true;
for (unsigned int i = 0; i < S.length(); i++) {
if (i % 2 == 0) {
if (S[i] == ' ') {
flg = false;
break;
}
}
else {
if (S[i] != ' ') {
flg = false;
break;
}
}
}
if (flg) {
std::cout << "Yes" << std::endl;
}
else {
std::cout << "No" << std::endl;
}
}
dgd1724