提交记录 5627


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

typedef struct{ char buffer[64]; } Block;

void my_memset(char *a, char c, unsigned n)
{
	Block b;
	memset(&b, c, sizeof(Block));
	char *p = a;
	a += n;
	for (; p + sizeof(Block) <= a; p += sizeof(Block))
		*(Block *)(p) = b;
	while (p != a)
		*p++ = c;
}

CompilationN/AN/ACompile ErrorScore: N/A


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