# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
827653 | 2023-08-16T15:59:01 Z | DarkMatter | Nadan (COCI18_nadan) | C++17 | 1 ms | 256 KB |
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include<unordered_map> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int>pi; typedef pair<ll, ll>pl; typedef vector<pi>vpi; typedef vector<pl>vpl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef vector<string> vs; typedef vector<bool> vb; const long double PI = acos(-1); const ll oo = 1e18; const int MOD = 1e9 + 7; const int N = 2e5 + 7; #define endl '\n' #define all(v) (v).begin(),(v).end() #define rall(v) (v).rbegin(),(v).rend() #define read(v) for (auto& it : v) scanf("%d", &it); #define readL(v) for (auto& it : v) scanf("%lld", &it); #define print(v) for (auto it : v) printf("%d ", it); puts(""); #define printL(v) for (auto it : v) printf("%lld ", it); puts(""); void solve() { ll n, k; scanf("%lld %lld", &k, &n); vl ans(n); iota(all(ans), 1); ll sum = accumulate(all(ans), 0LL); ll dif = k - sum; ans.back() += dif; for (auto& it : ans) printf("%lld\n", it); } int t = 1; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif //scanf("%d", &t); while (t--) solve(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 256 KB | Output isn't correct |
2 | Incorrect | 1 ms | 212 KB | Output isn't correct |
3 | Incorrect | 0 ms | 212 KB | Output isn't correct |
4 | Incorrect | 1 ms | 212 KB | Output isn't correct |
5 | Incorrect | 1 ms | 212 KB | Output isn't correct |
6 | Incorrect | 0 ms | 212 KB | Output isn't correct |
7 | Incorrect | 0 ms | 212 KB | Output isn't correct |
8 | Incorrect | 0 ms | 212 KB | Output isn't correct |
9 | Incorrect | 1 ms | 212 KB | Output isn't correct |
10 | Incorrect | 0 ms | 212 KB | Output isn't correct |