ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2012. About Grisha N.

Easy solution for newbie's
Posted by Issatai Izturganov 15 May 2020 17:18
int f;
    cin >> f;
    int obs = 255;
    /*
    5 hours = 300 minutes
    all time = 300 minutes - 45 minutes(for f tasks)
    */
    int r = 12 - f;
    // tasks after first hour
    int ans = 45 * r;
    // time for solution
    if (ans <= obs) cout << "YES" << endl;
    else cout << "NO" << endl;

Edited by author 15.05.2020 17:20

Edited by author 15.05.2020 17:20
Re: Easy solution for newbie's
Posted by konstdev 11 Jan 2021 13:19
if (5 + f >= 12)
cout << "YES";
else cout << "NO";



cuz (60 * 4) // 45 = 5
he can solve 5 tasks in last 4 hours

Edited by author 11.01.2021 13:20

Edited by author 11.01.2021 13:20