# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
722303 |
2023-04-11T17:46:08 Z |
vjudge1 |
Nadan (COCI18_nadan) |
C++17 |
|
15 ms |
23800 KB |
#include <bits/stdc++.h>
#define B begin()
#define E end()
#define F first
#define S second
#define pb push_back
#define pf push_front
#define eb emplace_back
#define ll long long
#define ui unsigned int
#define ull unsigned long long
#define sts stable_sort
using namespace std;
const int MAXN = 1e6 + 4;
const int MOD = 1e9 + 7;
vector<int> add[MAXN];
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0);
int k, n; cin >> k >> n;
vector<int> v(n + 1);
ll sum = 0;
for(int i = 1; i <= n; i++){
if(i == n){
v[i] = k - sum;
}else{
v[i] = i;
}
sum += i;
}
for(int i = 1; i <= n; i++){
cout << v[i] << "\n";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
15 ms |
23764 KB |
Output is correct |
2 |
Correct |
14 ms |
23800 KB |
Output is correct |
3 |
Correct |
13 ms |
23692 KB |
Output is correct |
4 |
Correct |
14 ms |
23692 KB |
Output is correct |
5 |
Correct |
14 ms |
23752 KB |
Output is correct |
6 |
Correct |
13 ms |
23764 KB |
Output is correct |
7 |
Correct |
13 ms |
23764 KB |
Output is correct |
8 |
Correct |
12 ms |
23764 KB |
Output is correct |
9 |
Correct |
13 ms |
23800 KB |
Output is correct |
10 |
Correct |
15 ms |
23716 KB |
Output is correct |