hdu2149Public Sale 博弈水题

#include<iostream>

#include<cstdio>

#include<cstring>

using namespace std ;

int main()

{

int n , m;

while(~scanf("%d%d",&m , &n))

{

if((n >= m))

for(int i = m;i <= n ;i++)

printf("%d%c" , i , i==n?‘\n‘:‘ ‘);

else if(m%(n+1)) printf("%d\n" , m%(n+1)) ;

else printf("none\n") ;

}

return 0;

}

时间: 2024-10-25 18:57:18

hdu2149Public Sale 博弈水题的相关文章

hdu 1846 Brave Game (巴什博弈 最简单的博弈水题)

Brave Game Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6434    Accepted Submission(s): 4294 Problem Description 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫<勇敢者的游戏>(英文名称:Zathura),一直到现在,我依然对于电影中的部分

URAL 1023 Buttons(巴什博弈水题)

1023. Buttons Time limit: 2.0 secondMemory limit: 64 MB Background As you surely already know, Yekaterinburg has gotten its right to hold The Summer Olympic Games of the 2032. It is planned that it will be allowed to Russia as a country-organizer to

HDU 1846 Brave Game (博弈水题)

题意:中文...你们懂得. 析:这个就是一个水题博弈,就是一个巴什博弈定理,直接就没有变,如果你们看过我写的那个,这个题绝对水过. 附地址:http://www.cnblogs.com/dwtfukgv/p/5517818.html 看完后就懂了吧,不用说了,直接上代码就OK. 代码如下: #include <iostream> #include <string> #include <vector> #include <algorithm> #include

Sale(水题)

Sale Crawling in process... Crawling failed Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Description Once Bob got to a sale of old TV sets. There were n TV sets at that sale. TV set with index i costs ai

POJ百道水题列表

以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight Moves1101 Gamblers1204 Additive equations 1221 Risk1230 Legendary Pokemon1249 Pushing Boxes 1364 Machine Schedule1368 BOAT1406 Jungle Roads1411 Annive

Codeforces-C. Tanya and Toys(水题)

In Berland recently a new collection of toys went on sale. This collection consists of 109 types of toys, numbered with integers from 1 to109. A toy from the new collection of the i-th type costs i bourles. Tania has managed to collect n different ty

2015南阳CCPC L - Huatuo&#39;s Medicine 水题

L - Huatuo's Medicine Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 无 Description Huatuo was a famous doctor. He use identical bottles to carry the medicine. There are different types of medicine. Huatuo put medicines into the bottles and chain these b

sdut 2841 Bit Problem (水题)

题目 贴这个题是因为看题解有更简单的方法, 我做的时候是直接算的, 也很简单. 贴一下题解吧: 如果一个整数不等于 0,那么该整数的二进制表示中至少有一位是 1. 这个题结果可以直接输出 x - (x&(x-1)); 因为x-1 之后二进制下,就是最右边的1变成了0, 最右边的1的 右边所有的0变成了1, 不影响最左边. 我的代码: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4

sdut 2413:n a^o7 !(第三届山东省省赛原题,水题,字符串处理)

n a^o7 ! Time Limit: 1000MS Memory limit: 65536K 题目描述 All brave and intelligent fighters, next you will step into a distinctive battleground which is full of sweet and happiness. If you want to win the battle, you must do warm-up according to my inst