ZOJ 3776: Pokemon Master

ZOJ - 3776

///@author Sycamore, ZJNU
///@submitted_on 2017 - 01 - 17
///
#include<iostream>
using namespace std;
int main()
{
    int T;
    cin >> T;
    while (T--)
    {
        int N, M, w1 = 0, w2 = 0, t;
        cin >> N >> M;
        while (N--)
        {
            cin >> t;
            w1 += t;
        }
        while (M--)
        {
            cin >> t;
            w2 += t;
        }
        if (w1 > w2)cout << "Calem" << endl;
        else if (w2 > w1)cout << "Serena" << endl;
        else cout << "Draw" << endl;
    }
    return 0;
}
时间: 2024-07-28 21:05:29

ZOJ 3776: Pokemon Master的相关文章

Pokemon Master

Pokemon Master Time Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other) Total Submission(s) : 15 Accepted Submission(s) : 8 Problem Description Calem and Serena are pokemon masters. One day they decided to have a pokemon battle

ZOJ 1940 Dungeon Master 三维BFS

Dungeon Master Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with r

ZOJ 1940 Dungeon Master【三维BFS】

<题目链接> 题目大意: 在一个立体迷宫中,问你从起点走到终点的最少步数. 解题分析: 与普通的BFS基本类似,只需要给数组多加一维,并且走的时候多加 上.下这两个方向就行. #include <cstdio> #include <cstring> #include <queue> #include <iostream> #include <algorithm> using namespace std; int a,b,c; char

Gotta Catch Em&#39; All!

Gotta Catch Em' All! Bash wants to become a Pokemon master one day. Although he liked a lot of Pokemon, he has always been fascinated by Bulbasaur the most. Soon, things started getting serious and his fascination turned into an obsession. Since he i

Codecraft-17 and Codeforces Round #391 (Div. 1 + Div. 2, combined) A

Bash wants to become a Pokemon master one day. Although he liked a lot of Pokemon, he has always been fascinated by Bulbasaur the most. Soon, things started getting serious and his fascination turned into an obsession. Since he is too young to go out

Dungeon Master ZOJ 1940【优先队列+广搜】

Problem Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, east, west, up or down. You

ZOJ 3633 Alice&#39;s present(线段树)

As a doll master, Alice owns a wide range of dolls, and each of them has a number tip on it's back, the tip can be treated as a positive integer. (the number can be repeated). One day, Alice hears that her best friend Marisa's birthday is coming , so

(map) zoj 1633

A - Alice's present Time Limit:5000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3633 Appoint description:  System Crawler  (2015-01-27) Description As a doll master, Alice owns a wide range of dolls, and each

reset master和reset slave命令解析和区别

reset master删除所有index file 中记录的所有binlog 文件,将日志索引文件清空,创建一个新的日志文件,这个命令通常仅仅用于第一次用于搭建主从关系的时的主库, 注意: reset master 不同于purge binary log的两处地方1.reset master 将删除日志索引文件中记录的所有binlog文件,创建一个新的日志文件 起始值从000001 开始,然而purge binary log 命令并不会修改记录binlog的顺序的数值2.reset maste