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
ab578eb4-62cf-45d3-bc4a-7bea7be755fa
bulletphysics/bullet3
examples/VoronoiFracture/btConvexConvexMprAlgorithm.cpp
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2014 <NAME> https://bulletphysics.org This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to ...
ALGO
0.999519
4.660468
{ "github_metadata": { "branch": "master", "commit_count": 9404, "repo_created_at": "2011-04-12T18:45:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13557, "forks": 2973, "issues": 238, "pull_requests": 141 }, "file_meta": { "content_id"...
cd1076aa-c07b-4fec-b9a8-fa5bc724483b
mehari123/-Competitive-Programming
hacker rank/insertion_sort_one.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); /* * Complete the 'insertionSort1' function below. * * The function accepts following parameters: * 1. INTEGER n * 2. INTEGER_ARRAY arr */ void insertionSort1(i...
ALGO
0.999901
5.80855
{ "github_metadata": { "branch": "main", "commit_count": 1010, "repo_created_at": "2022-04-12T20:36: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": "3ec5e4ebe...
71c29a1f-c0b3-4a69-8352-19a51a0404b5
thufv/Deagle
src/solvers/decision_procedure.h
/*******************************************************************\ Module: Decision Procedure Interface Author: <NAME>, <EMAIL> \*******************************************************************/ /// \file /// Decision Procedure Interface #ifndef CPROVER_SOLVERS_DECISION_PROCEDURE_H #define CPROVER_SOLVERS_DE...
ALGO
0.993944
6.9863
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-12-08T15:26:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 20, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "52a20e13702e...
7cdc802a-1b88-4db5-b0ff-b055aa24acd8
ishandutta2007/codeforces-m
mhq/normal/1494/D.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; const int maxN = 2005; int a[maxN][maxN]; const int maxK = 505 * 505; int c[maxK]; vector<pair<int,int>> edges; int sz; int go(vector<int>& f) { ...
ALGO
0.999702
3.668249
{ "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": "509c2f4e31aa...
1bb7bff5-f161-499b-961e-3b763b4d4ab4
himansurathi/Competitive_Programming
Tech Fest Portal/avoiding_cameras.cpp
#include<bits/stdc++.h> #define ll long long #define l long #define ins(s) scanf("%s",s) #define in(s) scanf("%d",&s) #define inc(s) scanf("%c",&s) #define inl(s) scanf("%ld",&s) #define inll(s) scanf("%lld",&s) #define outs(s) printf("%s\n",s) #define out(s) printf("%d\n",s) #define outc(s) printf("%c\n",s) #define o...
ALGO
0.999935
3.685823
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-10-17T09:13:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c91cb66262...
5e00a04d-9354-4d76-9135-b6896809dff7
danvk/danvk.github.io
wp/wp-content/uploads/2007/boggle5/trie.cc
#include "trie.h" #include <string> #include <fstream> #include <iostream> using namespace std; inline int idx(char x) { return x - 'a'; } const int kQ = 'q'-'a'; void Trie::AddWord(const char* wd) { if (!wd) return; if (!*wd) { is_word_ = true; return; } int c = idx(*wd); if (!StartsWord(c)) children_[c]...
TOOL
0.969102
4.292126
{ "github_metadata": { "branch": "master", "commit_count": 202, "repo_created_at": "2014-10-01T23:02:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "0aa5a84a...
0e4b4297-2bc8-4cab-af40-4de247def13b
dvtdat/cp
cses/1682.cpp
// #include <bits/stdc++.h> using namespace std; typedef pair<int, int> ii; typedef pair<int, ii> iii; typedef long long ll; typedef long double ld; const ll infLL = 2e18 + 7; const int inf = 2e9 + 7; const int maxN = 200010; const ll MOD = 998244353; const double eps = 1e-12; bool visited1[maxN]; bool visited2[m...
ALGO
0.999987
3.992464
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2021-08-19T09:07:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5f5db92bc...
4a33e365-88b4-46b1-9606-14619a942ca1
ishandutta2007/codeforces-h
hollwoq_pelw/normal/1512/B.cpp
/* // is short or still long ??? hollwo_pelw's template(short) // Note : -Dhollwo_pelw_local */ #include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/trie_policy.hpp> // #include <ext/rope> using namespace std; // using namespace __gnu_pbds; // using namespace __gnu_cxx; void FA...
ALGO
0.99991
4.034551
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "9909e37d298f...
ae538765-ce16-476c-8244-7a85f3302f37
barteqx/geo2015
firstorder/formula.h
// Code written by <NAME>, June 2006. #ifndef FIRSTORDER_FORMULA_INCLUDED #define FIRSTORDER_FORMULA_INCLUDED 1 #include "../predicate.h" #include "term.h" namespace firstorder { enum fol_oper { fol_false, fol_true, fol_not, fol_and, fol_or, fol_implies, fol_equiv, fo...
ALGO
0.995268
5.366312
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-03-31T07: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": "5d23043225...
37a03265-2530-43c3-ad26-bb799620b97e
mitsiu-carreno/cpp_tutorial
learncpp_com/6-arr_string_pointer_references/204-quiz/quiz_7/src/main.cpp
;/* a) Alright, challenge time! Let’s write a simplified version of Blackjack. If you’re not already familiar with Blackjack, the Wikipedia article for Blackjack has a summary. Here are the rules for our version of Blackjack: The dealer gets one card to start (in real life, the dealer gets two, but one is face d...
ALGO
0.984955
5.887327
{ "github_metadata": { "branch": "master", "commit_count": 228, "repo_created_at": "2018-07-05T22:57:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12c2baba...
4051f9e5-7321-4757-b66d-2da663686555
jindalshivam09/cppcodes
ACM/subset.cpp
/* Name: Sum-subset problem Copyright: no rights Author: <NAME> Date: 31/07/13 23:52 Description: using DP n following top down approach in O(sum*n) We can solve the problem in Pseudo-polynomial time using Dynamic programming. We create a boolean 2D table subset[][] and fill it in bottom up manner. ...
ALGO
0.999907
3.987076
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-08-21T11:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9d1960bea...
697c2526-751d-400b-b674-a6d75b2d765d
DrZhang818/my-first-project
Problems/Codeforces/Contests/Edu180/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; typedef pair<int,int> PII; typedef unsigned long long ull; const int inf = 1000000000; void solve() { int n; cin >> n; vector<vector<int>> adj(n + 1); for(int i = 1; i < n; i++) { int u, v; cin >> u ...
ALGO
0.999879
5.063032
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-07-05T09:35: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": "0d5cd9f85b4...
3d0fc630-e49f-44b4-82af-c36c71027f78
DebashishSarkarDurjoy/BinaryTrees
NodesAtK.cpp
#include <iostream> #include <queue> using namespace std; class Node { public: int data; Node* left; Node* right; Node(int i) { this->data = i; this->left = NULL; this->right = NULL; } }; Node* buildTree() { int i; cin >> i; if(i == -1) return NULL; Nod...
ALGO
0.999972
4.107964
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2021-12-21T07:48: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": "6661b544b...
63f0b949-1488-41f2-a53d-9698df25aa6a
lacram/study
Baekjoon/save/19236.cpp
#include <iostream> #include <vector> #include <cstring> #include <fstream> #include <algorithm> #include <cmath> #define endl '\n' using namespace std; pair<int,int> board[4][4]; int n; int dx[8] = {-1,-1,0,1,1,1,0,-1}; int dy[8] = {0,-1,-1,-1,0,1,1,1}; int dead[17]; void swap(int x, int y, int nx, int ny){ int t...
ALGO
0.999878
3.516026
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2022-07-03T15:46: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": "f1d9dc718...
9abbafb9-7f33-4dea-9565-134f8966e127
Minggyul/NAVY_algorithm_study
WEEK4/Gihyeon/11403.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <queue> using namespace std; int N; int board[105][105]; void input(){ cin>>N; for(int i = 1 ; i <= N; i++){ for(int j = 1 ; j <= N; j++){ cin>>board[i][j]; } } } bool check[105][105]; void get(int first){ ...
ALGO
0.99997
3.774558
{ "github_metadata": { "branch": "main", "commit_count": 190, "repo_created_at": "2024-05-26T07:07: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": "15973a1079...
4431f646-8bef-4c58-8c9d-5c5ac3b6ac12
raoweijin/cplus
shiftRightorLeft.cpp
//This can implement shift right or left void shiftright(int* data, int offset, int len) { for (int i = 0; i < ((len - offset) / 2); i++) { swapdata(data[i], data[len - offset - i-1]); } for (int i = 0; i < offset / 2; i++) { swapdata(data[i + len - offset], data[len - i-1]); } for (int i = 0; i < len / 2; i+...
ALGO
0.930607
4.033236
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-09-23T00:03: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": "ee947128de...
98961784-9d1e-4f53-8646-f290ef6c8e3b
Laboputer/ProblemSolving
Baekjoon/Codeplus_Advanced_1/2_DivideAndConquer/10816.cpp
#include <stdio.h> #include <algorithm> using namespace std; #define MAXN 500005 int a[MAXN], tmp[MAXN]; int N, M; void SWAP(int i, int j) { int tmp = a[i]; a[i] = a[j]; a[j] = tmp; } void Qsort(int l, int r) { if (l >= r) return; int m = (l + r) / 2; if (l + 2 < r) { if ((a[l] < a[m] && a[m] < a[r]) || (a[r] ...
ALGO
0.999997
4.208776
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2017-08-26T16:16: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": "c2669fa39...
077ba5cb-cde9-4fd8-96e8-c55f60bdb27b
OpenXRay/xray-16
src/Layers/xrRender_R2/SMAP_Allocator.h
#pragma once namespace xray::render::RENDER_NAMESPACE { struct SMAP_Rect { Ivector2 min, max; bool intersect(SMAP_Rect& R) { if (max.x < R.min.x) return false; if (max.y < R.min.y) return false; if (min.x > R.max.x) return false; if (min.y...
TOOL
0.910809
5.851635
{ "github_metadata": { "branch": "dev", "commit_count": 8240, "repo_created_at": "2014-09-05T04:28:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3256, "forks": 472, "issues": 220, "pull_requests": 23 }, "file_meta": { "content_id": "374...
d48f2182-b180-4c82-90fc-c4d8533051d0
wrf-model/WRF
var/da/da_physics/da_trop_wmo.inc
subroutine da_trop_wmo (t, z, p, nlev, tropt, tropp, tropk) !---------------------------------------------------------------------------- ! * Computes tropopause T, P, and/or level based on code from <NAME> ! and WMO definition ! ! * WMO tropopause definition: ! The boundary between the tropo...
TOOL
0.978234
4.773635
{ "github_metadata": { "branch": "master", "commit_count": 6746, "repo_created_at": "2016-08-16T20:39:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1417, "forks": 765, "issues": 161, "pull_requests": 21 }, "file_meta": { "content_id": "...
75481507-8d86-40ec-863e-805924b30744
rbfx/rbfx
Source/ThirdParty/embree/kernels/bvh/node_intersector1.h
// Copyright 2009-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "node_intersector.h" namespace embree { namespace isa { ////////////////////////////////////////////////////////////////////////////////////// // Ray structure used in single-ray traversal //////////...
ALGO
0.966778
6.606869
{ "github_metadata": { "branch": "master", "commit_count": 15508, "repo_created_at": "2016-03-20T15:41:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 933, "forks": 152, "issues": 57, "pull_requests": 37 }, "file_meta": { "content_id": "4...
26c139e6-e96e-4d8c-81bd-1ed1e1cbd977
yubingex007-a11y/llvm
sycl/include/sycl/ext/intel/esimd/memory.hpp
//==-------------- memory.hpp - DPC++ Explicit SIMD API --------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TOOL
0.945646
6.601662
{ "github_metadata": { "branch": "sycl", "commit_count": 512337, "repo_created_at": "2021-04-07T07:45:54.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "intel/llvm", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "...
c9c49c19-719a-47e2-a336-b8ea6d1e8aea
cryscan/to-ihc-2
hopper/forward_dynamics.h
#ifndef RCG_HOPPER_FORWARD_DYNAMICS_H_ #define RCG_HOPPER_FORWARD_DYNAMICS_H_ #include <iit/rbd/rbd.h> #include <iit/rbd/InertiaMatrix.h> #include <iit/rbd/utils.h> #include "declarations.h" #include "transforms.h" #include "inertia_properties.h" #include "link_data_map.h" namespace Hopper { namespace rcg { /**...
ALGO
0.999048
5.597929
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2021-08-18T03:52:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6f7221bb2c0...
641f6c03-885d-40b0-aed0-a8d0571547dc
Vinceyou1/USACO
Other/SumOfXORFunctions/soxf.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<long long> nums(n); for(long long &num: nums) cin >> num; const int MOD = 998244353; // solve this bit by bit long long ans = 0; for(int i = 0; i < 31; ++i){ long long xor_0_count = 1; long lo...
ALGO
0.999979
4.501454
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2023-01-07T03:51: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": "29e901dee4...
397395b3-4b38-4def-9e1f-cba256876183
tmoux/prog-contests
codeforces/1721/E/sol.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; // Template {{{ #define REP(n) for (int _ = 0; _ < (n); _++) #define FOR(i, a, b) for (int i = a; i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) #define FORd(i, a, b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i, a) for (int i = (a)-...
ALGO
0.999928
4.442365
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2018-10-21T03:33:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "203e6630...
f1cbe519-bf24-4453-9d19-410ffd0c01ed
ihzuiyo/Nam1_ki2
ky thuat lap trinh ly thuyet/baitapthuchanh/de8/de8-2.cpp
#include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> typedef struct Dangvien{ char hoten[100]; int namsinh; int namketnap; }; void nhap(Dangvien **dv,int *n){ char filename[] = "input.txt"; FILE *f = fopen(filename, "r"); fscanf(f,"%d ",n); *dv = (Dangvien*)malloc((*n)*sizeof(Dangvien)); for...
ALGO
0.988843
3.181229
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-23T14:44: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": "23336cfd566a...
a6bbe76a-68e6-4af4-9fad-23884c363cd4
Malkeet11/Data_Structures
Puzzles/C Puzzles/Calculate_String_size.cpp
/********************************************************************************************************************************************* Calculate_String_Size.cpp Created on: 03-Mar-2021 Author: <NAME> Find the length of a string without using any loops and string.h in C. Your program is supposed to behave in f...
ALGO
0.996703
4.366752
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2021-02-26T13:37: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": "823beeb29...
b6a1798a-f686-4976-b571-1da47ea25e76
hdh06/CP-code
VOI/VOI17/HIGHWAY.cpp
#include <bits/stdc++.h> using namespace std; #define st first #define nd second #define all(x) x.begin(), x.end() #define pb push_back #define pob pop_back #define pf push_front #define pof pop_front #define mp make_pair #define lb lower_bound #define ub upper_bound typedef long long ll; typedef unsigned long long ...
ALGO
0.999966
4.245632
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-12-23T02:31: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": "ba329a566314...
8d4ea450-ade8-4cc2-8c72-add9507e2646
duchenlong/Cpp
leetcode/同积元组.cpp
class Solution { public: typedef pair<int,int> PII; int tupleSameProduct(vector<int>& nums) { int n = nums.size(); int res = 0; sort(nums.begin(),nums.end()); unordered_map<int,vector<PII> > mp; for(int i = 0; i < n; i++) for(int j =i + 1 ; j < n; j++) ...
ALGO
0.999872
6.226693
{ "github_metadata": { "branch": "master", "commit_count": 1006, "repo_created_at": "2020-03-01T15:16:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 25, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "a26cc...
f4851893-0980-4fe9-9e46-a6fef4250969
ladamalina/leetcode-2022-cpp
1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree (easy)/main.cpp
#include <vector> 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), left(left), right(right) {} }; class Solutio...
ALGO
0.999729
5.886391
{ "github_metadata": { "branch": "master", "commit_count": 837, "repo_created_at": "2022-07-23T05:09: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": "f14e740d...
dd9b506c-5f2c-48fe-aa51-ff2bad41c8cf
sanjiv0286/CP-Daily-Practice-Problems
F_Reversing.cpp
// // GOOD LUCK // // DATE: 18-11-2022 // // TIME: 19-15-53 // #include <bits/stdc++.h> // using namespace std; // #define ll long long // #define sq(a) (a) * (a) // #define f first // #define s second // #define pb push_back // #define mp make_pair // #define forn(i, n) for (int i = 0; i < n; i++) // // #define for...
ALGO
0.999746
5.626957
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-08-06T13:25: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": "499bc8725937...
1b5c526b-981c-4f66-9eb0-4bcde68ce039
hyperk/Geant4
source/4.9.6.p04/source/processes/hadronic/models/cascade/evaporation/src/G4BEHe3Channel.cc
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
TOOL
0.978311
4.138434
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2015-01-26T21:29:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f532a50947...
d5a1c076-db37-493b-ad67-16bbded6830f
tushargandhi77/LeetCode
101.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.999986
6.407511
{ "github_metadata": { "branch": "main", "commit_count": 822, "repo_created_at": "2024-08-11T11:28:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe26c7de27...
71a9e064-06bb-4bcb-8ad9-666d9165f6f8
sid24ss/multi_agent_planner
multi_agent_planner/src/Environment.cpp
#include <multi_agent_planner/Environment.h> #include <multi_agent_planner/OccupancyGridUser.h> #include <multi_agent_planner/StateReps/RobotState.h> #include <multi_agent_planner/Visualizer.h> #include <multi_agent_planner/Constants.h> #include <algorithm> #include <cassert> #define GOAL_STATE 1 using namespace multi...
ALGO
0.997311
4.157448
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2014-08-31T01:06: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": "6cb1dbe16...
e7c675d0-1b7f-46dd-b79a-703f3d5b6095
aiman5abed/SmartRobotCompanion
lib/Movement/Movement.cpp
#include "Movement.h" #include <Arduino.h> #include <algorithm> void rotateLeft(float &bat,int &dir){ dir = (dir+3)%4; bat = max(0.0f, bat - BAT_DRAIN_ROTATE); Serial.println("rotateLeft"); delay(ROTATE_DELAY); } void rotateRight(float &bat,int &dir){ dir = (dir+1)%4; bat = max(0.0f, bat - BAT_DRAIN_ROTAT...
ALGO
0.9854
5.149398
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-06-22T18:44:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fdc229eaf8e8...
3d067923-e7a4-4173-8ddd-44cb9f4eaa79
WizardRyan/CS1410
Book/Chapter 20 Ryan Andersen/Chapter 20 Ryan Andersen/20.12/Source.cpp
// Author: <NAME> // Assignment: Chapter 20 // Instructor: Blair // Class: CS 1410 // Date Written: 5/5/18 // Description: a program for demonstrating use of the stl //I declare that the following source code was written solely by me. //I understand that copying any source code, in whole or in part, // constitutes ch...
TOOL
0.990001
5.356505
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2017-08-29T03:35: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": "9e08f6cc2...
3c985cbc-b1ae-49a3-96a9-bf5e3ffdabaf
Asevenx174/CP-source-code-
02_OJ_solution/Random solve/1 random contest/vc-2/e.cpp
#include<bits/stdc++.h> #define pf printf #define ff first #define ss second #define sef second.first #define ses second.second #define ms(a,b) memset(a, b, sizeof(a)) #define pii pair <int,int> ///%I64d %Lf /// ios::sync_with_stdio(0); cin.tie(0); /// ar.resize(n+10, vector<int>(m+10)); ...
ALGO
0.999958
4.023277
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-12T16:42: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": "69d578852069...
4b27bac9-deb5-4ca7-a2cb-c086980cfe72
vian9/C-Codes
Love Babbar Sheet/Graph/127_wordLadder.cpp
// Link : https://leetcode.com/problems/word-ladder/ // Time Complexity : O() // Approach-> #include <bits/stdc++.h> using namespace std; #define ll long long int int ladderLength(string beginWord, string endWord, vector<string> &wordList) { unordered_set<string> st(wordList.begin(), wordList.end()); st.erase...
ALGO
0.999975
5.793876
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2022-11-05T17:45: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": "eb2dfb1430...
5b072293-15e1-4b4e-abaa-609eecf472b2
Chiki1601/Hackerearth-Solutions
Data Structures/Advanced data structures/Segment trees/Rasta and The Matrix.cpp
#include <bits/stdc++.h> using namespace std; int n, nn; struct Seg* segs; struct Seg { long long o; bool f; int s; Seg() {} void init() { o = 0, f = false, s = 0; } void push(long long w) { return; if(!f) return; f = false; o = w - o; ...
ALGO
0.99991
4.504408
{ "github_metadata": { "branch": "main", "commit_count": 1808, "repo_created_at": "2022-09-09T09:13:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "40a60bc1...
76619a0c-7d51-4c1d-b096-e7d054c7c892
manish-kumar1/LeetCode-Problems
Two Pointers/Add_String.cpp
/* Q. Add String Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string. You must solve the problem without using any built-in library for handling large integers (such as BigInteger). You must also not convert the inputs to integers directly. Example 1: In...
ALGO
0.999995
6.158096
{ "github_metadata": { "branch": "master", "commit_count": 392, "repo_created_at": "2023-10-07T13:28:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75fca591...
a4fc154d-2a0f-4bae-941e-83a7d76cba76
bhavyastar10/Data-stucture-and-algorithm-coursera-specialization
DSA_csr/graphs/week4/3shortest_paths.cpp
#include <iostream> #include <limits> #include <vector> #include <queue> using namespace std; using std::vector; using std::queue; using std::pair; using std::priority_queue; class Comparator { public: int operator() (const pair<int,int>& p1, const pair<int,int>& p2) { return p1.second > p2.secon...
ALGO
0.999884
3.548485
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-08-24T08:47:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b1979eef4...
4abfe69e-61b9-4c1c-b27a-66b0047bfbc0
raincross7/code-similarity
codes/train_code/problem144/problem144_448.cpp
#include <bits/stdc++.h> using namespace std; struct UnionFind { vector<int> data; UnionFind(int size) : data(size, -1) {} bool unite(int x, int y) { x = find(x); y = find(y); if (x != y) { if (data[y] < data[x]) swap(x, y); data[x] += data[y]; data[y] = x; } return x != y; } bool...
ALGO
0.999913
4.549051
{ "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": "d5798b7832c5...
063f4c24-a01e-49ae-a553-16bdc499acda
benj-chen/exercises
adventofcode2019/e1.cpp
#include<vector> #include<map> #include<iostream> #include<string> using namespace std; vector<int> split_delimiter_char(string s, char delim) { vector<int> res; string temp; for (char c: s) { if (c==delim) { res.push_back(stoi(temp)); temp = ""; } else temp+...
ALGO
0.999571
4.35232
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2020-08-04T05:40:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6108bea8...
77f9d22d-5ecc-4536-99b7-c6c1b5fb7ea1
SwimmingLee/ProblemSolving
(C++)ProblemSolving/ProblemSolving/[BOJ_3020]개똥벌레.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int N, H; vector<int> down_line; vector<int> up_line; int bsearch(vector<int>& line, int var) { int start, mid, end; start = 0; end = (N / 2) - 1; int res = -1; while (start <= end) { mid = (start + end) / 2; ...
ALGO
0.999978
3.96494
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2020-03-02T07:40: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": "c2060aa9...
196cba97-a34b-4d0b-a159-6a24128ce1be
sraaphorst/boost-tutorials
graph/dijkstra_userdef.cpp
/** * disjkstra_userdef.cpp * * By <NAME>, 2018. * * Dijksta's shortest path algorithm with user-defined parameters. */ #include <random> #include <array> #include <iostream> #include <string> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/dijkstra_shortest_paths.hpp> #include <boost/graph/name...
ALGO
0.999337
6.403159
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-06-12T01:46: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": "2613a8c0e6...
91f4e2dc-9f25-4240-a0dc-00e4c398b70c
mohamedelkady8/codeforce-solutions
contests/suez canal contest 3/c.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long void _kady() { ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout); #endif } void _solve() { int x , y , z ; ll a...
ALGO
0.999556
3.660984
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-11-17T21:03: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": "34c9fdea426...
723d9cea-a1ec-46b2-a24d-a0c688ac6af0
Seyeber/Past-Projects
Advent6.cpp
#include <iostream> #include <string> #include <vector> #include <fstream> #include <sstream> using namespace std; int main(){ string mystr; ifstream myfile; string temp; string all; int final_score = 1; stringstream in; long long num; vector <long long> time = {}; vector <long lon...
ALGO
0.999801
4.329252
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-26T23:53: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": "f1ef45d75942...
dd2797ff-9eaf-431e-b97f-92861acf7298
MergHQ/CRYENGINE
Code/CryEngine/RenderDll/Common/ShadowUtils.h
// Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved. /*============================================================================= ShadowUtils.h : Revision history: * Created by <NAME> =============================================================================*/ #ifndef __SHADOWUTILS_...
TOOL
0.970555
6.99799
{ "github_metadata": { "branch": "release", "commit_count": 109, "repo_created_at": "2016-05-24T10:10:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 192, "forks": 2085, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "19...
8aec9b89-bb77-4f85-b859-77dc3fc76cbb
gourabs622/DSA
Algorithms/Searching/exponentialSearch.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> /* <NAME> */ using namespace std; typedef long long ll; typedef long double ld; #define PI 3.141592653589793238 #define MP make_pair #define F first #define S second #define PB push_back #define PB...
ALGO
0.999962
4.928976
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2020-10-15T04:31:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e5b399de36...
cef1a700-0fb8-4890-995e-9c2c622c8034
kaladron/galactic-bloodshed
gb/commands/technology.cc
// SPDX-License-Identifier: Apache-2.0 /// \file technology.cc /// \brief increase investment in technological development module; import gblib; import std; module commands; namespace GB::commands { void technology(const command_t &argv, GameObj &g) { player_t Playernum = g.player; governor_t Governor = g.gove...
ALGO
0.975624
5.08753
{ "github_metadata": { "branch": "main", "commit_count": 1592, "repo_created_at": "2014-07-20T16:57:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75df1373...
2a53898e-1213-488f-b157-8e3decdace65
ishandutta2007/codeforces-nonalphabetic
_menhera/normal/698/B.cpp
#include<cstdio> #include<algorithm> #include<vector> using namespace std; int p[202020]; int ansp[202020]; int disj[202020]; bool visit[202020]; int Find(int a) { if (disj[a] == a) return a; else return disj[a] = Find(disj[a]); } void Union(int a, int b) { disj[Find(a)] = Find(b); } int main() { int N; scanf...
ALGO
0.999972
4.039853
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:49: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": "557a7875b33a...
d6be6fe4-744d-4288-9a6a-9499c7eb5ab2
ChangHoon-Kum/SWTestConsole
Prob11_Sol_product.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; #define NUM_MAX 100001 long long tree[4 * NUM_MAX]; long long update(int start, int end, int idx, long long val, int node = 1) { if (idx < start || end < idx) return tree[node]; if (start == end) return tree[node] += val; int mid = (...
ALGO
0.999688
4.543711
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-07-25T03:57:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d8ec50ec5dc...
2a133e19-834b-494b-80fd-ff0246a48442
lessalucass/LP
Lista 09/9.13.cpp
/*9.13 Supondo que a população de um bairro A seja da ordem de 500 habitantes com uma taxa anual de crescimento de 5,2% ao ano e que a população de um bairro B seja de 1500 habitantes com uma taxa anual de crescimento de 1,8 %, escreva um algoritmo que calcule e escreva quantos anos serão necessários para que a populaç...
ALGO
0.999866
4.135267
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2025-03-21T18:57: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": "fb7b608e8ee...
b5c64219-6d0a-4fcf-bf2c-f3c735673338
makin-stuff/CSCI2270---Data-Structures
Assignment 3/Assignment3.cpp
//<NAME>, 06/27/2017 //CSCI2270 - Data Structures, Assignment 3 //This code simulates a communication network using a linked list. Each //node represents a city and a message needs to be sent between them. #include <string> //#include "CommunicationNetwork.hpp" #include <iostream> #include <fstream> using namespace s...
ALGO
0.993684
3.979652
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-01-15T02:35: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": "e56be4ad33...
be419393-c495-4081-ad52-4d2a9d3d3183
whk-2005/DingBa
悼念512汶川大地震遇难同胞——珍惜现在,感恩生活.cpp
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int v[105], w[105], s[105]; int f[105]; int n, m, c; int main() { scanf("%d", &c); while(c--) { scanf("%d%d", &n, &m); for(int i = 1; i <= m; ++i) { scanf("%d%d%d", &v[i], &w[i], &s[i]); } f...
ALGO
0.999978
3.130152
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-11-24T02:57: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": "7e3b08ad0...
06b8f45d-3788-4421-b0de-297c031347d6
AshfaqueSami2/problem-solving
codechef div 4 rating/Problem Reviews.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double dbl; //shortcut #define YES cout << "YES" << endl #define NO cout << "NO" << endl #define Yes cout << "Yes" << endl #define No cout << "No" << endl #define yes cout << "yes" << endl #define no cout << "no" << endl #define minus_one cout...
ALGO
0.999258
3.955768
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-13T11:07: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": "8839819750d3...
2b98fc33-f226-4c12-86d8-afdf01f45470
iaalm/recipes
ACM/USACO/Chapter3/1_1/1_1.cpp
/* ID: simonin1 LANG: C TASK:agrinet */ #include<stdio.h> #include<stdlib.h> #define TRANS(R,L,N) ((R)*(N)+(L)) int Prim(int *table,int num); int main() { int n,i,j,*table; FILE *fp = fopen("agrinet.in","r"); fscanf(fp,"%d",&n); table = (int*) malloc(sizeof(int) * n * n); for(i = 0;i < n;i++) { fgetc(fp); ...
ALGO
0.999977
3.321808
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2015-07-12T02:47: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": "09019a162...
624b07ec-9e74-4653-848e-cdf93c41b91a
Nickz163/ASM_MIET
Lab_6/ex1/main.cpp
//Лабораторная работа 6. //Программирование ветвящихся и циклических алгоритмов // ЗАДАНИЕ 1. /* Вычислите для заданных целых x, y ВАРИАНТ 2 ⎧x, x + y < 4 f(x, y) = ⎨ ⎩y + 2, x + y >= 4 */ #include <iostream> using namespace std; int main() { int f, x=2, y=4, f1; __asm__ __...
ALGO
0.999661
3.628548
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2017-10-10T17:09:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "756596c3f...
a7a9c6df-ae0b-42dd-915e-e3400953650d
cvc5/cvc5
src/theory/quantifiers/lazy_trie.h
/****************************************************************************** * Top contributors (to current version): * <NAME>, <NAME>, <NAME> * * This file is part of the cvc5 project. * * Copyright (c) 2009-2025 by the authors listed in the file AUTHORS * in the top-level source directory and their instit...
ALGO
0.956629
6.084422
{ "github_metadata": { "branch": "main", "commit_count": 13437, "repo_created_at": "2012-12-06T18:45:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1150, "forks": 259, "issues": 116, "pull_requests": 56 }, "file_meta": { "content_id": "2...
3fa52d23-09c6-4b76-8453-8ee099b9919e
MrAyushBajpai/PractiseQues
C++/Basic Examples/Number System/DecimalBinary.cpp
#include <iostream> #include <stack> #include <cmath> using namespace std; // Function to convert decimal to binary string decimalToBinary(int n) { stack<int> binaryStack; // Convert decimal number to binary digits while (n > 0) { int remainder = n % 2; binaryStack.push(remainder); ...
ALGO
0.999474
6.754317
{ "github_metadata": { "branch": "main", "commit_count": 323, "repo_created_at": "2024-06-03T10:06: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": "aa632efa21...
ef38feb9-a4c0-4ed1-9904-65988442cd31
Gnaroshi/practice-algorithm-solvedac
With_Levels/Silver/Silver_4/2578.cpp
// problem: 빙고 // id: 2578 // tag: // time taken: #include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; using ll = long long; usi...
ALGO
0.999432
5.070865
{ "github_metadata": { "branch": "main", "commit_count": 476, "repo_created_at": "2024-03-13T08:59:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab463a54dc...
0fb30b7e-b303-425c-a625-cf0b4d55cfd5
YotaArai/atcoder
abc221/B/main.cpp
#include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <deque> #include <queue> #include <stack> #include <set> #include <map> #include <algorithm> #include <functional> #include <utility> #include <bitset> #include <cmath> #include <cstdlib> #include <ctime> #include <cs...
ALGO
0.999985
4.206521
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2021-05-26T12:01: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": "c53c4041965...
c2a060cd-707c-4a28-9213-34bb85e1f693
akashmurade/temp
miniproject.cpp
#include <iostream> #include <vector> #include <algorithm> #include <mpi.h> #include <chrono> using namespace std; // Partition function for quicksort int partition(vector<int>& arr, int low, int high) { int pivot = arr[high]; int i = (low - 1); for (int j = low; j < high; j++) { if (arr[j] < pivo...
ALGO
0.99999
6.048807
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-05-08T16:03: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": "c74ae9ae0b6...
f7cc216d-8616-45c5-83cb-69f570ca709d
RubayedMunna/VS-Code
Competitive Programming/Data Structure/Suffix Array with hashing.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define N '\n' #define Fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); const ll mod = 1000001011, b = 193; const ll maxn=1e5+10; ll pw[maxn + 2]; void cal(ll n) { p...
ALGO
0.999944
4.443204
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2023-03-25T08:24: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": "f992d2aac61...
9cd30101-34a4-4702-8f35-428a9817915e
mooksys/algorithm
baekjoon/6118.cpp
#include <iostream> #include <cstring> #include <vector> #include <queue> #include <algorithm> #define MAX(a,b)a>b?a:b using namespace std; typedef pair<int,int> pii; int N,M; int visit[20001]; vector<vector<int>> map; vector<vector<int>> ans; int main() { int sol = 0; scanf("%d %d",&N, &M); map.resize(N...
ALGO
0.999962
3.406878
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2019-04-22T02:46: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": "fe3fe5ec...
09642458-48a8-4d32-aec7-e5360e8112e7
kevinjone25/Cpulsplus
binarytree.cpp
#include<bits/stdc++.h> using namespace std; int main(){ map<int, vector<int> > tree; map<int, bool> visit; queue<pair<int, int> > q; int parent, left, right, h = 0, flag = 0, leaf = 0, root = 0, rootFlag = 0; while(cin >> parent >> left >> right){ if(left != 0){ tree[parent].push_back(left); visit[l...
ALGO
0.999834
3.41278
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-11-19T08:41: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": "d3e3ad59d949...
5c30cfe4-d5f5-43a9-88e0-b35d1219e4c2
UKMIITB/DSA-Practice
LinkedList/206_ReverseLL.cpp
// https://leetcode.com/problems/reverse-linked-list/ #include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; int main() { ret...
ALGO
0.999937
6.168058
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2021-08-07T15:03: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": "f15a2fc57a2...
dc4555fb-8213-48fe-a477-8778502067ec
aditya1944/Scaler-Questions
findAreaOfHistogram.cpp
#include<iostream> #include<vector> #include<stack> int solve(const std::vector<int> &vec){ int maxArea = 0; std::stack<int> st; for(int index = 0;index<vec.size();++index){ if(st.empty()){ st.push(index); } else if(vec[index]>=vec[st.top()]){ st.push(index); ...
ALGO
0.999968
5.563834
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2020-06-13T10:46:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1b570e8f...
657a9c81-b72f-46b7-9b42-f9b53b110386
Deoncyberanalyst/Software
C++/Multithreading/Matrix_Multiplication.cpp
#include <iostream> #include <time.h> #include <cstdlib> #include <chrono> #include <omp.h> #include <fstream> using namespace std::chrono; using namespace std; int main() { auto start = high_resolution_clock::now(); int m = 400; int n = 400; int p = 300; srand(time(0)); /* To multi...
ALGO
0.998394
4.242708
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2022-11-09T15:53: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": "3584f21878b...
d5fc8954-027d-4546-b973-57fe14ef534d
Wangxz1205/CPP-Project
project2-Calculator/src/cal.cpp
#include <iostream> #include <string> #include <regex> #include <sstream> #include <math.h> #include <queue> #include <stack> #include "../main.hpp" using namespace std; string cal(string s) { queue<string> inorder; stringstream is(s); string out, c; int count = 1; Database database[20]; while...
ALGO
0.999388
3.93068
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2022-10-16T11:55: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": "69794da4a...
8ca85d5d-9348-4f1c-8cc2-1776db97ef83
ishita41/cpp-codes
recurssion-combinationsum.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: void findSum(int idx, int target, int csum, vector<int>& candidates, vector<vector<int>>& ans, vector<int>& ds) { if (idx == candidates.size()) { if (csum == target) { ans.push_back(ds); ...
ALGO
0.999978
6.763365
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-05-05T13:59: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": "3bfffea93dd...
8c0919eb-9ff6-416d-84ce-9d2fa8b143d9
dimy20/sRenderer
include/mat.h
#pragma once #include "vec.h" #include <cmath> struct Mat4{ double m[4][4]; }; constexpr Mat4 Mat4_id(void){ return (Mat4){{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}}; }; constexpr Mat4 Mat4_scale(const Vec3& s){ Mat4 mat = Mat4_id(); mat.m[0][0] = s.x; mat.m[1][1] = s.y; ma...
TOOL
0.942276
6.49551
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-05-05T13:16: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": "857fc45dadc...
10b7ed5e-1349-43d2-9d7b-193d0f1bd5a4
Squ1rrel-K/PAT-A-CPP
1060/main.cpp
#include <iostream> #include <string> using namespace std; int N; string A, B; struct num { string str; int e = 0; } num1, num2; //去除无意义的0 string removeZeros(string str) { while (str.length() > 0 && str[0] == '0') { str.erase(str.begin()); } return str; } struct num deal(struct num tmp, ...
ALGO
0.999793
3.506373
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-27T07:35: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": "c4b60c6e65...
db88b6e8-2735-42c0-9e04-996886e32dbf
TianHongZXY/Algorithm
POJ/POJ1064.cpp
#include <cstdio> #include <algorithm> #include <cmath> using namespace std; const int maxn = 10000 + 10; double cables[maxn]; int n, k; // int partition(double a[], int lo, int hi){ // 闭区间[lo, hi] // double pivot = a[lo]; // int i = lo, j = hi + 1; // while(true){ // while(a[++i] < pivot) if(i >= ...
ALGO
0.99987
3.700619
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2020-02-16T10:13: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": "ece90f4d0...
855e32b1-bb4b-4d4a-a65f-6b256c7a01c8
AbdulRhmn12/Final-Project-Prolan
Sorting.cpp
void insertionSortString(perpustakaan arr[], int n, int flag){ //flag 1 =judul, falg 2 =penerbit int i, j; string key; for (i = 1; i < n; i++) { if (flag == 1){ key = arr[i].judul_buku; } else if (flag == 2){ key = arr[i].penerbit; } j = i - 1; ...
ALGO
0.99979
3.483039
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2022-12-22T05:08:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "a769032f73b...
070b2c39-3acd-48d3-a918-83ee0d5e93ca
andrewei1316/OJSubmit
DATASOURCE_POJSubmit/2876/2876_20140921-095707_668K_16MS_AC.cpp
/*============================================================================= # Author: <NAME> # Last modified: 2014-09-17 16:56 # Filename: b.cpp # Description: =============================================================================*/ #include <map> #include <ctime> #include <cmath> #include <queue> #inc...
ALGO
0.999899
3.339487
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-11-10T11:17: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": "c587756243...
8a5cad3b-2781-42be-900c-9e558851b56b
staragarcia/DA_T02G06
utils/GetDrivingPath.hpp
#pragma once #include "Graph.h" #include <list> /** * @brief Read the path that leads to a vertex from the vertices * Runs in O(V) time where V is the number of vertices in the graph because the path's length is at most V-1. * * @tparam T template parameter related to the type of vertice * @param destNode Last ...
ALGO
0.99896
5.425945
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2025-03-13T14:25: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": "0f37ac29405...
5956bcc7-1972-45e9-8458-bb9b208631b5
nxg23/Code_course
sap_xep_so_nguyen_to.cpp
#include<bits/stdc++.h> using namespace std ; bool check(int n ){ int sq = sqrt(n) ; if(n < 2) return false ; else if(n > 2){ for(int i = 2; i <= sq; i++){ if(n % i == 0) return false ; } } return true ; } void sapxep(int n, int a[] ) { for(int i = 0; i < n -1; i++){ if(check(a[i])){ f...
ALGO
0.999975
4.211232
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-13T11:00: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": "2fe891d73823...
b10cfd55-58b2-48b8-bbc3-3d2d0160ce1f
nazmulh24/Compitative_Programming
Codeforce/Practice/1200/1793C.cpp
/*********************************************************************** Name --> <NAME> Link --> https://codeforces.com/problemset/problem/1793/C Example--> ***********************************************************************/ #include <bits/stdc++.h> using namespace std; #define int long long #define no cout...
ALGO
0.999578
4.269258
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2024-10-17T05:25: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": "992cd487954...
8513443f-6838-4423-a395-8c4e85f636ad
li924579/ACM
2015暑假集训/DAY-27/X.cpp
// // Created by CQU_CST_WuErli // Copyright (c) 2015 CQU_CST_WuErli. All rights reserved. // // #include<bits/stdc++.h> #include <iostream> #include <cstring> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <string> #include <ctime> #include <vector> #include <list> #include <map> #...
ALGO
0.999753
3.304335
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2016-07-07T06:13: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": "8d47398a4...
5511bf50-ef3d-45c2-a9e2-d7cfa272370e
greatzero728/acade.studio
kattis/(Suma)/(Suma) TL.cpp
#include <bits/stdc++.h> #define y second #define x first using namespace std; using INT = long long; using pii = pair<int, int>; const int NN = 707, MM = NN * NN; int h[NN][NN], v[NN][NN]; int id[NN][NN], nn; pii pos[MM]; int rt[MM], original_rt[MM]; pii updatedIndex[MM * 100]; int mm; int find(int u) { if(rt[...
ALGO
0.999893
3.602574
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-09-19T07:41: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": "e95f025c45e8...
af8beb8f-0b6a-45ee-b460-9f14b06e9e8b
MGKim0001/AlgoReview
정수론 및 조합론/3036.cpp
// 링 // 첫번째 숫자 / 나머지 숫자 를 분수형으로 출력한다 #include <iostream> #include <vector> using namespace std; int gcd(int a, int b) { while(b != 0) { int r = a%b; a = b; b = r; } return a; } int main() { int n; cin >> n; int i; vector<int> vv(n); for(i = 0; i < n; i++) { int e; cin >> e; ...
ALGO
0.999857
4.799574
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-07-02T02:00: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": "ba6a078581a...
36abbcd6-e98f-4bd7-8d5e-28bea043d238
jkschin/hackerspace
hackerrank/swapnodes/swapnodes.cpp
#include <iostream> #include <queue> #include <vector> #include <fstream> using namespace std; typedef vector<vector<int>> vvi; typedef vector<int> vi; class Node { public: int value; Node* parent; Node* left; Node* right; Node() { value = 1; parent = NULL; left = NULL; ...
ALGO
0.999972
4.96872
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2017-03-22T05:10: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": "06a827dbe...
d0f2586b-b43b-4e79-aece-3657ce7c5972
Dhliv/Competitiva
UVA/Level 1/10954 - Add All/Add All.cpp
#include <bits/stdc++.h> #define INF INT_MAX #define MINF INT_MIN #define ll long long #define PB push_back #define PF push_front #define P_F pop_front #define P_B pop_back #define F front #define B back #define f first #define s second #define MP make_pair #define FOR(i, a, b) for(int i = a; i < b; i++) #define FORI(i...
ALGO
0.999871
3.9436
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2020-10-15T03:14:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "652687b1...
96d7ad50-4da9-4863-bca3-0ff85cba8c2a
ishandutta2007/codeforces-g
geothermal/normal/1680/C.cpp
#include "bits/stdc++.h" #pragma GCC optimize ("O3") #pragma GCC target ("sse4") using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<ll>...
ALGO
0.9997
4.453191
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:55: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": "9a07f086f4c5...
6c0c47b6-ac83-43bc-833c-a63130fcc084
electronicarts/CnC_Generals_Zero_Hour
Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cpp
/* ** Command & Conquer Generals(tm) ** Copyright 2025 Electronic Arts Inc. ** ** This program 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, either version 3 of the License, or ** (at your option) any late...
TOOL
0.923792
4.660727
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-08-22T01:39:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4261, "forks": 1411, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e9ddcb...
1845606a-54d7-4a2d-8880-fde1717fae5e
AkshatAggarwal14/Competitive-Programming
AtCoder/ABC238/C.cpp
#ifdef LOCAL // https://github.com/AkshatAggarwal14/Competetive-Programming #include "Akshat.hpp" #else #include "bits/stdc++.h" using namespace std; #define dbg(...) #endif using ll = long long; constexpr auto sz = [](const auto &container) -> ll { return ll(container.size()); }; #define all(x) (x).begin(), (x).end() ...
ALGO
0.999814
5.295445
{ "github_metadata": { "branch": "master", "commit_count": 850, "repo_created_at": "2021-08-16T13:49:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3a1b093...
922e4bb4-3ff4-4acf-9eae-9fb2282a3d1a
BornToDeath/cpp
algorithms/jzoffer(第2版)/JZ57-2_和为s的连续正数序列.cpp
// // Created by lixiaoqing on 2023/3/27. // #include <vector> #include <numeric> #include <iostream> using std::vector; class Solution { public: vector<vector<int>> findContinuousSequence(int target) { /* * 方法1:暴力搜索 * 时间复杂度 O(target * pow(target, 0.5)) , 空间复杂度 O(1) */ // ...
ALGO
0.999826
5.630066
{ "github_metadata": { "branch": "main", "commit_count": 800, "repo_created_at": "2021-10-28T03:47:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "efee86229b...
769fa74d-41fd-4b72-9902-cc690382b0cf
L1SP/Figure
main.cpp
#include <iostream> #include "Circle.h" #include "Rectangle.h" #include "Trapezium.h" #include "Figure.h" #include <Windows.h> using namespace std; int main() { SetConsoleOutputCP(1251); Figure* c = new Circle; Figure* r = new Rect; Figure* t = new Trapezium; cout << "Введите радиус окружности:\n"; cin >> *c; c...
TOOL
0.983066
3.108603
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-12-06T15:04: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": "b402c594cc4f...
3a6fe16f-b79e-40e7-bc88-7931da866c26
zaki-joho/ProconLibrary
String/rolling_hash_2d.hpp
#include "../bits/stdc++.h" // verified: http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=3385218 // 複数 hash の方がいいかも template <typename T> class RollingHash2D { int h, w; static const uint64_t b1 = 9973, b2 = 100000007; // (1000000007, 1000000009) std::vector<uint64_t> rh, rw; std::vector<std::vector<uint6...
ALGO
0.997888
5.091215
{ "github_metadata": { "branch": "master", "commit_count": 259, "repo_created_at": "2019-02-12T11:52:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65d55c8d...
653fc20c-8e82-416b-b64f-b0505a429935
yukinoto/luogu
code/p7518-2.cpp
#include <iostream> #include <cstring> #include <vector> #include <algorithm> #include <cstdlib> using namespace std; template<typename Int> class stlt{ private: class node{ public: Int value; node *lc,*rc; bool up_to_date; virtual ~node() { if(up_to_date) { delete lc;delete ...
ALGO
0.999996
3.881254
{ "github_metadata": { "branch": "master", "commit_count": 462, "repo_created_at": "2020-10-25T12:49: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": "d0e45c91...
fa1fec9b-0faf-43b0-b1b2-cbc4ba8c3d73
hyj765/Backjoon
프로그래머스/lv2/12978. 배달/배달.cpp
#include <iostream> #include <vector> #include<queue> using namespace std; int solv(vector<vector<pair<int,int>>>& table,int n, int limit){ vector<bool> visit(n+1,false); vector<int> dist(n+1,99999999); priority_queue<pair<int,int>> qt; qt.push({0,1}); dist[1] = 0; while(!qt.empty()){ ...
ALGO
0.999943
4.783129
{ "github_metadata": { "branch": "main", "commit_count": 239, "repo_created_at": "2022-03-19T04:17: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": "08117e8567...
cd99a987-ebb1-459f-93f5-1a6e6b4dfce0
sealj553/VexV5Doom
include/okapi/api/filter/ekfFilter.hpp
/** * @author <NAME>, WPI * * 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.0/. */ #pragma once #include "okapi/api/filter/filter.hpp" #include "okapi/api/util/mathUt...
ALGO
0.959535
7.385146
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2018-10-14T21:00:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 75, "forks": 12, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "6784e9d...
5d0aa80b-ed52-4cde-a354-f24c23ac281c
adityax10/ProgrammingCodes
Algos Practice/LCS of 3 strings_using suffix trees.cpp
//Suffix array Implementation // n log(n)*log(n) approach for building suffix array #include<iostream> #include<vector> #include<utility> #include<limits.h> #include<string> #include<map> #include<algorithm> using namespace std; struct entry { int er[2]; // er[0] => sort index of the suffix entry | er[1]=> sort inde...
ALGO
0.999678
3.897908
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-02-01T17:16: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": "4549cbf6d2...
00d31a61-68ec-48dc-b571-70a201efd64f
Ankit8607/algozenith-training
trie/Subarrays with xor less than k.cpp
// https://www.learning.algozenith.com/problems/Subarrays-with-xor-less-than-k-393 /* Description Given an array of positive integers you have to print the number of subarrays whose XOR is less than K. Subarrays are defined as a sequence of continuous elements Ai, Ai+1, ..., Aj . XOR of a subarray is defined as Ai ^...
ALGO
0.998755
5.21285
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2022-10-04T08:36:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7e737f99f...
f439b330-ab50-4fe4-96f8-2966d5298f51
itcd/leetcode
recursion-ii/Sort-an-Array/Sort-an-Array.cpp
class Solution { public: int partition (vector<int>& arr, int low, int high) { int pivot = arr[high]; // pivot int i = (low - 1); // Index of smaller element for (int j = low; j <= high - 1; j++) { // If current element is smaller than the pivot if (...
ALGO
0.999983
6.188025
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-06-21T07:24: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": "a071ff9b9...
a64ed790-05cb-4c00-92bd-98719d22ff14
kangkyunghyun/OOP-archive
Lab/Lab13/applied/5.cpp
#include <iostream> using namespace std; template <typename T> class Queue { private: T *p_list; // 정수형 변수들을 가지는 배열 int size; //현재 저장된 변수들의 개수 int MAX_SIZE; // 최대로 저장할 수 있는 p_list의 크기 public: Queue(int _MAX_SIZE = 1000) { p_list = new T[_MAX_SIZE]; this->size = 0; this->MAX_SIZE = _MAX_SIZE;...
ALGO
0.976191
3.850079
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-12-13T18:24: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": "fe31e30a8c...
b68d0189-97ff-4ae6-bffd-b6769222cb71
growinghsb/cpp_study
Algorithem/HomewordList.cpp
#include <iostream> #include <cassert> /* 구현해야 하는 기능 PushFront(); PushBack(); PopFront(); PopBack(); */ struct Node { int data; Node* nextNode; Node* prevNode; }; struct List { Node* headNode; Node* tailNode; int count; }; void PushFront(List* list, int data) { Node* newNode = new Node; newNode->data ...
ALGO
0.988111
5.063202
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2021-10-07T02:22:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b782395a...
7c902c45-0336-4fae-b0ab-075c59ce9d36
joonable/BaekJoonAlgorithms
pro1931.h
// // Created by <NAME> on 22/07/2017. // #ifndef BAEKJOONALGORITHMS_PRO1931_H #define BAEKJOONALGORITHMS_PRO1931_H #include <iostream> #include <vector> #include <algorithm> using namespace std; bool CompareByFirst( const pair<int, int>& i, const pair<int, int>& j){ return i.first < j.first; } bool CompareBy...
ALGO
0.999977
4.72168
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2017-07-02T07:26: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": "af5b55e7c...
53a4e5bf-a37d-44d1-bbe7-520b924abe21
snl-dakota/dakota-packages
acro/tpl/momhlib/MOMHLib/MOMSLS/momsls.h
/* Multiple Objective MetaHeuristics Library in C++ MOMHLib++ Copyright (C) 2001 <NAME> 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 (www.gnu.org); either version 2.1 of the License, or (at...
ALGO
0.99908
6.323571
{ "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": "5723a89280...
82943033-0811-45f3-8015-261289fa2e0a
yamate11/compprog
zAsa/y2024/1104/1/foo.cc
#include <bits/stdc++.h> #include <cassert> using namespace std; using ll = long long int; using u64 = unsigned long long; using pll = pair<ll, ll>; // #include <atcoder/all> // using namespace atcoder; #define REP(i, a, b) for (ll i = (a); i < (b); i++) #define REPrev(i, a, b) for (ll i = (a); i >= (b); i--) #define A...
ALGO
0.999422
3.469556
{ "github_metadata": { "branch": "main", "commit_count": 219, "repo_created_at": "2021-03-11T06:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d64e099cd...