結果
| 問題 | No.3655 Adjacent Pairs in Triplets |
| コンテスト | |
| ユーザー |
aaaaaaaaa
|
| 提出日時 | 2026-08-30 13:52:36 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 480 bytes |
| 記録 | |
| コンパイル時間 | 3,421 ms |
| コンパイル使用メモリ | 350,204 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-30 13:52:50 |
| 合計ジャッジ時間 | 4,822 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string sub = s;
int count = 0;
for(int i = 0; i < s.size()-2; i++){
int x = 0;
if(sub.at(i) == sub.at(i+1)){
x++;
}
if(sub.at(i+1) == sub.at(i+2)){
x++;
}
if(sub.at(i+2) == sub.at(i+0)){
x++;
}
if(x == 1){
count++;
}
}
cout << count;
return 0;
}
aaaaaaaaa