結果
問題 |
No.290 1010
|
ユーザー |
![]() |
提出日時 | 2015-10-17 07:00:58 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 22 ms / 5,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 545 ms |
コンパイル使用メモリ | 54,992 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 07:50:36 |
合計ジャッジ時間 | 1,360 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <iostream> #include <stdlib.h> using namespace std; void fail() {cout << "NO\n";exit(0);} void success() {cout << "YES\n";exit(0);} int main() { int N;string S;cin>>N>>S; if(N == 1 || (N == 2 && S[0] != S[1]) || (N == 3 && S[0] != S[1] && S[1] != S[2])) fail(); success(); return 0; }