結果
| 問題 |
No.908 うしたぷにきあくん文字列
|
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2020-08-04 15:19:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 348 bytes |
| コンパイル時間 | 631 ms |
| コンパイル使用メモリ | 64,256 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 16:33:28 |
| 合計ジャッジ時間 | 1,770 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 18 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main(){
string S;
getline(cin, S);
int N = S.size();
bool ok = true;
for (int i = 0; i < N; i++){
if (i % 2 == 0 && S[i] == ' '){
ok = false;
}
if (i % 2 == 1 && S[i] != ' '){
ok = false;
}
}
if (ok){
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}
SSRS