提交记录 12222


用户 题目 状态 得分 用时 内存 语言 代码长度
user1 1007. 测测你的memset Compile Error 0 0 ns 0 KB C++11 259 B
提交时间 评测时间
2020-03-17 02:00:15 2020-08-01 02:52:47
#include<string.h>
inline void m(int q, int* a, unsigned n) {
n&=~15;
while(n){a[0]=a[1]=a[2]=a[3]=q;n-=16;a+=4;}
}
void my_memset(char *a, char c, unsigned n) {
while(15&(int)a)*a++=c,--n;
int q=c*0x1010101;
m(q,(int*)a,n);
a[n-4]=a[n-8]=a[n-12]=a[n-16]=q;
}

CompilationN/AN/ACompile ErrorScore: N/A


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