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.

My solution :) C++
Posted by competitivecoder 3 Jun 2015 10:07
hey guys,this is my solution.Hope you like it :) C++.


#include <bits/stdc++.h>
using namespace std;
queue<int>qu;                           //queue
#define pii pair<int,int>              //pair
#define maxx 500                      //maximum of anything
vector<pii>vpii[maxx];               //Vector of pair
#define inf 0x7fffffff              //INFINITY
int X[]={+2,+2,-2,-2,+1,-1,-1,+1}; //knight movement left/right
int Y[]={-1,+1,-1,+1,+2,+2,-2,-2};//knight movement up/down
int main()
{
    int pr;
    while(cin>>pr){
         int r=max(0,12-pr);
         int minutes=(4*60)-r*45;
         cout<<(minutes>=0?"YES\n":"NO\n");
    }
    return 0;
}

Edited by author 03.06.2015 10:10

Edited by author 03.06.2015 10:10
Re: My solution :) C++
Posted by Morteza Balvardi 1 Jan 2016 21:48
in my country we use the following sentence for your kind of code :"turning food around head then eating it"
i mean you are just overkilling such an easy question but i learnt a little trick from your code thanks for that
Re: My solution :) C++
Posted by BlindCoder001 10 Apr 2017 15:21
Thanx buddy