hdu 1050 Moving Tables
来源:互联网 发布:多益网络加班怎么样 编辑:程序博客网 时间:2024/06/01 09:23
http://acm.hdu.edu.cn/showproblem.php?pid=1050
简单的题目,就是求交叉的路线最多次数。
注意:
- 房间可能从大到小,也可能从小到大。
- 1和2属于同一个,2和3也是。。。。等等
#include<iostream>using namespace std;int n,m,a[405];int main(){ int temp1, temp2; cin >> n; while (n--) { memset(a, 0, sizeof(a)); int max = 0; cin >> m; for (int i = 0; i < m; i++){ cin >> temp1 >> temp2; if (temp1>temp2){ int temp = temp1; temp1 = temp2; temp2 = temp; } if (!(temp1 % 2)) temp1 = temp1 - 1; if (temp2 % 2) temp2 = temp2 + 1; for (int j = temp1; j <= temp2; j++){ a[j]++; max = a[j] > max ? a[j] : max; } } cout << max*10 << endl; } return 0;}
0 0
- HDU 1050 Moving Tables
- hdu 1050 moving tables
- HDU-1050 Moving Tables
- hdu-1050-Moving Tables
- HDU 1050 Moving Tables
- HDU 1050 Moving Tables
- hdu 1050 moving tables
- hdu 1050 Moving Tables
- hdu 1050 Moving Tables
- hdu 1050 Moving Tables
- HDU (1050) Moving Tables
- HDU--1050 -- Moving Tables
- hdu 1050 Moving Tables
- hdu 1050 Moving Tables
- HDU 1050 Moving Tables
- hdu-1050 Moving Tables
- hdu 1050 Moving Tables
- HDU 1050 Moving tables
- iPhone计步器
- 自动增长字段
- hdu 1561 The more, The Better 树形dp
- MongoDB的简单操作
- 朴素贝叶斯分类器本质上是线性分类器
- hdu 1050 Moving Tables
- GSON 使用教程
- R语言学习路线和常用数据挖掘包
- The Java™ Tutorials — Generics :Restrictions on Generics 泛型约束
- HDU3336 Count the string(KMP)
- HQL和SQL的区别
- 计算广告与机器学习-技术共享平台
- 动画之补间平移动画
- 敏捷测试(一)敏捷测试探索