
POJ 3700-3799
woniupengpeng
这个作者很懒,什么都没留下…
展开
-
POJ 3714 Raid G++ 多点间最短距离 分治没实现 枚举实现巧妙 背
给你一些加油站A的坐标,一些需要基地B的坐标,问你这两者之间的最小值。原创 2017-02-14 09:15:41 · 269 阅读 · 0 评论 -
POJ 3715 Blue and Red G++ 例题 二分图匹配 背
#include <iostream>#include <cstdio>#include <cstring>#include <vector>using namespace std;//英语 看博友分析 抄博友程序 例题 二分图匹配 背 int da[220];vector<int> g[220];int used[220]; int vis[220];int lin...原创 2020-08-30 15:35:49 · 94 阅读 · 0 评论 -
POJ 3764 The xor-longest Path G++ 字典树求最大异或 没掌握
#include <cstdio>#include <iostream>#include <vector>#include <cstring>#define MAXN 212222#define MAXM 6122222using namespace std;//英语 看博友分析 抄博友程序 抄的多 字典树求最大异或 没掌握 int n;int head[200008];int vis[200008];struct ...原创 2020-05-09 08:57:13 · 150 阅读 · 0 评论 -
POJ 3767 I Wanna Go Home G++ dijkstra实现 spfa未实现 背
在一个国家有两个group,记做1和2,N个city,每个city属于1或者2。每两个city间有一定的距离,现在要从city1去city2,问最短的距离是多少,要求至多只有一次穿越时跨过分属不同group的city。city1总是属于group1,city2总属于group2。原创 2017-02-14 20:08:37 · 251 阅读 · 0 评论 -
POJ 3783 Balls G++ dp 背
#include <iostream> #include <cstring>using namespace std;//看博友好分析 抄博友程序 dp 背 int dp[1008][60];//表示i层楼j个蛋的最坏情况最优解 int main() { memset(dp,0x3f,sizeof(dp)); for(int j=0;j<...原创 2020-05-04 09:28:17 · 253 阅读 · 0 评论 -
POJ 3761 Bubble Sort G++ 逆序对 排列组合 背
#include <iostream>#include <cstdio>using namespace std;//英语 看博友分析 抄博友程序 代入数易理解 逆序对 排列组合 背 long long fac[1000008];long long mod;long long qpow(long long a,long long n){ lo...原创 2020-05-04 07:44:40 · 135 阅读 · 0 评论 -
POJ 3784 Running Median G++ 堆巧妙 求动态中位数 背
#include <iostream>#include <queue>#include <cstdio>#include <vector>#include <functional>using namespace std;//英语 抄博友程序 堆巧妙 求动态中位数 背 int main(){ int T...原创 2020-05-03 17:13:34 · 152 阅读 · 0 评论 -
POJ 3737 UmBasketella G++ 三分 背
#include <iostream>#include <cmath>#include <iomanip>using namespace std;//英语 看博友分析 抄博友程序 不均匀三分未实现 均匀三分 背 // 圆锥侧面积公式 s=ip*r*l 圆锥体积公式 v=(1/3.0)*h*ip*r*rdouble s;//圆锥表面积...原创 2020-05-03 11:25:32 · 199 阅读 · 0 评论 -
POJ 3720 Occurrence of Digits G++ 需复习
#include <iostream>#include <cstdio>#include <map>using namespace std;//英语 抄博友程序 学习博友程序 需复习 int dp[104][14];map<int,int> mp;void cal(int x)//15 对着博友程序修改 博友程序易读简洁 ...原创 2017-02-14 09:33:52 · 248 阅读 · 0 评论 -
POJ 3705 Reverse G++ 规律背
一个递增的序列,通过(pos1,length,pos2)这个命令移动,最少要移动多少次能使数列编程递减的。(pos1,length,pos2)的意思是把pos1开始的length个元素移动到已经把length个元素移除的数列的pos2位置后,如果pos2等于0就把它移动到最开头。原创 2017-02-14 08:54:39 · 279 阅读 · 0 评论 -
POJ 3753 根据关键字进行字符串拷贝 G++
#include #include #include using namespace std;//谢谢博友程序 int main(){ vector jg; while(1) { string s; cin>>s; if(cin.eof()==1) { break; } if(s=="END") { continue; } vec原创 2017-01-31 20:40:38 · 355 阅读 · 0 评论 -
POJ 3750 小孩报数问题 G++
#include #include #include using namespace std;int main(){ int NUM; cin>>NUM; vector a; for(int i=0;i<NUM;i++) { string t; cin>>t; a.push_back(t); } char c; int ks; int shu; cin>>原创 2017-01-31 20:36:36 · 221 阅读 · 0 评论 -
POJ 3709 K-Anonymous Sequence 笔记
长度为 n 的非严格递增数列 a0, a1, ..., an-1。每次操作使其中一个数的值减一。要求每个数在数列中至少有 k-1 个其它数与它相等。求最少操作次数。原创 2017-10-08 13:12:54 · 273 阅读 · 0 评论 -
POJ 3734 Blocks G++ 矩阵的幂没实现 组合数学 7.3例题 带模除法 指数生成函数 看书
N个方块排成一列,用红、蓝、绿、黄染色。要求红色和绿色方块个数均为偶数,求方案数。原创 2017-10-07 19:22:42 · 250 阅读 · 0 评论 -
POJ 3723 Conscription G++ kruskal实现 prim未实现
征募士兵,N名女兵,M位男兵,R条男女关系,女兵x与男兵y的关系值d。征募某人的费用是:10000-已征募人中与自己最大的关系值。求征募所有人的最小费用。原创 2017-10-07 15:40:31 · 271 阅读 · 0 评论