自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 三角形外接圆圆心坐标

三角形外接圆圆心坐标转载出处:传送门三点坐标用 x1 , y1 ,x2 , y2, x3, y3简化记忆:另 M = pow( x1 , 2 ) - pow( x2 , 2 ) + pow( y1 , 2 ) - pow( y2 , 2 );N 等于 M 中 x2 与 x3 互换,y2 与 y3 互换;Yab = y1 - y

2017-10-12 20:21:56 5733

转载 unique(去重函数)的简单用法

unique转载出处:传送门头文件:#includeunique的作用:是“去掉”容器中相邻元素的重复元素,这里去掉要加一个引号,为什么呢,是因为它实质上是一个伪去除,它会把重复的元素添加到容器末尾,而返回值是去重之后的尾地址(是地址!!)#include #include #include using namespace

2017-10-08 23:09:25 5876

转载 全排列 next_permutation 简单用法

next_permutation转载出处:传送门(有删改)next_permutation的函数声明:#include  bool next_permutation( iterator start, iterator end);next_permutation函数的返回值是布尔类型在STL中还有perv_permutation()函数

2017-10-08 22:59:34 516

原创 南阳理工学院OJ 擅长排列的小明

擅长排列的小明时间限制:1000 ms  |  内存限制:65535 KB难度:4描述 小明十分聪明,而且十分擅长排列计算。比如给小明一个数字5,他能立刻给出1-5按字典序的全排列,如果你想为难他,在这5个数字中选出几个数字让他继续全排列,那么你就错了,他同样的很擅长。现在需要你写一个程序来验证擅长排列的小明到底对不对。输入第一行输入整数N(1每组测试数据第一行

2017-10-08 22:55:50 473

转载 string 简单使用

string 简单使用转载传送门(有删改)一:getline(cin,s6);  读取字符到遇到换行,空格可读入,知道‘\n’结束getline(cin,s7,'a'); 一个直到‘a’结束,其中任何字符包括'\n'都能够读入,可以试试题:UVa10361二:    string对象中字符的处理(头文件cctype)   

2017-10-07 21:56:44 219

转载 upper_bound 和 lower_bound 的简单使用

upper_bound 和 lower_bound 的简单使用(↓转载链接)upper_bound  | lower_bound一:upper_bound函数upper_bound()返回的在前闭后开区间查找的关键字的上界,如一个数组number序列1,2,2,4.upper_bound(2)后,返回的位置是3(下标)也就是4所在的位置,同样,如果插

2017-10-07 21:48:13 1271

原创 Codeforce Race Against Time

Race Against Timetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHave you ever tried to explain to the coordin

2017-10-07 21:23:31 229

原创 Codeforce The Eternal Immortality

The Eternal Immortalitytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputEven if the world is full of counterfeits, I

2017-10-07 10:06:00 352

转载 map 与 set 简单用法

map 与 set 简单用法map  | set(用于查找时用set)一:mapmap中元素的插入在map中元素有两种插入方法:使用下标使用insert函数在map中使用下标访问不存在的元素将导致在map容器中添加一个新的元素。insert函数的插入方法主要有如下:m.insert(e)m.insert(beg,

2017-10-07 09:50:03 426

原创 计蒜客 单独的数字

单独的数字给定一个数组 AAA,除了一个数出现一次之外,其余数都出现三次。找出出现一次的数。如:{1,2,1,2,1,2,7}\{1, 2, 1, 2, 1, 2, 7\}{1,2,1,2,1,2,7},找出777。你的算法只能是线性时间的复杂度,并且不能使用额外的空间哦~输入格式第一行输入一个数 n(1≤n≤500)n(1 \leq n \leq 500)n(1≤n≤

2017-10-06 08:45:29 739

原创 计蒜客 CodeCoder vs TopForces

CodeCoder vs TopForcesCompetitive programming is very popular in Byteland. In fact, every Bytelandian citizen is registered at two programming sites — CodeCoder and TopForces. Each site maintains

2017-10-06 08:35:51 379

原创 计蒜客 folding

foldingAs you can remember, Alex is fond of origami. She switched from squares to rectangles, and rectangles are much more difficult to master. Her main interest is to determine what is the minimu

2017-10-05 09:15:23 282

原创 计蒜客 整数转换成罗马数字

整数转换成罗马数字给定一个整数 numnum,将整数转换成罗马数字。如 1,2,3,4,51,2,3,4,51,2,3,4,5 对应的罗马数字分别为I,II,III,IV,V等,更详细的说明见此链接。输入格式第一行输入一个整数 num(1 \leq num \leq 3999)num(1≤num≤3999)。输出格式输出 numnumnum 对应的罗马数

2017-10-03 22:20:20 416

转载 codeforces Mahmoud and Ehab and the bipartiteness

Mahmoud and Ehab and the bipartitenesstime limit per test2 secondsmemory limit per test256 megabytesMahmoud and Ehab continue their adventures! As everybody in the evil land kn

2017-10-02 22:59:18 262

转载 博弈论小结

转载出处:http://blog.csdn.net/ac_gibson/article/details/41624623【巴什博奕】:    只有一堆n个物品,两个人轮流从中取物    规定每次最少取一个,最多取m个,最后取光者为胜。例题:    HDU4764  Stone:    题目大意:        Tang和Jiang轮流写数字      

2017-10-02 11:13:25 180

原创 HAUTOJ quadratic equation

问题 F: quadratic equation时间限制: 2 秒  内存限制: 128 MB提交: 268  解决: 42  题目描述With given integers a,b,c, you are asked to judge whether the following statement is true:"For anyx, if a⋅x2+b⋅x+c=0

2017-10-02 11:01:15 344

原创 HAUTOJ company

问题 J: company时间限制: 1 秒  内存限制: 64 MB提交: 86  解决: 27  题目描述There are n kinds of goods in the company, with each of them has a inventory ofcnti and direct unit benefit vali. Now you find du

2017-10-02 10:30:04 399

原创 NOI 1.13 15:求序列中的众数

15:求序列中的众数查看提交统计提问总时间限制: 1000ms内存限制: 65536kB描述输入一个长度为N的整数序列 (不多于128个整数),每个整数的范围在[-1052,1052],计算这个序列的众数。众数是指出现次数最多的那个数。如果有多个数出现的次数都达到最多,则取在原序列最先出现的数为众数;如果所有的数都相等,则返回"no"。输

2017-10-02 10:25:57 2761

原创 NYOJ 2362: 密码锁

2362: 密码锁时间限制: 2 秒  内存限制: 30 MB提交: 199  解决: 49   题目描述LLM偶然得到了一个3*3的密码锁,现在他要破译这个锁。他每次可以选择任意行列进行一次旋转,旋转效果示例如下:3 2 1  进行一次旋转可以变成 1 3 2或者 2 1 3 现在给你一个初始状态,问你至少可以旋转几次到达 123 456 78

2017-10-02 10:18:24 148

原创 计蒜客 Banana

Bananas are the favoured food of monkeys.In the forest, there is a Banana Company that provides bananas from different places.The company has two lists.The first list records the types of banana

2017-09-14 20:51:45 202

原创 ZZULIOJ 2182: 欧拉函数应用

2182: 不是签到题XDTime Limit: 1 Sec  Memory Limit:64 MBSubmit: 89  Solved: 20SubmitStatusWeb BoardDescription小明是一个贪心的孩子,他天天想着怎么让自己省钱。有一天他去商店买物品,然而他不是普通人,他有一个马基雅把库内的能力,可以只花掉商品价格与他今日幸运数字x的最

2017-09-02 10:05:46 258

原创 ZZULIOJ 2184: 不是防AK题

2184: 不是防AK题Time Limit: 1 Sec  Memory Limit:64 MBSubmit: 259  Solved: 55SubmitStatusWeb BoardDescription每一个数都有若干个后缀零,比如100有2个、10有1个、1有0个,那么问题来了,已知整数n,求x使其满足x!的后缀零个数为nInput输入一

2017-09-02 09:54:34 346

原创 HDU - 1166 敌兵布阵

敌兵布阵Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 98985    Accepted Submission(s): 41927Problem DescriptionC国的死对头A国这段时间正在进行军事演

2017-09-02 09:45:02 129

转载 线段树入门详解

线段树转载出处:http://blog.csdn.net/metalseed/article/details/8039326#t4一:线段树基本概念1:概述线段树,类似区间树,是一个完全二叉树,它在各个节点保存一条线段(数组中的一段子数组),主要用于高效解决连续区间的动态查询问题,由于二叉结构的特性,它基本能保持每个操作的复杂度为O(lgN)!性质:父亲的区间是[a

2017-09-02 09:19:33 3869

原创 巴什博奕(多校联盟六)

2359: 巴什博弈?时间限制: 1 Sec  内存限制: 30 MB提交: 252  解决: 49[提交][状态][讨论版]题目描述有n个石子,有两人轮流从中取石子,最少a个最多b个,谁没得取(即当轮到他取是已经没有石子可以取了,也就是说此时石子数量小于a)谁赢,现在,LLM先取,问你LLM能赢吗输入每个测试样例少于100000组测试数据 每组测试

2017-09-02 09:06:05 217

原创 POJ - 3660 Cow Contest

Cow ContestTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12848Accepted: 7149DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are part

2017-08-28 16:49:01 161

原创 POJ - 3159 Candies

差分约束

2017-08-28 16:32:09 183

原创 POJ - 2240 Arbitrage

ArbitrageTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 24453Accepted: 10349DescriptionArbitrage is the use of discrepancies in currency exchange rate

2017-08-28 16:24:25 151

原创 POJ - 3268 Silver Cow Party

Silver Cow PartyTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 24186Accepted: 11020DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) convenient

2017-08-28 16:11:00 185

原创 POJ - 1797 Heavy Transportation

Heavy TransportationTime Limit: 3000MSMemory Limit: 30000KTotal Submissions: 39515Accepted: 10387DescriptionBackgroundHugo Heavy is happy. After the breakdown

2017-08-28 16:04:31 196

原创 POJ - 2253 Frogger

FroggerTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 48704Accepted: 15510DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Sudden

2017-08-28 15:49:31 140

原创 背包问题小结

背包问题小结

2017-08-27 12:19:27 265

原创 HDU 1114 Piggy-Bank(完全背包)

Piggy-BankTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27205    Accepted Submission(s): 13762Problem DescriptionBefore ACM ca

2017-08-27 12:13:28 150

原创 HDU - 2191 多重背包(经典)

Problem Description急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?后记:人生是一个充满了变数的生命过程,天灾、人祸、病痛是我们生命历程中不可预知的威胁。月有阴晴

2017-08-27 11:13:24 183

原创 HDU - 2955 Robberies

RobberiesTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25698    Accepted Submission(s): 9482Problem DescriptionThe aspiring Ro

2017-08-27 11:04:12 168

原创 ZZULIOJ 2177 排列组合

Description平时大家都爱吃零食,但是大家知道吗?这些零食中大多数都是垃圾食品,它对我们身体的危害是很严重的。最近,赵老师在进教室时常常闻到一股怪味,觉得有同学在吃垃圾食品,老师就开始查,果然,有个同学在吃辣条。于是,赵老师在班上举行了一次讨论会,要大家就“垃圾食品危害健康”这问题发表看法。讨论会开始了,有的同学介绍了垃圾食品的危害,有的提醒我们不要去买,还有的说了垃圾食品

2017-08-27 10:55:32 347

原创 POJ - 2421 Constructing Roads

Constructing RoadsTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 25252Accepted: 11017DescriptionThere are N villages, which are numbered from 1 to N,

2017-08-27 10:41:24 171

原创 POJ - 2349 Arctic Network

Arctic NetworkTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 22506Accepted: 6952DescriptionThe Department of National Defence (DND) wishes to connect

2017-08-27 10:28:29 175

原创 POJ - 1679 The Unique MST

The Unique MSTTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 31842Accepted: 11506DescriptionGiven a connected undirected graph, tell if its minimum sp

2017-08-27 10:16:10 168

原创 POJ - 1861 Network

NetworkTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 17321Accepted: 6970Special JudgeDescriptionAndrew is working as system administrator and i

2017-08-27 10:09:38 129

空空如也

空空如也

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

TA关注的人

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