結果
| 問題 | No.1362 [Zelkova 8th Tune] Black Sheep |
| コンテスト | |
| ユーザー |
Nachia
|
| 提出日時 | 2021-01-22 21:27:57 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 324 bytes |
| 記録 | |
| コンパイル時間 | 1,607 ms |
| コンパイル使用メモリ | 194,616 KB |
| 最終ジャッジ日時 | 2025-01-18 03:40:56 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 38 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)
int main() {
string S; cin>>S; S+=S;
pair<int,char> ans;
rep(i,S.size()/2) if(S[i]!=S[i+1]&&S[i]!=S[i+2]) ans={i,S[i]};
cout<<ans.first<<" "<<ans.second<<endl;
return 0;
}
Nachia