|
|
back to boardMy solution :) C++ 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++ 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++ Thanx buddy |
|
|