码迷,mamicode.com
首页 >  
搜索关键字:io    ( 172858个结果
HDU 3002
无向图最小割。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int MAXN=150; 7 const int inf=10000000; 8 int vis[MAXN],combine[MAXN],wa...
分类:其他好文   时间:2014-07-22 00:04:36    阅读次数:224
Binary Tree Zigzag Level Order Traversal
java很给力逆序用了Colletcions.reverse();/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; ...
分类:其他好文   时间:2014-07-22 00:04:35    阅读次数:154
AC自动机
没错,就是AC自动机!(可惜不像金坷垃那样~)不多说,放上模板,不难理解的。#include #include #include #define for1(i,a,n) for(i=a;i=a;--i)#define for4(i,a,n) for(i=n;i>a;--i)#define CC(i,...
分类:其他好文   时间:2014-07-22 00:04:35    阅读次数:182
[LeetCode] Roman to Integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.以下为补充知识,百度到的罗马数字写法:个位数举例I, 1 】II, 2】 III, 3】...
分类:其他好文   时间:2014-07-22 00:04:34    阅读次数:190
NIO学习笔记1
NIO引入了三个概念:Buffer 缓冲区Channel 通道selector 选择器1、java.io优化建议操作系统与Java基于流的I/O模型有些不匹配。操作系统要移动的是大块数据(缓冲区),这往往是在硬件直接存储器存取(DMA)的协助下完成的。I/O类喜欢操作小块数据——单个字节、几行文本。...
分类:其他好文   时间:2014-07-22 00:04:34    阅读次数:416
(转)理解POCO
POCO的概念是从java的POJO借用而来,而两者的含义是一致的,不同的仅仅是使用的语言不一样。所以POCO的解释就是“Plain Old C# Object”。从字面上翻译为“纯洁老式的C#对象对象”,理解POCO先要理解POJO 1、什么是POJO POJO的名称有多种,pure ol...
分类:其他好文   时间:2014-07-22 00:04:33    阅读次数:192
HDU 3998
http://acm.hdu.edu.cn/showproblem.php?pid=3998求LIS的长度,并且求有多少组互不相交的LIS求组数用最大流建图如下:if(dp[i]==1)add(S,i,1) ; if(dp[i]==ans)add(i+n,T,1) ;if(j>i && dp[j.....
分类:其他好文   时间:2014-07-22 00:04:33    阅读次数:194
BaseWorkerForm
using System.Collections.Generic;using System.Windows.Forms;using WindowsFormsApplication3.Enums;using WindowsFormsApplication3.Jobs;using WindowsForm...
分类:其他好文   时间:2014-07-22 00:03:36    阅读次数:213
HDU 1574 RP问题
如果说难的话,难就难在对阶段的划分。这又是一道对值域空间进行分段的题目。因为rp有正有负,所以将整个数组向右平移10000个单位长度l和r分别是rp可能的最小值因为b是“门槛”,所以如果发生好事(即c>0)循环就从b到r发生坏事(即c 3 #include 4 #include 5 #inclu.....
分类:其他好文   时间:2014-07-22 00:03:36    阅读次数:195
[leetcode]Sort List
Sort ListSort a linked list inO(nlogn) time using constant space complexity.算法思想:时间复杂度为O(nlogn)的排序算法,有快排、归并、堆排序,快排需要往前遍历,因此不适合单链表,堆排序可以,但是需要O(n)的空间,因此...
分类:其他好文   时间:2014-07-22 00:03:35    阅读次数:187
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!