Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- const int N = 200009;
- int main() {
- ios_base::sync_with_stdio(false);
- cin.tie(nullptr);
- cout.tie(nullptr);
- // freopen("/home/hamoudi/Coding/run.in", "r", stdin);
- int tt = 1;
- cin >> tt;
- while (tt--) {
- int h1, h2, m1, m2, s1, s2;
- cin >> h1 >> m1 >> s1 >> h2 >> m2 >> s2;
- // first we need to compare between starting hour
- if(h1 > h2) {
- cout << "Player2\n";
- }
- else if (h1 < h2) {
- cout << "Player1\n";
- } else {
- // if they start at the same hour. so we need to check the starting minute
- if (m1 > m2) {
- cout << "Player2\n";
- } else if (m1 < m2) {
- cout << "Player1\n";
- } else {
- // if they start at the same minute. so we need to check the starting second
- if (s1 > s2) {
- cout << "Player2\n";
- } else if (s1 < s2) {
- cout << "Player1\n";
- } else {
- cout << "Tie\n";
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement