码迷,mamicode.com
首页 >  
搜索关键字:15-puzzle problem    ( 37568个结果
P2814 家谱【map型的并查集】
题目 https://www.luogu.com.cn/problem/P2814 思路 我们跨一使用string类型的map直接进行并查集! 注意这种形式的map的初始化!! 代码 #include<iostream> #include<cstdio> #include<string> #incl ...
分类:其他好文   时间:2020-06-28 22:21:52    阅读次数:51
Codeforce 1335C - Two Teams Composing 统计技能种类数量+统计同一技能最大数量
[codeforces 1335C] Two Teams Composing 统计技能种类数量+统计同一技能最大数量 https://codeforces.com/contest/1335/problem/C 7 4 2 4 1 4 3 4 统计技能种类数量 4种不同技能 统计同一技能最大数量 技能 ...
分类:其他好文   时间:2020-06-28 22:18:27    阅读次数:90
P5250 【深基17.例5】木材仓库【set+二分】
题目 https://www.luogu.com.cn/problem/P5250 思路 使用set在寻找合适的木头的时候使用二分,但是一个set使用好像不能同时使用lower_bound(a)与lower_bound(a,greater<int>())? 于是菜菜的使用lower_bound找到大 ...
分类:其他好文   时间:2020-06-28 22:11:35    阅读次数:62
[USACO10MAR]Great Cow Gathering G(换根dp)
[USACO10MAR]Great Cow Gathering G 换根dp模板题。 同时记录$sz[u]$代表$u$的子树内有多少奶牛,那转移时即为$dp[u]=dp[v]+sz[v] \times val(u,v)$。 注意开long long。 #include <bits/stdc++.h> ...
分类:其他好文   时间:2020-06-28 22:09:00    阅读次数:49
LeetCode | 0700. Search in a Binary Search Tree二叉搜索树中的搜索【Python】
LeetCode 0700. Search in a Binary Search Tree二叉搜索树中的搜索【Easy】【Python】【二叉树】 Problem LeetCode Given the root node of a binary search tree (BST) and a val ...
分类:编程语言   时间:2020-06-28 20:49:28    阅读次数:61
假的数论gcd,真的记忆化搜索(Codeforce 1070- A. Find a Number)
题目链接: 原题:http://codeforces.com/problemset/problem/1070/A 翻译过的训练题:https://vjudge.net/contest/361183#problem/A 题目大意: 给你两个正整数p和x,让你求出最小的正整数m,满足m被p整除且m的各数 ...
分类:其他好文   时间:2020-06-28 20:38:58    阅读次数:51
LeetCode | 0450. Delete Node in a BST 删除二叉搜索树中的节点【Python】
LeetCode 0450. Delete Node in a BST 删除二叉搜索树中的节点【Medium】【Python】【二叉树】 Problem LeetCode Given a root node reference of a BST and a key, delete the node ...
分类:编程语言   时间:2020-06-28 20:37:59    阅读次数:51
LeetCode | 0701. Insert into a Binary Search Tree 二叉搜索树中的插入操作【Python】
LeetCode 0701. Insert into a Binary Search Tree 二叉搜索树中的插入操作【Medium】【Python】【二叉树】 Problem LeetCode Given the root node of a binary search tree (BST) an ...
分类:编程语言   时间:2020-06-28 20:34:28    阅读次数:44
31. Next Permutation
package LeetCode_31 /** * 31. Next Permutation * https://leetcode.com/problems/next-permutation/description/ * Implement next permutation, which rearr ...
分类:其他好文   时间:2020-06-28 18:53:29    阅读次数:51
D. Yet Another Yet Another Task (ST表模版 + 单调队列)
题目链接:https://codeforces.com/contest/1359/problem/D 想法: 因为是减去最大值,我们可以考虑直接枚举最大值。 找到左边最后一个 小于等于a[i] 的位置,找到右边最后一个 小于等于a[i] 的位置 找到这样的一个子区间,然后我们利用ST表维护前缀和,找 ...
分类:其他好文   时间:2020-06-28 00:01:11    阅读次数:80
37568条   上一页 1 ... 61 62 63 64 65 ... 3757 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!