Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <ctype.h>
  3. #include <stdio.h>
  4.  
  5. using namespace std;
  6. int main()
  7. {long long n,m,k,x,y,u=0,v=0;
  8.     cin>>n>>m>>k>>x>>y;
  9.     cout<<(k-1)/(m*n)+1;
  10.     cout<<k/(m*n);
  11.     if(k/(m*n)%2==0)
  12.     { if(k%(m*n)>=(x-1)*m+y)
  13.             cout<<(k-1)/(m*n)+1<<"A"<<" ";
  14.     else
  15.         cout<<k/(m*n)<<"B";}
  16.     else
  17.     { if(k%(m*n)>=(x-1)*m+y)
  18.          cout<<(k-1)/(m*n)+1<<"D";
  19.     else
  20.          cout<<k/(m*n)<<"C";
  21.         }
  22.            }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement