自定义博客皮肤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)
  • 收藏
  • 关注

原创 【重大消息】 搬家啦,搬家啦~

Update:欢迎访问我的新的网站:https://alberts97.github.io/    2018.11 Update:不想续费了,然后网站可能会在某个不确定的时刻GG。 2018.10 Update:博客地址: www.masteralbert.com            2018.04.03 随着时代的发展,博主身边的人几乎人人都有自己的网站,于...

2018-02-25 20:24:19 824

原创 【清单】 ---算法竞赛入门经典第二版 【例题+习题】【已搬家,不再更新..】

写这篇博客的目的:打算把这本书好好消化掉利用起来,但是做完题目后直接在书上进行标记感觉不符合我的习惯(我是一个有全局观念的人呐,所以总想看自己整体进度之类的),而去网上找又没能找到符合我想法的文章(难道只有这种“奇怪的”想法?),虽然每章也都会有个例题一览,但是..算了,还是自己整理的感情更深–>于是“浪费时间”来整理出了这篇博客。说明: 所有题目均来自UVa OJ,因此题目...

2017-05-23 00:09:47 6659 1

原创 【Hello World】 Hello my friend,nice to meet u ~

15岁觉得游泳难,放弃游泳,到18岁遇到一个你喜欢的人约你去游泳,你只好说“我不会耶”。18岁觉得英文难,放弃英文,28岁出现一个很棒但要会英文的工作,你只好说“我不会耶”。人生前期越嫌麻烦,越懒得学,后来就越可能错过让你动心的人和事,错过新风景。

2017-05-10 21:55:15 670

原创 CodeForces 864D Make a Permutation! 【贪心】【模拟】

题目链接 : Codeforces Round #436 (Div. 2) DDescription:Ivan has an array consisting of n elements. Each of the elements is an integer from 1 to n.Recently Ivan learned about permutations and their lexicogr

2017-09-27 22:58:42 445

原创 UVa 1605 Building for UN 【技巧】

题目链接:UVa 1605 Building for UN Description:The United Nations has decided to build a new headquarters in Saint Petersburg, Russia. It will have a form of a rectangular parallelepiped and will consist of

2017-08-18 21:08:50 414

原创 UVa 120 Stacks of Flapjacks 【排序】

题目链接:UVa 120 Stacks of FlapjacksDescription:Stacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discrete event s

2017-08-18 20:57:00 349

原创 HDU 6140 Hybrid Crystals【题意】【思维】

题目链接:2017 Multi-University Training Contest - Team 8 - HProblem Description Kyber crystals, also called the living crystal or simply the kyber, and known as kaiburr crystals in ancient times, were ra

2017-08-17 21:17:53 641 3

原创 1999 ICPC WF C Morse Mismatches 【模拟】

PROBLEM C Morse Mismatches Input file: morse.inSamuel F. B. Morse is best known for the coding scheme that carries his name. Morse code is still used in international radio communication. The coding

2017-08-11 20:46:25 572

原创 UVa 12412 A Typical Homework (a.k.a Shi Xiong Bang Bang Mang) 【模拟】

题目链接:UVa 12412A Typical Homework(a.k.a Shi Xiong Bang Bang Mang)Hi, I am an undergraduate student in institute of foreign languages. As you know, C programming is a required course in our univer

2017-08-04 19:07:35 736 4

原创 玲珑学院 1138 震惊,99%+的中国人都会算错的问题 【容斥】【技巧】

1138 - 震惊,99%+的中国人都会算错的问题Time Limit:4s Memory Limit:128MByteSubmissions:316Solved:88DESCRIPTION众所周知zhu是一个大厨,zhu一直有自己独特的咸鱼制作技巧.tang是一个咸鱼供应商,他告诉zhu在他那里面有NN条咸鱼(标号从1到N)可以被用来制作.

2017-07-31 14:02:21 744

原创 UVa 11806 Cheerleaders 【容斥】【入门】

题目链接:UVa 11806 Cheerleaders Description: In most professional sporting events, cheerleaders play a major role in entertaining the spectators. Their roles are substantial during breaks and prior to s

2017-07-29 11:47:18 764

原创 UVa 10325 The Lottery 【容斥】【入门】

题目链接:UVa 10325 The Lottery Description: The Sports Association of Bangladesh is in great problem with their latest lottery ‘Jodi laiga Jai’. There are so many participants this time that they cannot

2017-07-29 11:39:47 477

转载 【知识点】 --- 容斥原理

原文作者:vivc原文链接:http://www.cppblog.com/vici/archive/2011/09/05/155103.html容斥原理(翻译)前言:这篇文章发表于http://e-maxx.ru/algo/inclusion_exclusion_principle,原文是俄语的。由于文章确实很实用,而且鉴于国内俄文资料翻

2017-07-29 10:08:10 631

原创 玲珑学院 1137 Sin your life 【数学】

1137 - Sin your lifeTime Limit:1s Memory Limit:128MByteSubmissions:613Solved:112DESCRIPTION给一个正整数nn,求下列表达式的最大值:(sin(x)+sin(y)+sin(z))[x+y+z=n][x≥1][y≥1][z≥1](sin(x)+sin(y)+si

2017-07-27 20:16:55 442

原创 HDU 6043 KazaQ's Socks 【规律】

KazaQ's SocksTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 462    Accepted Submission(s): 300Problem DescriptionKazaQ wears sock

2017-07-26 12:02:25 408

原创 HDU 6034 Balala Power! 【模拟】【大数高精度】

Balala Power!Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2941    Accepted Submission(s): 648Problem DescriptionTalented

2017-07-26 11:57:43 617

原创 HDU 6033 Add More Zero 【数学】【基础】

Add More ZeroTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 547    Accepted Submission(s): 390Problem DescriptionThere is a young

2017-07-26 11:52:02 639

原创 2017 省赛 山东 B Quadrat 【打表】【规律】

QuadratTime Limit: 1000MS Memory Limit: 65536KBSubmit Statistic DiscussProblem DescriptionIt is well-known that for any n there are exactly four n-digit numbers (including ones with leading

2017-07-24 19:21:18 465

原创 SDNU 51nod 几道简单的博弈题目

1.51nod 1066 Bash游戏最基本的巴什博奕,告诉你n和k,当n%(k+1) == 0时后手必胜,否则先手必胜。 Mycode:#include <bits/stdc++.h>using namespace std;const int MAX = 1005;int main(){ int T; int n, k; cin >> T; while(T-

2017-07-23 23:51:52 370

原创 2017 省赛 山东 A Return of the Nim 【博弈】【Nim+Wythoff】

Return of the NimTime Limit: 1000MS Memory Limit: 65536KBSubmit Statistic DiscussProblem DescriptionSherlock and Watson are playing the following modified version of Nim game:There are n

2017-07-23 23:23:41 672

转载 【知识点】 --- 博弈知识汇总

博弈知识汇总有一种很有意思的游戏,就是有物体若干堆,可以是火柴棍或是围棋子等等均可。两个人轮流从堆中取物体若干,规定最后取光物体者取胜。这是我国民间很古老的一个游戏,别看这游戏极其简单,却蕴含着深刻的数学原理。下面我们来分析一下要如何才能够取胜。(一)巴什博奕(Bash Game):只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者得胜

2017-07-23 22:22:12 429

原创 SDNU 1147 Pythagoras's Revenge 【技巧暴力】

1147.Pythagoras's RevengeTime Limit: 1000 MS    Memory Limit: 32768 KBTotal Submission(s): 4    Accepted Submission(s): 2DescriptionThe famous Pythagorean theorem state

2017-07-18 21:02:47 421

原创 玲珑学院 1143 计算几何你瞎暴力【计算几何】【技巧暴力】

1143 - 计算几何你瞎暴力Time Limit:5s Memory Limit:256MByteSubmissions:1828Solved:365DESCRIPTION今天HHHH考完了期末考试,他在教学楼里闲逛,他看着教学楼里一间间的教室,于是开始思考:如果从一个坐标为 (x1,y1,z1)(x1,y1,z1)的教室走到(x2,y

2017-07-17 22:50:44 386

原创 【知识点】 ---线段树的常用操作

1.什么是线段树?线段树是一种二叉搜索树,与区间树相似,它将一个区间划分成一些单元区间,每个单元区间对应线段树中的一个叶结点。 性质:对于线段树中的每一个非叶子节点[a,b],它的左儿子表示的区间为[a,(a+b)/2],右儿子表示的区间为[(a+b)/2+1,b]。因此线段树是平衡二叉树,最后的子节点数目为N,即整个线段区间的长度。举例说明:

2017-07-11 15:30:29 415

原创 1999 ICPC WF H Flooded! 【思维】【细节】

题目链接: UVA-815 Description: To enable homebuyers to estimate the cost of flood insurance, a real-estate firm provides clients with the elevation of each 10-meter by 10-meter square of land in regions wh

2017-06-06 00:31:36 523

原创 【知识点】 ---寻找第n个素数

如何快速找到第n个素数呢? 看到这个问题后我的第一思路就是用筛法筛出素数数组。 Mycode:#include <bits/stdc++.h>using namespace std;const int MAX = 5000005;int pri[MAX];int main(){ memset(pri, 0, sizeof(pri)); for(int i = 2; i <

2017-06-05 19:35:29 3795

原创 2017 ICPC WF I Secret Chamber at Mount Rushmore【基础/签到】

题目链接:2017 WF I Secret Chamber at Mount Rushmore Description: By now you have probably heard that there is a spectacular stone sculpture featuring four famous U.S.presidents at Mount Rushmore. However

2017-06-02 23:26:03 726

原创 1990 ICPC WF B Squares【暴力】

题目链接:UVa 201 SquaresDescription: A children’s board game consists of a square array of dots that contains lines connecting some of the pairs of adjacent dots. One part of the game requires that the

2017-06-02 22:45:18 483

原创 1990 ICPC WF C Repeating Decimals 【数组和字符串】【模拟】

题目链接: UVa 202Description: The decimal expansion of the fraction 1/33 is 0.03, where the 03 is used to indicate that the cycle 03 repeats indefinitely with no intervening digits. In fact, the decima

2017-06-02 20:31:55 415

原创 CodeForces 810C Do you want a date? 【数学】【排序】

题目链接:Codeforces Round #415 (Div. 2) CDescprition: Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network

2017-05-22 11:46:07 586

原创 CodeForces 810B Summer sell-off 【贪心】【排序】

题目链接:Codeforces Round #415 (Div. 2) BDescription: Summer holidays! Someone is going on trips, someone is visiting grandparents, but someone is trying to get a part-time job. This summer Noora decided

2017-05-22 11:04:57 939

原创 CodeForces 810A Straight <<A>> 【数学】【模拟】

题目链接: Codeforces Round #415 (Div. 2) ADescription: Noora is a student of one famous high school. It’s her final year in school — she is going to study in university next year. However, she has to get

2017-05-22 10:33:54 523

原创 51nod 1130 N的阶乘的长度 V2(斯特林近似) 【数学】【斯特林公式】

在进入正视讲解之前我们先来看一道简单点的题目压压惊。题目链接:51nod1058Description: 输入N求N的阶乘的10进制表示的长度。例如6! = 720,长度为3。Input 输入N(1 <= N <= 10^6)Output 输出N的阶乘的长度Input示例 6Output示例 3题目大意: 很明确,就是求n!的长度解题思路: 我们知道,对于任意的数n,len=log10

2017-05-16 21:43:04 653

原创 EOJ 3256 拼音魔法 【模拟】

题目链接:EOJ 3256Description: 魔法学校小学一年级有一种题。就是给一个字的拼音,给一个声调,让你正确地注音。但魔法老师给了巨量的题,你不用魔法根本不可能做完。所以现在要让你发明一种魔法完成这个任务。 问题已经讲完了,下面开始教授汉语。(会汉语或者自认为会汉语的可以自动跳过) 汉语中一个字的拼音由声母和韵母两部分组成,在极少数情况下也会没有声母,但一定有韵母。 一般认为,声

2017-05-13 11:10:27 693

原创 2016 ICPC 大连 C Game of Taking Stones 【威佐夫博弈+大数+高精度】

Problem DescriptionTwo people face two piles of stones and make a game. They take turns to take stones. As game rules, there are two different methods of taking stones: One scheme is that you can ta

2017-05-01 20:22:41 1458

转载 【知识点】 ---最短路几种算法对比

来自:http://blog.csdn.net/basycia/article/details/50766436Dijkstra: O(n2)适用于权值为非负的图的单源最短路径,用斐波那契堆的复杂度O(E+VlgV), BellmanFord: 适用于权值有负值的图的单源最短路径,并且能够检测负圈,复杂度O(VE) SPFA: 适用于权值有负值,且没有负圈的图的单源

2017-04-21 21:18:40 435

原创 [kuangbin带你飞]专题七 线段树 【A、B、C、E、G、H】

题目链接:点击打开链接A - 敌兵布阵HDU - 1166                    单点更新及区间求和。因为更新时是在原有的基础上进行加减,所以用a数组来记录其数值。AC代码:#include #include #include #include #include using namespace std;const int INF =

2017-04-18 12:48:16 603

原创 POJ 1330 Nearest Common Ancestors 【最近公共祖先】

DescriptionA rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an integer from {1, 2,...,16}

2017-04-12 20:55:27 375

原创 2017_SDNU_ACM-ICPC_Provincial_Team_Selection_Round_2【--完结--】

山东省第八届acm大学程序设计竞赛山师选拔赛第一场(声明:标题是自己取的,如果有语法错误的话与他人无关)-----------------------------------------------------------------------------------分割线------------------------------------------------------

2017-04-10 23:52:22 1574 2

原创 2017_SDNU_ACM-ICPC_Provincial_Team_Selection_Round_1【--完结--】

山东省第八届acm大学程序设计竞赛山师选拔赛第一场(声明:标题是自己取的,如果有语法错误的话与他人无关)-----------------------------------------------------------------------------------分割线----------------------------------------------------

2017-04-01 06:58:56 618

空空如也

空空如也

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

TA关注的人

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