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. iOS 通过tag查找控件

    //比如创建一个UIImageView到view上 UIImageView *imageView = [[UIImageView allc] init]; imageView.tag = 10001; ...

  2. Part 12 Angularjs filter by multiple properties

    In the example below, we are using multiple search textboxes. As you type in the "Search name&q ...

  3. jquery设置div,文本框 表单的值示例

    我们将使用前一章中的三个相同的方法来设置内容: text() - 设置或返回所选元素的文本内容html() - 设置或返回所选元素的内容(包括 HTML标记)val() - 设置或返回表单字段的值 1 ...

  4. 64位系统下注册32位dll文件

    64位系统下注册32位dll文件 在64位系统里注册32位软件所需的一些dll会提示不兼容,大概因为32 位进程不能加载64位Dll,64位进程也不可以加载32的导致. 若要支持的32 位和64 位C ...

  5. Cocos2d-JS特效

    Cocos2d-JS提供了很多特效,这些特效事实上属于间隔动作,特效类cc.GridAction类,也称为网格动作,它的类图如下图所示. 网格动作类图 网格动作cc.GridAction它有两个主要的 ...

  6. hdu 2176 取(m)石子游戏

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2176 题意分析:给出M堆石子,两人交替取子,给出先手能否胜利. 不能输出No, 能则输出Yes并给出第 ...

  7. 【leetcode】13. Roman to Integer

    题目描述: Given a roman numeral, convert it to an integer. 解题分析: 这道题只要百度一下转换的规则,然后着这解释写代码即可.实现上并没有什么难度,直 ...

  8. Spring里用@RequestParam接受Date类型的url参数

    首先引入joda-time包.maven的dependency: <dependency> <groupId>joda-time</groupId> <art ...

  9. HDU 2571

    设 d[ i ][ j ] 表示走到坐标为(i, j)的格子时最大的幸运值.初始化:dp[i][j]的第0行和第0列初始化为负的无穷大... #include <stdio.h> #inc ...

  10. 全排列算法(字典序法、SJT Algorithm 、Heap's Algorithm)

    一.字典序法 1) 从序列P的右端开始向左扫描,直至找到第一个比其右边数字小的数字,即. 2) 从右边找出所有比大的数中最小的数字,即. 3) 交换与. 4) 将右边的序列翻转,即可得到字典序的下一个 ...