# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
827424 | andrewp | Nadan (COCI18_nadan) | C++14 | 1 ms | 256 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//Dedicated to my love, ivaziva
#define yes cout << "Yes\n"
#define no cout << "No\n"
#define here cerr<<"===========================================\n"
#define dbg(x) cerr<<#x<<": "<<x<<endl;
#define ceri(a,l,r) {for(ll i_ = l;i_<=r;i_++) cerr<<a[i_]<< " ";cerr<<endl;}
#include "bits/stdc++.h"
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
#define ld long double
#define ll long long
#define llinf 100000000000000000LL
#define pb push_back
#define popb pop_back
#define fi first
#define sc second
#define endl '\n'
#define pll pair<ll,ll>
#define pld pair<ld,ld>
#define all(a) a.begin(),a.end()
#define si(s) (ll)(s.size())
#define ios ios_base::sync_with_stdio(false);cerr.tie(0);cout.tie(0);cin.tie(0);
#define mod 1000000007 //1000000007
using namespace std;
/*using namespace __gnu_pbds;
typedef tree<int,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
inline int add(int A, int B) { if(A + B >= n) return A + B - n; return A + B; }
inline int sub(int A, int B) { if(A - B < 0) return A - B + mod; return A - B; }
inline int mul(int A, int B) { return (ll)A * B % mod; }
inline int pot(int A, int B){
int ret = 1, bs = A;
for(; B ; B >>= 1){
if(B & 1) ret = mul(ret, bs);
bs = mul(bs, bs);
}
return ret%mod;
}*/
#define ivamanjeod3 200005
int n,k;
void tc(){
cin >> n >> k;
ll sum = 0;
vector<int> ivaziva;
for(int i = 1;i<=k-1;i++){
ivaziva.pb(i);
sum+=i;
}
ivaziva.pb(n-sum);
for(auto ivv:ivaziva) cout<<ivv<<endl;
}
int main(){
ios
// freopen("248.in", "r", stdin);
// freopen("248.out", "w", stdout);
int t; t = 1;
//cin >> t;
while(t--){
tc();
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |