码迷,mamicode.com
首页 >  
搜索关键字:zoj 3456    ( 3447个结果
ZOJ 2532 Internship
InternshipTime Limit: 5000msMemory Limit: 32768KBThis problem will be judged on ZJU. Original ID: 2532 64-bit integer IO format: %lld Ja...
分类:其他好文   时间:2015-03-14 19:50:28    阅读次数:153
ZOJ 3471 Most Powerful(状压dp)
Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and a lot of power ...
分类:其他好文   时间:2015-03-14 11:04:05    阅读次数:122
ZOJ 1136 Mutiple _BFS(同余定理判重)
1 #include 2 #include 3 #include 4 #include 5 #include 6 #define sc(x) scanf("%d",&x) 7 #define pf(x) printf("%d\n",x) 8 #define P printf("\n") ...
分类:其他好文   时间:2015-03-13 22:04:06    阅读次数:131
zoj 2921 Stock(贪心)
Optiver sponsored problem. After years of hard work Optiver has developed a mathematical model that allows them to predict wether or not a company will be succesful. This obviously gives them a grea...
分类:其他好文   时间:2015-03-13 12:44:34    阅读次数:205
[数位dp+二分] zoj Generalized Palindromic Number
题意: 找一个小于N的最大的且符合题意的数。 题意的数为,通过缩减后是回文的数,所谓的缩减就是相同连续的数看做一个数,如“155451111”其实就是“15451”是符合题意的数。 思路: 通过数位dp,然后二分求解。 dp[i][j][k]代表第i位,已经放了j个数,最后长度是k的缩减回文数有几个。 然后需要一个ok[]数组代表放的数是什么,如果连续放相同的数就等于没放数。 遍历所...
分类:其他好文   时间:2015-03-11 19:45:12    阅读次数:140
ZOJ-3770(Ranking System)
Few weeks ago, a famous software company has upgraded its instant messaging software. A ranking system was released for user groups. Each member of a group has a level placed near his nickname. The le...
分类:其他好文   时间:2015-03-11 17:14:04    阅读次数:196
Stock (zoj 2921 贪心经典)
题意:有n张股票,给出每天股票的买进数量,当天的股票价格和当天最大抛出量,第i天得到的股票当天可以不抛,可以留到以后抛。问这n天最多能卖多少钱? 思路:贪心,从后往前贪心,最后一天的股票当然只能在最后一天卖出,第i天的可以在第i天及以后卖出,那么就可以维护一个优先队列来存放第i天及以后的天数中抛出量不为零的日期(价格高的优先),那抛出第i天时先从优先队列中取出价格最高的。...
分类:其他好文   时间:2015-03-10 12:18:11    阅读次数:128
ZOJ Friends(暴力)
Alice lives in the country where people like to make friends. The friendship is bidirectional and if any two person have no less than k friends in common, they will become friends in several days. Cu...
分类:其他好文   时间:2015-03-09 09:24:37    阅读次数:199
ZOJ 2794 Just Pour the Water 【矩阵快速幂】
给你n个杯子,每次有特定的到水规则,倒m次请问最后每个被子里还有多少水我们很容易发现每次变化的规则相同,那么可以set 一个矩阵存放然后多次倒水就相当于矩阵相乘,在m 范围达到(1#include #include #include #include #include #include #inclu...
分类:其他好文   时间:2015-03-08 21:30:13    阅读次数:148
zoj 3629 Treasure Hunt IV 打表找规律
H - Treasure Hunt IV Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluDescription Alice is exploring the wonderland, suddenly she f.....
分类:其他好文   时间:2015-03-07 15:22:29    阅读次数:125
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!