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
945d36c0-c4f1-4117-b987-700ceffae80b
Xentire/vs2022
c++DATA_struct/c++DATA_struct/线性表 02 有序表的合并.cpp
//#define _CRT_SECURE_NO_WARNINGS //#include <iostream> //using namespace std; // //// //////链表实现有序表的合并 ////#define ELEM int ////class LinkNode ////{ ////public: //// ELEM data; //// LinkNode* next; //// ////}; //////前插法创建一个链表 ////LinkNode* initLinkNode() ////{ //// LinkNode* ln = new LinkNode; //// cout << "请输入链表的长度" ...
ALGO
0.999638
4.29832
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-04-16T12:15: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": "4957d90360...
8e89fa43-c017-422e-b6a3-e69f5c1577f7
DuGuYifei/B-Tree_Cache_andOtherProjectAlgorithm
XORLinkedList/XORLinkedList.cpp
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct Node //struct of node { int _value; Node* xorPtr = 0; }; typedef struct List //information of list { Node* _beg = 0; //beginning Node* _end = 0; //end Node* _act = 0; //actual }; ...
ALGO
0.999878
3.68671
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-01-26T00:33:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5da57d9143cb...
43e8d541-1838-46f2-a56f-a629c98f4b0a
CompuCell3D/CompuCell3D
CompuCell3D/core/CompuCell3D/steppables/PDESolvers/FlexibleDiffusionSolverFE_GPU.hpp
//<NAME> // TO DO // 2D kernel // dealing with lattice dimmensions that are not multiple of BLOCK_SIZE // hexagonal lattice //<NAME> //the common code for CUDA and OpenCL diffusion solvers //#include "FlexibleDiffusionSolverFE_GPU.h" #include <CompuCell3D/Simulator.h> #include <CompuCell3D/Automaton/Automaton.h> #i...
ALGO
0.957368
4.888516
{ "github_metadata": { "branch": "master", "commit_count": 3449, "repo_created_at": "2013-08-20T20:53:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 70, "forks": 44, "issues": 202, "pull_requests": 3 }, "file_meta": { "content_id": "b18...
68b561cf-a623-4651-b92a-98e44a5d8bc3
Hilal-11/DSA-Basic-To-Advance
🏁 Multi Dimentional Arrays/SearchOnMatrix.cpp
#include<iostream> using namespace std; bool LinearSearchOnMatrix(int data[3][3] , int targer, int rows , int cols) { for(int i = 0; i < rows; i++) { for(int j = 0; j < cols; j++){ if(data[i][j] == targer){ return true; } } } return false; } int ma...
ALGO
0.999632
4.789215
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-09-04T19:29: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": "c533e75f909b...
4bd2e217-ad15-4ba0-987c-40a64134bd12
TopherNie/toy-project
Common/include/template_func.hpp
// // Created by Administrator on 2019/12/26 0026. // #include <map> #include <string> #include <vector> #include <iostream> #include <algorithm> #include <sstream> using namespace std; #define DEFAULT_SEP "-" /** * Count elements of a vector * @tparam T * @param list * @return */ template <typename T> map<T, ...
ALGO
0.997734
4.778386
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2019-12-28T04:48: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": "49794993a...
1bdb876f-eba7-47b9-be18-5e37d19c3751
khuzaimakt/Data-Structures
SingleLinkedList.cpp
#include<iostream> using namespace std; template<typename T> class LinkedList { template<typename T> class Node { public: T d; Node<T>* next; Node(T data = 0, Node<T>* next = nullptr) :d(data), next(next) {} ~Node() { next = nullptr; }; }; Node<T>* Tail; Node<T>* Head; Node<T>* Temp; public: Lin...
ALGO
0.999916
4.193412
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-08-20T14:51:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7803cc3e72ea...
b34f39a6-e0c3-49f7-a926-1a20ee60cbea
ZERstar/Leetcode
0515-find-largest-value-in-each-tree-row/0515-find-largest-value-in-each-tree-row.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.99993
6.218081
{ "github_metadata": { "branch": "main", "commit_count": 1154, "repo_created_at": "2022-09-25T19:17: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": "841ca499f...
fbba971e-2016-4afa-bf10-8f25c96b3d85
subhanbokhari/Data-Structures
MInHeap.cpp
#include <iostream> #include <vector> using namespace std; class Patient { public: string name; int urgency; Patient(string name, int urgency) { this->name = name; this->urgency = urgency; } }; class Heap { public: vector<Patient> htree; int getParent(int child) { ...
ALGO
0.997151
5.951047
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-01T15:29: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": "5d94d1364dad...
18c3d15e-4021-4b68-9d16-980f0d7eda8b
svn2github/webrtc
webrtc/modules/video_coding/main/source/qm_select.cc
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
ALGO
0.988912
6.490207
{ "github_metadata": { "branch": "master", "commit_count": 7379, "repo_created_at": "2014-03-12T16:50:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 112, "forks": 105, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "ba8...
e097ab67-defb-476a-bcc7-b3223ea077b2
MouseGray/SimplexLib
engine.h
#ifndef ENGINE_H #define ENGINE_H #include "storage.h" #include "basis.h" #include <QString> enum SimplexResult { OK, SingularMatrix, ArtificialVariablesInBasis, NoSolution, InconsistentSystem }; class SIMPLEXLIB_EXPORT Engine { public: Engine(); ~Engine(); void createTask(int rows, ...
ALGO
0.947071
5.783655
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-03-30T14:39: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": "e4b5286ca4...
e7ca5950-2cf7-4f0e-b259-db9b1b51c6c4
kinetic-rb/kinetic-rb.github.io
code/P2725.cpp
#include <iostream> #include <functional> #include <queue> using namespace std; int stamp[55], d[2000000]; int main() { int k, n, MAX = 0; cin >> k >> n; for (int & i : d) i = 0x7fffffff; for (int i = 0; i < n; i++) { cin >> stamp[i]; MAX = max(MAX, stamp[i]); } queue<...
ALGO
0.999966
3.405068
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2022-11-19T06:37:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0dd4c853712...
02eb4622-1e68-4652-a391-b23fbff6449f
BraiGold/facial_recognition
src/operacionesMatriciales.h
#ifndef operacionesMatriciales_H #define operacionesMatriciales_H #include <vector> #include <map> #include <math.h> #include <stdlib.h> #include <iostream> using namespace std; const double eps = 0.001; class matrix { public: matrix(); matrix(int rows, int columns); matrix(const matrix& mat); int numfila...
ALGO
0.991932
4.150365
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-06-16T02:37: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": "d7cdb5aea7...
824901dd-c974-451b-aefb-6767070cdc18
rising-turtle/sr_slam
src/sr_lsd_slam/dpt_map_se3.h
#ifndef DPT_MAP_SE3_H #define DPT_MAP_SE3_H #include "util/EigenCoreInclude.h" #include "opencv2/core/core.hpp" #include "util/settings.h" #include "util/IndexThreadReduce.h" #include "util/SophusUtil.h" namespace lsd_slam { class DepthMapPixelHypothesis; class FrameSE3; class KeyFrameGraphSE3; } using namespace ls...
ALGO
0.911748
6.57573
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2017-04-15T20:15:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55d54c610...
b694fbd4-28dc-4dc1-8eff-bab6f40e6fb7
InsightSoftwareConsortium/ITK
Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_scalar_join_iterator.h
// This is core/vnl/vnl_scalar_join_iterator.h #ifndef vnl_scalar_join_iterator_h_ #define vnl_scalar_join_iterator_h_ //: // \file // \brief Database join on matrix columns // \author <NAME>, Oxford RRG // \date 27 Dec 96 // // vnl_scalar_join_iterator implements a fast database join on columns // of matrices of ...
ALGO
0.976774
3.381608
{ "github_metadata": { "branch": "main", "commit_count": 57165, "repo_created_at": "2010-07-27T15:48:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1517, "forks": 701, "issues": 268, "pull_requests": 49 }, "file_meta": { "content_id": "6...
f17f535e-0952-4f6c-905d-f0f8e35725ac
BlAcKyCoDe50/Striver_A2Z
Step-6-Linked-List/Medium-problems-LL/Palindrome-List.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; class Node{ public: int val;Node *next;Node *prev; Node(int data1) { val=data1; next=nullptr; } }; //**********Extreme brute force************* */ // bool isPalindrome(Node* head) // { // Node *temp=he...
ALGO
0.999827
5.431362
{ "github_metadata": { "branch": "main", "commit_count": 239, "repo_created_at": "2024-01-17T14:23:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50c8637233...
7a9a6e7e-545b-4847-b252-447e265d2cf4
oysteinkrog/gpusphsim
thrust/detail/sort.inl
/* * Copyright 2008-2011 NVIDIA Corporation * * 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.999784
6.992771
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2011-09-06T18:44:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 50, "forks": 21, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1e995e...
2b4fdbae-782f-4ec1-b0e0-6eb9eb50021c
juliancramos/Implementacion-ArbolAVL
main.cpp
#include "ArbolAVL.h" #include "NodoAVL.h" #include <iostream> #include <string> int main(){ ArbolAVL<int>* arbol = new ArbolAVL<int>(); std::cout<<"Hola\n"; std::cout<<"Es vacio: "<<arbol->esVacio()<<std::endl; std::cout << "insercion de dato: " << arbol->insertar(50) << std::endl; std::cout << "...
ALGO
0.998103
4.093933
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-23T15:36: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": "01ae88dfdf6d...
e4b64dce-2070-498d-9c79-c9cc22b808c2
Nitin0333/Competitive-Programming
CSES Problem Set/Introductory Problems/Permutations.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "../debug.h" #else #define debug(...) #endif void solve() { int n, st = 1; cin >> n; if (n < 5) { if (n == 1) cout << 1 << endl; else if (n == 4) cout << "2 4 1 3" << endl; else cout << "NO SOLUTION" << endl; return; } vec...
ALGO
0.999927
3.751345
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-11-18T12:46: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": "7232ec8c9085...
d640e0fb-6b02-4b14-b29b-141593b14ffe
kaldi-asr/kaldi
src/base/kaldi-math.cc
// base/kaldi-math.cc // Copyright 2009-2011 Microsoft Corporation; <NAME>; // Saarland University; <NAME> // See ../../COPYING for clarification regarding multiple authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance w...
ALGO
0.946133
6.541183
{ "github_metadata": { "branch": "master", "commit_count": 9405, "repo_created_at": "2015-04-20T17:23:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14986, "forks": 5368, "issues": 189, "pull_requests": 63 }, "file_meta": { "content_id":...
baa14a6f-b011-44a2-aaca-1a50b2071f2a
efat1531/CP-Solutions
CodeForces/GNU C++17/1661C | Water the Trees/153336669.cpp
// Problem: C. Water the Trees // Contest: Codeforces - Educational Codeforces Round 126 (Rated for Div. 2) // URL: https://codeforces.com/contest/1661/problem/C // Memory Limit: 256 MB // Time Limit: 3000 ms #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long l1; type...
ALGO
0.999915
4.311777
{ "github_metadata": { "branch": "main", "commit_count": 1143, "repo_created_at": "2023-03-27T08:21: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": "032343ce4...
85cc064b-1380-404b-b24a-53bd1c441d2d
wj32/Judge
LeetCode/0230 - Kth Smallest Element in a BST.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: pair<bool, int> recurse(TreeNode* root, int k) { if (root == nullptr) { ret...
ALGO
0.999996
6.655818
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2013-03-18T11:51:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f87cb01...
6873c9e1-e52d-4885-aaf1-c8110fd6c1bd
KRYST4L614/Recursion
main.cpp
#include <iostream> #include <time.h> #include <iomanip> #include <fstream> #include <functional> #include <map> #include "FibonacciRecursion.h" #include "SumFromOneToN.h" #include "DeleteSpace.h" namespace { template < typename V, typename F > std::ostream& printResultAndTime(V arg, F op, std::ostream& stream) ...
TOOL
0.951811
5.252396
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-07-04T09:42: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": "6917a5b60e...
0403cd46-5c0e-42f7-acf2-86544811a099
RetailGameSourceCode/Monopoly
Source/PC3D/IRECT.CPP
// ////////////////////////////////////////////////// // MODULE: IRECT // Purpose: Defines the class iRect // ////////////////////////////////////////////////// #include "PC3DHdr.h" #include "ipoint.h" #include "irect.h" const iRect NULL_Rectangle(0,0,0,0); // .................... adjust rectangle to the smallest r...
TOOL
0.934132
4.01644
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-10-23T10:25:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 47, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "713532345...
d15511c5-5913-43c0-b387-fe678779d085
cholovirus/123
codigos ccomp I 2019/Tarea libro parte 6/41-50.cpp
#include <iostream> #include <stdlib.h> #include <time.h> #include <math.h> using namespace std; int libro_41(int x,int y){ if(x<y){ int temp=x; x=y; y=temp; } if(y==0){ return x; }else{libro_41(y,x%y);} } double libro_42(double x1, double y1,double x2, double y2){ ...
ALGO
0.996626
3.242903
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2018-08-21T14:08: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": "9de47cb7...
f7561c77-f1cf-452a-80f8-f8154f13e2e9
tienit150198/ACM
codeforces/567A_Lineland_Mail/main.cpp
#include <bits/stdc++.h> #define ll long long int #define Max 100007 using namespace std; ll n; ll a[Max]; struct m { ll _min, _max; }; m ans[Max]; ll isMax(ll a, ll b) { if(a > b) return a; return b; } ll isMin(ll a, ll b) { if(a > b) return b; return a; } int main() { ios...
ALGO
0.999945
3.939877
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-06-28T11:23:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d651f791...
df77c34f-9484-47e0-9c78-fe5c93e8c549
sunnyineverywhere/Cpp
2022.04/BOJ1926.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; int n, m; int canvas[501][501]; int dx[4] = { 1, 0, -1, 0 }; int dy[4] = { 0, 1, 0, -1 }; int bfs(int i, int j) { int sum = 1; queue<pair<int, int>> q; q.push({ i, j }); canvas[i][j] = 0; while (!q.empty()) { int ...
ALGO
0.999701
3.649081
{ "github_metadata": { "branch": "main", "commit_count": 139, "repo_created_at": "2022-01-04T16:51: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": "ee4f5fe472...
c1dde2b8-547d-42d5-b8f5-13028d8e1b58
landhero/leetcode
src/cpp/word-break-ii.cpp
/** * @author <NAME> (http://zhanghs.com) */ class Solution { public: vector<vector<string>> rlts; int * flag; bool wordBreak(string &s, int index, unordered_set<string> &dict){ if (flag[index]==-1) return false; if (!rlts[index].empty()) return true; int len ...
ALGO
0.999345
5.306449
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2013-03-03T09:45:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac4794feb...
a5fdc6b1-689d-4e7c-a67f-6fd873f94e0f
Haris-Rehman/CS-212-Object-Oriented-Programming
Lab 6/source.cpp
# include <iostream> # include "Header.h" # include <fstream> Tictac::Tictac()// default constructor { square[1] = { '1' }; square[2] = { '2' }; square[3] = { '3' }; square[4] = { '4' }; square[5] = { '5' }; square[6] = { '6' }; square[7] = { '7' }; square[8] = { '8' }; square[9] = { '9' }; } int Tictac::Put(i...
ALGO
0.987169
3.562202
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-01-15T06:51: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": "50e02aa18...
46cdb6c2-cb32-4740-a65b-ce7dead1b52e
Akrish2002/Garbage
2d_solver/src/variables/utils.cpp
#include "utils.h" #include <cmath> #include <cstddef> #include <iostream> primitiveVar convertConstoPrim ( const consVar& Q, const double gamma ) { primitiveVar V; V.rho = Q.rho; //Velocities V.u = Q.rho_u / Q.rho; V.v = Q.rho_v / Q.rho; //Pressure V.P = (gamm...
ALGO
0.998615
4.694908
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2025-04-03T17:43: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": "d2629b08509...
da93df41-3dde-4682-a896-4da7035e33e6
PointCloudLibrary/pcl
search/include/pcl/search/impl/brute_force.hpp
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2011, <NAME>, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
ALGO
0.993569
7.237877
{ "github_metadata": { "branch": "master", "commit_count": 14566, "repo_created_at": "2013-02-12T16:40:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10495, "forks": 4656, "issues": 432, "pull_requests": 147 }, "file_meta": { "content_id...
6377964b-00b1-4c18-8733-12fa240fb874
shahivaibhav/DSA-INTERVIEW-PREPARATION
Heap/Remove-Stones-to-Minimize-Total.c++
/* Remove Stones to Minimize the Total (LeetCode: 1962) Medium Problem: Given a set of stone piles, each pile has a certain weight. You can perform a specific operation k times: for each operation, remove half of the largest pile's weight. Return the sum of the remaining pile weights after performing all k operations. ...
ALGO
0.999474
6.113863
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2024-09-16T16:20:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "597a612f487...
460dc9de-b6d2-4678-933d-c08412047c57
lclpsoz/competitive-programming
ARCHIVE/2018-04-02-0145/1931.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 1e4+10; const int INF = 1e9; typedef pair<int, int> pii; typedef pair<int, pii> piii; int c, v; int a, b, d, p; vector<pii> adj[MAXN]; int djikstra () { priority_queue<piii, vector<piii>, greater<piii>> pq; int dist[MAXN][2]; for (int i = 0; i <= c; ...
ALGO
0.99988
4.250027
{ "github_metadata": { "branch": "master", "commit_count": 274, "repo_created_at": "2020-07-09T09:09:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fc6367e...
9b47d2a9-724d-407c-a636-0c799beb889a
mjmcnelis/bjorken_vh
evolution.cpp
#include <stdlib.h> #include <math.h> #include <iostream> using namespace std; #include "evolution.hpp" #include "qcd.hpp" #include "transport.hpp" //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // EVOLUTION EQUATIONS :: // ...
ALGO
0.989343
3.971987
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-11-13T03:50:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4dac2ae01...
ac79626e-6c0e-4d1c-8b61-af0d172f9f4d
macg0406/high_dimensional_tree
src/main.cpp
/** * this is the test script for the project * */ #include <iostream> #include <vector> #include <string> #include <fstream> #include <sstream> #include <random> #include <ctime> #include <algorithm> using namespace std; #include "high_dimensional_tree.h" float getRandomValue() { return (rand() % 10000 - 5...
TEST
0.985906
4.244458
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-08-07T15:05: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": "e9addcebb8f4...
0c27bf64-fe2c-438d-84a9-d4403d01c7b3
superglutenman0312/leetcode
1038.cpp
#include<bits/stdc++.h> using namespace std; 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(...
ALGO
0.999988
5.233088
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-11-07T15:25: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": "b0c7e0c46641...
549ac338-ab70-44df-953d-e239055992fc
CodeTiger927/CodeForcesRepo
703/pairedpayment.cpp
using namespace std; #include <iostream> #include <queue> #include <vector> #define MAXN 200005 #define INF 1e9 int dp[MAXN][2][55],N,M; vector<pair<int,int>> edges[MAXN]; int sq(int x) { return x * x; } int main() { cin >> N >> M; for(int i = 0;i < M;++i) { int a,b,c; cin >> a >> b >> c; a--;b--; edges...
ALGO
0.999932
3.675359
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2021-05-09T19:25:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "256eb9467a5...
f96e4329-a7bf-4e5e-98a7-641c34e0bbc1
amulya349/codingskill
oj/leetcode/surrounded_regions.cpp
/*{{{+++++++++++++++++++++++ <Description> ++++++++++++++++++++++++++ * Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. * A region is captured by flipping all 'O's into 'X's in that surrounded region . * * For example, * X X X X * X O O X * X X O X * X O X X * After running you...
ALGO
0.999886
5.296979
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-06-09T09:52: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": "7dd44a1c75...
c6470004-ecc4-4bdd-a20a-32b9b664f88b
AnasAbdullh/Soultions_Problems_Solving_Level2
S21.cpp
#include <iostream> #include <cstdlib> using namespace std; enum enCharType { SmallLetter = 1, CapitalLetter = 2, SpecialCharater = 3, Digit = 4 }; int RandomNumber(int From, int To) { // Function to Generate a random number int randNum = rand() % (To - From + 1) + From; return randNum; } ...
TOOL
0.98984
3.42149
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-11T13:59:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3cfccb8b8158...
e3e2518d-99ca-4634-b316-2e4c7f171bda
sherman-tang/PAT
BASIC_LEVEL_PRACTICE/1011.cpp
#include <iostream> #include <string> #include <vector> /* 1011 A+B 和 C describe: 给定区间 [−2​^31​​,2^​31​​] 内的 3 个整数 A、B 和 C,请判断 A+B 是否大于 C input format: 输入第 1 行给出正整数 T (≤10),是测试用例的个数。随后给出 T 组测试用例,每组占一行,顺序给出 A、B 和 C。整数间以空格分隔 output format: 对每组测试用例,在一行中输出 Case #X: true 如果 A+B>C,否则输出 Case #X: false,其中 X 是测试用例的编号(从 1 开始)...
ALGO
0.997415
4.529207
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-11-09T08:34:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a627cd6d...
a503e011-41cb-47dd-85b4-a4306e495e50
gs0622/algo
getRank.cc
#include <algorithm> #include <iostream> #include <vector> using namespace std; class Solution { int indexOf(vector<int> nums, int x) { int mi, lo = 0, hi = nums.size()-1; while (lo <= hi) { mi = lo + (hi - lo)/2; if (nums[mi] < x) lo = mi+1; else if (nums[mi] > x) hi = mi-1; else return mi; } retu...
ALGO
0.999992
5.238577
{ "github_metadata": { "branch": "master", "commit_count": 214, "repo_created_at": "2014-05-18T16:35: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": "5b3a3637...
2bab0541-7660-4b94-919a-b9ca3e5574db
papazloynt/techno_aisd
Module_3/1/arcgraph/arc_graph.cpp
#include "arc_graph.h" #include <cassert> ArcGraph::ArcGraph(const IGraph& graph) : vert_count(graph.VerticesCount()) { for (int i = 0; i < vert_count; ++i) { for (auto &neigh: graph.GetNextVertices(i)) { pairs.emplace_back(i, neigh); } } } void ArcGraph::AddEdge(int from, int to) ...
ALGO
0.927809
5.524735
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-12-29T22:59: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": "f0938e4318a3...
02baf856-08af-4fef-acf2-3b78baeb6f25
K1XE/LeetCode
7.二叉树/19.最大二叉树/654.最大二叉树1.cpp
/* * @lc app=leetcode.cn id=654 lang=cpp * * [654] 最大二叉树 */ #include <bits/stdc++.h> #include <ranges> using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; // @lc code=start /** * Definition for a binary tree ...
ALGO
0.999993
7.004768
{ "github_metadata": { "branch": "main", "commit_count": 183, "repo_created_at": "2025-04-12T03:26:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "260a5eba3f...
ea64435d-df7d-4586-aa31-16812739ce49
joseeduardoleite/trabalhos-faculdade
Trabalho2/Exercicio2/Exercicio2/Exercicio2.cpp
#include <stdio.h> #include <conio.h> #include <stdlib.h> //função para base de calculo double func(double salario) { double aliquota; if (salario <= 1637.11) { aliquota = 0.0; salario = 0.0; } else if (salario <= 2453.50) aliquota = 0.075; else if (salario <= 3271.38) aliquota = 0.15; else if (salario...
TOOL
0.998402
3.98076
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-11-06T01:41: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": "170e4b6c5f10...
1f58cd0c-76d0-4987-b703-896883f71365
abhishek18124/PPCPPJune2023
Lecture 13/007Arrays_ProductOfArrayExceptSelfOptimised.cpp
// contraints : n <= 100 #include<iostream> using namespace std; int main() { int nums[] = {1, 2, 3, 4, 5}; int n = sizeof(nums) / sizeof(int); int l[100]; l[0] = 1; for (int i = 1; i < n; i++) { l[i] = l[i - 1] * nums[i - 1]; } int r[100]; r[n - 1] = 1; for (int i = n - 2; i >= 0; i--) { r[i] = r[i ...
ALGO
0.999948
3.854347
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2023-07-15T07:39:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7e886c3212...
69c51425-eb3f-41ce-bc35-925b4041ac17
RedrickSchuhart/Coursera
C++/1_course/week_3/Persons_1/main.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; struct names{ string name; int year; }; bool Check(names a, names b) {return a.year<b.year;} class Person { public: void ChangeFirstName(int year, const string& first_name) { first.push_back({first_name...
ALGO
0.927268
4.290024
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-08-26T18:10:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3323554956...
0c6faec2-ef50-4b9f-af8b-86c5917ffa4d
mongodb/mongo
src/third_party/boost/libs/math/include/boost/math/special_functions/trigamma.hpp
// (C) Copyright <NAME> 2006. // (C) 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_SF_TRIGAMMA_HPP #define BOOST_MATH_SF_TRIGAMMA_...
TOOL
0.9002
6.254532
{ "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": ...
2568f1b7-290d-42a8-9f96-639fd59cf6e2
Mohamed-Elwaei/CSES.fi-Solutions
Tree Algorithms/Tree Matching.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <set> using namespace std; int n; /* First root the tree. Use a recursive function. The recursive function will return a tuple of size 2. The first element is what would be the maximum size if the root was included. The seco...
ALGO
0.999871
4.184105
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-02-03T15:36: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": "fa920c690e90...
39fe523e-f1da-40fe-91ff-e7e77ea034e6
kamyu104/LeetCode-Solutions
C++/count-increasing-quadruplets.cpp
// Time: O(n^2) // Space: O(n) // dp class Solution { public: long long countQuadruplets(vector<int>& nums) { vector<int64_t> dp(size(nums)); // dp[j] at l: # of tuple (i, j, k) s.t. i < j < k < l and nums[i] < nums[k] < nums[j] int64_t result = 0; for (int l = 0; l < size(nums); ++l) { ...
ALGO
0.999934
5.917268
{ "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": ...
eca4b62c-ebe2-4397-8cf7-b8e39ef9c2c5
yu-yy23/2023Fall-Fundamental-of-Programming
[w6]homework/[w6]hw-oj2411.cpp
#include <iostream> #include <cstring> using namespace std; int main() { //定义及初始化 char sentence[5000] = ""; int position[5000] = {-1}; int count = 0; cin.getline(sentence, 5000); int sentence_length = strlen(sentence); //寻找分离单词的位置 for (int i = 0; i < sentence_length; i += 1) { ...
ALGO
0.999974
3.755201
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-28T14:23: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": "d89cba59a44d...
ab11d5a2-a5a6-43a0-872f-f3a398ad2823
azecoder/Problem-Solving
E-olimp/554. Inscribed Circle .cpp
#include <bits/stdc++.h> #define rep(a, b, c) for(int (a) = (b); (a) <= (c); ++(a)) using namespace std; typedef long long ll; typedef double ld; #define MAX 10 #define EPS 1e-7 int x[MAX], y[MAX]; void Bisect(int n, ld &a, ld &b, ld &c) { ld x0 = x[n-1], y0 = y[n-1]; ld x1 = x[n], y1 = y[n]; ld x...
ALGO
0.999958
4.165728
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2018-11-12T15:42:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18eeddf70...
9f47fe52-eace-4c48-aeab-673be8ef189f
dangbach3107/PTIT_Discrete_Mathematics_2
tim_duong_di.cpp
#include <bits/stdc++.h> using namespace std; int a[100][100], check[100], truoc[100], n; void DFS(int u){ check[u] = 1; for(int v = 1; v <= n; v++){ if(a[u][v] && !check[v]){ truoc[v] = u; DFS(v); } } } void BFS(int u){ check[u] = 1; queue <int> q; q.p...
ALGO
0.999997
4.802503
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-05-27T15:33:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4b8ebfb71ba...
08f1657d-47d0-4863-a5c1-f5e76558b3c5
VladAndral/Catalan_GreedyRobot
GreedyRobot.cpp
#include "GreedyRobot.h" #include <iostream> using namespace std; /* IDEA: ONLY GO IN ONE DIRECTION, AND FOR EACH LIST ELEMENT, FLIP X-AXIS DIRECTION TO Y-AXIS DIRECTION ^ NEVERMIND, ONLY WORKS FOR SQUARES, AND FRANKLY IS MORE WORK THEN BASIC RECURSION */ int main(int argc, char *argv[]) { // argv is a pointer t...
ALGO
0.99963
4.262731
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-10-18T21:29: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": "1b846ea380e...
8246783b-b2c8-472e-b39d-8034f55ac6be
RocksnStuff/cosc3500_major_project
tester.cpp
#include <iostream> #include <time.h> #include <chrono> #include <vector> #include <dirent.h> #include <string> #include <fstream> #include "solver.hpp" #include IMPLEMENTATION_INCLUDE using namespace std; int main(int argc, char* argv[]) { if (argc < 9) { cerr << "Not enough args" << endl; cerr ...
ALGO
0.995701
5.198726
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-11-12T07:47: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": "1b4efc79e2...
5c3cb6c5-33e6-4847-9bc4-ba0ea980d0cc
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Source/Runtime/GeometryCore/Public/Implicit/SparseNarrowBandMeshSDF.h
// Copyright Epic Games, Inc. All Rights Reserved. // Port of geometry3Sharp MeshSignedDistanceGrid #pragma once #include "MathUtil.h" #include "MeshQueries.h" #include "Util/IndexUtil.h" #include "Spatial/MeshAABBTree3.h" #include "Spatial/BlockedLayout3.h" #include "Spatial/BlockedDenseGrid3.h" #include "Async/Par...
ALGO
0.999864
5.296454
{ "github_metadata": { "branch": "5.4", "commit_count": 164, "repo_created_at": "2023-03-14T06:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3ad95d5cd9...
6ac3b60a-619e-45b4-a607-877802dd9175
cslomarfaruk/Real-life-problem-solving-
P by Q making from a expanded simple continued fraction.cpp
// #include <bits/stdc++.h> #include <iostream> #include <vector> #include <map> #include <set> #include <algorithm> #include <string> using namespace std; /* * * * * * * * * * * * * * * * * !(I hate Coding) * * * * * * * * * * * * * * * * */ #define int long...
ALGO
0.999805
3.474508
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-03-04T09:21: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": "b4185708938e...
fb8f51de-d0a4-4b2f-861d-9696fa7bb8bb
gamous/LuaOodle
Oodle/include/texture/rrdxt1vqhelp.inl
// Copyright Epic Games, Inc. All Rights Reserved. // This source file is licensed solely to users who have // accepted a valid Unreal Engine license agreement // (see e.g., https://www.unrealengine.com/eula), and use // of this source file is governed by such agreement. #pragma once #include "rrdxtcblock.h" #includ...
ALGO
0.990858
5.603659
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-09-10T11:34:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "4cfdb0993c44...
a2e9a220-6a2c-4787-8443-bfec09024181
CannotDeFine/Xmuoj
Xmuoj/acw829.cpp
/* * @Author: cdf * @Date: 2025-01-07 20:29:35 * @LastEditors: cdf * @LastEditTime: 2025-01-07 20:33:06 * @Description: 模拟队列 */ #include<bits/stdc++.h> using namespace std; const int N = 100; int que[N], front = 0, tail = 0; void push_x(int x) { que[tail] = x; tail ++; } void pop_x() { front ++; ...
ALGO
0.947322
3.981414
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2025-04-03T13:44:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5fb58f258...
97cc3282-92c7-46c9-84ec-b2544328f3eb
GauravUpreti893/LeetCode
Find duplicates in an array - GFG/find-duplicates-in-an-array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: vector<int> duplicates(int arr[], int n) { // code here vector<int> ans; int mx = 0; for (int i = 0; i < n; i++) { arr[i]++; mx = max(...
ALGO
0.999485
5.839847
{ "github_metadata": { "branch": "main", "commit_count": 4576, "repo_created_at": "2022-02-01T16:25:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4193836f7...
d9c2f4c3-f35d-4978-81c1-899844f8ac5c
ADS-bot/Leetcode
3256-maximum-value-sum-by-placing-three-rooks-i/3256-maximum-value-sum-by-placing-three-rooks-i.cpp
class Solution { public: using ll = long long; long long maximumValueSum(vector<vector<int>>& board) { ll n = board.size(), m = board[0].size(); ll no_nodes = 2 + n + m; vector<vector<ll> > adj(no_nodes); vector<vector<ll> > capacity(no_nodes, vector<ll>(no_nodes, 0)); v...
ALGO
0.999917
5.453168
{ "github_metadata": { "branch": "main", "commit_count": 9268, "repo_created_at": "2023-03-24T13:42:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15f611340...
5cd2ba6f-d346-406e-8464-08871000e5bc
0xm4yo/compro
atcoder/asakatsu/asakatsu20231119arc/A.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using ull = unsigned long long; #define rep(i, a, b) for(ll i=a; i<b; i++) #define rrep(i, a, b) for(ll i=a; i>=b; i--) #define all(a) (a).begin(), (a).end() #define YesNo(bool) if(bool){cout<<"Yes"<<en...
ALGO
0.996924
4.718339
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2024-05-07T13:22: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": "efa3d2d497...
00f4ab8e-530a-47b6-b9a9-1b89746f325f
Lazarus-10/Striver_SDE_Sheet_Challenge
Day-2_Array-2/find_missing_and_repeating_number.cpp
#include<bits/stdc++.h> using namespace std; #include <bits/stdc++.h> bool isSet(int num, int pos){ int i=0; while(i != pos){ num >>= 1; i++; } return num&1; } pair<int,int> missingAndRepeating(vector<int> &arr, int n) { //--------- O(5n), O(1) ---------- // E.g {4,3,2,1,1} ...
ALGO
0.999948
3.923702
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-06-10T15:40:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9277cd4f27d...
8a062203-5854-4021-bff6-f00fd472a82e
LIMDANBI/STUDY_CT
Bootcamp 교육/스도쿠.cpp
#include<iostream> #include<vector> #define MAX 9 using namespace std; struct POS{int y, x;}; vector<POS> pos; // 빈칸 좌표 int N; // 빈칸 개수 bool ismake; // 스도쿠를 만들었는지 int sdoku[MAX][MAX]; // 스도쿠 정보 void input(){ for(int i=0; i<MAX; i++){ for(int j=0; j<MAX; j++){ cin >> sdoku[i][j]; i...
ALGO
0.999834
4.55712
{ "github_metadata": { "branch": "main", "commit_count": 599, "repo_created_at": "2022-11-27T19:17:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b78395eba9...
96f293ed-f478-464b-b154-7835ebe5af2d
OprahDingus/Decode-DSA-C--
Week 11 - Recursion/55 Recursion Part 4/07_combinationSumLC.cpp
#include <iostream> #include <vector> using namespace std; void combination(vector<vector<int>>& ans, vector<int> v, vector<int>& candidates, int target, int idx) { if(target == 0) { ans.push_back(v); return; } if(target < 0) { return; } for(int i = idx; i < candidates.size(...
ALGO
0.999943
5.913188
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-07-03T09:46: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": "e473f1fb81...
a8af4f8b-969b-49fb-837c-93eaa5df8475
kyamagu/mexopencv
src/+cv/boundingRect.cpp
/** * @file boundingRect.cpp * @brief mex interface for cv::boundingRect * @ingroup imgproc * @author <NAME> * @date 2011 */ #include "mexopencv.hpp" #include "opencv2/imgproc.hpp" using namespace std; using namespace cv; /** * Main entry called from Matlab * @param nlhs number of left-hand-side arguments * @...
ALGO
0.978239
6.897092
{ "github_metadata": { "branch": "master", "commit_count": 1445, "repo_created_at": "2011-12-26T01:59:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 664, "forks": 319, "issues": 37, "pull_requests": 2 }, "file_meta": { "content_id": "52...
a67d5f44-d357-421b-846d-929375662c1f
Koepoe/AOC2023
Day 08/Day8P2.cpp
#include <iostream> #include <vector> #include <fstream> #include <utility> std::vector <int> findPosOfBeginValues(std::vector <std::string> allValues) { std::vector <int> pos; for (int i = 0; i < allValues.size(); i++) { if (allValues.at(i).at(allValues.at(i).length() - 1) == 'A') { pos.pu...
ALGO
0.999877
5.347305
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-12-01T14:51: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": "bd70d1ceca6...
84a9d1f0-3439-47e7-94bf-e080a0b73fba
KMORaza/Data_Structures
Graphs/Viterbi_Algorithm.cpp
#include <iostream> #include <vector> #include <cmath> class ViterbiAlgorithm { public: ViterbiAlgorithm(const std::vector<std::vector<double>>& transitionMatrix, const std::vector<std::vector<double>>& emissionMatrix, const std::vector<double>& initialProbabilities) ...
ALGO
0.999998
7.292899
{ "github_metadata": { "branch": "main", "commit_count": 233, "repo_created_at": "2024-01-15T08:21:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5caf30a66...
b8805dfb-c050-46ed-b084-6245f6fea27f
bentheredonethat/CS-315-Lab-5
CS315Lab_5.cpp
#pragma warning(disable: 4996) #include <string> #include <iostream> #include <ostream> #include <vector> #include <stack> #include <cstdlib> #include <iomanip> #include <fstream> using namespace std; class String{ private: enum { SZ = 80 }; char str[SZ]; public: String(){ strcpy(str, ""); } String(char s[]){ str...
ALGO
0.99402
4.199768
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-06-26T17:24: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": "145166e5ea...
c9137d80-07b8-49b7-8308-6f2e1146dce9
ianespana/Codigo-Carrera-UAQ
Estructura de Datos/Actividad 04/Actividad 04/Actividad 04/Actividad 04.cpp
#include <iostream> int main() { int nums[] = {7, 6, 2, 4, 5}; int aux; for (int i = 0; i < 5; i++) { for (int j = 0; j < 4; j++) { if (nums[j] > nums[j + 1]) { aux = nums[j]; nums[j] = nums[j + 1]; nums[j + 1] = aux; } ...
ALGO
0.999974
5.320684
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2021-02-22T13:27:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "1f4133497...
9c77bcc3-bc27-46db-a830-d94bf4a60904
skp2140/CliqueLib
Benchmarking/KNN/benchmark_knn.cpp
//============================================================================ // Name : benchmark_knn.cpp // Author : CliqueLib // Version : // Copyright : // Description : Main function for benchmarking KNN //============================================================================ #include <io...
ALGO
0.993292
6.65009
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2017-03-23T04:37:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb726a6c...
f2926409-25bc-48fa-aef5-b369314bcf9d
kothariji/competitive-programming
Dynamic Programming/(CODECHEF) C2 - Successor (Slightly Harder Version).cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define MP make_pair #define pb push_back #define FS first #define SC second #define INF 1LL<<60 #define all(v) v.begin(), v.end() typedef pair<int,int> ii; typedef pair...
ALGO
0.999962
4.327384
{ "github_metadata": { "branch": "master", "commit_count": 1881, "repo_created_at": "2020-08-27T07:08:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 680, "forks": 501, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "fed...
e9c64020-460e-42d5-b3d8-4291208e6c33
ishandutta2007/codeforces-z
zidder/normal/1556/D.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; void solve(int test_ind){ int n, k; cin >> n >> k; long long a12, a13, a23, o12, o13, o23; cout << "and 1 2" << endl; fflush(stdout); cin >> a12; cout << "or 1 2"...
ALGO
0.999799
3.639777
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:43: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": "9b94518e910c...
3fca5348-a231-43c1-ac86-ee868168c4b8
PravarAnu/Pre-Placement-Program-Ineuron
DSA/Searching & Sorting/Assignment 19/Question05.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; vector<int> rearrangeArray(vector<int> &nums) { vector<int> pos; vector<int> neg; for (auto i : nums) { if (i >= 0) { pos.push_back(i); } else { neg.push_back(i); } } i...
ALGO
0.999967
5.093069
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2023-05-25T12: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": "2a342a2e2...
096f54c4-8ced-45d3-bb73-0999ee0a74d4
luismarioram99/contest-training
mensual4/C/base.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef pair<ll, ll> pl; typedef vector<pl> vll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; #define F first #define S second #define UNVISITED 0 #define VISITED 1 int n, m; vector<vi> g; vi v...
ALGO
0.999862
4.018589
{ "github_metadata": { "branch": "develop", "commit_count": 64, "repo_created_at": "2021-08-15T17:04: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": "515d5b2f...
483c4d8e-3bd2-49d9-b03c-bab36d9ecb4c
b2utyyomi/Data-Structure-practice
两城市最短距离/main.cpp
#include <iostream> #include <cstring> using namespace std; const int inf = 0x3f3f3f; const int maxn = 1000; bool vis[maxn]; int d[maxn]; typedef struct arcnode { int adjvex; int weight; arcnode *nextarc; }; typedef struct vode { int data; arcnode *firstarc; }Adjvex[20]; struct Graph { int vex...
ALGO
0.999905
3.40926
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-04-12T07:55: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": "5f429fe383...
5ae3b91a-65f4-4b36-914f-2f34ac2e6501
ishandutta2007/codeforces-a
anadi/normal/819/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int LL; #define st first #define nd second #define pb push_back #define PLL pair <LL, LL> #define PII pair <int, int> const int N = 1000 * 1000 + 7; int n; int perm[N]; vector <int> T[N]; int main(){ scanf("%d", &n); LL bestAns, curAns = 0LL; int ...
ALGO
0.999846
3.137678
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "b003f4066ea4...
dbffa76f-7fc3-4da4-af9e-151ec8f07441
menon92/Competitive-Programming
Uva/cpp-solution/11080.cpp
/** * Problem : 11080 - Place the Guards. * Verdict : Accepted. * Author : <NAME>. * Algorithm : DFS. * Date : 07.01.2016. **/ #include <iostream> #include <vector> #include <queue> #include <cstdio> #include <algorithm> using namespace std; const int mx = 201; int color[mx]; vector<int> graph[mx]; int BF...
ALGO
0.999931
4.234698
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2015-09-08T05:28:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4207064...
716bafb4-1dfb-421b-b33e-36fe6701a0be
udonyang/acmps
acdream/46/A/Image Perimeters.cpp
#include <cstdio> #include <cstdlib> #include <iostream> #include <cstring> using namespace std; #define Rep(c, a, b) for (int c = a; c < b; c++) #define Nre(c, a, b) for (int c = a; c > b; c--) #define MAXN (2200) #define INFI (0x7fffffff) int main() { #if 1 freopen("test.txt", "rt", stdin); #endif ...
ALGO
0.994707
3.164468
{ "github_metadata": { "branch": "master", "commit_count": 269, "repo_created_at": "2013-04-01T00:39:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d02f2bc6...
61e36d6d-9f65-4e71-a91b-e3caa84852ac
Ujjwal151/Competitive-Programming-Code
STL Learning/8.Vector-8(accumulate, max,min,sort).cpp
////accumulate, *min, *max, sort //#include <iostream> //#include<vector> //#include<algorithm> // for using *min/max element (v.begin(),v.end()) //#include<numeric> // for using accumulate(v.begin(),v.end(),0) function //using namespace std; // //const int x = 10; //vector<int>:: iterator it; //vector<int> v; // //pri...
ALGO
0.99731
5.063301
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-07-01T14:03: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": "6389a1e97564...
95652269-b1de-4e80-9a6c-d468042f4854
akgupta0777/6Companies30days
Adobe/Knights-In-A-Chessboard.cpp
/* Explanation: We traverse all the 8 possible moves and get the probability when k is 1 we know he can choose 8 directions and probabilty is 1 at that time so we explore all 8 possibility and get the probability and store the computations in cache to get probability when we need it to save recursive calls. */ class S...
ALGO
0.999921
4.917291
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2023-01-05T06:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc6fe26ac8b...
735dc3f5-ad16-47b9-90f7-535bbf49cdd5
dd4no/Cplusplus
blackjack/blackjack.cpp
/***************************/ /* BLACKJACK */ /* ------------ */ /* <NAME> */ /***************************/ /////////// libraries ///////////////////// #include <iostream.h> #include <stdio.h> #include <stdlib.h> #include <time.h> ////////// functions //////////////////// int card(); ...
ALGO
0.915025
3.492075
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-04-22T19:53: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": "45817c6030...
ad94d9fe-1f1b-45f1-b16d-9ce4efd8b643
Primus-max/FP_HW_21_1
FP_HW_21_1_Task_3.cpp
#include "func_headers.h" #include "message_utils.h" #include <cstring> #include <fstream> #include <iostream> using namespace std; void encryptCaesar(char* text, int key) { int length = strlen(text); for (int i = 0; i < length; ++i) { if (isalpha(text[i])) { char base = isupper(text[i])...
TOOL
0.933636
5.042274
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-04-06T16: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": "12bb0cc3b3...
93ab7150-5ab0-41c5-a570-5d0124374aa9
V0vkaM0rkovka/Laboratory
Project1/Project1/Инфа2.cpp
//Метод половинного деления // //#include <iostream> //#include <cmath> //#include <ctime> //#include <clocale> //using namespace std; // //double eps; //double f(double x) //{ // return x - 2 + sin(1 / x); //} // //double n(double x1,double(*f)(double), double x2) //{ // cout << "Введите точность: " << endl; // ...
ALGO
0.999813
3.803039
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-12-16T23:17: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": "58b1aa013257...
137de047-3d15-4e8a-bb06-f068790b2414
ompl/ompl
src/ompl/geometric/planners/informedtrees/aitstar/Queuetypes.h
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2019, University of Oxford * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the followin...
ALGO
0.962306
7.244131
{ "github_metadata": { "branch": "main", "commit_count": 4948, "repo_created_at": "2014-05-20T14:22:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1776, "forks": 636, "issues": 80, "pull_requests": 28 }, "file_meta": { "content_id": "dea...
c8dd0f94-105f-49e4-b0ef-33b09a3a4f2c
hotpot-tallow/apriltag_track
src/test/include/PID.hpp
// // Created by xyl on 24-3-12. // #ifndef SRC_USER_ALGROTHM_H #define SRC_USER_ALGROTHM_H #include <cmath> #include "Eigen/Dense" template<typename T> class PID { private: T error_p;//当前误差 T error_i;//累计误差 T error_d;//误差变化率 T error_last;//上一次计算的误差值 T separate_integral;//积分分离阈值 T output_li...
ALGO
0.979107
5.139461
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-05-13T03:24: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": "ac3176bcd4...
2d3d6767-9691-4d73-87e7-2b3193355a24
VrajParekh/Programming-Languages
Data Structure/Sorting/3_Selection_Sort.cpp
#include <iostream> using namespace std; void display(int a[], int n) { for (int i = 0; i < n; i++) { cout << a[i] << " "; } } void selectionSort(int a[], int n) { for (int i = 0; i < n - 1; i++) { int indexOfMin = i; for (int j = i + 1; j < n; j++) { if ...
ALGO
0.999934
4.443318
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-06-16T13:28:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "188616d36bd...
d060b4ea-d00b-4fd7-a34a-0bf8b8127846
jeevankhetwani/Coding-Practice
GGJempingNumbers.cpp
//// //// Created by jeevan on 3/25/17. //// //#include <iostream> //#include <queue> // //#define rep(i, n) for(int i = 0; i < n; i++) //#define fi(i, a, b) for(int i = a; i <= b; i++) //#define fd(i, a, b) for(int i = a; i >= b; i--) // //using namespace std; // //void printDigit(int d, int n) { // // int num, num...
ALGO
0.999519
5.210005
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-07-28T13:26:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e537951c6d...
232e1ad3-b8ae-4725-b4d8-df5f990fc9e2
Sachin7717/DSA
daa/backtracking.cpp
#include <iostream> #include <vector> using namespace std; void findSubset(vector<int>& S, int target, vector<int>& current, int index, int sum) { if (sum == target) { // If the current subset sums up to the target, print it cout << "Solution: {"; for (int i = 0; i < current.size(); ++i) {...
ALGO
0.999686
5.245214
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2024-02-15T04:54:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7721bff4dbb...
4fc7e1c8-2c45-433b-940b-b207fe7f62ab
cholovirus/123
codigos ccomp I 2019/control2/control2.cpp
#include <iostream> using namespace std; void cambio(int *ptr,int *ptr2){ int temp=*ptr; *ptr=*ptr2; *ptr2=temp; } int suma_recursiva(int *arr,int len,int suma=0){ if(len<0){return suma;} else{ int *ptr=arr+len; suma+=*ptr; return suma_recursiva(arr,len-1,suma)...
ALGO
0.999564
4.626542
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2018-08-21T14:08: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": "ad31c0dd...
acdd07dd-9a99-427c-ab2c-0be2b7dd0366
USGS-Astrogeology/ISIS_contrib
ISIS_scaledRadiusEquirectangular_Mars/ISIS_scaledRadiusEquirectangular_Mars.cpp
/************************************************************************** # #_TITLE ISIS_scaledRadiusEquirectangular_Mars.cpp # #_ARGS # #_Parm center_lat = center lattiude or standard_parallel for the map projection # #_Parm center_lon = center longitude. Shouldn't change the results. # ...
ALGO
0.997058
5.898141
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2016-06-26T17:22:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 14, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "89a047fb...
49bf8623-64a2-460a-9bda-d238d26043c3
Tangjiahui26/CrackingCode
Hard/VolumeOfHistogram/main.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // solution 1 - runtime O(n^2): // compute volume between start and end // assume that the tallest bar and the second tallest is at start or end (index) int borderedVolume(vector<int> histogram, int start, int end){ if (start >= end)...
ALGO
0.999958
5.785046
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2019-04-26T06:11: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": "d389240d...
b76e9904-2ad2-4d70-a714-46b285269a8a
yash0530/Competitive-Programming
02 CONTESTS/Codeforces/695B/C.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define INF (int) 9e18 #define HELL (int) (1e9 + 7) #define int long long #define double long double #define uint unsigned long long #define pii pair<int, int> #define pb push_back #define fs first #define sc second #define size(aa) (int) aa.size() #defin...
ALGO
0.999985
4.407928
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-12-15T06:50:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e09ab03...
53aacf58-ed22-46ba-946c-21cc8d0a1828
jklsmnk/Homework
BubbleSort.cpp
#include <iostream> using namespace std; const int N = 100; void BubbleSort(int[], int); void RandomArray(int[], int); void DisplayArray(int[], int); void Swap(int&, int&); int main() { const int N = 100; int arr[N] = { 0 }; int n = 20; while (true) { cout << "Enter n > 0 and n <= N: "; cin >> n; if (n >...
ALGO
0.994536
4.712463
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2016-10-24T12:41: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": "4edd10c12...
d835ed06-4773-4cff-9af2-79787b2aa81a
dxcloud/MLP
exemples/mcp.cpp
#include <cmath> #include <ctime> #include <cassert> #include <fstream> #include <iostream> #include <algorithm> #include <boost/array.hpp> #include <boost/random.hpp> #include <boost/cstdlib.hpp> #include <boost/tuple/tuple.hpp> #include <boost/numeric/ublas/io.hpp> #include <boost/numeric/ublas/vector.hpp> #include...
DATA
0.992347
3.264838
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2012-12-13T10:56: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": "04b97245cb...
eaa64e0f-73d7-41cc-9479-570313938b70
AlaminHossain01052000/competitve-programming
Number_Theory/divisors/divisorsUsingFactors.cpp
// if n=(p1 ^ a1)*(p2 ^ a2)... //NOD = Number Of Divisors=(a1+1)*(a2+1) //SOD = Sum Of Divisors(p^(i+1)-1)/p-1 #include<bits/stdc++.h> using namespace std; const int N=1e6+10; vector<int> isPrime(N,1); int hp[N]; int lp[N]; // To count highest Prime void seive(){ for(int i=2;i<N;++i){ if(isPrime[i]){ ...
ALGO
0.999976
4.428089
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2022-08-16T15:34:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b613ebb526...
afd48921-6001-4103-8073-1d575eee9479
AlaminJust/C-
DynamicTrie.cpp
///https://www.youtube.com/watch?v=9eAkWlZQBH4&list=RD9eAkWlZQBH4&start_radio=1 #include<bits/stdc++.h> using namespace std; #define ll long long #define dbug printf("I am here\n"); #define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); const int maxn = 2e5+100; const ll inf = 1e18; char str[maxn] , ...
ALGO
0.999984
3.058569
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2019-02-20T15:03:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e4fd0dd5...
d6df6d8d-ed0c-4ce6-8c23-f3b19bfb1deb
yudhik11/google_kickstart
2020/d/beauty_of_tree.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; using namespace __gnu_pbds; #define TRACE #ifdef TRACE #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> voi...
ALGO
0.998225
3.569335
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-08-19T06:39: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": "7cb16a9dc...
f4d3f4eb-e5c2-4581-906a-28e66eb66b70
jpucilos/classwork_archive
EE553/Homework/HW1/HW_1d_JoePuciloski.cpp
/* do this as float and as double sum1= 1/1 + 1/2 + ... + 1/100 sum2= 1/100 + 1/99 + .... + 1/1 print out sum1 print out sum2 print out sum1 - sum2 You should see that the two sums are not quite equal, which leads to the question, which is more correct? We will review that in class. */ #include<iostream> using namespa...
ALGO
0.935742
4.160826
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2017-09-15T16:32:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca671ed17...
5f8ccf53-97b4-41fb-beb4-4b8b490a0e0f
Zlin0509/Zlin_ACM
_CF/CONTEST/1500-1999/1773/B.cpp
// // Created by 27682 on 2025/4/23. // #include "bits/stdc++.h" #define endl '\n' using namespace std; typedef long long ll; typedef unsigned long long ull; typedef __int128 i128; typedef double db; typedef long double ldb; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int, int> pii; typedef pair<ll, ...
ALGO
0.999992
4.414145
{ "github_metadata": { "branch": "main", "commit_count": 170, "repo_created_at": "2024-08-16T08:10:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e356564367...
7ee19fdd-3b40-49ab-a5d1-b53b60951f43
infikei/algorithm
baekjoon_all/10000+/boj_10999.cpp
// Solve 2023-06-12 #include <bits/stdc++.h> using namespace std; #define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); // boj_15552.cpp #define SETPRECISION(n) cout << fixed;cout.precision(n); // boj_1008.cpp #define SIZE(v) (int)v.size() #define ALL(v) v.begin(),v.end() using ll = long long;...
ALGO
0.999909
5.476824
{ "github_metadata": { "branch": "main", "commit_count": 1613, "repo_created_at": "2022-05-22T18:51:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "76b825bf6...
ff563bb0-b672-45b0-ac3c-f16124b4141f
Gy-Hu/HWMCC24-benchmark
WASIM/wasim-cpp_wenji/framework/state_simplify.h
#pragma once #include "term_manip.h" #include "ts.h" namespace wasim { // check if there is an insection between free vars in expr and set_of_xvar bool expr_contains_X(const smt::Term & expr, const smt::UnorderedTermSet & set_of_xvar); // will update xvar_sub with each xvar in (set_of_xvar AND free_var) // such ...
ALGO
0.99185
5.749403
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-08-10T04:10:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72252d976b...