結果
問題 |
No.290 1010
|
ユーザー |
|
提出日時 | 2020-04-13 21:44:02 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 5 ms / 5,000 ms |
コード長 | 391 bytes |
コンパイル時間 | 643 ms |
コンパイル使用メモリ | 67,424 KB |
最終ジャッジ日時 | 2025-01-09 18:12:58 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <iostream> #include <string> void solve() { int n; std::string s; std::cin >> n >> s; bool out = true; for (int i = 0; i + 1 < n; ++i) { if (s[i] == s[i + 1]) out = false; } std::cout << (n < 4 && out ? "NO" : "YES") << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }