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