Advertisement
a53

sir11

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