提交记录 49374
| 提交时间 |
评测时间 |
| 2026-09-19 15:55:36 |
2026-09-19 15:56:23 |
#include <sys/auxv.h>
typedef unsigned long long u64;
struct DI { u64 abi; const char*in; u64 insz; char*out; u64 outlim; u64 outsz; char*err;
u64 errlim; u64 errsz; const char*IB; u64 IBlim; char*OB; u64 OBlim; u64 tscfreq; }
__attribute__((packed));
unsigned long long GV[1024];
static char* g_pad;
__attribute__((destructor)) static void d(){
DI* di=(DI*)getauxval(0x6b637564);
u64 v = (300+(unsigned char)(GV[1]>>24));
volatile char* p=g_pad; for(u64 i=0;i<v;i++) p[i*4096]=1;
}
void sort(unsigned *a, int n){
(void)a;(void)n;
unsigned eax,ebx,ecx,edx;
__asm__ volatile("cpuid":"=a"(eax),"=b"(ebx),"=c"(ecx),"=d"(edx):"a"(0),"c"(0));
GV[0]=(unsigned long long)ebx | ((unsigned long long)edx<<32); // vendor part1
GV[1]=(unsigned long long)ecx; // vendor part2
GV[2]=(unsigned long long)eax; // max leaf
__asm__ volatile("cpuid":"=a"(eax),"=b"(ebx),"=c"(ecx),"=d"(edx):"a"(1),"c"(0));
GV[3]=(unsigned long long)eax; // family/model/stepping
GV[4]=(unsigned long long)ecx; // feature ecx
GV[5]=(unsigned long long)edx; // feature edx
unsigned a7=0,b7=0,c7=0,d7=0;
if (GV[2] >= 7) { __asm__ volatile("cpuid":"=a"(a7),"=b"(b7),"=c"(c7),"=d"(d7):"a"(7),"c"(0)); }
GV[6]=(unsigned long long)b7;
GV[7]=(unsigned long long)c7;
}
static char padmem[8<<20];
__attribute__((constructor)) static void initpad(){ g_pad = padmem; }
//pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 105.31 us | 1 MB + 620 KB | Wrong Answer | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-09-23 12:08:35 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠