提交记录 5336


用户 题目 状态 得分 用时 内存 语言 代码长度
temp6 1001. 测测你的排序 Accepted 100 811.022 ms 781264 KB C++ 5.78 KB
提交时间 评测时间
2018-08-17 16:02:30 2020-08-01 00:15:50
unsigned * limit,* key,buffer0[256],buffer8[256],buffer16[256],buffer24[256],b[100000000];
void sort(unsigned * a,int n)
{
	for (limit = a + n - 7,key = a;key < limit;++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key,++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key,++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key,++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key,++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key,++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key,++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key,++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key);
	switch (a + n - key)
	{
		case 7:
			++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key;
		case 6:
			++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key;
		case 5:
			++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key;
		case 4:
			++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key;
		case 3:
			++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key;
		case 2:
			++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key;
		case 1:
			++ buffer0[* key & 255],++ buffer8[* key >> 8 & 255],++ buffer16[* key >> 16 & 255],++ buffer24[* key >> 24 & 255],++ key;
	}
	for (limit = buffer0 + 255,key = buffer0;key < limit;* key += * key ++);
	for (limit = a + 7,key = a + n - 1;key >= limit;b[-- buffer0[* key & 255]] = * key,-- key,b[-- buffer0[* key & 255]] = * key,-- key,b[-- buffer0[* key & 255]] = * key,-- key,b[-- buffer0[* key & 255]] = * key,-- key,b[-- buffer0[* key & 255]] = * key,-- key,b[-- buffer0[* key & 255]] = * key,-- key,b[-- buffer0[* key & 255]] = * key,-- key,b[-- buffer0[* key & 255]] = * key,-- key);
	switch (key - a)
	{
		case 6:
			b[-- buffer0[* key & 255]] = * key,-- key;
		case 5:
			b[-- buffer0[* key & 255]] = * key,-- key;
		case 4:
			b[-- buffer0[* key & 255]] = * key,-- key;
		case 3:
			b[-- buffer0[* key & 255]] = * key,-- key;
		case 2:
			b[-- buffer0[* key & 255]] = * key,-- key;
		case 1:
			b[-- buffer0[* key & 255]] = * key,-- key;
		case 0:
			b[-- buffer0[* key & 255]] = * key,-- key;
	}
	for (limit = buffer8 + 255,key = buffer8;key < limit;* key += * key ++);
	for (limit = b + 7,key = b + n - 1;key >= limit;a[-- buffer8[* key >> 8 & 255]] = * key,-- key,a[-- buffer8[* key >> 8 & 255]] = * key,-- key,a[-- buffer8[* key >> 8 & 255]] = * key,-- key,a[-- buffer8[* key >> 8 & 255]] = * key,-- key,a[-- buffer8[* key >> 8 & 255]] = * key,-- key,a[-- buffer8[* key >> 8 & 255]] = * key,-- key,a[-- buffer8[* key >> 8 & 255]] = * key,-- key,a[-- buffer8[* key >> 8 & 255]] = * key,-- key);
	switch (key - b)
	{
		case 6:
			a[-- buffer8[* key >> 8 & 255]] = * key,-- key;
		case 5:
			a[-- buffer8[* key >> 8 & 255]] = * key,-- key;
		case 4:
			a[-- buffer8[* key >> 8 & 255]] = * key,-- key;
		case 3:
			a[-- buffer8[* key >> 8 & 255]] = * key,-- key;
		case 2:
			a[-- buffer8[* key >> 8 & 255]] = * key,-- key;
		case 1:
			a[-- buffer8[* key >> 8 & 255]] = * key,-- key;
		case 0:
			a[-- buffer8[* key >> 8 & 255]] = * key,-- key;
	}
	for (limit = buffer16 + 255,key = buffer16;key < limit;* key += * key ++);
	for (limit = a + 7,key = a + n - 1;key >= limit;b[-- buffer16[* key >> 16 & 255]] = * key,-- key,b[-- buffer16[* key >> 16 & 255]] = * key,-- key,b[-- buffer16[* key >> 16 & 255]] = * key,-- key,b[-- buffer16[* key >> 16 & 255]] = * key,-- key,b[-- buffer16[* key >> 16 & 255]] = * key,-- key,b[-- buffer16[* key >> 16 & 255]] = * key,-- key,b[-- buffer16[* key >> 16 & 255]] = * key,-- key,b[-- buffer16[* key >> 16 & 255]] = * key,-- key);
	switch (key - a)
	{
		case 6:
			b[-- buffer16[* key >> 16 & 255]] = * key,-- key;
		case 5:
			b[-- buffer16[* key >> 16 & 255]] = * key,-- key;
		case 4:
			b[-- buffer16[* key >> 16 & 255]] = * key,-- key;
		case 3:
			b[-- buffer16[* key >> 16 & 255]] = * key,-- key;
		case 2:
			b[-- buffer16[* key >> 16 & 255]] = * key,-- key;
		case 1:
			b[-- buffer16[* key >> 16 & 255]] = * key,-- key;
		case 0:
			b[-- buffer16[* key >> 16 & 255]] = * key,-- key;
	}
	for (limit = buffer24 + 255,key = buffer24;key < limit;* key += * key ++);
	for (limit = b + 7,key = b + n - 1;key >= limit;a[-- buffer24[* key >> 24 & 255]] = * key,-- key,a[-- buffer24[* key >> 24 & 255]] = * key,-- key,a[-- buffer24[* key >> 24 & 255]] = * key,-- key,a[-- buffer24[* key >> 24 & 255]] = * key,-- key,a[-- buffer24[* key >> 24 & 255]] = * key,-- key,a[-- buffer24[* key >> 24 & 255]] = * key,-- key,a[-- buffer24[* key >> 24 & 255]] = * key,-- key,a[-- buffer24[* key >> 24 & 255]] = * key,-- key);
	switch (key - b)
	{
		case 6:
			a[-- buffer24[* key >> 24 & 255]] = * key,-- key;
		case 5:
			a[-- buffer24[* key >> 24 & 255]] = * key,-- key;
		case 4:
			a[-- buffer24[* key >> 24 & 255]] = * key,-- key;
		case 3:
			a[-- buffer24[* key >> 24 & 255]] = * key,-- key;
		case 2:
			a[-- buffer24[* key >> 24 & 255]] = * key,-- key;
		case 1:
			a[-- buffer24[* key >> 24 & 255]] = * key,-- key;
		case 0:
			a[-- buffer24[* key >> 24 & 255]] = * key,-- key;
	}
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1811.022 ms762 MB + 976 KBAcceptedScore: 100


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