这道题比较简单,就是用数组存取其路径。如101和102是对门,其过道号可以记为51.  1和2之间的为1.

今早突然收到操作系统停课的通知,哈哈 回来就做一下水题,开心

 #include<cstdio>
#include<memory.h>
int main()
{
//freopen("input.txt","r",stdin);
int T,n,a,b;
int s[];
int max;
int t = ;
int temp;
scanf("%d",&T);
while(T--)
{
scanf("%d",&n);
memset(s,,sizeof(s));
while(n--)
{
scanf("%d%d",&a,&b);
if(a>b) {temp = a; a = b; b = temp;}
for(int i = (a+)/; i <= (b+)/; i++)
{
s[i]++;
}
}
max = ;
for(int i = ; i <= ; i++)
{
if(s[i] > s[max])
max = i;
}
printf("\n%d",s[max]*); //该题输出需要输出最后一个空行,才能过
} return ;
}

hdu 1.3.2 Moving Tables的更多相关文章

  1. POJ 1083 &amp;&amp; HDU 1050 Moving Tables (贪心)

    Moving Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) To ...

  2. 杭电 1150 moving tables

    http://acm.hdu.edu.cn/showproblem.php? pid=1050 Moving Tables Time Limit: 2000/1000 MS (Java/Others) ...

  3. zstu.2512. Moving Tables(贪心)

     Moving Tables Time Limit: 1 Sec  Memory Limit: 64 MB Submit: 1182  Solved: 563 Description The famo ...

  4. Moving Tables(贪心或Dp POJ1083)

    Moving Tables Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 28304   Accepted: 9446 De ...

  5. HDOJ 1050 Moving Tables

    Moving Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  6. 1050 Moving Tables

    Moving Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) To ...

  7. Moving Tables

    Moving Tables Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total ...

  8. hdoj 1050 Moving Tables【贪心区间覆盖】

    Moving Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  9. uvalive 2326 - Moving Tables(区间覆盖问题)

    题目连接:2326 - Moving Tables 题目大意:在一个走廊上有400个教室, 先在有一些桌子要移动, 每次移动需要十分钟, 但是不同房间的桌子可以在同一个十分钟内移动,只要走廊没有被占用 ...

随机推荐

  1. abp项目中无法使用HttpContext.Current.Session[""]的问题

    web项目Global.asax.cs中加入如下代码 public override void Init() { this.PostAuthenticateRequest += (sender, e) ...

  2. 解决ubuntu常见问题

    cd /usr/local/hadoop 1. bash: cd: ~:Permission denied 报错:bash: cd: /usr/local/hadoop:Permission deni ...

  3. 【Linux】ApacheBench(ab)压力测试工具

    AB的简介 ab是apachebench命令的缩写. ab是apache自带的压力测试工具.ab非常实用,它不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试.比 ...

  4. [C#]RichTextBox实现拖放

    amespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeC ...

  5. render函数的简单使用

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  6. 在python中while

    一.While循环 1.while循环格式 while 条件 : while循环体 当条件为Ture时,执行循环体,直到条件是假,停止循环. count = 1 # count 计数 一般用于计数 w ...

  7. 832. Flipping an Image

    class Solution { public: vector<vector<int>> flipAndInvertImage(vector<vector<int& ...

  8. Java基础语法学习知识

    基础概念 标识符1.由字母,数字,下划线,美元符组成2.首字母不能是数字3.不能是关键字和保留字4.能反映其作用 关键字1.有特定含义2.用于特定地方3.用来命名标识符 常量1.程序执行时值不变的量2 ...

  9. NETCLR via C#第四版(文摘)

    第1部分 CLR基础 第1章 CLR的执行模型 第2章 生成,打包,部署和管理应用程序及类型 第3章 共享程序集和强命名程序集 第2部分 设计类型 第4章 类型 第5章 基元类型 引用类型和值类型 第 ...

  10. vue父传子

    父组件传递数据给子组件用props,父组件中使用子组件,子组件用props接收父组件数据. Home父组件代码: <template> <div> {{test}} <! ...