Search found 1 match

by tooorjo
Fri Aug 29, 2014 10:18 pm
Forum: Volume 3 (300-399)
Topic: 352 - The Seasonal War
Replies: 54
Views: 13026

Re: 352 - The Seasonal War

why wa? #include<iostream> #include<stdio.h> #include<queue> #include<string.h> using namespace std; int n; char pic[30][30]; void bfs(int i, int j) { queue<int> Q; int u,v,w; Q.push(i*n+j); pic[i][j]='0'; while(!Q.empty()) { u=Q.front(); v=u/n; w=u%n; for(int a=v-1;a<=v+1;a++) { if(a<0 || a>=n) con...

Go to advanced search