网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  1083Moving Tables

1083Moving Tables

分类: IT文章 • 2023-11-17 19:34:12

水题来的,重合程度最大的,对应最大的时间

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
    int i,j,t,n,q[201];
    cin>>t;
    while(t--)
    {
        memset(q,0,sizeof(q));
        cin>>n;
        for(i=0;i<n;i++)
        {
            int a,b,t;
            cin>>a>>b;
            if(a>b)
            {
                t=a;a=b;b=t;
            }
            if(a%2)
                a++;
            if(b%2)
                b++;
            for(j=a/2;j<=b/2;j++)
                q[j]++;
        }
        int max=0;
        for(i=1;i<=200;i++)
        if(q[i]>max)
            max=q[i];
        cout<<max*10<<endl;
    }
}

相关推荐

  • hdu1213 How Many Tables 基础并查集
  • Moving Tables 贪心 Moving Tables
  • Leetcode中的SQL题目练习(二) 175. Combine Two Tables 181. Employees Earning More Than Their Managers ?? 183. Customers Who Never Order 184. Department Highest Salary ??? 176. Second Highest Salary ?? 177. Nth Highest Salary 178. Rank Scores ?? 180. Consecutive Numbers 626. Exchange Seats ???
  • Delete all tables on sqlserver
  • HDU 1213 How Many Tables
  • 14.2.6.1 Role of the .frm File for InnoDB Tables
  • Docker 中 MySql 启动失败,报错 Can't open and lock privilege tables: Table storage engine for 'user'
  • How Many Tables HDOJ How Many Tables
  • MySQL的lock tables和unlock tables的用法(转载)
  • rhel6 mysql skip-grant-tables 添加用户报错 ERROR 1290
  • 未做
  • 1050To the Max
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号