結果
問題 |
No.1362 [Zelkova 8th Tune] Black Sheep
|
ユーザー |
|
提出日時 | 2025-02-14 14:52:08 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 429 bytes |
コンパイル時間 | 868 ms |
コンパイル使用メモリ | 78,888 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-14 14:53:12 |
合計ジャッジ時間 | 2,803 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 |
ソースコード
#include <iostream> #include <cstdint> using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string S; S.reserve(500000), cin >> S; if (S[0] != S[1]) { if (S[0] == S[2]) cout << "2 " << S[1] << '\n'; else cout << "1 " << S[0] << '\n'; } else for (uint32_t i = 2; i != S.size(); ++i) if (S[i] != S[0]) { cout << i + 1 << ' ' << S[i] << '\n'; return 0; } return 0; }