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
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
给你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
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
题意:给出一个图,求三点的连起来的距离。
分析:分别求出三点中任意两点的距离 / 2 = ans
AC代码:
#include
#include
#include
#include
using namespace std;
#define N 50010
#define M...
分类:
其他好文 时间:
2014-11-06 20:09:26
阅读次数:
129
??
唉!先直接上源代码吧!什么时候有时间的再来加说明!
#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
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1004题目大意:给你个栈,给你源串和目标串,按字典序输出符合要求的进站出站序列。就是搜搜搜呗。。。带上答案和模拟的栈。。代码: 1 #include 2 #incl....
分类:
其他好文 时间:
2014-11-06 01:56:04
阅读次数:
125
题目链接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
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