Submission #1015146

# Submission time Handle Problem Language Result Execution time Memory
1015146 2024-07-06T06:43:16 Z vjudge1 Fireworks (APIO16_fireworks) C++17
0 / 100
0 ms 348 KB
#include <bits/stdc++.h>

using namespace std;

const int M = 105;

int main()
{
	int n,m;
	cin>>n>>m;
	int a[m]={};
	for (int i=0;i<m;i++)
		cin>>a[i]>>a[i];
	sort(a,a+m);
	int ind=m/2,ans=0;
	for (int i=0;i<m;i++)
		ans+=abs(a[ind]-a[i]);
	
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 0 ms 348 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -