stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<iostream>

#include<cstdio>

using namespace std;

typedef long long LL;

int main()

{

      int  n,m;

      LL sum_even,sum_odd,mul;

      while(cin>>n>>m)

      {

           sum_even=sum_odd=0;

           for(int i=1;i<=2*n;++i)

           {

                mul=(LL) i*m;

                if(mul%2==1)continue;

                if(mul/2>n)break;

                if(mul/2%m==0)++sum_even;

                else ++sum_odd;

           }

           cout<<sum_odd*sum_odd*sum_odd+sum_even*sum_even*sum_even<<endl;

      }

}


// Faster C++ solution for the same problem (measured speedup: 5.273138539897785x):
#include <cstdio>

#include <algorithm>

using namespace std;



long long n, k;

inline long long calc(long long x) { return x * x * x; }



int main() {

    scanf("%lld%lld", &n, &k);

    if (k & 1) {

        printf("%lld\n", calc(n / k));

    } else {

        printf("%lld\n", calc(n / k) + calc(n / k + (n % k >= k / 2)));

    }

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <algorithm>



const int N = 2e5 + 7;

long long a[N], n, k;



int main() {

    scanf("%lld%lld", &n, &k);

    for (int i = 1; i <= n; i++) a[i % k]++;

    long long ans = 0;

    ans = a[0] * a[0] * a[0];

    if (!(k % 2)) ans += a[k / 2] * a[k / 2] * a[k / 2];

    printf("%lld\n", ans);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.627664310920913x):
#include <cstdio>

#include <algorithm>

using namespace std;



long long n, k;

inline long long calc(long long x) { return x * x * x; }



int main() {

    scanf("%lld%lld", &n, &k);

    if (k & 1) {

        printf("%lld\n", calc(n / k));

    } else {

        printf("%lld\n", calc(n / k) + calc(n / k + (n % k >= k / 2)));

    }

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

using namespace std;

typedef long long LL;

int main()

{

      int  n,m;

      LL sum_even,sum_odd,mul;

      while(cin>>n>>m)

      {

           sum_even=sum_odd=0;

           for(int i=1;i<=2*n;++i)

           {

                mul=(LL) i*m;

                if(mul%2==1)continue;

                if(mul/2>n)break;

                if(mul/2%m==0)++sum_even;

                else ++sum_odd;

           }

           cout<<sum_odd*sum_odd*sum_odd+sum_even*sum_even*sum_even<<endl;

      }

}


// Faster C++ solution for the same problem (measured speedup: 5.264239428111671x):
#include <cstdio>

#include <cstring>

#include <algorithm>

void Unused(...) {}

#ifndef DEBUG

  #define echo(...) Unused(__VA_ARGS__)

#else

  #define echo(...) fprintf(stderr, __VA_ARGS__)

#endif



typedef long long laolin;



const int MaxN = int(1e5) + 7;



int n, k;



int main()

{

    scanf("%d %d", &n, &k);

    laolin ans = n / k;

    laolin ano = 0;

    if (k % 2 == 0)

        ano = n / k + (n % k >= k / 2);

    printf("%lld\n", ans * ans * ans + ano * ano * ano);

    return 0;

}



/*

 * given a, then:

 *  - a + b %=k 0 => b = sk - a

 *  - a + c %=k 0 => c = tk - a

 *  - b + c %=k 0 => (s+t-p)k = 2a

 */
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <algorithm>



const int N = 2e5 + 7;

long long a[N], n, k;



int main() {

    scanf("%lld%lld", &n, &k);

    for (int i = 1; i <= n; i++) a[i % k]++;

    long long ans = 0;

    ans = a[0] * a[0] * a[0];

    if (!(k % 2)) ans += a[k / 2] * a[k / 2] * a[k / 2];

    printf("%lld\n", ans);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.618166890472223x):
#include <cstdio>

#include <cstring>

#include <algorithm>

void Unused(...) {}

#ifndef DEBUG

  #define echo(...) Unused(__VA_ARGS__)

#else

  #define echo(...) fprintf(stderr, __VA_ARGS__)

#endif



typedef long long laolin;



const int MaxN = int(1e5) + 7;



int n, k;



int main()

{

    scanf("%d %d", &n, &k);

    laolin ans = n / k;

    laolin ano = 0;

    if (k % 2 == 0)

        ano = n / k + (n % k >= k / 2);

    printf("%lld\n", ans * ans * ans + ano * ano * ano);

    return 0;

}



/*

 * given a, then:

 *  - a + b %=k 0 => b = sk - a

 *  - a + c %=k 0 => c = tk - a

 *  - b + c %=k 0 => (s+t-p)k = 2a

 */
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define flash ios_base::sync_with_stdio(0); cin.tie(0)

int main()

{



    flash;

    long long n,k,cnt1=0,cnt2=0, ans=0,y;

    cin>>n>>k;



    for(int i=1; i<=n; i++)

    {

        if(i % k == 0)

            cnt1++;

    }



    ans = cnt1*cnt1*cnt1;



    if(k % 2 == 0)

    {

        for(int i=1; i<=n; i++)

        {



            if(i %k == k/2 )

                cnt2++;

        }

    }



    ans += cnt2*cnt2*cnt2;





    cout<<ans<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 6.135823883948199x):
#include <cstdio>

#include <cstring>

#include <algorithm>

void Unused(...) {}

#ifndef DEBUG

  #define echo(...) Unused(__VA_ARGS__)

#else

  #define echo(...) fprintf(stderr, __VA_ARGS__)

#endif



typedef long long laolin;



const int MaxN = int(1e5) + 7;



int n, k;



int main()

{

    scanf("%d %d", &n, &k);

    laolin ans = n / k;

    laolin ano = 0;

    if (k % 2 == 0)

        ano = n / k + (n % k >= k / 2);

    printf("%lld\n", ans * ans * ans + ano * ano * ano);

    return 0;

}



/*

 * given a, then:

 *  - a + b %=k 0 => b = sk - a

 *  - a + c %=k 0 => c = tk - a

 *  - b + c %=k 0 => (s+t-p)k = 2a

 */
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int maxn=2e5+7;



int a[maxn];//各个同余系的个数



int main()

{

    int n,k;

    while(~scanf("%d%d",&n,&k))

    {

        for(int i=1;i<=k;i++)

        {

            a[i]=n/k;

        }

        int r=n%k;

        for(int i=1;i<=r;i++) a[i]++;

        ll ans=0;



        ans+=(ll)a[k]*(ll)a[k]*(ll)a[k];

        if(k%2==0)

            ans+=(ll)a[k/2]*(ll)a[k/2]*(ll)a[k/2];

        printf("%lld\n",ans);

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 4.81086100204581x):
#include <cstdio>

#include <cmath>

#include <algorithm>

using namespace std;

int n,k;

int main()

{

	scanf("%d%d",&n,&k);

	if(k&1)

	{

		int ans=0;

		int i=1;

		while(1)

		{

			if(i*k<=n){

				ans++;

				i++;

			}

			else break;

		}

		long long answer=pow(ans,3);

		printf("%lld\n", answer);

	}

	else

	{

		int ans=0;

		int i=1;

		while(1)

		{

			if(i*k<=n){

				ans++;

				i++;

			}

			else break;

		}

		long long answer=pow(ans,3);

		ans=0;i=0;

		while(1)

		{

			if(k/2+i*k<=n){

				ans++;

				i++;

			}

			else break;

		}

		answer+=pow(ans,3);

		printf("%lld\n", answer);

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



typedef long long ll;



ll power(ll a, ll b){

    ll ans = 1;

    for (int i = 0; i < b; i++){

        ans *= a;

    }

    return ans;

}



int main() {

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    ll n, k;

    cin >> n >> k;

    if (k % 2 == 1)

        cout << power(n / k, 3) << endl;

    else

        cout << power(n / k, 3) + power((n + k / 2) / k, 3) << endl;

}

// Faster C++ solution for the same problem (measured speedup: 4.879270093465442x):
#include <cstdio>

#include <cmath>

#include <algorithm>

using namespace std;

int n,k;

int main()

{

	scanf("%d%d",&n,&k);

	if(k&1)

	{

		int ans=0;

		int i=1;

		while(1)

		{

			if(i*k<=n){

				ans++;

				i++;

			}

			else break;

		}

		long long answer=pow(ans,3);

		printf("%lld\n", answer);

	}

	else

	{

		int ans=0;

		int i=1;

		while(1)

		{

			if(i*k<=n){

				ans++;

				i++;

			}

			else break;

		}

		long long answer=pow(ans,3);

		ans=0;i=0;

		while(1)

		{

			if(k/2+i*k<=n){

				ans++;

				i++;

			}

			else break;

		}

		answer+=pow(ans,3);

		printf("%lld\n", answer);

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int maxn=2e5+7;



int a[maxn];//各个同余系的个数



int main()

{

    int n,k;

    while(~scanf("%d%d",&n,&k))

    {

        for(int i=1;i<=k;i++)

        {

            a[i]=n/k;

        }

        int r=n%k;

        for(int i=1;i<=r;i++) a[i]++;

        ll ans=0;



        ans+=(ll)a[k]*(ll)a[k]*(ll)a[k];

        if(k%2==0)

            ans+=(ll)a[k/2]*(ll)a[k/2]*(ll)a[k/2];

        printf("%lld\n",ans);

    }

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.255725548330719x):
#include<stdio.h>

#include<algorithm>

using namespace std;

#define ll long long

int main()

{

	//freopen("in.txt","r",stdin);

	ll n,k;

	scanf("%lld%lld",&n,&k);

	if(k&1){//ji

		if(k>n)printf("0\n");

		else{

			ll cnt1=(n-k)/k;

			cnt1++;

			printf("%lld",cnt1*cnt1*cnt1);

		}

	}else{

		if(k/2>n)printf("0\n");

		else{

			ll cnt1=0;

			if(k<=n){

		cnt1=(n-k)/k;

			cnt1++;

			}

		ll cnt2=(n-(k/2))/k;

		cnt2++;

		printf("%lld",cnt1*cnt1*cnt1+cnt2*cnt2*cnt2);

		}

	}

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



typedef long long ll;



ll power(ll a, ll b){

    ll ans = 1;

    for (int i = 0; i < b; i++){

        ans *= a;

    }

    return ans;

}



int main() {

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    ll n, k;

    cin >> n >> k;

    if (k % 2 == 1)

        cout << power(n / k, 3) << endl;

    else

        cout << power(n / k, 3) + power((n + k / 2) / k, 3) << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.330460488575169x):
#include<stdio.h>

#include<algorithm>

using namespace std;

#define ll long long

int main()

{

	//freopen("in.txt","r",stdin);

	ll n,k;

	scanf("%lld%lld",&n,&k);

	if(k&1){//ji

		if(k>n)printf("0\n");

		else{

			ll cnt1=(n-k)/k;

			cnt1++;

			printf("%lld",cnt1*cnt1*cnt1);

		}

	}else{

		if(k/2>n)printf("0\n");

		else{

			ll cnt1=0;

			if(k<=n){

		cnt1=(n-k)/k;

			cnt1++;

			}

		ll cnt2=(n-(k/2))/k;

		cnt2++;

		printf("%lld",cnt1*cnt1*cnt1+cnt2*cnt2*cnt2);

		}

	}

}
// Slower C++ solution:
#include <iostream>

#include <vector>

 

using namespace std;

typedef long long ll;

 

// ll naive(ll N, ll K) {

//   int cnt = 0;

//   for (int a = 1; a <= N; a++) {

//     for (int b = 1; b <= N; b++) {

//       for (int c = 1; c <= N; c++) {

//         if ((a + b) % K == 0 && (b + c) % K == 0 && (a + c) % K == 0) {

//           cnt++;

//         }

//       }

//     }

//   }

//   return cnt;

// }



ll solve(ll N, ll K) {

  ll ans = 0;

  vector<ll> cnt(200001);

  for(ll i = 1; i <= N; i++) {

    cnt[i % K]++;

  }

  for(ll b = 1; b <= N; b++) {

    ll m = (K - b) % K;

    if (m < 0) {

      m += K * (-m / K) + K;

      m %= K;

    }

    if ((2 * m) % K == 0) {

      ans += cnt[m] * cnt[m];

    }

  }

  return ans;

}



int main() {

  ll N, K;

  cin >> N >> K;

  cout << solve(N, K) << endl;

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 2.7172528195148686x):
#include <bits/stdc++.h>



using namespace std;

#define all(x) (x).begin(), (x).end()

#define rep(i, n) for (int i = 0; i < (n); i++)

#define endl "\n"

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;



template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec){os << "["; for (const auto &v : vec) {os << v << ","; } os << "]"; return os; }

template <typename T, typename U> ostream &operator<<(ostream &os, const pair<T, U> &p) {os << "(" << p.first << ", " << p.second << ")"; return os;}



void solve() {

    int N, K;

    cin >> N >> K;

    vector<ll> cnt(K);

    for(int i = 1; i <= N; i++) cnt[i % K]++;



    ll ans = 0;

    for(int b = 0; b < K; b++) {

        int a = (K - b) % K;

        int c = (K - b) % K;

        if ((a + c) % K != 0) continue;

        ans += cnt[a] * cnt[b] * cnt[c];

    }

    cout << ans << endl;

}



int main() {

    cin.tie(0);

    ios::sync_with_stdio(false);

    cout.setf(ios::fixed);

    cout.precision(16);

    solve();

    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main()

{

    long long n, k, count = 0;

    long long res;

    cin >> n >> k;



    long long zero = 0;

    for (int i = 1; i <= n; i++)

    {

        if (i % k == 0)

            zero++;

    }

    res = zero * zero * zero;



    if (k % 2 == 0)

    {

        for (int i = 1; i <= n; i++)

        {

            if (i % k == k / 2)

                count++;

        }

        res += (count * count * count);

    }

    cout << res << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.564487498064868x):
#include <algorithm>

#include <cstdio>

#include <cmath>

using namespace std;

int n, k;

long long ans;

int main() {

	scanf("%d%d", &n, &k);

	if(k & 1) ans = (long long) pow(n / k, 3);

	else ans = (long long) pow(n / k, 3) + (long long) pow(n / k + (n % k >= k / 2), 3);

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
// In the name of God



#include <bits/stdc++.h>



using namespace std;



int main() {

	ios_base::sync_with_stdio(0), cin.tie(0);

	long long n, k;

	cin >> n >> k;

	long long ans = n / k;

	ans = ans * ans * ans;

	if(k % 2 == 0) {

		long long cnt = n / k;

		if(n % k >= k / 2) cnt++;

		ans += cnt*cnt*cnt;

	}

	cout << ans;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.8780348886541685x):
#include <algorithm>

#include <cstdio>

#include <cmath>

using namespace std;

int n, k;

long long ans;

int main() {

	scanf("%d%d", &n, &k);

	if(k & 1) ans = (long long) pow(n / k, 3);

	else ans = (long long) pow(n / k, 3) + (long long) pow(n / k + (n % k >= k / 2), 3);

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

typedef vector<int> vi;

typedef vector<ll> vll;

#define pu push

#define pb push_back

#define mp make_pair

#define eps 1e-7

#define INF 1000000000

#define sz(x) ((int)(x).size())

#define sq(x) ((x)*(x))

#define fi first

#define sec second

#define SORT(x) sort((x).begin(),(x).end())

#define all(x) (x).begin(),(x).end()

#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)

#define repn(i,a,n) for(int (i)=(a);(i)<(int)(n);(i)++)

#define EQ(a,b) (abs((a)-(b))<eps)

int solve(){

	int T,D,L;

	cin >> T >> D >> L;

	if(T+D+L==0)return 1;

	vector<int> x(T);

	vector<int> rui(200100);

	for(int i=0;i<T;i++){

		cin >> x[i];

		if(x[i]>=L){

			rui[i]++;

			rui[i+D]--;

		}

	}

	for(int i=1;i<200100;i++)rui[i]+=rui[i-1];

	//for(int i=0;i<=T;i++)cout << i << ':' << rui[i] << endl;

	int ans = 0;

	for(int i=0;i<T-1;i++)if(rui[i])ans++;

	cout << ans << endl;

	return 0;

}

int main(){

	while(!solve()){}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.9070590679206223x):
#include <bits/stdc++.h>

using namespace std;



typedef long long ll;



ll t,d,l;

ll x[100005];

ll i;

ll ans;



bool solve(){

	cin >> t >> d >> l;

	if(t == 0){

		return false;

	}

	for(i=0;i<t;i++){

		cin >> x[i];

	}

	ll value = 0;

	ans = 0;

	for(i=0;i<t-1;i++){

		if(x[i] >= l)value = d;

		if(value >= 1){

			ans++;

			value--;

		}

	}

	cout << ans << endl;

	return true;

}



int main(){

	while(solve()){}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std;

struct Node{

	int number, a;

} node[100005];



int cmp(Node a, Node b)

{

	return a.a < b.a;

}

int main()

{

	int n;

	cin >> n;

	for (int i = 1; i <= n; i++)

	{

		cin >> node[i].a;

		node[i].number = i; 

	}

	sort(node + 1, node + n + 1, cmp);

	for (int i = 1; i <= n; i++)

	{

		if (i != n)

		{

			cout << node[i].number << " ";

		}

		else

		{

			cout << node[i].number << endl;

		}

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.222649184907305x):
#include <cstdio>

#include <algorithm>

using namespace std;

const int maxn = 1e5 + 5;

struct Node {

    int id, num;

}node[maxn];

bool cmp(Node &a, Node &b) {

    return a.num < b.num;

}

//hh

int main() {

    int n;

    scanf("%d", &n);

    for(int i = 0; i < n; i++)

        scanf("%d", &node[i].num), node[i].id = i + 1;

    sort(node, node + n, cmp);

    for (int i = 0; i < n ; i++)

        printf("%d ", node[i].id);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std;

int n,a[123456],b[123455];

bool PP(int i,int j){

    return a[i]<a[j];

}

int main(){

    cin>>n;

    for (int i=1;i<=n;i++){

        cin>>a[i];

        b[i]=i;

    }

    sort(b+1,b+1+n,PP);

    for (int i=1;i<=n;i++)

    cout<<b[i]<<" ";

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.218110090226947x):
#include <cstdio>

#include <algorithm>

using namespace std;

const int maxn = 1e5 + 5;

struct Node {

    int id, num;

}node[maxn];

bool cmp(Node &a, Node &b) {

    return a.num < b.num;

}

//hh

int main() {

    int n;

    scanf("%d", &n);

    for(int i = 0; i < n; i++)

        scanf("%d", &node[i].num), node[i].id = i + 1;

    sort(node, node + n, cmp);

    for (int i = 0; i < n ; i++)

        printf("%d ", node[i].id);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <stdio.h>

#include <vector>

#include <iomanip>

#include <stdlib.h>



using namespace std;



#define LL long long

#define FOR(i,l,r) for(int i = l; i <= r; ++i)

#define REP(i,l,r) for(int i = l; i < r; ++i)

#define pi pair<int,int>

#define mp make_pair



const int maxN = 1e5 + 11;

const LL oo = 1e17 + 11;



int N,K;

int A[maxN],C[maxN];

bool cmp(int i,int j){

    return A[i] < A[j];

}



int main(){

    ios_base::sync_with_stdio(false);

    cin.tie();

    cout.tie();

    //



    cin >> N;

    FOR(i,1,N){

        cin >> A[i];

        C[i] = i;

    }

    sort(C + 1,C + 1 + N,cmp);

    //

    FOR(i,1,N) cout << C[i] << " ";



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.289410009278051x):
#include <cstdio>

#include <algorithm>

using namespace std;

const int maxn = 1e5 + 5;

struct Node {

    int id, num;

}node[maxn];

bool cmp(Node &a, Node &b) {

    return a.num < b.num;

}

//hh

int main() {

    int n;

    scanf("%d", &n);

    for(int i = 0; i < n; i++)

        scanf("%d", &node[i].num), node[i].id = i + 1;

    sort(node, node + n, cmp);

    for (int i = 0; i < n ; i++)

        printf("%d ", node[i].id);

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

const int maxn=100000+50;



struct node{

	int id,rank;

	//node(int x,int y):id(x),rank(y){}

	bool operator <(const node& rhs) const {

		return rank<rhs.rank;

	}

}a[maxn];





int n,x,y;



int main(){

	scanf("%d",&n);

	for(int i=1;i<=n;i++){

		scanf("%d",&x);

		a[i-1].id=i;a[i-1].rank=x;

	}

	sort(a,a+n);

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

}

// Faster C++ solution for the same problem (measured speedup: 5.197204352678844x):
#include <cstdio>

#include <algorithm>

using namespace std;

const int maxn = 1e5 + 5;

struct Node {

    int id, num;

}node[maxn];

bool cmp(Node &a, Node &b) {

    return a.num < b.num;

}

//hh

int main() {

    int n;

    scanf("%d", &n);

    for(int i = 0; i < n; i++)

        scanf("%d", &node[i].num), node[i].id = i + 1;

    sort(node, node + n, cmp);

    for (int i = 0; i < n ; i++)

        printf("%d ", node[i].id);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std;

struct Node{

	int number, a;

} node[100005];



int cmp(Node a, Node b)

{

	return a.a < b.a;

}

int main()

{

	int n;

	cin >> n;

	for (int i = 1; i <= n; i++)

	{

		cin >> node[i].a;

		node[i].number = i; 

	}

	sort(node + 1, node + n + 1, cmp);

	for (int i = 1; i <= n; i++)

	{

		if (i != n)

		{

			cout << node[i].number << " ";

		}

		else

		{

			cout << node[i].number << endl;

		}

	}

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.211613874415419x):
#include<stdio.h>

#include<algorithm>

using namespace std;



struct STU{

	int idx,ai;

	

	bool operator < (const STU& s) const {

		return ai<s.ai;

	}

	

}stu[100005];



int N;



int main(){

	

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&(stu[i].ai));

		stu[i].idx=i+1;

	}

	sort(stu,stu+N);

	

	for(int i=0;i<N-1;i++)

		printf("%d ",stu[i].idx);

	printf("%d\n",stu[N-1].idx);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std;

int n,a[123456],b[123455];

bool PP(int i,int j){

    return a[i]<a[j];

}

int main(){

    cin>>n;

    for (int i=1;i<=n;i++){

        cin>>a[i];

        b[i]=i;

    }

    sort(b+1,b+1+n,PP);

    for (int i=1;i<=n;i++)

    cout<<b[i]<<" ";

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.207084370714156x):
#include<stdio.h>

#include<algorithm>

using namespace std;



struct STU{

	int idx,ai;

	

	bool operator < (const STU& s) const {

		return ai<s.ai;

	}

	

}stu[100005];



int N;



int main(){

	

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&(stu[i].ai));

		stu[i].idx=i+1;

	}

	sort(stu,stu+N);

	

	for(int i=0;i<N-1;i++)

		printf("%d ",stu[i].idx);

	printf("%d\n",stu[N-1].idx);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <stdio.h>

#include <vector>

#include <iomanip>

#include <stdlib.h>



using namespace std;



#define LL long long

#define FOR(i,l,r) for(int i = l; i <= r; ++i)

#define REP(i,l,r) for(int i = l; i < r; ++i)

#define pi pair<int,int>

#define mp make_pair



const int maxN = 1e5 + 11;

const LL oo = 1e17 + 11;



int N,K;

int A[maxN],C[maxN];

bool cmp(int i,int j){

    return A[i] < A[j];

}



int main(){

    ios_base::sync_with_stdio(false);

    cin.tie();

    cout.tie();

    //



    cin >> N;

    FOR(i,1,N){

        cin >> A[i];

        C[i] = i;

    }

    sort(C + 1,C + 1 + N,cmp);

    //

    FOR(i,1,N) cout << C[i] << " ";



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.278233635046377x):
#include<stdio.h>

#include<algorithm>

using namespace std;



struct STU{

	int idx,ai;

	

	bool operator < (const STU& s) const {

		return ai<s.ai;

	}

	

}stu[100005];



int N;



int main(){

	

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&(stu[i].ai));

		stu[i].idx=i+1;

	}

	sort(stu,stu+N);

	

	for(int i=0;i<N-1;i++)

		printf("%d ",stu[i].idx);

	printf("%d\n",stu[N-1].idx);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

const int maxn=100000+50;



struct node{

	int id,rank;

	//node(int x,int y):id(x),rank(y){}

	bool operator <(const node& rhs) const {

		return rank<rhs.rank;

	}

}a[maxn];





int n,x,y;



int main(){

	scanf("%d",&n);

	for(int i=1;i<=n;i++){

		scanf("%d",&x);

		a[i-1].id=i;a[i-1].rank=x;

	}

	sort(a,a+n);

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

}

// Faster C++ solution for the same problem (measured speedup: 5.186222806400122x):
#include<stdio.h>

#include<algorithm>

using namespace std;



struct STU{

	int idx,ai;

	

	bool operator < (const STU& s) const {

		return ai<s.ai;

	}

	

}stu[100005];



int N;



int main(){

	

	scanf("%d",&N);

	for(int i=0;i<N;i++){

		scanf("%d",&(stu[i].ai));

		stu[i].idx=i+1;

	}

	sort(stu,stu+N);

	

	for(int i=0;i<N-1;i++)

		printf("%d ",stu[i].idx);

	printf("%d\n",stu[N-1].idx);

	return 0;

}