← Discussion

Output Limit Exceeded

Gandom · 2014-03-23 15:50:54

salam casi mitune chandta test case bede? chon man har test casi ke be zehnam resid dadm va barnamam dorost khoruji mide vali Output Limit Exceeded mikhore!!!

AMiR · 2014-03-24 21:40:33

You should read the input like this:

int t; cin>>t;
while(t--){
    cin>>n>>m;
    // process the input
}

Gandom · 2014-04-02 16:37:48

bazam Output Limit Exceeded dad;

man intori neveshte budam:

for ( cin >> N; N; N-- ){

    ...

}

fec nakonam eshtebah bashe chon kheili az soala ro intori accept kardam!!!!

che kar konam?

AMiR · 2014-04-03 18:34:26

So I guess you should pay more attention to the input boundries.

Try to generate test cases with maximum M and N and test your code against giant test-cases. Or you can modify your allocated arrays with bigger sizes and submit it again to see what happens.

pages:
  • 1