DP
文章平均质量分 69
Achanss
My life is good, and u just make it better!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
*max_element(start, end)可用于一维数组或多维数组 附带简易DP
示例代码: #include<iostream> #include<cstring> #include<cmath> #include<algorithm> using namespace std; int tree[1001]; int dp[1001][31]; int main(void) { int T,W; whi...原创 2017-12-02 18:23:00 · 1209 阅读 · 0 评论 -
CodeForce 1072-B. Curiosity Has No Limits(递推)
CodeForce 1072-B. Curiosity Has No Limits 题目链接 题目大意: 给出两个数组a,b长度均为n-1 问能否构造出长度为n的t数组,满足 1、a[i] = t[i] | t[i+1] 2、b[i] = t[i] &amp;amp; t[i+1] 解题思路: 对所有情况枚举输出可以发现对应于一个确定的t[i]和a[i],b[i] t[i+1]的值要么存在且唯一,要么不存...原创 2018-10-22 20:19:33 · 447 阅读 · 0 评论 -
UPC——2789: Selling CPUs(DP)
2789: Selling CPUs 传送门 时间限制: 1 Sec 内存限制: 64 MB 提交: 164 解决: 58 [提交] [状态] [讨论版] [命题人:admin] 题目描述 You are very happy, that you got a job at ACME Corporation’s CPU factory. After a hard month of ...原创 2018-10-05 21:09:16 · 477 阅读 · 0 评论 -
UPC ——9301: CHEAP DELIVERIES(K次最短路dijktra+状压DP)
9301: CHEAP DELIVERIES 题目传送门 时间限制: 1 Sec 内存限制: 128 MB 提交: 190 解决: 52 [提交] [状态] [讨论版] [命题人:admin] 题目描述 Abu runs a delivery service where he deliver items from one city to another. As with a...原创 2018-10-05 11:49:09 · 527 阅读 · 0 评论 -
UPC——7713: Elections(概率DP)
7713: Elections 时间限制: 1 Sec 内存限制: 128 MB 提交: 82 解决: 38 [提交] [状态] [讨论版] [命题人:admin] 题目描述 Jenabkhan who has become billionaire from his Laboo bussiness, is now running for president. His country us...原创 2018-09-13 19:56:22 · 277 阅读 · 0 评论 -
Codeforces_148D. Bag of mice (DP)
D. Bag of mice time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The dragon and the princess are arguing about what to do on the Ne...原创 2018-09-13 19:56:37 · 249 阅读 · 0 评论 -
2018南京网络赛 NJ_E - AC challenge
#include <bits/stdc++.h> using namespace std; int bit[22]; int a[22]; int b[22]; int state[22]; long long dp[1<<20]; int numbit[1<<20]; const long long INF = 1000000000000000LL;...原创 2018-09-13 19:57:09 · 254 阅读 · 0 评论 -
UPC-7027: Flipping Coins (DP)
7027: Flipping Coins 时间限制: 1 Sec 内存限制: 128 MB Special Judge 提交: 127 解决: 56 [提交] [状态] [讨论版] [命题人:admin] 题目描述 Here’s a jolly and simple game: line up a row of N identical coins, all with the heads...原创 2018-09-13 19:58:02 · 284 阅读 · 0 评论 -
UPC-5212: Coins I (DP)
5212: Coins I 时间限制: 1 Sec 内存限制: 128 MB 提交: 122 解决: 74 [提交] [状态] [讨论版] [命题人:admin] 题目描述 Alice and Bob are playing a simple game. They line up a row of n identical coins, all with the heads facing ...原创 2018-09-13 19:57:28 · 222 阅读 · 0 评论 -
CodeForces ——1079C. Playing Piano(记忆化搜索 / DP )
CodeForces ——1079C. Playing Piano DFS版本: 记忆化在DFS过程中出现过的,因为只要出现回溯,证明该深度下,所有方案都是无效解。 存一下这些无效的方案直接跳过~~ /* * @Author: Achan * @Date: 2018-11-20 19:29:26 * @Last Modified by: Achan * @Last Modified tim...原创 2018-11-20 22:07:14 · 685 阅读 · 0 评论
分享