I have exactly the same problem on test 20. I figured out (with binary search on what assertions failed) that some rope isn't matched, and after that I read your message, and, just for the sake of being precise, rewrote my code in the following way, copypasting from yours:

#define ASSERT(x) if (!(x)) while (1) cout << 1;else 1

...

int t[1000][4];

int n;

int main()

{

int i, j;

cin >> n;

for (i=1; i<=n; i++)

scanf("%*d %d %d %d", t[i], t[i]+1, t[i]+2);

for (i=1; i<=n; i++) for (j=0; j<3; j++) if (t[i][j]>0)

if ( t[t[i][j]][0]!=i && t[t[i][j]][1]!=i && t[t[i][j]][2]!=i )

ASSERT(false);

...

}

This code gets Output Limit Exceeded on test 20. Replacing ASSERT(false) with ASSERT(true) in that line makes it get Crash at test 20, which means this exact assertion has failed.

Admins, please clarify.

[EDITED BY RYBAK]

The story looks very similar. Instead of ASSERT(false) I wrote:

{

cout << "1.0000";

return 0;

}

and got AC. Still I wonder how everyone else treat such situation?

*Edited by author 02.03.2006 21:15*