# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
464605 | aihay | Nadan (COCI18_nadan) | C++14 | 1 ms | 320 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.
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC optimize("-Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef int in;
#define int long long
#define f first
#define s second
#define pb push_back
#define pp push
#define double long double
#define ceil(x,y) (x/y)+(x%y!=0)*((double)(1.0*x/y)<0?0:1)
#define floor(x,y) (x/y)+(x%y!=0)*((double)(1.0a*x/y)<0?-1:0)
const int MAX=1e7;
const int MOD=1e9+7;
const int MAAX=1e18;
in main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int tc=1;
//cin>>tc;
while(tc--){
int n,k;
cin>>k>>n;
for(int i=0;i<n-1;i++){
cout<<i+1<<" ";
k-=i+1;
}
cout<<k<<"\n";
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |