paranid5

1_Tehnokubok

Oct 25th, 2020
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <cstdio>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int t = 0;
  7.     scanf("%d", &t);
  8.  
  9.     while (t--)
  10.     {
  11.         int n = 0;
  12.         scanf("%d", &n);
  13.  
  14.         for (int i = 0; i < n; i += 2)
  15.         {
  16.             int x = 0, y = 0;
  17.             scanf("%d%d", &x, &y);
  18.             printf("%d %d ", -y, x);
  19.         }
  20.     }
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment