luogu#P16604. [SYSUCPC 2025] SYSU III

    ID: 16697 远端评测题 1000ms 256MiB 尝试: 0 已通过: 0 难度: 5 上传者: 标签>2025Special Judge构造Ad-hoc高校校赛

[SYSUCPC 2025] SYSU III

Problem Description

As you all know, you are participating in the SYSUCPC (SYSU Constructive Problem Contest) finals. Undoubtedly, the Constructive Kingdom of Sun Yat-sen University is eager for you to tackle some related problems.

Given a string SS containing only lowercase letters, determine the maximum number of disjoint subsequences of length 44 that can be formed, such that all subsequences are sysu\texttt{sysu}. Formally, a subsequence of a string SS is a subset of characters of SS that read from left to right.

A greedy algorithm is currently used: each time, starting from the end, an unused u\texttt{u} is considered, and it is matched with nearest unused s,y,s\texttt{s,y,s} sequentially to form a qualified subsequence, which is then removed.

You are now requested to provide a string SS such that the answer obtained by the greedy method is xx, while the correct answer is yy. If no such SS exists, output 1-1.

Input Format

The only line contains two integers x,y(1x,y105)x,y(1\leq x,y\leq 10^5).

Output Format

A string SS such that the answer obtained by the greedy method is xx, while the correct answer is yy. If no such SS exists, output 1-1. The length of SS must not exceed 4×1054\times 10^5.

1 1
ilovesysu
2 1
-1