148122025-02-03 09:43:43DhaneHaneÖntözés (50 pont)cpp17Wrong answer 0/50479ms820 KiB
// ontozes.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
using namespace std;
int egyes(int a, int b, int x, int y, int db) {
    if (b==a && x==y) return db;
    else {
        ++db;
        if (y != 0) {
            --y;
        }
        else {
            y = 24;
            b--;
        }
        return egyes(a, b, x, y, db);
    }
}
int main()
{
    int q, m; cin >> q >> m;
    while (q--) {
        int a, b, x, y; cin >> a >> x >> b >> y;
        int db = 0;
        if (m == 1) {
            cout<<egyes(a,b,x,y,db)<<"\n";
        }
    }
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/01ms316 KiB
2Wrong answer0/06ms316 KiB
3Wrong answer0/548ms500 KiB
4Time limit exceeded0/5479ms316 KiB
5Wrong answer0/31ms316 KiB
6Wrong answer0/31ms316 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/31ms400 KiB
9Wrong answer0/31ms316 KiB
10Wrong answer0/31ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/11ms316 KiB
13Wrong answer0/11ms316 KiB
14Wrong answer0/11ms316 KiB
15Wrong answer0/11ms316 KiB
16Wrong answer0/232ms764 KiB
17Wrong answer0/332ms768 KiB
18Wrong answer0/232ms768 KiB
19Wrong answer0/332ms708 KiB
20Wrong answer0/132ms784 KiB
21Wrong answer0/130ms672 KiB
22Wrong answer0/332ms820 KiB