![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM水题
夜拾柒
In the future, there will be no retreat in horror.
展开
-
杭电4272 Lianliankan dfs和map的使用
Problem DescriptionI like playing game with my friend, although sometimes looks pretty naive. Today I invent a new game called LianLianKan. The game is about playing on a number stack.Now we have原创 2015-09-09 21:19:47 · 377 阅读 · 0 评论 -
BestCoder Round #76
比赛总结:今天的bc 暴露了我很大的问题,首先就是代码能力不足,明明一个很清晰思路的题却被自己做错了几次还找不出错误。第二就是思路还不够敏捷,队友几分钟就ac的题,自己十几分钟还搞不定,明显就是自己近段时间过于注重算法题而忽略思维题的结果,以后还要在这方面加强训练。DZY Loves Balls Accepts: 659Submissions: 1393Time Limit: 4000原创 2016-03-19 22:50:26 · 376 阅读 · 0 评论 -
Word Reversal
DescriptionFor each list of words, output a line with each word reversed without changing the order of the words.This problem contains multiple test cases!The first line of a multiple in原创 2016-04-01 23:43:27 · 577 阅读 · 0 评论 -
神秘的超级素数
Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainSubmit Status果姐姐非常喜欢素数呀!突然有一天,根据未知神秘力量的指引,果姐姐想要去发现超级素数!一个素数n (n > 4 ) 如果是一个超级素数的话,当且仅当n - 4 和原创 2016-04-04 20:37:54 · 1187 阅读 · 0 评论 -
poj 2159Ancient Cipher
DescriptionAncient Roman empire had a strong government system with various departments, including a secret service department. Important documents were sent between provinces and the capital in enc原创 2016-03-23 18:58:11 · 249 阅读 · 1 评论 -
poj 1083 Moving Tables
Moving TablesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 29479 Accepted: 9803DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose原创 2016-03-26 15:54:08 · 282 阅读 · 0 评论 -
Claris and XOR
Claris and XORTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 325 Accepted Submission(s): 132Problem DescriptionClaris loves bitwise op原创 2016-04-10 21:41:45 · 937 阅读 · 1 评论 -
南京理工大学校外赛sequence
Description将一个给定的数列,拆分成K个不降序列,每个数出现且只出现一次,且在各序列中各个数相对于原数列的相对顺序不变。如7 6 9 8 10可以拆成 7 9 10和6 8。求最小的K值。Input第一行输入一个整数T(1 每组两行,第一行为n,代表数列长度(1接下来一行有n个数,空格分隔(每个数Output对每组数据输出一个最小的K值。Sample原创 2016-04-18 19:36:04 · 464 阅读 · 0 评论 -
665D Simple Subset
D. Simple Subsettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tuple of positive integers {x1, x2, ..., xk} is called simple原创 2016-04-22 11:10:03 · 384 阅读 · 0 评论 -
poj 1163 The Triangle
The TriangleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 44961 Accepted: 27147Description73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write原创 2016-07-23 10:02:36 · 247 阅读 · 0 评论 -
openjudge 2757:最长上升子序列
总时间限制: 2000ms 内存限制: 65536kB描述一个数的序列bi,当b1 你的任务,就是对于给定的序列,求出最长上升子序列的长度。输入输入的第一行是序列的长度N (1 输出最长上升子序列的长度。样例输入71 7 3 5 9 4 8样例输出4解题思路:1.找子问题“求序列的前原创 2016-07-23 11:00:56 · 327 阅读 · 0 评论 -
蓝桥杯 - 算法训练 - ALGO-2 最大最小公倍数
题目大意:给定一个n,让你从1到挑选三个数使其的最小公倍数最大。思路:本题可以看做是数论知识的一个运用。首先我们应该明白这样一个道理:任意大于1的两个相邻的自然数都是互质的.所以下面我们来讨论n*(n-1)*(n-2)是否两两互质,如果两两互质,那么即使这三个数,否则我们就要继续讨论。先讨论n的奇偶。1.对于n为奇数时,那么n和n-2为奇数,则三个数不能被2整除也不能被三整除,原创 2016-03-17 19:27:21 · 288 阅读 · 0 评论 -
poj 3276Face The Right Way—反转(开关问题)
Face The Right WayTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3646 Accepted: 1683DescriptionFarmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are原创 2016-03-04 14:31:27 · 333 阅读 · 0 评论 -
poj 3279 Fliptile—二进制暴力的运用(开关问题)
FliptileTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6229 Accepted: 2376DescriptionFarmer John knows that an intellectually satisfied cow is a happy cow who will give more mil原创 2016-03-04 11:11:02 · 277 阅读 · 0 评论 -
杭电acm 1084 What Is Your Grade? 比较考人的简单题
#include #include #include #include using namespace std;struct Point{ int p; int s; int pos; int t;};Point p[105];int n;int sum[6],tol[6];bool cmp1(const Point& l原创 2015-09-10 15:39:49 · 469 阅读 · 0 评论 -
杭电acm1271 整数对
Problem DescriptionGardon和小希玩了一个游戏,Gardon随便想了一个数A(首位不能为0),把它去掉一个数字以后得到另外一个数B,他把A和B的和N告诉了小希,让小希猜想他原来想的数字。不过为了公平起见,如果小希回答的数虽然不是A,但同样能达到那个条件(去掉其中的一个数字得到B,A和B之和是N),一样算小希胜利。而且小希如果能答出多个符合条件的数字,就可以得到额外的糖果。原创 2015-09-28 22:15:20 · 1056 阅读 · 0 评论 -
杭电acm 4282 A very hard mathematic problem
Haoren is very good at solving mathematic problems. Today he is working a problem like this: Find three positive integers X, Y and Z (X 1) that holds X^Z + Y^Z + XYZ = K where K is anothe原创 2015-09-08 09:25:11 · 500 阅读 · 0 评论 -
杭电5122 K.Bro Sorting
题目分析:本题乍一看,似乎没有头绪,但其实只要仔细读题,也能找到解题方法,本题其实就是一道模拟冒泡排序的模拟题,但需要从后往前模拟。代码如下:#include #include using namespace std;int t,n;int a[1000010];int main(){ scanf("%d",&t); int kase = 1;原创 2015-09-17 22:17:24 · 280 阅读 · 0 评论 -
杭电acm 5495 LCS
LCSTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 346 Accepted Submission(s): 175Problem DescriptionYou are given two sequence {a1,a2,原创 2015-10-04 23:16:09 · 290 阅读 · 0 评论 -
杭电acm 5461 Largest Point
Problem DescriptionGiven the sequence A with n integers t1,t2,⋯,tn. Given the integral coefficients a and b. The fact that select two elements ti and tj of A and i≠j to maximize the value of at2i+bt原创 2015-09-22 09:02:53 · 343 阅读 · 0 评论 -
杭电acm 5499 和 5500
SDOITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 76 Accepted Submission(s): 35Problem DescriptionThe Annual National Olympic of In原创 2015-10-10 23:39:09 · 372 阅读 · 0 评论 -
杭电1713 相遇周期
ac代码:#include #include using namespace std;__int64 a1,a2,t1,t2,a,b;int t;__int64 gcd(__int64 a,__int64 b){ return b?gcd(b,a%b):a;}int main(){ scanf("%d",&t); while(t--)原创 2015-09-24 10:02:15 · 607 阅读 · 0 评论 -
2016 qut第一次训练赛简单题
A. Tennis Tournamenttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tennis tournament with n participants is running. The p原创 2016-03-02 20:45:48 · 955 阅读 · 0 评论 -
openJudge 1088:滑雪
1088:滑雪查看 提交 统计 提示 提问总时间限制: 1000ms 内存限制: 65536kB描述Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长的滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子1 2原创 2016-07-23 16:54:15 · 560 阅读 · 0 评论