@各位大佬

bc03 黄金三 2022-09-15 18:03:23 2022-09-15 18:03:52 1

#include

using namespace std;

int b[150001];

int main() {

long long n, c, t = 0;


scanf("%d %d", &n, &c);


for (int i = 1; i <= n; i++) cin >> b[i];


for (int i = 1; i <= n; i++) {


    for (int j = 2; j <= n; j++) {


        if (b[j] - b[i] == c)


            t++;


    }


}


printf("%d", t);


return 0;

}

1153怎么超时了???????

{{ vote && vote.total.up }}