/** * @file 2560.cpp * @brief yukicoder No.2560 A_1 < A_2 < ... < A_N * @author Keitaro Naruse * @date 2023-12-02 * @copyright MIT License * @details https://yukicoder.me/problems/no/2560 * */ // # Solution #include #include template < class T > std::ostream& operator<<( std::ostream& os, const std::vector< T >& v ) { for( auto it = v.begin( ); it != v.end( ); it++ ) { os << *it << ( it == --v.end( ) ? "" : " " ); } return os; } int main( ) { // Read T = [ 1, 10^5 ] int T; std::cin >> T; // Multiple queries for( int t = 0; t < T; t++ ) { // Read N = [ 1, 2*10^5 ], X = [ 1, 10^18 ] long long N; long long X; std::cin >> N >> X; // Main::Preprocess std::vector< long long > A( N ); for( int i = 0; i < N; i++ ) { A.at( i ) = ( long long ) ( i + 1 ); } // Main::Find a solution A.at( N - 1 ) += X - N * ( N + 1LL ) / 2LL; // Main::Output a solution if( A.at( N - 1 ) >= N ) { std::cout << A << std::endl; } else { std::cout << -1 << std::endl; } } // Finalize return 0; }