You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
422 B

#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
char mx = '0';
cin >> n;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
if (s[i] > mx)
mx = s[i];
}
cout << (mx <= '1') << " " << (mx <= '7') << " " << (mx <= '9') << " " << (mx <= 'F') << endl;
}
return 0;
}