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
2a05cc30-084c-42dc-83ac-f79023cdc9c1
Devojoytip/LeetCode-Practice
BST/delete.cpp
// https://leetcode.com/problems/delete-node-in-a-bst /** * 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) {} * TreeN...
ALGO
0.999976
6.139624
{ "github_metadata": { "branch": "main", "commit_count": 1043, "repo_created_at": "2023-02-08T10:55: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": "3b7d7058d...
02887a69-d698-4dee-988f-16468e210bee
YmGzaR/m_detector
添加了function的m_detector/include/function.h
#pragma once #ifndef FUNCTION_H #define FUNCTION_H #include <Eigen/Dense> #include <vector> #include<mybbox.h> #include <deque> #include<iostream> #include <Eigen/Dense> #include <Eigen/Sparse> #include <visualization_msgs/Marker.h> #include <visualization_msgs/MarkerArray.h> #include <geometry_msgs/Point.h> /*struct...
TOOL
0.909131
3.427524
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-01T14:56: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": "a0d538f81adb...
05133ca6-4fee-4099-ace4-f188b0a1a6a3
Jerryym/Mazer
走出迷宫/MazeMap_Jerry.cpp
#include <iostream> #include "MazeMap_Jerry.h" using namespace std; /* 静态成员初始化 */ char MazeMap::maze_road = ' '; int MazeMap::mazemap_row = 0; int MazeMap::mazemap_col = 0; int MazeMap::mazemap[Length][Width]; /* 构造函数:MazeMap 函数功能:默认初始化迷宫 参数列表: 无 */ MazeMap::MazeMap():maze_wall('#') { mazemap_row = 10; mazem...
TOOL
0.939949
3.689359
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2021-03-16T01:39: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": "fb78ffe791...
796b2bdb-c99f-471d-86b4-af4e5dcaad06
zhuhaochuan/Leetcode
459. Repeated Substring Pattern.cpp
/* "ab ab ab" 这个字符串的话该怎么判断 abc abc abc 怎么判断 这个字符串是一个由重复字符串组成的字符串 */ class Solution { public: bool repeatedSubstringPattern(string s) { int len = s.size(); if(len%2==1) return false; int i = len/2,j = 0; while(i<len) { if(s[j]==s[i]) { ++i;++j } ...
ALGO
0.998457
4.578546
{ "github_metadata": { "branch": "master", "commit_count": 307, "repo_created_at": "2017-11-19T13:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c0dd43a...
8371ddeb-b3c4-41cb-bc48-0fd942d07328
zackaryjing/leetcode-multilang
leetcode-cpp/3300_3399/leetcode-no3373.cpp
// problem: https://leetcode.cn/problems/maximize-the-number-of-target-nodes-after-connecting-trees-ii/?envType=daily-question&envId=2025-05-29 #include <deque> #include <iostream> #include <vector> #include "../utils/vector_helper.h" using namespace std; class Solution { public: vector<int> maxTargetNodes(vec...
ALGO
0.999898
5.998846
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2024-11-14T13:20: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": "4cd95b80...
6778492b-58ea-48e8-8392-caf629a69dd4
eae11/algorithm
zyr/algoritm/src/main/java/com/douma/_26_day_动态规划一/_131/代码实现_C++.cpp
class Solution { private: vector<vector<string>> res; string s; public: // 方法二: 使用动态规划优化判断是否是回文串 vector<vector<string>> partition(string s) { this->s = s; int len = s.length(); // 定义状态,dp[i][j] 表示子数组区间 [i, j] 对应的子串是否是回文 vector<vector<bool>> dp(len, vector<bool>(len)); ...
ALGO
0.999997
6.156781
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-08-08T17:45: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": "f24fb65bb1...
cf7fac5a-e487-4cca-b369-0dc1b262d419
dye8128/ABC
356D.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using ll = long long; using str = string; using pint = pair<int, int>; using pll = pair<ll, ll>; template<class T>using vc = vector<T>; template<class T>using vvc = vc<vc<T>>; using vint = vc<int>; using vll = vc<ll>; using vstr = vc<str>; using vpint...
ALGO
0.999992
4.188918
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2024-05-03T07:47: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": "7fbaf835c...
848656a8-9b63-424e-b5e6-4df53ffb47ce
drlongle/leetcode
algorithms/problem_1615/other2.cpp
/* Let deg[i] be the degree of node i. For node u and v, the answer is deg[u] + deg[v] if they are not connected, and deg[u] + dev[v] - 1 otherwise. Let first be the greatest degree, second be the second greatest degree (first and second can be the same if there are multiple nodes with the largest degree). We just nee...
ALGO
0.999926
5.476879
{ "github_metadata": { "branch": "master", "commit_count": 1430, "repo_created_at": "2017-02-08T14:00: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": "edb1c5b...
1e0dbf46-fb7f-48b5-85f4-345f4b56209e
erpc-io/eRPC
src/util/autorun_helpers.h
#pragma once #include <fstream> #include <string> #include <vector> #include "common.h" namespace erpc { // Tokenize the input string by the delimiter into a vector static std::vector<std::string> split(std::string input, char delimiter) { std::vector<std::string> ret; std::stringstream ss(input); std::string ...
TOOL
0.985936
6.48252
{ "github_metadata": { "branch": "master", "commit_count": 2450, "repo_created_at": "2016-12-20T21:02:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 885, "forks": 142, "issues": 19, "pull_requests": 4 }, "file_meta": { "content_id": "3d0...
68de0cc3-a7fe-4da5-bd45-b9fc35ec974b
harshbhar0629/CrackYourInternship
Graph/46_total_number_of_spanning_trees.cpp
#include <bits/stdc++.h> using namespace std; // https://www.geeksforgeeks.org/problems/total-number-of-spanning-trees-in-a-graph/1 class Solution { int calculateDeterminant(vector<vector<int>> &mat) { int n = mat.size(); // Base case: If the matrix is 1x1, return its only element if (...
ALGO
0.999929
4.974546
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-07-16T23:29:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86b7b6b7fe0...
32c9c1d8-c4c5-410a-968b-04571a4256fa
Anguei/OI-Codes
LuoguCodes/CF1010C.cpp
#include <bits/stdc++.h> int read() { int res = 0, flag = 1; char ch = getchar(); while (!isdigit(ch)) { if (ch == ';-';) flag = -1; ch = getchar(); } while (isdigit(ch)) res = res * 10 + ch - 48, ch = getchar(); return res * flag; } void print(int x) { if (x < 0) putchar(';-';), x = -x; if (x...
ALGO
0.99994
3.143475
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-02-14T14:22:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e928fbb38...
74459fd7-58e6-4781-8a5d-908dedcf8e96
JustinKasteleijn/AdventOfCode
C++/2015/Day5/DayFive.cpp
// // Created by justi on 5/16/2023. // #include <algorithm> #include <cstring> #include "DayFive.h" namespace AdventOfCode { int DayFive::solve(const std::vector<std::string> &data) { constexpr char vowels[5] = {'a', 'e', 'i', 'o', 'u'}; const std::vector<std::string> bad_words{"ab", "cd", "pq", "...
ALGO
0.998832
5.56827
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2023-05-17T15:53:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e873af678...
aa31c15a-ec2f-45cb-9ecb-2c55ac5f87b3
Wan-YunPeng/leetcode
CountAndSay_10_19/CountAndSay_10_19/main.cpp
#include <iostream> #include <vector> #include <string> #include <sstream> #include <algorithm> #include <functional> using namespace std; vector<string> countAndSay(const int n); void countAndSay2(int n); string getNext(const string &s); int main() { string a("11"); int i = 19; stringstream ss; ss << i; // str...
ALGO
0.999987
4.800335
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-10-17T05:21: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": "5ff71e049c...
d19f31e0-f02d-4df5-9d37-b4295b321fa7
trilinos/Trilinos
packages/rol/example/poisson-inversion/example_02.cpp
// @HEADER // ***************************************************************************** // Rapid Optimization Library (ROL) Package // // Copyright 2014 NTESS and the ROL contributors. // SPDX-License-Identifier: BSD-3-Clause // *************************************************************************...
ALGO
0.999532
4.173616
{ "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":...
61879a5e-4670-4a0f-b6ca-09ce3c8c1243
duchenlong/linux-text
rwlock/rwlock.cpp
#include <cstdio> #include <cstdlib> #include <unistd.h> #include <vector> #include <string> #include <pthread.h> #include <iostream> using std::cout; using std::vector; using std::string; using std::endl; volatile int ticket = 1000; pthread_rwlock_t rwlock; struct ThreadAttr { pthread_t tid; size_t id; }; ...
ALGO
0.998429
4.598866
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2019-12-15T02:54:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "675cff0e3...
f94d1f79-30e6-4856-b9b6-504a0cd314be
Slava/competitiveProgramming
lksh/day07/seq.cpp
#include <cstdio> #include <cstdlib> #include <map> const int N = 51; int t, n; long long k, a[N]; int main() { a[-1] = a[0] = 1; a[1] = 2; a[2] = 4; for (int i = 3; i < N; i++) a[i] = a[i - 1] + a[i - 2] + a[i - 3]; scanf("%d", &t); for (; t--; printf("\n")) { scanf("%d%lld", &n, &k); for (int i = 1; i <= ...
ALGO
0.999947
3.236758
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2013-04-19T18:39:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c733438517...
c99a5f9a-a41f-4590-ab5e-5c40f006fe7a
rthowerton/OSU-Coursework
cs161/labs/hanoi.cpp
#include <iostream> #include <cstdlib> using namespace std; int** createArray(int rows); void towers(int disks, int** b, int from_col, int to_col, int spare); #define COLS 3 int main(int argc, char* argv[]){ int disks = atoi(argv[1]); int from_col = 1, to_col = 2, spare = 3, num = 1; int** b = createArray(di...
ALGO
0.998061
5.042546
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-06-16T23:12: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": "7c4eabd3f8...
d1578cdf-9012-48de-a256-afd1bafb7da3
Ruslan515/Competitions
coding/Leetcode/Tasks/task_1894.cpp
// https://leetcode.com/problems/find-the-student-that-will-replace-the-chalk/description/?envType=daily-question&envId=2024-09-02 // Created by omega515 on 02.09.24. // #include <bits/stdc++.h> using namespace std; class Solution { public: int chalkReplacer(vector<int> &chalk, int k) { ios_base::sync_wit...
ALGO
0.999835
5.264786
{ "github_metadata": { "branch": "main", "commit_count": 271, "repo_created_at": "2022-05-31T16:17:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95c52339b6...
2ae1107c-f25f-4e65-a972-d0cbc32a76ae
nikhilnandanwar429/Practice-Problem
Queue/Queue.cpp
#include<iostream> #include<queue> using namespace std; class Queue { int* arr; int qfront; int rear; int size; public: Queue(){ size = 100001; arr = new int [size]; qfront = 0; rear = 0; } void enqueue(int data){ //push Operation if(rear == siz...
ALGO
0.996661
3.822179
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-04-11T11:36: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": "a4ec2c332ba...
0605a761-be64-4d67-ba5e-522d1c9f7177
rwollman/NUPACK
src/source/source/design/Weights.cc
#include <nupack/design/Weights.h> #include <nupack/design/Design.h> namespace nupack { namespace newdesign { ReversedComplex::ReversedComplex(Design const &design, uint index) { reverse_map(design, index); } void ReversedComplex::reverse_map(Design const &design, uint index) { auto const &complex = at(desi...
ALGO
0.992419
5.2592
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-07-08T21:09:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7afce6d15...
54676d2b-01a6-4f81-a6f4-7aea94a54151
gyanranjan17/LeetCode-and-GfG
Longest Span in two Binary Arrays - GFG/longest-span-in-two-binary-arrays.cpp
//{ Driver Code Starts //Initial template for C++ #include <bits/stdc++.h> #include <unordered_map> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { public: int longestCommonSum(bool arr1[], bool arr2[], int n) { // code here int psum=0,res=0; ...
ALGO
0.999966
5.880209
{ "github_metadata": { "branch": "main", "commit_count": 890, "repo_created_at": "2023-01-24T06:07: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": "44694a4b25...
ac660261-98c7-4d40-9e5a-bb52be7c8f79
Kumarsanj1v/C--Programing
LeetCode/rotatedArray33.cpp
#include <iostream> using namespace std; int rotate(int *nums, int n, int target) { int lowerBound = 0; int upperBound = n-1; while (lowerBound <= upperBound) { int middle = (lowerBound + upperBound)/2; if(target == nums[middle]) { return middle; } if(nums[low...
ALGO
0.999954
5.516229
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-10-07T05:24: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": "8a42c836759e...
bdef1965-5214-4eec-8bd3-586812077c6c
Raghava2004/Garuda
g/controlPID.ino
void controlPID(){ error_roll = roll_des - RateRoll; integral_roll = integral_roll_prev + error_roll*dt; if (ch1_value < 1060) { //Don't let integrator build if throttle is too low integral_roll = 0; } integral_roll = constrain(integral_roll, -i_limit, i_limit); //Saturate integrator to prevent unsafe ...
TOOL
0.974612
4.723737
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-02-13T10:24: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": "7776f9603b55...
b5973be5-3395-4199-ae41-7b7ce5e9469f
sungmen/Solve_Algorithms
Acmicpc/C++/BOJ1916.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pi; const int MAX = INT_MAX; int dist[1001]; vector<pi> vp[1001]; void dijkstra(int s) { dist[s] = 0; priority_queue<pair<int, int>> pq; pq.push(make_pair(0, s)); while(!pq.empty()) { int cur = pq.top().second; int dis ...
ALGO
0.999977
4.279284
{ "github_metadata": { "branch": "master", "commit_count": 1639, "repo_created_at": "2020-01-31T05:37:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f106edf...
542a7fcf-3f20-42d6-b153-3af6c01db10b
AMReX-Codes/amrex-backup
Src/Boundary/AMReX_InterpBndryData_3D_K.H
#ifndef AMREX_INTERP_BNDRYDATA_3D_K_H_ #define AMREX_INTERP_BNDRYDATA_3D_K_H_ #include <AMReX_FArrayBox.H> #include <AMReX_IArrayBox.H> namespace amrex { AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void interpbndrydata_o1 (int i, int j, int k, int n, Array4<Real> const& bdry, int nb, ...
ALGO
0.904755
5.538072
{ "github_metadata": { "branch": "master", "commit_count": 24562, "repo_created_at": "2020-04-17T22:22:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "592bcdf...
917f027c-ff50-4858-bd99-91b3c820a5f8
ishandutta2007/codeforces-s
songc/normal/888/G.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> pii; int N; LL ans; int A[202020]; int L[6060606], R[6060606], num=2; void pushTr(int id, int k, int x){ if (k<0) return; if (x&(1<<k)){ if (!R[id]) R[id] = num++; pushTr(R[id], k-1, x); } else{ if (!L[id]) L[id] = num...
ALGO
0.999934
4.003839
{ "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": "4c6d9e44e958...
e1960fbb-aec8-4ab8-9d52-226b8cc94def
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0725/personal_submission/cf1023d_yawn_sean.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3,Ofast,unroll-loops") using namespace std; template <class T> struct fenwick_tree { public: fenwick_tree() : _n(0) {} explicit fenwick_tree(int n) : _n(n), data(n) {} void add(int p, T x) { p++; while (p <= _n) { data[p - 1] +=...
ALGO
0.999956
3.675545
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "009c...
dfaded07-f7fc-4099-8d33-5ce62ea16058
pranavdeep/Arduino_Back_Up
Workspace/kgp_maze_1/kgp_maze_1.ino
//working on the unspecified combinational sensors and their specific allotment /*Step 1: (pending work) To find the current node{(x,y)coordinates} & check if the node point has already been visited or not //Step 2: Write an if-else condition for the above mentioned //Step 3: In the left condition change direction...
ALGO
0.975467
3.084979
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-10-23T17:43:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "112e7821b7...
70b24c6f-d2ea-4382-9d96-a656ebe8926e
RenanTashiro/URI
code/Grafos/p-level-4/2130.cpp
/* Nome: <NAME> 2008 ID: 2130 Resposta: Accepted Linguagem: C++ (g++ 4.8.5, -std=c++11 -O2 -lm) [+0s] Tempo: 0.068s Tamanho: 1,59 KB Submissao: 16/07/17 18:12:05 */ #include <bits/stdc++.h> using namespace std; #define INF 10000000 int main() { int N, M, instance = 1; while(scanf("%d%d", &...
ALGO
0.999933
4.381866
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2017-03-17T01:41:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99b17f308...
aebbe994-f9e0-4887-bb79-65bb30ff91d4
pengng/leetcode
144. 二叉树的前序遍历/main.cpp
#include <vector> #include <cassert> using namespace std; /** * 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, Tr...
ALGO
0.99998
6.76612
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2022-05-06T02:33: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": "da648b4de...
12e60c9d-cf56-41e4-9845-675ddb4e10d7
bcpratt2000Playground/Testing
PascalsTriangle/PascalsTriangle.cpp
//g++ PascalsTriangle.cpp -std=gnu++11 -lpthread -o PascalsTriangle #include "stdio.h" #include "iostream" #include "thread" #include "time.h" #include "sstream" #include <future> #define NUM_THREADS 4 #define ITERATIONS 40 using namespace std; unsigned long long getPascal(unsigned int row, unsigned int col) { if...
ALGO
0.994192
5.840574
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-01-02T20:29:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b90da93893d...
235a2f17-ff68-4ad1-9320-6339d9f75078
arvindchauhan1/a2z-dsa
2-sorting-techniques/2.1-sorting-i/insertion-sort.cpp
#include <bits/stdc++.h> using namespace std; //{ Driver Code Starts class Solution { public: // Function void insertionSort(int arr[], int n) { // write your code here for (int i = 0; i < n; i++) { int j = i; while (j > 0 && j < n && arr[j - 1] > arr[j]) ...
ALGO
0.999963
6.225631
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2023-03-27T15:23: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": "05c2d0d93e5...
a6b3503c-f2ed-44c8-a968-7888196bbe78
Catrya/Competitive-Programming
atcoder/A_easy/abc326_a 2UP3DOWN.cpp
/* A - 2UP3DOWN / Time Limit: 2 sec / Memory Limit: 1024 MB Score : 100 points Problem Statement Takahashi is in a building with 100 floors. He uses the stairs for moving up two floors or less or moving down three floors or less, and uses the elevator otherwise. Does he use the stairs to move from floor X to fl...
ALGO
0.999981
3.682958
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-07-18T02:46:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15109743b6b...
48b0cbb3-db85-4b89-b666-9cdcfb68e6c3
thefed/blog
050.pow.cpp
// LC 50, impl pow(x, y) // double myPow(double x, int n) #include <iostream> #include <vector> #include <cassert> #include <cmath> using namespace std; // binary search double myPow(double x, int n) { if (x == 1 || n == 0) return 1; if (x == -1) return n & 1 ? -1 : 1; if (n < 0) { n = (n == INT_MIN...
ALGO
0.999754
4.775176
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2016-07-16T19:59: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": "95ff631e4...
c12293cd-506c-4ee5-b4d4-2b6b40b3bf77
Jxint001/OJ_homework
HW7_dynam_planning&closest_pair/ACMOJ2530--prefix/bunnylutts.cpp
#include <iostream> using namespace std; typedef long long ll; const ll mod = 1000007; const ll INF = -1e18; int main() { ll n, m, a[5005], sum = 0, f[50005], g[50005]; cin >> n >> m; for (int i = 1; i <= n; ++i) { cin >> a[i]; sum += a[i]; } f[0] = 0; g[0] = 1; for (int i = 1;...
ALGO
0.999989
3.847598
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-02-28T08:47: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": "4c6ceb11732...
2366ff3b-a2d0-4660-991b-5c90a187c362
liuyubobobo/Play-Leetcode
2501-3000/2607-Make-K-Subarray-Sums-Equal/cpp-2607/main.cpp
/// Source : https://leetcode.com/problems/make-k-subarray-sums-equal/description/ /// Author : liuyubobobo /// Time : 2023-04-02 #include <iostream> #include <vector> #include <algorithm> using namespace std; /// Ad-Hoc /// Time Complexity: O(nlogn) /// Space Complexity: O(n) class Solution { public: long lo...
ALGO
0.999959
5.948709
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "88...
4807f5ab-8efd-4a84-bc89-6d9dba15678f
oriyalperin/CPP_ex5_a
sources/BinaryTree.hpp
/* sources: https://github.com/mission-peace/interview/blob/master/src/com/interview/tree/TreeTraversals.java#L105 https://www.cs.odu.edu/~zeil/cs361/latest/Public/treetraversal/index.html https://www.geeksforgeeks.org/iterative-postorder-traversal-using-stack/ */ #pragma once #include <iostream> #include <unordered_ma...
ALGO
0.999161
5.226386
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-05-25T18:38: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": "a16b64867f32...
4dbcb8d2-16b6-4656-8aac-62e813237241
hsiangchengfun/LeetCode_Practice
2-add-two-numbers/2-add-two-numbers.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* addTwoNumbe...
ALGO
0.999978
6.22738
{ "github_metadata": { "branch": "master", "commit_count": 152, "repo_created_at": "2022-07-10T08:10:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce641d5d...
ca91a906-40cd-49a9-afca-632f4fd2d595
Rootchie/CSCI130_JakeThompson_Homework
.ccls-cache/@home@runner@HomeworkJakeThompson/HW7_P6@main7_6.cpp
/****************************************************************************** Description: Rock, Paper, Scissors, Lizard, Spock Game This game is unfinished but now uses arrays. Last Modified by: <NAME> Last Modified on: 9/2022 *****************************************************************************...
TOOL
0.995082
4.401951
{ "github_metadata": { "branch": "main", "commit_count": 275, "repo_created_at": "2022-08-30T15:08: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": "be7be74d02...
be845a34-5403-4c11-aa5d-ae667da40369
purushottamnawale/dsa-cpp-apna-college
linked_list/22_11_put_even_position_nodes_after_odd_position_nodes.cpp
#include <iostream> using namespace std; class node { public: int data; node *next; // constructor node(int val) { data = val; next = NULL; } }; // void insertAtHead(node *&head, int val) { node *n = new node(val); // new operator is used to allocate memory in heap ...
ALGO
0.999921
4.967912
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2022-07-15T10:19:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60f6a0e7519...
821f9403-add1-413d-a0fd-afa0caf0367d
CoolBot2/CompetitiveProgSols
USACO Training Page/Chapter 1/superprimeribs.cpp
/* ID: david.y3 LANG: C++ TASK: sprime */ // NAME : <NAME> // GROUP : // LAST MODIFIED : 12 March 2022 // PROBLEM ID : sprime // PROBLEM DESCRIPTION : Prints all "superprime ribs" of length n // Complete Search // SOURCES : ...
ALGO
0.999754
4.737671
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2022-05-18T18:31: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": "0e80c7069c8...
3dce2287-a4a4-4897-950c-77bd9249999d
umrover/mrover-workspace
jetson/percep/deprecated/obstacle_detector.cpp
#include "perception.hpp" using namespace cv; using namespace std; //Global Variables int THRESHOLD_NO_OBSTACLE_CENTER = 300000; int THRESHOLD_NO_SUBWINDOW = 70000; // record the last direction static int last_center; Rect cropped = Rect( 20, SKY_START_ROW, 1240, 300 ); // (x, y, width, height) void updateThreshold...
ALGO
0.994392
4.275285
{ "github_metadata": { "branch": "main", "commit_count": 982, "repo_created_at": "2017-08-25T21:53:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 273, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34ef451c...
585c28bc-66f9-41a5-9210-4cfb36d4802a
chobe111/2024-samsung-winter-algorithm-study
string_management_2.cpp
#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #include <stdio.h> #include<iostream> #include<deque> #include<algorithm> using namespace std; #define CMD_INIT 1 #define CMD_APPEND 2 #define CMD_CUT 3 #define CMD_REVERSE 4 #define CMD_COUNT 5 extern void init(char mStr[]); extern voi...
ALGO
0.999757
3.673371
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-01-12T05:40:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e51682c52d8...
4c39274f-faba-44f2-ab37-dcceda903530
ktornai/blendExpl
blendexpl.cpp
#include <iostream> #include <cassert> #include <array> #include <vector> #include <optional> #include <string> #include <string_view> // https://archive.blender.org/wiki/index.php/Dev:Source/Architecture/File_Format/ // https://github.com/blender/blender/tree/master/source/blender/makesdna // http://homac.cakelab.org...
TOOL
0.900166
3.12951
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-07-22T07:09:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75a23beb1368...
3f20fd4d-05bf-4cae-863b-9df36ba4518d
ibab/lhcb-software
Rec/Rich/RichHPDImageAnalysis/src/lib/SobelPeakPixelFinder.cpp
#include <cmath> #include <iostream> #include <algorithm> // local #include "RichHPDImageAnalysis/SobelPeakPixelFinder.h" using namespace Rich::HPDImage; //----------------------------------------------------------------------------- // Implementation file for class : SobelPeakPixelFinder // // 2011-03-02 : <NAME> ...
ALGO
0.996144
4.884024
{ "github_metadata": { "branch": "master", "commit_count": 91578, "repo_created_at": "2015-12-10T14:42:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd686...
38a615f8-3751-4670-873e-699e4bc832b7
eaststarmmt/Algorithm
Programmers/디스크 컨트롤러.cpp
#include <string> #include <vector> #include <algorithm> #include <queue> using namespace std; struct Info { int req, time; }; struct cmp { bool operator() (Info& a, Info& b) { return a.time > b.time; } }; int solution(vector<vector<int>> jobs) { int answer = 0; sort(jobs.begin(), jobs.end()); priority_queu...
ALGO
0.999966
5.081056
{ "github_metadata": { "branch": "master", "commit_count": 1152, "repo_created_at": "2020-12-24T12:32:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "948d84b...
3e6af96d-70f5-4b49-8083-10f12dc65e48
MayukhC99/Practice_Problems
Graph/B. String Problem (codeforces) [floyd-warshall,strings].cpp
/* * *Problem Link : https://codeforces.com/contest/33/problem/B *Platform: codeforces *Status: correct *Author: <NAME> * */ #include<bits/stdc++.h> #define speed ios_base::sync_with_stdio(false); cin.tie(NULL); #define booster cout.tie(NULL) #define endl "\n" typedef long long int lld; #define mp make_pair #define ...
ALGO
0.999978
3.311656
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2020-05-13T10:22:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87577424...
0c1bc260-3413-41a0-9ffe-2295a6ed6d39
dheerajVagavolu/CS_DSA_lab
Assignment_3/lab3/Joseph_own.cpp
#include<iostream> #include<cstdlib> using namespace std; class Queue{ public: int ar[1000]; int index;//number of elements int start;//start pointer. int end;//end pointer. Queue(int); // initializes the array of n elements. void insert(int); //adds element to the last. void remove(); //removes the first el...
ALGO
0.999925
3.655721
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-27T07:51: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": "e32040acfd...
fbfc502f-6d53-4ca7-9bf8-44d184874ebe
FyodorovViktor/pathplanning
arduino/neuro.ino
// put your setup code here, to run once: #include <Servo.h> float vectorS[5] = {0, 40, 0,0,0}; float weight1[5][5] = { { 0.4682828 , 0.14279915, -0.03936641, -0.02099363, 0.03984427 }, { -0.22856644, 0.21864294, 0.6891374 , -0.03994741, -0.43646815 }, { 0.00982535, -0.29163 , 0.20969436, -0.25398114, 0.2...
ALGO
0.998016
3.825978
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-22T16:17: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": "4e0722f899...
1a7fb0dd-66ce-48a8-9f5f-9b51ae3b9004
Lan-ce-lot/overflow
kuangbin/最短路练习/迪杰斯特拉frogger.cpp
/************************************************************************* > FileName: > Author: Lance > Mail: <EMAIL> > Date: 9102.1.8 > Description: ************************************************************************/ //#include <bits/stdc++.h> #pragma comment(linker, "/STACK:102400000,1...
ALGO
0.999804
3.611151
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2020-07-12T14:35: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": "08ea4910e...
a56f9c16-4370-44ce-8b64-7ec11bd6de84
Iamnvincible/myleetcode
Gready/Solution_45.hpp
/* * @Author: <NAME> * @Date: 2021-04-25 21:13:37 * @LastEditTime: 2021-04-25 21:45:25 * @LastEditors: <NAME> * @Description:Jump Game II * @FilePath: \myleetcode\Gready\Solution_45.hpp * */ #ifndef SOLUTION_45 #define SOLUTION_45 #include <vector> /** * @brief * 跳跃游戏2 * 给出一个数组,初始位置位于0,位置对应数组值表示在当前位置可以往数组结尾跳...
ALGO
0.999994
5.307785
{ "github_metadata": { "branch": "master", "commit_count": 174, "repo_created_at": "2018-09-25T07:29: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": "3897f9a1...
9f30e3b9-1f37-4f51-9f71-c1020ace200f
TcaciucIulian/Transformare-AFN-in-AFD
main.cpp
#include <iostream> #include <cstring> #include <fstream> using namespace std; struct AFD { int numarInitialeAfd; int numarFinaleAfd; int caracatereAlfabetAfd; int numarStariAfd; }; struct AFN { int numarInitiale; int numarFinale; int caractereAlfabet; int numarStari; }; // citim da...
ALGO
0.999551
3.017195
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-04-22T13:24: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": "56a976990c...
0368e114-6e95-486b-ac6c-ca9d379bf7e1
yogyata-04/DSA
Graph/toposort_kahns_cycle_based.cpp
#include<bits/stdc++.h> using namespace std; //topo sort- scheduling for directed acyclic graph , if graph is cyclic we are simply returning empty vector{} bool dfs(int i,vector<vector<int>> &adj,vector<int> &vis,vector<int> &ans,vector<int> pathvis){ vis[i]=1; pathvis[i]=1; //for cycle detection for(auto i...
ALGO
0.999997
5.369047
{ "github_metadata": { "branch": "main", "commit_count": 150, "repo_created_at": "2023-06-27T06: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": "e4064ada0d...
90804bda-b8e6-4841-a840-3df1ea0bc418
HPC-Fortran2CPP/Fortran2Cpp
data/llama3_8B_ins_results/readable_format_HPEC/cpp/file234.cpp
#include <iostream> #include <vector> using namespace std; void init_array(double& alpha, double& beta, vector<vector<double>>& a, vector<vector<double>>& b, vector<vector<double>>& c, vector<vector<double>>& d, int ni, int nj, int nk, int nl) { alpha = 32412.0; beta = 2123.0; a.resize(nk, vector<double>...
ALGO
0.998413
3.199345
{ "github_metadata": { "branch": "main", "commit_count": 95, "repo_created_at": "2024-04-05T20:02:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 5, "issues": 55, "pull_requests": 0 }, "file_meta": { "content_id": "d5883f2975...
574126c5-b432-4961-991f-48a6adf3b51e
sigmadrone/sigmadrone
source/cortex-m4/sdfirmware/src/fftfilter.cpp
#include "fftfilter.h" FftFilter::FftFilter(samples datasize, size_t nfilter) : datasize_(datasize) , nfilter_(nfilter) { assert(nfilter_ < datasize / 2); switch(datasize) { case samples16: pcfft_ = &arm_cfft_sR_f32_len16; break; case samples32: pcfft_ = &arm_cfft_sR_f32_len32; break; case samples64: ...
ALGO
0.968584
5.802582
{ "github_metadata": { "branch": "master", "commit_count": 1325, "repo_created_at": "2015-06-06T03:46:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb720013...
329db6c4-a8e1-4d79-8610-ca6199968ab0
Anthony-Vuong/Learning_CPP
Beginning C++ - From Beginner to Beyond/Section_19_Challenge3/main1.cpp
#include <iostream> #include <fstream> #include <string> #include <iomanip> #include <vector> #include <cstring> void num_found_words(std::string str, std::string key, int& found, int &num_words){ std::string temp_word; int i{0}, word_flag{0}; char c; do{ c = str.at(i); if(isal...
TOOL
0.998794
4.395538
{ "github_metadata": { "branch": "main", "commit_count": 151, "repo_created_at": "2023-10-19T16:23: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": "adf684435a...
92487f00-86de-4f3e-a48d-c7cc68e43d7d
gtcasl/gpuocelot
tests/cuda3.2/tests/radixSort/radixsort.h
/* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related...
ALGO
0.999665
6.806925
{ "github_metadata": { "branch": "master", "commit_count": 1716, "repo_created_at": "2015-03-18T21:40:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 288, "forks": 69, "issues": 49, "pull_requests": 2 }, "file_meta": { "content_id": "ffd5...
cd189e99-f53b-4938-9e2d-e8872c3a38eb
Cantera/cantera-svn
src/oneD/MultiNewton.cpp
/** * @file MultiNewton.cpp Damped Newton solver for 1D multi-domain problems */ /* * Copyright 2001 California Institute of Technology */ #include "cantera/oneD/MultiNewton.h" #include "cantera/base/vec_functions.h" #include <cstdio> #include <ctime> using namespace std; namespace Cantera { // unnamed-name...
ALGO
0.999985
5.467318
{ "github_metadata": { "branch": "master", "commit_count": 2971, "repo_created_at": "2013-04-29T19:40:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0d8a6a...
7dc16b29-d2f8-49ce-bc72-46c261cd7c85
ethz-asl/okvis
okvis_frontend/src/ProbabilisticStereoTriangulator.cpp
/********************************************************************************* * OKVIS - Open Keyframe-based Visual-Inertial SLAM * Copyright (c) 2015, Autonomous Systems Lab / ETH Zurich * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the ...
ALGO
0.996741
6.928847
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-02-04T18:30:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1309, "forks": 539, "issues": 62, "pull_requests": 4 }, "file_meta": { "content_id": "61bb...
5c83826c-2d1b-455a-af5d-e7862e59d0d3
suchita08/CPP
BinarySearch and question based on it/Next Alphabetical letter.cpp
#include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) int n; char arr[34]; //Program :: Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list that is larger than th...
ALGO
0.999996
4.201849
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-07-03T14:45: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": "106a5ec55...
85f95aa6-57ae-4475-a9c4-ec876de20caf
megh-bari/Striver-A2Z-DSA-Sheet
Step 03 - Solve Problems On Arrays/Hard/maximum-product-subarray.cpp
#include <bits/stdc++.h> using namespace std; // brute int maxProduct(vector<int> &nums) { int n = nums.size(); int maxi = INT_MIN; for (int i = 0; i < n; i++) { for (int j = i; j < n; j++) { int product = 1; for (int k = j; k < n; k++) { ...
ALGO
0.999959
5.345201
{ "github_metadata": { "branch": "main", "commit_count": 217, "repo_created_at": "2024-11-01T08:05:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 79, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a9bc5c7...
0b3f1b28-cd14-4005-8923-6848a8e16af8
gongdalinux/leetcode
1/offer/Offer40.最小的k个数.cpp
// 输入整数数组 arr ,找出其中最小的 k 个数。例如,输入4、5、1、6、2、7、3、8这8个数字,则最小的4个数字是1、2、3、4。 // 输入:arr = [3,2,1], k = 2 // 输出:[1,2] 或者 [2,1] vector<int> getLeastNumbers(vector<int>& arr, int k) { vector<int> res; sort(arr.begin(), arr.end()); for(int i=0; i<k; i++) res.push_back(arr[i]); return res; } class Solution { ...
ALGO
0.999974
5.832536
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-03-09T09:48: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": "e329923d2a...
560bbadb-4182-48c7-aada-7d7667f84a9b
1242003/First-Project
First Project/main.cpp
#include<iostream> #include<string> using namespace std; char board[3][3] = { {'1','2','3'},{'4','5','6'},{'7','8','9'} }; int row; int column; char TokenChar = 'x'; string name_of_player1 = " ", name_of_player2 = " "; bool draw = false; int count; void drawboard() { cout << "|--------------------|\n"; co...
ALGO
0.99831
3.581698
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-09-23T23:12: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": "7ad552ad96c5...
93be4d91-b84f-4544-8014-dd61c567d070
AashrayaMehta/AutonomousMedicalRobot
Aashraya_Culminating.ino
#include <Servo.h> // include the servo library #include "pitches.h" #include <LiquidCrystal.h> LiquidCrystal lcd(12,11,5,4,3,2); const int SPEAKER=6; //Speaker Pin const int leftLDR = A1; // left LDR attached to analog pin 1 const int rightLDR = A0; //right LDR att...
TOOL
0.910596
5.17478
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-11-03T23:45: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": "59b2ad1353...
313d921d-ba8c-4e65-829a-bc68a42f42eb
Toodles2You/tfc
src/server/entities/combat.cpp
/*** * * Copyright (c) 1996-2001, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. * All Rights Reserved. * * Use, distribution, and modification of this source code and/or resulting * obje...
TOOL
0.969557
5.646947
{ "github_metadata": { "branch": "main", "commit_count": 1696, "repo_created_at": "2024-01-25T18:32:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b497ccaa9...
3f7874fb-9042-4543-8015-2a1cc4164684
VarunSharma-syd/namesorter
namesorter.cpp
#include <iostream> #include <vector> #include <fstream> #include <string> #include <algorithm> using namespace std; /*Writing vector into the sorted file */ void write(vector<string> name){ ofstream fout; fout.open("sorted-names-list.txt"); for(int i=0;i<name.size();++i){ fout<<name[i]<<endl; } fout.close(...
TOOL
0.992284
4.484343
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-12-20T10:39: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": "324546d23dd0...
2b399410-2500-4633-9885-43c4693341d6
izhang05/Competitive-Programming
USACOW/Past Contests/2020 - 2021/Bronze/Y 2. 2021 January Bronze/Y 2. Even More Odd Photos/oddphoto.cpp
#include <bits/stdc++.h> using namespace std; void setIO() { ios_base::sync_with_stdio(false); cin.tie(nullptr); #ifdef LOCAL freopen("1.in", "r", stdin); #endif } int main() { setIO(); int n, a, even = 0, odd = 0; cin >> n; for (int i = 0; i < n; ++i) { cin >> a; if (a % ...
ALGO
0.99997
4.19401
{ "github_metadata": { "branch": "master", "commit_count": 691, "repo_created_at": "2021-01-21T17:58:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff536467...
37d2da34-a8d5-4f02-9698-3e08556d1070
aman-kumar-2002/LeetCode
Q1207.cpp
/*Given an array of integers arr, return true if the number of occurrences of each value in the array is unique or false otherwise.*/ #include <vector> #include <algorithm> using namespace std; class Solution { public: bool uniqueOccurrences(vector<int> &nums) { sort(nums.begin(), nums.end()); // Sort...
ALGO
0.999661
6.587693
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2025-02-10T17:18: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": "dba98c84cdd...
e065c945-0968-4e61-9b96-bb83c8aac7dd
nayakshweta19/osfeo
SRC/material/nD/NewTemplate3Dep/SANISAND_alpha_Eij.h
/////////////////////////////////////////////////////////////////////////////// // COPYLEFT (C): Woody's viral GPL-like license (by BJ): // ``This source code is Copyrighted in // U.S., for an indefinite period, and anybody // caught using it without our permi...
ALGO
0.998103
4.234872
{ "github_metadata": { "branch": "master", "commit_count": 396, "repo_created_at": "2016-04-13T08:57:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9da364a5...
71db624a-54d6-44c7-9325-e2b537fe443c
whonayem01/LightOJ
LOJ-1004 Monkey Banana Problem.cpp
#include <bits/stdc++.h> using namespace std; #define __Mammamia__ ios_base :: sync_with_stdio(false); #define ll long long #define MAXN 10507 #define MOD 100000007 int main() { __Mammamia__ ll test_case; cin>>test_case; ...
ALGO
0.999493
3.307684
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2020-08-17T07:06:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6cf725078...
5e2afd58-4db9-4495-9d83-a163aa76782d
pahlni/MazeRunner
PahlProject4.cpp
#include <cstdlib> #include <iostream> #include <fstream> #include <string> #include <time.h> using namespace std; int bruteForceMazeSolver(int i, int j); int backtrackingMazeSolver(int i, int j); int greedyMazeSolver(int i, int j); int divideAndConquerMazeSolver(int i, int j); int dynamicProgrammingMazeSolver(int i,...
ALGO
0.999893
4.411696
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-08-08T12:57:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07cbb2152d...
50805b35-dc49-4266-9608-c0f8c7097424
tarunsingh7379/Competitive-Programming-Practice
Codeforces/1000/A_Unimodal_Array.cpp
#include <bits/stdc++.h> typedef long long int ll; #define M 1000000007 using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } int flag = 1; int left = 0, right = n - 1; ...
ALGO
0.999992
3.99834
{ "github_metadata": { "branch": "main", "commit_count": 967, "repo_created_at": "2022-12-23T12:55: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": "8a2db009a1...
8431619c-b391-44e8-ab68-00e3fe6d7a79
ishandutta2007/codeforces-p
pinkrabbit/normal/708/D.cpp
#include <cstdio> #include <algorithm> namespace MinCostMaxFlows { typedef long long LL; const LL Inf = 0x3f3f3f3f3f3f3f3f; const int MN = 105, MM = 405; int N, S, T; LL Ans, Cost; int h[MN], iter[MN], nxt[MM * 2], to[MM * 2], tot; LL cap[MM * 2], cost[MM * 2]; inline void SetST(int _S, int _T) { S = _S, T =...
ALGO
0.999832
3.936702
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49: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": "3ff1e46b6870...
6c1f8238-3070-4763-857b-646adb0ce67f
travelbeeee/ProblemSolving
BOJ/BOJ2186.cpp
/* BFS + DP 단순 BFS 탐색으로 가능한 모든 경우의 수를 탐색하면 시간초과 혹은 메모리 초과에 직면한다. 1) 100 x 100 에서 80자의 영단어를 찾는 경우의 수는 100 x 100 Map과 80자의 영단어가 모든 한 알파벳으로 이루어진 최악의 경우만 생각해보아도 (4 * K) ^ 80 에 가까운 경우의 수가 생김. 2) 답에서 값의 범위가 int 라고 최대 21억에 가까운 경우의 수가 발생할 수 있는 뉘양스 --> DP 이용! Dp[i][j][l] := (i, j) 좌표에 word의 l까지 찾아서 도착한 경로의 수 wo...
ALGO
0.999924
4.502779
{ "github_metadata": { "branch": "master", "commit_count": 349, "repo_created_at": "2020-08-08T04:24: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": "c917e3e0...
70fb5076-82ed-4e89-ae01-1072bfb45627
hututudor/deriv
src/deriv/derivaSqrt.cpp
#include "derivaSqrt.h" #include "../utils/utils.h" void DerivaSqrt(node_t*& start) { if (start->token.type != TOKEN_SQRT) { throw_error( "ERROR. Trying to derivate something which is not SQRT with SQRT " "rules"); } node_t* f = start->left; node_t* fDerivat = new node_t(); CopySubTree...
ALGO
0.999801
5.259874
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2021-11-23T18:39:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff556afe...
0b8a38a0-65fb-4abb-bda3-b8e32ce0b625
kaiconwaylai/BranchAndBound
bnb/Tree.cpp
#pragma once #include "Tree.hpp" #include <set> #include <algorithm> #include <iostream> #include <queue> #include "FixedSizePQ.cpp" #include <fstream> void Tree::addNode(const std::string& name, int id, int dueTime, double processTime) { if(!nodes.count(name)) { nodes.emplace(name, std::make_shared<Node>(...
ALGO
0.99946
4.101707
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-11-24T12:52: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": "6149b487fea3...
c0a344f2-22d2-42bf-9fa5-3a05a48b08ad
mlpack/ensmallen
include/ensmallen_bits/sdp/primal_dual.hpp
/** * @file primal_dual.hpp * @author <NAME> * * * ensmallen is free software; you may redistribute it and/or modify it under * the terms of the 3-clause BSD license. You should have received a copy of * the 3-clause BSD license along with ensmallen. If not, see * http://www.opensource.org/licenses/BSD-3-Clau...
ALGO
0.988891
6.676468
{ "github_metadata": { "branch": "master", "commit_count": 3534, "repo_created_at": "2018-10-03T01:53:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 790, "forks": 128, "issues": 7, "pull_requests": 5 }, "file_meta": { "content_id": "e47e...
acd29417-3317-455b-99fd-e3fd3e312f17
akshitagupta15june/100daysofcode_hackerblock_akshita
subset_sum_easy.cpp
#include <bits/stdc++.h> using namespace std; bool subsetSumEasy(const vector<int> &v, int i = 0, int sum = 0, bool included = false) { if (i == v.size()) { return (sum == 0 && included); } bool inc = subsetSumEasy(v, i + 1, sum + v[i], true); bool exc = subsetSumEasy(v, i + 1, sum, includ...
ALGO
0.999851
5.442461
{ "github_metadata": { "branch": "master", "commit_count": 321, "repo_created_at": "2020-05-03T09:16:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db4a98d6...
46db43f4-03ac-4c2a-9278-7287487b2cd7
google/syzygy
syzygy/block_graph/ordered_block_graph_internal.h
// Copyright 2012 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
ALGO
0.993415
7.776018
{ "github_metadata": { "branch": "master", "commit_count": 3143, "repo_created_at": "2014-09-03T23:55:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 375, "forks": 59, "issues": 41, "pull_requests": 1 }, "file_meta": { "content_id": "d7cc...
fc034ec3-df64-403e-8fb4-1d581fb741d0
mahajanchirag/linked_list_questions
Add Two Numbers.cpp
class Solution { public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { if(l1==NULL) { return l2; } if(l2==NULL) { return l1; } int c=0; ListNode* head=NULL; ListNode* tail=NULL; ...
ALGO
0.999972
6.01545
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-07-09T15:00: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": "231b98bb5db...
af4ef930-dd16-4b15-a198-c21d1fc5f522
sailohith7780/Operating-System
WORST FIT.cpp
#include <stdio.h> void worstFit(int blocks[], int bCount, int processes[], int pCount) { int alloc[pCount]; for (int i = 0; i < pCount; i++) alloc[i] = -1; for (int i = 0; i < pCount; i++) { int worst = -1; for (int j = 0; j < bCount; j++) if (blocks[j] >= processes[i] && (wor...
ALGO
0.999006
4.15955
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-12-03T09:11: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": "2f98d7b5966...
3590c12e-26dd-4452-8ec3-6c3c120b080b
VA-run23/GeeksforGeeks-POTD
April/POTD_06_04_2025.cpp
/* Topological Sorting using Kahn's Algorithm (BFS approach) 1. Create an adjacency list (adj) and an in-degree array (inDeg) to store directed edges and count incoming edges for each node. 2. Populate the adjacency list and update the in-degree of each node based on the directed edges provided in ...
ALGO
0.999998
6.681005
{ "github_metadata": { "branch": "main", "commit_count": 266, "repo_created_at": "2025-01-05T07:57: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": "beb87f4c93...
0d239953-73dc-4461-bd73-87e65d75e648
Symas1/Algorithmic-Problems
Chapter 17 Dynamic Programming/string_interleaving.cpp
#include <string> #include <random> #include <assert.h> #include <iostream> #include <unordered_map> using namespace std; bool interleave_rec_helper(const string& a, const string& b, const string&c, int a_it, int b_it); bool interleave_rec(const string& a, const string& b, const string&c) { if (a.size() + b.size() !...
ALGO
0.999896
5.407858
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-02-25T00:59: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": "724bae8209...
9be92d4c-0cb3-4a06-aea9-3589779fc7f0
fatemehkarimi/codeforces-solutions
codeforces-402C.cpp
//https://codeforces.com/problemset/problem/402/C #include <iostream> #include <vector> using namespace std; int main(void) { int T; cin >> T; while(T--){ int n, p; cin >> n >> p; vector <vector <bool> > Graph(n, vector <bool> (n, 0)); for(int i = 0; i < n; ++i) Graph[i][(i + 1) % n] = Graph[(i + 1) ...
ALGO
0.999912
4.135053
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2024-05-24T15:15: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": "3821e2991...
91438235-e42f-4359-ae42-1bb3a0e2f46b
tymoneq/competive_programing
OI_II_etap/done/algorythms/Lca.cpp
#include <bits/stdc++.h> using namespace std; constexpr int M = 1e6 + 10; vector<int> Graph[M]; int Pre[M], Post[M], jmp[M][17], Cost[M][17], Depth[M]; int timer, L = 17; void dfs(int v, int p) { timer++; Pre[v] = timer; Depth[v] = Depth[p] + 1; jmp[v][0] = p; for (int i = 1; i <= L; i++) ...
ALGO
0.999841
3.971832
{ "github_metadata": { "branch": "main", "commit_count": 456, "repo_created_at": "2022-09-20T19:22:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4189dd9ebc...
3e785d3b-f5ea-4eae-a588-612f6003a989
hosua/leetcode-solutions
c++/koko_eating_bananas.cc
#include <bits/stdc++.h> using namespace std; class Solution { public: int minEatingSpeed(vector<int>& piles, int h) { const int N = piles.size(); // We can never take 0 hours to eat any bananas. int left = 1; // The maximum number of hours we can possibly take is the maximal element in piles. // It will...
ALGO
0.999914
4.986876
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-11-08T07:17: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": "1b266a938cf5...
ded41cde-888c-47ad-8fcc-d37f272e3db0
kostya911/C-Ess-KI3
Chapter-5/Lab-5.3.13(8)_double_linked_list/Lab-5.3.13(8)_double_linked_list/Lab-5.3.13(8)_double_linked_list.cpp
#include "stdafx.h" #include <iostream> using namespace std; class Node { public: Node():value(0){} Node(int val): value(val), next(nullptr), prev(nullptr){} ~Node(){}; int value; Node* next; Node* prev; }; class List { public: List(): head(nullptr), tail(nullptr){} List(List &that) { int size = that.size(...
ALGO
0.932389
4.401147
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2017-10-24T08:38:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6eece1c61...
dcf7962c-699f-4126-bb14-a3d7cda0856a
nemisolv/dsa-init
test/temp.cpp
#include <bits/stdc++.h> using namespace std; int split(const string s, char delimeter = '-') { int index = 0; for(int i = 0;i < s.size(); ++i) { if(s[i] == delimeter) { index = i; break; } } return index; } int main() { #ifndef TEST_JUDGE freopen("input....
ALGO
0.999306
4.22664
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-22T07:18: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": "ba4b533807e5...
1601aea5-e915-422f-87b1-b9d9dc524272
mamun-akand/Programming-Problem-Solving-List
00 CP Course Contest/Contest-6D.cpp
// URL: https://codeforces.com/problemset/problem/1352/C #include<bits/stdc++.h> using namespace std; //==================================================================== //TYPES #define ll long long int #define ld long double #define vll vector <ll> //FUNCTIONS #define FAST ios_base::sync_with_stdio...
ALGO
0.999921
3.623136
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2022-03-26T08:39: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": "db336291625...
7bc3074b-a22c-4fe4-a7e5-c64ad5fb03af
wpilibsuite/allwpilib
wpimath/src/main/native/include/frc/controller/ArmFeedforward.h
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #pragma once #include <cstdlib> #include <wpi/MathExtras.h> #include <wpi/SymbolExports.h> #include "units/angle.h" #...
ALGO
0.997932
7.289184
{ "github_metadata": { "branch": "main", "commit_count": 7447, "repo_created_at": "2014-09-30T20:51:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1185, "forks": 658, "issues": 433, "pull_requests": 134 }, "file_meta": { "content_id": "5...
4c1942eb-b6cb-40b0-9c21-fd5c680a1d16
DuongHaoNika/DSA_PTITxSAMSUNG_Advance
CP01003 - SỐ THUẦN NGUYÊN TỐ.cpp
#include <iostream> #include <iomanip> #include <math.h> #include <vector> #include <algorithm> #include <set> #include <map> #include <stack> #include <queue> #include <iterator> #include <string> #define ll long long #define Sync ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl '\n'; using namespac...
ALGO
0.999875
5.048232
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2023-08-11T16:07:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58062540e...
0ccbe20d-d975-439e-9e8d-1d61cde94649
Osama-Kawkabah/ProblemSolving
Algorithms & Problem-Solving Level 3/Problem #38/Problem #38/Problem #38.cpp
#include <iostream> #include <string> using namespace std; string ReadString() { string C1; cout << "Please Enter Your char:\n"; getline(cin, C1); return C1; } string TrimLeft(string S1) { char delim = ' '; for (int i = 0; i < S1.length(); i++) { if (S1[i] != delim) { r...
TOOL
0.96168
4.09895
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-10T19:07: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": "251ec5595efd...
f046afd1-25de-432a-bbe2-95bd53fd7273
dizzy2003/MuckyFoot-UrbanChaos
thrust/tb.cpp
// // Tractor beams! // #include "always.h" #include "orb.h" #include "os.h" #include "ship.h" #include "tb.h" // // The tractor beams. // TB_Tb TB_tb[TB_MAX_TBS]; // // The texture we use to draw the tractor beams. // OS_Texture *TB_ot; void TB_init() { memset(TB_tb, 0, sizeof(TB_tb)); TB_ot = OS_texture_...
ALGO
0.993394
3.730842
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-05-20T01:12:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 241, "forks": 49, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "2f1d5a8...
a4630f46-120a-4017-bb87-14a55b85f58e
flashxio/FlashX
flash-graph/libgraph-algs/sem_kmeans.h
/* * Copyright 2015 Open Connectome Project (http://openconnecto.me) * Written by <NAME> (<EMAIL>) * * This file is part of FlashGraph. * * 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...
ALGO
0.99983
6.515285
{ "github_metadata": { "branch": "release", "commit_count": 5855, "repo_created_at": "2014-04-23T16:41:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 233, "forks": 52, "issues": 154, "pull_requests": 1 }, "file_meta": { "content_id": "05...
73a1e15e-640b-438a-9e9f-c583c2e88fbc
Faca1988/Graphs-Algorithms
dijkstra.h
#include "graph.h" using namespace std; class Dijkstra { private: Graph* g; bool ExistSomeNodeWithoutPermanentWeight(); Node* GetNodeWithLessTemporalWeight(); void SetTemporalWeights(Node* currentNode); NodesList GetMinimalPath(Node* originNode, Node* destinationNode); void RenderMinimalPath(...
ALGO
0.999269
5.359764
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-11-20T19:19: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": "e8d707a0b7...
42a63865-41d9-4253-8c4b-dda64bbf8c5f
toshihoge/ACM-ICPC-Practice
ICPC/Elimination-Japan/2008/d/d.cpp
//-------------------------------------- // Begin common header //-------------------------------------- #include<algorithm> #include<cmath> #include<complex> #include<cstdio> #include<iostream> #include<map> #include<queue> #include<set> #include<sstream> #include<vector> using namespace std; typedef pair<int, int> ...
ALGO
0.999825
3.64687
{ "github_metadata": { "branch": "master", "commit_count": 263, "repo_created_at": "2011-01-08T15:02:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "155f0d56...
f81412fb-7586-4f08-b433-d22abaa0aa73
dnasdw/sdw_ue_test_cm52
Source/sdw_ue_test_cm52/Public/Game/CGaussBlur.cpp
#include "CGaussBlur.h" namespace Super2048UE { vector<n32> CGaussBlur::boxesForGauss(f32 a_fSigma, n32 a_nN) { // Ideal averaging filter width f32 fWIdeal = sqrt((12 * a_fSigma * a_fSigma / a_nN) + 1); n32 nWL = static_cast<n32>(floor(fWIdeal)); if (nWL % 2 == 0) { nWL--; } n32 nWU = nWL + 2; f...
ALGO
0.99816
5.128505
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-09-24T07:31:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "318c2c1182...
b91f046b-28d4-4b24-96fb-bf1f8db3fccd
powxconsensus/CP-Practice
C2_Guessing_the_Greatest_hard_version_.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cmath> #include <map> #include <set> #include <climits> using namespace std; #define mod 998244353 #define lli long long int #define ll long long #define li long int #define FastIO \ ios::sync_with_stdio(0); \ cin.tie(0) class...
ALGO
0.999983
3.704966
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2021-02-17T12:42: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": "0c7803090...
e279900d-a63a-4c81-9722-e8e85f64c9d8
WorldOfWheat/CodeDepositary
C_C++/ZJ/f640 函數運算式求值.cpp
#include <bits/stdc++.h> #define int long long #define pii pair<int, int> #define F first #define S second #define pb push_back #define rep(x, y ,z) for(int x = y; x < z; x++) #define rep2(x, y ,z) for(int x = y; x <= z; x++) #define rrep(x, y ,z) for(int x = y; x > z; x--) #define ln "\n" #define sp " " using namespa...
ALGO
0.998914
3.129321
{ "github_metadata": { "branch": "main", "commit_count": 540, "repo_created_at": "2022-07-25T08:13:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a40619889a...
b08dba6e-a32a-4fc0-87d8-6f1a78f37ebd
triSYCL/sycl
libcxx/include/__algorithm/copy_backward.h
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
ALGO
0.996531
7.72079
{ "github_metadata": { "branch": "sycl/unified/master", "commit_count": 461633, "repo_created_at": "2019-04-01T18:29:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 120, "forks": 21, "issues": 46, "pull_requests": 6 }, "file_meta": { "con...