提交记录 5631


用户 题目 状态 得分 用时 内存 语言 代码长度
negiizhao 1007. 测测你的memset Compile Error 0 0 ns 0 KB C 240 B
提交时间 评测时间
2018-08-31 17:45:45 2020-08-01 00:20:21
#include <string.h>

void my_memset(char *a, char c, unsigned n)
{
	int x = c << 24 | c << 16 | c << 8 | c;
	while ((int)(a) & 3)
		*a++ = c, --n;
	while (n & 3)
		a[--n] = c;
	char *p = a;
	for (a += n; p != a; p += 4)
		*(int *)(p) = x;
}

CompilationN/AN/ACompile ErrorScore: N/A


Judge Duck Online | 评测鸭在线
Server Time: 2026-04-11 13:35:17 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠