HBC209730EasyConstruction题解

你曾走过我的故事 算法基础篇 45 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。
n. If there are multiple solutions, print any of them. If there is no solution, print "-1" in one line.

Roundgod is given  n_{}, k_{} n ​ ,k ​ , construct a permutation  P P of 1sim n 1∼n satisfying that for all integers i_{} i ​ in [1, n]_{} [1,n] ​ , there exists a contiguous subarray in P P of length i_{} i ​ whose sum is k k modulo n n. If there are multiple solutions, print any of them. If there is no solution, print "-1" in one line.

HBC209730EasyConstruction题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
不断学习,不断挑战,才能在编程领域中脱颖而出!全网最全C++题库,助您成为编程高手!

标签: HBC209730EasyConstruction题解