uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
42f7a14b-34d2-4ad7-ab10-eb06391b5992
mr-sohel/Competitive-Programming
CSES Problem Set/Sorting and Searching/Subarray Distinct Values.cpp
#include <bits/stdc++.h> #define endl '\n' #define sqr(x) (x) * (x) #define gcd(x, y) __gcd(x, y) #define lcm(x, y) ((x / gcd(x, y)) * y) #define sz(x) (int)x.size() #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define ...
ALGO
0.999966
4.493827
{ "github_metadata": { "branch": "master", "commit_count": 371, "repo_created_at": "2020-07-24T13:46:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74e3a2c4...
722aec32-aa04-4ddc-9d7e-250087e08f99
danilonajkov/FINKI
Objektno/Auditoriski_vezbi/av12/oop_av122_en.cpp
#include <iostream> #include <cstring> using namespace std; class InvalidTeamName : exception { char msg[100]; public: InvalidTeamName(const char* name) { strcpy(msg, name); } const char* what() { return msg; } }; class Goal { private: char* name; int minute; char team[...
ALGO
0.998425
4.115283
{ "github_metadata": { "branch": "master", "commit_count": 233, "repo_created_at": "2020-10-16T09:46:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 18, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c37f99...
724ccaf8-9874-488f-bab4-d7df18a7d3a4
anianruoss/NumCSE
ex05/fft-autofocus/main.cpp
#include "src/setFocus.hpp" // Contains set_focus #include "src/utilities.hpp" // Contains important processing functions #include "src/fftLocal.hpp" // Contains FFT utilities #include <mgl2/mgl.h> #include <eigen3/Eigen/Dense> using namespace Eigen; // Computes high frequency content in matrix M double high_freque...
ALGO
0.998957
5.417711
{ "github_metadata": { "branch": "master", "commit_count": 156, "repo_created_at": "2017-09-24T21:32:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ac12984...
02bfb1b3-09a8-4c28-b16b-37d80b57752e
yz1019117968/FSE-24-UniTrans
cleaned_data/transcoder_evaluation_gfg/cpp/NTH_NON_FIBONACCI_NUMBER.cpp
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // #include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include...
ALGO
0.999836
4.753428
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-04-06T11:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1836e69234f...
4957486f-4a4d-4492-8fdb-67e47d32d6f4
simongog/sdsl-lite
examples/k2_treap_in_mem.cpp
#include <iostream> #include <vector> #include <tuple> #include <string> #include <complex> #include <sdsl/k2_treap.hpp> #include <sdsl/bit_vectors.hpp> using namespace sdsl; using namespace std; int main() { typedef k2_treap<3,rrr_vector<63>> k2_rrr; k2_rrr k2treap; // Initialize treap with a vector of ...
ALGO
0.998378
5.946453
{ "github_metadata": { "branch": "master", "commit_count": 1969, "repo_created_at": "2013-02-28T22:34:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2269, "forks": 354, "issues": 71, "pull_requests": 25 }, "file_meta": { "content_id": "...
d0a5b0eb-d9b6-427e-b2fe-0e78853d7341
uni-kakurenbo/Workspace
Study/foundations_of_computing/main.cpp
#include <iostream> #include <ranges> #include <functional> #include <generator> #include <print> #include "numeric/bit.hpp" #include "data_structure/dynamic_set.hpp" namespace primitive { // 集合 (UNIQUE = false なら多重集合) template<class T, bool UNIQUE = true> struct set { private: uni::dynamic_set<T> _impl; p...
TOOL
0.951087
5.153182
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2025-02-11T03:03:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27dd3db7cb8...
86ceda9e-023c-473d-ac1c-0951116d2fcf
yannidd/introduction-to-algorithms-in-cpp
sorting/bubble_sort.h
#ifndef SORTING_BUBBLE_SORT_H_ #define SORTING_BUBBLE_SORT_H_ #include <iostream> #include <vector> template <class T> void BubbleSort(std::vector<T> &A, bool order) { size_t length = A.size(); switch (order) { case true: for (size_t i = 0; i < length - 1; i++) { for (size_t j = 0; j < (length ...
ALGO
0.999368
6.100927
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-07-14T10:39:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ed9b3f9c...
44edac1e-7f7c-4d7e-a1a3-2315cc3439cd
S2hubham/DSA_VOYAGE
Stacks-Queues/2)monotonic/SQ7.cpp
#include <bits/stdc++.h> using namespace std; #define MOD (int)(1e9 + 7) // sum of subarray minimums vector<int> findnse(vector<int> arr){ stack<int> st; vector<int> NSE(arr.size(), arr.size()); for(int i = arr.size()-1; i >= 0; i--){ while(!st.empty() && arr[st.top()] >= arr[i]){ st.po...
ALGO
0.999892
4.783881
{ "github_metadata": { "branch": "main", "commit_count": 247, "repo_created_at": "2024-08-08T14:15:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5654c34702...
5441f922-30c6-480f-80bf-68b746d7f56c
AIFM-sys/AIFM
shenango/apps/parsec/pkgs/apps/facesim/src/Public_Library/Data_Structures/UNION_FIND.h
//##################################################################### // Copyright 2003, <NAME> // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##################################################################### // Class UNION...
ALGO
0.996581
5.137335
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-10-12T02:03:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 122, "forks": 37, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "b237224...
948521f2-4711-4945-8ec5-6faac83f264d
shloksoni/CSES
Sorting and Searching (GREEDY)/Stick_Lengths.cpp
#include <bits/stdc++.h> #define vi vector<int> #define vvi vector<vi> #define vll vector<ll> #define vpii vector<pair<int,int>> #define pii pair<int,int> #define vvll vector<vll> #define repa( i, b, n) for(int i =b; i< n; i++) #define rep( i, n) for(int i =0; i< n; i++) #define INF 1e9 #define MP make_pair #define ...
ALGO
0.999966
4.276536
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-08-29T04:56:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc5e89c2c9...
14dadeca-795a-4e1a-9023-17f9df847786
Ayjay/aoc
2022/day4.cpp
#include "aoc.h" #include <tuple> #include <boost/fusion/adapted.hpp> namespace fusion = boost::fusion; #include <boost/spirit/home/x3.hpp> #include <bitset> using section_range = std::bitset<128>; namespace x3 = boost::spirit::x3; namespace ascii = boost::spirit::x3::ascii; using x3::char_; using x3::int_; using ...
ALGO
0.990304
5.053325
{ "github_metadata": { "branch": "master", "commit_count": 231, "repo_created_at": "2022-12-02T22:10:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29b76240...
a8276a1c-9395-4932-9b2f-e3e408bf52f5
gustavoM32/caderno-zika
numerical_methods/roots_newton.test.cpp
#define PROBLEM "https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=16&page=show_problem&problem=1369" #define IGNORE // incompatible judge /**********/ #include <bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(0);cin.tie(0) #define pb push_back #define mp make_pair...
ALGO
0.999598
4.022542
{ "github_metadata": { "branch": "main", "commit_count": 240, "repo_created_at": "2021-09-11T01:39:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "0d78779cf8...
ca03a242-ab41-4f29-9144-b9ac2f947cb9
kyzyx/empty-room
wallfinder/orientation_finder.h
#ifndef _ORIENTATION_FINDER_H #define _ORIENTATION_FINDER_H #include <pcl/point_types.h> #include <pcl/point_cloud.h> #include <pcl/PolygonMesh.h> /** * OrientationFinder encapsulates an algorithm to find the * dominant directions of a mesh to establish a coordinate * system based on the face normals. * * Coordi...
ALGO
0.999156
6.982813
{ "github_metadata": { "branch": "master", "commit_count": 221, "repo_created_at": "2014-01-30T07:20:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "08836109...
67739a8a-8398-44ba-8559-00dbd629303a
zju3dv/pvnet
lib/utils/extend_utils/src/uncertainty_pnp.cpp
#include <iostream> #include <ceres/rotation.h> #include <ceres/ceres.h> #include <random> using namespace std; struct ReprojectionErrorArray { ReprojectionErrorArray( double x2d,double y2d, double x3d,double y3d, double z3d, double wxx, double wxy, double wyy, doubl...
ALGO
0.999414
5.526968
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2018-12-27T04:46:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 847, "forks": 149, "issues": 6, "pull_requests": 2 }, "file_meta": { "content_id": "64544c...
51269c72-92ee-4200-8527-f1819af2926d
richoux/LearningErrorFunctions
explored/eo/include/es/eoEsMutate.h
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; fill-column: 80; -*- //----------------------------------------------------------------------------- // eoESMute.h : ES mutation // (c) <NAME> 2000 & GeNeura Team, 1998 for the EO part // Th. Baeck 1994 and EEAAX 1999 for the ES pa...
ALGO
0.979315
5.956802
{ "github_metadata": { "branch": "master", "commit_count": 433, "repo_created_at": "2019-06-05T05:57:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "637ed97f...
fc5fd7b1-5555-46f8-9394-cecbdb85f5a7
WONILLISM/Algorithm
03_Programmers/2019-11-04/2019-11-04/예산.cpp
#include <iostream> #include <string> #include <vector> #include<algorithm> using namespace std; int solution(vector<int> budgets, int M) { int size = budgets.size(); long long sum = 0; sort(budgets.begin(), budgets.end()); for (int i = 0; i < budgets.size(); i++) sum += budgets[i]; if (sum < M) return budgets...
ALGO
0.999902
3.812777
{ "github_metadata": { "branch": "master", "commit_count": 202, "repo_created_at": "2019-07-04T07:05:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8443367c...
cd2f22e6-064c-4152-b8df-c3e66d9232db
szekizoli/GoogleCodeJamPractice
2019_Round_1A/c.cpp
// https://codingcompetitions.withgoogle.com/codejam/round/0000000000051635/0000000000104e05 // 2019 Round 1C <NAME> #include<algorithm> #include<cmath> #include<cstdint> #include<cctype> #include<iostream> #include<iomanip> #include<iterator> #include<limits> #include<map> #include<memory> #include<numeric> #include<s...
ALGO
0.999858
4.67962
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2015-02-08T18:33:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4f969011f7...
8361a7b3-7d18-412c-bf74-eb195d3d7982
The-Magic-Unicorns/acht-damen
AchtDamen.cpp
#include <iostream> using namespace std; void placeQueen(bool[8][8]); bool isValid(bool[8][8], int, int); int main() { bool Schachbrett[8][8]; for (int i{0}; i < 8; i++) { for (int j{0}; j < 8; j++) { Schachbrett[i][j] = false; } } placeQueen(Schachbrett); ...
ALGO
0.991297
4.14308
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2020-11-13T10:52:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35f621bc87ded...
1940cdb4-2d38-4b9d-a9f8-e68c4c68278b
mehmetalimese05/Codeforces
permutationMinimizationByDeque.cpp
#include <bits/stdc++.h> #define ll long long int #define pb push_back #define pf push_front // author: mehalimes // E1. permutation minimization by deque // codeforces solution int main(){ using namespace std; ll t; cin >> t; for(ll tc = 0; tc < t; tc++){ ll n; cin >> n; vector<ll> ar; ...
ALGO
0.999987
5.167462
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2023-10-15T07:12:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0decfe10931...
6fb39979-aa61-4191-9686-e5f7bf93baf6
TanYongF/algorithm
其他/炮兵阵地.cpp
#include <iostream> #include <cstring> using namespace std; long long f[101][101][101]; int state[1 << 15]; int m[105]; int N, K; bool map[101][11]; int okSize = 0; //计算状态现有个数 int count(int num){ int size = 0; for (int i = 0; i < N; ++i) { size += (num >> i) & 1; } return size; } //判断单行是否符合 bool check1(int h, in...
ALGO
0.999791
3.953621
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2021-10-25T01:34:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57bfae546...
0d8561dc-4eb9-44b1-a6f5-07d76529fbf8
Oh011/X-O-Board-games
Pyramid_Tic_Tac_Toe_Board.cpp
// Implementation of Pyramid Tic-Tac-Toe_Board class methods // File: Pyramid_Tic_Tac_Toe_Board.cpp // Author: <NAME>. // Section: s17 // ID: 20220235 // TA: <NAME> // Date: 10 DEC 2023 #include "bits/stdc++.h" #include "BoardGame_Classes.h" #include "Pyramid_Tic_Tac_Toe_Board.h" using namespace std; // Constructor ...
ALGO
0.999067
5.632443
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-12-17T00:44:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74102fdf5cb...
5d1d174d-e7b2-4bc7-9624-15d68b147b8c
SkqLiao/ICPC-Training
ICPC/2020/NWERC/a.cpp
#include <bits/stdc++.h> using namespace std; #define Trav(x, v) for (auto &x : v) template<class T, class G> bool chkMin(T &x, G y) { return x > y ? (x = y), 1 : 0; } template<class T, class G> bool chkMax(T &x, G y) { return x < y ? (x = y), 1 : 0; } const int N = 1e5 + 5; int n, q; long long a[N]; int main(...
ALGO
0.999974
3.462994
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2021-10-09T12:22:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae18dcb8aa6...
189ca918-d39a-4e4f-99a8-42ea8869c7c5
cpuhrsch/pytorch
torch/csrc/jit/codegen/cuda/inline_propagator.cpp
#include <torch/csrc/jit/codegen/cuda/inline_propagator.h> #include <torch/csrc/jit/codegen/cuda/ir_utils.h> #include <torch/csrc/jit/codegen/cuda/root_domain_map.h> #include <torch/csrc/jit/codegen/cuda/transform_iter.h> #include <utility> namespace torch { namespace jit { namespace fuser { namespace cuda { MaxPosC...
ALGO
0.967641
7.261675
{ "github_metadata": { "branch": "master", "commit_count": 52184, "repo_created_at": "2018-01-22T21:26:11.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "pytorch/pytorch", "stars": 2, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_...
3ae90a95-8de1-4117-903e-c9477c591525
mmill224/visitor_cpp
genes.cpp
// traversing genealogical tree using Composite and Visitors // <NAME> // Nov 2019 #include <iostream> #include <string> #include <vector> using std::cout; using std::endl; using std::string; using std::vector; class Person { // component public: Person(string firstName, Person *spouse, Person *father, Person *moth...
ALGO
0.990376
6.326903
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-04-27T21:03:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5191435c3...
966b1be4-d91c-447b-ac1b-81257f2acee1
dl-00-e8/PS
1000/1011.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define ll long long int t, x, y; int solve(int x, int y); int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> t; while(t--) { cin >> x >> y; cout << solve(x, y) << endl; } ...
ALGO
0.999942
4.24789
{ "github_metadata": { "branch": "master", "commit_count": 396, "repo_created_at": "2021-03-22T09:31:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6aecadce...
cf1ca11c-5e03-4df1-8285-4a97243ec8fc
AbdulrahmanJ204/cp
C_Kefa_and_Park.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define int ll #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define endl '\n' #define cendl cout<<endl #define cyes cout<<"YES" #define cno cout<<"NO" #define cin(v) for(ll i=0;i<v.size();i++)cin>>v[i]; #define cin1(v,n) for(ll ...
ALGO
0.999775
3.733507
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-01-24T07:28:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12d65d66fce5...
bd04d099-a34c-4cef-875f-76901879782c
sir-rasel/Online_Judge_Problem_Solve
Codeforces/codeforces_1400B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int,int> pii; int main() { int test,cs=1; scanf("%d",&test); while(test--){ ll my,follwer,sword,axes, swordPrice, axesPrice; scanf("%lld %lld %lld %lld %lld %lld", &my, &follwer, &sword, &axes, &swordPric...
ALGO
0.99953
3.101197
{ "github_metadata": { "branch": "master", "commit_count": 866, "repo_created_at": "2018-05-12T17:44:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b7c1e16...
02fb4b6e-5ea4-4a28-9d91-06384045fca1
whquddn55/Algorithm_BojSolves
9000/9946.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; template<typename a, typename b> ostream& operator<<(ostream& os, const pair<a, b>& pai) { os << pai.first << ' ' << pai.second; return os; } template<typename a, typename b> istream& operator>>...
ALGO
0.99998
3.702785
{ "github_metadata": { "branch": "master", "commit_count": 1298, "repo_created_at": "2021-03-10T14:27:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d52ecc...
d5b81860-f21e-422f-8bb9-0ba2ebc4f8ca
saikat709/codeforces-problems
1932C_LR-remainders.cpp
#include <bits/stdc++.h> using namespace std; // This is okay for very smaller n, but n <= 1e5 // NOT ACCEPTED void solve1() { int n, m; cin >> n >> m; long long mult = 1; // can not hold value when n is large vector<int> v(n, 0); string s; for( int& i: v ){ cin >> i; mult *= i;...
ALGO
0.999828
3.41797
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-02-21T09:03:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f15ed0dac7...
4dedf73a-d0fb-4e4b-8d21-76513eab6b68
nimitbhardwaj/Poseidon_Rage
Geeks/cycleDetect.cpp
#include <iostream> #include <list> #include <vector> #include <stack> using namespace std; bool hasCycle(vector<list<int> > &G); int main() { int n; cin >> n; vector<list<int> > G(n); int m; cin >> m; for(int i = 0; i < m; i++) { int a, b; cin >> a >> b; G[a].push...
ALGO
0.999968
4.654468
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-05-16T08:50:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6410974d24...
c290fe69-7211-4ff2-82fa-c053a46c0548
Momen-G-Ar/problem-solving
Codeforces/Groups Contests/PPU Group/pcpc-training-2024-2-B.cpp
//////////////////////////////////////////////////////////// // // // <<<<<<<<<<<< <NAME> >>>>>>>>>>>>>> // // <<<< Don't wait the opportunity create it >>>> // // // ///////////////////////////...
ALGO
0.999873
4.671712
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-09-12T18:02:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d997a27dcea...
f65d8a67-e8a6-4514-9c13-508706cbd72e
jayS202/A2ZDSA
Array/Hard/MaximumProductSubarray.cpp
// Maximum Product Subarray in an Array // Problem Statement: Given an array that contains both negative and positive integers, find the maximum product subarray. // Brute // TC - O(N^3), SC - O(1) #include<bits/stdc++.h> using namespace std; int maxProductSubArray(vector<int> nums){ int maxi = INT_MIN; int n...
ALGO
0.999986
6.368741
{ "github_metadata": { "branch": "main", "commit_count": 260, "repo_created_at": "2023-11-29T15:16:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cc673710a...
ad578832-0930-45c2-84a1-a04dbc3dee95
EdwardOu98/LeetCode
Daily Challenge/279_Perfect_Squares.cpp
#include <algorithm> using namespace std; class Solution { public: int numSquares(int n) { int arrSize = max(1, n + 1); int dp[arrSize]; // dp[i] means to sum up to i how many // perfect square numbers we need dp[0] = 0; // To sum up to 0, we don't need any number...
ALGO
0.999865
5.221205
{ "github_metadata": { "branch": "main", "commit_count": 344, "repo_created_at": "2022-02-19T01:50:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "088f418deb...
a0444cd4-cb38-40b0-addc-8010af0a83ef
VishalJx/100-Days-of-Code
Day 33/NextSmallerElement.cpp
#include <bits/stdc++.h> using namespace std; vector<int> nextSmallerElement(vector<int> &arr) { int n = arr.size(); vector<int> ans(n, -1); // -1 if no smaller element found stack<int> st; for (int i = 0; i < n; i++) { while (!st.empty() && arr[st.top()] > arr[i]) { //above conditi...
ALGO
0.999999
5.995642
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2022-11-11T14:42:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb0525cfa4...
bf556a86-9137-4aad-b7f3-2af292275977
SCS2017/Leetcode-Solution
动态规划/376_摆动序列.cpp
/* 如果连续数字之间的差严格地在正数和负数之间交替,则数字序列称为摆动序列。第一个差(如果存在的话)可能是正数或负数。 少于两个元素的序列也是摆动序列。 例如, [1,7,4,9,2,5] 是一个摆动序列,因为差值 (6,-3,5,-7,3) 是正负交替出现的。 相反, [1,4,7,2,5] 和 [1,7,4,5,5] 不是摆动序列, 第一个序列是因为它的前两个差值都是正数,第二个序列是因为它的最后一个差值为零。 给定一个整数序列,返回作为摆动序列的最长子序列的长度。 通过从原始序列中删除一些(也可以不删除)元素来获得子序列,剩下的元素保持其原始顺序。 示例 1: 输入: [1,7,4,9,2,5] 输出: 6 解释:...
ALGO
0.999949
5.241854
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-05-21T10:42:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55d5865a99...
f75ded33-b2f8-4805-a02f-f21fd3cefdc2
AhmadMasood-dev/3rd-sem_linked_list
forward_list_sorting_swap_nodes.cpp
#include <iostream> template <class T> struct Node { Node *next; T data; }; template <class T> class forward_list { private: Node<T> *front; int size; public: forward_list() { front = NULL; size = 0; } void push_front(const int &val) { Node<T> *temp; ...
ALGO
0.999862
5.664427
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2023-10-18T10:47:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0c3af2a13...
39b33b85-24e9-40d6-9bb3-3251047164dd
Jose-Carlos-Jimenez/EDD_1S2020_PY1_201801195
arbol.h
#include <jugador.h> #include <string> #include <iostream> #ifndef ARBOL_H #define ARBOL_H class Arbol { public: Arbol() { raiz = NULL; graphviz = ""; } struct Nodo { struct Nodo *izq; struct Nodo *der; Jugador jugador; }; typedef struct Nodo *ABB;...
ALGO
0.98777
4.048268
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-04-06T05:39:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a23e9219b...
f5a70489-5e66-43b7-954b-1613d7317190
raincross7/code-similarity
codes/train_code/problem321/problem321_467.cpp
/** * author: qodjf * created: 04.17.2020 00:29:18 */ #include <bits/stdc++.h> using namespace std; string to_string(string s) { return '"' + s + '"'; } string to_string(const char *s) { return to_string((string)s); } string to_string(bool b) { return (b ? "true" : "false"); } template <typename A, typen...
ALGO
0.99998
4.263417
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b6d5fb1e229...
1f87f1ef-7fa1-4f58-a545-af7ea9a4880e
gurusarath1/Algorithms_2
LeetCode_Problems/stack/Implement_Queue_using_Stacks_2.cpp
class MyQueue { public: stack<int> stk; int peek_val; MyQueue() { } void push(int x) { stk.push(x); } int pop() { int val; if(stk.size() > 0) { val = stk.top(); stk.pop(); } else { // E...
ALGO
0.994221
5.6072
{ "github_metadata": { "branch": "master", "commit_count": 845, "repo_created_at": "2019-12-14T09:36:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "296246b2...
84d67c6d-8976-4274-b2f8-caa60adbddd9
sfilippo/unibois-booklet-2019
code/graphs/hungarian.cpp
// O(N^3) Hungarian algorithm for the assignment problem // Min Cost Bipartite Matching // cost[i][j] = cost to match i with j // Returns {minCost, match[]}, // where match[i] = who we matched i with // Use 0-based, n <= m template <typename T> pair<T, vi> min_cost_matching(const vector<vector<T>> &cost) { // intern...
ALGO
0.999213
5.776572
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-03-05T22:29:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aec39f825f...
65505226-16c7-4a76-ab79-96e87d5abcc2
bioc/GeneticsPed
src/pedSort.cc
#define R_NO_REMAP #include <R.h> #include <Rdefines.h> #include <stdio.h> #include <stdlib.h> #include <sstream> #include "../include/pedSort.h" #include <vector> extern "C" { void pedSort( int *n , char **ind , char **father , char **mother , char **na_value , int *n_na ) { TPedVec pedtmp; Pedigree Ped; vect...
ALGO
0.982894
3.85463
{ "github_metadata": { "branch": "devel", "commit_count": 159, "repo_created_at": "2023-07-12T09:52:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76169802d9...
50bfd52d-881b-4703-aed0-65411ca915dd
ishandutta2007/codeforces-n
newbin/normal/1253/A.cpp
#include<bits/stdc++.h> #define ll long long #define lowbit(x) ((x)&(-(x))) #define mid ((l+r)>>1) #define lson rt<<1, l, mid #define rson rt<<1|1, mid+1, r using namespace std; const int maxn = 1e5 + 50; int a[maxn], b[maxn]; int main() { int T; cin>>T; while(T--){ int n; cin>>n; for(int i = 1;...
ALGO
0.999873
3.586612
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45fc0acb395e...
6c8a29fe-a50b-4171-a365-f9f056af2d00
2youngjae/LeetCode
17. Letter Combinations of a Phone Number/solution.cpp
/** * @file solution.cpp * @author 2YoungJae (<EMAIL>) * @brief * @version 0.1 * @date 2021-08-30 * @copyright Copyright (c) 2021 * * Runtime: 0 ms, faster than 100.00% of C++ online submissions for Letter * Combinations of a Phone Number. Memory Usage: 6.5 MB, less than 63.18% of C++ * online submissions for...
ALGO
0.999921
6.564941
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2021-01-05T11:19:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44e434945d...
99f11bc0-366f-4820-b326-2e8d872ca050
lmaddira/N-body-simulation
covid_sim/corona/main.cpp
#include <vector> #include <iostream> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #include <cstring> #include <fslazywindow.h> #include </usr/include/GL/glut.h> #include "carona_physics.h" #include "carona_rk45.h" using namespace std; int random50() { return rand() & 1; } int random...
ALGO
0.990454
3.816184
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-09-02T00:41:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ad68e502d...
85853287-5924-44d1-97a0-30e455de8923
ltf0501/Competitive-Programming
Codeforces/542A.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 2e5 + 10; typedef long long ll; #define lc (o << 1) #define rc (o << 1 | 1) #define ALL(v) v.begin(), v.end() #define F first #define S second struct P { int l, r, c; }a[maxn], b[maxn]; int n, m, N; vector<int> vv; struct Q { int x, flag, type, id; bool ...
ALGO
0.99999
3.979917
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-03-07T09:08:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0b0abd48...
64998c7f-6417-4c2c-8244-780614d73097
JatinGarg19/Leetcode-Coding-Problems
0983-minimum-cost-for-tickets/0983-minimum-cost-for-tickets.cpp
class Solution { public: int solve(vector<int>& days, vector<int>& costs, int i, vector<bool>& map, vector<int>& dp) { if(i > 365) return 0; if(dp[i] != -1) return dp[i]; if(map[i] == false) return solve(days, costs, i + 1, map, dp); return dp[i...
ALGO
0.999758
5.073182
{ "github_metadata": { "branch": "main", "commit_count": 737, "repo_created_at": "2022-11-26T11:11:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc0316c289...
d7a6654c-e8f4-426f-af33-cc5bfd0e99d9
Itai2022/Finite-Element-Method
linear_algebra/exchangepattern.h
#pragma once #include "contiguousparallelpartition.h" #include <algorithm> #include <iostream> #include <mpi.h> #include <vector> template<typename T> class SparseMatrix; class ExchangePattern { private: std::vector<int> neighboring_processes_; std::vector<std::vector<int>> receive_indices_; std::vector<...
ALGO
0.998577
5.949015
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-10-04T17:15:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4cc7f1af1d49...
8078f59b-71c2-4f3d-9ba4-4de30c929b00
ArkaSaha/RDIM
hiro.cpp
#include <iostream> #include <fstream> #include <algorithm> #include <cmath> #include <ctime> #include <limits> #include <numeric> #include <queue> #include <unordered_map> #include <unordered_set> #include <vector> #include <boost/heap/fibonacci_heap.hpp> using namespace std; using namespace boost::heap; size_t k, l...
ALGO
0.999653
4.291292
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-02-09T10:32:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac5e13adcc26...
2524ae77-a116-4aa0-8ba4-f8d57b8a6c26
Aadarsh131/Striver-A2Z-DSA-Sheet
44. BS-1 Binary Search Introduction/codes/binarySeach_Iterative.cpp
#include <bits/stdc++.h> using namespace std; // increasingly sorted(only contains unique elements) vector<int> arr = {-3, -1, 0, 4, 5, 6}; int main() { cout << "Enter the target element: "; int target; cin >> target; int i = 0; int j = arr.size() - 1; while (i <= j) { int mid = i + (j - i) / 2; //...
ALGO
0.999411
5.388291
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-12-30T11:22:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d93650a033...
9233d5b6-98a7-403c-a180-58eee87eea79
dawiedotcom/advent_of_code_2023
2024/day06/part2.cpp
#include <iostream> #include <string> using namespace std; #include "text_image.h" #include "lib.h" using cell_t = char; struct guard_t { int x, y; char dir; }; void get_input(text_image<cell_t>& grid, guard_t& guard) { string line; int x=0, y=0; while(getline(cin, line)) { for (auto c : line) { ...
ALGO
0.999916
4.571218
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-12-01T15:41:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d83e3218188...
61ff7510-a82d-4717-a231-96439ebe1ba0
Amaayezing/ECS-40
tar files/lecture13/lecture13/sort3.cpp
// // sort3.cpp // // sorting using a a custom binary_function #include<algorithm> #include<vector> #include<iostream> using namespace std; // smaller compares absolute values only bool smaller(int i, int j) { return i*i < j*j; } int main() { int array[] = { -9, -1, 8, 2, -7, -3, 6, 4, -5 }; // note initializa...
ALGO
0.999902
5.879644
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-07-14T21:44:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1646e813c3...
674fc7ca-84f0-4d70-a1f3-ace66d5c9307
Badstu/leetcode-exercises
acwing/chapter3/861.cpp
#include <iostream> #include <cstring> using namespace std; const int N = 1010, M = 1e5+10; int n1, n2, m; int h[N], e[M], ne[M], idx; int match[N]; bool st[N]; void add(int a, int b){ e[idx] = b; ne[idx] = h[a]; h[a] = idx++; } bool find(int x){ for(int i = h[x]; i != -1; i = ne[i]){ int j =...
ALGO
0.999831
3.265298
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2019-10-18T03:16:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a001393...
78de15fb-bf05-4ef0-9cbc-b047e62c7946
Eldorax/FIL
Fil-<=tp3/main.cpp
#include <iostream> #include <stdio.h> #include <string> #include "elementArbre.h" #include "arbre.h" #include "modele.h" #include <vector> #include <stdlib.h> #include "arg.h" #include "translation.h" using namespace std; int main(int argc, char ** argv) { /* //Traitement des arguments. argv++; argc--; vect...
TOOL
0.930521
4.008757
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2016-10-13T17:36:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a520c536...
a4fef4ff-2e84-458a-9e37-6545204cac38
rschwa6308/Project-Euler
euler11/euler11.cpp
#include <iostream> #include <fstream> #include <string> #include <sstream> using namespace std; int main() { int GRID[20][20]; // parse grid from file ifstream input_file; input_file.open("input.txt"); string line; for (int i = 0; i < 20; i++) { getline(input_file, line); s...
ALGO
0.999988
4.78455
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-04-14T17:16:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d3b0379af9...
65b7ffa7-6c4c-40ef-b9fb-e70dc83b8785
LeeWoden/DataStructure
ch5_Tree/BinaryTree/BinaryTree.h
#ifndef BINARYTREE_H #define BINARYTREE_H #include <iostream> #include <cassert> #include <string> #include <stack> #include <queue> using namespace std; template <typename T> struct BinTreeNode { T data; BinTreeNode<T> *lchild, *rchild; BinTreeNode(BinTreeNode<T> &lptr = NULL, BinTreeNode<T> *rptr = NULL) : l...
ALGO
0.999603
4.245044
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2015-09-04T13:50:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "568f1d454...
d8ca78a7-d605-483c-bce7-f775d3f944b8
larryniven/nnbin
seg-lstm-predict.cc
#include "la/la-cpu.h" #include "autodiff/autodiff.h" #include "ebt/ebt.h" #include "speech/speech.h" #include <fstream> #include <vector> #include "nn/lstm.h" #include "nn/nn.h" #include <random> #include "nn/tensor-tree.h" #include "nn/lstm-frame.h" #include "nn/lstm-tensor-tree.h" #include <algorithm> std::shared_p...
DATA
0.952142
6.295986
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2017-01-14T20:25:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "652b75d98...
80a96dea-62c2-49c3-9c1e-e6844403ed6c
BangTtagGum/BOJ-Programmers-LeetCode
백준/14500.cpp
/* 2022.03.20 14500번 테트로미노 */ #include <iostream> #include <algorithm> using namespace std; int N,M; int map[500][500]; int result; int sum; int com1[8][2] ={{0,1},{1,2},{3,4},{4,5},{0,2},{0,5},{3,2},{3,5}}; int com2[8][2] ={{0,2},{1,3},{2,4},{3,5},{0,5},{1,4},{0,4},{1,5}}; int main(){ios::sync_with_stdio(fa...
ALGO
0.999968
4.208849
{ "github_metadata": { "branch": "main", "commit_count": 758, "repo_created_at": "2022-02-05T08:07:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b337369fa...
639d0694-0f2b-4086-82fb-c502c2e10dd5
envyaims/Past-USACO-Solutions
bronze/lineup.cpp
// Problem: Problem 3. Livestock Lineup // Contest: USACO - USACO 2019 December Contest, Bronze // URL: http://www.usaco.org/index.php?page=viewproblem2&cpid=965 // Memory Limit: 256 MB // Time Limit: 4000 ms // // ALL TEST CASES PASSED. 7/17/2021 #include <bits/stdc++.h> using namespace std; #define ll long long #...
ALGO
0.99995
3.865077
{ "github_metadata": { "branch": "main", "commit_count": 177, "repo_created_at": "2021-06-25T12:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c3ca2af65...
1dfe5dbb-b698-4c09-bb6a-cbaac9c326c8
Dihoccode1/Team_exercise
TeamExcercise/bai5vandung/bai5.cpp
#include <bits/stdc++.h> using namespace std; void ScanArray2D(int **array2d, int &row, int &collum); vector<int>sumofRows(int **array2d, int row, int collum); vector<int>RowshaveMaxSum(int **array2d, int row, int collum); int partition(int *a, int low, int high); void quickSort(int *a, int low, int high); int main () ...
ALGO
0.999825
3.349427
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-05T06:56:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bef1d4fb1f31...
ab92e98a-c82e-4486-9a31-114b8d16c8b0
santanusen/leetcode
00060_permu_sequence.cc
class Solution { public: string getPermutation(int n, int k) { if (n == 1) return "1"; int fact = 1; vector<int> nums(n); for (int i = 1; i < n; ++i) { fact *= i; nums[i - 1] = i; } nums[n - 1] = n; k = k - 1; string a...
ALGO
0.999973
5.8703
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2022-10-13T08:18:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc4e472945...
738dfab0-5713-407f-a866-e5bdabc019bd
drakesargent/Cpp-samples
Programming III/CISS243_DEA_4.2/CISS243_DEA_4.2/SourceMain.cpp
#include <iostream> #include <string> #include "WeatherStats.h" #include "LList.cpp" using namespace std; // prototype function to display min and max values void displayMinMax(LList<WeatherStats>); int main() { // variables int numMonths = 0; // to hold user supplied number of months LList<WeatherStats> months; /...
TOOL
0.94707
4.662547
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-07-07T18:09:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c56f200598...
de90934b-4690-409f-a7ed-91f6b8c62d46
antori82/FANTASIA
FANTASIA/ThirdParty/aGrUM/Includes/agrum/tools/graphs/algorithms/triangulations/eliminationStrategies/unconstrainedEliminationSequenceStrategy.h
/** * * Copyright (c) 2005-2023 by <NAME>(_at_LIP6) & <NAME>(_at_AMU) * info_at_agrum_dot_org * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the Lice...
ALGO
0.954868
6.643386
{ "github_metadata": { "branch": "main", "commit_count": 115, "repo_created_at": "2021-03-01T21:03:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 26, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3d155813...
4d8e9dc9-ea12-48ef-9c60-fe256d62baea
abhishekBhangalia/Striver-s_SDE_Sheet_cpp_solutions
14. Stack and Queue 2/6. Implement min stack.cpp
class MinStack { public: // stack<int> s; // vector<int> v; // int min; // MinStack() { // min=INT_MAX; // } // void push(int val) { // // s.push(val); // v.emplace_back(val); // min = *min_element(v.begin(),v.end()); // // sort(v.begin(),v.end()); ...
ALGO
0.999885
6.010301
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2023-11-23T14:44:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f212bf32c11...
04df515c-6ce8-4640-9fec-6fb09f05435c
Thesharing/school-projects
Homework/Algorithm Analysis and Disign/Homework 4/2 - 旅行商问题.cpp
#include <iostream> #include <cstdbool> #include <cstdio> #include <cmath> #include <ctime> #include "libxl.h" //用于读取excel文件 using namespace libxl; //用于读取excel文件 using namespace std; #define NUM1 22 //第一个文件是22个基站的邻接矩阵 double arc[50][50]; int ans[50]; int bestAns[50]; double value; double bestValue; int nodeNum; voi...
ALGO
0.999703
3.31499
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-09-18T09:52:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 63, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de0ba21...
7bf65149-4028-4bf6-93ae-fb29877df1b1
losangler/C_project
算法程序-用C++语言实现/ch11/Kalman滤波.cpp
//Kalman滤波.cpp #include <cmath> #include <iostream> #include "实矩阵求逆.cpp" using namespace std; //n 动态系统的维数。 //m 观测系统的维数 //k 观测序列长度。 //f[n][n] 系统状态转移矩阵 //q[n][n] 模型噪声W的协方差阵。 //r[m][m] 观测噪声V的协方差阵。 //h[m][n] 观测矩阵 //y[k][m] 观测向量序列。 //x[k][n] x[0][j]存放初值。其余各行返回状态向量估值序列。 //...
ALGO
0.999931
4.219632
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-05-13T11:16:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf5385f0b...
28e81315-0801-4dd3-b961-70b7de8f7b0c
GrihsaIvanenko/SportCode
ЛКШЗИМА/4#Потоки/Максимальный поток/code.cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1<<30; vector<int> rebs; vector<int> C, F, first, dust; vector<vector<int>> g; bool bfs(int Cmin, int st = 0, int fin = g.size() - 1) { for (int i = 0; i < g.size(); ++i) dust[i] = INF; dust[st] = 0; deque<int> q; q.push_front(s...
ALGO
0.999955
3.586674
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-08-13T20:54:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c6fde9c877c...
5e47a759-3d2e-44be-9b5e-18ff5ddb0ee7
sjmjys954646/Algorithm
boj14000-14999/boj14615.cpp
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep1(i, n) for (int i = 1; i <= (int)(n); ++i) #define range(x) begin(x), end(x) #define sz(x) (int)(x).size() #define pb push_back #define F first #define S second using namespace std; typedef long ...
ALGO
0.999901
4.177278
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2020-11-19T01:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14781fb4b...
4785b876-86c2-4db7-96aa-d7eb20985248
dydrmr5/learnCpp
diceGame.cpp
#include <iostream> #include <cstdlib> //c standart library #include <ctime> //c time library using namespace std; //function prototype int throwDice(); void lineBar(); void printMenu(); int main () { system("cls"); //system("clear"); on linux/unix os int p1_dice, p2_dice; char throw_dice; printMenu(); //call pr...
TOOL
0.9568
3.898535
{ "github_metadata": { "branch": "master", "commit_count": 190, "repo_created_at": "2020-08-01T12:29:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06518e93...
072d87cb-22ae-4ef6-8994-1a0593f2fac1
ahao214/Algorithm
Ahao.LeetCodeCPP/2045. 到达目的地的第二短时间.cpp
#include<vector> #include <queue> using namespace std; /* 2045. 到达目的地的第二短时间 城市用一个 双向连通 图表示,图中有 n 个节点,从 1 到 n 编号(包含 1 和 n)。图中的边用一个二维整数数组 edges 表示,其中每个 edges[i] = [ui, vi] 表示一条节点 ui 和节点 vi 之间的双向连通边。每组节点对由 最多一条 边连通,顶点不存在连接到自身的边。穿过任意一条边的时间是 time 分钟。 每个节点都有一个交通信号灯,每 change 分钟改变一次,从绿色变成红色,再由红色变成绿色,循环往复。所有信号灯都 同时 改变。你可以在 ...
ALGO
0.99995
5.300571
{ "github_metadata": { "branch": "master", "commit_count": 4359, "repo_created_at": "2020-09-14T10:24:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e844348...
c9ccce13-fcb1-4a6b-8084-7eff6c72a952
PrashamModi/gfg
Difficulty: Medium/Cycle in a Directed Graph/cycle-in-a-directed-graph.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: bool dfs(int node, vector<vector<int>> &adj, vector<bool> &vis, vector<bool> &pathVis) { vis[node] = true; pathVis[node] = true; for(auto it : adj[node]) { if(!...
ALGO
0.999393
6.35354
{ "github_metadata": { "branch": "main", "commit_count": 1040, "repo_created_at": "2023-09-13T06:47:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c346a59c...
7f47efcc-83bc-4d11-8835-b8945bb0aee6
fogsail/solution-to-ICPC
chapter7/examples/eightCode/eightCode/main.cpp
// // main.cpp // eightCode // // Created by <NAME> on 2019/6/22. // Copyright © 2019 <NAME>. All rights reserved. // #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <queue> #include <vector> #include <stack> #include <map> #include <set> #include <sstream>...
ALGO
0.99994
4.117554
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-05-27T07:23:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ffdff8d1b...
61317948-d998-4547-86b8-c0a853be5afc
arpg/Kangaroo
include/kangaroo/extra/CeresQuatXYZW.h
#pragma once #include <ceres/ceres.h> //#include <ceres/rotation.h> //////////////////////////////////////////////////////////// // Unit Quaternion utilities for scalar arrays // Differs from ceres implementation because array order is different // QuatXYZW ////////////////////////////////////////////////////////////...
ALGO
0.992544
4.4519
{ "github_metadata": { "branch": "master", "commit_count": 398, "repo_created_at": "2013-07-24T18:32:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 43, "forks": 18, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "04048cd...
66d7a4a6-9ccb-4304-bd57-42d645639dbb
nugumanov03/pp-1
lessons_g3/pp_g2/c.cpp
#include<iostream> using namespace std; int main(){ int n; cin >> n; string a[n]; for(int i = 0;i < n;i++){ cin >> a[i]; } // ai cout << endl; // for(int i = 0; i < n;i++){ // cout << a[i] << "\n"; // } for(int i = 0; i < n;i++){ bool flag = false; ...
ALGO
0.999796
3.849884
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2022-10-26T09:41:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9afb07059ff...
0c5df8d1-f205-4a63-ae4e-898747e4663c
ankitwest/DataStructure-Algorithm
LeetCodeSolution/Graph/1376. Time Needed to Inform All Employees.cc
class Solution { public: int numOfMinutes(int n, int headID, vector<int>& manager, vector<int>& informTime) { vector<vector<int>> graph(n); for(int i=0;i<n;i++){ if(i!=headID) graph[manager[i]].push_back(i); } queue<pair<int,int>> q; q.pus...
ALGO
0.999968
6.005635
{ "github_metadata": { "branch": "main", "commit_count": 1569, "repo_created_at": "2021-10-01T09:11:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4e3d800f...
efa4ad38-8d20-429a-9932-a52f0c72296c
DominikWojtanowski/UMCS-PRZYGOTOWYWANIA
Hash String znajdowanie wystapien/main.cpp
#include <iostream> #include <string> #include <forward_list> #include <cstring> #include <unordered_map> #define ULL unsigned long long #define LL long long #define LD long double struct Ciag { char *dane; ULL rozmiar; ULL pojemnosc; inline ~Ciag() { delete[] dane; } static inline Ciag wczytaj(c...
ALGO
0.999519
4.409953
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-13T23:55:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e9c267a48b2...
f235f688-eb73-49d4-8632-5d76b4029f2a
smolijar/tower-of-hanoi
tower.cpp
#include <iostream> #include <vector> #include <iomanip> #define DISCW 10 #define PADDING 5 using namespace std; class Hanoi { public: Hanoi(int towersCount = 2) : discs(3), startOn(1) { towers.reserve(towersCount + 1); for (int i = 0; i < towersCount + 1; ++i) { vector<i...
ALGO
0.998462
5.139552
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-10-11T07:31:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c98298c6d5...
3a8c3523-07da-47ca-bb62-055c43556685
yuki-1317/XDOJ
test_512.cpp
#include <stdio.h> #include <string.h> typedef struct { char name[31]; // 书名最多30个字符,加上一个终结符 '\0' float price; // 价格 } Book; int main() { int n; scanf("%d", &n); // 输入书籍的数量 getchar(); // 吸收换行符 Book books[1024]; for (int i = 0; i < n; i++) { fgets(books[i].name, 31, stdin); /...
ALGO
0.995978
3.998275
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-12-28T06:04:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c46fa108e4...
c14cad77-7ead-4928-8a3d-af497438bcc0
DangZhonghua/CodingPractice
Dynamic Programming/MediumLevel/Largest Independent Set Problem.cpp
/* Largest Independent Set Problem https://practice.geeksforgeeks.org/problems/largest-independent-set-problem/1 Given a Binary Tree of size N, find size of the Largest Independent Set(LIS) in it. A subset of all tree nodes is an independent set if there is no edge between any two nodes of the subset. Your task is to ...
ALGO
0.999936
5.332279
{ "github_metadata": { "branch": "master", "commit_count": 774, "repo_created_at": "2018-02-26T08:48:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eddd4cee...
7d1cc02b-f15c-4ae3-80b3-bea3d120860f
crackersamdjam/DMOJ-Solutions
ECOO/ecoo17r3p2.cpp
#include <bits/stdc++.h> #define gc getchar_unlocked() #define pc(x) putchar_unlocked(x) template<typename T> void scan(T &x){x = 0;register bool _=0;register T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&c<58;c=gc)x=(x<<3)+(x<<1)+(c&15);x=_?-x:x;} template<typename T> void printn(T n){...
ALGO
0.998967
3.606838
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-08-08T18:36:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52d40816a...
fdecea36-8491-4da8-b771-7b4fb723e2b8
AlexMercer-MA/UnrealEngine-4.27
Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/PBDTetConstraintsBase.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Chaos/Array.h" #include "Chaos/PBDParticles.h" #include "Chaos/ParticleRule.h" #include "Chaos/DynamicParticles.h" #include "Chaos/PBDParticles.h" namespace Chaos { class FPBDTetConstraintsBase { public: FPBDTetConstraintsBase(const FDynamic...
TOOL
0.973577
5.466397
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-07-29T17:27:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6f6008ee4...
55691919-217a-4a3b-b6fd-b89796f8e332
harshitasaini16/Leetcode-Practise
Common elements - GFG/common-elements.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: vector <int> commonElements (int A[], int B[], int C[], int n1, int n2, int n3){ vector<int>ans; int i=0; int j=0; int k=0; while(i<n1 && j<n2 && k<...
ALGO
0.999886
5.155658
{ "github_metadata": { "branch": "main", "commit_count": 2989, "repo_created_at": "2022-02-13T04:45:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c86788e3...
acc53d25-7d26-49c8-b14e-02d1b3146587
c650/spoj
GCDS.cpp
#include <bits/stdc++.h> #define FI first #define SE second typedef long long ll; typedef std::pair<ll,ll> pairll; const static ll INF = 98765432100LL; static inline void setio(void); const ll MAX_SIEVE_NUM = 10000002; const ll NUM_PRIMES = 664579; ll *primes; std::unordered_map<ll,ll> rank; static void one_case...
ALGO
0.999967
4.169142
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2016-11-19T17:04:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "443e95070...
0ea07009-d2e1-40e4-bf32-973653465a50
YttriumWillow/OI
Problems/P3368.cpp
// Problem: P3368 【模板】树状数组 2 // Contest: Luogu // URL: https://www.luogu.com.cn/problem/P3368 // Memory Limit: 125 MB // Time Limit: 1000 ms // Created Time: 2023-04-26 20:33:24 // Problem: P3258 [JLOI2014]松鼠的新家 // Contest: Luogu // URL: https://www.luogu.com.cn/problem/P3258 /...
ALGO
0.999843
5.259717
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2023-08-30T03:08:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7150ed31473...
e58554de-73cc-4a1c-a832-514e8d151e60
prat1kbhujbal/PRM-Blended-Potential-Field-Path-Planning
grid_map/grid_map_filters/include/grid_map_filters/MathExpressionFilter.hpp
/* * MathExpressionFilter.hpp * * Created on: Aug 16, 2017 * Author: <NAME> * Institute: ETH Zurich, ANYbotics */ #pragma once #include "EigenLab/EigenLab.h" #include <filters/filter_base.h> #include <string> namespace grid_map { /*! * Parses and evaluates a mathematical matrix expression with laye...
ALGO
0.967327
7.128484
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-05-04T20:08:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d459859dc...
a8ba1216-227e-430e-b202-67d031f66253
swifteagle303/CSCI2270-Recitation-test
Assignment2.cpp
#include <iostream> #include <fstream> #include <cstring> #include <cstdio> #include <iomanip> #include <string> #include <sstream> #include <stdlib.h> using namespace std; struct Words { string word; int counts = 1; bool topTen = false; }; struct Line{ Words commonWords[50]; int lineLength; }; ...
TOOL
0.972495
3.891684
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-04-13T22:05:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "877def6c39...
ef19b63e-fef0-49bc-bc1a-687692cae172
ishandutta2007/codeforces-m
mhq/normal/1437/E.cpp
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif //#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; typedef long double ld; typedef long long ll; int n, k; const int maxN = 5e5 + 12; int a[maxN]; int b[maxN]; int d[maxN]; int solve(int l, int r) { if (a[l] > a[r]) { cout << -1; exi...
ALGO
0.99994
3.661458
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fbee5c4b466...
2f3dcfe4-3e3f-4324-811f-f09f4213a4e7
dpark9941/School-Works
comsc 110/Ch7,8 Programming quiz 2.cpp
//============================================================================ // Name : Ch8 Programming quiz part2.cpp // Author : <NAME> // IDE Used : Eclipse // Description : sorts the name of presidents alphabetically //============================================================================ #in...
ALGO
0.997532
5.09082
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-03-30T11:36:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92029e61842...
886ee9e9-a235-4cee-88eb-69237a8de6bf
trilinos/Trilinos
packages/intrepid/src/Discretization/Basis/Intrepid_HDIV_QUAD_I1_FEM.hpp
// @HEADER // ************************************************************************ // // Intrepid Package // Copyright (2007) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on behalf of the ...
ALGO
0.936983
5.816876
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
d8bfefcc-e906-40e7-8cad-a58da7662d6f
kAleks12/SDiZO_2
containers/AdjacencyList/AdjacencyList.cpp
// // Created by kacper on 14.05.2022. // #include <algorithm> #include <iostream> #include "AdjacencyList.hpp" #include "../../utilities/FileOps/FileOps.hpp" AdjacencyList::AdjacencyList(bool ifMST) { //Initializing with values read from file this->edgesNumber = FileOps::edgesNum; this->verticesNumber = ...
ALGO
0.983884
5.227049
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-05-14T18:12:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1d58d2a28e...
6d92b20a-487c-494e-9586-74b18b933b59
lclpsoz/competitive-programming
CF/961/e/e_2.cpp
#include "bits/stdc++.h" #include "ext/pb_ds/tree_policy.hpp" #include "ext/pb_ds/assoc_container.hpp" using namespace std; ////////////// Prewritten code follows. Look down for solution. //////////////// #define x first #define y second #define LEN(x) ((int)(x).size()) #define ALL(x) x.begin(), x.end() using ll = long...
ALGO
0.999987
3.70552
{ "github_metadata": { "branch": "master", "commit_count": 274, "repo_created_at": "2020-07-09T09:09:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d520d432...
831b4dd4-09ca-47a8-af43-5d54679a8549
ishandutta2007/codeforces-b
belonogov/normal/949/E.cpp
#include <bits/stdc++.h> #define F first #define S second #define pb push_back #define sz(a) (int)(a).size() #define all(a) (a).begin(),a.end() #define pw(x) (1LL<<(x)) #define db(x) cerr << #x << " = " << x << endl #define db2(x, y) cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n"; #define db3(x...
ALGO
0.999908
3.603781
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c26348ec0c57...
2e021417-19e9-4f34-9878-0e384d194af1
KratosMultiphysics/Kratos
applications/FluidDynamicsApplication/custom_conditions/wall_laws/navier_slip_wall_law.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: <NAME> // #pragma once // S...
ALGO
0.991078
5.191011
{ "github_metadata": { "branch": "master", "commit_count": 106408, "repo_created_at": "2017-02-13T10:58:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1141, "forks": 265, "issues": 381, "pull_requests": 258 }, "file_meta": { "content_id"...
60b25835-d464-4664-85f5-17d319c44000
christopherbatty/SDFGen
hashtable.h
#ifndef HASHTABLE_H #define HASHTABLE_H #include <functional> #include <iostream> #include <vector> template<class Key, class Data> struct HashEntry { Key key; Data data; int next; }; // a useful core hash function inline unsigned int hash(unsigned int k) { return k*2654435769u; } // default hash function ...
ALGO
0.917968
6.155758
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2012-01-18T18:31:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 801, "forks": 134, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "8a2551...
3392ea36-3866-4a05-b9aa-002213a0a7fb
nalinv123/Generalise-Data-structure-library
helper.cc
#include"Header.h" Singly_Linear::Singly_Linear() { head = NULL; } BOOL Singly_Linear::InsertFirst(int iNo) { PNODE newn = NULL; newn = new NODE; if (newn == NULL) { return FALSE; } newn->data = iNo; newn->next = NULL; if (head == NULL) { head = newn; return TRUE; } else { newn->next = head; ...
ALGO
0.980157
3.192414
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-05-16T10:17:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71c06100f2...
fdce129e-2e94-4110-99b9-c478da7ebc9d
google/monster-mash
third_party/libigl/include/igl/resolve_duplicated_faces.cpp
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2015 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2....
ALGO
0.927533
6.271438
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-01-28T21:04:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1312, "forks": 182, "issues": 24, "pull_requests": 0 }, "file_meta": { "content_id": "dec6e3...
f54a5d3b-60e9-4eca-95d6-33f1715a42e9
KDE/kolena
scribo/primitive/link/internal/link_single_dmax_base.hh
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) // // This file is part of Olena. // // Olena is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free // Software Foundation, version 2 of the License. // // Olena is d...
ALGO
0.993424
6.839506
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-09-18T16:04:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25aabc79237...
2b10bb5a-8062-4460-82df-1d153aa95089
priyanshu-upadhyay/Leetcode-Problems
Implementing Dijkstra Algorithm - GFG/implementing-dijkstra-algorithm.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { typedef pair<int, int> pi; public: //Function to find the shortest distance of all the vertices //from the source vertex S. vector <int> dijkstra(int V, vector<vector<int>> adj[], int S) { ...
ALGO
0.999956
5.717603
{ "github_metadata": { "branch": "main", "commit_count": 924, "repo_created_at": "2022-03-28T17:25:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f11af27bec...
21e7ebb9-3779-42b1-b68a-62f6de93d976
eziokittu/KIIT_Laptop_C_Cpp_Codings
Competitive Codings/LeetCode_120_Triangle.cpp
// LeetCode Problem 120 - Triangle finding the path minimum cost // https://leetcode.com/problems/triangle/description/ #include <iostream> #include <vector> using namespace std; int GetSum(int level, int index, int sum, vector<vector<int>> triangle, vector<vector<int>> &cost_table){ if (level == triangle.size()...
ALGO
0.999983
5.956029
{ "github_metadata": { "branch": "main", "commit_count": 192, "repo_created_at": "2022-09-30T11:49:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0fdcf240f...
b320e587-15eb-4287-b2b6-9a0243d91bc1
Thpffcj/DataStructures-and-Algorithms
C++/algorithms/algorithm-interview/Dynamic-Programming/Longest-Increasing-Subsequence/main2.cpp
/** * Created by Thpffcj on 2017/9/28 */ #include <iostream> #include <vector> using namespace std; class Solution { public: int lengthOfLIS(vector<int>& nums) { if( nums.size() == 0 ) { return 0; } // memo[i] 表示以 nums[i] 为结尾的最长上升子序列的长度 vector<int >memo( nums.size(...
ALGO
0.999838
5.277038
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2017-07-27T14:13:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3be20c59...
5f1aef36-c643-4b14-9bf2-15df9ae7c800
Mattus02/Kattis
3.8_karlcoder.cpp
// Problem: https://open.kattis.com/problems/karlcoder #include <bits/stdc++.h> using namespace std; typedef unsigned long long u64; u64 Guess(u64 guess) { cout << "buf[" << guess-1 << ']' << endl; u64 answer; cin >> answer; return answer; } void FinalAnswer(u64 answer) { cout << "strlen(buf) = "...
ALGO
0.995606
3.236046
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2023-02-25T15:04:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11b0026827...