Educational Codeforces Round 12补题 经典题 再次爆零
发生了好多事情 再加上昨晚教育场的爆零 。。真的烦
A题经典题 这个题我一开始推公式wa 其实一看到数据范围 就算遍历也OK
存在的问题进制错误 。。 思路不清晰 两个线段有交叉 并不是端点落在另一个线段
包含的情况落在线段外
a车不影响 结果直接给忽略
#include <iostream>
#include<cstdio>
using namespace std;
int main()
{
int a,ta,b,tb,hh,mm;
cin>>a>>ta>>b>>tb;
scanf("%d:%d",&hh,&mm);
int tem=(hh-)*+mm;
int ans=;
int l=tem,r=tem+ta;int n=((-)*+);
for(int i=;i<=n;i+=b)
{
if((tb+i)<=l||i>=r) continue;
ans++;
}
cout<<ans<<endl;
return ;
}
AC代码
Educational Codeforces Round 12补题 经典题 再次爆零的更多相关文章
- cordforce Educational Codeforces Round 47 补题笔记 <未完>
题目链接 http://codeforces.com/contest/1009 A. Game Shopping 直接模拟即可,用了一个队列来存储账单 #include <iostream> ...
- Educational Codeforces Round 27 补题
题目链接:http://codeforces.com/contest/845 A. Chess Tourney 水题,排序之后判断第n个元素和n+1个元素是不是想等就可以了. #include < ...
- Educational Codeforces Round 23 补题小结
昨晚听说有教做人场,去补了下玩. 大概我的水平能做个5/6的样子? (不会二进制Trie啊,我真菜) A. 傻逼题.大概可以看成向量加法,判断下就好了. #include<iostream> ...
- Educational Codeforces Round 22 补题 CF 813 A-F
A The Contest 直接粗暴贪心 略过 #include<bits/stdc++.h> using namespace std; int main() {//freopen(&qu ...
- Educational Codeforces Round 12 B C题、
B. Shopping 题意:n个顾客,每个顾客要买m个物品,商场总共有k个物品,看hint就只知道pos(x)怎么算了,对于每一个Aij在k个物品中找到Aij的位置.然后加上这个位置对于的数值,然后 ...
- Educational Codeforces Round 12 A. Buses Between Cities 水题
A. Buses Between Cities 题目连接: http://www.codeforces.com/contest/665/problem/A Description Buses run ...
- Educational Codeforces Round 11、A B题
A. Co-prime Array 题意:给你一个数列,要求构造两两相邻之间的数互质的数列,可以插入的数的小于10的9次方 思路:其实可以选择靠近10的9次方的最大的三个素数.然后按我下面的方法做就可 ...
- Educational Codeforces Round 14 B. s-palindrome 水题
B. s-palindrome 题目连接: http://www.codeforces.com/contest/691/problem/B Description Let's call a strin ...
- Educational Codeforces Round 26 A B C题
题目链接 A. Text Volume 题意:计算句子中,每个单词大写字母出现次数最多的那个的出现次数(混不混乱QAQ). 解题思路:注意getchar()就没啥了. #include<cstd ...
随机推荐
- OO易错点总结
在写子类的构造函数时,要在初始化列表中指定使用的父类的构造函数并完成其初始化,如下例: AudioBook(const string& bookname, const string& ...
- easyui更改messager的OkCancel按钮为(中文)确定取消
jquery-easyui默认情况下,消息框的按钮文字是英文的OK Cancel,但可以通过提供的方法进行修改,如: $.extend($.messager.defaults,{ ok:" ...
- sql查询的时候,等于这两个的值得全部取出来
sql查询的时候 用or连接 ad.jqtype='人文历史' or ad.jqtype='名胜古迹'
- Codeforces Round #269 (Div. 2) A,B,C,D
CodeForces - 471A 首先要有四个数相等,然后剩下两个数不同就是Bear,否则就是Elephant. #include <bits/stdc++.h> using names ...
- 理解Bitcode:一种中间代码
原文网址: http://www.cocoachina.com/ios/20150818/13078.html 今天试着用Xcode 7 beta 3在真机(iOS 8.3)上运行一下我们的工程,结果 ...
- VRTK3.3.0-004传送
直线传送: 一.无高度变换传送(VRTK_BasicTeleport) 1丶继续在VRScripts下创建空物体PlayArea,用来挂在传送相关脚本:创建Plane作为传送地面 2丶在PlayAre ...
- C#连接Sybase数据库,Anywhere 8
数据库版本是Adaptive Server Anywhere 8 1.添加引用,程序集 iAnywhere.Data.AsaClient.dll文件在数据库的安装目录下,例如:C:\Program F ...
- [NOIP2014]无线网站发射器选址
Description 随着智能手机的日益普及,人们对无线网的需求日益增大.某城市决定对城市内的公共场所覆盖无线网.假设该城市的布局为由严格平行的129条东西向街道和129条南北向街道所形成的网格状, ...
- CentOS7-MySQL8安装-使用yum库安装
# Enable to use MySQL 5.5 [mysql55-community] name=MySQL 5.5 Community Server baseurl/$basearch/ ena ...
- nginx 设置websocket支持
#websocket======相关 proxy_read_timeout 60m; proxy_http_version 1.1; proxy_set_header Upgrade $http_up ...