Task: | Differences |
Sender: | Team Lewd |
Submission time: | 2019-05-25 12:16:03 +0300 |
Language: | C++ |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.14 s | details |
Code
#include<iostream> #include<algorithm> using namespace std; int main() { cout<<"asd"; int a=0; cin>>a; int arr[a]; for (int i=0; i<a; i++){ int b; std::cin>>b; arr[i]=b;} std::sort(arr, arr + a); int arr2[a]; for (int ii=0; ii<a; ii++){ int bc; std::cin>>bc; arr2[ii]=bc;} int v=0; for(int ib=0; ib<a; ib++){ v+=abs(arr[ib]-arr2[ib]);} std::cout<<v; return 0; }