Skip to content

Commit

Permalink
Update chapter.tex
Browse files Browse the repository at this point in the history
  • Loading branch information
hockyy authored Jan 3, 2024
1 parent b14d06e commit dfba90a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/various/chapter.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ \section{Optimization tricks}
\item \verb@for (int x = m; x; ) { --x &= m; ... }@ loops over all subset masks of \texttt{m} (except \texttt{m} itself).
\item \verb@c = x&-x, r = x+c; (((r^x) >> 2)/c) | r@ is the next number after \texttt{x} with the same number of bits set.
\item \verb@rep(b,0,K) rep(i,0,(1 << K))@ \\ \verb@ if (i & 1 << b) D[i] += D[i^(1 << b)];@ computes all sums of subsets.
\item \verb@for (LL x = (1LL << n) - 1, ori = (1LL << m); x < ori;) { /*Use x here*/ LL c = x & -x, r = x + c; x = (((r ^ x) >> 2) / c) | r;}@
\item \verb@for (LL x = (1LL << n) - 1, ori = (1LL << m);@ \\ \verb@x < ori;) { /*Use x here*/ LL c = x & -x,@ \\ \verb@r = x + c; x = (((r ^ x) >> 2) / c) | r;}@
\end{itemize}
\subsection{Pragmas}
\begin{itemize}
Expand Down

0 comments on commit dfba90a

Please sign in to comment.