結果
問題 |
No.2322 MMA文字列
|
ユーザー |
|
提出日時 | 2023-05-10 14:27:16 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 265 bytes |
コンパイル時間 | 612 ms |
コンパイル使用メモリ | 66,944 KB |
最終ジャッジ日時 | 2025-02-12 21:11:18 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
#include<iostream> #include<string> #include<cassert> using namespace std; int main(){ string S; cin>>S; assert(S.size()==3&& 'A'<=S[0]<='Z'&& 'A'<=S[1]<='Z'&& 'A'<=S[2]<='Z'); if(S[0]==S[1]&&S[1]!=S[2]){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; } }