QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#261871 | #7619. Make SYSU Great Again I | Monohydroxides# | WA | 0ms | 3640kb | C++20 | 569b | 2023-11-23 12:28:32 | 2023-11-23 12:28:33 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int a[N];
int b[N];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
for (int i = 1; i <= m; i++) {
cin >> b[i];
}
long long ans = 0;
for (int i = 1; i < n; i++) {
ans += abs(a[i] - a[i + 1]);
}
for (int i = 1; i < m; i++) {
ans += abs(b[i] - b[i + 1]);
}
cout << ans << endl;
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3640kb
input:
3 6
output:
0
result:
wrong answer Integer 0 violates the range [1, 3]