#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1e3+5;
const int pos[4][2]={-1,0,0,-1,1,0,0,1};
int n,m;
bool vis[MAXN][MAXN];
int dis[MAXN][MAXN];
char a[MAXN][MAXN];
struct node{
int x,y,step,dic;
bool operater < (const node &t) const{
return step>t.step;
}
}now,nt;
bool bfs(int xs,int ys,int xe,int ye){
q.push(Node{xs,ys,0});
vis[xs][ys]=1
while(!q.empty()){
now = q.top();q.pop();
if(now.x==xe && now.y==ye){
printf("%d",)
return;
}
for(int i=0;i<4;i++){
nt.x=now.x+pos[i][0];
nt.y=now.y+pos[i][1];
int x = getstep(a[now.x][now.y],i);
for(int j = 1;j<= 3;j++){
nt.x = now.x+pos[i][0]*j;
nt.y = now.y+pos[i][1]*j;
if(nt.x<0 || nt.x>=n||nt.y<0||nt.y>=n) break;
if(a[nt.x][nt.y]=='#') break;
if(vis) continue;
vis[nt.x][nt.y] = 1;
nt.step = now.step+1+x;
a[nt.x][nt.y]=
q.push(nt);
}
}
}
}#include<bits/stdc++.h>
#include<windows.h>
#include<time.h>
#include<conio.h>
using namespace std;
int xr=0,evtask,jctask,wltask,hdtask,evtas,jctas,wltas,hdtas;
char ch;
void Read()
{
ifstream in("萤火突击存档.log");
in.close();
}
void Save()
{
ofstream out("萤火突击存档.log");
out.close();
}
void tasks(){
system("cls");
printf("1:主线任务;\n2:悬赏任务;\n3:日常任务;\n4:赛季任务;");
ch = getchar();
if(ch == 59){
if(hdtask == 0){
printf("收到一个来自海蒂的任务!\n");
hdtask += 1;
}
}
}
void startup(){
printf("1:进入避难所\n2:用户中心");
ch = getchar();
if(ch == 49){
return;
}
if(ch == 50){
printf("暂未开放!");
//players();
}
else{
return;
}
}
int main(){
startup();
for(;;){
system("cls");
printf("1:任务区\n2:活动区\n3:部署区\n4:商店区");
ch = getchar();
if(ch == 49) tasks();
if(ch == 50) //actvities();
if(ch == 51) //maps();
if(ch == 52) //shop();
else{
system("cls");
printf("请重新输入");
}
}
}不是哥们
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1e5+5;
bool vis[MAXN][MAXN];
struct node{
int x,y,step;
}q[MAXN*MAXN];
int a[MAXN][MAXN];
int pos[4][2]={-1,0,0,-1,1,0,0,1};
void bfs(int xs,int ys,int xe,int ye,int n,int m){
int front = 1,rear = 0;
memset(vis,0,sizeof(vis));
memset(a,0,sizeof(a));
q[++rear]={xs,ys,0};
vis[xs][ys] = 0;
while(front <= rear){
node now = q[++rear];
if(now.x==xe&&now.y==ye){
printf("%d\n",now.step);
return;
}
for(int i = 0;i<4;i++){
node nt;
nt.x=now.x+pos[i][0];
nt.y=now.y+pos[i][1];
if(nt.x<0 || nt.x>=n||nt.y<0||nt.y>=n){
continue;
}
if(a[nt.x][nt.y]=='#') continue;
if(vis[nt.x][nt.y]) continue;
vis[nt.x][nt.y]=1;
nt.step = now.step + 1;
q[++rear] = nt;
}
}
printf("No");
}
int main(){
}战绩可查
rks15.30217
AP:
micro vav
蝎虎天体
chronomia
Don’t never around
future mind
重生
you are the miserable