結果
問題 | No.908 うしたぷにきあくん文字列 |
ユーザー | shop_one |
提出日時 | 2019-10-18 21:52:21 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 451 bytes |
コンパイル時間 | 508 ms |
コンパイル使用メモリ | 61,460 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 15:36:18 |
合計ジャッジ時間 | 1,158 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> using namespace std; typedef long long ll; typedef pair<ll,ll> P; signed main(){ string s; bool usi=true; getline(cin,s); for(int i=0;s[i]!=0;i++){ if(i%2==0){ if('a'>s[i]||s[i]>'z'){ usi = false; break; } }else{ if(s[i]!=' '){ usi=false; break; } } } if(usi){ cout <<"Yes\n"; }else{ cout <<"No\n"; } }