Submission #50149989


Source Code Expand

#include <iostream>
#include <vector>

using namespace std;
using ui = unsigned int;

int main()
{
  ui q;
  cin >> q;

  vector<ui> xv;
  for (ui i =0;i<q;i++) {
    ui cmd, xk;
    cin >>cmd >>xk;

    if (cmd == 1){
      xv.push_back(xk);
    } else {
      cout << xv[xv.size()-xk] << endl;
    }
  }

  return 0;
}

Submission Info

Submission Time
Task B - Append
User michimani
Language C++ 20 (Clang 16.0.6)
Score 200
Code Size 344 Byte
Status AC
Exec Time 1 ms
Memory 3628 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 1
AC × 14
Set Name Test Cases
Sample sample_01.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, sample_01.txt
Case Name Status Exec Time Memory
random_01.txt AC 1 ms 3504 KiB
random_02.txt AC 1 ms 3376 KiB
random_03.txt AC 1 ms 3516 KiB
random_04.txt AC 1 ms 3500 KiB
random_05.txt AC 1 ms 3524 KiB
random_06.txt AC 1 ms 3628 KiB
random_07.txt AC 1 ms 3372 KiB
random_08.txt AC 1 ms 3460 KiB
random_09.txt AC 1 ms 3436 KiB
random_10.txt AC 1 ms 3568 KiB
random_11.txt AC 1 ms 3408 KiB
random_12.txt AC 1 ms 3520 KiB
random_13.txt AC 1 ms 3508 KiB
sample_01.txt AC 1 ms 3460 KiB