码迷,mamicode.com
首页 >  
搜索关键字:struct    ( 18973个结果
HDU 4923
题目大意: 给出一串序列Ai{0,1},求一个序列Bi[0,1](Bi#include #include using namespace std;struct Edge{ int sum,len;};int a[1000005];stack q;int main(){ //freope...
分类:其他好文   时间:2014-08-08 01:55:25    阅读次数:233
10034 - Freckles 克鲁斯克尔最小生成树!~
1 /* 2 10034 - Freckles 3 克鲁斯克尔最小生成树!~ 4 */ 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 11 struct node{12 double x, y;13...
分类:其他好文   时间:2014-08-08 01:54:15    阅读次数:234
数据结构。顺序表
#include #include #define LIST_INIT_SIZE 100#define LIST_INCREMENT 10typedef struct Point //element type{ int x; int y;}Point;typedef Point ElemType;t...
分类:其他好文   时间:2014-08-08 01:48:05    阅读次数:292
HDU 4930 Fighting the Landlords(暴力枚举+模拟)
HDU 4930 Fighting the Landlords 题目链接 题意:就是题中那几种牌型,如果先手能一步走完,或者一步让后手无法管上,就赢 思路:先枚举出两个人所有可能的牌型的最大值,然后再去判断即可 代码: #include #include #include using namespace std; struct Player { int...
分类:其他好文   时间:2014-08-07 23:10:59    阅读次数:277
HDU 4930 Fighting the Landlords 模拟
_(:зゝ∠)_ 4带2居然不是炸弹,, #include #include #include #include #include #include #include #include using namespace std; #define N 18 #define inf 1000000 #define ll int struct node{ int a[N]; ...
分类:其他好文   时间:2014-08-07 23:04:35    阅读次数:356
uva 1347 - Tour
#include #include #include #include #include using namespace std; const int maxn = 1010; double d[maxn][maxn]; int n; struct node { double x,y; }a[maxn]; double dist(int p1,int p2) { double ...
分类:其他好文   时间:2014-08-07 19:12:00    阅读次数:182
uva 437 The Tower of Babylon(动态规划 嵌套矩形问题最长路)
有思路就去做,要相信自己 多处理更复杂的情况,你就不觉得现在复杂了 #include #include #include using namespace std; typedef long long ll; struct soli { ll a,b,c; }s[40]; int n; ll d[40][3]; int vis[40][3]; ll answer[40][3]; ll ...
分类:其他好文   时间:2014-08-07 19:07:30    阅读次数:278
线段树模板
//线段树模板 struct line { int left,right;//左端点、右端点 int n;//记录这条线段出现了多少次,默认为0 }; struct line a[100]; int sum; //建立 void build(int s,int t,int n) { int mid=(s+t)/2; a[n].left=s; a[n].right=t;...
分类:其他好文   时间:2014-08-07 19:06:20    阅读次数:218
HDU-4930 Fighting the Landlords 多校训练赛斗地主
只需要判断一个回合就可以了,枚举判断可以一次出完所有牌或者大过对面的牌的可能,注意的是4张相同的牌带两张牌的话是可以被炸弹炸的。 #include #include #include #include #include #include #include #include using namespace std; struct node { int k,mk; int two...
分类:其他好文   时间:2014-08-07 19:04:10    阅读次数:258
C++中class与struct的区别(struct的类型名同时可以作为变量名)
通常我们知道的区别:(一)默认继承权限。如果不明确指定,来自class的继承按照private继承处理,来自struct的继承按照public继承处理;(二)成员的默认访问权限。class的成员默认是private权限,struct默认是public权限。 除了这两点,class和struct基本....
分类:编程语言   时间:2014-08-07 18:40:30    阅读次数:174
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!