![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法竞赛
文章平均质量分 79
大学期间的一些acm经历
月球上的人_
一直在路上
展开
-
HDU-6186-CS Course(前缀和+后缀和+位运算)
CS CourseTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3807 Accepted Submission(s): 1412Problem DescriptionLittle A has come to college...原创 2020-02-17 16:34:35 · 379 阅读 · 0 评论 -
POJ 3258-River Hopscotch(二分答案)
River HopscotchTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 25633 Accepted: 10556DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves...原创 2020-02-23 11:03:08 · 220 阅读 · 0 评论 -
牛客小白月赛22-J 计算A+B(大整数加法)
链接:https://ac.nowcoder.com/acm/problem/202511来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述在一行中给出一个字符串,请判断是否满足A + B格式,如果满足,输出计算结果,否则输出"skipped"。此处A,B均为大于等于0的整...原创 2020-02-22 23:55:48 · 396 阅读 · 0 评论 -
UVA10815 Andy's First Dictionary(字符串处理)
DescriptionHH学长刚刚立下了再不过CET就直播xx的flag,为了不真的开启直播模式,HH学长决定好好学习英语。于是他每天都读一篇只包含生词的英语文章,并以自己高达450的智商在一秒钟之内记忆下来。现在给你一篇HH学长今天要读的文章,请你写一个程序,输出他都学习到了哪些单词。要求:如果文章中有相同的单词,那么仅仅输出一次;而且如果两个单词只有大小写不同,将他们视为相同的单词。I...原创 2020-02-20 22:17:27 · 181 阅读 · 0 评论 -
HDU1276-士兵队列训练问题(STL list)
士兵队列训练问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19604 Accepted Submission(s): 8235Problem Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并...原创 2020-02-20 22:35:42 · 620 阅读 · 0 评论 -
HDU-1425 排序
WFU寒假训练<十二>sortTime Limit: 6000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 81178 Accepted Submission(s): 21044Problem Description给你n个整数,请按从大到小...原创 2020-02-17 16:23:20 · 180 阅读 · 0 评论 -
牛客小白月赛22-F-累乘数字(水题)
链接:https://ac.nowcoder.com/acm/contest/4462/F来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述我们知道将一个大于1的数乘以另一个大于1的数会使乘积大于任意一个乘数。现在给出两个数字 n, d,你能否计算将n乘以d次100的结果。...原创 2020-02-23 00:03:55 · 300 阅读 · 0 评论 -
HDU-1873-看病要排队(STL优先队列)
看病要排队Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 20057 Accepted Submission(s): 8372Problem Description看病要排队这个是地球人都知道的常识。不过经过细心的0068的...原创 2020-02-18 21:40:09 · 444 阅读 · 0 评论 -
HDU1027-Ignatius and the Princess II(全排列问题next_permutation函数的使用)
Ignatius and the Princess IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14615 Accepted Submission(s): 8391Problem DescriptionNow our ...原创 2020-02-18 22:18:16 · 300 阅读 · 0 评论 -
51nod-1127 最短的包含字符串(尺取法)
1127 最短的包含字符串给出一个字符串,求该字符串的一个子串s,s包含A-Z中的全部字母,并且s是所有符合条件的子串中最短的,输出s的长度。如果给出的字符串中并不包括A-Z中的全部字母,则输出No Solution。输入第1行,1个字符串。字符串的长度 <= 100000。输出输出包含A-Z的最短子串s的长度。如果没有符合条件的子串,则输出No Solution。输入样例BV...原创 2020-02-18 23:52:18 · 471 阅读 · 0 评论 -
HDU -2094产生冠军 (STL)
Problem Description有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。根据这个规则,无需循环较量,或许就能确定冠军。你的任务就是面对一群比赛选手,在经过了若干场撕杀之后...原创 2020-02-17 16:09:06 · 179 阅读 · 0 评论 -
51Nod 2107 二个奇数次(位运算)
2107 二个奇数次1.0 秒 131,072.0 KB输入一个长度为n的数组,考虑所有不同的数字,有且只有2个数字出现了奇数次。比如对于1 2 3 1 2 3 1 2,我们考虑所有不同的数字1 2 3,有且只有1,2出现了奇数次(均为3次)输出这两个出现了奇数次的数字。先输出这两个数字中较小的,再输出较大的。1 <= n <= 1000001 <= a[i] &l...原创 2020-02-20 22:59:25 · 305 阅读 · 0 评论 -
2018 ICPC青岛-books(思维题)
DreamGrid went to the bookshop yesterday. There are nn books in the bookshop in total. Because DreamGrid is very rich, he bought the books according to the strategy below:Check the nn books from the ...原创 2020-02-29 10:46:37 · 595 阅读 · 0 评论 -
POJ 3126-Prime Path(BFS+筛素数)
Prime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 38194 Accepted: 20384DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security statin...原创 2020-03-02 19:18:13 · 220 阅读 · 0 评论 -
CodeForces 1203C-Common Divisors(欧几里得)
You are given an array a consisting of n integers.Your task is to say the number of such positive integers x such that x divides each number from the array. In other words, you have to find the numbe...原创 2020-03-05 17:52:00 · 376 阅读 · 0 评论 -
HDU 1495-非常可乐(BFS+模拟)
非常可乐Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 36199 Accepted Submission(s): 14090Problem Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou...原创 2020-03-03 20:50:01 · 255 阅读 · 0 评论 -
CodeForces 15A-Cottage Village(思维题)
A new cottage village called «Flatville» is being built in Flatland. By now they have already built in «Flatville» n square houses with the centres on the Оx-axis. The houses’ sides are parallel to th...原创 2020-02-29 00:01:59 · 410 阅读 · 0 评论 -
POJ1321-棋盘问题(DFS)
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n当为...原创 2020-02-25 18:12:43 · 216 阅读 · 0 评论 -
HDU1241-Oil Deposits(DFS)
Oil DepositsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 58953 Accepted Submission(s): 33786Problem DescriptionThe GeoSurvComp geologi...原创 2020-02-25 18:39:26 · 276 阅读 · 0 评论 -
POJ 3660-Cow Contest(Floyd+传递闭包)
Cow ContestTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20521 Accepted: 11372DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1…N, are participating in a programming contest. ...原创 2020-03-02 20:58:40 · 251 阅读 · 0 评论 -
HDU 1690-Bus System(Floyd+读题)
Bus SystemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10903 Accepted Submission(s): 2982Problem DescriptionBecause of the huge popula...原创 2020-03-03 18:31:04 · 149 阅读 · 0 评论 -
CodeForces 755A-PolandBall and Hypothesis(思维题)
PolandBall is a young, clever Ball. He is interested in prime numbers. He has stated a following hypothesis: “There exists such a positive integer n that for each positive integer m number n·m + 1 is ...原创 2020-02-28 23:51:59 · 249 阅读 · 0 评论 -
HDU 1233-还是畅通工程(经典最小生成树)
还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 74407 Accepted Submission(s): 33605Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距...原创 2020-03-05 19:49:14 · 161 阅读 · 0 评论 -
POJ 2253-Frogger(Floyd变形)
FroggerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 78072 Accepted: 23723DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is ...原创 2020-03-08 10:29:40 · 279 阅读 · 0 评论 -
POJ 2251-Dungeon Master(三维BFS)
Dungeon MasterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 68867 Accepted: 24888DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is comp...原创 2020-02-29 11:07:02 · 171 阅读 · 2 评论 -
HDU 2035-人见人爱A^B(浅谈快速幂)
人见人爱A^BTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 69289 Accepted Submission(s): 45915Problem Description求A^B的最后三位数表示的整数。说明:A^B的含义是“...原创 2020-03-01 13:54:56 · 269 阅读 · 0 评论 -
UVA11624-Fire!(BFS)
Joe works in a maze. Unfortunately, portions of the maze havecaught on fire, and the owner of the maze neglected to create a fireescape plan. Help Joe escape the maze.Given Joe’s location in the ma...原创 2020-02-28 23:21:38 · 324 阅读 · 0 评论 -
HDU 1846-Brave Game(巴什博弈)
Brave GameTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19391 Accepted Submission(s): 13312Problem Description十年前读大学的时候,中国每年都要从国外引进一些电影...原创 2020-03-08 10:13:41 · 129 阅读 · 0 评论 -
51Nod 1649-齐头并进(最短路dijkstra)
在一个叫奥斯汀的城市,有n个小镇(从1到n编号),这些小镇通过m条双向火车铁轨相连。当然某些小镇之间也有公路相连。为了保证每两个小镇之间的人可以方便的相互访问,市长就在那些没有铁轨直接相连的小镇之间建造了公路。在两个直接通过公路或者铁路相连的小镇之间移动,要花费一个小时的时间。现在有一辆火车和一辆汽车同时从小镇1出发。他们都要前往小镇n,但是他们中途不能同时停在同一个小镇(但是可以同时停在小镇n...原创 2020-03-05 18:04:37 · 144 阅读 · 0 评论 -
CodeForces - 26A-Almost Prime(分解质因子+暴力打表+STL)
A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which...原创 2020-02-28 23:33:27 · 506 阅读 · 0 评论 -
POJ 1251-Jungle Roads(最小生成树)
Jungle RoadsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 38773 Accepted: 18244DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid mo...原创 2020-03-08 10:21:24 · 227 阅读 · 0 评论 -
POJ3278-Catch That Cow(BFS)
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 159649 Accepted: 48699DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her im...原创 2020-02-26 19:00:25 · 170 阅读 · 0 评论 -
HDU 1272-小希的迷宫(带环并查集)
小希的迷宫Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 79689 Accepted Submission(s): 25090Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B...原创 2020-03-15 23:23:22 · 161 阅读 · 0 评论 -
CodeForces 104B-Testing Pants for Sadness(思维题)
The average miner Vaganych took refresher courses. As soon as a miner completes the courses, he should take exams. The hardest one is a computer test called “Testing Pants for Sadness”.The test consi...原创 2020-03-20 23:47:25 · 259 阅读 · 0 评论 -
CodeForces 1327A - Sum of Odd Integers(思维)
You are given two integers n and k. Your task is to find if n can be represented as a sum of k distinct positive odd (not divisible by 2) integers or not.You have to answer t independent test cases....原创 2020-03-25 20:56:30 · 351 阅读 · 0 评论 -
HDU 4496-D-City(并查集)
D-CityTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 6470 Accepted Submission(s): 2213Problem DescriptionLuxer is a really bad guy. He d...原创 2020-03-15 21:59:17 · 1007 阅读 · 0 评论 -
CodeForces - 268C(思维题)
Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:The coordinates of each point in the set are...原创 2020-03-15 22:49:12 · 260 阅读 · 0 评论 -
CodeForces 556C - Case of Matryoshkas(模拟)
Andrewid the Android is a galaxy-famous detective. He is now investigating the case of vandalism at the exhibition of contemporary art.The main exhibit is a construction of n matryoshka dolls that ca...原创 2020-03-08 11:09:19 · 200 阅读 · 0 评论 -
HDU 1856-More is better(并查集)
More is betterTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 327680/102400 K (Java/Others)Total Submission(s): 40136 Accepted Submission(s): 14080Problem DescriptionMr Wang wants some ...原创 2020-03-15 22:05:55 · 145 阅读 · 0 评论 -
POJ 1456-Supermarket(贪心+并查集)
SupermarketTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 23513 Accepted: 10318DescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Pro...原创 2020-03-11 16:54:26 · 169 阅读 · 0 评论