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>
#define int long long
using namespace std;
const int N = 1007;
int n, m, a[N];
signed main () {
ios_base::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
while (m--) {
int t;
cin >> t;
if (t == 1) {
int i, x;
cin >> i >> x;
a[i] = x;
} else {
int h;
cin >> h;
int ans = 0;
for (int i = 1; i <= n; i++) {
ans += (h >= a[i]);
}
cout << ans << '\n';
// right, no?
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |