Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
98674 CSYZxiaojinyu Old Driver Tree C++ 运行出错 20 53 MS 292 KB 399 2023-08-16 12:20:01

Tests(4/7):


#include <bits/stdc++.h> using namespace std; const int MAXN = 8005; int a[MAXN]; int main() { int n, m; cin >> n >> m; for (int i = 1; i <= n; ++i) { cin >> a[i]; } while (m--) { int l, r, c, cnt = 0; cin >> l >> r >> c; for (int i = l; i <= r; ++i) { if (a[i] == c) ++cnt; a[i] = c; } cout << cnt << '\n'; } return 0; }


测评信息: