上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

2019年3月13日

PTA 1067 Sort with Swap(0, i) (25 分)(思维)

摘要: 传送门:点我 Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operat 阅读全文

posted @ 2019-03-13 17:12 Esquecer 阅读(223) 评论(0) 推荐(0)

2019年3月9日

CF 317 A. Lengthening Sticks(容斥+组合数学)

摘要: 传送门:点我 A. Lengthening Sticks time limit per test 1 second You are given three sticks with positive integer lengths of a, b, and c centimeters. You can 阅读全文

posted @ 2019-03-09 11:27 Esquecer 阅读(342) 评论(0) 推荐(0)

2019年3月5日

天梯赛 最短工期(拓扑排序)

摘要: 7-12 最短工期 (25 分) 一个项目由若干个任务组成,任务之间有先后依赖顺序。项目经理需要设置一系列里程碑,在每个里程碑节点处检查任务的完成情况,并启动后续的任务。现给定一个项目中各个任务之间的关系,请你计算出这个项目的最早完工时间。 输入格式: 首先第一行给出两个正整数:项目里程碑的数量 N 阅读全文

posted @ 2019-03-05 22:34 Esquecer 阅读(1009) 评论(0) 推荐(0)

HDU6446 Tree and Permutation(树上DP)

摘要: 传送门:点我 Tree and Permutation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2191 Accepted Submiss 阅读全文

posted @ 2019-03-05 16:11 Esquecer 阅读(149) 评论(0) 推荐(0)

2019年2月27日

HDU6030 Happy Necklace(递推+矩阵快速幂)

摘要: 传送门:点我 Little Q wants to buy a necklace for his girlfriend. Necklaces are single strings composed of multiple red and blue beads. Little Q desperately 阅读全文

posted @ 2019-02-27 17:26 Esquecer 阅读(241) 评论(0) 推荐(0)

2019年2月26日

矩阵快速幂

摘要: 自用 阅读全文

posted @ 2019-02-26 14:12 Esquecer 阅读(130) 评论(0) 推荐(0)

2019年2月24日

堆优化dij

摘要: #include #include #include using namespace std; int n,m,S,tot,Next[500010],head[20000],tree[500010],val[500010]; bool visit[20000]; long long dis[20000]; struct cmp { bool operator()(int a,int b)... 阅读全文

posted @ 2019-02-24 22:34 Esquecer 阅读(278) 评论(0) 推荐(0)

2019年1月26日

leecode 937 Reorder Log Files (模拟)

摘要: 传送门:点我 You have an array of logs. Each log is a space delimited string of words. For each log, the first word in each log is an alphanumeric identifie 阅读全文

posted @ 2019-01-26 22:55 Esquecer 阅读(218) 评论(0) 推荐(0)

2019年1月23日

leecode 978. Longest Turbulent Subarray(最长连续波动序列,DP or 滚动数组)

摘要: 传送门:点我 978. Longest Turbulent Subarray 978. Longest Turbulent Subarray A subarray A[i], A[i+1], ..., A[j] of A is said to be turbulent if and only if: 阅读全文

posted @ 2019-01-23 22:37 Esquecer 阅读(286) 评论(0) 推荐(0)

TOJ4439微积分――曲线积分(数学,模拟)

摘要: 传送门:点我 格林公式P,Q为关于x,y的函数。 现在为了方便起见,现给出x的积分上限1,积分下限0, y的积分上限x,积分下限0。 P只是关于Y的函数,Q只是关于X的函数。 输入 开始输入为测试组数n。每一组的开始输入Q的项数q和Q关于X的系数以及指数。接下来是P的多项式的项数p和P的关于Y的系数 阅读全文

posted @ 2019-01-23 10:14 Esquecer 阅读(375) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

导航