题目大意: 给出一串序列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
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
题目链接
题意:就是题中那几种牌型,如果先手能一步走完,或者一步让后手无法管上,就赢
思路:先枚举出两个人所有可能的牌型的最大值,然后再去判断即可
代码:
#include
#include
#include
using namespace std;
struct Player {
int...
分类:
其他好文 时间:
2014-08-07 23:10:59
阅读次数:
277
_(:зゝ∠)_
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
#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
有思路就去做,要相信自己
多处理更复杂的情况,你就不觉得现在复杂了
#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
只需要判断一个回合就可以了,枚举判断可以一次出完所有牌或者大过对面的牌的可能,注意的是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
通常我们知道的区别:(一)默认继承权限。如果不明确指定,来自class的继承按照private继承处理,来自struct的继承按照public继承处理;(二)成员的默认访问权限。class的成员默认是private权限,struct默认是public权限。 除了这两点,class和struct基本....
分类:
编程语言 时间:
2014-08-07 18:40:30
阅读次数:
174