# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
158927 | aviroop123 | Nadan (COCI18_nadan) | C++14 | 2 ms | 376 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.
#include "bits/stdc++.h"
using namespace std;
#define pb push_back
// #define int long long
typedef long long ll;
#define fi first
#define se second
#define pii pair<int,int>
#define endl '\n'
#define fr(i, a, b) for(int i = a; i <= b; i++)
#define sz(s) (int)s.size()
#define y1 fdfbvfds
typedef long double f80;
#define all(x) x.begin(), x.end()
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll rand(ll l,ll r){
uniform_int_distribution<ll> uid(l, r);
return uid(rng);
}
const int mod = 1e9 + 7;
int pwr(int a,ll b) {
int ans = 1;
while(b) {
if(b & 1) {
ans = ((ll)ans * a) % mod;
}
a = ((ll)a * a) % mod;
b >>= 1;
}
return ans;
}
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
int n, k;
cin >> k >> n;
fr(i, 1, n - 1) {
cout << i << endl;
k -= i;
}
cout << k << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |