200992026-01-01 20:30:44szabelrÖntözés (50 pont)cpp17Accepted 50/5082ms1080 KiB
// Öntözés.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
using namespace std;
int main()
{
    int q, m;
    cin >> q >> m;
    for (int i = 0; i < q; i++)
    {
        int a, x, b, y;
        cin >> a >> x >> b >> y;
        int ora = (24 - x) + y + (b - a - 1) * 24;
        if (ora % m == 0)
            cout << ora / m - 1<<endl;
        else
            cout << ora / m << endl;
    }
}

// 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
base50/50
1Accepted0/01ms316 KiB
2Accepted0/013ms316 KiB
3Accepted5/52ms508 KiB
4Accepted5/576ms432 KiB
5Accepted3/31ms316 KiB
6Accepted3/31ms316 KiB
7Accepted3/31ms316 KiB
8Accepted3/31ms316 KiB
9Accepted3/31ms316 KiB
10Accepted3/31ms316 KiB
11Accepted3/31ms316 KiB
12Accepted1/11ms508 KiB
13Accepted1/11ms384 KiB
14Accepted1/11ms500 KiB
15Accepted1/11ms316 KiB
16Accepted2/282ms416 KiB
17Accepted3/379ms468 KiB
18Accepted2/282ms1080 KiB
19Accepted3/378ms564 KiB
20Accepted1/182ms564 KiB
21Accepted1/178ms416 KiB
22Accepted3/382ms1076 KiB