![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
POJ1400-1499 先读一遍英文 难受的时候多
woniupengpeng
这个作者很懒,什么都没留下…
展开
-
POJ 1476 Always On the Run G++ 动态规划dp 巧妙 没掌握
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;//英语 看博友分析 抄博友程序 动态规划dp 巧妙 没掌握 int dp[1020][20];//dp[i][k] i表示第多少天,k表示目的地 i天里从城市1 到城市k 的最小花费 int cost[2...原创 2020-08-13 18:49:08 · 86 阅读 · 0 评论 -
POJ 1497 Molecules G++ 枚举 巧妙 背
#include <iostream>#include <cstdio>#include <string>#include <algorithm>using namespace std;//英语 抄博友程序 枚举 巧妙 背 string s[5];int id[5];int p[5];enum{U,L,D,R};//抄博友程序 int main(){ while(1) { cin...原创 2020-08-13 10:17:54 · 99 阅读 · 0 评论 -
POJ 1472 Instant Complexity G++ 递归 没掌握
#include <iostream>#include <cstdio>#include <string>#include <cstring>#include <stack> #include <algorithm> using namespace std;//英语 看博友分析 抄博友程序 递归 没掌握 //int mi[20];//stack<string>...原创 2020-08-10 18:00:48 · 90 阅读 · 0 评论 -
POJ 1492 Up and Down Sequences G++
#include <iostream>#include <cstdio>#include <iomanip>using namespace std;//英语 看博友分析 抄博友程序 模拟 int da[100]; int main(){ while(1) { int js=0; cin>>da[0]; if(da[0]==0) { break; } while(1) {...原创 2020-08-10 12:18:51 · 81 阅读 · 0 评论 -
POJ 1481 The Die Is Cast G++ dfs
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include <vector>using namespace std;//英语 看博友分析 dfs char mp[100][100];int da[100][100];int vis[100][100];int dx[4]={0,0,1,-1}...原创 2020-08-09 11:38:15 · 139 阅读 · 0 评论 -
POJ 1414 Life Line G++ dfs 背
#include <iostream>#include <cstdio>#include <cstring>using namespace std;//英语 看博友分析 抄博友程序 dfs 背 int da[20][20];int vis[20][20];int dx[6]={0,0,1,-1,1,-1};//抄博友程序 后两个背一下 int dy[6]={1,-1,0,0,1,-1};int f...原创 2020-08-06 15:47:01 · 113 阅读 · 0 评论 -
POJ 1465 Multiple G++ bfs 没掌握
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>using namespace std;//英语 看博友分析 抄博友程序 bfs 没掌握 int r,l;struct nod{ int father; int ans;}; nod fa[5008...原创 2020-06-19 17:45:08 · 93 阅读 · 0 评论 -
POJ 1469 COURSES G++ 二分图最大匹配 背
#include <iostream>#include <cstdio>#include <cstring>using namespace std;//英语 看博友分析 抄博友程序 二分图最大匹配 背 int n,p;int g[400][400];int vis[400];int link[400];int dfs(int x){ for(int i=1;i<=p;i++) { if(vis[i]...原创 2020-06-18 19:31:11 · 91 阅读 · 0 评论 -
POJ 1422 Air Raid G++ 二分图最小边覆盖 背
#include <iostream>#include <cstdio>#include <cstring>using namespace std;//英语 看博友分析 抄博友程序 二分图最小边覆盖 背int g[200][200]; int vis[200];int link[200];int n,m;int dfs(int x){ for(int i=1;i<=n;i++) { if(vis[i]=...原创 2020-06-18 11:16:07 · 93 阅读 · 0 评论 -
POJ 1442 Black Box G++ 堆 巧妙 背
#include <iostream>#include <cstdio>#include <queue>#include <functional>#include <vector>using namespace std;//英语 抄博友程序 堆 巧妙 背 int a[30008];int u[30008];int main(){ priority_queue<int> s...原创 2020-06-18 08:44:32 · 111 阅读 · 0 评论 -
POJ 1416 Shredding Company G++ dfs 背
#include <iostream>#include <cstdio>#include <string>#include <map>using namespace std;//英语 看博友分析 抄博友程序 dfs 背int mx;int js;int v[100];int jg[100];int x;string s;map<int,int> mp;void dfs(in...原创 2020-06-07 10:16:39 · 124 阅读 · 1 评论 -
POJ 1426 Find The Multiple G++ dfs 巧妙
#include <iostream>using namespace std;//只要能整除就行 题目没数字大小要求 //抄博友程序 dfs 数组巧妙 //1.dfs unsigned long long通过 2.循环 通过 3.dfs unsigned __int64 通过int da[1004];int wei;int n;int jg; voi...原创 2020-04-22 08:36:32 · 104 阅读 · 0 评论 -
POJ 1491 Pi G++
#include <iostream>#include <iomanip>#include <cmath>using namespace std;//抄博友程序 gcd题 int a[108];int gcd(int x,int y)//x大 y小 { int t; if(x<y) { t=x; x=y; y=...原创 2020-01-28 12:06:21 · 151 阅读 · 0 评论 -
POJ 1406 Starship Hakodate-maru G++
#include <iostream>#include <algorithm> using namespace std;//学好英语 抄博友程序 int main(){ while(1) { int n; cin>>n; if(n==0) { break; } int jg=0; for(int i=...原创 2020-01-22 11:29:27 · 118 阅读 · 0 评论 -
POJ 1410 Intersection G++ 判断两条线段是否相交 背
给出线段起点和终点坐标,矩形左上角和右下角坐标。判断线段和矩形(包括矩形内部)是否有交点。原创 2017-05-25 17:17:28 · 583 阅读 · 0 评论 -
POJ 1458 Common Subsequence G++ 动态规划 背
求两个字符串的最长公共子序列的长度。原创 2017-06-20 12:48:31 · 172 阅读 · 0 评论 -
POJ 1455 Crazy tea party G++ 冒泡排序 二元二次方程最大最小值 背
n个人围成一桌,每次交换两人的位置。求最少多少次交换,所有人的左右邻桌互换。原创 2017-06-20 13:00:24 · 221 阅读 · 0 评论 -
POJ 1454 Factorial Frequencies G++ 大数计算
求0到9在n!的每位中出现的次数。原创 2017-06-20 15:24:17 · 316 阅读 · 0 评论 -
POJ 1456 Supermarket G++ 需细想 复习 背
n件商品,已知每件商品的利润和截止时间。求最大利润。原创 2017-06-20 15:48:58 · 178 阅读 · 0 评论 -
POJ 1440 Varacious Steve G++ 博弈 多维dp 没掌握
二人玩游戏,盒子中有n个甜甜圈,一次最多拿m个。Steve先拿,分胜负前先不吃,拿走最后一个甜甜圈的获胜,赢家吃掉自己手中的甜甜圈;输家把自己的甜甜圈放回,重新开始,输家先拿。两人都尽全力,求Steve吃多少甜甜圈。原创 2017-06-20 16:23:28 · 484 阅读 · 0 评论 -
POJ 1434 Fill the Cisterns! G++ 涉小数二分 没掌握
如图,n个水箱组成的蓄水系统,已知每个水箱的底部距地面高度、水箱的高度、宽度和深度,给出注入多少方水。求水面距离地面高度。原创 2017-06-20 16:42:18 · 207 阅读 · 0 评论 -
POJ 1463 Strategic game G++ dfs dp 背
如图所示树型图,边表示道路,节点表示交叉口。在交叉口上部署一名士兵可以监视与之相连的道路。求最少部署多少士兵可以监视所有道路。原创 2017-06-20 12:36:00 · 202 阅读 · 0 评论 -
POJ 1470 Closest Common Ancestors G++ 离线Tarjan 没掌握
n个节点的树,给出每个节点的子节点数和子节点。给出多个节点对,求每个节点对的最近祖先。打印祖先和对中以它为祖先的数量。原创 2017-06-20 10:47:32 · 190 阅读 · 0 评论 -
POJ 1488 TEX Quotes G++
将文章中第一个双引号替换成``,第二个双引号替换成'',以此类推替换所有双引号。原创 2016-11-27 15:44:13 · 275 阅读 · 0 评论 -
POJ 1493 Machined Surfaces G++
#include #include using namespace std;//谢谢博友文章 int main(){ while(1) { int NUM; cin>>NUM; if(NUM==0) { break; } string t; getline(cin,t); int zd=0; int he=0; for(int i=0原创 2017-12-14 15:59:34 · 188 阅读 · 0 评论 -
POJ 1450 Gridland G++
#include #include using namespace std;//谢谢老师 int main(){ int NUM; cin>>NUM; for(int i=0;i<NUM;i++) { int x,y; cin>>x>>y; cout<<"Scenario #"<<i+1<<":"<<endl; double jg; if((x*y)%2==0原创 2016-12-05 18:29:53 · 245 阅读 · 0 评论 -
POJ 1468 Rectangles G++
#include <iostream>using namespace std;//好好学英语 抄博友程序 int xmin[5008],xmax[5008],ymin[5008],ymax[5008]; bool check(int i,int j)//i外 j内 { return xmin[i]<=xmin[j] && xmax[i]&...原创 2017-06-20 12:17:50 · 218 阅读 · 0 评论 -
POJ 1471 Triangles G++ 模拟 巧妙 背
如图,n层的倒三角型,#为黑色,-为白色。求最大的白色三角形包含的小三角形数。原创 2017-06-20 10:22:22 · 340 阅读 · 0 评论 -
POJ 1473 There's Treasure Everywhere! G++
#include <iostream>#include <string>#include <sstream>#include <map>#include <utility>#include <cmath>#include <cstdio>#include <iomanip>...原创 2017-06-20 10:12:00 · 222 阅读 · 0 评论 -
POJ 1401 Factorial G++
给出N,求 N!末尾的零数。#include <iostream>using namespace std;//抄博友好程序 int main(){ int T; cin>>T; for(int o=0;o<T;o++) { int n; cin>>n; int jg=0; while(n!=0) {...原创 2017-06-01 07:22:46 · 477 阅读 · 0 评论 -
POJ 1408 Fishnet 笔记
如图,编渔网,给出对应边上的点,求渔网网眼的最大面积。原创 2017-05-26 19:58:38 · 509 阅读 · 0 评论 -
POJ 1444 Parallelepiped walk 笔记
如图,L*W*H的立方体上有两点A(x1,y1,z1)、B(x2,y2,z2)。求A B两点在立方体表面上的最小距离。原创 2017-05-25 18:54:03 · 749 阅读 · 0 评论 -
POJ 1423 Big Number G++
给出数字m,求m!的位数。原创 2017-05-25 18:22:05 · 454 阅读 · 0 评论 -
POJ 1419 Graph Coloring G++ 最大独立集 看书学概念 dfs 背
n个顶点,k个边的图。使用黑白两种颜色对顶点着色,相连的顶点不能都是黑色。求最多有多少顶点能着黑色,列举这些顶点。原创 2017-05-25 18:07:03 · 616 阅读 · 0 评论 -
POJ 1405 Heritage G++ 数学 高精度计算 易超时 没掌握
分遗产,每个亲属分1/x,亲属重要性降序排列,余下给教会。求亲属多分的情况下,怎么分。原创 2017-05-25 17:06:38 · 363 阅读 · 0 评论 -
POJ 1418 Viva Confetti 已翻译
<span title="Description">描述你知道五彩纸屑吗?他们是彩色纸的小圆盘,人们在聚会或节日期间将它们扔在周围。<span title="Since people throw lots of confetti, they may end up stacked one on another, so there may be hidden ones underneath原创 2016-12-23 21:04:30 · 672 阅读 · 0 评论 -
POJ 1486 Sorting Slides G++ 例题 二分图匹配 巧妙 背
<span title="Description">描述克莱斯教授今天下午将发表重要讲话。不幸的是,他不是一个很整洁的人,把他的所有透明胶片放在一个大堆。在讲话之前,他必须对幻灯片进行排序。<span title="Being a kind of minimalist, he wants to do this with the minimum amount of work possib原创 2016-12-17 18:49:00 · 231 阅读 · 0 评论 -
POJ 1466 Girls and Boys G++ 二分图最大独立集 背
<span title="Description">描述在大学的第二年,有人开始研究学生之间的浪漫关系。“浪漫参与”的关系在一个女孩和一个男孩之间定义。因为研究的原因,有必要找出满足条件的最大集合:在集合中没有两个学生已经“浪漫地参与”。<span title="The result of the program is the number of students in such原创 2016-12-17 18:53:20 · 245 阅读 · 0 评论 -
POJ 1451 T9 G++ trie树 dfs
#include <iostream>#include <cstdio>#include <string>using namespace std;//英语 看博友分析 trie树 dfs struct nod{ int sum; int p[26];}da[10000];int js; int mp[26]={2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,9...原创 2016-12-03 15:45:37 · 399 阅读 · 0 评论 -
POJ 1411 Calling Extraterrestrial Intelligence Again G++ 易超时
给出m、a和b。寻找素数p,q作为长方形的宽和高。使p*q原创 2017-06-01 10:38:39 · 463 阅读 · 0 评论