how to get postive prefix in sequence

后端 未结 0 1119
长发绾君心
长发绾君心 2020-12-13 01:37

You are given two positive integers N and K, where K≤N. Find a sequence A1,A2,…,AN such that:

for each valid i, Ai is either i or −i there are exactly K values of i s

相关标签:
回答
  • 消灭零回复
提交回复
热议问题