[UVa11729] Commando War
“Waiting for orders we held in the wood,
word from the front never came
By evening the sound of the gunfire was miles away
Ah softly we moved through the shadows, slip away through the trees
Crossing their lines in the mists in the fields on our hands and our knees
And all that I ever, was able to see
The fire in the air, glowing red, silhouetting the smoke on the breeze”
这是山人见过最诗情画意热血沸腾的UVa题目 实属难得 相见恨晚
山人不觉想起了前些天qzy学长发来的读诗录音 更生AC此题的念头 更不愿参照题解完成
今日思索多时 终于有些头绪 竟一举拿下
说到底 这一道思维题 做出来也不足为称道 只是其中有些细节可以启发思路
for(i=2;i<=n;i++){ if( a[i-1].j > a[i].b+a[i].j ) a[i].j = a[i-1].j-a[i].b; }
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步