All pastes #333268 Raw Edit

Unnamed

public cpp v1 · immutable
#333268 ·published 2007-01-30 20:22 UTC
rendered paste body
NIKLAS IS A NOOB LOLZZZ#include <iostream>#include "matrix.h"using namespace std;int main(void) {	long unsigned int highest = 0;	for ( unsigned int y = 0; y < 20; y++ ) {		for ( unsigned int x = 0; x < 17; x++ ) {			long unsigned product = 1;			for ( unsigned int i = x; i < x + 4; i++ ) {				product *= matrix[y][i];				}			if ( product > highest ) { highest = product; }		}	}	for ( unsigned int x = 0; x < 20; x++ ) {		for ( unsigned int y = 0; y < 17; y++ ) {			long unsigned product = 1;			for ( unsigned int i = y; i < y + 4; i++ ) {				product *= matrix[i][x];			}			if ( product > highest ) { highest = product; }		}	}	for ( unsigned int y = 0; y < 17; y++ ) {		for ( unsigned int x = 0; x < 17; x++ ) {			long unsigned int product = 1;			for ( unsigned int i = 0; i < 4; i++ ) {				product *= matrix[y+1][x+1];			} 							if ( product > highest ) { highest = product; }		}		}		cout << highest << endl;}