CodeForces 467 A.George and Accommodation(水~)
来源:互联网 发布:纳米袜子 知乎 编辑:程序博客网 时间:2024/06/12 12:19
Description
有
Input
第一行一整数
Output
输出还可以再住两人的房间数
Sample Input
3
1 1
2 2
3 3
Sample Output
0
Solution
水题,统计
Code
#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>#include<cmath>#include<vector>#include<queue>#include<map>#include<set>#include<ctime>using namespace std;typedef long long ll;typedef pair<int,int>P;const int INF=0x3f3f3f3f,maxn=100001;int main(){ int n,p,q; while(~scanf("%d",&n)) { int ans=0; while(n--) { scanf("%d%d",&p,&q); if(q-p>=2)ans++; } printf("%d\n",ans); } return 0;}
阅读全文
0 0
- CodeForces 467 A.George and Accommodation(水~)
- Codeforces 467A George and Accommodation
- Codeforces 467A George and Accommodation(水题)
- Problem-467A-Codeforces-George and Accommodation
- codeforces 467A George and Accommodation
- codeforces 467A(George and Accommodation) Java
- 467A. George and Accommodation
- 467A - George and Accommodation
- A. George and Accommodation
- CF 467A George and Accommodation
- CF 467A-George and Accommodation
- Codeforces Round #267 (Div. 2) A. George and Accommodation
- Codeforces刷题之路——467A George and Accommodation
- cf467A George and Accommodation
- Coderforces George and Accommodation
- CodeForces 387A George and Sleep
- CodeForces 387A George and Sleep
- CodeForces 387A George and Sleep
- Burp Intruder-暴力猜解
- 1的个数 汉明距离
- 长沙理工大学第十二届ACM大赛 I.主持人的烦恼【贪心】
- GreenDao数据库的配置流程
- crf的意义
- CodeForces 467 A.George and Accommodation(水~)
- 1153:送分题素数
- docker核心-------镜像
- Java--05
- WOJ1119-Model Rocket Height
- Reverse Integer
- Future模式
- HBase学习总结(1):HBase的下载与安装
- ACM随笔 17.9.3 KMP