bnuoj 4207 台风(模拟题)
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 台风(模拟题)的更多相关文章
- poj 1008:Maya Calendar(模拟题,玛雅日历转换)
Maya Calendar Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 64795 Accepted: 19978 D ...
- poj 1888 Crossword Answers 模拟题
Crossword Answers Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 869 Accepted: 405 D ...
- CodeForces - 427B (模拟题)
Prison Transfer Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Sub ...
- sdut 2162:The Android University ACM Team Selection Contest(第二届山东省省赛原题,模拟题)
The Android University ACM Team Selection Contest Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里 ...
- 全国信息学奥林匹克联赛 ( NOIP2014) 复赛 模拟题 Day1 长乐一中
题目名称 正确答案 序列问题 长途旅行 英文名称 answer sequence travel 输入文件名 answer.in sequence.in travel.in 输出文件名 answer. ...
- UVALive 4222 Dance 模拟题
Dance 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&pag ...
- cdoj 25 点球大战(penalty) 模拟题
点球大战(penalty) Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/2 ...
- Educational Codeforces Round 2 A. Extract Numbers 模拟题
A. Extract Numbers Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/600/pr ...
- 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 ...
随机推荐
- linux两台服务无密通信
一台新linux需要做两台服务器无密通信. 首先ssh-kengen -t rsa(非对称算法) 回车 一路回车即可 #cd /root/.ssh #ssh-copy-id -i id_rsa.pub ...
- nodejs6-npm包管理工具
npm search:在官方仓库中搜索包https://registry.npmjs.org npm view:查看官方仓库中的包 npm install:在当前目录下安装指定包 npm instal ...
- aspcms中if判断语句的运用
1.<h3 {if:"[list:isrecommend]"="1"} style="color:red;"{end if}>& ...
- HTML之正则表达式
匹配国内电话号码:d{3}-d{8}|d{4}-d{7} 评注:匹配形式如 0511-4405222 或 021-87888822 匹配腾讯QQ号:[1-9][0-9]{4,} 评注:腾讯QQ号从10 ...
- x64、x86_64、x64三者的区别
x86是指intel的开发的一种32位指令集,从386开始时代开始的,一直沿用至今,是一种cisc指令集,所有intel早期的cpu,amd早期的cpu都支持这种指令集,ntel官方文档里面称为“IA ...
- sql server 修改列类型
如下代码中为修改bcp数据库中表B_TaskFileMonitor中的列FileSizeOriginal的类型为bigint use bcp; ); --判断是否存在这一列 IF COL_LENGTH ...
- (转)RabbitMQ消息队列(六):使用主题进行消息分发
在上篇文章RabbitMQ消息队列(五):Routing 消息路由 中,我们实现了一个简单的日志系统.Consumer可以监听不同severity的log.但是,这也是它之所以叫做简单日志系统的原因, ...
- 将n(0<=n<=10000)的阶乘分解质因数,求其中有多少个m
给定两个数m,n,其中m是一个素数. 将n(0<=n<=10000)的阶乘分解质因数,求其中有多少个m. 输入 第一行是一个整数s(0<s<=100),表示测试数据的组数 随后 ...
- Codevs 1078 ==Poj 1258 Agri-Net
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 53270 Accepted: 22140 Description D ...
- Codevs 1009 产生数
题目描述 Description 给出一个整数 n(n<10^30) 和 k 个变换规则(k<=15). 规则: 一位数可变换成另一个一位数: 规则的右部不能为零. 例如:n=234.有规 ...