fork download
  1. #include <cstdio>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int N;
  8. int pt[100000];
  9.  
  10. scanf("%d", &N);
  11.  
  12. for (int i = 0; i < N; i++) scanf("%d", pt + i);
  13.  
  14. for (int i = 0; i < N; i++){
  15. int rank = 1;
  16. for (int j = 0; j < N; j++){
  17. if (pt[i] < pt[j]) rank++;
  18. }
  19. printf("%d\n", rank);
  20. }
  21.  
  22. return (0);
  23. }
  24.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty