Submission #237096

#TimeUsernameProblemLanguageResultExecution timeMemory
237096DanShadersNadan (COCI18_nadan)C++17
50 / 50
5 ms512 KiB
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define all(x) begin(x), end(x) #define x first #define y second typedef long long ll; typedef long double ld; template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T> using normal_queue = priority_queue<T, vector<T>, greater<T>>; signed main() { ios::sync_with_stdio(0); cin.tie(0); int n, k; cin >> n >> k; for (int i = 1; i <= k; ++i) { if (i == k) cout << n << endl; else cout << i << endl, n -= i; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...