79533688

Date: 2025-03-25 12:40:21
Score: 2.5
Natty:
Report link

here is my code

```cpp
    #include <bits/stdc++.h>
    using namespace std;

    int n, k, a[100], final = false;

    void ktao(){
        for(int i = 1; i <= k; i++){
            a[i] = i;
        }
    }

    void fuckk(){
        int i = k;
        while(i >= 1 && a[i] == n - k + i){
            --i;
        }
        if(i == 0){
            for(int j = 1; j <= k; j++){
                a[j] = j;
            }
        }else{
            ++a[i];
            for(int j = i + 1; j <= k; j++){
                a[j] = a[j - 1] + 1;
            }
        }
    }

    int main(){
        int test; cin >> test;
        while(test--){
            cin >> n >> k;
            for(int i = 1; i <= k; i++){
                cin >> a[i];
            }
            fuckk();
            for(int i = 1; i <= k; i++){
                cout << a[i] << " ";
            }
            cout << endl;
        }
    }
Reasons:
  • Blacklisted phrase (2): fuck
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Quyền Nguyễn