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
d381e33a-270b-4371-ae04-e1b3023f1869
imafish/leetcodetests
c++/solution2013.cpp
#include <vector> #include <unordered_map> #include <unordered_set> #include <functional> #include <iostream> using namespace std; class DetectSquares { public: DetectSquares() { } void add(vector<int> point) { int x = point[0]; int y = point[1]; auto i = _data.find(point...
ALGO
0.999094
6.074246
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2022-01-23T08:14: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": "2e3c12886dc...
746078d7-5198-40da-b88d-e99d092eb533
gaoxifeng/robust_hex_dominant_meshing
src/positions.cpp
#include "hierarchy.h" #include "positions.h" #include "timer.h" void MultiResolutionHierarchy::smoothPositionsTri(uint32_t l, bool alignment, bool randomization, bool extrinsic) { const SMatrix &L = mL[l]; const MatrixXf &V = mV[l], &N = mN[l], &Q = mQ[l]; MatrixXf &O = mO[l]; Timer<> timer; dou...
ALGO
0.9993
3.705524
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-04-02T17:56:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 90, "forks": 36, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "7754a1f...
bd9a64aa-6701-4560-bc69-9446931b2400
innocence-wuhan/CompilingHomework
Recrusion/RecrusionRange/CommonLinkList.h
#pragma once #include<iostream> using namespace std; template<typename T> struct LinkNode { T data; LinkNode<T>* next; LinkNode<T>* pre; LinkNode(T d) :data(d), next(NULL), pre(NULL) {}; LinkNode() :next(NULL), pre(NULL) {}; }; template<typename T> struct LinkList { LinkNode<T>* head; LinkLi...
ALGO
0.998192
4.217164
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-12T06:12: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": "6818171d2b47...
61ab2d2f-0c70-44f9-a143-e3238b4ff28b
shuxiangguo/sxg_leetcode
645.错误的集合.cpp
/* * @lc app=leetcode.cn id=645 lang=cpp * * [645] 错误的集合 * * https://leetcode-cn.com/problems/set-mismatch/description/ * * algorithms * Easy (38.86%) * Likes: 64 * Dislikes: 0 * Total Accepted: 8.5K * Total Submissions: 21.2K * Testcase Example: '[1,2,2,4]' * * 集合 S 包含从1到 n * 的整数。不幸的是,因为数据错误,导致集...
ALGO
0.999295
5.002293
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2019-09-22T18:10: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": "02aa7fdf1...
fb22fe2a-4436-4a79-94a3-d13d401a0778
APRIL-ZJU/Coco-LIC
src/spline/ceres_spline_helper_jet.h
/** BSD 3-Clause License This file is part of the Basalt project. https://gitlab.com/VladyslavUsenko/basalt-headers.git Copyright (c) 2019, <NAME> and <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are...
ALGO
0.999387
7.173659
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-08-23T09:05:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 311, "forks": 25, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "67ed6c7...
c0b56b60-aabc-47f7-adf0-235cd3081e94
192211659/DSA0159-C-
19.palindrome or not.cpp
#include <iostream> #include <string> using namespace std; int main() { string str; int left, right; bool isPalindrome = true; cout << "Enter a string: "; getline(cin, str); left = 0; right = str.length() - 1; while (left < right) { while (left < right && !isalnum(str[left])) { ...
ALGO
0.999085
5.387634
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-07-26T03:53: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": "fccaf611b40a...
008b2d03-1460-4a00-bc7c-36cb7a89bb95
sor-ee/homework
array practice2.cpp
#include <iostream> #include<iomanip> void display(int salary[],int num); int cal_bonus(int salary); using namespace std; int main() { int num; cout << "Enter number of person : "; cin >> num; int *salary = new int[num]; for (int i = 0; i<num ;i++) { cout << "Enter salary "<< i+1 <<" : "; cin >> salary[i]; ...
TOOL
0.933616
3.339678
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-07-14T08:06: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": "af5f8a2423...
0314d803-9775-4b47-a091-f2c652f9575f
maksonchik20/Codeforces
Codeforces Round 957 (Div. 3)/f.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const ll INF = (ll) 2e18; const ld EPS = (ld) 1 / (1e6); const ll MOD = (ll) 1e9 + 7; void solve() { int n, x; cin >> n >> x; vector<int> a(n); for (int i = 0; i < n; ++i) { cin >> a[i]; } unor...
ALGO
0.999909
4.757456
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2023-05-07T09:50: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": "b110a7846...
7d38fe68-ecb9-4e58-8e23-05aeeb7be3e9
ishandutta2007/codeforces-s
shapo/normal/566/F.cpp
#include <bits/stdc++.h> using namespace std; #ifdef SG #include <debug.h> #else #define show(...) #define debug(...) #define deepen(...) #define timer(...) #endif #define ARG4(_1,_2,_3,_4,...) _4 #define forn3(i,l,r) for (int i = int(l); i < int(r); ++i) #define forn2(i,n) forn3 (i, 0, n) #defin...
ALGO
0.999853
3.543499
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa8871782089...
976627ff-40bb-4c27-b2eb-de65bb98bbd3
GMihai00/AdventOfCode2024
day7/src/models/Equation.cpp
#include "Equation.hpp" #include <regex> long long concat_integers(long long left, long long right) { long long rez = left; auto str_int = std::to_string(right); for (const auto& chr : str_int) { rez = rez * 10 + chr - '0'; } return rez; } const bool Equation::backtrac...
ALGO
0.998167
4.535636
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-12-16T07:36: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": "147facb7171...
326dd297-93c3-4334-b74c-3a72cd68bfd2
kanster/RGBD-Segmenter
v4r/ContourDetector.cpp
/** * Copyright (C) 2012 * <NAME>, <NAME>, <NAME> * Automation and Control Institute * Vienna University of Technology * Gusshausstraße 25-29 * 1170 Vienn, Austria * ari(at)acin.tuwien.ac.at * * This program is free software: you can redistribute it and/or modify * it under the terms of...
ALGO
0.987545
5.193102
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-02-15T05:45:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 7, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "0c45ba797...
9c0c8e90-4c07-40d8-869b-7378e8dd95eb
WD111/project
cppProjects/homework3/homework3/work2.cpp
//#include <iostream> //#include <algorithm> //#include <cstring> //#include<vector> //using namespace std; // // //bool cmp(vector<int> m, vector<int> n) { // return m[0] < n[0]; //} // //void solve(int n, vector<vector<int>> meets, int& res) { // vector<bool> visited(n, false); // int num = 0; // while (true) { // v...
ALGO
0.999974
3.993645
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-02-27T23:35: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": "3439ac00ecc8...
0700f905-b6f0-41ed-89d7-e410799ebd3a
ankitsultana/competitive
LightOJ/Math/NumberTheory/LCMFrom1ton.cc
/* Author: <NAME> * Problem id: 1289 * Comment: Bitwise Sieve * * * * * * * * * */ #ifdef __APPLE__ #include <iostream> #endif #include <stdio.h> #include <cassert> #include <algorithm> #include <cmath> #include <vector> #define LL long long #define gc getchar_unlocked #define MAXN 99999999u #define ROOTN 10003 #...
ALGO
0.999746
4.467065
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2016-01-31T18:46:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2491967...
6d2ad676-98c5-4466-a72c-6b8a451a54b4
Japjappedulap/Infoarena
cezar/cezar.cpp
#include <cstdio> #include <queue> #include <vector> using namespace std; using VI = vector <int>; using VS = vector <short>; using PII = pair<short,int>; int N, K; VS G[10001]; VI F; struct CMP{ bool operator () (short a, short b) { return F[a]>F[b]; }}; priority_queue<short, VS, CMP> Q; void Read(); void Solve();...
ALGO
0.999869
3.750421
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-09-13T00:25:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d83750d160...
b6cd3a96-6d20-416c-9d9c-13a3525f8f60
jonathanxqs/lintcode
151.cpp
class Solution { public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &prices) { if (prices.size() == 0) { return 0; } vector<int> profit(prices.size()); int buy = 0; buy = prices[0]...
ALGO
0.999671
5.962866
{ "github_metadata": { "branch": "master", "commit_count": 429, "repo_created_at": "2016-06-21T15:56: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": "dd083899...
7ade7dcf-8b58-4d13-98c2-ea784c43ae45
dulz01/L-Systems
L-Systems/src/examples/example_lsystems/turtle.h
#pragma once class turtle { struct point { float x; float y; float dir; }; struct line { point start; point end; }; point max_position_; point min_position_; point position_; line path_; float pi_; float distance_; std::vector<point> branch_points_; std::vector<line> li...
ALGO
0.931736
5.12872
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2016-11-21T13:53: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": "db284439b...
64f0af5f-ad3f-4991-9e6f-fd3c678e99ec
Tracktion/tracktion_engine
modules/tracktion_engine/3rd_party/airwindows/PowerSag/PowerSagProc.cpp
/* ======================================== * PowerSag - PowerSag.h * Copyright (c) 2016 airwindows, All rights reserved * ======================================== */ #ifndef __PowerSag_H #include "PowerSag.h" #endif void PowerSag::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) { fl...
ALGO
0.972332
3.874278
{ "github_metadata": { "branch": "develop", "commit_count": 1984, "repo_created_at": "2018-11-09T12:40:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 170, "issues": 31, "pull_requests": 3 }, "file_meta": { "content_id": "c...
8a86bc57-c604-4ae3-9b3e-59e1de5d638a
vikas148/dsa-rohit-negi
day126/flattening_LL.cpp
//{ Driver Code Starts #include <bits/stdc++.h> struct Node{ int data; struct Node * next; struct Node * bottom; Node(int x){ data = x; next = NULL; bottom = NULL; } }; using namespace std; void printList(Node *Node) { while (Node != NULL) { printf("%d ", Node->data); ...
ALGO
0.999834
4.377806
{ "github_metadata": { "branch": "main", "commit_count": 281, "repo_created_at": "2023-08-20T16:19:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b527df2d2...
56ce8740-203b-4233-abe3-3ec56ca87ca5
Shelikhov/C-Lippman
chapter_2/exr_3.20/main.cpp
#include <iostream> #include <vector> #include <string> #include <sstream> using namespace std; int main(){ vector<int> vec; int value; cout << "Enter numbers with button enter:\n"; while(cin >> value){ vec.push_back(value); } cout << "\nResult 1:\n"; for(vector<int>::size_type ind...
ALGO
0.998417
4.14894
{ "github_metadata": { "branch": "master", "commit_count": 352, "repo_created_at": "2019-12-07T19:50:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c421da33...
9adef8c5-55f6-4143-950d-d124a4686f99
YRZ9527/unix_basic
qt-master/24PointGame/QuestionBank/QuestionBank2/common.cpp
#include "common.h" #include <QtDebug> #include <QFile> #include <QDir> int is24OK(LNum num1, LNum num2, LNum num3, LNum num4) { int result = 0; QList<struRecordNum> list; LNum numList[4] = {num1,num2,num3,num4}; // 交换4个数字的顺序。 for (int i1 = 0 ; i1 < 4; i1 ++) { for (int i2 = 0 ...
ALGO
0.972512
3.728479
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2022-03-21T14:57:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06e4ee63ea9...
5cfaa6d2-2eb9-4d24-b82f-dc87080969d2
ishandutta2007/codeforces-i
-is-this-fft-/normal/1714/A.cpp
#include <iostream> using namespace std; void solve () { int n, H, M; cin >> n >> H >> M; int sleep = H * 60 + M; int ans = 24 * 60; for (int i = 0; i < n; i++) { int h, m; cin >> h >> m; m += 60 * h; if (m >= sleep) { ans = min(ans, m - sleep); } else { ans = min(ans, m - ...
ALGO
0.999619
3.689357
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "5544896055b8...
33f2277d-8fbb-4c55-94d0-0b9eca34b4d4
claviering/code
sort.cpp
#include <iostream> using namespace std; int StraightInsertionSort(int array[],int length); int bubbleSort(int array[],int length); int selectionSort(int array[],int length); int shellSort(int array[],int length); void mergeSort(int arr[], const int len); void quickSort(int arr[], int len); int main() { int length...
ALGO
0.999913
4.691259
{ "github_metadata": { "branch": "master", "commit_count": 350, "repo_created_at": "2016-01-22T09:03: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": "886e9d1e...
359d9a0a-a6c4-4d4a-89e1-eb02ac302808
aishani20/GFG_Practice_Questions
GFG_Problems/Rotate Array.cpp
class Solution{ public: void reverseArray(int arr[], int start, int end) { while (start < end) { int temp = arr[start]; arr[start] = arr[end]; arr[end] = temp; start++; end--; } } // Function to left rotate arr[] of size n by d void rotateArr(int arr[], int d, in...
ALGO
0.999906
5.887302
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-05-31T19:14:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a4bf8a7b7e...
75676966-ad47-4595-b6cd-7ce30806a9ad
JAKUAN-AHMED/ALGORITHM
bellmenford and floyd marshall/check_negative_cycle.cpp
#include<bits/stdc++.h> using namespace std; class Edge { public: int a; int b; int w; Edge(int a,int b,int w) { this->a=a; this->b=b; this->w=w; } }; int main() { int n,e; cin>>n>>e; vector<Edge> v; while(e--) { int a,b,w; cin>>a>>b>>...
ALGO
0.999985
3.979259
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-04T09:06:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81c4d209eef1...
49713253-9237-4809-a1fc-25f7345ce6ef
inada-s/procon
atcoder/abc174/D/main.cpp
#include <bits/stdc++.h> using namespace std; #define loop(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) for (int i = 0; i < n; ++i) #define dump(a) cerr << #a << " = " << (a) << "(L:" << __LINE__ << ")" << endl int main() { int n; cin >> n; string s; cin >> s; auto t = s; sort(t...
ALGO
0.99999
3.646758
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-06-02T10:36:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5de88b8fd...
81b4abe5-9f84-430a-85b2-67ca07e97d07
knshika/competitive-coding
cppcodes/450DSA/Strings/04longstRepeatingsubsequence.cpp
#include <bits/stdc++.h> using namespace std; // This function mainly returns LCS(str, str) // with a condition that same characters at // same index are not considered. int findLongestRepeatingSubSeq(string str) { int n = str.length(); // Create and initialize DP table int dp[n + 1][n + 1]; for (int ...
ALGO
0.999869
5.142159
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2021-05-13T23:43: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": "e89902519...
3c4e631f-18b2-4d27-aa32-484cff0b2e77
hectorrdz98/lenguajes-de-interfaz
u4/BaseHectorASM.cpp
#include <iostream> using namespace std; int add(int n1, int n2) { int res = 0; asm("add %%ebx, %%eax" : "=a"(res) : "a"(n1), "b"(n2)); return res; } int sub(int n1, int n2) { int res = 0; asm("sub %%ebx, %%eax" : "=a"(res) : "a"(n1), "b"(n2)); return res; } int inc(int n) { asm("inc %%eax" : "=a"(n) : "a"(n...
ALGO
0.973086
3.095942
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-01-28T22:27:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21ba0e3d0...
ba47613e-279c-4a37-b638-f13f897ab5a6
flexible-collision-library/fcl
include/fcl/narrowphase/detail/traversal/distance/shape_mesh_distance_traversal_node.h
/* * Software License Agreement (BSD License) * * Copyright (c) 2011-2014, <NAME>, Inc. * Copyright (c) 2014-2016, Open Source Robotics Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditio...
ALGO
0.971442
7.383213
{ "github_metadata": { "branch": "master", "commit_count": 863, "repo_created_at": "2012-09-19T16:50:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1572, "forks": 437, "issues": 205, "pull_requests": 36 }, "file_meta": { "content_id": "f...
55006851-8ea7-4299-b217-bc10e0e01d86
evapilotno17/cses-solutions
CSES-SOLUTIONS/Dynamic-Programming/Grid paths/vikhyat.cpp
#include <iostream> using namespace std; const int DIR_LEN = 4; int dr[DIR_LEN] = {-1, 0, 1, 0}; int dc[DIR_LEN] = {0, 1, 0, -1}; const int PATH_LEN = 48; // length of all possible paths int p[PATH_LEN]; const int GRID_SIZE = 9; // added border to all four sides so a 7x7 becomes a 9x9 bool onPath[GRID_SIZE][GRID_SI...
ALGO
0.999921
4.358255
{ "github_metadata": { "branch": "main", "commit_count": 232, "repo_created_at": "2022-10-03T22:55:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 31, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3045b1e27...
5f99ece8-a32e-4d89-91af-32e5d27ee3e2
Diphalder/3-2
network/subnet.cpp
#include<bits/stdc++.h> #define lld long long int #define llf long double #define pb push_back #define mp make_pair #define in insert #define loopN(n) for(lld i=0;i<n;i++) #define loopN2(n) for(lld j=0;j<n;j++) #define loop(p,n) for(lld i...
ALGO
0.973874
3.392782
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-10-21T12:27:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dad6a7dbc03...
8182b268-412f-4e55-be86-ef5174eb72a0
aadeepaggarwal/DSA-in-C-
Lecture-10 (2D Array)/2__search.cpp
#include <iostream> using namespace std; int main() { int a[][4]={ {1,2,3,4}, {4,5,6,7}, {7,8,9}// takes the un entered last column automatically as 0 }; // to print or traverse take two loop one of row one of column inside it int row, col,key; cin>>key; row = sizeof(a...
ALGO
0.992787
3.630043
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-05-28T14:35: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": "f82f9b271bb...
fa0900c6-d258-4996-b8d0-dd4ff5fa0166
HeZephyr/Awesome-Algorithm-Resources
Codeforces Round/#739div3/F2_Nearest_Beautiful_Number_hard_version.cpp
/** *@filename:F2_Nearest_Beautiful_Number_hard_version *@author: pursuit *@created: 2021-08-19 14:24 **/ #include <bits/stdc++.h> #define debug(a) cout << "debug : " << (#a)<< " = " << a << endl using namespace std; typedef pair<int,int> pii; typedef long long ll; const int N = 1e5 + 10; const int P = 1e9 + 7;...
ALGO
0.999988
4.993868
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-02-10T04:59:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82e693c0b678...
468da097-fa1d-4cb3-907e-f13bd3123f90
zixuan-zhang/leetcode
135_candy.cpp
/******************************************************************************* * @File : 135_candy.cpp * @Author: <NAME> * @Email : <EMAIL> * @Blog : www.noathinker.com * @Date : Sat 28 May 2016 04:46:39 PM CST ******************************************************************************/ /* * Questi...
ALGO
0.999998
5.675784
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2015-08-17T07:30: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": "5dfe6fca...
67a8a3c1-2af7-458b-bbd5-57b81c587e1b
GeneralSandman/zhenhuli-blog
数据结构与算法/剑指Offer(专项突击版)-leetcode/105.cpp
#include <iostream> #include <vector> #include <map> #include <queue> using namespace std; class Solution { private: vector<vector<int>> Grid; int Width; int Height; vector<vector<int>> AccessHashTable; public: int maxAreaOfIsland(vector<vector<int>>& grid) { if (grid.size() == 0 || grid[...
ALGO
0.999955
5.942933
{ "github_metadata": { "branch": "main", "commit_count": 143, "repo_created_at": "2021-02-28T15:39: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": "01e282717d...
c70d7cec-9239-4553-8ade-48cd9f371570
Yuvaraj787/CSES-Problems-Set-Solutions-
room_allocation.cpp
#include <bits/stdc++.h> using namespace std; int cur_rooms[(int)(2 * 1e5 + 1)]; int main() { int n; cin >> n; int used = 0; using pipii = pair<int,pair<int,int>>; priority_queue<pipii, vector<pipii>, greater<pipii> > pq; queue<int> freeRooms; for (int i = 0; i < n; i++) { ...
ALGO
0.999953
3.993909
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-06-18T11:04:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55f19b342526...
8e6339e8-1a8f-4e75-b2b9-038a3c674fa5
songjihu/UnrealEngine-5.0.3-release
Engine/Source/Runtime/Engine/Private/Animation/AnimInterpFilter.cpp
// Copyright Epic Games, Inc. All Rights Reserved. #include "AnimInterpFilter.h" //====================================================================================================================== // FFIRFilter //====================================================================================================...
ALGO
0.944404
7.139257
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-11-08T10:00:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b134318aa5...
e6eb6330-0a9c-40ef-87a5-f5b235a2c677
quanglm1998/competitive-programming
cses/1751.cpp
#include <bits/stdc++.h> using namespace std; const int N = 200010; const int LOG = 20; int n; int to[N]; int numComponent = 0; int componentId[N]; int circleSize[N]; int posInCircle[N]; vector<int> revAdj[N]; int posIn[N], posOut[N], cntEuler = 0; int depth[N]; int ancestor[LOG][N]; int res[N]; void dfs(int u) ...
ALGO
0.999955
4.145618
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-04-23T08:04: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": "70b657635f...
7beba396-0d73-477b-aa33-c770bbbf6352
ModeBeater/Practice-ads-leetcode-acmp-and-codeforces-
contest 1/D.cpp
#include <iostream> #include <algorithm> #include <sstream> using namespace std; void solve(){ string s; cin >> s; int a; cin >> a; int h = 0; while(a > 59){ a = a - 60; h++; } int sum = 0; string t = s; stringstream s1; int h1; int m1; s1 << (s[0] +...
ALGO
0.998791
3.515245
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-01-05T06:50: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": "0f318b62e73f...
8274d56b-8181-49de-96cd-51fe146ae4c0
suv-1312/Dynamic-Programming
46 - Longest Bitonic Subsequence.cpp
/* Given an array of positive integers. Find the maximum length of Bitonic subsequence. A subsequence of array is called Bitonic if it is first increasing, then decreasing. Example 1: Input: nums = [1, 2, 5, 3, 2] Output: 5 Explanation: The sequence {1, 2, 5} is increasing and the sequence {3, 2} is decreasing s...
ALGO
0.999819
5.647476
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-05-21T11:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6a53948a0e...
1d18c4ab-4cd8-4b60-95ab-bbbbe3963941
elemental/Elemental
src/blas_like/level3/Hemm.cpp
/* Copyright (c) 2009-2016, <NAME> All rights reserved. This file is part of Elemental and is under the BSD 2-Clause License, which can be found in the LICENSE file in the root directory, or at http://opensource.org/licenses/BSD-2-Clause */ #include <El-lite.hpp> #include <El/blas_like/level3.hpp> na...
ALGO
0.953049
5.729142
{ "github_metadata": { "branch": "master", "commit_count": 3773, "repo_created_at": "2012-05-06T08:37:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 513, "forks": 110, "issues": 38, "pull_requests": 7 }, "file_meta": { "content_id": "5ee...
72aa7207-ad4c-4f4b-86bf-8649abc04adc
wkcn/leetcode
coding_interviews/0034.inverse_pairs.cpp
#include "common.h" class Solution { public: int InversePairs(vector<int> data) { int count = 0; merge_sort(data, 0, data.size(), count); return count; } private: void merge_sort(vector<int>& data, int start, int end, int& count) { if (end - start <= 1) return; int mid = start + (end - start)...
ALGO
0.999779
4.984599
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2019-01-15T04:05:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07a5f816...
84f3bdae-4415-41a6-b8dc-5754a103f5b6
Basasuya/ACM
Codechef/COINS.cpp
#include <assert.h> #include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using name...
ALGO
0.999989
4.012522
{ "github_metadata": { "branch": "master", "commit_count": 204, "repo_created_at": "2018-01-10T03:13:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f4e2a02...
15f46611-231d-430a-92c1-e11b7d739af6
hashirupramuditha/CS2023---Data-Structures-Algorithms
In class Lab 7/Example_code/BST Implementation.cpp
#include <iostream> using namespace std; struct node{ int key; struct node *left; struct node *right; }; struct node *newNode(int value){ struct node *temp = (struct node*) malloc(sizeof(struct node)); temp -> key = value; temp -> left = temp -> right = NULL; return temp; } // Inorder traversal voi...
ALGO
0.999926
5.318484
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-03-28T09:58:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06a69cb683c4...
951b6bc2-1965-409d-beb8-db0231050d30
qowlz/codetree-TILs
241031/격자 칠하기 2/painting-the-grid-2.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <tuple> using namespace std; #define MAX_NUM 1000000 int n; vector<vector<int>> arr; vector<vector<bool>> visit; int dx[] = {1, -1, 0, 0}; int dy[] = {0, 0, -1, 1}; int getTotal(int sy, int sx, int d) { visit[sy][sx] = true; ...
ALGO
0.999959
4.627609
{ "github_metadata": { "branch": "main", "commit_count": 549, "repo_created_at": "2023-11-28T13:21: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": "d71f170fe2...
9b46b722-8ac7-4f13-acb8-3e13d80b32dd
kshen3778/Algos-DataStructures-Templates
Trie.cpp
class TrieNode{ public: map<char, TrieNode*> children; bool leaf; /** Initialize your data structure here. */ TrieNode() { leaf = false; } bool containsKey(char ch){ if(children.count(ch) != 0){ return true; } ...
ALGO
0.99983
5.716859
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-03-01T19:52: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": "5b9ea3dda...
826e73be-f58d-41b7-a4a8-4c6fd5aaa8dc
imyzx2017/mindspore_pcl
mindspore/ccsrc/backend/optimizer/ascend/enhancer/getnext_memcpy_elimination.cc
/** * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
ALGO
0.967276
6.138999
{ "github_metadata": { "branch": "pcl_gpt", "commit_count": 5, "repo_created_at": "2020-11-18T10:57:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "bd5629554...
f0e07013-1d12-4a59-b399-403bbf171291
tamim2007009/Numerical-method-implementation
SecantMethod.cpp
#include <bits/stdc++.h> using namespace std; double func(double x) { return (x * x - 4 * x - 10); } int main() { double x1 = 6.00, x2 = 3.0; double x3 = (func(x2) * x1 - func(x1) * x2) / (func(x2) - func(x1)); double dx = x3 - x2; int c = 1; double xh = x3, xl = x2; double y; while (...
ALGO
0.999917
3.884502
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-12T05:11:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6c4ac680d71...
b766c000-3c9e-4a1f-bdfd-3143d2b56e8d
mpfeifer1/Kattis
twoknights.cpp
// <NAME> // Version 04, 2018/02/17 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef unsigned int uint; typedef unsigned long long ull; const ld pi = 4.0*at...
ALGO
0.999975
3.566952
{ "github_metadata": { "branch": "master", "commit_count": 881, "repo_created_at": "2017-11-27T05:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 175, "forks": 79, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "f69a7...
d2afcf99-5bdc-4b74-a103-a987653681c2
riveridea/algorithm
elements-of-programming-interviews-read-only/Subseq_cover.cpp
#include <iostream> #include <cassert> #include <unordered_set> #include <iterator> #include <vector> #include <string> #ifdef __clang__ #include <unordered_map> #else #include <tr1/unordered_map> #endif using namespace std; #ifndef __clang__ using namespace std::tr1; #endif string rand_string(int len) { string ret...
ALGO
0.997612
4.794336
{ "github_metadata": { "branch": "master", "commit_count": 401, "repo_created_at": "2013-03-17T22:52: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": "ea17bc5e...
ecc3bbea-294b-4e9e-854e-5566a741d690
Amithrav/parvam2025
parvam9/recurbinary.cpp
#include <iostream> using namespace std; int recursiveBinarySearch(int arr[], int left, int right, int key) { if (left > right) { return -1; } int mid = (left + right) / 2; if (arr[mid] == key) { return mid; } else if (arr[mid] < key) { return recursiveBinarySearch(arr, mid ...
ALGO
0.998391
5.750352
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-05-28T10:27:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "452a395c11b3...
2a4393c7-26b6-419c-9380-7fd5836253b5
AlaminPu1007/leet-code
Leet-Code/519. Maximum Length of Repeated Subarray/718_Maximum_Length_of_Repeated_Subarray.cpp
/* This solution will give us "Memory Limit Exceeded" */ #include <bits/stdc++.h> using namespace std; class Solution { int ans = 0; public: int findLength(vector<int> &nums1, vector<int> &nums2) { int n = nums1.size(), m = nums2.size(); DFS(n, nums1, m, nums2, 0, 0); return ans; } private: ...
ALGO
0.99986
4.801067
{ "github_metadata": { "branch": "master", "commit_count": 1102, "repo_created_at": "2022-06-13T15:42:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "305ed48...
48752b8f-db83-4f4d-936b-5f5954293a1b
Suikaba/procon-solved
Codeforces/Round300-349/Round305/Div1-B-Mike_and_Feet.cpp
// http://codeforces.com/contest/547/problem/B // 反省 // 実装方針がダメダメだった.以下のコードはいいやり方のほう. // 区間を set, multiset で管理して頑張るのが悪いほう. // てんでだめというわけではない(考え方はシンプルだからね)が,区間のマージの確認とか, // set の end, begin の処理とか場合分けが増えてバグりかねない. #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n);...
ALGO
0.999981
4.191514
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2018-04-18T08:29: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": "5ced782b0...
8c4ed8d0-fecc-46e9-a17d-eb494835714b
FreeFrame/FreeFrame
PetesPlugins/Core/Bloom.cpp
/* Copyright (C) 2002 <NAME> Effect plugin 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 2 of the License, or (at your option) any later version. This program is distributed...
TOOL
0.962929
5.673153
{ "github_metadata": { "branch": "main", "commit_count": 158, "repo_created_at": "2023-05-15T14:35:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73f4fa18a48...
b1bdbc07-dea4-42da-b85d-440a78da7cce
davisliu2006/Competitive_Programming
CCC 2024/s4.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<pair<int,int>>> graph; vector<int8_t> vis; vector<pair<int,int>> edges; vector<int8_t> color; char colormap[] = {'R', 'B', 'G'}; void dfs(int curr, int8_t prevcolor) { vis[curr] = true; for (auto& [next, ei]: graph[curr]) { if (vis[next]) {co...
ALGO
0.999976
4.569487
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2022-11-16T20:32: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": "876d4903284...
2fad2a25-5d35-4294-8eea-376be4c444d3
davechurchill/ualbertabot
UAlbertaBot/Source/research/hlsearch/HLSearch.cpp
#include "HLSearch.h" #include "../../BOSS/source/BOSS.h" using namespace UAlbertaBot; HLSearch::HLSearch() :_tt(20000), _cache(20000), _bestMove(StrategyManager::ProtossHighLevelSearch) { } HLSearch::~HLSearch() { } long long HLSearch::search(double timeLimit, int frameLimit, int maxHeight) { _stats.clear(); ...
ALGO
0.999769
5.445538
{ "github_metadata": { "branch": "master", "commit_count": 266, "repo_created_at": "2014-09-11T17:18:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 527, "forks": 177, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "8f9f...
e7dfbcf2-bf9c-46b8-a85a-ff30f4035e61
RGTechno/LeetCode
494-target-sum/494-target-sum.cpp
int dp[21][1001]; class Solution { public: Solution(){ memset(dp,-1,sizeof(dp)); } int countSubsetWithSum(vector<int> nums,int sum,int n){ if(sum<0) return 0; if(n==0) return sum==0; if(dp[n][sum]!=-1) return dp[n][sum]; if(nu...
ALGO
0.999996
5.260829
{ "github_metadata": { "branch": "master", "commit_count": 774, "repo_created_at": "2021-12-14T06:01:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e97a779...
375ed9ed-aec9-412e-86cc-79a073cfd230
GgooM94/algorithm
Baekjoon/10827_fail.cpp
#include<iostream> #include<string> #include<vector> int i, j; bool flag = 0; //자연수 일경우 flag = 0; std::vector<int>squ(std::vector<int> inputA, std::vector<int> inputB, int b) { std::vector<int> result(1000); for (i = inputA.size() - 1; i >= 0; i--) { for (j = inputB.size() - 1; j >= 0; j--) { result[i + j] += in...
ALGO
0.99983
3.610238
{ "github_metadata": { "branch": "master", "commit_count": 419, "repo_created_at": "2018-01-17T13:48: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": "992ccdea...
9150f217-b9a3-4ea5-b1ae-34279cfc1160
niessner/VoxelHashing
DepthSensingCUDA/Source/CUDABuildLinearSystemRGBD.cpp
#include "stdafx.h" #include "CUDABuildLinearSystemRGBD.h" #include "GlobalAppState.h" #include "GlobalCameraTrackingState.h" #include "MatrixConversion.h" #include <iostream> extern "C" void computeNormalEquations(unsigned int imageWidth, unsigned int imageHeight, float* output, CameraTrackingInput cameraTrackingI...
ALGO
0.999315
5.63467
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2014-06-08T23:29:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 694, "forks": 203, "issues": 12, "pull_requests": 1 }, "file_meta": { "content_id": "f2db...
d1682ef9-7ef6-468e-8e76-acf6404661c2
CollinChaffin/MPC-BE
src/ExtLib/VirtualDub/system/source/zip.cpp
// VirtualDub - Video processing and capture application // System library component // Copyright (C) 1998-2004 <NAME>, All Rights Reserved. // // Beginning with 1.6.0, the VirtualDub system library is licensed // differently than the remainder of VirtualDub. This particular file is // thus licensed as follows (the "z...
TOOL
0.981925
3.004003
{ "github_metadata": { "branch": "master", "commit_count": 3430, "repo_created_at": "2018-02-25T00:59:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ae643...
6b8c021a-54d1-4f5e-b083-4209c35288cf
jonnysciar/advent_of_code_2023
day_2/puzzle_1/main.cpp
#include <iostream> #include <fstream> #include <algorithm> #include <vector> #include <cstdint> #include <unordered_map> #include <optional> const std::unordered_map<std::string, int32_t> max_values_map = {{"red", 12}, {"green", 13}, ...
ALGO
0.988174
5.595775
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-12-01T18:20: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": "1b19d29a1d...
6e4fc162-8d2c-469c-b8ce-f41b5bc52f79
andy-lee-cat/catsDaily
250516.cpp
// 1288C 1600 #include <iostream> #include <algorithm> #include <vector> using namespace std; #define MOD 1000000007 long long add(long long x, long long y) { return (x + y) % MOD; } long long mul(long long x, long long y) { return ((x % MOD) * (y % MOD)) % MOD; } vector<vector<long long>> dp; vector<vector...
ALGO
0.999993
4.392237
{ "github_metadata": { "branch": "master", "commit_count": 258, "repo_created_at": "2024-11-27T12:26: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": "37934b82...
9ec97ecc-a105-47ee-bc75-dc84e31a5970
samad-yar-khan/dsa-problemset
Graph/captureKing.cpp
#include<bits/stdc++.h> using namespace std; //https://binarysearch.com/problems/Number-of-Moves-to-Capture-the-King int solve(vector<vector<int>>& board) { int n = board.size(); int X[] = {-2,-1,-2,-1,2,1,2,1}; int Y[] = {1,2,-1,-2,-1,-2,1,2}; queue<pair<int,pair<int,int>>>pn; bool breakLoop =fal...
ALGO
0.999785
4.573105
{ "github_metadata": { "branch": "master", "commit_count": 429, "repo_created_at": "2021-04-23T13:05:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "60abaa2b...
b4f1a7ad-924b-4a07-ac2f-17a1486eb9e1
MiaWeber25/CS1-mweber
finalproject/main.cpp
/* Final Project - TicTacToe CSCI 111 Fall 2021 14/Dec/2021 By: <NAME> Program implements TicTacToe logic on three levels: easy, medium, and hard. Game statistics are written to output file of player's choice. */ //Helpful website: https://www.geeksforgeeks.org/implementation-of-tic-tac-toe-game/ #i...
ALGO
0.94394
5.840327
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2021-08-24T21:20: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": "6aff693821...
4d74ca72-d7dd-4a9f-986b-46a6c5cbf607
1-pluto1/algorithm
二叉树/leetcode404/leetcode404.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.999867
5.759606
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-05-03T10:47: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": "82df5f4d2683...
86d2849e-c845-42e9-b32a-b5e3d358696a
Deivisito2911/Algorithm-and-data-structure-3
Clases/Pilas/pilasConListas.cpp
#include <iostream> using namespace std; // Nodo de la lista struct Nodo { int dato; Nodo* siguiente; }; // Clase Pila class Pila { Nodo* cima; // Puntero al nodo superior public: Pila() { cima = nullptr; } // Constructor para inicializar la pila // Verifica si la pila está vacía bool estaVa...
ALGO
0.991209
5.640228
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2024-11-03T17:02: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": "b852492f8ab...
7d2cc8c5-dc47-4dca-9956-cfd758976cae
henrytsai88/leetcode
97/solution.cpp
class Solution { public: bool isInterleave(string s1, string s2, string s3) { int m = s1.size(), n = s2.size(); if (m + n != s3.size()) return false; vector<bool> pre(n + 1, false), cur(n + 1, false); pre[0] = true; for (int j = 1; j <= n; j++) { pre[j] = pre[j - ...
ALGO
0.999951
5.990324
{ "github_metadata": { "branch": "master", "commit_count": 327, "repo_created_at": "2024-03-26T19:57:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d0a7aa1...
9a4c05d9-ce99-4bbd-95a4-fdca26d73039
elmerjani/cp
Josephus_Problem_II.cpp
#include <iostream> #include <set> using namespace std; void josephus(int n, int k) { set<int> children; for (int i = 1; i <= n; i++) { children.insert(i); } auto it = children.begin(); while (!children.empty()) { // Move iterator k-1 times in circular manner for ...
ALGO
0.999996
4.898748
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-07-29T13:18:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "160fc215c803...
91fe58a4-3550-4360-bbc0-cf1e8140a3e9
Hyyyyyyyyyy/acm_old
competition/排位1.10.cpp
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <cmath> #include <set> #include <map> #include <cctype> #include <vector> #include <queue> #include <stack> #include <deque> #include <string> #include <iostream> using namespace std; typedef long long ll; typedef unsigned long long u...
ALGO
0.997615
3.199272
{ "github_metadata": { "branch": "master", "commit_count": 289, "repo_created_at": "2017-06-06T03:46: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": "60421e6e...
19dd8ef4-e78c-4ebb-8ca2-7f40db458420
Mahislami/Parallel-Programming
Assignment4/Part3/Parallel/Modified/main.cpp
// Example Chapter 3 OpenMP Program #include <stdio.h> #include <math.h> #include <sys/time.h> #include <sys/resource.h> #include <omp.h> double timeGetTime() { struct timeval time; struct timezone zone; gettimeofday(&time, &zone); return time.tv_sec + time.tv_usec*1e-6; } const lo...
ALGO
0.974755
3.567577
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-05-02T13:48:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d71d51f46c...
20e8844c-38e6-44fa-9536-7eeb0d09faa9
shuvokr/Solution_for_UVA_OnlineJudge_Problems
324.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <ctype.h> #include <iostream> #include <string> #include <sstream> #include <vector> #include <queue> #include <stack> #include <list> #include <map> #include <algorithm> using namespace std; #define sf scanf #define pf printf void...
ALGO
0.999721
3.342849
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2016-08-14T01:11: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": "57ece1e17...
2128c163-e282-40f9-8eb7-1eebed22fa1c
BhavyaBhalla-27/DSA-Supreme-
Backtracking_26th March 2023/Sudoku_Solver_Leetcode.cpp
class Solution { public: bool isSafe(char value,vector<vector<char>>& board,int curr_row,int curr_col){ // row check for(int col = 0;col<9;col++){ if(board[curr_row][col] == value){ return false; // Not safe } } // column check for(int row = 0;row<9;row++){ if(boa...
ALGO
0.999666
6.399783
{ "github_metadata": { "branch": "main", "commit_count": 513, "repo_created_at": "2023-01-22T10:26:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 370, "forks": 137, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "043c4a...
4ca43cc0-a509-4a28-879e-593191030553
IamLochan/Escaping-The-Caves
Level-2/Playfair_cipher.cpp
#include <bits/stdc++.h> using namespace std; #define SIZE 30 std::vector<char> punctuation = {',', '.', ' ', '?', '\n', '\t', '_'}; char keyT[5][5]; int mod5(int a) { return (a % 5); } // conversion of each letter to upeercase void tolowercase(std::string& ciphertext) { std::transform(ciphertext.begin(), ciphertext...
ALGO
0.999943
4.777108
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2021-08-16T17:45:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "364b0f419a0...
73364895-fc05-46cf-9726-15c095927d7d
jingma-git/milk
quadratic_programming_inequality_constraint.cpp
#include <igl/active_set.h> #include <igl/boundary_facets.h> #include <igl/cotmatrix.h> #include <igl/invert_diag.h> #include <igl/jet.h> #include <igl/massmatrix.h> #include <igl/readOFF.h> #include <igl/opengl/glfw/Viewer.h> #include <Eigen/Sparse> #include <iostream> using namespace Eigen; using namespace std; Ei...
ALGO
0.998406
4.384505
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-09-02T01:49: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": "ac379270b...
61ac79ed-097f-4e71-8f00-dfe9fc235840
barrgol/tsp-evolutionary-solver
src/main.cpp
#include <SFML/Graphics.hpp> #include <iostream> #include <fstream> #include <random> #include "configuration.hpp" #include "events.hpp" #include "city.hpp" #include "network.hpp" #include "renderer.hpp" #include "solver.hpp" int main() { // Set a random seed std::srand(std::time(NULL)); // Set up re...
ALGO
0.998865
5.166763
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2024-09-30T19:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48169e205...
b73f6785-94cb-4ef5-9145-ca47bbbcc240
JunBinLiang/OI
二分图/376-机器任务(最小点覆盖).cpp
#include <iostream> #include <vector> #include <string> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <algorithm> #include <cmath> #include <cstring> #include <queue> #include <list> using namespace std; using ll = long long; #define pb push_back #define ve vector #define FOR...
ALGO
0.999766
3.975713
{ "github_metadata": { "branch": "main", "commit_count": 780, "repo_created_at": "2022-07-07T05:53:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a48910c411...
a380cd55-f52b-4db2-a699-078b7eaf8b0a
srminera/MultiThreadSudoku
MultiThreadSudokuVerifacation/MultiThreadSudokuVerifacation.cpp
// SudokuVerifyMultiThread.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <thread> using namespace std; //Initialize functions bool checkDigit(int a[][9], int rowStart, int rowEnd, int columnStart, int columnEnd); void checkRows(bool a[], int b[][9]); vo...
ALGO
0.914338
6.003916
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-03-10T21:45: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": "9aef4b86fc...
6c96d413-2bbf-4939-9956-cbefea7ec9a7
Roman-Klemendeev/OAIP2
Laba 24/Laba 24/Source.cpp
#include <stdio.h> #include <Windows.h> long fuct2(int n) { if (n == 0) { return 1; } long res = fuct2(n - 1) * n; return res; } void rec1(int n) { printf(" %d", n); if (n > 1) { rec1(n - 2); } } void rec2(int n) { if (n > 1) { rec2(n - 2); } printf(" %d", n); } void rec3(int n) { if (n > 1) pr...
ALGO
0.999787
3.26169
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-12-22T16:38: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": "5bab184e8ce8...
e4a0d3c5-fb74-48f8-b115-7bf811e2d8bf
hansT-T/MyLeetcode
8.greedy/2530.maximal-score-after-applying-k-operations.cpp
class Solution { public: void buildHead(vector<int>& nums, int n){ for(int i=n/2-1; i>=0;i--){ int current = i; while(current < n){ int left = 2 * current + 1; int right = 2 * current + 2; int largest = current; if(left...
ALGO
0.999943
4.780452
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-07-27T01:17:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7701d6789e...
9efa7720-dfe4-48da-a069-f34533b200f0
Sombaran/Data_structures
pushing_vector_into_stack.cpp
/** * Putting all elements from vectors to stack */ #include <iostream> #include <vector> #include <stack> void printDataVector(std::vector <int>& vReceived) { for (int i=0;i<vReceived.size(); ++i) { std::cout << vReceived[i] << " " ; } std::cout << std::endl; } void printDataStack(std::stack...
ALGO
0.985347
4.605954
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-01-11T15:53:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "442bb13be4bb...
4b98dc57-baaa-4f0d-900d-49b2a892d4cc
HAYAGRISH2004/Cryptography-practical
4.polyalphabetic substitution.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> // Function to encrypt text using a polyalphabetic substitution cipher void encrypt(char text[], char key[]) { int i, j; char encrypted_text[strlen(text)]; int key_length = strlen(key); for (i = 0; i < strlen(text); i++)...
ALGO
0.998297
4.34713
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-26T07:14: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": "fb916aebf14d...
8eed8ed9-dcb2-46d8-b279-8a50b4050509
prakharsinghch/dsa-practice
1387-find-elements-in-a-contaminated-binary-tree/1387-find-elements-in-a-contaminated-binary-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.999758
5.846352
{ "github_metadata": { "branch": "main", "commit_count": 1213, "repo_created_at": "2023-06-17T04:07: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": "1347cfecd...
a8da545d-7d80-4551-b9a6-216f77a0e190
allpasscool/leetcodes
leetcode547/leetcode547_my_version.cpp
class Solution { private: vector<int> parent; void merge(int x, int y) { if (parent[x] == x && parent[y] == y) { parent[x] = y; } else if (parent[x] == x) { parent[x] = find(parent[y]); } else if (parent[y] == y) { parent[y] = find(pare...
ALGO
0.999981
6.112432
{ "github_metadata": { "branch": "master", "commit_count": 445, "repo_created_at": "2019-01-15T03:37:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f40fde01...
c62ca283-7e8b-42d6-8109-8a170872a4cb
guyupan1911/AVP_SLAM_ROS
src/GridMap/gridmap.h
#ifndef GRID_MAP_H #define GRID_MAP_H #include "port.h" #include "value_conversion_tables.h" #include <Eigen/Core> #include <Eigen/Geometry> #include "probability_values.h" namespace AVP { namespace mapping { struct CellLimits { CellLimits() = default; CellLimits(int init_num_x_cells, int init_num_y_cells)...
ALGO
0.930975
7.084682
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-07-21T09:55:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 59, "forks": 19, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "d949d472...
6d80b470-e1c3-4360-a37a-439f5427d3e4
shinyingl/Kidnapped-Vehicle
src/particle_filter.cpp
/** * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: <NAME> * Modified by <NAME> on 12/23/2019 for Udacity class hw */ #include "particle_filter.h" #include <math.h> #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <string> #include <vector> ...
ALGO
0.947303
6.032955
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-10-22T23:07: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": "5185668885...
930da5c9-3714-446c-9f6b-c2a12fae43ab
arnab9997/DSA-Problems-Personal
Codeforces/Educational/81/A. Display The Number.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define REP(i, a, n) for(int i=a; i<n; ++i) #define pb push_back #define sz(x) (int)((x).size()) #define all(x) (x).begin(), (x).end() typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; const double PI = 3.141...
ALGO
0.999896
3.987623
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2020-11-17T02:58:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a7185328180...
31d13d20-1e2f-4638-9009-8c9e620857bd
MarkGJ/Leetcode_python_cpp
Tree/0095_Unique Binary Search Trees II/unique_BST_II.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), ...
ALGO
0.999989
6.039454
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-11-28T14:43: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": "05b2ee7aa1b...
f7660238-104d-4d24-b713-7d66691dedcc
tiankonguse/ACM
contest/TheWaySoFar-Training/2011-Daejeon/E.cpp
#include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <vector> #include <algorithm> using namespace std; #define N 1005 #define M 500005 int n , m , s , t; struct edge { int x , f , next; }e[M]; int pre[N] , mcnt; void addarc(int x , int y , int z) { //printf("%d %d %d\n" , x , y , ...
ALGO
0.999949
3.509386
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2013-03-25T04:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 69, "forks": 40, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3413ad...
91099451-f0b0-44ed-b109-195aede99e14
jtalman/ual-sandbox
codes/TEAPOT/src/Main/SlidingBumps.h
#ifndef SLIDING_BUMPS #define SLIDING_BUMPS #include "Main/TeapotMatrixService.h" #include "Main/TeapotTwissService.h" #include "Main/Teapot.h" #include <iostream> enum CorrectionRegime {FT, CO}; // enum Boolean {false, true}; struct CorrectorSet { PacVector<int>* latticeIndex; PacElemMultipole...
TOOL
0.991215
3.374146
{ "github_metadata": { "branch": "master", "commit_count": 1290, "repo_created_at": "2015-10-31T09:25:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33358cf...
81fd9a8a-7305-4862-8ca8-7fc34449b79a
cfplhub/C_code
多态案例1——计算机类/多态案例1——计算机类/多态案例1——计算机类.cpp
#include<iostream> using namespace std; #include<string> class Calculator { public: int getresult(string oper) { if (oper=="+") { return m_Num1 + m_Num2; } else if (oper=="-") { return m_Num1 - m_Num2; } else if (oper=="*") { return m_Num1 * m_Num2; } } int m_Num1; int m_Num2; }; ...
TOOL
0.901406
3.941128
{ "github_metadata": { "branch": "main", "commit_count": 155, "repo_created_at": "2024-04-15T06:18:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ece6139fc...
a5171bda-42a4-4122-b8e1-33fd76baea9f
JaveriaKhan123/DSA
code3.cpp
#include <iostream> using namespace std; int main(){ /* Pattern 3 int n; cin>> n; int i =1; while(i<=n){ int j=1; while(j<=n){ cout<<j; j=j+1; } cout<<endl; i=i+1; } // Pattern 4 int n; cin>> n; int i =1; while(i<=n)...
ALGO
0.999815
3.133305
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-08-18T16:12: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": "ceeaffe8822...
90453d39-b8db-430f-8953-7dc350a9ba09
kjsce-codecell/Intro-to-CPP24
STL/09-PriorityQueue-STL.cpp
#include <bits/stdc++.h> using namespace std; // -> In the case of the max heap, priority queues are a type of container adaptors, specifically designed such that its first element is always the greatest of the elements it contains and the rest elements are in decreasing order. // -> In the case of the min heap, prior...
ALGO
0.998287
5.037373
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2024-01-13T18:42:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06a1ab57f7b5...
7b9a9581-e180-4459-b195-63883037d74f
afrasier/barad-purr
barad-purr/barad-purr.ino
#include <Servo.h> int const ACTION_ENABLE_LASER = 0; int const ACTION_DISABLE_LASER = 1; int const ACTION_MOVE = 2; int verticalPin = 11; int horizontalPin = 10; int buttonPin = 2; int laserPin = 5; int vOffset = 0; int hOffset = 0; bool processing = false; int MEDIUM = 20; int SLOW = 30; int FAST = 10; int INST...
TOOL
0.984194
4.697588
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-02-09T19:33: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": "7edf25d50b...
b82bdd20-cf41-4bc5-a28a-dcd43ef6d96a
mayingzhen/mayingzhen
code/Plugin/Animation/PoseModifier/TwoJointIKSolver.h
#ifndef __TwoJointIKSolver_H__ #define __TwoJointIKSolver_H__ namespace ma { class ANIMATION_API TwoJointIKSolver : public PoseModifier { public: void Init(BoneIndex uBoneAInd,BoneIndex uBoneBInd,BoneIndex uBoneCInd, const D3DVECTOR& vHingAxisLs,const Skeleton* pResfSkel); void UpdatePose(SkeletonPose* pNod...
ALGO
0.998069
4.641788
{ "github_metadata": { "branch": "master", "commit_count": 526, "repo_created_at": "2015-03-17T03:22:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f3253e2...
842a7e6d-a82f-4e56-80fc-434d0d42e1e6
PIVX-Project/PIVX
src/immer/map.hpp
// // immer: immutable data structures for C++ // Copyright (C) 2016, 2017, 2018 <NAME> // // This software is distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt // #pragma once #include <immer/config.hpp> #include <immer/detail/hamt...
TOOL
0.914668
7.686248
{ "github_metadata": { "branch": "master", "commit_count": 20345, "repo_created_at": "2016-01-30T19:20:24.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "dashpay/dash", "stars": 531, "forks": 716, "issues": 78, "pull_requests": 27 }, "file_meta": { "conten...
5dea0d8d-61eb-4601-baea-175ff28c923c
Nesh108/Applied-Embedded-System-Project
Project/shared-robovision/image-processor/src/BallFinder.cpp
// Credit to: https://github.com/Itseez/opencv/blob/master/samples/cpp/tutorial_code/ImgTrans/HoughCircle_Demo.cpp #include "BallFinder.h" #include <iostream> int iLowH = 0; int iHighH = 179; int iLowS = 0; int iHighS = 187; int iLowV = 0; int iHighV = 237; namespace { // initial and max values of the parameters ...
ALGO
0.995559
5.527733
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2015-04-13T13:00: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": "f2d82872bb...
cae6ef26-e43d-49e8-bd55-784113745e00
zju3dv/MagLoc-AR
state_estimation/sampler/uniform_set_sampler.h
/* * Copyright (c) 2020 SENSETIME * All rights reserved. * @Author: xuehua * @Date: 2020-12-24 16:18:36 * @Last Modified by: xuehua * @Last Modified time: 2021-01-18 16:07:18 */ #ifndef STATE_ESTIMATION_SAMPLER_UNIFORM_SET_SAMPLER_H_ #define STATE_ESTIMATION_SAMPLER_UNIFORM_SET_SAMPLER_H_ #include <random> #inc...
TOOL
0.937039
7.416869
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-06-06T09:47:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35, "forks": 6, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "6df59eddd46f...
8f23f4b5-574e-4487-bac4-f6886de86147
skypaul100/CP-Problems
Recursion/09.Binary Search using Recursion.cpp
//Binary search basiccode + codestudio question + 703.leetcode question //Time= O(log n) //Space= O(n) #include <iostream> using namespace std; bool binarySearch(int *arr ,int s, int e , int val) { while(s<=e){ int mid= s + (e-s)/2; //base case if(arr[mid] == val) return true...
ALGO
0.999989
5.366612
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2020-12-14T09:35: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": "7381dd96822...
8966e654-5fdb-4cc1-b513-9fb64aeeda8c
NishantKSinha/LeetCode
9773-332-516-longest-palindromic-subsequence/9773-332-516-longest-palindromic-subsequence.cpp
class Solution { public: //we can do this by tabulated wAY TOO THAT is more good ..keep help dp-25 & dp-27 for tabulation int func(int i ,int j , string &text1 , string &text2 ,vector<vector<int>>& dp){ //base case if(i < 0 || j <0) return 0 ; if(dp[i][j] != -1) return dp[i][j]; ...
ALGO
0.999992
6.064416
{ "github_metadata": { "branch": "main", "commit_count": 492, "repo_created_at": "2024-07-01T13:22: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": "4214f95a1a...
eab40f7f-72fd-4a3b-ad93-c7c89f6a9f0e
ThLentzas/leetcode
53/main.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; /* * 53. Maximum Subarray * * Given an integer array nums, find the subarray with the largest sum, and return its sum. * Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: The su...
ALGO
0.99997
5.812656
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-05-11T23:34: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": "50afdd4d7a...
ccfac51b-3628-4031-8006-6915c5207b41
saurav12bisht/Daa_lab
Binary_Search.cpp
#include <bits/stdc++.h> using namespace std; int binary(int A[], int item, int l, int u) { if (l <= u) { int mid = (l + u) / 2; if (A[mid] == item) return mid; else if (A[mid] < item) { l = mid + 1; } else { u = mid - ...
ALGO
0.999483
4.719296
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-07T15:27: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": "0616b31e8c1e...