Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <fstream>
  2.  
  3. using namespace std;
  4. ifstream fin("sir11.in");
  5. ofstream fout("sir11.out");
  6. int main()
  7. {
  8. int n;
  9. fin>>n;
  10. while (n!=2){
  11. if (n%2==0){
  12. fout<<(-n)/2<<' ';
  13. }else {
  14. fout<<(n+1)/2<<' ';
  15. }
  16. n--;
  17. }
  18. fout<<-1<<' '<<1;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement