fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define int long long
  5. void solve(){
  6. int n,l,r;
  7. cin>>n>>l>>r;
  8. if((r-l+1)<n){
  9. cout<<"NO"<<endl;
  10. return;
  11. }
  12. cout<<"YES"<<endl;
  13. for(int i=1;i<=n;i++){
  14. int j=((l - 1) / i + 1) * i;
  15. cout<<j<<" ";
  16. }
  17. cout<<endl;
  18.  
  19. }
  20. signed main() {
  21. // your code goes here
  22. int t;
  23. cin>>t;
  24. while(t--){
  25. solve();
  26. }
  27. return 0;
  28. }
Success #stdin #stdout 0s 5268KB
stdin
4
5 1 5
9 1000 2000
10 30 35
1 1000000000 1000000000
stdout
YES
1 2 3 4 5 
YES
1000 1000 1002 1000 1000 1002 1001 1000 1008 
NO
YES
1000000000