以下の内容はhttps://blog.hamayanhamayan.com/entry/2020/03/08/100325より取得しました。


Station and Bus [AtCoder Beginner Contest 158 A]

https://atcoder.jp/contests/abc158/tasks/abc158_a

解説

https://atcoder.jp/contests/abc158/submissions/10643199

すべて同じ場合はNoであり、複数種類あればYesである。
どうやって判定してもいいが、自分はソートして最初と最後を比較した。

string S;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> S;
    sort(all(S));

    if (S[0] != S[2]) cout << "Yes" << endl;
    else cout << "No" << endl;
}



以上の内容はhttps://blog.hamayanhamayan.com/entry/2020/03/08/100325より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14