Submission #248768

# Submission time Handle Problem Language Result Execution time Memory
248768 2020-07-13T10:33:22 Z uacoder123 Nadan (COCI18_nadan) C++14
50 / 50
1 ms 512 KB
 #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define FOR(i,a,b) for (auto i = (a); i <= (b); ++i)
#define NFOR(i,a,b) for(auto i = (a); i >= (b); --i)
#define all(x) (x).begin(), (x).end()
#define sz(x) int(x.size())
#define mp(i,a) make_pair(i,a)
#define pb(a) push_back(a)
#define bit(x,b) (x&(1LL<<b))
 
typedef int lli;
typedef pair <lli,lli> ii;
typedef pair <lli,ii> iii;
typedef vector <lli> vi;

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int test=1;
  for(;test>0;--test)
  {
    int n,k,s=0;
    cin>>k>>n;
    for(int i=0;i<n-1;++i)
    {
      cout<<i+1<<endl;
      s+=i+1;
    }
    cout<<k-s<<endl;
  }
  return(0);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 512 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Correct 0 ms 384 KB Output is correct
6 Correct 0 ms 384 KB Output is correct
7 Correct 0 ms 384 KB Output is correct
8 Correct 0 ms 384 KB Output is correct
9 Correct 1 ms 384 KB Output is correct
10 Correct 0 ms 384 KB Output is correct