chore: Initial commit

---------

Co-authored-by: KirisameVanilla <118162831+KirisameVanilla@users.noreply.github.com>
Co-authored-by: Akai_Akari <zzdsnlcg@gmail.com>
Co-authored-by: psycho <10235101500@stu.ecnu.edu.cn>
Co-authored-by: Eagle233 <eagle233real@outlook.com>
This commit is contained in:
タクヤマ 2024-07-04 15:30:34 +08:00 committed by KirisameVanilla
commit 2625c5c8d2
131 changed files with 9867 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
node_modules/
.cache
.temp
dist

1
README.md Normal file
View File

@ -0,0 +1 @@
# SharedCourses

16
docs/.vuepress/config.ts Normal file
View File

@ -0,0 +1,16 @@
import { defineUserConfig } from "vuepress";
import theme from "./theme.js";
export default defineUserConfig({
base: "/",
lang: "zh-CN",
title: "文档演示",
description: "vuepress-theme-hope 的文档演示",
theme,
// 和 PWA 一起启用
// shouldPrefetch: false,
});

31
docs/.vuepress/navbar.ts Normal file
View File

@ -0,0 +1,31 @@
import { navbar } from "vuepress-theme-hope";
export default navbar([
"/",
"/portfolio",
"/courses/",
{
text: "指南",
icon: "lightbulb",
prefix: "/guide/",
children: [
{
text: "Bar",
icon: "lightbulb",
prefix: "bar/",
children: ["baz", { text: "...", icon: "ellipsis", link: "" }],
},
{
text: "Foo",
icon: "lightbulb",
prefix: "foo/",
children: ["ray", { text: "...", icon: "ellipsis", link: "" }],
},
],
},
{
text: "V2 文档",
icon: "book",
link: "https://theme-hope.vuejs.press/zh/",
},
]);

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path fill="#FDD7AD" d="M512 0 335.448 88.272l-70.616 35.312-70.624 35.312-176.552 88.28v529.648L512 1024l494.344-247.176V247.176z"/><path fill="#CBB292" d="m759.176 370.76-70.624 35.304-494.344-247.168 70.624-35.312zM512 494.344V1024L17.656 776.824V247.176z"/><path fill="#7F6E5D" d="M1006.344 247.168v529.656L512 1024V494.344l176.552-88.28v70.624l141.24-70.624v-70.616z"/><path fill="#7F5B53" d="M829.792 335.448v70.624L688.56 476.68v-70.624z"/><path fill="#CBB292" d="m829.792 335.448-70.624 35.312-494.344-247.176 70.624-35.312z"/><path fill="#2C3E50" d="m682.52 550.32 157.032-78.512a17.656 17.656 0 0 1 25.552 15.792v9.32a52.96 52.96 0 0 1-29.28 47.376L678.8 622.8a17.656 17.656 0 0 1-25.552-15.792v-9.312a52.96 52.96 0 0 1 29.28-47.376z"/></svg>

After

Width:  |  Height:  |  Size: 854 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024"><defs><linearGradient id="a" x1="522.593" x2="522.593" y1="-70.302" y2="-335.937" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#fe5d5a" stop-opacity=".1"/><stop offset=".908" stop-color="#ef1220" stop-opacity=".5"/></linearGradient><linearGradient id="b" x1="107.12" x2="935.038" y1="-373.67" y2="-373.67" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ff5e59"/><stop offset="1" stop-color="#f01422"/></linearGradient><linearGradient id="c" x1="519.405" x2="519.405" y1="-195.547" y2="-726.816" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ffe2e2"/><stop offset=".888" stop-color="#ff8e8e"/></linearGradient><linearGradient id="d" x1="191.5" x2="483.9" y1="-564.9" y2="-564.9" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#e92700" stop-opacity=".3"/><stop offset=".013" stop-color="#ef1220" stop-opacity=".2"/></linearGradient><linearGradient id="e" x1="403.502" x2="253.121" y1="-847.32" y2="-586.853" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ff5e59"/><stop offset=".201" stop-color="#f01422"/></linearGradient><linearGradient id="f" x1="330.485" x2="330.485" y1="-801.787" y2="-625.789" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ff5e59"/><stop offset=".201" stop-color="#f01422"/></linearGradient><linearGradient id="g" x1="397.351" x2="256.845" y1="-647.231" y2="-890.596" gradientUnits="userSpaceOnUse" spreadMethod="pad"><stop offset="0" stop-color="#ffa6a6"/><stop offset=".908" stop-color="#ff6b5d"/></linearGradient></defs><path fill="url(#a)" d="M501.2 662.3 327.6 763.8c-13.9 8.1-14.2 28.1-.5 36.7l179.1 97.7c10.9 5.9 24.1 5.9 34.9-.1l177-97.9c13.6-8.5 13.4-28.3-.3-36.5l-168.4-101c-14.8-9-33.3-9.1-48.2-.4Z"/><path fill="#f63037" d="m110.2 525.7-3.1 77.6 57.5 18.5L184 519.4Z"/><path fill="url(#b)" d="m476.6 363.5-328 154.6c-21 42.7-55.4 65.4-35.5 103.5 4.2 8 9.4 14.4 15.4 18.1l358.2 195.5c21.8 11.9 48.1 11.8 69.8-.2l354-195.8c27.2-16.9 34.8-90.3 7.3-106.8L573 364.1c-29.7-17.8-66.6-18-96.4-.6Z"/><path fill="url(#c)" d="M476.6 298.7 129.4 501.6c-27.8 16.3-28.4 56.3-1 73.3l358.2 195.5c21.8 11.9 48.1 11.8 69.8-.2l354-195.8c27.2-16.9 26.9-56.6-.6-73.1L573 299.3c-29.7-17.8-66.6-18-96.4-.6Z"/><path fill="#ff8989" fill-opacity=".31" d="m481.2 387.8 39.4 123.4c1.1 3.4 4 6 7.6 6.6l173.4 30.4-33-118.3c-.9-3.3-3.6-5.8-7-6.5l-180.4-35.6ZM327 499.2l40.4 101.1L496.7 525c2.5-1.5 3.7-4.5 2.7-7.3l-36-106.8-127.6 65c-8.6 4.3-12.4 14.4-8.8 23.3ZM523.8 540.5l-140.3 77.2L567.2 659c3.2.7 6.6.1 9.3-1.6l134.6-85-174.7-33.8c-4.3-1-8.7-.3-12.6 1.9Z"/><path fill="url(#d)" d="M483.9 406.1c0 35.46-65.46 64.2-146.2 64.2s-146.2-28.74-146.2-64.2c0-35.46 65.46-64.2 146.2-64.2s146.2 28.74 146.2 64.2Z"/><path fill="url(#e)" d="m254.2 188.4-123 83.1c-1.8 1.3-2.6 3.6-1.8 5.7l39.1 110.6c.6 1.7 2 2.9 3.8 3.2l221.8 40.5c1.3.3 2.7-.1 3.7-.8l131.7-93.6c1.9-1.4 2.6-3.9 1.7-6.1l-49.4-107c-.6-1.5-2.1-2.6-3.7-2.8l-220.3-33.5c-1.3-.2-2.6.1-3.6.7Z"/><path fill="url(#f)" d="m528.6 274.5 3 59.1-205 65.6-177.2-72.7-20-49.2 1.9-54.1Z"/><path fill="url(#g)" d="m250.6 138-112.3 76c-6 4.1-8.5 11.7-6.1 18.5l34.2 96.6c1.9 5.4 6.6 9.3 12.1 10.4l211 38.5c4.3.7 8.6-.2 12.1-2.7l120.5-85.5c6.3-4.4 8.4-12.7 5.3-19.7l-43.1-93.5c-2.2-4.9-6.8-8.3-12.1-9.1L262 135.6c-4-.7-8 .2-11.4 2.4Z"/><path fill="#fff" d="m419.8 252.8-79-11-29-57.7c-3.8-7.6-13.2-10.7-20.8-6.9-7.6 3.8-10.7 13.2-6.9 20.8l26.6 52.9-61.8 42.2c-7.1 4.8-8.9 14.5-4.1 21.5 3 4.4 7.9 6.8 12.8 6.8 3 0 6-.9 8.7-2.7l68-46.4 81.1 11.2c.7.1 1.4.1 2.1.1 7.6 0 14.3-5.6 15.3-13.4 1.4-8.4-4.5-16.2-13-17.4Z"/></svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1 @@
<svg width="98" height="96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg>

After

Width:  |  Height:  |  Size: 963 B

View File

@ -0,0 +1 @@
<svg width="98" height="96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 960 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1536 1024"><path fill="#1296db" d="M1425.067.256H110.933A110.933 110.933 0 0 0 0 110.848v723.627a110.933 110.933 0 0 0 110.933 110.933h1314.39c61.269 0 110.933-49.75 110.677-110.677V110.848A110.933 110.933 0 0 0 1425.067.256z" class="selected" data-spm-anchor-id="a313x.7781069.0.i4"/><path fill="#FFF" d="M664.747 723.797V435.883L517.12 620.373l-147.456-184.49v288l-148.053-67.158V221.781h147.626l147.627 184.576 147.541-184.576h147.627v565.76z"/><path d="M1024 0h426.667A85.333 85.333 0 0 1 1536 85.333v768a85.333 85.333 0 0 1-85.333 85.334H1024V0z" opacity=".1"/><path fill="#FFF" d="m1256.96 731.307-170.667-216.491h113.75V304.64h113.749v210.176h113.835z" opacity=".5"/></svg>

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1200" class="icon" viewBox="0 0 3280.944 2800"><path fill="#41b883" d="M1645.332 601.004h375.675L1081.82 2238.478 142.636 601.004h718.477l220.708 379.704 216.013-379.704z"/><path fill="#41b883" d="M142.636 601.004l939.185 1637.474 939.186-1637.474h-375.675l-563.51 982.484-568.208-982.484z"/><path fill="#35495e" d="M513.188 601.004l568.207 987.23 563.511-987.23h-347.498l-216.013 379.704-220.708-379.704zM1607.792 1311.83l594.678 2.293 187.353-316.325-598.662 2.292zM2198.506 1909.57C2867.436 732.7 2939.502 605.426 2937.874 603.78c-.715-.723 45.303-1.314 102.262-1.314s103.562.428 103.562.951c0 .523-208.57 367.978-463.491 816.567L2216.715 2235.6l-102.1.596-102.102.596z"/><path fill="#41b883" d="M1680.563 2233.328c0-1.34 168.208-298.145 440.375-777.048a4135645.775 4135645.775 0 00337.619-594.19l146.13-257.25 170.746-.04 170.747-.04-5.536 9.741c-3.044 5.358-43.727 77.302-90.407 159.875-85.356 150.992-337.562 595.163-656.602 1156.373l-172 302.559-170.536.588c-93.795.322-170.536.069-170.536-.567z"/><path fill="#35495e" d="M1429.783 1625.351l594.679 2.292 187.353-316.324-598.662 2.292z"/><path fill="#41b883" d="M1524.207 1464.903l608.285 6.877 173.746-320.909h-619.072z"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

14
docs/.vuepress/sidebar.ts Normal file
View File

@ -0,0 +1,14 @@
import { sidebar } from "vuepress-theme-hope";
export default sidebar({
"/": [
"",
{
text: "华东师范大学课程共享计划",
icon: "laptop-code",
prefix: "courses/",
link: "courses/",
children: "structure",
},
],
});

View File

@ -0,0 +1,2 @@
// you can change config here
$theme-color: #096dd9;

View File

@ -0,0 +1 @@
// place your custom styles here

View File

@ -0,0 +1 @@
// you can change colors here

196
docs/.vuepress/theme.ts Normal file
View File

@ -0,0 +1,196 @@
import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./navbar.js";
import sidebar from "./sidebar.js";
export default hopeTheme({
hostname: "https://vuepress-theme-hope-docs-demo.netlify.app",
author: {
name: "Mr.Hope",
url: "https://mister-hope.com",
},
logo: "https://theme-hope-assets.vuejs.press/logo.svg",
repo: "vuepress-theme-hope/vuepress-theme-hope",
docsDir: "src",
// 导航栏
navbar,
// 侧边栏
sidebar,
// 页脚
footer: "默认页脚",
displayFooter: true,
// 加密配置
encrypt: {
config: {
"/demo/encrypt.html": {
hint: "Password: 1234",
password: "1234",
},
},
},
// 多语言配置
metaLocales: {
editLink: "在 GitHub 上编辑此页",
},
// 如果想要实时查看任何改变,启用它。注: 这对更新性能有很大负面影响
// hotReload: true,
// 此处开启了很多功能用于演示,你应仅保留用到的功能。
markdown: {
align: true,
attrs: true,
codeTabs: true,
component: true,
demo: true,
figure: true,
gfm: true,
imgLazyload: true,
imgSize: true,
include: true,
mark: true,
plantuml: true,
spoiler: true,
stylize: [
{
matcher: "Recommended",
replacer: ({ tag }) => {
if (tag === "em")
return {
tag: "Badge",
attrs: { type: "tip" },
content: "Recommended",
};
},
},
],
sub: true,
sup: true,
tabs: true,
tasklist: true,
vPre: true,
// 取消注释它们如果你需要 TeX 支持
// math: {
// // 启用前安装 katex
// type: "katex",
// // 或者安装 mathjax-full
// type: "mathjax",
// },
// 如果你需要幻灯片,安装 @vuepress/plugin-revealjs 并取消下方注释
// revealjs: {
// plugins: ["highlight", "math", "search", "notes", "zoom"],
// },
// 在启用之前安装 chart.js
// chartjs: true,
// insert component easily
// 在启用之前安装 echarts
// echarts: true,
// 在启用之前安装 flowchart.ts
// flowchart: true,
// 在启用之前安装 mermaid
// mermaid: true,
// playground: {
// presets: ["ts", "vue"],
// },
// 在启用之前安装 @vue/repl
// vuePlayground: true,
// 在启用之前安装 sandpack-vue3
// sandpack: true,
},
// 在这里配置主题提供的插件
plugins: {
// 注意: 仅用于测试! 你必须自行生成并在生产环境中使用自己的评论服务
comment: {
provider: "Giscus",
repo: "vuepress-theme-hope/giscus-discussions",
repoId: "R_kgDOG_Pt2A",
category: "Announcements",
categoryId: "DIC_kwDOG_Pt2M4COD69",
},
components: {
components: ["Badge", "VPCard"],
},
icon: {
prefix: "fa6-solid:",
},
// 如果你需要 PWA。安装 @vuepress/plugin-pwa 并取消下方注释
// pwa: {
// favicon: "/favicon.ico",
// cacheHTML: true,
// cacheImage: true,
// appendBase: true,
// apple: {
// icon: "/assets/icon/apple-icon-152.png",
// statusBarColor: "black",
// },
// msTile: {
// image: "/assets/icon/ms-icon-144.png",
// color: "#ffffff",
// },
// manifest: {
// icons: [
// {
// src: "/assets/icon/chrome-mask-512.png",
// sizes: "512x512",
// purpose: "maskable",
// type: "image/png",
// },
// {
// src: "/assets/icon/chrome-mask-192.png",
// sizes: "192x192",
// purpose: "maskable",
// type: "image/png",
// },
// {
// src: "/assets/icon/chrome-512.png",
// sizes: "512x512",
// type: "image/png",
// },
// {
// src: "/assets/icon/chrome-192.png",
// sizes: "192x192",
// type: "image/png",
// },
// ],
// shortcuts: [
// {
// name: "Demo",
// short_name: "Demo",
// url: "/demo/",
// icons: [
// {
// src: "/assets/icon/guide-maskable.png",
// sizes: "192x192",
// purpose: "maskable",
// type: "image/png",
// },
// ],
// },
// ],
// },
// },
},
});

326
docs/README.md Normal file
View File

@ -0,0 +1,326 @@
---
home: true
icon: house
title: 项目主页
heroImage: https://theme-hope-assets.vuejs.press/logo.svg
bgImage: https://theme-hope-assets.vuejs.press/bg/6-light.svg
bgImageDark: https://theme-hope-assets.vuejs.press/bg/6-dark.svg
bgImageStyle:
background-attachment: fixed
heroText: 项目名称
tagline: 你可以在这里放置或是整个项目的描述。
actions:
- text: 使用指南
icon: lightbulb
link: ./demo/
type: primary
- text: 文档
link: ./guide/
highlights:
- header: 易于安装
image: /assets/image/box.svg
bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg
bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg
highlights:
- title: 运行 <code>pnpm create vuepress-theme-hope hope-project</code> 以创建一个新的主题项目。
- title: 在已有项目根目录下运行 <code>pnpm create vuepress-theme-hope add .</code> 以在项目中添加主题。
- header: 在 Markdown 中添加你想要的内容
description: 我们扩展了标准的 CommonMark 规范,为你添加了成吨功能。
image: /assets/image/markdown.svg
bgImage: https://theme-hope-assets.vuejs.press/bg/2-light.svg
bgImageDark: https://theme-hope-assets.vuejs.press/bg/2-dark.svg
bgImageStyle:
background-repeat: repeat
background-size: initial
features:
- title: 链接检查
icon: clipboard-check
details: 检查 Markdown 链接
link: https://theme-hope.vuejs.press/zh/guide/markdown/others.html#link-check
- title: 提示容器
icon: box-archive
details: 用样式装饰 Markdown 内容
link: https://theme-hope.vuejs.press/zh/guide/markdown/stylize/hint.html
- title: GFM 警告
icon: bell
details: GFM 风格的警告容器
link: https://theme-hope.vuejs.press/zh/guide/markdown/stylize/alert.html
- title: 选项卡
icon: table-columns
details: 使用选项卡对相似内容进行分组
link: https://theme-hope.vuejs.press/zh/guide/markdown/content/tabs.html
- title: 代码组
icon: code
details: 使用选项卡对相似代码进行分组
link: https://theme-hope.vuejs.press/zh/guide/markdown/code/code-tabs.html
- title: 自定义对齐
icon: align-center
details: Markdown 中对内容进行自定义对齐
link: https://theme-hope.vuejs.press/zh/guide/markdown/stylize/align.html
- title: 自定义属性
icon: code
details: 为 Markdown 元素添加属性
link: https://theme-hope.vuejs.press/zh/guide/markdown/stylize/attrs.html
- title: 上下角标
icon: superscript
details: 轻松在 Markdown 中添加上下角标
link: https://theme-hope.vuejs.press/zh/guide/markdown/stylize/sup-sub.html
- title: 脚注
icon: quote-left
details: 在内容中插入脚注
link: https://theme-hope.vuejs.press/zh/guide/markdown/content/footnote.html
- title: 标记
icon: highlighter
details: 标记并高亮内容
link: https://theme-hope.vuejs.press/zh/guide/markdown/stylize/mark.html
- title: 剧透
icon: eraser
details: 添加剧透标记支持
link: https://theme-hope.vuejs.press/zh/guide/markdown/stylize/spoiler.html
- title: 任务列表
icon: square-check
details: 轻松插入任务列表
link: https://theme-hope.vuejs.press/zh/guide/markdown/grammar/tasklist.html
- title: 图片语法
icon: image
details: 使用改进的语法指定图片大小与颜色模式
link: https://theme-hope.vuejs.press/zh/guide/markdown/grammar/image.html
- title: 组件支持
icon: puzzle-piece
details: 在 Markdown 中轻松插入组件
link: https://theme-hope.vuejs.press/zh/guide/component/grammar.html
- title: 组件
icon: puzzle-piece
details: 开箱即用的常用组件
link: https://theme-hope.vuejs.press/zh/guide/component/built-in.html
- title: Chart.js 支持
icon: chart-simple
details: 在 Markdown 中展示 Chart.js 图表
link: https://theme-hope.vuejs.press/zh/guide/markdown/chart/chartjs.html
- title: 流程图支持
icon: route
details: 在 Markdown 中直接写出流程图
link: https://theme-hope.vuejs.press/zh/guide/markdown/chart/flowchart.html
- title: Mermaid 支持
icon: chart-pie
details: 在 Markdown 中添加 Mermaid 图例
link: https://theme-hope.vuejs.press/zh/guide/markdown/chart/mermaid.html
- title: Plantuml 支持
icon: diagram-project
details: 在 Markdown 中添加 Plant UML 图表
link: https://theme-hope.vuejs.press/zh/guide/markdown/chart/plantuml.html
- title: Tex 支持
icon: square-root-variable
details: Markdown 现在也可以支持 Tex 语法以显示公式
link: https://theme-hope.vuejs.press/zh/guide/markdown/grammar/math.html
- title: 导入文件支持
icon: fa6-brands:markdown
details: 将你的文档分段,并在 Markdown 中导入
link: https://theme-hope.vuejs.press/zh/guide/markdown/content/include.html
- title: 交互演示支持
icon: code
details: 你可以在 Markdown 中添加交互演示
link: https://theme-hope.vuejs.press/zh/guide/markdown/code/playground.html
- title: Kotlin 交互演示支持
icon: fa6-brands:kickstarter
details: 响应式的 Kotlin 演示
link: https://theme-hope.vuejs.press/zh/guide/markdown/code/kotlin-playground.html
- title: Vue 交互演示支持
icon: fa6-brands:vuejs
details: 在交互演示中展示 Vue 组件
link: https://theme-hope.vuejs.press/zh/guide/markdown/code/vue-playground.html
- title: Sandpack 交互演示支持
icon: code
details: Sandpack 驱动的实时的编码环境
link: https://theme-hope.vuejs.press/zh/guide/markdown/code/sandpack.html
- title: 代码案例支持
icon: laptop-code
details: 你可以很方便的插入代码案例
link: https://theme-hope.vuejs.press/zh/guide/markdown/code/demo.html
- title: 幻灯片支持
icon: person-chalkboard
details: 通过 Reveal.js 在 Markdown 中插入幻灯片
link: https://theme-hope.vuejs.press/zh/guide/markdown/content/revealjs.html
- header: 可定制的页面
description: 完整无障碍支持的可定制外观
image: /assets/image/ui.svg
bgImage: https://theme-hope-assets.vuejs.press/bg/9-light.svg
bgImageDark: https://theme-hope-assets.vuejs.press/bg/9-dark.svg
highlights:
- title: 深色模式
icon: circle-half-stroke
details: 可以自由切换浅色模式与深色模式
link: https://theme-hope.vuejs.press/zh/guide/interface/darkmode.html
- title: 主题色切换
icon: palette
details: 支持自定义主题色并允许用户在预设的主题颜色之间切换
link: https://theme-hope.vuejs.press/zh/guide/interface/theme-color.html
- title: 更多
icon: ellipsis
details: RTL 布局,打印支持,全局按钮等
link: https://theme-hope.vuejs.press/zh/guide/interface/others.html
- header: 布局
description: 一个完美的响应式布局。
image: /assets/image/layout.svg
bgImage: https://theme-hope-assets.vuejs.press/bg/5-light.svg
bgImageDark: https://theme-hope-assets.vuejs.press/bg/5-dark.svg
highlights:
- title: 导航栏
icon: window-maximize
details: 完全可定制的导航栏以及改进的移动端外观
link: https://theme-hope.vuejs.press/zh/guide/layout/navbar.html
- title: 侧边栏
icon: fas fa-window-maximize fa-rotate-270
details: 从文档标题或文件结构中自动生成侧边栏
link: https://theme-hope.vuejs.press/zh/guide/layout/sidebar.html
- title: 幻灯片页面
icon: person-chalkboard
details: 添加幻灯片页面以显示你喜欢的内容
link: https://theme-hope.vuejs.press/zh/guide/layout/slides.html
- title: 布局增强
icon: object-group
details: 添加路径导航、页脚、改进的导航栏、改进的页面导航等。
link: https://theme-hope.vuejs.press/zh/guide/layout/
- title: 更多
icon: ellipsis
details: RTL 布局,打印支持,全局按钮等
link: https://theme-hope.vuejs.press/zh/guide/interface/others.html
- header: 新功能
image: /assets/image/features.svg
bgImage: https://theme-hope-assets.vuejs.press/bg/1-light.svg
bgImageDark: https://theme-hope-assets.vuejs.press/bg/1-dark.svg
features:
- title: 目录页面
icon: network-wired
details: 自动生成目录页以及开箱即用的目录组件
link: https://theme-hope.vuejs.press/zh/guide/feature/catalog.html
- title: 浏览量与评论
icon: comment-dots
details: 配合 4 个评论服务开启阅读量统计与评论支持
link: https://theme-hope.vuejs.press/zh/guide/feature/comment.html
- title: 文章信息
icon: circle-info
details: 为你的文章添加作者、写作日期、预计阅读时间、字数统计等信息
link: https://theme-hope.vuejs.press/zh/guide/feature/page-info.html
- title: 文章加密
icon: lock
details: 你可以为你的特定页面或特定目录进行加密,以便陌生人不能随意访问它们
link: https://theme-hope.vuejs.press/zh/guide/feature/encrypt.html
- title: 搜索支持
icon: search
details: 支持 docsearch 和基于客户端的搜索
link: https://theme-hope.vuejs.press/zh/guide/feature/search.html
- title: 代码块
icon: code
details: 自定义代码块主题、行号、行高亮、复制按钮等
link: https://theme-hope.vuejs.press/zh/guide/markdown/code/fence.html
- title: 图片预览
icon: image
details: 像相册一样允许你浏览、缩放并分享你的页面图片
link: https://theme-hope.vuejs.press/zh/guide/feature/photo-swipe.html
- header: 博客
description: 通过主题创建个人博客
image: /assets/image/blog.svg
bgImage: https://theme-hope-assets.vuejs.press/bg/5-light.svg
bgImageDark: https://theme-hope-assets.vuejs.press/bg/5-dark.svg
highlights:
- title: 博客功能
icon: blog
details: 通过文章的日期、标签和分类展示文章
link: https://theme-hope.vuejs.press/zh/guide/blog/intro.html
- title: 博客主页
icon: house
details: 全新博客主页
link: https://theme-hope.vuejs.press/zh/guide/blog/home.html
- title: 博主信息
icon: circle-info
details: 自定义名称、头像、座右铭和社交媒体链接
link: https://theme-hope.vuejs.press/zh/guide/blog/blogger.html
- title: 时间线
icon: clock
details: 在时间线中浏览和通读博文
link: https://theme-hope.vuejs.press/zh/guide/blog/timeline.html
- header: 高级
description: 增强站点与用户体验的高级功能
image: /assets/image/advanced.svg
bgImage: https://theme-hope-assets.vuejs.press/bg/4-light.svg
bgImageDark: https://theme-hope-assets.vuejs.press/bg/4-dark.svg
highlights:
- title: SEO 增强
icon: dumbbell
details: 将最终生成的网页针对搜索引擎进行优化。
link: https://theme-hope.vuejs.press/zh/guide/advanced/seo.html
- title: Sitemap
icon: sitemap
details: 自动为你的网站生成 Sitemap
link: https://theme-hope.vuejs.press/zh/guide/advanced/sitemap.html
- title: Feed 支持
icon: rss
details: 生成你的 Feed并通知你的用户订阅它
link: https://theme-hope.vuejs.press/zh/guide/advanced/feed.html
- title: PWA 支持
icon: mobile-screen
details: 让你的网站更像一个 APP
link: https://theme-hope.vuejs.press/zh/guide/advanced/pwa.html
copyright: false
footer: 使用 <a href="https://theme-hope.vuejs.press/zh/" target="_blank">VuePress Theme Hope</a> 主题 | MIT 协议, 版权所有 © 2019-至今 Mr.Hope
---
这是项目主页的案例。你可以在这里放置你的主体内容。
想要使用此布局,你需要在页面 front matter 中设置 `home: true`
配置项的相关说明详见 [项目主页配置](https://theme-hope.vuejs.press/zh/guide/layout/home.html)。

95
docs/courses/index.md Normal file
View File

@ -0,0 +1,95 @@
---
title: 华东师范大学课程共享计划
icon: graduation-cap
index: true
category:
- 课程共享
---
# 华东师范大学课程共享计划
!!! warning "施工中"
目前我校的课程资料存在如下的特征:
1. **历代传承**: 课程资源由学长学姐多年整理积累, 可能只在部分人手中流通.
2. **分散存放**: 资源散落在各个 GitHub 仓库, 难以集中有效地被检索.
3. **垄断流通**: 部分资源被少数人低价售卖, 同时难以保证其完整性和可靠性.
计划旨在解决当前课程资料存在的问题, 并实现以下目标:
1. **统一汇总**: 将分散的课程资源集中到一个平台.
2. **公开共享**: 秉承开源精神, 任何人都能自由访问与使用.
3. **开放更新**: 任何人都可以上传和更新资源, 保持内容持续完善.
平台面向的同学:
1. **获取资料**: 想要获取资源的同学可直接[点击链接](https://ecnusc.eagle233.top/).
2. **共享资料**: 愿意贡献资源的同学可按规范提交 PR 或通过邮件提交文件, 审核通过后合并到平台.
## 标准化命名
### 真题卷命名规则
```bash
[科目]_[开课院系]_[学期]_[考试类型][序号 (可选)]_[A/B卷 (可选)]_[标注 (可选)]_[备注 (可选)].[格式]
```
### 字段说明
1. **科目**: 填写完整科目名称, 如 "线性代数", "城市文明史", "学术英语写作"
2. **开课院系**: 填写完整院系名称, 如 "软件工程学院", "马克思主义学院"
3. **学期**: 填写 "2024Fall" 或 "2023Spring" 或 "2025Summer"(暑假短学期)
4. **考试类型**: 如 "月考", "期中", "期末"
5. **序号 (可选)**: 同类考试可添加序号, 如 "月考1", "月考2"
6. **A/B卷 (可选)**: 如果存在 A 卷或 B 卷, 填写 "A" 或 "B", 没有可不标
7. **标注 (可选)**:
- "含答案": 试卷 + 答案文件
- "答案": 只有答案文件
- 空: 只有试卷
8. **备注 (可选)**: 其他需要说明的信息, 应对同一门课程同一时期的不同平行班的不同卷子, 如"cr回忆版"
### 示例
| 科目 | 院系 | 学期 | 考试类型 | 序号 | A/B卷 | 标注 | 格式 | 文件名示例 |
| ------ | ------- |------------| ---- | -- | ---- | --- | ---- |----------------------------------------|
| 线性代数 | 软件工程学院 | 2024Fall | 期中 | | | 含答案 | pdf | 线性代数\_软件工程学院\_2024Fall\_期中\_含答案.pdf |
| 城市文明史 | 历史学系 | 2025Summer | 期末 | | | 答案 | pdf | 城市文明史\_历史学系\_2025Summer\_期末\_答案.pdf |
| 学术英语写作 | 大学英语教学部 | 2025Spring | 期末 | | | | docx | 学术英语写作\_大学英语教学部\_2025Spring\_期末.docx |
| 有机化学 | 生物学系 | 2024Fall | 月考 | 2 | B | 含答案 | docx | 有机化学\_生物学系\_2024Fall\_月考2\_B\_含答案.docx |
---
## Commit 规范
### 类型说明
| 类型 | 用途说明 |
| -------- | --------------------------- |
| `add` | 新增资料(试卷、答案、讲义等) |
| `update` | 修订 / 更新已有资料 |
| `rename` | 重命名文件 / 目录 |
| `remove` | 删除资料 |
| `docs` | 文档说明更新(如命名规范文档、使用说明等) |
| `build` | 修改组织架构(文件夹结构、资源位置等, 不涉及具体内容) |
### 命名模板
```bash
<type>: <院系>-<课程>
```
### 示例
```bash
add: 软件工程学院-计算机系统
update: 软件工程学院-计算机系统
rename: 软件工程学院-计算机系统
remove: 软件工程学院-计算机系统
docs: 更新命名规范文档
build: 调整资源目录结构
```
---
<Catalog />

View File

@ -0,0 +1,7 @@
# 通用学术英语读写
!!! warning "施工中"
## 真题卷
[通用学术英语读写_大学英语教学部_2024Fall_期中_A.pdf](../res/%E5%A4%A7%E5%AD%A6%E8%8B%B1%E8%AF%AD%E6%95%99%E5%AD%A6%E9%83%A8/%E9%80%9A%E7%94%A8%E5%AD%A6%E6%9C%AF%E8%8B%B1%E8%AF%AD%E8%AF%BB%E5%86%99/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E9%80%9A%E7%94%A8%E5%AD%A6%E6%9C%AF%E8%8B%B1%E8%AF%AD%E8%AF%BB%E5%86%99_%E5%A4%A7%E5%AD%A6%E8%8B%B1%E8%AF%AD%E6%95%99%E5%AD%A6%E9%83%A8_2024Fall_%E6%9C%9F%E4%B8%AD_A.pdf)

View File

@ -0,0 +1,3 @@
# 高等数学A
!!! warning "施工中"

View File

@ -0,0 +1,3 @@
# 高等数学A
!!! warning "施工中"

View File

@ -0,0 +1,13 @@
# 线性代数(计算机拔尖基地)
???+ note
2023Fall 与 2024Fall 的《线性代数计算机拔尖基地》由btm老师授课.
而众所周知btm老师也在软件工程学院教授《线性代数》.
因此可以同时参考[软件工程学院-线性代数](../%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0.md)的真题卷.
## 真题卷
[线性代数_数据科学与工程学院_2023Fall_期中_A_Partial.jpg](../res/%E6%95%B0%E6%8D%AE%E7%A7%91%E5%AD%A6%E4%B8%8E%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0%EF%BC%88%E8%AE%A1%E7%AE%97%E6%9C%BA%E6%8B%94%E5%B0%96%E5%9F%BA%E5%9C%B0%EF%BC%89/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0_%E6%95%B0%E6%8D%AE%E7%A7%91%E5%AD%A6%E4%B8%8E%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2_2023Fall_%E6%9C%9F%E4%B8%AD_A_Partial.jpg)

View File

@ -0,0 +1,18 @@
---
title: 云计算
category:
- 软件工程学院
- 课程评价
tag:
- 云计算
- 课程评价
---
# 课程评价
## 2024Fall
### 王廷
- 上课比较轻松, 没有作业, 不过有三个lab, lab的难度本身不大, 但是流程长, 工作量大, 而且手册版本过旧, 会出现很多问题, 体验较差
- 没有期末考试, 有一项个人作业和一项小组作业
- 个人作业是写paper summary, 英文写作, 没有字数要求
- 小组作业有两个选择:写综述或者复现论文, 综述的分数会乘0.9的系数, 老师会提供一个paper list, 可以在里面找素材
- 综上, 给分不太有区分度, 几点分布比较抽象, 24秋的给分情况93分(期末92平时94)只能拿3.1的绩点, 而95分(期末92平时98)有3.7的绩点, 这是值得考虑的

View File

@ -0,0 +1,24 @@
---
title: 人工智能的数学思维
category:
- 软件工程学院
- 课程资料
tag:
- 人工智能
- 数学
- AI基础
---
# 人工智能的数学思维
!!! warning "施工中"
## 真题卷
[人工智能的数学思维_软件工程学院_2025Spring_期末_回忆版.mdx](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E7%9A%84%E6%95%B0%E5%AD%A6%E6%80%9D%E7%BB%B4/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E7%9A%84%E6%95%B0%E5%AD%A6%E6%80%9D%E7%BB%B4_%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2_2025Spring_%E6%9C%9F%E6%9C%AB_%E5%9B%9E%E5%BF%86%E7%89%88.mdx)
## PPT
[wltPPT2025.zip](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E7%9A%84%E6%95%B0%E5%AD%A6%E6%80%9D%E7%BB%B4/PPT/wltPPT2025.zip)
[wmPPT2025.zip](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E7%9A%84%E6%95%B0%E5%AD%A6%E6%80%9D%E7%BB%B4/PPT/wmPPT2025.zip)

View File

@ -0,0 +1,16 @@
---
title: 信息安全数学基础(一)
category:
- 软件工程学院
- 课程评价
tag:
- 信息安全
- 数学基础
- 数论
---
# 课程评价
## 2024Spring
### 沈家辰
- 初等数论, 涉及知识较为广阔, 但是并不要求高妙的数学技巧, 也不需要惊人的注意力, 认真学习完全可以对付
- 考试不难, 老师会捞

View File

@ -0,0 +1,54 @@
注:扫描件中模糊处均不影响做题
# 一、选择题
## BCBDA CBCCA
# 二、填空题
1. 2
2. 4
3. $x\equiv7\ (mod\ 11)$
4. $s=47,t=-18,(a,b)=3$
5. $x\equiv11\ (mod\ 47), y\equiv1\ (mod\ 47)$
6. -1
7. $x\equiv2,5,8\ (mod\ 9)$
8. 2
9. 2
10. 0
# 三、计算题
1. $\because\varphi(41)=40,\ (\varphi(41),15)=5$
$\therefore\ $方程有5个解
\
$x^{15}\equiv14\ (mod\ 41)$
查表得 $14\equiv6^{25}\ (mod\ 41)$
令 $x\equiv\ 6^a\ (mod\ 41)$
则有 $6^{a^{15}}\equiv6^{25}\ (mod\ 41)$
即 $6^{15a}\equiv6^{25}\ (mod\ 41)$
则 $15a\equiv25\ (mod\ 40)$
化为 $3a\equiv5\ (mod\ 8)$,该式解为 $a\equiv7\ (mod\ 8)$
故解为 $a\equiv7,15,23,31,39\ (mod\ 40)$
查表得原式解为 $x\equiv29,3,30,13,7\ (mod\ 41)$
2. 勒让德符号的计算较为简单,这里不给出解题过程,两问的答案分别是-1-1
# 四、证明题
1.要证121是基3的拟素数即证 $3^{120}\equiv1\ (mod\ 121)$
一种常见的思路:
显然121与3互素由欧拉定理 $\varphi(121)=11^2-11=110,3^{\varphi(121)}=3^{110}\equiv1\ (mod\ 121)$
所以 $3^{120}\equiv3^{10}\ (mod\ 121)$, $3^{10}$显然可以手动验算,得证
另一种可能性:
尝试逐个检验后发现 $3^{5}=243\equiv1\ (mod\ 121),5|120$,直接得证
2. 显然p不为2
$\because p|n^4+1$
$\therefore n^4+1\equiv 0\ (mod \ p)$
$\therefore n^4+2n^2+1\equiv 2n^2\ (mod \ p)$
$\therefore (n^2+1)^2\equiv 2n^2\ (mod \ p)$
由二次剩余的定义知式子右边是模p的二次剩余
$\therefore(\frac{2n^2}{p})=1$
又 $\because (n,p)=1$
$\therefore(\frac{2}{p})=1$
$\therefore p\equiv 1,-1\ (mod\ 8)$
类似的,有 $n^4-2n^2+1\equiv -2n^2\ (mod \ p),(\frac{-2}{p})=1$
分别检验 $p\equiv 1\ (mod\ 8)$ 与 $p\equiv -1\ (mod\ 8)$,发现只有 $p\equiv 1\ (mod\ 8)$满足条件,得证

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,67 @@
# 答案
##
### 1.设 $G=\{a,b,c,e\}$ 是一个群, $H=\{a,e\}$ 是 $G$ 的子群,写出 $H$ 的所有左陪集
解:
将 $G$ 中元素 $g$ 各个代入,计算 $gH$
- $g = e$
$eH = H$
- $g = a$
$aH = \{ a \cdot a, a \cdot e \} = \{ a^2, a \}$,由于 $G$ 是群,且 $H$ 是子群,所以 $a^2$ 必须是 $G$ 中元素。
故 $a^2 = e$,则: $aH = \{ e, a \} = H$
- $g = b$
$bH = \{ b \cdot a, b \cdot e \} = \{ ba, b \}$
假设 $ba = c$ ,则:
$bH = \{ c, b \}$
- $g = c$
$cH = \{ c \cdot a, c \cdot e \} = \{ ca, c \}$
假设 $ca = b$ ,则:
$cH = \{ b, c \} = bH$
综上所述H的所有子陪集是 $\{ e, a \}, \{ b, c \}$
**2.写出 $R=Z/6Z$ 的所有零因子**
解:
$R=Z/6Z \cong Z_6$,我们只要考虑 $Z_6$ 上的性质:
显然有 $2\*3 \equiv 0 \pmod{6}, 4*3 \equiv 0 \pmod{6}$所以零因子是234
**3.定义在有限域 $F_{17}$ 上的椭圆曲线 $E: x^3 + 2x + 3 = y^2$ 上有点 $P(2, 7), Q(11, 8)$ , 计算 $P+Q$ , $2P$**
解:
直接计算即可,我们这里直接给出答案: $P+Q = (8, 15)$ , $2P = (14, 15)$
**4.求域 $F_{16}=F_2[x]/(x^4+x^3+1)$的一个生成元 $g(x)$,并用 $g(x)$ 的幂表示 $F_{16}$ 中的所有非零元**
解:
这时候有同学要问了,生成元怎么找啊?其实很简单,直接验证就可以了,(出于强大的直觉和观察力)我们在这里直接验证 $x$ :
| $x^n$ | $x^n\pmod{x^4+x^3+1}$ |
|------|----------|
| $x^0$ | $1$ |
| $x^1$ | $x$ |
| $x^2$ | $x^2$ |
| $x^3$ | $x^3$ |
| $x^4$ | $x^3 + 1$ |
| $x^5$ | $x^3 + x + 1$ |
| $x^6$ | $x^3 + x^2 + x + 1$ |
| $x^7$ | $1 + x^2 + x$ |
| $x^8$ | $x^2 + x + 1$ |
| $x^9$ | $x^3 + x^2 + x$ |
| $x^{10}$ | $x^3 + x^2 + x + 1$ |
| $x^{11}$ | $x^3 + x + 1$ |
| $x^{12}$ | $x^3 + 1$ |
| $x^{13}$ | $x^3$ |
| $x^{14}$ | $x^2$ |
如上表,由 $x$ 生成的15个非零元素互不相等所以 $x$ 确实是生成元,非零元的表示如表中所示
### 5.证明有限环的特征一定不为0
证明请参考课件Chap7.pdf中27-28页

View File

@ -0,0 +1,19 @@
## 说明:
本学期2024年秋季学期的期末试卷难度**相当**低,本人评价为有手就行,故没有特意记忆所有题目,而是挑出一些有代表性的题目以供参考
<ol>
<li>设 $G=\{a,b,c,e\}$ 是一个群, $H=\{a,e\}$ 是 $G$ 的子群,写出 $H$ 的所有左陪集</li>
<li>写出 $R=Z/6Z$ 的所有零因子</li>
<li>定义在有限域 $F_{17}$ 上的椭圆曲线 $E: x^3 + 2x + 3 = y^2$ 上有点 $P(2, 7), Q(11, 8)$ , 计算 $P+Q$ , $2P$</li>
<li>求域 $F_{16}=F_2[x]/(x^4+x^3+1)$的一个生成元 $g(x)$,并用 $g(x)$ 的幂表示 $F_{16}$ 中的所有非零元</li>
<li>证明有限环的特征一定不为0</li>
</ol>
我们这里再提供一道填空题,一道选择题,以显示这张卷子的**诚意**
<ol>
<li>设 $G$ 是一个群,对于 $\forall a,b \in G$ $a*b=b*a$ 则 $G$ 是 ____</li>
<li>设 $R$ 是一个环,对于 $\forall a,b \in R$ $a+b=b+a$ 则 $R$ 是?
A. 整环 B.交换环 C.含幺环 D.环</li>
</ol>
很大程度上,老师的出题和给分是十分宽容的,请大家好好学习这门课程,**数学并不是妖魔鬼怪!**

View File

@ -0,0 +1,13 @@
---
title: 信息安全数学基础(二)
category:
- 软件工程学院
- 课程评价
tag:
- 信息安全
- 数学基础
- 抽象代数
---
### 这门课是抽象代数,但是并没有涉及到抽象代数真正复杂的部分,较为浅尝辄止,所以课程本身的学习难度并不高。
### 同样地,这门课实际考试不难,老师会捞,请大家不要害怕。

View File

@ -0,0 +1,18 @@
---
title: 信息安全数学导论
category:
- 软件工程学院
- 课程资料
tag:
- 信息安全
- 数学
- 专业课程
---
# 信息安全数学导论
很简单
## 真题卷
[信息安全数学导论_软件工程学院_2024Fall_期末_A_回忆版.jpg](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E4%BF%A1%E6%81%AF%E5%AE%89%E5%85%A8%E6%95%B0%E5%AD%A6%E5%AF%BC%E8%AE%BA/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E4%BF%A1%E6%81%AF%E5%AE%89%E5%85%A8%E6%95%B0%E5%AD%A6%E5%AF%BC%E8%AE%BA_%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2_2024Fall_%E6%9C%9F%E6%9C%AB_A_%E5%9B%9E%E5%BF%86%E7%89%88.jpg)

View File

@ -0,0 +1,16 @@
---
title: 区块链基础
category:
- 软件工程学院
- 课程资料
tag:
- 区块链
- 分布式系统
- 专业课程
---
# 区块链基础
!!! warning "施工中"
本目录包含区块链基础课程的相关资料。

View File

@ -0,0 +1,37 @@
def calculate_total_bitcoin():
initial_reward = 50.0
halving_interval = 210000
total_btc = 0.0
current_reward = initial_reward
halving_count = 0
while current_reward >= 1e-8:
period_coins = halving_interval * current_reward
total_btc += period_coins
halving_count += 1
current_reward /= 2
print(f"\n最终减半次数: {halving_count}")
print(f"总发行量: {total_btc:,.8f} BTC ≈ {round(total_btc)} BTC")
def estimate_mining_end_year():
start_year = 2009
blocks_per_halving = 210000
block_time_minutes = 10
minutes_per_year = 365 * 24 * 60
blocks_per_year = minutes_per_year / block_time_minutes
years_per_halving = blocks_per_halving / blocks_per_year
halving_count = 0
initial_reward = 50.0
while initial_reward / (2 ** halving_count) >= 1e-8:
halving_count += 1
end_year = start_year + years_per_halving * halving_count
print(f"\n预计全部挖完年份: {end_year:.0f}")
calculate_total_bitcoin()
estimate_mining_end_year()

View File

@ -0,0 +1,4 @@
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}比特币的总量上限计算}{1}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2}比特币的终止时间计算}{1}{}\protected@file@percent }
\gdef \@abspage@last{1}

View File

@ -0,0 +1,442 @@
This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2024) (preloaded format=xelatex 2024.12.12) 18 MAR 2025 13:31
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**c:/Users/USER/Desktop/大三下/区块链基础/作业/第一次作业/10225101408_朱炎_Excercise01
(c:/Users/USER/Desktop/大三下/区块链基础/作业/第一次作业/10225101408_朱炎_Excercise01.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-02-20>
(e:/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(e:/texlive/2024/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
)
\c@part=\count184
\c@section=\count185
\c@subsection=\count186
\c@subsubsection=\count187
\c@paragraph=\count188
\c@subparagraph=\count189
\c@figure=\count190
\c@table=\count191
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
) (e:/texlive/2024/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2023/05/13 v2.17o AMS math features
\@mathmargin=\skip50
For additional information on amsmath, use the `?' option.
(e:/texlive/2024/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2021/08/26 v2.01 AMS text
(e:/texlive/2024/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks17
\ex@=\dimen141
)) (e:/texlive/2024/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
\pmbraise@=\dimen142
) (e:/texlive/2024/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 2022/04/08 v2.04 operator names
)
\inf@bad=\count192
LaTeX Info: Redefining \frac on input line 234.
\uproot@=\count193
\leftroot@=\count194
LaTeX Info: Redefining \overline on input line 399.
LaTeX Info: Redefining \colon on input line 410.
\classnum@=\count195
\DOTSCASE@=\count196
LaTeX Info: Redefining \ldots on input line 496.
LaTeX Info: Redefining \dots on input line 499.
LaTeX Info: Redefining \cdots on input line 620.
\Mathstrutbox@=\box51
\strutbox@=\box52
LaTeX Info: Redefining \big on input line 722.
LaTeX Info: Redefining \Big on input line 723.
LaTeX Info: Redefining \bigg on input line 724.
LaTeX Info: Redefining \Bigg on input line 725.
\big@size=\dimen143
LaTeX Font Info: Redeclaring font encoding OML on input line 743.
LaTeX Font Info: Redeclaring font encoding OMS on input line 744.
\macc@depth=\count197
LaTeX Info: Redefining \bmod on input line 905.
LaTeX Info: Redefining \pmod on input line 910.
LaTeX Info: Redefining \smash on input line 940.
LaTeX Info: Redefining \relbar on input line 970.
LaTeX Info: Redefining \Relbar on input line 971.
\c@MaxMatrixCols=\count198
\dotsspace@=\muskip16
\c@parentequation=\count199
\dspbrk@lvl=\count266
\tag@help=\toks18
\row@=\count267
\column@=\count268
\maxfields@=\count269
\andhelp@=\toks19
\eqnshift@=\dimen144
\alignsep@=\dimen145
\tagshift@=\dimen146
\tagwidth@=\dimen147
\totwidth@=\dimen148
\lineht@=\dimen149
\@envbody=\toks20
\multlinegap=\skip51
\multlinetaggap=\skip52
\mathdisplay@stack=\toks21
LaTeX Info: Redefining \[ on input line 2953.
LaTeX Info: Redefining \] on input line 2954.
) (e:/texlive/2024/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols
(e:/texlive/2024/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info: Redeclaring math symbol \hbar on input line 98.
LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
(Font) U/euf/m/n --> U/euf/b/n on input line 106.
)) (e:/texlive/2024/texmf-dist/tex/latex/amscls/amsthm.sty
Package: amsthm 2020/05/29 v2.20.6
\thm@style=\toks22
\thm@bodyfont=\toks23
\thm@headfont=\toks24
\thm@notefont=\toks25
\thm@headpunct=\toks26
\thm@preskip=\skip53
\thm@postskip=\skip54
\thm@headsep=\skip55
\dth@everypar=\toks27
) (e:/texlive/2024/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2020/01/02 v5.9 Page Geometry
(e:/texlive/2024/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
\KV@toks@=\toks28
) (e:/texlive/2024/texmf-dist/tex/generic/iftex/ifvtex.sty
Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead.
(e:/texlive/2024/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
))
\Gm@cnth=\count270
\Gm@cntv=\count271
\c@Gm@tempcnt=\count272
\Gm@bindingoffset=\dimen150
\Gm@wd@mp=\dimen151
\Gm@odd@mp=\dimen152
\Gm@even@mp=\dimen153
\Gm@layoutwidth=\dimen154
\Gm@layoutheight=\dimen155
\Gm@layouthoffset=\dimen156
\Gm@layoutvoffset=\dimen157
\Gm@dimlist=\toks29
) (e:/texlive/2024/texmf-dist/tex/latex/ctex/ctex.sty (e:/texlive/2024/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2024-02-20 L3 programming layer (loader)
(e:/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
File: l3backend-xetex.def 2024-02-20 L3 backend support: XeTeX
\g__graphics_track_int=\count273
\l__pdf_internal_box=\box53
\g__pdf_backend_object_int=\count274
\g__pdf_backend_annotation_int=\count275
\g__pdf_backend_link_int=\count276
))
Package: ctex 2022/07/14 v2.5.10 Chinese adapter in LaTeX (CTEX)
(e:/texlive/2024/texmf-dist/tex/latex/ctex/ctexhook.sty
Package: ctexhook 2022/07/14 v2.5.10 Document and package hooks (CTEX)
) (e:/texlive/2024/texmf-dist/tex/latex/ctex/ctexpatch.sty
Package: ctexpatch 2022/07/14 v2.5.10 Patching commands (CTEX)
) (e:/texlive/2024/texmf-dist/tex/latex/base/fix-cm.sty
Package: fix-cm 2020/11/24 v1.1t fixes to LaTeX
(e:/texlive/2024/texmf-dist/tex/latex/base/ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding TS1 on input line 47.
))
\l__ctex_tmp_int=\count277
\l__ctex_tmp_box=\box54
\l__ctex_tmp_dim=\dimen158
\g__ctex_section_depth_int=\count278
\g__ctex_font_size_int=\count279
(e:/texlive/2024/texmf-dist/tex/latex/ctex/config/ctexopts.cfg
File: ctexopts.cfg 2022/07/14 v2.5.10 Option configuration file (CTEX)
) (e:/texlive/2024/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def
File: ctex-engine-xetex.def 2022/07/14 v2.5.10 XeLaTeX adapter (CTEX)
(e:/texlive/2024/texmf-dist/tex/xelatex/xecjk/xeCJK.sty
Package: xeCJK 2022/08/05 v3.9.1 Typesetting CJK scripts with XeLaTeX
(e:/texlive/2024/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty (e:/texlive/2024/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate-2023-10-10.sty
Package: xtemplate 2023-10-10 L3 Experimental prototype document functions
\l__xtemplate_tmp_dim=\dimen159
\l__xtemplate_tmp_int=\count280
\l__xtemplate_tmp_muskip=\muskip17
\l__xtemplate_tmp_skip=\skip56
))
\l__xeCJK_tmp_int=\count281
\l__xeCJK_tmp_box=\box55
\l__xeCJK_tmp_dim=\dimen160
\l__xeCJK_tmp_skip=\skip57
\g__xeCJK_space_factor_int=\count282
\l__xeCJK_begin_int=\count283
\l__xeCJK_end_int=\count284
\c__xeCJK_CJK_class_int=\XeTeXcharclass1
\c__xeCJK_FullLeft_class_int=\XeTeXcharclass2
\c__xeCJK_FullRight_class_int=\XeTeXcharclass3
\c__xeCJK_HalfLeft_class_int=\XeTeXcharclass4
\c__xeCJK_HalfRight_class_int=\XeTeXcharclass5
\c__xeCJK_NormalSpace_class_int=\XeTeXcharclass6
\c__xeCJK_CM_class_int=\XeTeXcharclass7
\c__xeCJK_HangulJamo_class_int=\XeTeXcharclass8
\l__xeCJK_last_skip=\skip58
\c__xeCJK_none_node=\count285
\g__xeCJK_node_int=\count286
\c__xeCJK_CJK_node_dim=\dimen161
\c__xeCJK_CJK-space_node_dim=\dimen162
\c__xeCJK_default_node_dim=\dimen163
\c__xeCJK_CJK-widow_node_dim=\dimen164
\c__xeCJK_normalspace_node_dim=\dimen165
\c__xeCJK_default-space_node_skip=\skip59
\l__xeCJK_ccglue_skip=\skip60
\l__xeCJK_ecglue_skip=\skip61
\l__xeCJK_punct_kern_skip=\skip62
\l__xeCJK_indent_box=\box56
\l__xeCJK_last_penalty_int=\count287
\l__xeCJK_last_bound_dim=\dimen166
\l__xeCJK_last_kern_dim=\dimen167
\l__xeCJK_widow_penalty_int=\count288
Package xtemplate Info: Declaring object type 'xeCJK/punctuation' taking 0
(xtemplate) argument(s) on line 2396.
\l__xeCJK_fixed_punct_width_dim=\dimen168
\l__xeCJK_mixed_punct_width_dim=\dimen169
\l__xeCJK_middle_punct_width_dim=\dimen170
\l__xeCJK_fixed_margin_width_dim=\dimen171
\l__xeCJK_mixed_margin_width_dim=\dimen172
\l__xeCJK_middle_margin_width_dim=\dimen173
\l__xeCJK_bound_punct_width_dim=\dimen174
\l__xeCJK_bound_margin_width_dim=\dimen175
\l__xeCJK_margin_minimum_dim=\dimen176
\l__xeCJK_kerning_total_width_dim=\dimen177
\l__xeCJK_same_align_margin_dim=\dimen178
\l__xeCJK_different_align_margin_dim=\dimen179
\l__xeCJK_kerning_margin_width_dim=\dimen180
\l__xeCJK_kerning_margin_minimum_dim=\dimen181
\l__xeCJK_bound_dim=\dimen182
\l__xeCJK_reverse_bound_dim=\dimen183
\l__xeCJK_margin_dim=\dimen184
\l__xeCJK_minimum_bound_dim=\dimen185
\l__xeCJK_kerning_margin_dim=\dimen186
\g__xeCJK_family_int=\count289
\l__xeCJK_fam_int=\count290
\g__xeCJK_fam_allocation_int=\count291
\l__xeCJK_verb_case_int=\count292
\l__xeCJK_verb_exspace_skip=\skip63
(e:/texlive/2024/texmf-dist/tex/latex/fontspec/fontspec.sty (e:/texlive/2024/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
Package: xparse 2024-02-18 L3 Experimental document command parser
)
Package: fontspec 2024/02/13 v2.9a Font selection for XeLaTeX and LuaLaTeX
(e:/texlive/2024/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
Package: fontspec-xetex 2024/02/13 v2.9a Font selection for XeLaTeX and LuaLaTeX
\l__fontspec_script_int=\count293
\l__fontspec_language_int=\count294
\l__fontspec_strnum_int=\count295
\l__fontspec_tmp_int=\count296
\l__fontspec_tmpa_int=\count297
\l__fontspec_tmpb_int=\count298
\l__fontspec_tmpc_int=\count299
\l__fontspec_em_int=\count300
\l__fontspec_emdef_int=\count301
\l__fontspec_strong_int=\count302
\l__fontspec_strongdef_int=\count303
\l__fontspec_tmpa_dim=\dimen187
\l__fontspec_tmpb_dim=\dimen188
\l__fontspec_tmpc_dim=\dimen189
(e:/texlive/2024/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
) (e:/texlive/2024/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (e:/texlive/2024/texmf-dist/tex/xelatex/xecjk/xeCJK.cfg
File: xeCJK.cfg 2022/08/05 v3.9.1 Configuration file for xeCJK package
))
\ccwd=\dimen190
\l__ctex_ccglue_skip=\skip64
)
\l__ctex_ziju_dim=\dimen191
(e:/texlive/2024/texmf-dist/tex/latex/zhnumber/zhnumber.sty
Package: zhnumber 2022/07/14 v3.0 Typesetting numbers with Chinese glyphs
\l__zhnum_scale_int=\count304
\l__zhnum_tmp_int=\count305
(e:/texlive/2024/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg
File: zhnumber-utf8.cfg 2022/07/14 v3.0 Chinese numerals with UTF8 encoding
)) (e:/texlive/2024/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def
File: ctex-scheme-chinese.def 2022/07/14 v2.5.10 Chinese scheme for generic (CTEX)
(e:/texlive/2024/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg
File: ctex-name-utf8.cfg 2022/07/14 v2.5.10 Caption with encoding UTF-8 (CTEX)
)) (e:/texlive/2024/texmf-dist/tex/latex/tools/indentfirst.sty
Package: indentfirst 2023/07/02 v1.03 Indent first paragraph (DPC)
) (e:/texlive/2024/texmf-dist/tex/latex/ctex/ctex-c5size.clo
File: ctex-c5size.clo 2022/07/14 v2.5.10 c5size option (CTEX)
) (e:/texlive/2024/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def
File: ctex-fontset-windows.def 2022/07/14 v2.5.10 Windows fonts definition (CTEX)
Package fontspec Info: Could not resolve font "KaiTi/B" (it probably doesn't
(fontspec) exist).
Package fontspec Info: Could not resolve font "SimHei/I" (it probably doesn't
(fontspec) exist).
Package fontspec Info: Could not resolve font "SimSun/BI" (it probably doesn't
(fontspec) exist).
Package fontspec Info: Font family 'SimSun(0)' created for font 'SimSun' with
(fontspec) options
(fontspec) [Script={CJK},BoldFont={SimHei},ItalicFont={KaiTi}].
(fontspec)
(fontspec) This font family consists of the following NFSS
(fontspec) series/shapes:
(fontspec)
(fontspec) - 'normal' (m/n) with NFSS spec.:
(fontspec) <->"SimSun/OT:script=hani;language=dflt;"
(fontspec) - 'small caps' (m/sc) with NFSS spec.:
(fontspec) - 'bold' (b/n) with NFSS spec.:
(fontspec) <->"SimHei/OT:script=hani;language=dflt;"
(fontspec) - 'bold small caps' (b/sc) with NFSS spec.:
(fontspec) - 'italic' (m/it) with NFSS spec.:
(fontspec) <->"KaiTi/OT:script=hani;language=dflt;"
(fontspec) - 'italic small caps' (m/scit) with NFSS spec.:
)) (e:/texlive/2024/texmf-dist/tex/latex/ctex/config/ctex.cfg
File: ctex.cfg 2022/07/14 v2.5.10 Configuration file (CTEX)
) (./10225101408_朱炎_Excercise01.aux)
\openout1 = `10225101408_朱炎_Excercise01.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
*geometry* verbose mode - [ preamble ] result:
* driver: xetex
* paper: <default>
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes:
* h-part:(L,W,R)=(72.26999pt, 469.75502pt, 72.26999pt)
* v-part:(T,H,B)=(72.26999pt, 650.43001pt, 72.26999pt)
* \paperwidth=614.295pt
* \paperheight=794.96999pt
* \textwidth=469.75502pt
* \textheight=650.43001pt
* \oddsidemargin=0.0pt
* \evensidemargin=0.0pt
* \topmargin=-37.0pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=10.0pt
* \footskip=30.0pt
* \marginparwidth=65.0pt
* \marginparsep=11.0pt
* \columnsep=10.0pt
* \skip\footins=9.0pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid
(fontspec) this).
\symlegacymaths=\mathgroup6
LaTeX Font Info: Overwriting symbol font `legacymaths' in version `bold'
(Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 11.
LaTeX Font Info: Redeclaring math accent \acute on input line 11.
LaTeX Font Info: Redeclaring math accent \grave on input line 11.
LaTeX Font Info: Redeclaring math accent \ddot on input line 11.
LaTeX Font Info: Redeclaring math accent \tilde on input line 11.
LaTeX Font Info: Redeclaring math accent \bar on input line 11.
LaTeX Font Info: Redeclaring math accent \breve on input line 11.
LaTeX Font Info: Redeclaring math accent \check on input line 11.
LaTeX Font Info: Redeclaring math accent \hat on input line 11.
LaTeX Font Info: Redeclaring math accent \dot on input line 11.
LaTeX Font Info: Redeclaring math accent \mathring on input line 11.
LaTeX Font Info: Redeclaring math symbol \Gamma on input line 11.
LaTeX Font Info: Redeclaring math symbol \Delta on input line 11.
LaTeX Font Info: Redeclaring math symbol \Theta on input line 11.
LaTeX Font Info: Redeclaring math symbol \Lambda on input line 11.
LaTeX Font Info: Redeclaring math symbol \Xi on input line 11.
LaTeX Font Info: Redeclaring math symbol \Pi on input line 11.
LaTeX Font Info: Redeclaring math symbol \Sigma on input line 11.
LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 11.
LaTeX Font Info: Redeclaring math symbol \Phi on input line 11.
LaTeX Font Info: Redeclaring math symbol \Psi on input line 11.
LaTeX Font Info: Redeclaring math symbol \Omega on input line 11.
LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 11.
LaTeX Font Info: Redeclaring symbol font `operators' on input line 11.
LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font
(Font) `operators' in the math version `normal' on input line 11.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> TU/lmr/m/n on input line 11.
LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font
(Font) `operators' in the math version `bold' on input line 11.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmr/bx/n --> TU/lmr/m/n on input line 11.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) TU/lmr/m/n --> TU/lmr/m/n on input line 11.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal'
(Font) OT1/cmr/m/it --> TU/lmr/m/it on input line 11.
LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal'
(Font) OT1/cmr/bx/n --> TU/lmr/b/n on input line 11.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal'
(Font) OT1/cmss/m/n --> TU/lmss/m/n on input line 11.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal'
(Font) OT1/cmtt/m/n --> TU/lmtt/m/n on input line 11.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) TU/lmr/m/n --> TU/lmr/b/n on input line 11.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'
(Font) OT1/cmr/bx/it --> TU/lmr/b/it on input line 11.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> TU/lmss/b/n on input line 11.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> TU/lmtt/b/n on input line 11.
LaTeX Font Info: Trying to load font information for U+msa on input line 13.
(e:/texlive/2024/texmf-dist/tex/latex/amsfonts/umsa.fd
File: umsa.fd 2013/01/14 v3.01 AMS symbols A
)
LaTeX Font Info: Trying to load font information for U+msb on input line 13.
(e:/texlive/2024/texmf-dist/tex/latex/amsfonts/umsb.fd
File: umsb.fd 2013/01/14 v3.01 AMS symbols B
) [1
] (./10225101408_朱炎_Excercise01.aux)
***********
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2022/07/14>
***********
)
Here is how much of TeX's memory you used:
8158 strings out of 474773
217885 string characters out of 5761288
1928842 words of memory out of 5000000
30207 multiletter control sequences out of 15000+600000
567395 words of font info for 93 fonts, out of 8000000 for 9000
1348 hyphenation exceptions out of 8191
93i,6n,97p,423b,270s stack positions out of 10000i,1000n,20000p,200000b,200000s
Output written on 10225101408_朱炎_Excercise01.pdf (1 page).

View File

@ -0,0 +1,34 @@
\documentclass{article}
\usepackage{amsmath, amssymb, amsthm}
\usepackage{geometry}
\usepackage{ctex}
\geometry{margin=1in}
\title{区块链基础第一次作业}
\author{10225101408 朱炎}
\date{2025.3.18}
\begin{document}
\maketitle
比特币总量上限为2100万个且预计在2140年基本挖完的核心机制源于其区块奖励减半规则。
\section{比特币的总量上限计算}
比特币的初始奖励为50个比特币每210000个区块奖励减半一次第一个周期内产生$50 \times 210000 = 10500000$个比特币。
则我们可以通过以下等比数列求和公式计算比特币总量上限:
\begin{equation}
10500000 \times \sum_{n=0}^{\infty} (\frac{1}{2})^n = 10500000 \times \frac{1}{1 - \frac{1}{2}} = 21000000 \text{BTC}
\end{equation}
即2100万个比特币。
\section{比特币的终止时间计算}
比特币每210000个区块奖励减半一次每个区块的产生时间约为10分钟故210000个区块的生成耗时约为210000*10分钟 = 35000小时 = 1458天 = 4年。
比特币于2009年1月3日开始发行到2140年约为131年即32个周期。32个周期后比特币的奖励为
\begin{equation}
50 \times 2^{-32} \approx 1.16 \times 10^{-8} \text{BTC}
\end{equation}
而比特币的最小单位1聪Satoshi$10^{-8}$比特币故比特币的奖励将约等于0挖矿终止。
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -0,0 +1,28 @@
class Blockchain:
def __init__(self, genesis_recipient=None, genesis_amount=0):
self.utxo = {} # 格式: {tx_id: (receiver, amount)}
# 生成创世交易(仅第一次初始化时调用)
if genesis_recipient is not None and genesis_amount > 0:
self.add_genesis(genesis_recipient, genesis_amount)
def add_genesis(self, receiver, amount):
# 添加创世区块
genesis_tx_id = "genesis_tx_0x1"
self.utxo[genesis_tx_id] = (receiver, amount)
def validate_transaction(self, tx):
# 验签
if not tx.is_valid():
return False
# 验证发送方余额
sender_balance = sum(amt for (addr, amt) in self.utxo.values() if addr == tx.sender)
return sender_balance >= tx.amount
def add_transaction(self, tx):
if self.validate_transaction(tx):
tx_id = hash(tx) # 简化交易ID生成
self.utxo[tx_id] = (tx.receiver, tx.amount)
return True
return False

View File

@ -0,0 +1,75 @@
from py_ecc.bls12_381 import G1, G2, add, multiply, is_inf, pairing, curve_order, field_modulus
from py_ecc.fields import bls12_381_FQ as FQ
from functools import reduce
import hashlib
def hash_to_g1(message: bytes):
G1_cofactor = 0x396c8c005555e1568c00aaab0000aaab
hashed = int.from_bytes(hashlib.sha256(message).digest(), 'big')
x_val = hashed % field_modulus
while True:
y_squared = (pow(x_val, 3, field_modulus) + 4) % field_modulus
y_val = pow(y_squared, (field_modulus + 1) // 4, field_modulus)
if pow(y_val, 2, field_modulus) == y_squared:
x = FQ(x_val)
y = FQ(y_val)
point = (x, y)
point = multiply(point, G1_cofactor)
if not is_inf(point):
return point
x_val = (x_val + 1) % field_modulus
import random
def generate_private_key():
return random.randint(1, curve_order - 1)
def generate_public_key(sk):
return multiply(G2, sk)
def sign(sk, message: bytes):
H_m = hash_to_g1(message)
return multiply(H_m, sk)
def verify(pk, message: bytes, signature) -> bool:
H_m = hash_to_g1(message)
left = pairing(G2, signature)
right = pairing(pk, H_m)
return left == right
def aggregate_signatures(signatures: list) -> tuple:
return reduce(add, signatures)
def aggregate_verify(pubkeys: list, messages: list, aggregate_sig: tuple) -> bool:
if len(pubkeys) != len(messages):
return False
product = 1
for pk, msg in zip(pubkeys, messages):
H_m = hash_to_g1(msg)
product *= pairing(pk, H_m)
left = pairing(G2, aggregate_sig)
return left == product
if __name__ == "__main__":
# 单个签名的情况
sk = generate_private_key()
pk = generate_public_key(sk)
message = b"Hello, BLS!"
signature = sign(sk, message)
print("验证结果:", verify(pk, message, signature))
print("错误消息验证:", verify(pk, b"Wrong message", signature))
# 多个签名的情况
num_signers = 3
sks = [generate_private_key() for _ in range(num_signers)]
pks = [generate_public_key(sk) for sk in sks]
messages = [f"Message {i}".encode() for i in range(num_signers)]
signatures = [sign(sk, msg) for sk, msg in zip(sks, messages)]
agg_sig = aggregate_signatures(signatures)
valid = aggregate_verify(pks, messages, agg_sig)
print("聚合验证结果:", valid)
corrupted_messages = [msg + b"no" for msg in messages]
invalid = aggregate_verify(pks, corrupted_messages, agg_sig)
print("篡改消息后的验证结果:", invalid)

View File

@ -0,0 +1,39 @@
from wallet import Wallet
from transaction import Transaction
from blockchain import Blockchain
from bls import aggregate_signatures, aggregate_verify
alice = Wallet()
bob = Wallet()
blockchain = Blockchain( # 给Alice初始10个代币
genesis_recipient=alice.get_address(),
genesis_amount=10
)
alice_balance = sum(
amt for (addr, amt) in blockchain.utxo.values()
if addr == alice.get_address()
)
print("Alice 的初始余额:", alice_balance)
tx1 = Transaction(alice.get_address(), bob.get_address(), 10)
tx1.sign(alice)
print("交易1验证结果:", tx1.is_valid())
if blockchain.add_transaction(tx1):
print("交易1成功上链")
# Bob向Alice转账15个代币失败余额不足
tx2 = Transaction(bob.get_address(), alice.get_address(), 15)
tx2.sign(bob)
print("交易2验证结果:", tx2.is_valid()) # True但余额不足
print("交易2上链结果:", blockchain.add_transaction(tx2)) # False
# 聚合签名
carol = Wallet()
tx3_data = b"Multisig_Transaction"
signature_alice = alice.sign_transaction(tx3_data)
signature_carol = carol.sign_transaction(tx3_data)
agg_sig = aggregate_signatures([signature_alice, signature_carol])
valid = aggregate_verify([alice.pk, carol.pk], [tx3_data, tx3_data], agg_sig)
print("聚合签名验证结果:", valid) # True

View File

@ -0,0 +1,17 @@
class Transaction:
def __init__(self, sender, receiver, amount, signature=None):
self.sender = sender # 公钥
self.receiver = receiver # 地址
self.amount = amount # 金额
self.signature = signature
def serialize(self) -> bytes:
# 序列化交易数据用于签名
return f"{self.sender}{self.receiver}{self.amount}".encode()
def sign(self, wallet):
self.signature = wallet.sign_transaction(self.serialize())
def is_valid(self) -> bool:
from bls import verify
return verify(self.sender, self.serialize(), self.signature)

View File

@ -0,0 +1,13 @@
from bls import generate_private_key, generate_public_key
class Wallet:
def __init__(self):
self.sk = generate_private_key()
self.pk = generate_public_key(self.sk)
def get_address(self):
return self.pk # 公钥作为地址
def sign_transaction(self, tx_data: bytes):
from bls import sign
return sign(self.sk, tx_data)

View File

@ -0,0 +1,61 @@
# 2025春季学期区块链基础期末考试试卷回忆版
## 选择题
选择题大多较简单,只有一个比较神秘:
智能合约的提出者是谁:
A.
B.Nakamoto Satoshi
C.
D.
我只记得B选项是中本聪ABD是什么没有印象
## 填空题
1.区块链的三个核心技术是:\_\_\_\_\_\_\_\_\_\_\_\_
2.\_\_\_\_之于区块链就如同SQL之于数据库
3.基本数据处理方式包括:数据复制与\_\_\_\_其中数据复制包括主从复制\_\_\_\_\_\_\_\_
4.一致性条件包括:可终止性,\_\_\_\_\_\_\_\_
应该还有一道只有一空的题目,但是没记住
## 简答题
1.简述中心化系统与去中心化系统的优缺点。
2.简述区块链七层结构以及各层的功能。
3.简述中心化p2p网络与纯分布式p2p网络的特征在此基础上简述混合式p2p网络与结构化p2p网络的特征。
4.简述Algorand算法的内容和流程。
5.简述PoW与PoS的优缺点。
6.Solidity中pass by value与pass by reference的概述和区别。
7.解释强一致性、弱一致性、最终一致性、因果一致性。
8.简述蚂蚁链上智能合约的执行流程。
## 编程题
1.编写应用程序小例子基本功能应包括对区块链状态变量进行Get和Set操作即读写操作
2.以实际的应用场景比如停车场管理系统、员工人事管理系统、学生花名册管理系统为例对应用场景的需求进行描述并实现包含数组、结构体、映射3种类型变量的嵌套定义、变量的读、写操作
相关要求:
1、养成良好的代码编写习惯包括但不限于智能合约、函数、变量等的命名规
范、代码缩进、代码注释等;
2、养成良好的软件程序文档编写规范及习惯比如代码的设计目的预期的运
行结果,调试过程(包括失败的过程及原因)等;
老师在考前明示了编程题会从Solidity编程作业里出这里直接套用即可

View File

@ -0,0 +1,21 @@
---
title: 密码分析学
category:
- 软件工程学院
- 课程评价
tag:
- 密码学
- 密码分析
- 专业课程
---
# 课程评价
## 2024Fall
### 王高丽
- 老师人很好(真的很好喵,推荐选王老师的课喵( \*\*\^w\^\*\*
- 若人少, 会变成五级制, 建议无脑选
- 若对各种密码分析的攻击方法感兴趣, 推荐选
- 平时事情少, 课堂氛围放松
- 本年度的考核方式是写一份学习报告, 内容不限
- 可参考 [课程仓库](https://github.com/KirisameVanilla/Cryptanalysis_of_cryptography.git)

View File

@ -0,0 +1,39 @@
# 2025春季学期并行程序设计期末考试试卷回忆版
## 选择题
选择题都较简单,不做记录。
## 填空题
1.均匀储存访问模型中,处理器访问储存器的时间\_\_\_\_物理储存器被所有处理器\_\_\_\_每台处理器带\_\_\_\_缓存。
2.MPI的点到点通信模式包括标准通信\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_。
3.四种循环转换包括:循环交换,循环分块,\_\_\_\_\_\_\_\_。
4.MPI集合通信的三个主要功能是通信\_\_\_\_\_\_\_\_。
## 简答题
1.简述OpenMP的Fork-Join工作模式。
2.分布式内存系统与共享内存系统的核心区别是什么?
3.MPI阻塞接收与非阻塞接收的区别是什么
4.临界区嵌套会导致什么问题?如何解决?
5.简述信号量Semaphore实现Barrier的方法。
## 编程题
1.哲学家用餐问题,如何用互斥锁与信号量解决哲学家用餐问题,保证不会出现死锁和饥饿?(注:此题只需写伪代码,不需要严格的参照接口定义)
2.多个进程分别拥有私有的数组,现在要计算各个进程中所有数组元素的平均值。
使用MPI_Allreduce实现函数void Global_average(double loc_arr[], int loc_n, MPI_Comm comm, double* global_avg)先计算局部总和与元素总数再归约计算全局总和与总元素数最后算平均值运行结束后所有进程中的global_avg都应该储存相同的结果即全局平均值。
其中loc_arr[]为每个进程拥有的局部数组loc_n为局部数组的大小comm为通讯器global_avg储存最终结果
本题下方提供了会用到的MPI函数定义以供查阅不需要特意背诵接口。不过奇怪的是考试中唯独没有提供MPI_Allreduce的定义比较诡异

View File

@ -0,0 +1,21 @@
Networked systems can be represented using graphs.
Tenants who use the systems in which their resources are
hosted need to check with the provider of the resources that
their resources are properly connected and that
their resources are properly separated from the resources of
other tenants. Since providers manage systems for
multiple tenants, a method to prove the connectivity and isolation
without revealing the network topology is required. As a solution,
an efficient zero-knowledge proof system of graph signatures
using a bilinear-map accumulator has been proposed, where the
verification time and the size of the proof data do not depend on
the number of graph vertexes and edges. However, this system
has two problems. First, since the proof does not include labels,
it is not possible to prove the connectivity considering network
bandwidth and cost. Second, since it assumes undirected graphs,
it cannot handle applications on directed graphs such as network
flows. In this study, we extend the previous system and propose
a zero-knowledge proof system of the connectivity for directed
graphs where each edge has labels. We implemented our system
on a PC using a pairng library and evaluate it by measuring the
processing times.

View File

@ -0,0 +1,21 @@
Networked systems can be represented using graphs.
Tenants who use the systems in which their resources are
hosted need to check with the provider of the resources that
their resources are properly connected and that
their resources are properly separated from the resources of
other tenants. Since providers manage systems for
multiple tenants, a method to prove the connectivity and isolation
without revealing the network topology is required. As a solution,
an efficient zero-knowledge proof system of graph signatures
using a bilinear-map accumulator has been proposed, where the
verification time and the size of the proof data do not depend on
the number of graph vertexes and edges. However, this system
has two problems. First, since the proof does not include labels,
it is not possible to prove the connectivity considering network
bandwidth and cost. Second, since it assumes undirected graphs,
it cannot handle applications on directed graphs such as network
flows. In this study, we extend the previous system and propose
a zero-knowledge proof system of the connectivity for directed
graphs where each edge has labels. We implemented our system
on a PC using a pairng library and evaluate it by measuring the
processing times.

View File

@ -0,0 +1,21 @@
Networked systems can be represented using graphs.
Tenants who use the systems in which their resources are
hosted need to check with the provider of the resources that
their resources are properly connected and that
their resources are properly separated from the resources of
other tenants. Since providers manage systems for
multiple tenants, a method to prove the connectivity and isolation
without revealing the network topology is required. As a solution,
an efficient zero-knowledge proof system of graph signatures
using a bilinear-map accumulator has been proposed, where the
verification time and the size of the proof data do not depend on
the number of graph vertexes and edges. However, this system
has two problems. First, since the proof does not include labels,
it is not possible to prove the connectivity considering network
bandwidth and cost. Second, since it assumes undirected graphs,
it cannot handle applications on directed graphs such as network
flows. In this study, we extend the previous system and propose
a zero-knowledge proof system of the connectivity for directed
graphs where each edge has labels. We implemented our system
on a PC using a pairng library and evaluate it by measuring the
processing times.

View File

@ -0,0 +1,21 @@
Networked systems can be represented using graphs.
Tenants who use the systems in which their resources are
hosted need to check with the provider of the resources that
their resources are properly connected and that
their resources are properly separated from the resources of
other tenants. Since providers manage systems for
multiple tenants, a method to prove the connectivity and isolation
without revealing the network topology is required. As a solution,
an efficient zero-knowledge proof system of graph signatures
using a bilinear-map accumulator has been proposed, where the
verification time and the size of the proof data do not depend on
the number of graph vertexes and edges. However, this system
has two problems. First, since the proof does not include labels,
it is not possible to prove the connectivity considering network
bandwidth and cost. Second, since it assumes undirected graphs,
it cannot handle applications on directed graphs such as network
flows. In this study, we extend the previous system and propose
a zero-knowledge proof system of the connectivity for directed
graphs where each edge has labels. We implemented our system
on a PC using a pairng library and evaluate it by measuring the
processing times.

View File

@ -0,0 +1,111 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <queue>
#include <omp.h>
#include <chrono>
#include <thread>
std::queue<std::string> shared_queue;
int producers_done = 0;
omp_lock_t queue_lock;
omp_lock_t output_lock;
int n;
void producer(int file_index, const char *filename)
{
std::ifstream file(filename);
if (!file.is_open())
{
#pragma omp critical
std::cerr << "Error opening file: " << filename << std::endl;
return;
}
std::string line;
while (std::getline(file, line))
{
omp_set_lock(&queue_lock);
shared_queue.push(line);
omp_unset_lock(&queue_lock);
}
omp_set_lock(&queue_lock);
producers_done++;
omp_unset_lock(&queue_lock);
}
void consumer()
{
while (true)
{
std::string line;
bool should_exit = false;
omp_set_lock(&queue_lock);
if (!shared_queue.empty())
{
line = shared_queue.front();
shared_queue.pop();
omp_unset_lock(&queue_lock);
std::istringstream iss(line);
std::string word;
while (iss >> word)
{
omp_set_lock(&output_lock);
std::cout << word << std::endl;
omp_unset_lock(&output_lock);
}
}
else
{
if (producers_done == n)
should_exit = true;
omp_unset_lock(&queue_lock);
if (should_exit)
break;
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
}
}
int main(int argc, char *argv[])
{
if (argc < 3)
{
std::cerr << "Usage: " << argv[0] << " n file1 file2 ... filen" << std::endl;
return 1;
}
n = std::stoi(argv[1]);
if (argc != n + 2)
{
std::cerr << "Expected " << n << " files, got " << (argc - 2) << std::endl;
return 1;
}
omp_init_lock(&queue_lock);
omp_init_lock(&output_lock);
#pragma omp parallel num_threads(2 * n)
{
int tid = omp_get_thread_num();
if (tid < n)
{
producer(tid, argv[2 + tid]);
}
else
{
consumer();
}
}
omp_destroy_lock(&queue_lock);
omp_destroy_lock(&output_lock);
std::cout << std::endl
<< "All producers and consumers have finished." << std::endl;
return 0;
}
// g++ -o producer_consumer -fopenmp producer_consumer.cpp -std=c++11
// .\producer_consumer 4 1.txt 2.txt 3.txt 4.txt

View File

@ -0,0 +1 @@
请在本目录下,在终端输入 .\producer_consumer 4 1.txt 2.txt 3.txt 4.txt 以运行程序

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,162 @@
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
int compare(const void *a, const void *b)
{
return (*(int *)a - *(int *)b);
}
void merge(int *a, int *b, int *merged, int size)
{
int i = 0, j = 0, k = 0;
while (i < size && j < size)
{
if (a[i] < b[j])
{
merged[k++] = a[i++];
}
else
{
merged[k++] = b[j++];
}
}
while (i < size)
merged[k++] = a[i++];
while (j < size)
merged[k++] = b[j++];
}
int main(int argc, char **argv)
{
MPI_Init(&argc, &argv);
int my_rank, comm_sz;
MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
MPI_Comm_size(MPI_COMM_WORLD, &comm_sz);
const int LOCAL_SIZE = 1250; // 共排序10000个元素用8个进程每个进程1250个元素
int *full_data = NULL;
if (my_rank == 0)
{
FILE *fp = fopen("input.txt", "r");
if (fp == NULL)
{
fprintf(stderr, "Failed to open input file\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
int total_size = comm_sz * LOCAL_SIZE;
full_data = malloc(total_size * sizeof(int));
for (int i = 0; i < total_size; i++)
{
if (fscanf(fp, "%d", &full_data[i]) != 1)
{
fprintf(stderr, "Invalid input format\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
}
fclose(fp);
}
int *local_data = malloc(LOCAL_SIZE * sizeof(int));
if (local_data == NULL)
{
fprintf(stderr, "Memory allocation failed!\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
MPI_Scatter(full_data, LOCAL_SIZE, MPI_INT,
local_data, LOCAL_SIZE, MPI_INT,
0, MPI_COMM_WORLD);
// 本地排序
qsort(local_data, LOCAL_SIZE, sizeof(int), compare);
// 奇偶阶段排序
for (int phase = 0; phase < comm_sz; phase++)
{
int partner;
// 计算partner
if (phase % 2 == 0)
{
partner = my_rank + 1;
}
else
{
partner = my_rank - 1;
}
// 检查partner是否有效
if (partner < 0 || partner >= comm_sz)
{
continue;
}
// 准备发送和接收缓冲区
int *received_data = malloc(LOCAL_SIZE * sizeof(int));
int *merged_data = malloc(2 * LOCAL_SIZE * sizeof(int));
// 使用阻塞式通信交换数据
MPI_Sendrecv(local_data, LOCAL_SIZE, MPI_INT, partner, 0,
received_data, LOCAL_SIZE, MPI_INT, partner, 0,
MPI_COMM_WORLD, MPI_STATUS_IGNORE);
// 合并两个有序数组
merge(local_data, received_data, merged_data, LOCAL_SIZE);
// 保留前一半或后一半
if (my_rank < partner)
{
// 保留较小的一半
for (int i = 0; i < LOCAL_SIZE; i++)
{
local_data[i] = merged_data[i];
}
}
else
{
// 保留较大的一半
for (int i = 0; i < LOCAL_SIZE; i++)
{
local_data[i] = merged_data[LOCAL_SIZE + i];
}
}
free(received_data);
free(merged_data);
}
// 排序完成后收集结果到0号进程
int *global_data = NULL;
if (my_rank == 0)
{
global_data = malloc(comm_sz * LOCAL_SIZE * sizeof(int));
}
MPI_Gather(local_data, LOCAL_SIZE, MPI_INT,
global_data, LOCAL_SIZE, MPI_INT,
0, MPI_COMM_WORLD);
if (my_rank == 0)
{
FILE *fout = fopen("output.txt", "w");
if (fout == NULL)
{
fprintf(stderr, "Failed to open output file\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
for (int i = 0; i < comm_sz * LOCAL_SIZE; i++)
{
fprintf(fout, "%d ", global_data[i]);
}
fprintf(fout, "\n");
fclose(fout);
}
free(local_data);
free(full_data);
free(global_data);
MPI_Finalize();
return 0;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,7 @@
# 作业说明
input.txt文件为无序的10000个数字输入到0号进程再分配到8个进程各排序1250个数字最后合并到0号进程输出到output.txt中
本目录下命令行运行:
1.mpicc mpi.c -o mpi
2.mpirun -np 8 ./mpi

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -0,0 +1,39 @@
# 2025春季学期并行程序设计期末考试试卷回忆版
## 选择题
选择题都较简单,不做记录。
## 填空题
1.均匀储存访问模型中,处理器访问储存器的时间\_\_\_\_物理储存器被所有处理器\_\_\_\_每台处理器带\_\_\_\_缓存。
2.MPI的点到点通信模式包括标准通信\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_。
3.四种循环转换包括:循环交换,循环分块,\_\_\_\_\_\_\_\_。
4.MPI集合通信的三个主要功能是通信\_\_\_\_\_\_\_\_。
## 简答题
1.简述OpenMP的Fork-Join工作模式。
2.分布式内存系统与共享内存系统的核心区别是什么?
3.MPI阻塞接收与非阻塞接收的区别是什么
4.临界区嵌套会导致什么问题?如何解决?
5.简述信号量Semaphore实现Barrier的方法。
## 编程题
1.哲学家用餐问题,如何用互斥锁与信号量解决哲学家用餐问题,保证不会出现死锁和饥饿?(注:此题只需写伪代码,不需要严格的参照接口定义)
2.多个进程分别拥有私有的数组,现在要计算各个进程中所有数组元素的平均值。
使用MPI_Allreduce实现函数void Global_average(double loc_arr[], int loc_n, MPI_Comm comm, double* global_avg)先计算局部总和与元素总数再归约计算全局总和与总元素数最后算平均值运行结束后所有进程中的global_avg都应该储存相同的结果即全局平均值。
其中loc_arr[]为每个进程拥有的局部数组loc_n为局部数组的大小comm为通讯器global_avg储存最终结果
本题下方提供了会用到的MPI函数定义以供查阅不需要特意背诵接口。不过奇怪的是考试中唯独没有提供MPI_Allreduce的定义比较诡异

View File

@ -0,0 +1,13 @@
---
title: 信息安全数学基础(二)
category:
- 软件工程学院
- 课程评价
tag:
- 信息安全
- 数学基础
- 抽象代数
---
### 这门课是抽象代数,但是并没有涉及到抽象代数真正复杂的部分,较为浅尝辄止,所以课程本身的学习难度并不高。
### 同样地,这门课实际考试不难,老师会捞,请大家不要害怕。

View File

@ -0,0 +1,29 @@
---
title: 形式语言与自动机理论期末试卷
category:
- 软件工程学院
- 期末试卷
tag:
- 形式语言
- 自动机理论
- 期末考试
---
# 试卷
## 一、问答题
1.有限状态自动机有哪些分类?它们之间有什么联系与区别?
2.FSA有限状态自动机、DPDA、NPDA的表达能力有什么区别
3.下推自动机的两种接收方式是什么?它们是否等价?
4.图灵机停机问题和判定性问题是什么?请简述
## 二、构造题
1.考虑下述正则表达式 $(a+b)^\*ab^\*$ ,请将其先转化为 $\epsilon-NFA$再转化为DFA并将得到的DFA做最小化
2.构造一个图灵机使得它接受a与b的个数相同而且a的数量与b的数量均为3的倍数的串提示可以采用带状态的图灵机拓展并给出abbaba的接受过程
3.这一题考的是给定一个PDA构造出对应的CFL并将该CFL转化为乔姆斯基范式。原题的转移函数没复现出来大家可以参照课件中例题难度差不多
4.证明: $L = \\{a^ib^jc^k|k=min(i,j) \\}$ 不是上下文无关语言
5.考虑下述语法 $G$ $S\rightarrow SS|aSa|bSb|aa|bb$
(1). 证明该语法有二义性
(2). 证明该语法产生的语言有固有二义性

View File

@ -0,0 +1,19 @@
---
title: 数字逻辑
category:
- 软件工程学院
- 课程资料
tag:
- 数字逻辑
- 硬件基础
---
# 数字逻辑
!!! warning "施工中"
## 真题卷
[数字逻辑_软件工程学院_2024Fall_期中.pdf](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E6%95%B0%E5%AD%97%E9%80%BB%E8%BE%91/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E6%95%B0%E5%AD%97%E9%80%BB%E8%BE%91_%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2_2024Fall_%E6%9C%9F%E4%B8%AD.pdf)
[数字逻辑_软件工程学院_2024Fall_期中_含答案.pdf](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E6%95%B0%E5%AD%97%E9%80%BB%E8%BE%91/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E6%95%B0%E5%AD%97%E9%80%BB%E8%BE%91_%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2_2024Fall_%E6%9C%9F%E4%B8%AD_%E5%90%AB%E7%AD%94%E6%A1%88.pdf)

View File

@ -0,0 +1,25 @@
---
title: 数据结构与算法
category:
- 软件工程学院
- 课程资料
tag:
- 数据结构
- 算法
- 核心课程
---
# 数据结构与算法
!!! warning "施工中"
???+ info
该课程由wlp, by, dyg三位老师教授, 三位老师的教学班期末考试相同, 平时作业与课程要求均有差别.
其中dyg老师的要求同另外两位老师相比有**较大差别**.
## 真题卷
[数据结构与算法_软件工程学院_2025Spring_期中_A_dyg.pdf](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95_%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2_2025Spring_%E6%9C%9F%E4%B8%AD_A_dyg.pdf)

View File

@ -0,0 +1,24 @@
---
title: 数据结构与算法实践
category:
- 软件工程学院
- 课程资料
tag:
- 数据结构
- 算法
- 实践课程
---
# 数据结构与算法实践
!!! warning "施工中"
???+ info
该课程由wlp, by, dyg三位老师教授, 三位老师的平时课程内容与考核方式**均不相同**.
## dyg
[dyg数据结构与算法实践课VOJ2025Spring答案.mdx](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95%E5%AE%9E%E8%B7%B5/dyg/dyg%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95%E5%AE%9E%E8%B7%B5%E8%AF%BEVOJ2025Spring%E7%AD%94%E6%A1%88.mdx)
[dyg数据结构与算法实践课VOJ2025Spring答案.pdf](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95%E5%AE%9E%E8%B7%B5/dyg/dyg%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E4%B8%8E%E7%AE%97%E6%B3%95%E5%AE%9E%E8%B7%B5%E8%AF%BEVOJ2025Spring%E7%AD%94%E6%A1%88.pdf)

View File

@ -0,0 +1,13 @@
---
title: 信息安全数学基础(二)
category:
- 软件工程学院
- 课程评价
tag:
- 信息安全
- 数学基础
- 抽象代数
---
- 这门课是抽象代数,但是并没有涉及到抽象代数真正复杂的部分,较为浅尝辄止,所以课程本身的学习难度并不高。
- 同样地,这门课实际考试不难,老师会捞,请大家不要害怕。

View File

@ -0,0 +1,5 @@
作业为本人作业,仅供参考,不代表标准答案。
第二次作业由于本人能力所限,未能完成,因故缺失。
第六次作业由于为选做,本人因忙于期末,未能完成,因故缺失。

View File

@ -0,0 +1,13 @@
---
title: 程序设计基础
category:
- 软件工程学院
- 课程资料
tag:
- 程序设计
- 基础课程
---
# 程序设计基础
!!! warning "施工中"

View File

@ -0,0 +1,27 @@
---
title: 线性代数
category:
- 软件工程学院
- 课程资料
tag:
- 线性代数
- 基础数学
---
# 线性代数
!!! warning "施工中"
## 真题卷
???+ note
2023Fall 与 2024Fall 的《线性代数计算机拔尖基地》由btm老师授课.
因此可以同时参考[数据科学与工程-线性代数(计算机拔尖基地)](../%E6%95%B0%E6%8D%AE%E7%A7%91%E5%AD%A6%E4%B8%8E%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0%EF%BC%88%E8%AE%A1%E7%AE%97%E6%9C%BA%E6%8B%94%E5%B0%96%E5%9F%BA%E5%9C%B0%EF%BC%89.md)中 2023Fall 和 2024Fall 的卷子.
[线性代数_软件工程学院_2023Fall_期中_A.pdf](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0_%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2_2023Fall_%E6%9C%9F%E4%B8%AD_A.pdf)
[线性代数_软件工程学院_2024Fall_期中_A.pdf](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0_%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2_2024Fall_%E6%9C%9F%E4%B8%AD_A.pdf)
[线性代数_软件工程学院_2024Fall_期中_A_答案.pdf](../res/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0/%E7%9C%9F%E9%A2%98%E5%8D%B7/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0_%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2_2024Fall_%E6%9C%9F%E4%B8%AD_A_%E7%AD%94%E6%A1%88.pdf)

Some files were not shown because too many files have changed in this diff Show More