Submission #1211769


Source Code Expand

Copy
S,T=[q=0,0].map{[q,*gets.chars.map{|c|q-=~c.count(?A)}]};$<.map{|l|a,b,c,d=l.split.map &:to_i;d&&puts((S[b]-S[a-1]-T[d]+T[c-1])%3<1?:YES: :NO)}

Submission Info

Submission Time
Task E - TrBBnsformBBtion
User akouryy
Language Ruby (2.3.3)
Score 600
Code Size 143 Byte
Status
Exec Time 451 ms
Memory 23628 KB

Compile Error

./Main.rb:1: warning: `&' interpreted as argument prefix

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_000.txt, 0_001.txt
All 600 / 600 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 7 ms 1788 KB
0_001.txt 7 ms 1788 KB
bound_0.txt 427 ms 21964 KB
bound_1.txt 427 ms 21964 KB
bound_2.txt 432 ms 21964 KB
bound_3.txt 451 ms 22860 KB
min.txt 7 ms 1788 KB
rnd_10000_10.txt 449 ms 22604 KB
rnd_10000_10000.txt 447 ms 23628 KB
rnd_10000_2.txt 440 ms 22604 KB
rnd_10_10.txt 441 ms 22604 KB
rnd_10_10000.txt 446 ms 22604 KB
rnd_10_2.txt 443 ms 22604 KB
rnd_2_10.txt 449 ms 22604 KB
rnd_2_10000.txt 443 ms 22604 KB
rnd_2_2.txt 443 ms 22604 KB