码迷,mamicode.com
首页 >  
搜索关键字:zoj 3456    ( 3447个结果
ZOJ 3365 Integer Numbers
Integer NumbersTime Limit: 1000msMemory Limit: 32768KBThis problem will be judged onZJU. Original ID:336564-bit integer IO format:%lld Java class name...
分类:其他好文   时间:2014-11-08 12:00:15    阅读次数:187
zoj 3497 Mistwald
Mistwald Time Limit: 2 Seconds      Memory Limit: 65536 KB In chapter 4 of the game Trails in the Sky SC, Estelle Bright and her friends are crossing Mistwald to meet their final enemy, Lucciola...
分类:其他好文   时间:2014-11-07 20:56:09    阅读次数:225
ZOJ 3233 Lucky Number 容斥
给你a数组和b数组 求x到y之间有多少个数至少被a中一个数整除并且至少不被b中一个数整除 容斥第一问很简单 第二问可以考虑反面 设满足被a中至少一个数整除的数有sum1个  在被a中至少一个数整除的前提下 被b中所有数整除的数有sum2 答案就是sum1-sum2 在dfs的时候溢出了 借鉴了某大牛的方法 #include #include using namespace std;...
分类:其他好文   时间:2014-11-07 20:53:02    阅读次数:169
ZOJ 3556 How Many Sets I 二项式+容斥
n个元素的子集有2^n个 求从这些子集选出k个组成有序集 并且有序集的交集为空的方案数 总数为2^n^k 减去不符合的 不符合的为交集存在1个共同元素 存在2个共同元素.... 2^n^k-C(n, 1)*2^(n-1)^k+C(n, 2)*2^(n-2)^k....  (2^k-1)^n #include #include using namespace std; typedef ...
分类:其他好文   时间:2014-11-07 17:01:40    阅读次数:251
ZOJ Problem Set - 3195 Design the city 【Tarjan离线LCA】
题目:ZOJ Problem Set - 3195 Design the city 题意:给出一个图,求三点的连起来的距离。 分析:分别求出三点中任意两点的距离 / 2  = ans AC代码: #include #include #include #include using namespace std; #define N 50010 #define M...
分类:其他好文   时间:2014-11-06 20:09:26    阅读次数:129
ZOJ-2091-Mean of Subsequence (反证法的运用!!)
贪心算法应用!反证法证明!!...
分类:其他好文   时间:2014-11-06 17:40:21    阅读次数:162
ZOJ Problem Set - 1004-Anagrams by Stack
?? 唉!先直接上源代码吧!什么时候有时间的再来加说明! #include #include #include #include #include #include using namespace std; /* *i代表PUSH,o代表POP */ bool judge(deque sou,deque des,vector & res) { stack inistack; for(ve...
分类:其他好文   时间:2014-11-06 14:59:49    阅读次数:126
[ZOJ 1004] Anagrams by Stack (简单搜索)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1004题目大意:给你个栈,给你源串和目标串,按字典序输出符合要求的进站出站序列。就是搜搜搜呗。。。带上答案和模拟的栈。。代码: 1 #include 2 #incl....
分类:其他好文   时间:2014-11-06 01:56:04    阅读次数:125
zoj 3640 Help Me Escape (概率dp 递归求期望)
题目链接Help Me EscapeTime Limit:2 Seconds Memory Limit:32768 KBBackgroundIf thou doest well, shalt thou not be accepted? and if thou doest not well, sin ...
分类:其他好文   时间:2014-11-05 22:59:07    阅读次数:179
zoj 3538 Arrange the Schedule(矩阵快速幂)
Arrange the Schedule Time Limit: 1 Second      Memory Limit: 65536 KB In Summer 2011, the ZJU-ICPC Team has a n-days training schedule. ZJU-ICPC Team has been divided into 4 Group: Akiba, BiliBi...
分类:其他好文   时间:2014-11-05 21:37:51    阅读次数:284
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!