谁能做出来这道题(通过率0%)
2023-10-06 13:44:09
发布于:浙江
73阅读
0回复
0点赞
谁能做出来这道题(通过率0%)
全部评论 3
白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白白rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrgggggggggggggggggggggggggggggggggggggggggggggggg
2025-03-13 来自 浙江
0现在有人做了:
#include <bits/stdc++.h> #define x first #define y second using namespace std; typedef pair<int, int> PII; const int N = 100010; int n, m, T; int score[N], last[N]; bool st[N]; PII q[N]; int main() { scanf("%d%d%d", &n, &m, &T); for (int i = 0; i < m; i ++ ) scanf("%d%d", &q[i].x, &q[i].y); sort(q, q + m); for (int i = 0; i < m;) { int j = i; while (j < m && q[j] == q[i]) j ++ ; int t = q[i].x, id = q[i].y, cnt = j - i; i = j; score[id] -= t - last[id] - 1; if (score[id] < 0) score[id] = 0; if (score[id] <= 3) st[id] = false; score[id] += cnt * 2; if (score[id] > 5) st[id] = true; last[id] = t; } for (int i = 1; i <= n; i ++ ) if (last[i] < T) { score[i] -= T - last[i]; if (score[i] <= 3) st[i] = false; } int res = 0; for (int i = 1; i <= n; i ++ ) res += st[i]; printf("%d\n", res); return 0; }
2025-03-12 来自 浙江
0很轻松啊
2023-10-06 来自 广东
0是的,并不是很难,但没人做,我暂时不想做这道题
2023-10-06 来自 浙江
0
有帮助,赞一个