Submission #573438

#TimeUsernameProblemLanguageResultExecution timeMemory
573438Rasoul006Nadan (COCI18_nadan)C++17
50 / 50
1 ms340 KiB
#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 timeMemoryGrader output
Fetching results...