Contest Duration: - (local time) (90 minutes) Back to Home

Submission #171727

Source Code Expand

Copy
```#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <queue>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <cassert>
#include <iomanip>

using namespace std;

#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
typedef long long ll;
typedef complex<int> P;
typedef pair<int,int> pii;
const double EPS = 1e-10;
const double PI  = acos(-1.0);
template <class F, class T> void convert(const F &f, T &t){	stringstream ss; ss << f; ss >> t;}

bool solve(){
int r, c, d;
cin>> r>> c>> d;
vector<vector<int> > a(r, vector<int>(c));
for(int i=0;i<r;i++){
for(int j=0;j<c;j++){
cin>> a[i][j];
}
}

int ans = 0;
for(int i=0;i<=d && i<r;i++){
for(int j=0;j<=d && j<c;j++){
int ij = i+j;
if(ij > d) break;
if(ij%2 != d%2) continue;
ans = max(ans, a[i][j]);
}
}

cout<< ans<< endl;
return true;
}

int main(){
cout.setf(ios::fixed); cout.precision(10);
solve();
return 0;
}

```

#### Submission Info

Submission Time 2014-05-17 21:25:42+0900 B - 謎の人物X yokabb C++ (G++ 4.6.4) 100 1167 Byte AC 439 ms 4792 KB

#### Judge Result

Score / Max Score 0 / 0 60 / 60 40 / 40
Status
 AC × 3
 AC × 18
 AC × 30
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
sample_01.txt AC 25 ms 896 KB
sample_02.txt AC 24 ms 796 KB
sample_03.txt AC 23 ms 916 KB
subtask1_01.txt AC 23 ms 920 KB
subtask1_02.txt AC 23 ms 884 KB
subtask1_03.txt AC 22 ms 920 KB
subtask1_04.txt AC 26 ms 956 KB
subtask1_05.txt AC 22 ms 736 KB
subtask1_06.txt AC 23 ms 916 KB
subtask1_07.txt AC 24 ms 916 KB
subtask1_08.txt AC 24 ms 920 KB
subtask1_09.txt AC 27 ms 964 KB
subtask1_10.txt AC 25 ms 908 KB
subtask1_11.txt AC 27 ms 960 KB
subtask1_12.txt AC 27 ms 964 KB
subtask1_13.txt AC 26 ms 732 KB
subtask1_14.txt AC 25 ms 920 KB
subtask1_15.txt AC 25 ms 920 KB
subtask2_01.txt AC 24 ms 932 KB
subtask2_02.txt AC 24 ms 980 KB
subtask2_03.txt AC 138 ms 2084 KB
subtask2_04.txt AC 22 ms 916 KB
subtask2_05.txt AC 39 ms 1044 KB
subtask2_06.txt AC 80 ms 1536 KB
subtask2_07.txt AC 283 ms 4692 KB
subtask2_08.txt AC 401 ms 4772 KB
subtask2_09.txt AC 401 ms 4760 KB
subtask2_10.txt AC 395 ms 4760 KB
subtask2_11.txt AC 344 ms 4760 KB
subtask2_12.txt AC 410 ms 4792 KB
subtask2_13.txt AC 402 ms 4768 KB
subtask2_14.txt AC 399 ms 4776 KB
subtask2_15.txt AC 439 ms 4768 KB