网站首页 站内搜索

搜索结果

查询Tags标签: POJ,共有 63条记录
  • POJ - 3279 Fliptile 【状态压缩、dfs】

    题目简述Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M N grid (1 ≤ M ≤ 15; 1 ≤ N ≤ 15) of square tiles, each of which is colo…

    2022/7/1 23:20:46 人评论 次浏览
  • 题单:数学

    1.burnside 定理,polya 计数法 简单题:2409 -- Let it Bead (poj.org)2154 -- Color (poj.org)1286 -- Necklace of Beads (poj.org) 强烈推荐:2888 -- Magic Bracelet (poj.org)2. 置换,置换的运算 简单题3207 -- Ikkis Story IV - Pandas Trick (poj.org)1026 -- …

    2022/4/9 23:21:11 人评论 次浏览
  • poj 1068

    1、注意理解题意 2、注意输出格式 代码: #include <cstdio>#include<iostream>#include<vector>using namespace std; int main() { int t; cin >> t; while (t--) { int num; cin >> num; vector<int> vec; while (num--) { …

    2022/3/5 23:19:58 人评论 次浏览
  • 算法训练营 刷题

    STL应用 vector HDU 3527 STL应用 map HDU 3527 STL应用 queue poj 1915 STL应用 set hdu 1412 STL应用 map poj 2418 STL应用 map HDU 1263 STL应用 stack 计蒜客 T1655 线段树 HDU - 1166 敌兵布阵 线段树 POJ - 3468 A Simple Problem with Integers 线段树 poj 2777 C…

    2022/2/20 14:28:03 人评论 次浏览
  • 算法杂题题解 合集

    练习专题 kaungbin oj专题算法训练营 入门篇 题库 https://vjudge.net/article/2652 进阶篇 题库 https://vjudge.net/article/2642 挑战程序设计竞赛(第二版)题集 https://vjudge.net/article/46其他学习习题 秋实大哥与花 线段树模板 poj 3233 矩阵快速幂 poj 3070 …

    2022/2/20 14:26:53 人评论 次浏览
  • POJ 3263参考系问题

    1 Tallest Cow2 Time Limit: 2000MS Memory Limit: 65536K3 Total Submissions: 8878 Accepted: 38314 Description5 6 FJs N (1 ≤ N ≤ 10,000) cows conveniently indexed 1..N are standing in a line. Each cow has a positive integer height (which …

    2022/2/13 23:15:56 人评论 次浏览
  • 【POJ】1458 Common Subsequence

    最长公共子序列问题是动态规划的经典问题之一,对于长度分别为n和m的两个序列,若是最后一个元素是一样的,那么我们只需要看长度分别为n-1和m-1的两个序列,若是不一样,则需要比较长度分别为n-1和m的两个序列或者长度分别为n和m-1的两个序列哪个的公共子序列是最长的。 …

    2022/2/8 23:22:30 人评论 次浏览
  • POJ 1742 Coins

    题目链接:POJ 1742 Coins 题目大意: 给出硬币面额及每种硬币的个数,求从\(1\)到\(m\)能凑出面额的个数。 题解: 设\(dp[i][j]\)为前\(i\)种面值的硬币组成面额\(j\)时,第\(i\)种硬币剩余的数量。 默认\(dp[i][j] = -1\),表示无法组成面额\(j\)。 若\(dp[i - 1][j]\g…

    2022/1/29 23:07:31 人评论 次浏览
  • 【POJ】2488 A Knight‘s Journey

    因为需要输出完整的访问路径,因此采用DFS比较好,注意因为题目要求按照字典序输出,因此direction数组只能有一种构造方式: #include <iostream> #include <cstdio> #include <string> #include <cstring>using namespace std;int direction[8]…

    2022/1/29 23:05:27 人评论 次浏览
  • POJ-1988-Cube Stacking

    题目大意:给定编号为1到30000的小块。可以进行合并和查询两种操作合并:将含有x的整块摞到含有y的整块上面,合并成一个新的整块 查询:输出x下方的块的数量一眼并查集,但就是不知道怎么写。想了很久才想到要以每个整块的底块作为并查集的根,并维护某个块底下的小块的数…

    2022/1/20 0:00:50 人评论 次浏览
  • POJ-1988-Cube Stacking

    题目大意:给定编号为1到30000的小块。可以进行合并和查询两种操作合并:将含有x的整块摞到含有y的整块上面,合并成一个新的整块 查询:输出x下方的块的数量一眼并查集,但就是不知道怎么写。想了很久才想到要以每个整块的底块作为并查集的根,并维护某个块底下的小块的数…

    2022/1/20 0:00:50 人评论 次浏览
  • POJ-2387 最短路之迪杰斯特拉算法

    Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get back as quickly as possible. Farmer Johns field has …

    2022/1/15 22:33:28 人评论 次浏览
  • POJ-2387 最短路之迪杰斯特拉算法

    Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get back as quickly as possible. Farmer Johns field has …

    2022/1/15 22:33:28 人评论 次浏览
  • poj 1321(dfs,类似八皇后问题)

    #include<iostream> #include<cstring> using namespace std; int n,k,total,m; char ch[10][10]; bool book[10]; void dfs(int cur){if(m==k){total++;return;}if(cur>=n){return;}for(int i=0;i<n;i++){if(!book[i]&&ch[cur][i]==#){m++;boo…

    2021/12/1 23:08:36 人评论 次浏览
  • poj 1321(dfs,类似八皇后问题)

    #include<iostream> #include<cstring> using namespace std; int n,k,total,m; char ch[10][10]; bool book[10]; void dfs(int cur){if(m==k){total++;return;}if(cur>=n){return;}for(int i=0;i<n;i++){if(!book[i]&&ch[cur][i]==#){m++;boo…

    2021/12/1 23:08:36 人评论 次浏览
共63记录«上一页12345下一页»
扫一扫关注最新编程教程