#P16604. [SYSUCPC 2025] SYSU III

    ID: 16373 Type: RemoteJudge 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: 6 Uploaded By: Tags>2025Special Judge构造Ad-hoc高校校赛

[SYSUCPC 2025] SYSU III

题目描述

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.

输入格式

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

输出格式

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