F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Virtual Participation

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 1335    Accepted Submission(s): 449
Special Judge


Problem Description
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he asks rikka to have some practice on codeforces. Then she opens the problem B:

Given an integer $K$, she needs to come up with an sequence of integers $A$ satisfying that the number of different continuous subsequence of $A$ is equal to $k$.

Two continuous subsequences $a,\ b$ are different if and only if one of the following conditions is satisfied:

1. The length of $a$ is not equal to the length of $b$.

2. There is at least one $t$ that $a_{t} \neq b_{t}$, where $a_{t}$ means the $t$-th element of $a$ and $b_{t}$ means the $t$-th element of $b$.

Unfortunately, it is too difficult for Rikka. Can you help her?
 

Input
There are at most 20 testcases£¬each testcase only contains a single integer $K\ (1 \leq K \leq 10^9)$
 

Output
For each testcase print two lines.

The first line contains one integers $n\ (n \leq \min(K,10^5))$.

The second line contains $n$ space-separated integer $A_i\ (1 \leq A_i \leq n)$ - the sequence you find.
 

Sample Input
10
 

Sample Output
4 1 2 3 4
 

Author
XJZX
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 08:49:14, Gzip enabled