建议ACGO官方修一下
原题链接:79553.模拟器2025-12-25 21:12:04
发布于:四川
快修!!!
根本过不了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
全部评论 20
何意味
2026-01-02 来自 广东
4+1
2026-04-07 来自 广东
1+1
6天前 来自 广东
0
显然可以过
2026-01-02 来自 广东
2真的吗,我没有那种实力。大佬你既然可以过,为何不做呢?(刷0通过的题可以赚罐头啊)!!!

2026-04-07 来自 广东
2这题在acgo是过不了的
2026-08-05 来自 广西
2反正我是做不出来的

1周前 来自 湖南
1
感谢反馈,官方题目可以点击标题下的“题目纠错”按钮,进行纠错反馈,满10个有效纠错即可获得BUG超度大师勋章哦!
2025-12-26 来自 浙江
2666
2026-01-02 来自 浙江
2....
2026-01-02 来自 浙江
0。。。
2026-01-03 来自 四川
0
什么题啊?
1周前 来自 浙江
1一年了怎么只有15条评论
1周前 来自 浙江
2
建议ACGO官方修一下
2026-04-09 来自 浙江
1你们可以去DEv试一下
#include<bits/stdc++.h> #define pr(...) //printf("#[%d] ",(int)__LINE__);printf(__VA_ARGS__) struct StackAllocator{ struct Seg{ size_t l,r; bool operator<(const Seg &x)const{return l<x.l;} }; std::multiset<Seg> mem; size_t top=0; size_t alloc(size_t size){ pr("alloc %d,%d\n",(int)top,(int)size); size_t ret=top; top+=size; return ret; } void free(size_t x,size_t size){ mem.insert(Seg{x,x+size}); while(mem.size()){ auto it=--mem.end(); if(it->r==top){ top=it->l; mem.erase(it); }else break; } pr("free %d,%d top=%d\n",(int)x,(int)size,(int)top); } }stack_allocator; struct Addr{ enum AddrType{ NONE=0,STACK=1,MEM=2 }; AddrType type=NONE; size_t offset=0; void stack_alloc(size_t size){ type=STACK; offset=stack_allocator.alloc(size); } void free(size_t size){ switch(type){ case NONE:{ break; } case STACK: case MEM:{ stack_allocator.free(offset,size); break; } } } bool is_stack_top(){ return type==STACK && offset==stack_allocator.top-1; } void reset(){ *this=Addr(); } friend bool operator==(const Addr &a,const Addr &b){ return a.type!=NONE&&a.type==b.type&&a.offset==b.offset; } friend std::ostream &operator<<(std::ostream &os,const Addr &x){ switch(x.type){ case NONE:{ assert(0); break; } case STACK:{ os<<"S["<<x.offset<<"]"; break; } case MEM:{ os<<"M[S["<<x.offset<<"]]"; break; } } return os; } }; struct Instr{ enum Type{ LI, // op1 = x UOP, // op1 = op(op2) BOP, // op1 = op(op2,op3) NCALL, // ncall x op2 JZ, // if op2 goto label JMP, // goto label RET, // ret CALL, // call label x EXIT, // exit LABEL, // label: }type; const char *op; Addr op1,op2,op3; int64_t x,label; static Instr li(Addr c,int64_t a){ return Instr{LI,NULL,c,Addr(),Addr(),a,0}; } static Instr uop(Addr c,const char *name,Addr a){ return Instr{UOP,name,c,a,Addr(),0,0}; } static Instr bop(Addr c,cons4天前 来自 四川
0字数超了
4天前 来自 四川
0
666
1周前 来自 浙江
0666
1周前 来自 贵州
0啥意思
1周前 来自 新疆
0vcrfggf
2026-05-12 来自 浙江
0建议ACGO官方修一下
2026-05-07 来自 浙江
066666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
2026-04-14 来自 浙江
0a
2026-04-13 来自 浙江
01
2026-04-13 来自 浙江
01
2026-04-13 来自 浙江
01
2026-04-13 来自 浙江
0ddd
2026-04-13 来自 浙江
0www
2026-04-13 来自 浙江
0真的吗,我没有那种实力。大佬你既然可以过,为何不做呢?(刷0通过的题可以赚罐头啊)!!!
ACGO_gif_崇拜2026-04-13 来自 浙江
0不是,这题AI都不能过显然题有问题。我真找到题解时自然会发的
2026-04-13 来自 四川
0?现在AI才多强,你就指望着AI不能解决的问题人也不能解决吗?
2026-05-06 来自 江西
0我不是说ACGO环境不支持吗
2026-05-06 来自 四川
1
nbnb
2026-04-10 来自 浙江
0



























































有帮助,赞一个