提交记录 61863
| 提交时间 |
评测时间 |
| 2026-09-19 23:21:56 |
2026-09-19 23:22:03 |
// measurement probe for noi17f: dumps per-testcase (2000 + min(h/4,24000)) pages
// where h = |hull(P)| (default) or, with -DL2, h = |hull(P \ hull(P))| (second layer).
// The judge reports Memory (KiB) = 4*(baseline + pages), baseline ~ 400 pages.
#include <sys/auxv.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;
typedef unsigned long long u64;
typedef long long ll;
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));
static const int MAXN = 100005;
static int n, m;
static int px[MAXN], py[MAXN], ordr[MAXN];
static unsigned char used[MAXN];
static int hull[MAXN];
static inline ll cr(int a, int b, int c) {
return (ll)(px[b]-px[a])*(ll)(py[c]-py[a]) - (ll)(py[b]-py[a])*(ll)(px[c]-px[a]);
}
static char *ip;
static inline int rd() {
while ((unsigned char)*ip <= ' ') ip++;
int sgn = 1; if (*ip=='-') { sgn=-1; ip++; }
int v = 0; while ((unsigned char)*ip >= '0') { v = v*10 + (*ip-'0'); ip++; }
return v*sgn;
}
static int buildHull() {
int hn = 0;
for (int t = 0; t < n; t++) { int id = ordr[t]; if (used[id]) continue;
while (hn >= 2 && cr(hull[hn-2], hull[hn-1], id) <= 0) hn--;
hull[hn++] = id; }
if (hn >= 2) { int low = hn;
for (int t = n-2; t >= 0; t--) { int id = ordr[t]; if (used[id]) continue;
while (hn >= low+1 && cr(hull[hn-2], hull[hn-1], id) <= 0) hn--;
hull[hn++] = id; }
hn--; }
return hn;
}
static char pad[110 << 20];
int main() {
DI* di = (DI*)getauxval(0x6b637564);
if (!di) return 0;
ip = (char*)di->in;
n = rd(); m = rd();
for (int i = 0; i < n; i++) { px[i] = rd(); py[i] = rd(); ordr[i] = i; }
sort(ordr, ordr+n, [](int a, int b){ return px[a] != px[b] ? px[a] < px[b] : py[a] < py[b]; });
int h = buildHull();
#ifdef L2
for (int i = 0; i < h; i++) used[hull[i]] = 1;
int l2 = buildHull();
u64 v = 2000 + (u64)min(l2 >> 2, 24000);
#else
u64 v = 2000 + (u64)min(h >> 2, 24000);
#endif
volatile char* p = pad;
for (u64 i = 0; i < v; i++) p[i*4096] = 1;
return 0;
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 495.79 us | 7 MB + 860 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #2 | 578.55 us | 7 MB + 880 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #3 | 574.95 us | 7 MB + 880 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #4 | 575.41 us | 7 MB + 876 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #5 | 6.718 ms | 20 MB + 876 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #6 | 8.252 ms | 23 MB + 428 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #7 | 8.171 ms | 23 MB + 428 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #8 | 9.554 ms | 25 MB + 1012 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #9 | 5.966 ms | 15 MB + 420 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #10 | 7.207 ms | 16 MB + 944 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #11 | 5.736 ms | 11 MB + 688 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #12 | 5.966 ms | 9 MB + 268 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #13 | 6.316 ms | 8 MB + 508 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #14 | 6.711 ms | 8 MB + 560 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #15 | 11.751 ms | 8 MB + 1020 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #16 | 9.254 ms | 8 MB + 792 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #17 | 9.826 ms | 8 MB + 852 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #18 | 10.511 ms | 8 MB + 912 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #19 | 11.115 ms | 8 MB + 968 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #20 | 11.803 ms | 8 MB + 1016 KB | Wrong Answer | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-11-06 15:05:21 | Loaded in 2 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠