Submission #3013733


Source Code Expand

s = list(input())
t = list(input())
q = int(input())

def check(x, y):
	xa = len(list(filter(lambda i: i == "A", x)))
	ya = len(list(filter(lambda i: i == "A", y)))
	if (2 * xa - len(x)) % 3 == (2 * ya - len(y)) % 3:
		print("YES")
	else:
		print("NO")

for _ in range(q):
	a, b, c, d = map(int, input().split())
	check(s[a - 1 : b], t[c - 1 : d])

Submission Info

Submission Time
Task E - TrBBnsformBBtion
User anagohirame
Language Python (3.4.3)
Score 0
Code Size 363 Byte
Status TLE
Exec Time 2104 ms
Memory 6624 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 600
Status
AC × 2
AC × 3
TLE × 13
Set Name Test Cases
Sample 0_000.txt, 0_001.txt
All 0_000.txt, 0_001.txt, bound_0.txt, bound_1.txt, bound_2.txt, bound_3.txt, min.txt, rnd_10000_10.txt, rnd_10000_10000.txt, rnd_10000_2.txt, rnd_10_10.txt, rnd_10_10000.txt, rnd_10_2.txt, rnd_2_10.txt, rnd_2_10000.txt, rnd_2_2.txt
Case Name Status Exec Time Memory
0_000.txt AC 17 ms 3060 KB
0_001.txt AC 17 ms 3060 KB
bound_0.txt TLE 2104 ms 6584 KB
bound_1.txt TLE 2104 ms 6588 KB
bound_2.txt TLE 2104 ms 6624 KB
bound_3.txt TLE 2104 ms 6540 KB
min.txt AC 17 ms 3060 KB
rnd_10000_10.txt TLE 2104 ms 6268 KB
rnd_10000_10000.txt TLE 2104 ms 6432 KB
rnd_10000_2.txt TLE 2104 ms 6264 KB
rnd_10_10.txt TLE 2104 ms 6304 KB
rnd_10_10000.txt TLE 2104 ms 6372 KB
rnd_10_2.txt TLE 2104 ms 6324 KB
rnd_2_10.txt TLE 2104 ms 6536 KB
rnd_2_10000.txt TLE 2104 ms 6292 KB
rnd_2_2.txt TLE 2104 ms 6340 KB