% cjquines.sty, version 1.2
% last update 2020-04-23

\ProvidesPackage{cjquines}

% do NOT mix x, y, z options

\newif\ifcjqfont\cjqfontfalse
\newif\ifcjqpage\cjqpagefalse
\newif\ifcjqoly\cjqolyfalse
\newif\ifcjqcenter\cjqcenterfalse
\newif\ifcjqtitling\cjqtitlingfalse
\newif\ifcjqtitlingx\cjqtitlingxfalse
\newif\ifcjqtitlingy\cjqtitlingyfalse
\newif\ifcjqheader\cjqheaderfalse
\newif\ifcjqheadery\cjqheaderyfalse
\newif\ifcjqfooter\cjqfooterfalse
\newif\ifcjqfootery\cjqfooteryfalse
\newif\ifcjqtheorem\cjqtheoremfalse
\newif\ifcjqtheoremy\cjqtheoremyfalse
\newif\ifcjqtheoremz\cjqtheoremzfalse
\newif\ifcjqthin\cjqthinfalse
\newif\ifcjqthinx\cjqthinxfalse
\newif\ifcjqchoices\cjqchoicesfalse
\newif\ifcjqnoimport\cjqnoimportfalse
\newif\ifcjqlinks\cjqlinksfalse

\DeclareOption{font}{\cjqfonttrue}
\DeclareOption{page}{\cjqpagetrue}
\DeclareOption{oly}{\cjqolytrue}
\DeclareOption{center}{\cjqcentertrue}
\DeclareOption{titling}{\cjqtitlingtrue}
\DeclareOption{titlingx}{\cjqtitlingxtrue}
\DeclareOption{titlingy}{\cjqtitlingytrue}
\DeclareOption{header}{\cjqheadertrue}
\DeclareOption{headery}{\cjqheaderytrue}
\DeclareOption{footer}{\cjqfootertrue}
\DeclareOption{footery}{\cjqfooterytrue}
\DeclareOption{theorem}{\cjqtheoremtrue}
\DeclareOption{theoremy}{\cjqtheoremytrue}
\DeclareOption{theoremz}{\cjqtheoremztrue}
\DeclareOption{thin}{\cjqthintrue}
\DeclareOption{thinx}{\cjqthinxtrue}
\DeclareOption{choices}{\cjqchoicestrue}
\DeclareOption{noimport}{\cjqnoimporttrue}
\DeclareOption{links}{\cjqlinkstrue}

\DeclareSymbolFont{yhlargesymbols}{OMX}{yhex}{m}{n}
\DeclareMathAccent{\wideparen}{\mathord}{yhlargesymbols}{"F3}

\ProcessOptions\relax

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Styling
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifcjqnoimport

\else
  \ifcjqlinks
    \RequirePackage{amsmath,amssymb,amsthm,asymptote,booktabs,enumitem,microtype,multicol,thmtools}
    \PassOptionsToPackage{dvipsnames}{color}
    \PassOptionsToPackage{dvipsnames}{xcolor}
    \definecolor{MidnightBlue}{RGB}{0,81,120}
    \definecolor{DarkMidnightBlue}{RGB}{0,40,60}

    \usepackage[colorlinks=true, allcolors=MidnightBlue]{hyperref}
    \RequirePackage{fontawesome}
    \let\oldhref\href
    \renewcommand{\href}[2]{\oldhref{#1}{#2 \faExternalLink}}
  \else
    \RequirePackage{amsmath,amssymb,amsthm,asymptote,booktabs,enumitem,hyperref,microtype,multicol,thmtools}
    \PassOptionsToPackage{dvipsnames}{color}
    \PassOptionsToPackage{dvipsnames}{xcolor}
    \definecolor{MidnightBlue}{RGB}{0,81,120}
    \definecolor{DarkMidnightBlue}{RGB}{0,40,60}
  \fi

  \newenvironment{itemthin}{\begin{itemize}[topsep=2pt,itemsep=-0.7ex,partopsep=1ex,parsep=1ex]}{\end{itemize}}
  \newenvironment{enumthin}{\begin{enumerate}[topsep=2pt,itemsep=-0.7ex,partopsep=1ex,parsep=1ex]}{\end{enumerate}}
\fi

\ifcjqfont
  \RequirePackage[osf,sc]{mathpazo}
  \linespread{1.05}
  \RequirePackage[euler-digits]{eulervm}
\fi

%\ifcjqpage
%  \RequirePackage{typearea}
%  \areaset{336pt}{700pt}
%  \setlength{\marginparwidth}{7em}
%  \setlength{\marginparsep}{2em}
%\fi

\ifcjqpage
  \RequirePackage{fancyhdr}
  \setlength{\voffset}{-1.0in}
  \setlength{\hoffset}{-1.0in}
  \setlength{\topmargin}{0.63in}
  \ifcjqcenter
    \setlength{\oddsidemargin}{1.44in}
    \setlength{\evensidemargin}{1.44in}
  \else
    \setlength{\oddsidemargin}{0.63in}
    \setlength{\evensidemargin}{1.89in}
  \fi
  \ifcjqheader
    \setlength{\headheight}{15pt}
    \setlength{\headsep}{15pt}
  \fi
  \setlength{\textwidth}{5.62in}
  \setlength{\textheight}{9.11in}
  \setlength{\footskip}{15pt}
\fi

\ifcjqoly
  \RequirePackage{fancyhdr}
  \RequirePackage{titling}
  \pagestyle{fancy}
  \setlength{\topmargin}{2em}
  \setlength{\oddsidemargin}{0.73in}
  \setlength{\headheight}{9em}
  \setlength{\headsep}{2em}
  \setlength{\voffset}{-1in}
  \setlength{\hoffset}{-0.5in}
  \setlength{\footskip}{0in}
  \newlength\FHoffset\setlength\FHoffset{0.5in}
  \addtolength\headwidth{2\FHoffset}
  \fancyheadoffset{\FHoffset}
  \newlength\FHleft\setlength\FHleft{0in}
  \newlength\FHright\setlength\FHright{-1in}
  \newbox\FHline\setbox\FHline=\hbox{\hsize=\paperwidth%
    \hspace*{\FHleft}%
    \rule{\dimexpr\headwidth-\FHleft-\FHright\relax}{\headrulewidth}\hspace*{\FHright}%
  }
  
  \cfoot{}
  \lhead{\sffamily {\Huge \thetitle}\\\vspace{1em}{\LARGE \theauthor}\vspace{1em}}
  \rhead{\fbox{\sffamily \LARGE Day: \textbf{\thepage}}\vspace{1em}}
  \rfoot{\begin{flushright}\emph{Time limit: 4 hours 30 minutes.\\Each problem is worth 7 points.}\end{flushright}}

%  \newcommand{\thelogo}{}
%  \newcommand{\logo}[1]{\renewcommand{\thelogo}{#1}}

%  \makeatletter
%  \def\thm@space@setup{%
%    \thm@preskip=\parskip \thm@postskip=18pt
%  }
%  \makeatother
%  \theoremstyle{definition}

%  \usepackage{fancyhdr}
%  \pagestyle{fancy}
%  \cfoot{}
%  \lhead{\makelogo}
%  \rhead{\righthead\vspace{-1em}}
%  \rfoot{\emph{\sevenpoints}}
%  \setlength{\headheight}{9em}
%  \setlength{\headsep}{2em}
%  \setlength{\voffset}{-1in}
%  \setlength{\hoffset}{-0.5in}
%  \addtolength{\textwidth}{1in}
%  \addtolength{\textheight}{0.25in}
%  \newlength\FHoffset\setlength\FHoffset{0.5in}
%  \addtolength\headwidth{2\FHoffset}
%  \fancyheadoffset{\FHoffset}
%  \newlength\FHleft\setlength\FHleft{0in}
%  \newlength\FHright\setlength\FHright{-1in}
%  \newbox\FHline\setbox\FHline=\hbox{\hsize=\paperwidth%
%    \hspace*{\FHleft}%
%    \rule{\dimexpr\headwidth-\FHleft-\FHright\relax}{\headrulewidth}\hspace*{\FHright}%
%  }
%  \renewcommand\headrule{\vskip-.7\baselineskip\copy\FHline}
%  \newcommand{\olyinfo}[1]{\begin{flushright} \emph{#1} \end{flushright} \medskip}
%  \newcommand{\nmbox}[1]{\fbox{\sffamily\LARGE\vphantom{y}#1} \par\vspace{1em}} % normal box
%  \newcommand{\fdbox}[2]{\fbox{\sffamily\LARGE\vphantom{y}#1: \bfseries #2} \par\vspace{1em}} % field box%

%  \newcommand{\makelogo}{\thelogo}

%  \newcommand{\righthead}{%
%    {\sffamily \Huge OTIS Mock Olympiad}  \\[1em]
%    {\sffamily \LARGE \textbf{asdf}} 
%      \par\vspace{1em}
%    }
%  \newcommand{\sevenpoints}{Each problem is worth seven points.}

%  \usepackage{titlesec}
%  \titleformat{\section}[block]{\color{blue}\Large\bfseries\filcenter}{}{2em}{}
\fi

%\ifcjqthin
%  \RequirePackage{typearea}
%  \areaset{7.5in}{10in}
%\fi

\ifcjqthin
  \RequirePackage{fancyhdr}
  \setlength{\voffset}{-1.0in}
  \setlength{\hoffset}{-1.0in}
  \setlength{\topmargin}{0.5in}
  \setlength{\headheight}{15pt}
  \setlength{\headsep}{15pt}
  \setlength{\oddsidemargin}{0.5in}
  \setlength{\evensidemargin}{0.5in}
  \setlength{\textwidth}{7.5in}
  \setlength{\textheight}{9.75in}
\fi

\ifcjqthinx
  \RequirePackage{fancyhdr}
  \setlength{\voffset}{-1.0in}
  \setlength{\hoffset}{-1.0in}
  \setlength{\topmargin}{0.75in}
  \setlength{\headheight}{15pt}
  \setlength{\headsep}{15pt}
  \setlength{\oddsidemargin}{1in}
  \setlength{\evensidemargin}{1in}
  \setlength{\textwidth}{6.5in}
  \setlength{\textheight}{9in}
\fi

\ifcjqtitling
  \RequirePackage{titling}
  \pretitle{\begin{center} \bfseries \sffamily \LARGE}
  \ifcjqthin
    \pretitle{\vspace{-6em} \begin{center} \bfseries \sffamily \LARGE}
  \fi
  \ifcjqthinx
    \pretitle{\vspace{-5em} \begin{center} \bfseries \sffamily \LARGE}
  \fi
  \posttitle{\vspace{-3pt} \end{center}}
  \renewcommand{\subtitle}[1]{%
    \posttitle{%
      \vspace{-6pt}\end{center}
      \begin{center}#1\end{center}\vspace{-17pt}
      }%
  }
  \preauthor{\begin{center}}
  \postauthor{\vspace{-7pt} \end{center}}
  \predate{\begin{center}}
  \postdate{\vspace{-10pt} \end{center}}
\fi

\ifcjqtitlingx
  \RequirePackage{titling}
  \pretitle{\begin{flushleft} \bfseries \sffamily \Large}
  \ifcjqthin
    \pretitle{\vspace{-6em} \begin{flushleft} \bfseries \sffamily \Large}
  \fi
  \ifcjqthinx
    \pretitle{\vspace{-5em} \begin{flushleft} \bfseries \sffamily \Large}
  \fi
  \posttitle{\vspace{-5pt} \end{flushleft}}
  \renewcommand{\subtitle}[1]{%
    \posttitle{%
      \vspace{-6pt}\end{flushleft}
      \begin{flushleft}#1\end{flushleft}\vspace{-17pt}
      }%
  }
  \preauthor{\begin{flushleft}}
  \postauthor{\vspace{-7pt} \end{flushleft}}
  \predate{\begin{flushleft}}
  \postdate{\vspace{-10pt} \end{flushleft} \rule{\textwidth}{0.5pt}}
\fi

\ifcjqtitlingy
  \RequirePackage{titling}
  \pretitle{\begin{center} \bfseries \LARGE}
  \ifcjqthin
    \pretitle{\vspace{-6em} \begin{center} \bfseries \LARGE}
  \fi
  \ifcjqthinx
    \pretitle{\vspace{-5em} \begin{center} \bfseries \LARGE}
  \fi
  \posttitle{\end{center}}
  \preauthor{\begin{center}}
  \postauthor{\end{center}}
  \predate{\begin{center}}
  \postdate{\vspace{-2em}\end{center}}
\fi

\ifcjqfooter
  \RequirePackage{titling}
  \RequirePackage{fancyhdr}
  \renewcommand{\headrulewidth}{0.3pt}
  \renewcommand{\footrulewidth}{0.0pt}
  \pagestyle{fancy}
  \fancyhead{}
  \fancyfoot{}
  \fancyfoot[R]{\thepage}
  \ifcjqheader
    \fancyhead[L]{\sffamily \thetitle}
    \fancyhead[R]{\sffamily \theauthor}
  \fi
  \ifcjqheadery
    \fancyhead[L]{\thetitle}
    \fancyhead[R]{\theauthor}
  \fi
  \ifcjqthin
    \fancyhead[L]{\thepage}
    \fancyfoot[R]{}
  \fi
  \ifcjqthinx
    \fancyhead[L]{\thepage}
    \fancyfoot[R]{}
  \fi
  \fancypagestyle{plain} {
    \fancyhf{}
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
  }
\fi

\ifcjqfootery
  \RequirePackage{titling}
  \RequirePackage{fancyhdr}
  \renewcommand{\headrulewidth}{0.3pt}
  \renewcommand{\footrulewidth}{0.0pt}
  \pagestyle{fancy}
  \fancyhead{}
  \fancyfoot{}
  \fancyfoot[C]{\thepage}
  \ifcjqheader
    \fancyhead[LO,RE]{\sffamily \thetitle}
    \fancyhead[RO,LE]{\sffamily \theauthor}
  \fi
  \ifcjqheadery
    \fancyhead[LO,RE]{\thetitle}
    \fancyhead[RO,LE]{\theauthor}
  \fi
  \fancypagestyle{plain} {
    \fancyhf{}
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
  }
\fi

\ifcjqtheorem
  \RequirePackage[framemethod=TikZ]{mdframed}
  \RequirePackage{amsthm,thmtools}
  \theoremstyle{plain}

  \mdfdefinestyle{mdbox}{%
    roundcorner = 2pt,
    linewidth = 1pt,
    skipabove = 12pt,
    innerbottommargin = 9pt,
    skipbelow = 12pt,
    linecolor = Gray,
    nobreak = true,
  }
  
  \declaretheoremstyle[
    headfont = \sffamily \bfseries \color{Black},
    mdframed = {style=mdbox},
    headpunct = {\\[3pt]},
    postheadspace = {0pt}
  ]{thmbox}
  
  \declaretheorem[style=thmbox,name=Theorem]{theorem}
  \declaretheorem[style=thmbox,name=Lemma,sibling=theorem]{lemma}
  \declaretheorem[style=thmbox,name=Corollary,sibling=theorem]{corollary}
  \declaretheorem[style=thmbox,name=Proposition,sibling=theorem]{proposition}
  \declaretheorem[style=thmbox,name=Theorem,numbered=no]{theorem*}
  \declaretheorem[style=thmbox,name=Lemma,numbered=no]{lemma*}
  \declaretheorem[style=thmbox,name=Corollary,numbered=no]{corollary*}
  \declaretheorem[style=thmbox,name=Proposition,numbered=no]{proposition*}
  
  \theoremstyle{definition}
  
  \newtheorem{answer}[theorem]{Answer}
  \newtheorem{case}[theorem]{Case}
  \newtheorem{claim}[theorem]{Claim}
  \newtheorem{conjecture}[theorem]{Conjecture}
  \newtheorem{definition}[theorem]{Definition}
  \newtheorem{exercise}[theorem]{Exercise}
  \newtheorem{example}[theorem]{Example}
  \newtheorem{fact}[theorem]{Fact}
  \newtheorem{note}[theorem]{Note}
  \newtheorem{problem}[theorem]{Problem}
  \newtheorem{remark}[theorem]{Remark}
  \newtheorem{question}[theorem]{Question}
  
  \newtheorem*{answer*}{Answer}
  \newtheorem*{case*}{Case}
  \newtheorem*{claim*}{Claim}
  \newtheorem*{conjecture*}{Conjecture}
  \newtheorem*{definition*}{Definition}
  \newtheorem*{exercise*}{Exercise}
  \newtheorem*{example*}{Example}
  \newtheorem*{fact*}{Fact}
  \newtheorem*{note*}{Note}
  \newtheorem*{problem*}{Problem}
  \newtheorem*{remark*}{Remark}
  \newtheorem*{question*}{Question}
\fi

\ifcjqtheoremy
  \RequirePackage[framemethod=TikZ]{mdframed}
  \theoremstyle{plain}
  
  \declaretheorem[name=Theorem]{theorem}
  \declaretheorem[name=Lemma,sibling=theorem]{lemma}
  \declaretheorem[name=Corollary,sibling=theorem]{corollary}
  \declaretheorem[name=Proposition,sibling=theorem]{proposition}
  \declaretheorem[name=Theorem,numbered=no]{theorem*}
  \declaretheorem[name=Lemma,numbered=no]{lemma*}
  \declaretheorem[name=Corollary,numbered=no]{corollary*}
  \declaretheorem[name=Proposition,numbered=no]{proposition*}
  
  \theoremstyle{definition}
  
  \newtheorem{answer}[theorem]{Answer}
  \newtheorem{case}[theorem]{Case}
  \newtheorem{claim}[theorem]{Claim}
  \newtheorem{conjecture}[theorem]{Conjecture}
  \newtheorem{definition}[theorem]{Definition}
  \newtheorem{example}[theorem]{Example}
  \newtheorem{exercise}[theorem]{Exercise}
  \newtheorem{fact}[theorem]{Fact}
  \newtheorem{note}[theorem]{Note}
  \newtheorem{problem}[theorem]{Problem}
  \newtheorem{remark}[theorem]{Remark}
  \newtheorem{question}[theorem]{Question}
  
  \newtheorem*{answer*}{Answer}
  \newtheorem*{case*}{Case}
  \newtheorem*{claim*}{Claim}
  \newtheorem*{conjecture*}{Conjecture}
  \newtheorem*{definition*}{Definition}
  \newtheorem*{example*}{Example}
  \newtheorem*{exercise*}{Exercise}
  \newtheorem*{fact*}{Fact}
  \newtheorem*{note*}{Note}
  \newtheorem*{problem*}{Problem}
  \newtheorem*{remark*}{Remark}
  \newtheorem*{question*}{Question}
\fi

\ifcjqtheoremz
  \RequirePackage[framemethod=TikZ]{mdframed}
  \RequirePackage{amsthm,thmtools}
  \theoremstyle{plain}

  \mdfdefinestyle{mdbox}{%
    linewidth = 3pt,
    skipabove = 12pt,
    skipbelow = 0pt,
    innerleftmargin = 7pt,
    innerrightmargin = 10pt,
    innerbottommargin = 7pt,
    linecolor = Gray,
    backgroundcolor = Gray!5,
    hidealllines = true,
    leftline = true,
    leftmargin = -10pt,
    rightmargin = -10pt
  }

  \mdfdefinestyle{exmdbox}{%
    frametitle = {Exercises},
    frametitlefont = \sffamily \bfseries \color{MidnightBlue},
    frametitlebelowskip = 0pt,
    splittopskip = 0pt,
    innertopmargin = 5pt,
    linewidth = 3pt,
    skipabove = 12pt,
    skipbelow = 0pt,
    innerleftmargin = 7pt,
    innerrightmargin = 10pt,
    innerbottommargin = 7pt,
    linecolor = MidnightBlue,
    backgroundcolor = MidnightBlue!5,
    hidealllines = true,
    leftline = true,
    font = \small,  
    leftmargin = -10pt,
    rightmargin = -10pt
  }

  \declaretheoremstyle[
    headfont = \sffamily \bfseries \color{Black!80},
    bodyfont = \normalfont,
    mdframed = {style=mdbox}
  ]{exbox}

  \declaretheoremstyle[
    spaceabove = 5pt,
    spacebelow = 5pt,
    headfont = \sffamily \bfseries \color{DarkMidnightBlue},
    bodyfont = \normalfont
  ]{thmm}

  \declaretheorem[style=exbox,name=Example,numberwithin=section]{exboxed}
  \declaretheorem[style=exbox,name=Exercise,sibling=exboxed]{exrboxed}
  \declaretheorem[style=exbox,name=Problem,sibling=exboxed]{probboxed}
  \declaretheorem[style=exbox,name=Theorem,sibling=exboxed]{thmboxed}

  \theoremstyle{definition}

  \declaretheorem[style=thmm,name=Problem,sibling=exboxed]{problem}
  \declaretheorem[style=thmm,name=Exercise,sibling=exboxed]{exercise}
  \declaretheorem[style=thmm,name=Question,sibling=exboxed]{question}
  \declaretheorem[style=thmm,name=Theorem,sibling=exboxed]{theorem}
\fi

\ifcjqchoices
  \newcounter{choice}
  \renewcommand\thechoice{\Alph{choice}}
  \newcommand\choicelabel{\textbf{(\thechoice)}}

  \newenvironment{choices}%
    {%
      \setcounter{choice}{0}%
      \def\choice{%
        \refstepcounter{choice}%
        \ifnum\value{choice}>1\relax
          \penalty -50\qquad\relax
        \fi
        \choicelabel
        \nobreak\enskip
      }% choice
      \ifvmode\else\enskip\fi
      \ignorespaces
    }%
    {}

  \newenvironment{parchoices}%
    {\list{\choicelabel}%
       {\usecounter{choice}\def\makelabel##1{\hss\llap{##1}}%
         \settowidth{\leftmargin}{W.\hskip\labelsep\hskip 2.5em}%
         \def\choice{%
           \item
         } % choice
         \labelwidth\leftmargin\advance\labelwidth-\labelsep
         \topsep=0pt
         \partopsep=0pt
       }%
    }%
    {\endlist}

  \newcommand{\fourch}[4]{
    \begin{tabular}{*{4}{@{}p{0.23\textwidth}}}
      (a)~#1 & (b)~#2 & (c)~#3 & (d)~#4
    \end{tabular}
  }
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Commands
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\cbrt}[1]{\sqrt[3]{#1}}
\newcommand{\mailto}[1]{\href{mailto:#1}{\texttt{#1}}}

\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}
\newcommand{\norm}[1]{\left\lVert #1 \right\rVert}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}

\newcommand{\del}[1]{\left( #1 \right)}
\newcommand{\cbr}[1]{\left\{ #1 \right\}}
\newcommand{\sbr}[1]{\left[ #1 \right]}

\newcommand{\cycsum}{\sum_{\mathrm{cyc}}}
\newcommand{\symsum}{\sum_{\mathrm{sym}}}
\newcommand{\cycprod}{\prod_{\mathrm{cyc}}}
\newcommand{\symprod}{\prod_{\mathrm{sym}}}

\newcommand{\CC}{\mathbb C}
\newcommand{\EE}{\mathbb E}
\newcommand{\FF}{\mathbb F}
\newcommand{\NN}{\mathbb N}
\newcommand{\PP}{\mathbb P}
\newcommand{\QQ}{\mathbb Q}
\newcommand{\RR}{\mathbb R}
\newcommand{\ZZ}{\mathbb Z}

\newcommand{\dang}{\measuredangle}
\newcommand{\ray}[1]{\overrightarrow{#1}} 
% \renewcommand{\vec}[1]{\overrightarrow{#1}} 
\newcommand{\seg}[1]{\overline{#1}}
\newcommand{\arc}[1]{\wideparen{#1}}

\newcommand{\dg}{^\circ}

\newcommand{\dydx}{\frac{dy}{dx}\,}
\newcommand{\ddx}{\frac{d}{dx}\,}

\newcommand{\subi}[1]{\phantom{.} \par \noindent \textbf{#1}}

%\DeclareMathOperator{\cis}{cis}
%\DeclareMathOperator{\lcm}{lcm}

\newcommand{\bluebf}[1]{{\bfseries \color{DarkMidnightBlue} #1}}

\DeclareMathOperator{\im}{im}
% \DeclareMathOperator{\ker}{ker}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Asymptote
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifcjqnoimport

\else
  \begin{asydef}
    import olympiad;
    import cse5;
    pointpen = black;
    pathpen = black;
    pathfontpen = black;
    anglepen = black;
    anglefontpen = black;
    pointfontsize = 8;
    defaultpen(fontsize(11pt)+0.7);
    size(8cm);
    usepackage("amsmath");
    usepackage("amssymb");
    texpreamble("\RequirePackage{color}");
  \end{asydef}
\fi