
POJ 2200-2299
woniupengpeng
这个作者很懒,什么都没留下…
展开
-
POJ 2265 Bee Maja G++ 找规律 巧妙 背
#include <iostream>#include <cstdio>using namespace std;//英语 看博友分析 抄博友程序 找规律 巧妙 背 int main(){ int a; while(cin>>a) { if(a==1) { cout<<0<<" "<<0<<endl; continue; ...原创 2020-09-24 08:16:23 · 162 阅读 · 0 评论 -
POJ 2239 Selecting Courses G++ 二分图最大匹配 背
#include <iostream>#include <vector>#include <cstring>using namespace std;//抄博友程序 看博友好分析 二分图最大匹配 背 vector<int> G[10001];int link[10001];int vis[10001]; bool ...原创 2020-04-27 07:55:44 · 128 阅读 · 0 评论 -
POJ 2251 Dungeon Master G++
<span title="Description">描述你被困在一个3D地牢,需要找到最快的出路!地牢是由单位立方体组成,可以或不可以用岩石填充。将一个单位向北,南,东,西,上或下移动需要一分钟。<span title="You cannot move diagonally and the maze is surrounded by solid rock on all sides.原创 2016-12-26 16:14:48 · 862 阅读 · 0 评论 -
POJ 2299 Ultra-QuickSort G++ 归并排序背 树状数组未实现
#include <cstdio>#include <iostream>#include <cstring> using namespace std;//抄博友程序 看博友分析 求逆序对 归并排序背 树状数组未实现 int da[500008];int b[500008];long long jg;//抄博友程序void ...原创 2020-04-25 07:28:02 · 145 阅读 · 0 评论 -
POJ 2210 Metric Time G++
#include <iostream>#include <cstdio>using namespace std;int hs[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};int he[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};int tian(in...原创 2020-03-24 21:18:38 · 127 阅读 · 0 评论 -
POJ 2287 Tian Ji -- The Horse Racing G++
#include <iostream>#include <vector>#include <algorithm>#include <functional>using namespace std;//抄博友程序 经典 vector<int> a;vector<int> b;int main(){...原创 2020-03-09 16:49:56 · 164 阅读 · 0 评论 -
POJ 2245 Lotto G++
给出k个数,挑出6个,求所有组合。#include <iostream>#include <vector>#include <algorithm>using namespace std;//谢谢写书的老师 int main(){ while(1) { int n; cin>>n; if(n==0) { ...原创 2017-06-16 20:44:55 · 355 阅读 · 0 评论 -
POJ 2242 The Circumference of the Circle G++ 海伦公式 三角形外接圆半径公式 背
给出不共线的3点坐标,求所确定圆的周长。原创 2017-06-16 20:38:23 · 365 阅读 · 0 评论 -
POJ 2243 Knight Moves G++
国际象棋标准棋盘,给出马的起点位置和终点位置,求最小移动步数。 #include <iostream>#include <queue>#include <string>#include <cstring>using namespace std;int bz[8][8];int main(){ int tx[8]={1...原创 2017-06-16 20:32:28 · 187 阅读 · 0 评论 -
POJ 2234 Matches Game 笔记
M堆火柴,给出每堆的数量。每回合可取某一堆的任意数量的火柴。无火柴可取输。判断先手玩家是否能赢。原创 2017-06-16 17:47:39 · 227 阅读 · 0 评论 -
POJ 2232 New Stone-Forfex-Cloth Game 笔记
N个小朋友围成一圈。,S代表石头,F代表剪刀,C代表布,小朋友A起立与逆时针与其它小朋友比较,输的出圈,直到只剩下一人为赢家。求可能的赢家数。原创 2017-06-16 17:02:17 · 241 阅读 · 0 评论 -
POJ 2231 Moo Volume G++ 贪心 背
N头牛站成直线,给出每头牛的位置。求每头牛到其它牛距离之和的总和。原创 2017-06-16 16:46:07 · 173 阅读 · 0 评论 -
POJ 2217 Secretary 笔记
求两个字符串中最长相同子串的长度。原创 2017-06-16 16:20:40 · 205 阅读 · 0 评论 -
POJ 2229 Sumsets G++ 动态规划 背
描述农夫约翰命令他的母牛搜索不同的数字,总和到一个给定的数字。 牛只使用为2的整数幂的数字。这是可能的数字集合,总和为7:1)1 + 1 + 1 + 1 + 1 + 1 + 12)1 + 1 + 1 + 1 + 1 + 23)1 + 1 + 1 + 2 + 24)1 + 1 + 1 + 45)1 + 2 + 2 + 26)1 + 2 + 4帮助FJ计算给原创 2016-12-03 10:29:38 · 396 阅读 · 0 评论 -
POJ 2209 The King G++
#include #include using namespace std;//谢谢博友翻译 int main(){ int NUM; int m; cin>>NUM>>m; int sum=0; for(int i=0;i<NUM;i++) { int t; cin>>t; t=pow(t,m); if(t>0) { sum=sum+t; }原创 2017-03-28 19:41:26 · 392 阅读 · 0 评论 -
POJ 2244 Eeny Meeny Moo 笔记
约瑟夫问题,n个城市,围成一圈。选择m,数到m出列,以此类推,使得城市2留到最后。原创 2017-06-16 20:55:07 · 251 阅读 · 0 评论 -
POJ 2240 Arbitrage G++ floyd需复习 bellman_flod未实现 spfa未实现
n种货币,给出m对货币的汇率。求只进行货币交易能否获利。原创 2017-06-16 21:21:38 · 209 阅读 · 0 评论 -
POJ 2226 Muddy Fields G++ 二分图匹配 巧妙 没掌握
<span title="Description">描述雨已经挤压了牛场,R行和C列的矩形网格(1 虽然对草有好处,雨使一些裸露的土地相当泥泞。<span title="The cows, being meticulous grazers, don't want to get their hooves dirty while they eat.">奶牛,细心的吃草者,不想让他们的蹄原创 2016-12-17 19:06:16 · 254 阅读 · 0 评论 -
POJ 2208 Pyramids 笔记
已知四面体ABCD的边AB,AC,AD,BC,BD,CD的长度。求四面体的体积。原创 2017-06-16 16:05:35 · 257 阅读 · 0 评论 -
POJ 2233 GAME AGAIN! 笔记
在N个点M条边的无向图上玩游戏,给出每条边的端点。alice先走,开始时棋子可以放在任意顶点处,之后每一步必须放在对手最后放棋的邻接点,无处可走只能认输。都竭尽全力,求赢家。原创 2017-06-16 17:26:30 · 292 阅读 · 0 评论 -
POJ 2235 Triangularize the Convex Hull 笔记
n个顶点,给出坐标。如图,凸包的三角剖分,求所有三角形的最小角度。原创 2017-06-16 17:59:38 · 364 阅读 · 0 评论 -
POJ 2241 The Tower of Babylon 笔记
n种砖,每种有无限块,第 i 种砖边长分别为 xi,yi,zi。上一层砖的基座一定小于下一层砖的基座。求堆成塔的最大高度。原创 2017-06-16 21:12:01 · 270 阅读 · 0 评论 -
POJ 2248 Addition Chains 笔记
<span title="•a0 = 1">求满足下列条件的数列。<span title="•a0 = 1">•a0 = 1<span title="•am = n">•am = n<span title="•a0 < a1 < a2 < ... < am-1 < am">•a0 <span title="•For each k (1<=k<=m) th原创 2017-06-16 21:47:46 · 281 阅读 · 0 评论 -
POJ 2253 Frogger 笔记
给出湖中n块石头的坐标,求青蛙从石头1到达石头2所要跳的最长距离的最小值。原创 2017-06-16 22:21:18 · 178 阅读 · 0 评论 -
POJ 2271 HTML G++
#include #include #include using namespace std;int main(){ vector jg; while(1) { string str; cin>>str; if(cin.eof()==1) { break; } jg.push_back(str); } int sum=0; for(int i=0原创 2017-10-02 09:18:03 · 198 阅读 · 0 评论 -
POJ 2260 Error Correction G++
#include #include using namespace std;int main(){ int a[1000]; int b[1000]; memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); int n=0; while(1) { int m; cin>>m; if(m==0) { break; }原创 2016-11-12 21:42:11 · 248 阅读 · 0 评论 -
POJ 2262 Goldbach's Conjecture G++
使用两个素数之和表示n,如有多个可能,输出两素数之差最大的。原创 2017-06-16 22:44:44 · 234 阅读 · 0 评论 -
POJ 2255 Tree Recovery G++
给出树的前序遍历和中序遍历,求树的后序遍历。原创 2017-06-16 22:35:47 · 157 阅读 · 0 评论 -
POJ 2249 Binomial Showdown G++ 组合数 杨辉三角未实现 Pascal背 递推式背
从n个数中挑出k个数的组合数。原创 2017-06-16 21:55:36 · 207 阅读 · 0 评论 -
POJ 2247 Humble Numbers G++
只由因子2,3,5,7组成的数称为humble数,所有humble数按升序排列。求第n个humble数。#include <iostream>#include <cmath>#include <algorithm>#include <vector>//#include <iomanip>using name...原创 2017-06-16 21:36:18 · 226 阅读 · 0 评论 -
POJ 2236 Wireless Network G++
<span title="Description">描述地震发生在东南亚。 ACM(亚洲合作医疗团队)与膝上型计算机建立了无线网络,但是意外的余震遭到攻击,网络中的所有计算机都被破坏。计算机逐个修复,网络逐渐开始重新工作。由于硬件限制,每台计算机只能直接与不超过d米的计算机通信。但是每个计算机都可以被视为两个其他计算机之间的通信的中介,也就是说,如果计算机A和计算机B可以直接通信,原创 2016-12-09 19:06:39 · 242 阅读 · 0 评论