即使把程式簡化成下列,還是會逾時
#include <iostream>
using namespace std;
int main()
{
int n,r,c,j,k,i,input;
while (cin >> n)
{
for (i=1;i<=n;i++)
{
cin >> r;
cin >> c;
for (j=1;j<=r;j++)
{
for (k=1;k<=c;k++)
{
cin>>input;
}}
cout <<"1 1\n";
cout <<"1\n";
}
}
return 0;
}