Advertisement
Promi_38

cf 111A

Apr 26th, 2021
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include<bits\stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     long long n, x, y;
  8.     cin >> n >> x >> y;
  9.    
  10.     if(n > y) printf("-1\n");
  11.     else if(((n - 1 + (y - n + 1) * (y - n + 1)) > x) || ((n - 1 + (y - n + 1) * (y - n + 1)) == x))
  12.     {
  13.         for(int i = 0; i < n - 1; i++) printf("1\n");
  14.         cout << y - n + 1 << endl;
  15.     }
  16.     else printf("-1\n");
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement