Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <iostream>
- #include <iomanip>
- #include <cmath>
- #include <vector>
- #include <set>
- #include <map>
- #include <string>
- #include <cassert>
- #include <numeric>
- #include <queue>
- using namespace std;
- #define int long long
- #define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
- const long long INF = 1e18 + 7;
- const double EPS = 1e-6;
- const int N = 310;
- const int MOD = 1e9 + 7;
- int n, m;
- void Move(int& x, int& y, string& dir) {
- if (dir == "DL") {
- if (x == n - 1 && y == 0) {
- --x;
- ++y;
- dir = "UR";
- return;
- }
- if (x == n - 1 && y != 0) {
- --x;
- --y;
- dir = "UL";
- return;
- }
- if (x != n - 1 && y == 0) {
- ++x;
- ++y;
- dir = "DR";
- return;
- }
- ++x;
- --y;
- }
- if (dir == "DR") {
- if (x == n - 1 && y == m - 1) {
- --x;
- --y;
- dir = "UL";
- return;
- }
- if (x == n - 1 && y != m - 1) {
- --x;
- ++y;
- dir = "UR";
- return;
- }
- if (x != n - 1 && y == m - 1) {
- ++x;
- --y;
- dir = "DL";
- return;
- }
- ++x;
- ++y;
- }
- if (dir == "UL") {
- }
- }
- void solve() {
- int x1, y1, x2, y2;
- cin >> n >> m >> x1 >> y1 >> x2 >> y2;
- --x1, --y1;
- --x2, --y2;
- string dir;
- cin >> dir;
- vector<vector<bool>> used(n, vector<bool>(m, false));
- int cnt = n * m;
- int x = x1, y = y1;
- while (cnt > 0 && (x != x2 || y != y2)) {
- used[x][y] = true;
- }
- }
- int32_t main() {
- IOS;
- int t = 1;
- cin >> t;
- while (t--) {
- solve();
- }
- return 0;
- }
Advertisement
Advertisement