atcoder#ARC115A. [ARC115A] Two Choices
[ARC115A] Two Choices
Score : points
Problem Statement
students took a test with questions with two choices: and .
You are given strings of length each: .
The -th character of is 0
or 1
, representing the response of the -th student to the -th question. Although we know the response of each student to each question, we do not yet know the correct answer ― or ― to each problem.
Find the number of pairs satisfying such that it is impossible for Student and Student to have the same number of correct answers.
Constraints
- is a string of length consisting of
0
and1
.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
3 2
00
01
10
2
For example, if the correct answers to the -st and -nd questions are both , Student and Student have the same number of correct answers ― . On the other hand, Student and Student never have the same number of correct answers, nor do Student and Student .
7 5
10101
00001
00110
11110
00100
11111
10000
10