Submission #62764554
Source Code Expand
Copy
from collections import dequefrom collections import defaultdictfrom itertools import combinationsfrom itertools import permutationsfrom heapq import heappush, heappopfrom sortedcontainers import SortedSetfrom bisect import bisect_left, bisect_rightimport mathimport syssys.setrecursionlimit(10 ** 9)#0-9までの整数リストnunber_list = [n for n in range(0,10,1)]def nibutan(l,v,left=0,right=0):right = len(l)-1while left <= right:mid = (left + right)//2if l[mid] == v: return Trueelif l[mid] < v: left = mid + 1else: right = mid -1return False
from collections import deque from collections import defaultdict from itertools import combinations from itertools import permutations from heapq import heappush, heappop from sortedcontainers import SortedSet from bisect import bisect_left, bisect_right import math import sys sys.setrecursionlimit(10 ** 9) #0-9までの整数リスト nunber_list = [n for n in range(0,10,1)] def nibutan(l,v,left=0,right=0): right = len(l)-1 while left <= right: mid = (left + right)//2 if l[mid] == v: return True elif l[mid] < v: left = mid + 1 else: right = mid -1 return False d = defaultdict(list) #n, t = map(int, input().split()) S = input() #X = list(map(int, input().split())) c = 0 for i in range(len(S)): if S[i] != "A": continue for k in range(i+1,len(S),1): if S[k] != "B": continue for t in range(k+1,len(S),1): if S[t] != "C": continue if t-k == k-i: c+=1 print(c)
Submission Info
Submission Time | |
---|---|
Task | B - A..B..C |
User | taiki_suzuki |
Language | Python (PyPy 3.10-v7.3.12) |
Score | 200 |
Code Size | 1054 Byte |
Status | AC |
Exec Time | 178 ms |
Memory | 88688 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 02_random2_00.txt, 02_random2_01.txt, 02_random2_02.txt, 02_random2_03.txt, 03_handmade_00.txt, 03_handmade_01.txt, 03_handmade_02.txt, 03_handmade_03.txt, 03_handmade_04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 171 ms | 87552 KB |
00_sample_01.txt | AC | 172 ms | 87516 KB |
00_sample_02.txt | AC | 171 ms | 87800 KB |
01_random_00.txt | AC | 172 ms | 87744 KB |
01_random_01.txt | AC | 171 ms | 87708 KB |
01_random_02.txt | AC | 171 ms | 87488 KB |
01_random_03.txt | AC | 174 ms | 87988 KB |
01_random_04.txt | AC | 173 ms | 88156 KB |
01_random_05.txt | AC | 175 ms | 88648 KB |
01_random_06.txt | AC | 175 ms | 88356 KB |
01_random_07.txt | AC | 173 ms | 88292 KB |
01_random_08.txt | AC | 178 ms | 88524 KB |
01_random_09.txt | AC | 175 ms | 88104 KB |
01_random_10.txt | AC | 177 ms | 88236 KB |
02_random2_00.txt | AC | 177 ms | 88688 KB |
02_random2_01.txt | AC | 177 ms | 88588 KB |
02_random2_02.txt | AC | 177 ms | 88564 KB |
02_random2_03.txt | AC | 176 ms | 88632 KB |
03_handmade_00.txt | AC | 173 ms | 88024 KB |
03_handmade_01.txt | AC | 177 ms | 88636 KB |
03_handmade_02.txt | AC | 171 ms | 87708 KB |
03_handmade_03.txt | AC | 170 ms | 87844 KB |
03_handmade_04.txt | AC | 171 ms | 87588 KB |