Submission #75964

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
759642018-09-11 17:03:24Vardanyan호화 벙커 (IZhO13_burrow)C++14
0 / 100
2051 ms4128 KiB
#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int t[N][4*N];
int a[N][N];
void build(int row,int v,int l,int r){
if(l == r){
t[row][v] = a[row][l];
return;
}
int m = (l+r)/2;
build(row,v*2,l,m);
build(row,v*2+1,m+1,r);
t[row][v] = min(t[row][v*2],t[row][v*2+1]);
}
int query(int row,int v,int s,int e,int l,int r){
if(l>r) return 1000*1000*1000+5;
if(s == l && e == r) return t[row][v];
int m = (s+e)/2;
return min(query(row,v*2,s,m,l,min(m,r)),query(row,v*2+1,m+1,e,max(l,m+1),r));
}
int main(){
int n,m,k;
scanf("%d%d%d",&n,&m,&k);
for(int i = 1;i<=n;i++){
for(int j = 1;j<=m;j++) scanf("%d",&a[i][j]);
build(i,1,1,m);
}
int mxans = 0;
int mxs = k;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

burrow.cpp: In function 'int main()':
burrow.cpp:24:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d%d",&n,&m,&k);
     ~~~~~^~~~~~~~~~~~~~~~~~~
burrow.cpp:26:38: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         for(int j = 1;j<=m;j++) scanf("%d",&a[i][j]);
                                 ~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...