5 #define rep(i,n) for(i=0; i<n; ++i)
7 int n
,p
,m
,a
[maxn
][maxn
],b
[maxn
][maxn
];
9 int mul(int i
, int j
) {
11 rep(k
,p
) res
+=(a
[i
][k
]*b
[k
][j
]);
16 scanf("%d%d%d",&n
,&p
,&m
);
29 if (!flag
&& (ans
=mul(i
,j
)) != k
) {
37 printf("%d %d\n%d\n",++p
,++q
,ans
);