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
85dbac63-84b6-4a42-a9c7-f8d42ae5a0dd
Dantalian310/leetcode
[125]验证回文串.cpp
/** 如果在将所有大写字符转换为小写字符、并移除所有非字母数字字符之后,短语正着读和反着读都一样。则可以认为该短语是一个 回文串 。 字母和数字都属于字母数字字符。 给你一个字符串 s,如果它是 回文串 ,返回 true ;否则,返回 false 。 示例 1: 输入: s = "A man, a plan, a canal: Panama" 输出:true 解释:"amanaplanacanalpanama" 是回文串。 示例 2: 输入:s = "race a car" 输出:false 解释:"raceacar" 不是回文串。 示例 3: 输入:s = " " ...
ALGO
0.999551
5.792535
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-05-07T13:51:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2b13aa2bc271...
51c36d41-4fc3-4826-bbd7-bd3405bbaf1c
prajwal1721/Competitve-Programming
SJ/LUCKYNUM.cpp
// link: // [prajwal1721] // g++ -Wall -Wextra -Wshadow filename.cpp // ./a.out >input <output /*comments: very imp sum */ #include<bits/stdc++.h> using namespace std; #define mod 1000000007 #define gcd(a,b) __gcd(a,b) #define lcm(a,b) (a*(b/gcd(a,b)) #define bits(x) __builtin_popcountll(x) #define vi ...
ALGO
0.999739
3.389982
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2019-12-12T07:51: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": "bcdf2302...
7845eb18-3d6b-41ff-8100-1c749435a770
splucs/Competitive-Programming
Leetcode/1845.cpp
#define parent(x) ((x)>>1) #define left(x) ((x)<<1) #define right(x) (((x)<<1)+1) class SeatManager { private: vector<int> heap; void init(int n) { heap.resize(n+1); for (int i = 0; i <= n; i++) { heap[i] = i; } } void seafup(int i) { while (i > 1) { ...
ALGO
0.999732
5.883999
{ "github_metadata": { "branch": "master", "commit_count": 406, "repo_created_at": "2017-03-16T20:42:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 136, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db4c6...
e39773f2-ab3f-4263-97de-1a350ee72c31
MiguelAngelLardo/UTN
1.1)PRO1_LAB1_SPD_MAT_ARSO/1-Programacion1/7.1)Guia7_ARRAY2023/EJ6 CADENAS/EJ6A.cpp
#include <iostream> // Incluimos la librería iostream para entrada/salida estándar #include <iomanip> // Necesario para setprecision #include <cstring> // La libreria cstring tiene la funcion 'strcpy' => es para copiar un array a otra variable #include<locale> //es la biblioteca => tiene funciones como setlocale para c...
TOOL
0.98924
3.653728
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-02-11T00:06: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": "9379f80e54f...
c4dc870e-39b9-4f40-99ec-b17a94d3df73
Adams-Labs/Lab-6-STL
main.cpp
/* * This is the main.cpp file for lab 07 that demonstrates the use of the STL and vector class functions. * * File: main.cpp * Author: <NAME> * * Created on November 18, 2020, 7:38 PM */ #include <cstdlib> #include <iostream> #include "Circle.hpp" #include "Rectangle.hpp" #include <vector> using namespac...
TOOL
0.938716
3.657768
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-04-15T18:59:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae80df762b2eb...
9692eaf8-9199-400b-9c93-a0c548db9cce
Lppy/Calculation
Model/Function/curve_fitting.h
#ifndef CURVE_FITTING #define CURVE_FITTING #include <vector> #include <cstddef> #include <cmath> using namespace std; class Fit { vector<double> factor; double ssr; double sse; double rmse; vector<double> fitedY; public: Fit() :ssr(0), sse(0), rmse(0) { factor.resize(2, 0); } ~Fit() {} //直线拟合,一元回归,默认数...
ALGO
0.992007
4.532527
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2017-07-06T09:04: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": "08a50df7...
a274ae21-a1c3-4f60-a072-c2c685393e12
hellozmz/LeetCode
Stronger/2022.1024.cpp
#include <cmath> #include <climits> #include <iostream> #include <set> #include <string> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; // https://leetcode.cn/circle/discuss/KfFr9S/ /** * @brief 获取到候选集合 * * @tparam T * @param result * @param path * @param input *...
ALGO
0.999841
4.909236
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2020-01-20T11:32:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d01f8a41...
0632014f-1a6b-4244-af75-f80715004395
Manish-CS25/A2Z_DSA_Leetcode
2493-reverse-odd-levels-of-binary-tree/reverse-odd-levels-of-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.999988
5.786218
{ "github_metadata": { "branch": "main", "commit_count": 1511, "repo_created_at": "2024-05-11T08:34: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": "e6a31dc24...
ad545c38-bc83-4535-94dd-8c0a9ce291af
samiullahsaleem/cyberblock
C++/Binary.cpp
#include<iostream> #include<string> using namespace std; class Binary { private: string s; public: void read(); void check_binary(); void compliment(); void diaplay(); }; void Binary :: read() { cout << "Enter a binary number: "; cin >> s; } void Binary :: chec...
ALGO
0.983404
4.763177
{ "github_metadata": { "branch": "main", "commit_count": 1073, "repo_created_at": "2022-09-30T11:04:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 160, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ffbac2...
b17128f8-e0c0-4017-8fca-04eeb4b5751d
casys-kaist/sia
ideal/sindex_model.h
/* * The code is part of the SIndex project. * * Copyright (C) 2020 Institute of Parallel and Distributed Systems (IPADS), * Shanghai Jiao Tong University. 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...
DATA
0.933534
6.304553
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-04-16T04:11:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "063fd7e1d145e...
2c7db41c-b307-409a-ab53-daf60f0e2669
StupidFraid/Modern-programming-languages
Lab_3/SortedSubArray.cpp
#include <iostream> #include <algorithm> void sortSubarray(int arr[], int n, int N1, int N2) { std::sort(arr + N1, arr + N2 + 1); } int main() { int arr[] = {2, 5, -8, 1, 4, -6, 3, -5, -9, 13, 0, 4, 9}; int n = sizeof(arr) / sizeof(arr[0]); int N1 = 3, N2 = 8; // примерные значения N1 и N2 std::...
ALGO
0.999933
5.652604
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-02-19T10:34: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": "b0ffa9b63faa...
e07ae778-b20d-47fe-a90d-28cd3e2c551e
hana-week/Algorithm
백준/Diamond/1557. 제곱 ㄴㄴ/제곱 ㄴㄴ.cc
#include <bits/stdc++.h> #define i64 long long #define MAX (i64)1e10 #define SIZE (i64)1'000'010 using namespace std; int mobius[SIZE] = { 0 }; void _init_mobius() { mobius[1] = 1; for (int i = 1; i <= SIZE; i++) { for (int j = 2 * i; j <= SIZE; j += i) { mobius[j] -= mobius[i]; } } } i64 compute...
ALGO
0.999984
4.203758
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2024-07-09T12:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "203a963a6b...
27b3189b-2643-45fa-b6c1-40cbbd197670
metab0t/PyOptInterface
thirdparty/cppad/include/cppad/utility/index_sort.hpp
# ifndef CPPAD_UTILITY_INDEX_SORT_HPP # define CPPAD_UTILITY_INDEX_SORT_HPP // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later // SPDX-FileCopyrightText: <NAME> <<EMAIL>> // SPDX-FileContributor: 2003-24 <NAME> // ---------------------------------------------------------------------------- /* {xrst_begin index_so...
ALGO
0.999927
6.603405
{ "github_metadata": { "branch": "master", "commit_count": 417, "repo_created_at": "2023-06-13T16:11:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 281, "forks": 16, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "2a8a2...
0cd6c2c6-cd51-492c-98ff-547f32b22c3f
drrtuy/misc
ya_algo/7_dynamic_prog/B_schedule.cpp
#include <iostream> #include <vector> #include <cassert> #include <sstream> #include <algorithm> void scheduleWrapper(std::istream& in, std::ostream& out); void scheduleTest(std::vector<std::string>& input, std::string& expected) { std::stringstream in; std::stringstream ss; for (auto& e: input) i...
ALGO
0.999785
3.855186
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2016-12-26T12:57:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99dd5126...
c57d585d-b275-4390-9613-54a8c22a269e
blueknarr/Algorithm
SW-Expert-Academy/3752. 가능한 시험 점수/source.cpp
#include <iostream> #include <queue> using namespace std; #define GSIZE 101 int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 }; int N, M; typedef struct Graph{ char adj_mat[GSIZE][GSIZE]; int visited[GSIZE][GSIZE]; }Graph; struct element{ int x, y; }; int safe(int a, int b) { return (a >= 0 && a < N) && (b ...
ALGO
0.999946
4.021591
{ "github_metadata": { "branch": "master", "commit_count": 248, "repo_created_at": "2018-12-09T16:37:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1692bd0...
7d5610a5-bf99-4746-a8ef-679cdeb6b6d1
NayanJD/Competitive
cpp/dp/stock_price.cpp
// https://leetcode.com/explore/interview/card/amazon/80/dynamic-programming/505/ // You are given an array prices where prices[i] is the price of a given stock on the ith day. // You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. ...
ALGO
0.999717
5.955134
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2018-07-25T08:44:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed92a45190...
5621b858-af49-4996-afc5-1512f6be912c
InnogeeksOrganization/coderspree
ML/g-paras_ParasGupta_1923ec1161_3/StacksAndQueues/infix-conversions-official.cpp
#include <bits/stdc++.h> using namespace std; int prec(char c) { if (c == '*' || c == '/') return 2; else if (c == '+' || c == '-') return 1; else return -1; } bool isOperand(char c) { return (c >= 'a' && c <= 'z'); } string postfix(string s) { stack<char> st; string ...
ALGO
0.999906
4.912717
{ "github_metadata": { "branch": "main", "commit_count": 2721, "repo_created_at": "2021-09-26T09:23:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21, "forks": 151, "issues": 1, "pull_requests": 7 }, "file_meta": { "content_id": "2c48ca9...
e17ee85a-635b-4719-b1ac-88a9572a832a
jesusherrera94/cpp-practice-exercises
templates/templatesEx2/main.cpp
#include <iostream> #include "ordenar.h" using namespace std; template< typename T> void pedirDatos(T *arreglo, int n) { for (int i = 0; i < n; i++) { cout<<"Digite un elemento: "; cin>>arreglo[i]; } } template <typename T> void mostrarArreglo(T *arreglo, int n) { for (int i = 0; ...
ALGO
0.998045
4.72102
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-08-30T03:59: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": "f3536f7132f...
48597255-eb0a-49d6-8321-fbeca2b53697
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p02866/s364851437.cpp
#include<iostream> #include<iomanip> #include<cmath> #include<string> #include<cstring> #include<vector> #include<list> #include<algorithm> #include<map> #include<set> #include<queue> #include<stack> using namespace std; typedef long long ll; #define fi first #define se second #define mp make_pair #define rep(i, n) for...
ALGO
0.999969
4.21984
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "a997d158ec...
e808e449-e1fd-45e5-b01c-dd9bb645d134
syniox/Online_Judge_solutions
AtCoder/ARC090E.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cassert> #include <queue> typedef long long lint; const int N=1e5+5; const int mod=1e9+7; int n,m,qs,qt,scnt[N],tcnt[N]; lint totl,sdis[N],tdis[N]; namespace utils{ template <class T> inline void apn(T &x,const T y){x=x<y?x:y;} template <class T> inl...
ALGO
0.999926
4.3624
{ "github_metadata": { "branch": "master", "commit_count": 1071, "repo_created_at": "2018-06-07T03:31:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 59, "pull_requests": 0 }, "file_meta": { "content_id": "a514b3...
1eecb58c-5316-480a-8525-84f733bc726f
richwill28/cp
kattis/goingtoseed/cpp/main.cpp
#include <algorithm> #include <iostream> #include <utility> std::pair<int, int> range(int L, int R) { // Number of trees left. int n = R - L + 1; // Only two trees left. if (n == 2) { std::cout << "Q " << L << " " << L << " " << R << " " << R << "\n"; std::cout.flush(); int w1, w2; std::cin >...
ALGO
0.999948
3.649188
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-01-17T18:18:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19052b8e43...
a89c8ad4-1d0a-409f-be1b-1ca25eea0726
merts1905/Bacteria-Simulation
Bacteria_Simulation.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> using namespace std; int main() { ifstream in; in.open("data.txt"); string read; vector<char> bacteria; vector<string> rules; vector<string> start; int row, col; // READING part ...................................................
TOOL
0.969016
3.191718
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-09-06T14:35:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "994bccff57...
ecf8d207-2b73-4167-962d-9e01aacaf294
SS961214/BoundsOnEigenstateThermalization
PBC_TI/ShortRange_Spin/constructGlobalOp.hpp
#pragma once #include <HilbertSpace/ManyBodyHilbertSpace/TransSector.hpp> #include <Eigen/Dense> template<typename Scalar, class TotalSpace_> Eigen::MatrixX<Scalar> construct_globalOp(Eigen::MatrixX<Scalar> const& locOp, TransSector<TotalSpace_, Scalar> const& subSp...
ALGO
0.980434
6.462541
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-01-20T08:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26f3bc8c6fbc...
a761592b-6e3b-4851-81de-b04b31cfd87b
Jeong-Minkyeong/INHA_OSAP_003_5
set.h
/** * MIT License Copyright (c) 2024 오픈소스응용프로그래밍 3분반 5팀 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
ALGO
0.996682
5.071048
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2024-10-29T12:11:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9da0cc9afcb...
e95ba46d-ce64-45a9-9855-6c1e6efbfe99
TixiaoShan/LVI-SAM
src/visual_odometry/visual_loop/loop_detection.cpp
#include "loop_detection.h" LoopDetector::LoopDetector(){} void LoopDetector::loadVocabulary(std::string voc_path) { voc = new BriefVocabulary(voc_path); db.setVocabulary(*voc, false, 0); } void LoopDetector::addKeyFrame(KeyFrame* cur_kf, bool flag_detect_loop) { int loop_index = -1; if (flag_detect_lo...
ALGO
0.940196
4.132656
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2021-03-04T02:26:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1668, "forks": 489, "issues": 11, "pull_requests": 1 }, "file_meta": { "content_id": "ff7...
d3ce12a0-c4db-4ecb-ac88-bd0fac80e881
erbth/TCLM
src/server/Lock_Forest.cpp
#include "Lock_Forest.h" #include "Lock_Request.h" #include <algorithm> using namespace std; using namespace server; Lock_Forest::~Lock_Forest () { /* Delete the locks. */ for_each (roots.begin(), roots.end(), [](pair<string, Lock*> p) { delete p.second; }); } shared_ptr<vector<string>> Lock_Forest::spli...
TOOL
0.929547
4.893744
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2019-09-04T21:24: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": "58cccae70...
458af329-0a53-4cc4-b4de-3bf58ab67eee
hyamadev331/Atcoder
ABC299/d.cpp
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < ll(n); i++) #define reps(i, n) for (ll i = 1; i < ll(n); i++) #define rrep(i, n) for (ll i = ll(n); i >= 0; i--) #define ALL(x) x.begin(), x.end() #define FOR(i, a, b) for (ll i = a; i <= b; i++) // 使いにくかったら消す #define len(x) x.length() ...
ALGO
0.999146
3.071984
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-06-15T14:47:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9534b5c3071...
d61c1952-8f55-470b-99cf-41286b1052cf
atul4sharma/interviewbit
strings/print_zig_zag_string.cpp
// https://www.interviewbit.com/problems/zigzag-string/ #include <iostream> #include <vector> #include <string> //P.......A........H.......N //..A..P....L....S....I...I....G //....Y.........I........R // //A....C //...B....D void print_zig_zag(std::vector<std::vector<char>> const & x) { for(std::size_t i = 0;...
ALGO
0.999993
5.058626
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-04-09T17:13:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7dc90d2a7...
02a07dde-a643-44dd-9b47-5ea52b3b7bec
wdndev/personal
leetcode/04_hot100/07_list/234.回文链表.cpp
/* * @lc app=leetcode.cn id=234 lang=cpp * * [234] 回文链表 * * https://leetcode.cn/problems/palindrome-linked-list/description/ * * algorithms * Easy (53.71%) * Likes: 1820 * Dislikes: 0 * Total Accepted: 659.3K * Total Submissions: 1.2M * Testcase Example: '[1,2,2,1]' * * 给你一个单链表的头节点 head ,请你判断该链表是否...
ALGO
0.999736
6.122045
{ "github_metadata": { "branch": "main", "commit_count": 265, "repo_created_at": "2023-05-17T07:32:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ffe17ab9...
259e1cb2-dc5d-403a-bf12-dc1a114f7f7c
silenke/my-leetcode
problems/剑指 Offer 10- I. 斐波那契数列/2.cc
#include "..\..\leetcode.h" class Solution { public: int fib(int n) { if (n < 2) return n; matrix a{{1, 1}, {1, 0}}; return pow(a, n - 1)[0][0]; } private: const int mod = 1e9 + 7; typedef vector<vector<long>> matrix; matrix mul(matrix& a, matrix& b) { matrix c{...
ALGO
0.999956
5.408132
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-06-28T14:36: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": "2b547eba16...
fed1ff85-4333-4f8d-936c-c74dbec457ee
kookjd7759/Algorithm
백준/Bronze/10193. Word Swap/Word Swap.cc
#include <bits/stdc++.h> #define Sync ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr) #define Fixed(x) cout << fixed; cout.precision(x) #define Interactive cin.tie(0)->sync_with_stdio(0) #define instr(x) getline(cin, x) #define ll long long #define in cin >> #define out cout << #define spc << " " <...
ALGO
0.999914
4.311933
{ "github_metadata": { "branch": "main", "commit_count": 2962, "repo_created_at": "2023-08-07T12:27: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": "150c044d7...
46a2a06c-0be4-4e8f-80ea-a7ece88df34d
yakman2020/systemctl-win
exec/systemd-exec.cpp
/* Copyright 2012 Cloudbase Solutions Srl 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 law or agree...
TOOL
0.961204
5.779276
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2018-03-29T19:15:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "dc8b03a38...
57b9279a-1790-418b-88c5-cbebddac1828
dynamic-pigeon/Template
Tool/NTT.h
namespace NTT { constexpr i64 MOD = 998244353; constexpr i64 G = 3; std::vector<int> tax; i64 inv; constexpr i64 power(i64 x, i64 y) { i64 res = 1; while (y) { if (y & 1) { res = res * x % MOD; } x = x * x % MOD; y >>= 1; } return res; } void make_rev(int n) { inv = power(n, MOD - 2...
ALGO
0.99987
5.014954
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-03-05T12:13:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "848f0009e18...
4946445d-bc2d-4b21-8781-63c13cc86a45
sjtu-imperishable-night/code-library
Template/Template of Other Teams/Reshiram/limited/source/Data-Structure/Persistent-Treap.cpp
int ran() { static int ret = 182381727; return (ret += (ret << 1) + 717271723) & (~0u >> 1); } int alloc(int node = 0) { size++; if (node) { c[size][0] = c[node][0]; c[size][1] = c[node][1]; s[size] = s[node]; d[size] = d[node]; } else{ c[size][0] = c[size][1] = 0; s[size] = 1; d[size] = ' '; } re...
ALGO
0.999989
3.855854
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-07-26T11:23:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16fcf5521c...
188c6577-8558-44c8-a076-201b0238c378
ishandutta2007/codeforces-n
nigus/normal/1466/G.cpp
#pragma GCC optimize("O3") // #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define per(i, b, a) for(int i = b - 1; i >= a; i--) #define trav(a, x) for(auto& a : x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int...
ALGO
0.998468
4.223736
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35: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": "b7105f2efa3e...
108a7425-6192-45b8-8af2-56b37335a8f5
drunkwater/leetcode
medium/cpp/c0301_648_replace-words/00_leetcode_0301.cpp
// DRUNKWATER TEMPLATE(add description and prototypes) // Question Title and Description on leetcode.com // Function Declaration and Function Prototypes on leetcode.com //648. Replace Words //In English, we have a concept called root, which can be followed by some other words to form another longer word - let's call th...
ALGO
0.999252
5.266244
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-04-03T03:07:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9730c183df...
db502797-65c9-4c54-9ceb-63daa2a04744
ishaanjav/Codeforces-Solutions
1176C_LoseIt.cpp
/* * Created by ishaanjav * github.com/ishaanjav * Codeforces Solutions: https://github.com/ishaanjav/Codeforces-Solutions */ #include <iostream> using namespace std; #define ll long long #define pb push_back #define ins insert #define mp make_pair #define pii pair<int, int> #define pil pair<int, ll> #define pll ...
ALGO
0.999946
4.027422
{ "github_metadata": { "branch": "main", "commit_count": 122, "repo_created_at": "2020-11-01T15:41:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e0a68b777...
96ae9a99-9cc9-4f89-8b52-e9be8e989221
J-AugustoManzano/UnderCPP
Cap03/c03ex10.cpp
// c03ex10.cpp #include <iostream> #include <string> #include <print> #include <limits> #include <queue> // Estrutura para gerenciar a fila com prioridade using ItemFila = std::pair<std::pair<int16_t, int16_t>, std::string>; using FilaPrioridade = std::priority_queue<ItemFila, std::vector<ItemFila>, std::greater<...
TOOL
0.938242
4.784523
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-02-06T03:49: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": "4e47710be276...
e8ecc5df-b83a-4fed-8973-8d2d3a28d46e
lvcvsk/aed3
taller2/ej0.cpp
#include <iostream> #include <map> #include <string> #include <vector> #include <stack> using namespace std; enum {WHITE, GREY, BLACK}; int n, m; vector<vector<int>> D; vector<vector<int>> D_T; void dfs_initial(int v, vector<int> &status, stack<int> &s){ status[v] = GREY; for(int u : D[v]){ if(status[...
ALGO
0.999874
3.944403
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-08-17T16:19:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d635279aa0d...
27081ed7-f12b-4e5f-9a90-b8b13a805164
welcra/First-1000000-Twin-Primes
twin_primes.cpp
#include <iostream> #include <fstream> using namespace std; bool isPrime(int number) { if (number <= 1) { return false; } if (number == 3) { return true; } if (number % 2 == 0) { return false; } for (int i = 3; i * i <= number; i += 2) { if (number % i ==...
ALGO
0.995242
4.640771
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-07-28T23:26:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4dfaea7b24f7...
527aab88-ff7e-46af-9f75-a4994bba9ada
zcoderz/cppAlgorithms
dynamic_programming/LongestDivisibleSubset.h
// // Created by usman on 10/26/22. // #ifndef CPPALGORITHMS_LONGESTDIVISIBLESUBSET_H #define CPPALGORITHMS_LONGESTDIVISIBLESUBSET_H #include <vector> #include <algorithm> #include <iostream> #include <iterator> using namespace std; class LongestDivisibleSubset { public: static vector<int> largestDivisibleSubse...
ALGO
0.999463
5.731107
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2021-10-20T00:44: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": "537cb3cc...
dc6d59ce-6209-405f-85ce-618474459cee
Arinjay-04/DSA-Question
Arrays and Vector/XOR_Subarray.cpp
// Given an array of integers A and an integer B. // Find the total number of subarrays having bitwise XOR of all elements equals to B. // Problem Constraints // 1 <= length of the array <= 105 // 1 <= A[i], B <= 109 // Input Format // The first argument given is the integer array A. // The second argument giv...
ALGO
0.999923
5.558144
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-03-11T16:27: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": "963fcb002f0...
bdec7d55-d133-4a89-9d3f-addf1e3e3281
prakhar-5447/dsa_leetcode
reverse_words_in_a_string.cpp
// https://leetcode.com/problems/reverse-words-in-a-string/description/ #include <bits/stdc++.h> #define vi vector<int> #define vii vector<vector<int>> #define f(i, j, k) for (int i = j; i < k; i++) #define fr(i, j, k) for (int i = j; i >= k; i--) #define c(a) cout << a << endl using namespace std; class Solution {...
ALGO
0.999965
5.399949
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-04-13T09:41: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": "c86e1faadf...
0082a3c3-3e3c-4f65-8276-6aee0a58ef07
knixk/DSA-Journey-Kanishk
problem solving/self/misc/mountains.cpp
class Solution { public: int longestMountain(vector<int>& arr) { int n = arr.size(); int largest = 0; for (int i = 1; i <= n - 2; i++) { if (arr[i] > arr[i + 1] and arr[i] > arr[i - 1]) { int cnt = 1; int j = i; int k = i; int l = ...
ALGO
0.999988
5.582849
{ "github_metadata": { "branch": "main", "commit_count": 143, "repo_created_at": "2023-07-04T16:01:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72d5dd72a5...
a2d627a9-61c4-4ce5-9196-7f83a0285ca8
calabaza91/CPP
Cox_Lab01.14.cpp
//************************************************************* // Basketball Player Height Program // Programmer: <NAME> // Completed : 9/27/2018 // Status : Complete // // This program calculates and displays the height of a // basketball player who is 74 inches tall in feet and inches. // The basketball player re...
ALGO
0.980879
4.755972
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-12-13T05:16:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd119c83e...
c668d36f-3887-4466-b388-44f0e545d22d
zchee/cuda-sample
4_Finance/BlackScholes/BlackScholes_gold.cpp
/* * Copyright 1993-2015 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.999517
6.613469
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-10-06T22:31:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 371, "forks": 179, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "2aa817...
a1119e93-8e0a-426e-b1c3-74c31bbe85d4
quynhniee/CPP
code-ptit-CTDL&GT/DSA05018_Ky-tu-giong-nhau.cpp
#include <iostream> #include <string> #include <math.h> #include <climits> #include <vector> #include <algorithm> #include <iomanip> #include <utility> #define FOR(i,a,b) for(int i=a;i<=b;++i) #define FORD(i,a,b) for(int i=a;i>=b;--i) #define tester() int t; cin >> t; while (t--) using namespace std; typedef long lo...
ALGO
0.999774
3.636482
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2022-03-21T06:21:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7e6a9bcc09...
84c8dc5c-43e7-4e4a-9acc-38ccd0ef94c7
7rooper/UE4_TressFX
Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Public/ChaosCollisionEventFilter.h
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "UObject/ObjectMacros.h" #include "PBDRigidsSolver.h" #include "Chaos/ChaosSolver.h" #include "ChaosFilter.h" #include "ChaosCollisionEventFilter.generated.h" using namespace Chaos; // A collision event data s...
CONFIG
0.956215
4.216745
{ "github_metadata": { "branch": "423TFXMain", "commit_count": 93391, "repo_created_at": "2019-11-25T18:36:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83...
db39fb77-d2cd-4374-880c-12925bfbbd05
edwardmartins/sorting-algorithms
quickSort.h
#include <vector> using namespace std; // QUICKSORT // ------------------------------------------------------------------------- // Partition function int partition(vector <int> &v, int start, int end) { int pivot = start; // Take the first element as a pivot int i = start + 1; int j = end; while (i <= j) { ...
ALGO
0.999947
5.070327
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2018-07-02T13:16:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 14, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "1dfb97d...
85e00d74-2bec-480d-89fb-bdd16807a52d
AbdelrahmanElhawary/CompetitiveProgramming
UVA/626.cpp
/* for: Hussien , Ayman , Emad Abanob , George , Genawy Ka8eem , Mosta7il , Stawro ICPC DREAM */ #ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #include<bits/stdc++.h> #include<unordered_map> using namespace std; #define ll long long #define ld long double #define ull unsigned ll #define endl '\n' #define mk m...
ALGO
0.999904
4.324704
{ "github_metadata": { "branch": "master", "commit_count": 214, "repo_created_at": "2018-01-28T20:33:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "d0c2b112...
27e67a67-826e-4658-8360-6ccc86627d63
bollu/alok-bollu
word2blank/ongoing/word2vec-ga/vec.h
#pragma once #ifndef VEC_H #define VEC_H #include <assert.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <cmath> typedef float real; // Precision of float numbers template <typename T> T min(T x, T y) { return x < y ? x : y; } // let the dimensionality of the space be n. We have: // 1 -- 0D ...
ALGO
0.957406
5.070992
{ "github_metadata": { "branch": "master", "commit_count": 929, "repo_created_at": "2018-10-29T14:08:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 19, "pull_requests": 1 }, "file_meta": { "content_id": "0db9bd4...
a1e02dad-06e9-4b65-bf0c-15f0a2d20c03
JSmol/competitive-programming
codeforces/1279B.cc
#include <bits/stdc++.h> using namespace std; #define debug(a) cerr << #a << " = " << (a) << endl; #define fst first #define snd second #define sz(x) (int)(x).size() #define all(X) begin(X), end(X) #define rall(X) rbegin(X), rend(X) template<typename T, typename U> ostream& operator<<(ostream& o, const pair<T, U>& x)...
ALGO
0.999977
4.09426
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-02-08T17:32: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": "ef74ecfa9c2d...
a3e5b472-2549-4132-99e1-d26b34896dff
xariniov9/Competitive-programming
DS Algo Notes/Trees/Tries/DISSUBSTR.cpp
// problem link : http://www.spoj.com/problems/DISUBSTR/ // trie do not work! // <NAME> #include<cstdio> #include<cstring> using namespace std; struct trieNode{ struct trieNode * next[257]; trieNode(){ for(int i=0; i<=256; i++) next[i] = NULL; } }; // next[26] be special charac...
ALGO
0.999775
3.541482
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-09-01T13:46:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58b33e3177...
42e61508-2f72-420a-ac8a-1dbddb8d73d6
slode/shl
tests/test_binary_search.cpp
#include "test/test.h" #include "algorithm/binary_search.h" using namespace shl::test; using namespace shl::algorithm; SHL_TEST_SUITE(BinarySearch) SHL_TEST_CASE(Search) { std::vector<int> vec; for (int i = 0; i < 10; i++) { vec.push_back(i); vec.push_back(i); vec.push_back(i); } SHL_TEST_EQUAL(...
TEST
0.91284
6.588603
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-04-18T10:11: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": "dc1ffc35a...
aacd16b7-f9a7-4480-994b-1df21f1b6690
Adityazola/ALPRO-4213
Tugas 10/Lat 3/Latihan3.cpp
#include <iostream> using namespace std; struct fungsi{ int p,l; float r; int t; }; typedef struct fungsi myFungsi; int luasPP(const myFungsi PP){ int luas = PP.p * PP.l; return luas; } float luasLingkaran(const myFungsi Lingkaran){ float luas = 3.14 * Lingkaran.r * Lingkaran.r; return l...
ALGO
0.907809
3.652991
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-03-15T13:15: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": "e8f0452ccd0...
947e7429-2e93-41d7-b1ac-ec91527400e4
marcelluethi/elastix
src/Common/CostFunctions/itkAdvancedImageToImageMetric.h
/*====================================================================== This file is part of the elastix software. Copyright (c) University Medical Center Utrecht. All rights reserved. See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for details. This software is distributed WITHOUT A...
ALGO
0.981082
6.764492
{ "github_metadata": { "branch": "master", "commit_count": 433, "repo_created_at": "2013-02-18T07:36:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a94107...
c2d10bb0-3d2d-4eb9-a9ab-ab69d3c51d40
jeremykvlim/kattis
open/pipe.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int c; cin >> c; while (c--) { int l, v1, v2, t, s; cin >> l >> v1 >> v2 >> t >> s; int remaining = 1, knocks = 0; for (int prev = (v2 - v1 + t - 1) / t, curr...
ALGO
0.999878
3.666362
{ "github_metadata": { "branch": "main", "commit_count": 4387, "repo_created_at": "2023-11-17T12:14:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a01813d1f...
6e0e96cc-20a7-4058-8d72-70ea97d1ae7a
Sn0vvl4nd3R/dsa
algorithms/searching/jump-search.cpp
#include <iostream> #include <vector> #include <cmath> #include <optional> template <typename T> std::optional<size_t> JumpSearch(const std::vector<T>& array, const T& target) { size_t n = array.size(); if (n == 0) { return std::nullopt; } size_t step = static_cast<size_t>(std::sqrt(n)); size_t prev = 0...
ALGO
0.999933
5.971165
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-02-01T03:59: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": "b299ab92eb49...
add84b08-e4a2-48d4-bccd-3e8f19b66361
kisuk010203/PS
C++/Graphs/SCC/2519.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; typedef pair<p, p> segment; #define MAX 6010 ll ccw(p a, p b, p c) { ll ans = a.first * b.second + b.first * c.second + c.first * a.second - a.second * b.first - b.second * c.first - c.second * a.first; retu...
ALGO
0.99985
3.5868
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2023-08-16T13:07: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": "28ecbfc8...
90458aa2-e87d-4ef1-beee-cf4a831dc0d5
javagovindsharma/leetscode
lcci/10.03.Search Rotate Array/Solution.cpp
class Solution { public: int search(vector<int>& arr, int target) { int l = 0, r = arr.size() - 1; while (arr[l] == arr[r]) { --r; } while (l < r) { int mid = (l + r) >> 1; if (arr[mid] > arr[r]) { if (arr[l] <= target && target <= ...
ALGO
0.999986
5.92357
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2025-01-19T10:47:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49585a704cd...
00e80998-2787-4dd0-a3bd-16ac28bb058b
utkarsh914/LeetCode
Binary Search/1802. maximum-value-at-a-given-index-in-a-bounded-array.cpp
// https://leetcode.com/problems/maximum-value-at-a-given-index-in-a-bounded-array/ class Solution { public: int maxValue(int size, int index, int maxSum) { int start = 1, end = maxSum, ans = 1; while (start <= end) { int mid = start + (end-start)/2; if (feasible(mid, size, index, maxSum)) ans = mid, st...
ALGO
0.999967
5.480169
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2021-02-13T18:22:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "259db031d2d...
422f84ae-fdeb-457a-a840-446981adbe07
HowLi0/RGDIC
cuda_dic_kernel_precision.cpp
#include "cuda_dic_kernel_precision.h" #include <iostream> #include <algorithm> #include <cmath> CudaDICKernelPrecision::CudaDICKernelPrecision(int maxPoints, ShapeFunctionOrder order) : d_refImage(nullptr), d_defImage(nullptr), d_points(nullptr), d_initialParams(nullptr), d_finalU(nullptr), d_finalV(nullptr...
ALGO
0.996684
6.856636
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-04-16T05:49:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "703b6d16fa3...
0f525d15-a59e-44fa-9ecd-d50ddfe0a075
rococojie/topcoder
512_dv2_MarbleDecoration.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <c...
ALGO
0.99842
4.229755
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2012-06-20T03:07:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca8621af1...
97085ce0-5848-42e3-bfb4-d1855b2de255
RajaKunalPandit1/Geeks_For_Geeks_Questions
Remove common characters and concatenate.cpp
Output Status: Problem Solved Successfully Total Points Scored: 1/1 Total Time Taken: 0.1/1.6 Your Accuracy: 50% Attempts No.: 2 class Solution { public: //Function to remove common characters and concatenate two strings. string concatenatedString(string s1, string s2) { unordered_map<char...
ALGO
0.999973
5.294388
{ "github_metadata": { "branch": "main", "commit_count": 653, "repo_created_at": "2021-08-05T10:50:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9896af649a...
a970e0f3-5160-4bba-8bfc-8a30f8385ce8
vivekkdagar/compiler-toolchain
src/analysis/LeftFactor.cpp
// // Created by vivekdagar on 20/7/24. // #include "../../include/analysis/LeftFactor.h" LeftFactor::LeftFactor(const CFG &cfg) { usedNonTerminals = propagate(cfg); input = cfg; } std::string LeftFactor::findCommonSubstring(const std::vector<std::string> &substrings) { if (substrings.empty()) return "";...
ALGO
0.996473
4.919271
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-07-20T08:42:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fbde2cb2249...
37aac822-7a8d-4844-9077-06d3f1d1f539
juandavidcruzgomez/thesis-software-suite
algorithms/measures/partitionsimilarity.cpp
/** Copyright (c) 2014 <NAME> and Telecom - Bretagne <EMAIL> <EMAIL> Licensed under the EUPL, Version 1.2 or – as soon theywill be approved by the European Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in compliance with the Licence. You may obtain a copy o...
ALGO
0.9955
5.553866
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-04-21T14:49: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": "629eb74b9...
6895423c-3c16-4e34-bbcc-9824a4008865
Mhy166/2024-Compiler-PA
target/riscv64gc/instruction_select/riscv64_lowerframe.cc
#include "riscv64_lowerframe.h" /* 假设IR中的函数定义为f(i32 %r0, i32 %r1) 则parameters应该存放两个虚拟寄存器%0,%1 在LowerFrame后应当为 add %0,a0,x0 (%0 <- a0) add %1,a1,x0 (%1 <- a1) 对于浮点寄存器按照类似的方法处理即可 */ void RiscV64LowerFrame::Execute() { // 在每个函数的开头处插入获取参数的指令 for (auto func : unit->functions) { c...
TOOL
0.939795
4.735229
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-02-19T03:14: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": "841463e4edf6...
fd458de6-233b-4b67-adc4-4d10b12f2428
Ak7865/Operating-System
C-Scan-Disk-Scheduling.cpp
#include<iostream> #include<conio.h> #include<stdlib.h> #include<string> #include<vector> #include<algorithm> using namespace std; int main() { struct loc{int arr;}loc[25]; int n,ds,h; cout<<"Enter the nos of queue"<<endl; cin>>n; cout<<"Enter the block of queue"<<endl; for(int i=0;i<n;i++){ cin>>loc[i].arr; } cout<<...
ALGO
0.999818
3.344623
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-02T15:36: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": "45ccfd4fbcaa...
8689b456-726f-43e2-8c01-1b253dfefa40
zhaocc1106/my-leetcoding
c++/findAnagrams.cpp
/** * 找到字符串中所有字母异位词 * https://leetcode-cn.com/problems/find-all-anagrams-in-a-string/ */ #include <iostream> #include <vector> #include <unordered_map> #include <algorithm> using namespace std; class Solution { public: static vector<int> findAnagrams(string s, string p) { if (s.size() == 0) { ...
ALGO
0.999723
6.111763
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2020-05-06T14:52: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": "50efc49e1...
95ccefb2-dcdc-4b7d-ba0a-9ac4906a34f5
liuyubobobo/Play-Leetcode
2501-3000/2709-Greatest-Common-Divisor-Traversal/cpp-2709/main.cpp
/// Source : https://leetcode.com/problems/greatest-common-divisor-traversal/description/ /// Author : liuyubobobo /// Time : 2023-05-27 #include <iostream> #include <vector> #include <cassert> #include <map> #include <list> using namespace std; /// Sieve Table + UF /// Time Complexity: O(n * log(max(nums[i]))) /...
ALGO
0.99997
5.798712
{ "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": "8f...
f337cc37-728c-4733-80a6-2416a23c9e40
hgstyler/Backjoon_cpp
1002.cpp
// * ** * ** *** ** * ** * // BJ Online Judge Project // by hgstyler based on C++ // * ** * ** *** ** * ** * // Question 1002, BJ Online Judge // https://www.acmicpc.net/problem/1002 #include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout....
ALGO
0.999602
4.75136
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2022-05-24T15:35: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": "7174403b3...
524a10c3-4f83-4143-97aa-bdd3e1f6b52d
dygks232/ACMICPC_problem
FenwickTree/11658_FindIntervalSum3.cpp
#include<iostream> #include<cstdio> #include<cstdlib> #include<vector> #include<stack> #include<queue> #include<deque> #include<algorithm> #include<cmath> #include<climits> #include<set> #include<map> #include<string> #include<cstring> #include<functional> using namespace std; void inputAndInit(); void init(); void so...
ALGO
0.999628
3.56367
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2020-03-07T07:41: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": "af2e7f08...
66ef4334-e39f-4c5e-82fb-c45e601a955a
Apress/beg-cpp
9781484200087_Exercise_Solutions/Chapter 4/Ex4_01.cpp
// Exercise 4.1 Testing for exact division of one integer by another. // We can use an if statement to check that the input is valid // and we can use another to arrange the input as we need. // Then we use an if-else to generate the appropriate output. #include <iostream> usi...
ALGO
0.997808
4.29334
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-10-18T20:41:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 34, "forks": 43, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c5ddb4e40...
92699190-068d-4bd3-93c2-d280ab7c9251
ishandutta2007/codeforces-y
yuu/normal/1198/A.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k) for(int i=(j); i<=(k); i++) #define FFOR(i, j, k) for(int i=(j); i<(k); i++) #define DFOR(i, j, k) for(int i=(j); i>=(k); i--) #define bug(x) cerr<<#x<<" = "<<(x)<<'\n' #define pb push_back #define mp make_pair #define bit(s, i) (((s)>>(i))&1LL) #define...
ALGO
0.999376
3.103308
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76bd086f6845...
a593fe3a-198e-46cb-8d81-092728a079f2
alexandraback/datacollection
solutions_5706278382862336_0/C++/Mychance/LeetCode.cpp
#include<iostream> #include<vector> #include<queue> #include<map> #include<stack> #include<set> #include<string> #include<unordered_set> #include<unordered_map> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL){} }; struct ListNo...
ALGO
0.998857
3.526367
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3393744f...
c3a2ffc3-8dc1-42d9-9b8a-a9ee97171f3e
nitinb/Codes
Tree/tree_in_post.cpp
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. * File Name : tree_in_post.cpp * Purpose : * Creation Date : 05-07-2011 * Last Modified : Wednesday 06 July 2011 05:13:37 PM IST * Created By : Nitin _._._._._._._._._._._._._._._._._._._._._.*/ #include <iostream> #include <cmath> #include <cstdlib> #include <cstdio> ...
ALGO
0.999732
4.798912
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2011-05-13T14:32:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d14224e...
e5e5fc1f-70f6-4125-853b-97f0295e3c8c
Ldj-git/CodingTest
BOJ/14889. 스타트와 링크/14889.cpp
#include <vector> #include <iostream> #include <algorithm> using namespace std; // [BOJ] 14889. 스타트와 링크 / 실버 2 / 50분 int ret = 1000, n; int main() { cin >> n; vector<vector<int>>stat; for (int i = 0; i < n; i++) { vector<int>tmp; for (int j = 0; j < n; j++) { int t; cin >> t; tmp.push_back(t); } stat.p...
ALGO
0.999974
3.962882
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-07-27T02:58: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": "6ef28eab462...
519b385a-fd4e-4290-b73d-231da774dc7d
Deepesh9251/LearningCpp
DSA/Data Structures/Linked List/Doubly Linked List/basics.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node* prev; Node* next; Node(int data){ this->data = data; prev = NULL; next = NULL; } }; class DoublyLinkedList{ public: Node* head; Node* tail; DoublyLinkedList(){ head = NULL; ...
ALGO
0.999848
5.565807
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-01-20T17:54:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a3d54a824f...
61d07b13-51ad-4a08-ad9e-be7807e88250
ms097530/BST
BST/Source.cpp
/* A program whose purpose is implementing and testing a BST (binary search tree) */ #include <stdio.h> #include <iostream> #include <exception> using namespace std; template <typename key, typename E> class BST; template <typename key, typename E> class Node { public: Node(key K, E element, Node<key, E>* left =...
ALGO
0.998542
5.228381
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-03-20T03:45: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": "f7561a18a6...
0843281f-facd-4b60-8ed2-35fe485c9023
berenickt/practice-codingtest-cpp
Textbook/07-data-structure/008-stack/01-stack.cpp
#include <bits/stdc++.h> using namespace std; stack<string> stk; /** stack * 가장 마지막으로 들어간 데이터가 가장 첫 번째로 나오는 성질인 후입선출(LIFO, Last In First Out)을 가진 자료 구조 * 재귀적인 함수, 알고리즘에 사용되며 웹 브라우저 방문 기록 등에 쓰입니다. * 삽입 및 삭제에 O(1), 탐색에 O(n)이 걸립니다. * * 탐색에 O(n)이 걸리는 이유는 n번째 요소를 찾는다고 가정하면, * 계속해서 앞에 있는 요소를 끄집어내는 과정을 n 번 반복해야 찾을 수 있기...
ALGO
0.999267
4.713157
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-08-01T03:52: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": "4988e33478e...
341646d8-d477-4f56-a3d0-9d11a9eceb8a
Sayan11071998/Data-Structure
DoublyLinkedList/Main.cpp
#include <iostream> using namespace std; // Node Class class Node { public: int value; Node* next; Node* prev; Node(int value) { this->value = value; this->next = nullptr; this->prev = nullptr; } }; // DoublyLinkedList Class class DoublyLinkedList { public: // Cons...
ALGO
0.982977
6.039176
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-12-21T03:11:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0684381e0d8...
e1065eac-1929-494e-b6d6-6fa6a2fc3b63
studentBC/justExercise
searchSuggestionsSystem1268.cpp
class Solution { public: vector<vector<string>> suggestedProducts(vector<string>& products, string searchWord) { sort(products.begin(), products.end()); vector<vector<string>> ans; vector<string>candidate; for (int i = 0; i < searchWord.size(); i++) { if (i == 0) { ...
ALGO
0.999936
6.160404
{ "github_metadata": { "branch": "master", "commit_count": 1019, "repo_created_at": "2018-04-20T11:13: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": "7ba016a...
1427b154-7f0e-4280-92e5-9d47a356d4e0
Changhe160/OFEC
instance/problem/realworld/trajectory/gtoptoolbox/propagateKEP.h
// ------------------------------------------------------------------------ // // This source file is part of the 'ESA Advanced Concepts Team's // // Space Mechanics Toolbox' software. // // // // The source...
TOOL
0.991108
6.202752
{ "github_metadata": { "branch": "master", "commit_count": 246, "repo_created_at": "2017-08-24T01:14:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e0ec64f6...
b5482bca-5fdc-4c14-8ac3-2e8abc26b6e7
LutzGross/esys-escript.github.io
trilinos_source15/packages/rol/adapters/sacado/test/HS/HS_Problem_022.hpp
// @HEADER // ************************************************************************ // // Rapid Optimization Library (ROL) Package // Copyright (2014) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on be...
ALGO
0.905378
5.08762
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "79bc...
0a499df5-9d87-4180-9d9b-3ef182ca2694
Sookmyung-Algos/2021algos
algos_assignment/team_pratice/ucpc/Algospecial/week2/2275.cpp
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <queue> #define INF 1e9 using namespace std; int root_node; vector<vector<pair<int, int>>> tree; vector<pair<int, int>>v2; vector<vector<int>> diff_height; vector<int>v; int visited[10010]; int dis[10010]; int difference[10010]; ...
ALGO
0.999765
3.659612
{ "github_metadata": { "branch": "master", "commit_count": 5558, "repo_created_at": "2021-02-22T06:32:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01335af...
eaf3c235-1982-4ced-a93a-8d9144bf98d4
BKk101/Algorithm
Programmers/체육복.cpp
#if 0 #include <string> #include <vector> #include <algorithm> using namespace std; int solution(int n, vector<int> lost, vector<int> reserve) { int answer = 0; int cnt = 0; int lena = lost.size(); int lenb = reserve.size(); sort(lost.begin(), lost.end()); sort(reserve.begin(), reserve.end()); for (int i = 0;...
ALGO
0.999843
4.37717
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-04-12T05:59: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": "952f026481...
cd2620b6-837d-4287-9753-27a7092ef495
shriiar/Problem-Set-Contests
B. Fox Dividing Cheese.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define li long long int #define pb push_back #define pf push_front #define vi vector<int> #define vb vector<bool> #define vl vector<long long> #define mp make_pair #define vpi vector<pair<int, int>> #define vpl vector<pair<long long, long long>> #defin...
ALGO
0.999993
4.026402
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2022-04-02T10:47: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": "0b0a072366c...
63263fe0-1ea6-44fa-9024-b62e5c50e839
gfh16/StudyNotes
CPP/C++学习资料/C++入门经典/每章习题答案/2271 Solutions to Exercises/ch07/Ex7_01.cpp
// Exercise 7.1 Using pointer notation to access the elements of an array. #include <iostream> #include <iomanip> using std::cout; using std::endl; int main() { const int elements = 50; int evens[elements]; for(int i = 0 ; i < elements ; i++) evens[i] = 2*(i+1); cout << endl << "The elements in the array ...
ALGO
0.980424
4.252775
{ "github_metadata": { "branch": "master", "commit_count": 194, "repo_created_at": "2018-10-16T15:24:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86495825...
1685011b-a4c4-42e8-b614-c0a58ddd926c
v1liang/Hoffman-Project
uncompress.cpp
#include <iostream> #include <vector> #include "Helper.hpp" #include "HCTree.hpp" #include <list> int main(int argc, char* argv[]) { // your program's main execution code if(argc != 3){ cerr << "ERROR: Incorrect parameters" << endl; cerr << "USAGE: ./uncompress <compressed_file> <uncompressed_...
TOOL
0.945614
3.534595
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-07-20T22:45: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": "ca26bdc8c8...
4d6b0c2e-f315-408d-b41c-b06424e6dca4
Danial-Ahm/FastSLAM-2.0-in-Robot-Operating-System
ROS version/include/Utils.h
#ifndef UTILS_H #define UTILS_H #include "Particle.h" #include <Eigen/Dense> #include <ros/ros.h> #include <fstream> #include <string> #include <random> #include <stdexcept> using Eigen::VectorXd; using Eigen::Vector3d; using Eigen::Matrix3d; using Eigen::Vector2d; using Eigen::Matrix2d; static std::random_device rd...
TOOL
0.987894
5.546588
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-12T19:47:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3e78a810212...
a3c56b83-c8db-4e78-bd3b-1e12fa08373d
rahul810050/Competitive-Programming
GRAPH/LCA.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1e4+10; vector<int> g[N]; vector<int> parent(N); void dfs(int v, int par = -1){ parent[v] = par; for(int child: g[v]){ if(child == par) continue; dfs(child, v); } } vector<int> path(int v){ vector<int> ans; while(v != -1){ ans.push_bac...
ALGO
0.999987
4.207078
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2024-07-15T11:34: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": "f2a5253ee2f...
cc0c31b7-1cab-4e43-8b11-37875661e90b
sagallagher/corp
CORP - Windows/CORP/CORP2/Executor.hpp
/** * Main execution class. * (a) Given an input file name * (b) Parse * (c) Run algorithm * (d) Report * (e) Clean up * * @author <NAME>, et. al. */ #ifndef _EXECUTOR_GUARD #define _EXECUTOR_GUARD #include "../CORP/Config/Config.h" #include "../CORP/InputParser/InputParser.h" #include...
ALGO
0.99382
5.635157
{ "github_metadata": { "branch": "master", "commit_count": 243, "repo_created_at": "2017-09-07T05:14:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd2c993b...
f03fab41-ed67-44d9-8ba7-f09e15ee879f
Samarth-Pai/striverDsaCodes
dp/uniquePaths.cpp
#include<iostream> #include<vector> using namespace std; int f(int m, int n, vector<vector<int>> &dp){ if(m == 0 and n == 0) return 1; if(m < 0 or n < 0) return 0; if(dp[m][n] != -1) return dp[m][n]; int up = f(m-1, n, dp); int left = f(m, n-1, dp); return dp[m][n] = up ...
ALGO
0.999905
5.54438
{ "github_metadata": { "branch": "main", "commit_count": 253, "repo_created_at": "2024-09-21T08:46: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": "973b1a5531...
eaeb3c51-cdf2-46e9-8f7c-158ee14b3c13
turi-code/SFrame
oss_test/graphlab/distributed_chandy_misra_test.cpp
/** * Copyright (c) 2009 <NAME> University. * 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 * * Un...
ALGO
0.967132
4.409721
{ "github_metadata": { "branch": "master", "commit_count": 752, "repo_created_at": "2015-09-03T22:14:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 898, "forks": 326, "issues": 61, "pull_requests": 5 }, "file_meta": { "content_id": "f933...
0d6e5f36-b5a1-4e47-b660-f551338fc0ae
Vyrx/leetcode
962_maximum_width_ramp.cpp
#include<iostream> #include<vector> #include<stack> using namespace std; class Solution { public: int maxWidthRamp(vector<int>& nums) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); // keep monotonic decreasing sequence, lets say theres a solution [i, j] and nums[i] is lar...
ALGO
0.99997
5.835486
{ "github_metadata": { "branch": "main", "commit_count": 157, "repo_created_at": "2024-09-30T07:06:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ea12e4e8b...
6ab7b03c-f641-4bd8-8246-14dd20411124
tsai8890/LeetCode-Practice
tagged/sprint/dp/416. Partition Equal Subset Sum/416-2.cpp
#include <vector> using namespace std; class Solution { public: bool canPartition(vector<int>& nums) { int sum = 0; for (auto& num: nums) { sum += num; } if (sum % 2 != 0) { return false; } int n = nums.size(); int m ...
ALGO
0.999861
5.535669
{ "github_metadata": { "branch": "main", "commit_count": 228, "repo_created_at": "2022-03-11T10:49:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5ca6237c5...
018b6cdb-466f-4ad6-a5c6-098d44ed2c97
sastava007/Tech-Interview-Preparation
Hackerrank + Geeks for Geeks + DS Courseware/Mege Sort.cpp
#include<iostream> using namespace std; void merge(int *a,int s,int e){ int mid = (s+e)/2; int i = s; int j = mid+1; int k = s; int temp[100]; while(i<=mid && j<=e){ if(a[i] < a[j]){ temp[k++] = a[i++]; } else{ temp[k++] = a[j++]; } ...
ALGO
0.999982
4.633931
{ "github_metadata": { "branch": "master", "commit_count": 214, "repo_created_at": "2019-06-11T20:32:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 571, "forks": 107, "issues": 4, "pull_requests": 8 }, "file_meta": { "content_id": "769a...
44823763-e0d5-4547-a38c-5a065c0c17b4
infinit/elle
range-v3/include/range/v3/algorithm/sample.hpp
/// \file // Range v3 library // // Copyright <NAME> 2014-present // Copyright <NAME> 2016 // // Use, modification and distribution is subject to the // Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Project home: https://gi...
ALGO
0.965827
7.502389
{ "github_metadata": { "branch": "master", "commit_count": 18330, "repo_created_at": "2016-02-14T00:38:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 475, "forks": 43, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "b2e1...
8b4dbdde-6bed-4d1b-bfcd-0da241d07c49
koriel50000/ACRi_Challenge
text-search/kernel_stream.cpp
#include "kernel.hpp" #include <hls_stream.h> #include <hls_vector.h> #include <ap_int.h> const int DEGREE = 32; const int BIT_WIDTH = 5; typedef ap_uint<BIT_WIDTH> char_t; typedef ap_uint<PATTERN_SIZE> mask_t; typedef ap_uint<DEGREE> match_t; typedef hls::vector<char_t, PATTERN_SIZE + DEGREE> buffer_t; typedef hls:...
ALGO
0.999558
4.038661
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2024-10-12T00:28: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": "aaef43f868...
fff27f91-c9b3-4e36-98db-089ed8522db3
SikPang/ProblemSolving
Programmers/PCCP/[PCCP 기출문제] 2번 석유 시추.cpp
#include <string> #include <vector> #include <queue> #include <set> using namespace std; int maps[501] = {}; void bfs(vector<vector<int>>& land, int* maps) { queue<pair<int, int>> que; const int dir[4][2] = {{0,1}, {0,-1}, {-1,0}, {1,0}}; for (int i=0; i<land.size(); ++i) { for (int j=0;...
ALGO
0.999691
5.273462
{ "github_metadata": { "branch": "main", "commit_count": 317, "repo_created_at": "2022-01-24T06:49:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebef3bdb77...