\usepackage[utf8]{inputenc}
\pagestyle{empty}
\usepackage{graphicx}
\usepackage{url}
\usepackage{lineno}
\usepackage{ifthen}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{tabularx}

%\usepackage{algorithm2e,algorithmicx}
\usepackage[nofillcomment]{algorithm2e}
\usepackage{xcolor}
%\usepackage{fancyvrb}
%\usepackage{ragged2e}
%\usepackage{setspace}
%\usepackage{pbox}
%\usepackage{mathtools}
\usepackage{listings}
\usepackage{etoolbox}

\usepackage[flushleft]{threeparttable}
\usepackage{amsmath}
\usepackage{colortbl}

\usepackage{cellspace} %
\setlength\cellspacetoplimit{1pt}
\setlength\cellspacebottomlimit{1pt}

%\usepackage{caption}

%Configure captions
%\captionsetup{font=footnotesize}

\usepackage{tikz}

%Configure encircled letters using tikz
\makeatletter
\newcommand*{\encircled}[1]{\relax\ifmmode\mathpalette\@encircled@math{#1}\else\@encircled{#1}\fi}
\newcommand*{\@encircled@math}[2]{\@encircled{$\m@th#1#2$}}
\newcommand*{\@encircled}[1]{%
  \tikz[baseline,anchor=base]{\node[draw,circle,outer sep=0pt,inner sep=.2ex] {#1};}}
\makeatother

%Configure listings
\lstset{language=C, basicstyle=\ttfamily\scriptsize, mathescape}

\newcommand{\algorithmname}{Algorithm}
\providecommand{\sectionname}{section}
\newcommand{\sectionsname}{sections}
\newcommand{\equationname}{equation}

%\newcommand{\tablecaptions}[2]{\caption{#1}{\caption*{\small #2}}}
%\newcommand{\tabledesc}[1]{\caption*{\small #1}}
\newcommand{\tabledesc}[1]{\small #1}
\newcommand{\mhd}[2]{\multicolumn{1}{#1}{\textbf{#2}}}
%\newcommand{\colid}[1]{\textbf{#1})}
\newcommand{\colid}[1]{\textsuperscript{\textbf{#1}}}
\newcommand{\tblcol}[1]{\textbf{#1}}

\newcommand{\colname}[1]{(\emph{#1})}
\newcommand{\coldesc}[3]{\colid{#1} #3 \colname{#2}}

\input{algconf}
\input{alg}

%\newcommand{\xvar}[1]{\textsf{#1}}             % variable style command
%\newcommand{\xvbox}[2]{\makebox[#1][l]{#2}}    % horizontal alignment command

\newcommand{\rowhead}[1]{\multicolumn{1}{>{\columncolor[gray]{0.8}} l |}{\textbf{#1}} & \multicolumn{6}{>{\columncolor[gray]{0.8}}c|}{} & \multicolumn{3}{>{\columncolor[gray]{0.8}}c|}{} \\}
