求和比大小...
/** @Date : 2017-03-23-21.26 * @Author : Lweleth (SoungEarlf@gmail.com) * @Link : https://github.com/ * @Version : */ #include<bits/stdc++.h> #define LL long long #define PII pair #define MP(x, y) make_pair((x),(y)) #define fi first #define se second #define PB(x) push_back((x)) #define MMG(x) memset((x), -1,sizeof(x)) #define MMF(x) memset((x),0,sizeof(x)) #define MMI(x) memset((x), INF, sizeof(x)) using namespace std; const int INF = 0x3f3f3f3f; const int N = 1e5+20; const double eps = 1e-8; int main() { int T; while(cin >> T) { while(T--) { int n, m; cin >> n >> m; LL s1 = 0, s2 = 0; LL x; for(int i = 0; i < n; i++) { cin >> x; s1 += x; } for(int i = 0; i < m; i++) { cin >> x; s2 += x; } if(s1 > s2) printf("Calem "); else if(s1 < s2) printf("Serena "); else printf("Draw "); } } return 0; }