← Back to topics
Topic

Back to the barn

Asmirasmir
I pass only on 3 out of 10 tests , but on usaco i pass all 12 of em.Can someone help me with the code ?

http://www.z-trening.com/new/www/html/submit.php?subm_stat=1&submit=7100051319
Dgleich
Well I think you are starting from wrong position...
Asmirasmir
Nice try , i changed it but now i pass 4/10 test any more suggestions? :D

New code:
http://www.z-trening.com/new/www/html/submit.php?subm_stat=1&submit=7100051326
Amtrix
Your reading part fails...
Try on this way:

char buff[20];
int main(){
. . .
for(int i=1;i<r+1;i++){
scanf("%s",&buff);
for(int j=0;j<c;j++)
{
fld[i][j+1]=buff[j];
}
}
. . .
Asmirasmir
tnx it worked.
I just wonder why my version didn't work , it worked on usaco , on windows dev c++ and on g++ on linux >.>
Amtrix
Don't know :P.
Maybe the test cases are a little different here....
Like the rows of the field could be separated by blank letter...
Asmirasmir
yeah but if there were blank spaces or something your version wouldn't work either because of the number of columns.

Anyways , the task is done :D
Amtrix
right :P.... well that was an example only.. ..
Dgleich
O can someone please help me with Alien Party Invites it kind a fails on every test case but everything I can think of works... anyone knows some test case or can admin write some test case?