#include <stdio.h>

int main() {
    int a,b=0;
    int x[10000],y[10000];
    scanf("%d",&a);
    for(int i=0;i<a;i++)
    {
        scanf("%d",&x[i]);
    }
    for(int i=0;i<a;i++)
    {
        y[i]=1;
        for(int j=0;j<a;j++)
        {
            if(x[i]>x[j])
            {
                y[i]++;
            }
        }
    }
    for(int i=0;i<a;i++)
    {
        printf("%d ",x[i]);
    }
    printf("\n");
    for(int i=0;i<a;i++)
    {
        printf("%d ",y[i]);
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: