- 博客(12)
- 收藏
- 关注
转载 Garland
Garland (garland.pas/cpp/in/out) 时间限制: 2.0 second 内存限制: 256 MB 问题描述 新年到了,要用一根绳悬挂n个彩灯,如下图 设彩灯i的高度为Hi 并且满足以下关系: H1 = A Hi = (H[i−1] + H[i+1])/2 − 1, 1 HN = B Hi ≥ 0, for all1 ≤ i ≤
2013-07-29 17:28:18
586
原创 Wikioi-1191-数轴染色
#include #include #include #include #include using namespace std; const int maxn=200000+10; int duxi[maxn*4]; int n,m; void modify(int k, int x, int y, int l, int r) { if (ry) return; if
2013-07-27 08:10:58
746
原创 Wikioi-1217-借教室
#include #include #include #include #include #include using namespace std; const int maxn=1000000+10; const int maxseg=maxn*4+10; int n,m; int a[maxn]; int mi[maxseg],d[maxseg];//mi[i]:i号结点
2013-07-26 17:39:36
583
原创 Wikioi1080线段树练习
#include #include #include #include #include using namespace std; const int maxn=100000+10; int sum[maxn*4]; int a[maxn]; int n, m; void buildtree(int k, int x, int y) { if(x==y)
2013-07-26 11:43:08
708
转载 NOIP2003提高组之神经网络
1/**//* 2=========程序信息======== 3对应题目:noip2003提高组_神经网络 4使用语言:c++ 5使用编译器:dev c++ 6使用算法:模拟 7算法运行时间:O(n^2 * layer) 其中layer为层数,最大为n。[明显这个神经网络是一个稀疏图,如果改用链表存储方法存储图的边的话将大大减小运行时间。] 8作者:贵州大
2013-07-25 17:49:59
1923
原创 Wikioi-1010-过河卒
简单的动态规划,两种代码均可 /*#include #include #include #include #include #include using namespace std; int m,n,x,y; int abs(int a) { return a>0?a:-a; } bool check(int a,int b) {
2013-07-25 11:42:11
996
转载 RQNOJ-577-团伙
以上共两种方法,均可以AC,采用并查集求法001./*#include 002.#include 003.#include 004.#include 005.#include 006.#include 007.#include 008.#include 009.#include 010.using namespace std;
2013-07-25 10:55:10
963
原创 RQNOJ-22-火星人
01.#include 02.#include 03.using namespace std; 04.int a[10000+10]; 05.int main() 06.{ 07. //freopen("input.txt", "r", stdin); 08. //freopen("output.txt", "w", s
2013-07-25 08:18:40
399
原创 RQNOJ-3-Jam的算法
01.#include 02.char a[26]; 03.int main() 04.{ 05. //freopen("input.txt", "r", stdin); 06. //freopen("output.txt", "w", stdout); 07. 08. int s,t,w,i,j; 09. scanf("%
2013-07-25 08:15:13
501
原创 RQNOJ-1-明明的随机数
01./*#include 02.#include 03.#include 04.#include 05.int main() 06.{ 07. //freopen("input.txt", "r", stdin); 08. //freopen("output.txt", "w", stdout); 09. 10.
2013-07-24 18:00:36
604
原创 RQNOJ-343-mty的考验
01.#include 02.#include 03.#include 04.#include 05.#include 06.#include 07.#include 08. 09.#define mxn 1000+10 10.#define mxm 500+10 1
2013-07-24 17:55:45
525
原创 RQNOJ-28-愚蠢的宠物
01.#include 02.#include 03.#include 04.#include 05.#include 06.#include 07.using namespace std; 08.const int maxn=1000000+10; 09. 10.int n; 11.int x,y; 12.int f[maxn];
2013-07-24 17:52:20
440
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅