#include<bits/stdc++.h> #define int long long #define re register
usingnamespace std;
constint N = 2e5 + 10; int n,l,r; int sum[N],arr[N];
inlineintread(){ int r = 0,w = 1; char c = getchar(); while (c < '0' || c > '9'){ if (c == '-') w = -1; c = getchar(); } while (c >= '0' && c <= '9'){ r = (r << 1) + (r << 3) + (c ^ 48); c = getchar(); } return r * w; }
inlinevoidinit(){//预处理 sum 数组 for (re int i = 1,k = n - 1;i < n;i++,k--) sum[i] = sum[i - 1] + k; }
signedmain(){ n = read(); l = read(); r = read(); init(); for (re int i = 1;i <= n;i++) arr[i] = i; int a = lower_bound(sum + 1,sum + n/*注意这里只能不能写 + 1,因为 sum[n] = 0,加上后 sum 数组不有序无法二分*/,l) - sum;//找出 (x1,y1) int b = a + l - sum[a - 1]; int cnt = 1; while (cnt <= (r - l + 1) && b <= n){//暴力维护 (x1,y1) ~ (x1,n) swap(arr[a],arr[b]); cnt++; b++; } int i = a + 1; vector<int> A,B;//维护中间完整段 for (re int j = i;j <= n;j++) B.push_back(arr[j]); while (sum[i] <= r && i < n){ if (B.empty()) break; A.push_back(B.back()); B.pop_back(); i++; } for (auto x:A) arr[++a] = x;//更新新的序列 for (auto x:B) arr[++a] = x; cnt = r - sum[i - 1]; for (int j = 1,k = i + 1;j <= cnt && k <= n;j++,k++) swap(arr[i],arr[k]);//暴力维护剩余的操作次数 for (re int i = 1;i <= n;i++) printf("%lld ",arr[i]); return0; }