Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- ifstream fin("sir11.in");
- ofstream fout("sir11.out");
- int main()
- {
- int n;
- fin>>n;
- while (n!=2){
- if (n%2==0){
- fout<<(-n)/2<<' ';
- }else {
- fout<<(n+1)/2<<' ';
- }
- n--;
- }
- fout<<-1<<' '<<1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement