# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
573438 | Rasoul006 | Nadan (COCI18_nadan) | C++17 | 1 ms | 340 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define endl "\n"
#define F first
#define S second
#define pb push_back
#define all(x) x.begin() , x.end()
#define mm1(dp) memset (dp , -1 , sizeof dp)
#define mm0(dp) memset (dp , 0 , sizeof dp)
#define mmo(dp) memset (dp , oo , sizeof dp)
#define mid ((r+l)>>1)
#define lx (n<<1)
#define rx ((n<<1)|1)
typedef long long ll;
using namespace std;
const int N = 1e6+5;
const int MOD = 1e9+7;
const long long oo = 4557430888798830399 ;
ll n , k ;
int main()
{
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin >> k >> n ;
for (int i = 0 ; i<n-1 ; i++)
{
cout << i+1 << endl ;
k-=i+1;
}
cout << k << endl ;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |