6549 | 2023-12-08 22:50:41 | mmated | A Négyszögletű Kerek Erdő | cpp17 | Accepted 100/100 | 3ms | 4296 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;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1892 KiB | ||||
2 | Accepted | 3ms | 2236 KiB | ||||
subtask2 | 40/40 | ||||||
3 | Accepted | 3ms | 2300 KiB | ||||
4 | Accepted | 3ms | 2532 KiB | ||||
5 | Accepted | 3ms | 2640 KiB | ||||
6 | Accepted | 3ms | 2788 KiB | ||||
7 | Accepted | 3ms | 2928 KiB | ||||
8 | Accepted | 3ms | 3104 KiB | ||||
9 | Accepted | 3ms | 3312 KiB | ||||
subtask3 | 20/20 | ||||||
10 | Accepted | 3ms | 3548 KiB | ||||
11 | Accepted | 3ms | 3756 KiB | ||||
12 | Accepted | 3ms | 3980 KiB | ||||
13 | Accepted | 3ms | 4088 KiB | ||||
14 | Accepted | 3ms | 4148 KiB | ||||
subtask4 | 40/40 | ||||||
15 | Accepted | 3ms | 4296 KiB | ||||
16 | Accepted | 3ms | 4180 KiB | ||||
17 | Accepted | 3ms | 4280 KiB | ||||
18 | Accepted | 3ms | 4276 KiB | ||||
19 | Accepted | 3ms | 4276 KiB | ||||
20 | Accepted | 3ms | 4276 KiB | ||||
21 | Accepted | 3ms | 4180 KiB |