CF690F3.Tree of Life (hard)
NOI/NOI+/CTSC
通过率:0%
时间限制:8.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
To add insult to injury, the zombies have taken all but two drawings from Heidi! Please help her recover the Tree of Life from only these two drawings.
雪上加霜的是,僵尸们拿走了海蒂所有的画作,仅剩下两幅!请仅凭这两幅画帮助她复原“生命之树”。
输入格式
The input format is the same as in the medium version, except that now the bound on n is 2 ≤ n ≤ 1000 and that k = 2.
输入格式与中等难度版本相同,只是此时对 n 的约束变为 2 ≤ n ≤ 1000,且 k = 2。
输出格式
The same as in the medium version.
与中等难度版本相同。
输入输出样例
输入#1
1 9 2 6 4 3 5 4 6 1 8 6 8 2 7 1 5 8 6 8 7 8 1 7 3 5 1
输出#1
YES 2 1 3 1 5 4 6 5 7 6 8 5 9 8 1 4
输入解题思路,AI测评打分。不知道怎么写?