GDCPC 2024 简要题面 in English written by SyuAyaka (PARTIAL)

GDCPC 2024 Brief Statement

@. 闲话

绫华也想好好训练自己的英语水平,于是从 Redshift_Shine 那里拿来了 GDCPC 2024 正赛的题面,用英语写了前 \(7\) 题的简要题面。

A. Tian

Statement

Given \(n\) segments on a rectangular coordinate system, find the number of triplets \((x_0,y_0,d)\) satisfy the following constriants:

Define sub-coordinate \([x_0-d,x_0+d]\times [y_0-d,y_0+d]\) of the coordinate above as \(S'\).

\(S'\) precisely includes \(6\) segments below:

\[x=x_0-d, x=x_0, x=x_0+d, y=y_0-d, y=y_0, y=y_0+d \]

Constriants

  • \(1\le n\le 3\times 10^5\)
  • Each segment parallels to \(x\)-axis or \(y\)-axis
  • All input values \(x\) satisfy \(-10^9\le x\le 10^9\)

B. Lcps

Statement

Define \(\operatorname{LCPS}(x,y)\) as the longest string which is a prefix of \(x\) and a suffix of \(y\).

Given three integers \(L,C,P\), \(L\) strings \(s_i\), calculate

\[\sum_{i=1}^L\sum_{j=1}^L C^{|\operatorname{LCPS}(s_i,s_j)|}\bmod P \]

Constriants

  • \(1\le L\le 3\times 10^6\)
  • \(\sum_{i=1}^L|s_i|\le 3\times 10^6\)

C. Dfs Order

Statement

Define \(p_i\) as the DFS traversal order of the vertex \(i\).

Given a rooted tree with \(n\) vertices, and an array \(w\) with a size of \(n\).

Calculate

\[\max\sum_{i=1}^n p_iw_i \]

Constriants

  • \(1\le n\le 2\times 10^5\)
  • \(1\le w_i\le 10^8\)

D. Dialing

Statements

Given a rooted tree \(T\) with \(n\) vertices, and string arrays \(a,b,c,d\), each with a size of \(n\).

With \(2\) integers \(x,y\), guaranteed that \(x\) and \(y\) are both leaf nodes on the tree \(T\), we can generate a string following the instructions below:

  1. Generate the path \((x,y)\) as an array \(p\) with a size of \(m\).
  2. Find the lowest common ancestor \(l\) of the vertex \(x\) and \(y\).
  3. Define \(p_i\) as the \(i\)-th vertex from the path from \(x\) to \(y\). Find the position of \(l\) in \(p\) as \(r\).
  4. The result string is \(\overline{b_{p_2}b_{p_3}...b_{p_{l-2}}b_{p_{l-1}}d_{p_l}c_{p_{l+1}}c_{p_{l+2}}...c_{p_{m-2}}c_{p_{m-1}}a_{p_m}}\).

Given \(q\) queries, each with an integer \(p\) and a result string \(r\).

If an only vertex \(v\) on the tree \(T\) is able to form a string \((p,v)\) equal to \(r\), then find \(v\), otherwise, find the number of vertices \(v\) on the tree \(T\) satisfying the conditions above.

Constriants

  • \(2\le n\le 10^5\)
  • \(1\le q\le 10^5\)
  • The sum of all input strings' size won't exceed \(6\times 10^6\)
  • \(\sum |r|\le 3\times 10^6\)

E. Round-robin

Statement

There is a tournament graph \(G=(V,E)\) with \(n\) vertices.

\(G\) satisfies the following constriant:

Extract a subgraph \(G'\) with \((z+1)\) vertices from \(G\).

In \(G'\), there is always a vertex \(x\) which \(d^+(x)=z\), and a vertex \(y\) which \(d^-(y)=z\).

Find the minimum size of the set \(\{d^+(V_1),d^+(V_2),...,d^+(V_{n-1}),d^+(V_n)\}\).

Multiple Testcases.

Constriants

  • \(1\le T\le 3\times 10^5\)
  • \(1\le z< n\le 10^{18}\)

F. Graph

Statement

You are given an undirected graph with \(n\) vertices and \(m\) edges. Let \(k=\lceil\frac{m}{n-1}\rceil\), you need to tell whether it is possible to find two different vertices \(u,v\) such that there exist \(k\) edge-disjoint paths between \(u\) and \(v\). If it’s possible to find such \(u,v\), you also need to output these paths. If there are multiple construction schemes, output any of them.

Multiple Testcases.

Constriants

  • \(1\le T\le 10^4\)
  • \(2\le n,\sum n\le 10^5\)
  • \(1\le m,\sum m\le 2\times 10^5\)

G. Menji

Statements

Given integers \(L,R\),

Calculate

\[\max_{L\le x< y\le R}\gcd(x,y) \]

Multiple Testcases.

Constriants

  • \(1\le T\le 10\)
  • \(1\le L< R\le 10^{12}\)
posted @ 2024-05-29 14:04  丝羽绫华  阅读(20)  评论(0编辑  收藏  举报