Skip to content

Instantly share code, notes, and snippets.

View l-arkadiy-l's full-sized avatar
✌️
Solve contests

Archi l-arkadiy-l

✌️
Solve contests
View GitHub Profile
#include <iostream>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
auto find_number(vector<int> &a, int start, int r, int counter) {
if (start > r) return counter;
if (find(a.begin(), a.end(), start) != a.end()) {
counter += count(a.begin(), a.end(), start);
#include <iostream>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n;
vector<int> a(n);
@l-arkadiy-l
l-arkadiy-l / Компьютерная игра.cpp
Created February 22, 2021 11:22
Компьютерная игра
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define int long long
const int INF = 1e9;
auto solve_agent() {
int n, k;
@l-arkadiy-l
l-arkadiy-l / Цепочка слов.cpp
Created February 24, 2021 11:24
Цепочка слов
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define int long long
auto print(string i){
cout << i << endl;
}
auto solve_3() {
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define int long long
auto print(string i) {
cout << i << endl;
}
@l-arkadiy-l
l-arkadiy-l / Морской бой.cpp
Created March 8, 2021 08:31
Морской бой.cpp
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
auto print_bool(vector<bool> i) {
for (int j = 0; j < i.size(); j++) {
cout << i[j] << " ";
}
cout << "\n";
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define int long long
auto solve_1() {
int n;
scanf("%d", &n);
vector<vector<int>> ans(n, vector<int>(n, 0));
#include <bits/stdc++.h>
using namespace std;
#define int long long
auto print(vector<int> d) {
for (auto x: d) {
cout << x << " ";
}
cout << "\n";
#include <bits/stdc++.h>
using namespace std;
#define int long long
auto print(vector<int> d) {
for (auto x: d) {
cout << x << " ";
}
cout << "\n";
#include <bits/stdc++.h>
#define int long long
using namespace std;
// ~ - инверсия всех бит
// & - И - конконтенация совподающих бит
// | - ИЛИ - конкотенация всех бит
string sum(const string &A, const string &B) {
int G = 0;