Create 5948.cpp

pull/45/head
Kirigaya Kazuto 2016-11-05 15:56:44 +08:00 committed by GitHub
parent c810c01d15
commit 2b36e5763b
1 changed files with 18 additions and 0 deletions

18
HDOJ/5948.cpp Normal file
View File

@ -0,0 +1,18 @@
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d\n",max(2*a+b,2*b+a));
}
return 0;
}