結果

問題 No.2322 MMA文字列
ユーザー eizi
提出日時 2023-05-28 13:33:52
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 479 bytes
コンパイル時間 2,050 ms
コンパイル使用メモリ 192,228 KB
最終ジャッジ日時 2025-02-13 09:51:53
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

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

#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = unsigned long long;
using Graph = vector<vector<int>>;

int main()
{
    string s;
    cin >> s;
    bool yes = 1;

    char hitomozi = s.at(0);

    if (!(s.at(1) == hitomozi))
    {
        yes = 0;
    }
    if (s.at(2) == hitomozi)
    {
        yes = 0;
    }
    if (yes)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}
0