#pragma GCC optimize("Ofast")
#pragma GCC target("avx2,popcnt,bmi,bmi2")
void count_5da(const unsigned **x, unsigned *out, int M, int N) {
#define n 100000
#define P(k) {x[k][i+M]}
#define Q(k) (r[0][k]<x[0][j+N] & r[1][k]<x[1][j+N] & r[2][k]<x[2][j+N] & r[3][k]<x[3][j+N])
for (int i=0; i<n; i+=1) { int r[5][1] = {P(0),P(1),P(2),P(3)}; for (int j=0; j<n; ++j) {
out[j+N] += Q(0);
}}
}
#undef n
void count_4d(int n, const unsigned **x, unsigned *out) {
count_5da(x, out, 0, 0);
count_5da(x, out, 0, 100000);
count_5da(x, out, 0, 200000);
count_5da(x, out, 100000, 0);
count_5da(x, out, 100000, 100000);
count_5da(x, out, 100000, 200000);
count_5da(x, out, 200000, 0);
count_5da(x, out, 200000, 100000);
count_5da(x, out, 200000, 200000);
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 15 s | 1 MB + 156 KB | Time Limit Exceeded | Score: 0 | 显示更多 |