結果
| 問題 | No.2322 MMA文字列 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2024-04-01 15:18:53 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 341 bytes | 
| コンパイル時間 | 798 ms | 
| コンパイル使用メモリ | 77,304 KB | 
| 最終ジャッジ日時 | 2025-02-20 18:54:35 | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 18 WA * 1 | 
ソースコード
#include <iostream>
#include <string>
#include <set>
using namespace std;
int main() {
    string S;
    cin >> S;
    set<char> unique_chars;
    for (char c : S) {
        unique_chars.insert(c);
    }
    if (unique_chars.size() == 2) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}
            
            
            
        