#include <iostream> using namespace std; void operate(int* a, int op, int it, int x){ if(op==1){ a[it - 1] = x; } if(op==2){ int count = 0; for(int i = 0; i < it; i++){ if(a[i]==x) count++; } cout << count << endl; } } int main() { int n, q, op, it, x;//用it存储i,避免与循环变量混淆 cin >...