Submission #1694137


Source Code Expand

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#define REP(i, m, n) for(int i=int(m);i<int(n);i++)
#define EACH(i, c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

//#define LOCAL 0
//#ifdef LOCAL
//#define DEBUG(s) cout << (s) << endl
//#define dump(x)  cerr << #x << " = " << (x) << endl
//#define BR cout << endl;
//#else
//#define DEBUG(s) do{}while(0)
//#define dump(x) do{}while(0)
//#define BR
//#endif


//改造
typedef long long int ll;
using namespace std;
#define INF (1 << 20)
#define INFl (ll)5e15
#define DEBUG 0 //デバッグする時1にしてね

//ここから編集する


int main() {
    int N;
    cin >> N;
    vector<int> p(N+1);
    vector<int> pos(N+1);
    vector<int> a(N+1),b(N+1);
    REP(i,1,N+1){
        cin >> p[i];
        pos[p[i]] = i;
    }

    REP(i,1,N+1){
        a[i] = i*20000;
        b[i] = (N + 1 - i)*20000;
    }

    REP(i,1,N+1){
        a[i] += pos[a[i]];
    }

    REP(i,1,N+1){
        cout << a[i] << " ";
    }
    cout << endl;
    REP(i,1,N+1){
        cout << b[i] << " ";
    }



    return 0;
}

Submission Info

Submission Time
Task B - Construct Sequences
User homesentinel
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1863 Byte
Status RE
Exec Time 107 ms
Memory 512 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 400
Status
RE × 3
RE × 22
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 RE 104 ms 256 KB
001.txt RE 103 ms 256 KB
002.txt RE 102 ms 256 KB
003.txt RE 100 ms 256 KB
004.txt RE 99 ms 256 KB
005.txt RE 104 ms 512 KB
006.txt RE 100 ms 256 KB
007.txt RE 104 ms 512 KB
008.txt RE 102 ms 384 KB
009.txt RE 105 ms 512 KB
010.txt RE 106 ms 512 KB
011.txt RE 106 ms 512 KB
012.txt RE 105 ms 512 KB
013.txt RE 107 ms 512 KB
014.txt RE 106 ms 512 KB
015.txt RE 106 ms 512 KB
016.txt RE 105 ms 512 KB
017.txt RE 105 ms 512 KB
018.txt RE 106 ms 512 KB
example0.txt RE 99 ms 256 KB
example1.txt RE 99 ms 256 KB
example2.txt RE 99 ms 256 KB