标签:io for amp ad app dp algorithm hdu
#include <cstdio> #include <algorithm> using namespace std; int p1,p2,a[6],T; int main(){ scanf("%d",&T); while(T--){ for(int i=0;i<6;i++)scanf("%d",&a[i]); sort(a,a+6); p1=a[4]+a[5]; p2=a[2]+a[3]+a[1]; if(p1>p2)puts("Grandpa Shawn is the Winner!"); else puts("What a sad story!"); } return 0; }
HDU 4931 Happy Three Friends,布布扣,bubuko.com
标签:io for amp ad app dp algorithm hdu
原文地址:http://www.cnblogs.com/forever97/p/3904167.html