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
23cee31e-6390-46e9-a325-f42a1db0c9a2
MKLOL/Notebook
Data Structures/classUnionFind.cpp
class UnionFind { public: vector<int> par; vector<int> h; int size; // Constructor UnionFind(int size) : size(size) { par.resize(size); h.resize(size, 1); for (int i = 0; i < size; ++i) { par[i] = i; } } // Find operation with path compression int find(int x) { int R = x, y; ...
ALGO
0.999643
5.723829
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2019-07-17T05:45:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ecd94bc8...
bcf0077f-fca3-46b5-b993-2389879d00a9
brkpplr/school_bhcc
2019_03Fall_CSC237_Intermediate_C++/extra notes/BinaryTreeTest/BinaryTreeTest/IntegerNumberBinaryTree.cpp
// // IntegerNumberBinaryTree.cpp // BinaryTreeTest // // Created by <NAME> on 12/11/19. // Copyright © 2019 <NAME>. All rights reserved. // #include "IntegerNumberBinaryTree.hpp" #include <iostream> #include <string> using namespace std; void IntegerNumberBinaryTree::createNode() { binaryTree *newNode; ...
ALGO
0.9865
5.042987
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2021-02-25T18:04: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": "afcce59746...
9127b37c-fd47-4364-b512-bd55a1708ed0
ishandutta2007/codeforces-i
ivan100sic/normal/635/E.cpp
// this is my code from vjudge #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; map<int, basic_string<int>> dodaj, izbaci; int n, l, w; int j = 0; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cerr.t...
ALGO
0.99991
3.797825
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "088663433bd0...
1b5bfff5-0046-4c29-b5f6-07100721d174
dealii/dealii
include/deal.II/base/utilities.h
// ------------------------------------------------------------------------ // // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2005 - 2025 by the deal.II authors // // This file is part of the deal.II library. // // Part of the source code is dual licensed under Apache-2.0 WITH // LLVM-exception OR LGPL-...
TOOL
0.929947
6.223922
{ "github_metadata": { "branch": "master", "commit_count": 65304, "repo_created_at": "2014-07-17T14:00:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1530, "forks": 789, "issues": 533, "pull_requests": 92 }, "file_meta": { "content_id": ...
55d6214e-fad4-4129-b5d1-7d74d03dcb66
keanu-a/CS302
assignment1/Assignment01.cpp
// <NAME> // CS 302 - Review from CS 202 using Linked List // Bubble Sort of a double linked list #include <iostream> #include <fstream> #include <string> #include <vector> #include "linked_list.h" int main() { std::string file; // Get file name from user std::cout << "Enter file with list: "; std::...
ALGO
0.997297
4.628865
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2022-02-11T20:01:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff35c1b58ba...
eb9f8816-d341-43d0-b28d-79f2a9203d4d
belous-dp/ct-discrete-mathematics
semester1/lab1-logic/G.cpp
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stdio.h> #include <string> #include <unorde...
ALGO
0.999953
4.657193
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-02-22T20:10: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": "e4a315d5e576...
fb430802-5cd2-447a-9fe3-c4f43d3b9555
abed23/nxxp
position.cpp
/* * position.cpp * * Contains functions reponsible for position detection * */ //bool checkWidthNeg() { // uint16_t line(0); // if (posEdgeIndex[posEdges-1] > 0 ) // line = posEdgeIndex[posEdges-1] - negEdgeIndex[negEdges-1]; // else // line = CAM_DATA_LEN - negEdgeIndex[negEdges-1]; // // return (line >=...
ALGO
0.979901
4.080286
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-01-15T22:07: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": "00484f2f90...
8bbf135b-75e6-41e7-91de-b870aebce775
MUCTR-IKT-CPP/LapyninVV_36
6/main.cpp
#include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include <algorithm> #include <queue> #include <cmath> #include <string> #include <map> using namespace std; // Constants const int WARRIOR_HEALTH = 150; const int ARCHER_HEALTH = 100; const int MAGE_HEALTH = 80; const int MIN_ARMOR = 1; const ...
TOOL
0.993409
4.209765
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2024-09-03T10:16:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e5565a884...
54f4be53-cf0a-4f06-b14a-b12a13f0df69
richa18b/Competitive_Coding
GeeksForGeeks/C Arrays/Find the two numbers with odd occurrences in an unsorted array.cpp
/* Find the two numbers with odd occurrences in an unsorted array [May 24, 2012] */ #include<bits/stdc++.h> using namespace std; int convertToBinary(unsigned int n) { if (n / 2 != 0) convertToBinary(n / 2); return n%2; } void find2OddOccurrences(int a[],int n) { unsigned int res=...
ALGO
0.999838
3.847024
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-11-15T10:05: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": "f5ae6ba01f...
0515aed7-2276-4458-a04d-31e0a0675815
ishandutta2007/codeforces-t
thescrasse/normal/1293/A.cpp
#include <bits/stdc++.h> using namespace std; long long N, i, j, k, n, s, x, res; map<long long, long long> closed; int main() { ios::sync_with_stdio(0); cin.tie(0); //ifstream cin("input.txt"); //ofstream cout("output.txt"); cin >> N; for (i = 0; i < N; i++) { closed.clear(); cin >> n >> s >> k; ...
ALGO
0.99979
3.47704
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "e303c2c8e8b4...
a1819c46-de82-49c7-bf9d-a1c6ee529f3f
JoHoYoung/Algorithm
BackJoon's Problem/이상한토너먼트(유니온파인드실패).cpp
#include<iostream> #include<cstring> #include<vector> #include<set> #include<algorithm> #include<cmath> #include<queue> using namespace std; using ll = long long; using P = pair<int, int>; const int INF = 987654321; int N; int board[500]; vector<P> el; // 실력차 : 지루함의 정도 // 실력차가 최소가 되도록 대진표 bool visited[600]; int p[5...
ALGO
0.999961
3.52635
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2018-05-22T11:42:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "25aa4a93...
8d25fe84-0bea-4949-acd8-c852825833bd
nnard1616/OSSU
Core_Theory/Algorithms_Illuminated/CPP/old_datastructures/unionFind.hpp
/* * The MIT License * * Copyright 2018 <NAME>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, ...
ALGO
0.980928
6.052005
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2017-10-19T19:56: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": "80a0fe99c...
dcd08b5e-4a2a-4b43-a236-1a117a1207de
caiwaifung/algo
tc/src/SlimeXGrandSlimeAuto.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <cstring> #include <cstdlib> #include <string> #include <vector> #include <queue> #include <cmath> #include <set> #include <map> using namespace std; #define forint(i, a, b) for(int i=int(a); i<=int(b); ++i) #define forintdown(i, a, b) for(int i=int(...
ALGO
0.999496
4.27824
{ "github_metadata": { "branch": "master", "commit_count": 608, "repo_created_at": "2015-05-10T11:28:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e73266de...
11ddc48b-bfee-49d3-a85e-d8ab1d70bb95
Kristiyan025/Cpp
NOI/1-st Round/A/2020/fractions/fractions.cpp
#pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #include<bits/stdc++.h> using namespace std; using ll = long long; const int maxN = 1e6 + 1; int n; int lp[maxN]; int pr[78498]; int prSz = 0; int phi[maxN]; void lin_sieve() { phi[1] = 1; int i, j, p, f, k; for(i = 2; i < ...
ALGO
0.999957
4.796774
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-01-18T01:15:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33ba570a6390...
b4304a05-5f3e-4dfb-a694-81ea81386c23
Joshua-Wang/leetcode
PalindromePartitioning2.cpp
/*************************************************************************** * * Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved * **************************************************************************/ /** * @file PalindromePartitioning2.cpp * @author wangzhengkang(<EMAIL>) * @date 2016/05/01...
ALGO
0.999972
5.298586
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-06-17T12:53:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae3325494b...
c20862d7-d7cb-4517-93c7-45054087eae4
Maxim0/Parse
main.cpp
#include <iostream> #include <math.h> #include <fstream> #include <string> #include <map> #include <vector> using namespace std; class Parse { map<char,int> variables; vector<string> text; int count = 0; char* str; public: Parse(char* s):str(s){} int stringToNumber(string& str); void signEqual(string& str); ...
TOOL
0.994342
3.50027
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-04-30T17:49: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": "637e14bc16...
0881f8e3-1e88-40bb-81db-4f193e37daec
thiruvarul1729/Centrality-measures-in-Dynamic-Graphs
static_final.cpp
#include<iostream> #include<string> #include<algorithm> #include<math.h> #include<limits> #include<vector> #include<set> #include<unordered_set> #include<unordered_map> #include<map> #include <queue> using namespace std; class Graph { private: int numVertices; vector < vector < int >> E; public: Graph(int ...
ALGO
0.999868
3.841867
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-06-30T06:09: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": "8097654faa4f...
bb50857b-30e7-4def-8120-b47e17f00e48
UBTECH-Walker/WalkerSimulationFor2020WAIC
walker_WAIC_16.04_v1.2_20200616/ubt_sim_ws/src/example/include/kinematic/kinematics.h
// Copyright 2012-2020 Ubtech Robotics Corp. Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable ...
ALGO
0.951009
4.917144
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-06-03T04:46:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e55e14f40...
357b1e07-ecc7-40fb-a9ed-94006ee85ddf
ChangeZ24/PAT
PAT Advanced Level/A1103/A1103.cpp
#include<cstdio> #include<cstdlib> #include<string> #include<map> #include<set> #include<vector> #include<iostream> #include<algorithm> using namespace std; int N, K, P, maxFacSum = -1; vector<int>fac; vector<int>temp, ans; int power(int x) { int a = 1; for (int i = 0;i < P;i++) a *= x; return a; } void init() ...
ALGO
0.999473
3.864771
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2017-04-20T07: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": "546397ee...
1caaf71c-87e1-4e1c-8b2c-f97b1f70e697
satyajeet-rajupali/DSA_Sheet_By_Love_Babbar_Solutions
Tree/Question8.cpp
#include <bits/stdc++.h> using namespace std; struct Node { Node *left, *right; int value; }; Node *createTree() { Node *root = new Node; int x; cout << "Enter root node:\n"; cin >> x; root->value = x; root->left = nullptr; root->right = nullptr; queue<Node *> q; q.emplace...
ALGO
0.999951
4.905789
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2021-05-05T03:04:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a3fd0cc4...
07c9d5d9-e9e5-4795-843f-f1d71c875a49
HangKeon/BaekJoon
BaekJoon/BaekJoon/2156(포도주 시식).cpp
#include <iostream> #include <algorithm> using namespace std; int dp[10001]; //포도주의 누적 합의 최댓값 int arr[10001]; //포도주의 양 int main() { int n; //포도주 잔의 개수 cin >> n; for (int i = 1; i <= n; i++) cin >> arr[i]; dp[1] = arr[1]; dp[2] = arr[1] + arr[2]; for (int i = 3...
ALGO
0.999987
3.886107
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-12-27T07:37:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c1e9f460...
cb7c8d1f-0d01-4a33-8509-19416c81023f
mag1c-h/algorithm
cc/068.cc
#include <iostream> #include <vector> #include <ctime> #include <random> /** * 随机产生待排序数组 * */ std::vector<int> random_data(const int &num_count) { std::default_random_engine engine(time(NULL)); std::uniform_int_distribution<int> distribution(0, 9); std::vector<int> vct(num_count); for (auto i = 0; i ...
ALGO
0.999965
5.216421
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2017-03-10T12:15:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad31e9b4...
a51d11bb-7045-4720-b9a5-3a74ba1bccaa
bobolee1239/mobileRobot
a_star_simulation/src/nav.cpp
// Copyright (c) 2019 <NAME>, <NAME> /*************************************************************** ** ---------------- Mobile Vehicle Control ------------------- ** AUTHOR : <NAME>, <NAME> ** DESCRIPTION : Revised from Dynamic Systems n Control Lab ** ---------------------------------------------------...
TOOL
0.993186
4.040265
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2019-02-27T08:55:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "0f5ee855b...
9273981b-874d-4a43-8ddf-3be9c036a942
pytorch/pytorch
torch/csrc/api/src/optim/lbfgs.cpp
#include <torch/optim/lbfgs.h> #include <torch/csrc/autograd/generated/variable_factories.h> #include <torch/csrc/autograd/variable.h> #include <torch/serialize/archive.h> #include <torch/utils.h> #include <ATen/ATen.h> #include <c10/util/irange.h> #include <algorithm> #include <cmath> #include <functional> #include...
ALGO
0.995585
7.574838
{ "github_metadata": { "branch": "main", "commit_count": 90499, "repo_created_at": "2016-08-13T05:26:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 91573, "forks": 24684, "issues": 5000, "pull_requests": 1303 }, "file_meta": { "content_i...
45d9cf7c-38c7-41eb-ac0d-64405b415131
mongodb/mongo
src/third_party/boost/libs/math/include/boost/math/special_functions/expint.hpp
// Copyright <NAME> 2007. // Copyright <NAME> 2024. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_EXPINT_HPP #define BOOST_MATH_EXPINT_HPP #ifdef _MSC_V...
ALGO
0.900338
4.87122
{ "github_metadata": { "branch": "master", "commit_count": 90314, "repo_created_at": "2009-01-15T16:15:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27329, "forks": 5655, "issues": 0, "pull_requests": 82 }, "file_meta": { "content_id": ...
2ffd0849-be85-4ea9-af5f-2208f913861c
SatyamR196/CP_Algo_Codes
Trees/Tree_diameter.cpp
//# //! FINDING TREE DIAMETER USING 2 DFS METHOD //? Pick a random node, do dfs, get the farthest node that will be one end of diameter //? then from that end again repeat the process then this time you will get other end also. //# ...
ALGO
0.999871
4.768381
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2024-10-13T06:42:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9d4fdad80...
51affadb-6a5c-47a3-9dd6-294627a5a6e3
mgeorgoulopoulos/gencut
src/app/GenomeCutter.h
#ifndef __GENOME_CUTTER_H__ #define __GENOME_CUTTER_H__ #include "GeneCollections.h" #include "GeneSignal.h" #include <vector> class GenomeModel; class GenomeCutter { public: struct Options { // Radius of the sampling sphere, in model space. double sphereRadius = 15.0; // Threshold to disregard mostly e...
ALGO
0.993309
7.140398
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-02-20T09:00:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b88e4ebe10d...
a1d3dc60-6e04-4371-824f-9420ccb25251
Muhammadali0981/DsaFall24
Labs/Lab02/q01.cpp
/* Name:<NAME> Date:26/08/24 Desc: jagged arrays */ #include <iostream> using namespace std; int main(){ int rows = 5; int size = 0; int arr[5] = {0, 0, 0, 0, 0}; int** jaggedArray = new int* [rows]; for(int i = 0; i < rows; i++) { cout << "enter size of array...
ALGO
0.989807
4.050757
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2024-08-19T04:00: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": "9da40c1b92b...
cb7255b7-8a90-445f-b480-b220885a6e51
MarziehLenjani/InSituBench
Kernels/SaxpyCUBLAS/SaxpyCUBLAS.cpp
//////////////////////////////////////////////////////////////////////////// // // Copyright 1993-2015 NVIDIA Corporation. All rights reserved. // // Please refer to the NVIDIA end user license agreement (EULA) associated // with this source code for terms and conditions that govern your use of // this software. Any u...
ALGO
0.995307
5.443647
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-12-21T12:16:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34dd56ce66...
a23d4e0e-f264-404b-a887-489f7074c87a
troytan91/ACM
FZU/第三届福建省大学生程序设计竞赛/c.cpp
/* * Author: Troy * Created Time: 2012/12/2 15:11:57 * File Name: c.cpp */ #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <time.h> #includ...
ALGO
0.999898
3.588664
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-03-01T03:09: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": "f384aa122d...
c73968fb-2f84-4825-adfc-6b07b2e2c237
djeada/Algorithms-And-Data-Structures
src/dynamic_programming/cpp/count_construct/src/count_construct.cpp
#include "count_construct.h" #include <functional> #include <unordered_map> int countConstructBasic(const std::string &target, const std::vector<std::string> &wordBank) { if (target.empty()) return 1; int totalCount = 0; for (const auto &word : wordBank) { if (target.size() >= ...
ALGO
0.996019
6.46372
{ "github_metadata": { "branch": "master", "commit_count": 511, "repo_created_at": "2020-05-16T14:25:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 375, "forks": 59, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad6b7...
0c4e2667-7c22-4474-aa8c-2b0bd2312d79
ossimlabs/ossim
src/imaging/ossimEdgeFilter.cpp
//******************************************************************* // Copyright (C) 2000 ImageLinks Inc. // // License: LGPL // // See LICENSE.txt file in the top level directory for more details. // // Author: <NAME> // //******************************************************************* // $Id: ossimEdgeFilter...
TOOL
0.985066
7.037374
{ "github_metadata": { "branch": "dev", "commit_count": 2437, "repo_created_at": "2015-09-02T20:20:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 321, "forks": 141, "issues": 33, "pull_requests": 1 }, "file_meta": { "content_id": "a28300...
34dffc83-b07e-4be6-a425-2e2822245b5e
ftiasch/problem-setting-public
2018-hunan/range-query/solution.cpp
#include <bits/stdc++.h> const int MAX_LEN = 3; struct Fenwick { Fenwick(int n) : n(n), count(n) { } void add(int l, int r) { add_(l, 1); add_(r, -1); } int ask(int l) { int res = 0; for (; l >= 0; l -= ~l & l + 1) { res += count.at...
ALGO
0.999945
4.527471
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-08-15T12:29:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19cc44974...
96e48a05-88a3-4ea6-b3d5-d2e6fca5820a
MAPF-Competition/Code-Archive
2024 Competition/Team_johannesGG/f6f115df1f16b6958cd536ca84e599a4f149fd34/third_party_libraries/or-tools/include/ortools/graph/dag_shortest_path.h
// Copyright 2010-2024 Google LLC // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
ALGO
0.999852
5.833944
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2024-01-13T03:41:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33f5194b5...
f7694d28-0163-49e9-b348-63a59a89b133
CHEN-Chensheng/Lamp_controller
rdl_ws/src/book_tracker/src/opencv_test.cpp
#include <cv.h> #include <highgui.h> #include <opencv2/core/core.hpp> //#include "opencv2/opencv.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> using namespace cv; using namespace std; int main(int, char**) { VideoCapture cap(1); // open the default camera if(!cap.isOpened()) // check if we...
ALGO
0.915591
4.681073
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-03-15T09:18: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": "9a89e5ddd3...
87a0d653-2eeb-4d47-bc12-463621e12e85
jagrat-khatter/Codeforces
1000 level/Keep_it_beautiful.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; signed main() { ios::sync_with_stdio(false); cin.tie(NULL); ll t; cin >> t; while(t--) { ll n,fg=0; cin >> n; vector<ll> v; string fst; for(ll i=0;i<n;i++) { ll x; cin >> x; ...
ALGO
0.999936
3.959363
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2025-04-29T10:22:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09f38d0f8...
1b4046a1-e648-4c2e-88a1-6be2bf5f6659
ndkaur/leetcode
2543.Check-if-Point-Is-Reachable.cpp
#include "bits/stdc++.h" using namespace std; // #include "Tree.h" #define deb(x) cout<<x<<endl; const int inf = 1e9; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<string> vs; typedef vector<bool> vb; typedef pair<int,int> pii; //#include "LinkedList.h" void print(vi &out){ for(auto x: ou...
ALGO
0.999831
4.26637
{ "github_metadata": { "branch": "master", "commit_count": 438, "repo_created_at": "2020-06-06T16:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "808927b2...
180ca7db-7242-45ae-bdea-024a5f83640e
Sharknevercries/Online-Judge
UVA/Volume CI/10154 Weights and Measures.cpp
/* 15384717 10154 Weights and Measures Accepted C++ 0.045 2015-04-25 17:06:36 */ #include<bits\stdc++.h> using namespace std; struct Turtle{ int w, c; }; Turtle T[10005]; bool cmp(Turtle A, Turtle B){ return A.c < B.c ; } int main(){ freopen("input.txt", "r", stdin); int n = 1; while (scanf("%d%d", &T[n].w, &T[n...
ALGO
0.999962
3.558504
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-08-03T15:45:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26ba5cf...
51ae956d-ca4f-4069-948b-7b60634f0db8
EmptyCityJK/daily_problem
图论/公平对局.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; inline void solve() { int n; cin >> n; vector<vector<char>> g(n + 5, vector<char>(n + 5)); for(int i=1; i<=n; i++) { for(int j=1; j<=n; j++) { cin >> g[i][j]; } } int dx[4] =...
ALGO
0.999948
4.082286
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2025-03-04T03:10:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2be41919ac9...
96a72bb9-464e-4fa9-ab4e-368e736f7fe3
Jeremy2408/LibrarySystem
ads2_assign1.c/LinkedList.cpp
/**************************************************************/ /* */ /* Program to demonstrate the implmentation of a simple */ /* linked list of letters with a delete option. */ /* */ /...
ALGO
0.998277
4.331865
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-09-21T13:21: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": "c44b068a71...
2a673547-b7f4-4c14-b953-351505fa0b74
fyshg/competitive-programming
Woche6/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int t; cin >> t; for (int q = 0; q < t; q++) { ll d, c, penalty; cin >> d >> c >> penalty; ll cart[d*(c+1)]; ll bike[d*(c+1)]; for (int i = 0; i < d*(c+1); i++) { ll in; cin >> in; if( i == 0 ) cart[i]= in; ...
ALGO
0.999873
3.433448
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-07-01T13:25: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": "d460bbf3c26c...
dc872cb3-09b6-4829-898c-cd92cddc2314
finch185277/leetcode
001-025/013.cpp
class Solution { public: int romanToInt(string s) { int ret = 0; s.push_back('I'); // for single word and i from 0 to len-1 for (int i = 0; i < s.size() - 1; i++) { if (s[i] == 'I' && s[i + 1] == 'V') { ret += 4; i++; } else if (s[i] == 'I' && s[i + 1] == 'X') { ret += ...
ALGO
0.999177
5.692221
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2018-04-10T09:18:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd0920e0...
f7a00285-2626-4f3a-a04d-bc596741c384
LarIsCoding/competitive-programming
study/summer-school/day-6/f.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> ii; typedef vector<int> vi; typedef long long int ll; #define mp(i, j) make_pair(i, j) #define f first #define s second const int inf = (int)1e9; const ll mod = (ll)1e9 + 7; const ll linf = (ll)1e17; #define EPS 1e-9 void dbg_out() {cerr << endl; ...
ALGO
0.99999
3.645251
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2022-10-18T23:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ab272d5b1...
d25a5d7a-5d15-4ff6-b538-2b0aa483e3a3
Hema-Nath-Reddy/Stack-using-arrays-in-c-
Stack Using Array.cpp
#include<iostream> using namespace std; class stack{ int size=0; int top=-1; bool isFull(){ if(top==size-1){ return true; } return false; } bool isEmpty(){ if(top==-1){ return true; } return false; } public: stack(int s){ size=s; } void push(int arr[]){ if(isFull()){ cout<<"Th...
ALGO
0.984639
4.239305
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-23T11:44: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": "862e7e5f8767...
04645ce2-7376-4328-8175-3ff73ed61ac8
thebaubau/advent-of-code-2024
DayOne.h
#pragma once #include <algorithm> #include <fstream> #include <iostream> #include <string> #include <unordered_map> #include <vector> class DayOne { private: std::string word; std::ifstream stream; std::vector<int> first, second; unsigned int total{ 0 }; unsigned int totalTwo{ 0 }; unsigned int totalTwoTwo{ 0 }...
ALGO
0.998518
5.495463
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-12-02T22:37: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": "e49d8b13da21...
b43b3555-6f3a-4a7b-b398-ddcda0c53639
FelixKimmerle/Informatik-II
Blatt3/3_1_alternative.cpp
#include <iostream> int main(int argc, char **argv) { int n; std::cout << "Geben sie n ein: "; std::cin >> n; std::cout << "--=== a) ===--" << std::endl; std::cout << std::string(n, 'X') << std::endl; std::cout << "--=== b) ===--" << std::endl; for (int i = 0; i < n; i++) { st...
ALGO
0.989011
4.55149
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-06-19T14:41: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": "00131be56...
34a61312-fe06-4e7c-b7e7-200af3246bac
megait004/28tech-oj
set_map/setbasic5.cpp
#include <iostream> #include <vector> #include <set> #include <map> using namespace std; int main() { int n, m; cin >> n >> m; // Nhập số phần tử của mảng A và mảng B vector<int> A(n); // Khởi tạo mảng A với n phần tử multiset<int> B; // Khởi tạo multiset B để lưu trữ các phần tử của mảng B // ...
ALGO
0.999905
4.846057
{ "github_metadata": { "branch": "main", "commit_count": 445, "repo_created_at": "2024-08-01T15:14:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62ce37721c...
91640b00-6ef1-4453-9787-c7f0eca1c326
AMIRIOX/MyLuoguRepo
luogu/P1217/P1217.cpp
#include <iostream> #include <cmath> using namespace std; int ln, rn, x, y; int sz[10]; bool NBR=true; int getLen(int num) { return log10(num)+1; }//获取整数位数 bool isp(int num) { if (num < 2) return false; if (num == 2)return true; for (int i = 2; i * i <= num; i++) { if (num % i == 0) return false; } return true;...
ALGO
0.999675
3.50393
{ "github_metadata": { "branch": "master", "commit_count": 458, "repo_created_at": "2020-07-11T06:47:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb08e0d8...
cab560dc-bedb-436e-981c-29bae67b2f29
GHScan/DailyProjects
C++/Y_Combinator/main.cpp
#include "pch.h" #include <functional> ////////////////////////////// // why need Y-combinator ? // if your procedure is stateless, you can use global function or other // compile-time scope like class scope, but once your procedure have state, // then you will face the lambda recursion problem. Y-combinator is a //...
TOOL
0.996434
6.564851
{ "github_metadata": { "branch": "master", "commit_count": 1116, "repo_created_at": "2013-02-19T15:11:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 33, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20e06f...
1b35d694-3435-4afc-94d2-2fff2fc3b0a9
zeegomo/giornata-informatica-2020
sciroppo/sol/giackaloz.cpp
#include <bits/stdc++.h> using namespace std; #define INF 1e9 int main(){ int n, m; cin >> n >> m; int r, c; cin >> r >> c; int mat[n][m]; for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ cin >> mat[i][j]; } } priority_queue<pair<int,pair<int,int>>, vect...
ALGO
0.999889
3.852389
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-02-17T11:42: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": "6c560c631...
01016967-dd2e-4545-b399-13cc248c12b3
abhishek-nn/DSA_SOLVED
Step 13 Binary Trees/24. Time To Burn Tree.cpp
#include<bits/stdc++.h> #define d(x) cout<<#x<<": "<<x<<endl; void markParentsAndStart(BinaryTreeNode<int> *root, unordered_map<BinaryTreeNode<int> *, BinaryTreeNode<int> *> &parentMap, int start, BinaryTreeNode<int> *&startNode) { queue<BinaryTreeNode<int> *> nodeQueue; nodeQueue.push(root); while (!nodeQu...
ALGO
0.999751
4.018822
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2023-05-12T07:10: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": "4b974c950...
bd9c1ea7-edb9-45b2-8dde-fc899fc1ec5c
HamLET8/CPlusPlus_Primer
primer/3_39.cpp
#include<iostream> #include"Sales_item.h" #include<string> #include<vector> #include<cstddef> #include<cstring> using std::vector; using std::cout; using std::endl; using std::string; using std::cin; int main() { string str1 = "hellee"; string str2 = "helle"; if(str1 > str2) cout << "str1 bigger than str2 " ...
ALGO
0.994661
3.214815
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-08-10T13:40: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": "c92d5cca19...
dac9f09b-de95-4762-8eb1-eb8f93a604c6
cgmoreda/CompetitiveProgramming
UVA/11550/42813764_AC_0ms_0kB.cpp
#include<bits/stdc++.h> //cgmoreda || Mohamed_Reda using namespace std; #define vin(v) for(auto &i:(v))cin>>i #define ll long long #define all(v) v.begin(),v.end() #define vvi vector<vector<int>> #define vi vector<int> int dope() { } void solve() { int n, m; cin >> n >> m; vvi v(n, vi(m)); map<pair...
ALGO
0.999952
6.221888
{ "github_metadata": { "branch": "main", "commit_count": 442, "repo_created_at": "2024-01-20T21:05: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": "1105b5f2b4...
b018dff4-508c-4e75-9f63-341857aff826
liudong1983/mybus
include/boost/spirit/fusion/algorithm/detail/fold.ipp
/*============================================================================= Copyright (c) 2003 <NAME> Copyright (c) 2004 <NAME> Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENS...
TOOL
0.961782
7.068858
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2015-06-24T08:40:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 358, "forks": 127, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "0983...
b99f5afc-f456-4e44-9f3d-e4c4953475c5
thibetabc/Game2048
Classes/AStar/AStar.cpp
#include "AStar.h" AStar::AStar() { } AStar::~AStar() { } void AStar::Execute(const Graph &Graph, const string &VetexId) { const auto& Vertexes = Graph.GetVertexes(); Vertex* pVertexStart = Vertexes.find(VetexId)->second; vector< Vertex* > Q; // 初始化顶点 for (auto& it : Vertexes) { Vertex* pV = it.second; ...
ALGO
0.999544
3.701736
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-05-11T03:18:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b34f931f08...
407239f8-e998-403a-8c63-01f3ccf91446
Aaryan-8684/Code-Submissions
Aryan/Cpp Files/anyBaseSubstraction.cpp
#include <iostream> #include <cmath> using namespace std; void anyBaseSubstraction(int, int, int); int main() { cout << "[Base, Number1, Number2] ==> "; int base, num1, num2; cin >> base >> num1 >> num2; cout << "[ Subtraction, " << num1 << ", " << num2 << "] ==> "; anyBaseSubstraction(base, num1, n...
ALGO
0.999722
3.906236
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-07-22T04:45: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": "8043746f3a...
a00d0b2b-b426-4144-b9cf-9de9f0067268
Leehaewon/Algorithm
AlgorithmPractice/AlgorithmPractice/10026(적록색약).cpp
// // 10026(적록색약).cpp // AlgorithmPractice // // Created by 이해원 on 2019. 3. 9.. // Copyright © 2019년 이해원. All rights reserved. // #include <iostream> #include <vector> #include <queue> using namespace std; const int dx[4] = {0,0,1,-1}; const int dy[4] = {1,-1,0,0}; bool is_range(int x, int y, int N) { retur...
ALGO
0.999131
4.251228
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-02-13T12:04: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": "523cb3f1c...
d71b0a29-2cf0-4016-8f16-4ff8c85bc767
UnsEmp/C_Note
codeforces/Scenes_and_memory.cpp
#include <bits/stdc++.h> using namespace std; #define pii pair<int,int> #define vi vector<int> bool isprime(int n) { if(n == 1) return false; for(int i = 2;i <= n / i;++i) if(n % i == 0) return false; return true; } void solve() { int n; cin >> n; string s; cin >>...
ALGO
0.9999
3.604729
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-04-22T12:11:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a33d9aa96ec...
6c5259ab-d4e2-4062-9f17-5406de8bac1e
dolanmiu/Fish-Tank-Water-Changer
main/main.ino
// Non solenoid automatic Arduino UNO water changer // Uses check-valve // L298P Motor driver int E1 = 10; int M1 = 12; int E2 = 11; int M2 = 13; long durationInSeconds = 600; long durationInMilliseconds = durationInSeconds * 1000; long dayInMilliseconds = 86400 * 1000; long dayInMillisecondsOffsetted = dayInMillisec...
TOOL
0.969685
5.072632
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-06-30T17:48: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": "812a5a57b...
2881f1cb-8b2d-4b8a-b35d-2eb6336a0610
mjggodoy/jMetalRosetta
src/protocols/optimize_weights/IterativeOptEDriver.cc
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
ALGO
0.996308
4.560963
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2019-01-16T21:03:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dfaf13e62...
92ef7785-e815-4849-a6c8-756bbee37414
MiohitoKiri5474/CodesBackUp
C++/TOJ/452.cpp
// by. MiohitoKiri5474 #include<bits/stdc++.h> #pragma GCC optimize ( "O3" ) #pragma loop_opt ( on ) using namespace std; typedef long long LL; // define tools #define REPP(i,f,s) for ( int i = f ; i < s ; i++ ) #define REPM(i,f,s) for ( int i = f ; i >= s ; i-- ) #define REPALL(i,n) for ( auto &i: n ) #define debu...
ALGO
0.999836
4.135458
{ "github_metadata": { "branch": "master", "commit_count": 148, "repo_created_at": "2018-03-21T10:32:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a84edaee...
0f5ddc81-9842-46d9-8425-380262f20980
emamhasan1804/XPSC
week -15/day -05/F_Elemental_Decompress.cpp
#include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; // template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; // for set template <typename T> using pbds = tree<T, n...
ALGO
0.999931
3.935853
{ "github_metadata": { "branch": "main", "commit_count": 377, "repo_created_at": "2024-03-14T19:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a86cb430d...
34f31c65-8c62-49e9-8c37-4d345d8aac65
liubq98/Cpp_exercises
code/Beautiful Tree (eden).cpp
#ifndef BEAUTIFULTREE_HPP #define BEAUTIFULTREE_HPP #include <iostream> #include <cstring> #include <string> #include <vector> using namespace std; namespace HFM{ struct node{ int e; char id; node* left; node* right; node* parent; string code; node(int num,char _id){ id = _id; e = num; lef...
ALGO
0.999925
4.027726
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-12-13T08:02: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": "ce399bcae0...
f2e8ffd9-dff5-44eb-ab27-0cbc16d624a4
ishandutta2007/codeforces-k
krk/normal/617/C.cpp
#include <map> #include <set> #include <cmath> #include <deque> #include <queue> #include <stack> #include <string> #include <cstdio> #include <vector> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; typedef pair <ll, ll> llll; const int Maxn = 2005; const ll Inf...
ALGO
0.999575
3.692801
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06: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": "ea89d52db49e...
1cab8f53-f8a8-45c2-8a02-fd47a2349999
KaranGulve4342/DSA
beginning/Secret Box.cpp
// CODEFORCES CONYTEST KARAN #include<bits/stdc++.h> using namespace std; typedef long long ll; ll karan() { ll maxi = 0; ll a, b, c, d; cin >> a >> b >> c >> d; for (ll i = 1; i <= a; i++) { for (ll j = 1; j <= b; j++) { if (d % (i * j) == 0) { ll quotient = ...
ALGO
0.999911
5.251476
{ "github_metadata": { "branch": "main", "commit_count": 1066, "repo_created_at": "2024-01-01T02:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a90ba6822...
03358edd-f3bd-4cd3-beb6-1d7417c5db59
thenameisvir/GFG-practice-problems
Difficulty: Medium/Prerequisite Tasks/prerequisite-tasks.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: bool isPossible(int N, int P, vector<pair<int, int> >& arr) { unordered_map<int,list<int>>adj; for(auto i:arr){ int u = i.first; int v = i.second; ...
ALGO
0.999918
6.498051
{ "github_metadata": { "branch": "main", "commit_count": 373, "repo_created_at": "2024-07-13T06:21: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": "2a7b14de42...
f1314d81-f3e5-47e5-99ea-06a311d9c759
prakhar7017/DSA-CPP
Graphs/Shortest Path in Undirected Graph.cpp
#include <vector> #include <queue> #include <unordered_map> #include <algorithm> using namespace std; vector<int> shortestPath(vector<pair<int,int>> edges, int n, int m, int s, int t) { vector<int> ans; queue<int> q; unordered_map<int,int> parent; unordered_map<int,bool> vis; // Construct adjacenc...
ALGO
0.999989
6.447718
{ "github_metadata": { "branch": "main", "commit_count": 1146, "repo_created_at": "2023-10-06T17:49: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": "5e52d908c...
a6f1f42c-c9ff-4bd6-b90f-421a1ceee4f0
Raccooon98/baekjoon_algo
백준/Gold/6593. 상범 빌딩/상범 빌딩.cc
//3차원 BFS 출구까지 최단거리 구하기, TC여러개 받는거(초기화 조심) 종료조건이 0 0 0 인듯 #include<iostream> #include<queue> #include<vector> using namespace std; struct info{ int z, y, x, t;//t는 걸린시간 }; queue<info> q; int L, R, C, result = 0; vector<vector<vector<char>>> building; int dx[] = { 1,0,-1,0,0,0 }; int dy[] = { 0,-1,0,1,0,0 }; int ...
ALGO
0.999774
5.056267
{ "github_metadata": { "branch": "main", "commit_count": 315, "repo_created_at": "2023-03-14T09:53: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": "132e7b2efb...
08d26844-05f0-42c4-84db-5f741fe8217b
Jody-Lu/Array
105_construct_binary_tree_from_preorder_and_inorder_traversal/buildTree_v2.cpp
#include <iostream> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: TreeNode* buildTree(vector<int>& preorder, vector<int>& inorder) { return helper(pr...
ALGO
0.999994
6.294297
{ "github_metadata": { "branch": "master", "commit_count": 276, "repo_created_at": "2016-07-21T06:47: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": "e4b70a12...
63e671fd-8e0d-4438-ac09-46715c03360d
solesensei/WiFi-Trace
include/types.h
#pragma once #include <vector> #include <string> #include <cmath> #include <tuple> #include <assert.h> #include <iostream> #include <cstdlib> #include <ctime> #include <limits> #include "glm/glm.hpp" #include "glm/gtc/matrix_transform.hpp" #include "matrix.h" #include "EasyBMP.h" #include "Environment.h" #include "...
TOOL
0.95883
5.836629
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2017-11-23T21:10:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e284b9ad...
1d7fa950-847d-4fbd-ad24-380fd8951361
rafa14-maker/Competitive-programming
Take Your Places cf.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1e5+5; int n; int arr[N]; vector<int>even; vector<int>odd; /* long long f() { int frr[n+5]; for(int i=0;i<n;i++) { if(i%2==0)frr[i]=0; else frr[i]=1; } long long sum=0; int idx=0,pdx=0,kdx=0; for(int i=0;i<n;i++) ...
ALGO
0.999679
3.788603
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-04T08:29: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": "f49251d20460...
658cfe8f-5df7-49c9-8449-1aeeac63a006
Tora416/MultiCodeEmbed
dataset/dataset_raw/gcj_cpp/skavurskaa/5304486_5697460110360576_skavurskaa.cpp
#include <bits/stdc++.h> using namespace std; int dp[1 << 18]; int N, P; double ing[2], pack[10][10]; int solve(int mask) { if (dp[mask] == -1) { dp[mask] = 0; for (int i = 0; i < P; i++) for (int k = 0; k < P; k++) if (!(mask & (1 << i)) && !(mask & (1 << (P + k)))) { double A = pac...
ALGO
0.999338
4.035017
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2025-07-10T08:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af7487761...
ff9f9309-a0a2-4a84-b4b0-fb63fce4b3a7
lilelr/-Chapter-7-brute-solution-Beginning-Algorithm-Contests-Second-Edition-Rujia-Liu-
7.brute solution/129 - Krypton Factor.cpp
//#include <algorithm> //#include <cmath> //#include <cstdio> //#include <cstdlib> //#include <cstring> //#include <iostream> //#include <map> //#include <queue> //#include <set> //#include <string> //#include <vector> //using namespace std; //#define LL long long //const int maxn = 85; // //int n, L; //int total; //st...
ALGO
0.999041
3.333678
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2016-09-16T13:33: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": "fd718e257...
84f60edd-a955-4f7e-abd3-8dd7bf955db5
Rahim17MBSTU/CP
B_Equal_XOR.cpp
#include<bits/stdc++.h> using namespace std; // policy Based ds #include<ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<long long , null_type, less<long long>, rb_tree_tag,tree_order_statistics_node_update> ordered_set; // 1.*A.find_by_order(index) 2.order...
ALGO
0.999939
4.232869
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-01-30T19:14: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": "a7813866cd9...
914b03a2-05ac-43f3-aaf6-3d47fffa408c
dudatsouza/pratica-arvores
Problema 3/src/AVLTree.cpp
#include "AVLTree.hpp" #include <chrono> AVLTree::AVLTree() : root(nullptr) {} AVLTree::~AVLTree() {} int AVLTree::height(Node* node) { return node ? node->height : 0; } int AVLTree::balanceFactor(Node* node) { return node ? height(node->left) - height(node->right) : 0; } Node* AVLTree::rotateLeft(Node* no...
ALGO
0.998066
6.060702
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-11-28T01:18:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a87c00e938e...
c462feae-ccdc-41ee-871a-28010c467e7f
anygo/tspl
include/fftr2.h
/***************************************************************************** * fftr2.h * * Fast Fourier Transform with Radix 2 Algorithm * * This class is designed for calculating discrete Fourier transform and * inverse discrete Fourier transform of 1D signals by using Split-Radi...
ALGO
0.999081
6.446302
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2015-08-21T02:50:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "ee90683ab...
89fc17bc-a111-4687-971a-8763d63931db
erickfigueiredo/cadeias-markov
main.cpp
/* * UNIVERSIDADE FEDERAL DE VIÇOSA * * Desenvolvido por <NAME> (@erickfigueiredo) * Professor: <NAME> Disc: Estrutura de Dados * Data: 03/12/2020 */ #include <iostream> #include <string> #include <fstream> // Leitura de arquivos #include <algorithm> // utilização de pair e sort #include "MyVecNewIte...
TOOL
0.986457
4.249744
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-11-19T12:29: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": "50ae3a30a...
c075f370-1f30-4e03-85cd-76145cc87486
DyogoBendo/cp
subject/complete-search/load_balancing.cpp
#include <bits/stdc++.h> using namespace std; void setIO(string s) { freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); } int main(){ setIO("balancing"); int n, b; cin >> n; vector<pair<int, int>> cows; set<int> unique_x; set<int> unique_y; for...
ALGO
0.999753
3.500365
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2024-12-23T14:07: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": "57b93626b3...
f04c1ccd-be91-4909-b91f-0a665a17d76d
vicky70/DSA
Assignment_11_Queue_Using_Array/QueueADT.cpp
#include<iostream> using namespace std; class QueueADT { private: int capacity, front, rear; int *ptr; public: QueueADT(int ); ~QueueADT(); void insertAtRear(int ); void deleteAtFornt(); bool underFlow(); bool overFlow(); int viewRear(); int viewFront(); int countElement(); ...
ALGO
0.997722
4.319739
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-11-12T20:46:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "166dd8a60ea...
b695344d-7e9e-4bc3-a8b7-e464dace21a1
ChaolunWang/neumeric-computation
parralell programming/open mp/code&documentation_for_exercise/quad.cpp
# include <cstdlib> # include <iostream> # include <cmath> # include <ctime> // // CHANGE 1) include the OpenMP include file # include <omp.h> //added to include library at 09/06/2016 // using namespace std; //****************************************************************************80 int ma...
ALGO
0.999633
5.361953
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-11-12T02:50: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": "9542b36055...
fce8fd9e-2fbe-46f8-a0ae-d264a39041ea
jaimin1618/data_structures_and_algorithms
important_algorithms/dynamic_programming/DP-parent-problems/01knapSack/equal_sum_partition.cpp
#include<bits/stdc++.h> using namespace std; /*** INPUT: Array OUTPUT: T/F DESC: divide array in 2 parts such that sum of elements is equal {1, 5, 5, 11} => {1, 5, 5} == {11} **/ bool isSubsetSum(int v[], int N, int T) { bool dp[N + 1][T + 1]; for(int i = 0; i < N + 1; ++i) { for(int j = 0; j < T + 1; ++j) { ...
ALGO
0.999631
5.359352
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-05-15T21:31: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": "1f69e5e0f74...
21f29711-dc51-4e2a-9d4a-a0e48fa8374d
Ahmed-Ssalem/Codeforces-Solutions
codeforces/1395/A.cpp
#include <bits/stdc++.h> using namespace std; //======================================================== #define forn(i,n) for (int i = 0; i < (int)(n); ++i) #define for1(i,n) for (int i = 1; i <=(int)(n); ++i) #define ull unsigned long long #define ll long long #define all(v) (v).begin(),(v).end...
ALGO
0.999885
3.444525
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2022-05-26T14:56:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47195de98...
0665ffbd-10db-45e6-9e28-a49dafb68d61
Nimesh-Srivastava/DSA
C++/LeetCode/0225.cpp
class MyStack { queue<int> a; queue<int> b; public: MyStack() { } void push(int x) { a.push(x); } int pop() { int temp; while(!a.empty()) { if(a.size() == 1) temp = a.front(); ...
ALGO
0.999658
5.522917
{ "github_metadata": { "branch": "main", "commit_count": 1502, "repo_created_at": "2021-08-28T13:04:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8f63630b...
864019e4-7b7d-4ade-b2af-8709aa7c448c
kamyu104/LeetCode-Solutions
C++/find-the-lexicographically-smallest-valid-sequence.cpp
// Time: O(n + m) // Space: O(m) // hash table, greedy class Solution { public: vector<int> validSequence(string word1, string word2) { vector<int> lookup(size(word2), -1); for (int i = size(word1) - 1, j = size(word2) - 1; i >= 0; --i) { if (word1[i] != word2[j]) { con...
ALGO
0.999995
6.165824
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
67440359-4df9-478d-bd62-115c5b5ba560
weolar/miniblink49
third_party/pdfium/third_party/agg23/agg_clip_liang_barsky.h
//---------------------------------------------------------------------------- // Anti-Grain Geometry - Version 2.3 // Copyright (C) 2002-2005 <NAME> (http://www.antigrain.com) // // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. /...
ALGO
0.998719
6.269465
{ "github_metadata": { "branch": "master", "commit_count": 1788, "repo_created_at": "2016-09-27T03:41:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7578, "forks": 1142, "issues": 340, "pull_requests": 6 }, "file_meta": { "content_id": ...
2a3c9732-b66f-49c1-97e2-bb340dda92fe
marcogroot/leetcode-solutions
misc/827.cpp
#include <algorithm> #include <iostream> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> // https://leetcode.com/problems/making-a-large-island/?envType=daily-question&envId=2025-01-31 // 31-01-2025 @ marcogroot using namespace std; vector<pair<int, int>> directions = {{0, 1}, {...
ALGO
0.999779
5.760478
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-10-15T10:05: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": "aa9eeec4290...
6f19d681-0b73-41df-9c4c-0e040d23468d
priyansh004-sahu/CPP
apna_collage/chap_27(STL)/map.cpp
#include<iostream> #include<map> #include<unordered_map> using namespace std; void use_Map() { map<string, int> m; m["tv"] = 50; m["laptop"] = 150; m["phone"] = 200; m["headphone"] = 300; m.insert({"camera", 400}); m.emplace("tablet", 500); m.erase("tv"); for(auto p: m) { cout << p.fi...
TOOL
0.953559
4.114801
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-04-17T06:27: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": "d4493aa8ecc0...
5df00564-78b9-476b-b9b2-a6cf57043403
ishandutta2007/codeforces-s
saketh/normal/1110/E.cpp
#include <bits/stdc++.h> using namespace std; #define TRACE(x) x #define WATCH(x) TRACE(cout << #x" = " << x << endl) #define WATCHR(a, b) TRACE(for (auto it=a; it!=b;) cout << *(it++) << " "; cout << endl) #define WATCHC(V) TRACE({cout << #V" = "; WATCHR(V.begin(), V.end());}) #define all(x) (x).begin(), (x).end() ...
ALGO
0.999989
3.963226
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "fd323155d04a...
60500740-123d-4fb2-824f-f339b59f8540
Safeheron/multi-party-sig-cpp
src/multi-party-sig/multi-party-ecdsa/cmp/minimal_key_gen/round2.cpp
#include <cstdio> #include "crypto-suites/crypto-hash/safe_hash256.h" #include "crypto-suites/crypto-encode/hex.h" #include "crypto-suites/crypto-sss/vsss.h" #include "multi-party-sig/mpc-flow/common/sid_maker.h" #include "multi-party-sig/multi-party-ecdsa/cmp/minimal_key_gen/context.h" #include "multi-party-sig/multi-...
ALGO
0.967616
5.293428
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-04-08T16:40:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 115, "forks": 21, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "439c9bf68...
d485f89b-b7a3-4dc4-9565-6466ed054787
shikharvermasv/problem_solving
homework/tries 1/sum-of-prefix-scores-of-strings.cpp
class TrieNode{ public: bool isend; TrieNode* children[26]; int count ; // constructor TrieNode(){ isend = false; for(int i=0 ; i<26 ; i++){ children[i] = NULL; } count = 0; } }; class Trie{ public: TrieNode* root = new TrieNode(); void in...
ALGO
0.999985
5.858863
{ "github_metadata": { "branch": "main", "commit_count": 145, "repo_created_at": "2024-03-11T15:16:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bbd2ba928...
8d0f92eb-4e12-4c3e-9b51-89f4f2c6c7bd
ShelpAm/competitive_programming
libs/least-common-ancestor.h
#pragma once #include "../templates/main.cpp" #include "graph.h" namespace shelpam { using graph::Node_type; class Least_common_ancestor { public: Least_common_ancestor(graph::Graph const &g, int root) : dfn_(g.size()), depth_(g.size(), -1) // -1 to make `depth[parent-of-root] + 1` eq...
ALGO
0.999278
6.576684
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2024-02-12T16:26: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": "5de8c338c8b...
2f8f6786-6c9e-4a7a-8ae4-db6d6cab386c
abhisarxverma/DSA-by-heart
Linked_List/13-Check_Loop/check_loop.cpp
#include "../Linked_List.h" #include <iostream> #include <algorithm> #include <vector> #include <unordered_set> using namespace std; /* PROBLEM - Given a Head Node of the linked list, check if the linked list is looped, means that there is no end or the end is again pointing to any node in linked list. BRUTE FORCE AP...
ALGO
0.99939
5.545464
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2025-04-18T07:35:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5cfd9b756...
81341d62-da4e-41b9-a58d-35c2c9747b0a
justmohit/mycaptainc-
number as prime1.cpp
//created by <NAME> on 11/2/2020 //program to check whether a number can be expressed as a sum of prime and then expressing as a sum of //prime if possible #include <iostream> using namespace std; bool checkP(int n) //function to check prime { int i; bool isPrime = true; for(i = 2; i <= n/2; ++i) {...
ALGO
0.999738
4.712585
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-06-10T06:56: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": "bdb7923d66...
4ec102f6-4a76-4446-a19b-1b3892a5cfcf
TuGraph-family/tugraph-db
demo/ProcedureDemo/cpp/pagerank.cpp
#include "lgraph/olap_on_db.h" #include "json.hpp" using namespace lgraph_api; using namespace lgraph_api::olap; using json = nlohmann::json; extern "C" ParallelVector<double> PageRank(Snapshot<Empty>& snapshot, int num_iterations) { auto all_vertices = snapshot.AllocVertexSubset(); all_vertices.Fill(); ...
ALGO
0.997478
4.810625
{ "github_metadata": { "branch": "master", "commit_count": 710, "repo_created_at": "2022-08-25T08:46:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1596, "forks": 207, "issues": 125, "pull_requests": 15 }, "file_meta": { "content_id": "a...
4bee4710-b246-4851-a7c5-4b4fcec99e56
ishandutta2007/codeforces-m
macesuted-moe/normal/1749/F.cpp
/** * @file 1749F.cpp * @author Macesuted (<EMAIL>) * @date 2022-10-20 * * @copyright Copyright (c) 2022 * */ #include <bits/stdc++.h> using namespace std; #ifndef LOCAL #define endl '\n' #endif bool mem1; #define maxn 200005 #define maxlgn 22 class SegmentTree { private: int tree[maxn << 2]; vo...
ALGO
0.999906
5.138463
{ "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": "b2dadab1b309...
d35b32ad-e175-4cda-a39a-60794cacaea8
rahul228646/DSA-and-CP
Dynamic Programming/perfect_square.cpp
// https://leetcode.com/problems/perfect-squares/ class Solution { public: int numSquares(int n) { if (n <= 0) return 0; // dp[i] = the least number of perfect square numbers // which sum to i. Note that dp[0] is 0. vector<int> dp(n + 1, INT_MAX); dp[0] = 0; ...
ALGO
0.999971
5.967583
{ "github_metadata": { "branch": "main", "commit_count": 800, "repo_created_at": "2021-09-10T11:27:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3056601e6a...
7ff32789-f13e-4ea8-a4ce-aa6678129ea6
jmuehlig/mxtasking
src/db/index/blinktree/lookup_task.h
#pragma once #include "b_link_tree.h" #include "insert_separator_task.h" #include "node.h" #include "task.h" #include <optional> namespace db::index::blinktree { template <typename K, typename V, class L> class LookupTask final : public Task<K, V, L> { public: LookupTask(const K key, L &listener) noexcept : Task<...
ALGO
0.953711
7.604185
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-03-22T16:41:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4672465fa1e...
821c5e8a-21a6-4e43-9b8e-5f9e2596906b
nrupatunga/Pedestrain-Detection-using-Histogram-of-Oriented-Gradients
CODE/Src/HOG.hpp
/* The MIT License (MIT) Copyright (c) [2015] [Nrupatunga] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge...
ALGO
0.964953
5.165074
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-07-10T18:30:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6b8f259d6f...
4a129d79-0367-43c0-a3fe-c2d5134e8b22
kangjianwei/Data-Structure
Dev-C++/ExerciseBook/02.13/02.13.cpp
#include <stdio.h> #include "Status.h" //**▲01 绪论**// #include "LinkList.h" //**▲02 线性表**// /* * 题2.13 * * 寻找元素x在L中的位置。 * 如果返回0,则说明x不存在。 */ int Algo_2_13(LinkList L, ElemType x); // 判断data==e是否成立 Status Equals(ElemType data, ElemType e); // 测试函数,打印元素 void PrintElem(ElemType e); int main(int argc, char* ...
ALGO
0.999765
4.721477
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2018-10-05T12:51:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3719, "forks": 987, "issues": 9, "pull_requests": 2 }, "file_meta": { "content_id": "771f...
8b61c381-3b86-4ccd-8d34-ef1b535d17ee
BlackenmaceStudios/idtech4cdk
neo/tools/MeshTools/Lib/Vector.h
/* Roadkill 1.1 UV Unwrap utility Copyright (C) 2007 <NAME> 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 2 of the License, or (at your option) any later vers...
TOOL
0.922737
4.498035
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2015-03-12T21:05:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0fd592...