voidsolve() { int res = 0; int n, x, y; cin >> n >> x >> y; for (int i = 1; i <= n; i ++) cin >> a[i]; map<PII, int> mp; // #define PII pair<int, int> for (int i = 1; i <= n; i ++) { int dx = a[i] % x, dy = a[i] % y; res += mp[{(x - dx) % x, dy}]; mp[{dx, dy}] ++; } cout << res << '\n'; }