Submission #505403

#TimeUsernameProblemLanguageResultExecution timeMemory
505403l3nl3Simple game (IZhO17_game)C++17
0 / 100
1 ms332 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...