SGU 276 Andrew's Troubles
简单的题。直接找题意来就好了。
#include <iostream>
#include <cstdio>
using namespace std;
int s, n, ans;
int main() {
cin >> s >> n;
n -= s;
if (n >= * ) ans++;
if (n >= * ) ans++;
if (n >= * ) ans++;
if (n > ) ans++;
cout<<ans<<endl;
}
SGU 276 Andrew's Troubles的更多相关文章
- 今日SGU 5.4
SGU 127 题意:给你n个数字,和m,k,问你有多少个数字的m次幂可以被k整除 收获:快速幂 #include<bits/stdc++.h> #define de(x) cout< ...
- [C6] Andrew Ng - Convolutional Neural Networks
About this Course This course will teach you how to build convolutional neural networks and apply it ...
- matlab基础教程——根据Andrew Ng的machine learning整理
matlab基础教程--根据Andrew Ng的machine learning整理 基本运算 算数运算 逻辑运算 格式化输出 小数位全局修改 向量和矩阵运算 矩阵操作 申明一个矩阵或向量 快速建立一 ...
- poj1113--凸包(Andrew)
题目大意: 给出平面上若干个点的坐标,你的任务是建一个环形围墙,把所有的点围在里面,且距所有点的距离不小于l.求围墙的最小长度. 思路: 很容易得出答案就是凸包周长+以l为半径的圆的周长. 这里讲一下 ...
- HDU1329 Hanoi Tower Troubles Again!——S.B.S.
Hanoi Tower Troubles Again! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (J ...
- ZOJ-1239 Hanoi Tower Troubles Again!
链接:ZOJ1239 Hanoi Tower Troubles Again! Description People stopped moving discs from peg to peg after ...
- SGU 495. Kids and Prizes
水概率....SGU里难得的水题.... 495. Kids and Prizes Time limit per test: 0.5 second(s)Memory limit: 262144 kil ...
- ACM: SGU 101 Domino- 欧拉回路-并查集
sgu 101 - Domino Time Limit:250MS Memory Limit:4096KB 64bit IO Format:%I64d & %I64u Desc ...
- 【SGU】495. Kids and Prizes
http://acm.sgu.ru/problem.php?contest=0&problem=495 题意:N个箱子M个人,初始N个箱子都有一个礼物,M个人依次等概率取一个箱子,如果有礼物则 ...
随机推荐
- 使用Redis作为消息队列服务场景应用案例
一.消息队列场景简介 "消息"是在两台计算机间传送的数据单位.消息可以非常简单,例如只包含文本字符串:也可以更复杂,可能包含嵌入对象.消息被发送到队列中,"消息队列&qu ...
- Microsoft JScript 运行时错误: Automation 服务器不能创建对象
var WshShell = new ActiveXObject('WScript.Shell') WshShell.SendKeys( '{F11}'); 问题: ...
- [转]让程序在崩溃时体面的退出之SEH
原文地址:http://blog.csdn.net/starlee/article/details/6636723 SEH的全称是Structured Exception Handling,是Wind ...
- 细谈Java
重载:相同函数名,不同参数. 重写(覆写):父类和子类之间的,子类重写了父类的方法. java的多态:重载+覆写 1. Main方法: 是public的,也是static,也是void的,参 ...
- Hibernate自定义数据库查询(排序、输出条数)
Hibernate数据库操作类(eg:TexDAO.java) /* * queryString HQL语句,first开始条数, max输出条数 ,norder排序 * 例: List lis = ...
- 【设计模式 - 6】之桥接模式(Bridge)
1 模式简介 举个例子,人.车和公路是三个维度,人开着车在公路上行驶,就是将这三个维度进行了关联.人分男人(Man)和女人(Woman),车分小轿车(Car)和公共汽车(Bus),公路分市区 ...
- ASP.NET通过http/https的POST方式,发送和接受XML文件内容
本文转载:http://hi.baidu.com/ysyhyt/item/5011ae39ce3cf49fb80c0395 本文参考:http://blog.csdn.net/ououou123456 ...
- AFNetworking 使用总结
NSString *URLTmp = @""; NSString *URLTmp1 = [URLTmp stringByAddingPercentEscapesUsingEncod ...
- JAVA去掉字符串前面的0
最佳方案:使用正则 String str = "000000001234034120"; String newStr = str.replaceAll("^(0+)&qu ...
- [PWA] Enable Push Notification in your web app
1. Clone the project: git clone https://github.com/GoogleChrome/push-notifications.git 2. install th ...