Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <algorithm>
- #include <string>
- #include <cstring>
- #include <vector>
- #include <cstdio>
- #include <map>
- #include <utility>
- #include <queue>
- #include <stack>
- #include <deque>
- #include <iomanip>
- #include <set>
- #include <fstream>
- #include <ctime>
- #include <cstdlib>
- #define INF (1<<30)
- #define F first
- #define S second
- #define pb push_back
- #define mp make_pair
- #define ll long long
- #define ld long double
- #define lld long long double
- #define pii pair<ll,ll>
- #define mod 1000000007
- #define endl '\n'
- #define BYKKSHJUG jgdlgkfjdglkfg
- // меняй переменные и дефайны
- #define TASKNAME ""
- using namespace std;
- int main(){
- // freopen(TASKNAME".in", "r", stdin);
- // freopen(TASKNAME".out", "w", stdout);
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- int n,m,k;
- cin >> n >> m >> k;
- int cnt = 0;
- for(int i = 1; i <= n; i++){
- for(int j = 1; j <= m; j++){
- for(int z = 1; z <= 2; z++){
- cnt++;
- if(cnt == k){
- if(z==1){
- cout << i << ' ' << j << ' ' << 'L' << endl;
- }else{
- cout << i << ' ' << j << ' ' << 'R' << endl;
- }
- return 0;
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement