Submission #116511

# Submission time Handle Problem Language Result Execution time Memory
116511 2019-06-12T16:24:21 Z faustaadp Ideal city (IOI12_city) C++17
0 / 100
6 ms 512 KB
#include<bits/stdc++.h>
typedef long long ll;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
ll i,has,mo=1e9;
ll com(ll aa)
{
	return (aa*(aa+1)/2);
}
int DistanceSum(int N, int *X, int *Y) 
{
	for(i=1;i<=N;i++)
		has=(has+com(i-1)+com(N-i));
	has/=2;
	has%=mo;
  	return has;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 512 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -