跳到正文

liujiahao123456

948896

这个人很勤快,但是什么都没写

在洛谷打开
资料、奖项与版本

资料

编号
948896
抓取
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
  cout<<"Y H 99";
  return 0;
}

dogod.io

https://kirka.io/

https://paperzym.github.io/whk/

https://xinyang-li-dotcom.github.io/whk-LXY-/New-whk-safe.html

https://weiyc2.github.io/oimoniqi/

joshuaurora.github.io/CCF?DZD_Simulator.html

(https://joshuaurora.github.io/CCF/DZD_Simulator.html)

https://leoooooooooisme.github.io/oier-gaokao-recovery-simulator/

https://bj8z.zeabur.app/

https://seve42.github.io/OItrainer/game.html?new=1&d=1&p=2&c=10

https://little09qwq.github.io/oi-remake-game/

https://odysseus0439.github.io/Stellar_Link/

https://www.luogu.com.cn/problem/P5432

https://www.luogu.me/article/h0grhxvj

https://phet.colorado.edu/zh_CN/simulations/my-solar-system

http://c2027team.dpdns.org/

image.png```cpp #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; int q; cin >> q; vector<long long> aa(n + 1), bb(n + 1); for (int i = 1; i <= n; i++) cin >> aa[i]; for (int i = 1; i <= n; i++) cin >> bb[i]; vector<long long> pp(n + 2, 0); for (int i = 1; i <= n; i++) { pp[i + 1] = pp[i] + aa[i]; } long long l = pp[n + 1]; int m = 2 * n; vector<long long> p(m + 2), b(m + 2); for (int i = 1; i <= n; i++) { p[i] = pp[i]; b[i] = bb[i]; p[i + n] = pp[i] + l; b[i + n] = bb[i]; } vector<long long> ld(m + 2), rd(m + 2); ld[1] = b[1]; for (int k = 2; k <= m; k++) { ld[k] = min(b[k], ld[k - 1] + (p[k] - p[k - 1])); } rd[m] = b[m]; for (int k = m - 1; k >= 1; k—) { rd[k] = min(b[k], rd[k + 1] + (p[k + 1] - p[k])); } vector<long long> f(n + 1); for (int x = 1; x <= n; x++) { f[x] = min(ld[x + n], rd[x]); } while (q—) { int s, t; cin >> s >> t; if (s == n + 1 && t == n + 1) { cout << 0 << ‘\n’; continue; } if (s == n + 1) { cout << f[t] << ‘\n’; continue; } if (t == n + 1) { cout << f[s] << ‘\n’; continue; } long long f; if (t >= s) { f = pp[t] - pp[s]; } else { f = pp[t] + l - pp[s]; } long long c = min(f, l - f); long long ans = min(c, f[s] + f[t]); cout << ans << ‘\n’; } return 0; }

代码
http://172.21.34.34:8000/
共 1 篇
  1. 休闲·娱乐

    fun

    这篇作文整体表现尚可,除开头外,中间和结尾部分存在不足,其他内容较为优秀。作者通过"生活使我千疮百孔,那挺透气"表达了对生活困境的无奈,同时暗示在压抑中仍存在缓解的空间。