193122025-12-04 14:03:11dfehervariAI rizikócpp17Wrong answer 0/1001ms500 KiB
// NOTE: it is recommended to use this even if you don't understand the following code.

#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include<algorithm>

using namespace std;

int main() {
    // uncomment the two following lines if you want to read/write from files
    // ifstream cin("input.txt");
    // ofstream cout("output.txt");

    int T;
    cin >> T;
    for (int test = 1; test <= T; ++test) {
        long long N, M,a,b,c, maxi,x;
        cin >> N >> M;

        string W = "";
        // INSERT YOUR CODE HERE
        if(N<5){
            if(M<N) W="tommaso";
            else if (M=N) W="draw";
                 else W="filippo";
        }
        else{
        a = N/2;
        x = N-a;
        if(x>=M) W="tommaso";
        else if(x+1==M) W="draw";
             else W="filippo";
        }




        cout << W << endl;
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms316 KiB
subtask20/30
2Wrong answer1ms316 KiB
3Wrong answer1ms316 KiB
subtask30/30
4Wrong answer1ms316 KiB
5Wrong answer1ms316 KiB
6Wrong answer1ms316 KiB
7Wrong answer1ms316 KiB
subtask40/40
8Accepted1ms332 KiB
9Wrong answer1ms316 KiB
10Wrong answer1ms316 KiB
11Wrong answer1ms316 KiB
12Wrong answer1ms316 KiB
13Wrong answer1ms500 KiB
14Wrong answer1ms316 KiB