p276.ans1
======================
0

=================
p276.ans2
======================
1

=================
p276.ans3
======================
2

=================
p276.cpp
======================
#include <bits/stdc++.h>

using namespace std;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& x) {
    return out << x.first << ' ' << x.second;
}

template<typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& x) {
    return in >> x.first >> x.second;
}

template<typename T>
istream& operator>>(istream& in, vector<T>& a) {
    for(auto& x: a) {
        in >> x;
    }
    return in;
};

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& a) {
    for(auto x: a) {
        out << x << ' ';
    }
    return out;
};

double start_time, arrival;

void read() { cin >> start_time >> arrival; }

void solve() {
    // Map the lateness (arrival minus start, in minutes) to cups of tea:
    // on time owes 0, any positive delay owes 1, 5+ minutes owes 2, 15+ owes 3
    // and 30+ owes 4. Check the thresholds from the largest downward.

    double delay = (arrival - start_time) / 60.0;

    int ans = 4;
    if(delay < 30) {
        ans = 3;
    }
    if(delay < 15) {
        ans = 2;
    }
    if(delay < 5) {
        ans = 1;
    }
    if(delay <= 0) {
        ans = 0;
    }

    cout << ans << "\n";
}

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

    int T = 1;
    // cin >> T;
    for(int test = 1; test <= T; test++) {
        read();
        // cout << "Case #" << test << ": ";
        solve();
    }

    return 0;
}

=================
p276.in1
======================
10 10

=================
p276.in2
======================
10 11

=================
p276.in3
======================
0 300

=================
statement.txt
======================
276. Andrew's Troubles
time limit per test: 0.25 sec.
memory limit per test: 65536 KB
input: standard
output: standard



Famous Berland ACM-ICPC team Anisovka consists of three programmers: Andrew, Michael and Ilya. A long time ago, during the first few months the team was founded, Andrew was very often late to the trainings and contests. To stimulate Andrew to be more punctual, Ilya and Andrew decided to introduce a new rule for team participants. If somebody is late (i.e. comes at least one second after appointed time) he owes a cup of tea to other team members. If he is late for 5 minutes, he owes two cups of tea. If he is late for 15 minutes, he owes three cups of tea. And if he is late for 30 minutes or more, he owes 4 cups of tea.
The training starts at the time S (counted in seconds, from some predefined moment of time) and Andrew comes at the time P (also in seconds, counted from the same moment of time).
Your task is to find how many cups of tea Andrew owes.

Input
The input file contains single line with integer numbers S and P (0 <= S,P <= 10^4).

Output
Write to the output file the number of cups Andrew owes.

Sample test(s)

Input
Test #1
10 10

Test #2
10 11

Test #3
0 300

Output
Test #1
0

Test #2
1

Test #3
2
Author:	Michael R. Mirzayanov
Resource:	ACM ICPC 2004-2005, NEERC, Southern Subregional Contest
Date:	Saratov, October 7, 2004

=================
