简单题

#include<cstdio>
#include<cstring>
#include<cmath>
#include<vector>
#include<map>
#include<stack>
#include<queue>
#include<string>
#include<algorithm>
using namespace std; int a,ta,b,tb;
int hh,mm; int f(int st,int en,int ss,int ee)
{
if(ee<=st) return ;
if(en<=ss) return ;
return ;
} int main()
{
scanf("%d%d",&a,&ta);
scanf("%d%d",&b,&tb);
scanf("%d:%d",&hh,&mm); int st=hh*+mm;
int en=hh*+mm+ta; int t=;
int ans=; while()
{
int ss=*+t*b;
int ee=ss+tb;
if(ss>=*) break;
if(f(st,en,ss,ee)==) ans++;
t++;
} printf("%d\n",ans);
return ;
}

codeforces 665A Buses Between Cities的更多相关文章

  1. Codeforces 665A. Buses Between Cities 模拟

    A. Buses Between Cities time limit per test: 1 second memory  limit per test: 256 megabytes input: s ...

  2. codeforces 665A A. Buses Between Cities(水题)

    题目链接: A. Buses Between Cities time limit per test 1 second memory limit per test 256 megabytes input ...

  3. Educational Codeforces Round 12 A. Buses Between Cities 水题

    A. Buses Between Cities 题目连接: http://www.codeforces.com/contest/665/problem/A Description Buses run ...

  4. Codeforces C. Jzzhu and Cities(dijkstra最短路)

    题目描述: Jzzhu and Cities time limit per test 2 seconds memory limit per test 256 megabytes input stand ...

  5. Educational Codeforces Round 12 A. Buses Between Cities

    题意: 从A到B的汽车每隔 a 分钟发车一次,从A到B要ta分钟. 从B到A汽车每隔b分钟发车一次,从B到A要ta分钟. Simion从A出发,问他在A->B的途中共遇到了多少辆车. 汽车都是从 ...

  6. Codeforces 1101F Trucks and Cities dp (看题解)

    Trucks and Cities 一个很显然的做法就是二分然后对于每个车贪心取check, 这肯定会TLE, 感觉会给人一种贪心去写的误导... 感觉有这个误导之后很难往dp那个方向靠.. dp[ ...

  7. [Codeforces 449B] Jzzhu and Cities

    [题目链接] https://codeforces.com/contest/449/problem/B [算法] 最短路 时间复杂度 : O(N ^ 2) [代码] #include<bits/ ...

  8. codeforces 449B Jzzhu and Cities (Dij+堆优化)

    输入一个无向图<V,E>    V<=1e5, E<=3e5 现在另外给k条边(u=1,v=s[k],w=y[k]) 问在不影响从结点1出发到所有结点的最短路的前提下,最多可以 ...

  9. Codeforces 450D Jzzhu and Cities [heap优化dij]

    #include<bits/stdc++.h> #define MAXN 100050 #define MAXM 900000 using namespace std; struct st ...

随机推荐

  1. JavaScript高级程序设计:第五章

    引用类型 一.object类型: 创建object实例的方式有两种.第一种是使用new操作符后跟Object构造函数,如下所示: var  person = new  Object(): person ...

  2. Linux中切换用户变成-bash4.1-$的解决方法【转】

    转自 Linux中切换用户变成-bash4.1-$的解决方法 - xia_xia的博客 - 博客频道 - CSDN.NEThttp://blog.csdn.net/xia_xia0919/articl ...

  3. listview条目用状态选择器没反应

    button和imagebutton天生具有“可点击(click)”.“可按下(press)”的特性,radiobutton具有“可勾选(check)”的特性,但是listview的条目只有“可按下( ...

  4. MD5 32位加密算法源码(测试通过)(系转载 飞扬天下)

    供自己学习使用 md5.h文件 #ifndef MD5_H #define MD5_H #include <string> #include <fstream> /* Type ...

  5. 笨方法学python--变量和命名

    1 =(单等号)和==(双等号)的区别 =用来赋值, ==用来判断是否相等 2 x = 100 在操作符2侧加空格,易读 3 打印时,进行字符串拼接 print "there are&quo ...

  6. redis采用序列化方案存对象

    前几天被问到这样一个问题,redis怎么存对象,平时也没怎么注意,只知道redis存字符之类的,不过就是根据键存取值,不过对象的话还是不同的 首先来了解一下为什么要实现序列化 为什么要实现序列化接口 ...

  7. linux cat more less head tail

    cat 命令: cat filename  查看一个文件的内容cat[选项][文件]... -b  对非空白行进行编号,行号从1开始-n  和nl命令差不多,对所有行(包括空白行)进行编号输出显示-E ...

  8. MYSQL和ORACLE的触发器与存储过程语法差异

    整改了一番脚本,遇到了一些两种数据库之间的差异,记录一下: 触发器: 差异 MYSQL ORACLE 说明 创建语句不同 create trigger `AA` BEFORE INSERT on `B ...

  9. 页面开发辅助类—HtmlHelper初步了解

    1.1 有失必有得 在ASP.Net MVC中微软并没有提供类似服务器端控件那种开发方式,毕竟微软的MVC就是传统的请求处理响应的回归.所以抛弃之前的那种事件响应的模型,抛弃服务器端控件也理所当然. ...

  10. Hibernate 系列教程10-组成关系

    组成关系 在一个员工模型里面需要存入 员工公司所在地址的城市,街道 员工籍贯所在的城市,街道, 此时可以抽取城市,街道变成一个模型即是组成关系 Employee public class Employ ...