网站首页 站内搜索

搜索结果

查询Tags标签: POJ,共有 63条记录
  • POJ-3484 Showstopper 题解

    POJ-3484 Showstopper 【二分-最大值最小化】 题目: Data-mining huge data sets can be a painful and long lasting process if we are not aware of tiny patterns existing within those data sets. One reputable company has recently discovered a tiny bug in th…

    2021/10/1 23:14:12 人评论 次浏览
  • 算法题目——多米诺骨牌问题(POJ-2663)

    题目链接:POJ-2663 设有形状一样的多米诺牌,每张牌恰好覆盖棋盘上相邻的两个方格,即一张多米诺牌是一张 1 行 2 列或者 2 行 1 列的牌。那么,是否能够把 32 张多米诺牌摆放到棋盘上,使得任何两张多米诺牌均不重叠,每张多米诺牌覆盖两个方格,并且棋盘上所有的方格都…

    2021/10/1 22:10:58 人评论 次浏览
  • 算法题目——多米诺骨牌问题(POJ-2663)

    题目链接:POJ-2663 设有形状一样的多米诺牌,每张牌恰好覆盖棋盘上相邻的两个方格,即一张多米诺牌是一张 1 行 2 列或者 2 行 1 列的牌。那么,是否能够把 32 张多米诺牌摆放到棋盘上,使得任何两张多米诺牌均不重叠,每张多米诺牌覆盖两个方格,并且棋盘上所有的方格都…

    2021/10/1 22:10:58 人评论 次浏览
  • bzoj2287. 【POJ Challenge】消失之物

    方法一: $\mathrm{f[x]}$ 表示所有物品凑成体积为 $\mathrm{x}$ 的方案数. $\mathrm{g[x][j]}$ 表示不用 $\mathrm{x}$ 物品组成体积为 $\mathrm{j}$ 的方案数. 然后 $\mathrm{g}$ 数组可以用 $\mathrm{f,g}$ 容斥搞一波. 时间复杂度为 $\mathrm{O(nm)}$. 方法二…

    2021/9/15 6:34:44 人评论 次浏览
  • bzoj2287. 【POJ Challenge】消失之物

    方法一: $\mathrm{f[x]}$ 表示所有物品凑成体积为 $\mathrm{x}$ 的方案数. $\mathrm{g[x][j]}$ 表示不用 $\mathrm{x}$ 物品组成体积为 $\mathrm{j}$ 的方案数. 然后 $\mathrm{g}$ 数组可以用 $\mathrm{f,g}$ 容斥搞一波. 时间复杂度为 $\mathrm{O(nm)}$. 方法二…

    2021/9/15 6:34:44 人评论 次浏览
  • poj 2243(bfs结构体)

    #include<iostream> #include<cstring> #include<cstdio> #include<queue> using namespace std; int ans; int data[10][10],visit[10][10]; struct Node{int x,y;Node(int a,int b):x(a),y(b){}Node(){x = -1;y = -1;} }; Node pre[10][10]; qu…

    2021/8/19 6:06:30 人评论 次浏览
  • poj 2243(bfs结构体)

    #include<iostream> #include<cstring> #include<cstdio> #include<queue> using namespace std; int ans; int data[10][10],visit[10][10]; struct Node{int x,y;Node(int a,int b):x(a),y(b){}Node(){x = -1;y = -1;} }; Node pre[10][10]; qu…

    2021/8/19 6:06:30 人评论 次浏览
  • poj 3979(水题)

    #include<iostream> #include<cstdio> #include<cstring> using namespace std; int gcd(int a,int b){int t;if(a==0)return b;while(b){t = a%b;a = b;b = t;}return a; } int main(){int t,a,b,c,d,p,q;char data[10];while(scanf("%s",da…

    2021/8/10 23:38:13 人评论 次浏览
  • poj 3979(水题)

    #include<iostream> #include<cstdio> #include<cstring> using namespace std; int gcd(int a,int b){int t;if(a==0)return b;while(b){t = a%b;a = b;b = t;}return a; } int main(){int t,a,b,c,d,p,q;char data[10];while(scanf("%s",da…

    2021/8/10 23:38:13 人评论 次浏览
  • 图论题集500

    转载:https://blog.csdn.net/luomingjun12315/article/details/47438607 =============================以下是最小生成树+并查集======================================【HDU】1213 How Many Tables 基础并查集★1272 小希的迷宫 基础并查集★1325&&po…

    2021/8/4 23:09:46 人评论 次浏览
  • 图论题集500

    转载:https://blog.csdn.net/luomingjun12315/article/details/47438607 =============================以下是最小生成树+并查集======================================【HDU】1213 How Many Tables 基础并查集★1272 小希的迷宫 基础并查集★1325&&po…

    2021/8/4 23:09:46 人评论 次浏览
  • POJ 2750 Potted Flower

    传送门 大半年时间没练习,已经什么也不会了 == 为了维护区间最大子区间和,容易想到线段树区间合并,需要维护包含左/右端点的最大子区间和。 至于环状结构,可以通过二选一来等价得到答案,因此还需要维护区间最小子区间和。 注意特判不能全选。 #include <algorithm…

    2021/8/4 6:06:44 人评论 次浏览
  • POJ 2750 Potted Flower

    传送门 大半年时间没练习,已经什么也不会了 == 为了维护区间最大子区间和,容易想到线段树区间合并,需要维护包含左/右端点的最大子区间和。 至于环状结构,可以通过二选一来等价得到答案,因此还需要维护区间最小子区间和。 注意特判不能全选。 #include <algorithm…

    2021/8/4 6:06:44 人评论 次浏览
  • poj 1020(回溯+dfs)

    #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; int d[11],n,s,visit[50]; bool dfs(int num){int i,j,wide;if(num==n)return true;int pos;int minx = 100;for(j=1;j<=s;j++){if(minx>…

    2021/8/3 6:07:35 人评论 次浏览
  • poj 1020(回溯+dfs)

    #include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; int d[11],n,s,visit[50]; bool dfs(int num){int i,j,wide;if(num==n)return true;int pos;int minx = 100;for(j=1;j<=s;j++){if(minx>…

    2021/8/3 6:07:35 人评论 次浏览
扫一扫关注最新编程教程