CSES - HIIT Open 2019 - Results
Submission details
Task:Differences
Sender:Team Lewd
Submission time:2019-05-25 13:24:19
Language:C++
Status:READY
Result:
Test results
testverdicttime
#10.12 sdetails

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;
}

Test details

Test 1

Verdict:

input
100000
880024238 421943433 201872615 ...

correct output
79489641069

user output
1173503835