Submission #161142

# Submission time Handle Problem Language Result Execution time Memory
161142 2019-10-31T20:27:51 Z sans Nadan (COCI18_nadan) C++14
50 / 50
4 ms 376 KB
#include <bits/stdc++.h>
using namespace std;

#define sp ' '
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define mp make_pair
#define forn(YY, yy) for(int yy = 0; yy < YY; ++yy)

typedef long long int ll;
typedef unsigned long long int ull;

const int MOD = 1e9 + 7;
const int INF = 2e9;

ll K, N;

//Input
void input(void)
{
    cin >> K >> N;
}

int main(int argc, char **argv)
{
    ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
    input();

    for(int i = 1; i <= N-1; ++i)
        cout << i << endl;

    cout << K - ((N-1)*N/2) << endl;

    return 0;
}

//cikisir
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 4 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 376 KB Output is correct