自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Eddy

萌新程序员的博客

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

原创 2018.4.10【 HDU - 2035 】解题报告(快速幂,水题)

人见人爱A^BTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 50694    Accepted Submission(s): 33834Problem Description求A^B的最后三位数表示的整数。说明:A^B的含义是“A的B次方...

2018-04-10 22:21:56 303

原创 2018.4.10【 POJ - 1995 】解题报告(快速幂学习,模板题)

Raising Modulo NumbersTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 9545 Accepted: 5807DescriptionPeople are different. Some secretly read magazines full of interesting girls' pictures, ot...

2018-04-10 20:15:04 307

原创 2018.3.28【 AtCoder beginner092-C 】解题报告(线性处理)

C - Traveling PlanTime limit : 2sec / Memory limit : 256MBScore : 300 pointsProblem StatementThere are N sightseeing spots on the x-axis, numbered 1,2,…,N. Spot i is at the point with coordinate Ai. I...

2018-03-28 19:55:47 251

原创 2018.3.4【 AtCoder - 3620 】解题报告(sort,前缀和,dp)

C - Snuke FestivalTime limit : 2sec / Memory limit : 256MBScore : 300 pointsProblem StatementThe season for Snuke Festival has come again this year. First of all, Ringo will perform a ritual to summon...

2018-03-04 20:51:51 465

原创 2018.3.4【 AtCoder - 3867 】解题报告(矩阵知识,数学)

C - Takahashi's InformationTime limit : 2sec / Memory limit : 256MBScore: 300 pointsProblem StatementWe have a 3×3 grid. A number ci,j is written in the square (i,j), where (i,j) denotes the square at...

2018-03-04 20:41:07 375

原创 2018.3.4【 AtCoder - 3867 】解题报告(字符串处理,数学)

A - Digit Sum 2Time limit : 2sec / Memory limit : 256MBScore : 300 pointsProblem StatementFind the maximum possible sum of the digits (in base 10) of a positive integer not greater than N.Constraints1...

2018-03-04 20:30:40 354

原创 2018.3.1【 HDU - 6113 】解题报告(百度之星初赛,BFS,DFS,图像处理)

度度熊的01世界Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1891    Accepted Submission(s): 702Problem Description度度熊是一个喜欢计算机的孩子,在计算机的世界中,所有事物实际上都只由...

2018-03-01 15:30:23 313

原创 2018.3.1【 HDU - 6114 】解题报告(百度之星初赛,简单dp,组合数)

ChessTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 902    Accepted Submission(s): 504Problem Description車是中国象棋中的一种棋子,它能攻击同一行或同一列中没有其他棋子阻隔的棋子。一...

2018-03-01 15:16:23 816

原创 2018.2.28【 UVa - 227 】解题报告(紫书练习题,模拟,输出格式)

【题目链接】UVa:点击打开链接   VJ:点击打开链接【题目大意】给你一个5*5的棋盘,被24个字母和1个空格填满。A、B、L、R分别表示空格向上向下向左向右移动的命令,给出初始棋盘,给出一段命令,求出最终棋盘的样子。【解题思路】注意空格在边界的情况,模拟棋盘移动,每一次命令交换空格与上下左右之一空格中的字母,有任一一条不合理的命令,便可以判断走法有问题。【解题代码】#include <c...

2018-02-28 01:30:32 310

原创 2018.2.28【 UVa - 202 】解题报告(紫书练习题,循环小数,输出格式)

【题目链接】点击打开链接【题目大意】给出一个分数,输出它的循环小数表示。【解题思路】判断循环节。两个数组,一个数组yushu[]储存每一位的商,即小数点后面的数字。另一个数组vis[]储存每一次除法计算的商(或者被除数),当vis[]里某个元素访问两遍的时候,循环节出现,即从第一次出现该元素的位置到第二次出现该元素的位置。之后按格式输出即可。【解题代码】#include <cstdio&gt...

2018-02-28 01:17:15 368

原创 2018.2.21【 UVa - 1584 】解题报告(紫书例题,环状序列,字典序)

【题目链接】【题目大意】一个环形字符串,输出字典序最小的表示方法。【解题思路】利用指针,循环比较从p位和q位(一个是当前指向的字符串开始位置,另一个是存储的目前字典序最小的字符串开始位置)开始的字母大小。【解题代码】#include <cstdio>#include <cstring>#include <algorithm>#include <que...

2018-02-21 11:05:50 263

原创 2018.2.21【 UVa - 1583 】解题报告(紫书例题,预处理,查表)

【题目链接】【题目大意】生成元:x加上x各位数字之和等于y,则x为y的一个生成元,给定一个数,求该数的最小生成元,若无解输出0.【解题思路】若对每一个数进行生成元的判断,则每次计算一个都要枚举n-1个数,效率过低。高效的方法是,按顺序从1开始,计算出以该数作为最小生成元的数。【解题代码】#include <cstdio>#include <cstring>#includ...

2018-02-21 10:51:35 233

原创 2018.2.4【 HDU - 1789 】解题报告(贪心)

Doing Homework againTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15959    Accepted Submission(s): 9294Problem DescriptionIgna

2018-02-04 22:29:12 364

原创 2018.2.4【 HDU - 5999 】解题报告(贪心)

The Third Cup is FreeTime Limit: 12000/6000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1833    Accepted Submission(s): 857Problem DescriptionPand

2018-02-04 22:06:01 345

原创 2018.2.4【 CodeForces - 831A 】解题报告(模拟)

A. Unimodal Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArray of integers is unimodal, if:it

2018-02-04 18:03:44 306

原创 2018.2.2【 CodeForces - 501B 】解题报告(STL,map,字符串处理)

B. Misha and Changing Handlestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMisha hacked the Codeforces si

2018-02-02 00:39:57 250

原创 2018.2.1【HDU - 1495 】解题报告(搬运)(BFS)

2届ACM国际大学生程序设计竞赛全球总决赛非常可乐Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 18771    Accepted Submission(s): 7599Problem

2018-02-01 21:40:46 258

原创 2018.2.1【 UVA - 156 】解题报告(STL,set,multiset,make_pair)

原题链接:点击打开链接【题目大意】ananagrams,指一系列单词由相同的字母构成(但顺序不同),输入一段文章,将非ananagrams输出,即没有与他字母构成相同但顺序不同的单词。【解题思路】本题学习了UVa 156 Ananagrams (用STL multimap&set处理字典中的重复元素),这位前辈的代码。思路即将每个单词s(处理后的状态)和origin(处理前状态

2018-02-01 20:32:09 239

原创 2018.2.1【 CodeForces - 527C 】解题报告(STL,set,边长和位置的维护)

C. Glass Carvingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLeonid wants to become a glass carver (the

2018-02-01 11:49:48 290

原创 2018.2.1【 UVA-11995 】解题报告(STL,数据结构,模拟)

I Can Guess the Data Structure!There is a bag-like data structure, supporting two operations:1 xThrow an element x into the bag.2Take out an element from the bag.Given a sequen

2018-02-01 11:07:07 210

原创 2018.1.30【 HDU - 1022 】解题报告(STL,stack,模拟)

Train Problem ITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41964    Accepted Submission(s): 15692Problem DescriptionAs the n

2018-01-30 21:30:58 266

原创 2018.1.30【 UVA - 10815 】解题报告(STL,set容器,string类)

原题目地址:点击打开链接【题目大意】给定一个文章段落,要求按字典序输出出现的所有单词(不重复)【解题思路】要求不重复且按照字典序排序,想到利用STL中的set容器,那么怎么在set里存储字符串呢?搜集了多种方法,最后发现还是利用C++string类来的方便,不过这就带来一个问题。printf,scanf只支持内置类型,对string类型不支持的。这时候不得以都要换上cin,co

2018-01-30 20:39:24 190

原创 2018.1.30【 CodeForces - 620C 】解题报告(STL,set容器)

C. Pearls in a Rowtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n pearls in a row. Let's enume

2018-01-30 18:29:46 273

原创 2018.1.30【 CodeForces - 612C 】解题报告(STL,栈,strlen使用注意)

C. Replace To Make Regular Bracket Sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given st

2018-01-30 15:56:49 225

原创 2018.1.30【 POJ - 1458 】解题报告(dp,最长相同子序列)

Common SubsequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 56895 Accepted: 23740DescriptionA subsequence of a given sequence is the given seq

2018-01-30 02:31:04 180

原创 2018.1.29【 HDU - 1518 】解题报告(dfs,极易TLE,剪枝)

SquareTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17274    Accepted Submission(s): 5409Problem DescriptionGiven a set of st

2018-01-29 19:56:34 313

原创 2018.1.29【 CodeForces - 455A 】解题报告(dp,long long)

A. Boredomtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlex doesn't like boredom. That's why whenever he

2018-01-29 19:40:56 490

原创 2018.1.29【 AtCoder Beginner Contest 087-C 】解题报告(简单dp)

C - CandiesTime limit : 2sec / Memory limit : 256MBScore : 300 pointsProblem StatementWe have a 2×N grid. We will denote the square at the i-th row and j-th column (1≤i≤2, 1≤

2018-01-29 01:39:53 705

原创 2018.1.29【 AtCoder Beginner Contest 087-D 】解题报告(TLE)(STL,队列)

D - People on a LineTime limit : 2sec / Memory limit : 256MBScore : 400 pointsProblem StatementThere are N people standing on the x-axis. Let the coordinate of Person i be xi.

2018-01-29 01:29:42 371

原创 2018.1.28【 SCU - 1114 】解题报告(DP,路径,DFS)

下图是个数字三角,请编写一个程序计算从顶部至底部某处一条路径,使得该路径所经过的数字总和最大。73  88  1  02  7  4  41.  每一步可沿左斜线向下或右斜线向下走;2.  13.  三角形中的数字为整数 0,1,……,99。4.  如果有多种情况结果都最大,任意输出一种即可。 输入:第

2018-01-28 19:59:46 208

原创 2018.1.27【HDU - 2717 】解题报告(BFS)

Catch That CowTime Limit: 5000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17820    Accepted Submission(s): 5260Problem DescriptionFarmer Joh

2018-01-27 21:13:01 253

原创 2018.1.27【POJ - 3126】解题报告(BFS,换门牌号,素数筛)

Prime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 24280 Accepted: 13417DescriptionThe ministers of the cabinet were quite upset by the messa

2018-01-27 19:39:06 319

原创 2018.1.27【CodeForces - 689B】解题报告(BFS)

B. Mike and Shortcutstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently, Mike was very busy with stu

2018-01-27 19:03:43 493

原创 2018.1.27【ZOJ - 1709】解题报告(BFS)

Oil DepositsTime Limit: 2 Seconds      Memory Limit: 65536 KBThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large

2018-01-27 18:51:03 318

原创 2018.1.21【CodeForces - 825B】解题报告(模拟,五子棋)

B. Five-In-a-Rowtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob play 5-in-a-row game. They ha

2018-01-22 17:49:51 285

原创 2018.1.21【POJ - 2260】解题报告(模拟,图论引申)

Error CorrectionTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6820 Accepted: 4286DescriptionA boolean matrix has the parity property when each row

2018-01-22 17:39:33 231

原创 2018.1.21【POJ - 1328】小岛与雷达解题报告(二维转一维,贪心)

Radar InstallationTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 96097 Accepted: 21364DescriptionAssume the coasting is an infinite straight line.

2018-01-22 16:20:06 513

原创 2018.1.22【CodeForces - 600C】解题报告(贪心,字符串)

C. Make Palindrometime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA string is called palindrome if it read

2018-01-22 16:05:35 332

原创 2018.1.22【HDU - 1716】解题报告(排列STL)

排列2Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9524    Accepted Submission(s): 3467Problem DescriptionRay又对数字的列产生了兴趣:现有四张卡

2018-01-22 15:47:53 360

原创 2018.1.20【HDU - 1027】解题报告(排列STL)

Ignatius and the Princess IITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9305    Accepted Submission(s): 5446Problem Description

2018-01-20 18:26:02 277

空空如也

空空如也

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

TA关注的人

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