#include <bits/stdc++.h>
using namespace std;
#define SELF_TEST
const int N = 2000 , P = N + 1 ; int a[ N ] [ N ] ;
typedef long long ll; ll sum[ P ] [ P ] ;
typedef long double ldbl;
typedef chrono:: high_resolution_clock Clock_t;
typedef Clock_t:: time_point time_point_t;
time_point_t Now( ) { return Clock_t:: now ( ) ; }
struct Timer_t
{
time_point_t start_time;
Timer_t( ) : start_time( Now( ) ) { }
typedef long double ldbl;
typedef chrono:: nanoseconds nanosec_t;
ll elaped_time( )
{
nanosec_t timer = chrono:: duration_cast < nanosec_t > ( Now( ) - start_time ) ;
return timer.count ( ) ;
}
} ;
struct random_t: mt19937_64
{
random_t( ) : mt19937_64( Clock_t:: now ( ) .time_since_epoch ( ) .count ( ) ) { }
int random( int MIN, int MAX )
{
ll x_min = MIN, x_max = MAX, interval = x_max - x_min + 1 , number = ( * this ) ( ) ;
if ( number < 0 )
number + = LLONG_MAX;
return x_min + ( number % interval ) ;
}
} mt;
inline string time_to_str( const string & prefix, ll elapsed_time )
{
return prefix + " time " + to_string( elapsed_time ) + " msec." ;
}
const string no_solution = "NIE" ;
struct plot_purchase_t
{
ll elapsed_time, iterations, r, s, t; int test_case, k, l, n, a_min;
void answer( Timer_t & timer, string solution )
{
#ifdef SELF_TEST
elapsed_time = timer.elaped_time ( ) / 1000000LL,
solution = "test " + to_string( test_case ) + ": " + solution,
solution + = ", " + time_to_str( "elapsed" , elapsed_time ) ;
#endif
cout << solution;
#ifdef SELF_TEST
cout << endl;
#endif
}
void solve( )
{
Timer_t timer; int x0, y0, x1, y1, x2, y2;
for ( y0 = 0 , y1 = 1 ; y0 < n; y0 = y1++ )
for ( x0 = 0 , x1 = 1 ; x0 < n; x0 = x1++ )
{
auto & z = sum[ y1 ] [ x1 ] ;
z = a[ y0 ] [ x0 ] ,
z + = sum[ y0 ] [ x1 ] ,
z + = sum[ y1 ] [ x0 ] ,
z - = sum[ y0 ] [ x0 ] ;
}
if ( sum[ n ] [ n ] < k or a_min > l )
return answer( timer, no_solution ) ;
if ( sum[ n ] [ n ] <= l )
return answer( timer, "1 1 " + to_string( n ) + " " + to_string( n ) ) ;
for ( y0 = 0 , y1 = 1 ; y0 < n; y0 = y1++ )
for ( x0 = 0 , x1 = 1 ; x0 < n; x0 = x1++ )
if ( a[ y0 ] [ x0 ] <= l )
{
for ( r = sum[ y0 ] [ x0 ] , y2 = y1; y2 <= n; y2++ )
for ( s = sum[ y2 ] [ x0 ] - r, x2 = x1; x2 <= n; x2++ )
if ( ( iterations++ , t = sum[ y2 ] [ x2 ] - sum[ y0 ] [ x2 ] - s ) > l )
break ;
else
if ( t >= k )
{
string solution = to_string( y1 ) + ' ' +
to_string( x1 ) + ' ' +
to_string( y2 ) + ' ' +
to_string( x2 ) ;
#ifdef SELF_TEST
solution + = "\n n = " +
to_string( n ) + ", k = " +
to_string( k ) + ", " +
to_string( iterations ) + " iteration(s), sum / k = " +
to_string( ldbl( t ) / ldbl( k ) ) ;
#endif
return answer( timer, solution ) ;
}
}
return answer( timer, no_solution ) ;
}
plot_purchase_t( int t = 0 ) : elapsed_time( 0 ) , iterations( 0 ) ,
test_case( t ) , a_min( INT_MAX )
{
#ifdef SELF_TEST
k = mt.random ( 1 , 1000000000 ) ,
n = mt.random ( 1 , 2000 ) ;
for ( int y0 = 0 ; y0 < n; y0++ )
for ( int x0 = 0 ; x0 < n; x0++ )
a[ y0 ] [ x0 ] = mt.random ( 1 , 2000000000 ) ;
a[ 1999 ] [ 1999 ] = 200000001 ;
#else
cin >> k >> n;
for ( int y0 = 0 ; y0 < n; y0++ )
for ( int x0 = 0 ; x0 < n; x0++ )
cin >> a[ y0 ] [ x0 ] ;
#endif
memset ( sum, 0 , sizeof sum ) ;
for ( int y0 = 0 ; y0 < n; y0++ )
for ( int x0 = 0 ; x0 < n; x0++ )
a_min = min( a_min, a[ y0 ] [ x0 ] ) ;
l = 2 * k, solve( ) ;
}
} ;
template < typename T > struct data_analysis_t
{
T min_value, max_value, sum; int count;
data_analysis_t( ) : min_value( LLONG_MAX ) , max_value( LLONG_MIN ) ,
sum( 0 ) , count( 0 ) { }
void add_value( T x )
{
min_value = min( min_value, x ) ,
max_value = max( max_value, x ) ,
sum + = x,
count++ ;
}
ldbl avg_value( ) const
{
return ldbl( sum ) / ldbl( count ) ;
}
friend ostream& operator << ( ostream & output, const data_analysis_t & x )
{
output << "avg " << ldbl( x.sum ) / ldbl( x.count ) << ", " ,
output << "min " << x.min_value << ", " ,
output << "max " << x.max_value ;
return output;
}
} ;
int main( )
{
ios_base:: sync_with_stdio ( false ) , cin .tie ( nullptr ) , cout .tie ( nullptr ) ;
#ifdef SELF_TEST
int tests; cin >> tests; assert ( tests > 0 ) ;
data_analysis_t< ll > elapsed_time, iterations, n, k;
data_analysis_t< ldbl > s;
for ( int i = 0 ; i < tests; i++ )
{
plot_purchase_t problem( i ) ;
elapsed_time.add_value ( problem.elapsed_time ) ,
iterations.add_value ( problem.iterations ) ,
n.add_value ( problem.n ) ,
k.add_value ( problem.k ) ,
s.add_value ( ldbl( problem.t ) / ldbl( problem.k ) ) ;
}
cout << "elapsed time: " << elapsed_time << endl,
cout << "iteration(s): " << iterations << endl,
cout << "n : " << n << endl,
cout << "k : " << k << endl,
cout << "sum / k : " << s << endl;
#else
plot_purchase_t problem; problem.solve ( ) ;
#endif
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKI2RlZmluZSBTRUxGX1RFU1QKCmNvbnN0IGludCBOID0gMjAwMCwgUCA9IE4gKyAxOyBpbnQgYVsgTiBdWyBOIF07Cgp0eXBlZGVmIGxvbmcgbG9uZyBsbDsgIGxsIHN1bVsgUCBdWyBQIF07Cgp0eXBlZGVmIGxvbmcgZG91YmxlIGxkYmw7Cgp0eXBlZGVmIGNocm9ubzo6aGlnaF9yZXNvbHV0aW9uX2Nsb2NrIENsb2NrX3Q7Cgp0eXBlZGVmIENsb2NrX3Q6OnRpbWVfcG9pbnQgICAgICB0aW1l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gICAgICAgICB6ICs9IHN1bVsgeTEgXVsgeDAgXSwKICAgICAgICAgICAgICAgIHogLT0gc3VtWyB5MCBdWyB4MCBdOwogICAgICAgICAgICB9CgoKICAgICAgICBpZiAoIHN1bVsgbiBdWyBuIF0gPCBrIG9yIGFfbWluID4gbCApCiAgICAgICAgICAgIHJldHVybiBhbnN3ZXIoIHRpbWVyLCBub19zb2x1dGlvbiApOwoKICAgICAgICBpZiAoIHN1bVsgbiBdWyBuIF0gPD0gbCApCiAgICAgICAgICAgIHJldHVybiBhbnN3ZXIoIHRpbWVyLCAiMSAxICIgKyB0b19zdHJpbmcoIG4gKSArICIgIiArIHRvX3N0cmluZyggbiApICk7CgogICAgICAgIGZvciggeTAgPSAwLCB5MSA9IDE7IHkwIDwgbjsgeTAgPSB5MSsrICkKICAgICAgICAgICAgZm9yKCB4MCA9IDAsIHgxID0gMTsgeDAgPCBuOyB4MCA9IHgxKysgKQogICAgICAgICAgICAgICAgaWYgKCBhWyB5MCBdWyB4MCBdIDw9IGwgKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGZvciggciA9IHN1bVsgeTAgXVsgeDAgXSwgeTIgPSB5MTsgeTIgPD0gbjsgeTIrKyApCiAgICAgICAgICAgICAgICAgICAgICAgIGZvciggcyA9IHN1bVsgeTIgXVsgeDAgXSAtIHIsIHgyID0geDE7IHgyIDw9IG47IHgyKysgKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCAoIGl0ZXJhdGlvbnMrKywgdCA9IHN1bVsgeTIgXVsgeDIgXSAtIHN1bVsgeTAgXVsgeDIgXSAtIHMgKSA+IGwgKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggdCA+PSBrICkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyBzb2x1dGlvbiA9ICAgdG9fc3RyaW5nKCB5MSApICsgJyAnICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b19zdHJpbmcoIHgxICkgKyAnICcgKwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvX3N0cmluZyggeTIgKSArICcgJyArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9fc3RyaW5nKCB4MiApOwojaWZkZWYgU0VMRl9URVNUCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvbHV0aW9uICs9ICAgICAiXG5uID0gIiArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b19zdHJpbmcoIG4gKSArICIsIGsgPSAiICsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvX3N0cmluZyggayApICsgIiwgIiArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b19zdHJpbmcoIGl0ZXJhdGlvbnMgKSArICIgaXRlcmF0aW9uKHMpLCBzdW0gLyBrID0gIiArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b19zdHJpbmcoIGxkYmwoIHQgKSAvIGxkYmwoIGsgKSApOwojZW5kaWYKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFuc3dlciggdGltZXIsIHNvbHV0aW9uICk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHJldHVybiBhbnN3ZXIoIHRpbWVyLCBub19zb2x1dGlvbiApOwogICAgfQoKICAgIHBsb3RfcHVyY2hhc2VfdCggaW50IHQgPSAwICkgOgllbGFwc2VkX3RpbWUoIDAgKSwgaXRlcmF0aW9ucyggMCApLAoJCQl0ZXN0X2Nhc2UoIHQgKSwgYV9taW4oIElOVF9NQVggKQogICAgewoKI2lmZGVmIFNFTEZfVEVTVAoKICAgICAgICAgIGsgPSBtdC5yYW5kb20oIDEsIDEwMDAwMDAwMDAgKSwKICAgICAgICAgIG4gPSBtdC5yYW5kb20oIDEsIDIwMDAgKTsKCgogICAgICAgIGZvciggaW50IHkwID0gMDsgeTAgPCBuOyB5MCsrICkKICAgICAgICAgICAgZm9yKCBpbnQgeDAgPSAwOyB4MCA8IG47IHgwKysgKQogICAgICAgICAgICAgICAgYVsgeTAgXVsgeDAgXSA9IG10LnJhbmRvbSggMSwgMjAwMDAwMDAwMCApOwoKICAgICAgICBhWyAxOTk5IF1bIDE5OTkgXSA9IDIwMDAwMDAwMTsKI2Vsc2UKCiAgICAgICAgY2luID4+IGsgPj4gbjsKCiAgICAgICAgZm9yKCBpbnQgeTAgPSAwOyB5MCA8IG47IHkwKysgKQogICAgICAgICAgICBmb3IoIGludCB4MCA9IDA7IHgwIDwgbjsgeDArKyApCiAgICAgICAgICAgICAgICBjaW4gPj4gYVsgeTAgXVsgeDAgXTsKCiNlbmRpZgoKICAgICAgICBtZW1zZXQoIHN1bSwgMCwgc2l6ZW9mIHN1bSApOwoKICAgICAgICBmb3IoIGludCB5MCA9IDA7IHkwIDwgbjsgeTArKyApCiAgICAgICAgICAgIGZvciggaW50IHgwID0gMDsgeDAgPCBuOyB4MCsrICkKICAgICAgICAgICAgICAgIGFfbWluID0gbWluKCBhX21pbiwgYVsgeTAgXVsgeDAgXSApOwoKICAgICAgIGwgPSAyICogaywgc29sdmUoKTsKICAgIH0KCn07Cgp0ZW1wbGF0ZTwgdHlwZW5hbWUgVCA+IHN0cnVjdCBkYXRhX2FuYWx5c2lzX3QKewogICAgVCBtaW5fdmFsdWUsIG1heF92YWx1ZSwgc3VtOyBpbnQgY291bnQ7CgogICAgZGF0YV9hbmFseXNpc190KCkgOiBtaW5fdmFsdWUoIExMT05HX01BWCApLCBtYXhfdmFsdWUoIExMT05HX01JTiApLAogICAgICAgICAgICAgICAgICAgICAgICBzdW0oIDAgKSwgY291bnQoIDAgKSB7fQoKICAgIHZvaWQgYWRkX3ZhbHVlKCBUIHggKQogICAgewogICAgICAgIG1pbl92YWx1ZSA9IG1pbiggbWluX3ZhbHVlLCB4ICksCiAgICAgICAgbWF4X3ZhbHVlID0gbWF4KCBtYXhfdmFsdWUsIHggKSwKICAgICAgICBzdW0gICAgICArPSB4LAogICAgICAgIGNvdW50Kys7CiAgICB9CgogICAgbGRibCBhdmdfdmFsdWUoKSBjb25zdAogICAgewogICAgICAgIHJldHVybiBsZGJsKCBzdW0gKSAvIGxkYmwoIGNvdW50ICk7CiAgICB9CgogICAgZnJpZW5kIG9zdHJlYW0mIG9wZXJhdG9yIDw8ICggb3N0cmVhbSAmb3V0cHV0LCBjb25zdCBkYXRhX2FuYWx5c2lzX3QgJnggKQogICAgewogICAgICAgIG91dHB1dCA8PCAiYXZnICIgPDwgbGRibCggeC5zdW0gKSAvIGxkYmwoIHguY291bnQgKSA8PCAiLCAiLAogICAgICAgIG91dHB1dCA8PCAibWluICIgPDwgeC5taW5fdmFsdWUgPDwgIiwgIiwKICAgICAgICBvdXRwdXQgPDwgIm1heCAiIDw8IHgubWF4X3ZhbHVlOwoKICAgICAgICByZXR1cm4gb3V0cHV0OwogICAgfQp9OwoKaW50IG1haW4oKQp7CiAgICBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKCBmYWxzZSApLCBjaW4udGllKCBudWxscHRyICksIGNvdXQudGllKCBudWxscHRyICk7CgojaWZkZWYgU0VMRl9URVNUCgogICAgaW50IHRlc3RzOyBjaW4gPj4gdGVzdHM7IGFzc2VydCggdGVzdHMgPiAwICk7CgogICAgZGF0YV9hbmFseXNpc190PCBsbCA+IGVsYXBzZWRfdGltZSwgaXRlcmF0aW9ucywgbiwgazsKCiAgICBkYXRhX2FuYWx5c2lzX3Q8IGxkYmwgPiBzOwoKICAgIGZvciggaW50IGkgPSAwOyBpIDwgdGVzdHM7IGkrKyApCiAgICB7CiAgICAgICAgcGxvdF9wdXJjaGFzZV90IHByb2JsZW0oIGkgKTsKCiAgICAgICAgZWxhcHNlZF90aW1lLmFkZF92YWx1ZSggcHJvYmxlbS5lbGFwc2VkX3RpbWUgKSwKICAgICAgICAgIGl0ZXJhdGlvbnMuYWRkX3ZhbHVlKCBwcm9ibGVtLml0ZXJhdGlvbnMgICApLAogICAgICAgICAgICAgICAgICAgbi5hZGRfdmFsdWUoIHByb2JsZW0ubiAgICAgICAgICAgICksCiAgICAgICAgICAgICAgICAgICBrLmFkZF92YWx1ZSggcHJvYmxlbS5rICAgICAgICAgICAgKSwKICAgICAgICAgICAgICAgICAgIHMuYWRkX3ZhbHVlKCBsZGJsKCBwcm9ibGVtLnQgKSAvIGxkYmwoIHByb2JsZW0uayApICk7CiAgICB9CgogICAgY291dCA8PCAiZWxhcHNlZCB0aW1lOiAiIDw8IGVsYXBzZWRfdGltZSA8PCBlbmRsLAogICAgY291dCA8PCAiaXRlcmF0aW9uKHMpOiAiIDw8IGl0ZXJhdGlvbnMgPDwgZW5kbCwKICAgIGNvdXQgPDwgIm4gICAgICAgICAgIDogIiA8PCBuIDw8IGVuZGwsCiAgICBjb3V0IDw8ICJrICAgICAgICAgICA6ICIgPDwgayA8PCBlbmRsLAogICAgY291dCA8PCAic3VtIC8gayAgICAgOiAiIDw8IHMgPDwgZW5kbDsKCiNlbHNlCgogICAgcGxvdF9wdXJjaGFzZV90IHByb2JsZW07IHByb2JsZW0uc29sdmUoKTsKCiNlbmRpZgp9Cg==
stdout
test 0: 1 1 2 1
n = 769, k = 393825606, 3 iteration(s), sum / k = 1.934313, elapsed time 1 msec.
test 1: 1 7 1 7
n = 323, k = 363312108, 325 iteration(s), sum / k = 1.645742, elapsed time 0 msec.
test 2: 1 1 1 1
n = 57, k = 777295349, 1 iteration(s), sum / k = 1.886416, elapsed time 0 msec.
test 3: 1 2 1 2
n = 936, k = 651598796, 1 iteration(s), sum / k = 1.377248, elapsed time 2 msec.
test 4: 1 3 1 3
n = 475, k = 543468849, 477 iteration(s), sum / k = 1.395010, elapsed time 0 msec.
test 5: 1 11 1 11
n = 132, k = 119637833, 1 iteration(s), sum / k = 1.735845, elapsed time 0 msec.
test 6: 1 8 1 8
n = 1120, k = 155075975, 1 iteration(s), sum / k = 1.696990, elapsed time 3 msec.
test 7: 1 3 1 3
n = 1444, k = 194390918, 1 iteration(s), sum / k = 1.261075, elapsed time 4 msec.
test 8: 1 4 1 4
n = 414, k = 457467209, 1 iteration(s), sum / k = 1.711714, elapsed time 0 msec.
test 9: 1 1 1 2
n = 1921, k = 988840422, 2 iteration(s), sum / k = 1.147386, elapsed time 7 msec.
elapsed time: avg 1.7, min 0, max 7
iteration(s): avg 81.3, min 1, max 477
n : avg 759.1, min 57, max 1921
k : avg 4.64491e+08, min 119637833, max 988840422
sum / k : avg 1.57917, min 1.14739, max 1.93431