比赛 CSP2023-J模拟赛 评测结果 AAAAA
题目名称 挂分跑步 最终得分 100
用户昵称 黄思博 运行时间 0.000 s
代码语言 C++ 内存使用 0.00 MiB
提交时间 2023-10-18 17:12:39
显示代码纯文本
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int n, x, suma, sumb;
  6.  
  7. int main() {
  8. freopen("running.in", "r", stdin);
  9. freopen("running.out", "w", stdout);
  10. ios::sync_with_stdio(0);
  11. cin.tie(0);
  12. cout.tie(0);
  13. cin >> n >> x;
  14. for(int i = 1; i <= n; i ++) {
  15. int a;
  16. cin >> a;
  17. suma += a;
  18. }
  19. for(int i = 1; i <= n; i ++) {
  20. int b;
  21. cin >> b;
  22. sumb += b;
  23. }
  24. suma = (suma - sumb) * x;
  25. if(suma > 10000) {
  26. cout << "2 hard 4 me\n";
  27. }
  28. else {
  29. cout << suma << "\n";
  30. }
  31. return 0;
  32. }