Submission #474351

#TimeUsernameProblemLanguageResultExecution timeMemory
474351Killer2501Nadan (COCI18_nadan)C++14
50 / 50
8 ms14424 KiB
#include <bits/stdc++.h> #define ll long long #define pll pair<ll, ll> #define pii pair<ll, pll> #define pb push_back #define fi first #define se second using namespace std; const int N = 2e5+5; const ll mod = 1e9 + 7; const int base = 40; ll n, m, k, t, a[N], b[N], c[N], tong, dp[N]; long long ans; vector<ll> adj[N]; pll p[N]; ll pw(ll k, ll n) { ll total = 1; for(; n; n >>= 1) { if(n & 1)total = total * k % mod; k = k * k % mod; } return total; } bool ccw(pll x, pll y, pll z) { return x.fi * (y.se - z.se) + y.fi * (z.se - x.se) + z.fi * (x.se - y.se) >= 0; } ll C(ll u, ll v) { if(u > v)return 0; return a[v] * b[u] % mod * b[v-u] % mod; } map<pll, ll> mp; set<ll> st[N]; void sol() { cin >> m >> n; k = 1; for(int i = 1; i < n; i ++) { cout << k <<'\n'; ++k; } --k; cout << m - (k + 1) * k / 2; } int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); int test = 1; //cin >> test; while (test-- > 0) sol(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...