1 条题解
-
0
C++ :
#include<iostream> #include<algorithm> using namespace std; const int N = 51; int available[N], number[N]; int main() { int n, k, p; int i, color, money; long long ans = 0; cin >> n >> k >> p; for (i = 1; i <= n; i++) { cin >> color >> money; if (money <= p) copy(number, number + N, available); ans += available[color]; if (money <= p) available[color]++; number[color]++; } cout << ans << endl; return 0; }
- 1
信息
- ID
- 2636
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者