
poj---解题报告
文章平均质量分 70
nowting_csdn
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj1330-最近公共祖先运用
题目地址:http://poj.org/problem?id=1330 这里主要给的是实现代码 然后结合这篇 博客 (<----点做这个博客)一起看会更加理解 实现代码如下: #include <iostream> #include <cstdio> #include <cstring> #include <vector> using...原创 2018-07-27 17:38:02 · 487 阅读 · 0 评论 -
POJ 3368 Frequent values(RMQ)
题目链接:http://poj.org/problem?id=3368 Frequent values Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 24776 Accepted: 8632 Description You are given a sequence of n integers a1 , a2 , … , a...原创 2019-08-14 18:41:54 · 132 阅读 · 0 评论 -
poj 2823 Sliding Window(RMQ水题)
题目链接:http://poj.org/problem?id=2823 Sliding Window Time Limit: 12000MS Memory Limit: 65536K Total Submissions: 81382 Accepted: 22902 Case Time Limit: 5000MS Description An array of size n ≤ 106 is g...原创 2019-08-13 20:25:55 · 158 阅读 · 0 评论 -
POJ 2559 Largest Rectangle in a Histogram(单调栈模板题)
链接:http://poj.org/problem?id=2559 代码: // #include <bits/stdc++.h> #include <iostream> #include <cstdio> #include <stack> #include <cstring> using namespace std; #define l...原创 2019-07-27 22:08:16 · 108 阅读 · 0 评论 -
POJ 1166 The Clocks
链接:http://poj.org/problem?id=1166 题目描述: The Clocks Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 19016 Accepted: 7879 Description |-------| |-------| |-------| | | | ...原创 2019-07-29 21:09:02 · 191 阅读 · 0 评论 -
poj 2828
题目链接 TLE代码: #include <iostream> #include <cstdio> using namespace std; const int maxn=2e5+10; struct tr { int val; int le,ri; }tr[maxn<<2]; void build(int l,int r,int rt) { tr[...原创 2019-06-17 19:27:12 · 461 阅读 · 0 评论 -
Basic remains(计算余数)
Description Given a base b and two non-negative base b integers p and m, compute p mod m and print the result as a base b integer. p mod m is defined as the smallest non-negative integer k such that p...原创 2019-04-27 13:18:57 · 374 阅读 · 0 评论 -
公牛和母牛
公牛和母牛 Language: Bull Math Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16656 Accepted: 8491 Description Bulls are so much better at math than the cows. They can multiply huge integers ...原创 2019-04-26 10:05:08 · 651 阅读 · 0 评论 -
POJ 1703解题思路【并查集】+ poj 1182 食物链
题目链接 http://poj.org/problem?id=1703 要注意,对于题目给出的编号来说,我们既可以将其归为A组,也可以将其归为B组,所以我们两个假设都处理。如果题目给出D 1 2,那么我们就将1和2+n合并为一个集合,然后再将1+n和2合并为另一个集合,对于D 2 3同样,此时一个集合为(1, 2+n, 3),另一个集合为(1+n, 2, 3+n)。 对于A 1 3来说,由于上...原创 2018-11-28 20:09:10 · 210 阅读 · 0 评论 -
POJ 3486 & HDU 1913 Computers解题报告 有关线段树的或dp 特别是线段树问题,查询l,r段,mid=tree[root].left+tree[root].right>>1
Everybody is fond of computers, but buying a new one is always a money challenge. Fortunately, there is always a convenient way to deal with. You can replace your computer and get a brand new one, thu...原创 2018-08-16 18:23:45 · 360 阅读 · 0 评论 -
poj2528 解题报告
这份代码由于color最大值会>10000,而1<<color肯定会炸的 #include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <map> using namespace std; #define ...原创 2018-08-19 21:58:31 · 350 阅读 · 0 评论 -
poj 1015 Jury Compromise(动态规划,并找出路径)*
题目链接:http://poj.org/problem?id=1015 题面: Jury Compromise Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 35458 Accepted: 9586 Special Judge Description In Frobnia, a far-away country, the...原创 2019-08-31 11:10:32 · 245 阅读 · 0 评论