The 11th Zhejiang Provincial Collegiate Programming Contest->Problem A:A - Pokemon Master

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3776
题意:比较两组数据的总和大小。

#include <iostream>
using namespace std;

int main() {
    int t;
    cin>>t;
    while(t--) {
        int n,m,s1=0,s2=0,a[6],b[6];
        cin>>n>>m;
        for(int i=0; i<n; i++) {
            cin>>a[i];
            s1+=a[i];
        }
        for(int i=0; i<m; i++) {
            cin>>b[i];
            s2+=b[i];
        }
        if(s1>s2)
            printf("Calem\n");
        else if(s1<s2)
            printf("Serena\n");
        else
            printf("Draw\n");
    }
    return 0;
}
posted @ 2016-02-28 11:39  April_AA  阅读(121)  评论(0编辑  收藏  举报