提交记录 20737
提交时间 |
评测时间 |
2023-12-11 18:50:23 |
2023-12-11 18:50:26 |
#include <cstring>
template <class Tp> void DoNotOptimize(Tp& value) {
asm volatile("" : "+m,r"(value) : : "memory");
}
int main() {
const int n = 1e6;
static int a[n], b[n];
for (int k = 0; k < 1000; k++) {
memcpy(a, b, sizeof a);
memcpy(a, b, sizeof a);
}
for (int i = 0; i < n; i++) DoNotOptimize(a[i]);
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 234.92 ms | 3 MB + 840 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-07-23 21:32:11 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠