Submission #2733265


Source Code Expand

Copy
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <queue>
#include <utility>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define For(i, a, b) for(int i = (a); i < (b); i++)
#define Rep(i, n) For(i, 0, (n))
#define Rrep(i, n) for(int i = (n - 1); i >= 0; i--)
#define pb push_back

const int inf = 999999999;
const int mod = 1000000007;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

int main(){
	int k; cin >> k;
	ll p[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
	ll a[14] = {9, 99, 999, 9999, 99999, 999999, 9999999, 99999999, 999999999, 9999999999, 99999999999, 999999999999, 9999999999999, 99999999999999};
	vector<ll> v(p, p + 9);
	Rep(i, 14){
		For(j, 1, 10){
			int t = 10;
			Rep(q, i){
				t *= 10;
			}
			v.pb(a[i] + j * t);
		}
	}
	Rep(i, k){
		cout << v[i] << endl;
	}
}

Submission Info

Submission Time
Task D - Snuke Numbers
User niimi
Language C++14 (GCC 5.4.1)
Score 0
Code Size 940 Byte
Status
Exec Time 2 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample.txt
All 0 / 500 sample.txt, 1.txt, sample.txt
Case Name Status Exec Time Memory
1.txt 2 ms 256 KB
sample.txt 1 ms 256 KB