Submission #37505077
Source Code Expand
#include "bits/stdc++.h"
using namespace std;
int main()
{
int N,Q;
cin >> N;
vector<int> v(N);
for(int i=0;i<N;i++)
{
cin >> v.at(i);
}
cin >> Q;
for(int i=0;i<Q;i++)
{
int x, y, z;
cin >> x >> y;
if(x==2)
{
cout << v.at(y-1) << endl;
}else
{
cin >> z;
v.at(y-1) = z;
}
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - First Query Problem |
| User | innomono |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 344 Byte |
| Status | AC |
| Exec Time | 212 ms |
| Memory | 3664 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| 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_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 8 ms | 3388 KiB |
| 00_sample_01.txt | AC | 2 ms | 3360 KiB |
| 00_sample_02.txt | AC | 2 ms | 3392 KiB |
| 01_random_03.txt | AC | 121 ms | 3372 KiB |
| 01_random_04.txt | AC | 154 ms | 3664 KiB |
| 01_random_05.txt | AC | 156 ms | 3296 KiB |
| 01_random_06.txt | AC | 46 ms | 3452 KiB |
| 01_random_07.txt | AC | 91 ms | 3636 KiB |
| 01_random_08.txt | AC | 212 ms | 3664 KiB |
| 01_random_09.txt | AC | 152 ms | 3364 KiB |
| 01_random_10.txt | AC | 159 ms | 3364 KiB |