http://www.bnuoj.com/bnuoj/problem_show.php?pid=4207

【题意】:中文题,略

【题解】:模拟

【code】:

 #include <iostream>
#include <stdio.h>
#include <algorithm> using namespace std; struct Nod
{
int t,sh;
}node[][]; void init()
{
//XsugarX
node[][].t = ;
node[][].sh = ; node[][].t = ;
node[][].sh = ; node[][].t = ;
node[][].sh = ; //temperlsyer
node[][].t = ;
node[][].sh = ; node[][].t = ;
node[][].sh = ; node[][].t = ;
node[][].sh = ; node[][].t = ;
node[][].sh = ; node[][].t = ;
node[][].sh = ;
} int main()
{
int t;
init();
scanf("%d",&t);
while(t--)
{
int time,p1,p2;
scanf("%d%d%d",&time,&p1,&p2);
int i,atk[]={};
int next0=node[][].t,next1=node[][].t;
int add0=,add1=,cnt0=,cnt1=;
for(i=;i<=time;i++)
{
int flag0=,flag1=;
if(next0==i)
{
p2-=node[][cnt0].sh;
cnt0=(cnt0+)%;
flag0=; }
if(next1==i)
{
p1-=node[][cnt1].sh;
cnt1=(cnt1+)%;
flag1=;
}
if(flag0)
{
next1+=;
next0+=node[][cnt0].t;
}
if(flag1)
{
next1+=node[][cnt1].t;
next0+=;
}
if(flag0||flag1)
{ if(p1<=||p2<=)
{
break;
}
}
}
if((p1<=&&p2<=)||(p1==p2))
{
puts("DRAW");
}
else if(p1>p2)
{
printf("XsugarX %d\n",p1);
}
else if(p1<p2)
{
printf("temperlsyer %d\n",p2);
}
}
return ;
}

bnuoj 4207 台风(模拟题)的更多相关文章

  1. poj 1008:Maya Calendar(模拟题,玛雅日历转换)

    Maya Calendar Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 64795   Accepted: 19978 D ...

  2. poj 1888 Crossword Answers 模拟题

    Crossword Answers Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 869   Accepted: 405 D ...

  3. CodeForces - 427B (模拟题)

    Prison Transfer Time Limit: 1000MS   Memory Limit: 262144KB   64bit IO Format: %I64d & %I64u Sub ...

  4. sdut 2162:The Android University ACM Team Selection Contest(第二届山东省省赛原题,模拟题)

    The Android University ACM Team Selection Contest Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里 ...

  5. 全国信息学奥林匹克联赛 ( NOIP2014) 复赛 模拟题 Day1 长乐一中

    题目名称 正确答案  序列问题 长途旅行 英文名称 answer sequence travel 输入文件名 answer.in sequence.in travel.in 输出文件名 answer. ...

  6. UVALive 4222 Dance 模拟题

    Dance 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&pag ...

  7. cdoj 25 点球大战(penalty) 模拟题

    点球大战(penalty) Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/2 ...

  8. Educational Codeforces Round 2 A. Extract Numbers 模拟题

    A. Extract Numbers Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/600/pr ...

  9. URAL 2046 A - The First Day at School 模拟题

    A - The First Day at SchoolTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudg ...

随机推荐

  1. 数据字典系统,要的进来下载吧,MVC+Easyui写的

    数据字典系统,要的进来下载吧,以后做开发不用单独去生成一个数据字典了,直接打开此系统就OK啦 使用VS2012写的 语法是SQL 2005以上版本,包含2005的哦,2000的不适用此系统 字数不够啦 ...

  2. Oracle 学习笔记3:新建数据库没有scott用户解决办法

    新建一个数据库,若选择Oracle组件时,没有选择实例方案,完成后进行口令管理,默认列表中是找不到scott用户解锁的.若要解锁scott用户,可以进行如下操作: 使用system或者sys连接数据库 ...

  3. Chrome JS内存泄漏排查方法(Chrome Profiles)

     原文网址:http://blog.csdn.net/kaitiren/article/details/19974269 JS内存泄漏排查方法(Chrome Profiles)   Google Ch ...

  4. 在Linux下进行磁盘分区

      1.         分区前的规划   2.         查看本机上的磁盘信息   3.         对第二个磁盘进行交换式分区操作(输入m为帮助信息) 图 1:n为新建分区 图 2:p为 ...

  5. GIT Learning

    一.Why Git 1.1 Git是分布式的,本地的版本管理 chect out代码后会在自己的机器上克隆一个自己的版本库,即使你在没有网络的环境,你仍然能够提交文件,查看历史版本记录,创建项目分支, ...

  6. HDU1064 第一道JAVA

    简单的不能再简单的题目, 不过倒是可以来练练新学的JAVA.. import java.util.Scanner; public class Hello{ public static void mai ...

  7. hibernate get VS load

    1.  执行get方法:会立即加载对象      而执行load方法,若不适用该对象,则不会立即执行查询操作,而返回一个代理对象      get立即检索,load延迟检索  2.  load方法可能 ...

  8. 存储过程及Comm.cs类的创建

    2013-09-25 13:08:59 一.准备工作 首先创建一个数据库,如创建“试用期公务员管理”数据库:再创建一个Comm.cs类,添加代码如下: using System;using Syste ...

  9. ZigBee HA示例程序分析

    ZigBee协议栈中自带的HomeAutomation例程,虽然也是操作灯泡,但是,是通过ZCL来统一处理的,符合HA profile规范,互连互操作性较好.下面就简要分析以下ZCL的使用. 在任务数 ...

  10. linux 网桥的配置与实现

    ==================================================================================from: http://www.i ...