提交记录 34369
| 提交时间 |
评测时间 |
| 2026-08-14 23:04:13 |
2026-08-14 23:04:16 |
// Probe: 2-level Fenwick in natural order (WRONG, just measures time).
typedef unsigned u32;
static u32 topFen[40000];
static u32 botFen[10001000];
void count_2d(int n, const unsigned *x, const unsigned *y, unsigned *out) {
(void)x;
int NB = n >> 8;
for (int i = 0; i < n; ++i) {
u32 yy = y[i]; u32 b = yy >> 8, c = yy & 255;
u32 s = 0;
for (u32 j = b; j; j &= j-1) s += topFen[j];
u32 base = b << 8;
for (u32 j = c; j; j &= j-1) s += botFen[base+j];
out[i] = s;
for (u32 j = c+1; j <= 256; j += j&-j) botFen[base+j]++;
for (u32 j = b+1; j <= (u32)NB; j += j&-j) topFen[j]++;
}
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 804.442 ms | 76 MB + 468 KB | Wrong Answer | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-09-09 01:06:45 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠