結果
| 問題 | No.3655 Adjacent Pairs in Triplets |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-30 13:33:38 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 231 bytes |
| 記録 | |
| コンパイル時間 | 2,125 ms |
| コンパイル使用メモリ | 330,392 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-08-30 13:34:22 |
| 合計ジャッジ時間 | 3,667 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | WA * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void){
int ans=0;
string s;
cin>>s;
for(int i=0;i<(int)s.size()-2;i++){
ans+=(s[i]==s[i+1]||s[i+2]==s[i+1]);
}
cout<<ans<<endl;
return 0;
}