0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-24 02:48:48 +00:00
OI-codes/Luogu/P6382/P6382.cpp

24 lines
639 B
C++
Raw Normal View History

2020-10-09 13:21:25 +00:00
// R39592154
2021-11-19 09:01:13 +00:00
#include <bits/stdc++.h>
2020-10-09 13:21:25 +00:00
using namespace std;
int main() {
string name;
cin >> name;
2021-11-19 09:01:13 +00:00
if (name[0] != 'M' || name[1] != 'D' || name[2] != 'A') {
2020-10-09 13:21:25 +00:00
cout << "1 1 1 1 1" << endl;
} else {
int i = 7;
2021-11-19 09:01:13 +00:00
while (!('0' <= name[i] && name[i] <= '9')) i--;
2020-10-09 13:21:25 +00:00
int last = name[i] - '0';
cout << (last == 1 || last == 9 ? 1 : 0) << ' ';
cout << (last == 2 || last == 8 ? 1 : 0) << ' ';
cout << (last == 3 || last == 7 ? 1 : 0) << ' ';
cout << (last == 4 || last == 6 ? 1 : 0) << ' ';
cout << (last == 5 || last == 0 ? 1 : 0) << endl;
}
return 0;
}