QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#654873 | #7941. Jackpot | pranx2 | WA | 53ms | 3604kb | C++14 | 323b | 2024-10-18 22:39:01 | 2024-10-18 22:39:02 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
int tc,n;
cin>>tc;
while (tc--){
cin>>n;
int size = 2*n,arr[size],temp = 0;
for(int i = 0; i < size; i++){
cin>>arr[i];
}
for(int i = 0; i < size/2; i++){
temp += abs(arr[i] - arr[(size/2)+i]);
}
cout<<temp<<"\n";
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3588kb
input:
3 2 42 42 42 42 1 42 69 3 1 2 3 4 5 6
output:
0 27 9
result:
ok 3 number(s): "0 27 9"
Test #2:
score: -100
Wrong Answer
time: 53ms
memory: 3604kb
input:
47988 3 1 6 4 4 5 6 3 2 1 2 1 1 6 3 2 1 4 1 1 2 3 6 3 1 3 6 1 3 1 2 6 2 4 6 3 1 1 2 1 1 3 3 4 3 3 2 5 4 3 5 1 3 3 4 2 3 6 1 5 4 2 1 3 2 2 6 4 4 4 3 1 3 6 1 2 5 3 1 1 6 4 2 2 3 2 5 3 4 3 4 3 3 5 6 1 4 2 3 5 3 3 2 1 5 3 6 3 2 3 3 5 3 5 4 4 4 6 1 3 6 5 6 4 4 1 3 5 6 4 3 5 4 3 1 3 4 3 6 1 3 5 4 4 3 6 2 ...
output:
6 5 3 6 3 1 5 6 7 6 2 8 5 7 7 6 6 8 3 8 6 5 9 6 7 3 6 6 5 7 6 3 10 1 9 6 7 4 4 4 8 9 4 4 6 4 3 3 8 8 4 4 8 5 7 5 5 4 4 5 7 3 5 2 5 4 7 7 7 3 7 4 6 6 4 2 2 10 1 4 8 5 6 1 7 5 3 5 4 6 6 5 4 6 5 9 11 3 6 8 9 2 5 2 5 9 4 10 3 4 5 2 4 2 3 1 5 7 5 8 6 9 3 7 8 10 7 10 5 5 10 7 4 3 4 3 6 6 8 6 6 6 6 8 4 6 3...
result:
wrong answer 1st numbers differ - expected: '8', found: '6'