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
a713b8fc-9700-47bd-87e2-47b99b89c826
AkashSingh3031/The-Complete-FAANG-Preparation
1]. DSA + CP/2]. Competitive Programming/11]. HackerEarth/1]. Practice/6]. Codemonk Series/02]. Sorting/C++/Monk and Sorting Algorithm.cpp
/* Solution by <NAME> *********************************************************** Monk recently taught Fredo about sorting. Now, he wants to check whether he understood the concept or not. So, he gave him the following algorithm and asked to implement it: Assumptions: We consider the rightmost digit of ...
ALGO
0.999988
4.302504
{ "github_metadata": { "branch": "master", "commit_count": 1827, "repo_created_at": "2021-05-29T04:41:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11343, "forks": 2526, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "...
5427d55c-40dd-4516-87ec-e50c58bc67b2
sibivarshan/Leetcode-Problems-
1.Daily_Questions/1792-15_12_2024.cpp
#include <vector> #include <queue> #include <iostream> using namespace std; /* This function calculates the maximum average pass ratio after distributing extra students. It uses a max-heap (priority queue) to repeatedly assign students to the class with the highest potential gain in the pass ...
ALGO
0.999716
6.284866
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-12-12T17:43: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": "60d34c3b8578...
f77a0ac3-c002-4bd4-9e32-6f03d7ae7246
HamzaMiraz/problem-solving
DP Minimum _coins.cpp
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <vector> #include <map> #include <queue> #include <string> #include <algorithm> using namespace std; //For Debugging #define debug(a...) {cout<<" #--> ";dbg,a; cout<<endl;} struct debugger { template...
ALGO
0.999645
3.394729
{ "github_metadata": { "branch": "Main", "commit_count": 13, "repo_created_at": "2022-01-28T14:44: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": "3e915e27c37...
ed0a002a-f1f6-4298-8aa2-33939945750b
unimi-swerc/notebook
src/Grafi/Gomory-Hu tree.cpp
/// Source: /// https://github.com/bqi343/USACO/blob/master/Implementations/content/graphs%20(12)/Flows%20(12.3)/GomoryHu.h /// Verification: /// https://www.spoj.com/problems/MCQUERY/ (id: 30634725) /*Returns edges of Gomory-Hu tree (second element is weight) * Max flow between pair of vertices of undirected graph *...
ALGO
0.999644
5.041919
{ "github_metadata": { "branch": "master", "commit_count": 1067, "repo_created_at": "2025-05-31T09:03:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d023c2a8...
93f7e9f8-3081-4814-8fe8-924e02a6793e
DakshGoyal1506/Take_You_Forward
leetcode/121_Best_Time_to_Buy_and_Sell_Stock.cpp
#include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { int minPrice = INT_MAX; int maxProfit = 0; for(int price : prices) { if(price < minPrice) { ...
ALGO
0.999279
5.546571
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2025-02-17T14:17:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bcc9fe2fdbd...
7e78e115-61d9-4d5a-85fd-dc1ce71599ab
zhupian/demo
Practise/Nowcoder_Round92/b.cpp
#include<bits/stdc++.h> using namespace std; const int N = 2e5 + 9; #define int long long #define endl '\n' signed main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; int x = 0, y = 0; vector<vector<char>> arr(n + 1, vector<char>(m + 1)); for (int i = 1; i <= n; i++) { for ...
ALGO
0.999854
3.58593
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2025-03-18T11:35: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": "f12a09b6...
c123a80a-6d26-4996-a46a-7afe576916fa
ishandutta2007/codeforces-o
okwedook/normal/1746/F.cpp
#pragma GCC optimize("O3", "unroll-all-loops") #pragma GCC target("sse4.2") #include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #in...
ALGO
0.999558
5.451564
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45: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": "ee90e0b82167...
8f5fab29-983e-4f0a-b876-40cbc3468669
nibydlo/algorithms
sem2/Lab1/ProblemI/ProblemI2.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> using namespace std; struct Task { int index; int s; int p; int t; }; bool comp(Task x, Task y) { if (x.s < y.s) return true; else return false; } int main() { ifstream fin("practice.in"); ...
ALGO
0.99997
3.525144
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-10-24T09:24: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": "986674ce5...
0d2bde2e-2660-4a5d-a882-7fbfebd00025
Evokoo/project-euler-public
004/004.cpp
// Largest Palindrome Product - Problem 004 // https://projecteuler.net/problem=4 /* A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. */ #include "../000/solv...
ALGO
0.99975
6.712435
{ "github_metadata": { "branch": "master", "commit_count": 206, "repo_created_at": "2023-01-11T12:38: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": "048c5860...
b77ab06f-82c2-4689-8508-c06d5f2de257
FinixLei/WeChat_LandLords
Cpp/solve_puzzle.cpp
#include "utils.hpp" #include "MoveGener.hpp" #include "MoveClassifier.hpp" #include "MoveFilter.hpp" #include "MovePlayer.hpp" #include "MinMax.hpp" extern pthread_mutex_t mutex; void declare() { cout << "---------------------------\n"; cout << "可输入的命令:" << endl; cout << "pass - 过" << endl; cout <<...
ALGO
0.998139
4.28945
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2018-02-25T09:36:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 24, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aabfade...
e705d51a-975d-4686-b4d0-51395ab6daf0
shishir-acharjee/phitron_cp
WEEK-7/DAY-4/NASA.cpp
#include <iostream> #include <vector> #include <map> #include <string> using namespace std; const int maxN = (1 << 15); vector<int> v; void palindrome() { for (int i = 0;i < maxN;i++) { string s = to_string(i); int len = s.length(); bool ok = true; for (int i = 0;i < (len / 2);i++)...
ALGO
0.999966
4.421734
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-03-16T16:08: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": "55e77965702...
36ec3950-221b-4aec-aee1-0d68296dd241
softarts/myoj
ojcpp/leetcode/000/006_m_zigzagconversion.cpp
// // Created by rui.zhou on 2/15/2019. // /* * The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R And then read line by line: "PAHNAPLSIIGYIR" Write the co...
ALGO
0.999969
6.113514
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2022-09-26T01:29:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e16bd8264...
b697f02e-4447-4dea-ad71-eb3ff5ad4244
lin-mo-qwq/workspace
luogu/P1902.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1e3 + 5; int n, m; int a[N][N]; int vis[N][N]; int xMove[] = {0, 0, 1, -1}; int yMove[] = {1, -1, 0, 0}; bool bfs(int x, int y, int mx) { memset(vis, 0, sizeof vis); queue<pair<int, int>> q; vis[x][y] = 1; q.push({x, y}); while(!q.empty()) { pair<int, i...
ALGO
0.999941
3.684973
{ "github_metadata": { "branch": "master", "commit_count": 308, "repo_created_at": "2022-09-02T10:16: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": "9ae6bef8...
c600368a-18b7-4678-abc9-779a6dd1bda2
estevennac/Estrutura-Datos-P3
PolacaInversa/Operacion.cpp
#include "Operacion.h" using namespace std; #include <string> #include <cstring> #include <cstdlib> std::string Operacion::infix_a_prefix(std::string infix) { Lista<char> lista; AuxString str; string cad = str.reves(infix); string result, prefix; string aux; char anterior = '.'; for (char& ...
ALGO
0.964007
4.137766
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-02-18T14:41:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "813bd14bdb8...
97f2a024-7adb-4e82-a7c6-da945c047dc0
pablopalou/ICPC
fraizen/C++/CSES/geometryCSES/lineSegmentIntersection.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vi; typedef pair<ll,ll> pii; typedef set<ll> si; typedef multiset<ll> msi; typedef unordered_set<ll> usi; typedef map<ll, string> mis; typedef unordered_map<ll, string> umis; #define pb push_back #define mp make_pair #define cout(x)...
ALGO
0.999882
4.248693
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-10-02T22:43: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": "7b4d1043063...
1b5225e6-dd2d-442e-8674-fb97a7cf7ca5
MollHarmen/AdventOfCode
Archive/2023/day6/main.cpp
#include <iostream> #include <sstream> #include <string> #include <vector> #include "Utils/FileIO.hpp" #include "Utils/StringHandling.hpp" typedef unsigned long long NumberBase; struct Race { Race(const NumberBase time, const NumberBase distance) : mTime(time) , mDistanceRecord(distance) {} const...
ALGO
0.999281
4.808197
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2022-12-01T08:17: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": "839d9a23228...
f559e268-bf9f-4e2f-ab25-455571bf353d
dreamzen/leetcode
n-queens.cpp
#include <iostream> #include <vector> using namespace std; class Solution { private: string str; vector<vector<string> > result; vector<bool> A; vector<bool> B;//x+y = 0,1,2,...,2n-1 vector<bool> C;//y-x+(n-1) = 0,1,2,...,2n-1 vector<int> col;//the col of each row public: vector<vector<stri...
ALGO
0.999907
4.26198
{ "github_metadata": { "branch": "master", "commit_count": 211, "repo_created_at": "2014-03-17T01:06: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": "9662c1a3...
9c763a72-9a95-4d7d-9334-52b033d02a76
niranjan-2024/cpp-DSA
dijkstra.cpp
class Solution { public: //Function to find the shortest distance of all the vertices //from the source vertex S. vector <int> dijkstra(int V, vector<vector<int>> adj[], int S) { unordered_map<int,list<pair<int,int> > > adja; for(int i=0;i<V;i++){ int u = adj[i][0]; ...
ALGO
0.999644
4.677001
{ "github_metadata": { "branch": "main", "commit_count": 237, "repo_created_at": "2021-12-23T17:06: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": "133fb54e66...
554d5880-8422-476f-9c09-0920417019a7
vukasin-stanojevic/GPURecursiveMP
cholesky.h
// // Created by vukasin on 7/9/21. // #ifndef MOOREPENROSE_CHOLESKY_H #define MOOREPENROSE_CHOLESKY_H #include <fstream> namespace gpu_implementation { template<typename T> __global__ void generalized_cholesky_factorization_1x1_case(const Matrix<T> A, Matrix<T> U, Matrix<T> Y) { int i = threadId...
ALGO
0.99037
5.728607
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-09-13T18:51: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": "ea9e7bdfad...
2b84301e-a0d8-415f-96e1-52a1b737b005
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/13/04/16.cpp
#include <cstdio> #include <vector> using namespace std; bool canReachWith[200][200]; bool canReachSelfType[200]; int contains[200][200]; bool keyDirect[200][200]; bool opened[200]; bool canViaOther[200]; int type[200]; int noKeys[200]; int N; int todo[200]; void calcReach() { for (int i=0; i<200; i++) for (int ...
ALGO
0.99988
3.86112
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8bd18423...
93788005-68b4-4823-8b19-132476e24500
ishandutta2007/codeforces-s
sol3/normal/1693/B.cpp
#include <bits/stdc++.h> using namespace std; #define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++) char buf[1 << 21], *p1 = buf, *p2 = buf; inline int qread() { register char c = getchar(); register int x = 0, f = 1; while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(...
ALGO
0.999834
3.292197
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40c3ba2fe48a...
dd3bee7f-0acb-420c-8ce0-dad80220b875
ImportLove/LeetCode-Practice
Q114.cpp
// 114. Flatten Binary Tree to Linked List (Medium) #include <iostream> #include <queue> #include "tree.h" using namespace std; class Solution { public: void printTreebyLevel(TreeNode* root){ if (root == NULL) return; queue<TreeNode*> tree; tree.push(root); while (!tre...
ALGO
0.999985
5.12743
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-03-15T12:40:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bab2e2673...
097b3c30-fa4c-4a16-95ce-11c60c241c7c
ChakreshSinghUC/My-Masters-Projects
Learning-C-Programming-master/GeeksForGeeks/Easy/LastTwoDigitsOfFibonacci.cc
/* http://www.practice.geeksforgeeks.org/problem-page.php?pid=1650 Somedays ago Leeana Learned about Fibonacci Number and then her uncle gave her a task. The task is to find the last two digits of nth Fibonacci number. The Fibonacci number sequence are: 0 1 1 2 3 5 8 13 21....... (0 based counting) Note: Incase the f...
ALGO
0.993293
5.442191
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-05-02T16:56:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df578607ff...
67930779-db89-4b5b-8c8b-0b22b36ae86e
hojoon0205/Problem-Solving
Competition/GoogleCodeJam/2020/R2/c.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> pll; #define F first #define S second #define MP make_pair vector<vector<int>> road_combs; struct P{ ll x, y; }; void make_roads(int cur, int N, vector<int> v){ if(cur>N){ road_combs.push_back(v); return; ...
ALGO
0.999821
4.247763
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2020-04-19T12:37:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40326e993...
bcb776be-bc75-4a9d-8c60-2784ffd69d43
ekeshfsociety/Codechef-Contests
Codechef Long (October 2020)/CVDRUN.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t ; while(t--) { int n , k , x , y ; cin >> n >> k >> x >> y ; int flag = 0 ; int result = 0 ; vector <int> infected ; int arr[n] ; for(int i=0 ; i<n ; i++) { ...
ALGO
0.999852
3.804063
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-06-15T01:39:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35e340e59...
053c4966-882f-492e-8b33-eebcd8d0814f
amanjoshi668/Automatic-attendance-System-Using-Face-Recognition
templates/temo.cpp
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> // Common file //#include <ext/pb_ds/tree_policy.hpp> // Including seg_tree_order_statistics_node_update #include <stdio.h> #include <cassert> using namespace std; //using namespace __gnu_pbds; typedef long long lo; typedef long double ld; typedef pai...
ALGO
0.999855
4.148662
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-08-02T04:29:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bd27c3e09...
0c822f6d-8856-47c2-acd1-5cfe2323875a
Ramneantu/competitive_programming
HACKERRANK/CTCI/anagrams.cpp
#include<bits/stdc++.h> #define rep(i,a,b) for(int i=int(a); i<=int(b); ++i) #define rev(i,b,a) for(int i=int(b); i>=int(a); --i) #define rec(i,a,b,c) for(int i=int(a); i<=int(b); i+=int(c)) #define recv(i,a,b,c) for(int i=int(a); i>=int(b); i-=int(c)) #define mp(x,y) make_pair((x),(y)) #define pb(x) push_back(x) #def...
ALGO
0.999974
3.772198
{ "github_metadata": { "branch": "master", "commit_count": 242, "repo_created_at": "2018-03-13T20:49: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": "0fbf5233...
f5a84163-92df-4730-8caa-2b1bf87cee46
iamar7/Algorithms
data_structures/segment_tree/segment_tree_lazy_propagation.cpp
// Part of Cosmos by OpenGenus Foundation #include <bits/stdc++.h> using namespace std; #define N 10000000 int tree[N + 1], lazy[N + 1], A[N]; void build(int node, int start, int end) { if (start == end) { // Leaf node will have a single element tree[node] = A[start]; } else { ...
ALGO
0.999807
4.339294
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-10-15T18: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": "660cbb85e7...
0decc419-25bb-4d13-9543-a4b8156b45c3
PaddlePaddle/Paddle
paddle/phi/kernels/cpu/faster_tokenizer_kernel.cc
// Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
TOOL
0.900142
5.669246
{ "github_metadata": { "branch": "develop", "commit_count": 54743, "repo_created_at": "2016-08-15T06:59:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23037, "forks": 5770, "issues": 1009, "pull_requests": 823 }, "file_meta": { "content_...
16cd5398-4582-455a-ad79-c3c8935b7c6d
ImtiazAhmedAkash/Problem-Solving
uva/336.cpp
/* In the Name of ALLAH, the most gracious, the most merciful */ // A Node Too Far #include <bits/stdc++.h> using namespace std; #define ll long long #define nl '\n' #define deb(x) cerr << #x << " = " << x << nl const int inf = 1e9; const ll INF = 1e18; const int mod = 998244353; const int N = 35; static int t = ...
ALGO
0.99955
4.915346
{ "github_metadata": { "branch": "main", "commit_count": 475, "repo_created_at": "2022-11-19T14:05:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b9458dfa8...
8eacc895-12c8-4c9b-b9d8-78cfb7a62e14
ChaimaaLachhab/challenges
projet/TEST.cpp
#include <stdio.h> int main() { int position, i, taille; int tab[100]; printf(" Entrez la taille du tableau : ");//taille scanf("%d", &tailla); printf(" Entrez les %d éléments : ", taille); //remplier for (i = 0; i < nbr; i++) scanf("%d", &tab[i]); printf(" Entrez l'emplacement où v...
ALGO
0.989243
3.383284
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-01-22T08:55:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ce78a2f97f...
b8a46220-62c5-4b0f-aecc-bef8ff681ba0
cwhuang1937/CP
course contest/contest3/q3/main.cpp
#include<bits/stdc++.h> #define ll long long #define ld long double using namespace std; int main() { ios::sync_with_stdio(0), cin.tie(0); int n; string s1, s2; cin >> n >> s1 >> s2; int dp1[n], dp2[n]; memset(dp1, 0, sizeof dp1); memset(dp2, 0, sizeof dp2); if(s1[0] == 'A') dp...
ALGO
0.999952
3.976675
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-03T09:09: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": "98bfff9c2f...
a01cee94-b27c-42cd-b56b-d2ab391f329d
old-yan/CP-template
TEST/local/BronKerbosch_test.cpp
#include "GRAPH/BronKerbosch.h" #include "IO/FastIO.h" int main() { // 无向图 OY::BK::Graph<uint64_t, 100> G(5); // 加边 G.add_edge(0, 1); G.add_edge(1, 2); G.add_edge(0, 2); G.add_edge(3, 1); // 求最大团 cout << "max clique size: " << G.max_clique() << '\n'; // 求最大独立集 cout << "max i...
ALGO
0.978439
5.16226
{ "github_metadata": { "branch": "main", "commit_count": 390, "repo_created_at": "2021-06-29T16:22:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 268, "forks": 43, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "271ed6c...
11d8fdd5-2b2d-447f-a16e-964a05f285d8
NeoraptX/crr_dev
MultiThreading/thread_example.cpp
#include <iostream> #include <pthread.h> #include <unistd.h> #include <queue> #include <semaphore.h> #define MAX_QUEUE_SIZE 20 std::queue<int> myQueue; sem_t semaphore_full; sem_t semaphore_empty; sem_t semaphore_mutex; bool stop_consumer_flag = false; bool stop_producer_flag = false; void set_thread_name() { ...
ALGO
0.951857
4.420587
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-10-08T16:21:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "84d46cded...
04b26ab0-f38a-41db-956e-1d6006ae96dc
EstherMedinaQuintero/Informatica-Basica
p10-ficheros/ej01-vocales-consonantes/vocales_consonantes_main.cc
/** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @author <NAME> * @date 12 Dic 2021 * @brief Este programa, dado un fichero de texto que se pasa por parámetro, * imprime la palabra con mayor número de vocales y la pal...
ALGO
0.98831
5.338808
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2021-09-30T17:02:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c05e3aa98...
3695950b-4adc-4ebb-9d07-3dd568011566
nonnnz/noneCode
Contests/Codeforces/2014/2014-h.cpp
#include<bits/stdc++.h> using namespace std; void solve() { int n, q; cin >> n >> q; vector<int> a(n); for(int i = 0; i < n; ++i) { cin >> a[i]; } for(int i = 0; i < q; ++i) { int l, r; cin >> l >> r; vector<int> b(a.begin() + l - 1, a.begin() + r); ...
ALGO
0.999905
4.566494
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-09-08T15:15:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "968029b084b...
51a3fe5f-e062-478d-ae95-53a1d20cea85
Will-Pinkston/5_lab_235
Student_Code/Pathfinder.cpp
#include "Pathfinder.h" #include <ctime> Pathfinder::Pathfinder() { for (int i = 0; i < MAZE_SIDE; i++) //z loop { for (int j = 0; j < MAZE_SIDE; j++) //y loop { for (int k = 0; k < MAZE_SIDE; k++) //x loop { m_Maze[i][j][k] = 1; m_Path[i...
ALGO
0.99622
3.750271
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2016-10-10T22:31: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": "513fcee33...
72965aa0-1a34-4290-b951-4ae93713b57f
nmoehrle/uavmvs
apps/mesh_tools/normalize.cpp
/* * Copyright (C) 2016-2018, <NAME> * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD 3-Clause license. See the LICENSE.txt file for details. */ #include <iostream> #include <vector> #include <unordered_map> #include <algorithm> #include "mve/mesh_io_ply.h" ...
TOOL
0.989931
6.534246
{ "github_metadata": { "branch": "master", "commit_count": 342, "repo_created_at": "2016-05-26T09:40:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 59, "forks": 19, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "8fd9f...
370c28b8-fc0c-4b96-b553-ff8ae55707f6
Dani-Bustos/CSES-Problems
GraphProblems/BuildingTeams.cpp
#include<bits/stdc++.h> #define fore(i,a,b) for(int i = a ; i < b; i++) using namespace std; int n ,m; const int PAR = 2; const int IMPAR = 1; struct graph{ vector<list<int>> adyacencias; vector<int> id; graph(int cant = 1){ adyacencias.resize(cant); id.resize(cant,-1); } void add...
ALGO
0.999993
4.211675
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-01-30T20:38: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": "b1db67527d5...
f2d4e762-2f5e-4622-97b0-0d1b6b0936d0
arnab2001/DSA
Tries/maxXorpair.cpp
#include <iostream> #include <climits> using namespace std; class node { public: int data; node *left; node *right; node() { left = right = NULL; } }; class trie { public: node *root; trie() { root = new node(); } void insert(int n) { node *temp = ...
ALGO
0.999985
4.718614
{ "github_metadata": { "branch": "main", "commit_count": 730, "repo_created_at": "2021-09-29T05:05:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 39, "forks": 184, "issues": 34, "pull_requests": 23 }, "file_meta": { "content_id": "55b6a...
7df6e60e-2b8d-4eb7-be5b-f4f7cc5dfcd5
Adrian94F/GrafikaKomputerowa
Grafika4.2/Grafika4.2/Source2.cpp
#include <windows.h> #include <gl/gl.h> #include <gl/glut.h> #include <math.h> /*************************************************************************************/ // zmienne globalne typedef float point3[3]; static GLfloat R = 10; // promień static GLfloat viewer[] = { 0.0, 0.0, 10.0 }; // inicjalizacja ...
ALGO
0.950385
3.555506
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-11-16T09:23: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": "36e0968f49...
d2713474-2643-4048-afb0-c2fd0030c20a
grolmus-k/funalgorithm
src/fundamental_algorithm.cpp
#include <iostream> #include <string> #include <vector> #include <unordered_map> #include"fundamental_algorithm.h" #include"other.h" std::unordered_map<std::string,std::string> FUNDAMENTAL_ALGORITHM(std::unordered_map<std::string,std::vector<std::string>> preference_table_1, std::unordered_map<std::string,std::vector...
ALGO
0.999584
4.589828
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-03-11T17:13: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": "c93300b2dae5...
ee9da7ad-5cca-4304-a688-bff0a8366ba0
TaifoorFarid/C-2nd_Semester
Arrays/2D Array/Multiplication_of_two_matrices_UNIVERAL.cpp
#include<stdio.h> #include<conio.h> #define MAX_SIZE 10 void store(int a[][MAX_SIZE], int row, int col); void result(int a[][MAX_SIZE], int b[][MAX_SIZE], int r[][MAX_SIZE], int row1, int col1, int row2, int col2); void print(int r[][MAX_SIZE], int r1, int c2); main() { int row1, col1; printf("Enter rows of 1st matri...
ALGO
0.998626
3.067916
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-06-22T07:22: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": "e7cde0fcc50...
b7a6b26a-4b97-485b-b9a6-647a1653312e
kinantanbagaspati/competitive-programming
CodeForces/797E.cpp
#include<bits/stdc++.h> using namespace std; #define pll pair<long long, long long> const int maxn = 102400, maxk = 320; int n, k, p, q, ans, dp[maxk][maxn], a[maxn]; int main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin >> n; for(int i=0; i<n; i++){ cin >> a[i]; } for(int i...
ALGO
0.99984
3.577873
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-03-07T09:45: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": "c0f3ff4b37...
2feb31e7-17af-4674-a14e-297604fa506b
alexandraback/datacollection
solutions_5686313294495744_0/C++/WXXCC/main.cpp
/* * * Tag: Implementation * Time: O(n) * Space: O(n) */ #include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <climits> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <unordered_map> #include <u...
ALGO
0.999927
3.793257
{ "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": "c6f7883e0...
bf3be071-7581-4bf7-b448-c613218e6cb1
knst/Competitive-programming
codeforces/313/b.cpp
/***************************************************************************** * codeforces: knst * topcoder: knstqq * projecteuler: knstqq * **************************************************************************/ #include <algorithm> #include <iostream> #include <limits> #include <map> #include <set> #i...
ALGO
0.999987
4.056356
{ "github_metadata": { "branch": "master", "commit_count": 200, "repo_created_at": "2015-03-06T16:13:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "307c8fd6...
67cc621e-24dc-481a-a0c4-bc57a9eddc08
zjukk/LeetCode-is-my-son
47-PermutationsII.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; class Solution { public: vector<vector<int>> permuteUnique(vector<int>& nums) { if (nums.empty()) return {}; set<vector<int>> ans; vector<int> cur{}; vector<bool> visited(nums.size(), fals...
ALGO
0.999987
5.810549
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-09-06T07:11:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fb2c9be4...
e441b7c2-82be-47eb-8879-2cc3f6e6f37b
MateuszSnamina/mattress-metropolis
app/energy/include/energy/energy_getter.hpp
#pragma once // NUMBOARD: #include<numboard/numboard.hpp> // STD: #include<memory> #include<cassert> //********************************************************************** //*** EnergyGetter -- abstract base clase *** //*********************************************************************...
ALGO
0.995339
5.393396
{ "github_metadata": { "branch": "snaminmm/prepare", "commit_count": 27, "repo_created_at": "2020-09-05T18:04: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": ...
38e4f4ba-50c4-4180-a890-00f3cb5d4106
coolspring1293/Algorithm_2015_Later
Week2/B - Stone Pile/B - Stone Pile/main.cpp
// // main.cpp // B - Stone Pile // // Created by <NAME> on 9/29/15. // Copyright (c) 2015 <NAME>. All rights reserved. // //use DP #include <iostream> #include <algorithm> #include <vector> #include <cstring> #include <cmath> #define MSIZE 5000002 using namespace std; int N, W, tmp[MSIZE], sum, solution;//solut...
ALGO
0.999726
3.988091
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2015-11-30T12:32: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": "ee43e863b...
e73a506f-bd94-43b7-a44f-8c266b91e457
pvredondo/mxfar
src/cpp_estimation.cpp
#include <RcppArmadillo.h> using namespace Rcpp; // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] arma::mat FARest(arma::mat& y,arma::vec& u, double u0,double p,double d,double bwp){ arma::vec pd = {p,d}; double lagrm = max(pd); int Tlength = y.n_rows; int k = y.n_cols; arma::mat mat_Y = y(arma::sp...
ALGO
0.9999
5.225375
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-09T10:06: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": "6951487f669e...
18cf7f4b-2013-403d-96e4-6bd5c4c5e0fd
berr/libmath
invtrig.cpp
#include "invtrig.h" double arcsin(double x) { // Computes the arcsin(x) = sin^(-1)(x). Which is the angle (in radians) that has the given sine. // The computation is done using Newton's method. // We want to find a x0 that |sin(x0) - x | < PRECISION. // The iteration is as usual, the initial value is always ...
ALGO
0.999798
5.642887
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-10-17T18:44: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": "4f3b4da25e...
e9f4ea8f-338c-4c99-883f-af8479e4ded3
tommasotode/oii
algobadge/ds/muraglia/muraglia.cpp
#include <utility> #include <vector> #include <iostream> #include <bits/stdc++.h> using namespace std; typedef struct Node { int index; int left; int right; } Node; class SegmentTree { private: vector<int> tree; Node root; function<int(int, int)> func; void build(vector<int>& data, Node node) { if (...
ALGO
0.999895
4.433861
{ "github_metadata": { "branch": "master", "commit_count": 170, "repo_created_at": "2023-05-28T18:14:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d61d7f11...
60f0436d-f769-4b85-8c8a-1c883df6ecc9
satakratu6/DSA-Practice
Graphs/5graph.cpp
// detect cycle in an undirected graph #include <bits/stdc++.h> using namespace std; class Solution { private: bool isDetect(int node, int parent, vector<vector<int>> &adj, vector<int> &visit) { visit[node] = 1; for (auto it : adj[node]) { if (!visit[it]) { if (isDetect(it, node, ad...
ALGO
0.999976
5.394111
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2025-01-19T05:59: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": "6be4b88f5...
01881eca-0d83-44b7-bbb6-ebac08974892
llamasearchai/OpenGeometry
src/distributed/DistributedEngine.h
#pragma once #include "../core/Common.h" #include "../threading/ThreadPool.h" #include "../networking/NetworkEngine.h" #include <memory> #include <vector> #include <queue> #include <mutex> #include <condition_variable> #include <thread> #include <chrono> #include <functional> #include <unordered_map> #include <atomic>...
TOOL
0.998378
7.870505
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-06-17T16:03: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": "b03119c5c47c...
761f0ca1-5005-4b4b-b4ad-fd616b352bb5
RJ-Mitra/Programming101_CPP
maze_solver_1.cpp
//Maze solver using backtracking and BFS #include<bits/stdc++.h> using namespace std; void print(const vector<vector<int>>& maze){ int N = maze.size(); int M = maze[0].size(); for(int i=0;i<N;++i){ for(int j=0;j<M;++j){ cout<<maze[i][j]<<" "; } cout<<"\n"; } } bo...
ALGO
0.999984
4.80447
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-06-28T13:55: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": "853be88c3f...
05c4da1e-3111-440e-af2a-f6fe2f18eb3b
panjia1983/channel_backward
src/bsp/ekf_belief_func.hpp
#pragma once #include "common.hpp" #include "traits.hpp" #include "utils.hpp" #include "state_func.hpp" #include "observe_func.hpp" #include "bsp_problem_helper_base.hpp" #include "problem_state.hpp" #include "types/belief_func.hpp" namespace BSP { template< class _StateFuncT=StateFunc<>, class _ObserveFuncT=Obser...
ALGO
0.995495
7.622975
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2014-02-27T01:51: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": "61604670a...
ef853015-60e5-41f0-8fa9-62ed5254f741
Rahul13022004/DSA-LEETCODE
234-palindrome-linked-list/palindrome-linked-list.cpp
class Solution { public: ListNode* findmiddle(ListNode* head){ ListNode* slow = head; ListNode* fast = head; while (fast && fast->next && fast->next->next) { slow = slow->next; fast = fast->next->next; } return slow; } ListNode* reversell(List...
ALGO
0.999888
6.586491
{ "github_metadata": { "branch": "main", "commit_count": 552, "repo_created_at": "2025-05-01T18:07:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a3019aeae...
0407f1b8-a11c-4687-b887-0bc3ea0cd7ee
bhushanzade02/CPP-CODES
08_NUMERICAL COMPUTING/A4 (GAUSSIAN ELIMINATION)/PRACTICE OF THIS ASSIGNMENT/g2.cpp
#include <iostream> #include <vector> using namespace std; // Function prototype void processFirstRow(vector<vector<double>> &matrix); int main() { int rows = 3, cols = 3; // Declare matrix with type double vector<vector<double>> matrix(rows, vector<double>(cols)); // Initialize matrix with val...
ALGO
0.999923
4.629336
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2025-01-03T09:31: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": "717fa9a2bc...
bf97a665-86c9-41b5-9caa-cc15942423df
yutarchery/GitCoder
ARC/101-200/arc198/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<int, ll> Pil; typedef pair<ll, ll> Pll; typedef pair<ll, int> Pli; typedef vector<vector<ll>> Mat; #define fi first #define se second const ll MOD = 1e9 + 7; const ll MOD2 = 998244353; c...
ALGO
0.999888
3.672576
{ "github_metadata": { "branch": "main", "commit_count": 1429, "repo_created_at": "2021-04-20T14:39:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c93d48825...
3c2fb9b5-3f1c-401a-9438-a2469618b64b
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/06/0608/personal_submission/cf1575k_1zhao.cpp
typedef long long LL; const int mod = 1e9 + 7; int qmi(LL a, LL k, int p) // 求a^k mod p { LL res = 1 % p; while (k) { if (k & 1) res = res * a % p; a = a * a % p; k >>= 1; } return res; } void solve() { int n, m, r, c, k; cin >> n >> m >> k >> r >> c; int ax, a...
ALGO
0.999508
4.307038
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "cf0b...
7d21a035-f6eb-4cd6-9fa9-1d4df00dbf00
windystrife/UnrealEngine_NVIDIAGameWorks
Engine/Source/ThirdParty/PhysX/PhysX_3.4/Source/LowLevelDynamics/src/DyArticulationScalar.cpp
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
ALGO
0.990851
3.196049
{ "github_metadata": { "branch": "4.18-GameWorks", "commit_count": 14, "repo_created_at": "2018-03-06T15:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 284, "forks": 176, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id"...
23633e82-e4b7-414e-a073-7fe9db2fc2e2
fanxiaochen/BloomingFlowers
include/solver/application_solver.h
#ifndef APPLICATION_SOLVER_H #define APPLICATION_SOLVER_H #include "solver.h" #include "interpolation_term.h" ////////////////////////////////////////////////////////////////////////// // to address the new collision introduced by application: // use interpolated positions as soft constraints, and solve for // shape...
ALGO
0.998801
5.150975
{ "github_metadata": { "branch": "phenix", "commit_count": 382, "repo_created_at": "2014-10-28T06:58:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44c9a083...
1256a6db-3a32-402c-acb3-69ef5b4560f8
sivsnkr/CommonCoding
Extra/fib_code.cpp
#include <bits/stdc++.h> using namespace std; int fib(int i) { if (i == 0) return 0; else if (i == 1) return 1; else { int f[i]; f[0] = 0, f[1] = 1; int j = 2; while (j <= i) { f[j] = f[j - 1] + f[j - 2]; j++; } ...
ALGO
0.999997
3.958528
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2020-02-14T17:53: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": "7a36ea308...
c0941de3-abdf-4409-96bd-74fd2a4c4b7c
Halieeim/LeetCode
LeetCode 75/Hash Map - Set/2352. Equal Row and Column Pairs.c++
class Solution { public: int equalPairs(vector<vector<int>>& grid) { map<string, int> table_row; map<string, int> table_col; int counter = 0; // rows for(int i = 0; i < grid.size(); i++){ string s = ""; for(int j = 0; j < grid[0].size(); j++){ ...
ALGO
0.999961
6.013289
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-04-14T12:38:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "950eff864ba...
4ace5c3f-cb14-468e-a4e4-ba033a14ac59
Tadanoningen96/atcoder_archive
atcoder/abc193/c/main.cpp
#include<bits/stdc++.h> #define rep(i,n) for(int (i)=0;(i) < (n);(i)++) #define rep2(i,m,n) for(int (i)=(m);(i) < (n);(i)++) using namespace std; using ll = long long; using ld = long double; template<typename T> bool chmax(T &a,const T &b) {if(a < b) {a = b;return true;}return false;} template<typename T> bool chmi...
ALGO
0.999859
4.040545
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-11-06T06:11: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": "9203ad32ba...
d16014e6-3882-40b1-bc94-9f982eb5c62a
RutvikRJ6800/DSandAlgo
Leetcode/1443_Minimum_Time_to_Collect_All_Apples_in_a_Tree.cpp
class Solution { public: int solve(int curr, vector<vector<int>> &adj, vector<bool>& hasApple, vector<int> &visited){ vector<int> adjList = adj[curr]; visited[curr] = 1; int ans = 0; for(int b = 0; b<adjList.size(); b++){ if(visited[adjList[b]] == 1) continue; ...
ALGO
0.999927
4.706475
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2021-06-10T05: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": "52086add4a...
32e0aa50-c6a6-4b79-b335-58fd3f4f369b
Steven4869/DSA
SDE Sheet Solutions /Linked List/Merge-LL.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; } *first = NULL, *second = NULL, *third = NULL; void createA(int arr[], int n) { struct Node *temp, *last; first = new Node; first->data = arr[0]; first->next = NULL; last = first; for (int i = 1; ...
ALGO
0.999978
4.718146
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2022-07-08T08:59: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": "fec2b03bd...
ff3dea78-752c-4d07-bc91-df59ee0ffbf6
harry878710/HARDD
conv_v2.cpp
#include "conv.h" void conv2D( hls::stream<data_t> &input, hls::stream<data_t> &output, hls::stream<data_t> &weights, int in_h, int in_w, int in_ch, int out_ch, int k_size, int stride, int pad ) { // Calculate output dimensions int out_h = (in_h + 2 * pad - k_size) / stride + 1; int out...
ALGO
0.980612
4.520797
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-11-21T06:48:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "037c6b207d1...
2b0bcb9a-d383-4d82-9204-fd87018f1f28
YessineJallouli/Competitive-Programming
Codeforces Submissions/gym/101840/B.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; const int N = 1e5; ll tree[4*N]; ll mrg(ll x, ll y) { return x+y; } ll get(int qs, int qe, int id = 0, int ns = 0, int ne = N-1) { if (ns > qe || ne < qs) { return 0; // 0 for sum/gcd/or/xor and 1 for and/product and infinity for max...
ALGO
0.99987
4.875207
{ "github_metadata": { "branch": "main", "commit_count": 107, "repo_created_at": "2021-05-13T16:32:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9bda83aeac...
505796de-6581-4942-93a5-3a29f4992ca8
Harjot01/cpp-basics
Object Oriented Programming in cpp/16 Copy Constructor.cpp
// Don't Overthink, Just Code #include <bits/stdc++.h> using namespace std; /* -> A copy constructor is used to declare and initialize an object from another object. eg :- integer I2(I1); -> The process of initializing through a copy constructor is known as copy initialization. eg :- I2 = I1, remember I1 and I2 are o...
TOOL
0.909429
5.122958
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-06-25T06:02:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "480cea6b5c9...
0733e99c-2bc8-4008-823e-31854bbb73f1
Trcty/Connect_N
support.h
// // support.hpp // // Created by <NAME> on 5/9/21. // #ifndef support_h #define support_h #include "provided.h" #include <vector> int next_level_available(const Scaffold& b,int col); int checkvertical(const Scaffold& board,int rowtowin, int currentcol, int curr_level, int input_color); void checktogether(std::v...
TOOL
0.901894
3.672869
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-01-28T01:57: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": "b3cb5e24283f...
be36f414-78b9-482a-88d6-f020428fa226
vitorguidi/Competitive-Programming
codeforces/rounds/Educational 3/c.cpp
#include "bits/stdc++.h" using namespace std; #define pb push_back #define mp make_pair #define fst first #define snd second #define fr(i,n) for(int i=0;i<n;i++) #define frr(i,n) for(int i=1;i<=n;i++) #define ms(x,i) memset(x,i,sizeof(x)) #define dbg(x) cout << #x << " = " << x << endl #define all(x) x.begin(),x.en...
ALGO
0.999988
3.955317
{ "github_metadata": { "branch": "master", "commit_count": 253, "repo_created_at": "2018-05-13T17:40:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66743eb6...
137f0596-4eeb-407d-a8ab-886e68abe16e
purvasingh96/My-Leetcode-Solutions
1123-lowest-common-ancestor-of-deepest-leaves/1123-lowest-common-ancestor-of-deepest-leaves.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.999946
5.921978
{ "github_metadata": { "branch": "main", "commit_count": 5768, "repo_created_at": "2021-12-24T13:59:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36a79aeee...
12417271-8c3e-4e4c-8328-998957c61c5e
imnsk/tutorial
week4/Graph/Clone a graph.cpp
#include <bits/stdc++.h> graphNode *dfs(graphNode *n, unordered_map<graphNode *, graphNode *> &mp) { // the given node is not checked mp[n] = new graphNode(n->data); // now iterate through its neighbours vector<graphNode *> v; for (auto i : n->neighbours) { // it is a neighbour whi...
ALGO
0.999235
5.178584
{ "github_metadata": { "branch": "master", "commit_count": 199, "repo_created_at": "2021-11-17T12:20: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": "b76246cd...
395e0bd2-1c0b-4822-83e7-f3c1c5d8b421
hl2563459/LeHai_48102
Homework/Assignment 3/Gaddis_8thEd_Chap4_Prob7_TimeCalculator/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on October 5, 2016, 1:23 PM * Purpose: Calculate time */ #include <iostream> #include <iomanip> using namespace std; const unsigned short MINUTE=60, //Conversion from second to minute HOUR=3600; //Conversion from minute to ho...
TOOL
0.949805
3.842754
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2016-09-13T18:24: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": "6bea62547...
ad72c762-c27c-4806-aff2-59ec852b9072
YaeSaraki/OI
Algorithms/vJudge/2022 - 2023/Week 2/回文质数 Prime Palindromes.cpp
#include <iostream> #include <algorithm> #include <math.h> using namespace std; bool isnprime[100100100]; void Prime(int n) { int t = sqrt(n) + 2; for (int i = 2; i < t; ++i) { if (!isnprime[i]) { for (int j = i * 2; j < n; j += i) isnprime[j] = true; } } return ; } bool IsPalindromes(int n) { ...
ALGO
0.999806
4.786396
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2022-11-25T08:48: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": "b82de374883...
8b3f0ae1-124a-4a57-ac71-ee83041e83f3
Swetangi-Rastogi-2001/DSA_practice
dp/best_time_to_buy_and_sell_II.cpp
/*https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/*/ //RECURSION class Solution { public: int f(int index, int buy, vector<int> &prices){ if(index==prices.size()){ return 0; } int profit=0; if(buy){ profit= max( -prices[index]...
ALGO
0.999992
5.603592
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2022-07-09T18:56: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": "c6c462a88ae...
43c69bd1-067c-4175-bb94-ecb73f2244d7
VSFe/Algorithm
CPP/Codeforces/Edu #103/c.cpp
#include <bits/stdc++.h> using namespace std; void solution() { long long n; vector<long long> elem; vector<long long> a, b; vector<pair<long long, long long>> p; cin >> n;long long tmp; for(int i = 0; i < n; i++) { cin >> tmp; elem.push_back(tmp); } for(int i = 0; i <...
ALGO
0.999966
4.74472
{ "github_metadata": { "branch": "master", "commit_count": 194, "repo_created_at": "2019-11-30T10:00:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "723d0393...
9dc2f086-b950-4c28-b188-ddc2970887be
dqswordman/MUT_OS_LAB
Week4_Win_IntFile.cpp
#include <stdio.h> #include <windows.h> // 共享变量 int sharedVar1 = 0; int sharedVar2 = 0; int running = 1; // 控制线程运行的标志 // 线程函数声明 DWORD WINAPI threadFunctionA(LPVOID arg); DWORD WINAPI threadFunctionB(LPVOID arg); DWORD WINAPI threadFunctionC(LPVOID arg); int main(void) { DWORD tid1, tid2, tid3; // 线程 ID HAN...
ALGO
0.978144
3.897563
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2024-09-10T12:03: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": "817a96c6e7f...
dbb868aa-40f0-4e17-8bb4-e5e1d1313003
avikodak/algos_v2
src/main/avikodak/sites/codechef/easy/granama.h
/**************************************************************************************************************************************************** * File Name : granama.h * File Location : /home/avikodak/Desktop/projects/algos_v2/src/main/avikodak/sites/codechef/easy/granama.h * ...
ALGO
0.999872
4.138464
{ "github_metadata": { "branch": "master", "commit_count": 492, "repo_created_at": "2014-10-09T08:32:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c78be12...
94b5faf3-2238-4b6f-84bd-e341b6242f1d
reo0105/atcoder
contest/2024_03_30_beginner/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n, q; cin >> n >> q; vector<int> xs(q); for (int i = 0; i < q; i++) cin >> xs[i]; vector<ll> ans(n, 0); set<int> st; vector<int> insert(n, -1); vector<ll> sum(q+1, 0); for (int i = 0; i < q; i+...
ALGO
0.999937
3.540854
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2023-02-12T12:34: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": "ba5a8dce5ce...
b9d3a9ce-c034-473b-bb5b-a4a3179b67ee
yousefabdo200/Codeforce-
A. Increasing and Decreasing/main.cpp
#include <iostream> #include <vector> using namespace std; int main() { int t; cin >> t; while (t--) { int x, y, n; cin >> x >> y >> n; vector<int> v; // Initialize the vector with the last element y v.push_back(y); int i = 1; while (i < n-1) { ...
ALGO
0.999938
5.036474
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-07T21:54: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": "c9c5c1d7e41a...
91ee0969-4c84-4b2a-85b1-223516805ef5
CMBSPEC/SZpack
SZpackMoment.cpp
//================================================================================================== // // SZpack functions unique to the Moment Method Run // //================================================================================================== // // purpose: computation of the SZ signal according to Chl...
ALGO
0.994035
5.805784
{ "github_metadata": { "branch": "Release", "commit_count": 32, "repo_created_at": "2023-08-03T10:45:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f614bc4e...
20e09460-a456-43cd-b794-d4e9661e96ee
Jackie9279/OJ
20200511/3.cpp
#include<iostream> #include<string> using namespace std; class Animal { protected: string type, name; int age; public: Animal (string type, string name, int age) :type(type), name(name), age(age) {} virtual void speak() = 0; }; class Tiger: public Animal { public: Tiger(string type, s...
ALGO
0.967625
3.583175
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-07-10T17:37: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": "365de415e1...
eb9e7b86-0d1b-46dd-b357-c7df9e3a9a47
alanqthomas/cpp-binary-search-tree
cpp-binary-search-tree/BinarySearchTree.h
#ifndef BINARYSEARCHTREE_H_ #define BINARYSEARCHTREE_H_ #include <iostream> #include <iomanip> // Forward declaration of the template class BinarySearchTree template<class DataType> class BinarySearchTree; // Class representing a node in a BST template<class DataType> class TreeNode { friend class BinarySearchTree...
ALGO
0.999586
5.963251
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-12-05T19:47: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": "99633ef7c7...
0c253377-6d17-4e8a-b20c-7f335fbf83c4
juanmsuarez/el-mastro-icpc
contests/Otros simulacros/GCPC 2017/K.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define D(a) cerr << #a << " = " << a << endl #else #define D(a) #define cerr false && cerr #endif #define fastio ios_base::sync_with_stdio(0); cin.tie(0) #define dforsn(i,s,n) for(int i=int(n-1);i>=int(s);i--) #define forsn(i,s,n) for(int i=int(s);i<int(n)...
ALGO
0.999625
3.232185
{ "github_metadata": { "branch": "master", "commit_count": 279, "repo_created_at": "2019-01-16T20:12:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dee8d528...
c088ba26-1201-4133-9785-78b3e7586f86
ITP-SSAD/SSAD-S25
Week07/Task.cpp
#include <iostream> #include <vector> #include <stdexcept> using namespace std; template <typename T> class CircularBuffer { private: vector<T> buffer; size_t capacity; size_t head; size_t tail; size_t count; public: // Constructor CircularBuffer(size_t size) : capacity(size), head(0), ta...
ALGO
0.97169
7.215177
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2025-02-21T11:43:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "39c9daa9fda0...
2f6292e0-3efc-4bd2-a865-622bbc220e2f
gortega56/gem
include/plane.h
#pragma once #include "line.h" #include "ray.h" namespace gem { struct plane4f { float x, y, z, w; float distance_from_origin() const; float distance_to_point(const float3& point) const; float3 normal() const; plane4f& normalize(); plane4f& transform...
ALGO
0.969655
6.69213
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-04-14T02:10:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9a219da5...
2db30aae-34de-4ac9-9642-290543baa911
bavlysafwatt/Library-System
Library System.cpp
#include <bits/stdc++.h> using namespace std; struct book{ int id; string name; string who_borrowed_book[10]; int total_quantity; int total_borrowed; book() { total_quantity = total_borrowed = 0; id = -1; name = ""; } void read(){ cout << "Enter the id an...
TOOL
0.979047
4.298963
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-09-22T23:40:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "700bbfb085e8...
b3d97f67-65e8-410f-a865-3252b2888169
sayak22/Leetcode-Problems
97-interleaving-string/interleaving-string.cpp
class Solution { public: /* ::::::::::::: RECURSIVE SOLUTION :::::::::::::: bool isInterleave(string s1, string s2, string s3) { return helper(s1, s2, s3, 0, 0, 0); } bool helper(const string& s1, const string& s2, const string& s3, int i, int j, int k) { // Base case: If we've reached ...
ALGO
0.999696
6.175444
{ "github_metadata": { "branch": "master", "commit_count": 538, "repo_created_at": "2024-04-16T09:28: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": "5a1251c8...
6fe51b76-6f3e-4f4e-a43d-af34bea83312
markroxor/ds-and-algo
floyd-warshall.cpp
#include<stdio.h> #include<limits.h> #include<cmath> #define V 4 #define INF 9999 void printSolution(int dist[V][V]); void floydWarshall(int graph[V][V]) { int dist[V][V]; for(int i=0;i<V;i++) for(int j=0;j<V;j++) dist[i][j] = graph[i][j]; for(int i=0;i<V;i++) for(int j=0;...
ALGO
0.999978
3.343226
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-07-17T04:03:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11e9d09e1...
6b2641bf-9478-4a91-b7ef-f1633caad106
habibaelhadary/Connect-four-Game
Connect-four-Game.cpp
#include <bits/stdc++.h> using namespace std; const int N=6; const int M=7; const int n_players = 2; char marks[n_players] = {'X', 'O'}; char grid[N][M]; //This function clears the game structures void grid_clear() { for(int i=0;i<N;i++) for(int j=0;j<M;j++) grid[i][j]='.'; } //This function prints the grid...
ALGO
0.995034
3.987118
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-04-14T21:23: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": "cbb58112d0...
b2668186-e1d2-4ff8-8796-53b343423f32
MohamedRagabAbbas/Problem-Solving
Implement Data Structures/Design Dynamic Array (Resizable Array).cpp
class DynamicArray { public: int* _arr; int _capacity; int _size = 0; DynamicArray(int capacity) { _capacity = capacity; _arr = new int[_capacity]; } int get(int i) { return _arr[i]; } void set(int i, int n) { _arr[i] = n; } void pushback(int n...
TOOL
0.958063
4.971009
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-04-11T17:49: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": "0f1a8d76363d...
7cfb51ff-a3b0-47e9-9e44-5239394e1754
UIT-AnhTu-0325/sync-repo
leetcode/_done/6-2024/_SUB_ARRAY/minimum-number-of-operations-to-make-array-continuous/main.cpp
#include <iostream> #include <algorithm> #include <vector> #include <unordered_map> #include <string> #include <stack> #include <sstream> #include <queue> using namespace std; class Solution { public: int minOperations(vector<int> &nums) { int n = nums.size(); sort(nums.begin(), nums.end()); ...
ALGO
0.999952
5.299124
{ "github_metadata": { "branch": "main", "commit_count": 245, "repo_created_at": "2023-03-06T07:00:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abaf10ba89...
72c666cf-918d-470d-bff5-727962c06e52
duyanh020405/caynhiphan
ss8-cay/test.cpp
#include<stdio.h> #include<stdlib.h> // d?nh nghia 1 nút typedef struct Node { int data; struct Node *left; struct Node *right; } Node; // T?o nút m?i Node *createNode(int data){ // c?p phát b? nh? Node *newNode = (Node *)malloc(sizeof(Node *)); newNode->data = data; newNode->left = NULL; ...
ALGO
0.999931
3.756068
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-15T13:13: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": "57a928e74949...
b3a976a0-105c-411b-a89d-4dc60ea1607d
DataIntelligenceCrew/koios-semantic-search
opt/usr/local/include/ortools/linear_solver/sat_proto_solver.h
// Copyright 2010-2018 Google LLC // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
ALGO
0.920118
7.622606
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-12-29T22:55:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d69d38feb29d...
a42180c5-e706-4424-b319-573616645054
W4D3/projects
cs140/lab5/submit/bitmatrix.cpp
#include <fstream> #include <sstream> #include <cstdlib> #include <cstdio> #include <algorithm> #include "bitmatrix.h" typedef vector <int> IVec; /* bitmatrix.cpp <NAME> March 11, 2014 This program allows the user to manipulate bit matrixes in a multitude of ways. You can change individual values, sw...
TOOL
0.903109
3.862431
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-01T02:01:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "578f830e46...
768bb933-ab0f-4fa6-885a-210618a46273
bishakh17/CP
Templates/segmentTree.cpp
#include <iostream> #include<bits/stdc++.h> using namespace std; vector<int> segTree; //ch int buildTree(int i, int s, int e, vector<int> &a){ segTree.resize(4*a.size()+1); if(s==e) return segTree[i] = a[s]; int mid = (s+e)/2; return segTree[i] = min(buildTree(2*i+1, s, mid, a), buildTree(2*i+2, mid+1,...
ALGO
0.999814
4.23727
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2022-06-28T08:38: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": "69bacbb5...
ae9e9d1d-fbd7-4591-9325-02c0c137c86e
jimdnguyen/UCM_CSE_30
Lab 9/HashTable.h
#ifndef HashTable_h #define HashTable_h #include "Queue.h" #include <vector> #include <iostream> using namespace std; struct HashTable { long size; vector<Queue*> hashtable; HashTable() { size = 10; for (long i = 0; i < size; i++) { hashtable.push_back(new Queue()); ...
ALGO
0.920337
4.592273
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-01-31T08:56: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": "55ad8caf52...
580c2966-d4a1-4f78-865f-c6dd77db318f
Darren2340/local_gnuradio
gnuradio/gr-blocks/lib/repack_bits_bb_impl.cc
/* -*- c++ -*- */ /* * Copyright 2012 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option...
TOOL
0.981802
6.36858
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-07-14T23:30: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": "7e9fb5ba91...