自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Song

球球

  • 博客(21)
  • 资源 (2)
  • 问答 (1)
  • 收藏
  • 关注

原创 【bellmanford 】poj 3259 判断负环

#include #define inf 10001#define M 3000struct{ int front,end,num;}edge[M*2];bool bellman_ford(int n,int s,int E){ int d[M] = {0},pi[M],i,j; for(i = 0;i < n;i++)//初始化 {

2014-03-30 20:38:49 541

原创 异或运算及其应用

异或是一种基于二进制的位运算,用符号XOR或者 ^ 表示,其运算法则是对运算符两侧数的每一个二进制位,同值取0,异值取1。它与布尔运算的区别在于,当运算符两侧均为1时,布尔运算的结果为1,异或运算的结果为0。一、异或的性质交换律:a ^ b = b ^ a结合律:a ^ b ^ c = a ^ (b ^ c) = (a ^ b) ^ cd = a ^ b ^ c 可以推出 a

2014-03-30 19:13:18 958

原创 [kruskal]poj 1251

这周要被累死了......   周末终于抽出时间来刷刷题....先来道kruskal热热身哈http://poj.org/problem?id=12519A 2 B 12 I 25B 3 C 10 H 40 I 8C 2 D 18 G 55D 1 E 44E 2 F 60 G 38F 0G 1 H 35H 1 I 353A 2 B 10 C 40B 1

2014-03-29 09:05:17 530

原创 Kruskal【Notes】

#include #include #include #include #include #include #include #include #include #include #include #include #define ll long long//kruskal 最小生成树 通过并查集来判断是否成环//每找到一个边,合并边两边的点,查找边的时候查看是否在

2014-03-23 19:58:17 595 1

原创 动态数组【Notes】

#include //时间 空间都是2nusing namespace std;class array{public: int *a; int n; int capacity; array() { capacity=2; a=new int [capacity]; n=0; } ~

2014-03-23 19:49:06 454

原创 链式前向星【Notes】

#include #include #include #include using namespace std;const int INF = 0x3f3f3f3f;const int maxn= 110000;const int maxm=11000000;//边///链式向前星//每一个边构成一个结构体struct Side{ //int from; int to;

2014-03-23 19:43:39 606

原创 hdu 2544 最短路

这道题用来测试优先队列优化首先是最普通的dijkstra//http://acm.hdu.edu.cn/showproblem.php?pid=2544#include #include #include #include #include #include #define INF 0x3f3f3f3fusing namespace std;const int m

2014-03-23 16:07:56 610 2

原创 Codeforces Round #237 (Div. 2) A & B

A 判断一个矩阵是不是X型....注意一点是 对角线和非对角线的元素不能相同#include #include #include #include #include #include #include #include #include #include #include #include #define ll long longusing namespace st

2014-03-20 01:38:41 514

原创 hdu 1548

A strange liftTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9984    Accepted Submission(s): 3746Problem DescriptionThere is a stra

2014-03-18 21:22:59 480

原创 【dijkstra+heap+邻接表】poj 1502

#include #include #include #include #include #include #include #include #include #include #include #include #define ll long longusing namespace std;const int INF = 0x3f3f3f3f;const int

2014-03-17 21:11:16 809 1

原创 【DFS】hdu 1175 连连看 stack

http://acm.hdu.edu.cn/showproblem.php?pid=1175连连看Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16171    Accepted Submission(s): 4172

2014-03-16 13:20:37 689

转载 warning:deprecated conversion from string constant to 'char *'解决方案

Linux 环境下当GCC版本比较高时,编译代码可能出现的问题问题是这样产生的,先看这个函数原型:void someFunc(char *someStr);再看这个函数调用:someFunc("I'm a string!");把这两个东西组合起来,用最新的g++编译一下就会得到标题中的警告。为什么呢?原来char *背后的含义是:给我个字符串,我要修改它。而理论上,我们

2014-03-11 21:27:26 693

原创 【CF】CodeForces 301A Yaroslav and Sequence

A. Yaroslav and Sequencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYaroslav has an array, consisting

2014-03-09 22:22:54 850

原创 【Floyd】【CF】CodeForces 301B Yaroslav and Time

B. Yaroslav and Timetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYaroslav is playing a game called "Tim

2014-03-09 22:20:49 833

原创 hdu 1102

做遍prim水题- -http://acm.hdu.edu.cn/showproblem.php?pid=1102Constructing RoadsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12217    

2014-03-08 20:25:01 1013

原创 【Dijk】Hdu 2066

http://acm.hdu.edu.cn/showproblem.php?pid=2066一个人的旅行Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16380    Accepted Submission(s): 560

2014-03-08 10:35:38 656

原创 【prim】 poj 2031 Building a Space Station

Building a Space StationTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 3941 Accepted: 2016DescriptionYou are a member of the space station engineering te

2014-03-05 21:42:20 552

原创 【优先队列】poj 2833

The AverageTime Limit: 6000MS Memory Limit: 10000KTotal Submissions: 9028 Accepted: 2825Case Time Limit: 4000MShttp://poj.org/problem?id=2833把n个裁判们的成绩去掉

2014-03-05 17:43:31 877

原创 Instruction of priority_queue

基本操作:empty() 如果队列为空返回真pop() 删除对顶元素push() 加入一个元素size() 返回优先队列中拥有的元素个数top() 返回优先队列对顶元素在默认的优先队列中,优先级高的先出队。在默认的int型中先出队的为较大的数。使用方法:头文件:#include 声明方式:1、普通方法:priority_queueq;//通过操作

2014-03-04 22:57:11 667

原创 0.0

setCursorVisible(0);//设置光标不可见setWindowTitle(" XXXXX"); //该这里的文字setWindowSize(20,15);//设置屏幕大小#ifndef CONSOLE_H#define CONSOLE_H#include //声明部分void moveCursor (int, int);void setCursorVisible

2014-03-04 19:40:49 524

原创 【prim】poj 2485

HighwaysTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20214 Accepted: 9377DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, F

2014-03-03 21:27:42 612

OpenGL代码库

glu32.dll glut.dll glaux.dll opengl32.dll GLAUX.LIB glut32.dll glut32.lib glut.lib OPENGL32.LIB GL.H glut.h GLU.H GLU32.LIB GLAUX.H

2015-05-07

常用算法查找助手

一些常用的ACM算法模板,直接复制粘贴就能用的啦

2014-08-15

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除