/* -*- coding: utf-8 -*- * * 1208.cc: No.1208 anti primenumber game - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 200000; /* typedef */ typedef long long ll; /* global variables */ ll as[MAX_N]; ll dp0[MAX_N + 1], dp1[MAX_N + 1]; /* subroutines */ /* main */ int main() { int n; ll m; scanf("%d%lld", &n, &m); for (int i = 0; i < n; i++) scanf("%lld", as + i); for (int i = n - 1; i >= 0; i--) { ll d0 = (as[i] - 1) + dp0[i + 1]; ll d1 = as[i] - m + dp1[i + 1]; if (as[i] > 1 && d0 >= d1) dp0[i] = d0, dp1[i] = 1 - m + dp1[i + 1]; else dp0[i] = d1, dp1[i] = dp0[i + 1]; } if (dp0[0] > dp1[0]) puts("First"); else puts("Second"); return 0; }