Task: | Differences |
Sender: | Team Lewd |
Submission time: | 2019-05-25 13:24:19 +0300 |
Language: | C++ |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.12 s | details |
Code
#include<iostream> #include<algorithm> using namespace std; int main() { 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;} //sort(arr2,arr2+a); int v=0; int v2 =0; for(int ib=0; ib<a; ib++){ v+=arr[ib]; v2+=arr2[ib];} std::cout<<abs(v-v2); return 0; }