結果

問題 No.3061 uxs hxixtya pyuyn ixc hyixa kxuyn
ユーザー trineutrontrineutron
提出日時 2020-04-01 23:27:38
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 491 bytes
コンパイル時間 1,987 ms
コンパイル使用メモリ 199,488 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-09 20:15:01
合計ジャッジ時間 4,513 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 RE -
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 1 ms
4,376 KB
testcase_14 RE -
testcase_15 AC 1 ms
4,376 KB
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 1 ms
4,376 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    string s;
    getline(cin, s);
    vector<int> even(26), odd(26);
    for (int i = 0; i < s.size(); i++) {
        if (i % 2 == 0) {
            even.at(s.at(i) - 'a')++;
        } else {
            odd.at(s.at(i) - 'a')++;
        }
    }
    for (int i = 0; i < 26; i++) {
        if (s.size() >= 2 && (even.at(i) == 0) != (odd.at(i) == 0)) {
            puts("Yes");
            return 0;
        }
    }
    puts("NO");
}
0