摘要: The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The sho 阅读全文
posted @ 2020-07-17 22:55 PCDL&TIPO 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionString Distance is a non-negative integer that measures the distance between two strings. Here we give the definition. A transform 阅读全文
posted @ 2020-07-17 21:20 PCDL&TIPO 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径 阅读全文
posted @ 2020-07-17 10:59 PCDL&TIPO 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to 阅读全文
posted @ 2020-07-16 12:03 PCDL&TIPO 阅读(116) 评论(0) 推荐(0) 编辑
摘要: D - Pair of Topics 思路: 这个题需要一点思路,ai+aj>bi+bj可以转换成ai-bi+aj-bj>0,也就是c[i]=a[i]-b[i],只需要找c[i]+c[j]大于0 一开始的想法是枚举i和j,但是很显然会超时 a和b数组内部的顺序不会影响正确答案个数,所以可以排序 从两 阅读全文
posted @ 2020-03-15 23:12 PCDL&TIPO 阅读(153) 评论(0) 推荐(0) 编辑
摘要: C - Frog Jumps 思路:青蛙跳的问题,青蛙只能跳'R',不能跳'L',问青蛙至少跳多少可以跳过,我们可以这么想这个问题,找到所有R之间的L,看看哪个L多,计算数量即可 代码: #include<iostream> #include<string> #include<cmath> #inc 阅读全文
posted @ 2020-03-15 23:04 PCDL&TIPO 阅读(227) 评论(0) 推荐(0) 编辑
摘要: B - Yet Another Palindrome Problem 思路: 给一个长为n(≤5000≤5000)的数组,问是否存在一个长度至少为3的子序列是回文的。回文的定义是把序列reverse,序列不变,如[10,20,10]就是回文的。 考虑奇数长度的回文序列,删除其首尾元素仍然回文;再考虑 阅读全文
posted @ 2020-03-15 18:17 PCDL&TIPO 阅读(213) 评论(0) 推荐(1) 编辑
摘要: A - Yet Another Tetris Problem 思路:判读一堆数字是不是同奇数偶数,写一个函数,循环遍历,然后判断是否同为奇数偶数。 代码: #include<iostream> using namespace std; int a[1005]; int fun(int n){ int 阅读全文
posted @ 2020-03-15 18:07 PCDL&TIPO 阅读(144) 评论(0) 推荐(1) 编辑
摘要: D - Three Integers 思路:枚举,还是枚举,走完所有的数字,最后找到最小的,然后输出。 代码: #include <iostream> #include<algorithm> #include<string> #include<math.h> using namespace std; 阅读全文
posted @ 2020-03-13 22:47 PCDL&TIPO 阅读(169) 评论(0) 推荐(0) 编辑
摘要: C - Perform the Combo 思路:当读到这个题的时候,第一反应就是枚举,但是,无线超时,没办法,那就变,利用前缀和,减少时间。 代码: #include<iostream> #include<string> #include<algorithm> #define MAX 200005 阅读全文
posted @ 2020-03-13 22:39 PCDL&TIPO 阅读(139) 评论(0) 推荐(0) 编辑