Submission #62411

# Submission time Handle Problem Language Result Execution time Memory
62411 2018-07-28T11:21:28 Z theknife2001 Ideal city (IOI12_city) C++17
0 / 100
1000 ms 892 KB
#include <bits/stdc++.h>

using namespace std;


int DistanceSum(int n, int *X, int *Y) {

  long long ans=0;
  int m=1e9;
  for(int i=0;i<n;i++)
  {
      for(int j=i+1;j<n;j++)
      {
          ans+=abs(X[i]-X[j])+abs(Y[i]-Y[j]);
          ans%=m;
      }
  }
  int ret=ans;
  return ret;

}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1034 ms 840 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1056 ms 892 KB Time limit exceeded
2 Halted 0 ms 0 KB -