【题目】
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is.
You may not alter the values in the nodes, only n...
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4648
Magic Pen 6
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 1857 Accepted Submiss...
题目链接:11375 - Matches
题目大意:给出n根火柴,问说能组成多少种数字,要求说0不能打头。
解题思路:d[i]表示i根火柴能够组成的数量,d[i+c[j]] = d[i+c[j]] + d[i];
最后dp[i]表示小于等于i根火柴能组成的数量,dp[i]=∑jidp[j].
高精度。
#include
#include
#include
using na...
【题目】
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in place with constant memory.
For example,
Given input array A ...
【调试渲染】
将TestCpp里Box2DTestBed的GLES-Render.h/cpp添加到项目中,声明绘制变量:GLESDebugDraw
mDebugDraw。
【创建世界】
// 根据重力创建世界
b2Vec2 gravity;
gravity.Set(0.0f, -10.0f);
mWorld = new b2World(gravity);
// 设置调试...
有限状态自动机是表示有限个状态以及在这些状态之间的转移和动作等行为的数学模型。
使用有限状态自动机可以将复杂的问题简化,比如TCP状态转换。...
迷宫规模较大,DFS必然超时。注意到行走方向只有上、下、右三个,意味着已走过的路不能再走,更意味着不用回溯。且问题问的是最大值。一切都清晰地指向了DP!...
环境:jenkins+maven+nginx+tomcat
在执行jenkins job发布项目到远程服务器,服务器使用nginx+tomcat。默认使用80端口,通过nginx转发请求。在执行tomcat:redeploy时,出现下面的错误:
[ERROR] Failed toexecute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:red...