ACM Association of Xinjiang University has developed a new self-propelled chess, hh hhs two are in high spirits and chess. The following is a self-propelled rules of chess:
a total of 10 pieces, each piece numbered 1-10 2. Every second hh and hhs can each get a piece, hhs acquire a piece after piece 3. If a take hh the number of pieces up to three pieces of the automatic upgrade, numbered +1, which fell 1 4. if a party to obtain a piece of number 11, the output of that person's name + nb, and the game is over
Entry
N digital inputs A I (. 1 <A = I <= 10 ), n is an even number
Export
Output victory of the people's name + nb
Sample input
10 10 10 9 10 9
① ② ① ② ① ②
Sample Output
hhsnb
Code
#include <bits / STDC ++ H.>
the using namespace STD;
const int N = 12 is;
int of arr1 [N];
int arr2 is [N];
int A, B;
int main () {
the while (Scanf ( "% D% D ", & a, & b) == 2) {// == 2 sure to enter the two numbers before proceeding further
arr1 [a] ++; // number is a number
arr2 [b] ++; // number the number of b
the using namespace STD;
const int N = 12 is;
int of arr1 [N];
int arr2 is [N];
int A, B;
int main () {
the while (Scanf ( "% D% D ", & a, & b) == 2) {// == 2 sure to enter the two numbers before proceeding further
arr1 [a] ++; // number is a number
arr2 [b] ++; // number the number of b
for (int I =. 1; I <= 10; I ++) {
IF (of arr1 [I] ==. 3) {
of arr1 [I] = 0;
of arr1 [I +. 1] ++; // three enough when upgrade is then cleared
}
IF (arr2 is [I] ==. 3) {
arr2 is [I] = 0;
arr2 is [I +. 1] ++;
}
}
IF (of arr1 [. 11]) {
the printf ( "hhsnb");
break; // determines whether or not to. 11
}
iF (arr2 is [. 11]) {
the printf ( "hhnb");
BREAK;
}
}
IF (of arr1 [I] ==. 3) {
of arr1 [I] = 0;
of arr1 [I +. 1] ++; // three enough when upgrade is then cleared
}
IF (arr2 is [I] ==. 3) {
arr2 is [I] = 0;
arr2 is [I +. 1] ++;
}
}
IF (of arr1 [. 11]) {
the printf ( "hhsnb");
break; // determines whether or not to. 11
}
iF (arr2 is [. 11]) {
the printf ( "hhnb");
BREAK;
}
}
return 0;
}
}
She did not understand the meaning of the questions, I do not know what input the figures were human