摘要: 安卓(android)建立项目时失败,出现AndroidManifest.xml file missing几种解决方法? Eclipse新建项目,遇到这样的问题,注意如下: 1、文件名最好不要用中文。 2、目录也不要用中文。 3、这个不会出错,但出于程序编写习惯,第一个字母最好为大写。 4.去And 阅读全文
posted @ 2017-10-09 19:11 Wally的博客 阅读(772) 评论(0) 推荐(0) 编辑
摘要: 1 //O(n)时间复杂度的找零钱问题 2 #include 3 #include 4 using namespace std; 5 int a[6]; 6 int main() 7 { 8 9 int n; 10 while(~scanf("%d",&n)) 11 { 12 memset(a,0,sizeof(a)); 13 ... 阅读全文
posted @ 2017-09-22 12:34 Wally的博客 阅读(1090) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 int a[20],flag[20][20],s[20][20]; 5 void dfs(int l,int r) 6 { 7 if(l==r) 8 { 9 printf("%d",l); 10 return ; 11 } 1... 阅读全文
posted @ 2017-09-21 20:42 Wally的博客 阅读(190) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/problemset/problem/848/A 题目大意:刚开始集合里面都是单字符可认为是字符串,然后让你去合并任意两个串合并要消耗∑c=(a~z) f ( s , c ) * f ( t , c ) 的能量,其中 f ( s , c )表示字符串s中单 阅读全文
posted @ 2017-09-04 17:05 Wally的博客 阅读(215) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6136 题目大意:在一个长为L的操场里有n个人,每个人都有一个起点和一个初速度。如果有两个人在操场上相遇了那么编号小的那个人就出局了。问最后还剩下一个人用时是多少??? 解题思路:对于初始点的位置进行排序,一个点最 阅读全文
posted @ 2017-08-28 19:22 Wally的博客 阅读(184) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6162 题目大意:已知树上的每个节点的值和节点之间的关系建成了一棵树,现在查询节点u到节点v的最短路径上的节点值在l到r之间的节点值得和 解题思路:套用树链剖分的模板能够得到树上的链并把链上的节点进行了重新的定义( 阅读全文
posted @ 2017-08-28 10:43 Wally的博客 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 关于树链剖分 模板: 阅读全文
posted @ 2017-08-27 17:06 Wally的博客 阅读(157) 评论(0) 推荐(0) 编辑
摘要: To stay woke and attentive during classes, Karen needs some coffee! Karen, a coffee aficionado, wants to know the optimal temperature for brewing the 阅读全文
posted @ 2017-08-26 21:08 Wally的博客 阅读(210) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6172 题目大意:按照给出的公式算出an 解题思路:an=4an-1+17an-2-12an-3,不要问我为什么,我也不知道(¬_¬) AC代码: 1 #include <iostream> 2 #include< 阅读全文
posted @ 2017-08-26 20:51 Wally的博客 阅读(161) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6171 题目大意:给你一个塔形的数据共有1个0、2个1、3个2、4个3、5个4、6个5.你能够把0这个数据和它的上、左上、下、右下的数据进行交换。问在最多20步内能否变成按顺序排列的塔形数据?如果能输出最小步数,否 阅读全文
posted @ 2017-08-26 19:13 Wally的博客 阅读(279) 评论(0) 推荐(0) 编辑
摘要: You are given a sequence a1, a2, ..., an consisting of different integers. It is required to split this sequence into the maximum number of subsequenc 阅读全文
posted @ 2017-08-25 20:14 Wally的博客 阅读(338) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6178 题目大意: 已知n个节点有n-1条连线,现在有k只猴子,每只猴子必须要住在一个节点上,两只猴子之间最少要有一条连线。问k只猴子最少要有多少条连线。 解题思路: 首先由于数据太大而且要在1s内完成所以应该用输 阅读全文
posted @ 2017-08-25 16:11 Wally的博客 阅读(180) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6180 题目大意: 已知一些商品制作的开始和结束时间,问在使用最少的机器的前提下机器工作的最少的总时间是多少?? 解题思路: 解法一: 如何求出至少要多少台机器: 把时间段转化成一个入点和一个出点,这样存下2*n个 阅读全文
posted @ 2017-08-25 14:59 Wally的博客 阅读(312) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6143 题目大意:有名和姓两种字符串,每种字符串长度都是n个字符,名和姓加起来的字符种类数最多是m个,问满足条件的字符串有多少种? 解题思路:我们能够枚举左边的字符种数是x,那么右边就有(m-x)n种排列方式。我们 阅读全文
posted @ 2017-08-18 21:03 Wally的博客 阅读(191) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6119 解题思路:给出的出发时间和结束时间对有重合的部分进行处理,然后用尺取法找出最后的结果。比赛的时候的确想到了用尺取的想法完成题目,但是代码能力不行没有想出来。 AC代码: 阅读全文
posted @ 2017-08-14 10:43 Wally的博客 阅读(180) 评论(0) 推荐(0) 编辑
摘要: https://cn.vjudge.net/problem/UVALive-6455 题目大意:题目上给出一个地图,其中@是人在地图上的出发点,#是墙,‘ . '是路。然后给出几个点,这些点表示财宝的所在地。问人是否能够得到所有的宝藏,如果能够的话给出所有的宝藏的最短的路径。 解题思路:由于只有最多 阅读全文
posted @ 2017-08-13 19:20 Wally的博客 阅读(280) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6097 题目大意:有个圆,圆内有两个点P,Q,已知PO=QO,求圆上一点D,使得PD+QD最小 解题思路:官方题解 找着题解一步步想的,代码中有详细的解释 AC代码: 阅读全文
posted @ 2017-08-11 21:29 Wally的博客 阅读(257) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6070 题目大意:给出的序列上的数代表颜色,求子序列中不同数字的个数X与子序列长度Y中,X/Y的最小值 解题思路:思路和官方给的想法一样 值得注意的是线段树的节点中储存的是 size(l,r)+mid×l ,在建树 阅读全文
posted @ 2017-08-05 10:12 Wally的博客 阅读(206) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6069 题目大意:求 i 从 l 到 r 中 i 的k次方的因子数之和。 解题思路:我们可以知道一个数有因子,则这个数的因子一定是若干个质数因子排列组合得到的。我们首先要得到10^6中的素数,然后它的因子数量是 相 阅读全文
posted @ 2017-08-04 19:54 Wally的博客 阅读(170) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=6058 题目大意:把一个数组分成若干子部分,求每部分中第k大的数的和是多少? 解题思路:首先能够想到的最暴力的算法是:枚举数组的每一个子部分二重for循环,然后求出每一段的第k大的数又是一重for循环。这样的想法时 阅读全文
posted @ 2017-08-02 13:58 Wally的博客 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Slastyona and her loyal dog Pushok are playing a meaningless game that is indeed very interesting. The game consists of multiple rounds. Its rules are 阅读全文
posted @ 2017-08-01 11:01 Wally的博客 阅读(284) 评论(0) 推荐(0) 编辑
摘要: D. The Bakery time limit per test 2.5 seconds memory limit per test 256 megabytes input standard input output standard output Some time ago Slastyona 阅读全文
posted @ 2017-08-01 10:47 Wally的博客 阅读(460) 评论(0) 推荐(0) 编辑
摘要: E-pang Palace was built in Qin dynasty by Emperor Qin Shihuang in Xianyang, Shanxi Province. It was the largest palace ever built by human. It was so 阅读全文
posted @ 2017-07-31 20:22 Wally的博客 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Dear Liao I never forget the moment I met with you. You carefully asked me: "I have a very difficult problem. Can you teach me?". I replied with a smi 阅读全文
posted @ 2017-07-31 20:15 Wally的博客 阅读(247) 评论(1) 推荐(1) 编辑
摘要: Function Fx,yFx,ysatisfies: For given integers N and M,calculate Fm,1Fm,1 modulo 1e9+7. InputThere is one integer T in the first line. The next T line 阅读全文
posted @ 2017-07-31 19:30 Wally的博客 阅读(137) 评论(0) 推荐(0) 编辑
摘要: sd0061, the legend of Beihang University ACM-ICPC Team, retired last year leaving a group of noobs. Noobs have no idea how to deal with mm coming cont 阅读全文
posted @ 2017-07-31 12:30 Wally的博客 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Talented Mr.Tang has nn strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ra 阅读全文
posted @ 2017-07-31 12:14 Wally的博客 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Let’s play a game.We add numbers 1,2...n in increasing order from 1 and put them into some sets. When we add i,we must create a new set, and put iinto 阅读全文
posted @ 2017-06-08 16:59 Wally的博客 阅读(1098) 评论(0) 推荐(0) 编辑
摘要: Using regular expression to define a numeric string is a very common thing. Generally, use the shape as follows: (0|9|7) (5|6) (2) (4|5) Above regular 阅读全文
posted @ 2017-06-08 16:55 Wally的博客 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Problem Description Nowadays, at least one wrestling match is held every year in our country. There are a lot of people in the game is "good player”, 阅读全文
posted @ 2017-06-08 16:49 Wally的博客 阅读(175) 评论(0) 推荐(0) 编辑