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
ad217176-dc46-42ef-8270-9b61731d94e2
SmartCodeNerd/Cpp_DSA
SpiralMatrix.cpp
#include<iostream> using namespace std; // void InpuMatrix(int **arr,int row,int col) // { // for(int i=0;i<row;i++) // { // for(int j=0;j<col;j++) // { // cin>>arr[i][j]; // } // } // } // void PrintArr(int **arr,int row,int col) // { // for(int i=0;i<row;i++) // ...
ALGO
0.999937
3.915745
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-11T17:42:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2bb6c1f6cb1...
50d72518-c74f-44a4-a220-5a12cd5d452e
Wouterdek/raytracer
raytracer/src/lib/shape/TriangleMesh.h
#pragma once #include "IShape.h" #include "math/Vector3.h" #include "shape/list/IShapeList.h" #include "math/Vector2.h" class TriangleMeshData : public ICloneable<TriangleMeshData> { public: std::vector<Point> vertices; std::vector<std::array<uint32_t, 3>> vertexIndices; std::vector<Vector3> normals; std::vector<...
ALGO
0.960341
7.634377
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2019-02-19T20:23:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aebe30c9...
1ce7caa3-55a3-4490-ad70-8996f56fd6f5
LennartPaduch/LeetCode
Medium/0007. Reverse Integer/solution.cpp
// Runtime: 0 ms, faster than 100.00% of C++ online submissions for Reverse Integer. // Memory Usage: 5.9 MB, less than 33.59% of C++ online submissions for Reverse Integer. class Solution { public: int reverse(int x) { if (x == 0) return 0; int z = x; int l = 0; whi...
ALGO
0.999961
5.381084
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2022-05-27T18:57: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": "a4a75314e8b...
575d7fa6-ad01-4c7c-a4e2-dd80a8730fd2
S2hubham/DSA_VOYAGE
steps-6 Greedy Algorithms/2-Medium&Hard/3.JumpGame2.cpp
#include<bits/stdc++.h> using namespace std; // Jump Game 2 int jump_rec(vector<int> arr, int idx, int jumps){ // base case if(idx >= arr.size()-1){ return jumps; } int mini_jump = INT_MAX; for(int i = 1; i <= arr[idx]; i++){ mini_jump = min(mini_jump, jump_rec(arr, idx+i, jumps+1)...
ALGO
0.999963
4.678848
{ "github_metadata": { "branch": "main", "commit_count": 247, "repo_created_at": "2024-08-08T14:15:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "283e9ac909...
5e35882d-ea64-4c6a-88de-06cf26067eaa
7kia/OOP
Lab1-2/Lab1-2.cpp
// Lab1-2.cpp: определяет точку входа для консольного приложения. // /* Лабораторная работа 1. 2 задание 7 вариант Разработайте программу radix.exe, выполняющую перевод чисел из одной произвольной системы счисления в другую произвольную и запись результата в стандартный поток вывода. Под произвольной системой счисле...
ALGO
0.913548
4.166043
{ "github_metadata": { "branch": "master", "commit_count": 158, "repo_created_at": "2016-02-09T11:37:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "a447a66...
a3a778ae-4653-4916-8254-dc6dfb7d9fb4
Viing3107/Source-Code
Double Queue.cpp
/* Author : <NAME> Kim Son A High School - Ninh Binh Created : 21:35:31 - 05/08/2024 */ #include <bits/stdc++.h> #define endl "\n" #define task "test" #define int long long #define double long double #define ...
ALGO
0.999519
4.384771
{ "github_metadata": { "branch": "main", "commit_count": 450, "repo_created_at": "2024-04-27T09:52: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": "08020519d9...
29d08695-d084-4e03-b83f-3a01893e6e18
IsaacMPereira/cppPersonal
codigosTEP/1_strings/rabinKarp1.cpp
#include <bits/stdc++.h> using namespace std; //Assinaturas int rabin_karp(const string& s, const string& p); int h(const string& s); int f(char c); int main(){ auto s = "ababababababa", p = "aba"; auto s1 = "trespratosdetrigoparatrestigrestristes", p1 = "tr"; cout << rabin_karp(s, p) <<endl; cout << rabin_...
ALGO
0.99994
5.372872
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2024-10-14T21:03: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": "42f33c9f83...
bc600044-433e-42b1-b22f-733497f1f3de
lovebaonvwu/leetcode-cpp
2021/intersection_of_two_linked_lists.cc
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* getIntersectionNode(ListNode* headA, ListNode* headB) { int cnt = 0; ListNode* cur = headA; while (cur) { ...
ALGO
0.99989
5.819612
{ "github_metadata": { "branch": "master", "commit_count": 2622, "repo_created_at": "2019-04-21T11:29:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ddf6303...
e8619df8-462c-49dd-bc2b-4aac4da17eef
Anirudhpolawar/Data-Structure-And-Algorithms
Data Structure/Hash table/1_phone_book/phone_book.cpp
#include <iostream> #include <vector> #include <string> #include<unordered_map> using std::string; using std::vector; using std::cin; using std::unordered_map; struct Query { string type, name; int number; }; vector<Query> read_queries() { int n; cin >> n; vector<Query> queries(n); for (int i ...
ALGO
0.999215
4.55604
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-05-28T05:39: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": "f250e4716a...
817c9874-8ee7-4681-af86-b3f2f8d8482d
aru404/self-practice-
single/p/HPD/P2420.cpp
// # 让我们异或吧 // ## 题目描述 // 异或是一种神奇的运算,大部分人把它总结成不进位加法. // 在生活中 xor 运算也很常见。比如,对于一个问题的回答,是为 $1$,否为 $0$,那么: // ($A$ 是否是男生)xor($B$ 是否是男生)= $A$ 和 $B$ 是否能够成为情侣 // 好了,现在我们来制造和处理一些复杂的情况。比如我们将给出一颗树,它很高兴自己有 $N$ 个结点。树的每条边上有一个权值。我们要进行 $M$ 次询问,对于每次询问,我们想知道某两点之间的路径上所有边权的异或值。 // ## 输入格式 // 输入文件第一行包含一个整数 $N$ ,表示这颗开心的树拥有的结点数,以下有 $...
ALGO
0.999997
5.346508
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-09-05T02:36: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": "57be8c22cc0e...
0b136a17-c25f-4f24-9d8d-07e775eef88d
sharath-matada/robot-motion-reconstruction-mpc
src/mpc/dance_foot_step_planner.cpp
#include "robotoc/mpc/dance_foot_step_planner.hpp" #include "robotoc/utils/rotation.hpp" #include <stdexcept> #include <iostream> #include <cassert> namespace robotoc { DanceFootStepPlanner::DanceFootStepPlanner(const Robot& quadruped_robot) : ContactPlannerBase(), robot_(quadruped_robot), raibert_heurist...
ALGO
0.981705
5.125089
{ "github_metadata": { "branch": "main", "commit_count": 1133, "repo_created_at": "2023-11-17T06:29: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": "bf6d7d379...
a4ee0385-09d2-4654-beae-5a12f57ad8e6
VasilyevaAS/Leetcode
Palindrome Linked List.cpp
//https://leetcode.com/problems/palindrome-linked-list/ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ const int ZERO = [](){ ios_base::sync_with_stdio(false); cin.tie(nullptr); return 0; }(); ...
ALGO
0.999621
6.323987
{ "github_metadata": { "branch": "master", "commit_count": 216, "repo_created_at": "2020-02-22T11:50:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7b63459...
3ce8cc6e-cf58-48c0-99b7-b12f7dd7d4ae
version0chiro/Leet-Code-Solutions
Largest subarray of 0's and 1's - GFG/largest-subarray-of-0s-and-1s.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /*You are required to complete this method*/ // arr[] : the input array containing 0s and 1s // N : size of the input array // return the maximum length of the subarray // with equal 0s and 1s class Solution{ public: ...
ALGO
0.999557
5.521068
{ "github_metadata": { "branch": "main", "commit_count": 2860, "repo_created_at": "2021-03-26T07:35:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e31eab296...
03be9594-d1f4-4295-a63e-0b17bfa28493
bartandrews/DiagHam_Stability
trunk/FTI/src/Hamiltonian/ParticleOnLatticeFCCLatticeSingleBandHamiltonian.cc
//////////////////////////////////////////////////////////////////////////////// // // // // // DiagHam version 0.01 ...
ALGO
0.986699
5.886768
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-07-12T10:41:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b24ef3a23e4...
0a726d1d-70ee-4d0c-83a0-8d416e763364
BelisaDi/Algoritmos
Parcial 2/p1.cpp
#include <vector> #include <iostream> using namespace std; template <typename dataType> int binary_like_search_helper(vector<dataType> & vec, dataType key, int & globalmid){ int len = vec.size(); int mid = len/2; if(len <= 1 && vec[mid] != key){ return -1; } else if(vec[mid] == key){ return mid + glo...
ALGO
0.999805
4.90739
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2019-06-10T14:56: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": "647d99911...
ec21c8b1-f445-4e66-869c-abb5a00e5b07
dmiao623/project-euler
library/templates/polynomial.hpp
const double PI = acos(-1); namespace poly { namespace polynomial_internal { const int MAX_N = 1 << 24; // maximum size of polynomial, power of 2 const int MAX_B = 250; // maximum size to run brute force std::mt19937 mst(std::chrono::steady_clock::now().time_since_epoch().count()); template<typename T,...
ALGO
0.999297
4.412611
{ "github_metadata": { "branch": "main", "commit_count": 314, "repo_created_at": "2023-02-13T19:05: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": "7b72f97e11...
d9cc1d93-f27c-407e-b8b2-a72daecf48f0
ivilab/kjb
lib/wrap_dtlib_cpp/ptexture.cpp
///////////////////////////////////////////////////////////////////////////// // ptexture.cpp - 1D/2D function determining the probability of texture // Author: <NAME> // Date created: May, 2000 #include "l/l_sys_debug.h" /* For ASSERT. */ #include <iostream> #include "wrap_dtlib_cpp/ptexture.h" #include "wrap_dtlib_...
ALGO
0.926663
4.155701
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2019-07-02T23:11:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae6161202f...
9c2b9741-c46c-4970-bb2c-be7da97d2767
ayush-yadav-4/leetcode-solutions
0592-fraction-addition-and-subtraction/0592-fraction-addition-and-subtraction.cpp
class Solution { public: string fractionAddition(string expression) { int num = 0, den = 1; // starting with 0/1 for (int i = 0; i < expression.size(); ) { // Parse sign int sign = 1; if (expression[i] == '+' || expression[i] == '-') { sign = (...
ALGO
0.999832
5.963043
{ "github_metadata": { "branch": "main", "commit_count": 1978, "repo_created_at": "2024-07-20T07:43: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": "5737ef88e...
fa4e328e-700e-46ab-abab-5ee3cdc59a96
ishandutta2007/codeforces-f
frame233/normal/1305/D.cpp
// Author -- Frame #include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<algorithm> #include<vector> #include<iostream> #define lowbit(x) ((x)&(-x)) #define Finline __inline__ __attribute__ ((always_inline)) #define DEBUG printf("Running on Line %d in Function %s\n",__LINE__,__FUNCTION__) typ...
ALGO
0.999808
3.527344
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "25a9f1b24247...
e4198b3d-4b95-4fa0-b554-d389c7c1d51c
Leonardo-Lourenco/Programacao-c
Aula-54/Aula-54.cpp
#include <iostream> #include <string.h> #include <stdlib.h> // Deletando valores da lista struct Elementos{ int dado; Elementos *seguinte; }; Elementos *lista = NULL; using namespace std; void menu(); void inserirValorLista(Elementos *&, int); void exibirValorLista(Elementos *); void buscarVal...
ALGO
0.998844
3.93855
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2020-07-03T14:37:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51d1f4091...
1d9ae926-c97b-403f-92f7-59130a82545d
Hudeyfa123/CS303-assignment-1-Hudeyfa123
Main.cpp
#include <iostream> #include "array_operations.h" using namespace std; int main() { int arr[SIZE]; int size = 100; // Since the input file has 100 numbers // Read data from file readArrayFromFile(arr, "A1input.txt"); // Check if a number exists in the array int numberToFind = 42; int ind...
TOOL
0.97653
5.558715
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-09-09T22:31: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": "271499137fe5...
aca29c31-6c74-4978-acfa-f046ff5eb272
prime-slam/line-detection-association-dockers
detectors/DeepLSD/third_party/pytlbd/src/include/EDLineDetector.h
/* * EDLineDetector.hh * * Created on: Nov 30, 2011 * Author: lz */ #ifndef EDLINEDETECTOR_HH_ #define EDLINEDETECTOR_HH_ #include <vector> #include <list> #include <opencv2/opencv.hpp> #include "multiscale/OctaveKeyLineDetector.h" #include "SegmentsDetector.h" namespace eth { // //struct Pixel { // uns...
ALGO
0.966335
5.675996
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2022-11-03T08:05:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 45, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e122ef9451...
b245dfe2-1f71-4fb1-b123-2e4f474555de
Soumyabethi123/Daily_Coding
Graph/Flood fill Algorithm.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void fill(int x,int y,vector<vector<int>>& image,int newc,int n,int m,int c){ if(x<n && x>=0 && y<m && y>=0){ if(image[x][y]==c){ ...
ALGO
0.999001
6.008478
{ "github_metadata": { "branch": "master", "commit_count": 255, "repo_created_at": "2022-12-18T11:07: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": "739d13d1...
098111ad-fdf2-400d-9553-7e1ce49e40fe
yiouejv/design_pattern
工厂方法模式/code.cpp
#include<iostream> using namespace std; class Calc { public: virtual double calc(double num1, double num2) { return 0; }; }; class AddCalc : public Calc { public: double calc(double num1, double num2) override { return num1 + num2; } }; class SubCalc : public Calc { public: double...
TOOL
0.968462
5.550331
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2021-09-04T08:01:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fe93b9c3c0...
c5b8329b-5dcf-4610-9b50-c68f6ecbfa1b
siosio34/AlgorithmStudy
data_structure/3111.cpp
#include <iostream> #include <string> #include <stack> using namespace std; int main() { stack<char> left; stack<char> right; string a; string t; cin >> a >> t; int l = 0; int r = t.size() - 1; int aLen = a.size(); bool flag = true; stack<char> tmp; while(l <= r) { if(flag) { // left 스택일...
ALGO
0.999991
3.46912
{ "github_metadata": { "branch": "master", "commit_count": 656, "repo_created_at": "2018-06-06T04:32:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d8f4af0c...
e05d32dc-c260-4397-9c00-15a55bc3f958
yuforest/contests
abc_121/c/c.cpp
// g++ -o c.out c.cpp -std=c++17 // oj d https://atcoder.jp/contests/abc233/tasks/abc233_c // oj t -c "./c.out" // oj s https://atcoder.jp/contests/abc233/tasks/abc233_c c.cpp #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; ...
ALGO
0.999976
4.373324
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2022-06-03T05:09:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72fb3e378...
7fd30c81-9ed6-48df-9aaf-7b77550c5691
ishandutta2007/codeforces-e
emiso/normal/258/C.cpp
#include <bits/stdc++.h> using namespace std; #define MN 100010 #define MOD 1000000007 int expo(int a, int b) { if(!b) return 1; if(b & 1) return 1LL * a * expo(1LL * a * a % MOD, b >> 1) % MOD; return expo(1LL * a * a % MOD, b >> 1); } vector<int> divi[MN]; int n, ans; int main() { int tmp = 0; ...
ALGO
0.999895
5.028849
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d24a989ce9a2...
56db2aeb-258b-40a2-ac7a-575be1001532
ColinGilbert/incidental-noise
Noise/implicitrotatedomain.cpp
#include "implicitrotatedomain.h" #include <cmath> namespace anl { CImplicitRotateDomain::CImplicitRotateDomain(ANLFloatType src, ANLFloatType ax, ANLFloatType ay, ANLFloatType az, ANLFloatType angle_deg) : CImplicitModuleBase(), m_ax(ax), m_ay(ay), m_az(az), m_angledeg(angle_deg), m_source(src) { ...
ALGO
0.937104
7.166917
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2015-12-25T15:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24404c4f0...
01191ced-2343-41ae-b1e6-5ad8f8ded540
PyORBIT-Collaboration/laser-stripping
LS_utils/FieldOrientation.cc
//////////////////////////////// -*- C++ -*- ////////////////////////////// // // FILE NAME // LorentzTransformationEM.cc // // AUTHOR // <NAME> // // CREATED // 06/28/2008 // // DESCRIPTION // This class provides Lorentz transformations for the electromagnetic field // from the laboratory frame to the p...
ALGO
0.995672
4.651585
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2016-12-07T21:42:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff55b1723...
b5c71fe9-48c8-4c1a-aa54-d236bd4793ca
lirasik/MyStudyOnCplus
study for c+/lessons/lessons/main.cpp
#include <iostream> using namespace std; class Matrix { int ** matrixInClass; public: void setMatrix(int rowAmount, int colAmount); void changeRowAndColumn(int rowAmount, int colAmount); }; //============================================================== void Matrix::setMatrix(int rowAmount, int colAmount)...
ALGO
0.995683
4.429803
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-12-01T22:20:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9bb26124c6...
c37c079e-6ad8-4579-98a9-77c809ca49d1
ishandutta2007/codeforces-g
geothermal/normal/1483/B.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<l...
ALGO
0.999592
3.822915
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:55: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": "688b52738c80...
c448cfcf-bf15-45d7-a92a-490152e16450
devankitmishra/cpp
Leetcode/BitManipulation/1318.MinimumFlips.cpp
class Solution { public: int minFlips(int a, int b, int c) { ios::sync_with_stdio(0); int numOfFlips = 0; while (a != 0 || b != 0 || c != 0) { if ((c & 1) == 0) { // We need both bits to be 0 if ((a & 1) == 1) numOfFlips++; if ((b &...
ALGO
0.999848
5.799167
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2024-05-16T12:32: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": "d6bf8d9ca...
5e9046de-a6dc-4924-bc57-3b232b95323e
fujiawei0724/decision_making_2022
src/TrajectoryPlanning.cc
/* * @Author: fujiawei0724 * @Date: 2021-11-12 20:14:57 * @LastEditors: fujiawei0724 * @LastEditTime: 2022-07-21 08:47:57 * @Descripttion: Trajectory planner's interface with the main pipeline */ #include "Common.hpp" /** * @brief Trajectory planning with quintic B-spline * TODO: need test and DEBUG */ void ...
ALGO
0.979072
4.309047
{ "github_metadata": { "branch": "master", "commit_count": 165, "repo_created_at": "2021-10-27T00:17:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62e52121...
88508271-a4a4-4a2d-9b37-39a09fa66b29
adobe-flash/crossbridge
samples/Example_BulletPhysicsLibrary/bullet-2.80-rev2531/Demos/HeightFieldFluidDemo/BulletHfFluid/btHfFluidRigidCollisionAlgorithm.h
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2009 <NAME> http://bulletphysics.com This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to a...
ALGO
0.945438
7.155582
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2013-06-21T20:16:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 550, "forks": 198, "issues": 31, "pull_requests": 1 }, "file_meta": { "content_id": "4036b...
3fbbdf86-8a2a-42af-9135-033361654d81
NafiHasan/HabiJabi
C++/Codeforces Contests/CF EDU/Edu 125/d.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define ll long long bool comp (const pair<int, int> &a, const pair<int, int> &b) { if (a.first == b.first)return a.second > b.second; else return a.first < b.first; } int main() { fast...
ALGO
0.999978
3.407531
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-03-17T09:29:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b68aeb3e431...
83db34af-2036-4c4d-a8df-a0276a3f07d0
DavideSeghetto/progetto_scacchi
src/bishop.cpp
//<NAME> 2008784 #include "../lib/bishop.h" Bishop :: Bishop(int x, int y, bool color) { position.setX(x); position.setY(y); white = color; c = white ? 'a' : 'A'; firstX = x; } void Bishop :: move(const Position& to, ChessBoard& board) { makePossiblePositions(board); //aggiorno il vettore di ...
ALGO
0.928364
5.263131
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-02-09T11:58: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": "4585ca7b8e...
0fa76d42-3326-41ca-a8da-2e3a262cfd15
wupsi/PP1_COURSE
Week3/QA 1/Lab4M.cpp
#include<iostream> using namespace std; int main(){ int n; cin >> n; int arr[n][n]; int len = n, k = 1, p = 0; while(k <= n * n){ cout << "for 1:\n"; for(int i = p; i < len; i++){ arr[p][i] = k++; cout << p << " " << i << " " << len << end...
ALGO
0.999524
3.010157
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2021-09-21T17:58: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": "78eb4b6fc1c...
9df6a24f-b851-4e16-b745-8eede696f362
JusticeBoi/merge_adjacent
main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <functional> #include <chrono> /////////// ALGORITHM TO IMPLEMENT //////////////////// template <typename ForwardIterator, typename OutputIterator, typename Equal, typename Merge> void merge_adjacent(ForwardIterator first, ForwardI...
ALGO
0.999672
6.739974
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-10-11T13:01: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": "fef0e9df55...
dfbf31f5-11fe-4021-a208-cde7a222c9ca
kuno4n/Codeforces
src/248-div1-A.cpp
#include <iostream> #include <sstream> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <numeric> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <cassert> #include <cstdarg> #include <sy...
ALGO
0.999952
3.636719
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2013-01-27T07:47:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd2103181...
2d0f1368-c0a6-4704-924a-9d4c8a1447c4
CCCP-lus/BFU-CS
Experiment/DataStructure2021/1 实验1/代码/24基于链表的两个集合的差集.cpp
#include <iostream> using namespace std; typedef struct LNode { int data; struct LNode* next; }LNode, * LinkList; void CreateList_R(LinkList& L, int n) {//后插法创建单链表 L = new LNode; L->next = NULL; int num = n; LNode* p = L; while(num--) { LNode* t = new LNode; cin >> t->data; t->next = NULL; p->n...
ALGO
0.999942
3.473132
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2023-09-01T09:20:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "908a2a6f91...
1373293e-ef6f-4c1b-a997-6b9f8ce20a4b
miya930/competitive_programming
algorithm/00.AtCoder/00.ABC/06_301-350/ABC319C.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, fi, n) for (int i = fi; i < n; i++) using ll = long long; using pii = pair<int,int>; constexpr int inf = 1001001001; constexpr ll infl = 1LL << 62; constexpr int dx[] = {1, 0, -1, 0}; constexpr int dy[] = {0, 1, 0, -1}; template<class T> bool chmax(T &a, T b)...
ALGO
0.999806
3.851754
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2021-04-18T01:17: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": "447e8249a1...
146d5998-5c9e-4afb-96a5-b232da9c1f03
theteleton/Competitive-Programming
GoogleCodeJam22/B.cpp
#include <bits/stdc++.h> typedef long long ll; std::vector<std::vector<int> > tree; std::vector<ll> vals; ll res = 0; ll dfs(int x) { if (tree[x].size() == 0) { return vals[x]; } std::vector<ll> v; ll sum = 0; for (int next : tree[x]) { ll num = dfs(next); if (x == 0) { ...
ALGO
0.999892
3.746337
{ "github_metadata": { "branch": "main", "commit_count": 150, "repo_created_at": "2021-10-14T14:39: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": "08560ef1df...
0d1524dc-db90-49fb-87a2-bad9a2e85483
Vaidehiyer/Problem7
LinkedSortedList.cpp
/** * @file LinkedSortedList.cpp * @author <NAME> * StartID: oc3378es * @brief Implementation of Link-based Sorted list * @version 0.1 * @date 2024-07-07 * Instructor: <NAME> * Due date: 07/08/2024 * * * @copyright Copyright (c) 2024 * */ #include "LinkedSortedList.h" template <class ItemType> void Linke...
TOOL
0.997846
6.240186
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-07-10T10:42:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d38bb425dde...
8ead955b-680b-42d6-9f7a-48c993e1743f
Kirill22022004/hash_map
Hashmap.h
#include <algorithm> #include <list> #include <iterator> #include <iostream> #include <initializer_list> #include <vector> #include <exception> #include <stdexcept> #include <cassert> #include <cstdlib> #include <functional> const int C = 4; const int K = 6; template<class KeyType, class ValueType, class Hash = std::...
ALGO
0.971555
5.588444
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-02-27T21:34:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2156d91e743c...
b8749737-c435-49d8-a859-06d22b71f058
nikitasnt/BinaryTree
BSTree.h
#include <iostream> #include <vector> #pragma once // Binary Search Tree without dublicates class BSTree { // Prevent copy constructor BSTree(const BSTree& binTree); protected: // Element of a binary tree struct TreeNode { int info; // Information part TreeNode* pLeft, * pRight; // Left & right branches ...
ALGO
0.99976
5.02475
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-11-10T14:52:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60f0bc8c4...
ddfdcbb6-4d2b-4b97-9532-60f5d1891134
otegami/learning_cpp
getting_things_out_of_function/i_o_parameters.cpp
#include <iostream> #include <string> void max_str(const std::string input1, const std::string iput2, std::string &output); void max_int(int input1, int input2, int &output); void max_double(double double1, double double2, double *output); int main() { std::string out_str; std::string string1{"Blabama"}; std::s...
ALGO
0.971234
4.976885
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2023-01-22T07:27: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": "bf48178e0e6...
56c8efb6-6b80-4490-b5d6-1c8c33cc64bf
fastbodin/h_p_res_fullerenes
src/clar.cpp
#include "include.h" // check anionic Clar structure void sanity_check(const Fullerene(&F), const Clar_struct(&S)) { // each vertex in the graph should be covered exactly once by structure vector<int> covered_v(F.n, 0); // check resonant faces for (int i = 0; i < S.num_res_h + S.num_res_p; i++) { face cur_...
ALGO
0.942512
4.292952
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2025-01-22T19:14: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": "e45b35eed9f...
3b5374bf-b30e-4e28-8ba8-75922512227b
Stuart-Swan/Matchlib-Examples-Kit-For-Accellera-Synthesis-WG
matchlib_examples/examples/38_matrix_mult/mat_mul_banked_multi_process.h
#pragma once #include <mc_connections.h> #include <ac_int.h> #include "array_t.h" #include "ac_shared_bank_array.h" #include <string> #pragma hls_design top class matrixMultiply : public sc_module { public: sc_in<bool> SC_NAMED(clk); sc_in<bool> SC_NAMED(rstn); Connections::In <ac_int<8>> SC_NAMED(A); C...
ALGO
0.955986
4.765326
{ "github_metadata": { "branch": "master", "commit_count": 174, "repo_created_at": "2024-02-14T23:35:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82bbd9e...
1b59a2ca-57d6-445f-b323-894b27e687c5
B1NGOT/SGU-1ST-YEAR
Информатика и программирование/Oboi_Hard.cpp
#incluse<iostream> #include<cmath> using namespace std; int check_values(string text){ int temp; int flag=0; cout << text; while (flag==0) { cin>> temp; if((cin.fail() || char(cin.peek()) != '\n')){ cout << "Error. This variable is not number!"<< endl << text; ...
ALGO
0.999181
3.404878
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-09-08T19:09: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": "2c14691ce1d1...
72f3aa69-763e-468b-8c77-017bc129e084
priyamsahoo/coding_practice
DSA_Rough_Practice/Binary_Search/3_lowerBound.cpp
// Find the lower bound of x // Lower bound -> first element greater than or equal to (>=) x // Eg: // arr = [1, 3, 5, 7, 9, 10] // x = 7, lb = 7 // x = 8, lb = 9 // x = 11, lb = -1 #include<bits/stdc++.h> using namespace std; // lower bound implementation int lowerBound(vector<int> v, int x) { int l = 0, r = v.s...
ALGO
0.99997
5.53596
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-06-22T13:07: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": "57a410789f42...
38ce5ba7-8727-4694-b12e-d1d44ae1aee2
jwwalker/Quesa
Development/Source/Renderers/Common/GLVBOManager.cpp
/* NAME: GLVBOManager.cpp DESCRIPTION: Quesa OpenGL vertex buffer object caching. COPYRIGHT: Copyright (c) 2007-2020, Quesa Developers. All rights reserved. For the current release of Quesa, please see: <https://github.com/jwwalker/Quesa> ...
TOOL
0.901751
5.870931
{ "github_metadata": { "branch": "master", "commit_count": 3524, "repo_created_at": "2019-08-25T01:59:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 41, "forks": 9, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "597aa8...
f5717217-3673-4c19-9fd4-e7df72ecc0d7
a-farooq/ProblemsAndSolutions
DataStructuresAndAlgorithms/arrays/merge-k-sorted-arrays.cpp
/**** Given K sorted arrays arranged in the form of a matrix of size K*K. The task is to merge them into one sorted array. Example 1: Input: K = 3 arr[][] = {{1,2,3},{4,5,6},{7,8,9}} Output: 1 2 3 4 5 6 7 8 9 Explanation:Above test case has 3 sorted arrays of size 3, 3, 3 arr[][] = [[1, 2, 3],[4, 5, 6], [7, 8, 9]] Th...
ALGO
0.999983
5.428928
{ "github_metadata": { "branch": "master", "commit_count": 420, "repo_created_at": "2020-07-09T18:48:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99a308fa...
046e052e-697a-4c53-a2ca-83041460cf8f
rong5690001/datastructstudy
MGraph.cpp
// // Created by laura on 2020/3/29. // #include "MGraph.h" #include "iostream" using namespace std; void CreateMGraph(MGraph *mGraph) { cout << "请输入图的顶点数:"; cin >> mGraph->numVertexes; cout << "请输入图的边数:"; cin >> mGraph->numEdges; for (int i = 0; i < mGraph->numVertexes; ++i) { cout << "...
ALGO
0.970254
3.092724
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-03-29T08:50: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": "916724f0cf...
4bcca71c-e875-449f-8948-89b73cbcbfb0
F4G3T/-_4.2
ПЗ_4.2/Source.cpp
#include <iostream> #include <vector> #include <cmath> #include <chrono> using namespace std; using namespace chrono; const double EPS = 1e-12; class Matrix { public: vector<vector<double>> data; int rows, cols; Matrix(int n, int m) : rows(n), cols(m), data(n, vector<double>(m, 0)) {} }; // Генерация М...
ALGO
0.999687
5.390779
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2025-05-04T11:36: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": "f4b762c261...
12b83254-53a0-4a59-b53b-878a2fb0b1df
airejtashfeen/Leetcode
(E)truncate_sentence.cpp
#include <iostream> #include <string> using namespace std; class Solution { public: string truncateSentence(string s, int k) { int count = 0; string ans = ""; for (int i = 0; i < s.size(); i++) { if (count == k) { ans = s.substr(0, i-1); bre...
ALGO
0.999359
5.175817
{ "github_metadata": { "branch": "master", "commit_count": 161, "repo_created_at": "2023-07-08T22:10: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": "2671b588...
7fefcf20-6445-4fa3-bef4-19e4c5791592
cartesi/poker
engine/poker-lib/verifier.cpp
#include <iostream> #include <algorithm> #include "verifier.h" #include "referee.h" #include "compression.h" #include "game-playback.h" namespace poker { static void skip(std::istream& in, int len); verifier::verifier(std::istream& in_player_info, std::istream& in_turn_metadata, std::istream& in_verification_inf...
TOOL
0.942139
5.771352
{ "github_metadata": { "branch": "master", "commit_count": 775, "repo_created_at": "2021-06-28T18:51:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 32, "forks": 6, "issues": 0, "pull_requests": 23 }, "file_meta": { "content_id": "f117e9a...
373b87df-3d40-4890-a383-55b15c352106
piyushpandey5/DSA_ALL_TOPICS
DYNAMIC PROGRAMMING/Part 4 - DP on Subsequences/16_PartitionAsetintoTwoSubset.cpp
#include<iostream> #include<vector> using namespace std; //******************** Tabulation Approach ***************************************** // void Target(int n,int t,vector<int>&vec,vector<vector<bool>>&dp){ // for(int ind = 0; ind<n;ind++){ // dp[ind][0] = true; // } // if(vec[0]<=t)dp[0][vec[...
ALGO
0.99995
5.346086
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-07-12T05:48: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": "0e6c687ae93d...
95f9ae5f-91c0-4832-a124-a13d24a3f69b
LeeSK78944/OOP
termproject/fold.cpp
#include "fold.h" extern int b[14][7]; fold::fold(int c1, int c2, int c3){ state = 0; tright = new block(c1, 3, 1); tleft = new block(0, 2, 1); right = new block(c2, 3, 2); left = new block(c3, 2, 2); b[1][3] = c1; b[2][3] = c2; b[2][2] = c3; } fold::~fold(){ delete(tleft); de...
ALGO
0.999561
3.861301
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-09-11T09:33:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "228f53eb2...
aee1ece3-abcb-444c-ac9e-d92d7ffc5a5e
erenerisken/drone_motion
Pre-Orca/hectorquad_old/src/planningUtilities.hpp
#ifndef _PLANNINGUTILITIES_HPP_ #define _PLANNINGUTILITIES_HPP_ #include <vector> #include "motionUtilities.hpp" #define INITIAL_HEIGHT 4.0 //not to hit object while going to start point #define SLOPE_EPSILON 0.79 //Stable value 0.54 - 30 deg // 1.04 - 60 deg #define HEIGHT 0.4 //from ground #define PROBABILITY 0.07...
ALGO
0.988689
4.807869
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2019-07-09T14:39:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7838c4516...
1b493b47-3df5-4436-9ed2-d4589b116e38
ishandutta2007/codeforces-d
dpair/normal/20/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef long double LD; typedef unsigned int UI; typedef pair <int, int> pi; template <typename T> inline void read(T &x){ x = 0;int fu = 1; char c = getchar(); while(c > 57 || c < 48){ if(c == 45) f...
ALGO
0.999849
3.556238
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "ce10c6fb9f51...
0f76e00b-1c02-45da-b205-f86ecb09bf43
Ritika-Subudhi/HPCLAB
LabProg7.cpp
// LabProg7.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include<mpi.h> using namespace std; int main(int argc,char *argv[]) { int sum = 0, myrank, numprocs, root = 0; MPI_Status status; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WO...
ALGO
0.998945
4.500069
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-03-01T15:52: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": "115a7e8cb513...
1bf4c904-e798-4067-aa33-314170a94dc5
Aniket2555/Leetcode-GFG-Solved-Questions
0812-rotate-string/0812-rotate-string.cpp
class Solution { public: bool rotateString(string s, string goal) { int n = s.length(); if (n != goal.length()) return false; if (s==goal){ return true; } for (int ind = 0; ind < n-1; ++ind) { string temp = s; int i = 0, j = ind, k = n - 1...
ALGO
0.999975
5.846166
{ "github_metadata": { "branch": "main", "commit_count": 300, "repo_created_at": "2025-06-16T09:07: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": "4f870802bf...
2d161560-f214-4b51-9fe4-7a174819ecb5
junyong1111/2022
algorithm/programmers/level_2/더맵게.cpp
#include <string> #include <vector> #include <algorithm> #include <queue> using namespace std; int mixed_scoville(int a, int b); int solution(vector<int> scoville, int K) { int answer = 0; int len = scoville.size(); bool check = false; priority_queue<int, vector<int> , greater<int>>pq; //오름차순 ...
ALGO
0.999846
5.06324
{ "github_metadata": { "branch": "main", "commit_count": 537, "repo_created_at": "2022-03-14T06:19:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbbd10e270...
edc9c744-8d88-4c98-a0a4-465be73a395b
alecpose/almpose
src/detection_algorithm.cpp
#include "../include/detection_algorithm.hpp" DetectionAlgorithm::DetectionAlgorithm(int width, int height, MarkersManager *markers, std::shared_ptr<Logger> logger) { camera_width = width; camera_height = height; markers_manager = markers; logger_ptr = logger; period = (long long)1000000 / fps; ...
TOOL
0.961261
4.655639
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-06-25T08:52:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ced722f15391...
53f8794a-777b-4f2c-b79c-19efbca8a019
WANDOKING/BOJ
C++/01929 소수 구하기.cpp
#include <iostream> #include <cstring> int main() { const int MAX_NUM = 1000000; // 편의를 위해 bIsPrime[0] 은 사용하지 않을 것 bool bIsPrime[MAX_NUM + 1]; memset(bIsPrime, true, sizeof(bool) * (MAX_NUM + 1)); bIsPrime[1] = false; for (int i = 2; i <= MAX_NUM; i++) { if (bIsPrime...
ALGO
0.999962
3.932489
{ "github_metadata": { "branch": "main", "commit_count": 492, "repo_created_at": "2022-06-30T10:57: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": "0213498c02...
3c6371ed-be7c-41b8-8a19-d043320c9f3d
matchbox-code/matchbox
include/BptIndSetEngine.h
#ifndef BPT_IND_SET_ENGINE_H #define BPT_IND_SET_ENGINE_H #include <iostream> #include <fstream> #include <vector> #include "Types.h" #include "BptGraph.h" #include "BptMatchingEngine.h" #include "BptVtxCovEngine.h" #include "Utility.h" // for ResizeVector. namespace Matchbox { class BptIndSetEngine { public: ///...
ALGO
0.967229
7.013989
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-01-18T00:27: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": "e519988096...
09a201b6-8538-421b-8df9-e23bf9c17c9a
rishabg30/Data-Structures-and-Algorithms
arrays_problems/union_of_two_sorted_arrays.cpp
#include <bits/stdc++.h> using namespace std; void printArray_1D(vector<int> &arr) { for (auto it : arr) { cout << it << " "; } cout << endl; } vector<int> findUnion(int arr1[], int arr2[], int n, int m) { vector<int> ans; int start_ptr1 = 0, start_ptr2 = 0; while (start_ptr1 < n && ...
ALGO
0.999996
4.927588
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2024-08-31T07:35:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27743f74cf9...
8581e051-dbfd-44e8-9a66-1a493018bf45
jrbeck/longshot
source/math/Plane3d.h
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * Plane3d // * // * very basic 3d plane abstraction // * // * // * // * // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #pragma once #include <cmath> #include "../math/v3d....
ALGO
0.942312
7.101788
{ "github_metadata": { "branch": "develop", "commit_count": 90, "repo_created_at": "2016-04-23T22:55: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": "713e856b...
96921d20-e382-4b8f-aa22-62f264db9880
d4nc3w/CPP-Course-Tasks
VecMapping.cpp
/* Write a template function named mapped() that takes a vector of any type and a function that will serve as a mapping function. The template should return a new vector whose elements will be equal to all elements from the input vector (passed in by the first argument) passed to the mapping function. */ #include <ios...
ALGO
0.994882
6.545416
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-04-06T10:48: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": "245baf9c144b...
85625998-de9c-422f-bfd4-a9345720584a
HashanEranga/data_structures_and_algorithms
03_Vector/sol12_subArrSort.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> subArrSortBruteForce(vector<int> arrUnSort){ vector<int> arrSort(arrUnSort); sort(arrSort.begin(), arrSort.end()); int i=0; int n=arrUnSort.size(); int j=n-1; while(i<n and arrUnSort[i]==arrSort[i]) i++; ...
ALGO
0.999996
4.59921
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2021-02-14T20:19: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": "2832b2cf452...
81d648ab-4a44-46d6-9d46-0b6b4ecd5a46
jonasfunke/MATLAB
TOOLBOX_GENERAL/find_peaks1d.cpp
/*[filtered image] = my_highlowfilter[raw image, w, sigma, n ] n is number of standart defiation for gaussian filter */ #include "mex.h" #include "matrix.h" #include "math.h" #include "stdlib.h" #include "DataProcessing.h" #include <vector> void mexFunction ( int nlhs, mxArray *plhs[], ...
ALGO
0.99893
4.437336
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2013-12-30T14:42: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": "f5321c348...
5041ced7-0f46-4e62-a77d-975f2b6c4b1d
christopherbridges1/CS300
ProjectTwo.cpp
#include <iostream> #include <fstream> #include <sstream> #include <vector> #include <algorithm> #include <cctype> /* <NAME> CS 300 DSA: Analysis and Design 18 FEB 2025 */ using namespace std; const int TABLE_SIZE = 211; // Defines the Course struct struct Course { string number; string name; vector<str...
TOOL
0.996912
6.366818
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-02-18T22:19: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": "eb4b1a26b80c...
1396981b-47ea-48f5-825c-1f9576596dd5
JH-LEE-Dev/Problem-Solving
graph/20182.cpp
#include <iostream> #include <vector> #include <queue> #include <stack> #include <unordered_set> #include <unordered_map> #include <set> #include <map> #include <algorithm> #include <limits> #include <tuple> #include <string> #include <cmath> #include <bitset> #include <iomanip> using namespace std; using vertex = tup...
ALGO
0.999947
3.773505
{ "github_metadata": { "branch": "master", "commit_count": 431, "repo_created_at": "2024-09-05T08:12: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": "a25a0b55...
7bd04047-7d7b-4023-a300-e275d9187150
MedAzizTousli/Competitive-Programming-Solutions
Codeforces/!Junior Training Sheet/A/A_Soroban.cpp
#include <bits/stdc++.h> #define int long long #define ll long long #define FLASH ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) // rep(i, 1, 5) --> {1,2,3,4} ...
ALGO
0.999502
3.602862
{ "github_metadata": { "branch": "master", "commit_count": 505, "repo_created_at": "2019-04-23T21:46:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b342f513...
1e407604-deec-498b-81fe-fd0db4c1c547
LucisUrbe/c-plus-plus-starters-pack
structures/graph/graph.hh
/// /// @file graph.hh /// @author <NAME> /// @copyright Shanghai Jiao Tong University, 2020 /// @date April 20, 2024 /// @version 0.2 /// @brief The graph class, storing a graph using an adjacent matrix. /// template <typename VERTEX_T, typename EDGE_T> class graph { public: virtual void ...
ALGO
0.995235
5.749342
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2023-12-31T08:33: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": "345a8d60e90...
b60a2c24-a5c2-4608-8356-94ea522fdc10
Mry3ll0w/EDNL
2023/arboles/p2.hpp
#include "arbolbinenla.h" #include <iostream> #include <string> #include <algorithm> #include <vector> #include <float.h> #include <stdlib.h> #include <cmath> #include <cassert> /** * Dos árboles binarios son similares cuando tienen idéntica estructura de ramificación, * es decir, ambos son vacíos, o en caso contrar...
ALGO
0.999191
5.108802
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2021-03-23T11:31: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": "4ddd5dd616...
4684bb51-6c55-4bd7-859e-cbc701ee53ee
mariaranha/pickup-delivery
lab_mc658/src/ex_coloring.cpp
//---------------------------------------------------------------------- // Example of an exact program to solve the Minimum Vertex Coloring Problem // with GUROBI Solver. // // Send comments/corrections to <NAME>. //---------------------------------------------------------------------- #include <gurobi_c++.h> #inclu...
ALGO
0.999382
4.042744
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-07-04T02:06:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bf3d036d95...
dad4b87f-5b2a-4576-89ec-0f10956ed641
kbiyani33/Coding_Ninjas_CPP
LinkedLists2/Assessment/DeleteMafterN.cpp
node* skipMdeleteN(node *head, int m, int n) { // Write your code here if(m == 0){ return NULL; } else if(n == 0){ return head; } else if(head == NULL || head -> next == NULL){ return head; } node *curr = head; node *curr2; while(cur...
ALGO
0.99832
3.101566
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2020-08-06T11:59: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": "f4178980c...
0b1fc2ca-ee3b-4eba-a340-ceed4852ae72
aniketsaini5/Geeta-University-Coding-Blocks
Assignment - 6168 (Array)/RunningSumoftheArray.cpp
// Given an array nums of length n. We define a running sum of an array as for every index runningSum[i] = sum(nums[0]…nums[i]). // Return the running sum of array for each i (0 <= i < n). // Input Format // First line contains an integer n representing number of elements. Next line contains n integers denoting array...
ALGO
0.999968
5.018997
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2024-06-13T11:53: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": "8d9973dfd77...
3aa49bb9-66c3-4134-8dc0-040e8bc7a7d0
thuang86714/LeetCode_Cpp
652_Find_Duplicate_Subtrees.cc
/* Given the root of a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any one of them. Two trees are duplicate if they have the same structure with the same node values. /* * Definition for a binary tree node. * struct TreeNode { * int ...
ALGO
0.999631
6.739574
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2022-12-07T09:13: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": "ffbc0103ab4...
575a4ce2-b262-4d9d-be26-03a93fee1b68
ericniebler/range-v3
example/accumulate_ints.cpp
// Range v3 library // // Copyright <NAME> 2019 // // 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://github.com/ericniebler/range-v3 // ///[accumu...
TEST
0.992196
6.686811
{ "github_metadata": { "branch": "master", "commit_count": 2541, "repo_created_at": "2013-11-11T16:05:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4273, "forks": 457, "issues": 262, "pull_requests": 24 }, "file_meta": { "content_id": ...
d7c9a0cc-bc6d-41a6-81fe-7e61c7e3923f
ShivanshMishra18/CS204
Standard_Implementations/treap.cpp
/* Problem Statement Output sorted sequence using treap. Then delete a node with given key and again output the sorted sequence. */ #include <bits/stdc++.h> using namespace std; struct node { int key, order; node *left, *right; }; // Left Rotation node * RRot(node * y) { node *x = y->left; y->left = ...
ALGO
0.999984
4.83368
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2019-08-03T04:57: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": "b5f9ef353...
3c8eac56-1ff3-42fd-87d2-6b68775a258a
msaadkhan54/README.md
PF assignment 2/Q9.cpp
#include <stdio.h> int main() { char grid[5][5] = { {' ', ' ', 'I', 'X', ' '}, {' ', 'X', ' ', ' ', ' '}, {'I', ' ', 'X', 'X', ' '}, {' ', ' ', ' ', 'I', 'X'}, {' ', 'X', ' ', ' ', 'P'} }; int playerRow, playerCol; int collectedItems = 0; char move; // ...
ALGO
0.953421
4.903904
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-08-28T07:24: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": "25e50f2f25a...
bfc88db4-8991-4afa-abb3-3c2eb8b6209f
JoaoRobert0/algoritmos-faculdade
Forca_Bruta/media.cpp
// Joãozinho está terminando seu primeiro semestre na faculdade e em uma das matérias ele que irá decidir sua nota, baseada nas notas das N provas que ele fez durante o semestre. A nota final de um aluno é baseada na média aritmética de 3 notas distintas. Mas Joãozinho não está preocupado em saber qual a maior nota fin...
ALGO
0.999889
5.285769
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-10-30T22:50:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47589a0299f...
2e137cdc-527c-4d52-90fd-243ab90b8c50
ztg-666/algorithm
algorithm/Dynamic planning/dp/dp Optimization/Fenwick Tree and Segment Tree Optimization for DP/LongestIdealString.cpp
#include <vector> #include <string> #include <algorithm> using namespace std; // 最长理想子序列 // 给定一个长度为n,只由小写字母组成的字符串s,给定一个非负整数k // 字符串s可以生成很多子序列,下面给出理想子序列的定义 // 子序列中任意相邻的两个字符,在字母表中位次的差值绝对值<=k // 返回最长理想子序列 // 1 <= n <= 10^5 // 0 <= k <= 25 // s只由小写字母组成 // 测试链接 : https://leetcode.cn/problems/longest-ideal-subsequence/ cla...
ALGO
0.999666
6.02871
{ "github_metadata": { "branch": "main", "commit_count": 150, "repo_created_at": "2025-02-20T11:55:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33dd5ff484...
e9a5c60b-755b-46a8-90ec-6e3ff804c786
cansuynk/ObjectOrientedProgramming
Homework1/main.cpp
/* @Author Student Name: <NAME> Student ID : 150170704 Date: 26.03.2019 */ #include "Vector.h" #include "Polynomial.h" #include <stdlib.h> #include <stdio.h> #include <fstream> #include <string> #include <sstream> #include <iostream> #include <math.h> using namespace std; Vector::Vector(int size=0, float *values=NULL...
TOOL
0.988245
3.493017
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-06-03T18:04: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": "724336afd2...
18c15835-826a-4846-8960-d07a62d66dff
Arjun3492/DSA
13)PatternWise/1)PrefixSum/1)rangeSumQuery.cpp
// 303. Range Sum Query - Immutable // https://leetcode.com/problems/range-sum-query-immutable class NumArray { private: std::vector<int> &arr; std::vector<int> prefixSum; int n; public: NumArray(std::vector<int> &nums) : arr(nums), prefixSum(nums.size(), 0) // { // initializing presum a...
ALGO
0.999428
7.007012
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2023-08-23T18:10: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": "e71d9db1a6...
767bcb40-6c70-4649-8039-c327e6a7be43
vanscc/div3-
solutionA.cpp
#include <iostream> #include <vector> int main () { int t = 0, n = 0, s = 0; std::cin >> t; while (t--) { int sum = 0; std::cin >> n >> s; std::vector<int> ll(n); for (int i = 0; i < n; ++i) { std::cin >> ll[i]; } if (s < ll[0]) { sum ...
ALGO
0.999937
3.9618
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-06-30T17:41: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": "d4b5c87bde...
15013239-85da-4616-8336-0dbbdf208c68
Codewith68/code-n-fun
DSA/PRIORITY QUEUE/isBTismaxheapornot.cpp
#include <iostream> #include <queue> #include <vector> #include <climits> using namespace std; // Definition of a tree node class Node { public: int data; Node *left, *right; Node(int data) { this->data = data; this->left = NULL; this->right = NULL; } }; // Function to check if...
ALGO
0.999966
5.987376
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2024-10-25T07:47:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ccbd7095c1...
367f6837-cacd-4731-bc2c-38f57b47c61b
pzcfoo/ctci
chapter_two/linked_list.h
#include <iostream> #include <memory> template <typename T> class Node; namespace linked_list { template <typename T> std::shared_ptr<Node<T>> AppendToTail(std::shared_ptr<Node<T>> n, T d) { auto new_ = std::make_shared<Node<T>>(d); while (n->next != nullptr) { n = n-...
ALGO
0.995138
5.173895
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-10-28T05:35: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": "42384d87f4...
0d30f010-8545-4b67-8cf1-fc5196c3b34d
eljulians/gameboy_emulator
src/cpu/instructions/rotates.cpp
#include <stdint.h> #include "../registers.hpp" #include "../cpu.hpp" #include "rotates.hpp" uint8_t Rotates::rotateLeft(uint8_t value, bool carry) { bool c = value & 0x80; uint8_t result = ((value << 1) + carry) & 0xFF; cpu.flags->set_z(result == 0x00); cpu.flags->set_n(0); cpu.flags->set_h(0);...
ALGO
0.974922
6.048245
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2022-11-19T16:12: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": "07a661ec...
cb436452-f672-4286-b00d-a1a243173aeb
Nicolas-Fediuk/UTN_Tp01_C
ejercicio13.cpp
/* Hacer un programa para un cajero automático para ingresar un importe a retirar y convertir el mismo en la cantidad de billetes de $ 1.000, $ 500, $ 200 y $ 100 a entregar. Ejemplo 1: Si el importe a retirar es $ 2.500 se mostrara por pantalla que se deberán entregar 2 billetes de $ 1.000, 1 billete de $ 500 y 0 bill...
ALGO
0.981962
3.614606
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-10-04T19:07: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": "fb35e65dea...
52228c77-6e19-416c-9eca-33194d1f7afe
YoshitakaNagai/bev_converter
src/bev_flow_estimator_compact.cpp
#include "bev_converter/bev_flow_estimator_compact.h" BEVFlowEstimator::BEVFlowEstimator(void) : nh("~"), listener_(tf_buffer_) { // ros loop rate nh.param("Hz", Hz, {100.0}); // grid nh.param("WIDTH", WIDTH, {10.0}); nh.param("GRID_NUM", GRID_NUM, {50}); // flow nh.param("MANUAL_CROP_SIZE", MANUAL_...
ALGO
0.990203
3.891101
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2020-07-19T02:08:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "a4271975...
15c717e7-d4f7-4a5c-b387-6302b63a8417
NanaseRuri/LeetCodeCpp
LeetCodeCpp/Solution003LongestSubstringWithoutRepeatingCharacters.cpp
#include "stdafx.h" using namespace std; class Solution003LongestSubstringWithoutRepeatingCharacters { public: int lengthOfLongestSubstring(string s) { int left = 0; int maxLength = 0; int lastIndex[256]; for (size_t i = 0; i < 256; i++) { lastIndex[i] = -1; } for (size_t i = 0; i < s.length(); i++)...
ALGO
0.999854
4.601873
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2021-10-14T13:50: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": "2bf82b4813a...
f43eab97-25ca-471f-bac5-ba19221f5c55
VladimirShib/C-and-SFML
workshop2/workshop2.4/main.cpp
//Moving balls with collision. Each ball's speed and color are random. Color is the average RGB of two colors #include <SFML/Graphics.hpp> #include <SFML/System.hpp> #include <SFML/Window.hpp> #include <vector> #include <cmath> #include <random> #include <ctime> constexpr unsigned WINDOW_WIDTH = 800; constexpr unsign...
ALGO
0.99413
5.930597
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-09-06T17:37: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": "7edb2ad2753...
2564ae1c-17ba-4461-847e-79ff3fd5df90
JeremyDLong/my-programs
tictactoe.cpp
#include <stdio.h> #include <iostream> using namespace std; char board[3][3]; char player; int numTurns; void setupGame(){ player='X'; numTurns=0; for (int row=0; row<3; row++){ for(int col=0;col<3; col++){ board[row][col]=' '; } } } void drawScreen(){ printf(" %c | %c | %c\n", board[0][0], board...
ALGO
0.993226
4.296572
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-11-02T15:28: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": "c8fd894d55...
6543f763-a694-4434-b1a3-a16418bcf7b7
Williamp0403/C-
Apuntadores y direcciones de memoria/Guia de ejercicios/Ejercicio 1.cpp
// Ejercicio 1: // Sigue las siguientes instrucciones: // 1. Declara tres variables enteras: a, b y c. Inicializa "a" con 10, "b" con 5 y "c" con 0. // 2. Declara un puntero "p" que apunte a la dirección de "c". // 3. Declara un puntero "z" que apunte a la dirección de "b". // 4. Asigna el valor de "a" a la variable “c...
ALGO
0.999681
3.212217
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-17T23:00: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": "97cd0aea6cdb...
e82051ae-e474-4a39-8067-1a946a971978
MissAashnaa1/DSA-Questions
Medium/Buy Maximum Stocks if i stocks can be bought on i-th day/buy-maximum-stocks-if-i-stocks-can-be-bought-on-ith-day.cpp
//{ Driver Code Starts /* Driver program to test above function */ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int buyMaximumProducts(int n, int k, int price[]){ //Write your code here vector<pair<int,int>>v; for(int i=0;i<n;i++){ ...
ALGO
0.99997
5.95041
{ "github_metadata": { "branch": "main", "commit_count": 2426, "repo_created_at": "2023-08-16T21:44: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": "44a204f95...
8ced45ee-79d9-4b7b-9cc1-2410d3f69201
Escapist0516/SEU_LEX-YACC
seu_yacc/main.cpp
/* main.cpp seu_yacc start time:2020/05/29 */ #include "convert.h" #include "structs.h" #include "calculate_first.h" #include "construct_lr1.h" #include "lr1_to_lalr.h" #include "read_yacc.h" #include "gengerate_code.h" #include "gengerate_code.h" #include "construct_table.h" #include <iostream> #include <ctime...
TOOL
0.926209
3.580776
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-16T01:57:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22a8b8afb7...
1b177e7e-1b24-417e-a9c7-92e33509bbb5
keelim/when-univ
practice_cpp/Project1/first.cpp
#include<iostream> #include<set> #include<vector> using namespace std; int main_sub (void) { } class Problem { public: void first () { int testCase; cin >> testCase; for (int i=1; i <= testCase; i++) { cout << "#" << testCase << endl; int input; cin >> input; int** array=new int* [input]; //포인터로...
ALGO
0.998968
3.491281
{ "github_metadata": { "branch": "master", "commit_count": 456, "repo_created_at": "2022-05-28T10:14: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": "c5100fd5...