Created
April 26, 2016 08:17
-
-
Save PreSoichiSumi/83774a3c72305e0fb28362cb74a68828 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
#define all(c) ((c).begin()), ((c).end()) | |
#define dump(c) cerr << "> " << #c << " = " << (c) << endl; | |
#define iter(c) __typeof((c).begin()) | |
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++) | |
#define REP(i, a, b) for (int i = a; i < (int)(b); i++) | |
#define rep(i, n) REP(i, 0, n) | |
#define mp make_pair | |
#define fst first | |
#define snd second | |
#define pb push_back | |
typedef unsigned int uint; | |
typedef long long ll; | |
typedef unsigned long long ull; | |
#define int int32_t | |
#define ll int64_t | |
#define uint uint32_t | |
#define ull uint64_t | |
typedef vector<int> vi; | |
typedef vector<ll> vll; | |
typedef vector<vll> vvll; | |
typedef vector<vi> vvi; | |
typedef vector<double> vd; | |
typedef vector<vd> vvd; | |
typedef vector<string> vs; | |
typedef pair<int, int> pii; | |
typedef pair<ll, ll> pll; | |
template<class T> | |
ll stoi(T &str) { | |
ll ret; | |
stringstream ss; | |
ss << str; | |
ss >> ret; | |
return ret; | |
} | |
template<class T> | |
string toString(T i) { | |
stringstream ss; | |
ss << i; | |
return ss.str(); | |
} | |
template<class T> | |
void amax(T &a, T &b) { if (a < b)a = b; } | |
const ll INF = 1LL << 60; //1はint | |
const double EPS = 1e-10; | |
int N; | |
int *data; | |
int main() { | |
scanf("%d", &N); | |
data=new int[N]; | |
int tmp=0; | |
rep(i,N) { | |
scanf("%d", &tmp); | |
data[tmp-1]=i+1; | |
} | |
rep(i,N){ | |
int output=0; | |
if(data[i]==1){ | |
output=100000; | |
}else if(data[i]==2){ | |
output=50000; | |
}else if(data[i]==3){ | |
output=30000; | |
}else if(data[i]==4){ | |
output=20000; | |
}else if(data[i]==5){ | |
output=10000; | |
} | |
cout<<output<<endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment