結果
問題 |
No.1362 [Zelkova 8th Tune] Black Sheep
|
ユーザー |
![]() |
提出日時 | 2021-09-03 23:38:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 442 bytes |
コンパイル時間 | 1,749 ms |
コンパイル使用メモリ | 167,696 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 18:44:59 |
合計ジャッジ時間 | 4,031 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 37 WA * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int N = S.size(); if( S[0] == S[1] && S[1] == S[2] ) { for( int i = 3; i < N; i++ ) { if( S[i] == S[0] ) continue; cout << i + 1 << " " << S[i] << endl; } } else { if( S[0] == S[1] ) cout << 3 << " " << S[2] << endl; else if( S[1] == S[2] ) cout << 1 << " " << S[0] << endl; else if( S[3] == S[0] ) cout << 2 << " " << S[1] << endl; } }