結果
| 問題 |
No.908 うしたぷにきあくん文字列
|
| コンテスト | |
| ユーザー |
Konton7
|
| 提出日時 | 2019-11-22 22:56:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 399 bytes |
| コンパイル時間 | 706 ms |
| コンパイル使用メモリ | 67,208 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-11 04:33:13 |
| 合計ジャッジ時間 | 1,354 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 9 |
ソースコード
#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";
}
}
cout << ans << endl;
return 0;
}
Konton7