题号:NC210588 时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒 空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M Special Judge, 64bit IO Format: %lld
题目描述
You are given a prime number p, you want to find a permutation of numbers , denoted as , such that for all , or .
输入描述:
The first line contains an integer indicating the number of test cases. For each test case, there is one prime number in the first line. It's guaranteed that .
输出描述:
If there is no solution for this prime, print '-1'. Otherwise print p-1 integers .