This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sample data item, you can make your own | |
data class DataItem( | |
private val title: String, | |
private val id: Int | |
): EditTextSpinner.PopItem { | |
override fun getTitle() = title | |
override fun getId() = id | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by lectr on 10.03.2021. | |
// | |
#include <iostream> | |
#include <vector> | |
void sort(std::vector<int> &arr, int n) { | |
bool isSorted = true; | |
for (int j = 0; j < n - 1; j++) { | |
if (arr[j] > arr[j + 1]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <iostream> | |
int main() { | |
int n, m; | |
std::cin >> n; | |
std::cin >> m; | |
std::vector<int> nv(n); | |
std::vector<int> mv(m); | |
for (int i = 0; i < n; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
std::string st1, st2; | |
getline(std::cin, st1); | |
getline(std::cin, st2); | |
std::unordered_map<char, char> map; | |
if (st1.length() != st2.length()) { | |
std::cout << "NO"; | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
// | |
// Created by lectr on 24.03.2021. | |
// | |
#include <unordered_map> | |
#include <string> | |
int main() { | |
int n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <array> | |
#include <iostream> | |
#include <unordered_map> | |
#include <cassert> | |
#include <sstream> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <iostream> | |
#include <sstream> | |
#include <cmath> | |
#include <vector> | |
using namespace std; | |
#define p 10 | |
#define s 2654435769 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void print_range(Node *root, int L, int R) { | |
if (root == nullptr) { | |
return; | |
} | |
print_range(root->left, L, R); | |
if (root->value <= R && root->value >= L) { | |
cout << root->value << "\n"; | |
} | |
print_range(root->right, L, R); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by apolyusov on 19.04.2021. | |
// | |
#include "solution.h" | |
Node *my_method(Node *root) { | |
if (root->right == nullptr) { | |
return root; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main() { | |
int vertex_count; | |
cin >> vertex_count; | |
vector<vector<char>> matrix(vertex_count, vector<char>(vertex_count)); | |
for (int i = 0; i < vertex_count; i++) { |
OlderNewer