40 teams scored 1930 points on this task, for a maximum score of 100, an average score of 48 and a median score of 40.
Valerio is currently visiting Poland, and on the street he found two strings A and B of length N each, consisting of 0's and 1's. When he returned home, he decided to write a program that chooses two contiguous substrings of length L, one from A and one from B, then interprets them as binary numbers (i.e. numbers written in base 2) and computes their sum. Unfortunately Valerio made a mistake: he decided to store the result of the sum in an L-bit variable (i.e., a variable that can store numbers from 0 to 2^L-1 inclusive), but in some cases the sum can be too larger! Help him to verify the correctness of the result. You are given Q queries, each consisting of 3 integers X, Y and L. For each query, determine whether Valerio's program is correct for the strings A[X… X+L-1] and B[Y… Y+L-1]. In other words, you need to determine whether the sum of the numbers with binary representation A[X… X+L-1] and B[Y… Y+L-1] is strictly less than 2^L.