- 博客(72)
- 收藏
- 关注
原创 CSP 16-4 消息传递接口 模拟+DFS
16-4 消息传递接口模拟 + DFS重点:DFS 初始值的设计, st[] 表示当前进程是否正在等待#include <cstdio>#include <algorithm>#include <iostream>#include <queue>#include <sstream>#include <cstring>using namespace std;const int N = 10010;int n;s
2021-12-04 16:53:25
294
原创 CF #756 div3
A#include <iostream>#include <algorithm>#include <cstring>using namespace std;int T;int getEven(int x){ int cnt = 0; int t = x; while (t) { t/= 10; cnt++; } int pos = -1; t = x; int i = 1; while (t) { int b = t %
2021-11-27 10:32:16
554
原创 软件工程实践 学习资料记录
软件工程实践学习清单学习的主体:系统、Linux、体系结构教材以及经典著作:《深入理解计算系统》《现代操作系统》《操作系统概念》《计算机组成原理》网课:付费资源:
2021-11-20 15:14:33
397
原创 软件工程实践 Blog 0
一、项目背景某公司研发了一款高速加密卡(对称加密10Gbit/s以上),可以配合Linux内核中的密码子系统和dm-crypt模块实现磁盘分区加密等应用,做企业保密存储服务器。实际使用中发现:由于dm-crypt模块的循环结构每次处理512个字节(一个sector),导致无法发挥加密卡的全部性能,分析发现需要在dm中使用scatter/gather高速IO技术以提高性能。在Linux内核中修改代码,具有极大挑战性。这是本项目一期工作,已经完成,实现了IO速度从80M字节提高到约1G字节每秒的跃进,达到了预
2021-09-30 15:50:39
154
原创 Python 类方法,静态方法,类变量,实例变量
class A: a1 = "a1" __a2 = "a2" def __init__(self): a3 = "a3" __a4 = "a4" self.a5 = "a5" self.__a6 = "a6" def getA5(self): return self.a5 @staticmethod def getA4(instanceA): return.
2021-07-24 18:06:41
95
原创 数据库——SQL实验二
SQL实验二“至少” 表示 “存在” 可以用 in 来表达1. 选出这个学生的选课表(可以考虑重修情况,但是课程号唯一2. 对每一条选课信息对判断,如果课程号在表中,则保留人名注意:关系本身就是一个集合,也可以使用 distinctcraete or replace view test2_02 as ( select sid, name from pub.student where sid in ( select sid from pub.sudent_course w
2021-06-21 21:27:43
1275
1
原创 数据库——SQL实验一
SQL实验一 21.6.15旨在回顾SQL语法,尽可能使用多种写法实验一建表、删表create table test1_student ( sid char(12), name varchar2(10)); // 建表drop table test1_student;插入数据insert into test1_student values('200020002000','王菲')// 要按顺序写,标点要是英文标点题目1-1 not null 不允许值为空cre
2021-06-15 21:54:45
1165
2
原创 PTA 类&模板(一)
6-1 类模板Point的定义与使用 (10 分)参考文献:http://c.biancheng.net/view/320.htmltemplate <class T1, class T2>class Point{ public: T1 x; T2 y; Point(T1 x0, T2 y0) { x = x0, y = y0; }; T1 getX() {
2021-04-29 18:24:00
446
原创 7-14 凯撒密码 (10 分)
7-14 凯撒密码 (10 分)#include <iostream>#include <algorithm>#include <cstdio>using namespace std;string s;int offset;int main(){ getline(cin, s, '\n'); cin >> offset; offset %= 26; // cout << s << ' ' <<
2021-04-19 19:45:43
1935
原创 7-13 口罩发放 (10 分)
7-13 口罩发放 (10 分)#include <cstdio>#include <cstring>#include <algorithm>#include <iostream>#include <unordered_map>using namespace std;struct Record{ string name, ID; bool state; string tim; int num; // 在当天的第几条记录
2021-04-19 19:23:36
2677
原创 7-11 找最长的字符串 (10 分)
7-11 找最长的字符串 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>#include <string>using namespace std;bool cmp(string a, string b) { return a < b;}int main(){ string res, s; int n,
2021-04-12 20:12:57
728
原创 7-10 字符串排序 (10 分)
7-10 字符串排序 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>#include <string>using namespace std;bool cmp(string a, string b) { return a < b;}int main(){ int n = 5; string s[5];
2021-04-12 20:10:36
694
原创 7-9 学生成绩排序 (10 分)
printf() 函数中,输出 string 时要转换为字符数组str.c_str()7-9 学生成绩排序 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>#include <string>using namespace std;struct Person{ int id; string name; doubl
2021-04-12 20:07:01
476
原创 7-8 结构体输出成绩最高者的信息 (10 分)
7-8 结构体输出成绩最高者的信息 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>#include <string>using namespace std;struct Person{ string name; double score; bool operator < (const Person &
2021-04-12 19:57:43
2036
原创 7-7 通讯录排序 (10 分)
7-7 通讯录排序 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>#include <string>using namespace std;struct Person{ string name; int birthday; string number; bool operator < (const Pers
2021-04-12 19:52:00
355
原创 7-6 输出月份对应的英文名称 (10 分)
7-6 输出月份对应的英文名称 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>#include <string>using namespace std;string months[13] = { "", "January", "February", "March", "April", "May", "June",
2021-04-12 19:45:58
1688
原创 7-5 使用函数实现字符串复制 (10 分)
getchar();getline(cin, str);使用前读完行尾回车7-5 使用函数实现字符串复制 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>#include <string>using namespace std;int main(){ int T, p; cin >> T; ge
2021-04-12 19:41:33
803
原创 7-4 删除字符串中指定字母 (10 分)
7-4 删除字符串中指定字母 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>using namespace std;int main(){ string s; cin >> s; for (int i=0; i<s.size(); i++) { if (s[i] != 'a') cout <<
2021-04-12 19:12:50
624
原创 7-2 利用指针返回多个函数值 (10 分)
7-2 利用指针返回多个函数值 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>using namespace std;int n, m;int maxx, minn;int main(){ cin >> n; int x; maxx = -9999999, minn = 9999999; while (n--
2021-04-12 18:59:02
994
原创 7-1 循环移动 (10 分)
7-1 循环移动 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cstring>using namespace std;int n, m;int a[200]; void mov(int *x, int n, int m) {}int main(){ cin >> n >> m; for (int i=0; i&
2021-04-12 18:55:35
450
2
原创 CSP 12th T4 行车路线
/* A3276 317号任务 CSP 16th T5 SPFA 需要手写队列 */#include <iostream>#include <cstring>#include <algorithm>#include <queue>using namespace std;const int N = 10010, M = 20010, INF = 0x3f;int n, m, k, type[N];int a[N], v[M],
2021-04-03 20:53:26
71
原创 7-18 输出全排列 (10 分)
参考:https://blog.youkuaiyun.com/ac_gibson/article/details/453086457-18 输出全排列 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cmath>#include <cstring>using namespace std;typedef long long ll;const i
2021-04-01 17:04:35
489
原创 7-17 整数分解为若干项之和 (10 分)
难点:分号的打印7-17 整数分解为若干项之和 (10 分)#include <cstdio>#include <iostream>#include <algorithm>#include <cmath>#include <cstring>using namespace std;typedef long long ll;const int N = 35;int n, tt, q[N], cnt;void dfs(in
2021-04-01 17:04:17
454
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人