Submission #171379


Source Code Expand

Copy
#include <cstdio>
#include <vector>
#include <cstring>
#include <functional>
#include <algorithm>
#include <math.h>
#include <bitset>
#include <set>
#include <queue>
#include <iostream>
#include <string>
#include <sstream>
#include <stack>
#include <complex>
#include <numeric>
#include <map>
#include <time.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef pair<int,int> pii;
typedef pair<int,ll> pil;
typedef pair<ll,int> pli;
typedef pair<int,pii> pip;
typedef pair<pii,int> ppi;
typedef pair<pii,pii> ppp;
typedef pair<ll,ll> pll;
typedef pair<double,int> pdi;
typedef pair<double,double> pdd;
typedef vector<double> vec;
typedef vector<vec> mat;
#define rep(i,n) for (int (i) = 0; (i) < (n); (i)++)
#define repn(i,a,n) for (int (i) = (a); (i) < (n); (i)++)
#define ALL(x) (x).begin(),(x).end()
#define pb push_back
#define SORT(x) sort((x).begin(),(x).end())
#define SORTN(x,n) sort((x),(x)+(n))
#define ERASE(x) (x).erase(unique((x).begin(),(x).end()),(x).end())
#define COUNT(x,c) count((x).begin(),(x).end(),(c))
#define REMOVE(x,c) (x).erase(remove((x).begin(),(x).end(),(c)),(x).end())
#define REVERSE(x) reverse((x).begin(),(x).end())
#define FORIT(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))-(x).begin()
#define lb(x,a) lower_bound((x).begin(),(x).end(),(a))
#define LBN(x,a,n) lower_bound((x),(x)+(n),(a))-(x)
#define lbN(x,a,n) lower_bound((x),(x)+(n),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))-(x).begin()
#define ub(x,a) upper_bound((x).begin(),(x).end(),(a))
#define BS(x,a) binary_search((x).begin(),(x).end(),(a))
#define BS2(x,n,a) binary_search((x),(x)+(n),(a))
#define NB(x) (((x)&~((x)+((x)&-(x))))/((x)&-(x))>>1)|((x)+((x)&-(x)))
#define NP(x) next_permutation((x).begin(),(x).end())
#define MM(x,p) memset((x),(p),sizeof(x))
#define SQ(x) (x)*(x)
#define SC(c1,c2) strcmp(c1,c2)==0
#define mp make_pair
#define INF (1<<29)
#define INFL (1LL<<50)
#define fi first
#define se second
#define MOD 1000000007
#define EPS 1e-8

int R,C,D,T;

int main()
{
	scanf("%d%d%d",&R,&C,&D);
	int ans=0;
	rep(i,R)rep(j,C)
	{
		scanf("%d",&T);
		if(i+j<=D&&(i+j)%2==D%2)ans=max(ans,T);
	}
	printf("%d\n",ans);
}

Submission Info

Submission Time
Task B - 謎の人物X
User namonakiacc
Language C++ (G++ 4.6.4)
Score 100
Code Size 2353 Byte
Status AC
Exec Time 422 ms
Memory 924 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:69:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
./Main.cpp:73:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]

Judge Result

Set Name Sample Subtask1 Subtask2
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
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 AC 21 ms 916 KB
sample_02.txt AC 23 ms 796 KB
sample_03.txt AC 23 ms 912 KB
subtask1_01.txt AC 20 ms 920 KB
subtask1_02.txt AC 20 ms 768 KB
subtask1_03.txt AC 25 ms 816 KB
subtask1_04.txt AC 21 ms 916 KB
subtask1_05.txt AC 20 ms 920 KB
subtask1_06.txt AC 24 ms 916 KB
subtask1_07.txt AC 24 ms 924 KB
subtask1_08.txt AC 25 ms 916 KB
subtask1_09.txt AC 21 ms 916 KB
subtask1_10.txt AC 30 ms 804 KB
subtask1_11.txt AC 25 ms 816 KB
subtask1_12.txt AC 25 ms 920 KB
subtask1_13.txt AC 25 ms 920 KB
subtask1_14.txt AC 49 ms 796 KB
subtask1_15.txt AC 25 ms 920 KB
subtask2_01.txt AC 21 ms 924 KB
subtask2_02.txt AC 24 ms 888 KB
subtask2_03.txt AC 64 ms 880 KB
subtask2_04.txt AC 22 ms 800 KB
subtask2_05.txt AC 49 ms 800 KB
subtask2_06.txt AC 45 ms 880 KB
subtask2_07.txt AC 151 ms 796 KB
subtask2_08.txt AC 205 ms 804 KB
subtask2_09.txt AC 220 ms 796 KB
subtask2_10.txt AC 216 ms 808 KB
subtask2_11.txt AC 160 ms 792 KB
subtask2_12.txt AC 361 ms 800 KB
subtask2_13.txt AC 375 ms 792 KB
subtask2_14.txt AC 284 ms 796 KB
subtask2_15.txt AC 422 ms 808 KB