Submission #1691509


Source Code Expand

#include <bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define RREP(i,a,b) for(int i=(a);i>=(b);i--)
typedef long long ll; typedef long double ld;
using namespace std;
const int INF=1e9, MOD=1e9+7, around[]={0,1,1,-1,0,-1,1,0,0};
const ld PI=abs(acos(-1));
int n,k,a[100010];
set<int> st;
map<int,int> mp;

int main(){
	cin >> n;
	REP(i,0,n) cin >> a[i],st.insert(a[i]);
	int c=0;
	for(auto s:st) mp[s]=c,c++;
	REP(i,0,n) cout << mp[a[i]] << endl;
	return 0;
}

Submission Info

Submission Time
Task C - 座圧
User ecasdqina
Language C++14 (Clang 3.8.0)
Score 0
Code Size 494 Byte
Status CE

Compile Error

./Main.cpp:1:10: fatal error: 'bits/stdc++.h' file not found
#include <bits/stdc++.h>
         ^
1 error generated.