提出 #75615020
ソースコード 拡げる
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define all(x) (x).begin(), (x).end()
#define pb push_back
template<class T> inline bool chmax(T& a, T b) { return a < b ? a = b, 1 : 0; }
template<class T> inline bool chmin(T& a, T b) { return a > b ? a = b, 1 : 0; }
const int MOD = 1e9 + 7;
void solve() {
int n;cin>>n;
vector<int> a(n);
for(int i=0;i<n;i++)cin>>a[i] ;
int x;cin>>x;
cout<<a[--x]<<'\n';
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int tt = 1;
//cin>>tt;
while (tt--) {
solve();
}
return 0;
}
提出情報
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_00.txt | AC | 1 ms | 3432 KiB |
| 00_sample_01.txt | AC | 1 ms | 3540 KiB |
| 00_sample_02.txt | AC | 1 ms | 3408 KiB |
| 01_random_00.txt | AC | 1 ms | 3408 KiB |
| 01_random_01.txt | AC | 1 ms | 3384 KiB |
| 01_random_02.txt | AC | 1 ms | 3472 KiB |
| 01_random_03.txt | AC | 1 ms | 3472 KiB |
| 01_random_04.txt | AC | 1 ms | 3444 KiB |
| 01_random_05.txt | AC | 1 ms | 3460 KiB |
| 01_random_06.txt | AC | 1 ms | 3404 KiB |