Submission #240269

#TimeUsernameProblemLanguageResultExecution timeMemory
240269qwerty2142427덩치 (KOI13_body)C++14
18 / 18
6 ms436 KiB
#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)

bb.cpp: In function 'int main()':
bb.cpp:12:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
  ~~~~~^~~~~~~~~~
bb.cpp:15:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d", &tmp_weight, &tmp_height);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...