답안 #115502

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
115502 2019-06-08T00:34:07 Z E869120 선물상자 (IOI15_boxes) C++14
0 / 100
3 ms 512 KB
#include "boxes.h"
#include <bits/stdc++.h>
using namespace std;

long long delivery(int N, int K, int L, int p[]) {
	assert(N == K);
	long long minx = (1LL << 60);
	for (int i = -1; i < N; i++) {
		long long sum = 0;
		for (int j = i; j >= 0; j -= K) sum += 1LL * p[j];
		for (int j = i + 1; j < N; j += K) sum += 1LL * (L - p[j]);
		minx = min(minx, 2LL * sum);
	}
	return minx;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Runtime error 3 ms 512 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -