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
fa95abe9-04e1-479e-b0c6-229f987788ba
bobbyshashin/RoboMasters
base/openSouceCode/ImageConsProd.cpp
/******************************************************************************************************************* Copyright 2017 Dajiang Innovations Technology Co., Ltd (DJI) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Softwa...
TOOL
0.905117
3.986833
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2016-07-12T03:10:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1bea2ecdd...
3bd9edfa-add0-4b01-9ddb-1869af7dee6d
nishgpt/competitive_programming
hackerearth/may-circuits-20/shortest-path-revisited-9e1091ea_2.cpp
/* Author : <NAME> 2.0 */ #include<bits/stdc++.h> #define LL long long int #define getcx getchar_unlocked #define X first #define Y second #define PB push_back #define MP make_pair #define MAX 100005 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFL 1e18 #define chk(a) cerr << endl << #a << " : " << a << ...
ALGO
0.999957
3.553753
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2018-10-06T09:24:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dfb1a01...
8ca62a8c-3b4b-46af-8984-fe83ce99cc2b
H-Shen/My_Code_Collection
Leetcode/124/124.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.999997
5.784052
{ "github_metadata": { "branch": "master", "commit_count": 1586, "repo_created_at": "2019-04-11T06:48:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eac501b...
9b1ae89f-fadb-4215-8c31-16d9e1dd1575
adun322/tinkoff-course-24-25
4-STL/B.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; void solve() { long long n, k; cin >> n >> k; multiset<long long> pon; vector<long long> adun(n); for (long long i = 0; i < n; ++i) { cin >> adun[i]; } for (long long i = 0; i < k; ++i) { ...
ALGO
0.999981
3.452945
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-15T00:24: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": "133d6a382f95...
339fd04e-74f6-4641-a11c-8e2e605a0f2c
skjha1/Data-Structure-Algorithm-Programs
Stack/13 Max area rectangle in Binary matrix.cpp
//https://leetcode.com/problems/maximal-rectangle/ class Solution { public: int largestRectangleArea(vector<int>& heights) { int n= heights.size(); vector<int> left,right; stack<pair<int,int>> s1,s2; int pseudo_index =-1; int pseudo_index1 =n; for (int i=0;i<n;i++) { if (s1.siz...
ALGO
0.999949
5.994489
{ "github_metadata": { "branch": "master", "commit_count": 682, "repo_created_at": "2020-08-12T04:43:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 652, "forks": 257, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8e52...
cfedc51c-1df8-4302-a06d-16341d9bed9f
ichbingrg/C
L203_Challenge1/main.cpp
#include <iostream> #include <memory> #include <vector> using namespace std; class Test{ int data; public: Test():data(0){ cout << "Test constructor for " << data << endl; } Test (int data): data(data){ cout << "Test constructor for " << data << endl; } int get_data() const { return data; } ~Test(){ ...
TOOL
0.94032
4.65208
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-06-17T21:24:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b06ba6c9a438...
e820b202-6bba-42c0-8722-b29160aeccfe
arnove55/Programing
OOCP/PRACTICAL_07.CPP
// DEFINITION :- 7. Find the maximum number using “Return by reference”. // ENROLLMENT NUMBER :- 190510101173 // NAME :- <NAME> // SEM :- 3 BACH :- 2 DIV :- C // THIS CODE IS WRITTEN IN VS CODE #include<iostream> using namespace std; int& max(int &NUMBER_A, int &NUMBER_B){ if (NUMBER_A > NUMBER_B) { ...
ALGO
0.998592
3.944018
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-08-15T13:45:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82d42c0e3...
c6720e06-8175-4f1c-9dd8-1323d1ca38a4
ishandutta2007/codeforces-e
errorgorn/normal/1610/I.cpp
// // #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <ext/rope> using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; #define ll long long #de...
ALGO
0.999616
3.884452
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "69c6288286a8...
1462c553-237f-4c78-b629-145104933ba0
hashcodez2004/DSA
Palindrome partitioning II--MEMOIZED.cpp
#include <bits/stdc++.h> using namespace std; class Solution { private: bool isPalindrome(int i, int j, string& temp){ while(i <= j){ if(temp[i] != temp[j]) return false; i++; j--; } return true; } int helper(int i, string& s, vector<int>& dp){ ...
ALGO
0.999994
5.477467
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2025-04-16T14:29: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": "f6a37603505...
705424d2-d9f6-401d-8d72-8ba39bcfb282
MostafaAtwa22/Leetcode-daily-problems
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros/minimum-equal-sum-of-two-arrays-after-replacing-zeros.cpp
class Solution { public: long long minSum(vector<int>& a1, vector<int>& a2) { long long sum1 = 0, sum2 = 0, z1 = 0, z2 = 0; for (auto i : a1) { sum1 += i; if (!i) z1++; } for (auto i : a2) { sum2 += i; if...
ALGO
0.999952
4.192208
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2025-04-30T09:24: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": "da9d83b20a...
885958c2-91bc-45be-8be1-eff6ba2e389e
divyashC/kattis-solutions
C++/abc.cpp
// https://open.kattis.com/problems/abc #include <iostream> #include <algorithm> using namespace std; int main() { int i, nums[3]; string abc; cin >> nums[0] >> nums[1] >> nums[2]; cin >> abc; sort(nums, nums+3); if(abc == "ABC") { cout << nums[0] << " " << nums[1] << " " << nums[...
ALGO
0.999923
4.173295
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2021-05-11T04:39: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": "be083538666...
a5fee97e-d691-4ccd-bdef-40267a500856
y761823/ACM-code
HDOJ/p3682.cpp
////////////////////System Comment//////////////////// ////Welcome to Hangzhou Dianzi University Online Judge ////http://acm.hdu.edu.cn ////////////////////////////////////////////////////// ////Username: y761823 ////Nickname: Oyk ////Run ID: ////Submit time: 2014-03-23 20:31:28 ////Compiler: GUN C++ /////////////////...
ALGO
0.999724
3.391816
{ "github_metadata": { "branch": "master", "commit_count": 598, "repo_created_at": "2015-05-11T15:21: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": "77a67725...
3ab2f247-c3ca-4ceb-898a-08c9f0cc4fc6
RenattoGuzman/Microprocesadores-Proyecto2
Proyecto 2 - Microprocesadores.cpp
#include <iostream> #include <pthread.h> #include <random> #include "unistd.h" using namespace std; /* * Universidad del Valle de Guatemala * Programación de Microprocesadores - Sección: 20 * <NAME> - Carné: 21008 * <NAME> - Carné: 21053 * <NAME> - Carné: 21592 * <NAME> - Carné: 21646 * * Proyecto #2 - Optimi...
ALGO
0.975728
4.489242
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-10-06T13:20: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": "ee506ef7e80...
17e1f6b7-40ae-4a17-8a33-9f4092fed79c
qudwns2052/data_structure
문제5-1/문제5-1.cpp
#include "stdafx.h" #include <stdlib.h> #include <string.h> #include "CLinkedList.h" #include "Employee.h" Employee * WHOWHO(List * plist, char * name, int day); void Show(Employee * who); int main() { List list; ListInit(&list); Employee * who; who = (Employee*)malloc(sizeof(Employee)); who->empNum = 1111; st...
TOOL
0.993051
3.160144
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2019-02-10T18:07:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b55b10f4...
fbe282bc-3d8c-4af6-9808-a1647ef70087
luuj/3-3-Simulation
Phase I Trial Simulation/DLTGenerator.cpp
#include "DLTGenerator.h" /*Generates a random number between 0 and 1 with uniform distribution*/ double uniformRandGen(double startNum, double endNum) { std::random_device rd; std::mt19937 gen(rd()); std::uniform_real_distribution<> dis(startNum, endNum); return dis(gen); } //Calculates gamma va...
ALGO
0.932489
4.062838
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-05-14T04:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f0cb04aa760...
b459655a-6f41-45f9-8b09-1837c5bb39ed
soomsoomee/c_coding
c++_coding/Arr.cpp
# include <iostream> #include "Arr.h" void InitArr(tArr* _pArr) { // 8byte 크기의 힙 메모리를 만들고 int 포인터로 강제 캐스팅. _pArr->pInt = (int*)malloc(sizeof(int)*2); _pArr->iCount = 0; // int를 8byte에 저장하므로 최대 2개를 넣을 수 있음. _pArr->iMaxCount = 2; } void Reallocate(tArr* _pArr) { // 동적할당은 원하는 위치에 이어서 할 수 없기 때문에 새로운 공간에 힙 메모리...
ALGO
0.996744
4.215153
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2021-12-22T13:34: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": "4acffbc1314...
cdd630a3-9930-4f52-aee9-1013fc5ea9e7
gusdndl/BOJ
백준/Platinum/1040. 정수/정수.cc
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long llong; int mem[2][1 << 10][18], len, counter; int recursive(int lower, int set, int depth, int* arr) { if (depth == len) return counter == 0; int& ref = mem[lower][set][depth]; if (ref != -1) return ref; ...
ALGO
0.999988
3.877701
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2023-05-02T05:51: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": "81fe537f79...
e4006c0c-97a4-4d85-a3df-f86f67172c1b
manojz18/Data-Structure-Algoritms
Stack/two_stack_in_array.cpp
#include <bits/stdc++.h> class TwoStack { public: int *arr; int top1; int top2; int size; // Initialize TwoStack. TwoStack(int s) { // Write your code here. size = s; top1 = -1; top2 = size; arr = new int[size]; } ~TwoStack() { ...
ALGO
0.999263
4.954968
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2024-10-15T19:56: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": "3d2b1cd2c...
47bb53df-c0d0-41be-ab9d-d246dd981b2a
igateno/cs161-Project
diameter.cpp
#include <fstream> #include <iostream> #include <cstdlib> #include <vector> #include <map> #include <queue> #include <set> #define INFINITY -1 using namespace std; class Path { public: vector<int> nodes; int hops; Path(int n) { nodes = vector<int>(); nodes.push_back(n); hops = ...
ALGO
0.946639
3.895335
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2011-11-01T05:28:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d74385110...
dc93a2b5-c577-4b39-aa58-072b563e3ea4
ldct/cp
codeforces/1372/D/D.cpp
#include <bits/stdc++.h> using namespace std; constexpr size_t MAX_N = 200009; int N; long long B[MAX_N]; long long* A_ptr = B; long long memo[MAX_N][2][2]; long long ans(int start, bool p1, bool p2) { if (start == N) return 0; if (memo[start][p1][p2] != -1) return memo[start][p1][p2]; if (p1 && p2) return ...
ALGO
0.99996
3.902174
{ "github_metadata": { "branch": "master", "commit_count": 647, "repo_created_at": "2011-02-20T07:42:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e6a78ad...
e5666f17-669b-41a0-abb6-8d3f67a6a844
Werkov/dove-eye
lib/src/cv_kalman_filter.cc
#include "dove_eye/cv_kalman_filter.h" using cv::Scalar; namespace dove_eye { /** * cv::Mat predicted state cannot be shared! */ CvKalmanFilter::CvKalmanFilter(const CvKalmanFilter &other) : kalman_filter_(other.kalman_filter_), prediction_(other.prediction_.clone()), prediction_valid_(other.predic...
ALGO
0.953612
7.179861
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2014-11-17T15:23:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 3, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "b06e00...
969a42c9-cced-43a2-8f60-e8d03b35f514
wjin33/oofem-2.4
src/oofemlib/parallelordering.h
/* * * ##### ##### ###### ###### ### ### * ## ## ## ## ## ## ## ### ## * ## ## ## ## #### #### ## # ## * ## ## ## ## ## ## ## ## * ## ## ## ## ## ## ## ## * ...
ALGO
0.990052
5.416486
{ "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": "f31cef881...
49ab8952-d5d6-403a-a344-129fec7918b7
snl-dakota/dakota-packages
hopspack/src/src-executor/HOPSPACK_ExecutorMpi.cpp
// $Id: HOPSPACK_ExecutorMpi.cpp 220 2014-01-02 21:24:59Z tplante $ // $URL: https://software.sandia.gov/svn/hopspack/trunk/src/src-executor/HOPSPACK_ExecutorMpi.cpp $ //@HEADER // ************************************************************************ // // HOPSPACK: Hybrid Optimization Parallel Search Pack...
ALGO
0.983586
7.146479
{ "github_metadata": { "branch": "devel", "commit_count": 279, "repo_created_at": "2021-08-17T16:15:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 6, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "044f628059...
c9634318-1432-41f9-b794-c6dcdfaf13c8
jacwah/dd2360
Assignment_4/ex_bonus/exercise_bonus.cpp
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <stdint.h> #include <CL/cl.h> #include <string.h> // 40 GB memory // sizeof(Particle) = 4*3*2 = 24 bytes // 40 GB / 24 B = 1.6 G particles #define NUM_PARTICLES 1e6 #define NUM_ITERATIONS 10 // This is a macro for checking the error variable. #def...
ALGO
0.968866
5.378773
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-11-11T13:31: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": "40d6efa20e3...
e2334f61-2a4b-43f2-9b50-52f2e4d64300
rodea0952/competitive-programming
AtCoder/ABC/130/F.cpp
#pragma GCC optimize("O3") #include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include...
ALGO
0.999337
4.629938
{ "github_metadata": { "branch": "master", "commit_count": 408, "repo_created_at": "2019-08-15T06:22: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": "f3ae6e21...
6f947b35-3085-408f-a4d6-fbf9da6ae587
WorldOfWheat/CodeDepositary
C_C++/TIOJ/1287 . C.基礎排序.cpp
#include <bits/stdc++.h> #define int long long #define pii pair<int, int> #define tp tuple<int, int, int> #define mp(x, y) make_pair(x, y) #define F first #define S second using namespace std; __attribute__((optimize("-O3"))) int n; vector<int> ve; void merge_sort(int l, int r, vector<int> &x) { if (l == r) ret...
ALGO
0.999741
4.756576
{ "github_metadata": { "branch": "main", "commit_count": 540, "repo_created_at": "2022-07-25T08:13: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": "506a1604ce...
30ebd18e-2703-410f-9190-9923cdade69d
weedrice/Algorithm
Baekjoon/2018/2018 LG Codemonster/2018codeMonsterD.cpp
#include <cstdio> #include <vector> #include <queue> using namespace std; vector<int>* tree; bool* isVisited; int dfs(int start, int end) { if (start == end) return 1; queue<int> q; for (vector<int>::iterator iter = tree[start].begin(); iter != tree[start].end(); iter++) { q.push(*iter); isVisited[start] =...
ALGO
0.999932
4.764313
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-06-05T15:47: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": "817b0b723...
14a2de3b-05a3-49c0-a597-062f0cfec36b
jXtlaga/algorytmy-sortujace
src/heapSort.cpp
// // Created by <NAME> on 3/21/25. // #include <cstdint> #include "../include/aizo_281198/heapSort.h" uint32_t getParent(uint32_t i){ return ((i +1) >> 1) - 1; } uint32_t getLeft(uint32_t i){ return ((i + 1) << 1) - 1; } uint32_t getRight(uint32_t i){ return (i+1) << 1; } /* przywracanie wlasnoci kopca ty...
ALGO
0.999228
4.089932
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-06-05T13:25: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": "b434fd7b9455...
62dbfd75-4502-4cb0-b7d0-6a0edf16bb4b
AbhishekPratik1810/my_cpp_dsa_practice
10.05 Graphs - Dijsktra.cpp
#include<iostream> #include<vector> #include<queue> #include<stack> #include<climits> #include<utility> //for pair #include<set> #include<algorithm> #include<map> using namespace std; class Graph{ private: vector<vector<pair<int,int>>> adjList; public: Graph(vector<vector<pair<int,int>>> v...
ALGO
0.999954
4.100192
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-09-15T17:44: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": "a017e3b0e6...
e50953ed-5477-48a8-8c91-ab4618c6e2ac
JeelRP/DSA
121_flatten_binary_tree.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int data; Node* right; Node* left; Node(int val) { data=val; right=NULL; left=NULL; } }; void Flatten(Node* root) { if (root==NULL || root->right==NULL && root->left==NULL) { return; ...
ALGO
0.99999
4.83431
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-02-10T09:24: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": "68f14f8799ab...
a14de758-2736-42c2-b4b3-aeceed5e0257
boranozum/CENG334-OS
HW2/utils.h
#ifndef UTILS_H #define UTILS_H // INCLUDES #include <pthread.h> #include <iostream> #include <sstream> #include <vector> #include <utility> #include "hw2_output.h" #include <unistd.h> #include <sys/time.h> using namespace std; // PARSER FUNCTION PROTOTYPE vector<int> parser(); // ORDER PARSER PROTOTYPE void order...
TOOL
0.982419
4.187984
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-10-30T09:42: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": "89a97d659d42...
1135c478-ffc4-449a-a499-8c81ac4c4e03
gaubeik/projet-dameo
projet/cpp/ia.cpp
#include "../header/jeux.h" using namespace std; bool Jeux::minmax(int numPlayer, int profondeur) { string test; Plateau* pia; int len=p->length(); Pion*** plaTmpReset; plaTmpReset = p->copy(); pia = new Plateau(len,plaTmpReset); int max = -100000; int maxTmp=0; int maxEat=p->bestEatby(numPlayer); in...
ALGO
0.999331
3.767084
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-03-23T13:40: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": "4a67cb7eff...
9cac53ea-ca24-4c26-8a17-fdc9d8d419ba
qwang2505/exercise
problems/array/wordSearch.cpp
#include "../include.h" /** * Given a 2D board and a word, find if the word exists in the grid. * * The word can be constructed from letters of sequentially adjacent cell, * where "adjacent" cells are those horizontally or vertically neighboring. * The same letter cell may not be used more than once. * * For ...
ALGO
0.999386
5.32479
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2016-10-22T08:44: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": "6ebf55b42...
c5cdb24a-cbf4-4358-b0cf-fb5f0a2c3ffe
iamcaominhtien/Algorithm
Dynamic Algorithm/c++/canConstructTabulation.cpp
#include<bits/stdc++.h> #include<string.h> using namespace std; ostream &operator<<(ostream &os, vector<bool>s) { int n=s.size(); for (int i=0;i<n;i++) if (s[i]) os<<"TRUE "; else os<<"FALSE "; return os; } bool canConstruct(string target, vector<string>wordBank) { int n_ta...
ALGO
0.99969
4.619173
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-02-16T14:35: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": "a26b5f4d20...
0b8f80c5-a0ab-4c45-84e1-d5c07b6b761b
godcrampy/competitive
problems/interview-cake/3-greedy-algorithms/2-highest-product-of-three/main.cpp
#include <iostream> #include <vector> using namespace std; // ! IMP int productOfThree(const vector<int>& v) { return v[0] * v[1] * v[2]; } int highestProductOf3(const vector<int>& vectorOfInts) { // calculate the highest product of three numbers int length = vectorOfInts.size(); if (length < 3) { throw "...
ALGO
0.998325
5.688745
{ "github_metadata": { "branch": "master", "commit_count": 319, "repo_created_at": "2019-09-07T05:51:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "267d49df...
2abb717b-234d-4c95-bdaf-0c86204d283e
GUANCAIBAN/Encryption-Algorithm
Salsa20 Algorithm/Salsa20.cpp
/* Salsa20是一种流式对称加密算法(流就是逐位加密,),类似于Chacha20,算法性能相比AES能够快3倍,在其官方网站上也是强调速度 https://cr.yp.to/salsa20.html 随机字节流和xor操作实现加解密,其中随机字节流很关键 */ #include<iostream> #include "Salsa20.h" void setIVVector(const unsigned char* vector) { if (vector == nullptr) return; m_vector[6] = convert(&vector[0]); m_vecto...
ALGO
0.936417
4.899507
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2021-10-02T16:59:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf85ffac5ba...
3e36edd1-a9e1-4db4-bbe4-0d69f59d6ad5
rudeuke/Rubik-s-Cube-solver
solver/solver.ino
#include <Servo.h> #include "Arduino.h" #include "MyServo.h" #include "ServoHandler.h" #include "Cube.h" String data = ""; String algorithm = "EVGCSM"; // temporary sequence to make crosses void setup() { Serial.begin(9600); pinMode(LED_PIN, OUTPUT); ROTATION_SERVO.servo.attach(ROTATION_SERVO.pin); ...
ALGO
0.992243
4.602185
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2021-05-16T14:13:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7990fa333...
e99ca5fc-80b2-4037-a9df-5dcb89605c10
YangJiaxiu/MyCode-Luogu
2419.cpp
/* 主要思路: 我们要明确:能确定排名的人 其实就相当于:入度 + 出度 = N - 1 可以先琢磨一下这个式子,(其实也不算太难),(先想上几分钟再往下看) 提示一下:我们的边是从胜利者指向失败者。。 好了公布答案:入度 => 这头奶牛被打败了(注意“被”字), 出度 => 这头奶牛打败了其它奶牛 N - 1 => 除了这只奶牛之外的其它奶牛; (其实这个思路我也是从楼下的题解中看(chao)的) 程序流程: 先跑Floyd,(跑Floyd可以明确所有点之间的关系(即使是间接到达的)) 然后再统计每个点的入、出度...
ALGO
0.999973
3.683854
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2018-04-07T23:35: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": "c17490755...
0db46a48-b162-40ac-8d66-b84ac53f6766
khan1203/xpsc
week-01/Day-03/B_Misha_and_Changing_Handles.cpp
// by <NAME> (CSE, BUBT) #include <bits/stdc++.h> #define ll long long #define nl endl #define PI 2 * acos(0.0) #define optimize() \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); using namespace std; int main() { optimize(); int tc = 1; // cin >> tc...
ALGO
0.999845
3.924679
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2024-10-26T02:55: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": "33e3e5574c1...
ad210f65-2e78-43e4-b6c1-6f2e6392afb2
ADACS-Australia/RSienaTest
src/model/effects/OutdegreeActivityEffect.cpp
/****************************************************************************** * SIENA: Simulation Investigation for Empirical Network Analysis * * Web: http://www.stats.ox.ac.uk/~snijders/siena/ * * File: OutdegreeActivityEffect.cpp * * Description: This file contains the implementation of the * OutdegreeActi...
ALGO
0.994936
6.301319
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-12-14T23:14:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59ac5476c1...
c2e11142-972d-4af9-b11c-8b825ea9d6ea
alexandraback/datacollection
solutions_2463486_0/C++/lonelyboy/solution.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <c...
ALGO
0.999694
3.892888
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3697af0ff...
6e089fb9-00d6-4cc0-afb1-74b1cfef66c4
anand873/CP_Codes
Codeforces/1461.E.cpp
//Author: <NAME> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vpii; typedef pair<ll,ll> pll; typedef vector<ll> vl; typedef vector<vl> vvl; typedef vector<pll> vpll; #define f...
ALGO
0.999802
3.061524
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2019-08-26T13:11:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf22f7010...
e6e1e0e2-bca9-4bf4-80b2-5cfe10b6d2a9
Loks-/competitions
common/data_structures/mdvector.h
#pragma once #include "common/base.h" #include <algorithm> #include <cstdarg> #include <vector> namespace ds { template <class TTValue> class MDVector { public: using TValue = TTValue; using TData = std::vector<TValue>; using TShape = std::vector<size_t>; using TSelf = MDVector<TValue>; protected: TData...
TOOL
0.917835
6.52016
{ "github_metadata": { "branch": "master", "commit_count": 3122, "repo_created_at": "2018-06-04T04:19:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3edb05...
f9dc72ad-decb-4a10-b49b-ca37e8715826
sasqiaalia/STUDI-KASUS-2
studi kasus 2.cpp
/* <NAME> (2100018449) ANELA INDRA (2100018454) <NAME> (2100018456) */ #include <iostream> #include <conio.h> using namespace std; int main (){ int pilih, ongkir, jumlah, total, harga, potbel, totbel, pot_ong, hasil_pot, akhir; string menu; float jarak; cout << "+++++++++++++++++++++++++++++++++++++++++++...
TOOL
0.964316
3.454527
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2022-04-01T09:08:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "571a2e9857...
ead1b9c9-984c-4907-a6f3-6229e4f43029
zhoulike/algorithms
cc150/2.4.cpp
#include <iostream> #include "linkedlist.h" using namespace std; ListNode* partition(ListNode *head, int x) { ListNode dummy(0); dummy.next = head; ListNode *large = NULL, *prev_l = NULL, *prev; prev = &dummy; for (ListNode *p = head; p; p = p->next) { if (p->val >= x) { if (...
ALGO
0.999976
4.811726
{ "github_metadata": { "branch": "master", "commit_count": 214, "repo_created_at": "2013-10-25T08:20:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1234842b...
31e05226-c0ba-42f7-a4d7-9e3f89584ec9
marcosvcloures/maratona
Finais brasileiras/2014/g.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN1 = 60000, MAXN2 = 60000, MAXM = 200000; int n1, n2, edges, last[MAXN1], prevs[MAXM], head[MAXM], matching[MAXN2], dist[MAXN1], Q[MAXN1], used[MAXN1], vis[MAXN1]; typedef pair<int, int> ii; void init(int _n1, int _n2) { n1 = _n1; n2 = _n2; edge...
ALGO
0.999823
4.212577
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2017-05-19T19:58:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f7b51740...
cff0edf7-ef6a-443a-b1f5-6787004f0c03
denis-gubar/TopCoder
II-209-2/MedalTable.cpp
#include <algorithm> #include <cmath> #include <cstdlib> #include <functional> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <set> #include <sstream> #include <stack> #include <string> #include <queue> #include <vector> using namespace std; // BEGIN CUT HERE #include <Windows.h> #p...
ALGO
0.999572
4.613317
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-12-21T13:06:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9248229b6...
de0db54a-1a0d-4b4a-877b-086e67438921
overlorde/Data-Structures-Lab
pending/L2T5.cpp
#include <bits/stdc++.h> #define ll long long int using namespace std; ll arr[10000000]; void insertion_sort(ll arr[], ll n) { ll i, key, j,cnt=0; clock_t total_clock_ticks; cout<<endl; cout<<"Applying Insertion sort . . ."<<endl; total_clock_ticks = clock(); for (j =2 ; j <= n; j++) { ...
ALGO
0.987028
4.591066
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-05-22T04:40: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": "133ebed84a...
855f9548-bef5-46aa-92a6-dfa3d3ed8b98
Aditya2600/DSA
3809-properties-graph/properties-graph.cpp
class DisjointSet { public: vector<int> parent, size; DisjointSet(int n) { parent.resize(n); size.resize(n, 1); for (int i = 0; i < n; i++) { parent[i] = i; } } int findUPar(int node) { if (node == parent[node]) return node; return parent[nod...
ALGO
0.999757
6.719386
{ "github_metadata": { "branch": "main", "commit_count": 1765, "repo_created_at": "2024-01-08T12:55: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": "ed1082d56...
d6dba352-9f7d-4668-87cd-6e80068d3e45
Geertvc/ThesisWorkspace
PBRT/src/rpf/RPFFilter.h
/* * RPFFilter.h * * Created on: Dec 18, 2012 * Author: thypo */ #ifndef RPFFILTER_H_ #define RPFFILTER_H_ #include "RPFPixel.h" class RPFFilter { public: //Constructor that is given the domain and the range sigma and the size of the neighboorhood n. RPFFilter(double sigmaD, double sigmaR, int n); //St...
ALGO
0.99755
6.076463
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2012-11-08T15:37: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": "899370ebe...
2c598efe-39fb-4434-8aaf-9ad0cb189478
lordjuacs/compe
lab3/pE.cpp
#include <bits/stdc++.h> using namespace std; int n = 8, x, y, t; vector<bool> col, d1, d2; vector<int> dama; string damainv; vector<string> sols; void print() { cout << "SOLN COLUMN\n # 1 2 3 4 5 6 7 8\n\n"; for (int i = 0; i < sols.size(); i++) { i < 9 ? cout << " " << i + 1 : cout << i +...
ALGO
0.999893
4.413555
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2024-04-27T21:05: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": "4d1b195c56...
ed973dfc-dec6-4c6e-a1bf-f17b39991fde
junluan/shadow
shadow/operators/kernels/decode_box.hpp
#ifndef SHADOW_OPERATORS_KERNELS_DECODE_BOX_HPP_ #define SHADOW_OPERATORS_KERNELS_DECODE_BOX_HPP_ #include "core/kernel.hpp" namespace Shadow { namespace Vision { template <DeviceType D, typename T> void DecodeSSDBoxes(const T* mbox_loc, const T* mbox_conf, const T* mbox_priorbox, int batch, int...
ALGO
0.936049
6.056642
{ "github_metadata": { "branch": "master", "commit_count": 654, "repo_created_at": "2016-03-22T05:40:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48a738e...
c20a044a-4a0e-409b-96fc-335a39e56b55
Darkdragon84/IMPS_CPP_tools
MPShelpers/include/IterativeSolvers.hpp
#ifndef ITERATIVE_H #define ITERATIVE_H /*********************************** * flag values: * -2: beta < thresh (def. 2e-16) */ ///================================================================================================================== /// overloaded conjugate function that can also be called on non-co...
ALGO
0.999559
6.048993
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2017-09-13T16:00:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d50b089...
69e8f581-f11d-4a45-bd2d-20acde05f1b1
shadab16/Scrabble-Helper
src/main.cpp
#include <algorithm> #include <cctype> #include <fstream> #include <iostream> #include <iterator> #include <map> #include <set> #include <string> #include <vector> typedef std::multimap<std::string, std::string> wordmap; typedef std::vector<std::string> wordlist; wordmap build_anagrams(std::istream& stream) { std::...
ALGO
0.998202
4.623787
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2012-04-07T10:08: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": "242b5fd8aa...
84efa138-b0cf-4922-9ac2-47f204f074ad
Euclidae/School-Projects
CSC213ASCIIart.cpp
#include <iostream> #include <string> #include <sstream> std::string operator *(const std::string character, int number){ std::string temporary; for(int i = 0; i <number; ++i){ temporary+=character; } return temporary; } void draw1(std::string character1, std::string character2); void draw2(s...
TOOL
0.980447
4.219392
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-04-21T13:38:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5f825d0b2a...
ed510975-105d-4e35-b33a-33d76f2ef1d3
wangdiqi/algorithm-cpp
src/leetcode/15.cc
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <unordered_set> #include <cassert> #include <stack> #include <limits> using namespace std; class Solution { public: void RunTest() { vector<int> arr; vector<vector<int>> result; arr = {-1, 0, 1, 2, -1, -4}; result ...
ALGO
0.999713
5.677749
{ "github_metadata": { "branch": "master", "commit_count": 252, "repo_created_at": "2019-06-05T13:44:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbea7ff7...
3d08704c-4b77-4f28-b8ce-d4eb5f75fc1a
postrantor/pressure_sensor
include/pressure_sensor/crc_table.hpp
/** * @brief CRC校验表和计算函数 * @file crc_table.hpp */ #ifndef CRC_TABLE_HPP_ #define CRC_TABLE_HPP_ #include <array> #include <cstdint> #include <stdexcept> namespace crc { /// CRC高字节查找表(256项) constexpr std::array<uint8_t, 256> crc_high_table = { 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0...
ALGO
0.962615
6.720765
{ "github_metadata": { "branch": "ros2", "commit_count": 31, "repo_created_at": "2025-02-20T14:20: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": "f949fbfa7ce...
49234522-9558-41f1-a6c7-59f12e6e9f8e
XUANTIE-RV/open-yoc
components/amrnb/src/enc/src/cor_h.cpp
/* ------------------------------------------------------------------ * Copyright (C) 1998-2009 PacketVideo * * 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.o...
ALGO
0.999769
5.469789
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-04-13T05:30:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 45, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c35b5c32...
d041d3ed-d033-4c67-bf88-ae9f622b6f79
alisw/AliPhysics
PWGCF/FEMTOSCOPY/AliFemto/AliFmHelix.h
/// /// \file AliFmHelix.h /// #pragma once #ifndef ALIFMHELIX_H #define ALIFMHELIX_H #include <cmath> #include <utility> #include <algorithm> #include <TMath.h> #include "AliFmThreeVectorD.h" /// \class AliFmHelix /// \brief A helper helix class /// /// Includes all the operations and specifications of the helix...
TOOL
0.993018
5.32805
{ "github_metadata": { "branch": "master", "commit_count": 89208, "repo_created_at": "2016-06-21T19:31:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 104, "forks": 792, "issues": 0, "pull_requests": 9 }, "file_meta": { "content_id": "15a...
6e4f1da3-8837-4519-9c51-feba13802bc6
MAZHARMIK/Interview_DS_Algo
DP/1-D DP/Longest Arithmetic Subsequence of Given Difference.cpp
/* MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=OHxwaAbO1A8 Company Tags : AMAZON, META Leetcode Link : https://leetcode.com/problems/longest-arithmetic-subsequence-of-given-difference/ */ //Approach-1 (Recursion + Memo with 2-D Memo) - (Memory Limit Exceeded) ...
ALGO
0.999977
5.609795
{ "github_metadata": { "branch": "master", "commit_count": 5946, "repo_created_at": "2020-07-12T13:13:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2586, "forks": 1357, "issues": 7, "pull_requests": 37 }, "file_meta": { "content_id": "...
3d24ecf6-dee6-4431-bf07-afe7dfe09d9c
wavescholar/numerical_libraries
itpp/itpp-4.3.1/itpp/comm/exit.h
/*! * \file * \brief Definitions for EXtrinsic Information Transfer (EXIT) chart class * \author <NAME> * * ------------------------------------------------------------------------- * * Copyright (C) 1995-2010 (see AUTHORS file for a list of contributors) * * This file is part of IT++ - a C++ library of mathe...
ALGO
0.974831
6.091573
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2012-11-30T14:19:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 4, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "aa77d8a2...
67cf1cb1-2ff8-4e8d-8fbc-0416a4d427ac
shivambhushan/Codes
N Queen Problem Recursion.cpp
#include<iostream> using namespace std; bool isSafe(int board[10][10], int x, int y, int n) { //column for (int i = 0; i < x; ++i) { if (board[i][y] == 1) { return false; } } int a, b; //left diagonal a = x, b = y; while(a>=0 and b>=0) { if (board[a][b]==1) { return false; } a--; b--; ...
ALGO
0.999961
5.287862
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-03-29T06:31: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": "ad4dcf3155...
3bb213af-ddb6-474c-a88c-6b3c52a66d54
Md-Shoaib-Abdullah-Khan/Competitive-Programming
CP Session/Contest/DP - 01/J.cpp
#include<iostream> #include<vector> using namespace std; #pragma GCC optimize ("Ofast") #pragma GCC optimize("O3") #define db double #define ll long long #define ull unsigned long long #define lo(i,a,n,x) ...
ALGO
0.999978
3.856828
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2021-01-09T19:47: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": "867ab0f05e8...
ac62c64a-6f95-4282-86d9-f74760dfe308
GENFrameWork/Utilities
XTraceMonitor/XTraceMonitor_CFG.h
/**------------------------------------------------------------------------------------------------------------------- * * @file XTraceMonitor_CFG.h * * @class XTRACEMONITOR_CFG * @brief eXtended Trace Monitor Config * @ingroup UTILITIES * * @copyright GEN Group. All rights reserved. * * @cond ...
CONFIG
0.902773
5.750839
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2023-04-10T09:38: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": "b5632cda5a6...
7190c0fb-041d-4bc2-b09a-29cee86119ed
ARW2705/leet-code-solutions
solutions/1323-E-Maximum-69-Number/main.cpp
#include <iostream> #include <string> #include <cmath> void printSuccess(int initial, int result, int expected) { std::cout << initial << " to " << result << " " << (result == expected ? "PASS": "FAIL") << "\n"; } int maximum69Number(int num) { std::string numStr = std::to_string(num); for (int i=0; i < numStr....
ALGO
0.987253
5.294683
{ "github_metadata": { "branch": "master", "commit_count": 269, "repo_created_at": "2020-01-30T19:07: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": "cfa1cbbc...
749fa330-c35a-4783-891d-a4211399d544
Hemantgithubpro/leetcode
LeetCode/Problems/2401-2600/2560/myowncode.cpp
#include <bits/stdc++.h> using namespace std; // it returns the index of the founded target in array int binarySearch(const vector<int>& arr, int target) { int left = 0; int right = arr.size() - 1; while (left <= right) { int mid = left + (right - left) / 2; if (arr[mid] == target) { ...
ALGO
0.999856
5.812468
{ "github_metadata": { "branch": "main", "commit_count": 236, "repo_created_at": "2025-03-06T19:40: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": "d8dabd57df...
34fd8986-c5ae-4435-a906-4fce92d50582
ltqusst/hello_ocl
run_myGEMM.cpp
/* * run_myGEMM.c * * Created on: Sep 14, 2017 * Author: hddls */ #include <stdio.h> #include <stdlib.h> #include <CL/cl.h> #include "utils.h" #include <sys/time.h> // Repeat all kernels multiple times to get an average timing result #define NUM_RUNS 10 // Size of the matrices - K, M, N (squared) #define S...
ALGO
0.973703
5.571753
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-09-15T03:40:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "991ff84325...
9c058441-c1d7-4502-94dc-840b588570f7
itsanamulhassan/data_structure
Week 06 BST, Heap, Priority Queue and Map/22. Heap Implementation/delete_from_min_heap.cpp
#include <bits/stdc++.h> using namespace std; void insert_heap(vector<int> &v, int x) { v.push_back(x); int current_index = v.size() - 1; while (current_index != 0) { int parent_index = (current_index - 1) / 2; if (v[parent_index] > v[current_index]) { swap(v[parent...
ALGO
0.999937
5.118023
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-15T19:45: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": "3d077a7396ef...
78f6ea49-1536-49be-b475-a650ea264595
ahnguyen24/Lab_3
Thuat_toan.cpp
#include <iostream> #include <fstream> #include <sstream> #include <cmath> #include <time.h> #include <chrono> #include <cstring> #define MAX_SIZE 500001 using namespace std; struct inputData { string mode; string algorithm_name; int size; string output_para; }; template <class T> void HoanVi(T& a, T& b) { T x =...
ALGO
0.99912
4.393865
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-07-19T13:45:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "635228371627...
ce88dd59-2bcc-40cb-8ccc-7ca64df79fbf
JimyMa/FuncTs
fait/tensorexpr/evaluate_dim.cpp
#include "evaluate_dim.h" #include <iomanip> #include <iostream> #include "ir_utils.h" namespace torch { namespace jit { namespace tensorexpr { namespace { using ExprRegMap = std::unordered_map<ExprPtr, RegId, ExprHasher, ExprEq>; class ConstCollector : public IRVisitor { public: ConstCollector(std::vector<int...
TOOL
0.961121
7.115336
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2023-10-21T11:12:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5feddd2b40...
fa74b7f1-4eb3-4d64-9623-b497a7409f68
ishandutta2007/codeforces-b
burunduk1/normal/13/E.cpp
#include <cmath> #include <cctype> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <algorithm> #include <vector> #include <string> #include <sstream> #include <iostream> #include <functional> #include <map> #include <set> using namespace std; #define forn(i, n) for (int i = 0; i <...
ALGO
0.999887
3.782153
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05: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": "0090f3062f97...
2ade2f9e-47cf-4c4b-8d8e-7a69f450722a
raviprakash7367/coding-solution
leetcode/palindrome-with-minimum-sum.cpp
/* name= palindrome with minimum sum link- https://practice.geeksforgeeks.org/problems/32dc957908c2eb8beeeaeedf81f37df20d37c308/1 author- <NAME> time complexity- o(n) space complexity- o(1) method 1; */ class Solution { public: int minimumSum(string s) { int l= 0,r= s.length()-1; ...
ALGO
0.999911
4.664671
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-08-22T15:36:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed5ee6fb5a49...
a14f08a4-8542-44cf-b6c0-cd34c80630cc
v4if/leetcode
gtest/ALG/insert_sort.cpp
// // Created by root on 3/28/17. // #include <iostream> #include <gtest/gtest.h> /** Insert Sort 插入排序 */ using namespace std; class Solution { public: void insertSort(int num[], int n) { int curr, temp; for (int i = 1; i < n; ++i) { curr = i; temp = num[curr]; ...
TEST
0.997273
5.569489
{ "github_metadata": { "branch": "master", "commit_count": 340, "repo_created_at": "2017-02-24T12:41:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f55e7062...
8fb724b6-dd25-4aaa-b764-19bb2dfbab48
p-mazhnik/mipt-cpp
1sem/Base_seminar/10_4/4.cpp
#include <iostream> #include <cmath> using namespace std; struct point { int x; int y; }; struct point_array { int n = 3; point p[3]; float l[3]; }; void scan_point(point_array &a) { for(int i = 0; i < 3; ++i){ cin >> a.p[i].x >> a.p[i].y; } } void length(point_array &a) { f...
ALGO
0.999785
4.681264
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2017-02-27T20:58:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5c44d9ae...
2e7c4398-5493-41f9-b8e6-c64051b9faad
samuelabera21/Family-Management-System
Familly_management_system.cpp
#include <iostream> #include <vector> #include <string> #include <cstdlib> // for system("cls") using namespace std; // Structure to store family member details struct FamilyMember { string name; int age; string relationship; }; // Vector to store family members vector<FamilyMember> family; // Function t...
TOOL
0.971493
5.810722
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-04-06T19:54:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "24843edee2c4...
17a2ab33-6b93-4b06-a439-0c2d66978def
Ethan1918/data_structure
Storehouse/algorithm/sort.cpp
#include<iostream> #include<vector> #include<random> #include<ctime> using namespace std; //define of listnode struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class...
ALGO
0.999893
4.928643
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-08-15T08:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "395ad1e5e3...
450afca9-70e7-4c02-b30b-5d86600eaba7
billsboard/DMOJ_C
C++/acsl1p4.cpp
#include <iostream> #include <vector> #include <bitset> using namespace std; const int MAXN = 21; vector<int> adj[MAXN]; bitset<MAXN> res; int N, K, a, b, sA, sB; void dfs(int v, vector<int> stk, bitset<MAXN> bs){ for(int x : adj[v]){ bitset<MAXN> bsCpy; for (size_t i = 0; i < MAXN; i++) ...
ALGO
0.999303
4.200428
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2020-12-26T20:04:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98bcaa889a2...
536be5c6-aedd-4eea-a12e-343ff5cada9c
LLNL/COGENT
Chombo/releasedExamples/MappedMultiBlock/srcAdvection/AdvectionGradientMappedTaggingStrategy.cpp
#ifdef CH_LANG_CC /* * _______ __ * / ___/ / ___ __ _ / / ___ * / /__/ _ \/ _ \/ V \/ _ \/ _ \ * \___/_//_/\___/_/_/_/_.__/\___/ * Please refer to Copyright.txt, in Chombo's root directory. */ #endif #include "AdvectionGradientMappedTaggingStrategy.H" #include "AdvectPhysicsF_...
ALGO
0.998197
6.402386
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2016-06-24T23:22:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ae24e72ba...
955e65a8-edc8-4b08-90c5-a37a642524a9
UtileHomme1/Algorithm_Data_Structures_Compendium_full
Competitive_Programming_and_DS_Codes/C++_Codes/InterviewBit/Bitwise_Manipulation/Minimum_XOR_value/Solution2.cpp
// https: //www.geeksforgeeks.org/minimum-xor-value-pair/amp/ // https: //www.interviewbit.com/problems/min-xor-value/ #include <iostream> #include <bits/stdc++.h> using namespace std; class Solution { public: vector <int> findMinXor (vector <int> A) { sort (A.begin(), A.end()); ...
ALGO
0.999964
4.646008
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2018-05-23T03:07: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": "860fbdfca...
1bf59065-e9fd-4c13-a65e-6aba296efcbb
okuraofvegetable/AtCoder
atcoder.jp/ddcc2020-final/ddcc2020_final_c/Main.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; // #define int long long #define pb push_back #define mp make_pair #define eps 1e-9 #define INF 2000000000 //2e9 #define LLINF 100000000000000000ll // 1e17 #define fi first #defi...
ALGO
0.999997
4.034045
{ "github_metadata": { "branch": "master", "commit_count": 2098, "repo_created_at": "2020-03-24T04:44: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": "9597d5d...
ad9e9dbe-c156-43c1-8c4f-9b3ad930733a
nasimulsakib/DataStructurelab_P
lab 5.cpp
#include<iostream> using namespace std; struct student { int ID; string name; int Credit; float cgpa; }; int main() { struct student s[20],temp; int i,j,n,z,chk,index,large,f; cout<<"Number of Student:"; cin>>n; for(i=0; i<n; i++) { cout << " Information of " << (i + 1) <...
TOOL
0.997534
3.428274
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-09-27T07:05: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": "f9715b2f2aa...
7c2bce61-9747-462c-bb87-0f4e3291cefc
CGAL/cgal
Nef_2/test/Nef_2/issue7662.cpp
#include <CGAL/Exact_rational.h> #include <CGAL/Lazy_exact_nt.h> #include <CGAL/Simple_cartesian.h> #include <CGAL/Bounded_kernel.h> #include <CGAL/Nef_polyhedron_2.h> #include <CGAL/Polygon_2.h> typedef CGAL::Lazy_exact_nt<CGAL::Exact_rational> FT; typedef CGAL::Simple_cartesian<FT> Kernel; typedef CGAL::Bounded_kern...
ALGO
0.992382
5.677493
{ "github_metadata": { "branch": "master", "commit_count": 113659, "repo_created_at": "2014-10-01T12:22:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5443, "forks": 1475, "issues": 511, "pull_requests": 136 }, "file_meta": { "content_id...
6dfb4045-ba6e-4596-a2d2-b3a9779f1206
ag12s/ISC3313CourseContent
Units/3 Unix Shell and Introductory C++ topics/Lecture9 Working with Arrays/Exercises/Discretization.cpp
#include <iostream> using namespace std; int main() { // number of elements in the domain int n = 20; // bounds of the domain (must be of type double) double xa = 0; double xb = 20; // compute the width of each element (also a double) double dx = (xb - xa) / n; // declare a pointer t...
ALGO
0.995506
4.731984
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-05-03T03:39: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": "116e00490077...
56d3ff72-6581-4f32-ab2c-8bae681155fc
addonovan/markov-tinder
src/main.cpp
#include <iostream> #include <fstream> #include <sstream> #include <stdexcept> #include <random> #include <ctime> #include <markov.hpp> #include <bios.hpp> int main(int argc, char *argv[]) { if (argc == 1) { std::cout << "Please provide the path to the bio file" << std::endl; return 1; } ...
TOOL
0.92843
4.881032
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-07-13T06:23: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": "932754df97...
ea026ba8-a309-4b17-987d-7fbc03b06d11
Abiesjqq/MathModules
draft4.cpp
// 还有IO,swarm, fitness三部分 #include <bits/stdc++.h> using namespace std; // 结构体定义 struct position_coord { double x, y; }; enum TaskType { EMERGENCY_DELIVERY = 1, NORMAL_DELIVERY = 2, RECON = 3 }; struct task { TaskType priority; double x, y; int num; union { int load; int hover_tim...
ALGO
0.999935
4.133301
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-05-10T15:21: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": "3d8345eef4e...
2f3972b5-dcf2-4f67-9189-812b602f61fa
Rilliane/Compilers_Principles_Homework
DFA_Simplify/main.cpp
#include <iostream> using namespace std; int head[1001],cnt=0,n=0;//head:每一个点链表头部,cnt:边的数目 n:状态数目 struct Edge { char w;//转移条件 int s,t;//起点,终点 int next;//下一个节点 }e[100001]; void add(int ss,int tt,char w) { cnt++;e[cnt].next=head[ss];head[ss]=cnt;e[cnt].t=tt;e[cnt].w=w; } int startState;//DFA的初始状态 int end...
ALGO
0.999983
3.770026
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-04-30T03:01:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b7bc9a59...
8721b128-2afe-49fb-8707-3ed4f2e42227
Ferenas/Opengl-simple-solar-system
Solar System project/Solar System project/main.cpp
#define _CRT_SECURE_NO_DEPRECATE #include <GL/freeglut.h> #include <math.h> #include <stdio.h> //Set the width and height of the Window #define Windowwidth 1024 #define Windowheight 1024 // Here the Distance can be treated as a unit. For example, the distance between // mercurio and sun is 1*Distance, and between e...
ALGO
0.991334
3.083165
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-05-16T04:03:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31de9ef36f...
1bd16fd3-6b44-4215-b594-63982a169230
Adhamet/Problem-Solving
codeforces/Problems/1949B Charming Meals/1949B.cpp
#include <bits/stdc++.h> using namespace std; #define dbg(v) cout << "Line(" << __LINE__ << ") -> " << #v << " = " << (v) << endl; #define ll long long #define pi pair<int, int> #define pll pair<ll, ll> #define el '\n' // const int N = 2e5 + 10; // const int oo = 1e9 + 20; int main() { ios_base::sync_with_stdio(0...
ALGO
0.999978
4.578287
{ "github_metadata": { "branch": "main", "commit_count": 798, "repo_created_at": "2022-01-29T00:47:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d528358cc9...
9b26d84a-676c-4446-8a1d-19b92bf1636f
Sadi-Hurayv/Competitive-Programming
Online Judge/Vjudge/Practice/YKW Academy/Phase 2 - Do You Really Know the Basics/Basic Number Theory/MOD from Phase 1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; // For Loop #define fi(i, a, c) for (ll i = (a); i < (c); i++) #define fd(i, a, c) for (ll i = (a); i > (c); i--) #define fe(it, a) for (auto it : a) // Pair #define pi pair<int, int> #define pll pair<ll, ll> #define ...
ALGO
0.999872
5.232875
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-01-05T10:17: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": "9e658f713af9...
b1a1044b-8f1c-4a04-8398-30e7b07ba8aa
gyshgx868/acm-templates
graph_theory/shortest_path/k_shortest_path.cpp
template <class T> class KShortestPath { public: T distance; explicit KShortestPath( const Graph<T>& graph, const Graph<T>& rev, int s, int t, int k, T inf) { max_weight = inf; Dijkstra<T> dis(rev, t, max_weight); distance = astar(graph, dis, s, t, k); } private: struct Node { int to; ...
ALGO
0.999992
4.631287
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-08-22T04:48:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0cbc297b...
98848c38-3258-4570-954c-648800168d5b
dbetm/cp-history
OmegaUp/22_AparicionDeCaracteresEnSubcadenas.cxx
#include <bits/stdc++.h> // RTE using namespace std; #define MAX_LEN 1000 #define MAX_CHAR 75 // To store count of all character int cnt[MAX_LEN][MAX_CHAR]; // To pre-process string from 0 to size of string void preProcess(string s) { int n = s.size(); // Initializing cnt with 0 memset(cnt, 0, sizeof(cnt)...
ALGO
0.99934
4.766396
{ "github_metadata": { "branch": "main", "commit_count": 384, "repo_created_at": "2019-01-09T04:13:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "757952595e...
01ae807f-72b7-48a2-8b34-0d974386d31f
lemoneid/1.do-exercises
Algorithm/HZOJ/41.cpp
/************************************************************************* > File Name: 41.cpp > Author: wei > Mail: <EMAIL> > Created Time: 2020年10月25日 星期日 10时12分48秒 ************************************************************************/ #include <iostream> #include <algorithm> #include <cstdio> #include <cst...
ALGO
0.999928
3.330306
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2020-04-28T11:59: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": "611f45c9...
606c491c-3610-49aa-b8ae-1c13d3b25034
ivlab/MinGfx
src/platform.h
/* This file is part of the MinGfx Project. Copyright (c) 2017,2018 Regents of the University of Minnesota. All Rights Reserved. Original Author(s) of this File: <NAME>, 2018, University of Minnesota Author(s) of Significant Updates/Modifications to the File: ... */ #ifndef SRC_PLATFORM_H_ #define SRC_PL...
TOOL
0.947681
6.414324
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2018-01-12T19:30:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 7, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "7fc768aeb...
78b5b6b7-990a-4cac-a9a5-17d3af4de8b9
devarpitraj/DSA
Binary_Tree/Deletion_from_BST/main.cpp
#include<iostream> #include<queue> class Node { public: int data; Node* left; Node* right; Node(int data) { this -> data = data; left = NULL; right = NULL; } }; void insertInBST(Node* &root, int data) { if(root == NULL) { roo...
ALGO
0.99998
4.758832
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-27T10:38:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3db7323ec8a3...
4425bdff-d6c8-4906-ab05-0bae58cfe539
HarSanjaykumaTatariya/AA_Lab1
Randomised_QS.cpp
#include <iostream> #include <vector> #include <cstdlib> using namespace std; int Comparisons = 0; int RandomComparisons = 0; int partition(vector <int> &arr, int low, int high, bool randomQS) { int pivot = arr[high]; int i = (low - 1); for(int j = low; j <= high - 1; j++) { randomQS ? RandomComparisons++ : C...
ALGO
0.997091
4.638441
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-07T04:29:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e32583b21e3c...
bbe5946d-fd77-4634-a22b-e9926890fe3a
SaladJack/ragdoll_simulator
Source/GeomUtils/src/sweep/GuSweepBoxTriangle_SAT.h
/* * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this so...
ALGO
0.956727
6.737324
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-11T07:25:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84d40fbc6...
00e918e0-02e3-4678-baaa-e4369d39eca4
dahiyakapil/DSA-Questions
6_Linked_list/2_Delition_Insertion_8_Problems/Insertion_in_LL/3_Insert_At_Position.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; Node(int data1, Node *next1) { data = data1; next = next1; } Node(int data1) { data = data1; next = nullptr; } }; void print(Node *head) { while (head != NULL)...
ALGO
0.999953
5.904301
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-16T11:52: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": "fb99cea72d08...
27142b15-f544-4514-ab31-778b915c4c41
sabernaserifar/RexPoN
src/USER-PQEQ/compute_dipole_pqeq.h
/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories <NAME>, <EMAIL> Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with San...
TOOL
0.947435
4.940173
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-09-12T23:51:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "151f5dee29...
95bdcecb-7bd0-4fd4-948a-f2ce4587a15a
hayoonleeMe/Algorithm_cpp
백준/Silver/1012. 유기농 배추/유기농 배추.cc
#include <bits/stdc++.h> using namespace std; const int dy[] = { -1, 0, 1, 0 }; const int dx[] = { 0, 1, 0, -1 }; int t, m, n, k, x, y, ret; int board[55][55]; bool visited[55][55]; void dfs(int y, int x) { visited[y][x] = 1; for (int dir = 0; dir < 4; ++dir) { int ny = y + dy[dir]; int nx = x + dx[dir]; if (...
ALGO
0.999937
4.724432
{ "github_metadata": { "branch": "main", "commit_count": 504, "repo_created_at": "2024-07-03T05:07: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": "39bd570f31...
3b46eb34-aaa9-478a-8b7b-cdef4749fe2f
ydb-platform/ydb
ydb/core/base/kmeans_clusters.cpp
#include "kmeans_clusters.h" #include <library/cpp/dot_product/dot_product.h> #include <library/cpp/l1_distance/l1_distance.h> #include <library/cpp/l2_distance/l2_distance.h> #include <span> namespace NKikimr::NKMeans { template <typename TRes> Y_PURE_FUNCTION TTriWayDotProduct<TRes> CosineImpl(const float* lhs, c...
ALGO
0.999517
7.057918
{ "github_metadata": { "branch": "main", "commit_count": 35208, "repo_created_at": "2022-02-07T14:52:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4512, "forks": 701, "issues": 2263, "pull_requests": 682 }, "file_meta": { "content_id": ...