在 latex 中编写用于安全分析的伪代码。当我编写 foreach 语句时,它给出错误未定义的控制序列。请帮助我

在 latex 中编写用于安全分析的伪代码。当我编写 foreach 语句时,它给出错误未定义的控制序列。请帮助我
\documentclass[10pt]{article}
\usepackage{fullpage}
\usepackage{times}
\usepackage{fancyhdr,graphicx,amsmath,amssymb}
\usepackage[ruled,vlined]{algorithm2e}
%\usepackage{tikz}
%\include{pythonlisting}

\begin{document}

\begin{algorithm}[h]
\caption{{\bf Context-aware multi-stage health and safety surveillance} \label{Algorithm}}
\KwIn{Path of videos $V$, All stage detection models $\Omega$, stage detector $\phi_o$}
\BlankLine
Load the video ($v$)\;
\BlankLine
\foreach video(i) in videos:

    
\KwOut{List of detected objects $\Lambda_o$, Site occupancy matrix $\sigma_o$, Collision matrix $\mu_c$}
\end{algorithm}

\end{document}

相关内容