138752025-01-09 07:22:27NeMÖntözés (50 pont)cpp17Wrong answer 13/50105ms568 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int t, m;
	cin >> t >> m;
	
	for (int q = 0; q < t; q++) {
		long long A, x, B, y;
		cin >> A >> x >> B >> y;

		long long c = (((B*24)+y)-((A*24)+x))/m;
		cerr << (((B*24)+y)-((A*24)+x)) << ' ' << c << endl;
		if (m%(((B*24)+y)-((A*24)+x)) <= 1) {
			c--;
		}
		cout << c << endl;
	}

	return 0;
}
SubtaskSumTestVerdictTimeMemory
base13/50
1Accepted0/01ms316 KiB
2Wrong answer0/017ms316 KiB
3Accepted5/52ms316 KiB
4Accepted5/5101ms564 KiB
5Wrong answer0/31ms412 KiB
6Wrong answer0/31ms316 KiB
7Wrong answer0/31ms364 KiB
8Wrong answer0/31ms420 KiB
9Wrong answer0/31ms532 KiB
10Wrong answer0/31ms316 KiB
11Wrong answer0/31ms316 KiB
12Wrong answer0/11ms500 KiB
13Accepted1/11ms316 KiB
14Accepted1/11ms316 KiB
15Accepted1/11ms316 KiB
16Wrong answer0/2105ms508 KiB
17Wrong answer0/3103ms564 KiB
18Wrong answer0/2104ms500 KiB
19Wrong answer0/3101ms568 KiB
20Wrong answer0/1103ms512 KiB
21Wrong answer0/1101ms512 KiB
22Wrong answer0/3104ms448 KiB