A. BQG's Programming Contest
Time Limit: 2000ms
Memory Limit: 32768KB
64-bit integer IO format:
%lld Java class name:
Main
又到了一年一度的北京师范大学新生程序设计竞赛!
为作为良心出题人,决定开大时限送温暖!
![Big \ Q \ God Big \ Q \ God](http://www.bnuoj.com/v3/functions/latexrender/pictures/452ca35779267682d31b87da49b2a42e.png)
![BQG BQG](http://www.bnuoj.com/v3/functions/latexrender/pictures/70a7772303b35bfed91d3a9833df1fd6.png)
![1000ms 1000ms](http://www.bnuoj.com/v3/functions/latexrender/pictures/daa330bf3afacc0d47e30f8aaead5899.png)
![60000ms 60000ms](http://www.bnuoj.com/v3/functions/latexrender/pictures/12332da1c4c91e68ed7b9d57d4fc3b55.png)
然而粗心的
算好时限之后忘记写进题目了,现在给出两份代码的运行时间(单位:
),你需要帮他算出这个题的时间限制。
![BQG BQG](http://www.bnuoj.com/v3/functions/latexrender/pictures/70a7772303b35bfed91d3a9833df1fd6.png)
![ms ms](http://www.bnuoj.com/v3/functions/latexrender/pictures/ee33e909372d935d190f4fcb2a92d542.png)
Input
第一行是一个正整数
, 表示测试数据的组数,
![T(T \leq 100000) T(T \leq 100000)](http://www.bnuoj.com/v3/functions/latexrender/pictures/e34713f377400a41bed54b22b3734712.png)
每组测试数据只有一行,
包含两个整数
,表示两份代码的运行时间。
![t_1,t_2(0 \leq t_1,t_2 \leq 60000) t_1,t_2(0 \leq t_1,t_2 \leq 60000)](http://www.bnuoj.com/v3/functions/latexrender/pictures/857dc76beb6be69771a2f66aab970088.png)
Output
对于每组测试数据,输出一个整数,表示这个题的时间限制。
Sample Input
5 0 16 200 212 1000 1024 5000 10000 12000 20000
Sample Output
1000 1060 5120 50000 60000
题解网址:
https://blog.csdn.net/quailty/article/details/50410426
#include<stdio.h>
#include<string.h>
#include<iostream>
#include<stdlib.h>
#include<algorithm>
using namespace std;
int main(){
int T;
int t1,t2;
cin>>T;
while(T--){
int max;
cin>>t1>>t2;
max=t1>t2?t1:t2;
max=max*5;
if(max<1000){
max=1000;
}
if(max>60000){
max=60000;
}
cout<<max<<endl;
}
return 0;
}