CodeForces 673B Problems for Round(比赛出题规则)
来源:互联网 发布:java用户角色权限 编辑:程序博客网 时间:2024/05/22 15:47
http://codeforces.com/problemset/problem/673/B
题意:
Codeforces出题有 Div1 和 Div2 等级,D1中最简单的题目也要比 D2中的难(雨神说我现在的水平做不出来Div1的题)。
给定一些相似的题目,问可以出多少套题目,
数字代表难度(越大越难)。
思路:
模拟试一下,参考官方的题解。
Code:
#include<cstdio>#include<cstring>const int MYDD=1103;int MAX(int x,int y) {return x>y? x:y;}int MIN(int x,int y) {return x<y? x:y;}int main() {int n,m;while(scanf("%d%d",&n,&m)!=EOF) {int div1=n,div2=1;//div1题目等级高int max,min;while(m--) {int a,b;scanf("%d%d",&a,&b);//类似的题目min=MIN(a,b);max=MAX(a,b);div1=MIN(div1,max);//div1题目中最简单的题目div2=MAX(div2,min);//div2题目中最难的题目}if(div1-div2<0) {//难题中最简单的题目没有容易题中最难的难puts("0");} else {printf("%d\n",div1-div2);}}return 0;}/*By: Shyazhut*/
0 0
- CodeForces 673B Problems for Round(比赛出题规则)
- 【CodeForces】[673B]Problems for Round
- 【Codeforces】 -673B - Problems for Round
- Codeforces 673B Problems for Round【思维】
- CodeForces - 673B Problems for Round (模拟)水
- 【Codeforces Round #351 Div. 2】 673B Problems for Round
- 【Codeforces】351B - Problems for Round(思维,好题)
- CodeForces 351 B Problems for Round
- Codeforces Round #351 (VK Cup 2016 Round 3, Div. 2 Edition) B.Problems for Round
- Codeforces Round #351 (VK Cup 2016 Round 3, Div. 2 Edition) B. Problems for Round
- codeforcs 351 B. Problems for Round
- codeforcs 351 B. Problems for Round
- Problems for Round
- codeforce之problems for round
- codeforces Educational Codeforces Round 33 (Rated for Div. 2)B
- Codeforces Round #222 (Div. 1) B - Preparing for the Contest
- Codeforces Round #444 (Div. 2) B. Cubes for Masha
- Codeforces Round #444 (Div. 2) B. Cubes for Masha
- 觉得对我这种随便起变量名的人有很大帮助的一篇文章
- GOF之观察者模式(一)
- PHP_Memcache函数详解
- centos 软件包冲突,无法安装php-mysql扩展
- 对比JAVA学习PHP系列:应用:php的日期和时间
- CodeForces 673B Problems for Round(比赛出题规则)
- 对比JAVA学习PHP系列:应用:php的文件系统处理
- HCNA-HNDT2.1入门实验指导书笔记
- hdu 4496 D-City
- 对比JAVA学习PHP系列:应用:php数据库开发
- vsftpd创建虚拟账号
- 九、自定义Tab
- jzoj 1353. 【2011.12.24普及模拟】渡河问题
- hdu 3078 Network&& poj 2395 Out of Hay(kruskal)