結果
問題 | No.908 うしたぷにきあくん文字列 |
ユーザー |
![]() |
提出日時 | 2019-10-18 23:17:04 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 541 bytes |
コンパイル時間 | 1,637 ms |
コンパイル使用メモリ | 81,416 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 19:29:55 |
合計ジャッジ時間 | 1,478 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <iostream> #include <vector> #include <map> #include <set> #include <queue> #include <string> #include <iomanip> #include <algorithm> #include <cmath> #include <stdio.h> using namespace std; #define int long long int MOD = 1000000007; signed main() { cin.tie(0); ios::sync_with_stdio(false); string S; string res = "Yes"; getline(cin, S); for (int i = 0; i < S.size(); i++) { if (i % 2 == 0) { if (S[i] == ' ') { res = "No"; } } else { if (S[i] != ' ') { res = "No"; } } } cout << res << endl; }