自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ACM

  • 博客(111)
  • 收藏
  • 关注

原创 hdu 2544

最短路Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 79390    Accepted Submission(s): 34417Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但...

2018-03-20 21:32:02 160

原创 poj3254 状压dp

Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 18234 Accepted: 9611DescriptionFarmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12)...

2018-03-17 16:51:35 159

原创 Pangu and Stones(区间dp)

时间限制:1000ms单点时限:1000ms内存限制:256MB描述In Chinese mythology, Pangu is the first living being and the creator of the sky and the earth. He woke up from an egg and split the egg into two parts: the sky and t...

2018-03-15 20:06:43 1402

原创 poj 2955 区间dp 2018-3-11

BracketsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10355 Accepted: 5508DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a reg...

2018-03-11 16:33:45 124

原创 石子合并 区间dp 2018-3-6

石子合并(一)时间限制:1000 ms  |  内存限制:65535 KB难度:3描述    有N堆石子排成一排,每堆石子有一定的数量。现要将N堆石子并成为一堆。合并的过程只能每次将相邻的两堆石子堆成一堆,每次合并花费的代价为这两堆石子的和,经过N-1次合并后成为一堆。求出总的代价最小值。有多组测试数据,输入到文件结束。每组测试数据第一行有一个整数n,表示有n堆石子。接下来的一行有n(0< ...

2018-03-06 18:54:54 140

原创 poj 3280

#include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #include<string> using namespace std; int n,m,dp[2009][2009...

2018-03-05 21:02:20 150

原创 poj 1163

# include <cstdio># include <cstdlib># include <cmath># include <cstring># include <string># include <iostream># include <iomanip># include <alg

2018-03-03 21:39:53 135

原创 ALDS1_7_C 2018-2-24

#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;const int MAX = 100005;const int NIL = -1;struct Node { int parent, left, r...

2018-02-24 21:06:51 161

原创 ALDS1_6_D 2018-2-24

#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;const int MAX = 5000;const int maxnum = 10010;bool V[MAX];int n, A[MAX], s;int...

2018-02-24 21:06:06 202

原创 ALDS1_5_D 2018-2-24

#include<iostream>#include<cstdio>using namespace std;const int MAX = 500000;const int maxnum = 1000000010;// 两个局部数组int L[MAX / 2 + 2], R[MAX / 2 + 2];int A[MAX], n;long long cnt ...

2018-02-24 21:05:25 166

原创 ALDS1_6_C 2018-2-24

#include<iostream>#include<cstdio>using namespace std;const int MAX = 100000;const int maxnum = 1000000010;struct Card { char suit; int value;};Card L[MAX / 2 + 2], R[MAX ...

2018-02-24 16:23:10 177

原创 ALDS1_6_B 2018-2-24

#include<iostream>#include<cstdio>#include<algorithm>using namespace std;const int MAX = 500000;int A[MAX], n;// 分割int partition(int p, int r) { int x = A[r]; int i =...

2018-02-24 16:22:32 163

原创 POJ3617 2018-2-24

# include <cstdio># include <cstdlib># include <cmath># include <cstring># include <string># include <iostream># include <iomanip># include <alg

2018-02-24 14:42:34 135

原创 ALDS1_5_C 2018-2-23

#include<iostream>#include<cstdio>#include<cmath>using namespace std;const double PI = acos(-1.0);struct Point{ double x,y;};void koch(int n, Point a, Point b) { // ...

2018-02-23 19:50:24 155

原创 ALDS1_7_A 2018-2-23

#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;const int MAX = 100005;const int NIL = -1;struct Node { int p, l, r;};Nod...

2018-02-23 17:59:48 135

原创 ALDS1_5_C 2018-2-23

#include<iostream>#include<cstdio>#include<cmath>using namespace std;const double PI = acos(-1.0);struct Point{ double x,y;};void koch(int n, Point a, Point b) { if ...

2018-02-23 10:56:58 119

原创 ALDS1_6_A 2018-2-22

#include<iostream>#include<cstdio>#include<algorithm>using namespace std;const int maxx = 2000001;const int maxnum = 10010;int A[maxx], B[maxx];int C[maxnum];int main() { ...

2018-02-22 21:07:03 127

原创 ALDS1_5_B 2018-2-22

#include<iostream>#include<cstdio>using namespace std;const int MAX = 500000;const int maxnum = 1000000010;int L[MAX / 2 + 2], R[MAX / 2 + 2];int A[MAX], n;int cnt = 0;void merge...

2018-02-22 21:05:54 144

原创 ALDS1_5_A 2018-2-22

#include<iostream>#include<cstdio>using namespace std;int n, A[30];bool solve(int i, int m) { if (m == 0) return true; if (i >= n) return false; return...

2018-02-22 21:04:51 224

原创 ALDS1_4_D 2018-2-22

#include<iostream>#include<cstdio>#include<cstring>using namespace std;typedef long long LL;LL A[100000 + 10];int n, k;//模拟装货过程bool check(LL P) { int cnt = k; for (in...

2018-02-22 17:04:10 232

原创 ALDS1_4_C 2018-2-22

#include<iostream>#include<cstdio>#include<cstring>using namespace std;typedef long long LL;const LL maxx = 1000000 + 10;char H[maxx][15];LL CharToInt(char ch) { if (ch =...

2018-02-22 12:50:42 105

原创 迷宫最短路 2108-2-222

#include"queue" #include"cstring" using namespace std; typedef pair<int,int> P; int N,M; char mz[105][105]; int mark[105][105]; int ans=0; int dx[]={-1,1,0,0}; int dy[]={0,0,-1...

2018-02-22 10:56:57 115

原创 ALDS1_4_B 2018-2-21

#include<iostream>#include<cstdio>#include<algorithm>using namespace std;int main() { int n, q, key; int sum = 0; int A[100000 + 10]; scanf("%d", &n); for...

2018-02-21 20:32:51 174

原创 ALDS1_4_A 2018-2-21

#include<iostream>#include<cstdio>using namespace std;bool LinearSearch(int A[], int n, int key) { A[n] = key; int i = 0; while (A[i] != key) i++; return i != n...

2018-02-21 20:32:02 129

原创 ALDS1_3_D 2018-2-21

#include<iostream>#include<cstdio>#include<cstring>#include<vector>#include<stack>#include<algorithm>using namespace std;int main() { stack<int> S

2018-02-21 20:30:33 251

原创 ALDS1_3_C 2018-2-21

#include<iostream>#include<cstdio>#include<cstring>#include<list>using namespace std;int main() { int n, key; char op[20]; list<int> List; scanf("%d...

2018-02-21 16:36:11 215

原创 ALDS1_3_B 2018-2-21

#include<iostream>#include<cstdio>#include<algorithm>#include<queue>using namespace std;const int maxx = 100000 + 10;struct task { char name[100]; int t;};queu...

2018-02-21 13:41:47 185

原创 ALDS1_3_A 2018-2-21

#include<iostream>#include<cstdio>#include<stack>using namespace std;int CharToInt(char s[]) { int ans = 0, i = 0; while (s[i] != '\0') { ans = ans * 10 + s[i] -...

2018-02-21 10:52:27 178

原创 ALDS1_2_D 2018-2-19

#include<iostream>#include<cstdio>#include<vector>using namespace std;vector<int>G;long long cnt;int A[1000000 + 10];void insertionSort(int A[], int n, int g) { fo...

2018-02-19 22:31:03 174

原创 ALDS1_2_C 2018-2-19

#include<iostream>#include<cstdio>#include<cmath>using namespace std;struct Card { char suit, value;};void bubble(struct Card A[], int n) { int flag = 1; for (in...

2018-02-19 22:07:53 171

原创 ALDS1_2_A 2018-2-19

#include<iostream>#include<cstdio>#include<cmath>using namespace std;int bubbleSort(int A[], int n) { int cnt = 0; int flag = 1; for (int i = 0; flag; i++) { ...

2018-02-19 16:47:37 148

原创 ALDS1_2_A 2018-2-19

#include<iostream>#include<cstdio>#include<cmath>using namespace std;int bubbleSort(int A[], int n) { int cnt = 0; int flag = 1; for (int i = 0; flag; i++) { ...

2018-02-19 16:42:24 86

原创 ALDS1_1_A 2018-2-19

#include<iostream>#include<cstdio>#include<cmath>using namespace std;void print(int A[],int n) { for (int i = 0; i < n; i++) printf("%d%c", A[i], i == n - 1 ? '\n...

2018-02-19 16:16:49 187

原创 ald1_1_d 2018-2-19

#include<iostream>#include<cstdio>#include<cmath>using namespace std;int main() { int n, t; int maxx, minn; scanf("%d", &n); scanf("%d", &t); maxx = ...

2018-02-19 12:55:18 134

原创 hdu 4489 2018-2-14

#include<cstdio> #include<cstring> #include<cmath> #include<algorithm> #include<cstdlib> #include<cctype> #include<map> #include<set&

2018-02-14 12:23:12 218

原创 hihocoder 2018-2-13

描述且说上一周的故事里,小Hi和小Ho费劲心思终于拿到了茫茫多的奖券!而现在,终于到了小Ho领取奖励的时刻了!小Ho现在手上有M张奖券,而奖品区有N件奖品,分别标号为1到N,其中第i件奖品需要need(i)张奖券进行兑换,同时也只能兑换一次,为了使得辛苦得到的奖券不白白浪费,小Ho给每件奖品都评了分,其中第i件奖品的评分值为value(i),表示他对这件奖品的喜好值。现在他想知道,凭借他手上的这些...

2018-02-13 19:31:41 120

原创 DPL_1_A

#include <iostream>#include <algorithm>#include <cstdio>using namespace std;const int INF = 1 << 30;int main() { int n, m; int A[100]; int T[50000 + 10]; s...

2018-02-13 16:54:14 223

原创 DPL_1_B 2018-2-13

#include <iostream>#include <algorithm>#include <cstdio>#include <cstring>using namespace std;const int INF = 1 << 30;const int maxx = 10010;int dp[maxx], s[maxx]...

2018-02-13 16:53:35 161

原创 最长单增子序列 2018-2-12

最长单增子序列(LIS Longest Increasing Subsequence)给定一个数列,从中删掉任意若干项剩余的序列叫做它的一个子序列,求它的最长的子序列,满足子序列中的元素是单调递增的。输入第1行:1个数N,N为序列的长度(2 <= N <= 50000)第2 - N + 1行:每行1个数,对应序列的元素(-10^9 <= S[i] <= 10^9)输出 输...

2018-02-12 22:23:46 215

原创 划分数 2018-2-12

 题目描述积 极探索太空的回报是丰厚的,因为魔法世界的科学家后来通过挖掘史前文明遗址发现,他们所在的星球,每隔一亿五千万年左右就会发生一次由天外陨石或其他意外 事件引发的物种大灭绝。称霸星球一亿多年的恐龙,就是因此而灭绝的。只有积极进取,锐意创新的宇宙文明,才有可能躲过这场“天罚”。现在,天顶星人对魔法 世界发动了大规模陨石攻击,魔法世界的太空防御系统及时作出反应,将防御能量n分成k份以对付k个陨...

2018-02-12 21:44:19 302

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除