POJ1100-1199 争取小时内有收获 天天坚持最重要
woniupengpeng
这个作者很懒,什么都没留下…
展开
-
POJ 1161 Walls G++ 知识点多 floyd 没掌握
#include <iostream>#include <cstdio>#include <cstring>using namespace std;//英语 看博友分析 抄博友程序 知识点多 floyd 没掌握 int peo[260];int dis[260];int g[210][210];int da[210][260];//抄博友程序 int main(){ int m,n,L;//m个区域 ...原创 2020-08-27 17:20:00 · 65 阅读 · 0 评论 -
POJ 1145 Tree Summing G++ dfs未实现
#include <iostream>#include <cstdio>#include <string>#include <stack>#include <map>using namespace std;//抄博友程序 dfs未实现 int main(){ int x; while(1) { cin>>x; if(cin.eof()==1) { break; } ...原创 2020-07-05 18:31:22 · 88 阅读 · 0 评论 -
POJ 1187 陨石的秘密 G++ 巧妙 dfs dp 真没掌握
#include <iostream>#include <cstdio>#include <cstring>using namespace std;//看博友分析 抄博友程序 巧妙 dfs dp 真没掌握 int mod=11380;int l1,l2,l3,d;int dp[12][12][12][34];//抄博友程序 dp[a][b][c][d]表示{}[]()分别有a b c个形成最大嵌套...原创 2017-01-30 14:01:54 · 664 阅读 · 0 评论 -
POJ 1186 方程的解数 G++ dfs 快速幂 哈希表 背
#include <iostream>#include <cstdio> #include <cstring>#define MAX 4444444using namespace std;//英语 看博友分析 抄博友程序 dfs 快速幂 哈希表 背 int k[200];int p[200];struct hash{ int val; int c;}hash_t[MAX];/...原创 2017-01-30 13:58:52 · 269 阅读 · 0 评论 -
POJ 1189 钉子和小球 G++ 动态规划 没掌握
#include <iostream>#include <cstdio>#include <string>#include <cstring>using namespace std;//英语 看博友分析 抄博友代码 动态规划 没掌握 int p[60][60];long long dp[60][60];long long gcd(long long a, long long b){...原创 2017-01-30 14:04:28 · 255 阅读 · 0 评论 -
POJ 1191 棋盘分割 G++ 均方差 dp 没掌握
#include <iostream>#include <cstdio>#include <cstring> #include <iomanip>#include <cmath> using namespace std;//英语 看博友分析 抄博友程序 均方差 dp 没掌握int da[10][10];int sum[10][10];int dp[20][...原创 2017-01-30 14:09:26 · 254 阅读 · 0 评论 -
POJ 1192 最优连通子集 G++ dfs 动态规划 没掌握
#include <iostream>#include <cstdio>#include <cmath>#include <vector>#include <cstring>#include <cstdlib>using namespace std;//英语 抄博友程序 dfs 动态规划 没掌握 int x[1008];int y[1008];int z[1008];...原创 2017-01-30 14:12:04 · 203 阅读 · 0 评论 -
POJ 1148 Utopia Divided G++ dfs实现或枚举实现 贪心 巧妙 背
#include <cstdio>#include <algorithm>#include <iostream>using namespace std;//英语 抄博友程序 dfs实现或枚举实现 贪心 巧妙 背 //4//7 5 6 1 3 2 4 8//4 1 2 1//-1 5 -6 7//-2 3 -4 8//+5 -4//-1 +8//-6 +3//+7 -2 //+5...原创 2020-06-26 08:00:09 · 190 阅读 · 0 评论 -
POJ 1105 S-Trees G++
#include <iostream>#include <cstdio>#include <cstring>using namespace std;//英语 看博友分析 抄博友程序 模拟 int main(){ int n; int tag=0; while(1) { cin>>n; if(n==0) { break; } int mp[10]; memset(...原创 2020-06-22 15:14:00 · 140 阅读 · 0 评论 -
POJ 1185 炮兵阵地 G++ 状态压缩dp 没掌握
#include <iostream>#include <cstdio>#include <algorithm>using namespace std;//英语 看博友好分析 抄博友程序 状态压缩dp 没掌握 int da[200];int st[200];//状态 int sum[200];int dp[108][80][80]; int cal(int x){ int js=0; whil...原创 2017-01-30 13:55:49 · 248 阅读 · 0 评论 -
POJ 1183 反正切函数的应用 G++
#include <iostream>#include <algorithm>using namespace std;//看博友分析 巧妙 数学 //m*n=a^2+1int main(){ long long a; cin>>a; long long jg=1000000000;//范围给小了 for(long lo...原创 2017-01-30 13:50:59 · 209 阅读 · 0 评论 -
POJ 1195 Mobile phones 笔记
S*S方形区域无线通信,每个格有一个基站。4种指令。指令0 变量S(初始化S*S,每个格0人)。指令1 X Y A;格(X,Y)增加A人。指令2 L B R T;查询格(L,B)到格(R,T)矩形区域的人数。指令3;结束。原创 2017-05-16 21:37:52 · 239 阅读 · 0 评论 -
POJ 1181 Bus Terminals 笔记
N个车站,给出坐标。2车站个是枢纽,枢纽之间有连接,其他车站与枢纽相连。求相距最远的两个车站距离的最小值。原创 2017-05-16 21:00:37 · 369 阅读 · 0 评论 -
POJ 1135 Domino Effect 笔记
多米诺骨牌排成图,n个顶点,m条边。顶点a到顶点b花 l 秒。求最后一个多米诺骨牌倒下时间和位置。原创 2017-05-15 20:51:48 · 541 阅读 · 0 评论 -
POJ 1198 Solitaire 笔记
如图所示,棋子可以跳过一个棋子,或移动一格。两行分别给出四个棋子的位置,求能否由第一行位置在8步内走到第二行位置。原创 2017-05-25 20:40:10 · 553 阅读 · 0 评论 -
POJ 1178 Camelot G++ floyd 巧妙 枚举 背
如图,在棋盘上放一个国王和多个骑士,求最小的步数可以将所有棋子移动到一个格子内。同一格子上的国王和一个骑士可以看做一个骑士一起移动。原创 2017-05-25 20:39:38 · 598 阅读 · 0 评论 -
POJ 1177 Picture 笔记
多个矩形,给出每个矩形左下角和右上角坐标,求由这些矩形的并集组成的图形的边界周长。原创 2017-05-25 20:39:01 · 605 阅读 · 0 评论 -
POJ 1140 Expanding Fractions G++ 巧妙
给出分子和分母。求相应的小数形式(给出循环节)。提示:模式重复之前的位数不会超过分母的值。原创 2017-05-15 21:27:26 · 522 阅读 · 0 评论 -
POJ 1175 Starry Night 笔记
给出天空中的星星,用字母标出相同的星座,图中含有相同的星座(星星数相同,有可能旋转),用相同的字母标识。原创 2017-05-25 20:38:13 · 820 阅读 · 0 评论 -
POJ 1173 Bar Codes 笔记
二维码(n,k,m)n位二进制数表示二维码,1表示黑色,0表示亮色,k表示二维码中的条数,m表示二维码条可能的最大宽度。把二维码的所有的二进制码进行排序,求给出二进制码的序号。原创 2017-05-25 20:32:41 · 746 阅读 · 0 评论 -
POJ 1147 Binary codes 笔记
字符串00110,每次循环移动一位,多次结果按字典序排序。形成矩阵0001100110011001000111000给出矩阵的最后一列,求矩阵的第一行。原创 2017-05-15 19:40:05 · 428 阅读 · 0 评论 -
POJ 1199 Left labyrinths 笔记
n*m的迷宫,#表示墙,字符.表示路。迷宫外墙有1个入口,还有一个中央庭院。按照有路口向左转的口诀,能否到达中央庭院。原创 2017-05-15 18:59:58 · 662 阅读 · 0 评论 -
POJ 1196 Twofive 笔记
A到Y 25个字母,排成5*5矩阵,行中字母和列中字母满足增序排列,并把每种可能按字母序排序。如果给出25个字符,输出其字典序。如果给出字典序,求对应25个字符。原创 2017-05-15 18:20:15 · 383 阅读 · 0 评论 -
POJ 1176 Party Lamps G++ dfs 巧妙 背
4个按钮控制N盏灯。按钮1改变所有灯的状态;按钮2改变奇数灯的状态;按钮3改变偶数灯的状态;按钮4改变3K+1灯的状态。初始时所有灯都亮。给出按压按钮次数C,和一些灯的最终状态。求满足条件的所有灯的可能状态。原创 2017-05-15 17:51:33 · 323 阅读 · 0 评论 -
POJ 1166 The Clocks G++
9个时钟标号A到I。0表示12点,1表示3点,2表示6点,3表示9点。9个按钮,按动按钮如图相应时钟顺时针转动90度。给出初始时钟,求怎么操作最后所有时钟在12点。#include <iostream>using namespace std;//抄博友好程序 int a[11];//初始状态 int b[11];//每种变化的次数 int c[11];//终止...原创 2017-05-15 16:13:33 · 632 阅读 · 0 评论 -
POJ 1165 The Primes 笔记
5*5由素数和零组成的矩阵。每行的和,每列的和,对角线的和相等。5位素数不能以0开头。给出每列的和,左上角的数字,求满足条件的矩阵。原创 2017-05-15 15:58:44 · 690 阅读 · 0 评论 -
POJ 1171 Letter Game G++
字母游戏,每个字母都有对应的得分。给出一个限制字符串和一个字典。在字典中找出由限制字符串中字母组成的一个或多个单词,输出最高得分。原创 2017-05-16 21:59:09 · 367 阅读 · 0 评论 -
POJ 1170 Shopping Offers G++ dfs+dp 巧妙 背
计划买b种商品;给出c商品号,k买的数量,p单价。s种优惠商品组合;每个组合由n种商品组成,每种商品给出商品号c、数量k,p组合的价格。求最少花多少钱。原创 2017-05-16 22:38:11 · 418 阅读 · 0 评论 -
POJ 1163 The Triangle G++
如图,给出N行数字组成的三角形。求从顶点到底边路径数字之和的最大值。原创 2017-05-15 09:42:49 · 481 阅读 · 0 评论 -
POJ 1102 LC Display G++
给出每个LC灯的长度。把数字按LC灯格式输出。原创 2017-05-03 18:15:16 · 318 阅读 · 0 评论 -
POJ 1131 Octal Fractions G++
#include <iostream> #include <string>#include <algorithm>using namespace std;string add(string x,string y){ string c; c.reserve(100); string a; a.reserve(100); string ...原创 2017-05-12 09:42:03 · 327 阅读 · 0 评论 -
POJ 1151 Atlantis 笔记
n张地图。给出左上角坐标,右下角坐标。求n张地图的总面积。原创 2017-05-13 21:30:19 · 189 阅读 · 0 评论 -
POJ 1150 The Last Non-zero Digit 已翻译
描述在这个问题,你会得到两个十进制整数N,M。你必须找到NPM的最后一个非零数字。这意味着没有N个东西的排列,每次取M。输入输入包含几行输入。 输入文件的每一行包含两个整数N(0 输出对于输入的每一行,您应该输出一个数字,这是NPM的最后一个非零数字。 例如,如果NPM为720,则最后一个非零数字为2.因此在这种情况下,您的输出应为2。原创 2016-12-23 21:50:14 · 262 阅读 · 0 评论 -
POJ 1128 Frame Stacking 笔记
高h宽w的平面叠加多个图片。求从低到顶的图片顺序。原创 2017-05-12 08:11:52 · 570 阅读 · 0 评论 -
POJ 1100 Dreisam Equations 笔记
在等式两边添加加、减、乘三种符号使两边相等。除括号外,三个符号的优先级相等。原创 2017-05-03 17:59:18 · 589 阅读 · 0 评论 -
POJ 1101 The Game G++ bfs 巧妙 背
游戏中有方块有空白。给出每对方块,判断走空白多少段线段能连接起来。原创 2017-05-03 18:10:38 · 417 阅读 · 0 评论 -
POJ 1103 Maze 笔记
如图。给出迷宫,判断能否形成圆,长度是多少。原创 2017-05-03 18:22:32 · 830 阅读 · 0 评论 -
POJ 1130 Alien Security 笔记
布置卫兵保护ET。多个房间单向连接。游客从房间0进入。在距离ET房间最近的房间布置卫兵对游客进行检查。原创 2017-05-12 15:21:08 · 652 阅读 · 0 评论 -
POJ 1125 Stockbroker Grapevine G++ Floyd 背
股票谣言在熟人中传播。每个投资人有n个熟人,给出n对信息,熟人号码从1开始,收到假信息时间。求谣言起点,谣言在所有人之间传播的最短时间。原创 2017-05-12 05:45:41 · 324 阅读 · 0 评论 -
POJ 1104 Robbery 笔记
矩形城市,宽W,高H。有强盗强银行,单位时间只能移动一个单位长度,封锁时间t。给出n条信息。每条信息的格式:ti Li Ti Ri Bi。表示时间ti,左、上、右、下组成的矩形区域没有强盗。求在封锁期间强盗每一步的位置。原创 2017-05-03 18:45:51 · 317 阅读 · 0 评论