답안 #647918

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
647918 2022-10-04T15:11:10 Z rainboy Broken Device 2 (JOI22_device2) C++17
10 / 100
756 ms 524288 KB
#include "Anna.h"
#include <vector>

using namespace std;

const int L = 2000;

typedef vector<int> vi;

namespace {
}

int Declare() {
	return L;
}

pair<vi, vi> Anna(long long x) {
	x--;
	int l = 1;
	while (x >= l * 2 + 1)
		x -= l * 2 + 1, l++;
	vi aa(l, 0);
	vi bb(l, 0);
	if (x <= l)
		for (int i = 0; i < x; i++)
			aa[i] = 1;
	else {
		for (int i = 0; i < l; i++)
			aa[i] = 1;
		for (int i = 0; i < x - l; i++)
			bb[i] = 1;
	}
	return make_pair(aa, bb);
}
#include "Bruno.h"
#include <vector>

using namespace std;

typedef vector<int> vi;

namespace {
}

long long Bruno(vi cc) {
	int l = cc.size() / 2, x = 1;
	for (int k = 1; k < l; k++)
		x += k * 2 + 1;
	for (int i = 0; i < l * 2; i++)
		if (cc[i] == 1)
			x++;
	return x;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 516 KB Output is correct
2 Correct 13 ms 840 KB Output is correct
3 Correct 22 ms 1176 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 516 KB Output is correct
2 Correct 13 ms 840 KB Output is correct
3 Correct 22 ms 1176 KB Output is correct
4 Correct 515 ms 22056 KB Output is correct
5 Correct 496 ms 21804 KB Output is correct
6 Correct 498 ms 22196 KB Output is correct
7 Correct 499 ms 21760 KB Output is correct
8 Correct 508 ms 22224 KB Output is correct
9 Correct 756 ms 32528 KB Output is correct
10 Correct 715 ms 32612 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 516 KB Output is correct
2 Correct 13 ms 840 KB Output is correct
3 Correct 22 ms 1176 KB Output is correct
4 Correct 515 ms 22056 KB Output is correct
5 Correct 496 ms 21804 KB Output is correct
6 Correct 498 ms 22196 KB Output is correct
7 Correct 499 ms 21760 KB Output is correct
8 Correct 508 ms 22224 KB Output is correct
9 Correct 756 ms 32528 KB Output is correct
10 Correct 715 ms 32612 KB Output is correct
11 Incorrect 0 ms 676 KB Wrong Answer [3]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 516 KB Output is correct
2 Correct 13 ms 840 KB Output is correct
3 Correct 22 ms 1176 KB Output is correct
4 Correct 515 ms 22056 KB Output is correct
5 Correct 496 ms 21804 KB Output is correct
6 Correct 498 ms 22196 KB Output is correct
7 Correct 499 ms 21760 KB Output is correct
8 Correct 508 ms 22224 KB Output is correct
9 Correct 756 ms 32528 KB Output is correct
10 Correct 715 ms 32612 KB Output is correct
11 Incorrect 0 ms 676 KB Wrong Answer [3]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 516 KB Output is correct
2 Correct 13 ms 840 KB Output is correct
3 Correct 22 ms 1176 KB Output is correct
4 Correct 515 ms 22056 KB Output is correct
5 Correct 496 ms 21804 KB Output is correct
6 Correct 498 ms 22196 KB Output is correct
7 Correct 499 ms 21760 KB Output is correct
8 Correct 508 ms 22224 KB Output is correct
9 Correct 756 ms 32528 KB Output is correct
10 Correct 715 ms 32612 KB Output is correct
11 Incorrect 0 ms 676 KB Wrong Answer [3]
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 409 ms 524288 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -