#include <iostream> #include <fstream> #include <string.h> using namespace std; // const int N = 5e5 + 5; // int male_max[N]; // int male_max_c[N]; int main() { string str_1 = "1"; string str_0 = "0"; string str_10 = "10"; string str_01 = "01"; string wiersz = str_10; for (int i = 1; i <= 98; i++) { wiersz += str_0; } cout << wiersz << endl; wiersz = str_01; for (int i = 1; i <= 98; i++) { wiersz += str_1; } cout << wiersz << endl; for (int i = 1; i <= 98; i++) { string wiersz = ""; if (i % 2 == 1) { for (int i = 1; i <= 99; i++) { wiersz += str_0; } wiersz += str_1; } else { wiersz = str_0; for (int i = 1; i <= 99; i++) { wiersz += str_1; } } cout << wiersz <<endl; } return 0; } // int main() { // int n, c; // cin >> n >> c; // // int cur_max = 0; // int counter = 0; // int a = 0; // int w = 0; // while (counter < n) { // cin >> a >> w; // if (a > c) { // break; // } // male_max[w] += a; // cur_max = max(cur_max, male_max[w]); // counter ++; // } // // while (counter < n) { // // } // return 0; // } // int main() { // int n, c; // cin >> n >> c; // int a, w; // int current_w = 0; // int ret = 0; // for (int i = 1; i <= n; i++) { // cin >> a >> w; // ret += max(0, a - c*(w == current_w or current_w == 0)); // current_w = w; // } // cout << ret; // } //
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | #include <iostream> #include <fstream> #include <string.h> using namespace std; // const int N = 5e5 + 5; // int male_max[N]; // int male_max_c[N]; int main() { string str_1 = "1"; string str_0 = "0"; string str_10 = "10"; string str_01 = "01"; string wiersz = str_10; for (int i = 1; i <= 98; i++) { wiersz += str_0; } cout << wiersz << endl; wiersz = str_01; for (int i = 1; i <= 98; i++) { wiersz += str_1; } cout << wiersz << endl; for (int i = 1; i <= 98; i++) { string wiersz = ""; if (i % 2 == 1) { for (int i = 1; i <= 99; i++) { wiersz += str_0; } wiersz += str_1; } else { wiersz = str_0; for (int i = 1; i <= 99; i++) { wiersz += str_1; } } cout << wiersz <<endl; } return 0; } // int main() { // int n, c; // cin >> n >> c; // // int cur_max = 0; // int counter = 0; // int a = 0; // int w = 0; // while (counter < n) { // cin >> a >> w; // if (a > c) { // break; // } // male_max[w] += a; // cur_max = max(cur_max, male_max[w]); // counter ++; // } // // while (counter < n) { // // } // return 0; // } // int main() { // int n, c; // cin >> n >> c; // int a, w; // int current_w = 0; // int ret = 0; // for (int i = 1; i <= n; i++) { // cin >> a >> w; // ret += max(0, a - c*(w == current_w or current_w == 0)); // current_w = w; // } // cout << ret; // } // |