- 博客(65)
- 资源 (1)
- 收藏
- 关注
原创 (第二次)Educational Codeforces Round 44 (Rated for Div. 2)
A. Chess Placingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a chessboard of size 1 × n. It is guaranteed that n is even. The ches...
2018-05-22 21:16:25
279
原创 kuangbin专题二 搜索进阶 I - A计划
D - Escape The students of the HEU are maneuvering for their military training. The red army and the blue army are at war today. The blue army finds that Little A is the spy of the red army, so Little...
2018-05-18 18:29:15
250
原创 第一次完整的做一场codeforces !!!!!!(Codeforces Round #483 (Div. 2) [Thanks, Botan Investments and Victor Sha)
A. Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo players play a game.Initially there are nn integers a1,a2,…,ana1,a2,…,an written on the...
2018-05-16 20:12:58
343
原创 kuangbin专题二 搜索进阶 A - Eight
A - Eight The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and...
2018-04-28 21:02:34
465
1
原创 kuangbin专题二 搜索进阶 I - A计划
I - A计划 可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她救出。 现据密探所报,公主被关在一个两层的迷宫里,迷宫的入口是S(0,0,0),公主的位置用P表示,时空传输机用#...
2018-04-26 20:56:58
240
原创 多项式除法
https://wenku.baidu.com/view/54ad911f55270722192ef7b4.html这个讲的很详细,以后不会了就回来看看
2018-04-26 09:22:11
589
原创 kuangbin专题二 搜索进阶 C - 哈密顿绕行世界问题
C - 哈密顿绕行世界问题一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。 Input前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m<=20,m>=1.m=0退出. Output输出从第m个城市出发经过每个城市1次又回到m的所有路线,如有多条路线,按字典序输出,每行1条路线...
2018-04-25 20:54:08
192
原创 kuangbin专题一 简单搜索 M - 非常可乐
M - 非常可乐大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都是没有刻度的,且 S==N+...
2018-04-24 20:30:50
278
原创 kuangbin专题一 简单搜索 J - Fire!
J - Fire!#include<iostream> #include<cstring> #include<queue> using namespace std; const int _max=1200; const int _m=999999; struct node{ int x,y; int t; };...
2018-04-15 16:00:08
368
原创 kuangbin专题一 简单搜索 L - Oil Deposits
L - Oil Deposits The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a gri...
2018-04-15 10:40:17
378
原创 kuangbin专题一 简单搜索 N - Find a way
N - Find a way Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki. Yifenfei’s hom...
2018-04-15 10:17:11
383
原创 kuangbin专题一 简单搜索 K - 迷宫问题
K - 迷宫问题 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × ...
2018-04-14 19:43:11
286
原创 kuangbin专题一 简单搜索 G - Shuffle'm Up
G - Shuffle'm Up A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack conta...
2018-04-13 15:37:30
215
原创 kuangbin专题一 简单搜索 F - Prime Path
F - Prime PathThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a...
2018-04-12 21:44:38
216
原创 kuangbin专题一 简单搜索 E - Find The Multiple
E - Find The Multiple Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not grea...
2018-04-11 21:46:16
309
原创 kuangbin专题一 简单搜索 D - Fliptile
D - FliptileFarmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M× N grid (1 ≤ M ≤ 15;...
2018-04-11 21:22:56
221
原创 kuangbin专题一 简单搜索 C - Catch That Cow
C - Catch That Cow Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a poi...
2018-04-11 20:28:41
261
原创 kuangbin专题一 简单搜索 B - Dungeon Master
B - Dungeon Master You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move on...
2018-04-10 21:12:15
240
原创 kuangbin专题一 简单搜索 A - 棋盘问题
A - 棋盘问题 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <...
2018-04-10 19:29:29
308
原创 杭电 acm 1052 Tian Ji -- The Horse Racing(贪心算法)
Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 34089 Accepted Submission(s): 10333Problem DescriptionHere is a fa...
2018-04-09 21:03:58
302
原创 杭电 acm 1728 逃离迷宫(有错未改)
逃离迷宫Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 31638 Accepted Submission(s): 7737Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,glo...
2018-04-09 19:59:24
324
原创 杭电 acm 1003 Max Sum(dp最大子序列)
Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 278732 Accepted Submission(s): 66175Problem DescriptionGiven a sequence a[1],a[2],a[3]...
2018-04-08 20:26:37
269
原创 杭电 acm 1203 I NEED A OFFER! (01背包问题)
I NEED A OFFER!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 32646 Accepted Submission(s): 13256Problem DescriptionSpeakless很早就想出国,现在他已经考完了...
2018-04-07 20:15:08
332
原创 杭电 1087 Super Jumping! Jumping! Jumping!(最长递增子序列)
Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 45708 Accepted Submission(s): 21181Problem DescriptionNowaday...
2018-04-06 21:05:23
246
原创 杭电 acm 2553 N皇后问题
N皇后问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 29043 Accepted Submission(s): 12759Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后...
2018-03-18 20:53:27
810
原创 杭电 acm 2030 汉字统计
汉字统计Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 53253 Accepted Submission(s): 28843Problem Description统计给定文本文件中汉字的个数。 Input输入文件首先包含一个整数n,...
2018-03-15 11:56:10
403
原创 杭电 acm 2031 进制转换
进制转换Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 57828 Accepted Submission(s): 31484Problem Description输入一个十进制数N,将它转换成R进制数输出。 Input输入数据包含多...
2018-03-15 11:54:23
358
原创 杭电 acm 2032 杨辉三角
杨辉三角Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 79150 Accepted Submission(s): 32484Problem Description还记得中学时候学过的杨辉三角吗?具体的定义这里不再描述,你可以参考以下...
2018-03-15 11:53:35
273
原创 杭电 acm 2033 人见人爱A+B
人见人爱A+BTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 52679 Accepted Submission(s): 34652Problem DescriptionHDOJ上面已经有10来道A+B的题目了,相信这些题目曾经是大家...
2018-03-15 11:52:05
309
原创 杭电 acm 2040 亲和数
亲和数Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 45489 Accepted Submission(s): 27733Problem Description古希腊数学家毕达哥拉斯在自然数研究中发现,220的所有真约数(即不是自身...
2018-03-15 11:50:42
316
原创 杭电 acm 2042 不容易系列之二
不容易系列之二Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33547 Accepted Submission(s): 26821Problem Description你活的不容易,我活的不容易,他活的也不容易。不过,如果你看了下面...
2018-03-15 11:49:12
269
原创 杭电 acm 2054 A==B?
A == B ?Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 118729 Accepted Submission(s): 18964Problem DescriptionGive you two numbers A and B, ...
2018-03-15 11:48:23
613
原创 杭电 acm 2055 An Easy Problem
An easy problemTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 28652 Accepted Submission(s): 18671Problem Descriptionwe define f(A) = 1, f(a)...
2018-03-15 11:45:18
218
原创 杭电 acm 2057 A+B Again
A + B AgainTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 33409 Accepted Submission(s): 13551Problem DescriptionThere must be many A + B pro...
2018-03-15 11:44:25
367
1
原创 杭电 acm 2024 C语言合法标识符
C语言合法标识符Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 83862 Accepted Submission(s): 32329Problem Description输入一个字符串,判断其是否是C的合法标识符。 Input输入数...
2018-03-15 11:42:55
400
原创 杭电 acm 2029 Palindromes _easy version
Palindromes _easy versionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 47384 Accepted Submission(s): 28716Problem Description“回文串”是一个正读和反读都...
2018-03-14 20:01:25
221
原创 杭电 acm 2028 Lowest Common Multiple Plus
Lowest Common Multiple PlusTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 69316 Accepted Submission(s): 28757Problem Description求n个数的最小公倍数。 ...
2018-03-14 19:59:58
335
原创 杭电 acm 2027 统计元音
统计元音Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 84743 Accepted Submission(s): 33118Problem Description统计每个元音字母在字符串中出现的次数。 Input输入数据首先包括一个...
2018-03-14 19:59:16
256
原创 杭电 acm 2026 首字母变大写
首字母变大写Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 70309 Accepted Submission(s): 38150Problem Description输入一个英文句子,将每个单词的第一个字母改成大写字母。 Input...
2018-03-14 19:57:42
267
原创 杭电 acm 2025 查找最大元素
查找最大元素Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 66002 Accepted Submission(s): 35141Problem Description对于输入的每个字符串,查找其中的最大字母,在该字母后面插入字符串“...
2018-03-14 19:56:30
243
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人