Fang Fang Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5455 Description Fang Fang says she wants to be remembered.I promise her. We define the sequence F of strings.F0 = ‘‘f",F1 = ‘‘ff",F2 = ‘‘cff",F…
Til the Cows Come Home Time Limit: 1000MS Memory Limit: 65536K http://poj.org/problem?id=2387 Description Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morni…
Problem 1147 Tiling Time Limit: 1000 mSec Memory Limit : 32768 KB http://acm.fzu.edu.cn/problem.php?pid=1147 Problem Description In how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles? Here is a sample tiling of a 2x17 rectangle. Input I…
Calculation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1414 Accepted Submission(s): 291 Problem Description Assume that f(0) = 1 and 0^0=1. f(n) = (n%10)^f(n/10) for all n bigger than ze…
之前在2.6系列linux内核中,当发现某个模块不要在保留内核中加载的时候,可以通过blacklist参数将其在/etc/kdump.conf中屏蔽 blacklist <list of kernel modules> 最近发现某个sas驱动存在问题,所以打算也这么屏蔽,结果,出错了: [root@localhost ~]# service kdump restart Redirecting to /bin/systemctl restart kdump.service Job for kdu…
传送门 费用流sb题. 直接从sss向每个点连边,容量为现有物品量. 然后从ttt向每个点连边,容量为最后库存量. 由于两个点之间可以互相任意运送物品,因此相邻的直接连infinfinf的边就行了. 代码: #include<bits/stdc++.h> #define N 205 #define M 50005 using namespace std; inline int read(){ int ans=0; char ch=getchar(); while(!isdigit(ch))ch…
传送门 费用流水题. 依然是照着题意模拟建边就行了. 为了练板子又重新写了一遍费用流. 代码: #include<bits/stdc++.h> #define N 305 #define M 90005 using namespace std; inline int read(){ int ans=0; char ch=getchar(); while(!isdigit(ch))ch=getchar(); while(isdigit(ch))ans=(ans<<3)+(ans<…
传送门 费用流入门题. 直接按照题意模拟. 把货物的数量当做容量建边. 然后跑一次最小费用流和最大费用流就行了. 代码: #include<bits/stdc++.h> #define N 305 #define M 90005 using namespace std; inline int read(){ int ans=0; char ch=getchar(); while(!isdigit(ch))ch=getchar(); while(isdigit(ch))ans=(ans<&…
题意:给定 n 个区间,让你进行合并,问你最后的区间是,如果是空集,输出 false 如果区间是是 [-32768,32767] ,则是true. 析:进行区间合并,要注意,如果是 x >= 0 && x <= 32767 那么输出是 x >= 0,在这地方,真是错死了......后来看了数据才知道有这个,其他的就是进行区间合并,如果第 i 个和第 j 个区间合并时,假设 x >= a && x <= b || x >= c &…
Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow line, until it is his/her turn to be served and ther…