Submission #1444244
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb emplece_back
#define mp make_pair
#define i_i pair<int, int>
#define vi vector<int>
#define vvi vector<vi >
#define vb vector<bool>
#define vvb vector<vb >
#define vp vector< i_i >
#define Edge pair< int, i_i >
#define all(a) (a).begin(), (a).end()
#define Int(x) int x; scanf("%lld", &x);
#define int2(x, y) int x, y; scanf("%lld %lld", &x, &y);
#define fir first
#define sec second
#define ffir first.first
#define fsec first.second
#define sfir second.first
#define ssec second.second
//int dxy[5] = {0, 1, 0, -1, 0};
// assign avl ncm dij geo2
signed main()
{
Int(n);
vi p(n);
rep(i, n) {
cin >> p[i];
}
rep(i, n) {
std::cout << 30000 * (i + 1) << " ";
}
cout << endl;
vi data(n);
rep(i, n) {
data[i] = (n - i) * 30000;
}
rep(i, n) {
data[p[i]-1] += i;
}
rep(i, n) {
std::cout << data[i] << " " ;
}
cout << endl;
return 0;
}
Submission Info
Submission Time
2017-07-23 04:47:54+0900
Task
B - Construct Sequences
User
Ti11192916
Language
C++14 (GCC 5.4.1)
Score
400
Code Size
1321 Byte
Status
AC
Exec Time
10 ms
Memory
896 KB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:23:40: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
#define Int(x) int x; scanf("%lld", &x);
^
./Main.cpp:37:5: note: in expansion of macro ‘Int’
Int(n);
^
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
400 / 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
AC
2 ms
256 KB
001.txt
AC
2 ms
256 KB
002.txt
AC
2 ms
256 KB
003.txt
AC
1 ms
256 KB
004.txt
AC
2 ms
256 KB
005.txt
AC
10 ms
896 KB
006.txt
AC
3 ms
384 KB
007.txt
AC
9 ms
896 KB
008.txt
AC
6 ms
640 KB
009.txt
AC
10 ms
896 KB
010.txt
AC
10 ms
896 KB
011.txt
AC
10 ms
896 KB
012.txt
AC
10 ms
896 KB
013.txt
AC
10 ms
896 KB
014.txt
AC
10 ms
896 KB
015.txt
AC
10 ms
896 KB
016.txt
AC
10 ms
896 KB
017.txt
AC
10 ms
896 KB
018.txt
AC
10 ms
896 KB
example0.txt
AC
1 ms
256 KB
example1.txt
AC
1 ms
256 KB
example2.txt
AC
1 ms
256 KB