#include <iostream> #include <string> using namespace std; int main() { int t; while (cin >> t) { int y1, m1, d1; int y2, m2, d2; for (int i = 0; i < t; ++i) { cin >> y1 >> m1 >> d1; cin >> y2 >> m2 >> d2; if (y1 > y2) cout << "cpcs" << endl; else if (y1 < y2) cout << "javaman" << endl; else { if (m1 > m2) cout << "cpcs" << endl; else if (m1 < m2) cout << "javaman" << endl; else { if (d1 > d2) cout << "cpcs" << endl; else if (d1 < d2) cout << "javaman" << endl; else cout << "same" << endl; } } } } return 0; } |
Double click to view unformatted code.