Comments

D was pretty fun

exactly, I feel this current system is stupid. If I'd known my solution was incorrect, at least I'd try again, but now I'm being penalised for something I didn't even know.

Oh okay, I get it now.

what's wrong with this solution for part C? I'm getting wrong answer in test 2

#include <bits/stdc++.h>

using namespace std;

int main() {
	// Your code goes here;
    vector<int> g;
    for(int n=1; n<40; n++) g.push_back(n*(n+1)/2);
    int t;
    cin>>t;
    while(t--){
	int k, n;
        cin>>k>>n;
        vector<int> ans(k);
        for(int i=0; i<k; i++){
            if(g[i]<=n-(k-i-1)) ans[i]=g[i];
            else ans[i]=ans[i-1]+1;
        }
        for(int i=0; i<k; i++){
            cout<<ans[i]<<" ";
        }
        cout<<"\n";
    }
    return 0;
}