結果
| 問題 |
No.908 うしたぷにきあくん文字列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-03 00:39:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 500 bytes |
| コンパイル時間 | 4,092 ms |
| コンパイル使用メモリ | 249,656 KB |
| 最終ジャッジ日時 | 2025-01-26 03:00:05 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define P pair<int, int>
#define LP pair<ll, ll>
int main() {
string s;
getline(cin,s);
rep(i,s.size()) {
if (i%2==0 && !(s[i]-'a' >= 0 && s[i]-'a' <= 25)) {
cout << "No" << endl;
return 0;
}
if (i%2==1 && s[i]!= ' ') {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl;
}