码迷,mamicode.com
首页 >  
搜索关键字:end    ( 30778个结果
leetcode || 124、Binary Tree Maximum Path Sum
problem: Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example: Given the below binary tree, 1 / 2 3 ...
分类:其他好文   时间:2015-04-27 13:20:29    阅读次数:130
14-15西南交通大学ACM新秀杯初赛题解J
Problem JCan JM Bear Be happy? 撰写:Hacker_vision 题目大意:给你一个长度为n的字符串没判断字符串是否合法(即必须包含所有26个英文字母) 题解:标记数组vis[26]标记出现过的字母,注意预处理:字符串大小写转换string s; 小写转换为大写:transform( s.begin(), s.end(), s.begin(), ::tou...
分类:其他好文   时间:2015-04-27 10:04:09    阅读次数:201
quick 受伤,当时错误,是因为命令行没有拉全
local scheduler = require(cc.PACKAGE_NAME .. ".scheduler")local MainScene = class("MainScene", function() return display.newScene("MainScene")end)l...
分类:其他好文   时间:2015-04-27 07:08:40    阅读次数:180
kickstart及引导镜像制作
一、什么是kickstartanaconda支持通过读取配置文件的内容来完成安装过程的配置:kickstartkickstart文件的组成:命令段程序包段:%packages,%end@grouppackage-package脚本段:%pre安装前脚本:安装过程开始之前要执行的脚本;注意:此时的Linux系统环境为微缩版环境,因此脚本..
分类:其他好文   时间:2015-04-27 00:48:43    阅读次数:2934
Binary Tree Maximum Path Sum
https://leetcode.com/problems/binary-tree-maximum-path-sum/Given a binary tree, find the maximum path sum.The path may start and end at any node in th...
分类:其他好文   时间:2015-04-26 22:23:56    阅读次数:174
快速排序示例-java
package Quicksort;/** * 快速排序 * @author Administrator * */public class TestMain { /** * * @param start 开始位置 * @param end 结束位置 */ public stati...
分类:编程语言   时间:2015-04-26 19:38:38    阅读次数:137
LeetCode (25) Reverse Nodes in k-Group (链表)
题目描述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....
分类:其他好文   时间:2015-04-26 12:26:17    阅读次数:135
翻转字符串中单词的顺序
问题:翻转字符串中的单词顺序,如“hello world”变成“world hello”。要求使用常量空间。 c++代码如下: void reverse(string &s, int start, int end){ int len=end+start; int center=len/2; for(int i=start;i<center;i++){ ...
分类:其他好文   时间:2015-04-25 21:13:09    阅读次数:127
Marriage Match IV (hdu 3416 网络流+spfa最短路)
题意:有n个城市m条边,告诉起点和终点,问从起点到终点不走重复边的最短路有多少条。 思路:求最短路的条数可以用最大流,建图时要去掉不是最短路上的边,判断某条边是不是最短路上的边:如果满足dist1[u] + dist2[v] + E1[i].len = dist1[End]则可以说明该边是最短路上的边,其中 dist1[] 为各点到起点的最短距离,dist2[] 为各点到终点的最短距离。...
分类:其他好文   时间:2015-04-25 12:19:41    阅读次数:178
opencv 内存解析jpg文件
刚需要用到接受到的jpg二进制文件,直接在内存做解析,mark一下,下面给出测试代码。FILE*file; file=fopen("D:/221606322483223.jpg","rb"); fseek(file,0,SEEK_END); fpos_tpos; fgetpos(file,&pos); char*data=newchar[pos]; fseek(file,0,0); intsjinum=fread(data,siz..
分类:其他好文   时间:2015-04-24 19:24:42    阅读次数:110
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!