板子
\(\text{fastin}\)
Code
char gc() {
const int sz = 1 << 21;
static char v[sz], *b, *e;
return b == e ? (e = (b = v) + fread(v, 1, sz, stdin), b == e ? EOF : *b++) : *b++;
}
template <class _Tp> void rd(_Tp &x) {
bool op = 0;
char c = gc();
x = 0;
while (isspace(c))
c = gc();
if (c == '-')
op = 1, c = gc();
while (isdigit(c))
x = x * 10 + c - '0', c = gc();
if (op)
x = -x;
}
指令集
Code
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math,inline")
#pragma GCC target("sse4,sse4.1,sse4.2,ssse3,sse3,sse2,sse,avx2,avx,popcnt,abm,mmx,tune=native")
\(\text{poly}\)
Code
const int mod = 998244353, o = 18, len = 1 << o, B = 16;
int fac[len], ifac[len], iv[len];
int add(int x, int y) { return x + y < mod ? x + y : x + y - mod; }
int sub(int x, int y) { return x < y ? x + mod - y : x - y; }
int power(int a, int n) {
int tp = 1;
while (n) {
if (n & 1)
tp = 1ll * tp * a % mod;
a = 1ll * a * a % mod, n >>= 1;
}
return tp;
}
namespace poly {
typedef unsigned long long u64;
int I[N], w[len], r[len], up, l;
void init() {
I[0] = 1;
const int w0 = power(10000002, (mod - 1) >> o);
w[len >> 1] = 1;
for (int i = (len >> 1) + 1; i != len; i++)
w[i] = 1ll * w[i - 1] * w0 % mod;
for (int i = (len >> 1) - 1; i; i--)
w[i] = w[i << 1];
for (int i = 0; i != len; i++)
r[i] = (r[i >> 1] >> 1) | ((i & 1) << (o - 1));
}
void ntt(int *a, int n, bool op) {
static u64 t[len], x, y;
for (int i = 0; i != n; i += 2) {
x = a[r[i] >> (o - l)], y = a[r[i + 1] >> (o - l)];
t[i] = x + y, t[i + 1] = x + mod - y;
}
for (int l = 2; l != n; l <<= 1) {
if (l == (1 << 18))
for (u64 *f = t; f != t + n; f++)
*f %= mod;
int *k = w + l;
for (u64 *f = t; f != t + n; f += l)
for (int *j = k; j != k + l; j++, f++) {
u64 x = *f, y = f[l] * *j % mod;
f[l] = x + mod - y, *f += y;
}
}
if (op) {
if (n == (1 << 18))
for (u64 *f = t; f != t + n; f++)
*f %= mod;
for (int i = 0, x = mod - (mod >> l); i != n; i++)
a[i] = t[i] * x % mod;
reverse(a + 1, a + n);
} else
for (int i = 0; i != n; i++)
a[i] = t[i] % mod;
}
int pre(int n) {
l = 32 - __builtin_clz(n);
return up = 1 << l;
}
void mul(int *f, int n, int *g, int m, int *h, int q = -1) {
static int x[len], y[len];
if (n == 0 && m == 0) {
h[0] = 1ll * f[0] * g[0] % mod;
return;
}
memcpy(x, f, (n + 1) << 2), memcpy(y, g, (m + 1) << 2);
pre(n + m), ntt(x, up, 0), ntt(y, up, 0);
for (int i = 0; i != up; i++)
h[i] = 1ll * x[i] * y[i] % mod;
ntt(h, up, 1);
memset(x, 0, up << 2), memset(y, 0, up << 2);
if (q != -1)
fill(h + q + 1, h + up, 0);
}
void inv(int *a, int n, int *f) {
static int x[len], y[len];
if (n <= 16) {
int x = f[0] = power(a[0], mod - 2);
for (int i = 1; i <= n; i++) {
u64 s = 0;
for (int j = 0; j != i; j++)
s += 1ll * f[j] * a[i - j];
f[i] = (mod - s % mod) * x % mod;
}
return;
}
int lt = n >> 1;
inv(a, lt, f);
memcpy(x, f, (lt + 1) << 2), memcpy(y, a, (n + 1) << 2);
pre(n);
ntt(x, up, 0), ntt(y, up, 0);
for (int i = 0; i != up; i++)
y[i] = 1ll * y[i] * x[i] % mod;
ntt(y, up, 1);
memset(y, 0, (lt + 1) << 2);
ntt(y, up, 0);
for (int i = 0; i != up; i++)
y[i] = 1ll * y[i] * x[i] % mod;
ntt(y, up, 1);
for (int i = lt + 1; i <= n; i++)
f[i] = sub(0, y[i]);
memset(x, 0, up << 2), memset(y, 0, up << 2);
}
void div(int *a, int *b, int n, int *f) {
static int iv[len], x[len], tmp[len];
static int nb[N << 2], nf[N << 2];
static u64 s0[len], s1[len];
if (n <= 16) {
int x = power(b[0], mod - 2);
for (int i = 0; i <= n; i++) {
u64 s = 0;
for (int j = 0; j != i; j++)
s += 1ll * f[j] * b[i - j];
f[i] = (a[i] + mod - s % mod) * x % mod;
}
return;
}
int m = 1 << (32 - __builtin_clz(n));
int k = m >> 4, z = k << 1;
div(I, b, k - 1, tmp), memcpy(x, a, k << 2);
memcpy(iv, tmp, k << 2), memset(tmp, 0, k << 2);
pre(z - 1);
ntt(iv, up, 0), ntt(x, up, 0);
for (int i = 0; i != up; i++)
x[i] = 1ll * iv[i] * x[i] % mod;
ntt(x, up, 1);
memcpy(f, x, k << 2);
memset(x, 0, up << 2);
memcpy(nb, b, k << 2);
ntt(nb, up, 0);
for (int i = 1;; i++) {
if (i * k > n) {
memset(iv, 0, up << 2);
memset(nb, 0, i * z * 4);
memset(nf, 0, (i - 1) * z * 4);
fill(f + n + 1, f + i * k, 0);
memset(iv, 0, z << 2);
break;
}
memcpy(nb + i * z, b + i * k, k << 2);
memcpy(nf + (i - 1) * z, f + (i - 1) * k, k << 2);
ntt(nb + i * z, up, 0), ntt(nf + (i - 1) * z, up, 0);
for (int l1 = 0; l1 != i; l1++)
for (int j = 0; j != up; j++)
s0[j] += 1ll * nf[l1 * z + j] * nb[(i - l1) * z + j];
for (int l1 = 0; l1 != i; l1++)
for (int j = 0; j != up; j++)
s1[j] += 1ll * nf[l1 * z + j] * nb[(i - l1 - 1) * z + j];
for (int j = 0; j != up; j += 2) {
x[j] = (s0[j] + s1[j] % mod) % mod;
x[j + 1] = (s0[j + 1] + mod - s1[j + 1] % mod) % mod;
s0[j] = s1[j] = s0[j + 1] = s1[j + 1] = 0;
}
ntt(x, up, 1);
memset(x + k, 0, k << 2);
for (int j = 0; j != k; j++)
x[j] = sub(a[i * k + j], x[j]);
ntt(x, up, 0);
for (int j = 0; j != up; j++)
x[j] = 1ll * x[j] * iv[j] % mod;
ntt(x, up, 1);
memcpy(f + i * k, x, k << 2);
memset(x, 0, up << 2);
}
}
void ln(int *a, int n, int *f) {
static int x[N << 1];
for (int i = 0; i < n; i++)
x[i] = 1ll * a[i + 1] * (i + 1) % mod;
div(x, a, n - 1, f);
for (int i = n; i; i--)
f[i] = 1ll * f[i - 1] * iv[i] % mod;
f[0] = 0;
memset(x, 0, n << 2);
}
void dcexp(int *a, int l, int r, int n, int *f, int *g, int *h) {
static u64 s[len];
static int tp[len];
if (r - l + 1 <= 32) {
for (int i = l; i <= r && i <= n; i++) {
u64 s = 0;
for (int j = l; j < i; j++) {
s += 1ll * f[j] * a[i - j];
if (!(j & 15))
s %= mod;
}
f[i] = (f[i] + s % mod) * iv[i] % mod;
}
return;
}
int *tg[B], *th[B];
int len = (r - l + 1) / B, k = 2 * len;
for (int i = 0; i < B - 1; i++)
tg[i] = g + i * k, th[i] = h + i * k;
if (!l) {
pre(k - 1);
for (int i = 0; i < B - 1; i++) {
if ((i + 1) * len > n)
break;
memcpy(th[i], a + i * len, k << 2);
ntt(th[i], k, 0);
}
}
for (int i = 0; i < B; i++) {
if (l + i * len > n)
break;
memset(s, 0, k << 3);
for (int j = 0; j < i; j++)
for (int t = 0; t < k; t++)
s[t] += 1ll * tg[j][t] * th[i - j - 1][t];
for (int t = 0; t < k; t++)
tp[t] = s[t] % mod;
pre(k - 1), ntt(tp, k, 1);
for (int t = 0; t < len; t++)
f[l + i * len + t] = add(f[l + i * len + t], tp[t + len]);
dcexp(a, l + i * len, l + (i + 1) * len - 1, n, f, g + k * B, h + k * B);
if (i != B - 1) {
memcpy(tg[i], f + l + i * len, len << 2);
pre(k - 1), ntt(tg[i], k, 0);
}
}
memset(tg[0], 0, (k * B) << 2);
}
void exp(int *a, int n, int *f) {
static int x[N << 1], v1[N << 2], v2[N << 2];
for (int i = 1; i <= n; i++)
x[i] = 1ll * a[i] * i % mod;
f[0] = 1, fill(f + 1, f + n + 1, 0);
int m = 1 << (32 - __builtin_clz(n));
dcexp(x, 0, m - 1, n, f, v1, v2);
memset(x, 0, (n + 1) << 2), fill(f + n + 1, f + m, 0);
}
void fpow(int *a, int n, int k, int *f) {
static int x[N];
ln(a, n, x);
for (int i = 1; i <= n; i++)
x[i] = 1ll * x[i] * k % mod;
exp(x, n, f);
memset(x, 0, (n + 1) << 2);
}
int recur(int m, int n, int *f, int *g) { //calculate [x^m] f(x) / g(x) with deg <= n
static int a[len], b[len], c[len], d[len];
static int v[len], iv[len];
pre(n);
memcpy(a, f, n << 2), memcpy(b, g, (n + 1) << 2);
memcpy(c, a, n << 2), memcpy(d, b, (n + 1) << 2);
ntt(a, up, 0), ntt(b, up, 0);
const int w0 = power(3, (mod - 1) / up / 2), iw = power(w0, mod - 2);
const int i2 = (mod + 1) >> 1;
v[0] = 1, iv[0] = i2;
for (int i = 1; i != up; i++) {
v[i] = 1ll * v[i - 1] * w0 % mod;
iv[i] = 1ll * iv[i - 1] * iw % mod;
}
while (__lg(m) >= __lg(n)) {
for (int i = 0; i != up; i++)
c[i] = 1ll * c[i] * v[i] % mod, d[i] = 1ll * d[i] * v[i] % mod;
ntt(c, up, 0), ntt(d, up, 0);
int t = up / 2;
for (int i = 0; i != t; i++) {
if (m & 1) {
a[i] = ((1ll * a[i] * b[t + i] - 1ll * a[t + i] * b[i]) % mod + mod) * iv[i << 1] % mod;
c[i] = ((1ll * c[i] * d[t + i] - 1ll * c[t + i] * d[i]) % mod + mod) * iv[i << 1 | 1] % mod;
} else {
a[i] = (1ll * a[i] * b[t + i] + 1ll * a[t + i] * b[i]) % mod * i2 % mod;
c[i] = (1ll * c[i] * d[t + i] + 1ll * c[t + i] * d[i]) % mod * i2 % mod;
}
b[i] = 1ll * b[i] * b[t + i] % mod;
d[i] = 1ll * d[i] * d[t + i] % mod;
}
for (int i = up - 2; i >= 0; i -= 2) {
c[i + 1] = a[i + 1] = c[i >> 1], c[i] = a[i] = a[i >> 1];
d[i + 1] = b[i + 1] = d[i >> 1], d[i] = b[i] = b[i >> 1];
}
ntt(c, up, 1), ntt(d, up, 1);
m >>= 1;
}
memset(b, 0, up << 2);
inv(d, m, b);
int ans = 0;
for (int i = 0; i <= m; i++)
ans = (ans + 1ll * b[i] * c[m - i]) % mod;
memset(a, 0, up << 2), memset(b, 0, up << 2);
memset(c, 0, up << 2), memset(d, 0, up << 2);
return ans;
}
} // namespace poly
\(\text{mtt}\)
Code
//all for strictfp
typedef long long i64;
typedef complex<double> im;
const int o = 20, len = 1 << o;
const double pi = acos(-1.0);
int n, m, mod;
int f[len], g[len], h[len];
namespace poly {
int r[len], up, l;
im w[len], iw[len], I(0, 1); //more strictfp than only w[] and reverse when idft
void init() {
for (int i = 0; i != (len >> 1); i++) {
double x = cos(2 * pi / len * i), y = sin(2 * pi / len * i);
w[len >> 1 | i] = im(x, y);
iw[len >> 1 | i] = im(x, -y);
}
for (int i = (len >> 1) - 1; i; i--)
w[i] = w[i << 1], iw[i] = iw[i << 1];
for (int i = 0; i != len; i++)
r[i] = (r[i >> 1] >> 1) | ((i & 1) << (o - 1));
}
int pre(int n) {
l = 32 - __builtin_clz(n), up = 1 << l;
return up;
}
void fft(im *a, int n, bool op, im *w) {
for (int i = 0; i != n; i++) {
int t = r[i] >> (o - l);
if (i < t)
swap(a[i], a[t]);
}
for (int l = 1; l != n; l <<= 1) {
im *k = w + l;
for (im *f = a; f != a + n; f += l)
for (im *j = k; j != k + l; j++, f++) {
im x = *f, y = f[l] * *j;
f[l] = x - y, *f += y;
}
}
if (op)
for (int i = 0; i != n; i++)
a[i] /= n;
}
void mul(int *f, int n, int *g, int m, int *h) {
static im a[len], b[len], c[len], d[len];
pre(n + m);
int mm = sqrt(mod); //more strictfp than forever 2 ^ 15
for (int i = 0; i <= n; i++)
a[i] = im(f[i] % mm, f[i] / mm);
for (int i = 0; i <= m; i++)
b[i] = im(g[i] % mm, g[i] / mm);
fft(a, up, 0, w), fft(b, up, 0, w);
for (int i = 0; i != up; i++) {
a[i] /= 2, b[i] /= 2;
c[i] = im(a[i].real(), -a[i].imag()), d[i] = im(b[i].real(), -b[i].imag());
}
reverse(c + 1, c + up), reverse(d + 1, d + up);
for (int i = 0; i != up; i++) {
im a0 = a[i] + c[i], a1 = (c[i] - a[i]) * I;
im b0 = b[i] + d[i], b1 = (d[i] - b[i]) * I;
a[i] = a0 * b0 + I * a1 * b1, b[i] = a0 * b1 + I * a1 * b0; //more strictfp than only b[i].real()
}
fft(a, up, 1, iw), fft(b, up, 1, iw);
auto num = [](double x) { return (i64)round(x) % mod; };
for (int i = 0; i <= n + m; i++)
h[i] = (num(a[i].real()) + num(a[i].imag()) * mm * mm + (num(b[i].real()) + num(b[i].imag())) * mm) % mod; //more strictfp than b[i].real() + b[i].imag()
for (int i = 0; i != up; i++)
a[i] = b[i] = c[i] = d[i] = im(0, 0);
}
} // namespace poly
\(\text{beamer}\)
Code
\documentclass{beamer}
\usepackage[UTF8]{ctex}
\usepackage{ulem}
\usefonttheme{professionalfonts}
\title{}
\begin{document}
\maketitle
\begin{frame}{}{}
\end{frame}
\end{document}
\(\LaTeX\) 试卷模板
Code
% xelatex -shell-escape statement.tex
\documentclass[12pt,a4paper,oneside]{ctexart}
\usepackage{xeCJKfntef,xcolor}
\usepackage{tabularx}
\usepackage{array}
\usepackage{bookmark}
\usepackage{parallel}
\usepackage{clrscode3e}
\usepackage{lastpage}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{minted}
\usepackage{hyperref}
\usepackage{enumitem}
\usepackage{multirow}
\usepackage{float}
\hypersetup{
colorlinks=true,
linkcolor=blue,
citecolor=blue
}
\usepackage[english]{babel}
\usepackage{setspace}
\usepackage{geometry}
\geometry{left=2.5cm,right=2.5cm,top=2cm,bottom=2cm}
\usepackage{indentfirst}
\setlength{\parindent}{2em}
\linespread{1.3}
\setcounter{secnumdepth}{0}
\newcommand{\bfemph}[1]{\CJKunderdot{\textbf{#1}}}
\renewcommand{\emph}[1]{\bfemph{#1}}
\setlength{\headheight}{18pt}
\setlist[itemize]{labelsep = 1.1em, itemsep = 0pt, parsep = 1pt, itemindent = 1.5em, topsep = 0pt}
\setlist[enumerate]{labelsep = 1.1em, itemsep = 0pt, parsep = 1pt, itemindent = 1.5em, topsep = 0pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\setlength{\headheight}{18pt}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\renewcommand{\subsectionmark}[1]{\markright{#1}}
\lhead{8\ 月\ 23\ 日联考\ 模拟赛}
\chead{}
\rhead{\rightmark}
\lfoot{}
\cfoot{\small 第 \thepage\ 页 \hspace{2em} 共 \pageref{LastPage} 页}
\rfoot{}
\newcommand{\ChineseprobA}{幽灵}
\newcommand{\ChineseprobB}{可怜}
\newcommand{\ChineseprobC}{大哭}
\newcommand{\probA}{youl}
\newcommand{\probB}{kel}
\newcommand{\probC}{dk}
\begin{document}
\title{\heiti\zihao{1} 8\ 月\ 23\ 日联考\ 模拟赛}
\author{ASDFZ}
\date{\heiti 时间:2022 年 7 月 3 日 01:00 $\sim$ 05:30}
\maketitle
\begin{center}
\begin{tabularx}{\textwidth}{|X|X|X|X|}
\hline
题目名称 & \ChineseprobA & \ChineseprobB & \ChineseprobC\\
\hline
题目类型 & 传统型 & 传统型 & 传统型\\
\hline
目录 & \texttt{\probA} & \texttt{\probB} & \texttt{\probC}\\
\hline
可执行文件名 & \texttt{\probA} & \texttt{\probB} & \texttt{\probC}\\
\hline
输入文件名 & \texttt{\probA.in} & \texttt{\probB.in} & \texttt{\probC.in}\\
\hline
输出文件名 & \texttt{\probA.out} & \texttt{\probB.out} & \texttt{\probC.out}\\
\hline
每个测试点时限 & 3.0 秒 & 3.0 秒 & 3.0 秒\\
\hline
内存限制 & 512 MiB & 512 MiB & 512 MiB\\
\hline
是否有部分分 & 否 & 否 & 否\\
\hline
\end{tabularx}
\end{center}
\hspace{2em}提交源程序文件名
\begin{center}
\begin{tabularx}{\textwidth}{|X|X|X|X|}
\hline
对于 C++ 语言 & \texttt{\probA.cpp} & \texttt{\probB.cpp} & \texttt{\probC.cpp}\\
\hline
\end{tabularx}
\end{center}
\hspace{2em}编译选项
\begin{center}
\begin{tabularx}{\textwidth}{|p{100pt}|X<{\centering}|}
\hline
对于 C++ 语言 & \texttt{-O2 -std=c++14} \\
\hline
\end{tabularx}
\end{center}
\vspace{.8em}
\hspace{1em}{\heiti 注意事项与提醒:}
\begin{enumerate}[topsep = 4pt]
\setlength{\labelsep}{1.1em}
\setlength{\itemsep}{2pt}
\setlength{\parsep}{2pt}
\setlength{\parskip}{2pt}
\setlength{\itemindent}{.5em}
\item 在 NOI Linux 2.0 下使用 LemonLime 进行测评,请为每道题目建立子文件夹。
\item 评测机配置:Intel® Core™ i7-4790 CPU @ 3.60GHz。
\item 喧哗的同学请不要大声阿克,闷声发大财。
\end{enumerate}
\thispagestyle{empty}
\newpage
\section{\rm \ChineseprobA (\probA)}
\subsection*{题目描述}
\subsection*{输入格式}
\subsection*{输出格式}
\subsection*{样例 1 输入}
\begin{minted}[frame=single, mathescape, linenos, rulecolor=blue, framesep=8pt, numbersep=8pt, numbers=none]{text}
\end{minted}
\subsection*{样例 1 输出}
\begin{minted}[frame=single, mathescape, linenos, rulecolor=blue, framesep=8pt, numbersep=8pt, numbers=none]{text}
\end{minted}
\subsection*{样例 1 解释}
$P = \mathtt{aaba} + \mathtt{aabab} + \mathtt{a} + \mathtt{aaba} = \mathtt{aabaaababaaaba}$。
\subsection*{样例 2/3/4 输入}
详见选手文件夹下的 \textit{\probA/\probA*.in} 文件。
\subsection*{样例 2/3/4 输出}
详见选手文件夹下的 \textit{\probA/\probA*.ans} 文件。
\subsection*{数据规模与约定}
对于 $100\%$ 的数据,满足 $2 \le |S|, |T| \le 5 \times 10 ^ 5, 1 \le a_i \le |S|, 1 \le n, q \le 5 \times 10^5, 1 \le l \le r \le \sum\limits_{i = 1} ^ n a_i$,字符串中只会出现小写英文字母。
\begin{center}
\begin{tabularx}{7cm}{|c|X<{\centering}|c|}
\hline
测试点编号 & $n, |S|, |T|\le$ & $q \le $\\
\hline
$1 \sim 3$ & $10 ^ 3$ & \multirow{3}{*}{$1$}\\
\cline{1 - 2}
$4 \sim 8$ & $5 \times 10 ^ 4$ & \\
\cline{1 - 2}
$9 \sim 10$ & $5 \times 10 ^ 5$ & \\
\hline
$11 \sim 13$ & $10 ^ 3$ & \multirow{2}{*}{$1.5 \times 10 ^ 5$}\\
\cline{1 - 2}
$14 \sim 16$ & $1.5 \times 10 ^ 5$ & \\
\hline
$17 \sim 20$ & $5 \times 10 ^ 5$ & $5 \times 10 ^ 5$\\
\hline
\end{tabularx}
\end{center}
\newpage
\section{\rm \ChineseprobB (\probB)}
\subsection*{题目描述}
\subsection*{输入格式}
\subsection*{输出格式}
\subsection*{样例 1 输入}
\begin{minted}[frame=single, mathescape, linenos, rulecolor=blue, framesep=8pt, numbersep=8pt, numbers=none]{text}
\end{minted}
\subsection*{样例 1 输出}
\begin{minted}[frame=single, mathescape, linenos, rulecolor=blue, framesep=8pt, numbersep=8pt, numbers=none]{text}
\end{minted}
\subsection*{数据规模与约定}
对于 $100\%$ 的数据,满足 $0 \le p_l, p_r, p_u, p_d < 10 ^ 9 + 7, 1 \le n \le 150$。
保证 $p_l + p_r + p_u + p_d \equiv 1 \pmod {10 ^ 9 + 7}$。
\begin{center}
\begin{tabularx}{7cm}{|c|X<{\centering}|c|}
\hline
测试点编号 & $n\le$ & 特殊性质\\
\hline
$1 \sim 4$ & $10$ & 无\\
\hline
$5 \sim 7$ & \multirow{2}{*}{$100$} & $p_u = p_d = 0$\\
\cline{1 - 1} \cline{3 - 3}
$8 \sim 10$ & & $p_d = 0$\\
\hline
$11 \sim 13$ & $60$ & \multirow{2}{*}{无}\\
\cline{1 - 2}
$14 \sim 20$ & $150$ & \\
\hline
\end{tabularx}
\end{center}
\newpage
\section{\rm \ChineseprobC (\probC)}
\subsection*{题目描述}
\subsection*{输入格式}
\subsection*{输出格式}
\subsection*{样例 1 输入}
\begin{minted}[frame=single, mathescape, linenos, rulecolor=blue, framesep=8pt, numbersep=8pt, numbers=none]{text}
\end{minted}
\subsection*{样例 1 输出}
\begin{minted}[frame=single, mathescape, linenos, rulecolor=blue, framesep=8pt, numbersep=8pt, numbers=none]{text}
\end{minted}
\subsection*{样例 2 输入}
\begin{minted}[frame=single, mathescape, linenos, rulecolor=blue, framesep=8pt, numbersep=8pt, numbers=none]{text}
\end{minted}
\subsection*{样例 2 输出}
\begin{minted}[frame=single, mathescape, linenos, rulecolor=blue, framesep=8pt, numbersep=8pt, numbers=none]{text}
\end{minted}
\subsection*{样例 3/4 输入}
详见选手文件夹下的 \textit{\probC/\probC*.in} 文件。
\subsection*{样例 3/4 输出}
详见选手文件夹下的 \textit{\probC/\probC*.ans} 文件。
\subsection*{数据规模与约定}
对于 $100\%$ 的数据,满足 $1 \le n \le 30, 1 \le v \le 20, 0 \le b_i \le 100$。
\begin{center}
\begin{tabularx}{7cm}{|c|X<{\centering}|c|}
\hline
测试点编号 & $n \le$ & 特殊性质\\
\hline
$1 \sim 3$ & $2$ & 无\\
\hline
$4 \sim 8$ & $20$ & $v = 2$\\
\hline
$9 \sim 20$ & 30 & 无\\
\hline
\end{tabularx}
\end{center}
\end{document}