这是第一篇文章
行内数学公式:$a^2 + b^2 = c^2$。
块公式,
$$ a^2 + b^2 = c^2 $$
$$
\boldsymbol{x}_{i+1}+\boldsymbol{x}_{i+2}=\boldsymbol{x}_{i+3}
$$
1#include <iostream>
2using namespace std;
3template <class T, int s>
4class A
5{
6private:
7 T a[s];
8 int n;
9public:
10 A()
11 {
12 for (int i = 0; i < n; i++)
13 cin >> a[i];
14 }
15 A(T b[], int m)
16 {
17 n = m;
18 for (int i = 0; i < m; i++)
19 a[i] = b[i];
20 }
21 T max()
22 {
23 T m = a[0];
24 for (int i = 0; i < n; i++)
25 if (m < a[i])
26 m = a[i];
27 return m;
28 }
29 void firstinsert() // 插入函数
30 {
31 int x = 0;
32 cout << "输入在数组首位插入的值:";
33 cin >>x;
34 for (int i = n - 1; i >= 0; i--)
35 a[i + 1] = a[i];
36 a[0] = x;
37 n++;
38 }
39 void output()
40 {
41 for (int i = 0; i < n; i++)
42 cout << a[i] << " ";
43 cout << endl;
44 }
45 void deletefirst()
46 {
47 n = n - 1;
48 for (int i = 0; i < n; i++)
49 a[i] = a[i + 1];
50 }
51 void insert()
52 {
53 int q;
54 long r;
55 cout << "请输入插入位置:";
56 cin >> q;
57 cout << "请输入插入数字:";
58 cin >> r;
59 n = n + 1;
60 for (int i = n; i > (q - 1); i--)
61 a[i] = a[i - 1];
62 a[q - 1] = r;
63 }
64};
65int main()
66{
67 int pos;
68 cout << "输入数组长度:";
69 cin >> pos;
70 long* a = new long[pos];
71
72 for (int i = 0; i < pos; i++)
73 {
74 cin >> a[i];
75 }
76 A<long, 5> T1(a, pos);
77 T1.output();
78 cout << "该数组的最大值为:" <<T1.max() << endl;
79 T1.insert();
80 T1.output();
81 T1.deletefirst();
82 cout << "删除首位后该数组为:";
83 T1.output();
84 delete[] a;
85 return 0;
86}
1.post-content pre,
2code {
3 font-family: "JetBrains Mono", monospace;
4 font-size: 1rem;
5 line-height: 1.2;
6}
1baseURL: "https://izumi987.github.io/" # 主站的 URL
2title: Izumi987's Blog # 站点标题
3copyright: "[©2024 Izumi987's Blog](https://izumi987.github.io/)" # 网站的版权声明,通常显示在页脚
4theme: PaperMod # 主题
5languageCode: zh-cn # 语言
6
7enableInlineShortcodes: true # shortcode,类似于模板变量,可以在写 markdown 的时候便捷地插入,官方文档中有一个视频讲的很通俗
8hasCJKLanguage: true # 是否有 CJK 的字符
9enableRobotsTXT: true # 允许生成 robots.txt
10buildDrafts: false # 构建时是否包括草稿
11buildFuture: false # 构建未来发布的内容
12buildExpired: false # 构建过期的内容
13enableEmoji: true # 允许 emoji
14pygmentsUseClasses: true
15defaultContentLanguage: zh # 顶部首先展示的语言界面
16defaultContentLanguageInSubdir: false # 是否要在地址栏加上默认的语言代码
17
18languages:
19 zh:
20 languageName: "中文" # 展示的语言名
21 weight: 1 # 权重
22 taxonomies: # 分类系统
23 category: categories
24 tag: tags
25 # https://gohugo.io/content-management/menus/#define-in-site-configuration
26 menus:
27 main:
28 - name: 首页
29 pageRef: /
30 weight: 4 # 控制在页面上展示的前后顺序
31 - name: 归档
32 pageRef: archives/
33 weight: 5
34 - name: 分类
35 pageRef: categories/
36 weight: 10
37 - name: 标签
38 pageRef: tags/
39 weight: 10
40 - name: 搜索
41 pageRef: search/
42 weight: 20
43 - name: 关于
44 pageRef: about/
45 weight: 21
46
47# ~~~~~~~~~
48# 主题的配置(基本上是)
49# ~~~~~~~~~
50paginate: 8 # 每页展示的文章数量
51
52params:
53 env: production # to enable google analytics, opengraph, twitter-cards and schema.
54 description: "Theme PaperMod - https://github.com/adityatelange/hugo-PaperMod"
55 author: Sonny Calcr
56 defaultTheme: dark # 默认是暗色背景
57 ShowShareButtons: false # 关闭分享的按钮
58 ShowReadingTime: true # 展示预估的阅读时长
59 displayFullLangName: true # 展示全名
60 ShowPostNavLinks: true # 展示文章导航链接,就是下一页上一页的那个
61 ShowBreadCrumbs: false # 是否展示标题上方的面包屑
62 ShowCodeCopyButtons: true # 是否展示复制代码的按钮
63 ShowRssButtonInSectionTermList: true # RSS 相关
64 ShowAllPagesInArchive: true # 在归档页面展示所有的页面
65 ShowPageNums: true # 展示页面的页数
66 ShowToc: true # 展示文章详情页的目录
67 comments: true # 评论
68 images: ["https://i.postimg.cc/7hwBy7VS/calcr.png"] # 缺省的图片,比如,博客的封面
69 DateFormat: "2006-01-02" # 这个时间是作者自己写的,只能这样写
70
71# 首页的文章上方的一些信息
72 homeInfoParams:
73 # 首页的 profile 内容
74 Title: "こんにちは👋"
75 # 首页的 profile 内容
76 Content: >
77 Welcome to my Blog! 挂上一个梯子可能会让访问更加顺畅。
78 <div>
79 ●
80 <br>
81 ●
82 <br>
83
84 # 搜索
85 fuseOpts:
86 isCaseSensitive: false # 是否大小写敏感
87 shouldSort: true # 是否排序
88 location: 0
89 distance: 1000
90 threshold: 0.4
91 minMatchCharLength: 0
92 # limit: 10 # refer: https://www.fusejs.io/api/methods.html#search
93 keys: ["title", "permalink", "summary", "content"]
94 includeMatches: true
95# https://github.com/adityatelange/hugo-PaperMod/wiki/Features#search-page
96
97 # 评论的设置
98 giscus:
99 repo: "izumi987/izumi987.github.io"
100 repoId: "R_kgDONJ1RRg"
101 category: "Announcements"
102 categoryId: "DIC_kwDONJ1RRs4Cj8TA"
103 mapping: "pathname"
104 strict: "0"
105 reactionsEnabled: "1"
106 emitMetadata: "0"
107 inputPosition: "bottom"
108 lightTheme: "light"
109 darkTheme: "dark"
110 lang: "zh-CN"
111 crossorigin: "anonymous"
112
113
114
115
116markup:
117 goldmark:
118 renderer:
119 unsafe: true # 可以 unsafe,有些 html 标签和样式可能需要
120 highlight:
121 anchorLineNos: false # 不要给行号设置锚标
122 codeFences: true # 代码围栏
123 noClasses: false # TODO: 不知道干啥的,暂时没必要了解,不影响展示
124 lineNos: true # 代码行
125 lineNumbersInTable: false # 不要设置成 true,否则如果文章开头是代码的话,摘要会由一大堆数字(即代码行号)开头文章
126 # 这里设置 style 没用,得自己加 css
127 # style: "github-dark"
128 # style: monokai
129outputs:
130 home:
131 - HTML # 生成的静态页面
132 - RSS # 这个其实无所谓
133 - JSON # necessary for search, 这里的配置修改好之后,一定要重新生成一下