Submission #980057
Source Code Expand
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vint; typedef pair<int,int> pint; typedef vector<pint> vpint; #define rep(i,n) for(int i=0;i<(n);i++) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++) #define all(v) (v).begin(),(v).end() #define pb push_back #define mp make_pair #define fi first #define se second #define chmax(a, b) a = (((a)<(b)) ? (b) : (a)) #define chmin(a, b) a = (((a)>(b)) ? (b) : (a)) const int MOD = 1e9 + 7; const int INF = 1e9; int n; int pulus[20010]; int s[20010]; int main(void){ cin >> n; rep(i, 20010) pulus[i] = 0; rep(i, n){ int a; cin >> a; pulus[a] = i; } int now = 1; for (int i = 1; i <= n; ++i){ s[i] = now; now += 5000; } for (int i = 1; i <= n; ++i){ printf("%d ", pulus[i] + s[i]); } printf("\n"); for (int i = 1; i <= n; ++i){ printf("%d ", 100000000 - s[i]); } printf("\n"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Construct Sequences |
User | mmxsrup |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1027 Byte |
Status | WA |
Exec Time | 13 ms |
Memory | 768 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0.txt, example1.txt, example2.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, example0.txt, example1.txt, example2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | WA | 3 ms | 384 KB |
001.txt | WA | 3 ms | 384 KB |
002.txt | WA | 3 ms | 384 KB |
003.txt | WA | 3 ms | 384 KB |
004.txt | WA | 3 ms | 384 KB |
005.txt | WA | 13 ms | 768 KB |
006.txt | WA | 4 ms | 384 KB |
007.txt | WA | 11 ms | 768 KB |
008.txt | WA | 8 ms | 640 KB |
009.txt | WA | 12 ms | 768 KB |
010.txt | WA | 13 ms | 768 KB |
011.txt | WA | 13 ms | 768 KB |
012.txt | WA | 13 ms | 768 KB |
013.txt | WA | 13 ms | 768 KB |
014.txt | WA | 13 ms | 768 KB |
015.txt | WA | 13 ms | 768 KB |
016.txt | WA | 13 ms | 768 KB |
017.txt | WA | 13 ms | 768 KB |
018.txt | WA | 13 ms | 768 KB |
example0.txt | WA | 3 ms | 384 KB |
example1.txt | WA | 3 ms | 384 KB |
example2.txt | WA | 3 ms | 384 KB |