Submission #171917


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
Task B - 謎の人物X
User togatoga
Language C++ (G++ 4.6.4)
Score 0
Code Size 1347 Byte
Status WA
Exec Time 596 ms
Memory 13208 KB

Judge Result

Set Name Sample Subtask1 Subtask2
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
Subtask1 sample_01.txt, sample_02.txt, sample_03.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt
Subtask2 subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt, subtask2_01.txt, subtask2_02.txt, subtask2_03.txt, subtask2_04.txt, subtask2_05.txt, subtask2_06.txt, subtask2_07.txt, subtask2_08.txt, subtask2_09.txt, subtask2_10.txt, subtask2_11.txt, subtask2_12.txt, subtask2_13.txt, subtask2_14.txt, subtask2_15.txt
Case Name Status Exec Time Memory
sample_01.txt WA 22 ms 916 KB
sample_02.txt WA 21 ms 916 KB
sample_03.txt WA 21 ms 924 KB
subtask1_01.txt WA 21 ms 744 KB
subtask1_02.txt WA 20 ms 800 KB
subtask1_03.txt WA 21 ms 932 KB
subtask1_04.txt WA 26 ms 1056 KB
subtask1_05.txt WA 21 ms 800 KB
subtask1_06.txt WA 22 ms 928 KB
subtask1_07.txt WA 25 ms 928 KB
subtask1_08.txt WA 25 ms 1056 KB
subtask1_09.txt WA 25 ms 1184 KB
subtask1_10.txt WA 25 ms 1052 KB
subtask1_11.txt WA 26 ms 1056 KB
subtask1_12.txt WA 26 ms 1008 KB
subtask1_13.txt WA 26 ms 1052 KB
subtask1_14.txt WA 25 ms 1060 KB
subtask1_15.txt WA 26 ms 1068 KB
subtask2_01.txt WA 22 ms 912 KB
subtask2_02.txt WA 21 ms 744 KB
subtask2_03.txt WA 198 ms 7056 KB
subtask2_04.txt WA 23 ms 924 KB
subtask2_05.txt WA 42 ms 1696 KB
subtask2_06.txt WA 112 ms 4112 KB
subtask2_07.txt WA 367 ms 13208 KB
subtask2_08.txt WA 572 ms 13196 KB
subtask2_09.txt WA 564 ms 13204 KB
subtask2_10.txt WA 567 ms 13200 KB
subtask2_11.txt WA 520 ms 13200 KB
subtask2_12.txt WA 591 ms 13200 KB
subtask2_13.txt WA 595 ms 13192 KB
subtask2_14.txt WA 591 ms 13204 KB
subtask2_15.txt WA 596 ms 13196 KB