Skip to content

Commit 358e1bc

Browse files
committed
2 parents 8105e5c + fe37db3 commit 358e1bc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

24spring/middle_homework/document.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The book [1] is a great book. The article [3] is also a classic. View [2] for mo
7373
The book [1] is a great book. The article [3] is also a classic. View [2] for more info.
7474
7575
References:
76-
[1] book: Randal E. Bryant, David R. O'Hallaron, Computer Systems: A Programmer's Perspective, Pearson, 2019
76+
[1] book: Randal E. Bryant, David R. O'Hallaron, Computer Systems, Addison-Wesley, 2015
7777
[2] webpage: PyTorch. Available at https://pytorch.org
7878
[3] article: Marshall Kirk McKusick, William N. Joy, Samuel J. Leffler, Robert S. Fabry, A Fast File System for UNIX, ACM Transactions on Computer Systems, 1984, 2, 3
7979
```
@@ -111,7 +111,7 @@ References:
111111
+ `-c citation_path`,表示文献合集的路径,必须填写。
112112
+ `-o output_path`,表示增加引用列表后的文章的输出路径。这个选项如果没有指定,则输出到标准输出。
113113

114-
如果选项出现冲突、出现未知选项、错误选项等,程序不应该读取任何输入,并 `std::exit(1)`。对于用户任何不合法的输入,例如不合法的文献合集、引用 id 未出现在合集中、合集对象字段不正确等,我们不会读取你输出了什么,但是也需要 `std::exit(1)`。请保证程序的健壮性,助教会想出各种奇怪的 case 作为输入。我们唯一保证的是:
114+
如果选项出现冲突、出现未知选项、错误选项等,程序不应该读取任何输入,并 `std::exit(1)`。对于用户任何不合法的输入,例如不合法的文献合集、引用 id 未出现在合集中、合集对象字段不正确等,我们不会读取你输出了什么,但是也需要 `std::exit(1)`;同时如果输出到文件,则只有当输入完全正确时才创建输出文件。请保证程序的健壮性,助教会想出各种奇怪的 case 作为输入。我们唯一保证的是:
115115

116116
+ 用户输入的文献合集一定是一个合法json,不必担心`parse`出错;
117117
+ 文章中的`[``]`只可能出现在文献的引用中,不会出现在正常的行文里。因此不成对的括号也是需要`std::exit(1)`的。

24spring/middle_homework/faq.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,8 @@ if (!file.is_open()) {
130130
131131
**Q1**: `Article` 和 `Book` 的 `year` 到底是什么类型?
132132
133-
**A1**: `Article` 的 `year` 是 `int` 类型,`Book` 的 `year` 是 `string` 类型。之前的文档可能存在错误,请以最新文档为准。
133+
**A1**: `Article` 的 `year` 是 `int` 类型,`Book` 的 `year` 是 `string` 类型。之前的文档可能存在错误,请以最新文档为准。
134+
135+
**Q2**: `id` 只能是字符串类型的数字吗?
136+
137+
**A2**: 不一定,`id` 可以是任意合法的字符串,不一定是数字。

0 commit comments

Comments
 (0)