Search found 4 matches

by kh9
Tue May 18, 2004 4:50 am
Forum: Volume 106 (10600-10699)
Topic: 10647 - Optimal House Placement
Replies: 3
Views: 2972

I did that, and got correct results for the sample test cases, but still got WA. Is there some subtle thing that I've missed?
----------------
Update: ok, problem fixed. it's an int overflow mistake (what else is new)...
for whatever reason i stored the locations in an int array, while all other ...
by kh9
Sat Jul 26, 2003 3:15 am
Forum: Volume 103 (10300-10399)
Topic: 10383 - Queen vs Rook
Replies: 8
Views: 4637

Just wondering... is castling a valid move in this problem?
by kh9
Fri Jun 13, 2003 12:11 pm
Forum: Volume 7 (700-799)
Topic: 750 - 8 Queens Chess Problem
Replies: 78
Views: 38919

Still I'm running into problems with input. I even tried this simple code:
[c]
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>

int main ()
{

int row;
int col;

if (scanf ("%d %d", &row, &col)!=2){
return 1;
}
if (row<1 || row>8 || col<1 ||col>8 ){
if (row==20){
assert(0 ...
by kh9
Fri Jun 06, 2003 11:40 pm
Forum: Volume 7 (700-799)
Topic: 750 - 8 Queens Chess Problem
Replies: 78
Views: 38919

I keep getting rejected, and the problem seems to be input:
I 've tried
cin>>R>>C;

and

scanf("%d%d", &R,&C);

but I keep getting 20 for R (i found this out using assert()), which doesn't make sense...

did you guys use any special tricks for input? Or is the input just wrong?
any help is ...

Go to advanced search