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
edaf864c-a695-480d-9cae-b6082ddd56bf
garyuppal/OldMicrobeSimulator
common/simulator/dgsimulator.h
#ifndef MICROBE_SIMULATOR_DG_SIMULATOR_H #define MICROBE_SIMULATOR_DG_SIMULATOR_H #include <deal.II/base/quadrature_lib.h> #include <deal.II/base/function.h> #include <deal.II/lac/vector.h> #include <deal.II/grid/tria.h> #include <deal.II/grid/grid_generator.h> #include <deal.II/grid/grid_out.h> #include <deal.II/fe/...
ALGO
0.998619
3.855463
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-07-03T03:30:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0e658a6da...
0c9cc8dd-532a-450f-bbfd-86ed2cc09c8d
badouralix/adventofcode-2018
day-04/part-1/atauveron.cpp
#include <iostream> #include <map> #include <sstream> #include <string> #include <unordered_map> std::map<std::string, std::string> read_input(std::string input_str) { std::map<std::string, std::string> result{}; std::stringstream input(input_str, std::ios_base::in); std::string line; while (std::getline(input...
ALGO
0.993477
4.859495
{ "github_metadata": { "branch": "master", "commit_count": 629, "repo_created_at": "2018-11-30T23:33:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 6, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "07ffe98...
e137d70a-5f7c-4a27-bf7b-430bf10dde63
sheikh-arman/Competitive_Programming
Online_Judge_Problem_Solution/Kattis/kattis_coprimeintegers.cpp
/* <NAME> University of Barisal Problem : Kattis coprime integer Solution : Exclusion Inclusion Date: */ #include<bits/stdc++.h> using namespace std; typedef long long int ll; #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds;...
ALGO
0.999939
5.23021
{ "github_metadata": { "branch": "master", "commit_count": 798, "repo_created_at": "2020-02-27T18:46: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": "66bef584...
16c66fb8-c003-46b7-82a1-75a8a785560d
AndreMaestro/2_semestr
informatica/Stack/2.cpp
/*Создать очередь из целых чисел. Выполнить циклический сдвиг очереди так, чтобы на первом месте было первое составное число. Например, было 2 3 5 4 8 6 9 1 4 5 7. Стало 4 8 6 9 1 4 5 7 2 3 5*/ #include <iostream> using namespace std; bool isComposite(int n){ if (n <= 1) return false; if (n == 2 || n == 3) r...
ALGO
0.999835
4.382185
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2025-04-20T08:19: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": "83a4c8cd1...
d2ec7782-c308-42af-98b2-5b5e2669fb61
kendryte/k230_sdk
src/big/mpp/middleware/src/live555/liveMedia/MP3InternalsHuffman.cpp
/********** 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 License, or (at your option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.) This librar...
ALGO
0.944915
5.630552
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-07-07T05:53:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 217, "forks": 63, "issues": 25, "pull_requests": 3 }, "file_meta": { "content_id": "32e56026...
21a8ec1c-931f-4968-9a7b-980e967babbf
aldrichsun/Graph-Partitioning-with-Natural-Cuts
Assemble/Assemble.cpp
#include <iostream> #include <math.h> using namespace std; #include "A_Graph.h" #include "R_Graph.h" void greedy_algo( A_Graph& a_graph, NodeSize sz_lim ){ VERBOSE(printf("first greedy algorithm...");) //a_graph.greedy_algorithm( sz_lim ); a_graph.greedy_algorithm_heap( sz_lim ); VERBOSE(printf("done!\n");) } ...
ALGO
0.998225
3.962192
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-07-25T06:37:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcc0f67c...
54082d6b-9328-4a08-a7ad-48b2dca271ed
Mubin987/3rd-Semester-Material-FAST-NUCES
Data Structures/Codes/LAB13_(Graphs)/Task5_21K-4827.cpp
#include <iostream> using namespace std; #include <limits.h> #define V 6 void printSolution(int []); int minDist(int dist[], bool sptSet[]){ int min = INT_MAX, min_index; for (int v = 0; v < V; v++) if (sptSet[v] == 0 && dist[v] <= min) min = dist[v], min_index = v; return min_index;...
ALGO
0.999929
3.359771
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-19T17:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8ebe2f1db5f...
b7931e6d-46cf-4be0-9593-fcd569b158a7
rotti123/BAC
BAC2015 SS.cpp
SII ex 5 int main() { char s[101]={},*p; cin.getline(s,100); p=strtok(s," "); while(p!=NULL){ if(p[0]>='A' && p[0]<='Z'){ cout<<p[0]; } p=strtok(NULL," "); } return 0; } SIII ex 3 #include <iostream> #include <cstring> using namespace std; int DivImparNa...
ALGO
0.999854
3.611058
{ "github_metadata": { "branch": "main", "commit_count": 401, "repo_created_at": "2021-12-02T06:43:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c838e39a6c...
11a730c4-13de-4bd3-b4ab-80eb505274b3
maniprasadkadlaskar/Data-structures-and-algorithms
Tree/Binary Tree/operationsOnBinaryTree.cpp
#include<iostream> #include<queue> using namespace std; class Node { public: int data; Node * left, * right; Node(int val) { data = val; left = right = NULL; } }; void inorderTraversal(Node * root) { if(root == NULL) return; inorderTraversal(root->left); cout<...
ALGO
0.99993
4.359514
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-05-06T12:22:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "418dac54f215...
186433f3-f4e8-4267-8ed9-32891d3b2eeb
hyndavi17/MatMul
main.cpp
#include <iostream> #include <vector> template <typename T> auto make_matrix(const size_t nrows, const size_t ncols) { std::vector<std::vector<T>> result(nrows); for (size_t r = 0; r != nrows; ++r) { result[r].resize(ncols); } return result; } template <typename T> void matmul(const std::vecto...
ALGO
0.999847
5.782147
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-04T17:32: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": "64c3ce13c36c...
e20f935f-bba8-4005-b3b7-12d0637e964e
Bboychev14/C-exercises
05_exceptions/ex_03.cpp
#include <iostream> #include <vector> using namespace std; vector<int> ReturnSubVector(const vector<int>& vec, int subVectorSum); int main() { vector<int> vec = {4, 7, 9, 1, -2}; int finalSum = 17; vector<int> finalVector = ReturnSubVector(vec, finalSum); for (int i = 0; i < finalVector.size(); ++i) ...
ALGO
0.999933
4.531038
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-11-15T07:46: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": "00215c6dbb8b...
fd638990-49e7-43d0-a77d-f4542f5c8f4b
DmitryBrown/CommodityADS2014Code
MiscAlgs/test.cpp
#include "Misc.h" #include <cassert> #include <iostream> using namespace std; using namespace igmdk; int main() { //Combinator perm(2, 4); Permutator perm(4); for(int j = 0; j < 7; ++j) { cout << "P" << endl; for(int i = 0; i < perm.p.getSize(); ++i) cout << perm.p[i] << " "; co...
ALGO
0.950404
4.600064
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2015-11-29T08:53:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bff08fd24c...
9f9d7510-a0ca-44cd-9b49-fb45592e48dc
WalterKusnezow03/ue_bezierTerrainPlugin
terrainPlugin/Source/terrainPlugin/meshgen/foliage/helper/ParallellShapeMerger.cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "ParallellShapeMerger.h" #include <algorithm> #include "GrahamScan.h" #include "GameCore/util/FVectorUtil.h" #include <limits> ParallellShapeMerger::ParallellShapeMerger() { } ParallellShapeMerger::~ParallellShapeMerger() { } /...
ALGO
0.996268
4.091858
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-11-13T21:33:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01db09654ff...
25879874-3078-48ff-8811-d90ac5cb3b65
MHF2145/Data-Structure-2023
Other Class/Strukdat Kelas D(2)/Praktikum 3/DayatRevengerAsliFixInimahAC.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <map> #include <cmath> #define ull unsigned long long using namespace std; typedef struct AVLNode_t { int data; struct AVLNode_t *left, *right; int height; } AVLNode; typedef struct AVL_t { AVLNode *_root; unsign...
ALGO
0.999892
4.999938
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-04-12T09:46: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": "ed38ac4c555...
0e74a39f-c83a-4b79-8664-a0a7534bd1b5
abdi10bands/Priority-Q
pqueue.cpp
// ================================================= // Priority Printer Queue // YOUR NAME: <NAME> // File Type: implementation pqueue.cpp // ================================================= #include "pqueue.h" // constructor pqueue::pqueue() { count = 0; // no jobs yet } // destructor does nothing pqueue::~...
ALGO
0.998556
4.922151
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-01-02T08:55: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": "290df14101ca...
69752911-521b-4567-a69f-736b1ec949ea
karan221/cp
1606/1606C.cpp
#include <bits/stdc++.h> #define int int64_t using namespace std; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int p[20]{1}; for(int i = 1; i <= 18; i++) p[i] = p[i - 1] * 10; int t; cin >> t; while(t--) { int n, k; cin >> n >> k; int a[n + ...
ALGO
0.999739
3.635048
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-03-27T14:54: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": "650316e92bf...
371e3b75-e1b7-4e42-aff6-2986cb4124e7
KevinIsYi/100-Days-Of-Code
CP/Codeforces/1200/1362B.cpp
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define pb(x) push_back(x) template <typename T> T ceil(T a, T b) { return (a + b - 1) / b; } template <typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; } long long lcd(long long a, lon...
ALGO
0.999827
4.243877
{ "github_metadata": { "branch": "master", "commit_count": 416, "repo_created_at": "2020-07-10T18:32:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 16 }, "file_meta": { "content_id": "985a35f...
148db18a-5e4c-46d4-81df-bbfda1f37685
JayTheCoder77/Striver-Dsa
RECURSION/SubsequencesPattern/PatternsOfSubsequences/printAllWithSumK.cpp
#include <bits/stdc++.h> using namespace std; void printAll(int ind, vector<int> &ds, int s, int sum, vector<int> &arr, int n) { if (ind == n) { if (s == sum) { for (auto it : ds) cout << it << " "; cout << endl; } return; } // Pick the element ds.push_ba...
ALGO
0.999905
5.48978
{ "github_metadata": { "branch": "main", "commit_count": 177, "repo_created_at": "2024-11-18T12:45:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e527f8a784...
8b040abb-74c7-4c0c-9e47-a68394d719be
satyam-software-developer/DSA-in-CPP
introduction to c++/Conditionals & Loops/multiplication_table.cpp
/*Problem statement Write a program that generates a multiplication table for a given integer. Detailed explanation ( Input/output format, Notes, Images ) Input Format : A single integer, n, where 0 <= n <= 10,000. Output Format : The first 10 multiples of n, each printed on a new line. Constraints : The input intege...
ALGO
0.996449
4.643445
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-15T21:31: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": "73fc44ccc063...
424ca524-8162-449a-b421-b2a9c59a6fb3
heewonham/Alogrithm_bj_Greedy
BJ_8980_택배.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool compare(pair<int, pair<int, int> > a, pair<int, pair<int, int> > b) { if (a.second.first == b.second.first) { if (a.first == b.first) return a.second.second > b.second.second; return a.first < b.first; } return a.second.first ...
ALGO
0.99979
3.865623
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-02-11T08:31: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": "a7b7e0655...
fe7c4b29-d258-47c6-91e6-5d8986aa016a
imateja/cpp_algorithms
geometry_algorithms/segments_union.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; class Segment { public: Segment() {} Segment(int b, int e) { begin=b; end=e; } int getBegin() const {return begin;} int getEnd() const {return end;} private: int begin; int end; }; bool compare(Segment& s1, Segment& s2) { if(s1.ge...
ALGO
0.999547
5.484179
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-08-11T23:12: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": "92fc9dc134...
04236031-4a78-4855-a592-ec6b464a4ec1
mahdihasnat/CP-code
Geo/Geo3D.cpp
struct Point3D { Ti x, y, z; Point3D(Ti x = 0, Ti y = 0, Ti z = 0) : x(x), y(y), z(z) {} Point3D operator + (const Point3D& u) const { return Point3D(x + u.x, y + u.y, z+u.z); } Point3D operator - (const Point3D& u) const { return Point3D(x - u.x, y - u.y, z-u.z); } Point3D operator * (const long long u) c...
ALGO
0.996376
3.886393
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2018-12-22T08:36:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f41113046...
b616b57b-df71-4eb1-9c95-3a14c6da98e8
Matrix4555/Study-Exercises
chapter 8 ex9 safearray advanced.cpp
#include <iostream> #include <ctime> using namespace std; const int limit = 1000; class safeArray { public: safeArray(int l, int r) { left = l; right = r; } void putElement(int index, int value) { if (index > 0 && index < limit - 1) arr[index] = value; } int getElement(int index) { if (index > 0...
ALGO
0.953251
3.824026
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-25T04:07: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": "d31dea54f3...
f294bac9-3f57-41d7-b5fe-c936673c1b1e
SMAC-Group/gmwm
src/ts_checks.cpp
#include <RcppArmadillo.h> #include "ts_checks.h" // Include polyroot for invertibility #include "polyroot.h" // Complex tools #include "complex_tools.h" //' @title Obtain the smallest polynomial root //' @description Calculates all the roots of a polynomial and returns the root that is the smallest. //' @param x A...
ALGO
0.997637
6.563574
{ "github_metadata": { "branch": "master", "commit_count": 754, "repo_created_at": "2014-11-19T16:02:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30, "forks": 15, "issues": 71, "pull_requests": 0 }, "file_meta": { "content_id": "bb5570...
c39f3efa-134a-4bf5-af82-9896c9699e69
nguyenhuuvien/NHV_Richard
baitapvenha/btvn1.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; class EmployeeSystem { protected: string name; int Basic_Salary; public: EmployeeSystem() {} EmployeeSystem(string name, int Basic_Salary) { this->name = name; this->Basic_Salary = Basi...
TOOL
0.972764
3.583626
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-12-07T01:04:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8416c092826...
ffb29e7c-cbe4-4098-8d81-f0bd3313dc76
TejaswiniKurade/Code
ADS/hash_table.cpp
#include<bits/stdc++.h> using namespace std; const int size=10; typedef struct node{ int prn; int marks; int link; }node; class Hash{ public: node arr[size]; //int index,prev; void init(){ for(int i=0;i<size;i++){ arr[i].prn=-1; arr[i].marks=-1; ...
ALGO
0.988507
3.581677
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-05-17T12:34:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8d86f68c6ab...
abee184c-eaf2-49b2-a15d-ef11c730deb0
SeekerNik/code
HRank/climbingleaderboard.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i <= (b); ++i) #define FORD(i, a, b) for (int i = (a); i >= (b); --i) #define RI(i, n) FOR(i, 1, (n)) #define REP(i, n) FOR(i, 0, (n)-1) #define mini(a, b) a = min(a, b) #define maxi(a, b) a = max(a, b) #define mp make_pair #define pb ...
ALGO
0.999994
4.725682
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-07-10T17:31:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3195e0d87...
36fd3553-3489-4f9f-acf0-aa6502725651
MR-P17/CPP_TREE
mergeKSortedArray.cpp
#include<bits/stdc++.h> using namespace std; # define int_max 9999 void heapify(int **arr,int k,int i) { int min=i,lc=2*i+1,rc=2*i+2; if(lc<k && arr[lc][0]<arr[min][0]) min=lc; if(rc<k && arr[rc][0]<arr[min][0]) min=rc; if(min!=i) { swap(arr[i][0],arr[min][0]); heapify(arr,k,min); }...
ALGO
0.999961
3.052369
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-10-07T17:25: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": "c39046873a...
13a0af70-88cf-458f-b097-60d0b926b110
juanjehn99/AED2_FirstPractice
ProgramaPrincipal.cpp
#include <iostream> #include <cmath> #include <cstdio> #include <cstdlib> #include <string.h> #include <chrono> using namespace std; struct Solucion{ int NumConcatenaciones; int Indice; string A, B; int k, p, q; }; int Dividir(int p, int q){ return (round((p+q)/2))+1; } Solucion SolucionDirecta(in...
ALGO
0.999892
3.983016
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2019-04-08T13:17:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d98598233...
6ebc348e-2945-4e81-8ead-f942f77a523c
curiousHG/LeetCodeSubmissions
173-binary-search-tree-iterator/173-binary-search-tree-iterator.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999941
5.995996
{ "github_metadata": { "branch": "main", "commit_count": 1418, "repo_created_at": "2022-05-26T17:05: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": "8e3752fc5...
21c6fc6f-bea8-4f90-9aba-abe12f14eef2
Higumabear/POJ
3180.cpp
// Time-stamp: <Wed Nov 08 16:02:05 太平洋標準時 2017> #include <sstream> #include <string> #include <vector> #include <map> #include <algorithm> #include <iostream> #include <utility> #include <set> #include <cctype> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #...
ALGO
0.999693
4.396587
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-02-12T08:53: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": "8d13fbf5a...
e9aea932-e127-46ba-b522-a1c119da24de
tapoton/PLT_2017_2sem_2c_4gr
Plotnikov/Trie-Tree.cpp
#include <iostream> #include <cctype> #include <string> using namespace std; #ifndef NULL #define NULL 0 #endif template <typename T> class Stack { struct Node { T value; Node* Next; Node() { this->Next = nullptr; } }; Node* Head; unsigned int size; public: Stack() { Head = nullptr; size = ...
ALGO
0.996181
4.303416
{ "github_metadata": { "branch": "master", "commit_count": 223, "repo_created_at": "2017-02-19T19:25:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 20, "issues": 0, "pull_requests": 12 }, "file_meta": { "content_id": "b76308...
c378a900-12e6-4119-91d8-a1f03702002a
CaptainSlowWZY/OI-Code
BZOJ/BZOJ3262.cpp
// BZOJ 3262 #include <cstdio> #include <cstring> #include <algorithm> #ifdef DEBUG_MD #define debug(format, ...) fprintf(stderr, format, __VA_ARGS__) #else #define debug(fommat, ...) 0 #endif #define rg register #define pch putchar #define gch getchar const int MAXN = 1e5; const int MAXK = 2e5; struct Flower { i...
ALGO
0.999938
4.34109
{ "github_metadata": { "branch": "master", "commit_count": 364, "repo_created_at": "2018-07-05T00:46: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": "c65fd37c...
d5cec09c-95f5-413c-9dfe-7883612c2b7b
aSpanefRost/CodingNInjas
Language Tools/Extract_Unique_Characters.cpp
// Extract Unique characters // Send Feedback // Given a string S, you need to remove all the duplicates. That means, the output string should contain each character only once. The respective order of characters should remain same, as in the input string. // Input format: // The first and only line of input contains a ...
ALGO
0.997518
3.831586
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2021-05-03T06:02:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "322d29b8b8...
d82c5a46-93e0-4155-83f6-04c9938fca93
bossxu/acm
比赛/newcoder/训练4/b.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<queue> #include<stack> #include<vector> #include<cmath> #include<set> #include<cstdlib> #include<functional> #include<climits> #include<cctype> #include<iomanip> using namespace std; typedef long long ll; #define INF 0x3...
ALGO
0.999996
3.480269
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2017-10-26T08:07: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": "ff7beffa...
ee2b9655-cb88-4e15-b289-80ad2bc6eeeb
samek567/ZadaniaAlgorytmiczne
OI/ptaszek_100_pkt_kolejka_monotonniczna_dynamik.cpp
#include <iostream> #include <vector> #include <deque> using namespace std; struct Element { long long dp; long long wysokosc; bool operator == (const Element &element) const { return ((dp == element.dp) && (wysokosc == element.wysokosc)); } bool operator > (const Element & element) c...
ALGO
0.999906
4.174745
{ "github_metadata": { "branch": "main", "commit_count": 545, "repo_created_at": "2022-10-15T09:19:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73ffb09297...
be773472-cc70-40e6-b578-b90eda795831
raincross7/code-similarity
codes/train_code/problem454/problem454_119.cpp
#include<bits/stdc++.h> #define ll long long int #define rep(i, n) for (int i = 0; i < (int)(n); i++) static const ll MAX = 1000000000000000; static const int NIL = -1; using namespace std; const long double EPS = 0.0000000001; const long double PI = (acos(-1)); const ll MOD = 1e9 + 7; #pragma GCC target("avx2") #prag...
ALGO
0.993441
3.120854
{ "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": "b449715356dd...
a0c01bfe-1331-41f0-a775-9a9e3a48ab58
geanders/stormwindmodel
src/RcppExports.cpp
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 1<PASSWORD> #include <Rcpp.h> using namespace Rcpp; #ifdef RCPP_USE_GLOBAL_ROSTREAM Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); #endif // calc_distan...
ALGO
0.986771
6.379743
{ "github_metadata": { "branch": "master", "commit_count": 415, "repo_created_at": "2016-04-22T20:45:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 11, "issues": 24, "pull_requests": 0 }, "file_meta": { "content_id": "4c33e...
44536778-fb16-4d16-8e42-6965f7bda84a
sunil-kasarpu/MissionRnD-CMrndTest3
src/Problem1.cpp
/* Given a Binary Tree of N Nodes, which have unique values in the range of [0,N](Inclusive) with one value(Node) missing in that sequence. Return that missing value . Example 1 : N=5 3 / \ 4 1 / \ 5 0 Missing Value is 2 ,Sequence is [0,1,2,3,4,5] Example 2 : N=8 2 / \ 4 5 / \ ...
ALGO
0.999942
4.377734
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-04-24T04:28: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": "1aaacb71dc...
55419d38-8603-4e6c-b6bc-8ed806710b7f
Azrof88/programming-portfolio
c++ code and algorithms/Algorithm/branch and bound/15 puzzle/recursively.cpp
#include <bits/stdc++.h> #include <vector> #include <queue> #include <unordered_set> #include <string> using namespace std; const int N = 4; // Size of the grid (4x4) // Function to print the puzzle state void printBoard(const vector<vector<int>>& board) { for (const auto& row : board) { for (int tile : ...
ALGO
0.999988
7.397335
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-10-10T18:14:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c062be0f1f...
c1eefdcf-9ee4-4783-99f7-ba11aacaa40a
AnthonyCxx/Notes-and-Writeups
C++/Data Structures and Algorithms/Leetcode/1. Two Sum.cpp
//Problem explanation: https://medium.com/swlh/understanding-leetcode-the-two-sum-problem-6428ed5cb18d /* This problem requires you to return the indices of two numbers in the vector<int> nums that will add up to the target value. The brute-force solution is check the sum of every element in the array for every ...
ALGO
0.999937
6.382872
{ "github_metadata": { "branch": "main", "commit_count": 6022, "repo_created_at": "2021-04-10T19:41:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96edff2d3...
09b801e2-f021-4655-9759-11fb9abffd79
p82maavd/Algoritmica
Complejidad Computacional/Practica1_Fuentes/funciones.cpp
#include "funciones.hpp" using namespace std; double sumatorio(const vector <double> &n, const vector <double> &t, int expN, int expT){ double suma=0.0; for(int i=0; i< n.size();i++){ suma+=pow(n[i],expN)*pow(t[i],expT); } return suma; } double sumatorioExponencial(const vector <double> &n, const vector ...
ALGO
0.989968
3.714166
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2021-09-29T19:40: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": "b909c1a877a...
c1c8af59-beec-46c7-9335-7c36f5b82624
ramoraga/NIU_Coursework
Programming in C++/CSCI 241/Assign9/inpost.cpp
//******************************************************************* // // inpost.cpp // CSCI 241 Assignment 7 // // Created by <NAME> (z1864815) // //******************************************************************* #include "inpost.h" #include "mystack.h" #include <iostream> #include <iomanip> #include <cctype...
ALGO
0.993203
4.611887
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-11-30T03:46:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6606fbe60c2...
36bdca9d-fdc2-464a-b59e-71e763a9d7e0
dstndstn/astrometry.net
include/astrometry/mathutil.inc
/* # This file is part of the Astrometry.net suite. # Licensed under a 3-clause BSD style license - see LICENSE */ #include <math.h> InlineDefine void normalize(double* x, double* y, double* z) { double invl = 1.0 / sqrt((*x)*(*x) + (*y)*(*y) + (*z)*(*z)); *x *= invl; *y *= invl; *z *= invl; } InlineDefine void ...
TOOL
0.996835
6.392832
{ "github_metadata": { "branch": "main", "commit_count": 5088, "repo_created_at": "2014-06-20T22:21:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 743, "forks": 200, "issues": 75, "pull_requests": 3 }, "file_meta": { "content_id": "3749...
658cbcfa-de3b-4a4a-af4d-e7d069592abc
dglaeser/gridformat
bin/convert.cpp
// SPDX-FileCopyrightText: 2022-2023 <NAME> <<EMAIL>> // SPDX-License-Identifier: MIT #include <unordered_map> #include <filesystem> #include <type_traits> #include <algorithm> #include <iterator> #include <iostream> #include <optional> #include <utility> #include <ranges> #if GRIDFORMAT_HAVE_MPI #include <mpi.h> #en...
TOOL
0.941391
6.588834
{ "github_metadata": { "branch": "main", "commit_count": 1318, "repo_created_at": "2022-10-28T11:57:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 2, "issues": 27, "pull_requests": 1 }, "file_meta": { "content_id": "35ae7ad...
e9d38c73-99c6-4ee1-a065-277272cd8dfb
automaths/rubik
src/Cubos.cpp
#include "../Cubos.hpp" #include <iostream> #include <sstream> using namespace std; const string Cube::corner_names[8] = {"URF", "UFL", "ULB", "UBR", "DFR", "DLF", "DBL", "DRB"}; const string Cube::edge_names[12] = {"UR", "UF", "UL", "UB", "DR", "DF", "DL", "DB", "FR", "FL", "BL", "BR"}; const char Cube::face_names[6...
ALGO
0.9996
4.888299
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2023-02-23T20:01:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37fedf2c04d...
30695991-273a-4d61-98e4-ad564f2c5694
johann2357/threads-cpp
mutex-comparison/threads.cpp
#include <iostream> #include <chrono> #include <random> #include <thread> #include <vector> #include <time.h> #include <cstring> template <typename T> void fill_random(T** matrix, int rows, int columns, T from, T to); template <typename T> void print(T** matrix, int rows, int columns); template <typename T> T** crea...
TOOL
0.965676
4.603768
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2013-10-26T03:40:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "831818a3e...
3aca77a2-8cb1-4201-a306-614cd553712a
21Enzo17/TF-Estructura-de-Datos
TDA Bicolas.hpp
#include <iostream> // Cola con entrada restringida using namespace std; const int MAX=50; typedef struct tletra *pletra; typedef struct tletra{ char dato; pletra sig; pletra ant; }; typedef struct tcola{ pletra inicio; ...
ALGO
0.99877
3.480448
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-10T02:41:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7ed2dc1d097...
f18a6b67-ad88-4533-ae7c-67ce63268ca9
veryloooong/cpp
ttud/training/08.cpp
#include <algorithm> #include <chrono> #include <climits> #include <cstdint> #include <fstream> #include <iostream> #include <vector> using namespace std; typedef int32_t i32; typedef uint32_t u32; typedef int64_t i64; typedef uint64_t u64; constexpr i64 MOD = 1e9 + 7; // NOLINT const char *inf = "input.txt"; const ...
ALGO
0.999938
4.611317
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2025-01-04T09:20:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a906057cde...
a42327be-3523-454b-9f1e-841946471589
RayMoham/File-I-O-Projects
Assignment3Question5.cpp
/* Name: <NAME> Athabasca University ID: 3669212 Description: Bookshelf project - This is a source of a few books initally and then combiniing a combinatioin 12 books and outputting their information normally then sorted accordingly. Date: Dec 19th, 2023 */ /* Documentataion for Assignment 3 - Q5 Program Nam...
TOOL
0.991155
4.41786
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-01-09T07:09: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": "f783960612b5...
c3921d8b-c114-4e1b-8f25-5c64e5041629
ahmedshindy/Problem-Solving-in-Cpp
Week04/week/E_two_bagsofpotatoes.cpp
#include <iostream> #include <string> using namespace std; typedef long long ll; int main() { int y,n,k; cin>>y>>k>>n; int sum; int first_value=0; int x=1; for( x=1; x<=k; x++) { sum=x+y; if(sum>n) break; if( !(sum%k)) { co...
ALGO
0.999909
3.325992
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-09-07T21:50:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e74fa5d79ac...
a33b1a83-53a9-4407-919b-bb5ecd4319df
maierta/MRPAPP
SrRuO.h
#ifndef SRRUO_H #define SRRUO_H #include <string> #include <iostream> #include <vector> #include <fstream> #include <cstdlib> // for atof and atoi #include "Matrix.h" #include "parameters.h" #include "momentumDomain.h" #include "utilities.h" #include "Range.h" namespace rpa { template<typename Field, template<typ...
ALGO
0.90723
3.302978
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2015-04-15T15:37:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 7, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "fe0df4e...
78e5749b-59cf-44e0-b019-f0340d19a547
hyjk826/baekjoon
백준/Silver/15658. 연산자 끼워넣기 (2)/연산자 끼워넣기 (2).cc
// 2022-08-31 #include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); #define vi vector<int> #define vl vector<long long> #define vc vector<char> #define vs vector<string> #define pi pair<int, int> #define pl pair<ll, ll> #define vp vector<pi> #define ll long long #def...
ALGO
0.999979
4.029311
{ "github_metadata": { "branch": "main", "commit_count": 2540, "repo_created_at": "2022-05-26T21:55:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6eea5f582...
d4de046b-1ecf-4438-bd4d-6f0740397bc0
antsundq/Magnetometer-Auto-Calibration
Magnetometer_Autocal/Magnetometer_Autocal.cpp
/* * MIT License * Copyright (c) 2021 <NAME> */ #include "Magnetometer_Autocal.h" /************************************************************************************* Begin: Magnetometer_Autocal **************************************************************************************/ MAGAC::MAGAC() { } short MAG...
ALGO
0.977357
4.624858
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-02-28T18:46:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6a6586c7a8...
d2aac1ac-eae6-4ec6-b058-79930599c63a
sindhuja90/IPMP_Tasks_Sindhuja
week6/Array/array_1.cpp
// Union of two arrays // solution 1 class Solution{ public: //Function to return the count of number of elements in union of two arrays. int doUnion(int a[], int n, int b[], int m) { //code here unordered_set<int> hash; int ans = 0; for(int i=0; i<n; i++) if(has...
ALGO
0.999803
5.198711
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2021-10-25T17:41:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e1449d49...
a52d9425-425b-4e81-bd1a-cceac6523567
Aleksandra204/Metody-numeryczne
lab12/zad.cpp
#include <iostream> #include <gsl/gsl_math.h> #include <gsl/gsl_eigen.h> #define n 4 int main (void) { double A[n*n]; int i, j; for (i=0; i < n; i++) for (j=0; j < n; j++) A[n*i + j] = 1 + (i+j) + 1.0*cos(i*j)/(1.5+sin(i+j)); gsl_vector *wart_wlasne = gsl_vector_alloc(n); gsl_matrix *wekt_w...
ALGO
0.999655
3.70548
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-06T18:14:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "690bae7a2812...
f4ea544c-4477-4f99-8fec-465dd0fc85ca
AdamAubs/26.3_Project_3_Encryption
encryptMessageForward.cpp
#include "encryptMessageForward.h" #include "encryptionMenu.h" // struct object stored in ecryptionMenu.h file #include <iostream> #include <vector> #include <algorithm> #include <string> // encrypts the inputed message forward // menuOptions is an object that stores the users choice, shift, and message; std::string...
ALGO
0.998579
4.712317
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2024-03-03T08:49: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": "452fc56d0...
f20cc46a-c7e4-4e3e-80cb-11e32290f6f2
JeraKrs/acm
codes/POJ/poj1182+.cpp
#include <stdio.h> #include <string.h> const int N = 1e5+5; struct node { int u, v; }f[N]; int n, k; int getfar(int x, int& c) { if (x == f[x].u) { return x; } else { f[x].u = getfar(f[x].u, c); f[x].v = (c += f[x].v)%3; return f[x].u; } } void init () { for (int i = 0; i <= n; i++) { f[i].u = i; ...
ALGO
0.999928
3.966833
{ "github_metadata": { "branch": "master", "commit_count": 163, "repo_created_at": "2016-05-23T06:40:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fa73846...
b6e8c144-d1e6-4238-b345-0f5432309597
LoDesFire/basics-of-programming
first_term/laba5/UnitTests/task3TEST.cpp
#include <gtest/gtest.h> using namespace std; void task1(int, int, long long **&, long long **&, long long &, int &); long long ** createDArray(int, int); long long ** deleteDArray(int, long long **&); TEST(task3, Subtest_1) { const int sizeI = 3, sizeJ = 3, length_cmp = 0; const long long ans_cmp = 1; ...
ALGO
0.999676
4.513358
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-10-15T09:25:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48b288f8e8f2...
00eafa60-2062-41bf-a22c-8c50584ca549
doodle-the-programmer/basic-ray-casting
main.cpp
#define UNICODE #define _UNICODE #define NOMINMAX #include <iostream> #include <vector> #include <cmath> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #include <limits> #include <windows.h> #include <algorithm> #include <string> #include <chrono> #include <random> #include <memory> #include <thread> using na...
TOOL
0.952974
5.352077
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-13T19:06:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6357ac3c2d9...
1b4b3e42-6587-44b2-a2a0-b608e527b34e
anabolic23/AA-lab1
aa lab1(1)/main.cpp
#include "Graph.h" #include "Graphs.h" #include <iostream> #include <chrono> using namespace std; int main() { int numVertices; double probability; // Enter the number of vertices and the probability of connection between vertices cout << "Enter the number of vertices: "; cin >> numVertices; ...
ALGO
0.998623
5.845597
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-10-22T13:40:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c58977ca249...
2a3251c6-41de-4cba-93fc-4c20a57f3a09
priyallsinghall/labmanualsem2
a1q4.CPP
#include <iostream> using namespace std; int main() { int n; cout << "Enter the size of the matrix: "; cin >> n; int spiral[n][n]; // 2D array for spiral pattern int left = 0, right = n - 1, top = 0, bottom = n - 1, num = 1; // Fill the matrix in a spiral order while (num <= n * n) { ...
ALGO
0.999463
5.494681
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-01-29T17:45: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": "1b537732909...
793199ee-9276-4651-8880-14d1593a7393
zhengwang1990/CAAM551
include/sem.hpp
#include "projectHeader.hpp" #include "matrix.hpp" #include "setupAide.hpp" #include "omp.h" class sem{ private: /* basci settings */ int K, K_c; int Ne1, Ne2; // Number of elements int N, N_c; // Polynomial order int Np1, Np2; datafloat h; // Mesh size datafloat J; // Jacobi /* coordinate */ f...
ALGO
0.999723
3.737288
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-12-10T22:30: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": "487b36490...
f6c58237-cc3a-4c74-b042-19a809d13bbd
offamitkumar/UVA--Online-Judge
Solution/Problem_011463/p11463.cpp
#include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <cstdio> #include <iostream> #include <string> #include <algorithm> #include <utility> #include <queue> #include <stack> #include <string> #include <cstring> #include <cmath> #include <map> #include <vector> #include <array> #include...
ALGO
0.999607
3.938624
{ "github_metadata": { "branch": "master", "commit_count": 387, "repo_created_at": "2020-01-27T11:59:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77c65c4b...
c0c07b07-5aba-48c6-aafc-d373098d645a
zinuzian/SWEA_cxx
4008.cpp
#include <iostream> #include <cstring> using namespace std; int _max, _min; int n; int opNum[4]; int ops[11]; int nums[12]; void init(){ _max = -2147483647; _min = 2147483647; } void dfs(int nth){ if(nth == n-1){ int ret = nums[0]; for(int i=0;i<n-1;i++){ switch(ops[i]){ ...
ALGO
0.999933
4.314101
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-02-12T00:06: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": "a3cbd3fac...
0d968d83-5863-4920-87b2-50fc4cc38626
ddiazghub/codeforces
B. Triple.cpp
// Problem: B. Triple // Contest: Codeforces Round 784 (Div. 4) // Judge: Codeforces // URL: https://codeforces.com/problemset/problem/1669/B // Memory Limit: 256 // Time Limit: 1000 // Start: Wed Jun 19 15:15:35 2024 #include <algorithm> #include <bits/stdc++.h> #include <map> using namespace std; typedef long long...
ALGO
0.999844
4.68881
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2024-04-27T18:26:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afc458ae5...
647c4e33-0d87-46a0-b2e1-8d85d74fe1af
fmaguire/MetaGUN
src/metatisa/OftenUsedOperatLib.h
//a public lib in our team #ifndef OFTENUSEDOPERATLIB_H #define OFTENUSEDOPERATLIB_H #include<math.h> #include"TypeDef.h" Ve_D calculateAminoFreq( double A, double C, double G, double T ); double getDistance ( con_Ve_D& rhs, con_Ve_D& lhs ); int getMin( Ve_D lhs, con_Ve_D& coefficent = Ve_D( ) ); //void addToP...
TOOL
0.950525
3.618061
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-11-09T09:36: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": "17762c2da7...
4ead0842-156f-4b73-984b-0dbc4c43f058
QY1996/Algorithm-and-datastructure-exercise
AVL_tree/test.cpp
#include <iostream> #include "AVL_tree.h" int main() { std::cout << "Please input the tree's nodes." << std::endl; int nums; AVLTree tree; std::cin >> nums; for (int i = 0; i < nums; ++i) tree.insert(i); char choose; while (true) { std::cout << "Please input the operation you want to do.\n 1: search, 2:insert...
ALGO
0.95978
4.129725
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-02-24T08:13:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12229550c8...
1bd8d148-8e52-4ee4-a750-8efc16829b71
Jimut123/code-backup
4rth_Sem_c++_backup/SHIT/lnk_union_intrsctn.cpp
#include<stdio.h> #include<conio.h> #include<stdlib.h> struct list { int k; struct list *next; }; typedef struct list node; node* insert(node*); void disp(node*); void union_link(node*,node*); void intersection_link(node*,node*); main() { node* start1,*start2; start1=(node*)malloc(sizeof(node)...
ALGO
0.998332
3.392143
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2018-11-08T07:22:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 6, "issues": 0, "pull_requests": 35 }, "file_meta": { "content_id": "05053b...
2cca154f-00bd-4700-8e01-4862ba143a6e
Kanonahmed/ACM-Programming
contest/challlenge_b.cpp
#include<bits/stdc++.h> using namespace std; #define xx first #define yy second #define pb push_back; #define mp make_pair #define LL long long #define PI acos(-1.0) #define AND(a,b) ((a) & (b)) #define OR(a,b) ((a)|(b)) #defin...
ALGO
0.999998
3.0583
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-09-30T19:47:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "244eb93ef9...
683eac64-4c36-4a02-95c3-93097460290e
allenvox/leetcode
src/cpp/StudentAttendanceRecordI.cpp
#include <algorithm> #include <iostream> using namespace std; class Solution { public: bool checkRecord(string s) { short absent = 0, lateRow = 0, maxLateRow = 0; for (char c : s) { switch (c) { case 'A': absent++; lateRow = 0; break; case 'L': l...
ALGO
0.999318
5.75898
{ "github_metadata": { "branch": "main", "commit_count": 200, "repo_created_at": "2023-05-16T12:48: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": "2f055525cc...
29dd150c-34db-4f72-a2ae-e94013fc4b78
HackCaptain/3rd-Year
CMP 311 Project Delivery/Password Strength Checker/Password Strength Checker/Main.cpp
#include <iostream> // c++ standard libraries in #include <cstdio> #include <cassert> #include <vector> // Co-Star Data structure of the show #include <string> // Star data structure of the show #include <chrono> // The clock standard library #include <cstring> // Expanded String Libr...
ALGO
0.973577
3.314213
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-09-29T11:39: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": "1378ed898d8...
849e404d-8cf1-4d93-bc20-79c21055aba2
Aman-Meenia/Javaproject
ITERATIVE_TREE_TRAVERSAL.cpp
#include<iostream> #include<vector> #include<stack> using namespace std; class node{ public: int data ; node * left ; node * right ; node (int data){ this->data= data; } }; node * fun(){ int temp ; cin>> temp; if(temp==-1) return NULL; node * n = new node(temp); co...
ALGO
0.999956
4.499184
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2022-09-19T02:13: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": "74621a670c2...
a911bb37-ec06-449a-a5b2-ead457a78786
harshsinghs1058/codeforce_solutions
A_Strange_Partition.cpp
//this code is created by HARSH. //problem link : https://codeforces.com/contest/1471/problem/A #include <bits/stdc++.h> #define f(i, n) for (int i = 0; i < (n); i++) #define fs(i, p, n) for (int i = (p); i < (n); i++) #define MAX(x, y) ((x) > (y) ? (x) : (y)) #define MIX(x, y) ((x) < (y) ? (x) : (y)) #define p(x) cout...
ALGO
0.999648
3.593777
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2020-12-30T10:21:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7545c43a...
f07f9bbf-3639-4dda-b866-4f229792345c
tsukasa38/AtCoderBeginnersSelection
src/ABC085-C.cpp
#include <vector> #include <iostream> using namespace std; int main() { int N, Y; cin >> N >> Y; bool is_exist = false; for(int x = 0; x <= N; ++x) { if(10000 * x > Y) { break; } for(int y = 0; y <= N - x; ++y) { int z = N - y - x; if(10000 * x + 5000 * y + 1...
ALGO
0.999907
3.828519
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-07-05T13:36: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": "987de213a4ed...
5c35cbb8-51a5-41e8-9f81-615b4a1003e3
unmeshvrije/leetcode
leetcode/RemoveDuplicateLetters.cpp
/** * Count array , visited array and modifying the string in place as we progress */ class Solution { private: std::map<char, int> count; std::map<char, bool> visited; public: string removeDuplicateLetters(string s) { string result(26,'0'); int size = 0; // Store all ...
ALGO
0.999984
6.102666
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-05-21T00:15: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": "972bba400f...
a4d81c2d-bc51-4a38-9d51-e254efa968fb
snl-dakota/dakota-packages
JEGA/include/GeneticAlgorithmNichePressureApplicator.hpp
/* ================================================================================ PROJECT: <NAME> Genetic Algorithms (JEGA) CONTENTS: Definition of class GeneticAlgorithmNichePressureApplicator. NOTES: See notes under Class Definition section of this file. PROGRAMMERS: ...
ALGO
0.987064
7.008583
{ "github_metadata": { "branch": "devel", "commit_count": 279, "repo_created_at": "2021-08-17T16:15:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 6, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "00761454d8...
555c0d4d-7a85-4aa2-ae04-bce049efa633
demiurge-project/experiments-loop-functions
loop-functions/localsearch/AggregationWhiteAndBlackLoopFunc.cpp
/** * @file <loop-functions/example/AggregationWhiteAndBlackLoopFunc.cpp> * * @author <NAME> - <<EMAIL>> * * @package ARGoS3-AutoMoDe * * @license MIT License */ #include "AggregationWhiteAndBlackLoopFunc.h" /****************************************/ /****************************************/ Aggrega...
ALGO
0.921444
5.302355
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2018-01-18T09:42:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8bf65444...
6966025d-12eb-4c31-932d-272c61b77557
Harsh5chal/Programming
InterviewBit/LengthofLongestSubsequence.cpp
int Solution::longestSubsequenceLength(const vector<int> &A) { int n = A.size(); if(n<=1) {return n;} //0-n vector<int>increasingDp(n, 1); for(int i = 1; i < n; i++) { for(int j = 0; j < i; j++) { if (A[i] > A[j]) { increasingDp[i] = max(increasingDp[i], 1 + increasingDp...
ALGO
0.999931
5.383345
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2021-05-25T15:23:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "193d746e056...
0243ad11-2976-48f8-858f-e65fc55ce472
Twinparadox/AlgorithmProblem
Before_2023/Baekjoon/11657.cpp
#include <algorithm> #include <iostream> #include <limits.h> #include <vector> using namespace std; struct Edge { int src, dest, weight; }; int V, E; vector<struct Edge> edge; void printArr(vector<long long>& dist) { for (int i = 2; i <= V; i++) { if (dist[i] == INT_MAX) cout << -1; else cout << dist[i]; ...
ALGO
0.99996
4.346559
{ "github_metadata": { "branch": "master", "commit_count": 475, "repo_created_at": "2016-09-26T07:51: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": "b585bf6e...
b2641ef6-ee30-43c5-bb32-78e171e080ae
ConnectNitish/CompetitiveProgramming
CodeFiles/Array_Others/interviewbit-find-the-next/main.cpp
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debu...
ALGO
0.99997
4.497037
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2019-09-05T05:34:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5b2dff6f...
a5fdd3be-1a7b-4708-a85e-f78949500940
GaurishIIITNR/CP-Problems-Solutions
d_1000000.cpp
// DATE: 02-04-2022 // TIME:18:08:53 #include <bits/stdc++.h> using namespace std; #define ll long long int #define dbl double #define deb(v) cout << #v << " " << v << "\n" #define foi(i, base, n, k) for (i = base; i < n; i += k) #define fod(i, base, n, k) for (i = base; i >= n; i -= k) #define vec(type1, name) vector<...
ALGO
0.999366
4.527332
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-11-17T10:53: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": "ff515d906c2...
3cc412e1-c1aa-48a5-99b6-f2ad4fdde058
Priyanshu6268/GFG_POTD
2024/04 - April/11April24.cpp
class Solution{ public: // function to convert a given Gray equivalent n to Binary equivalent. int grayToBinary(int n) { // Your code here int ans = 0; int last = 0; // last bit in answer for(int i = 31; i >= 0; i--) { int last_bit = (n >> ...
ALGO
0.999923
4.563812
{ "github_metadata": { "branch": "main", "commit_count": 784, "repo_created_at": "2023-05-28T16:00:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b82d39030...
2a4dd173-71fd-41a1-833c-611ab06869e6
AntrikshSingh07/Green_score
InfluenceCalculator.cpp
// File: InfluenceCalculator.cpp #include "InfluenceCalculator.h" #include "Company.h" // For Company::ID and accessing company scores #include <queue> // For BFS-like traversal #include <unordered_set> // To keep track of visited nodes #include <iostream> // For potential debug output std::unordered_map<Graph:...
ALGO
0.999883
7.520694
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-10T22:32: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": "f98115dea7d4...
cffa6cc4-e3a5-442a-b440-1c5f6fb2bf79
Abdelfattah-Mohamed/LeetCode-Blind-Curated-75
solutions/98. Validate Binary Search Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { *     int val; *     TreeNode *left; *     TreeNode *right; *     TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public:    vector<int> vec;    bool isValidBST(TreeNode* root) {        if(!root) return true;        i...
ALGO
0.999991
6.618472
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2020-03-31T00:49:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6032a6...
6e353159-eaea-4118-ba79-4aa86f421f5b
Mustafiz04/Contribute-to-HacktoberFest2021
Games/mainsnake.cpp
#include <iostream> #include <bits/stdc++.h> #include <conio.h> #include <windows.h> using namespace std; bool gameOver; const int width = 40; const int height = 20; int x,y,fruitX,fruitY,score; int tailX[100], tailY[100]; int nTail; enum eDirection {STOP = 0,LEFT,RIGHT,UP,DOWN}; eDirection dir; void Setup() { gameO...
ALGO
0.985293
3.901436
{ "github_metadata": { "branch": "main", "commit_count": 580, "repo_created_at": "2020-10-02T09:13:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 42, "forks": 160, "issues": 3, "pull_requests": 35 }, "file_meta": { "content_id": "fb70ee...
9924ecef-9d3b-48ed-a9ec-915206039def
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/11/41/7.cpp
#pragma comment(linker, "/STACK:60000000") #define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <string> #include <set> #include <map> #include <ctime> #include <cstring> #include <cassert> #include <sstream> #include <iomanip> #include ...
ALGO
0.999585
3.649237
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9f8da775...
c2409200-08bc-4839-a816-8c40724f6051
Algorithm-Artisan-Sandip/GFG_My_Solved_Questions
Difficulty: Medium/Add 1 to a Linked List Number/add-1-to-a-linked-list-number.cpp
/* struct Node { int data; struct Node* next; Node(int x){ data = x; next = NULL; } }; */ class Solution { private: int recursiveAdder(Node* head) { // Base case: if we reach the end of the list, // start by returning a carry of 1 if(head == nullptr) { ...
ALGO
0.99991
5.936328
{ "github_metadata": { "branch": "main", "commit_count": 664, "repo_created_at": "2024-03-31T20:57: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": "66baac3c24...
8661031b-7abc-4dcc-81d6-8f106e1c0091
Alpal94/esp32-client-core
lib/determine-chessboard.h
using namespace cv; using namespace std; #define PARALLEL_ANGLE 0.03 class DetermineChessBoard { private: vector<Point> squareIntercepts; Square squareMap[OVERSIZED_BOARD][OVERSIZED_BOARD] = {}; Square localSquareMap[OVERSIZED_BOARD][OVERSIZED_BOARD] = {}; bool squareColourDetermined = false; Vec3b blackSqu...
ALGO
0.996123
3.650467
{ "github_metadata": { "branch": "client-core", "commit_count": 90, "repo_created_at": "2020-05-02T06:30: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": "4a1c...
9d592f50-27f2-4a25-8fc1-6a41fffd581b
yeonju52/CodingTest
백준/Gold/2638. 치즈/치즈.cc
#include <iostream> #include <queue> #include <cstring> using namespace std; const int MAX = 100; typedef pair<int, int> P; int N, M, board[MAX][MAX], backup[MAX][MAX]; int dx[4] = {0, 0, 1, -1}; int dy[4] = {1, -1, 0, 0}; int getOutside() { memcpy(backup, board, sizeof(backup)); // 외부 공기 5로 표시 (내부 공기 = 0과 구분) ...
ALGO
0.999967
4.443936
{ "github_metadata": { "branch": "main", "commit_count": 300, "repo_created_at": "2024-03-13T00:19:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a34754620...
7e30dffe-fde0-4c95-84e5-7b09daf6747a
LarryDong/ZMJ_project
analyze/src/pcl_process/detection/extract_coeff.cpp
#include "pcl_process/extract_coeff.h" #include <pcl/features/moment_of_inertia_estimation.h> // calculate straightness of car-path #include <gflags/gflags.h> // roof parameters DECLARE_double(roof_width); DECLARE_double(roof_height); DECLARE_int32(roof_direction); // requirements: // Cylinder: 立柱外沿中线位置(TODO:...
ALGO
0.981416
4.789984
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2020-11-02T12:51:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69f58419429...
24dc3b51-a9f7-417b-9933-f4d1214a449e
JJAnawat/CP-Source-files
SPOJ/POLICEMEN.cpp
#include<bits/stdc++.h> using namespace std; int n,q; vector<int> g[10005]; int lv[10005],dp[15][10005]; void dfs(int u,int p,int l){ lv[u]=l; dp[0][u]=p; for(auto v:g[u]){ if(v==p) continue; dfs(v,u,l+1); } } int lca(int a,int b){ if(lv[a]<lv[b]) swap(a,b); ...
ALGO
0.999992
4.463313
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-10-27T14:31: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": "4fe94ed751e...
9f73e839-6e87-4b5e-8314-929e9836276e
hugocesarleal/Engenharia-de-Computacao
Técnicas de Programação/Cadeia alimentar.cpp
#include <iostream> #include <vector> #include <set> class G { public: G(int n) : N(n), LA(n, std::set<int>()) {} void aA(int u, int v) { LA[u - 1].insert(v - 1); } std::string tC() { std::vector<bool> V(N, false); std::set<int> visited; for (int i = 0; i < N; ++i) { ...
ALGO
0.99997
5.073461
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-01-04T20:30: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": "d188e0cfc64...
8a720cfd-7fea-481c-b35c-3860323acfb6
hmazhar/physbam_public
PhysBAM_Geometry/Basic_Geometry/TRIANGLE_3D.cpp
//##################################################################### // Copyright 2002-2006, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //######...
ALGO
0.989588
5.795527
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2014-04-02T21:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 13, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "1aa1be0...
6f0247a8-c9f7-4c8c-bda1-95a752eb9c74
nishitm/c0de
longest_diameter_in BT.cpp
#include<bits/stdc++.h> using namespace std; struct node { int data; struct node *left; struct node *right; }; struct node* newNode(int data) { struct node* node = (struct node*)malloc(sizeof(struct node)); node->data = data; node->left = NULL; node->right = NULL; return(node); } int max_hei...
ALGO
0.999851
4.525355
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2016-09-20T03:56: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": "fa7175bdb...
6ba6a1e6-605d-43e8-9f2f-c25fcf3fc9de
andersluong/courses
tddd95/minspantree/minspantree.cc
/** * This uses Kruskals algorithm to find the minimum spanning tree. * The time complexity is O(nlogn) where n is the number of edges. This is because of the sorting of the edges * and the main loop which is O(n) multiplied with the union-find operations which is O(logn) = O(nlogn). * The algorithm is pretty simple: s...
ALGO
0.999839
4.772436
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2023-11-26T11:25: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": "39d755220be...
db05aef1-8f2d-4477-822b-8f4931350c8b
JayeshChak/Coding_Activity
2196-create-binary-tree-from-descriptions/2196-create-binary-tree-from-descriptions.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999847
6.72434
{ "github_metadata": { "branch": "main", "commit_count": 295, "repo_created_at": "2024-05-28T15:20:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b44951dc9d...
614acd45-3484-4849-8565-7eea4e35909f
phumipatc/C_Competitive_Programming
IMSO/2563/o51_virus.cpp
/* Author : <NAME>. [MAGCARI] School : RYW Language: C++ Algo : Greedy Status : Finished */ #include<bits/stdc++.h> #define all(x) (x).begin(),(x).end() #define allst(x,y) (x).begin()+y,(x).end() #define decp(x) fixed << setprecision(x) #define MOD (LL )(1e9+7) using namespace std; using LL = long long; using PII ...
ALGO
0.999997
3.721776
{ "github_metadata": { "branch": "master", "commit_count": 203, "repo_created_at": "2019-11-09T11:56:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "485b5dbb...
1640f35f-d87c-4826-9af9-c0f84412e9b3
gupta-gouri/DSApractice
Arrays/Left rotate array by k places/sol2.cpp
class Solution { public: // Function to rotate the array to the left by k positions void rotateArray(vector<int>& nums, int k) { int n = nums.size(); // Size of array k = k % n; // To avoid unnecessary rotations vector<int> temp; // Store first k elements in a t...
ALGO
0.999996
6.502878
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2025-06-20T13:10: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": "d9a025bf487...
96aa8a57-e27a-4d3b-91a0-c9d992825932
yyatsuo/atcoder
abc073/c.cpp
#include <bits/stdc++.h> #define INF INT_MAX #define ll long long #define ull unsigned long long #define rep(i,n) for(ll i=0; i<n; ++i) #define FOR(i, s, e) for(ll i=s; i<e; ++i) #define MOD 1000000007 using namespace std; template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;} temp...
ALGO
0.999933
3.825316
{ "github_metadata": { "branch": "master", "commit_count": 528, "repo_created_at": "2019-04-19T23:13:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1e9a4c6...