Submission #9016

# Submission time Handle Problem Language Result Execution time Memory
9016 2014-09-27T10:39:05 Z dolpang2 Wall construction (kriii2_WA) C++14
0 / 4
0 ms 1216 KB
#include <cstdio>
#include <cmath>
#include <vector>

struct Point {
  int x;
  int y;
};

int main() {
  std::vector<Point> bundle;
  int N;
  int R;

  scanf(" %d %d", &N, &R);
  for (int i = 0; i < N; ++i) {
    int x;
    int y;

    scanf(" %d %d", &x, &y);
    Point p;
    p.x = x;
    p.y = y;
    bundle.push_back(p);
  }
  if (N == 2) {
    double dis = sqrt((bundle[0].x - bundle[1].x) * (bundle[0].x - bundle[1].x) +
      (bundle[0].y - bundle[1].y) * (bundle[0].y - bundle[1].y));

    printf("%lf", 2 * dis + 2 * 3.141592 * R);
  }
  else {
    printf("i don't know");
  }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1216 KB Output is correct
2 Incorrect 0 ms 1216 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -