上一页 1 2 3 4 5 6 7 8 ··· 24 下一页
摘要: #include #include #include #include #include using namespace std; const int N=15; int n; double a[N][N]; int main() { scanf("%d",&n); ++n; for(int i=1;i<=n;++i) { for(int j... 阅读全文
posted @ 2018-09-12 11:21 whymhe 阅读(100) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int N=15; int n; double a[N][N]; int main() { scanf("%d",&n); ++n; for(int i=1;i<=n;++i) { for(int j... 阅读全文
posted @ 2018-09-12 11:21 whymhe 阅读(95) 评论(0) 推荐(0) 编辑
摘要: /************************************************************** Problem: 1011 User: whymhe Language: C++ Result: Accepted Time:1824 ms Memory:2852 kb *************************... 阅读全文
posted @ 2018-09-12 11:20 whymhe 阅读(130) 评论(0) 推荐(0) 编辑
摘要: //Pro: 1010: [HNOI2008]玩具装箱toy //因为费用为(X-L)^2,所以我们要让X尽量接近L //对于那些c[]>=L的玩具,显然(列式子算一下)一个玩具一个容器最优 //好的不用分开找规律... //斜率优化DP #include #include #include #include #include using namespace std; typedef ... 阅读全文
posted @ 2018-09-12 11:19 whymhe 阅读(151) 评论(0) 推荐(0) 编辑
摘要: /************************************************************** Problem: 1008 User: whymhe Language: C++ Result: Accepted Time:80 ms Memory:1288 kb ***************************... 阅读全文
posted @ 2018-09-12 11:18 whymhe 阅读(149) 评论(1) 推荐(0) 编辑
摘要: //因为要求的是从上方看下来可以看到的直线 //画一下图可以发现能看见的是上边的一个下凸壳 //然后就单调栈维护一下斜率就好了 #include #include #include #include using namespace std; const int N=5e4+5; int n; struct LINE { double a,b; int id; }l[N]... 阅读全文
posted @ 2018-09-12 11:16 whymhe 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; typedef long long LL; inline int read() { char c=getchar();int num=0;bool f=1; for(;!isdigit(c);c=getchar()) f=c=='... 阅读全文
posted @ 2018-09-12 11:15 whymhe 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int N=65; int Sr,Sb,Sg,m,p; int fac[N],ifac[N]; int ksm(int x,int k) { int res=1; while(k) { if(k&1) ... 阅读全文
posted @ 2018-09-12 11:14 whymhe 阅读(223) 评论(0) 推荐(0) 编辑
摘要: //Pro: 1003: [ZJOI2006]物流运输 //cost[i][j]表示第i天到第j天的最短路长度 //f[i]表示前i天的最小花费 //f[i]=min(f[j-1]+cost[j][i]*(i-j+1)+k) ,j #include #include #include #include #include using namespace std; inline int rea... 阅读全文
posted @ 2018-09-12 11:13 whymhe 阅读(226) 评论(0) 推荐(0) 编辑
摘要: /************************************************************** Problem: 1001 User: whymhe Language: C++ Result: Accepted Time:1236 ms Memory:106760 kb ***********************... 阅读全文
posted @ 2018-09-12 11:12 whymhe 阅读(217) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 24 下一页