65492023-12-08 22:50:41mmatedA Négyszögletű Kerek Erdőcpp17Accepted 100/1003ms4296 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n,a,b;
    cin>>n>>a>>b;
    if(a<=b)
    {
        if(b-a+1<5) cout<<"Tul konnyu!\n";
        else    cout<<b-a+1<<"\n";
    }
    else
    {
        if(n-a+b+1<5)   cout<<"Tul konnyu!\n";
        else    cout<<n-a+b+1<<"\n";
    }
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1892 KiB
2Accepted3ms2236 KiB
subtask240/40
3Accepted3ms2300 KiB
4Accepted3ms2532 KiB
5Accepted3ms2640 KiB
6Accepted3ms2788 KiB
7Accepted3ms2928 KiB
8Accepted3ms3104 KiB
9Accepted3ms3312 KiB
subtask320/20
10Accepted3ms3548 KiB
11Accepted3ms3756 KiB
12Accepted3ms3980 KiB
13Accepted3ms4088 KiB
14Accepted3ms4148 KiB
subtask440/40
15Accepted3ms4296 KiB
16Accepted3ms4180 KiB
17Accepted3ms4280 KiB
18Accepted3ms4276 KiB
19Accepted3ms4276 KiB
20Accepted3ms4276 KiB
21Accepted3ms4180 KiB