답안 #13960

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
13960 2015-04-24T16:10:58 Z kriii 이상한 수열 (OJUZ10_bizarre) C++14
0 / 100
676 ms 65536 KB
#include <stdio.h>
#include <set>
using namespace std;

set<int> S;
int N,B[2000000];

int main()
{
	scanf ("%d",&N);
	for (int i=0;i<N;i++) scanf ("%d",&B[i]), S.insert(B[i]);
	for (int i=N;i<2000000;i++){
		int u = S.size();
		B[i] = u;
		S.insert(u);
	}

	int M,A;
	scanf ("%d",&M); M--;
	if (M < 2000000) A = B[M];
	else A = B[1999999] + (M - 1999999) * (B[1999999] - B[1999998]);

	printf ("%d\n",A);

	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 91 ms 9292 KB Output is correct
2 Memory limit exceeded 604 ms 65536 KB Memory limit exceeded
3 Correct 19 ms 9028 KB Output is correct
4 Memory limit exceeded 644 ms 65536 KB Memory limit exceeded
5 Memory limit exceeded 622 ms 65536 KB Memory limit exceeded
# 결과 실행 시간 메모리 Grader output
1 Correct 32 ms 9028 KB Output is correct
2 Memory limit exceeded 622 ms 65536 KB Memory limit exceeded
3 Memory limit exceeded 629 ms 65536 KB Memory limit exceeded
4 Correct 36 ms 9028 KB Output is correct
5 Correct 40 ms 9028 KB Output is correct
6 Memory limit exceeded 607 ms 65536 KB Memory limit exceeded
7 Correct 36 ms 9028 KB Output is correct
8 Memory limit exceeded 619 ms 65536 KB Memory limit exceeded
9 Correct 248 ms 9292 KB Output is correct
10 Correct 81 ms 9028 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Memory limit exceeded 623 ms 65536 KB Memory limit exceeded
2 Memory limit exceeded 645 ms 65536 KB Memory limit exceeded
3 Correct 102 ms 11272 KB Output is correct
4 Correct 74 ms 9424 KB Output is correct
5 Memory limit exceeded 626 ms 65536 KB Memory limit exceeded
6 Memory limit exceeded 642 ms 65536 KB Memory limit exceeded
7 Correct 73 ms 9292 KB Output is correct
8 Correct 117 ms 11272 KB Output is correct
9 Correct 76 ms 9424 KB Output is correct
10 Memory limit exceeded 652 ms 65536 KB Memory limit exceeded
11 Memory limit exceeded 636 ms 65536 KB Memory limit exceeded
12 Memory limit exceeded 665 ms 65536 KB Memory limit exceeded
13 Correct 114 ms 11008 KB Output is correct
14 Memory limit exceeded 639 ms 65536 KB Memory limit exceeded
15 Memory limit exceeded 653 ms 65536 KB Memory limit exceeded
# 결과 실행 시간 메모리 Grader output
1 Correct 104 ms 11272 KB Output is correct
2 Memory limit exceeded 650 ms 65536 KB Memory limit exceeded
3 Memory limit exceeded 592 ms 65536 KB Memory limit exceeded
4 Correct 474 ms 16552 KB Output is correct
5 Correct 98 ms 11272 KB Output is correct
6 Memory limit exceeded 659 ms 65536 KB Memory limit exceeded
7 Correct 74 ms 9292 KB Output is correct
8 Memory limit exceeded 632 ms 65536 KB Memory limit exceeded
9 Memory limit exceeded 624 ms 65536 KB Memory limit exceeded
10 Memory limit exceeded 676 ms 65536 KB Memory limit exceeded
11 Memory limit exceeded 600 ms 65536 KB Memory limit exceeded
12 Correct 74 ms 9424 KB Output is correct
13 Memory limit exceeded 659 ms 65536 KB Memory limit exceeded
14 Correct 81 ms 11008 KB Output is correct
15 Memory limit exceeded 630 ms 65536 KB Memory limit exceeded