![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
POJ1700-1799 笔记仅供自己参考 生病得自己扛
woniupengpeng
这个作者很懒,什么都没留下…
展开
-
POJ 1747 Expression G++ 谢费尔竖线 递归 背
#include <iostream>#include <cstdio>using namespace std;//英语 看博友分析 抄博友程序 谢费尔竖线 递归 背 void dfs(int n){ if(n==1) { printf("((A0|B0)|(A0|B0))"); return; } printf("((A%d|B%d)|(",n-1,n-1); dfs(n-1); printf(...原创 2020-09-17 10:08:00 · 100 阅读 · 0 评论 -
POJ 1771 Elevator Stopping Plan G++ 贪心+二分 没掌握
#include <iostream>#include <cstdio>#include <algorithm>using namespace std;//英语 看博友分析 抄博友程序 贪心+二分 没掌握 //输出与样例不同 int da[30010];int n;int cnt; int tmp[30010];int sc[30010];bool check(int time){ int tt...原创 2020-09-16 16:52:05 · 97 阅读 · 0 评论 -
POJ 1744 Elevator Stopping Plan G++ 贪心+二分 没掌握
#include <iostream>#include <cstdio>#include <algorithm>using namespace std;//英语 看博友分析 抄博友程序 贪心+二分 没掌握 int da[30010];int n;bool check(int time){ int t=0; int flag=0; int now=1;//抄博友程序 for(int i=0;i&l...原创 2020-09-16 16:11:14 · 110 阅读 · 0 评论 -
POJ 1708 Game G++ 巧妙 bfs 没掌握
#include <iostream>#include <cstdio>#include <queue> #include <cstring>#include <vector>#include <algorithm>using namespace std;//英语 看博友分析 抄博友程序 巧妙 bfs 没掌握 int col[110];int vis[1...原创 2020-09-15 18:52:12 · 124 阅读 · 0 评论 -
POJ 1770 Special Experiment G++ 例题 dfs动态规划 建图巧妙 背
#include <iostream>#include <cstdio>#include <vector>#include <cstring>#include <algorithm>#include <cmath> using namespace std;//英语 看博友分析 抄博友程序 例题 dfs动态规划 建图巧妙 背 vector<int&g...原创 2020-09-13 15:56:22 · 99 阅读 · 0 评论 -
POJ 1763 Shortcut G++ 模拟
#include <iostream>#include <cstdio>#include <algorithm>#include <cmath>using namespace std;//英语 看博友分析 抄博友程序 模拟 struct nod{ int x; int y; int num;}da[250010]; int n;int l,s,e;char d;char str[250010...原创 2020-09-11 17:50:59 · 102 阅读 · 0 评论 -
POJ 1754 Buffer Manager G++
#include <iostream>#include <cstdio>#include <string> #include <algorithm>using namespace std;//英语 看博友分析 抄博友程序 模拟 char s[100010];int main(){ int n,m; scanf("%d%d",&n,&m); int js=0; int he=0; ...原创 2020-09-08 18:34:49 · 112 阅读 · 0 评论 -
POJ 1757 Binary Search G++
#include <iostream>#include <cstdio>#include <cstring>using namespace std;//英语 看博友分析 抄博友程序 模拟 int hs[10010];int s[10010];int e[10010];int cnt;int main(){ int a,ci; cin>>a>>ci; //cout<<a&l...原创 2020-09-06 16:12:54 · 75 阅读 · 0 评论 -
POJ 1791 Paper Cutting G++ 枚举 背
#include <iostream>#include <cstdio>#include <algorithm>#include <cmath> using namespace std;//英语 看博友分析 抄博友程序 枚举 背 int main(){ int a,b,c,d,e,f; while(cin>>a>>b>>c>>d>>e>&g...原创 2020-09-05 18:20:54 · 115 阅读 · 0 评论 -
POJ 1790 Base Numbers G++ dp 没掌握
#include <iostream>#include <cstdio>#include <string> #include <cstring> using namespace std;//英语 看博友好分析 抄博友程序 dp 没掌握 string s;int dp[100];int fun(int x)//进制有x位 { string t=s.substr(s.size()-x);//进制数...原创 2020-09-05 12:49:28 · 80 阅读 · 0 评论 -
POJ 1710 Magic of David Copperfield G++ 找规律 背
#include <iostream>#include <cstdio>using namespace std;//英语 看博友分析 抄博友程序 找规律 背 int main(){ int n; cin>>n; int t=0; for(int i=1;i<=n;i++) { cout<<2*n+1+t*2<<" "; t++; for(int j=0;j<i;j...原创 2020-09-04 15:33:40 · 111 阅读 · 0 评论 -
POJ 1799 Yeehaa! G++ 几何 背
#include <iostream>#include <cstdio>#include <cmath>using namespace std;//英语 看博友分析 抄博友程序 几何 背 int main(){ double pi=3.14159265358979; double n; cin>>n; for(int i=0;i<n;i++) { double R,n; cin>...原创 2020-09-04 08:18:52 · 100 阅读 · 0 评论 -
POJ 1721 CARDS G++ 看书 组合数学置换群 背
#include <iostream>#include <cstdio>using namespace std;//英语 看博友好分析 抄博友程序 看书 组合数学置换群 背 int a[1008];int b[1008]; int c[1008];int main(){ int n,m; //cin>>n>>m; while(scanf("%d%d",&...原创 2020-07-04 10:33:13 · 126 阅读 · 0 评论 -
POJ 1719 Shooting Contest G++ 二分图匹配 没掌握
#include <iostream>#include <cstdio>#include <cstring>using namespace std;//英语 看博友分析 抄博友程序 二分图匹配 没掌握 int g[1008][1008]; int vis[1008];int link[1008];int r,c;int dfs(int x){ for(int i=1;i<=c;i++)...原创 2020-06-20 20:10:12 · 121 阅读 · 0 评论 -
POJ 1730 Perfect Pth Powers G++ pow未实现 素数+gcd实现 巧妙
#include <iostream>#include <cstdio>using namespace std;//英语 看博友分析 抄博友程序 pow未实现 素数+gcd实现 巧妙 int isprim[70008];//抄博友程序 int prim[70008];int js;int gcd(int a,int b){ if(b==0) { return a; }else { return ...原创 2020-06-20 08:13:43 · 135 阅读 · 0 评论 -
POJ 1717 Dominoes G++ 动态规划 背
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;//英语 看博友分析 抄博友程序 动态规划 背 int up[1008];int down[1008];int dp[1008][12000];int main(){ int n; scanf("%d",&...原创 2020-06-03 21:11:32 · 189 阅读 · 0 评论 -
POJ 1722 SUBTRACT G++ 动态规划 背
#include <iostream>#include <cstdio>#include <cstring>using namespace std;//英语 看博友分析 与样本输出不同 抄博友程序 动态规划 背 int dp[108][20010];int da[108];int path[108];int main(){ int n,T; scanf("%d%d",&n,&T); fo...原创 2020-06-03 16:37:01 · 107 阅读 · 0 评论 -
POJ 1750 Dictionary G++ gets puts 背
#include <iostream>#include <cstdio>#include <string>using namespace std;//英语 模拟 gets puts 背 char a[100008][12];//抄博友程序 int main(){ gets(a[0]); puts(a[0]); int i=1; int k=0; while(gets(a[i]))//抄博友程序 { int ...原创 2020-05-31 11:20:06 · 92 阅读 · 0 评论 -
POJ 1751 Highways G++ kruskal实现 prim未实现
#include <iostream>#include <cmath>#include <vector>#include <algorithm>#include <cstdio>#include <cstring>using namespace std;//看博友分析 抄博友程序 最小生成树 kruskal实现 prim未实现 struct nod{ int x; int y...原创 2020-05-31 08:08:36 · 110 阅读 · 0 评论 -
POJ 1789 Truck History G++
#include <iostream>#include <string>#include <vector>#include <cstring>#include <cstdio>#include <algorithm>using namespace std;//英语 看博友分析 int fa[200...原创 2020-04-18 07:20:13 · 84 阅读 · 0 评论 -
POJ 1742 Coins G++ 二进制优化转化为01背包未实现 多重背包 背
描述Silverland的人使用硬币。他们有值A1,A2,A3 ...的硬币。一个银币。一天,Tony打开他的钱箱,发现有一些钱。他决定在附近的商店买一个非常好的手表。 他想支付确切的价格(没有变化),他知道价格不会超过m。但他不知道手表的确切价格。你要编写一个程序,它读取n,m,A1,A2,A3 ... An和C1,C2,C3 ... Cn对应于托尼硬币的数量值A1,A2,A3原创 2016-12-03 10:52:05 · 240 阅读 · 0 评论 -
POJ 1738 An old Stone Game 笔记
给出n堆石头,给出每堆石头中的石头数。只能合并相邻的石头堆,得分是合并后石头的数量。求合并所有堆的最小得分。原创 2017-06-04 17:07:07 · 240 阅读 · 0 评论 -
POJ 1731 Orders G++
给出字母列表,输出所有可能的由字母列表中字母组成的字符串,并按字典序排列。 #include <iostream>#include <algorithm>using namespace std;int main(){ string a; cin>>a; sort(a.begin(),a.end()); cout<<a&l...原创 2017-06-04 16:48:26 · 195 阅读 · 0 评论 -
POJ 1780 Code G++ 图的数据结构 有向图的欧拉通路 没掌握
n位密码,输入密码位数多于n时,添加到密码尾部,之前第一位被删除。求能打开所有n位密码的序列。原创 2017-06-04 20:38:38 · 138 阅读 · 0 评论 -
POJ 1769 Minimizing maximizer 笔记
从n个数中挑出最大数。有m个排序机器可以使用。每个排序机器排序范围从第 ik 到第 jk。求最少使用多少排序机器。原创 2017-06-04 20:11:14 · 313 阅读 · 0 评论 -
POJ 1741 Tree 笔记
n个顶点的树,顶点u到顶点v的边的长度为l。求最短距离小于k的顶点对数。原创 2017-06-04 17:50:42 · 184 阅读 · 0 评论 -
POJ 1704 Georgia and Bob G++
如图,n个棋子,给出每个棋子的位置,Georgia和Bob轮流选择一个棋子向左移动,无法移动的一方失败。原创 2017-09-22 09:25:11 · 236 阅读 · 0 评论 -
POJ 1761 Easy Task
输入输入的第一行包含一个整数n(1 接下来的n行中的每一行描述一个提交并且包含提交时间(从比赛开始以秒计量),队标识符,问题标识符和评估由单个空格分隔的提交的结果。提交时间是不大于18000的正整数。团队标识符是一个非空字符串,最多包含五个小写字母或数字。 问题标识符是大写字母A,B,...或I.结果是大写字母A(提交被接受)或R(提交被拒绝)。根据提交时间以不减少的顺序提交提案翻译 2016-11-27 15:33:18 · 304 阅读 · 0 评论 -
POJ 1753 Flip Game G++
描述一个4*4的棋盘,放满了黑白两色的棋子,点击任意棋子会改变它和它上下左右棋子的颜色(由黑到白或由白到黑)。输入一个4*4的二维字符数组,字符‘b’表示黑色棋子,字符'w'表示白色棋子。输出最少点击多少棋子能让所有棋子都变白或都变黑。原创 2016-11-27 15:23:20 · 267 阅读 · 0 评论 -
POJ 1732 Phone numbers G++ 例题 dfs输出+dp 巧妙 背
手机输入单词。如表,按键与字母的对应关系。给出按键顺序和字典,求单词数最小的可能单词输入。原创 2017-06-04 16:21:17 · 274 阅读 · 0 评论 -
POJ 1724 ROADS G++ dfs 巧妙 背
K元钱,N个城市,R条单向道路。S源超城市,D目的城市,L道路长度,T费用。求K元钱内从1到N的最短路径。原创 2017-06-04 16:04:14 · 192 阅读 · 0 评论 -
POJ 1723 SOLDIERS G++ 中位数 背
N个士兵,给出每个士兵坐标。求士兵站成水平一排所需最小步数。士兵不能同时站在一个格内。原创 2017-06-04 15:48:44 · 331 阅读 · 0 评论 -
POJ 1759 Garland G++ 数学未实现 二分实现 背
<span title="Description">描述新年花环由N根灯连接到一个共同的线,挂在最外面的灯的末端。<span title="The wire sags under the weight of lamp in a particular way: each lamp is hanging at the height that is 1 millimeter lower th原创 2016-12-15 20:50:35 · 255 阅读 · 0 评论 -
POJ 1703 Find them, Catch them G++ C输入需要看书 用关系数组的方法未实现
<span title="Description">描述塔杜市的警察局决定结束混乱,作为发起行动,根除在城市中的两个帮派,帮龙和帮蛇。然而,警察首先需要确定犯罪所属的团伙。现在的问题是,给了两个罪犯;他们属于同一家族吗?您必须根据不完整的信息做出判断。<span title="(Since the gangsters are always acting secretly.)">原创 2016-12-09 19:10:07 · 196 阅读 · 0 评论 -
POJ 1782 Run Length Encoding 笔记
给出字符串,用如下规则表示该字符:如果有连续字符,输出字符数和该字符,字符数大于9时分开输出。如果有多个不重复字符用1+X+1的形式输出,如果1是序列的一部分增加一个1作为转义字符。原创 2017-06-04 21:57:31 · 220 阅读 · 0 评论 -
POJ 1781 In Danger G++ 约瑟夫环 找规律 背
约瑟夫问题,n个人围成一圈数数,第3个人出列,再重数,求剩下最后一个人的位置。原创 2017-06-04 21:43:39 · 236 阅读 · 0 评论 -
POJ 1778 All Discs Considered G++ 拓扑排序 巧妙 图的数据结构 没掌握
2张盘安装软件。第一张盘有N1个软件,1到N1命名。第二张盘有N2个软件,N1+1到N1+N2命名。软件之间有D个依赖关系。xi 必须先于 yi安装。求光盘拔插次数。原创 2017-06-04 21:30:25 · 377 阅读 · 0 评论 -
POJ 1776 Task Sequences G++ 竞赛图汉密尔顿路径 快输入 没掌握
n个任务使用计算机完成。给出n*n矩阵,第ij元素为1表示任务i到任务j不需要重启,为0表示需要重启。求最小重启数,对每次重启给出此次运行任务数与运行的任务。原创 2017-06-04 21:12:55 · 277 阅读 · 0 评论 -
POJ 1775 Sum of Factorials G++
给出数n,判断n是否能等于多个阶乘的和。#include <iostream>using namespace std;//学好英语 抄博友程序 int f[10]={1,1,2,6,24,120,720,5040,40320,362880};int main(){ /* f[1]=1; for(int i=2;i<=9;i++) { f[i]...原创 2017-06-04 20:18:54 · 260 阅读 · 0 评论 -
POJ 1760 Disk Tree G++ 字符串树 博友好数据结构 背
从给出路径中得出文件结构。原创 2017-06-04 19:58:36 · 307 阅读 · 0 评论