結果
問題 |
No.908 うしたぷにきあくん文字列
|
ユーザー |
|
提出日時 | 2019-11-06 21:17:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 436 bytes |
コンパイル時間 | 883 ms |
コンパイル使用メモリ | 66,328 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-15 00:26:28 |
合計ジャッジ時間 | 1,313 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 WA * 9 |
ソースコード
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<cmath> #include<queue> typedef long long ll; using namespace std; int main(){ string s; 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; }