Cod sursa(job #2857349)

Utilizator C_R_I_S_T_I_2_3Cristi Gavrila C_R_I_S_T_I_2_3 Data 25 februarie 2022 14:16:40
Problema Barbar Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.45 kb
#include <bits/stdc++.h>

using namespace std;
ifstream fin("dragonas.in");
ofstream fout("dragonas.out");
int t, n, m, xl, yl, xs, ys, l, s;
int main()
{
    fin >> t;
    for(int i = 1; i <= t; i ++)
    {
        fin >> n >> m >> xl >> yl >> xs >> ys;
        l = n - xl;
        s = n - xs + abs(yl - ys);
        if(s <= l)
            fout << "Smaug";
        else
            fout << "Lulu";
        fout << "\n";
    }
    return 0;
}