SDNU1241北望村八卦阵

博客详细讨论了在SDNU1241比赛中遇到的两个关键错误:一是未及时标记导致的时间限制错误(TLE),二是忽视了特定的输出格式,未输出'IMPOSSIBLE',这两个问题对比赛成绩产生了直接影响。
摘要由CSDN通过智能技术生成

提交的两次重要错误:

1.标记问题,访问完成后没有及时标记,造成TLE

2.输出格式问题,没有输出IMPOSSIBLE 

#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
#include<vector>
#include<cmath>
#include<map>
#include<stack>
using namespace std;
const int maxn=1e2+3;
char mapp[maxn][maxn];
bool vis[maxn][maxn];
int pp,qq;
int X,Y;
/**L,W**/
bool flag[2];
struct node
{
    int x;
    int y;
    int st;
} p[maxn*maxn];
int n,m,res;
int step[4][2]= {
  {0,-1},{0,1},{1,0},{-1,0}};
void bfs()
{
    int xx,yy,st,x,y;
    flag[0]=flag[1];//0-l
    while(pp<qq)
    {
        st=p[pp].st+1;
        xx=p[pp].x;
        yy=p[pp].y;
        for(int i=0; i<4; ++i)
        {
            x=xx+step[i][0];
            y=yy+step[i][1];
            if(x<0||x
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值