码迷,mamicode.com
首页 >  
搜索关键字:iostream    ( 13291个结果
YT14-HDU-洗牌的规律
Problem Description Eddy是个ACMer,他不仅喜欢做ACM题,而且对于纸牌也有一定的研究,他在无聊时研究发现,如果他有2N张牌,编号为1,2,3..n,n+1,..2n。这也是最初的牌的顺序。通过一次洗牌可以把牌的序列变为n+1,1,n+2,2,n+3,3,n+4,4..2n,n。那么可以证明,对于任意自然数N,都可以在经过M次洗牌后第一次重新得到初始的顺序。编程对于...
分类:其他好文   时间:2015-02-06 09:37:50    阅读次数:117
YT14-HDU-盒子与瓷砖
Problem Description There is a large room in the Pyramid called Room-of-No-Return. Its floor is covered by rectangular tiles of equal size. The name of the room was chosen because of the very high ...
分类:其他好文   时间:2015-02-06 09:36:59    阅读次数:185
YT14-HDU-叠加的卡片
Problem Description How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be per...
分类:其他好文   时间:2015-02-06 09:36:23    阅读次数:130
YT14-HDU-Eddy的彩票
Problem Description Eddy's company publishes a kind of lottery.This set of lottery which are numbered 1 to n, and a set of one of each is required for a prize .With one number per lottery, how many...
分类:其他好文   时间:2015-02-06 09:35:12    阅读次数:140
YT14-HDU-取余
Problem Description As we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to calculate A mod B. To make the problem easie...
分类:其他好文   时间:2015-02-06 09:34:56    阅读次数:132
YT14-HDU-圆桌会议
Problem Description HDU ACM集训队的队员在暑假集训时经常要讨论自己在做题中遇到的问题.每当面临自己解决不了的问题时,他们就会围坐在一张圆形的桌子旁进行交流,经过大家的讨论后一般没有解决不了的问题,这也只有HDU ACM集训队特有的圆桌会议,有一天你也可以进来体会一下哦:),在一天在讨论的时候,Eddy想出了一个极为古怪的想法,如果他们在每一分钟内,一对相邻的两个ACM队...
分类:其他好文   时间:2015-02-05 23:30:49    阅读次数:336
一道简单 dp
//CodeForces 132C 1 #include"iostream" 2 #include"cstdio" 3 #include"cstring" 4 #include"algorithm" 5 using namespace std; //状态可达dp,其实 bool dp[110]...
分类:其他好文   时间:2015-02-05 20:20:56    阅读次数:298
C++ 虚继承
虚继承是一种机制,类通过虚继承指出它希望共享其虚基类的状态,在虚继承下,对给定虚基类,无论该类在派生层次中作为虚基类出现多少次,只继承一个共享的基类子对象,共享的基类子对象称为虚基类。举例:istream和ostream类对它们的基类进行虚继承,通过使基类成为虚基类,istream和ostream指定,如果其他类(如iostream)同时继承它们两个,则派生类中只出现它们的公共基类的一个副本。可以...
分类:编程语言   时间:2015-02-05 09:31:28    阅读次数:120
链表逆序(每N个一组)
#include?<iostream> using?namespace?std; struct?Node{ int data; Node*? next; }; Node*?makeLinkedList(int?n) { Node*?allNode?=?new?Node[n]; for(int?i?=?0;?i?<?n;?i++) { a...
分类:其他好文   时间:2015-02-03 19:50:03    阅读次数:176
YT14-HDU-被侵蚀的土地
Problem Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actua...
分类:其他好文   时间:2015-02-03 11:16:24    阅读次数:155
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!