Untitled

mail@pastecode.io avatar
unknown
plain_text
22 days ago
1.4 kB
2
Indexable
Never
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <random>

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef unsigned long long ull;
typedef tree<pair<int, int>, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#define AboTaha_on_da_code ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define X first
#define Y second

const int dx[8]={0, 0, 1, -1, 1, -1, -1, 1};
const int dy[8]={1, -1, 0, 0, 1, -1, 1, -1};
const double EPS = 1e-8;
const int mod = 998244353;
// BEFORE coding are you sure you understood the statement correctly?
// PLEASE do not forget to read the sample explanation carefully.
// WATCH out for overflows & RTs in general.
// TEST your idea or code on the corner cases.
// ANALYZE each idea you have thoroughly.

void burn(int tc)
{
    int n, k; cin >> n >> k;
    if (n == 1) cout << "Omda";
    else if (k&1) cout << (n&1 ? "Omda" : "Teemo");
    else {
        n = 1LL*n*k%(k+1);
        cout << (n == k || n&1 ? "Omda" : "Teemo");
    }
}

int main()
{
    AboTaha_on_da_code

    freopen("dotak.in", "r", stdin);
//    freopen("Aout.txt", "w", stdout);

    int T = 1; cin >> T;

    for (int i = 1; i <= T; i++) {
//        cout << "Case " << i << ": ";
        burn(i);
        cout << '\n';
    }
    return 0;
}
Leave a Comment