提交记录 20738
提交时间 |
评测时间 |
2023-12-11 18:50:44 |
2023-12-11 18:50:46 |
#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(b, a, sizeof a);
}
for (int i = 0; i < n; i++) DoNotOptimize(a[i]);
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 535.966 ms | 7 MB + 652 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-07-23 21:43:15 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠