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
76011128-7333-4d19-aecb-483e8123263e
perfect28/USACO
5.2/snail/main.cpp
/* ID:perfect13 LANG:C++ TASK:snail */ #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <fstream> #define INF 0x7FFFFFFF #define MAXN 150 using namespace std; int matrix[MAXN][MAXN]; bool flag[MAXN][MAXN]; int n,b; struct Node{ int x,y; int dir; int cn...
ALGO
0.999855
3.353227
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-05-02T14:01: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": "b026f77bf2...
ac7b89d5-59a6-4fa3-8a6a-31c55b79471d
ccluo33/LeetCode
src/binary_search/34.在排序数组中查找元素的第一个和最后一个位置.cpp
#include <iostream> #include <vector> using namespace std; /* * @lc app=leetcode.cn id=34 lang=cpp * * [34] 在排序数组中查找元素的第一个和最后一个位置 */ // @lc code=start class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { vector<int> res1(2, -1); vector<int> res2; int lowerbo...
ALGO
0.999959
6.248159
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-03-13T12:28:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af8cbead39...
0bb48a9b-3467-40f7-8078-81b6b99f509e
benHassan98/CP
Solved Problems/bigmaximum.cpp
#include <bits/stdc++.h> using namespace std; const long long OO = 1e18; int bstsuff(vector<int>v){ int ans = -1e8; int suff=0; for(int i=v.size()-1;i>=0;i--){ suff+=v[i]; ans = max(ans,suff); } return ans; } int bstpref(vector<int>v){ int ans = -1e8; int pref=0; for(int i=0;i<v.size();i++){ pref+=v[i]; ans = max(...
ALGO
0.99998
3.609885
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-04-23T20:44: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": "66f4acaa9...
23caf9d8-639d-4885-8c61-0022c2bac5a0
lowRISC/opentitan
hw/ip/kmac/dv/dpi/vendor/kerukuro_digestpp/algorithm/shake.hpp
/* This code is written by kerukuro and released into public domain. */ #ifndef DIGESTPP_ALGORITHM_SHAKE_HPP #define DIGESTPP_ALGORITHM_SHAKE_HPP #include "../hasher.hpp" #include "detail/shake_provider.hpp" #include "mixin/cshake_mixin.hpp" namespace digestpp { /** * @brief SHAKE128 function * * @xof * * @par...
TOOL
0.918605
7.580017
{ "github_metadata": { "branch": "master", "commit_count": 27583, "repo_created_at": "2019-08-26T16:30:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2891, "forks": 868, "issues": 1348, "pull_requests": 408 }, "file_meta": { "content_id"...
41a965a2-0777-402e-b223-75ca59a3c69a
khadija1114/Academic-Courses
Data Communication/Flecher checksum.cpp
//Calculation of Fletcher checksum #include<bits/stdc++.h> #define endl "\n" using namespace std; int mod = 256; int sender(string data) { int dataSize = data.size(); /* L adds data items together , R adds weight to the calculation */ int checksum = 0, L = 0, R = 0; int ind = 0; while (ind ...
ALGO
0.999647
3.804746
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2023-07-12T11:32: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": "ab249e3bce2...
63bc1166-3148-4fd3-8f84-7add0b7f0bbc
smoe1/ThesisCode
dogpack-mapped/lib/2d/cart/Limiters.cpp
#include "dog_math.h" #include "dogdefs.h" #include "DogParams.h" // -------------------------------------------------------------------------- // // // Limiter based on a modification of the following paper: // <NAME>. "Limiters for high-order discontinuous // Galerkin methods." J. Comp. Phys., Vol. 226, pg...
ALGO
0.999777
4.688174
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-06-04T20:02:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49bda11e75...
7becabbb-65c5-4161-b43b-96350873ba75
Leaves333/AdventOfCode
aoc_2016/2016-9.cpp
#include <bits\stdc++.h> using namespace std; const bool fileIO = true; void setIO() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); } long long decompress(string str) { long long total = 0; while (str.length() > 0) { if (str.find("(") != string::npos && str.find(")") !...
ALGO
0.999388
4.039575
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-06-22T01:02:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "119ed97dae4...
e7326137-1a03-4cb2-bbb4-127dede73922
aikaran/cpp-practice
algorithm/dijkstra.cpp
#include <iostream> #include <fstream> #include <vector> using namespace std; ostream& operator<<(ostream& os, const vector<size_t>& lengthInfo) { for(size_t i=1; i<lengthInfo.size(); ++i) { os << lengthInfo[i] << " "; } os << endl; return os; } class dijkstra { private: typedef vector< vector<size_t> > edgeI...
ALGO
0.999589
3.631567
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2018-11-08T07:08:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "caa30267d...
bdd46c99-bf1f-4163-8392-40bcd82e71bb
Neil-Moran/CPP-Practice
StringUtilities/stringUtilities.cpp
#pragma once #include "stringUtilities.h" bool areStringsAlphabetized(char *s1, char *s2) { for(int i=0; ; ++i) { if(!s1[i]) return true; if(!s2[i]) return false; if(s1[i] < s2[i]) return true; if(s1[i] > s2[i]) return false; } } bool areStringsIdentical(char *s1, ch...
ALGO
0.998609
4.8644
{ "github_metadata": { "branch": "main", "commit_count": 186, "repo_created_at": "2022-03-30T21:29:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f889f6a9c...
c2731907-85a9-4c47-ab93-bd4a17358fa5
Hello-zoka/Comparing_lists_of_segments
header.h
// // Created by <NAME> on 12.01.2021. // #include <vector> #include <iostream> struct point { int x, y; bool operator==(const point &rhs) const { return x == rhs.x && y == rhs.y; } void Print() { std::cout << x << " " << y << " "; } }; struct segment { point ...
ALGO
0.998243
4.955879
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2021-01-12T12:07:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "30da4d41d...
dccefae9-e0a7-4e1e-9794-5ab045c049f1
CGAL/cgal
Convex_hull_2/doc/Convex_hull_2/CGAL/ch_akl_toussaint.h
namespace CGAL { /*! \ingroup PkgConvexHull2Functions generates the counterclockwise sequence of extreme points of the points in the range [`first`,`beyond`). The resulting sequence is placed starting at position `result`, and the past-the-end iterator for the resulting sequence is returned. It is not specified at wh...
ALGO
0.999922
7.488626
{ "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...
b57837c0-bdb6-4839-92ea-956f5d73828e
shaddu007/CodeForces-1300
ShowerLine.cpp
#include<iostream> #include<vector> #include<algorithm> #include<map> #include<unordered_map> using namespace std; int main() { int n = 5; vector<vector<int>> line(n, vector<int>(n, 0)); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin >> line[i][j]; } } i...
ALGO
0.999999
4.75629
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-01-19T07:46: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": "e0aa29ec2e5...
cfb23f14-e6c5-4218-903a-c9afa4324d62
bubu3013/Leetcode-Practice
0590. N-ary Tree Postorder Traversal.cpp
/* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node*> _children) { val = _val; children = _children; } }; */ class Solution { public: vector<int> postorder(Node*...
ALGO
0.999936
6.327234
{ "github_metadata": { "branch": "main", "commit_count": 210, "repo_created_at": "2022-10-07T12:05: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": "c386b4ffcb...
806cc088-40bb-42f8-8170-27015770144b
yuhua2000/leetcode-Problem-record
2938.区分黑球与白球.cpp
#include <string> using namespace std; class Solution { public: long long minimumSteps(string s) { int zeroCount = 0; for (size_t i = 0; i < s.size(); i++) { if (s[i] == '0') zeroCount++; } long long moveZeros = 0; long long move...
ALGO
0.999962
5.289968
{ "github_metadata": { "branch": "master", "commit_count": 379, "repo_created_at": "2023-02-22T12:50: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": "f9870a28...
1d8b0643-2f42-4a3e-b472-73dfb2e5bdf1
turtleconservancy/stripespotter
src/utils/benchmarker.cpp
#include "pch.h" //#define GLOBALS // global variables for image filters are to be declared in this file // (and extern'd elsewhere) #include "StripeCode.h" #include "stdio.h" using namespace std; // global objects MTRNG RNG; vector<int> DB; // database of photoIDs int QUERY; // query image // IR algor...
DATA
0.960567
3.361454
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2015-05-30T03:09:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "f4d07ca5b...
fabe9960-79ab-4417-934b-65d91fe01b7b
shwetawadhwa26/C-
LINKEDLIST/deletionofnode.c++
#include <iostream> using namespace std; class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = NULL; } ~Node() { cout << "destructor is called = " << this->data << endl; } }; void printLL(Node *head) { Node *temp = head;...
ALGO
0.999501
4.753556
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-07-04T15:18:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5909de294d...
e8bc953a-e04d-43bc-8256-9ac770966c66
thegodone/molds-branch
src/optimization/BFGS.cpp
//************************************************************************// // Copyright (C) 2011-2014 <NAME> // // Copyright (C) 2012-2014 <NAME> // // // // This file is part of MolDS....
ALGO
0.999718
3.726931
{ "github_metadata": { "branch": "master", "commit_count": 1239, "repo_created_at": "2016-08-28T15:41:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79ee66a...
b2124a50-b3e1-4920-b15e-a1e8b4a6168a
junybike/leetcode-daily
2025_May/3335_R_Total_Characters_in_String_After_Transformations_I.cpp
// 2025 May 13 class Solution { public: int lengthAfterTransformations(string s, int t) { vector<int> freq(26); // keeps the frequencies of each characters in s for (char c : s) { freq[c - 'a']++; } for (int i = 0; i < t; i++) { vec...
ALGO
0.999985
5.878461
{ "github_metadata": { "branch": "main", "commit_count": 369, "repo_created_at": "2024-09-24T21:36: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": "f814f48553...
74cdf76f-22dc-47e6-832f-d1c4a0c3d119
olimpiada-informatica/Soluciones
2011/Clasificatorio 1/Harrichu y los oasis.cpp
#include <iostream> #include <string> #include <vector> #include <map> #include <set> #include <queue> #include <algorithm> using namespace std; typedef long long int ll; typedef pair <int, int> ii; typedef vector <int> vi; typedef vector <vi> vvi; typedef vector <vvi> vvvi; typedef vector <vvvi> vvvvi; vector <strin...
ALGO
0.999812
3.815593
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-09-26T17:12:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ca190a95852...
9746c7cf-7aec-4ae9-8da1-bc89c9281092
WhiZTiM/coliru
Archive2/48/0b735ca47ff6fb/main.cpp
#include <algorithm> using std::min; #include <iostream> using std::cout; using std::endl; #include <string> using std::string; int main() { std::cout << "smaller of 1 and 9999: " << std::min(1, 9999) << '\n' << "smaller of 'a', and 'b': " << std::min('a', 'b') << '\n' << "shortest o...
ALGO
0.997045
4.000932
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb23e8...
79b3d3e5-6241-41ee-84ce-e609a994b3a1
freyrdanielsson/tol2_kennsla
c++/lausnv2d1.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; double median(vector<double> v) { sort(v.begin(), v.end()); int n = v.size(); if (n % 2 == 0) { // cout << "even. " << n / 2 -1 << " " << n / 2 << endl; return (v[n / 2 - 1] + v[n / 2]) / 2; } else { ...
ALGO
0.999301
4.006348
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-02-27T16:00: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": "c348191b3a...
83f77866-1cc6-4849-92e7-db0196162f4f
tiozo/Training
vnoj/pizzaloc.cpp
#include<bits/stdc++.h> using namespace std; #define x first #define y second class res{ public: int gnum, a[101] = {0}; }; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int K,R,M,N; cin >> K >> R >> M; pair<int,int> a[21]; pair<pair<int,int>,int> b[101]; res f[21]; for (i...
ALGO
0.999923
3.915297
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-08-28T03:34:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7e483d5041...
79477c38-c90f-415b-a5d9-45387d9d8b45
NAgrawal1798/Competitive-coding
108-convert-sorted-array-to-binary-search-tree/convert-sorted-array-to-binary-search-tree.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.999992
6.668876
{ "github_metadata": { "branch": "main", "commit_count": 1376, "repo_created_at": "2023-09-02T11:08: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": "99e4244fb...
22121515-3058-4e16-9cd2-5f366cda44b5
MoKob/eopi
hash/algorithms.hpp
#ifndef EOPI_HASH_ALGORITHMS_HPP_ #define EOPI_HASH_ALGORITHMS_HPP_ #include <algorithm> #include <iostream> #include <limits> #include <string> #include <unordered_map> #include <vector> namespace eopi { namespace hash { namespace algorithms { // output the list of all anagrams of a string inline void list_anagrams...
ALGO
0.99899
5.840132
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2017-08-03T08:28: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": "63e4088e...
1bcd120a-a9ce-4d39-9e54-d60fef286e5c
Rishiii7/CP-repo
Competitive coding/Search/repeating_ele.cpp
#include <iostream> #include <vector> using namespace std; /* Problem : Find the reapeting element where, Array Size n >= 2 Only one element is reapeating all elements lies in 0 <= max(arr) <= n-2 Tortoise - Hair Algorithm also called as Floyd's algorithm Time Complexity :- O(n) Aux Space Complexity :- O(1) */ int...
ALGO
0.999946
5.411084
{ "github_metadata": { "branch": "main", "commit_count": 140, "repo_created_at": "2022-12-06T20:02:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f86dfc66c5...
5f161e42-d3b3-4950-9c35-c7222de4833f
contaconta/neurons
c++/tools/graph/cloudEliminateWidth.cpp
///////////////////////////////////////////////////////////////////////// // This program is free software; you can redistribute it and/or // // modify it under the terms of the GNU General Public License // // version 2 as published by the Free Software Foundation. // // ...
ALGO
0.974027
4.406104
{ "github_metadata": { "branch": "master", "commit_count": 1446, "repo_created_at": "2015-07-29T07:17:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7866654...
e8952cd9-169d-4a84-b2ed-543c78f91aac
const-ntino/leetcode
111.cpp
// 111. Minimum Depth of Binary Tree // Given a binary tree, find its minimum depth. // The minimum depth is the number of nodes along the shortest path from the // root node down to the nearest leaf node. #include <bits/stdc++.h> using namespace std; struct Node { int val; Node* left; Node* right; }; Node* C...
ALGO
0.999983
6.425413
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-03-10T13:50: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": "aa0c771aac0...
d2108565-5e09-4402-99ed-d252589b746b
trilinos/Trilinos
packages/galeri/src-epetra/CrsMatrices/Galeri_Lehmer.h
// @HEADER // ***************************************************************************** // Galeri: Finite Element and Matrix Generation Package // // Copyright 2006 ETHZ/NTESS and the Galeri contributors. // SPDX-License-Identifier: BSD-3-Clause // *********************************************************...
ALGO
0.974698
5.113114
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
7a51da1b-be5d-4033-ac68-51448f3073e7
haoleeson/MyWorkspace
MyLeetCode/No39.sudoku-solver.cpp
#include <iostream> #include <vector> using namespace std; /** * No37. 解数独 (dfs) * 编写一个程序,通过已填充的空格来解决数独问题。 一个数独的解法需遵循如下规则: 数字1-9在每一行只能出现一次。 数字1-9在每一列只能出现一次。 数字1-9在每一个以粗实线分隔的3x3宫内只能出现一次。 空白格用'.'表示。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/sudoku-solver 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 */ class Soluti...
ALGO
0.99983
6.21158
{ "github_metadata": { "branch": "main", "commit_count": 815, "repo_created_at": "2021-10-17T02:43: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": "ede0ed7057...
5eb68da8-3d46-453b-84b0-ad6fd878cb2a
AnhellO/ProgrammingChallenges
URI Online Judge/1419 - Bakugan.cpp
#include <cstdio> using namespace std; //Creamos un contador para Mark, otro para Leti y un contador que registre el caso de 3 valores iguales seguidos int R, i, contM, contL, contThree; bool flag; //bandera, se activa en caso de que alguno, o ambos jugadores //hagan el bonus de puntos por los 3 valores iguales al ...
ALGO
0.999978
3.25896
{ "github_metadata": { "branch": "master", "commit_count": 168, "repo_created_at": "2014-05-08T03:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ec4fb54...
2398f2ba-df31-4cb1-a974-047ba75daa66
FR13ND-ly/3d
src/core/feature/Renderer.cpp
#include "Renderer.hpp" #include <algorithm> #include "Scene.hpp" #include "../../utils/WindowManager.hpp" constexpr float NEAR_PLANE = 0.1f; constexpr float FAR_PLANE = 100.0f; Renderer::Renderer(sf::RenderWindow& window) : window(window), frustum() {} void Renderer::setupFrustum(const Matrix4& projectionMatrix...
TOOL
0.934445
6.3915
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-12-01T13:23:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2ece1e897d8...
dbbed6f7-58cc-4549-8237-9e1e4af6b34c
neetcode-gh/leetcode
cpp/0213-house-robber-ii.cpp
/* Given int array in a circle, return max amount can rob (can't rob adj houses) Ex. nums = [2,3,2] -> 3, can't rob house 1 & 3 b/c circular adj, so rob 2 Recursion w/ memo -> DP, rob either 2 away + here, or 1 away, try both ranges Recurrence relation: robFrom[i] = max(robFrom[i-2] + nums[i], robFrom[...
ALGO
0.999994
6.05697
{ "github_metadata": { "branch": "main", "commit_count": 9682, "repo_created_at": "2021-01-20T16:10:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6062, "forks": 2417, "issues": 330, "pull_requests": 215 }, "file_meta": { "content_id": ...
2913c3a0-0275-44fe-b9c5-419edccce131
taducduy123/CS3329
Sort/BubbleSort.h
#ifndef BUBBLESORT_H #define BuBBLESORT_H #include <iostream> using namespace std; //************************************************************************************************ // Bubble Sort (Version 1) * //*************************************************************...
ALGO
0.998135
4.895841
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-30T13: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": "4e07c7cc7373...
e531a4f8-199d-4ff1-8a35-b93057e51475
qiaozishun4/CSP2024_BJ
BJ-Junior/answers/BJ-J00012/sticks/sticks.cpp
#include <bits/stdc++.h> using namespace std; int c[] = {0, 6, 2, 5, 5, 4, 5, 6, 3, 7, 6}; int w[] = {0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; const int N = 1e5 + 5; int dp[10][N]; int stick(int n){ if(n == 1) return -1; for(int i = 2; i <= 10; i++){ for(int j = 1; j <= n; j++){ ...
ALGO
0.999343
3.494295
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-11-01T16:05: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": "5480efac31...
2ee4b2a4-93f9-4cc3-9864-f1133328754b
syohex/leetcode
challenge/202010/summary-ranges/main.cpp
#include <cassert> #include <string> #include <vector> #include <cstdio> std::vector<std::string> summaryRanges(const std::vector<int> &nums) { std::vector<std::string> ret; if (nums.empty()) { return ret; } if (nums.size() == 1) { ret.push_back(std::to_string(nums[0])); return...
ALGO
0.999956
6.433961
{ "github_metadata": { "branch": "master", "commit_count": 1794, "repo_created_at": "2020-06-01T00:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c539bb3...
38d1aed7-7d40-402d-936b-6b1bf7f0c3ee
kietle24/c-plus-_CODE
19_removenode.cpp
#include<bits/stdc++.h> using namespace std ; struct ListNode{ int val ; ListNode* next ; ListNode(int x ):val(x), next(NULL){} }; /* Tính chiều dài của danh sách (len) Tìm node cần xóa bằng công thức: node thứ (len - n + 1) từ đầu Xóa node đó bằng cách cập nhật con trỏ next của node trước nó. */ class Solution {...
ALGO
0.999995
4.501288
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2025-07-07T09:56: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": "7df28353f...
58e1f308-91af-40b5-baa5-09f4efae10ee
moogalin/Assignments
MyProject/main.cpp
/********************************************************************* ** Program Filename: Lab 1 ** Author: <NAME> ** Date: January 11, 2016 ** Description: This main method prompts user to choose square matrix of size 4 or 9 and then calls the function readMatrix to allow a user to input elements into either a 2x2 o...
ALGO
0.998739
4.963949
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2015-10-30T17:57: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": "834382315f...
16231cfd-ee1d-480a-9e91-190a9a6251de
edu1993/Algoritmo-y-estructuras-de-datos-UTN
tp 7 algoritmos/matrizes/tp 7 ej 23.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int m[20][20],v[20],col,ma; srand(time(NULL)); //rellena la matriz de valores entre 10 y 30 for (int i=0;i <=19;i++) { for (int j=0;j <=19; j++) { m[i][j]=rand()%(30-10+1)+10; } v[i]=0;//coloca cero en todas las posiciones d...
ALGO
0.999137
3.841798
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-03-23T19:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ff53eeec6...
8f38950a-6d20-4aaa-be3e-d628b913ff71
Jonathasgmc32/Sudoku-com-Dsatur
vertice.cpp
#include <iostream> #include <vector> #include <bits/stdc++.h> using namespace std; class vertice{ private: int id_vertice; int cor_preencher; vector<int> vertices_adjacentes; int grau_sat; public: int get_adjacente(int position){ return vertices_adjacentes[p...
ALGO
0.993818
3.44461
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-07-13T02:21: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": "e47c97f9a6c3...
fbaee7ed-4282-4d1b-9690-c5f2d1a2d06c
CGAL/cgal
Distance_2/include/CGAL/Distance_2/Point_2_Segment_2.h
// Copyright (c) 1998-2004 // 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-Licen...
ALGO
0.99878
6.792959
{ "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...
1b1bbc07-ecfc-440c-9ac7-595d5f4c7b31
yinwenzhi/UAV
src/PointMatch.cpp
// // Created by lizechuan on 20-7-13. // #include "PointMatch.h" #include <opencv2/opencv.hpp> #include <opencv2/core/core.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <opencv2/features2d.hpp> #include <opencv2/core/eigen.hpp> ...
ALGO
0.971376
4.514402
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-09-21T07:07: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": "154eafd022...
12c4ba3e-f1d4-4da7-9c94-38b815e1edfa
akash1309/operating-system-programs
process scheduling/round_robin.cpp
#include<bits/stdc++.h> using namespace std; bool isdone(bool done[],int n) { for(int i=0;i<n;i++) { if(done[i]==false) return false; } return true; } bool cmp(pair<int,pair<int,int> >p, pair<int,pair<int,int> >q) { if(p.first == q.first) { return p.second.second < q.second.second; ...
ALGO
0.999976
3.284977
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-05-17T08:04:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62c73b8df1...
29e461ab-22a1-4ef8-a13a-75159a2c4605
timi-liuliang/echo
thirdparty/mlpack/thirdparty/armadillo/include/armadillo_bits/fn_trimat.hpp
// Copyright 2008-2016 <NAME> (http://conradsanderson.id.au) // Copyright 2008-2016 National ICT Australia (NICTA) // // 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.or...
TOOL
0.953313
6.724356
{ "github_metadata": { "branch": "master", "commit_count": 3016, "repo_created_at": "2018-03-10T04:07:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 971, "forks": 116, "issues": 254, "pull_requests": 0 }, "file_meta": { "content_id": "b...
fa325218-a87a-42a3-9dae-0bcc29cafabe
estimated1337/lenovo_mapper
lenovo_mapper/md5.cpp
#include "md5.h" // https://github.com/pod32g/MD5/blob/master/md5.c // Constants are the integer part of the sines of integers (in radians) * 2^32. const UINT32 k[64] = { 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee , 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501 , 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be , ...
ALGO
0.949286
5.325632
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-12-28T00:24:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 110, "forks": 27, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ea8cd443...
cd0f4a0d-67ae-40e2-94f0-50f80d71b0c9
tonyli00000/Competition-Code
Other/Prime number exercise/Prime number exercise/Prime number exercise.cpp
#include <iostream> #include <string> #include <sstream> #include <iomanip> #include <math.h> #include <queue> #include <stack> #include <vector> #include <map> #include <set> #include <functional> using namespace std; class Solution2 { public: int minSwap(vector<int> A, vector<int> B) { int n = A.size(); vecto...
ALGO
0.999953
4.819825
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-07-09T22:14:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0608cda7b...
3013d92d-07c5-47d8-8941-a7548cfa6168
yashsarda/Scaler-Academy
Searching/Median_of_Array.cpp
// Help: <NAME> Youtube channel double Solution::findMedianSortedArrays(const vector<int> &A, const vector<int> &B) { int n = A.size(); int m = B.size(); // We always want the A array to be smaller if(n > m){ double ans = findMedianSortedArrays(B,A); return ans; } // Handlin...
ALGO
0.999981
5.452291
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2019-08-29T02:35:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 24, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c722bf...
74cda39f-2ed3-41cb-ba79-296934947a89
Sephtis6/CSC382Graph_Student
CSC382Graph_AdjacencyList.h
//this list is a weighted directed list. This is due to the fact that there is a value of some type for each node and //it is directed because the user can make the nodes go only in one direction //opening statement #pragma once //stating that the following class is templated, and creating the class for the adj list te...
ALGO
0.997232
5.004268
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-02-11T20:06: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": "a240a425ab...
33f3fcbb-1118-4807-a359-3ee1f8f5e396
Limworld98/Algorithms
Lab Work5-3/Lab Work5-3.cpp
#include <iostream> #include <algorithm> #include <vector> #include <time.h> using namespace std; typedef struct node* node_pointer; typedef struct node { int value; node_pointer next; }; node_pointer TABLE[10], x, temp, z; void radixSort(int* ary, int num, long long int* com, long long int* mov) { int...
ALGO
0.998978
3.910531
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-04-28T15:07:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea48004487...
92d70248-4328-40eb-ba6b-3bc9addbff38
Jack1eNgBaro/JustCp
CodeForces/C++20 (GCC 11-64)/1009F | Dominant Indices/231604231.cpp
#include<bits/stdc++.h> ////Ta thuat //#pragma GCC optimize("O2") //#pragma GCC target("avx,avx2,fma") #define MOD 1000000007 #define fi first #define se second #define ll long long #define ii pair<int,int> #define Dennis "Top1Server" #define Jack1e "DB bainao" #define heap_max(a) priority_queue<a> #define heap_min...
ALGO
0.999938
4.372176
{ "github_metadata": { "branch": "main", "commit_count": 896, "repo_created_at": "2024-06-16T11:06:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f9f11f1e6...
f3e02994-c29d-4f79-abfb-d186a9d563af
RJauslin/tinyFF
src/maxent.cpp
#include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] NumericMatrix qfromw(NumericVector& w, int& n){ int N = w.size(); NumericMatrix expa(N,n); double tmp = 0.0; for(int i = 0; i < N; i++){ tmp = 0.0; for(int j = i; j < N; j++){ tmp = tmp + w[j]; } expa(i,0) = tmp; } fo...
ALGO
0.999404
4.719009
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-07-15T06:32: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": "42a31de3da...
3b8fbbb3-e8b1-49fe-af53-ce159552ddab
Ablustrund/exercise-notes-for-luogu-oj
P3374.cpp
#include <bits/stdc++.h> using namespace std; int n, m, choo, tempX, tempY; int tree[500010]; //树状数组模板 int lowbit(int k) { return k & -k; } void add(int x, int k) { while (x <= n) { tree[x] += k; x += lowbit(x); } } int sum(int x) { int ans = 0; while (x != 0) { ans...
ALGO
0.99999
4.421461
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-10-24T09:46: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": "ec7e6b8fd...
7fa02536-c836-4dc3-94f4-b82d4fd4ab81
Shadek07/uva
Solved Category/Simulation/263.cpp
#include<iostream> #include<algorithm> #include<vector> using namespace std; vector <int> v1,v2; int main( void) { vector <int> ::iterator it; // char descend[100],ascend[100]; int num,a,b; int i,j; int des,ascen; int count = 0; while(1) { cin >> num; if( !num) break; cout << "Original numbe...
ALGO
0.999963
3.085343
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-05-20T05:28: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": "bdf1026b9...
0342e17b-066a-4338-bd11-32a801f37cc4
gisbi-kim/multi-robot-isam-example
main.cpp
/** * @brief A useful robot trajectory class to employ Anchor node * @author <NAME> (<EMAIL>) */ #include <cmath> #include <vector> #include <memory> #include <isam/isam.h> #include <isam/Anchor.h> #include <robot2d.h> // == #include "utils/robot2d.h" using std::cout; using std::endl; using std::string; #define...
ALGO
0.988565
4.612161
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-11-21T01:32:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca7c5bafc...
d814a9d3-2735-4211-aa86-3807aa18ba8c
antonia-04/UBB-Informatica-Computer-Science
Anul 1/Semestrul 2/Algoritmica Grafelor - Algoritmica grafurilor/Laborator/Grafuri - lab 4/Prim/main.cpp
#include <iostream> #include <fstream> using namespace std; ifstream f("prim.txt"); int s,x,y,po,i,j,n,m,u,v,k,inf=10000,nod, d_m; int p[101], Q[101], w[101][101], key[100]; bool este(int v, int d) { for(int i=0; i<d; i++) if(Q[i]==v) return true; return false; } int extract_minim(int ...
ALGO
0.999996
3.42847
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-10-05T18:45:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8cc94dbc07...
fb9ea029-4554-4311-af94-b7418ebb183c
rdmclin2/100Strike
14_hc_1143.cpp
//// //// Created by Calvin on 15/11/20. //// // //#include<iostream> //#include<cstdio> //#include<cmath> //#include<utility> //#include<algorithm> // //using namespace std; // //#define M 19999997 // //typedef struct matrix{ // long long mat[2][2]; //} MAT; // //MAT base,res; // //void init(){ // res.mat[0][0] ...
ALGO
0.999994
3.91799
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2015-10-20T15:45: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": "5c00a4224...
316dc49d-23d6-4fc1-b8aa-d6b3c1e11b65
Illumina/isaac2
src/c++/lib/workflow/alignWorkflow/SelectMatchesTransition.cpp
/** ** Isaac Genome Alignment Software ** Copyright (c) 2010-2014 Illumina, Inc. ** All rights reserved. ** ** This software is provided under the terms and conditions of the ** GNU GENERAL PUBLIC LICENSE Version 3 ** ** You should have received a copy of the GNU GENERAL PUBLIC LICENSE Version 3 ** along with ...
ALGO
0.986126
6.462295
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2015-04-09T14:40:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "822d049db...
004f0411-b9fa-4206-8463-327030a318e5
puneetkakkar/dsa-problems-tracker
Arrays/006 - Union Of Two Arrays/union-of-two-arrays.cpp
/** * @file union-of-two-arrays.cpp * @author <NAME> (<EMAIL>) * @brief Union of two arrays i.e a set containing distinct elements from both * the arrays. If there are repetitions, then only one occurrence of element * should be printed in the union. * @version 0.1 * @date 2022-07-08 * * @note Union of the tw...
ALGO
0.99999
5.216402
{ "github_metadata": { "branch": "main", "commit_count": 128, "repo_created_at": "2022-07-01T06:46:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "821f354d7e...
dc2ee12a-e9fe-4667-9e12-5a3e047c64e8
uvic-auvic/polaris_2018
ros/src/navigation/src/pid.cpp
#ifndef _PID_SOURCE_ #define _PID_SOURCE_ #include <iostream> #include <cmath> #include "pid.h" #include <ros/ros.h> using namespace std; class PIDImpl { public: PIDImpl( double dt, double max, double min, double Kp, double Kd, double Ki ); ~PIDImpl(); double calculate( double setpoint, d...
ALGO
0.988908
6.187791
{ "github_metadata": { "branch": "master", "commit_count": 155, "repo_created_at": "2017-10-13T20:45:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 16, "issues": 27, "pull_requests": 0 }, "file_meta": { "content_id": "0a6d19a...
a6f5259a-b6d4-484f-b968-41f8e68cd752
puneetgill05/parallel-mbe-mce
parallel/utils.h
// // Created by puneet on 03/05/25. // #ifndef UTILS_H #define UTILS_H #include <iostream> #include <concepts> #include <fstream> #include <map> #include <set> #include <sstream> #include <oneapi/tbb/concurrent_set.h> #include <tbb/concurrent_unordered_set.h> #include <tbb/concurrent_map.h> #include <tbb/parallel_fo...
TOOL
0.970273
5.272246
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-05-28T02:15: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": "988fe9b2d26d...
e0d22fbe-164f-480f-b0d8-108520f239ca
Forem011/Assignment-5
A5.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> using namespace std; void countWordFrequencies(const string& inputFile, vector<pair<string, int>>& wordCount)// this is where the word requencies are stored, creates pairs with string (the word) and int (the word count) { ifstream file("input.t...
TOOL
0.986714
4.899986
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-03-09T04:59: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": "f181d1bec8f1...
3803209f-b143-42bb-b785-bda4d3bbd6d5
ishandutta2007/codeforces-h
huah/normal/1528/D.cpp
#include<bits/stdc++.h> #define fi first #define se second #define inf 0x3f3f3f3f3f3f3f3fll typedef unsigned long long ull; typedef long long ll; #define rep(i,l,r) for(int i=l;i<=r;i++) #define nep(i,r,l) for(int i=r;i>=l;i--) void sc(int &x){scanf("%d",&x);} void sc(int &x,int &y){scanf("%d%d",&x,&y);} void sc(int &x...
ALGO
0.999985
3.208492
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "9abd340d79ae...
28d11748-7570-4f6d-a089-744897fa7d6c
pranshu27/Leet-solutions
1383-maximum-performance-of-a-team/1383-maximum-performance-of-a-team.cpp
class Solution { public: static bool cmp(pair<int, int > a, pair<int, int > b){ return a.first > b.first; } int maxPerformance(int n, vector<int>& s, vector<int>& e, int k) { vector<pair<int, int>> eng(n); for(int i=0; i<n; i++) { eng.push_back({e[i], s[i...
ALGO
0.999915
5.336148
{ "github_metadata": { "branch": "main", "commit_count": 1446, "repo_created_at": "2022-06-29T06:38: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": "9045c871f...
3800e195-15e0-4710-891e-bb103d45a58c
rahuldegra09/C-_programs
class/rational.cpp
#include<iostream> using namespace std; class rational { public:int numerator,denomerator; public: rational(); rational(int n, int d); rational(rational &r); void read(); void show(); rational operator+(rational &r); rational operator-(rational &r); ...
ALGO
0.997487
3.761955
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-04-15T12:48:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "830fbb26cc...
e33d008f-1846-4ab7-b2f3-dbc8d125f698
Shovit801/English_Spell_Checker
reading dictionary/final.cpp
#include <fstream> #include"bits/stdc++.h" #include <iostream> #include <vector> #include <string> #include <sstream> #include"unordered_map" using namespace std; void lower(string& str) //function def to conver the entire query entered into lower case { int length = str.le...
ALGO
0.994502
3.83831
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2020-11-07T18:51: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": "0912b1310e8...
40e7b3db-6e54-4860-83a3-00d51c7bbbc0
AdhamMadkour/CP_LIBRARY
Graph/LCA & Binary Lifting/Kth Ancestor.cpp
// problem link : https://leetcode.com/problems/kth-ancestor-of-a-tree-node/ class TreeAncestor { public: vector<vector<int>> up; TreeAncestor(int n, vector<int> &parent) { up = vector<vector<int>>(n + 1, vector<int>(21, -1)); for (int i = 0; i < n; ++i) up[i][0] = parent[i]; ...
ALGO
0.999995
5.828955
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-10-05T14:54: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": "59607006610f...
465bc7d1-8c56-4c04-b07e-cdde1516ee20
guilhermesilveira/uva-problems
v4/486/c.cpp
#include <iostream> #include <string> #include <stdio.h> #include <stdlib.h> #define vale(a) (iguais(s[i],a)) #define iguais(a,b) (strcmp((a),(b))==0) #include <string.h> using namespace std; class StrArray { public: char **s; int tot; StrArray(int i){ s = (char **) malloc(sizeof(char *)*i); ...
ALGO
0.998456
3.37559
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2010-12-15T00:27:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9eaa4189ef...
87f284f8-cdd1-4e98-948b-def810b89328
diyaarul2981/HBTask0Final
Task1_ShreyaAdhya.cpp
#include <iostream> #include <cmath> #include<bits/stdc++.h> using namespace std; class hackbio // declaring class hackbio { public: // declaring the public functions, needed to access the private members void display(void); // to display the information }; //function to display the items void hackbio :: displa...
ALGO
0.99226
4.796515
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-08-07T07:28:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "158a0d651513...
ef6968c5-ebbc-4a3f-bf37-7bd65674b009
dangorogoro/MazeParsue
tools/genMaze/cppCode/japan2017eq.cpp
#include <MazeData.h> uint8_t japan2017eq[] = { 0x7, 0xe, 0x2, 0x2, 0xa, 0xa, 0x2, 0x2, 0x2, 0xa, 0xa, 0x2, 0xb, 0xe, 0x2, 0x3, 0x5, 0x6, 0x9, 0xc, 0x3, 0x6, 0x9, 0x5, 0xc, 0x3, 0x6, 0x8, 0xa, 0x2, 0x9, 0x5, 0x4, 0x0, 0xa, 0xa, 0x1, 0xc, 0x3, 0x5, 0x6, 0x9, 0xc, 0x3, 0xe, 0x0, 0x3, 0x5, 0x5, 0xc, 0x3, 0x6, 0x1, 0x6,...
ALGO
0.965266
3.236884
{ "github_metadata": { "branch": "type-fix", "commit_count": 93, "repo_created_at": "2019-08-15T15:49: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": "fb0ad2f...
2f9cf2c7-ecc0-41bd-842c-d2cfe9f45093
yuyahy/Study_Algorithm
linear_search.cpp
#include <bits/stdc++.h> // 番兵を追加してwhile文で回す方が // 二重for文で回すより若干速い bool LinearSearch(int num, int A[], int n) { // 終了判定用の値を配列にセットする // →番兵 // while文で必ずループ終了する事が保証されているので // 比較演算がfor文より一個少なくて済む A[n] = n; int i=0; while (A[i] != num) { // 末端まで見つからなかった if (i == n) return false; ...
ALGO
0.999704
3.597973
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2020-05-15T13:25:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c669d01da...
9e8dd5a9-4b5d-4d47-a180-b85a64983b2d
geekblower/LoveBabbar-DSA
Lecture-069/1_Binary_Search_Tree_Implementation.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node* left; Node* right; Node(int data) { this->data = data; this->left = NULL; this->right = NULL; } }; Node* insertIntoBST(Node* root, int data) { if(roo...
ALGO
0.999963
5.097608
{ "github_metadata": { "branch": "main", "commit_count": 195, "repo_created_at": "2022-12-24T15:27:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 154, "forks": 54, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "b3bcdde...
9ad34d15-a068-47b7-bf1a-28f833bc988c
angelicasanchezbarreto/P1-CG
Object.cpp
// // Created by hgallegos on 30/03/2023. // #include "Object.h" bool Sphere::intersect(Ray ray, float &t, vec3 &normal) { auto _a = ray.dir.punto(ray.dir); auto _b = 2*ray.dir.punto(ray.ori-center); auto _c = (ray.ori-center).punto(ray.ori-center)-radio*radio; auto D = _b*_b-4*_a*_c; if(D <= 0) {r...
ALGO
0.973561
3.643164
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-03T09:52: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": "7cded081ec45...
47cac8ae-1de6-4cde-8cc4-4281b0e32b28
lepecoder/algorithms
leetcode_cn/648.单词替换.cpp
/* * @lc app=leetcode.cn id=648 lang=cpp * * [648] 单词替换 */ #include <bits/stdc++.h> using namespace std; // @lc code=start class Trie { public: bool end; // vector<Trie *> child; Trie *child[26]; Trie() : end(false) { memset(child, 0, sizeof(child)); } ~Trie() { for (auto &x : child) ...
ALGO
0.999852
5.735543
{ "github_metadata": { "branch": "master", "commit_count": 232, "repo_created_at": "2020-11-21T07:41: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": "39c956b0...
1f15933d-29f2-45cc-81e9-d9e600ee554c
mstrechen/competitive-programming
camps/summer_school_Kremenchuk_2016/day8/C.cpp
#include<iostream> #include<map> #include<algorithm> #include<vector> using namespace std; long long prefixSumm[100500]; long long a[100500]; long long min(long long a, long long b) { return a>b?b:a; } long long max(long long a, long long b) { return a>b?a:b; } struct _segmentTree { long long summs[1048577];...
ALGO
0.999931
3.643691
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-09-13T20:27:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b76ad15ab...
2c911bf9-49b9-4804-a728-a964d0098747
cair/per-jsp
per_jsp/cpp/include/utilities/multidimensional_array.hpp
#pragma once #include <array> #include <vector> #include <iostream> #include <stdexcept> #include <algorithm> #include <numeric> #include <iterator> #include <type_traits> #include <functional> template<typename T, std::size_t NDim> class MultiDimensionalArray { private: alignas(64) std::vector<T> data; // Aligne...
TOOL
0.932706
7.146068
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-07-18T17:57:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 2, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "ae68ab7fa5d2...
9dc129e6-62c5-4b38-a433-6b149950e122
KeplerInCoding/surplus-code-supreme-batch-dsa
DSA problems/String/stringPermute_recursion.cpp
// //permutation string // #include <iostream> // #include <string> // using namespace std; // //abc -> 3*2*1 = 6 // void permute(string s, string ans){ // //base case // if(s.size()==0) { // cout<<ans<<endl; // return; // } // //solve one case // for(int i=0; i<s.size(); i++){ // str...
ALGO
0.999918
5.599627
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2023-03-06T10:03: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": "a1979a0e8b...
ce1101df-1a18-44d4-861d-23ae042365b9
mr-vlakon/programming
LeetCode/BinaryTreeMaximumPathSum.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.999992
5.853733
{ "github_metadata": { "branch": "main", "commit_count": 1563, "repo_created_at": "2022-08-25T08:43:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a199073f...
44651af5-fe94-49b6-ad10-791570888334
prakhar12330/Geeks-For-Geeks
Searching in an array where adjacent differ by at most k/Searching in an array where adjacent differ by at most k.cpp
int search(int arr[], int n, int x, int k) { // Complete the function int idx=0; while(idx<n) { if(arr[idx]==x)return idx; int steps=abs((arr[idx]-x)/k); /* this will give the no. of steps we should jump in order to reach the place where our target can be (target will be presen...
ALGO
0.999974
4.095678
{ "github_metadata": { "branch": "main", "commit_count": 134, "repo_created_at": "2021-12-24T17:35: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": "78ed9143a0...
3101c194-3ee2-4fcc-87bc-9e0693888612
legubiao/quadruped_ros2_control
controllers/unitree_guide_controller/include/unitree_guide_controller/control/BalanceCtrl.h
// // Created by tlab-uav on 24-9-16. // #ifndef BALANCECTRL_H #define BALANCECTRL_H #include <memory> #include "unitree_guide_controller/common/mathTypes.h" class QuadrupedRobot; class BalanceCtrl { public: explicit BalanceCtrl(const std::shared_ptr<QuadrupedRobot>& robot); ~BalanceCtrl() = default; ...
ALGO
0.981886
5.732803
{ "github_metadata": { "branch": "main", "commit_count": 121, "repo_created_at": "2024-09-09T14:18:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 326, "forks": 35, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "e15c23a...
be6753f1-d7b3-4717-b67d-249e9f3e721a
Mohammed-Gamal/Algorithms-using-C-
LomutoPartitioning.cpp
#include <iostream> using namespace std; void print(int list[], int size) { cout << "List items: "; for (int i = 0; i < size; i++) cout << list[i] << " "; cout << endl; } void swap(int& x, int& y) { int temp = x; x = y; y = temp; } int LomutoPartition(int A[], int l, int r) { int pivot = A[l]; i...
ALGO
0.999977
5.527174
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-12-27T14:46: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": "b5719e0a2c41...
e6921b48-cf56-4573-af36-f3fb76aed8ae
edhubbard1994/hpc_mirror
memory/loop_pipeline.cpp
#include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <cassert> #include <algorithm> // std::min #include <string> #include <vector> #include <limits> #include "timer.h" #include "aligned_allocator.h" #include "dummy.h" #ifdef WITH_PAPI # include "papi_helper.h" std::vector<int> papi_even...
TEST
0.905344
5.300383
{ "github_metadata": { "branch": "parallel", "commit_count": 57, "repo_created_at": "2021-10-16T20:03: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": "ce10b4b...
3b1302d8-b3bb-4ad6-ac19-6fa7ad97b5fe
AK-Smart-Machines-HS-KL/R2K-SPL
Src/Modules/BehaviorControl/BehaviorControl/Cards/R2K/GoalieDefaultCard.cpp
/** * @file GoalieDefaultCard.cpp * @author <NAME> * @brief This card's Positions the Goalie and makes it search for the ball if it can't see it. * @version 1.0 * @date 2023-01-31 * * This Card Dows two things: * 1. It searches for the ball if it can not be found * 2. It places the goalie in a position...
TOOL
0.919204
5.92338
{ "github_metadata": { "branch": "main", "commit_count": 574, "repo_created_at": "2023-06-12T09:18:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 1, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "f94a93d752...
39e05ee4-8b41-40bc-95bd-1721d88f45f1
cakuang1/codeforces
atcoder/hard/91-100/98.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long long llong; typedef long double ld; typedef unsigned long long ull; using namespace std; /* ll pw(ll a, ll b) { ll ans = 1; while (b) { while (!(b & 1)) b >>= 1, a = (a * a) % MOD; ans = (ans * a) % MOD, --b; } return ans; } */ int h, w; string s[1...
ALGO
0.999993
3.759629
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-10-09T21:31: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": "f4f8af31222...
c5078d0a-bccb-4094-b1e0-d61a3e0c0a80
DrEntropy/ParametricEQ
Source/ChainHelpers.h
/* ============================================================================== ChainHelpers.h Created: 26 May 2022 3:10:44pm Author: <NAME> ============================================================================== */ #pragma once #include <JuceHeader.h> #include "FilterInfo.h" #include "Fil...
TOOL
0.906042
6.689847
{ "github_metadata": { "branch": "master", "commit_count": 399, "repo_created_at": "2022-06-15T13:55:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08dee935...
55c794e6-4046-4c3c-a85a-b5b7874d51a5
tecs2000/IF672
Bellman-Ford.cpp
#include <bits/stdc++.h> #define INF 999999999 #define x first #define y second using namespace std; int main(){ int qtd_fases; cin >> qtd_fases; for(int u = 0; u < qtd_fases; u++){ int qtd_pontos; cin >> qtd_pontos; int distancia[qtd_pontos][qtd_pontos], precursores[qtd_pontos]; ...
ALGO
0.99991
3.781407
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-10-31T12:25: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": "649b12a3a...
2a4bb210-6874-4039-a19f-048149671fb9
superkissman/risk_aware_mpc
src/test_casadi/src/test_casadi_node.cpp
#include <ros/ros.h> #include <iostream> #include <vector> #include <casadi/casadi.hpp> #include <Eigen/Eigen> #include <geometry_msgs/Point.h> #include <geometry_msgs/Twist.h> #include <geometry_msgs/PoseStamped.h> #include <visualization_msgs/MarkerArray.h> #include <nav_msgs/Odometry.h> #include <tf2/utils.h> using...
ALGO
0.998983
4.488046
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-08-22T15:23: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": "f61ad108dc38...
ac573746-9e70-47b6-b74d-54abfeedd09f
qiong-zhen/numerical-analysis
proj/src/Bsplines.h
#ifndef BSPLINES_H #define BSPLINES_H #include <iostream> #include <vector> #include <stdexcept> #include <Eigen/Dense> class CubicBsplines { private: std::vector<double> nodes; std::vector<double> coefficients; // 用于定理3.57的系数计算 void computeCoeffs357(const std::vector<double>& x, ...
ALGO
0.999464
6.312303
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-10-04T13:41: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": "701c4e381fe...
5160ce77-a0d6-4b5a-9174-865ab8e1ddaf
leedohun/Softeer
GINI야 도와줘.cpp
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (n); i++) typedef long long ll; using namespace std; const ll _INF = 1e18; const ll INF = 1e9; struct P { int x; int y; int cnt; }; int R, W, r, w; string m[51]; int dx[4] = { 0,0,-1,1 }; int dy[4] = { -1,1,0,0 }; ...
ALGO
0.999747
3.847776
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-08-23T17:07: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": "e00d62b822a...
d54afaed-b7dc-41f2-9d18-8dcbb59d75f9
vishu-garg/competetive-programming
practice/coursera/graphs/find_the_optimal_way_to_exchange_currencies(finding_a_neg_weight_cycle).cpp
#include<bits/stdc++.h> #include<algorithm> using namespace std; #define ll long long #define ld long double #define rep(i,a,b) for(ll i=a;i<b;i++) #define repb(i,a,b) for(ll i=a;i>=b;i--) #define err() cout<<"=================================="<<endl; #define errA(A) for(auto i:A) cout<<i<<" ";cout<<endl; #def...
ALGO
0.999891
3.603906
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-05-31T12:42: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": "e6048dbe09...
6d00e716-d99d-4702-9060-84256c18a467
alpha74/iLC
C/Combination_Sum.cpp
// Given array, return all combinations having sum as Target. Repetions allowed // https://leetcode.com/problems/combination-sum/ // <NAME> void combSum(vector<vector<int>> &ret, vector<int> &curr, int &sum, int i, int &t, vector<int> &cd) { if( sum == t ) { ret.push_back( curr ); return ; ...
ALGO
0.999859
6.289635
{ "github_metadata": { "branch": "main", "commit_count": 860, "repo_created_at": "2021-10-24T17:42:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5febdf5035...
0711e1c6-3449-45dc-a5a5-cbbf22586ac4
wangzhen0518/Exercise
luogu/Part1/Part1.4_Function/P1464_2.cpp
#include <algorithm> #include <iostream> #include <vector> #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) using namespace std; long long w(long long a, long long b, long long c) { if (a <= 0 || b <= 0 || c <= 0) return 1; if (a > 20 || b > 20 || c > 20) return w(20, 2...
ALGO
0.999633
4.048036
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2021-08-30T02:43: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": "5799443c1cf...
311ffe88-fadf-41b7-b7ed-acd93b1549bc
DonghoOh-pipity03/Coding-Test
week3 - 완전탐색과 백트래킹/I17071_fail.cpp
// 17071 - #include<bits/stdc++.h> using namespace std; const int MAX = 1000000; int n, k; int v[MAX + 4], c[MAX + 4]; queue<pair<int, int>> q; map<int, int> m; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n >> k; if (n == k) { cout << "0"; return 0; } int cnt = 1...
ALGO
0.999989
3.439358
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-05-30T13:13: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": "6a8a62e525fa...
a29a8d7f-8fb5-4ab8-b0e7-29cf182d8e74
benolson/projectOR
Code/qt/ProjectOR/geometric_correction.cpp
#include <stdio.h> #include "cv.h" #include "highgui.h" #include "cxcore.hpp" #include "highgui.hpp" // CvPoint sub(CvPoint a, CvPoint b) { // return cvPoint(a.x-b.x,a.y-b.y); // } // double cp2d(CvPoint a, CvPoint b) { // return double(a.x*b.y - b.x*a.y); // ...
ALGO
0.998046
4.82356
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2011-04-16T00:29:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b027f91b...
784570d9-44a7-43ee-81f0-844c7363c26c
sergii-yatsuk/leetcode
cpp/number-of-islands.cpp
class Solution { public: int numIslands(vector<vector<char>>& grid) { if (grid.empty()) return 0; vector<vector<bool>> visited(grid.size(), vector<bool>(grid[0].size())); for (size_t i = 0; i < grid.size(); ++i) { for (size_t j = 0; j < grid[i].size(); ++j) { visited[i][j] = f...
ALGO
0.999947
6.665199
{ "github_metadata": { "branch": "master", "commit_count": 155, "repo_created_at": "2016-10-08T12:54: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": "4ba56431...
467f1b9d-6a21-4e1d-ba15-412f5f28ead5
SURAJKORADE01/Data_Structure_and_Algorithm
Linked_List/LinkedList3.cpp
// Reverse the DLL #include<iostream> #include<stack> using namespace std; typedef class Node { public: Node *prev; int data; Node *next; Node() { this->prev = NULL; this->data = 0; this->next = NULL; } Node(int iNo) ...
ALGO
0.999944
4.953911
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-09-02T09:36: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": "e5f8af1a29f...
1168667f-eb9c-40e8-8098-fc86fba4736a
mariolopg/ALG-UGR
Práctica 2/depuracionBasica.cpp
#include <iostream> #include <vector> #include <ctime> #include <cstdlib> #include <climits> #include <cassert> #include <ctime> #include <cmath> #include <fstream> using namespace std; vector<int> depurar_registros(vector<int> v){ vector <int> salida; bool repetido = false; int elemento; /* Se compar...
ALGO
0.921435
3.573186
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-10-12T18:26:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "adec069e84...
5ef87f68-5ce3-473e-a08d-12a25080579d
ishandutta2007/codeforces-c
chemthan/normal/717/F.cpp
#include <bits/stdc++.h> using namespace std; #define ms(s, n) memset(s, n, sizeof(s)) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define FORd(i, a, b) for (int i = (a) - 1; i >= (b); i--) #define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++) #define sz(a) int((a).size()) ...
ALGO
0.999926
4.80066
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bc03ff527a6...
ed5874d4-c8c5-4ac1-914b-7ec8c15868b1
rishi058/CP-DSA
DP/34_Min_Operations_to_Sort_arr.cpp
#include <bits/stdc++.h> using namespace std; // function to find minimum number of increment or decrement (by 1) operations to make the array in increasing order. // https://iq.opengenus.org/minimum-increment-decrement-operation-increasing-order/ int Get_Minimum_Opr(vector<int> &a, int n) { // Finding the ...
ALGO
0.999904
5.282263
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2023-04-18T16:12: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": "ac9a303e073...
b818b690-3650-4223-a59b-fbfd207ffe12
void-virtual/ApostolicoGiancarlo
main.cpp
#include <iostream> #include <vector> #include <sstream> #include <cmath> #include <type_traits> #include <unordered_map> #include <algorithm> #include <iterator> #include "apostolico_giancarlo.h" #include "parsing.h" template <class T> std::ostream& operator << (std::ostream& os, std::vector<T> container) { bool ...
ALGO
0.999498
4.012369
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-09-27T12: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": "3ce7d25f55...
abc5543b-0d00-4a38-be41-d01b90a926d9
Sweezar/3DCurves
src/3DCurves_app/main.cpp
#include <algorithm> #include <iostream> #include <memory> #include <numeric> #include <vector> #include "circle.h" #include "curve.h" #include "ellipse.h" #include "helix.h" #include "omp.h" int main() { srand(time(NULL)); std::vector<std::shared_ptr<Curve>> curves; int curvesCount = rand() % 10 + 10; doubl...
ALGO
0.999747
5.707459
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-01-02T08:21: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": "f0752de41e19...
d782c8ef-55b3-4a73-8741-d48a1123dd89
git-uni-work/Operating-Systems
Cargo Optimization/solution.cpp
#ifndef __PROGTEST__ #include <cstdio> #include <cstdlib> #include <cstring> #include <cstdint> #include <climits> #include <cfloat> #include <cassert> #include <cmath> #include <iostream> #include <iomanip> #include <algorithm> #include <numeric> #include <string> #include <vector> #include <array> #include <iterator>...
ALGO
0.996097
4.545321
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-11-14T03:52:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b830b93e4ac8...