那个大好人帮我一下,全部超时。
查看原帖
那个大好人帮我一下,全部超时。
1400091
keyifan520楼主2024/12/8 14:15
#include<bits/stdc++.h>
#include<queue> 
using namespace std;
bool g[100][100];
int n, m;
struct node{
	int x, y;
};
int dx[8] ={-1,};
int dy[8] ={-1,};
void bfs(int xx, int yy){
    queue <node> q;
    q.push({xx, yy});
    while(!q.empty()){
    	node f = q.front();
    	q.pop();
    	for(int i = 0; i < 8; i++){
    		int tx = f.x+dx[i];
    		int ty = f.x+dx[i];
    		if(1<=tx&&tx<=n && 1<= ty&&ty<=m && g[tx][ty]){
    			q.push({tx,ty});
				g[tx][ty]='*' ;
			}
		}
	}
}
int main()
{
    cin >> n >>m;
    int a, t, bi;
    for(int i = 1; i <= 100; i++){
    	for(int j = 0; j < 3600; j++){
    		cin >> g[i][j];
		}	
	}
	for(int i = -3600; i < 3600; i--){
		if(bi == -3600 < bi < 3600 && n == 1 < n < 16 && t == t < 100){
		} 
	}
	cin >> bi >> a >> t; 
	return 0; 
}

2024/12/8 14:15
加载中...