Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctype.h>
- #include <stdio.h>
- using namespace std;
- int main()
- {long long n,m,k,x,y,u=0,v=0;
- cin>>n>>m>>k>>x>>y;
- cout<<(k-1)/(m*n)+1;
- cout<<k/(m*n);
- if(k/(m*n)%2==0)
- { if(k%(m*n)>=(x-1)*m+y)
- cout<<(k-1)/(m*n)+1<<"A"<<" ";
- else
- cout<<k/(m*n)<<"B";}
- else
- { if(k%(m*n)>=(x-1)*m+y)
- cout<<(k-1)/(m*n)+1<<"D";
- else
- cout<<k/(m*n)<<"C";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement