Submission #979069
Source Code Expand
#pragma comment(linker, "/STACK:60777216")
#include <cassert>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<complex>
#include<vector>
#include<set>
#include<map>
#include<cmath>
#include<queue>
#include<string>
#include<cstdlib>
#include<memory.h>
#include<ctime>
#include<bitset>
#include<fstream>
#include<queue>
#include<stack>
#include<unordered_map>
#include<unordered_set>
using namespace std;
typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ld,ld> pdd;
typedef vector<int> vi;
typedef vector<ld> vd;
typedef pair<ll,ll> pl;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define SORT(v) sort((v).begin(),(v).end())
#define UN(v) SORT(v),(v).erase(unique((v).begin(),(v).end()),(v).end())
#define CL(a,b) memset(a,b,sizeof a)
#define pb push_back
int p[22222];
int a[22222];
int main(){
#ifdef LocalHost
freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
#endif
int n;
cin>>n;
REP(i,n)cin>>p[i],p[i]--;
REP(i,n)a[p[i]]=1+i*n;
REP(i,n){
if(i)printf(" ");
printf("%d",a[i]);
}
puts("");
REP(i,n){
if(i)printf(" ");
printf("%d",n-i);
}
puts("");
#ifdef LocalHost
printf("TIME: %.3lf\n",ld(clock())/CLOCKS_PER_SEC);
#endif
return 0;
}
Submission Info
Submission Time |
|
Task |
B - Construct Sequences |
User |
RAVEman |
Language |
C++14 (GCC 5.4.1) |
Score |
0 |
Code Size |
1350 Byte |
Status |
WA |
Exec Time |
13 ms |
Memory |
640 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 |
256 KB |
001.txt |
WA |
3 ms |
256 KB |
002.txt |
WA |
3 ms |
256 KB |
003.txt |
WA |
3 ms |
256 KB |
004.txt |
WA |
3 ms |
256 KB |
005.txt |
WA |
12 ms |
640 KB |
006.txt |
WA |
4 ms |
384 KB |
007.txt |
WA |
11 ms |
640 KB |
008.txt |
WA |
7 ms |
512 KB |
009.txt |
WA |
12 ms |
640 KB |
010.txt |
WA |
13 ms |
640 KB |
011.txt |
WA |
13 ms |
640 KB |
012.txt |
WA |
12 ms |
640 KB |
013.txt |
WA |
13 ms |
640 KB |
014.txt |
WA |
13 ms |
640 KB |
015.txt |
WA |
13 ms |
640 KB |
016.txt |
WA |
13 ms |
640 KB |
017.txt |
WA |
13 ms |
640 KB |
018.txt |
WA |
13 ms |
640 KB |
example0.txt |
AC |
3 ms |
256 KB |
example1.txt |
WA |
2 ms |
256 KB |
example2.txt |
WA |
3 ms |
256 KB |