Submission #7738882


Source Code Expand

Copy
/*
    Author: Nguyen Tan Bao
    Status:
    Idea:
*/

#include <bits/stdc++.h>
#define FI first
#define SE second
#define EPS 1e-9
#define ALL(a) a.begin(),a.end()
#define SZ(a) int((a).size())
#define MS(s, n) memset(s, n, sizeof(s))
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define FORE(i,a,b) for (int i = (a); i >= (b); i--)
#define FORALL(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
#define WHATIS(x) cout << #x << " is " << x << endl;
#define ERROR(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
//__builtin_ffs(x) return 1 + index of least significant 1-bit of x
//__builtin_clz(x) return number of leading zeros of x
//__builtin_ctz(x) return number of trailing zeros of x

using namespace std;
using ll = long long;
using ld = double;
typedef pair<int, int> II;
typedef pair<II, int> III;
typedef complex<ld> cd;
typedef vector<cd> vcd;

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cout << *it << " = " << a << endl;
    err(++it, args...);
}

const ll MODBASE = 1000000007LL;
const int MAXN = 100010;
const int MAXM = 2010;
const int MAXK = 110;
const int MAXQ = 200010;

int n;
II a[MAXN];

int main() {
    ios::sync_with_stdio(0);
    cin.tie(nullptr);
    cin >> n;
    FOR(i,1,n) {
        int x;
        cin >> x;
        a[i] = II(x, i);
    }
    sort(a+1, a+n+1);
    FOR(i,1,n) cout << a[i].SE << ' ';
    return 0;
}

Submission Info

Submission Time
Task C - Go to School
User farmerboy
Language C++14 (GCC 5.4.1)
Score 300
Code Size 1639 Byte
Status AC
Exec Time 23 ms
Memory 1664 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 16
Set Name Test Cases
Sample 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt
All 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 01-small-01.txt, 01-small-02.txt, 01-small-03.txt, 01-small-04.txt, 01-small-05.txt, 02-large-01.txt, 02-large-02.txt, 02-large-03.txt, 02-large-04.txt, 02-large-05.txt, 03-max-01.txt, 03-max-02.txt, 10-handmade-01.txt
Case Name Status Exec Time Memory
00-sample-01.txt AC 1 ms 256 KB
00-sample-02.txt AC 1 ms 256 KB
00-sample-03.txt AC 1 ms 256 KB
01-small-01.txt AC 1 ms 256 KB
01-small-02.txt AC 1 ms 256 KB
01-small-03.txt AC 1 ms 256 KB
01-small-04.txt AC 1 ms 256 KB
01-small-05.txt AC 1 ms 256 KB
02-large-01.txt AC 19 ms 1408 KB
02-large-02.txt AC 22 ms 1536 KB
02-large-03.txt AC 13 ms 1024 KB
02-large-04.txt AC 23 ms 1536 KB
02-large-05.txt AC 16 ms 1152 KB
03-max-01.txt AC 23 ms 1664 KB
03-max-02.txt AC 23 ms 1664 KB
10-handmade-01.txt AC 1 ms 256 KB