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
19fa7897-24c6-411f-a291-a060f3cbed43
WuyangPeng/ProgrammingBooksCode
C++/初级/C++ 入门经典/Chapter07/07-09.cpp
//DISPLAY 7.9 Partially Filled Array //Shows the difference between each of a list of golf scores and their average. #include <iostream> const int MAX_NUMBER_SCORES = 10; void fillArray(int a[], int size, int& numberUsed); //Precondition: size is the declared size of the array a. //Postcondition: numberUsed is the num...
ALGO
0.996373
4.74731
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-08-02T03:48:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cca902119d...
f2686098-0323-476c-b3f1-6b116b8c23e2
ColinChen1843/Competitive-Programming
Uncategorized/Word Counting.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int n, q; vector<int> but; map<int, int> mems; int b_search(double opt, double w){ int l = 1, r = but.size() - 1; while(l <= r){ int mid = l + (r - l)/2; if(but[mid] == opt){ return but[mid]; } if(r - l == 1){ ...
ALGO
0.999991
3.57689
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-05-30T20:34:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "610ddab74e8d...
4d14c96f-00e5-421c-853b-51dc79c41c3a
aoapc-book/aoapc-bac2nd
ch5/UVa207.cpp
// UVa207 PGA Tour Prize Money // <NAME> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<cassert> using namespace std; #define REP(i,n) for(int i = 0; i < (n); i++) const int maxn = 144; const int n_cut = 70; struct Player { char name[25]; int amateur; int sc[4...
ALGO
0.98993
3.209205
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2014-06-01T16:48:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2739, "forks": 998, "issues": 44, "pull_requests": 7 }, "file_meta": { "content_id": "214...
b192d14e-afa8-4315-a7d7-8c6ffa9cdfb4
cycheng/coding-for-fun
leetcode/1542. find-longest-awesome-substring.cpp
// https://leetcode.com/contest/biweekly-contest-32/problems/minimum-insertions-to-balance-a-parentheses-string/ // // #biweekly 32 // #6, #dp, #mask, #like // Given a string S contains only digit character 0 to 9, find the longest // non-empty substring of s which: // 1. (must) contains even number count of digit 0 o...
ALGO
0.996342
4.526014
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2019-11-12T22:07:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "130fdac6...
3968d31d-efcf-48ff-b8b0-7592988411a9
sugia/timus-ural
URAL Volume 3/1297.cpp
//#include "stdafx.h" #include <cstdio> #include <cstring> #include <queue> #include <algorithm> using namespace std; #define MAXN 5000 #define MAXM 128 int head[MAXN * 2 + 1], succ[MAXN * 2 + 1], succran[MAXN * 2 + 1]; int sa[MAXN * 2 + 1], ran[MAXN * 2 + 1]; int letter[MAXM]; void da(char* str, int len) { memset(l...
ALGO
0.999974
3.191222
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2013-09-24T15:58:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6156ec2...
d0ad7aeb-15ee-4598-b354-f0212fbd8024
M45UDrana/DS-Algo-Problem-Solving
codeforces/1354B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<string, int> psi; #define ff first #define ss second #define pb(a) push_back(a) #define mp(a,b) make_pair(a,b) #define input freopen("input.txt","r",stdin) #define output freopen("output.txt","w",stdout) #def...
ALGO
0.999824
3.661765
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-06-08T17:09:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6d838e2b6f...
f1d1217a-d301-44d0-bacb-e65d9ab072f0
raincross7/code-similarity
codes/train_code/problem276/problem276_385.cpp
#include <bits/stdc++.h> #include<iostream> #include <string> using namespace std; int main() { int A,B,M; cin >> A >> B >> M; vector<int>a(A); vector<int>b(B); for(int i = 0;i < A;i++){ cin >> a.at(i); } for(int i = 0;i < B;i++){ cin >> b.at(i); } int m[M][3]; ...
ALGO
0.999966
3.498378
{ "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": "4e999353ebd3...
c468628d-54a8-43b6-81c4-3a28cdb3cd6d
AyushJaiswal300404/DSA-by-Ayush
Recursion/recursion8.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; class Solution { private: bool isSafe(int x, int y, int n, vector<vector<int>>& visited, vector<vector<int>>& m) { if ((x >= 0 && x < n) && (y >= 0 && y < n) && visited[x][y] == 0 && m[x][y] == 1) { ...
ALGO
0.999995
6.067384
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2024-12-22T08:30: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": "c84f1236e1b...
105ba0cf-eb4d-4115-9cb3-76a692a688c8
AGV-IIT-KGP/eklavya-2015
controls/controls/src/w_piddue.cpp
#include "w_pid.h" #include <iostream> using namespace std; WPid::WPid() : W_t_Lock(), Alpha_Lock(), Vl_Vr_a_lock() { W_t = 0; Vr_a = 0; Vl_a = 0; Alpha_a = 0; Alpha_t = 0; Kp_W = 0; Ki_W = 0; Kd_W = 0; Alpha_max=0; Alpha_min=0; r=0; d=0; W_error_sum=0; W_error_integral=0; W_error_diff=0; W_error_ol...
ALGO
0.983002
5.487419
{ "github_metadata": { "branch": "master", "commit_count": 162, "repo_created_at": "2015-05-08T18:43:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 43, "issues": 23, "pull_requests": 10 }, "file_meta": { "content_id": "4e9af0...
a96a4a3e-8fd5-42e8-9d4f-0137b1938e8f
rakesh-i/leetcode
1845.seat-reservation-manager.cpp
/* * @lc app=leetcode id=1845 lang=cpp * * [1845] Seat Reservation Manager */ // @lc code=start struct MinComparator { bool operator()(int a, int b) { return a > b; } }; class SeatManager { public: unordered_map<int, int> c; int count = 1; priority_queue<int, std::vector<int>, MinCo...
ALGO
0.998298
6.138347
{ "github_metadata": { "branch": "master", "commit_count": 296, "repo_created_at": "2023-06-17T11:00:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5beae2f1...
106744d0-3957-43d3-adf5-3d9c4fda889b
power321/ProgrammerInterview
Chapter-13/13-5-1.cc
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> using namespace std; struct node { int data; node *next; }; struct stack { node *rear, *first; }; //Push stack* push(stack *S, int num) { node *p = (node*)malloc(sizeof(node)); p->data = num; p->next = NULL; if(S->first == NULL) { ...
ALGO
0.998983
3.501911
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2016-02-20T10:19: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": "64de36cf3...
0803c6fa-589e-4639-8174-35cf6b624504
yja938882/CSE
algorithm/priority_queue.cpp
#include <iostream> using namespace std; int size = 0; int *queue_arr; void init( int s ){ queue_arr = new int[s]; } void insert( int key ){ int i = size++; while( i>0 && key > queue_arr[i/2] ){ queue_arr[i] = queue_arr[i/2]; i/=2; } queue_arr[i] = key; } void heapify( int root ){ int left = ( root+1 )*2 -1...
ALGO
0.999571
3.773823
{ "github_metadata": { "branch": "master", "commit_count": 238, "repo_created_at": "2018-04-02T13:50: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": "ca407e75...
f48764d8-bd30-4aec-a5f3-424ac7556d26
ShahjalalShohag/code-library
Number Theory/Linear Diophantine Equation with Nonnegative Solutions.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; const ll inf = 1e18; struct LDE { // sum(a[i] * x[i]) = k, x[i] >= 0 int n, x; vector<ll> d; LDE() {} LDE(vector<int> a) { // O(min(a[i]) * n * log(min(a[i]))) n = a.size(); priority_queue<pair<ll, int>, vector<pair<ll, int>>, greater<...
ALGO
0.999972
4.983292
{ "github_metadata": { "branch": "main", "commit_count": 952, "repo_created_at": "2018-11-18T08:49:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3240, "forks": 840, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9ab75...
568bd972-71b8-4581-8c2f-1374a52cc93b
domiee13/CTDL-GT
nhamChuSo.cpp
/* Trong một buổi học toán, giáo viên viết 2 số nguyên, A và B, và yêu cầu Tèo thực hiện phép cộng. Tèo không bao giờ tính toán sai, nhưng thỉnh thoảng cậu ta chép các con số một cách không chính xác. Lỗi duy nhất của là ghi nhầm '5' thành '6' hoặc ngược lại. Cho hai số, A và B, tính tổng nhỏ nhất và lớn nhất mà Tèo c...
ALGO
0.999696
5.2293
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-04-06T14:51:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4905b57c9...
f789e778-df01-4def-902a-6ee7486dc5d0
memset0/vjudge-code
LibreOJ/2265/28264239_AC_703ms_5932kB.cpp
#include <bits/stdc++.h> using namespace std; const int RLEN=1<<18|1; inline char nc() { static char ibuf[RLEN],*ib,*ob; (ib==ob) && (ob=(ib=ibuf)+fread(ibuf,1,RLEN,stdin)); return (ib==ob) ? -1 : *ib++; } inline int rd() { char ch=nc(); int i=0,f=1; while(!isdigit(ch)) {if(ch=='-')f=-1; ch=nc();} while(isdigit(...
ALGO
0.999938
3.808795
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2020-11-05T04:40:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3126b1fbd...
2b709f0a-cc24-42b7-a089-7c593be3b13f
OscarSandoval21/SandovalOscar_CIS5_Spring2017
Hmwk/Assignment_5/Project_Assignment_5/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on May 5th, 2017, 11:02 PM * Purpose: Assignment 5 Problems */ //System Libraries #include <iostream> //Input - Output Library #include <cstdlib> //Random number generator #include <ctime> //Set the random number seed #include <iomanip> //Formatting #includ...
ALGO
0.983291
3.458388
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2017-03-07T19:46: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": "5220a7b54...
4b9bf337-5ad7-4be1-9bc6-2ad6a95089c2
Yomi017/Undergraduate-cpp
first_semeter/bigproject/lex.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <unordered_map> #include <cctype> #include <algorithm> #include "project.h" using namespace std; // 判断字符串是否是数字 bool is_number(const string& s) { return !s.empty() && all_of(s.begin(), s.end(), ::isdigit); } // 判...
TOOL
0.974362
3.943037
{ "github_metadata": { "branch": "cpp", "commit_count": 1, "repo_created_at": "2024-11-14T06:41:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48e3796bf3816...
ee26b59b-2520-4680-a89b-32064e3e8124
optozorax/olymp
contests/leetcode/two-sum.cpp
// https://leetcode.com/problems/two-sum/ class Solution { public: int binary_search(int a, int b, function<bool(int)> good) { int old_b = b; if (b-a == 0) return -1; while (b-a != 1) { int c = (a+b)/2; if (good(c)) b = c; else a = c; } if (good(a)) re...
ALGO
0.999981
6.229815
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2019-03-22T10:38:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ffc36b8...
30fe14ed-dc5d-4035-912c-455824ef2275
wanyaworld/algo-study
src/jw/acmicpc/2606/main.cc
#include <iostream> #include <memory.h> #include <stdio.h> #include <unordered_map> using namespace std; unsigned int N{}, cnt{}; char adv_mat[101][101]; unordered_map<int, bool> visited_node{}; bool is_adj(int i, int j) { if (adv_mat[i][j] || adv_mat[j][i]) return true; return false; } void dfs(int cur) { if...
ALGO
0.99981
3.703769
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2020-10-27T09:00: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": "3fb36fe370c...
4d96bde4-1612-4fae-88e4-a586e99e21d0
simbody/simbody
SimTKmath/Optimizers/src/IpOpt/IpNLPScaling.cpp
// Copyright (C) 2005, 2006 International Business Machines and others. // All Rights Reserved. // This code is published under the Common Public License. // // $Id: IpNLPScaling.cpp 759 2006-07-07 03:07:08Z andreasw $ // // Authors: <NAME>, <NAME> IBM 2005-06-25 #include "IpNLPScaling.hpp" namespace SimTKIpo...
ALGO
0.978197
6.077608
{ "github_metadata": { "branch": "master", "commit_count": 5026, "repo_created_at": "2013-08-16T00:21:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2427, "forks": 483, "issues": 136, "pull_requests": 21 }, "file_meta": { "content_id": "...
02abf0b8-5a17-483d-85e7-3a12ea468b18
pareenj/Coding
Two Pointers/3 Sum Zero.cpp
vector<vector<int> > Solution::threeSum(vector<int> &A) { vector<vector<int> >ans; sort(A.begin(), A.end()); int n = A.size(); for(int i = 0; i < n-1; i++) { unordered_set<int> hashSet; for(int j = i+1; j < n; j++) { int Ak = A[i] + A[j]; if(hashSet....
ALGO
0.999983
5.350449
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-11-16T13:28: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": "d32669a1bc...
7788a446-520d-42ed-8668-26172f62845c
ishandutta2007/codeforces-c
cerberus97/normal/1312/D.cpp
/* cerberus97 - <NAME> */ #include <iostream> #include <iomanip> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <cstdlib> #include <map> #include <set> #include <queue> #include <stack> #include <vector> #include <algorithm> #include <numeric> using namespace std; #define pb push_b...
ALGO
0.99994
4.150141
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17: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": "caf041880ff9...
51db6a36-41ed-4edf-89ba-90eb9cea17a0
MsunM-cell/Basic-Algorithm
search_and_graph/topology/topology.cpp
#include <iostream> #include <cstring> using namespace std; const int N = 1e5 + 10; int n, m; int h[N], e[N], ne[N], idx; int d[N], q[N]; void add(int a, int b) { e[idx] = b, ne[idx] = h[a], h[a] = idx++; } bool toposort() { int hh = 0, tt = -1; for (int i = 1; i <= n; i++) if (!d[i]) ...
ALGO
0.999999
4.254265
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2021-08-07T14:27: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": "f2faded8991...
57d9e7d9-8140-46c5-aa42-b90510fe890a
OsamaAshraf01/Codeforces-Solutions
C/C - Soldier and Cards.cpp
// Link To Problem: https://codeforces.com/contest/546/problem/C #include <iostream> #include <bits/stdc++.h> #define lp(n) for(int i=0 ; i<n ; i++) #define rep(i, n) for(int i=0 ; i<n ; i++) #define all(v) (v.begin(), v.end()) #define sz(v) (int)(v.size()) using namespace std; typedef vector<int> vi; typedef deque<i...
ALGO
0.999981
3.780828
{ "github_metadata": { "branch": "main", "commit_count": 276, "repo_created_at": "2024-02-26T12:52: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": "402379fceb...
f15c5028-9a78-4898-b21e-5dc9d84ed4bc
TanmayVig/sem5Labs
CN lab/66.cpp
#include <bits/stdc++.h> using namespace std; string encryptRailFence(string text, int key){ char encrypt[key][(text.length())]; for (int i=0; i < key; i++) for (int j = 0; j < text.length(); j++) encrypt[i][j] = '1'; bool direction = false; int row = 0, col = 0; for (int i=0; i < text.length(); i++){ ...
ALGO
0.999901
4.161508
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-01-17T11:26: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": "42935f90a9d8...
c4b7db4d-6c6d-4ca9-b8f0-d0c8cbd15569
VishalSingh-07/Geeks-for-Geeks
Hard/Count_Smaller_Elements.cpp
/* Count Smaller elements Given an array arr containing non-negative integers. Count and return an array ans where ans[i] denotes the number of smaller elements on right side of arr[i]. Examples: Input: arr[] = [12, 1, 2, 3, 0, 11, 4] Output: [6, 1, 1, 1, 0, 1, 0] Explanation: There are 6 smaller elements right afte...
ALGO
0.999989
6.347989
{ "github_metadata": { "branch": "master", "commit_count": 250, "repo_created_at": "2022-12-29T15:13:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f2ccdf3...
7de08144-f1fe-4eae-806a-ff451d33e0b4
yuhenghuang/Leetcode
src/1802_MaximumValueAtAGivenIndexInABoundedArray.cpp
#include <local_leetcode.hpp> class Solution { private: int64_t area(int64_t d, int64_t h) { return (h + max(h - d, 0L) + 1) * min(d, h) / 2 + max(d - h, 0L); } public: int maxValue(int n, int index, int maxSum) { int l = 1, r = maxSum; while (l < r) { int m = l + (r - l) / 2...
ALGO
0.999728
5.240095
{ "github_metadata": { "branch": "master", "commit_count": 196, "repo_created_at": "2020-03-22T11:12: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": "806eaf6e...
c5f7db3b-8e56-4997-a608-b318023d8474
ihuei801/leetcode
MyLeetCode/Leetcode/Search in Rotated Sorted Array II.cpp
class Solution { public: bool search(vector<int>& nums, int target) { if (nums.size() == 0) return false; int left = 0; int right = nums.size() - 1; while (left <= right) { int mid = (left + right) >> 1; if (nums[mid] == target || nums[...
ALGO
0.999994
6.159586
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-06-05T02:21: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": "9768fa687...
da127c7c-cc2d-4ad6-80f9-f0cbefa2924d
maheshjainckd/Hacktoberfest2022-for-everyone
CPP/Dijkstra_Algorithm.cpp
#include #include using namespace std; int miniDist(int distance[], bool Tset[]) // finding minimum distance { int minimum=INT_MAX,ind; for(int k=0;k<6;k++) { if(Tset[k]==false && distance[k]<=minimum) { minimum=distance[k]; ind=k; } ...
ALGO
0.999942
3.920879
{ "github_metadata": { "branch": "main", "commit_count": 1700, "repo_created_at": "2021-10-22T16:00:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 147, "forks": 719, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "31771...
783929fb-bfb6-4dbf-a253-ebdca4fbc003
rms80/libgeometry
parameterization/ExpMapGenerator.cpp
// Copyright <NAME> 2011. // Distributed under the Boost Software License, Version 1.0. // (See copy at http://www.boost.org/LICENSE_1_0.txt) #include "ExpMapGenerator.h" #include "rmsprofile.h" #include "rmsdebug.h" #include <limits> #include <list> #include <set> #include <algorithm> #include "VectorUtil.h" #includ...
ALGO
0.981897
5.147612
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2012-11-20T16:38:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cacf9e43d...
fb159ba0-d823-4bdd-a279-e4d7f14bf9cc
mohitsinha04/LeetCode_Questions
jump-game-ii.cpp
class Solution { public:    int jump(vector<int>& nums) {        if(nums.size() <= 1) return 0;        int jumps = 1;        int maxstep = nums[0];        int maxpos = nums[0];        for(int i = 1; i < nums.size(); i++) {            if(maxstep < i) {                jumps++;                maxstep = maxpos;  ...
ALGO
0.999998
5.750225
{ "github_metadata": { "branch": "master", "commit_count": 339, "repo_created_at": "2020-08-17T17:14:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e899a40...
3ffe35bc-24d8-4b13-bd47-6d9d758e0097
Marian0/cimg_ejemplos
lib/myCImg.h
#ifndef MYCIMG_H #define MYCIMG_H #include <CImg.h> #include <vector> #include <deque> #include <algorithm> #include <set> #include <cassert> #include <complex> #include <limits> #include <iostream> #include <string> using namespace std; using namespace cimg_library; #define byte unsigned char #define intensidad(img...
ALGO
0.984288
4.014728
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2013-06-18T03:50:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05805cff98...
52b9583f-ba34-4a3e-8162-d75f9bb3a88f
NitinMadhukar/competitive-programming
May Lunchtime 2021 Div2/B.cpp
/* <NAME> */ #include<bits/stdc++.h> #include <algorithm> #define ll long long #define mp make_pair #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define big(x) greater<x>() #define sp fixed<<setprecis...
ALGO
0.999974
3.730746
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2021-06-10T05:02:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4b8039e7de...
3adddf27-6a66-4a12-80d9-fc77e597fda4
statgen/emeraLD
src/calcLD.cpp
#include "calcLD.hpp" #include<iostream> using namespace std; double THRESH; int max_sample; int N; int phased; void setThresh(double &p){ THRESH = p; } void setMaxSample(int &m){ max_sample = m; } void setPhased(int &p){ phased = p; } void setSize(int& n){ N = n; } bool filter(double& p, double& q){ if( p ...
ALGO
0.99734
3.077895
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2017-09-10T01:19:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 33, "forks": 8, "issues": 6, "pull_requests": 1 }, "file_meta": { "content_id": "1689300ff...
3a5b28d5-ade0-480a-bf17-b52881310917
Shashwat-Sahu/CP-DSA
CPU Scheduling Algos/RoundRobin.cpp
#include <iostream> using namespace std; void findWaitingTime(int processes[], int n, int bt[], int wt[], int quantum) { // remaining burst time int rem_bt[n]; for (int i = 0; i < n; i++) rem_bt[i] = bt[i]; int t = 0; while (1) { bool done = true; // Traverse all proce...
ALGO
0.999948
4.643206
{ "github_metadata": { "branch": "main", "commit_count": 488, "repo_created_at": "2021-10-01T15:23:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 81, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a32c941c...
64aad2f9-bb17-402c-ae23-0e72a767e769
darrylys/spoj
MMAXPER.cpp
#include<stdio.h> #define HORZ 0 #define VERT 1 #define max(a,b) (((a)>(b))?(a):(b)) #define min(a,b) (((a)<(b))?(a):(b)) #define abs(a) (((a)>=0)?(a):(-(a))) int main() { int n; int pa, pb, ca, cb; int data[2]; int pw, ph, cw, ch, tv, th, kk; scanf("%d", &n); pa = pb = 0; scanf("%d ...
ALGO
0.999992
3.376597
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-10-31T14:44: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": "a09fba5eb6...
9ea5e828-8e54-489f-9883-3a4a05af3cff
facebookresearch/rlmeta
rlmeta/cc/samplers/prioritized_sampler.cc
// Copyright (c) Meta Platforms, Inc. and affiliates. // // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. #include "rlmeta/cc/samplers/prioritized_sampler.h" #include <memory> #include <random> namespace rlmeta { KeysAndProbabilities Prior...
ALGO
0.989223
6.275462
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2021-12-16T02:47:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 281, "forks": 25, "issues": 7, "pull_requests": 2 }, "file_meta": { "content_id": "eadbc229...
8680a17b-dffa-4913-b815-50bc05cf692a
raincross7/code-similarity
codes/train_code/problem208/problem208_359.cpp
#include <iostream> #include <algorithm> #include <cmath> #include <set> #include <string> #include <vector> #include <iomanip> #include <map> using namespace std; #define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); typedef long long ll; typedef long double ld; const ll SIZE = 1e6 + 10, S2 = 1e7 ...
ALGO
0.999909
3.276554
{ "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": "20edcdbc5789...
645240a9-98b9-4366-9e4f-60da37b23f24
AmjadPrivate/Main_For_ProblemSolving_And_Project
ProblemSolvingLevelThree/OneToTen/ProblemOne/EngSolution/main.cpp
/* == Write a program to fill a (3 by 3) matrix with random number */ #include <iostream> #include <iomanip> #include <string> #include <stdio.h> using namespace std; int RandomNumber(int Form, int To) { int RandomNumber = rand() % (To - Form - 1) + Form; return RandomNumber; } void FillMatrixW...
ALGO
0.943452
3.818528
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2024-01-06T20:42:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0f2f2c827b...
4ec54085-771a-49b4-98e8-3b608e391ba9
lquatrin/cpp_volume_rendering
libs/math_utils/convexhull.h
#ifndef MATH_UTILS_CONVEX_HULL_H #define MATH_UTILS_CONVEX_HULL_H #include "geometry.h" #include <glm/glm.hpp> #include <vector> /** * Order of output vertices: Counter Clockwise * * 8 7 * \ / * *------------------* * | * * * * \ * | *...
ALGO
0.998963
6.570352
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2021-03-26T14:34:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed7da832c...
fd79515f-7b5f-42eb-9da3-b75deb37428c
dishantvt18/Competitive-Coding
Mo's on trees.cpp
#include<bits/stdc++.h> using namespace std; /*#include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; */typedef long long ll; typedef unsigned long long...
ALGO
0.999991
4.431994
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-09-25T17:32: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": "f9073d3e5...
94eff556-54c7-4eac-bea5-ae87475f199a
zhenzhai/nearest_neighbor
cpp/src/v2_tree.h
/* * File : rp_tree.h * Summary : Infrastructure to hold a binary space partition tree. */ #ifndef V2_TREE_H_ #define V2_H_ #include "vector_math.h" #include "rp_tree.h" using namespace std; template<class Label, class T> class V2Tree; /* Class Definitions */ /* * Name : V2Tree ...
ALGO
0.958811
6.26383
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2015-10-27T16:54:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9869374...
60b56118-8391-4d3b-8ac4-9fe0b7195b00
Romea/romea-core-common
include/romea_core_common/math/Matrix.hpp
#ifndef ROMEA_CORE_COMMON_MATH_MATRIX_HPP_ #define ROMEA_CORE_COMMON_MATH_MATRIX_HPP_ // std #include <iostream> // Eigen #include <Eigen/Core> // romea #include "romea_core_common/math/Algorithm.hpp" namespace Eigen { using Vector6d = Eigen::Matrix<double, 6, 1>; using Vector6f = Eigen::Matrix<float, 6, 1>; using...
ALGO
0.984264
6.662024
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2023-05-04T08:34:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08557543425...
38b297f7-2e61-40ff-84d6-759158c4a80b
masudranam/dsa_problems
Codeforces/Smallest_Excluded_LCM.cpp
#include<bits/stdc++.h> using namespace std; #define print(a) for(auto x:a)cout<<x<<' ';cout<<'\n'; #define debug(x) cout<<#x<<" "<<x<<endl #define all(a) (a).begin(),(a).end() #define sz(a) (int)(a.size()) #define int long long int #define endl '\n' #define ar array const int M = 1e9 + 7; const int N = 2e5 + 10; ...
ALGO
0.999713
3.972661
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2022-01-06T03:38: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": "045df556a3...
4b7c9ff1-989d-4dd8-bc7e-9c926e552a0d
secret777777/cs300
main.cpp
#include <iostream> #include <string> #include <vector> #include <sstream> #include <fstream> #include <algorithm> #include <memory> #include <limits> // Required for numeric_limits namespace my_namespace { using std::cout; using std::cin; using std::endl; using std::string; using std::vector; ...
TOOL
0.994202
5.590632
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-21T22:10: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": "ab78ed4f9273...
c1a06dc4-5b99-4ecd-b3fc-8f2a5fc1c511
abubakaristiak/Leetcode-Problems
Easy/_111_Minimum Depth of Binary Tree.cpp
/* * <NAME> * * * * * Coder : abubakaristiak * * * * Created : 2025-03-18 || 22:25:42 * * * * File : _111_Minimum Depth of Binary Tree.cpp */ #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #define ll long long #define pi pair<ll, ll> #define asort(v) sort...
ALGO
0.999944
5.074583
{ "github_metadata": { "branch": "master", "commit_count": 457, "repo_created_at": "2024-07-02T10:55:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d7d4966...
e70943b7-3133-427a-8102-2b0fb052fe40
Praveenkumar02023/LeetCode-DSA
1300-critical-connections-in-a-network/1300-critical-connections-in-a-network.cpp
class Solution { public: int timer = 1; void dfs(int node , int parent , vector<int>& tin , vector<int>& low, vector<int> & vis , vector<vector<int>>& mark,vector<vector<int>>& adj){ vis[node] = 1; tin[node] = low[node] = timer; timer++; for(auto it : a...
ALGO
0.999972
5.916734
{ "github_metadata": { "branch": "main", "commit_count": 961, "repo_created_at": "2024-06-03T08:49: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": "c5564152fc...
385509a9-9403-45a7-9704-5097407af8ce
barntsen/Gpuport
Src/Cuda-um/ac2dmod.cpp
extern "C" { #include <stdio.h> /* Library interface */ #include <stdlib.h> } #include "util.h" #include "model.h" #include "src.h" #include "rec.h" #include "ac2d.h" //#include "gpu.h" int NBLOCKS; int NTHREADS; int main(int argc, char *argv[]) { float *wavelet; // Source ...
ALGO
0.998032
4.549998
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-07-10T19:50:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "acf20d95e565...
8ec1d25c-5843-4b11-84d0-161575bbfc9b
Mahtab-hasan/cpp-data-structure
assignment 2/Queries.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; void Insert_at_head(Node *&head,int v) { Node *newNode=new Node(v); newNode->next=head; head = newNode; } void Insert_at_tail(...
ALGO
0.999918
4.402167
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-27T13:23: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": "1f5a359f6e10...
5cb6dc76-c086-4409-a812-be7feb344479
Takaaki-Saeki/Algorithms
atcoder/median_of_medians.cpp
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<list> #include<set> #include<map> #include<utility> #define rep(i,x) for(int i=0;i<(int)(x);i++) #define reps(i,x) for(int i=1;i<=(int)(x);i++) #define rrep(i,x) for(int i=((int)(x)-1);i>=0;i--) #define rreps(i,x) for(int i=((int)(x));i...
ALGO
0.999998
4.113237
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2018-10-14T09:02: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": "a8cbd8664...
fa26738e-dd7c-4159-a7ae-66a90306466a
miasolChan/Vintage-Effect
vintage_effect/LPFilter.cpp
#include <Bela.h> #include "LPFilter.h" /* * @brief Constructor */ LPFilter::LPFilter() { // Initialise frequency and Q values frequency_ = 100.0; q_ = 0.707; // When this constructor is called, call private calculateCoefficients method with initialised frequency and Q values calculateCoefficients(frequency_, ...
ALGO
0.918359
4.67206
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-05-19T22:43:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c3b63057710...
b0faf64c-c8f2-4b5e-bf25-c4ee45e716f9
AtkinsSJ/serenity
Userland/Libraries/LibCore/Process.cpp
/* * Copyright (c) 2021, <NAME> <<EMAIL>> * Copyright (c) 2022-2023, MacDue <<EMAIL>> * Copyright (c) 2023, <NAME> <<EMAIL>> * * SPDX-License-Identifier: BSD-2-Clause */ #include <AK/DeprecatedString.h> #include <AK/ScopeGuard.h> #include <AK/String.h> #include <AK/Vector.h> #include <LibCore/File.h> #include <L...
TOOL
0.916062
7.854154
{ "github_metadata": { "branch": "master", "commit_count": 56449, "repo_created_at": "2021-06-07T20:25:26.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "SerenityOS/serenity", "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "cont...
616b69cd-6ee6-4b26-a47f-c20f0a1ffb85
KartikSindura/cp-solutions
leetcode/amazon/c1.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'minimizeCleaningCost' function below. * * The function is expected to return an INTEGER. * The function accepts following parameters: * 1. STRING dataset * 2. INTEGER matchCost * 3. ...
ALGO
0.99993
4.669623
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2023-06-15T17:41: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": "8283f933bf2...
81a949f4-19ed-4d25-b252-204b01db971e
zobaer-ahmed-zihad/journeyToCode
02_Introduction to C++/Contest Problems/Reverse_It.cpp
//https://www.hackerrank.com/contests/final-exam-a-introduction-to-c-for-dsa-a-batch-06/challenges/reverse-it-8-2 #include <bits/stdc++.h> using namespace std; class Student { public: string nm; int cls; string s; int id; }; int main() { int n; cin >> n; Student st[n]; for (int i = 0; i ...
ALGO
0.992658
3.360234
{ "github_metadata": { "branch": "main", "commit_count": 360, "repo_created_at": "2024-10-04T03:29: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": "5b75977fe1...
ece68e3a-a1d6-4ab2-a100-3bbff1808290
HyeminBaek/CS-Algorithm_Study
1~10주차/10주차/백혜민/2263.cpp
#include <iostream> #include <algorithm> #include <cstring> using namespace std; int N; int in[100001], post[100001]; pair<int, int> tree[100001]; void preorder(int node) { cout << node << " "; if (tree[node].first != -1) preorder(tree[node].first); if (tree[node].second != -1) preorder(tree[node].second); } int m...
ALGO
0.999989
4.23313
{ "github_metadata": { "branch": "main", "commit_count": 1123, "repo_created_at": "2021-01-10T05:56:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f4474642...
59428800-4fc2-42b0-942c-04609a2fc598
Rushi-28/Cdac-Assignments
Cpp/Day 3/dynamicarray.cpp
// Accept array size form user and perform funtion #include<iostream> using namespace std; void accept(int [],int); void display(int[],int); void findmaxmin(int[],int,int&,int&); int search(int[],int,int); void evenodd(int[],int,int&,int&); int main() { int *p,no,i,max,min,key,flag=0,even,odd; cout<<"Please ent...
ALGO
0.998823
3.580903
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-01-04T09:42:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1508d5d76b7f...
d44d9700-97ea-4863-be9a-f8322e8a9a19
gord02/leetcode
Easy/217.cpp
// 217. Contains Duplicate // TIME TAKEN: 19 mins, 15 minutes for sorting and search apporach which didn't work and 4 minutes to implement dictionary // speed is not very good, 26.1% better, space efficientcy is not much better 21.8% // OPINION // ========== // WHAT do you think? // Should I h...
ALGO
0.999856
5.550046
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-08-31T00:28: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": "4f77aa4f3...
b66e7ca0-3293-46aa-bf9a-c569b0c4cd64
Akshaya-Amar/LeetCodeSolutions
C++/PalindromicSubstrings.cpp
/* Source: https://leetcode.com/problems/palindromic-substrings/ 1st Approach (Brute force) Basic Idea: Create all possible subarrays and check if each subarray is palindrome or not Time: O(n ^ 3), where n is the length of the given String(s) Space: O(1), in-place */ class Solution { public: int countSubstring...
ALGO
0.999955
6.905253
{ "github_metadata": { "branch": "master", "commit_count": 424, "repo_created_at": "2021-10-09T11:09:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 249, "forks": 65, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d6344...
4444118e-e6b8-4327-992f-6607a286d09c
ferasboulala/slam
slam/mcl.h
#pragma once #include <array> #include <opencv2/opencv.hpp> #include <tuple> #include <vector> #include "pose.h" namespace slam { class MCL { public: MCL(int n_particles, const cv::Size& canvas_size = {1000, 1000}); ~MCL() = default; Pose starting_pose() const; void predict(const Odometry& odom, con...
ALGO
0.931023
6.403843
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2021-01-31T00:27: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": "d1a109d15...
6d7d6d76-8258-4f98-b2db-e18a1d100ae6
asharmace/DataStructure
ds/BTreeZigZag.cpp
#include <cstdio> #include <iostream> using namespace std; struct node { int data; node* left; node* right; }; node* newNode(int i) { node* temp = new node(); temp->data = i; temp->left = temp->right = NULL; return temp; } int getHeight(node* root) { if (root == NULL) re...
ALGO
0.99999
4.970361
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-10-25T15:29: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": "42a588b12...
321e83d4-15da-4ff1-a6a0-0c304a26684d
Garey27/sm-debugger
src/sourcepawn/compiler/sc6.cpp
// vim: set sts=2 ts=8 sw=2 tw=99 et: /* Pawn compiler - Binary code generation (the "assembler") * * Copyright (c) <NAME>, 1997-2006 * * This software is provided "as-is", without any express or implied warranty. * In no event will the authors be held liable for any damages arising from * the use of this so...
TOOL
0.973701
5.200516
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2021-12-08T19:56:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d04a4c0a...
06827821-e486-4363-8738-0289226a6614
PDCRL/ConcMST
MST-Algorithms/Explain-Boruvka.cpp
#include <algorithm> #include <climits> #include <fstream> #include <iostream> #include <vector> using namespace std; class Edge { public: int src, dest, weight; Edge() : src(0), dest(0), weight(0) {} Edge(int s, int d, int w) : src(s), dest(d), weight(w) {} }; class DisjointSet { vector<int> parent,...
ALGO
0.999982
5.922382
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-28T10:54:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de44d2677165...
b2246666-779a-4681-9bec-fe380282925e
pandaZGV2/Codeforces-Attempts
C_Three_Bags.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long int ull; typedef long int li; typedef vector<int> vi; typedef pair<int, int> pi; #define int long long int #define f first #define s second #define pb push_back #define mp make_pair #define modint int(1e9 + 7) #define mod 1...
ALGO
0.999989
3.724284
{ "github_metadata": { "branch": "main", "commit_count": 220, "repo_created_at": "2020-12-18T20:59: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": "d79044545f...
5192ae82-04bc-4ceb-b0a6-f9f7b5b7e480
srinivasgumdelli/csapp-projects
Seas of War/parallelballistics.cpp
/* @file parallelballistics.cpp * @author <NAME> * @date 9/8/2013 */ #include <cmath> #include <stdlib.h> #include <iostream> #include <iomanip> #include <time.h> #include <sstream> #include <string> #include <assert.h> using namespace std; const float G = 9.80665; const float M2IN = 39.3701; const float M...
ALGO
0.997625
5.450264
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2015-05-15T05:32: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": "1ff2e966d...
ff83f978-6882-4e75-aae2-abc9e0a7c373
objectx/SipHash
src/SipHash.cpp
/* * SipHash.cpp: * * Author(s): objectx */ #include <algorithm> #include <SipHash.hpp> #include "internal.h" namespace SipHash { uint_fast64_t Compute (size_t cntCompression, size_t cntFinalization, const iv_t &iv, const void *data, size_t length) {...
ALGO
0.998758
6.296953
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2016-05-08T19:06: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": "96b946e11...
50dc60b3-f784-4e2d-8641-36d8ae6849fb
ACDFXUG/acdfxug
C++/黑白图像压缩.c++
#include <iostream> #include <cstring> using namespace std; int POWER(int a, int x){ int pow=1; for(int i=1;i<=x;i++){ pow*=a; } return pow; } static string toBINSTR(int n){ string s=""; for(;n>0;n>>=1){ s=to_string(n%2)+s; } return s; } static string eight_bit(int n){ ...
ALGO
0.99962
3.806602
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2024-07-21T12:22: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": "0ace7b86a0...
80d6ca7e-02a4-4605-a7bb-24b64054c522
akmalns/TA005
INTEGRASI/integrasi2/integrasi2.ino
/*IMPORT DEPENDENCIES*/ #include <math.h> #include <stdlib.h> #include "arduinoFFT.h" #include "FS.h" #include <SPI.h> #include <TFT_eSPI.h> // Hardware-specific library /*==========INTERFACE==========*/ TFT_eSPI tft = TFT_eSPI(); // Invoke custom library #define CALIBRATION_FILE "/TouchCalData4" #define REPEAT_CAL f...
ALGO
0.931427
5.496863
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2021-03-12T07:53:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b2762d288...
5aa9cd06-4ada-43f6-80a4-8a9c8b0e6d69
ishandutta2007/codeforces-n
nikarabika/normal/1433/D.cpp
//sobskdrbhvk //remember... #include <bits/stdc++.h> using namespace std; typedef long long int LL; typedef long double LD; typedef pair<int, int> pii; typedef pair<LL, LL> pll; #define PB push_back #define MP make_pair #define L first #define R second #define smin(x, y) (x) = min((x), (y)) #define smax(x, y) (x) = ...
ALGO
0.999956
3.600262
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35: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": "05ff78ae092e...
51a2d547-4f20-4274-b9c9-ed175cf1a131
dadboss/All-CodeForces-Submissions
codeforces/20/C.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long # define INF LLONG_MAX ll n; typedef pair<ll, ll> iPair; class Graph { ll V; // No. of vertices // In a weighted graph, we need to store vertex // and weight pair for every edge list< pair<ll, ll> > *adj; public: Gra...
ALGO
0.999994
4.045856
{ "github_metadata": { "branch": "master", "commit_count": 974, "repo_created_at": "2022-01-24T11:11:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e07e5055...
9969c608-d706-4043-9826-69a5a6c0ea0f
vpatov/matemancpp
include/representation/position.hpp
#pragma once #include "pieces.hpp" #include "squares.hpp" #include "color.hpp" #include "util.hpp" #include "representation/move.hpp" #include <regex> #include <assert.h> #include <cstdint> #include <memory> #include <string> #include <iostream> /** Mailbox 112 113 114 115 116 117 118 119 | 120 121 122 123 124 ...
ALGO
0.925025
3.557878
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2020-11-19T17:33: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": "169e434b...
1d668aad-a5ab-4eec-883d-6a529c0e61e3
ivey/advent-of-code-2022
day08/libaoc.cc
#include "libaoc.h" #include <map> #include <iostream> #include <tuple> #include <string> #include <vector> #include <algorithm> #include <deque> #include <unordered_set> int visible_trees(std::istream &input) { int size = 0; std::vector<std::vector<int>> grid; std::vector<std::vector<int>> visgrid; ...
ALGO
0.996186
5.275544
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2022-11-29T03:47:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8993bdc6379...
e0678ee6-3d32-408f-81b0-4c155f0b7192
pushkar02-op/practice_prog
queue.cpp
#include<iostream> #include<string> using namespace std; class queue{ private: int front, rear; int arr[5]; public: queue(){ front=-1; rear=-1; for(int i=0; i<5; i++){ arr[i]=0; } } bool isEmpty(){ ...
ALGO
0.99322
4.064099
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-10-18T18:12: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": "8cec0a718...
27ab896d-ab1b-48b3-ac81-a586988f7c02
jimitchavdadev/College
Sem_6/AI Lab/A_star/8_puzzle_BFS.cpp
#include <iostream> #include <queue> #include <set> #include <stack> #include <vector> #include <algorithm> using namespace std; struct Node { vector<vector<int>> state; int x, y; // Position of blank (0) string path; }; vector<vector<int>> goal = {{1, 2, 3}, {4, 5, 6}, {7, 8, 0}}; // Possible moves: Le...
ALGO
0.999991
6.163289
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-02-16T15:21: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": "2f1062a5b07...
3c183079-b1dd-4ae3-995c-c44e2bc46e91
Tejas-Angadi-9/1_LoveBabbar_DSA
10. Queues/CW/Class 2/2_Reverse_First_K_elements.cpp
#include<iostream> #include<stack> #include<queue> using namespace std; void print(queue<int> q){ while(!q.empty()){ cout<<q.front()<<" "; q.pop(); } cout<<endl; } void reversingFirstKElements(queue<int> &q, int k){ int temp = k; // Step1: Put the first k elements in the stack ...
ALGO
0.999935
4.649395
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2023-11-29T01:35: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": "d23eacd1a1...
c6b0afd5-6b08-43fa-ac8c-e6bd0de055cb
trevorvanhoof/tt_cpplib
tt_cgmath.cpp
#include "tt_cgmath.h" namespace TT { Mat44 Mat44::frustum(float left, float right, float top, float bottom, float near, float far) { float A = (right + left) / (right - left); float B = (top + bottom) / (top - bottom); float C = -(far + near) / (far - near); float D = -(2.0f * far * near) / (far - near); r...
ALGO
0.973187
6.562343
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2022-04-23T06:14: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": "22075ad12c3...
e5c0efd7-bcf1-458d-8d99-5936932f2e8e
joshuaseligman18/algo-f22
finalProject/residentVariation/stableMatching.cpp
#include "stableMatching.h" #include "resident.h" #include "hospital.h" #include "util.h" #include "list.h" #include "stdlib.h" #include <iostream> #include <sstream> void stableMatchAlgo(StringArr* data) { // String split code from: https://www.javatpoint.com/how-to-split-strings-in-cpp // A pointer to each...
ALGO
0.999381
4.932922
{ "github_metadata": { "branch": "main", "commit_count": 253, "repo_created_at": "2022-08-31T14:04: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": "1db286c0a1...
0887b6c5-4512-45f3-a273-9a0545c0f960
AkhtarShadab/GFG_DSA
Week14_Tree/Inorder.cpp
#include <bits/stdc++.h> #include <climits> #define endl '\n' typedef long long ll; typedef long double ld; #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define mod 1000000007 using namespace std; struct Node { int data; Node* left; Node* right; Node(int val) { data = val; left = right =...
ALGO
0.999838
5.803684
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2023-08-15T16:40:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc0918690e...
c17842e1-4429-484a-a813-0d2ba8119975
shipul329/Graph-Theory-Basic-Concepts
adjacency_matrix_with_weight.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define nn '\n' const int N=1e3+10; int graph[N][N]; int n, m, u, v, wt; void solve() { int n, m; cin >> n >> m; for(int i=0; i<m; i++) { cin >> u >> v >> wt; /// wt is weight here graph[u][v]=wt; ...
ALGO
0.999737
3.744123
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2022-09-13T18:42: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": "6d778e226e7...
4eeeabda-cd9d-4941-9321-b5ea90aa27fd
johannesgerer/jburkardt-cpp
stochastic_rk/stochastic_rk.cpp
# include <cstdlib> # include <iostream> # include <iomanip> # include <cmath> # include <ctime> using namespace std; # include "stochastic_rk.hpp" //****************************************************************************80 double rk1_ti_step ( double x, double t, double h, double q, double fi ( double x ),...
ALGO
0.999956
3.665921
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2012-12-02T14:18:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 41, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8e4cfdf...
f1628ebc-9f93-48e3-b6a1-7982f0e52a70
Astro86/programmers
1835/1835.cpp
#include <bits/stdc++.h> using namespace std; int total; bool check[9]; int isUsed[26]; bool cmpTwoIdx(char cmp, int idx1, int idx2, int value) { if (cmp == '=') { return abs(idx1 - idx2) - 1 == value; } else if (cmp == '<') { return abs(idx1 - idx2) - 1 < value; } else { return ab...
ALGO
0.999886
4.239295
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-05-06T14:18: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": "09c9bf75f...
c71f4b27-7b3f-40c3-8a9b-9132c6aaf560
ishandutta2007/codeforces-m
maximumshot/normal/1498/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned int ui; typedef unsigned long long ull; typedef long double ld; typedef pair<int, int> pii; typedef pair<long long, long long> pll; const int inf = 1e9; const ll inf64 = 1e18; const int LOG = 22; int main() { #ifdef DEBUG fre...
ALGO
0.999839
4.663574
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6325a63b1d4...
a83b2f3d-5180-4ae9-b8c6-f6807bee276c
Zoselro/C-_200_example_questions
Chapter23_Increment_Decrement_Operators/main.cpp
#include<iostream> using namespace std; int main(){ int x = 1; cout << "x = " << x++ << endl; // 사용 후 증가 x = 1 (내부적으로는 x = 2) cout << "x = " << x++ << endl; // 사용 후 증가 x = 2 (내부적으로는 x = 3) cout << "x = " << ++x << endl; // 증가 후 사용 (x = 4) cout << "x = " << x...
ALGO
0.999185
4.086503
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2024-05-23T06:58: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": "204ccdb18ce...
45d80ee5-fce1-42ec-bf50-406a12735ba3
wowns9270/code_up
백준/다이나믹 프로그래밍/15486_퇴사2.cpp
//#include<bits/stdc++.h> //using namespace std; //int t[1500001], p[1500001], n; //int dp[1500001]; //int main() { // cin >> n; // for (int i = 0; i < n; i++) { cin >> t[i] >> p[i]; } // for (int i = 0; i < n; i++) { // dp[i + t[i]] = max(dp[i + t[i]], dp[i] + p[i]); // dp[i + 1] = max(dp[i + 1], dp[i]); // } // cou...
ALGO
0.999959
3.803703
{ "github_metadata": { "branch": "master", "commit_count": 345, "repo_created_at": "2019-10-05T15: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": "413d51cf...
12133894-9cb8-4ede-8dce-8328486f0a30
Dinesh-RDY/DailyCoding
DailyPractice/Week29/2.1.cpp
class Solution { public: int maxStarSum(vector<int>& v, vector<vector<int>>& e, int k) { if(k == 0) return *max_element(v.begin() , v.end()); vector<vector<int>> adj(v.size()); for (vector<int> &edge : e) { adj[edge[0]].push_back(edge[1]); adj[edge[1]].push_ba...
ALGO
0.999943
5.144952
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2022-05-15T14:10:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c7ae57ec...
c552a724-45d7-4b0a-b8fe-4d6c8434600f
xyzyzl/compprog
probs/usaco/paint/bronze.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, pos = 0; int lo = 0, hi = 0; stack<pair<int, int> > cur; cin >> n; for(int i = 0; i < n; i++) { int x; char dir; cin >> x >> dir; int pre = pos; if(dir == 'L') pos -= x; else pos += x; if(pre >= 0 && dir == 'L') { wh...
ALGO
0.999874
3.694391
{ "github_metadata": { "branch": "master", "commit_count": 364, "repo_created_at": "2019-06-11T03:19:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "389bf3c8...
f38daff7-282f-4275-ab50-439078848268
krashish8/Online-Judge-Solutions
Codeforces AC Solutions/1008A.cpp
/* Problem Name: A - Romaji Problem ID: 1008A Problem URL: https://codeforces.com/contest/1008/problem/A Author: <NAME> (ashishkr23438) Solution ID: 40265270 Solution Time: 2018-07-13 17:40:18 Language: GNU C++11 Time consumed: 31 ms Memory consumed: 0 KB */ #include<iostream> #include<cmath> #include<vector> #include<...
ALGO
0.999853
3.441149
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-03-19T06:49: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": "ceee80519...
d74810cb-384d-459a-85d1-e6b6c71bd242
Prateekbhagat/C-Plus-Plus-
12. Polymorphism/program1.cpp
/* C++ Program to demonstrate Run time polymorphism */ #include <iostream> using namespace std; class Base { public: virtual void display() { cout << "\nThe member function Display() "; cout << "of the \"Base class Base \"is invoked \n"; } }; class D1 : public Base { public: void dis...
TOOL
0.978086
5.997255
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-07-01T16:28: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": "5d2f10d9779...
1fe5db3f-c0b6-4337-8c12-9174237b2394
rossjjennings/psrchive
More/Polarimetry/Pulsar/ModeSeparation.h
//-*-C++-*- /*************************************************************************** * * Copyright (C) 2011 by <NAME> * Licensed under the Academic Free License version 2.1 * ***************************************************************************/ // psrchive/More/Polarimetry/Pulsar/ModeSeparation.h ...
ALGO
0.947681
6.5776
{ "github_metadata": { "branch": "master", "commit_count": 12300, "repo_created_at": "2020-02-04T17:37:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a81c5...
600c3d1e-425b-4c01-91d4-d8106a692735
androemeda/advance_graph_algorithms
G_VALIDATE_THE_MAZE.cpp
#include <iostream> #include <vector> #include <queue> #include <stack> #include <algorithm> #include <cmath> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <string> #include <cstring> #include <cstdio> #include <cstdlib> #include <ctime> #include <cassert> #include <limits> #i...
ALGO
0.99986
5.220843
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-05-16T20:19: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": "dbcfe81972b7...
bf76277a-0f88-4950-b87b-247ee1e04432
tj-dsk-tpp-zz/CS204
lab_2.cpp
#include <stdio.h> #include <bits/stdc++.h> #include <string> #include <iostream> using namespace std; struct CoordinateList { int coor_x, coor_y; struct CoordinateList *nextNode; }; typedef struct CoordinateList LLN; void list_length(LLN *list, string *str) { LLN *tempNode; tempNode=list; int c...
ALGO
0.99603
3.932748
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2019-08-03T07:24:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87f6c8b8f...
017f452c-1dca-4858-b8a6-d7060b6b0467
AleWet/Neural-Network-Experiments
Neural-Network-Experiments/src/ml/Network.h
#pragma once #include "Dataset.h" class Network { private: std::vector<int> m_LayerSizes; std::vector<Eigen::MatrixXf> m_Weights; std::vector<Eigen::VectorXf> m_Biases; std::vector<Eigen::VectorXf> m_Activations; // a = actFun(Z) std::vector<Eigen::VectorXf> m_PreActivations; // z // For backpropagation st...
DATA
0.938819
5.13719
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2025-05-20T17:37: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": "10b6d5960...
e1c4c2b3-7d3f-4ddf-8aca-dbaf2f3fe2ad
jaryapp/-PS-algorithm-study
Baekjoon/1963_소수 경로.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; bool visited[10000]; bool isSosu[10000]; vector<int> sosu; class Case { public: int number[4]; int cnt = 0; Case(int num) { int i = 3; while (num) { this->number[i] = num % 10; num /= 10; i--; } } Case(Case *c) { for ...
ALGO
0.99939
4.285258
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2020-01-29T06:49:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82de62788...
6e16bbf1-e9fe-4c40-b05f-37490fd8e5a5
2997ms/Competitive-programming-problems
Codeforces/376_Div2/B.cpp
#include <fstream> #include <iostream> #include <functional> #include <algorithm> #include <sstream> #include <cstring> #include <vector> #include <string> #include <cstdio> #include <cmath> #include <queue> #include <stack> #include <deque> #include <ctime> #include <list> #include <set> #include <map> using namespace...
ALGO
0.999962
3.664847
{ "github_metadata": { "branch": "master", "commit_count": 179, "repo_created_at": "2016-05-05T02:53:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f800dda...
be7fb6f8-9fd1-4cf4-a32b-1cbeb8093782
jingaz/LeeCode
删除排序链表中的重复元素.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; void destroy_list(ListNode *head) { if (head == nullptr) { return; } destroy_list(head->next); delete head; head = nul...
ALGO
0.999966
5.01858
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-04-04T06:10:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30b778582...
d79ad803-bed3-466c-9e90-e7cb5656fcea
kraftwerk28/render_2
src/bsp_tree.cc
// // Created by kraftwerk28 on 29.09.18. // #include "../include/bsp_tree.h" using std::pair; using std::vector; bsp_node::bsp_node() = default; bsp_node::bsp_node(vector<uint> _vert_indexes, std::pair<vector3, vector3> _bounds) : vert_indexes(std::move(_vert_indexes)), bounds(std::move(_b...
ALGO
0.997648
5.11032
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-09-14T13:35: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": "ce0710a69...
3fd6104d-0a1d-4919-813d-0c02afa5818d
elias174/MSAStarAlign
old_msa.cpp
#include <iostream> #include <limits> #include <vector> #include <fstream> #include "global_alignment.h" using namespace std; vector<pair<string,string>> results; bool choose_maximum_size(const std::pair<string, string> &lhs, const std::pair<string,string> &rhs) { return lhs.first.length() < rhs.first.length()...
ALGO
0.99736
3.254913
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-06-16T21:37:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fec4c6505...
36b21a45-2fd5-4661-99c4-cea2731d0764
perilouswithadollarsign/cstrike15_src
public/mathlib/feagglomerator.h
//========= Copyright © Valve Corporation, All rights reserved. ============// // // Agglomerative clustering algorithm variant suitable for FE deformable body collision detection // Clusters given set of points, with given connectivity, bottom-up (agglomerative clustering, see http://en.wikipedia.org/wiki/Hierarchical...
ALGO
0.999881
5.389348
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-04-22T23:35:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1543, "forks": 729, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "052e...
a2c1ea6f-edd4-4978-9429-bac2df267389
Anurag-c/Codes
4. Trees/19. Anti-clockwise in Generic Tree.cpp
#include<bits/stdc++.h> using namespace std; class TreeNode { public: int data; vector<TreeNode*> children; TreeNode(int data) { this->data = data; } }; TreeNode* takeInputLevelWise() { int rootData; cout << "Enter root data" << endl; cin >> rootData; TreeNode* root = new TreeNode(rootData); queue<Tre...
ALGO
0.999992
4.931435
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2020-12-24T17:54:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b18fc5f8c724...
e475cef5-6aa6-4e8f-999c-3b0218bf1eed
ammyjutt/progs
CPP_Online_Code/CPP_CODES_1/3113.cpp
//#include <iostream> //#include <vector> //#include <stack> //#include <unordered_map> // //using namespace std; // // // // // //class Solution { //public: // long long numberOfSubarrays(vector<int>& nums) { // // // int n = nums.size(); // unordered_map<int, vector<int>> mp; // // ...
ALGO
0.999972
5.555294
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2024-02-21T13:34: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": "4180f63d3...
1da5a305-910a-4fed-b34b-6ed3955bc26d
krishna0303/Competetive-Programming-Codes
lbcs/graph/detect_cycle_undirected.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends /* I have watched striver graph series for better understanding idea is to if any node is already visited but it could be parent node of that node i.e 1->2 then 2->1 so we have to ignore it because and if node is already vi...
ALGO
0.999969
5.980553
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2020-03-22T20:08: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": "e245532aa...