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
24b1df96-1184-487a-a2d4-d53940314461
Obozha/CodeTraining
C语言代码练习/数据结构设计/双向链表.cpp
#include<stdio.h> #include<stdlib.h> #include<string.h> #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef int ElemType; // ElemType 为可定义的数据类型,此设为int类型 typedef int Status; // status 是函数返回值类型,其值是函数结果状态代码 struct Book{ char id[50]; // ISBN char name[50]; // 书名 double price; // 定价 }; typedef struct D...
ALGO
0.998982
3.291122
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2019-07-09T09:30:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "884a49bbe...
1a56c6a1-a393-4042-9e5a-712d2fa9dde5
garimasinghgryffindor/DSA
Sliding Window/Minimum Window Substring.cpp
class Solution { public: string minWindow(string str, string pat) { int res = INT_MAX; int n = str.length(); unordered_map<char,int>mp; for(char x: pat) { mp[x]++; } string ans = ""; int count = mp.size(); int l = 0, r = 0; ...
ALGO
0.999996
6.469458
{ "github_metadata": { "branch": "main", "commit_count": 589, "repo_created_at": "2023-01-31T15:45: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": "98e944ba7e...
77331558-69ec-40c0-8240-32d7fc5889e8
tuanwannafree/PreSeason
DSA/lab/tuan 3/bai12.cpp
/*###Begin banned keyword - each of the following line if appear in code will raise error. regex supported define include using std ###End banned keyword*/ #include <bits/stdc++.h> using namespace std; struct NODE { int info; NODE* pNext; }; struct LIST { NODE* pHead; NODE* pTail; }; void CreateEmp...
ALGO
0.99998
5.174838
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2025-02-17T01:59:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "063a5e64a60...
558dc021-5d8b-4832-9819-d442265fd785
CGAL/cgal
Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH2.h
// Copyright (c) 1999 // Utrecht University (The Netherlands), // ETH Zurich (Switzerland), // INRIA Sophia-Antipolis (France), // Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org) // // $URL$ // $Id$ // SPDX-License-Id...
ALGO
0.930703
5.832527
{ "github_metadata": { "branch": "master", "commit_count": 113659, "repo_created_at": "2014-10-01T12:22:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5443, "forks": 1475, "issues": 511, "pull_requests": 136 }, "file_meta": { "content_id...
bd5e72e1-09e3-4318-b4a9-04cfd1f103b0
edupaim/icar-veins
veins_inet/src/veins_inet/modules/application/icarnew/IcarRouting.cc
// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it wil...
TOOL
0.912907
4.930654
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-11-29T18:32: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": "7b90d5258be2...
7644446c-02ff-4f6a-bb34-b08fefa1d0f9
xdtianyu/android-7.0.0_r1
external/pdfium/xfa/src/fxbarcode/common/reedsolomon/BC_ReedSolomonDecoder.cpp
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com // Original code is licensed as follows: /* * Copyright 2007 ZXing authors * ...
ALGO
0.999417
5.402368
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-08-24T08:55:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 43, "forks": 47, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "7f8d30e...
ddd58694-4c17-4f9e-950b-360ef6725ca9
Joaqim/eu4-autosave-archiver
src/impl/bk_tree.hpp
#ifndef BK_TREE_HPP #define BK_TREE_HPP #include <map> #include <memory> #include <type_traits> namespace MB { template <typename T, typename Unit, typename Metric> class bktree; namespace detail { template <typename T, typename Unit, typename Metric> class bktree_node { friend class bktree<T, Unit, Metric>...
ALGO
0.999308
6.069831
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-10-05T01:20: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": "8a28c287a...
17aefb47-3a36-471b-8fa9-8342ee4e0d3d
tanmay-pro/CompProg
cses/tasks_and_deadlines.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define PI 3.14159265 #define br cout << endl #define fo(i, n) for (int i = 0; i < n; i++) #define Fo(i, k, n) for (int i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define tr(container, it) \ for (auto it = container.begin(); it != contai...
ALGO
0.999804
3.80926
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-03-09T17:11: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": "521bdb8d20bd...
190268b9-53e7-4e00-85f5-1c611408d132
helirang/ProgrammersCpp
Lv2/12899.cpp
#include <string> #include <vector> using namespace std; string solution(int n) { //결과 값 string answer = ""; //+- 판정에 사용할 숫자 int num = 0; while (true) { // 나머지 값 저장 int addNum = n % 3; //n이 3보다 크면 작동 if (n > 3) { //이전 값이 0이었으면 num은 -1이 되어서 넘어온다. ...
ALGO
0.999988
4.945445
{ "github_metadata": { "branch": "main", "commit_count": 141, "repo_created_at": "2022-03-09T13:16: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": "eb2b69b1b9...
563999e9-d27a-40ee-b30f-ff85e03582d8
satyamsiuu/4th_Semester
DAA_LAB/Week_6/p2.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; bool isBipartite(int V, vector<vector<int>>& adj) { vector<int> color(V, -1); // -1 means uncolored for (int start = 0; start < V; ++start) { if (color[start] == -1) { queue<int> q; q.push(start); ...
ALGO
0.999939
5.718894
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2025-04-11T12:14:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0adbb12026...
7292e510-b088-4599-acd4-f82f82a056d2
naufalamr17/strukData
UAS/praktek/Naufal Ammar H/binarySearch.cpp
// <NAME> // 2E - Teknik Informatika // 2010631170104 #include <bits/stdc++.h> using namespace std; // fungsi binary search int binSearch(int *array, int left, int right, int key) { // perulangan saat kondisi titik di kiri (batas bawah) lebih kecil sama dengan dari kanan (batas atas) while (left <= right) ...
ALGO
0.999912
4.759143
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-02-16T07:42: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": "8ff8cb47cb41...
66705532-efb2-40f0-8f0e-173abf5b40ab
vakhariaheet/OOP-Assign
B1-2ndSessional/Q09-University.cpp
/** * Write a C++ program to sort a list of university names in ascending order using arrays. Take a n number of university names and throw an exception if index is not in range in range */ #include <iostream> using namespace std; void sort(string arr[], int size) { string temp; for (int i = 0; i < size; i++) { ...
ALGO
0.999456
5.239359
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-07-31T18:01: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": "1640e519660...
94d8cbe3-7277-4f36-a4b8-8ee38bbb2394
Chiki1601/Hackerearth-Solutions
Algorithms/Searching/Binary search/Counting numbers.cpp
#include <bits/stdc++.h> using namespace std; vector<int> pos[10]; vector<int>::iterator p; int lower_bound(int first, int last, int right, int K, int L) { while (last - first > 0) { int m = (first + last) / 2; if(max(m, K + p[m - 1] - right) < L) first = ++m; else last...
ALGO
0.999975
4.478945
{ "github_metadata": { "branch": "main", "commit_count": 1808, "repo_created_at": "2022-09-09T09:13:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "b46d7dfa...
5a34d97b-5c40-4de5-a408-0d5d7acd4055
mrblasco/elanja-project
src/model.cpp
#include <iostream> #include <cmath> #include <fstream> #include <iomanip> #include <stdio.h> #include <stdlib.h> #include <time.h> #include "../h/model.h" #include "../h/const.h" using namespace std; #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) model m; // istance of the mode...
ALGO
0.994503
3.356979
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2015-04-19T21:58: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": "738291a7...
c43d22fa-7196-4a2c-bec4-fdaaa1a2b064
aravindkrishnaswamy/RISE
src/Library/Noise/PerlinNoise2D.cpp
////////////////////////////////////////////////////////////////////// // // PerlinNoise2D.cpp - Implements a 2D perlin noise function // // Author: <NAME> // Date of Birth: February 11, 2002 // Tabs: 4 // Comments: // // License Information: Please see the attached LICENSE.TXT file // ///////////////////////////...
ALGO
0.986701
6.103283
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-12-20T17:27: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": "d89eaa3559...
d83dd0cb-1c4b-4241-8a5d-a21073002279
smsh0722/PS
problems/9470.cpp
#include <iostream> #include <vector> using namespace std; struct Strahler{ vector<int> strahler; vector<vector<int>> adjList; // adjList[dst] = src }; const int MAX_NODE_NUM = 1000; int T; // num of test int K; // idx of test int M; // num of nodes, range[1,M] int P; // num of edges int CalculateStrahler( ...
ALGO
0.999424
4.388098
{ "github_metadata": { "branch": "main", "commit_count": 193, "repo_created_at": "2022-02-14T13:27: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": "9e3f2ac53d...
7f2f1aa7-82e2-4ff1-b343-8f532f1e3669
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/17/43/1.cpp
// {{{ by shik #include <bits/stdc++.h> #include <unistd.h> #define SZ(x) ((int)(x).size()) #define ALL(x) begin(x),end(x) #define REP(i,n) for ( int i=0; i<int(n); i++ ) #define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ ) #define FOR(it,c) for ( auto it=(c).begin(); it!=(c).end(); it++ ) #define MP make_pair #define...
ALGO
0.999988
4.06829
{ "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": "5191e826...
c964cf9d-fb59-493e-8d42-0d91ccd70ccf
prasadzalake45/Leetcode
0450-delete-node-in-a-bst/0450-delete-node-in-a-bst.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.99999
5.418207
{ "github_metadata": { "branch": "main", "commit_count": 1557, "repo_created_at": "2024-08-15T03:52: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": "f1bf1106b...
f4b41919-a6d6-4123-abe1-63d70f5a1047
Umair505/algorithm
Week 01 Graph Algorithm/Assignment 01/prac.cpp
#include<bits/stdc++.h> using namespace std; int n,m; const int N = 1001; int vis[N][N]; int maze[N][N]; int dx[4] = {0,0,-1,1}; int dy[4] = {1,-1,0,0}; bool valid(int i,int j) { return !vis[i][j] && maze[i][j]!= -1 && i>=0 && i<n && j>=0 && j<m; } void bfs(pair<int,int>src) { queue<pair<int,int>> q; q.push...
ALGO
0.999948
4.126331
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-03-02T06:28:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46ed5fe597d...
15667f5c-3e80-44c7-a9fe-d1f71d304a54
metehkaya/Algo-Archive
Problems/LeetCode/Solutions/1222.Queens_That_Can_Attack_the_King.cpp
typedef vector<int> vi; typedef vector<vi> vii; typedef vector<bool> vb; typedef vector<vb> vbb; class Solution { public: void f(vi curr , int dx , int dy , vbb& mark , vii& ans ) { if(min(curr[0],curr[1]) == -1) return; if(max(curr[0],curr[1]) == 8) return; if(mark[...
ALGO
0.99995
4.389877
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2023-04-04T19:44: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": "16b03e1328a...
217a703c-d34b-483d-95fa-82461e96dc94
jdotaz/Algebra-Abs
Practica3_EuclidesMcd/Euclides.cpp
#include "Euclides.h" Euclides::Euclides() { } ZZ Euclides::modulo(ZZ dividendo,ZZ divisor){ ZZ cociente=dividendo/divisor; ZZ residuo=dividendo%divisor; if (residuo<0){ cociente--; residuo=dividendo-(cociente*divisor); } return residuo; } ZZ Euclides::mcd1(ZZ a, ZZ b){ int paso=0; while (true...
ALGO
0.999319
4.917793
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2020-04-13T21:49:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19b85ed30...
031f96c3-4468-49d8-9425-f912fba4a9d0
seanbaxter/mgpu_old
sort/src/simpletest/simpletest.cpp
// MGPU Sort simple test example. Remember to link with the sort library // (mgpusort.lib is the import library on Windows). #include <cstdio> #include <vector> #include "../../../util/cucpp.h" // MGPU utility classes #include "../../../inc/mgpusort.hpp" // MGPU Sort with C++ wrappers #ifdef _MSC_VER #include <ran...
ALGO
0.999135
5.90591
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2011-08-19T17:11:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f46fcb98...
ff6a9ad7-e039-4076-bdf6-2779e978c475
tatfook/ParaCraftMobile
frameworks/runtime-src/Classes/math/ParaPlane.cpp
/** author: LiXizhi date: 2009.4.15 company:ParaEngine desc: ParaEngine used to use D3DX math library. however, when porting to Linux, I need a cross platform GNU LGPL math library. The following one is chosen with some modifications so that they work well with other parts of ParaEngine. */ #include "ParaEngine.h" #...
ALGO
0.949484
6.637054
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-05-04T01:31:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 2, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "ee4dfbd351...
83dbc15c-044e-4546-ad5c-b58be36fa066
AnthonyN1/Advent-of-Code-Temp
src/2015/day11.cpp
/* Advent of Code - 2015: Day 11 Author: <NAME> (AnthonyN1) */ #include <iostream> #include <limits> #include <string> #include <vector> /* Returns the next letter in the alphabet after ch. */ char nextLetter(char ch){ if(ch != 'z') return ch + 1; else return 'a'; } /* Returns true iff str is valid; that is: ...
ALGO
0.999796
5.10324
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2022-03-06T22:33: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": "f607346a2e...
326c54d3-cb7e-4f6c-938e-2c62039945c1
amarsde2/c-
tree/color.cpp
#include<bits/stdc++.h> using namespace std; #define V 4 bool graph[V][V] = { {0, 1, 1, 0}, {1, 0, 1, 1}, {1, 1, 0, 1}, {0, 1, 1, 0}, }; bool is_valid(int v , int color[], int c){ for(int i = 0; i < V; i++){ if(graph[v][i] && c == color[i]){ return false; } } return true...
ALGO
0.999964
3.864881
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-06-23T14:25: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": "8634b82e6e8...
3e50bba0-a8a0-499b-8d11-dcf8a306ab1d
MarieteCampos/FAL
FAL/IntensivoFAL/VA - Vuelta Atras/VA-FuncionariosDelMinisterio.cpp
//<NAME> #include <iostream> #include <fstream> #include <vector> using namespace std; /* Coste Asintotico: O(n^n) sinedo n el numero de funcionarios asi como el numero de trabajos. Para cada funcionario de los n posibles se prueba a asignarle cada uno de los n trabajos. */ bool esValida(int tiempoActual, int...
ALGO
0.999966
4.233366
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-01-16T19:34: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": "854a5188ca...
8cb2c337-b892-4f3e-8ec0-65867c9f4e38
gaodechen/OI_History
problems/hdu3585.cpp
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <cmath> #include <vector> using namespace std; const int N = 51, INF = 0x3f3f3f3f; struct Point { int x, y; } e[N]; double dis[N][N]; vector< double > list; int G[N][N], tmp[N], mark[N], ans, q, k; boo...
ALGO
0.999957
4.013793
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-04-23T15:37:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19d8e2c38f...
0b2f66b2-60fb-4383-96d5-580b26bdfd11
jubaerhosain/data-structures-and-algorithms
Tree/Tree Flattening(Euler Tour)/Number Of Child of a Specific Node in a Specific Depth.cpp
// E - Count Descendants: https://atcoder.jp/contests/abc202/tasks/abc202_e?lang=en #include<bits/stdc++.h> using namespace std; #define endl '\n' #define all(a) a.begin(), a.end() #define rep(i, s, n) for(int i = s; i <= n; i++) #define rrep(i, n, s) for(int i = n; i >= s; i--) typedef long long ll; typedef lo...
ALGO
0.999963
4.447133
{ "github_metadata": { "branch": "main", "commit_count": 805, "repo_created_at": "2021-01-27T16:59: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": "0f2a655616...
c69a71c8-21a0-4ef2-a01d-f4f68860ffff
llvm/llvm-project
libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TEST
0.981111
7.414867
{ "github_metadata": { "branch": "main", "commit_count": 545188, "repo_created_at": "2016-12-07T09:39:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 33545, "forks": 14484, "issues": 5000, "pull_requests": 5000 }, "file_meta": { "content_...
efe25e6a-4d4c-48b2-901e-bb464af98dab
someshfengde/cses-problems-and-cp-practice
A_Distance_and_Axis.cpp
/* You're my honeybunch, sugar plum Pumpy-umpy-umpkin You're my sweetie pie You're my cuppycake, gumdrop Snoogums, boogums, you're The apple of my eye And I love you so And I want you to know That I'm always be right here And I want to sing Sweet songs to you Because you are so dear... */ #include <bits/stdc++.h> #in...
ALGO
0.993125
3.246931
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-09-24T10:16:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41df15d603...
fc465641-0cc2-43ef-87fc-a722582c5239
SHUKLA-KUSHAGRA/Leetcode_solved
DFS of Graph - GFG/dfs-of-graph.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to return a list containing the DFS traversal of the graph. void DFSrec(vector<int> adj[],int s,vector<int> &result,vector<bool> &visited) { visited[s]=true; res...
ALGO
0.999953
6.66522
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2022-02-18T07:46: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": "1bef7927f4...
873d8810-f360-41d9-8c5f-2ad5c7204ae4
hrudai2002/GeeksforGeeks-POD-April
Apr-20/Theft at world Bank.cpp
bool perfectSquare(long long w) { long long l = 0, r = w; while(l <= r) { long long m = (l + r) >> 1; if(m*m == w) return true; else if(m*m < w) l = m + 1; else r = m - 1; } return false; } long double maximumProfit(int N, long...
ALGO
0.999933
4.280782
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2022-04-01T10:32:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d035e8f8df...
d41c95a9-6b3a-4124-b67e-b17c7279767f
Saksham-Gupta-30/Striver_Tree_Cplusplus
RootToNodePathInBT.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; Node (int value) { data = value; left = right = NULL; } }; bool isNull(Node *root); bool getPath(Node *root, vector<int> &ans, int target); int main() { struct Node *ro...
ALGO
0.999947
4.2123
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2022-07-14T17:55: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": "0a9af506c15...
86d40d2a-74c2-4a29-bae1-ca9cb53575e2
OUC-MYM/Summer-training
7-30/Problem Killer.cpp
#include <iostream> #include <queue> using namespace std; char map[1010][1010]; int w,h; int ans[2000]; struct point { int x; int y; }; queue <point> q; queue <point> old; bool inmap(int x,int y) { if(x<=0||y<=0||x>h||y>w) return false; return true; } void bfs() { int cnt=0; q.push(...
ALGO
0.999868
3.410528
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2015-07-20T12:42: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": "3701e19bc...
2858d2a6-c46c-49ff-b1f4-5d82168255ba
maisquemaker/arduinoPratico
video006/video006.ino
/* Vídeo 6 Neste vídeo, continuo usando a mesma montagem com o display de 7 segmentos para apresentar uma introdução bem simplificada das operações lógicas 'OU' e 'E', além da aplicação de comparações através do operador 'diferente' (!=). Introduzo ainda a aplicação do `else` na complementação da instruçã...
TOOL
0.98209
5.378102
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-06-11T19:43:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af47dd885...
65673cf9-0a23-4ec0-9af3-648393320e2a
everbird/leetcode
SearchForARange.h
class Solution { public: vector<int> searchRange(int A[], int n, int target) { // Start typing your C/C++ solution below // DO NOT write int main() function vector<int> r; int pos = this->binarySearch(A, 0, n-1, target); int pos_start = this->searchDown(A, pos); int p...
ALGO
0.999921
6.243598
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2013-07-02T05:17:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "679a29ef5...
b2216931-be8e-453e-a872-6b0ba55ad86f
sunziping2016/WinminePlugin
winmineplugin.cpp
#include <stdio.h> // Using C's IO for smaller .exe file size #include <assert.h> #include <windows.h> #include <stdlib.h> #include <string.h> #include <ctype.h> const unsigned int MAXLINEBYTE=100, MAXFILENAMEBYTE=25; int timedelay=0; // Delay several milliseconds after displaying a sentence to make debug easier. enu...
TOOL
0.908378
3.404952
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-06-01T10:19: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": "6a7273743e...
f83ea4f3-3638-4b1a-b4f3-680c3142fcda
saga-gis/saga-gis
saga-gis/src/tools/develop/dev_exercises/Exercise_09.cpp
/////////////////////////////////////////////////////////// // // // SAGA // // // // System for Automated Geoscientific Analyses // // ...
ALGO
0.998334
6.568695
{ "github_metadata": { "branch": "master", "commit_count": 6655, "repo_created_at": "2017-05-17T12:47:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 50, "forks": 19, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "d4129e...
92f50b11-8ed4-480d-a9a6-44f75b430984
wiwitrifai/competitive-programming
topcoder/archive/EllysTree.cpp
#include <bits/stdc++.h> using namespace std; const int N = 105; vector< int > ch[N]; int live[N], st[N], en[N], cntr, lv[N], contain[N]; void pre(int v = 0) { st[v] = cntr++; for (int u : ch[v]) { lv[u] = lv[v] + 1; pre(u); } en[v] = cntr++; } bool descendant(int u, int v) { if (lv[u] > lv[v]) swap(u, v)...
ALGO
0.999926
4.752498
{ "github_metadata": { "branch": "master", "commit_count": 628, "repo_created_at": "2016-05-21T12:11:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "843a7a2...
efbaa587-c3c9-42be-a65a-2c567719a78e
TYDTYD/Algorithm_Study
백준/Gold/25315. N수매화검법/N수매화검법.cc
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; int ccw(pll& p1, pll& p2, pll& p3) { ll s = p1.first * p2.second + p2.first * p3.second + p3.first * p1.second; s -= (p1.second * p2.first + p2.second * p3.first + p3.second * p1.firs...
ALGO
0.999511
3.799666
{ "github_metadata": { "branch": "main", "commit_count": 383, "repo_created_at": "2024-03-22T12:08: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": "1f3ca26e97...
c6a0e759-201b-4b87-8f2d-7d0ee9458654
capnmav77/Core-Programming
STL/DSA/Greedy/Minimum Number of Arrows to Burst Balloons.cpp
/* MY YOUTUBE VIDEO ON THIS Qn : https://www.youtube.com/watch?v=zfcGwzfDNu0 Company Tags : Google, Facebook, PayPal, Microsoft Leetcode Link : https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/ It falls under the category of "Interval Based Quest...
ALGO
0.999826
6.210574
{ "github_metadata": { "branch": "main", "commit_count": 215, "repo_created_at": "2023-02-11T05:00:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b4813f602...
1946d6fe-ddf7-45c3-a678-5d7c25ae0f6e
jackwagneruni/file_IO
main.cpp
#include <iostream> #include <string> #include <sstream> #include <fstream> int main(){ std::ifstream inFile; std::string currentLine; std::stringstream converter; std::stringstream ss; int num1, num2, sum; std::string sNum1, sNum2, text; inFile.open("data.csv"); while (getline(inFile...
TOOL
0.974823
5.485858
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-14T21:58:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5804c84d7b8...
f3edf234-d0ce-48d4-ac6f-7821443e182e
aryanrahul1313/Strivers-DSA-Sheet
Greedy Algorithm/Job Sequencing Problem.cpp
#include<bits/stdc++.h> static bool cmp(const vector<int>& a, const vector<int>& b) { return a[2] > b[2]; } vector<int> jobScheduling(vector<vector<int>> &jobs) { //sort the vector acc. to max profit sort(jobs.begin(), jobs.end(), cmp); //finding the maximum deadline int maxi = 0; for(int i = 0...
ALGO
0.999598
4.821457
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2023-09-19T16:41: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": "ee95981a6b...
8e4dd70f-5498-4f87-9242-c647c63e60c7
ipc-sim/ipc-toolkit
src/ipc/barrier/barrier_force_magnitude.cpp
#include "barrier_force_magnitude.hpp" namespace ipc { double barrier_force_magnitude( const double distance_squared, const Barrier& barrier, const double dhat, const double barrier_stiffness, const double dmin) { double grad_b = barrier.first_derivative( distance_squared - dmin * dmin...
ALGO
0.990935
5.835281
{ "github_metadata": { "branch": "main", "commit_count": 681, "repo_created_at": "2020-06-16T18:58:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 254, "forks": 38, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "c7693fa8...
074cfe33-2493-429e-aaee-08b999c770c7
desoo40/mai_labs
2sem/Olymps/12H.cpp
#include <string> #include <iostream> #include <stdio.h> #include <cstdlib> #include <vector> using namespace std; int main() { long long num_of_zeros = 0; int countries = 0; long long not_beautiful = 0; bool beautiful = false; cin >> countries; vector<string> tanks(countries); for (int i = 0; i < countries;...
ALGO
0.999759
3.762097
{ "github_metadata": { "branch": "master", "commit_count": 418, "repo_created_at": "2016-05-23T18:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "e0847126...
a5427c54-455f-47b3-8ce2-4747e28ccb15
Rexskth/leetcode
0017-letter-combinations-of-a-phone-number/0017-letter-combinations-of-a-phone-number.cpp
class Solution { public: void backtrack(string& digits, vector<string>& result, string& current, int index, unordered_map<char, string>& mapping) { if (index == digits.size()) { // Base case: if we've processed all digits result.push_back(current); return; } string l...
ALGO
0.999969
6.965884
{ "github_metadata": { "branch": "main", "commit_count": 1052, "repo_created_at": "2024-09-25T13:41: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": "916334441...
d0750588-efb0-4796-be67-93020e5dd753
santicrack1010/SimpleGraphLibrary
Proyecto/src/libreriaGrafos.hpp
#ifndef __LIBRERIAGRAFOS_H__ #define __LIBRERIAGRAFOS_H__ #include <climits> #include <iostream> #include <set> #include <vector> class Graph { public: Graph(int numVertices); void addEdge(int source, int destination, int weight); void removeEdge(int source, int destination); void addVertex(); void removeV...
ALGO
0.998387
5.418853
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-23T23:11: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": "d6755a3a464c...
3c2badf4-ef55-47ce-9a2d-41bfdb8567d2
Leshiy-ND/ContentSearcher
include/InvertedIndex.h
#ifndef CONTENTSEARCHER_INVERTEDINDEX_H #define CONTENTSEARCHER_INVERTEDINDEX_H #include <vector> #include <string> #include <map> #include <mutex> struct Entry { std::size_t doc_id, count; bool operator == (const Entry& other) const; // Необходимо для проведения тестов bool operator < (const Entry& other) cons...
ALGO
0.969134
4.529684
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2023-01-30T05:28:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b38977fa92...
1799cc16-91b6-49d2-a08e-6b87a664755c
CGCL-codes/DGraph
algorithm/rundemo.cpp
#include "api.h" #include "debug.h" #include <iostream> #include <string> using namespace std; class Demo : public SccDagApp<long long> { public: Demo(string dir, string value_dir): SccDagApp(dir, string("demo_value.bin"), value_dir){}; void init(ID id, value_t &value) { value = (long long)id; } bool update(...
TOOL
0.949428
4.591067
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-02-13T09:50:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "027611cdc3...
8cf54f3b-76ff-471e-9362-d3480e03a86a
Renegade-3863/Hotaru_at_Leetcode
CollectionOfSolutionsCC/_611triangleNumber.cc
#include "Solution.h" int Leetcode601_700::Soltuion::triangleNumber(vector<int>& nums) { // 乍一看不好识别想考什么,我们先简单思考一下暴力求解的方法: // 首先,如果给定我们三条边,如何判断它们能否构成一个有效的三角形? // 最一般的判断逻辑是:任意两条边之和要大于第三边 // 所以我们可以暴力枚举,每次举出三条边,算三次两边之和是否大于第三边? // 似乎不必这样 // 我们可以对 nums 数组进行排序 // 之后每次取出三个元素,并且只检查前两个值的和是否大于第三个值 ...
ALGO
0.999713
5.533954
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2024-04-25T06:57: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": "2323c350c7...
0a09103d-a02b-461e-89bf-1a49048b1455
jk2020214154/Data_Structure_Code
第四章 串/4.1 串的定义和实现/串的块链存储.cpp
#include<iostream> using namespace std; #define MaxBlockSize 4 //不带头结点 typedef struct Chunk{ char ch[MaxBlockSize]; Chunk *next; }Chunk; typedef struct{ Chunk *head,*rear; int length; }LString; void InitLString(LString &Str) { Str.head=Str.rear=NULL; Str.length=0; } void StrAssign(LString ...
ALGO
0.997537
3.498055
{ "github_metadata": { "branch": "master", "commit_count": 241, "repo_created_at": "2023-07-18T03:38:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd468538...
23e7aeea-ad8f-47c5-8dd8-0f8a7517483a
vespa-engine/vespa
configd/src/apps/cmd/main.cpp
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <vespa/vespalib/util/signalhandler.h> #include <vespa/vespalib/util/exception.h> #include <vespa/fnet/frt/supervisor.h> #include <vespa/fnet/f...
TOOL
0.949727
5.970695
{ "github_metadata": { "branch": "master", "commit_count": 91001, "repo_created_at": "2016-06-03T20:54:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6249, "forks": 649, "issues": 204, "pull_requests": 15 }, "file_meta": { "content_id": ...
1684e2be-31e3-4e3a-9c3f-559ba21da079
samkitshah1262/CMCP
BS/B_The_Fibonacci_Segment.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vector<int>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; using pi = pair<int, int>; using pl = pair<ll, ll>; #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define pb push_b...
ALGO
0.999949
3.730109
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-11-11T04:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcda83148ea...
a8a61d51-edb6-480f-b3fb-5356efdd3e6c
devSmarak972/MyDSA
q5.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; string rev(string &str) { string revs=""; for (int i = str.length() - 1; i >= 0; i--) { revs += str[i]; } return revs; } int main() { ll n,m,k,t,d; cin>>t; while(t--) { cin>>n>>m>>k>>d; vector<vecto...
ALGO
0.999977
4.330182
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-04-29T06:25: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": "e2a655b33de2...
49bc697f-7512-4857-a77b-35c0044dd04c
sellandira/Tugas-Algoritma-dan-Pemrograman-ke-13
Pencarian Sekunsial Data Nama.cpp
#include <iostream> #include <string> using namespace std; int main() { cout << "~ Tugas Pertemuan ke-13 Pencarian Sekunsial Mencari Data Nama ~" << endl; cout << "======================================================================" << endl; cout << "Nama : <NAME>" << endl; cout << "NIM : 5...
ALGO
0.997198
4.288655
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-02-19T04:12: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": "b67f5254a571...
90c3ed1c-edce-4a7c-8b89-de9969c289a5
bitchbitch/ACM-ICPC
algorithm/splay/poj3468.cpp
// File Name: spoj3468.cpp // Author: darkdream // Created Time: 2014年11月05日 星期三 19时40分26秒 #include<vector> #include<list> #include<map> #include<set> #include<deque> #include<stack> #include<bitset> #include<algorithm> #include<functional> #include<numeric> #include<utility> #include<sstream> #include<iostream> #incl...
ALGO
0.999638
3.58911
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2015-06-09T13:18: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": "0e7b5178...
059180ea-e68c-42d8-bd1a-835cacdb509d
sheikh-arman/Codeforces_Solutions
sk_arman/contest/1638A.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; #define sf(n) scanf("%lld",&n); #define YES cout<<"YES\n"; #define NO cout<<"NO\n"; #define nl cout<<"\n"; #define PB push_back #define VST(V) sort(V.begin(),V.end()) #define VSTrev(V) sort(V.begin(),V.end(),greater<long long int>()) #define fast io...
ALGO
0.999964
3.906067
{ "github_metadata": { "branch": "main", "commit_count": 683, "repo_created_at": "2022-09-12T15:40: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": "6adf0cfa3d...
d499ff13-297d-4e04-9cba-fa9f03b09819
NuthalapatiDinesh/CSA5127-Cryptography-and-Network-Security
programs/crpto14.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> // Function to encrypt plaintext using one-time pad Vigenère cipher void encrypt(char *plaintext, int *key, int key_length, char *ciphertext) { int i; for (i = 0; plaintext[i] != '\0'; i++) { if (isalpha(plaintext[i])) { ...
ALGO
0.999924
3.175115
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-21T15:37: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": "85c13d029e57...
981fff88-28fc-4c4d-bbe7-be9e9ba19d03
kdubel/RejsaRubberTrac-MLX90640
spline.cpp
#include "Arduino.h" #include "spline.h" #include <math.h> Spline::Spline(void) { _prev_point = 0; } Spline::Spline( int16_t x[], int16_t y[], int numPoints, int degree ) { setPoints(x,y,numPoints); setDegree(degree); _prev_point = 0; } Spline::Spline( int16_t x[], int16_t y[], int16_t m[], int numPoints ) {...
ALGO
0.998114
5.115248
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-09T09:52: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": "894aedf907a5...
37622171-21eb-45c3-8b9b-4772b5919326
kiwiche/Opencv-Kalman-Tracking
src/kalman_tracker.cpp
// Module "core" #include <opencv2/core/core.hpp> // Module "highgui" #include <opencv2/highgui/highgui.hpp> // Module "imgproc" #include <opencv2/imgproc/imgproc.hpp> // Module "video" #include <opencv2/video/video.hpp> #include <iostream> #include <vector> using namespace std; // Color to be tracked #define MIN_...
ALGO
0.977687
5.150302
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2017-05-13T08:17:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ed7f2c9cf...
37e69cb8-b44a-4b32-838d-1342b7a5dbfb
parthtyagii/DSA-Codes
ratInMaze.cpp
#include <iostream> using namespace std; bool ratInMaze(char maze[10][10], int soln[10][10], int i, int j, int m, int n) { if (i == m - 1 and j == n - 1) { // Base condition: soln[i][j] = 1; // Print path: for (int p = 0; p < m; p++) { for (int q = 0; q < n; ...
ALGO
0.999971
4.423216
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-06-20T13:42:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f55aaa1c54...
8de5c488-dcb8-4d00-8ce0-35f571e0cc89
SomAhirwar/OOPS-CPP
abstraction/pureVirtualFunction.cpp
#include <iostream> using namespace std; ////////////////////PURE VIRTUAL FUNCTION////////////////////// // Sometimes implementation of all function cannot be provided in a base class because // we don’t know the implementation. Such a class is called abstract class. // For example, let Shape be a base class. We canno...
TOOL
0.944848
5.431127
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-11-24T06:50:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15cf9024cf62...
adf132d7-7431-4f0e-8cee-49d10a49b88f
Matheusdamaceno/codigos
EST.DAD/fila/insereFIla.cpp
#include <iostream> struct Lista { int valor; Lista *prox; }; struct Fila { Lista *ini; Lista *fim; }; void removerFila(Fila *fila) { Lista *aux = fila->ini; if (aux != NULL) { fila->ini = fila->ini->prox; free(aux); } if (fila->ini == NULL) fila->fim = NULL; } void insereFila(Fila *fil...
ALGO
0.99797
4.891901
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2023-03-24T00:01: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": "0d167a2c3...
d31d8026-7674-4d8b-86c0-82944ce735f9
UCL-CCS/HemePure
src/lb/lattices/IncompressibleLattice.h
// This file is part of HemeLB and is Copyright (C) // the HemeLB team and/or their institutions, as detailed in the // file AUTHORS. This software is provided under the terms of the // license in the file LICENSE. #ifndef HEMELB_LB_LATTICES_INCOMPRESSIBLELATTICE_H #define HEMELB_LB_LATTICES_INCOMPRESSIBLELATTICE_H #...
ALGO
0.991132
6.485689
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2019-07-31T12:20:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 10, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "52787cc...
75593b5b-84ab-47fc-8fb6-0087bea7fa30
karayilano/BLG-336E
Final/q3/q3.cpp
//<NAME> //150140011 #include <iostream> #include <fstream> #include <vector> #include <iomanip> #include <climits> using namespace std; struct Edge{ int sourceNode; int destinationNode; int weight; }; class Graph{ int numberOfNodes; int numberOfEdges; vector<Edge> edges; public: voi...
ALGO
0.999842
4.264757
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-08-09T18:54: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": "52368948b7...
f438d6d1-4b2e-4e6e-896c-f6283ddda39a
TDP07420/NIU-CS-Summer-Project-2022
pilot340/11/main.cc
#include <iostream> #include <climits> using namespace std; int mintokens(int c, int a[], int len) { if(c < 1) return -1; //declare result int change = INT_MAX; //check later to prevent overflow //Try every coin with smaller value of c for(int i = 0; i < len; i++) { if(a[i] <= c) { int sub_chang...
ALGO
0.999857
4.421006
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-05T15:18: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": "88034b346c7f...
9fc94e6d-be9a-4fa4-a427-4251c52ffb34
HimanshuParodiya/DSA
Day 44 Striver Linked List/Day 8 Remove Nth Node from the end of the LinkedList/02_removeKthNode_Optimize.cpp
#include<iostream> #include<vector> using namespace std; class Node { public: int data; Node *next; Node *prev; public: Node(int data){ this->data = data; this->next = NULL; this->prev = NULL; }; }; // Function to convert an array // to a doubly linked list Node *convertArr...
ALGO
0.999971
5.736313
{ "github_metadata": { "branch": "main", "commit_count": 203, "repo_created_at": "2023-08-30T10:19:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20c3d08c38...
a5994661-2446-466d-8230-46e5bc436deb
fnplus/interview-techdev-guide
Algorithms/Greedy Algorithm/Fractional_Knapsack_Problem.cpp
#include <bits/stdc++.h> using namespace std; struct item { int profit, weight; item(int profit, int weight) : profit(profit), weight(weight) {} }; // Comparison according to profit/weight ratio bool comp(struct item i1, struct item i2) { double rat1 = (double)i1.profit / i1.weight; ...
ALGO
0.999954
4.570447
{ "github_metadata": { "branch": "master", "commit_count": 994, "repo_created_at": "2019-10-01T17:51:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 325, "forks": 326, "issues": 50, "pull_requests": 37 }, "file_meta": { "content_id": "3e3...
5272a6c0-6642-4961-bedd-c2a49db29bc6
ddingdol02/first-project
C++_Program/site_studying/4-2/2.cpp
#include <iostream> #include <cmath> #include <limits> // INFINITY 사용을 위해 추가 class Point { int x, y; public: Point(int x, int y) { this->x = x; this->y = y; } int get_x() const { return x; } int get_y() const { return y; } }; class Geometry { int num_points; Point* point_a...
ALGO
0.99899
5.2889
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2025-03-31T09:11: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": "63ce50b2e...
9a518efc-f8c6-44e6-93e1-50a16bbd690d
Haricharan1212/CP
oldcode/B_Summation_Game.cpp
// Haricharan #include <bits/stdc++.h> using namespace std; #define int long long int #define vi vector<int> #define vii vector<vector<int>> #define vb vector<bool> #define pi pair<int, int> #define si set<int> #define rep(var, l, r) for (int var = l; var < r; var++) void solve() { int n, k, x; cin >> n >> k ...
ALGO
0.999912
5.047137
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2022-10-13T03:47: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": "292139547...
c99446db-6247-41e0-8216-dffb0a3bde13
stillsteven/Computer-Firmware-Desigin-LAB.
P16(Ananagrams).cpp
#include <stdio.h> #include <string> #include <iostream> #include <vector> //矩陣容器工具 #include <ctime> #include <algorithm> #include <map> //表格容器工具 #define IN "P16IN.txt" #define OUT "P16OUT.txt" using namespace std; #define ALL(x) x.begin(), x.end() //副程式 : 字串正規化 string sNorm(string s) { for (int i ...
ALGO
0.999602
3.395947
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2023-02-23T08:21:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3bdac063263...
ed506151-a737-49ad-9033-8157c5525a99
jencmart/bi-acm3
03-banks/A.cpp
#include <iostream> #include <vector> #include <list> using namespace std; void recalculate(int & numOfMov,vector<int> & banksVector) { for(int i = 0 ; i < banksVector.size() ; ) { if(banksVector[i] < 0) { /// do magic move numOfMov ++; int val = banksVect...
ALGO
0.999941
3.908227
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-22T12:45:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ead106d6c9...
2a8de413-13db-436f-850e-450e8b537efd
Alexhuszagh/PyCPP
pycpp/iterator/windowed.h
// :copyright: (c) <NAME> 2017. // :license: MIT,see licenses/mit.md for more details. /** * \addtogroup PyCPP * \brief Create a sliding window of size-N from an iterable. * * Creates an input-iterable range from an iterator pair, returning * a window N-sized chunks from the range in a custom container * (...
TOOL
0.938276
7.867052
{ "github_metadata": { "branch": "master", "commit_count": 639, "repo_created_at": "2017-06-23T04:36: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": "c38ea620...
1538722c-178e-444f-a0cf-292154ebf7cd
tanvirtareq/codeforces
1263E.cpp
#include<bits/stdc++.h> #define mfm 4000000 using namespace std; int n, t[mfm], j, a[mfm], mx[mfm], mn[mfm]; char ch; void prn() { cout<<endl<<endl; for(int i=1;i<=4*n;i++) cout<<t[i]<<" "; cout<<endl<<endl; } void update(int node, int start, int end, int l, int r, int add) { if (l > ...
ALGO
0.999951
3.332444
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-11-25T19:40:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "627bdebaed...
06d41e69-b3b8-4a41-98dd-0584a011a71f
netxor17/Proyectos-Visual-Studio-Portatil-Nestor
CountInterval/FileName.cpp
//A80 //<NAME> #include <iostream> #include <iomanip> #include <fstream> #include "set_eda.h" using namespace std; // Resuelve un caso de prueba, leyendo de la entrada la // configuracion, y escribiendo la respuesta bool resuelveCaso() { // leer los datos de la entrada int numeros, intervalos; cin >> numeros >> in...
ALGO
0.999398
4.465095
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2023-07-11T16:02: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": "490c82660...
4bba8598-66f4-4878-a200-957633425802
VitBomm/SPOJ
FindStringRoot.cpp
#include <iostream> #include <math.h> #include <vector> #include <algorithm> #include <string> using namespace std; void KMPPreprocess(string p, vector<int>& kmp) { kmp[0] = 0; int m = p.length(); int j = 0; int i = 1; while (i < m) { if (p[i] == p[j]) { j++; ...
ALGO
0.999175
3.409387
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-07-15T07:08:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b75f0ad05...
459f0cfa-0765-4268-bfb0-8e9d3b4e9316
marcobasmaji/NeuroLab
Tools/opennn/files/learning_rate_algorithm.h
// OpenNN: Open Neural Networks Library // www.opennn.net // // L E A R N I N G R A T E A L G O R I T H M C L A S S H E A D E R // // Artificial Intelligence Techniques SL // <EMAIL> #ifndef LEARNINGRATEALGORITHM_H #define LEARNINGRATEALGORITHM_H // System includes #include <iostream> #include <fst...
ALGO
0.998774
6.594695
{ "github_metadata": { "branch": "master", "commit_count": 533, "repo_created_at": "2019-12-18T09:39: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": "d205e077...
fa7acb1b-ac55-4b9b-a0c2-5b80400890ce
DyogoBendo/OBI
OBI-2018/Fase-3/3- Baldes/soluções_oficiais/baldes.cpp
// <NAME>, baldes, OBI-2018 #include <iostream> using namespace std; #define MAXN 100001 #define MAXV 1000000 #define MINV 1 #define MEIO(i,f) ((i)+(((f)-(i)+1)/2)-1) #define ESQ(i) (2*(i)) #define DIR(i) (2*(i)+1) #define MAX 131072 // 2^17 typedef pair<int,int> pii; struct segment { int min_i, max_i; // ind...
ALGO
0.999919
4.722748
{ "github_metadata": { "branch": "master", "commit_count": 238, "repo_created_at": "2021-03-04T01:41:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fda37738...
15c0442c-58d9-4904-a16d-ed0e295ba114
pa7i3nt/Data-Structure-and-Algorithms-PTIT-2020
Contest_8-Queue/BAI3.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, x; string str; deque <int> dq; cin >> n; cin.ignore(); while (n--) { cin >> str; if (str.compare("PUSHFRONT") == 0) { cin >> x; dq.push_front(x); } else if (str.compare("P...
ALGO
0.999637
5.143026
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-05-27T13:47:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97a1f2899...
12dc2f07-f3bc-446e-8f5d-223a9df80b13
Papa-het/algostruct
codeforces/1475 - problemB.cpp
// B. Новогоднее число // ограничение по времени на тест2 секунды // ограничение по памяти на тест256 мегабайт // вводстандартный ввод // выводстандартный вывод // Поликарпу запомнился 2020-й год, и он рад приходу нового 2021-го года. Чтобы запомнить такой замечательный момент, Поликарп хочет представить число 𝑛 в вид...
ALGO
0.999846
5.096173
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2020-10-31T08:15: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": "014102db9...
4c375572-389f-49b3-9597-44a78fa9ff02
lkwagner/stochastic_fitting
macopt.cpp
/* macopt library release 1.1 gradient-based optimizer Copyright (c) 2002 <NAME> and <NAME> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either ...
ALGO
0.999886
6.000978
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2015-07-13T18:27:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3a1e6374...
94df06b3-c164-4b88-b795-b07324cf5d10
AlasdairWJ/AdventOfCode
2020/24/aoc2020_24b.cpp
#include <iostream> #include <string> #include <map> #include <algorithm> // std::count_if // nw ne // |/ // w--O--e // /| // sw se int main(int argc, const char* argv[]) { std::map<std::pair<int, int>, bool> floor_tiles; std::string line; while (std::getline(std::cin, line)) { int x = 0, y = 0; aut...
ALGO
0.999891
5.210647
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2020-12-09T16:09:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22500f4109...
695eb491-a5b8-4c0c-b118-6beb00bc4f9b
Murad501/Phitron
Semester 3/Weeks/Level-2/Week-15/Day-1/F_3_SUM.cpp
#include <bits/stdc++.h> using namespace std; #define nl '\n' #define all(x) x.begin(), x.end() #define ll long long int #define yes cout << "YES" << '\n' #define no cout << "NO" << '\n' #define cyes cout << "Yes" << '\n' #define cno cout << "No" << '\n' #define minus cout << -1 << '\n' #define zero cout << 0 << '\n' ...
ALGO
0.998644
5.037709
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2024-05-19T14:18: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": "b100b1e176a...
b7072ce7-4622-4f5a-97df-fe722bb53b58
khbence/pansim
matlab/Toolboxes/CasADi-Matlab/include/casadi/core/runtime/casadi_interpn_interpolate.hpp
// // MIT No Attribution // // Copyright (C) 2010-2023 <NAME>, <NAME>, <NAME>, <NAME>. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this // software and associated documentation files (the "Software"), to deal in the Software // without restriction, including with...
ALGO
0.999132
5.914138
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2021-04-10T14:54:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9964cca59...
86e1ef9b-8018-4c35-ad04-5a568c7dcb98
1aman1/code-road
algorithms/trees/implementations/Binary-Search-Tree/traversals-and-views/6-top-view.cpp
#include <iostream> #include <map> #include <queue> /* includes an alteration to the tree node type horizontal distance variable is included for top view */ struct node { int data; node *left, *right; int h_dist = 0; node() = delete; node(int v) : data(v), left(nullptr), ...
ALGO
0.999985
6.061638
{ "github_metadata": { "branch": "masterCodeBase", "commit_count": 29, "repo_created_at": "2023-06-17T09:27: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": "d...
db77ec9a-bcdd-4aac-b273-10aab15a14dd
koosaga/olympiad
JOI/camp12_rotate.cpp
#include <bits/stdc++.h> #define sz(v) ((int)(v).size()) #define all(v) (v).begin(), (v).end() using namespace std; using lint = long long; using pi = pair<int, int>; const int mod = 1e9 + 7; const int MAXN = 1100000; int nxt[MAXN][4]; char s[1111][1111]; pi Move(pi x){ int nd = nxt[x.first][x.second]; int pos = fi...
ALGO
0.999988
3.777002
{ "github_metadata": { "branch": "master", "commit_count": 361, "repo_created_at": "2015-11-06T16:01:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 285, "forks": 31, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8daba...
2da362df-551e-4feb-b965-e2f997c85298
cbxbiker61/audiofilter
lib/fir/eq_fir.cpp
#include <math.h> #include "eq_fir.h" #include "../dsp/kaiser.h" inline double sinc(double x) { return x == 0 ? 1 : sin(x)/x; } inline double lpf(int i, double f) { return 2 * f * sinc(i * 2 * M_PI * f); } static const double min_ripple = 0.001; static const double max_ripple = 3.0; static const double def_ripple = 0...
ALGO
0.991753
5.135483
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2011-03-20T13:58:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf482970f...
6d0ce262-d9e1-49c3-8f39-fbbf4c3407bd
ibudiselic/contest-problem-solutions
tc tournaments/MultiprocessorProgramming.cpp
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> using namespace std; double calc(int n, int t0, int tp, int ts) { if (n == 1) return t0+tp; else return max(double(t0), double(tp)/(n-1) + double(ts)*(n-1)); } ...
ALGO
0.999856
4.359163
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2011-08-14T11:43:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29ae982ff...
70b06572-dc5c-4d2a-b275-da226eccf8a0
Vanilla-chan-nya/Contest_Code
Atcoder/abc379/D.cpp
/************************************************************** * Problem: * Author: Vanilla_chan * Date: * E-Mail: <EMAIL> **************************************************************/ #include<iostream> #include<algorithm> #include<cstdio> #include<string> #include<cstring> #include<cmath> #include<map> #inc...
ALGO
0.999591
3.405253
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2024-02-10T10:23: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": "4042fbefa7...
04096dc0-8253-4506-a114-c6e5bbf241ba
userr2232/PC
LeetCode/210.cc
#define UNEXPLORED -1 #define EXPLORED 1 #define VISITED 2 class Solution { typedef vector<vector<int>> AdjList; AdjList graph; vector<int> state; stack<int> st; bool cycle{false}; void dfs(int u) { if(cycle) return; state[u] = EXPLORED; for(const auto& v : graph[u]...
ALGO
0.999994
6.170166
{ "github_metadata": { "branch": "master", "commit_count": 522, "repo_created_at": "2018-04-19T08:40:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47a91ab4...
4d1daf4f-a8eb-463e-b927-fd3fea41cd15
mamun-akand/Problem-Solving-List-TOPIC-WISE
Graph/Phitron/01 Connected Components Count, Print and Connection among them.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; #define vll vector<ll> ll cnt=0; void bfs(ll source, ll *visited, vll *adjList){ queue<ll> q; q.push(source); visited[source]=1; cout << "Component "<< ++cnt <<": "; while(!q.empty()){ ll last = q.front(); q.pop(); c...
ALGO
0.999974
4.561966
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2022-03-26T19:55: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": "5656b81bd1d...
7243a89c-15a0-4c01-b307-db24eaf753bc
anuagarwal3112/Just-Leet-It
Find All Four Sum Numbers - GFG/find-all-four-sum-numbers.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution{ public: // arr[] : int input array of integers // k : the quadruple sum required vector<vector<int> > fourSum(vector<int> &nums, int k) { vector<vector<...
ALGO
0.999288
5.49909
{ "github_metadata": { "branch": "main", "commit_count": 680, "repo_created_at": "2022-08-30T07:18: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": "87c7ac7028...
192276d5-2813-43b9-a93c-b7999764facc
smallriver0316/algorithm-collections
tree/reconstruct_tree.cpp
#include <iostream> using namespace std; #define MAX 100 #define NIL -1 /* n: number of nodes P: preorder of tree node I: inorder of tree ndoe */ int n, P[MAX], I[MAX]; /* Print Postorder from Inorder array. This tree is binary tree. Inorder is left -> node -> right and node is obtained from ...
ALGO
0.999991
4.792699
{ "github_metadata": { "branch": "main", "commit_count": 145, "repo_created_at": "2021-07-19T12:21: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": "b8356b9939...
69724507-e2b0-4ce9-8259-e8cce9f9db67
SW-001-K/heapersjeepers
heap of my own.cpp
#include <stdio.h> #define MAX_SIZE 100 int heap[100]; int dataCount = 0; //amount of operations //get parent index, get left index, get right index //for swapping //Left child = 2*i + 1 //Right child = 2*i + 2 //Parent = (i - 1) / 2 void swap(int*a, int*c){ int temp = *a; //store temp value *a = *c; //switch t...
ALGO
0.999597
3.745237
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-30T19:08: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": "9674641dde5e...
58e8c0ba-96a3-426a-bceb-b9f6a0092fc6
JDLK7/PracticasADA
pract6/caminante.cc
//<NAME> //20097305C #include <iostream> #include <string.h> #include <fstream> #include <vector> using namespace std; bool t = false; bool p = false; bool ignoreRecursive = false; string fichero; bool comprobarArgumentos(int argc, char** argv) { if(argc == 1) { cout << "El programa debe ejecutarse con...
ALGO
0.996603
4.060732
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-02-16T16:09: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": "36cfac768...
9b81277c-1647-4f28-a83c-4e06df16f6a9
TheSkyFuker54188/ICS-7-SchedLab
cpp/src/policy.cc
#include "policy.h" #include <algorithm> #include <vector> #include <unordered_map> #include <functional> class TaskScheduler { private: // 使用动态数组存储任务,按截止时间排序 std::vector<std::pair<int, Event::Task>> ready_tasks; std::vector<std::pair<int, Event::Task>> io_pending_tasks; int current_timestamp = 0; // 辅助函数:任...
ALGO
0.987786
6.083728
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-04-05T08:55: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": "b9bc8c8829...
311e1729-4d54-4716-845d-addde19b1be6
Yevsquant/Basic_Algorithm
sorting/quickSort.cc
#include <iostream> using namespace std; const int N = 1000010; int q[N]; void quick_sort(int q[], int l, int r) { if (l >= r) return; int i = l - 1; int j = r + 1; int y = q[(l + r) >> 1]; while (i < j) { while (q[++ i] < y); while (q[-- j] > y); if (i < j) swap(q[i], q[j]); } quick_sort...
ALGO
0.999978
4.47844
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-12-17T21:47:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d55e6cfcff9...
34e04a4a-fbdf-426e-882f-61b90a861ef7
ishandutta2007/codeforces-k
kawatea/normal/501/C.cpp
#include <cstdio> #include <vector> #include <queue> using namespace std; int a[100000][2]; int main() { int n, i; vector <pair<int, int> > v; queue <int> q; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d %d", &a[i][0], &a[i][1]); for (i = 0; i < n; i++) { if (a[i][...
ALGO
0.999926
3.467759
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06: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": "b681d7e9a4b1...
6efc4b4c-a6de-4ca0-b5dc-e7e8bcad148f
hldai/emadr
mathutils.h
#ifndef MATHUTILS_H_ #define MATHUTILS_H_ #include <cmath> namespace MathUtils { static int Sum(int *arr, int len) { int s = 0; for (int i = 0; i < len; ++i) s += arr[i]; return s; } static float DotProduct(float *vec0, float *vec1, int len) { float dot_prod = 0; for (int i = 0; i < len; ++i) do...
TOOL
0.977745
5.553506
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2016-01-07T13:16: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": "ca139e835...
2c1c83a5-7b5a-4e5a-ac50-beaad18c3064
bandhansaha2/XPSC-Level-2
Week 13/Day 5/C_Customer_Service.cpp
#include <bits/stdc++.h> #define ll long long #define endl '\n' #define all(x) x.begin(),x.end() #define Yes cout << "YES" << '\n' #define No cout << "NO" << '\n' using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--) { int n; cin >> n;...
ALGO
0.999933
4.259228
{ "github_metadata": { "branch": "main", "commit_count": 100, "repo_created_at": "2025-01-05T17:07: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": "5e2676ee59...