- 博客(40)
- 资源 (2)
- 收藏
- 关注
原创 我要背单词
structure结构体 data structure数据结构multiset 多集instances 实例handle n.手柄;(织物、毛皮等的)手感;举动;柄状物vi.操作,操控;容易搬运vt.用双手触摸、举起或握住;用手操作,操纵;处理或负责,管理;〈美〉买卖,经营 exceptions 例外( exception的名词复数 );
2017-05-04 20:09:39 382
原创 cf668B
B. Little Artem and Dancetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Artem is fond of dancing.
2017-05-04 19:04:26 670
原创 我要背单词
Initially adv.最初;开始 副词at first.initially, he thought the new concept was nonsense同义词: at first, at the start, at the outset, in/at the beginning, to begin with, to start
2017-05-04 17:30:59 713
原创 最小费用最大流
Going HomeTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5208 Accepted Submission(s): 2739Problem DescriptionOn a grid map
2017-05-03 21:40:54 253
原创 大数阶乘
#include #includeusing namespace std;int main(){ int carry,n,j; int a[40001]; int digit; int temp,i; while(scanf("%d",&n)!=EOF){ a[0]=1;digit=1; for(i=2; i<=n; i++)
2017-05-03 17:11:26 186
原创 深搜加广搜
B. Stealing Harry Potter's PreciousTime Limit: 1000msMemory Limit: 32768KB64-bit integer IO format: %I64d Java class name: MainSubmit Status PID: 33993 Harry Potter h
2017-05-03 15:01:54 191
原创 表达式求值 第九届河南省赛
问题 A: 表达式求值时间限制: 1 Sec 内存限制: 64 MB提交: 17 解决: 14[提交][状态][讨论版]题目描述假设表达式定义为: 1. 一个十进制的正整数 X 是一个表达式。 2. 如果 X 和 Y 是 表达式,则 X+Y, X*Y 也是表达式; *优先级高于+. 3. 如果 X 和 Y 是 表达式,则 函数 Smax(X,Y)也是表达式,其值为:
2017-05-02 19:24:13 216
原创 线段树
Count the ColorsTime Limit: 2 Seconds Memory Limit: 65536 KBPainting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.Your ta
2017-05-02 18:17:16 158
原创 信道安全
问题 C: 信道安全时间限制: 1 Sec 内存限制: 64 MB提交: 19 解决: 12[提交][状态][讨论版]题目描述Alpha 机构有自己的一套网络系统进行信息传送。情报员 A 位于节点 1,他准备将一份情报 发送给位于节点 n 的情报部门。可是由于最近国际纷争,战事不断,很多信道都有可能被遭到监 视或破坏。 经过测试分析,Alpha 情报系统获得了网络中
2017-05-01 19:51:29 240
原创 poj 1664
放苹果Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 33757 Accepted: 20898Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。
2017-05-01 16:53:28 219
原创 关于栈,优先队列
#include#include#include#include#include#include#includeusing namespace std;int main(){ stack s; s.push(1); s.push(2); s.push(3); s.push(9); cout<<s.top()<<endl; cout<<s.
2017-05-01 15:51:33 220
原创 关于list
#include#include#include#include#include#includeusing namespace std;int main(){ list l; l.push_back(2);//从后面插入 l.push_back(8); l.push_back(1); l.push_back(5); l.push_ba
2017-05-01 15:31:29 198
原创 关于双向队列
#include#include#include#include#includeusing namespace std;int main(){ deque d; d.push_back(1); d.push_back(2); d.push_back(3); d.push_front(10); d.push_front(20);
2017-05-01 15:17:58 336
原创 最短路模板poj2387
Til the Cows Come HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 52264 Accepted: 17653DescriptionBessie is out in the field and wants to get back t
2017-04-30 18:20:47 265
原创 关于map
#include#include#include#include#include#include#include//下面是允许重复的map的用法using namespace std;//元素不是结构体struct mycmp{ bool operator()(const int &a,const int &b) { if(a!=b) retu
2017-04-30 14:20:33 221
原创 关于set
#include#include#include#include#include#includeusing namespace std;struct cmp{ bool operator()(const int &a,const int &b) { if(a!=b) { return a>b;
2017-04-30 10:47:11 209
原创 关于vector
#include#include#include#include#include//v.empty() 空为1,不空为假0。using namespace std;bool cmp(int a,int b){ return a>b;}int main(){ vector v; int i; for(i=0;i<10;i++) {
2017-04-30 10:18:56 161
原创 状态压缩 Lights Against Dudely
A. Lights Against DudelyTime Limit: 1000msMemory Limit: 32768KB64-bit integer IO format: %I64d Java class name: MainSubmit Status PID: 33992Harry: "But Hagrid. How am
2017-04-30 09:41:08 282
原创 2013 Asia Hangzhou Regional Contest bnuoj ID: 4771
B. Stealing Harry Potter's PreciousTime Limit: 1000msMemory Limit: 32768KB64-bit integer IO format: %I64d Java class name: MainSubmit Status PID: 33993 Harry Potter h
2017-04-29 18:33:49 406
原创 最大子串和 动态规划
Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 37444 Accepted Submission(s): 17111Problem Descri
2017-04-28 21:17:40 459
原创 最大子串和
1266: 最大子段和时间限制: 1 秒 内存限制: 64 MB提交: 476 解决: 144提交 状态 题目描述一个大小为n的数组a1到an(−10^4≤ai≤10^4)。请你找出一个连续子段,使子段长度为奇数,且子段和最大。输入第一行为T(1≤T≤5),代表数据组数。之后每组数据,第一行为n(1≤n≤10^5),代表数组长度。之后一行n个数,
2017-04-28 20:16:58 246
原创 cf 789c最大字段和
C. Functions againtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSomething happened in Uzhlyandia again...
2017-04-28 19:47:12 1578
原创 素数打表
int dp[300003];void fun(){ int i,j; for(i=0;i<100000;i++) dp[i]=1; dp[0]=0; dp[1]=0; for(i=2;i<100000;i++) { if(dp[i]==1) { for(j=i*2;j<100000;j+=i) d
2017-04-28 16:36:36 151
原创 hdu5546
Ancient GoTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2311 Accepted Submission(s): 722Problem DescriptionYu Zhou likes to
2017-04-26 17:54:13 223
原创 记住开数组的坑
SudokuTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2217 Accepted Submission(s): 752Problem DescriptionYi Sima was one of t
2017-04-26 11:13:27 400
原创 最短路
1262: 魔法宝石时间限制: 2 秒 内存限制: 64 MB提交: 335 解决: 79提交 状态 题目描述小s想要创造n种魔法宝石。小s可以用ai的魔力值创造一棵第i种魔法宝石,或是使用两个宝石合成另一种宝石(不消耗魔力值)。请你帮小s算出合成某种宝石的所需的最小花费。输入第一行为数据组数T(1≤T≤3)。对于每组数据,首先一行为n,m(1≤n,
2017-04-24 18:45:56 203
原创 优先队列
#include#include#include#include#includeusing namespace std;struct cmp1{ bool operator ()(int &a,int &b) { return a>b;//最小值优先 }};struct cmp2{ bool operator ()(int &a,
2017-04-21 08:52:21 201
原创 POJ 1724
ROADSTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14969 Accepted: 5414DescriptionN cities named with numbers 1 ... N are connected with one-way roads
2017-04-17 16:23:07 278
原创 线段树改线求点
士兵杀敌(四)时间限制:2000 ms | 内存限制:65535 KB难度:5描述南将军麾下有百万精兵,现已知共有M个士兵,编号为1~M,每次有任务的时候,总会有一批编号连在一起人请战(编号相近的人经常在一块,相互之间比较熟悉),最终他们获得的军功,也将会平分到每个人身上,这样,有时候,计算他们中的哪一个人到底有多少军功就是一个比较困难的事情,军师小工的
2017-04-13 11:04:15 147
原创 逆序数
Ultra-QuickSortTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 60164 Accepted: 22286DescriptionIn this problem, you have to analyze a particular sorting
2017-04-12 17:14:01 181
原创 nyoj 116士兵杀敌二
士兵杀敌(二)时间限制:1000 ms | 内存限制:65535 KB难度:5描述南将军手下有N个士兵,分别编号1到N,这些士兵的杀敌数都是已知的。小工是南将军手下的军师,南将军经常想知道第m号到第n号士兵的总杀敌数,请你帮助小工来回答南将军吧。南将军的某次询问之后士兵i可能又杀敌q人,之后南将军再询问的时候,需要考虑到新增的杀敌数。
2017-04-08 15:29:43 288
原创 小技巧
学了个两个数交换的好方法 #include int main() { int m,n; while(~scanf("%d%d",&m,&n)) { if(m>n) { m^=n; n^=m; m^=n; } printf("%
2017-04-08 14:19:02 197
原创 nyoj 108 士兵杀敌(一)
士兵杀敌(一)题目连接:点击打开链接时间限制:1000 ms | 内存限制:65535 KB难度:3描述南将军手下有N个士兵,分别编号1到N,这些士兵的杀敌数都是已知的。小工是南将军手下的军师,南将军现在想知道第m号到第n号士兵的总杀敌数,请你帮助小工来回答南将军吧。注意,南将军可能会问很多次问题。输入只有一组测试数据第一行是两个
2017-04-08 13:50:26 291
原创 D - Density of Power Network ZOJ - 3708
最近感觉刷题思路很不严谨!!,The vast power system is the most complicated man-made system and the greatest engineering innovation in the 20th century. The following diagram shows a typical 14 bus power syste
2017-04-08 10:47:42 561
原创 B - Ada and Queue SPOJ - ADAQUEUE
Ada the Ladybug has many things to do. She puts them into her queue. Anyway she is very indecisive, so sometime she uses the top, sometime the back and sometime she decides to reverses it.InputThe
2017-04-04 13:50:39 536
原创 A - Ada and List SPOJ - ADALIST
Ada the Ladybug has a TODO-list (containing only numbers - for simplicity). She is still doing something, so she sometimes erases kth number, sometimes she inserts something on kth position and some
2017-04-04 10:35:10 554
原创 BestCoder Round #93
MG loves gold Accepts: 451 Submissions: 1382 Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionMG is a lucky boy.
2017-04-03 15:35:15 346
原创 "尚学堂杯"哈尔滨理工大学第七届程序设计竞赛
C.Collection GameTime Limit: 1000 MSMemory Limit: 128000 KTotal Submit: 841 (248 users)Total Accepted: 236 (165 users)Special Judge: NoDescription
2017-04-03 15:04:59 266
原创 cf580B
今天学了一招,叫滚动窗口看了看别人的思想,写了代码一次就过B. Kefa and Companytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKe
2016-05-13 20:24:47 282
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人