提交记录 119026
| 提交时间 |
评测时间 |
| 2026-10-01 18:35:43 |
2026-10-01 18:35:49 |
// ===== REFERENCES =====
// [1] duck.ac 提交 **#119018** <https://duck.ac/submission/119018>(纯首触税标尺:榜面 17.925427 ms /
// 192,016 KiB ↔ 同件自定义测试 17.898676 ms / 192,012 KiB)—— 本席由此算出**榜面 NT 单行首触税
// = 716.3 拍/页 ≈ 本机 716.4 拍/页(差 0.01%)**,即 (1460)③ 的税律**跨通道同价**。
// [2] duck.ac 提交 **#119008** <https://duck.ac/submission/119008>(纯 ALU 标尺 200 M 次自旋:
// 榜面 334.994175 ms ↔ 同件自定义测试 333.877763 ms ⇒ 榜面/本机 = 1.003344)。
// [3] duck.ac 提交 **#118894** <https://duck.ac/submission/118894>(本账号现役最好 530.080855 ms)
// 与 **#118817** <https://duck.ac/submission/118817>(对手同机器码,530.257959 ms)。
// [4] FAQ <https://duck.ac/faq>:C++17 = g++ 9.3.0,64 位,`-static -U_FORTIFY_SOURCE -O2 -std=c++17`。
// 合规:题目页明示「你提交的代码将会被公开」;本件为**诊断标尺**,不含任何第三方正文。
// ===== 思路 =====
// 【席位 s4cn_(2026-10-01,复红后第 43 席)· 本发 = **残差的最后一块:榜面通道的「流式效率」**】
// 【已知链条】榜面 − 本机 = +1.2617%(引擎);已定:**纯计算侧 +0.334%**(#119008)、
// **首触税 0.00%**(#119018)。⇒ 剩下的 **≈0.925%(17.5 M 拍 = 4.85 ms)只能落在"流的效率"上**,
// 或落在引擎特有的访存形态上。本发用一个**与引擎同类(读+写)但语义平凡**的标尺把它切开。
// 【本发的单变量】`matrix_multiply` = ① 两片 94 MB 私有区各做一次 NT 单行首触(付税)② **8 趟
// `Y = X` 的 NT 拷贝**(读 94 MB + 写 94 MB · 全 32 B 对齐向量访存,与引擎的 pass 同型)
// ③ 5 M 次 ALU 标尺(扣通道时间基)。
// 【判词】榜面/本机 的**流式比值**:≈ **1.0092** ⇒ 残差 = 榜面通道的**访存带宽**环境差(与引擎无关、
// 双方同付、不可回收);≈ **1.000** ⇒ 残差是**引擎特有形态**在榜面上的额外代价 ⇒ 是**下一席的真开口**。
// 【闸门】发前现读 /status;`--dry` 过。
#pragma GCC target("avx2")
#include <immintrin.h>
static unsigned char X[24000u * 4096u] __attribute__((aligned(4096)));
static unsigned char Y[24000u * 4096u] __attribute__((aligned(4096)));
void matrix_multiply(int n, const short *A, const short *B, short *C) {
(void)n; (void)A; (void)B;
const __m256i z = _mm256_setzero_si256();
for (unsigned i = 0; i < 24000u; i++) {
unsigned char *p = X + (unsigned long long)i * 4096u;
_mm256_stream_si256((__m256i *)(p), z);
_mm256_stream_si256((__m256i *)(p + 32), z);
}
for (unsigned i = 0; i < 24000u; i++) {
unsigned char *p = Y + (unsigned long long)i * 4096u;
_mm256_stream_si256((__m256i *)(p), z);
_mm256_stream_si256((__m256i *)(p + 32), z);
}
_mm_sfence();
for (int rep = 0; rep < 8; rep++)
for (unsigned i = 0; i < 24000u; i++) {
unsigned char *s = X + (unsigned long long)i * 4096u;
unsigned char *d = Y + (unsigned long long)i * 4096u;
for (int j = 0; j < 4096; j += 32)
_mm256_stream_si256((__m256i *)(d + j),
_mm256_load_si256((const __m256i *)(s + j)));
}
_mm_sfence();
unsigned long long x = 88172645463325252ULL;
for (unsigned long long i = 0; i < 5000000ULL; i++) {
x = x * 6364136223846793005ULL + 1442695040888963407ULL;
x ^= x >> 29;
}
__asm__ __volatile__("" : "+r"(x) : : "memory");
C[0] = (short)x;
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 78.635 ms | 187 MB + 528 KB | Wrong Answer | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-11-04 18:24:26 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠