自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

nike0good |Oier&ACMer | 熟能生巧

有所作为是生活中的最高境界。

  • 博客(24)
  • 收藏
  • 关注

原创 CF 538D(Weird Chess-反过来算)

D. Weird Chesstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIgor has been into chess for a long time and

2015-04-28 23:32:29 1460

原创 CF 538C(Tourist's Notes-贪心)

C. Tourist's Notestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tourist hiked along the mountain range

2015-04-28 23:24:08 1466

原创 CF 538B(Quasi Binary-贪心)

B. Quasi Binarytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA number is called quasibinary if its decim

2015-04-28 23:21:10 1859

原创 CF 538A(Cutting Banner-暴力找切割点)

A. Cutting Bannertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA large banner with word CODEFORCES was o

2015-04-28 23:19:13 1660

原创 hiho 编程之美2015初赛第一场(质数相关-2分图匹配)

题目3 : 质数相关时间限制:2000ms单点时限:1000ms内存限制:256MB描述两个数a和 b (a输入第一行为一个数T,为数据组数。之后每组数据包含两行。第一行为N,为集合S的大小。第二行为N个整数,表示集合内的数。输出对于每组数据输出一行,形如"Case #X: Y"。X为数据编号,从1开始,Y为最

2015-04-26 13:18:22 1163

原创 Chang'an(Black Box-线段树)

线段树#include using namespace std;struct rect{ int l, r, c, x;};struct rec{ int x, p, ans, rank;};rect tree[800004];rec a[200004], get[20000];bool cmpx(const rec &a, const rec &b){

2015-04-24 19:20:20 1197

原创 Chang'an(YY's problem-矩阵乘法)

矩阵乘法#include #define LL long long#define MOD 1000000007using namespace std;LL MMM(int a, int b){return ((a%MOD)*(LL)(b%MOD))%MOD;}LL x[4], a[4], t[4];LL* mult(LL *a,LL *b){x[0]

2015-04-24 19:13:30 988

原创 Chang'an(Palindrome Numbers-回文数字统计)

统计前半个回文串#include using namespace std;#define For(i,n) for(int i=1;i<=n;i++)#define ForD(i,n) for(int i=n;i;i--)#define ForkD(i,k,n) for(int i=n;i>=k;i--)#define Rep(i,n) for(int i=0;i<

2015-04-23 11:40:28 976

原创 Chang'an(Dance Party-贪心)

贪心,尽量向前配#include using namespace std;#define For(i,n) for(int i=1;i<=n;i++)#define Fork(i,k,n) for(int i=k;i<=n;i++)#define Rep(i,n) for(int i=0;i<n;i++)#define ForD(i,n) for(int i=n;i;i--

2015-04-23 11:37:33 1045

原创 Chang'an(Hack-01分数规划)

01分数规划#include using namespace std;#define For(i,n) for(int i=1;i<=n;i++)#define Fork(i,k,n) for(int i=k;i<=n;i++)#define Rep(i,n) for(int i=0;i<n;i++)#define ForD(i,n) for(int i=n;i;i

2015-04-22 08:54:18 918

原创 Chang'an(YY's string-模拟)

手速题#include using namespace std;#define For(i,n) for(int i=1;i<=n;i++)#define Rep(i,n) for(int i=0;i<n ;i++)#define MAXN (100000)string s;int main(){ //freopen("1.in.cpp","r",stdin);

2015-04-22 08:49:36 1857

原创 hiho 编程之美2015资格赛(基站选址-绝对值方程分段)[WA]

题目3 : 基站选址时间限制:2000ms单点时限:1000ms内存限制:256MB描述需要在一个N × M的网格中建立一个通讯基站,通讯基站仅必须建立在格点上。网格中有A个用户,每个用户的通讯代价是用户到基站欧几里得距离的平方。网格中还有B个通讯公司,维护基站的代价是基站到最近的一个通讯公司的路程(路程定义为曼哈顿距离)。在

2015-04-20 18:32:26 1161

原创 hiho 编程之美2015资格赛(回文字符序列-回文子序列数)

题目2 : 回文字符序列时间限制:2000ms单点时限:1000ms内存限制:256MB描述给定字符串,求它的回文子序列个数。回文子序列反转字符顺序后仍然与原序列相同。例如字符串aba中,回文子序列为"a", "a", "aa", "b", "aba",共5个。内容相同位置不同的子序列算不同的子序列。输入第一行一个整数T,表示

2015-04-20 15:42:51 1428

原创 hiho 编程之美2015资格赛(2月29日-模拟日期)

题目1 : 2月29日时间限制:2000ms单点时限:1000ms内存限制:256MB描述给定两个日期,计算这两个日期之间有多少个2月29日(包括起始日期)。只有闰年有2月29日,满足以下一个条件的年份为闰年:1. 年份能被4整除但不能被100整除2. 年份能被400整除输入第一行为一个整数T,表示数据组数。之

2015-04-20 15:34:01 1191

原创 hiho 挑战赛10(01串-找规律决策)

题目1 : 01串时间限制:7000ms单点时限:1000ms内存限制:256MB描述给定两个整数n和m,求是否存在恰好包含n个0和m个1的01串S,使得S中不存在子串"001"和"11"。如果存在符合条件的01串则输出字典序最小的S,否则输出NO。输入一行两个整数,表示n和m。(0输出一行一个字符串,为字典序

2015-04-12 23:34:28 1472

原创 TC TCO2015R1A(Similars-状态压缩)

Problem Statement  Given two positive integers x and y, their similarity S(x, y) is defined as follows: To compute S(x, y) we count all d between 0 and 9, inclusive, such that both x and y

2015-04-12 15:24:09 1092

原创 GCJ 2015Q(Infinite House of Pancakes-贪心与枚举)

ProblemAt the Infinite House of Pancakes, there are only finitely many pancakes, but there are infinitely many diners who would be willing to eat them! When the restaurant opens for breakfast, among

2015-04-12 14:46:52 1754

原创 GCJ 2015Q(Standing Ovation-贪心)

ProblemIt's opening night at the opera, and your friend is the prima donna (the lead female singer). You will not be in the audience, but you want to make sure she receives a standing ovation -- w

2015-04-12 14:38:24 1194

原创 LA 4975(Casting Spells-manacher+暴力查找)

4975 - Casting SpellsTime limit: 3.000 seconds Casting spells is the least understood technique of dealing with real life. Actually, people find it quite hard to distinguish between a real spe

2015-04-10 22:26:41 1537

原创 HDU 3068(最长回文-manacher)[Template:manacher]

最长回文Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9660    Accepted Submission(s): 3353Problem Description给出一个只由小写英文字符a,b,c...y,z组成

2015-04-06 19:27:42 968

原创 UVA 11488(Hyper Prefix Sets-Trie统计)

Pre x goodness of a set string is length of longest common pre x*number of strings in the set. Forexample the pre x goodness of the set f000,001,0011g is 6.You are given a set of binary strings. Fin

2015-04-05 23:53:33 1072

原创 BestCoder Round #36(Trees-离线处理询问)

TreesAccepts: 156Submissions: 533Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)问题描述今天CodeFamer去坎树。有N 棵树排成一排。他们被从1 到N 标号。第i 号树的高度为h i  。两棵未被

2015-04-05 09:19:09 1032

原创 BestCoder Round #36(Gunner-hash)

GunnerAccepts: 391Submissions: 1397Time Limit: 8000/4000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)问题描述很久很久以前,有一个叫Jack的枪手。他非常喜欢打猎。一天,他去了一个小树林。那儿有只鸟,还有n 棵树。第i 只鸟站

2015-04-05 09:15:35 921

原创 BestCoder Round #36(Strange Class-模拟)

Strange ClassAccepts: 519Submissions: 1749Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)问题描述在Vivid的学校里,有一个奇怪的班级(SC).在SC里,这些学生的名字非常奇怪。他们的名字形

2015-04-05 09:12:12 1009

空空如也

空空如也

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

TA关注的人

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