201002026-01-01 20:31:17szabelrÖntözés (50 pont)cpp17Elfogadva 50/5061ms616 KiB
// Öntözés.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    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
RészfeladatÖsszpontTesztVerdiktIdőMemória
base50/50
1Elfogadva0/01ms316 KiB
2Elfogadva0/08ms316 KiB
3Elfogadva5/51ms316 KiB
4Elfogadva5/554ms560 KiB
5Elfogadva3/31ms316 KiB
6Elfogadva3/31ms316 KiB
7Elfogadva3/31ms316 KiB
8Elfogadva3/31ms316 KiB
9Elfogadva3/31ms508 KiB
10Elfogadva3/31ms316 KiB
11Elfogadva3/31ms316 KiB
12Elfogadva1/11ms316 KiB
13Elfogadva1/11ms316 KiB
14Elfogadva1/11ms316 KiB
15Elfogadva1/11ms316 KiB
16Elfogadva2/259ms508 KiB
17Elfogadva3/361ms604 KiB
18Elfogadva2/259ms468 KiB
19Elfogadva3/357ms616 KiB
20Elfogadva1/157ms564 KiB
21Elfogadva1/156ms440 KiB
22Elfogadva3/359ms564 KiB