結果
問題 |
No.908 うしたぷにきあくん文字列
|
ユーザー |
![]() |
提出日時 | 2019-11-22 22:54:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 379 bytes |
コンパイル時間 | 617 ms |
コンパイル使用メモリ | 67,612 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-11 04:32:34 |
合計ジャッジ時間 | 1,334 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 18 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; int main(){ string s; cin >> s; int l = s.size(); string ans = "Yes"; for ( int i = 0; i < l; i++ ) { if ( i % 2 == 0 && s[i] == ' ' ) { ans = "No"; } else if ( i % 2 == 1 && s[i] != ' ' ) { ans = "No"; } } return 0; }