1014 福尔摩斯的约会

it2022-05-05  177

题目传送门

#include <iostream> #include <map> #include <string> /* A405Cjykxh4hhGFF A904CkDfkkkkggFdsb s&hgdGdk s&HysGvnm */ using namespace std; int main() { map<char, string> m; m['A'] = "MON", m['B'] = "TUE", m['C'] = "WED", m['D'] = "THU", m['E'] = "FRI", m['F'] = "SAT", m['G'] = "SUN"; string a, b, c, d; cin >> a >> b >> c >> d; int i = 0; while (i < a.length() && i < b.length()) { if (a[i] >= 'A' && a[i] <= 'G' && a[i] == b[i]) { cout << m[a[i]] << " "; break; } i++; } i++; map<char, int> mm; for (int i = 0; i <= 9; i++) { mm[i + 48] = i; } for (int i = 0; i <= 14; i++) { mm[i + 65] = i + 10; } while (i < a.length() && i < b.length()) { if ((a[i] >= 'A' && a[i] <= 'N'|| isdigit(a[i])) && a[i] == b[i]) { printf("d:", mm[a[i]]); break; } i++; } i = 0; while (i < c.length() && i < d.length()) { if (c[i] == d[i] && isalpha(c[i])) { printf("d", i); break; } i++; } return 0; }

最新回复(0)