結果
| 問題 | No.290 1010 |
| コンテスト | |
| ユーザー |
fushime2
|
| 提出日時 | 2018-01-10 15:55:17 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 358 bytes |
| 記録 | |
| コンパイル時間 | 949 ms |
| コンパイル使用メモリ | 171,808 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-29 15:32:50 |
| 合計ジャッジ時間 | 2,347 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 2 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
int n;
char s[1000010];
int main() {
scanf("%d", &n);
scanf("%s", s);
if (n < 2) {
puts(n == 1 ? "NO" : s[0] == s[1] ? "YES" : "NO");
return 0;
}
if (n == 3) {
puts(s[0]==s[1] || s[1]==s[2] ? "YES" : "NO");
return 0;
}
puts("YES");
return 0;
}
fushime2