码迷,mamicode.com
首页 >  
搜索关键字:struct option    ( 27477个结果
【HDOJ】1881 毕业bg
01背包。 1 #include 2 #include 3 #include 4 5 #define MAXN 1005 6 7 typedef struct { 8 int h, l, t; 9 } node_st;10 11 node_st nodes[35];12 13 in...
分类:其他好文   时间:2014-06-08 22:44:08    阅读次数:339
[LeetCode OJ] Max Points on a Line—Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
//定义二维平面上的点struct Point{ int x; int y; Point(int a=0, int b=0):x(a),y(b){}};bool operator==(const Point& left, const Point& right){ return...
分类:其他好文   时间:2014-06-08 22:26:17    阅读次数:357
【HDOJ】3789 奥运排序问题
写了个函数指针,这题目很水,但是佷烦。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define MAXN 305 8 9 typedef struct {10 int id, g...
分类:其他好文   时间:2014-06-08 20:55:48    阅读次数:202
poj3278
数组必须开大点#include #include #include #include using namespace std;struct node{ int x,ans;}q[1000005];int jx[]={-1,1};int n,k;int map[1000005],v[100000...
分类:其他好文   时间:2014-06-08 20:48:03    阅读次数:319
小型Basic编译器问题
# include # include # include # include # include //使用map解决一对一 的关系using namespace std;map mapdata;//数据存储typedef struct node{ long num; char ch1[20]; c...
分类:其他好文   时间:2014-06-08 20:26:01    阅读次数:235
LeetCode --- Minimum Depth of Binary Tree
题目链接求二叉树最小深度,最小深度指的是:从根节点走到最近的叶子结点的最短长度附上代码: 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6...
分类:其他好文   时间:2014-06-08 18:43:48    阅读次数:220
割点 桥 双连通分量模版
求割点 const int maxn = 1010; vector a[maxn], bcc[maxn]; int pre[maxn]; int low[maxn]; bool iscut[maxn]; int bccno[maxn]; int cnt[maxn]; int dfs_clock; int bcc_cnt; int n; struct Edge { int u, v; };...
分类:其他好文   时间:2014-06-08 05:54:36    阅读次数:270
Android截图命令screencap
查看帮助命令 bixiaopeng@bixiaopeng ~$ adb shell screencap -v screencap: invalid option -- v usage: screencap [-hp] [-d display-id] [FILENAME] -h: this message -p: save the file as a png. -d: speci...
分类:移动开发   时间:2014-06-08 05:06:26    阅读次数:353
Light OJ 1026 Critical Links 求桥
题目来源:Light OJ 1026 Critical Links 题意:输出桥 思路:模版 #include #include #include #include #include using namespace std; const int maxn = 10010; struct Edge { int u, v; Edge(){} Edge(int u, int v):...
分类:其他好文   时间:2014-06-08 04:07:05    阅读次数:235
多项式的表示
1.多项式的系数存放在数组中 # include # include # define max(x,y) ((x)>(y)?(x):(y)) using namespace std; const int N=100; struct poly { int arr[N]; int mexp; }; void add(poly &a,poly &b,poly &c) { memset(c.ar...
分类:其他好文   时间:2014-06-08 02:17:57    阅读次数:264
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!