Skip to content

Instantly share code, notes, and snippets.

#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int solution(vector<int> budgets, int M) {
int answer = -1;
int tsum = -1;
sort(budgets.begin(), budgets.end());
#include <cmath>
#include <vector>
#include <cstring>
#include <iostream>
using namespace std;
int person[10];
vector<int> mat[10];
bool checka[10], checkb[10];
#include <map>
#include <vector>
#include <string>
#include <iostream>
using namespace std;
int solution(vector<vector<string>> relation) {
int answer = 0;
int row = relation.size();
#include <deque>
#include <tuple>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
bool check[101];
cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
#include <deque>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
bool check[10000];
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
bool cmp(const pair<int, double> &u, const pair<int, double> &v) {
if (u.second == v.second) {
return u.first < v.first;
#include <map>
#include <string>
#include <vector>
#include <sstream>
#include <iostream>
using namespace std;
map<string, string> m;
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
#include <string>
#include <iostream>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;