# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
240269 | qwerty2142427 | 덩치 (KOI13_body) | C++14 | 6 ms | 436 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
scanf("%d", &n);
int array[52][3];
for(int i = 0; i < n; i++){
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;
}
Compilation message (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... |