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
b7a77ef2-e226-434b-af48-5f682f303758
Srinjoy100/GFG160b
Sorting/3.Count_Inversions.cpp
class Solution { public: // Function to count inversions in the array. int merge(vector<int>& arr,int st,int end,int mid) { vector<int> temp; int i = st; int j = mid+1; int inVCount=0; while(i<=mid && j<=end ) { if(arr[i]<=arr[j]) { ...
ALGO
0.999958
5.720347
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-06-15T11:19:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "493941a76ce...
461410f2-389e-4ab4-b710-b5b85e247f3c
return19/All-C-Codes
hackerrank/candles-2.cpp
#include<bits/stdc++.h> using namespace std; long long MOD=1000000007; long long n,k,n1; class bit { public: long long arr[50010]; long long n; public: bit(){ // memset(arr,0,sizeof(long long)*(n+5)); } void setn(long long x) { n=x; memset(arr,0,sizeof(long long...
ALGO
0.999979
3.826637
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-03-17T16:54: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": "9b331a4460...
2554cea1-ecc9-4dd1-b0bb-e68c81620dc9
Java-Sith/Study-Plan
RotateArray.cpp
/* Given an integer array nums, rotate the array to the right by k steps, where k is non-negative. A good hint is to reverse the array or parts of it. */ #include <iostream> #include <vector> #include <algorithm> #include <cassert> using namespace std; void reverse(vector<int>& nums, int start, int end) { whil...
ALGO
0.999888
6.412422
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-09-11T07:26:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a9e79611940...
d44e662c-d3df-429e-b1b0-64718c82a88b
Tabassum-Maria/Codes
Dynamic programming/Road cutting.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> /** ---- Paknami Starts ----*/ #include <iostream> #include<cmath> #include <string> #include <vector> #include <sstream> #include <algorithm> #include <queue> #include <map> #include<set> #include <unordered_map> using namespace std; #defi...
ALGO
0.999935
3.215696
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-02-03T14:27: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": "a1389787fc9f...
a3e02b27-cf41-4aac-b28c-36688f4b17a6
holt-crews/pdr
labs/lab10/huffmandec.cpp
// <NAME>, jhc6we, 11/22/17, huffmandec.cpp // This program is the skeleton code for the lab 10 in-lab. It uses // C++ streams for the file input, and just prints out the data when // read in from the file. #include <iostream> #include <fstream> #include <sstream> #include <stdlib.h> #include <map> #include "HNode.h...
ALGO
0.995911
3.816466
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-09-17T18: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": "779fe4b084...
fd8eeb37-e132-4666-b316-dce05c57bd25
Nestnet-study/nestnet_algorithm_2024_2_beginner
suyeonie/week_2/boj_11328.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { int N; string a, b; cin >> N; for (int i = 0; i < N; i++) { int al[26] = {}; cin >> a >> b; // 문자열 a의 각 문자에 대해 알파벳 출현 빈도 증가 for (auto c : a) al[c - 'a']++; ...
ALGO
0.999974
5.050888
{ "github_metadata": { "branch": "main", "commit_count": 207, "repo_created_at": "2024-09-30T07:44:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "367c313a84...
3af2274c-f67c-4d54-859c-c46d0c82ad92
Bhushan1609/Data-Structure-and-Algorithms
DSA/14_Step Binary Search Trees [Concept and Problems]/Lec 2 Practice Problems/13_Largest BST in Binary Tree/CPP.cpp
#include<bits/stdc++.h> using namespace std; template<class T> class TreeNode{ public: T data; TreeNode *left , *right; TreeNode(T data){ this->data=data; this->left=NULL; this->right=NULL; } TreeNode(T data , TreeNode* left, TreeNode* right){ this->data=data; ...
ALGO
0.999923
4.36698
{ "github_metadata": { "branch": "main", "commit_count": 502, "repo_created_at": "2023-11-09T14:53: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": "b17dc451e4...
644c1167-b545-41c7-b0ce-c78581fa47ee
OperDoc/newOlimp
String/automata.cpp
#include <bits/stdc++.h> using namespace std; const int N = 100100; const int K = 30; int len[N]; int link[N]; int next[N][K]; int sz; int last; inline int myint(char c) { return 0; } inline void addChar(char c) { int cur = sz++; len[cur] = len[last] + 1; int p; for (p = last; p != -1 and !next[N][myint(c...
ALGO
0.999961
3.195452
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-10-21T08:17: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": "c5a703ec5c...
c265cd53-09e9-431e-80a7-ecee5e187726
Hamdor/PLHSM2
src/fsm_state_matrix.cpp
// <-- HEADER // Die möglichen Zustände enum states { NO_CHANGE = -1, STOPPED, // 0 RUNNING, // 1 }; // Die möglichen Eingangssignale enum input { START, // 0 STOP // 1 }; // Ein Eintrag in der Tabelle struct transition { states m_next; // Nächster Zustand void (*m_fn) (void); // Funktionspointer f...
ALGO
0.932076
6.215586
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2014-10-14T19:34: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": "6af16b282...
44a3a7f4-e6b0-4f8c-bfe2-7d7603fcf50d
yilvas09/MicroHedger
libs/Utils.cpp
#include <cmath> #include "Utils.hpp" #include <boost/format.hpp> #define M_SQRT_2_PI sqrt(2 * M_PI) void Utils::sortPairedVectors(std::vector<double> &A, std::vector<double> &B) { std::vector<std::pair<double, double>> paired; paired.reserve(A.size()); for (size_t i = 0; i < A.size(); ++i) { ...
TOOL
0.971488
5.698027
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2025-05-25T18:50:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b2a3b403824...
15958bfe-cdf0-41cf-b550-eb49b466d778
ini050/OMOM-AI
omokai.cpp
#include "omokai.h" COMOKAI::COMOKAI() { for(int i = 0; i < SIZE + 2; i++ ) { nBoard[i][0] = nBoard[i][SIZE + 1] = WALL; nBoard[0][i] = nBoard[SIZE + 1][i] = WALL; } } void COMOKAI::SetBoard(int (*arr)[SIZE + 2], COMOKRULE *pr) { pRule = pr; for(int i = 1; i <= SIZE; i++) for(int j = 1; j <= SIZE; j++) ...
ALGO
0.998296
3.949848
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2018-01-10T16:50:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1e13a6c5...
0cdb517f-7a67-477e-8412-1da0fcb12e29
gabarnettjr/learningOpenmp
secondExample/main.cpp
#include <iostream> #include <omp.h> void subdomain( float *x, int istart, int ipoints ); void sub( float *x, int npoints ); int main() { int n = 100; float array[n]; sub( array, n ); for( int i=0; i<n; i++ ) { std::cout << "array[" << i << "] = " << array[i] << std::endl; } return 0; } ///////////////////...
ALGO
0.999447
4.891088
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-10-02T23:02: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": "53c1d5019d...
54936f96-0204-4c5f-81f7-86a560239da2
nayandeep20028840/CodeforcesProblemSolving
Codeforces_Problem_Solving/E_Problems/E. Tree Master/2.cpp
#include<bits/stdc++.h> using namespace std; #define watch(x) cout << (#x) << " = " << (x) << endl #define MOD 1000000007 vector<long long > weight ; vector<long long > parent ; long long ans = 0; vector<unordered_map<int , long long> > mp; long long solve(int x, int y) { if(x == 0 || y == 0) { retu...
ALGO
0.999959
3.803292
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-10-25T11:40: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": "b8f01e2011f...
a9cb6764-43c8-4008-9ca3-660123d8c163
SSS-Algorithm/Youngrok
14621/onlymesolo.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct edge{ int one; int two; int weight; }; vector<int> root; int find(int v) { if (root[v] == v) return v; return find(root[v]); } void united(int x, int y) { int xset = find(x); int yset = find(y); ...
ALGO
0.999972
3.936604
{ "github_metadata": { "branch": "YRorigin", "commit_count": 18, "repo_created_at": "2024-03-09T07:56:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a54ffe30...
dce507ab-8b7e-4ada-a30c-98434eccc1bc
zhu-dq/LeetCode
23.cpp
/* 题目:23. Merge k Sorted Lists 题解: 核心是考察堆排序 而priority_queue的背后就是堆排序。 所以可以利用priority_queue。 */ #include <vector> #include <iostream> #include <queue> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { private: /* 判断优先级的函数 ...
ALGO
0.999897
5.776796
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2016-02-26T04: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": "9be09ae2d...
5de940ea-5c4c-419a-99c5-2b4772a0f693
KavyaSriChennoju/DataStructures
bdtree/keyredistribution.cpp
#include<iostream> using namespace std; struct btnode; void create(btnode *&t,int c,int d); struct btnode { btnode *parent; int key[5]; btnode *child[6]; int count; }; bool isleaf(btnode *t); bool isleaf(btnode *t) { int d=0; for(int i=0;i<t->count+1;i++) { if(t->child[i]==NULL) d++; else break; } if(...
ALGO
0.999919
3.277219
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-03-26T17:18: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": "2aa6304710...
9e4150c2-d35b-42fb-a556-6066c9ec5d74
adnanaziz/EPIJudge
epi_judge_cpp_solutions/gcd.cc
#include "test_framework/generic_test.h" long long Gcd(long long x, long long y) { if (x > y) { return Gcd(y, x); } else if (x == 0) { return y; } else if (!(x & 1) && !(y & 1)) { // x and y are even. return Gcd(x >> 1, y >> 1) << 1; } else if (!(x & 1) && y & 1) { // x is even, and y is odd. ...
ALGO
0.998504
6.193799
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2017-12-21T06:15:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2874, "forks": 1899, "issues": 47, "pull_requests": 33 }, "file_meta": { "content_id": "...
efce5e45-9507-4043-98b1-9a0d3f768fce
gzshawnliang/competitive-programming
myCpps/extendtoPalindromes_UVA11475OJ.cpp
#include <bits/stdc++.h> using namespace std; const int N = 52; int turn(char ch) { if ('a' <= ch && ch <= 'z') return ch - 'a'; else return ch - 'A' + 26; } bool sovle(int i, string & s) { int k = s.size() - 2; for (int j = i + 1; j <= k; ++j, --k) { if (s[j] != ...
ALGO
0.999994
3.725574
{ "github_metadata": { "branch": "master", "commit_count": 1963, "repo_created_at": "2019-01-17T06:33:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2334412...
c90d3965-66fb-43ab-8a3d-4cce25b4e17c
NigrumAquila/elliptic_curve_cryptography
src/EllipticCurve.cpp
#include "EllipticCurve.h" const EllipticCurve::Point EllipticCurve::zero = {0, 0}; EllipticCurve::EllipticCurve() { setParams(1, 18, 19); setGenerator(7, 8); } EllipticCurve::EllipticCurve(__int64 a, __int64 b, __int64 p, __int64 x, __int64 y) { setParams(a, b, p); setGenerator(x, y); } void EllipticCurve::set...
ALGO
0.991561
5.76074
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-04-30T16: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": "4bbc704c62...
f9f7af25-dcca-4454-9448-1f97c80fe034
MasterIceZ/TOI17_Practice
AgileContest/Round_13/AG_Really.cpp
/* * AUTHOR : Hydrolyzed~ * SCHOOL : RYW * TASK : AG_Really * ALGO : Counting Sort, Math * DATE : 6 Dec 2021 * */ #include<bits/stdc++.h> using namespace std; #ifdef _DEBUG #include "template.hpp" #else #define dbg(...) 0 #endif using ll = long long; ll a[100100], bucket[100100]; ll rs[100100]; void solve...
ALGO
0.99998
4.105245
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2021-06-14T01:21:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf2b5e0148...
69dab6ce-7cfb-489f-a40f-15765677013e
koth/elements-of-programming-interviews
nonuniform_random_number_generation.cpp
// Copyright (c) 2013 Elements of Programming Interviews. All rights reserved. #include <algorithm> #include <cassert> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <vector> using std::cout; using std::default_random_engine; using std::distance; using std::endl; using std::rand...
ALGO
0.99954
5.201419
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2016-03-30T01:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 14, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "45c05ae...
7c628d31-6d98-486a-9427-988745ff9aa3
raincross7/code-similarity
codes/train_code/problem016/problem016_283.cpp
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(v) v.begin(), v.end() #define Graph vector<vector<int>> typedef long long ll; typedef pair<int, int> P; const int INF = 1000000007; int main(){ ll N; cin >> N; vector<ll>...
ALGO
0.999919
4.175008
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c30583aa41ee...
d74f3a4b-5f23-4f12-a445-188e3af687c1
adamskubel/AmplifyReality
jni/positioning/qrcode/PerspectiveTransform.h
/* File: PerspectiveTransfrom.h; Mode: C++; Tab-width: 3; Author: <NAME>; */ #ifndef PT_H #define PT_H #include "FinderPattern.hpp" #include <opencv2/core/core.hpp> using namespace cv; class PerspectiveTransform { public: PerspectiveTransform(long a11 = 0, long a21 = 0, long a31 = 0, long...
TOOL
0.924039
6.492739
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2011-11-09T00:31:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "753abcdfc...
c9d951c7-bf5d-412e-8020-adb27389babd
danielduberg/Assignment2
Source/Assignment2/SimulatedAnnealing.h
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "GameFramework/Pawn.h" #include "Agent.h" #include <limits> #include <ctime> #include "Settings.h" #include "VisibilityGraph.h" #include "AStar.h" #include "General.h" #include "SimulatedAnnealing.generated.h" /** * ...
TOOL
0.924341
4.059653
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2016-02-21T13:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "29c7c49d6...
b8a886cc-95fe-4150-adb4-dcbe4055ff22
Saikat-S/acm-problems-solutions
Codeforces/1341/D.cpp
/*************************************************** * Problem Name : D.cpp * Problem Link : https://codeforces.com/contest/1341/problem/D * OJ : Codeforces * Verdict : AC * Date : 2020-04-23 * Problem Type : Div/Edu - * Author Name : <NAME> * University : CSE, MBSTU *****************...
ALGO
0.999857
3.846344
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2018-05-10T18:16:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d589bab1a...
0332d674-8c3a-4bcb-b356-53c685d1fd0b
toprakmurat/Benchmarker
src/Parser.cpp
#include "Parser.hpp" #include <fstream> #include <stdexcept> ConfigParser::ConfigParser(const std::string& config_file) { std::ifstream file(config_file); if (!file.is_open()) { throw std::runtime_error("Could NOT open config file: " + config_file); } file >> m_Config; validate(); if...
TOOL
0.926625
6.539702
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-10-09T06:45:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22ad158cf5c...
c9d8f1e7-491c-4f82-898b-34ca93385cab
apache/incubator-gluten
cpp/velox/shuffle/RadixSort.h
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ALGO
0.999763
6.524906
{ "github_metadata": { "branch": "main", "commit_count": 5252, "repo_created_at": "2021-12-06T05:46:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1389, "forks": 558, "issues": 706, "pull_requests": 72 }, "file_meta": { "content_id": "16...
70d2e578-5266-4cb9-ba9c-53d477d1f41b
TU-Berlin-DIMA/analyzing-stream-modern-hardware
other/streambox_saber/streambox_release_March_10_2018/Kaskade/algorithm/composite_step.cpp
#include "composite_step.hh" #include <cmath> #include <fstream> namespace Kaskade { void TangentialStepArmijo::getSearchDirection(AbstractFunctionSpaceElement& scorrection, AbstractFunctionSpaceElement const& correction) { assert(linPtr); // *iterate += correction; performArmijoLoop(); scorrectio...
ALGO
0.999935
5.392636
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-07-02T08:39:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 13 }, "file_meta": { "content_id": "8407342dbc...
e003c06a-663e-4e7f-8f01-2be6f81004fb
FredrikJDahlberg/leet
src/main/cpp/leet/Solution60.h
// // Created by <NAME> on 2024-11-12. // #ifndef SOLUTION60_H #define SOLUTION60_H #include <numeric> class Solution60 { private: static void generate(const int n, int& k, std::vector<int8_t>& numbers, std::string& string) { if (n == 1) { if (--k == 0) { ...
ALGO
0.999948
6.398618
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2024-11-18T18:07: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": "dd4769e3e18...
fe463eb3-211a-431d-8e6b-31f80fcf3347
grisetti/g2o_frontend
g2o_frontend/ransac/alignment_plane_linear.cpp
#include "g2o_frontend/basemath/bm_se3.h" #include "alignment_plane_linear.h" #include <Eigen/SVD> #include <Eigen/Cholesky> #include <iostream> #include <Eigen/Core> #include <Eigen/Geometry> #include <Eigen/StdVector> #include <vector> #include <math.h> using namespace std; namespace g2o_frontend{ using namespace g2...
ALGO
0.999274
4.89851
{ "github_metadata": { "branch": "master", "commit_count": 1037, "repo_created_at": "2012-10-19T10:37:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d5fc15...
293d4b88-e0ea-4b39-84b2-85ced048c67b
Nishra2611/Sem-2-CCP
5.4.cpp
#include <iostream> #include <queue> #include <cmath> using namespace std; class Fahrenheit; // Forward declaration class Celsius { float temp; public: void get_data() { cout<<"Enter temp in celsius:"; cin>>temp; } Celsius(float t = 0) : temp(t) {} // Conversion to Fahrenheit...
ALGO
0.956527
6.404109
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-05-07T11:20: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": "60db9f093271...
b2de4d25-ed90-4c0a-99b8-d3366ad4e2ed
sfod/simple-graph
test/bench_bellman_ford.cpp
#include <algorithm> #include <iostream> #include "benchmark/benchmark.h" #include "simple_graph/list_graph.hpp" #include "simple_graph/algorithm/bellman_ford.hpp" using simple_graph::vertex_index_t; static void bench_bellman_ford(benchmark::State &state) { simple_graph::ListGraph<true, int, int, ssize_t> g; ...
TEST
0.928238
6.265426
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2015-10-19T13:09:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8aaf85fd...
d19b9e21-d484-4c87-a99a-d31b77d56c9b
littlebearsama/3D-ObjectDetection-and-Pose-Estimation
8.其他/机器人抓取/重构/NCC/squirrel_perception_backup-hydro_dev/v4r/v4r/AttentionModule/example/ExmplSymSalMap.cpp
/** * Copyright (C) 2012 * <NAME> * Automation and Control Institute * Vienna University of Technology * Gusshausstraße 25-29 * 1040 Vienna, Austria * potapova(at)acin.tuwien.ac.at * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU G...
TOOL
0.933752
5.28946
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-05-06T08:03:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 290, "forks": 77, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b09f46...
3ea5e6f3-9a24-4848-b250-23aac374bdad
ChaoHuang2018/POLAR_Tool
examples/AttitudeControl/nn_attitude_control_sigmoid.cpp
#include "../../POLAR/NeuralNetwork.h" #include <chrono> using namespace std; using namespace flowstar; int main(int argc, char *argv[]) { intervalNumPrecision = 50; // Declaration of the state variables. unsigned int numVars = 9; Variables vars; // intput format (\omega_1, \psi_1, \omega_2,...
ALGO
0.999965
4.212945
{ "github_metadata": { "branch": "main", "commit_count": 308, "repo_created_at": "2022-02-16T13:02:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c7c7a3ac7...
cf8bc714-3933-4182-ad3a-d2a22f636137
usi-verification-and-security/golem
src/Normalizer.h
/* * Copyright (c) 2020-2025, <NAME> <<EMAIL>> * * SPDX-License-Identifier: MIT */ #ifndef GOLEM_NORMALIZER_H #define GOLEM_NORMALIZER_H #include "ChcSystem.h" #include "TermUtils.h" #include <memory> namespace golem { struct NormalizedChcSystem{ std::unique_ptr<ChcSystem> normalizedSystem; NonlinearCan...
TOOL
0.900037
6.4197
{ "github_metadata": { "branch": "master", "commit_count": 724, "repo_created_at": "2021-08-13T15:38:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 39, "forks": 8, "issues": 11, "pull_requests": 2 }, "file_meta": { "content_id": "bc482ce...
a21a01e9-e263-4fe0-985a-3b6ac0523735
kimkun07/CompetitiveProgramming
240213_Codeforces_Round925/A_Recovering_a_Small_String.cpp
#include <iostream> #include <vector> using namespace std; using ll = long long; void printAns(bool yes) { if (yes) { cout << "Yes" << "\n"; } else { cout << "No" << "\n"; } } char decode(char enc) { return (enc - 1) + 'a'; } void solve(int testcase) { int n; cin >> n; n = n - ...
ALGO
0.999902
3.446092
{ "github_metadata": { "branch": "main", "commit_count": 140, "repo_created_at": "2023-12-29T01:16:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7d5acd089...
7d2031f8-8c80-4f54-a6bf-846ac49fcbd5
Dark-Basic-Software-Limited/Dark-Basic-Pro
Dark Basic Public Shared/Official Plugins/DarkPHYSICS/DarkPHYSICS/MeshHash.h
#ifndef MESH_HASH_H #define MESH_HASH_H #include "NxPhysics.h" #include <vector> // ------------------------------------------------------------------------------ struct MeshHashRoot { int first; int timeStamp; }; // ------------------------------------------------------------------------------ struct MeshHashEnt...
ALGO
0.947186
6.124619
{ "github_metadata": { "branch": "Initial-Files", "commit_count": 26, "repo_created_at": "2015-11-19T16:00:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 492, "forks": 131, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": ...
5e93df35-8bb7-4215-9494-94851c050e29
Raj-kar/C-Plus-Plus
12. Advance questions on Function/Conversion/hexadecimal_to_decimal.cpp
#include <bits/stdc++.h> using namespace std; int hexaDeciaml_to_Decimal(string num) { int answer = 0, mul = 1; int str_size = num.size(); for (int i = str_size - 1; i >= 0; i--) { if (num[i] >= '0' && num[i] <= '9') { answer += mul * (num[i] - '0'); } else ...
ALGO
0.96278
4.690279
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2020-10-19T19:52:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "096c2a76a...
8b9f9a37-be4a-445a-a3ef-a84f861a742c
wh2per/SW-PRO-Algorithm
SW_PRO_Algorithm/교육P-0007(군사도로망).cpp
#include <iostream> #include <climits> #include <vector> #include <algorithm> using namespace std; // 크루스칼 알고리즘 vector<int> v; struct info { int x; int y; int cost; }; bool cmp_cost(info c1, info c2) { if (c1.cost < c2.cost) return true; else return false; } int find(int n) { if (v[n] == n) return n; v...
ALGO
0.999738
4.284153
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2019-09-12T12:03:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc474242a...
8ef3b9aa-82ca-40ce-a014-9d3c840d3004
Hengle/misc_microsoft_gamedev_source_code
misc_microsoft_gamedev_source_code/misc_microsoft_gamedev_source_code/xcore/utils/utils.inl
//============================================================================ // // File: utils.inl // Copyright (c) 2005-2006, Ensemble Studios // //============================================================================ // Disable PREfast warnings #pragma warning( push ) #pragma warning( disable : 25042) name...
TOOL
0.959825
3.659911
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-30T07:02:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5b6f26b12...
cbadd02e-20d9-40e7-8b39-de90025ce820
elevin72/Programming-HW
Intro_CompSci/Homework_Archive/Homework_8/HW8_4.cpp
/* File Name: HW8_4.cpp Description of program: Sort 10 5 letter strings alphabetically Course Name: Introduction to Computer Science Exercise# and Question#: Exercise 8 question 4 Name: <NAME> 341318228 Creation date: 24/12/19 Last Modification date: 25/12/19 */ #include <iostream> using namespace std; const int N =...
ALGO
0.999853
4.867218
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-03-08T13:24:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ae75e2a5...
7eac3dd8-0969-42cf-8eb7-835637769b67
remuluson2/PathfindingStructures
TestC++/BinaryHeap.cpp
#include "BinaryHeap.h" using namespace PathfindingTester; PathfindingTester::BinaryHeap::BinaryHeap() { _size = 0; _heap = std::unique_ptr<Node[]>(0); } void PathfindingTester::BinaryHeap::Swap(int firstIndex, int secondIndex) { Node temp = _heap[firstIndex]; _heap[firstIndex] = _heap[secondIndex]; ...
ALGO
0.998416
5.537282
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2024-10-25T17:45:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a440f0ee...
c7187317-675d-4f6b-b93b-2f6af00fd8b4
zhangyaqi1989/LeetCode-Solutions
C++/1537-Get-the-Maximum-Score/soln.cpp
class Solution { public: int maxSum(vector<int>& nums1, vector<int>& nums2) { long long cur1 = 0, cur2 = 0, ans = 0; const int kN1 = nums1.size(); const int kN2 = nums2.size(); int i = 0, j = 0; while(i < kN1 && j < kN2) { if(nums1[i] < nums2[j]) { ...
ALGO
0.999967
5.821003
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2020-06-06T15:00:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62044fdff...
7eeb9a74-4a77-4e99-8721-32127f3de1d5
ManalAbaline/capstone_ceg2021_cyberGlove
flex_sensors/flex_sensors_acquisition.ino
const int FLEX_PIN0 = A0; // Pin connected to voltage divider output const int FLEX_PIN1 = A1; // Pin connected to voltage divider output const int FLEX_PIN2 = A2; // Pin connected to voltage divider output const int FLEX_PIN3 = A3; // Pin connected to voltage divider output const int FLEX_PIN4 = A6; // Pin connected t...
ALGO
0.919854
5.505002
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-09-22T21:48: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": "a50675ac30d...
92295a37-35c4-4a3f-bfe9-0d0dc5666d26
Lupo-CalPoly/cpe315-lab5
matmul-driver.cpp
/* Matrix multiplication: C = A * B. */ // includes, system #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> // includes, kernels #include "matmul.h" void matmul(float*, const float*, const float*, unsigned int, unsigned int, unsigned int); void PrintMat(Matrix); Matrix AllocateMa...
ALGO
0.999576
4.159243
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2016-10-30T22:57:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b78ca0a59...
765c6e7d-a631-491e-9fc5-589fac90c313
tingluotw/leetcode
Graph/743_Network_delay_time.cpp
class Solution { /* solution 1: Bellman-Ford * Find the max length from k to other nodes * If not all the nodes are reachable, return -1 * * For more analysis, see HuaHua's video */ public: int networkDelayTime(vector<vector<int>>& times, int N, int K) { /* N <= 100, w<=100, so ...
ALGO
0.999967
5.424253
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-07-07T04:27: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": "0f506f7a4...
56a0b2b7-59ae-478b-8774-b0c871977aa4
DongJiayu/Cpp
STL/Vector/Vector_Swap.cpp
// Vector_Swap.cpp // Visual Studio 2015 // Create Time : 2017/08/01 /* vector::swap - Exchanges the elements of two vectors. void swap(vector<Type, Allocator>& _Right); friend void swap(vector<Type, Allocator >& _Left, vector<Type, Allocator >& _Right); Parameters: _Right A vector providing the elements to be swappe...
ALGO
0.983874
6.003623
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-07-30T00:43: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": "709bc1586f...
512621cc-26d3-4552-af18-16c3323a8ab9
vkcode7/cpp
code/stl/associative_containers.cpp
#include <iostream> #include <set> #include <functional> #include <map> #include <unordered_set> #include <unordered_map> #include <string> /* Associative containers implement sorted data structures that can be quickly searched (O(log n) complexity). - asso containers are: set, map, multiset, multimap set: co...
TOOL
0.923972
6.194578
{ "github_metadata": { "branch": "main", "commit_count": 412, "repo_created_at": "2022-08-18T22:09: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": "c434e4dbd1...
fee956cc-89a8-4206-a2ff-238424a7977d
Mann-Chandarana/My-Codes
Competitive_programming-2/Codeforces/Questions/800-1000/CF5.cpp
/* https://codeforces.com/problemset/problem/1872/B */ /* B. The Corridor or There and Back Again */ #include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef pair<int, int> pi; typedef vector<pair<int, int>> vpii; #define ll long long #define all(v) v.begin(), v.end() #define pb push_back void...
ALGO
0.999801
4.293246
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-10-14T18:41:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f938dbfb739...
758848d1-cd13-40ef-abdd-635aa3b19c49
AdamPI314/Algorithm
src/80_construct_binary_tree_from_preorder_and_inorder_traversal/solution.cpp
#include <iostream> #include <utility> #include <vector> #include <list> #include <set> #include <unordered_set> #include <unordered_map> #include <map> #include <queue> #include <stack> #include <forward_list> #include <algorithm> #include <climits> #include <string> #include <cstring> #include <cstdlib> #include <num...
ALGO
0.999991
6.233847
{ "github_metadata": { "branch": "master", "commit_count": 167, "repo_created_at": "2017-07-10T05:26:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5cdc1aa...
294e758b-4e9e-4c71-a7d8-03d8832b5806
Kyrollo/OOP-project-1
Task 2/A1_SheetPb9.cpp
#include <iostream> #include<fstream> #include<cstring> using namespace std; //create two files fstream file1; fstream file2; char filename1[100],filename2[100]; //open the files void openFiles() { file1.open(filename1,ios::in); file2.open(filename2,ios::in); if(file1.fail()) { ofstream file1(...
TOOL
0.992846
4.188171
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-05-25T13:10:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc38d136fcfd...
e7a0d1cf-86ab-4e99-80b7-907ac3413848
Bogdanctx/ml-algorithms
k-means clustering/main.cpp
#include <fstream> #include <vector> #include <random> #include <string> #include <unordered_set> #include <iostream> #include <omp.h> #include "../csv.h" int rnd(int a, int b) { static std::random_device rd; static std::mt19937 gen(rd()); std::uniform_int_distribution<int> distrib(a, b); return distri...
DATA
0.999372
6.045067
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-05-10T18:51: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": "af3e089c2b4a...
ba35b6b3-5206-4eb9-a4e8-32a191469aa2
Serban199/OOP
sem4.cpp/Sort.cpp
#include "Sort.h" #include <cstdlib> #include <ctime> #include <vector> #include<sstream> using namespace std; Sort :: Sort(int min, int max, int n1) { srand(time(nullptr)); for (int i = 0; i < n1; i++) v[i] = (rand() % (max - min + 1)) + min; n = n1; } /*Sort::Sort(int initList[]) { for (int i...
ALGO
0.995685
4.512631
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-03-04T17:31: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": "4d5a18d5f0a...
eef960d9-266e-413b-9ece-807b0684e3fa
HieronyM/Competitive-Programming-Code
UVa OJ/1. Introduction/Minesweeper.cpp
#include<cstdio> #include<iostream> using namespace std; char denah[105][105]; int n,m; // nRow dan nColumn di denahnya int a; int counter; // Counter Mine di suatu titik int i,j,k,nDenah=0; int idX[8] = {-1,1,0,0,-1,-1,1,1}; int idY[8] = {0,0,-1,1,-1,1,-1,1}; int p; // Hitung Mine di su...
ALGO
0.997796
3.250174
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2014-07-21T08:19:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88fedba97...
6188d0f6-a8e6-4a1b-9a16-16cbeb6edf20
Leapense/problems
16507번: 어두운 건 무서워/solution.cpp
#include <iostream> #include <vector> int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int R, C, Q; std::cin >> R >> C >> Q; std::vector<std::vector<long long>> P(R + 1, std::vector<long long>(C + 1, 0)); for (int i = 1; i <= R; ++i) { for (...
ALGO
0.999896
5.086832
{ "github_metadata": { "branch": "master", "commit_count": 2661, "repo_created_at": "2024-10-12T10:53: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": "f8d8197...
4ab7c32f-4c8b-41da-9c3d-f391067ccbd9
VinhTungg/PTIT_C_PLUS_PLUS
CPP0317 - So Dep.cpp
#include <bits/stdc++.h> #define ll long long #define foru(i,a,b) for(int i = a; i <= b; ++i) #define ford(i,a,b) for(int i = a; i >= b; --i) #define boost ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define pb push_back #define mk make_pair #define fi first #define se second #define endl "\n" #define sz size #de...
ALGO
0.999828
4.769572
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-08-11T12:39:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3361f3b254b...
ac7c94d0-cae6-4be9-8573-79b9c3ad88e0
visheshgargavi/mission_faang
Trie/2_Efficient_Implementation.cpp
#include <iostream> #include<bits/stdc++.h> #include <unordered_map> using namespace std; // Data structure to store a Trie node struct Trie { // true when the node is a leaf node bool isLeaf; //int wc=0; // each node stores a map to its child nodes unordered_map<char, Trie*> map1; map<char,in...
ALGO
0.999357
4.896771
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2022-03-15T16:41:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d98d4367e...
c180aaeb-4335-48e0-87c9-68faa255e3f1
pedroteosousa/maratona
online-judges/codeforces/955/D.cpp
#include <bits/stdc++.h> using namespace std; const int N = 5e6+5; int z[N]; void Z(string s) { int n = s.size(); int m = -1; for (int i = 1; i < n; i++) { z[i] = 0; if (m != -1 && m + z[m] >= i) z[i] = min(m + z[m] - i, z[i-m]); while (i + z[i] < n && s[i+z[i]] == s[z[i]]) z[i]++; if (m == -1 || i +...
ALGO
0.999987
3.346887
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2017-03-12T00:00: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": "3d922e20...
bcafc798-62d0-4b3a-96de-d684c13d94f3
liutiantian0804/xing-tu-airplane
tiantian-KCF/getFirstBox.cpp
// // Created by ise on 16-10-28. // #include "getFirstBox.h" #include <iostream> #include<vector> #include "cascadedetect.hpp" #include "time.h" using namespace std; using namespace cv; bool getBox = false; bool getPoint = false; cv::Point peoplePoint; void MYdetectMultiScale( const Mat& img, vector<Rect>& foundL...
ALGO
0.984828
4.017866
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-03-07T11:11: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": "99dfb3c2f...
9c9a0ab6-9334-4b7a-bb59-c0c8d5e4086a
shivatheja3/Data-Structures-and-Algorithms
Aggressive Cows - GFG/aggressive-cows.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: bool func(vector<int> &arr,int n,int c,int val){ int s=0; int t=c-1; // cout<<t<<endl; for(int i=1;i<n&&t!=0;++i){ ...
ALGO
0.999966
6.139377
{ "github_metadata": { "branch": "main", "commit_count": 975, "repo_created_at": "2022-08-30T11:31:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ca77dc654...
eda7d844-369a-4a75-995a-e251c4bf0887
sykwer/competitive_programming
flow/ford_fulkerson.cpp
#include <iostream> #include <vector> using namespace std; const int INF = 1 << 30; // O(FE) where F = Amount of Maximum Flow struct FordFulkerson { struct edge { int to; int cap; int rev; }; int V; vector<vector<edge>> table; vector<bool> visited; int dfs(int s, int...
ALGO
0.999794
5.400455
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2018-11-28T12:28:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0173b905...
a89579ca-49f5-4f4c-ab64-4a79cfc39542
ipekcaglayan/CENG213
the3/Graph.cpp
#include "Graph.h" #define INF 9999999999 /*Do not add new libraries or files*/ typedef pair<int, string> p; Graph::Graph() { // TODO: IMPLEMENT THIS FUNCTION. adjList = HashTable<string, list<Edge>>(); } Graph::Graph(const Graph &rhs) { // TODO: IMPLEMENT THIS FUNCTION. adjList = HashTable<string, li...
ALGO
0.999333
5.125406
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-02-16T23:23: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": "9062fc23fb6a...
96ce111b-3df0-4849-9135-348721ff9cc9
lucaskojima/CP
Solutions/USACO/Silver/Milk-Visits.cpp
#include "bits/stdc++.h" #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() using namespace std; using ll = long long; using pii = pair<int, int>; const char nl = '\n'; const ll LINF = 0x3f3f3f3f3f3f3f3f; const int INF = 0x3f...
ALGO
0.999894
4.102896
{ "github_metadata": { "branch": "main", "commit_count": 315, "repo_created_at": "2023-12-01T17:16: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": "b631ac790b...
5bc1adac-a7c6-4cae-8141-d2b969705318
aswingururaj/semantic_mapping
hydra/hydra_topology/include/hydra_topology/graph_extractor_types.h
/* ----------------------------------------------------------------------------- * Copyright 2022 Massachusetts Institute of Technology. * All Rights Reserved * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * ...
ALGO
0.927122
7.569639
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-08-13T22:16:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e47969d0544...
c1f7dbfc-dfb3-409b-82f3-fc31422d89ec
YohanDecamps/Advent-of-Code-2024-CPP
day13/part2/src/main.cpp
#include <cstdint> #include <fstream> #include <iostream> #include <algorithm> #include <regex> #include <string> #include <vector> struct Machine { std::pair<int64_t, int64_t> A; std::pair<int64_t, int64_t> B; std::pair<int64_t, int64_t> p; }; #define FILE_PATH "../input.txt" int main() { std::strin...
ALGO
0.998887
4.648745
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-12-01T13:31: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": "752bc42078e...
406222cf-50a3-4cf7-831f-6031b33cade4
SujonHasan/DataStructures-and-Algorithms
Data Structure/9. Segment Tree Lazy/Segment_Tree_Lazy.cpp
/* ***<NAME>*** date---: "01-11-2022" time---: "18-50-45" Author-: <NAME> */ #include <bits/stdc++.h> using namespace std; #define ll long long #define l (n << 1) #define r (n << 1) + 1 #define mid (b + e) / 2 const int N = 1e5 + 9; int a[N]; ll t[N*4], lazy[N*4]; void pull(int n) { t[n] = t[l...
ALGO
0.999945
4.44775
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-02T06:13: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": "6d783e77979c...
5f6d70af-3a05-411e-91cf-26c432620432
2627751788/perfect
struct-pointer-link/pointer-secend.cpp
//2、编写一个子函数,函数功能是将两个数组中的对应位的值相加,然后保存到第 3 个数组中。 #include <stdio.h> //#define method //方法1: #ifdef method void summery(int *p,int *q,int len); #else //方法2 int *summery(int *p,int *q,int len); #endif int main() { //定义两个数组 int num1[6] = {9,4,9,0,4,7}; int num2[6] = {4,6,2,8,1,7}; //将两个数组传到子函数中去实现 #ifdef method ...
ALGO
0.995305
4.250237
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2022-02-21T13:15: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": "a73a95655...
4053e785-e1a2-49c7-8108-8b9130c8470b
UtkarshTrivedi2934/LoveBabbar450
Activity Selection.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find the maximum number of activities that can //be performed by a single person. static bool comp(pair<int,int> a,pair<int,int> b) { if(a.second == b.seco...
ALGO
0.99999
5.670817
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-03-16T05:16:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df2ad85011ea...
2e779586-c8dc-4cac-80a2-73a863076ba0
rohanrao1729/computing-secondary-structure-of-Rna
second.cpp
#include<bits/stdc++.h> #include"second.h" #include"driver.h" #include"print.h" using namespace std; ///it just checks if two chars are correct pairings or not ie A-U AND C-G /// @param char a, char b and checking if two chars can pair /// @return true if two chars can be paired else false bool Second:: canPair(char ...
ALGO
0.999911
4.337044
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-29T07:07: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": "bf7e2107a3d7...
1c758de2-520b-4b24-8f80-8576b3ab4ea5
rutgers-db/DuplicateSearch_OPH
src/builder/ZkwSegTree.hpp
#include <vector> #include <limits> using namespace std; template<typename T> class ZkwSegTree { private: vector<pair<int, T>> tree; unsigned int size; public: ZkwSegTree(unsigned int maxSize) { size = 1; while (size < maxSize) size <<= 1; tree.assign(2 * size, make_pair(numeric_l...
ALGO
0.999777
5.696816
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2023-10-03T03:53:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0da71fcc1f0...
b0e25e51-9b26-4433-bc28-66f5eaa9f5a9
nmkluss/.cpp_projektini
otrslielakais.cpp
/************************************************************* Izveido programmu, kas 1) Liek lietotājam ievadīt statiska masīva masivs[20] izmēru no 1 līdz 20. 2) Liek lietotājam ievadīt masīva elemntus, kuri ir naturāli skaitļi >0. 3) Pārbaude ievades vērtības. 4) Atrod otru lielāko elementu masīvā un to izdrukā. 5) ...
ALGO
0.999137
4.026361
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-11-24T21:04: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": "3fdf4bad3ab...
fc14155e-5e5e-4d60-9337-807639d17859
soul-catcher/sibsutis
2-3course/saod/course/38.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <cstdlib> #include <unordered_map> #include <cmath> #include <vector> #include <algorithm> using namespace std; const int N = 4000; struct Record { char fio[30]; short int department; char post[22]; char birth_date[10]; }; struct N...
ALGO
0.978292
3.583309
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2019-09-07T13:58:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "929d9bd...
d44eacee-80cd-4adc-bc3e-552f4e91067e
GokuUu007/Toyota-Programming-Contest-2024-2-AtCoder-Beginner-Contest-341-
C.cpp
/* ॐ हौं जूं सः ॐ भूर्भुवः स्वः ॐ त्र्यम्बकं यजामहे सुगन्धिं पुष्टिवर्धनम् उर्वारुकमिव बन्धनान्मृत्योर्मुक्षीय मामृतात् ॐ स्वः भुवः भूः ॐ सः जूं हौं ॐ @Author : <NAME> @Country : INDIA */ #include<bits/stdc++.h> using namespace std; #define ll long long #define all(x) x.begin(), x.end() ...
ALGO
0.999941
4.307567
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-02-17T14:19: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": "084d37bc2c03...
c5072608-3470-479f-adf2-7275367813a3
samanvaysamanvay/dailyLeetcode
numberOfDiceRollsWithTargetSum.cpp
class Solution { public: vector<vector<int>> dp; const int mod=(int)pow(10,9)+7; int chances(int n, int k, int target) { if (n == 0 && target == 0) return 1; if (n == 0 || target <= 0) return 0; if (dp[n][target] != -1) return dp[n][target]%mod; int count = 0; ...
ALGO
0.999982
5.631296
{ "github_metadata": { "branch": "main", "commit_count": 568, "repo_created_at": "2023-09-29T18:10: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": "633c8e3371...
e261ba58-8837-489a-ba79-d0e11f49c4c1
duckdb/duckdb
third_party/brotli/enc/compress_fragment.h
/* Copyright 2015 Google Inc. All Rights Reserved. Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ /* Function for fast encoding of an input fragment, independently from the input history. This function uses one-pass processing: when we find a back...
ALGO
0.953779
7.586596
{ "github_metadata": { "branch": "main", "commit_count": 59407, "repo_created_at": "2018-06-26T15:04:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 31074, "forks": 2450, "issues": 412, "pull_requests": 112 }, "file_meta": { "content_id":...
baae4f3c-a0ba-4a79-b484-1633ea1f8081
Shuvoahmed29/Online-Judge-Practics-Problem
C++ Codes/hgdf.cpp
#include <cstdlib> #include <iostream> #include <ctime> using namespace std; int main() { srand(time(NULL)); const int trials = 100000; int birthdays[50]; int numMatches; for(int i = 2; i <= 50; i++) { numMatches = 0; for(int j = 1; j <= trials; j++) { ...
ALGO
0.980061
4.035671
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-03-28T04:10: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": "5c997622a99c...
d4ac4149-e13c-43a3-aeef-e4ab3743d0f7
tfussell/xlnt
source/detail/cryptography/encryption_info.hpp
// Copyright (c) 2017-2021 <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, merge, publish, d...
TOOL
0.92443
7.399027
{ "github_metadata": { "branch": "master", "commit_count": 1716, "repo_created_at": "2014-05-06T16:58:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1572, "forks": 430, "issues": 190, "pull_requests": 22 }, "file_meta": { "content_id": ...
5905db19-2f36-4987-9964-b33f4d02aa74
u-noob-i/CF---Practice
E1_Reading_Books_easy_version.cpp
#include <iostream> #include <string> #include <vector> #include <set> #include <map> #include <utility> #include <algorithm> #include <math.h> #include <numeric> #include <queue> #include <climits> using namespace std; int n, m, i, j, k; string s; void solve(int T) { int x, y, ans; bool a, b; cin >> n >...
ALGO
0.999901
3.649038
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-09-01T05:07:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e68df75b7b80...
c7930931-16c5-4121-8019-fb4672832a4a
xyos/paralela
pi/Leibniz/threaded.cc
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <sys/time.h> typedef struct { int *a; int length; double sum; } MyData; #define N 8 // threads #define L 10000000 // data for each thread MyData mData; pthread_t myThread[N]; pthread_mutex_t mutex; void *piWork(void *arg) ...
ALGO
0.99975
4.188974
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-04-14T06:37: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": "9749b6855...
9e606009-11c7-42df-b7be-8d195f838d60
HaThaiCT/UET-Courses
DSA_2024/Assignment1/CaoTranHaThai_23020152_Assignment01/Ex03.cpp
#include <bits/stdc++.h> using namespace std; void print_array(int a[] , int n){ for(int i = 0 ; i < n ; i++){ cout << a[i] << ' '; } } void selection_sort(int a[] , int n){ for(int i = 0 ; i < n - 1 ; i++){ int min_pos = i; for(int j = i + 1 ; j < n ; j++){ if(a[j] < a[m...
ALGO
0.999988
5.06662
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2024-09-26T08:53:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc6475a82...
eef2a1e2-75af-40ab-aebf-050f7a1b4a3c
mark1879/DSA
TopK/test_top_k.cpp
#include <iostream> #include <algorithm> #include <functional> #include <gtest/gtest.h> #include "top_k_by_heap.hpp" #include "tok_k_by_quick_sort_partition.hpp" using GET_TOP_K_MIN_NUMS = std::function<std::vector<int>(std::vector<int>&, size_t)>; void TestGetTopKMinNumsByCase(GET_TOP_K_MIN_NUMS solution, std::vecto...
TEST
0.995622
5.987199
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2022-09-26T00:02:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba57829ab...
0b64150a-62b5-494f-9b97-b33b9d63d223
qsnake/trilinos
packages/moocho/src/AbstractLinAlgPack/src/abstract/interfaces/AbstractLinAlgPack_MultiVector.cpp
// ///////////////////////////////////////////////////////////////////////// // MultiVector.cpp #include <assert.h> #include "AbstractLinAlgPack_MultiVectorMutable.hpp" #include "AbstractLinAlgPack_MatrixSymDiag.hpp" #include "AbstractLinAlgPack_VectorMutable.hpp" #include "AbstractLinAlgPack_AssertOp.hpp" #include "...
TOOL
0.948027
6.517446
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2011-05-28T23:59:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90d77486150...
f9d89490-0c61-4888-9608-898fb71b04ab
cstiago/competitive-programming
VJudge/[UFABC] Contest Individual 1 - 2025-1/b.cpp
#include <bits/stdc++.h> #define int long long using namespace std; void test_case() { int n; cin >> n; int a[n], sum = 0; bool remove = false; for(int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; if(!remove && (a[i] % 3) == 1) { remove = true; } ...
ALGO
0.9998
4.010456
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-11-11T17:43: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": "5f08139a69c...
41cc9cc5-6e7f-4157-a20e-14321fcd1253
ashish007-ux/leetcode-gfg
Huffman Encoding - GFG/huffman-encoding.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class node { public: int data; node*left; node*right; node(int d){ data=d; left=NULL; right=NULL; } }; class cmp { public: bool operator()(node*a,node*b){ ...
ALGO
0.999985
5.236114
{ "github_metadata": { "branch": "main", "commit_count": 224, "repo_created_at": "2023-01-07T08:03: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": "5d1bafd882...
6de6a289-1610-4248-843b-52cea4c1fbce
extramask93/PathPlanningAlgorithms
src/ga/GeneticAlgorithm.cpp
#include <climits> #include "GeneticAlgorithm.hpp" GeneticAlgorithm::GeneticAlgorithm(int generations, int popsize, float c, bool shorten_chromosome){ this->generations_ = generations; this->popsize_ = popsize; this->c_ = c; this->generation_ = 0; this->shorten_chromosome_ = shorten_chromosome; motions_ = ...
ALGO
0.999993
4.881585
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2020-04-25T07:55: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": "37e349371...
1d456dae-9797-499a-8c87-22e44329fdde
AnkithReddy02/fast-recompression
tools/bm-text-to-lz77/include/utils/utilities.hpp
#ifndef UTILITIES_H #define UTILITIES_H #include "../typedefs.hpp" #include "space_efficient_vector.hpp" // void printRecompressionRLSLP(const RecompressionRLSLP *recompression_rlslp) { // cout << "RECOMPRESSION PRINTING STARTED..." << endl; // if(!(recompression_rlslp->nonterm).size()) { // cout <<...
TOOL
0.988042
4.632577
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2025-06-07T06:56:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1f54099c3...
fe8065c6-cc43-4a4c-a0ec-5c2786a93902
simonpintarelli/2dBoltzmann
src/quadrature/quadrature_base.hpp
#pragma once #include <array> #include <boost/mpl/if.hpp> #include <vector> #include <Eigen/Dense> #include <type_traits> namespace boltzmann { template <int DIM> class Quadrature { public: const static unsigned int dim = DIM; typedef typename boost::mpl::if_c<DIM == 1, double, std::array<double, DIM> >::type co...
ALGO
0.983343
6.029268
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-03-21T13:28: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": "9154897dda...
26d7283b-fc6b-4b58-8762-c530887f70df
jitnirmal/Tester
Codility/templateTest.h
#pragma once #include <iostream> /********************************************************************************/ template <unsigned n> struct tfactorial { enum { value = n * tfactorial<n - 1>::value }; }; template <> struct tfactorial<0> { enum { value = 1 }; }; /************************************************...
ALGO
0.987167
6.27265
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2018-09-24T01:46: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": "b25b8630f...
b248218e-8674-4222-bc11-9266805f0966
fabMSTICLig/RobAIR
catkin_ws/src/tutorial_ros/src/rotation_done_node.cpp
#include "ros/ros.h" #include <geometry_msgs/Twist.h> #include "geometry_msgs/Point.h" #include "geometry_msgs/Quaternion.h" #include "nav_msgs/Odometry.h" #include "std_msgs/String.h" #include "std_msgs/Float32.h" #include <cmath> #include <tf/transform_datatypes.h> #include "geometry_msgs/Point.h" #define security_d...
TOOL
0.942479
4.45283
{ "github_metadata": { "branch": "master", "commit_count": 289, "repo_created_at": "2016-09-16T15:14:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e37c1f7cc...
dde403da-3a19-4808-bf81-0c1830c42ae1
brics-db/coding_benchmark
src/Strings/Strings.cpp
// Copyright 2017 <NAME> // // 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 writing, ...
TOOL
0.955601
5.813823
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2016-11-30T14:52:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75a3f3d65...
a90ce58e-e797-4162-91e8-01a2a26064f1
akshayupadhyay008/CpTemplate1
cp1-part1/cp7.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC target ("avx2") #pragma GCC optimize ("O3") #pragma GCC optimize ("unroll-loops") #define ill int long long #define ld long double #define fi first #define se second #define pb push_back // #define fo(i,k,n) for(ill i=k;i<n;i++) // #define fr(i,n,k) for(...
ALGO
0.999809
5.237852
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-06-11T11:15:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "712f33fc47b...
aa56ba56-8eb5-4f29-8b23-ec8f7d02c5b3
CaseyYang/LeetCode
LeetCode/3Sum_Closest/Main.cpp
#include<iostream> #include<vector> using namespace std; class Solution { public: void sort(vector<int> &num, int start, int end){ if (start < end){ int j = start - 1; for (int i = start; i < end; ++i){ if (num[i] < num[end]){ ++j; swap(num[i], num[j]); } } ++j; swap(num[j], num[end]...
ALGO
0.999993
5.301689
{ "github_metadata": { "branch": "master", "commit_count": 142, "repo_created_at": "2014-11-06T02:28: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": "feea88cf...
74076941-b171-4b63-a1b0-0e4d6da5df87
shakenokanzume/AtCoder_Sources
ABC_hard_100/003/main.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < n; i++) //グローバル変数として、諸変数を宣言 const vector<int> dx = {1, 0}; const vector<int> dy = {0, 1}; const ll INF = 10000000; int H, W; vector<string> grid; ll solve(){ //用いるdpのvector配列を生成。最初は非常に大きな値を入れておく vector<ve...
ALGO
0.999927
4.556379
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2020-11-04T01:31:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d67d8a5064...
c313b7d6-3f27-4145-b1c6-ccf242fec6be
you68681/GPAR
ARC-Planner/src/landmark_graph.h
#ifndef __LANDMARK_DISCOVERY_H__ #define __LANDMARK_DISCOVERY_H__ #include "instance.h" #include "domain.h" #include "relaxed_actions.h" #include "relaxed_graph.h" #include "landmark.h" class LandmarkGraph{ public: LandmarkGraph(Domain *d, Instance *i ){ // Save domain and instance references _dom...
ALGO
0.998905
3.48088
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-12-17T05:09:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 2, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e88b384ac1...
5fddabc6-0616-4a30-aa5b-3619f6c0939a
BaeJinho4028/algorithm-problem-solving
백준/Gold/20057. 마법사 상어와 토네이도/마법사 상어와 토네이도.cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define X first #define Y second // 20 20 5 a(55) int board[505][505]; bool vis[505][505]; int dx[4] = { -1, 0, 1, 0 }; int dy[4] = { 0, -1, 0, 1 }; int dr[4][10] = { { 0, -1, 0, 1, -2, -1, 0, 1, 0, -1}, { -2, -1,-1,-1, 0, 1, 1, 1, 2, ...
ALGO
0.999749
4.079716
{ "github_metadata": { "branch": "main", "commit_count": 989, "repo_created_at": "2023-05-14T03:50:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ffe47c5ca7...
88f5f48a-285d-4c46-9c8f-8e8a307a2ac7
BigFav/Project-Euler
p_23.cpp
#include <iostream> #include <vector> using namespace std; /* Find the sum of numbers that cannot be made of 2 abundant sums. */ int abundant_sum_check(int num, vector<int> abundant_nums) { vector<int>::iterator head = abundant_nums.begin(); vector<int>::reverse_iterator tail = abundant_nums.rbegin(); /...
ALGO
0.99928
5.053379
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2014-10-10T09:47: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": "bdad97d76...
306b0555-4933-4138-9aa9-1aec5531fb26
suv-1312/Trees
34 - Validate Binary Search Tree.cpp
/* Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with keys greater than the node's key. Both the left and right...
ALGO
0.999947
5.847026
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-05-06T04:52: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": "fe2c76926b0...
34db11cc-b91b-46c6-b33c-27840b1027e1
NafiAsib/competitive-programming
uva/11489.cpp
#include <bits/stdc++.h> using namespace std; #define watch(x) cout<<(#x)<<" is "<<(x)<<endl typedef pair<int, int> pii; typedef long long int64; const double eps = 1e-9; const int inf = 0x3f3f3f3f; const long long linf = 0x3f3f3f3f3f3f3f3fLL; int main() { #ifndef ONLINE_JUDGE // freopen("../io/in.txt", "r", stdin)...
ALGO
0.999794
3.374804
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2020-02-15T07:01:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b706966...
e97c79f7-bf99-472f-b1fc-8df2433b442b
wjin33/oofem-2.4
src/oofemlib/sparsegeneigenvalsystemnm.h
/* * * ##### ##### ###### ###### ### ### * ## ## ## ## ## ## ## ### ## * ## ## ## ## #### #### ## # ## * ## ## ## ## ## ## ## ## * ## ## ## ## ## ## ## ## * ...
ALGO
0.9899
5.151982
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-08-31T04:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90d80c736...
e9b175c1-bc66-4847-816b-08fdf2c5f2f9
breakds/hckr-topics
cpp/plsa.hpp
#include <vector> #include <random> namespace plsa { namespace { inline void normalize( double *x, int len ) { double s = 0.0; for ( int i=0; i<len; i++) s += x[i]; for ( int i=0; i<len; i++) x[i] /= s; } inline void normalize_at0( std::vector<double> &x, int k ) { i...
ALGO
0.998044
5.829077
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2013-05-12T13:06:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2deebfb45...