- 博客(294)
- 资源 (1)
- 收藏
- 关注
原创 ubuntu(Linux 4.1.30)添加系统调用
1.编写代码进入kernel文件夹,将代码放入文件夹中。cd /usr/src/linux-4.1.30/kernelmv /home/zhrt/my_syscall.c .2.修改Makefile,将之前的代码文件加入编译中3.添加系统调用声明修改include/linux/下的syscalls.hcd /usr/src/linux-4.1.30/include/linuxge...
2020-01-04 11:02:11 321
原创 ubuntu更换linux内核
所有操作全在root下进行,因此要先su一下1.下载linux 4.4.1内核下载地址http://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/linux-4.4.1.tar.gz2.安装必备软件编译工具:apt-get install libncurses5-dev build-essential kernel-package3.解压下...
2019-12-12 19:51:19 1016
原创 一个打了三年的ACMer总结
首先要感谢qwb和胡老师把我拉入坑,让我大学过得这么充实~本人作为csust的ACMer,零基础入坑,大三拿了个金,大四划水退役。大一上刚入大学的我还沉迷于LOL,整天想着上王者,这时碰巧在ACM社团群中划了划水,就被qwb拉入了坑= =。由于起步比较晚,高中也没有搞过OI,进度特别慢,到了第一次周赛的时候,甚至连多组输入都不会写,被各位同级的吊打。品尝到大学首次失败后,我就立了个神奇...
2018-12-21 00:51:43 9431 13
原创 2016-2017 ACM-ICPC, NEERC, Moscow Subregional Contest K Knights of the Old Republic(贪心+DP)
传送门:戳这里将边按从小到大排序,模拟Kruskal,设当前要合并的2个集合为x和y设要占领当前这条边,需要花费w①如果要占领这条边,则花费为min(b[v]) * max(w, max(a[u])),其中u和v是集合x和y中的点②如果不占领这条边,则花费为f[x] + f[y]#include<bits/stdc++.h>#define lson l,m,rt<...
2018-12-04 16:11:14 591
原创 2016 North American Invitational Programming Contest-J Whiteboard(区间交)
传送门:http://codeforces.com/gym/101002题意:有一个n*m个画板,起始位置为(n,1),有q条指令,每条指令表示向上下左右一个方向走cnt步,每走一步花费1秒,每走到一个格子就会将格子染黑,现在给出目标图形,并且可以选择一段区间[L,R]使得在这段时间内走过的格子会变白,问这段区间L最小为多少,R最大为多少?题解:对于目标图形,假设某个格子坐标是(x,y),...
2018-11-20 00:37:38 569
原创 Gym-101741C Cover the Paths(LCA+贪心)
C. Cover the Pathstime limit per test1 secondmemory limit per test256 mebibytesinputstandard inputoutputstandard outputYou are given an undirected unweighted tree consisting of n ver...
2018-10-15 21:21:10 620
原创 CodeForces-1046D Interstellar battle(期望)
D. Interstellar battletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the intergalactic empire Bubbledom there are NN planets,...
2018-09-25 19:14:09 400
原创 HDU-6184 Counting Stars(暴力找三元环)
Counting StarsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1812 Accepted Submission(s): 504Problem DescriptionLittle A is an astron...
2018-09-17 19:37:13 348
原创 HDU-6191 Query on A Tree(字典树+启发式合并)
Query on A TreeTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 1732 Accepted Submission(s): 566Problem DescriptionMonkey A lives o...
2018-09-17 14:54:08 927
原创 GYM-2014-2015 Andrew Stankevich Contest 47 (ASC 47) E Elegant Square(构造)
题意:要求构造一个N*N的矩阵,使得所有数字都不相同且每一行每一列的乘积相同,且每个数字都不含平方因子#include<bits/stdc++.h>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define x first#define y second#define rep(i,a,b) ...
2018-09-07 13:35:46 593
原创 CodeForces-H Path Counting(DP)
H. Path Countingtime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rooted tree. Let's denote d(x) as depth of node ...
2018-09-06 18:56:07 298
原创 CodeForces-859D Third Month Insanity(期望DP)
D. Third Month Insanitytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe annual college sports-ball tournament is approaching,...
2018-08-28 12:53:49 478
原创 CodeForces-803F Coprime Subsequences(莫比乌斯反演)
F. Coprime Subsequencestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's call a non-empty sequence of positive integers a1, ...
2018-08-27 22:35:41 469
原创 51Nod-1385 凑数字(贪心)
1385 凑数字 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注给定一个n,要求找出一个最短的字符串S,使得所有1到n的整数都是S的子序列。比如n=10,那么S=”1234056789”的时候,是满足条件的。这个时候S的长度是10。 现在给出一个n,要求输出最短S的长度。Input第1行:给出一个整数n (1&l...
2018-08-26 22:37:06 682
原创 51Nod-1476 括号序列的最小代价(贪心)
1476 括号序列的最小代价 题目来源: CodeForces基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注这里有一个关于合法的括号序列的问题。如果插入“+”和“1”到一个括号序列,我们能得到一个正确的数学表达式,我们就认为这个括号序列是合法的。例如,序列"(())()", "()"和"(()(()))"是合法的,但是")("...
2018-08-25 23:26:37 511
原创 51Nod-1672 区间交 (贪心+线段树)
1672 区间交 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注小A有一个含有n个非负整数的数列与m个区间,每个区间可以表示为li,ri。它想选择其中k个区间, 使得这些区间的交的那些位置所对应的数的和最大。(是指k个区间共同的交,即每个区间都包含这一段,具体可以参照样例) 在样例中,5个位置对应的值分别为1,2,3,4,...
2018-08-25 22:18:50 293
原创 51Nod-1530 稳定方块(贪心)
1530 稳定方块 题目来源: CodeForces基准时间限制:10 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注瓦西亚和皮台亚摆放了m个方块。方块被编号为0到m-1(每个号码出现恰好一次)。现在建立一个座标系OX表示地面,OY的方向是竖直向上的。每一方块的左下角有一个座标而且是整点座标。摆放好的方块一定要是稳定的。稳定的含意是每一个不在地...
2018-08-25 21:09:05 338
原创 CodeForces-988E Divisibility by 25(贪心)
E. Divisibility by 25time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an integer nn from 11 to 10181018 without l...
2018-08-23 22:07:50 340
原创 CodeForces-1004E Sonya and Ice Cream(树型DP+RMQ)
E. Sonya and Ice Creamtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSonya likes ice cream very much. She eats it even during p...
2018-08-23 19:20:29 483
原创 HDU-5932 Backpack on Tree(DP+贪心)
Backpack on TreeTime Limit: 9000/4500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 193 Accepted Submission(s): 54 Problem DescriptionThere is a rooted t...
2018-08-23 12:41:08 281
原创 HDU-5931 Mission Possible (线性规划+贪心)
Mission PossibleTime Limit: 36000/18000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 418 Accepted Submission(s): 85 Problem DescriptionMr. Frog loves pl...
2018-08-22 21:53:04 962
原创 HDU-6430 TeaTree(线段树合并)
Problem E. TeaTreeTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 165 Accepted Submission(s): 57 Problem DescriptionRecently, TeaTr...
2018-08-22 20:11:02 969
原创 CodeForces-1019A Elections(贪心)
A. Electionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you know, majority of students and teachers of Summer Informatics...
2018-08-21 19:03:22 594
原创 HDU-6407 Pop the Balloons(DP)
Pop the BalloonsTime Limit: 7000/7000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 87 Accepted Submission(s): 27 Problem DescriptionRecently, an inter...
2018-08-15 23:20:44 827
原创 HDU-6392 Reverse Game(线段树+并查集)
Reverse GameTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 73 Accepted Submission(s): 34Problem DescriptionOne day, Umaru was enjoyi...
2018-08-14 19:52:52 512
原创 HDU-6387 AraBellaC(RMQ)
AraBellaCTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 101 Accepted Submission(s): 41Problem DescriptionPrincess Arabella loves the ...
2018-08-14 15:56:10 522
原创 HDU-6393 Traffic Network in Numazu(基环树/树剖+树状数组)
Traffic Network in NumazuTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 200 Accepted Submission(s): 70Problem DescriptionChika is e...
2018-08-13 23:28:14 321
原创 HDU-6363 bookshelf(莫比乌斯反演)
bookshelfTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 208 Accepted Submission(s): 96 Problem DescriptionPatrick Star bought a book...
2018-08-09 10:34:54 821
原创 CodeForces-1017E The Supersonic Rocket(凸包+KMP)
E. The Supersonic Rockettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter the war, the supersonic rocket became the most comm...
2018-08-09 10:01:41 444
原创 HDU-6357 Hills And Valleys(DP)
Hills And ValleysTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 146 Accepted Submission(s): 47Special Judge Problem DescriptionTau...
2018-08-06 22:25:23 366
原创 线性基
定义线性基即在异或域中,一组线性无关的基向量V(v1,v2...vn)。(可以想象成N维坐标下的坐标轴)在原本的数域A1,A2...Am中,选择若干数值进行异或得到的结果都可以用基向量进行组合得到。模板struct LB { ll d[61], p[61]; int cnt, mx; LB() { memset(d, 0, sizeof(d...
2018-08-04 21:02:06 323
原创 Nowcoder-2018ACM多校训练营(第五场)D inv
时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述 Kanade has an even number n and a permutation b of all of the even numbers in [1,n]Let a denote an array [1,3,5....n...
2018-08-03 15:54:10 236
原创 HDU-6338 Problem G. Depth-First Search(计数)
Problem G. Depth-First SearchTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 378 Accepted Submission(s): 73 Problem DescriptionKaz...
2018-08-03 01:49:21 731
原创 HDU-6331 Problem M. Walking Plan(分块+最短路)
Problem M. Walking PlanTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 169 Accepted Submission(s): 40 Problem DescriptionThere are ...
2018-07-30 22:45:59 327
原创 Nowcoder-2018ACM多校训练营(第四场)B Interval Revisited
时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述 Chiaki has a long interval [1,m] and n small intervals [l1, r1], [l2,r2], ..., [ln, rn]. Each small interval [li,ri] i...
2018-07-29 13:07:04 272
原创 CodeForces-815B Karen and Test(组合数)
B. Karen and Testtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputKaren has just arrived at school, and she has a math test today...
2018-07-28 10:54:09 275
原创 CodeForces-712D Memory and Scores(计数)
D. Memory and Scorestime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputMemory and his friend Lexa are competing to get higher score...
2018-07-28 10:20:58 191
原创 HDU-6314 Matrix(计数)
MatrixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 332768/332768 K (Java/Others)Total Submission(s): 449 Accepted Submission(s): 107 Problem DescriptionSamwell Tarly is learning ...
2018-07-27 15:23:37 374
原创 Nowcoder-2018ACM多校训练营(第二场)H travel
时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述 White Cloud has a tree with n nodes.The root is a node with number 1. Each node has a value.White Rabbit wants to tra...
2018-07-24 09:48:43 321
原创 HDU-6305 RMQ Similar Sequence(笛卡尔树+期望)
RMQ Similar SequenceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 255535/255535 K (Java/Others)Total Submission(s): 204 Accepted Submission(s): 51 Problem DescriptionChiaki has a ...
2018-07-23 23:49:30 1160 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人