190192025-11-17 12:11:23CWMAI rizikócpp17Accepted 100/1001ms380 KiB
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    int t;
    cin >> t;
    for (size_t i = 0; i < t; i++)
    {
        int n, m;
        cin >> n >> m;
        int t1 = n / 3;
        int t2 = (n - t1) / 2;
        int t3 = (n - t1 - t2);
        if (m > t1 + t2 + 1) {
            cout << "filippo\n";
        }
        else if (m == t1 + t2 + 1) {
            cout << "draw\n";
        }
        else {
            cout << "tommaso\n";
        }
    }
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted1ms316 KiB
subtask230/30
2Accepted1ms316 KiB
3Accepted1ms316 KiB
subtask330/30
4Accepted1ms316 KiB
5Accepted1ms316 KiB
6Accepted1ms380 KiB
7Accepted1ms316 KiB
subtask440/40
8Accepted1ms316 KiB
9Accepted1ms316 KiB
10Accepted1ms316 KiB
11Accepted1ms380 KiB
12Accepted1ms316 KiB
13Accepted1ms316 KiB
14Accepted1ms316 KiB