fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. string f(string a , int n , int x , int m) {
  5. if(x == n) return a;
  6. if(m > 40) return "-1";
  7. f(a + "1 " , n , (2*x)-1 , m + 1);
  8. f(a + "2 " , n , (2*x)+1 , m + 1);
  9. }
  10.  
  11. int main() {
  12. int t , n;
  13. cin >> t;
  14. while(t--) {
  15. cin >> n;
  16. if(n % 2 == 0) cout<<"-1";
  17. else {
  18. //string b = f("" , n , 1 , 0);
  19. cout<<"-1"<<" ";
  20. }
  21. cout<<"\n";
  22. }
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5284KB
stdin
1
3

stdout
-1