# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
240268 | qwerty2142427 | 덩치 (KOI13_body) | C++14 | 5 ms | 384 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<stdio.h>
#include<stdlib.h>
const int INT_SIZE = 4;
const int POINTER_SIZE = 4;
const int WEIGHT = 0;
const int HEIGHT = 1;
const int RANK = 2;
int main(){
int n = 0;
int tmp_weight = 0, tmp_height = 0;
int **array;
scanf("%d", &n);
array = (int **)malloc(POINTER_SIZE * n);
(int *)malloc(INT_SIZE * 3);
for(int i = 0; i < n; i++){
array[i] = (int *)malloc(INT_SIZE * 3);
scanf("%d %d", &tmp_weight, &tmp_height);
array[i][WEIGHT] = tmp_weight;
array[i][HEIGHT] = tmp_height;
array[i][RANK] = 1;
}
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
if((array[i][WEIGHT] < array[j][WEIGHT]) && (array[i][HEIGHT] < array[j][HEIGHT])){
array[i][RANK]++;
}
}
}
for(int i = 0; i < n; i++){
printf("%d ", array[i][RANK]);
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |