Submission #7360805


Source Code Expand

Copy
#include <bits/stdc++.h>
// statics
using namespace std;
using int64 = long long;
using PAIR = pair<int64, int64>;
constexpr int INF = 1 << 30;
constexpr int64 LINF = 1LL << 60;
constexpr int MOD = 1e9 + 7;
constexpr int MAX_N = 3e5 + 1;

// init/input
#define int int64
#define INIT ios::sync_with_stdio(false);cin.tie(0);
#define VAR(type, ...) type __VA_ARGS__;MACRO_VAR_Scan(__VA_ARGS__);
template<typename T> void MACRO_VAR_Scan(T &t) {cin>>t;}
template<typename First, typename...Rest> void MACRO_VAR_Scan(First &first, Rest&...rest) {cin>>first;MACRO_VAR_Scan(rest...);}
#define VEC(type, c, n) vector<type> c(n);for(auto &&i:c)cin>>i;

// out
#define OUT(dist) cout<<(dist);
#define FOUT(n, dist) cout<<fixed<<setprecision(n)<<(dist);
#define SP cout<<" ";
#define BR cout<<endl;
#define zero(n) cout<<setfill('0')<<right<<setw(n)
#define debug(x) cerr<<#x<<":"<< (x);BR;

// utility
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EACH(i, a) for(auto &&i:(a))
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RFOR(i, a, b) for(int i=(b)-1;i>=(a);--i)
#define REP(i, n) for(int i=0;i<(n);++i)
#define RREP(i, n) for(int i=(n)-1;i>=0;--i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
int gcd(int a,int b){return b?gcd(b,a%b):a;}

// 最終的に1つを除き全てのりんごが1個ずつで戻ってきてほしい
// 1個減らした状態で全て取りきれば良い
// 全て取りきるためには, 相手に1個残した状態で渡したい
// 相手は1つ取らなければならないので, 複数の山に

// 11000011010100000
// 00111010100110000
// 00100111000100000
// 11111101100010000

// 10
// 01
signed main() {
  INIT;
  VAR(int,n);
  VEC(int,a,n);
  bool ok = false;
  REP(i,n) {
    ok |= (a[i]%2==1);
  }
  OUT(ok?"first":"second")BR;
  
  return 0;
}

Submission Info

Submission Time
Task D - Harlequin
User task4233
Language C++14 (GCC 5.4.1)
Score 500
Code Size 2024 Byte
Status
Exec Time 12 ms
Memory 1152 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status
× 2
× 22
Set Name Test Cases
Sample a01, a02
All a01, a02, b03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22
Case Name Status Exec Time Memory
a01 1 ms 256 KB
a02 1 ms 256 KB
b03 1 ms 256 KB
b04 1 ms 256 KB
b05 1 ms 256 KB
b06 1 ms 256 KB
b07 1 ms 256 KB
b08 1 ms 256 KB
b09 1 ms 256 KB
b10 1 ms 256 KB
b11 1 ms 256 KB
b12 7 ms 1024 KB
b13 12 ms 1024 KB
b14 12 ms 1024 KB
b15 7 ms 1024 KB
b16 11 ms 1024 KB
b17 11 ms 1024 KB
b18 11 ms 1024 KB
b19 11 ms 1152 KB
b20 11 ms 1024 KB
b21 11 ms 1024 KB
b22 11 ms 1024 KB