#include<iostream>
using namespace std;
int main(){
int m,s,t,slos,tlos;
cin>>m>>s>>t;
slos=s;
tlos=t;
while(1){
//oOK1
if(m>=10){
m=m-10;
s=s-60;
t=t-1;
}
if(t==1 and m<10){
t=t-1;
s=s-17;
}
if(s<=0){
tlos=tlos-t;
cout<<"Yes"<<endl<<tlos;
return 0;
}if(t<=0){
slos=slos-s;
cout<<"No"<<endl<<slos;
return 0;
}
if(m<=1){
if(s>17){
t=t-3;
m=m+12;
}else{
t=t-1;
s=s-17;
if(s<=0){
tlos=tlos-t;
cout<<"Yes"<<endl<<tlos;
return 0;
}
if(t<=0){
slos=slos-s;
cout<<"No"<<endl<<slos;
return 0;
}
}
}
if(m>2 and m<6){
if(s>34){
t=t-2;
m=m+8;
}else{
t=t-2;
s=s-34;
if(s<=0){
tlos=tlos-t;
cout<<"Yes"<<endl<<tlos;
return 0;
}
if(t<=0){
slos=slos-s;
cout<<"No"<<endl<<slos;
return 0;
}
}
}
if(m>=6 and m<10){
t=t-1;
m=m+4;
}
}
return 0;
}
示例过了啊?为什么会tle和wa呢