自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 收藏
  • 关注

原创 CSU 1804 有向无环图 (拓扑排序+乱搞)

有向无环图 Time Limit: 5000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu SubmitStatusDescription Bobo 有一个 n 个点,m 条边的有向无环图(即对于任意点 v,不存在从点 v 开始、点 v 结束的路径)。 为了方便,点用 1,2,…,n 编号。 设 count(x

2016-09-27 16:50:07 766 2

原创 斐波那契数的栈模拟递归算法

斐波那契数的栈模拟递归算法 设计模式作业。。瞎搞一波。#include "cstring"#include "cstdio"#include "string.h"#include "iostream"#include "stack"using namespace std;typedef struct node{ int n,value,flag;}node;node ma

2016-09-25 19:58:38 1251 1

原创 LightOJ 1017 Brush (III) (DP)

Brush (III) Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu SubmitStatus Description Samir returned home from the contest and got angry after seeing his room dusty. Who l

2016-09-25 19:17:59 229

原创 欧拉函数相关知识

模板://筛选法打欧拉函数表 #define Max 1000001 int euler[Max]; void Init(){ euler[1]=1; for(int i=2;i<Max;i++) euler[i]=i; for(int i=2;i<Max;i++) if(

2016-09-21 21:31:52 236

原创 UVA 11424 UVA 11424 GCD - Extreme (I) (欧拉函数)

Given the value of N, you will have to find the value of G. The definition of G is given below: i#include "cstring"#include "cstdio"#include "string.h"#include "iostream"using namespace std;#defin

2016-09-21 21:25:10 568

转载 欧拉图相关知识

百度百科摘的。欧拉图 1、定义:经过图(无向图或有向图)中每条边一次切近义词并且行遍图中每个定点的回路(通路),成为欧拉回路(欧拉通路),存在欧拉回路的图称为欧拉图。 2、相关定理相关定理: 1.无向连通图G是欧拉图,当且仅当G不含奇数度结点(G的所有结点度数为偶数); 2.无向连通图G含有欧拉通路,当且仅当G有零个或两个奇数度的结点; 3.有向连通图D是欧拉图,当且仅当该图为连通图且D中

2016-09-20 10:54:58 804

原创 POJ 1459 Power Network (网络流)

Power Network Time Limit: 2000MS Memory Limit: 32768K Total Submissions: 27278 Accepted: 14176 DescriptionA power network consists of nodes (power stations, consumers and dispatchers) co

2016-09-20 10:51:41 231

原创 POJ 1273 Drainage Ditches (网络流)

Drainage Ditches Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 70372 Accepted: 27358 DescriptionEvery time it rains on Farmer John’s fields, a pond forms over Bessie’s favor

2016-09-19 21:23:32 259

原创 HDU 5898 odd-even number (数位DP) 2016 ACM/ICPC Asia Regional Shenyang Online

odd-even numberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 220 Accepted Submission(s): 115Problem Description For a number,if the lengt

2016-09-19 11:21:06 366

原创 HDU 5883 The Best Path (欧拉通路) 2016 ACM/ICPC Asia Regional Qingdao Online

The Best PathTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 502 Accepted Submission(s): 207Problem Description Alice is planning her trave

2016-09-18 21:59:18 248

原创 HDU 2553 N皇后问题 (状压+dfs)

N皇后问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 18785 Accepted Submission(s): 8510Problem Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个

2016-09-16 17:33:10 691 1

原创 POJ 1155 TELE (树形DP)

TELE Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4931 Accepted: 2715 DescriptionA TV-network plans to broadcast an important football match. Their network of transmitters and

2016-09-13 00:19:15 247

原创 POJ 2486 Apple Tree (树形DP)

Apple Tree Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9916 Accepted: 3302 DescriptionWshxzt is a lovely girl. She likes apple very much. One day HX takes her to an apple tre

2016-09-12 17:01:14 283

原创 HDU 5877 Weak Pair 2016 ACM/ICPC Asia Regional Dalian Online(树状数组+离散化)

Weak PairTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 463 Accepted Submission(s): 164Problem Description You are given a rooted tree o

2016-09-11 10:24:07 294

原创 HDU 1011 Starship Troopers (树形DP)

Starship TroopersTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 17684 Accepted Submission(s): 4691Problem Description You, the leader of

2016-09-08 20:55:23 284

原创 CodeForces 548E Mike and Foam (容斥+数论)

E. Mike and Foam time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Mike is a bartender at Rico’s bar. At Rico’s, they put beer glasses in a

2016-09-08 18:13:55 344

转载 线性筛法求素数的原理与实现

原文: http://wenku.baidu.com/link?url=MsropzCFgnXCOrWMnAGGizudZrIdtztCx90R6BxUfS0vCIg0WulGwSMwPTd9GK4R7DfvHbYcON01SPzotR-OxknjIUepXpSJR-iwjgVzJnC 何为线性筛法,顾名思义,就是在线性时间内(也就是O(n))用筛选的方法把素数找出来的一种算法,没用过线性筛素数

2016-09-07 20:25:56 560

原创 FZU 2181 快来买肉松饼 (dfs)

Problem 2181 快来买肉松饼 Accept: 75 Submit: 270 Time Limit: 5000 mSec Memory Limit : 32768 KBProblem Description转眼又到了一年一度的圣战(光棍)节了,单身狗大表哥决定和一群一样孤独的盆友一起出来过节,一起玩游戏,输的人给赢的人买肉松饼,这样大家都不会感到孤单。为了防止平局出现,大表哥

2016-09-07 00:04:22 321

原创 CodeForces 548D (单调栈+伪DP)

Mike and Feet Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u SubmitStatusDescription Mike is the president of country What-The-Fatherland. There are n bears livin

2016-09-05 10:56:25 302

原创 Light OJ 1037 Agent 47 (状压DP)

Agent 47 Time Limit: 2000MS Memory Limit: 32768KB 64bit IO Format: %lld & %llu SubmitStatusuDebugDescription Agent 47 is in a dangerous Mission “Black Monster Defeat - 15”. It is a secret

2016-09-04 17:14:46 216

原创 HDU 4165 Pills (卡特兰数)

PillsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1418 Accepted Submission(s): 992Problem Description Aunt Lizzie takes half a pill of a

2016-09-01 17:34:30 380

转载 卡特兰数相关知识

转自kuangbin博客卡特兰数又称卡塔兰数,是组合数学中一个常出现在各种计数问题中出现的数列。由以比利时的数学家欧仁·查理·卡塔兰 (1814–1894)命名。卡特兰数前几项为 (OEIS中的数列A000108): 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35

2016-09-01 17:10:53 227

原创 HDU 1023 Train Problem II (卡特兰数)

Train Problem IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8450 Accepted Submission(s): 4525Problem Description As we all know the Tra

2016-09-01 17:08:43 213

空空如也

空空如也

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

TA关注的人

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