Submission #7738243


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const ll INF = 1ll<<30;
const ll longINF = 1ll<<60;
const ll MOD = 1000000007;
const double EPS = 1e-9;
const bool debug = 0;
//---------------------------------//

int N;
int A[112345], ans[112345];

int main() {
	cin >> N;
	REP(i, N) scanf("%d", A + i);
	
	
	REP(i, N) ans[A[i] - 1] = i;
	REP(i, N) printf("%d%c", ans[i] + 1, i == N - 1 ? '\n' : ' ');
	
	return 0;
}

Submission Info

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

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:25:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  REP(i, N) scanf("%d", A + i);
                              ^

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 17 ms 1408 KB
02-large-02.txt AC 19 ms 1536 KB
02-large-03.txt AC 11 ms 1024 KB
02-large-04.txt AC 20 ms 1536 KB
02-large-05.txt AC 14 ms 1152 KB
03-max-01.txt AC 20 ms 1664 KB
03-max-02.txt AC 20 ms 1664 KB
10-handmade-01.txt AC 1 ms 256 KB