算法课作业要求用Latex排版,记录一些相关的Latex排版方法

1. 伪代码输入输出

输入输出采用的\Require\Ensure方法,但是显示的内容也是RequireEnsure,可以在导言区加入下列语句,将其改变成InputOutput

\renewcommand{\algorithmicrequire}{ \textbf{Input:}} %Use Input in the format of Algorithm
\renewcommand{\algorithmicensure}{ \textbf{Output:}} %UseOutput in the format of Algorithm