码迷,mamicode.com
首页 >  
搜索关键字:using password: yes    ( 53562个结果
状压dp
###P2915 [USACO08NOV]Mixed Up Cows G dfs去做 #include<iostream> #include<cstdio> #include<cmath> #include<cstring> #define ll long long using namespace ...
分类:其他好文   时间:2020-11-11 15:59:42    阅读次数:7
盛最多水的容器(leetcode-11)
题目 给你$n$个非负整数$a_1,a_2,...,a_n$每个数代表坐标中的一个点$(i, a_i)$。在坐标内画$n$条垂直线,垂直线$i$的两个端点分别为$(i, a_i)\(和\)(i, 0)$。找出其中的两条线,使得它们与$x$轴共同构成的容器可以容纳最多的水。 说明:你不能倾斜容器。 示 ...
分类:其他好文   时间:2020-11-10 11:14:35    阅读次数:8
完全背包
1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 5 const int N=1010; 6 7 int dp[N][N]; 8 int w[N],v[N]; 9 int n,m; 10 11 int main() ...
分类:其他好文   时间:2020-11-10 10:43:32    阅读次数:7
HDU 1010 搜索 奇偶剪枝
#include<iostream> #include<cstring> #include<cmath> using namespace std; char map[8][8]; int n, m, t; int dir[4][2]={{1,0},{-1,0},{0,1},{0,-1}}; bool ...
分类:其他好文   时间:2020-11-08 17:14:10    阅读次数:17
POJ 1054 搜索
#include<iostream> #include<memory.h> #include<cmath> #include<algorithm> using namespace std; typedef struct { int x, y; }node; node d[6000]; int r, ...
分类:其他好文   时间:2020-11-08 17:11:46    阅读次数:15
欧拉筛法模板代码
#include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #define MAXN 100000 using namespace std; int pri[MAXN];///质数数列 bool vis[MAXN ...
分类:其他好文   时间:2020-11-08 17:07:41    阅读次数:13
四则运算
#include #include <string.h> #define size 10 using namespace std; //含有一个二元算数式的三个值 typedef struct{ float x = 0,y = 0; //x,y为给定的随机数 float r = 0; //r为算数式 ...
分类:其他好文   时间:2020-11-08 17:05:55    阅读次数:19
P2692 覆盖
题目如下: 思路: 1.如果直接for循环肯定无法满分 2.先算出行的所有格子 再加上列的所有格子(注意列的格子不是全部加上,加上除了行没有覆盖的那个别的格子) 代码如下: #include<cstdio> #include<iostream> #include<cstring> using nam ...
分类:其他好文   时间:2020-11-07 16:54:41    阅读次数:22
c++模板详解
写在前面:函数模板是通用的函数描述,也就是说,它们使用泛型来定义函数,其中的泛型可用具体的类型(如int或double)替换。通过将类型作为参数传递给模板,可使编译器生成该类型的函数。由于模板允许以泛型(而不是具体类型)的方式编写程序,因此有时也被称为通用编程。由于类型是用参数表示的,因此模板特性有 ...
分类:编程语言   时间:2020-11-07 16:46:28    阅读次数:20
DSA 2020 8.1-8.10
8.1 PAT dfs+dijkstra 重做 // PAT 1018 #include<stdio.h> #include<vector> #include<map> #include<algorithm> using namespace std; const int N = 600; const ...
分类:其他好文   时间:2020-11-07 16:44:48    阅读次数:17
53562条   上一页 1 ... 66 67 68 69 70 ... 5357 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!