提出 #75458436


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  char a,b;
  int c,sum=0;
  cin >> s;
  sum += s.size();
  c = s.size();
  
  for (int i=0; i<(c-1); i++) {
    for (int j=i; j<(c-1); j++) {
      a = s.at(j);
      b = s.at(j+1);
      if (a!=b) {
        sum ++;
      }
      else {
        break;
      }
    }
  }
  cout << sum << endl;
}

提出情報

提出日時
問題 C - Not Adjacent
ユーザ Kane218
言語 C++23 (GCC 15.2.0)
得点 0
コード長 393 Byte
結果 TLE
実行時間 > 2000 ms
メモリ 3944 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 0 / 300
結果
AC × 2
AC × 25
TLE × 3
セット名 テストケース
Sample sample_01.txt, sample_02.txt
All min.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, sample_01.txt, sample_02.txt
ケース名 結果 実行時間 メモリ
min.txt AC 1 ms 3436 KiB
random_01.txt TLE > 2000 ms 3944 KiB
random_02.txt TLE > 2000 ms 3520 KiB
random_03.txt TLE > 2000 ms 3944 KiB
random_04.txt AC 10 ms 3820 KiB
random_05.txt AC 25 ms 3864 KiB
random_06.txt AC 10 ms 3720 KiB
random_07.txt AC 7 ms 3904 KiB
random_08.txt AC 3 ms 3796 KiB
random_09.txt AC 7 ms 3904 KiB
random_10.txt AC 5 ms 3644 KiB
random_11.txt AC 6 ms 3944 KiB
random_12.txt AC 1 ms 3532 KiB
random_13.txt AC 6 ms 3740 KiB
random_14.txt AC 5 ms 3752 KiB
random_15.txt AC 6 ms 3904 KiB
random_16.txt AC 3 ms 3788 KiB
random_17.txt AC 6 ms 3900 KiB
random_18.txt AC 4 ms 3688 KiB
random_19.txt AC 5 ms 3888 KiB
random_20.txt AC 2 ms 3720 KiB
random_21.txt AC 5 ms 3900 KiB
random_22.txt AC 3 ms 3660 KiB
random_23.txt AC 5 ms 3864 KiB
random_24.txt AC 2 ms 3660 KiB
random_25.txt AC 5 ms 3788 KiB
sample_01.txt AC 1 ms 3384 KiB
sample_02.txt AC 1 ms 3460 KiB