思路:模拟
AC代码
#include "iostream"#include "iomanip"#include "string.h"#include "stack"#include "queue"#include "string"#include "vector"#include "set"#include "map"#include "algorithm"#include "stdio.h"#include "math.h"#pragma comment(linker, "/STACK:102400000,102400000")#define bug(x) cout<<<" "<<"UUUUU"< >hh>>mm>>ss>>t1>>t2; int f=0; if(t2 =60) hh-=60; if(mm>=60) mm-=60; if(hh>=t1 && hh<=t2 && ss>=t1 && ss<=t2 && mm>=t1 && mm<=t2){ cout<<"YES\n"; return 0; } if(((mm>=t2 && mm<=60) || (mm>=0 && mm<=t1))&&((hh>=t2 && hh<=60) || (hh>=0 && hh<=t1)) && ((ss>=t2 && ss<=60) || (ss>=0 && ss<=t1)) ){ cout<<"YES\n"; return 0; } //cout< <<" "< <<" "< <<" "< <<" "< <