码迷,mamicode.com
首页 >  
搜索关键字:hdu1219 ac me    ( 16537个结果
Codeforces Round #257 (Div. 2)
感言:以后中国高中生的专场还是慎入!!!! A题目还是比较简单 AC代码: #include #include using namespace std; struct p { int number; int val; }num[105]; bool cmp(p x,p y) { if(x.val==y.val) return x.number>...
分类:其他好文   时间:2014-07-22 22:49:34    阅读次数:186
九度 Online Judge 之《剑指 Offer》一书相关题目解答
前段时间准备华为机试,正好之前看了一遍《剑指 Offer》,就在九度 Online Judge 上刷了书中的题目,使用的语言为 C++;只有3题没做,其他的都做了。 正如 Linus Torvalds 所言“Talk is cheap, show me the code!",详见托管在 Git...
分类:其他好文   时间:2014-07-22 22:48:35    阅读次数:185
uva 494 Kindergarten Counting Game
Kindergarten Counting GameEverybody sit down in a circle. Ok. Listen to me carefully.``Woooooo, you scwewy wabbit!''Now, could someone tell me how man...
分类:其他好文   时间:2014-07-22 00:37:36    阅读次数:248
webapp各种路径获取
1、ServletActionContext.getServletContext().getRealPath("/")得到:C:\Users\JL\Workspaces\.metadata\.me_tcat\webapps\HuiLife\ServletActionContext.getServle...
分类:移动开发   时间:2014-07-21 09:35:13    阅读次数:267
C语言基础学习9:指向指针的指针
一般形式:基类型 **变量名;例如:char **p;void main(){ char *name[] = {"Follow me","Basic","Great Wall","FORTRAN","Computer design"}; char **p; int i; fo...
分类:编程语言   时间:2014-07-21 09:33:30    阅读次数:235
QS Network(最小生成树)
题意:若两个QS之间要想连网,除了它们间网线的费用外,两者都要买适配器,求使所有的QS都能连网的最小费用。分析:这个除了边的权值外,顶点也有权值,因此要想求最小价值,必须算边及顶点的权值和。解决方法:用prim算法,在构造邻接矩阵时,在i到j的权值的基础上再加上i点的权值和j点的权值即可。附上AC代...
分类:Web程序   时间:2014-07-21 09:28:59    阅读次数:252
POJ 3080 Blue Jeans
表示今天下午ac了一道放置几天的问题,开心=。= Blue Jeans Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 11795   Accepted: 5099 Description The Genographic Project is a re...
分类:其他好文   时间:2014-07-20 23:18:45    阅读次数:286
【LeetCode】【Python题解】Single Number & Maximum Depth of Binary Tree
今天做了三道LeetCode上的简单题目,每道题都是用c++和Python两种语言写的,因为c++版的代码网上比较多,所以就只分享一下Python的代码吧,刚学完Python的基本语法,做做LeetCode的题目还是不错的,对以后找工作面试也有帮助! 刚开始就从AC率最高的入手吧! 1.Given an array of integers, every element appe...
分类:编程语言   时间:2014-07-20 15:27:41    阅读次数:262
POJ 2533 Longest Ordered Subsequence
题意:求最长递增子序列 AC代码:#include #include #include using namespace std; int dp[1010],a[1010]; int main() { int i,j,n; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;...
分类:其他好文   时间:2014-07-20 10:28:31    阅读次数:235
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!