码迷,mamicode.com
首页 >  
搜索关键字:nyoj 663 弟弟的作业    ( 1829个结果
NYOJ---题目733万圣节派对
万圣节派对 时间限制:1000 ms  |  内存限制:65535 KB 难度:1 描述 万圣节有一个Party,XadillaX显然也要去凑热闹了。因为去凑热闹的人数非常庞大,几十W的数量级吧,自然要进场就需要有门票了。很幸运的,XadillaX竟然拿到了一张真·门票!这真·门票的排列规则有些奇怪: 门票号是由0~6组成的六位数(0~6这几个数字可重用) ...
分类:其他好文   时间:2015-03-22 10:39:38    阅读次数:389
nyoj 苹果(01背包)
裸题 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 #include11 #include12 #include13 #include14 #i...
分类:移动开发   时间:2015-03-22 10:36:48    阅读次数:160
nyoj 01串(dp)
开始做DP。。第n位为0时,dp[n] = dp[n-1]第n位为1时,dp[n] =dp[n-2]得公式dp[n] = dp[n-1] + dp[n-2]; 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #i...
分类:其他好文   时间:2015-03-22 10:31:58    阅读次数:171
NYOJ 1058 部分和问题(经典题目dfs)
部分和问题描述 给定整数a1、a2、…….an,判断是否可以从中选出若干数,使它们的和恰好为K。输入 首先,n和k,n表示数的个数,k表示数的和。 接着一行n个数。 (1<=n<=20,保证不超int范围) 输出 如果和恰好可以为k,输出“YES”,并按输入顺序依次输出是由哪几个数的和组成,否则“NO” 样例输入4 13 1 2 4 7 样例输出...
分类:其他好文   时间:2015-03-21 22:58:45    阅读次数:231
NYOJ 891 找点
找点时间限制:2000ms | 内存限制:65535KB难度:2描写叙述上数学课时,老师给了LYH一些闭区间,让他取尽量少的点,使得每一个闭区间内至少有一个点。可是这几天LYH太忙了,你们帮帮他吗?输入多组測试数据。每组数据先输入一个N,表示有N个闭区间(N≤100)。接下来N行,每行输入两个数a,...
分类:其他好文   时间:2015-03-21 12:37:32    阅读次数:130
NYOJ 284 坦克大战 && POJ 2312 Battle City (广搜+优先队列)
链接:click here~~ 题意: 描述 Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now.  What we are discussing is a simple edition...
分类:其他好文   时间:2015-03-20 23:52:07    阅读次数:452
nyoj 73 比大小
比大小时间限制:3000ms | 内存限制:65535KB难度:2描述给你两个很大的数,你能不能判断出他们两个数的大小呢?比如123456789123456789要大于-123456输入每组测试数据占一行,输入两个不超过1000位的10进制整数a,b数据保证输入的a,b没有前缀的0。如果输入0 0表...
分类:其他好文   时间:2015-03-20 20:11:02    阅读次数:175
NYOJ---题目94cigarettes
cigarettes 时间限制:3000 ms  |  内存限制:65535 KB 难度:2 描述 Tom has many cigarettes. We hypothesized that he has n cigarettes and smokes them one by one keeping all the butts. Out of k > 1 butts he ca...
分类:其他好文   时间:2015-03-19 22:14:10    阅读次数:132
NYOJ---题目204Coin Test
Coin Test 时间限制:3000 ms  |  内存限制:65535 KB 难度:1 描述 As is known to all,if you throw a coin up and let it droped on the desk there are usually three results. Yes,just believe what I say ~it can be...
分类:其他好文   时间:2015-03-19 22:12:27    阅读次数:111
NYOJ 93 汉诺塔(三) 【栈的简单应用】
汉诺塔(三) 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述 在印度,有这么一个古老的传说:在世界中心贝拿勒斯(在印度北部)的圣庙里,一块黄铜板上插着三根宝石针。印度教的主神梵天在创造世界的时候,在其中一根针上从下到上地穿好了由大到小的64片金片,这就是所谓的汉诺塔。不论白天黑夜,总有一个僧侣在按照下面的法则移动这些金片:一次只移动一片...
分类:其他好文   时间:2015-03-18 20:33:45    阅读次数:176
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!