Search found 2 matches

by amrupam
Tue Mar 17, 2009 7:41 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 124945

Re: 10189 - Minesweeper

I dont know why it does not work
anyone's help will be appriciated

#include <stdio.h>
int board[100][100];
int nrow, ncol;
void init_board(int nrow,int ncol){
int j;
for(int i=0;i<nrow;i++)
for(j=0;j<ncol;j++)
board[i][j]=0;
}

bool isValid(int i,int j)
{
if(i<0 || i>(nrow-1) || j<0 || j ...
by amrupam
Mon Mar 16, 2009 7:30 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318270

Re: If you get WA in problem 100, read me before post!

Hi, can any one understand what is the problem with my code

#include <stdio.h>

unsigned long i,j,a,b;
unsigned long length(unsigned long);


int main(int argc, char *argv[] ) {
while ( !feof(stdin)){
scanf("%u %u",&i,&j);
unsigned long x,max=0,y;

//swap variables
if(i>j){a=j;b=i;}
else ...

Go to advanced search