###### Educational Codeforces Round 12 A. Buses Between Cities

Simion从A出发，问他在A->B的途中共遇到了多少辆车。

#include<iostream>
#include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;

int main()
{

int a,ta;
int b,tb;
int hh,mm;
scanf("%d%d",&a,&ta);
scanf("%d%d",&b,&tb);
scanf("%d:%d",&hh,&mm);
int be=hh*60+mm;
int ed=hh*60+mm+ta;
int st=5*60;
int cnt=0;
while(st<60*24)
{
if((st<ed&&(st+tb)>be)||(st<ed&&st>be))
cnt++;
st+=b;
}
cout<<cnt<<endl;
return 0;
}

#### Codeforces Educational Round #42

2018-04-12 20:34:29

#### CF-Educational Codeforces Round 44 (Rated for Div. 2)-A-Chess Placing

2018-05-22 04:28:33

#### Educational Codeforces Round 12 A. Buses Between Cities

2016-04-25 20:06:59

#### 解题报告：Educational Codeforces Round 24 D,E,F

2017-07-01 14:07:43

#### Educational Codeforces Round 36 (Rated for Div. 2) 题解

2018-01-13 23:16:24

#### Educational Codeforces Round #41 (D&E)

2018-04-05 10:38:15

#### Educational Codeforces Round 42 E 贪心

2018-04-11 11:57:41

#### Educational Codeforces Round 36

2018-01-16 12:45:18

#### Codeforces Round #392 (Div. 2)E. Broken Tree

2017-01-20 19:16:32

#### 【解题报告】 Educational Codeforces Round 19

2017-04-16 17:16:52

## 不良信息举报

Educational Codeforces Round 12 A. Buses Between Cities