摘要: #include #include #include #include #include #include #define FUSE_USE_VERSION 26 #include #include "fat16.h" char* FAT_FILE_NAME = "fat16.img"; /* 将扇区号为secnum的扇区读到buffer中 */ void sector_r... 阅读全文
posted @ 2019-06-10 19:07 fqqq 阅读(760) 评论(0) 推荐(1) 编辑
摘要: /* * mm-naive.c - The fastest, least memory-efficient malloc package. * * In this naive approach, a block is allocated by simply incrementing * the brk pointer. A block is pure payload. There a... 阅读全文
posted @ 2019-05-13 19:38 fqqq 阅读(857) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include int main() { int a; char s[100]; printf("Give me a string:\n"); scanf("%s",s); syscall(328,s,strlen(s),&a); syscall(327,a); ... 阅读全文
posted @ 2019-04-29 20:20 fqqq 阅读(220) 评论(0) 推荐(0) 编辑
摘要: asmlinkage void sys_print_val(int a) { printk("in sys_print_val: %d\n",a); return; } asmlinkage void sys_str2num(char __user *str, int str_len, int __user *ret) { char s[1000]; int n... 阅读全文
posted @ 2019-04-29 20:13 fqqq 阅读(179) 评论(0) 推荐(0) 编辑
摘要: #include #include void exec(char cmd[]) { int f = 0, i, l; l = strlen(cmd); for (i = 0; i "); i = 0; while ((c = getchar()) != '\n') { if (c != ';')... 阅读全文
posted @ 2019-04-29 19:40 fqqq 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 当前弧优化时: 不需要判断,直接cur[x]=i; 有时可以快一半。 阅读全文
posted @ 2016-03-03 20:27 fqqq 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 2445 -- 【网络流24题-10】餐巾问题 Description 一个餐厅在相继的n天里,每天需要用的餐巾数不尽相同。假设第i天需要ri块餐巾(i=1,2,…,n)。餐厅可以购买新的餐巾,每块餐巾的费用为p分;也可以把旧餐巾送到快洗部,洗一块需m天,其费用为f分;也可以把旧餐巾送到慢洗部,洗一 阅读全文
posted @ 2016-03-03 20:23 fqqq 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 神题目=神题解+神读入 题意:n个人比赛, 两两比,共n*(n-1), 赢得1分, n<=10(这给了我们枚举的暗示),如果一个人打败了所有比自己分数高的人, 或者他本身就是分数最高的, 那么他就是StrongKing。可能有多个Strong King, 现在按非降的顺序给你每个人的得分(不难道想到 阅读全文
posted @ 2016-02-29 21:23 fqqq 阅读(342) 评论(0) 推荐(0) 编辑
摘要: http://acm.whu.edu.cn/learn/problem/detail?problem_id=1124 题目大意:有N支球队,你们是第N支。每个队伍已经有一些分数了,接下来还有M场比赛。每场比赛有两支参赛队伍,赢得队得2分,输的队不得分,平局各得一分。现在你可以操控所有比赛的胜负。问你 阅读全文
posted @ 2016-02-29 16:53 fqqq 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 题目大意:有F种食物,D种饮料N头奶牛,只能吃某种食物和饮料(而且只能吃特定的一份)一种食物被一头牛吃了之后,其余牛就不能吃了第一行有N,F,D三个整数接着2-N+1行代表第i头牛,前面两个整数是Fi与Di(食物与饮料的种类数量),接着是食物的种类与饮料的种类要求输出最多分配能够满足的牛的数量 题解 阅读全文
posted @ 2016-02-27 18:02 fqqq 阅读(283) 评论(0) 推荐(0) 编辑