結果
問題 |
No.290 1010
|
ユーザー |
![]() |
提出日時 | 2020-04-15 00:11:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 20 ms / 5,000 ms |
コード長 | 272 bytes |
コンパイル時間 | 1,583 ms |
コンパイル使用メモリ | 165,452 KB |
実行使用メモリ | 5,300 KB |
最終ジャッジ日時 | 2024-10-01 18:27:24 |
合計ジャッジ時間 | 2,826 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; template<typename T> void fin(T a){ cout<<a<<endl; exit(0); } signed main(){ int n;string s;cin>>n>>s; if(n==1)fin("NO"); if(n==2&&s[0]!=s[1])fin("NO"); if(n==3&&s[0]!=s[1]&&s[1]!=s[2])fin("NO"); fin("YES"); }