# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
591656 | Devigo | Simple game (IZhO17_game) | C++14 | 1079 ms | 1328 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
const int siz = 0;
const int mod = 0;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> v(n);
for(int i=0; i<n; i++) {
cin >> v[i];
}
while(m--) {
int q; cin >> q;
if(q == 1) {
int pos, val; cin >> pos >> val;
v[pos-1] = val;
}
else {
int cnt = 0; int x; cin >> x;
for(int i=0; i<n-1; i++) {
if(v[i] == x) {
cnt++;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |