error message:原因: 从2.6.36开始,file_operations结构发生了重大变化具体看 xx../include/linux/fs.h定义:取消了原先的int (*ioctl)(struct inode*, struct file*, unsigned int, unsign...
分类:
其他好文 时间:
2014-07-31 16:19:37
阅读次数:
275
Animesh has N empty candy jars, numbered from 1 to N, with infinite capacity. He performs M operations. Each operation is described by 3 integers a, b...
分类:
其他好文 时间:
2014-07-30 11:53:43
阅读次数:
221
UVA 11992 - Fast Matrix Operations
题目链接
题意:给定一个矩阵,3种操作,在一个矩阵中添加值a,设置值a,查询和
思路:由于最多20列,所以完全可以当作20个线段树来做,然后线段树是区间修改区间查询,利用延迟操作,开两个延迟值一个存放set操作,一个存放add操作
代码:
#include
#include
#include
...
分类:
其他好文 时间:
2014-07-30 05:36:03
阅读次数:
320
给定一个矩阵,3种操作,在一个矩阵中添加值a,设置值a,查询和思路:由于最多20列,所以完全可以当作20个线段树来做,然后线段树是区间修改区间查询,利用延迟操作,开两个延迟值一个存放set操作,一个存放add操作代码:[cpp] view plaincopy#include#include#incl...
分类:
其他好文 时间:
2014-07-30 05:34:23
阅读次数:
334
A stack is collection that implements the last-in-first-out protocal.This means that the only access object in the collections is the last one thatwas inserted.The fundamental operations of a stack a...
分类:
其他好文 时间:
2014-07-29 14:53:28
阅读次数:
218
#include
#include
#include
struct file_operations;
struct inode;
struct module;
struct cdev {
struct kobject kobj;
struct module *owner;
const struct file_opera...
分类:
系统相关 时间:
2014-07-29 14:18:28
阅读次数:
280
LeetCode: LRU CacheDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set....
分类:
其他好文 时间:
2014-07-29 11:43:36
阅读次数:
232
在python2.5+中可以用with来保证关闭打开的文件with open('hello.txt') as f: do some file operations为什么要引入with呢?在之前如果要保证关闭文件需要这样:f = open('hello.txt')try: do some fi...
分类:
编程语言 时间:
2014-07-28 11:36:00
阅读次数:
305
/* Image format-dependent operations. */typedef struct { jas_image_t *(*decode)(jas_stream_t *in, char *opts); /* Decode image data from a stream. */ ...
分类:
其他好文 时间:
2014-07-27 23:14:09
阅读次数:
297
Pots
Description
You are given two pots, having the volume of A and B liters respectively. The following operations can be performed:
FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap;DR...
分类:
其他好文 时间:
2014-07-26 15:04:00
阅读次数:
263