Submission #1387974
Source Code Expand
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #include <cstdlib> #include <fstream> #include <numeric> #include <sstream> #include <cassert> #include <iomanip> #include <iostream> #include <algorithm> #include <unordered_set> #include <unordered_map> using namespace std; #define f first #define s second #define pb push_back #define pp pop_back #define mp make_pair #define ll long long #define ld double #define ull unsigned long long #define PI pair < int, int > const int N = 1234; const int M = 123; const ld Pi = acos(-1); const ll Inf = 1e18; const int inf = 1e9; const int mod = 1e9 + 7; const int Sz = 501; const int MOD = 1e9 + 7; void add(int &a, int b) { a += b; if (a >= mod) a -= mod; } int mult(int a, int b) { return 1ll * a * b % mod; } int sum(int a, int b) { add(a, b); return a; } int n, r[N], a[N], b[N]; int cur = 3e4; void solve() { cin >> n; for (int i = 1;i <= n;i++) { int x; cin >> x; r[i] = x; a[i] = i * cur; b[i] = (n - i + 1) * cur; } for (int i = 1;i <= n;i++) cout << a[i] << " "; cout << endl; for (int i = 1;i <= n;i++) cout << b[i] + r[i] << " "; cout << endl; } int main() { #ifdef wws freopen("in", "r", stdin); // freopen("out", "w", stdout); #endif ios_base::sync_with_stdio(0); int tt = 1; while(tt--) solve(); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Construct Sequences |
User | SmallBoy |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1629 Byte |
Status | RE |
Exec Time | 103 ms |
Memory | 256 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 | 1 ms | 256 KB |
001.txt | WA | 1 ms | 256 KB |
002.txt | WA | 1 ms | 256 KB |
003.txt | WA | 1 ms | 256 KB |
004.txt | WA | 1 ms | 256 KB |
005.txt | WA | 1 ms | 256 KB |
006.txt | WA | 1 ms | 256 KB |
007.txt | RE | 103 ms | 256 KB |
008.txt | RE | 96 ms | 256 KB |
009.txt | RE | 97 ms | 256 KB |
010.txt | RE | 98 ms | 256 KB |
011.txt | RE | 97 ms | 256 KB |
012.txt | RE | 96 ms | 256 KB |
013.txt | RE | 97 ms | 256 KB |
014.txt | RE | 97 ms | 256 KB |
015.txt | RE | 97 ms | 256 KB |
016.txt | RE | 97 ms | 256 KB |
017.txt | RE | 97 ms | 256 KB |
018.txt | RE | 97 ms | 256 KB |
example0.txt | AC | 1 ms | 256 KB |
example1.txt | AC | 1 ms | 256 KB |
example2.txt | WA | 1 ms | 256 KB |