Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- int main()
- {
- int m, n, x, z, y;
- scanf("%d", &n);
- if (n==1)
- {
- x=-1;
- printf("%d\n", x);
- fflush(stdout);
- }
- else
- {
- if (n%2==0)
- {
- printf("%d\n%d\n%d\n", 2, n/2, n/2+1);
- fflush(stdout);
- }
- else
- {
- printf("%d\n%d\n%d\n%d\n", 3, (n-1)/2, (n+1)/2, (n+3)/2);
- fflush(stdout);
- }
- while (true)
- {
- scanf("%d", &m);
- if (m==-1) break;
- if (m==3)
- {
- scanf("%d%d%d", &x, &z, &y);
- printf("%d\n%d\n%d\n%d\n", m, n-y+1, n-z+1, n-x+1);
- fflush(stdout);
- }
- else
- {
- scanf("%d%d", &x, &z);
- printf("%d\n%d\n%d\n", m, n-z+1, n-x+1);
- fflush(stdout);
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement