65482023-12-08 15:02:51BakosCsongorA Négyszögletű Kerek Erdőcpp17Accepted 100/1003ms4232 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>

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 N, A, B;
    cin >> N >> A >> B;
     if(A == B){
        cout << "Tul konnyu!";
        return 0;
    }
    if(A < B){
        int x;
        x = B - A + 1;
        if(x < 5){
            cout << "Tul konnyu!";
            return 0;
        }
        else{
            cout << x;
            return 0;
        }

    }
    else {
        int x;
        x = (N - A) + B + 1;
        if(x < 5){
            cout << "Tul konnyu!";
            return 0;
        }
        else{
            cout << x;
            return 0;
        }
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms2024 KiB
2Accepted3ms2180 KiB
subtask240/40
3Accepted3ms2320 KiB
4Accepted3ms2560 KiB
5Accepted3ms2776 KiB
6Accepted3ms2936 KiB
7Accepted3ms3112 KiB
8Accepted3ms3228 KiB
9Accepted3ms3196 KiB
subtask320/20
10Accepted3ms3316 KiB
11Accepted3ms3340 KiB
12Accepted3ms3524 KiB
13Accepted3ms3576 KiB
14Accepted3ms3580 KiB
subtask440/40
15Accepted3ms3780 KiB
16Accepted3ms3896 KiB
17Accepted3ms3908 KiB
18Accepted3ms4028 KiB
19Accepted3ms4152 KiB
20Accepted3ms4232 KiB
21Accepted3ms4232 KiB