#include<bits/stdc++.h>
using namespace std;
#define N 105
int m, n, x, y, k;
char s;
int arr[N][N];
// U D L R
void process() {
int count = arr[x][y];
arr[x][y] = arr[x][y] ? 0 : 1;
switch(s) {
case 'U':
if(count == 0) {
s = 'L';
y--;
}else {
s = 'R';
y++;
}
break;
case 'D':
if(count == 0) {
s = 'R';
y++;
}else {
s = 'L';
y--;
}
break;
case 'L':
if(count == 0) {
s = 'D';
x++;
}else {
s = 'U';
x--;
}
break;
case 'R':
if(count == 0) {
s = 'U';
x--;
}else {
s = 'D';
x++;
}
}
}
int main() {
cin >> m
蓝桥杯,省赛,兰顿蚂蚁,密码脱落
最新推荐文章于 2024-04-30 21:59:37 发布