CSES - Datatähti 2025 alku - Results
Submission details
Task:Kortit I
Sender:yo_chico1
Submission time:2024-11-06 19:42:59 +0200
Language:C++ (C++11)
Status:COMPILE ERROR

Compiler report

input/code.cpp:5:10: fatal error: dbgHelper.h: No such file or directory
    5 | #include "dbgHelper.h"
      |          ^~~~~~~~~~~~~
compilation terminated.

Code

#include <iostream>
#include <vector>
#include <cmath>

#include "dbgHelper.h"

int main() {
    int t;
    std::cin >> t;
    std::vector<std::vector<int>> tests;


    for (int i = 0; i < t; i++) {
        int n, a, b;
        std::cin >> n >> a >> b;
        tests.push_back({n, a, b});
    }

    for (const auto& test : tests) {
        int n = test[0];
        int a = test[1];
        int b = test[2];

        if (a + b > n || std::abs(a - b) > n) {
            std::cout << "NO\n";
            continue;
        }

        if (a == 0 || a > n-1 || b == 0 || b > n-1)
        {
            std::cout << "NO\n";
            continue;
        }

        std::cout << "YES\n";

        for (int i = 1; i <= n; i++) {
            std::cout << i << " ";
        }
        std::cout << "\n";

        for (int i = n; i >= 1; i--) {
            std::cout << i << " ";
        }
        std::cout << "\n";
    }

    PAUSE;
    return 0;
}