Precreation contest files
This commit is contained in:
22
misc/tlbdhsg/b20.cpp
Normal file
22
misc/tlbdhsg/b20.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
ios::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
|
||||
int n, x, k;
|
||||
cin >> n >> k >> x;
|
||||
cout << n + 1 << '\n';
|
||||
k--;
|
||||
while (n--) {
|
||||
int a;
|
||||
cin >> a;
|
||||
cout << a << ' ';
|
||||
k--;
|
||||
if (!k)
|
||||
cout << x << ' ';
|
||||
}
|
||||
cout << '\n';
|
||||
}
|
||||
Reference in New Issue
Block a user