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

Submission #171909

Source Code Expand

Copy
```#include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

int main(){
int R,C,D;
cin>>R>>C>>D;
vector<pair<int,pii> >  data;
for(int i = 1;i <= R;i++){
for(int j = 1;j <= C;j++){
int x;
cin>>x;
data.push_back(mp(x,mp(i,j)));
}
}
sort(data.begin(),data.end());
for(int i = 0;i < data.size();i++){
int y = data[data.size() - 1 - i ].second.first;
int x = data[data.size() - 1 - i ].second.second;
if((D - (x + y - 2))>=0&&(D - (x + y - 2))%2 == 0){
cout <<data[data.size() - 1 - i].first;
return 0;
}
}
return 0;
}```

#### Submission Info

Submission Time 2014-05-17 21:46:34+0900 B - 謎の人物X togatoga C++11 (GCC 4.8.1) 0 1347 Byte WA 590 ms 13212 KB

#### Judge Result

Score / Max Score 0 / 0 0 / 60 0 / 40
Status
 WA × 3
 WA × 18
 WA × 30
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
sample_01.txt WA 22 ms 924 KB
sample_02.txt WA 21 ms 736 KB
sample_03.txt WA 22 ms 924 KB
subtask1_01.txt WA 21 ms 800 KB
subtask1_02.txt WA 23 ms 788 KB
subtask1_03.txt WA 22 ms 796 KB
subtask1_04.txt WA 29 ms 1008 KB
subtask1_05.txt WA 22 ms 796 KB
subtask1_06.txt WA 22 ms 796 KB
subtask1_07.txt WA 26 ms 924 KB
subtask1_08.txt WA 24 ms 1056 KB
subtask1_09.txt WA 26 ms 1184 KB
subtask1_10.txt WA 24 ms 1056 KB
subtask1_11.txt WA 26 ms 1056 KB
subtask1_12.txt WA 26 ms 992 KB
subtask1_13.txt WA 26 ms 1064 KB
subtask1_14.txt WA 26 ms 1180 KB
subtask1_15.txt WA 26 ms 1068 KB
subtask2_01.txt WA 21 ms 924 KB
subtask2_02.txt WA 23 ms 764 KB
subtask2_03.txt WA 197 ms 7068 KB
subtask2_04.txt WA 25 ms 932 KB
subtask2_05.txt WA 42 ms 1700 KB
subtask2_06.txt WA 119 ms 3988 KB
subtask2_07.txt WA 356 ms 13196 KB
subtask2_08.txt WA 581 ms 13196 KB
subtask2_09.txt WA 564 ms 13200 KB
subtask2_10.txt WA 553 ms 13204 KB
subtask2_11.txt WA 513 ms 13132 KB
subtask2_12.txt WA 586 ms 13204 KB
subtask2_13.txt WA 590 ms 13212 KB
subtask2_14.txt WA 585 ms 13152 KB
subtask2_15.txt WA 586 ms 13204 KB