i am mediocre and this really only yields like 6/100 lol, fails 48 tests xd
This commit is contained in:
parent
2be90bb54d
commit
292c95eaca
1 changed files with 24 additions and 0 deletions
24
61/solutie.cpp
Normal file
24
61/solutie.cpp
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int n, k, offset=0;
|
||||||
|
cin >> n >> k;
|
||||||
|
for (int i = 0; i < n; i++) {
|
||||||
|
for (int j = 0; j < offset; j++) {
|
||||||
|
cout << "1";
|
||||||
|
}
|
||||||
|
for (int j = 0; j < n-k; j++) {
|
||||||
|
if (offset + j < n) {
|
||||||
|
cout << "0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int j = 0; j < k-offset; j++) {
|
||||||
|
cout << "1";
|
||||||
|
}
|
||||||
|
cout << endl;
|
||||||
|
offset++;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue