呜呜菜鸡0分!!!

P1102 A-B 数对

把代码发出来谢谢
by Meteorium @ 2023-09-19 21:45:28


做法假了
by ruruo @ 2023-09-19 21:46:39


A和B不一定相邻。
by howie09 @ 2023-09-19 21:47:02


```cpp #include<bits/stdc++.h> using namespace std; int main() { map<int, int> m; long long n, c, a[200005], ans = 0; cin >> n >> c; for(int i = 1; i <= n; i++){ cin >> a[i]; m[a[i]]++; } for(int i = 1; i <= n; i++){ ans += m[a[i] + c]; } cout << ans << endl; return 0; } ```
by ruruo @ 2023-09-19 21:47:03


@[howie09](/user/625847) ???RE [https://www.luogu.com.cn/record/125248435](https://www.luogu.com.cn/record/125248435)
by learn_code_guan @ 2023-09-19 21:49:54


@[learn_code_guan](/user/938629) 数组开小了
by _O_v_O_ @ 2023-09-19 21:50:56


@[learn_code_guan](/user/938629) RE就是数组开小了
by Meteorium @ 2023-09-19 21:53:10


And then TLE…… https://www.luogu.com.cn/record/125249388
by learn_code_guan @ 2023-09-19 21:54:26


@[_O_v_O_](/user/782941) @[F12aaaaaaa](/user/920043)
by learn_code_guan @ 2023-09-19 21:54:56


@[learn_code_guan](/user/938629) 你的复杂度太高,暴力过不了
by howie09 @ 2023-09-19 21:55:10


| 下一页