卬高杯
提出id | 提出時刻 | ユーザー名 | 問題 | 言語 | 判定状況 | 判定 | 実行時間 |
---|---|---|---|---|---|---|---|
115055 | 2023-10-26 08:05:01 | A | C | cpp | 18/18 | AC | 16 |
#include <iostream>
using namespace std;
int main() {
string inputString;
cin >> inputString;
bool isGomaMayo = false;
int n = inputString.length();
for (int i = 1; i < n; i++) {
if (inputString[i] == inputString[i - 1]) {
isGomaMayo = true; // 隣接する文字の組で一致するものが少なくとも1つ存在
break;
}
}
if (isGomaMayo) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
sample1.txt AC 2 sample2.txt AC 2 sample3.txt AC 3 case1.txt AC 8 case2.txt AC 5 case3.txt AC 13 case4.txt AC 12 case5.txt AC 11 case6.txt AC 10 case7.txt AC 12 case8.txt AC 8 case9.txt AC 8 case10.txt AC 8 case11.txt AC 16 case12.txt AC 16 case13.txt AC 16 case14.txt AC 16 case15.txt AC 16 16 AC16 AC