代码传输 请在传输代码时每行加换行 以便他人使用 (不欢迎李秉卓)

10 条评论

  • #include<bits/stdc++.h> using namespace std; int main(){ cout<<"Hello,World!"<<endl; return 0; }

    答案复制

    • @ 2025-8-28 15:55:04

      只展示中间代码 这题其实不难 不要被他给迷惑了 cout<<"Hello,World!"<<endl; 就可以了!

      • @ 2025-7-2 12:22:43

        点击下方即可递交

        • @ 2025-7-1 21:30:09

          a

          • @ 2025-7-1 13:25:36

            #include <bits/stdc++.h>

            using namespace std;

            struct node{

            int x,y;
            

            };

            int n,m;

            char mq[101][101];

            int vis[101][101];

            int dy[4]={1,0,0,-1};

            int dy[4]={0,1,-1,0};

            queue q;

            void bfs(){

            node a=(1,1);
            
            vis[1][1]=1;
            
            q.push(a);
            

            int main(){

            return 0;

            }

            • @ 2025-7-1 13:24:21

              while(!q.empty()){

              node f=q.front;
              
              if(mp[f.x][f.y]=='*'){
              
              	cout << "YES";
              
              	return;
              
              }
              
              for(int i=0;i<4;i++){
              
              	int tx=f.x+dx[i];
              
              	int ty=f.y+dy[i];
              
              	if(tx=1&&tx<=n&&ty>=1&&ty<=m&&mp[tx][ty]!='#'&&vis[tx][ty]==0){
              
              		vis[tx][ty]=1;
                
              		node r={tx,ty};
                
              		q.push(r);
                
              	}
              
              }
              
              q.pop();
              

              }

              cout << "NO";

              }

              int main(){

              cin>>n>>m;
              
              for(int i=0;i<=n;i++){
              
              	for(int j=0;j<=m;j++){
              
              		cin>>mp[i][j];
                
              	}
              
              }
              
              if(mp[1][1]=='#'){
              
              	cout << "NO";
              
              	return 0;
              
              }
              
              bfs();
              
              return 0;
              

              }

              • @ 2025-7-1 12:56:42

                李秉卓不是人

                • @ 2025-7-1 11:23:05

                  node f=q.front();

                  if(mq[f.x][f.y]==2){

                  cout << "YES";
                  
                  return 0;
                  

                  }

                  for(int i=0;i<4;i++){

                  int nx=f.x+dx[i];
                  
                  int ny=f.y+dy[i];
                  
                  if(nx>=1&&nx<=4&&ny>=1&&ny<=4&&mq[]nx[ny]!=1&&vis[nx][ny]==0){
                  
                  	vis[nx][ny]=1;
                  
                  	node r={nx,ny};
                  
                  	q.push(r);
                  
                  }
                  

                  }

                  q.pop

                  }

                  cout << "NO";

                  • @ 2025-7-1 11:19:44

                    #include <bits/stdc++.h>

                    using namespace std;

                    struct nods{

                    int x;
                    
                    int y;
                    

                    };

                    int mq[5][5],vis[5][5],dx[4]=

                    {1,0,-1,0},dy[4]={0,1,-1,0};

                    queue q;

                    int main(){

                    for(int i=1;i<=4;i++){
                    
                    	for(int j=1;j<=4;j++){
                    
                    		cin>>mq[i][j];
                      
                    	}
                    
                    }
                    
                    node a={1,1};
                    
                    vis[1][1]=1;
                    
                    q.push(a);
                    
                    while(!q.empty()){
                    
                    }
                    

                    return 0;

                    }

                    • 1

                    信息

                    ID
                    3
                    时间
                    1000ms
                    内存
                    256MiB
                    难度
                    7
                    标签
                    (无)
                    递交数
                    3107
                    已通过
                    809
                    上传者