提交记录 38965
| 提交时间 |
评测时间 |
| 2026-08-15 08:47:56 |
2026-08-15 08:48:55 |
// Probe: determine input format + whether tasklib arrays match DuckInfo stdin.
#include <cstring>
#include <sys/auxv.h>
typedef unsigned long long u64;
struct DuckInfo{u64 abi_version;const char*stdin_ptr;u64 stdin_size;char*stdout_ptr;u64 stdout_limit;u64 stdout_size;char*stderr_ptr;u64 stderr_limit;u64 stderr_size;const char*IB_ptr;u64 IB_limit;char*OB_ptr;u64 OB_limit;u64 tsc_frequency;}__attribute__((packed));
static int E_MODE = 2;
void count_4d(int n, const unsigned *x[4], unsigned *out) {
struct DuckInfo *d = (struct DuckInfo*)getauxval(0x6b637564);
// parse first integer from stdin
const char* p = d->stdin_ptr; const char* e = p + d->stdin_size;
u64 v = 0;
while(p<e && (*p<'0'||*p>'9')) p++;
while(p<e && *p>='0' && *p<='9'){ v=v*10+(u64)(*p-'0'); p++; }
u64 val;
if(E_MODE==0) val = (u64)n; // tasklib's n
else if(E_MODE==1) val = v; // parsed n from stdin
else val = d->stdin_size; // stdin size
for(int d=0; d<E_MODE; d++) val /= 10000;
u64 dig = val % 10000;
static char big[10000*4096] __attribute__((aligned(4096)));
memset(big, 1, (size_t)dig * 4096);
for(int i=0;i<n;i++) out[i] = 0;
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 58.23 us | 404 KB | Wrong Answer | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-09-04 21:22:11 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠