Search found 2 matches

by 1559
Fri Aug 19, 2011 7:37 pm
Forum: Volume 8 (800-899)
Topic: 871 - Counting Cells in a Blob
Replies: 27
Views: 20420

871 - Counting Cells in a Blob


#include<cstdio>
#include<cstring>
char s[100][100];
int n,c;
bool isvalid(int i,int j)
{
return i>=0 && i<n && j>=0 && j<n;
}

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


void floodfill(int i,int j)
{int k;
if(!isvalid(i,j))
return ;

else if(s[i][j]=='0')
return ;
else ...
by 1559
Fri Aug 19, 2011 4:56 pm
Forum: Volume 110 (11000-11099)
Topic: 11060 - Beverages
Replies: 96
Views: 57502

11060 - Beverages


#pragma warning (disable:4786)
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<cstring>
using namespace std;
vector <int> adj[105];
int col[105];
char str[205][100];
map <string,int> M;
void topo(int u)
{
int i;
if(col ==0)
{
for(i=0;i<adj .size();i++)
{
topo(adj ...

Go to advanced search