結果
問題 |
No.908 うしたぷにきあくん文字列
|
ユーザー |
|
提出日時 | 2019-11-06 21:26:18 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 444 bytes |
コンパイル時間 | 531 ms |
コンパイル使用メモリ | 66,568 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-15 00:26:34 |
合計ジャッジ時間 | 1,253 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<queue> typedef long long ll; using namespace std; int main(){ string s; getline(cin, s); for (int i = 0; i < s.length(); ++i){ if ((i + 1) % 2 && !('a' <= s[i] && s[i] <= 'z')){ cout << "No" << endl; exit(0); } if (!((i + 1) % 2) && s[i] != ' '){ cout << "No" << endl; exit(0); } } cout << "Yes" << endl; return 0; }