提交记录 10845


用户 题目 状态 得分 用时 内存 语言 代码长度
AcFunction 1001. 测测你的排序 Wrong Answer 0 848.813 ms 781284 KB C++11 842 B
提交时间 评测时间
2019-10-05 10:06:31 2020-08-01 02:32:58
#include <bits/stdc++.h>

int b[100000001], B[256]; 

void sort(unsigned *a, int n) {
  for(int i = 1; i <= n; i++) B[a[i] & 255]++; 
  for(int i = 1; i <= 255; i++) B[i] += B[i - 1];
  for(int i = n; i >= 1; i--) b[B[a[i] & 255]--] = a[i]; 
  memset(B, 0, sizeof(B)); 
  for(int i = 1; i <= n; i++) B[(b[i] >> 8) & 255]++; 
  for(int i = 1; i <= 255; i++) B[i] += B[i - 1]; 
  for(int i = n; i >= 1; i--) a[B[(b[i] >> 8) & 255]--] = b[i];
  memset(B, 0, sizeof(B)); 
  for(int i = 1; i <= n; i++) B[(a[i] >> 16) & 255]++; 
  for(int i = 1; i <= 255; i++) B[i] += B[i - 1];
  for(int i = n; i >= 1; i--) b[B[(a[i] >> 16) & 255]--] = a[i]; 
  memset(B, 0, sizeof(B)); 
  for(int i = 1; i <= n; i++) B[(b[i] >> 24) & 255]++; 
  for(int i = 1; i <= 255; i++) B[i] += B[i - 1]; 
  for(int i = n; i >= 1; i--) a[B[(b[i] >> 24) & 255]--] = b[i];
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1848.813 ms762 MB + 996 KBWrong AnswerScore: 0


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