이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
int N,B[2000000],S;
bool chk[4000000];
int main()
{
scanf ("%d",&N);
for (int i=0;i<N;i++){
scanf ("%d",&B[i]);
if (!chk[B[i]+1000000]){
chk[B[i]+1000000] = 1;
S++;
}
}
for (int i=N;i<2000000;i++){
int u = S;
B[i] = u;
if (!chk[u+1000000]){
chk[u+1000000] = 1;
S++;
}
}
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;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |