IARCS (The Lazy Circus Gymnast)


// Q : http://www.iarcs.org.in/inoi/contests/nov2004/Basic-1.php

#include <cstdio>
#include <algorithm>
using namespace std;

struct node {
    int index;
    int value;
} a [5005];

bool compare (node i, node j)
{
    return i.value < j.value;
}

int main ()
{
    int n;
    scanf ("%d", &n);

    for ( int i = 0; i < n; i++ ) {
        a [i].index = i + 1;
        scanf ("%d", & a [i].value);
    }

    sort (a, a + n, compare);

    for ( int i = 0; i < n; i++ )
        printf ("%d\n", a [i].index);

    return 0;
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s