题目链接:点击打开链
#include
#include
#include
using namespace std;
typedef long long ll;
vector s;
int main() {
int n, k;
while (~scanf("%d%d", &n, &k)) {
s.clear();
int sum = 0, cnt = 0;
for(int ...
分类:
其他好文 时间:
2014-10-30 13:31:37
阅读次数:
228
题意:求fibonacci数列第n项 1 #include "iostream" 2 #include "vector" 3 #include "cstring" 4 using namespace std; 5 6 typedef unsigned long int ULL; 7 typedef....
分类:
其他好文 时间:
2014-10-30 13:29:54
阅读次数:
246
using System; using System.Collections.Generic; using System.Windows.Forms; using System.IO; namespace GobalException { static class Program { /// ...
1 #include "iostream" 2 #include "vector" 3 #include "cstring" 4 using namespace std; 5 6 typedef unsigned long int ULL; 7 typedef vector vec; 8 typ.....
分类:
其他好文 时间:
2014-10-30 13:21:07
阅读次数:
199
http://acm.hdu.edu.cn/showproblem.php?pid=1026记录bfs路径,用一个数组记录next前驱的方向,然后递归的时候减回去即可#include #include #include #include using namespace std ;const int ...
分类:
其他好文 时间:
2014-10-30 11:39:37
阅读次数:
122
http://acm.hdu.edu.cn/showproblem.php?pid=1080二维最长公共子序列#include #include #include using namespace std ;char s1[105],s2[105];int tab[5][5]={{5,-1,-2,-1...
分类:
其他好文 时间:
2014-10-30 11:37:57
阅读次数:
162
题意:有n的边, S到第一个点连 最后一个点到T连 那么很明显n*oo-最小割就是答案。。 但是如果有了限制条件xu的边,使得方案合法。。code: 1 #include 2 using namespace std; 3 #define M0(a) memset(a, 0, si...
分类:
其他好文 时间:
2014-10-30 11:17:54
阅读次数:
155
#include#includeusing namespace std;/*** 找到链表中的倒数第k个节点*///定义结构体typedef struct Node{ int val; Node* next;} Node;//创建链表Node* createNode(){ int ...
分类:
其他好文 时间:
2014-10-30 10:48:43
阅读次数:
197
题目:给你一组数据{ b1,b2,...,bk }中,判断是否任意两个数字的和都不同。
分析:数论。计算出所有结果,排序判断相邻结果是否相同即可。
说明:500题(⊙_⊙)。
#include
#include
#include
using namespace std;
int data[111];
int sum[5555];
int main()
{
int n,T = 1...
分类:
其他好文 时间:
2014-10-30 01:47:38
阅读次数:
321
贪心做过去,先对每个时间的左边点进行排序,然后乱搞,当然线段树也可以做/*ID: jusonal1PROG: milk2LANG: C++*/#include #include #include #include #include #include #include using namespace ...
分类:
其他好文 时间:
2014-10-30 01:46:13
阅读次数:
198