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
25ba5a88-0ab2-4965-8ef6-82108976cc44
LiquidityProtocol/AMM-Simulator
src/Protocols/CurvePool.cpp
#include "CurvePool.hpp" #include <cmath> double solve(int n, double a, double b) { // solve equation x^n + ax + b = 0 if (abs(a) < 1e-6) return std::pow(-b, 1.0 / n); auto calc_f = [&](double x) { return std::pow(x, n) + a * x + b; }; auto solve_interval = [&](double l, double r, bool inc...
ALGO
0.999461
4.954741
{ "github_metadata": { "branch": "main", "commit_count": 786, "repo_created_at": "2022-11-17T14:57:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 2, "issues": 1, "pull_requests": 3 }, "file_meta": { "content_id": "c7d19edad8...
52293e48-c8f7-48e5-9e56-d8fb58ce81dd
Chimaste/Tp-3-Informatica-2
Trabajo practico 3.Estructuras/Ejercicio 1.cpp
#include <stdio.h> #include <string.h> struct Persona { char apellido[50]; char nombre[50]; int edad; float altura; }; void cargarPorValor(struct Persona persona, int indice, struct Persona personas[]) { personas[indice] = persona; } void cargarPorReferencia(struct Persona *persona, int indice, struct Persona p...
TOOL
0.937029
4.456047
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-10-20T20:45: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": "7c32a378d0bc...
2311fbc4-8bd9-4c6d-913a-aae814df4d95
Nahuel239660/ObliA2-Nahuel239660
funciones/sudoku.cpp
#include "../tads/sudoku.h" #include <cstring> #include <iostream> // Inicializa el tablero dinámico según las dimensiones void inicializarTablero(Sudoku& s) { s.tablero = new int*[s.filas]; for (int i = 0; i < s.filas; i++) { s.tablero[i] = new int[s.columnas]; for (int j = 0; j < s.columnas; ...
ALGO
0.997169
5.900134
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-05-19T15:50:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4230291dc6b...
ff42a4da-691a-44c8-9ed1-36e1957757ff
cabre94/IB
ICOM_2021/Practica_06/ej_08.cpp
#include <iostream> using namespace std; // Función StrStr que reciba dos strings de <string> y busque sobre el primero de ellos por la ocurrencia del segundo. // tiene que devolver la ṕosicion de s1 donde aparece s2, si no aparece hay que devoler un -1. int StrStr(string s1, string s2){ return s1.find(s2); } // ht...
ALGO
0.9613
4.683337
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-04-17T15:12: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": "a51c73b1f0e7...
44bc194d-5926-4158-86fd-d0c6c1a29bb6
7ganam/ZL_position_control
zlabs_position_control/zlabs_position_control_1/zlabs_position_control_1.ino
// PID control of DC motor experiment. #include <PID_v1.h> #include <stdio.h> //Define PID controller variables //-------------------------------------------------------------------------------------------------------------------------------------------- double Kp =10; double Ki = 0; double Kd = .4; double Setpoint...
TOOL
0.91176
5.518271
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-04-23T15:04:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "963d3213a9...
164f44a7-c504-4d42-bca0-16bc7d59e7c2
SaloniShah95/Implementing-testing-and-experimental-analysis-of-centrality-concepts
Heuristics/layerComposerv2.cpp
// Program to find layer compositions through unweighted and undirected graphs // May 28, 2018: Edited the last parameter of the NOT List #include <iostream> #include <fstream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <math.h> #include <sys/stat.h> #include <sys/types.h...
ALGO
0.993391
3.219893
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-02-15T15:39:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "182ab069a...
2d89fc79-8fb5-43b5-b90d-981821521ace
Yuriyzabegaev/advent_of_code_2023
day8/day8.cpp
#include <iostream> #include <fstream> #include <string> #include <cassert> #include <sstream> #include <vector> #include <regex> #include <array> #include <unordered_map> #include <algorithm> using namespace std; regex mapPattern("^(\\w+) = \\((\\w+), (\\w+)\\)"); int main() { string filename = "input.txt"; ...
ALGO
0.999771
4.494756
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-12-09T21:21: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": "6a606edd876...
9b928113-516b-4dab-be2c-a873e43ed4aa
agostinhobritojr/agostinhobritojr.github.io
tutorial/pdi/exemplos/convolucao/convolucao.cpp
#include <iostream> #include <opencv2/opencv.hpp> #include "camera.hpp" void printmask(cv::Mat &m) { for (int i = 0; i < m.size().height; i++) { for (int j = 0; j < m.size().width; j++) { std::cout << m.at<float>(i, j) << ","; } std::cout << std::endl; } } int main(int, char **) { cv::VideoCap...
TOOL
0.947997
4.501023
{ "github_metadata": { "branch": "master", "commit_count": 209, "repo_created_at": "2018-08-20T20:16:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "394aa8e4...
93df91e4-9f0a-4b84-a445-cf090351b7ad
sksingh234/DSAMentorshipProgramAI
newArrayInCPP/vectorExercise01/kSteps.cpp
/* Rotate the given array ‘a’ by k steps, where k is non-negative. Note : k can be greater than n as well where n is the size of array ‘a’. */ #include<iostream> #include<vector> using namespace std; void display(vector<int> &a){ for (int i = 0; i < a.size(); i++) { cout<<a[i]<<" "; } ...
ALGO
0.999972
5.259798
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-03-11T10:25: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": "806f44427cf...
5cc54488-bd90-4865-b1d7-4876a56182bd
kyya/Game2048
Game2048/SimpleMatrix.cpp
#include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; class SimpleMatrix { public: int rows; int columns; int **element; SimpleMatrix(int row, int fill) { this->init(row, fill); } //void Copy(SimpleMatrix &mat) //{ // for (int i = 0; i < 4; i++) // for (int j = 0; j < 4; j++) /...
TOOL
0.94515
3.904419
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-06-15T07:51: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": "12f56eb888...
e3c42d4c-3a66-4de9-abde-0206d4bc2464
1622vishal/Data-Structures-and-Algorithms
LinkedLists/RemoveNthfromEnd.cpp
/*----Written by :- <NAME>----*/ /*----Date :- 04-12-23----*/ /*Program to remove Nth node from end in a Linked List*/ #include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* next; Node(int data1) { data = data1; Node* next = nullptr; } }; Node* AtoL...
ALGO
0.999986
5.720986
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2023-10-29T14:03:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef53f54b0...
01841751-9a48-4fd9-8f73-9d6438ac3ba3
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/02/0210/personal_submission/cf1082d_yawn_sean.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3,Ofast,unroll-loops") // #include "atcoder/convolution" // #include "atcoder/dsu" // #include "atcoder/fenwicktree" // #include "atcoder/lazysegtree" // #include "atcoder/math" // #include "atcoder/maxflow" // #include "atcoder/mincostflow" // #include "atcoder/modint" /...
ALGO
0.999791
3.83377
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "f19d...
106a0898-ce37-4ef7-9be1-49d408d33e5b
aldwinhermanudin/side-projects
buoy_detection/src/bouy_tracking.cpp
#include <vector> #include <iostream> #include <opencv2/highgui/highgui.hpp> #include <opencv2/core/core.hpp> #include <opencv2/video/tracking.hpp> using namespace cv; using namespace std; RNG rng(12345); int imageProcessing(Mat imgInput, int low_hue, int high_hue, int minimum_area, int *detected_center_x, int *detec...
ALGO
0.981079
5.382973
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2015-07-27T05:36: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": "1ea2f0217...
eb685c2d-62d6-4bc8-84ca-89832255ec33
MrAyushBajpai/PractiseQues
C++/DSA/Problems/Leetcode/LC173.cpp
#include <iostream> #include <vector> #include <stack> using namespace std; 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 *righ...
ALGO
0.999918
5.701121
{ "github_metadata": { "branch": "main", "commit_count": 323, "repo_created_at": "2024-06-03T10:06: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": "4d51073d18...
72e25d24-9905-4a66-b529-8bdb3cf9baaa
Host-Vedas/DSA-WITH-C-PLUS-PLUS
Phase 1/L18 InsertionSort/insertionSearch.cpp
#include <iostream> using namespace std; void insertionSort(int arr[], int n) { for (int i = 1; i < n; i++) { int temp = arr[i]; int j = i - 1; for (; j >= 0; j--) { if (arr[j] > temp) { // shift arr[j + 1] = arr[j]; ...
ALGO
0.999929
5.239763
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-06T04:38: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": "e4903459f513...
6c0fab71-4c9e-4788-931a-82b26238b028
LakshayAggarwal25/C-Plus-Plus-DSA
CPP_DSA/Questions/Challenges/Recursion/sortedArray.cpp
/* Take as input N, the size of an integer array. Take one more input, which is a list of N integers separated by a space, and store that in an array. Write a recursive function which prints true if the array is sorted in Increasing Order, and false otherwise. Input Format N x y z Constraints 1 < N < 1000 -10^9 < i ...
ALGO
0.99983
5.225944
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-04-09T08:49: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": "9fbaebf60cc...
7a940aa7-2f70-4b44-9872-7ffb91a773d8
rodarima/cps
src/lp.cc
#include <ilcplex/ilocplex.h> using namespace std; int verbose = 1; class Boxes { protected: IloEnv env; IloModel model; IloIntVarArray x, y; IloBoolVarArray rot; IloIntVar L; int W; int num_boxes = 0; int max_L = 0; IloIntArray w, h; public: Boxes() { env = IloEnv(); model = IloModel(env); w...
ALGO
0.999254
3.769002
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-06-18T21:53: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": "c64f9693b...
23d1c576-bf9b-4aeb-85f1-11c3ebca230b
CunjunWang/imooc-algorithm
interview-algorithm/dynamic-programming/LeetCode279_PerfectSquare/main.cpp
#include <iostream> #include <vector> using namespace std; class Solution { private: vector<int> memo; //递归 + 记忆化搜索 int helper(int n) { if (n <= 1) { return n; } if (memo[n] != -1) { return memo[n]; } int result = INT_MAX; // 把比n小的数遍...
ALGO
0.999578
4.736882
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2019-06-29T04:02:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ca18ab4...
fed9b9eb-a7ad-4325-b332-7825a6a7461f
Ryb7532/AtCoder
submissions/abc166/f.cpp
#include <bits/stdc++.h> using namespace std; int main() { long N, num[3]; cin >> N >> num[0] >> num[1] >> num[2]; string s[N], c[3] = {"AB", "BC", "AC"}; int ans[N]; for (int i=0; i<N; i++) cin >> s[i]; if (num[0]+num[1]+num[2] == 0) { cout << "No\n"; return 0; } if (num[0]+num[1]+num[2] =...
ALGO
0.999994
3.444937
{ "github_metadata": { "branch": "master", "commit_count": 249, "repo_created_at": "2021-06-27T06:11:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6dad1868...
1bf67284-8958-4075-b48f-1dbf1e9d983b
89P13-24/A.I.
8-blocks/manhattan.cpp
#include<bits/stdc++.h> using namespace std; struct state{ public : vector<int> s; int distance; int depth; bool operator>(const state& other) const{ return distance > other.distance; } }; vector<int> transform_(int n,vector<vector<int>> v); pair<int,int> find_index(int n,int index,vector<...
ALGO
0.999956
4.83955
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-01-21T14:09: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": "a0c33623b58...
adc7151a-393f-453b-931c-8166980700a2
giovige/cooperativeTextEditor
Client/client/classes/model/algorithmcrdt.cpp
#include <iostream> #include <cmath> #include <random> #include "include/algorithmcrdt.h" AlgorithmCRDT::AlgorithmCRDT() { this->site_id_ = -1; this->counter_ = 100; this->boundary_ = 1024; this->base_ = 2048; this->last_operation_source_ = OperationSource::NONE; } int AlgorithmCRDT::getSiteID() ...
ALGO
0.997381
5.436051
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-10-07T15:49: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": "b030434ba...
666399c3-2dee-4103-b19e-a1cb96e36052
shareone2/HaiZeiOJ
643向右看齐.cpp
/************************************************************************* > File Name: 643向右看齐.cpp > Author: lsj > Mail: <EMAIL> > Created Time: Sat Sep 26 19:33:54 2020 ************************************************************************/ #include <iostream> #include <stack> #define max_n 100000 using names...
ALGO
0.999998
4.399042
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-09-06T10:40:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "921e0ca44...
761c1bb5-b2ec-451a-95c3-3ed7f954337d
codingNoob12/algorithm-study
cpp/바킹독_알고리즘/스택/10828_1.cpp
#include <bits/stdc++.h> using namespace std; const int MX = 10001; int dat[MX]; int pos; void push(int num) { dat[pos++] = num; } void pop() { pos--; } int top() { return dat[pos - 1]; } int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; for (int i = 0; i < n; i++)...
ALGO
0.998236
4.479722
{ "github_metadata": { "branch": "main", "commit_count": 160, "repo_created_at": "2022-11-06T09:29: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": "0e3eb9cfd5...
7ea3ea27-bb02-46c7-ad57-08559bc3a85e
le-benjamin/competitive-programming
Kattis/fizzbuzz2.cpp
#include <iostream> #include <fstream> #include <string> #include <map> #include <algorithm> #include <vector> #include <climits> #define vt std::vector #define pb push_back #define ll long long #define PI 3.1415926535897932 int main() { using std::cout; using std::cin; using std::string; int n, m; cin >> n...
ALGO
0.999921
4.022224
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2022-02-24T04:52:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dff3bab83b0...
166bdb0a-e606-446b-bf3d-5144286b5a0c
bony2023/Competitive-Programming
Others/Codeforces Randoms/486B.cpp
// Author : <NAME> // // INCLUDES #include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace s...
ALGO
0.999895
3.112827
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2014-08-06T08:27:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b8a68e64...
753b51cf-7fc0-4771-9b7e-93de619f417f
raphhhcor/Projet_C
matrix.cpp
#include "matrix.h" #include <cmath> #include <stdexcept> // ------------------- Constructors ----------------------- Matrix::Matrix(size_t rows, size_t cols) : rows(rows), cols(cols), data(rows, std::vector<double>(cols, 0.0)) { } Matrix::Matrix(const std::vector<std::vector<double>>& values) : data(values),...
ALGO
0.999542
6.227419
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2025-01-14T10:38: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": "48826b5453...
103a27f5-3898-41f9-9813-fa9b39da09c1
ayoubmajid67/learn
software engineer/cpp/cpp and oop/code/38-Sort an array ➡/file.cpp
#include <iostream> using namespace std; void sort_asc(int arr[], int size) { bool x = false; do { x = false; for (int i = 0; i < size - 1; i++) { if (arr[i] > arr[i + 1]) { int temp = arr[i]; arr[i] = arr[i + 1]; ...
ALGO
0.999959
4.68529
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-02-28T23:43: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": "0df09d8211a...
86eaddc3-26c2-4ceb-a372-017c9482628d
niklasso/mcl
mcl/SatSweep.h
/**************************************************************************************[SatSweep.h] Copyright (c) 2008, <NAME> 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, ...
ALGO
0.999126
6.954586
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2012-03-30T13:19:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c198ffe3...
e7a8ce8c-8e7f-4118-a466-ebfaad79dd5c
ths-rwth/carl
src/carl-common/datastructures/Heap.h
/** * @file Heap.h * This file has been extracted from mathic. It was deployed without license at: * http://www.broune.com/papers/issac2012.html * * As of now, it is available at @cite Mathic . */ #pragma once #include "CompactTree.h" #include <ostream> #include <string> #include <vector> namespace carl { ...
ALGO
0.936263
6.076812
{ "github_metadata": { "branch": "master", "commit_count": 7730, "repo_created_at": "2015-05-08T13:25:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30, "forks": 15, "issues": 5, "pull_requests": 2 }, "file_meta": { "content_id": "2f8b4e...
82873ce7-217f-4322-ab1a-c019fff92c3e
TUE-EE-ES/modular-flow-shop-scheduler
app/scheduler/scheduler/include/fms/scheduler.hpp
#ifndef FMS_SCHEDULER_HPP #define FMS_SCHEDULER_HPP #include "fms/cli/command_line.hpp" #include "fms/problem/flow_shop.hpp" #include "fms/problem/production_line.hpp" #include "fms/problem/xml_parser.hpp" #include "fms/solvers/partial_solution.hpp" #include "fms/solvers/production_line_solution.hpp" #include "fms/sol...
ALGO
0.953658
7.229821
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2025-04-29T16:02:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "590ad86cb728...
e4e4f1b8-e151-4c69-bc45-e84666b9e8b9
RakhiChaudhary/Leetcode_practice
0053-maximum-subarray/0053-maximum-subarray.cpp
class Solution { public: int maxSubArray(vector<int>& nums) { /* int n=nums.size(); int maxi=INT_MIN; for(int i=0;i<n;i++){ int sum=0; for(int j=i;j<n;j++) { sum+=nums[j]; maxi=max(sum,maxi); } } return maxi; ...
ALGO
0.999847
5.637552
{ "github_metadata": { "branch": "master", "commit_count": 188, "repo_created_at": "2023-07-31T07:43: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": "7396931e...
6f375001-7fa9-4b4f-ad11-d34a799723c3
Anower77/Phitron-DSA-
Search.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node* next; Node(int val) { this->val = val; this->next = NULL; } }; // finde index int findIndex(Node* head, int x) { int index = 0; Node* tamp = head; while (tamp != NULL) { if (tamp->val...
ALGO
0.999881
4.347226
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-11-28T18:08: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": "455da28045...
c2fb8ea4-980f-4865-9dbc-240b8d4484dc
Next-Gen-UI/Code-Dynamics
Leetcode/0813. Largest Sum of Averages/0813.cpp
class Solution { public: double largestSumOfAverages(vector<int>& nums, int K) { const int n = nums.size(); // dp[i][k] := largest score to partition first i nums into k groups dp.resize(n + 1, vector<double>(K + 1)); prefix.resize(n + 1); partial_sum(begin(nums), end(nums), begin(prefix) + 1); ...
ALGO
0.999344
6.598709
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2022-01-06T07:57:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 44, "forks": 35, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46dcfc2f6c...
8971e6f3-f62d-4cbc-a78d-99b1cb3fda08
cherie11/InteractiveDigitalPhotomontage
PhotoMontage_cml_v1/ConjGrad.h
// // ConjGrad.hpp // 2017cv // // Created by <NAME> on 18/5/20. // Copyright © 2018年 Wang. All rights reserved. // #ifndef ConjGrad_h #define ConjGrad_h #include <iostream> #include <set> #include <vector> using namespace std; /* Col element represent the value and its col index */ class Col{ private: int...
ALGO
0.996485
3.635408
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-06-19T12:42:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1dbb5e0f...
f2e684ce-06a4-44d4-9a0d-a4d0be7f33a5
GustavoKnocs/C-_Univali
Ex2-Matrizes.cpp
#include <iostream> using namespace std; int main() { int n, m; cout << "Informe a dimensão da matriz A(n x m):\n"; do{ cout << "n(1 ate 15): "; cin >> n; } while(n <= 0 or n > 15); do{ cout << "m(1 ate 25): "; cin >> m; } while(m <= 0 or m > 25); ...
ALGO
0.99388
3.886158
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-05-01T05:47:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4444a42ecdd...
56d4ff70-985a-43e9-9fc7-a4aefb73027f
Bevia/CppChallenges
Advanced/MathematicsAndAlgorithms/MinimumCost/minimumcost.cpp
#include <iostream> #include <vector> #include <fstream> int minCostPath(const std::vector<std::vector<int>>& cost, std::vector<std::vector<int>>& dp) { int rows = cost.size(); int cols = cost[0].size(); dp.resize(rows, std::vector<int>(cols, 0)); dp[0][0] = cost[0][0]; for (int i = ...
ALGO
0.999945
6.392502
{ "github_metadata": { "branch": "main", "commit_count": 261, "repo_created_at": "2024-06-14T12:53:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fe4c3df01...
43d19470-97d0-45a8-b58d-1743a82375b7
melinaloza/AyED-UTN.FRBA
Ejercicios/Guia1/Ejercicio14.cpp
#include <iostream> using namespace std; int main() { int sumatoria=0; int id, peso,puerto; int idMayorPeso; int mayorPeso=0; int cantPuerto1=0; int cantPuerto2=0; int cantPuerto3=0; int i=0; for(i=0; i < 4; i++){ cout << "Identificacion del contendor: " << endl; c...
ALGO
0.998102
3.887631
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-08-20T01:04: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": "35b3afbf2df...
b905df3d-b50c-4739-917e-6d1909901b70
Ccccx159/PAT_Practice
1019.cpp
/* <NAME> 1019 数字黑洞 (20 分) 给定任一个各位数字不完全相同的 4 位正整数,如果我们先把 4 个数字按非递增排序, 再按非递减排序,然后用第 1 个数字减第 2 个数字,将得到一个新的数字。 一直重复这样做,我们很快会停在有“数字黑洞”之称的 6174,这个神奇的数字也叫 Kaprekar 常数。 例如,我们从6767开始,将得到 7766 - 6677 = 1089 9810 - 0189 = 9621 9621 - 1269 = 8352 8532 - 2358 = 6174 7641 - 1467 = 6174 … … 现给定任意 4 位正整数,请编写程序演示到达黑洞的过程。 输入格式: 输入...
ALGO
0.999815
3.973565
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-07-11T12:01:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc4c1575b...
f8000e06-e236-4c18-9a3f-dd394c53e80d
muhaimenul/problem-solving
problem solving using c++/Equalize the Array.cpp
/*------------------------------------------------------- <copyright notice> Purpose: Solution of Hackerrank's Equalize the Array Problem @author <NAME> <linkedin.com/in/muhaimenul> @version 1.2 4/11/17 Please fork and leave a star if it's useful to you. --------------------------------------...
ALGO
0.999976
4.01456
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2019-03-08T16:00:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "255385a6f...
3088b9b5-53ee-4bea-b8c0-fe3243af60e1
kalexanderk/Algorithms
Lab1/GEOMETRY.cpp
#include "geometry.h" #include<iostream> #include<fstream> using namespace std; char SignChar(double x) { if (x>=0) return ('+'); else return ('-'); } double Deter2(double a1 ,double b1,double c1,double d1) { return(a1*d1-c1*b1); } double Deter3 (double a1, double b1, double c1, double d1, dou...
ALGO
0.982136
3.463172
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-03-13T17:02: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": "6568f75b2a...
a01a19f4-cedf-4553-ad65-138b1bc998e5
Thomas-Schatz/perceptual-tuning-pnas
tools/dpgmm/dpmm_subclusters_2014-08-06/common/reduction_array_mex.h
#ifndef REDUCTION_ARRAY #define REDUCTION_ARRAY #include "assert.h" #include "string.h" #include <cstdlib> #include <stdlib.h> #include <iostream> #include "mex.h" #define _min_D_cache_line 32 template <typename T> class reduction_array { private: arr(T) data; int numThreads; int D; public: // ---------...
TOOL
0.959767
4.160685
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-11-24T18:53:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be2e11615a81...
9e9228b0-8f11-48b9-9459-246220ea3c20
fbigiolli/uba-aed3tps
tp1/ej3/misc/3BT.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int sumaRestantes(vector<pair<int,int>>& libro, int index, int ignorarElem) { int suma = 0; for(int i = index; i < libro.size(); ++i) { if(i != ignorarElem) suma += libro[i].first; } return suma; } ...
ALGO
0.999916
3.650167
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-08-24T14:24: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": "d7ba9071a0d...
45e0afc9-d8a4-4c1d-a11d-c62e0bf9006c
oncsr/BOJ_log
백준/Diamond/32564. Eradication Sort/Eradication Sort.cc
#include <bits/stdc++.h> using namespace std; using ll = long long; struct Line { ll a, b; ll get(ll x) { return a * x + b; } }; struct Node { int l, r; ll s, e; Line line; }; struct Li_Chao { vector<Node> tree; void init(ll s, ll e) { tree.push_back({ -1, -1, s, e, {0, LLONG_MAX} }); } void upt(int nod...
ALGO
0.999287
3.919522
{ "github_metadata": { "branch": "main", "commit_count": 1235, "repo_created_at": "2022-09-15T12:08: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": "7a388f346...
838fe9f2-a6d2-464b-a6b1-37a4d0c36a95
haozzzzzzzz/osgEarthX
environment/build/3rdParty/include/geos/geos/algorithm/PointLocator.h
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2005-2011 Refractions Research Inc. * Copyright (C) 2001-2002 Vivid Solutions Inc. * * This is free software; you can redistribute and/or modify it under * th...
TOOL
0.955939
7.26423
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2015-09-19T06:19:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 75, "forks": 48, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "bdf4506...
ec889ebe-ad3f-40ab-99e3-bf4154347eb6
azurah/Data-Structure-and-Algorithms-Learning-Path
Codes/Cpp/array_Q2.cpp
/* Search an element in a sorted(ascending) and rotated array. Asuming array elements are distinct */ #include <bits/stdc++.h> using namespace std; int pivotBS(int arr[], int n, int key); void printArr(int *arr, int n); int main(){ int n,item,res; cout<<"Enter No of elements in array: "; cin>>n; int arr[n]; ...
ALGO
0.99999
5.302308
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2019-09-22T04:34:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b83085ef0...
c2a830bd-c6f7-447a-b795-582fdb7c548c
Benlee1000/US-COVID-Vaccination-Database-Searcher
DatabaseOrganizer.h
#pragma once #include <iostream> #include "GlobalConstants.h" #include "Database.h" using namespace std; class DatabaseOrganizer { private: // Temporary values for searching for a state int middleIndex; // Store temporary states, for swapping states State tempState; State tempCopyState; // Temporary values f...
ALGO
0.986988
5.923366
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2021-03-30T20:02: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": "96a8f69f4...
3d9a596d-0052-49c4-8016-3352df185141
anmol-kumar0815/c-plus-plus-basics
ritika.cpp
#include <iostream> #include<math.h> #include<vector> #define double long long int; using namespace std; long long int helper(long long int a,long long int b,vector<long long int> X,vector<long long int> Y,long long int n){ long long int count=0; for(long long int i=0;i<n;i++){ long long in...
ALGO
0.999987
4.096428
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-07-20T10:12:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "c1bd0f0fcc...
18f79254-b43b-4a9d-be65-49975b0019b0
akshayrathore11/Data-Structures-and-Algorithms
08_Linked-List/01_SinglyLL.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; // Constructor Node(int value) { this->data = value; this->next = NULL; } }; int getLen(Node *head) { int len = 0; Node *temp = head; while (temp != NULL) { temp = temp-...
ALGO
0.999949
5.205517
{ "github_metadata": { "branch": "master", "commit_count": 203, "repo_created_at": "2025-02-01T09:54:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb34bc00...
ec2c3918-a486-494e-8471-3f017b7c1eeb
Robass-Atif/DSA
week 12/2022-CS-150.cpp
#include <iostream> using namespace std; class AVLTree { public: class node { public: int data; node *left; node *right; node(int d) { data = d; left = NULL; right = NULL; } }; node *root = NULL; // height ...
ALGO
0.999836
4.951837
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2023-11-13T05:22: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": "0716b867f...
c5892f80-2bef-4f81-a3b8-22eb0942b5f3
Jiaming07/ConnectFour
Strategy/Node.hpp
// // Created by Colin on 2021/3/29. // #ifndef STRATEGY_NODE_H #define STRATEGY_NODE_H #include <vector> #include "Board.hpp" using namespace std; const int8_t INIT_END_VALUE = -127; short max_layer = 0; int node_num = 0; double activate[] = { 10, 9.64197015, 9.40783903, 9.0376493 , 8.477929...
ALGO
0.999846
4.934471
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-24T13:50: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": "0d6c62c523ce...
d31742ee-9ad0-487b-83c0-abb0d3047317
borglab/gtsam
gtsam/constrained/NonlinearInequalityConstraint.cpp
/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: <NAME>, et al. (see THANKS for the full author list) * See LICENSE for the license information * ------------...
ALGO
0.971945
7.708752
{ "github_metadata": { "branch": "develop", "commit_count": 19360, "repo_created_at": "2017-03-27T17:12:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3002, "forks": 845, "issues": 99, "pull_requests": 25 }, "file_meta": { "content_id": ...
93c03bfa-6d59-40a9-b131-2823245f339a
joses97/SanchezJose_CSC5_41202
Homework/Assignment 1/Savitch_9thEd_Chapt1_Prob1_Prog_Proj/main.cpp
/* * File: main.cpp * Author: <NAME> * Savitch chapter 1 Problem 1 Programming Projects * Created on January 5, 2016, 5:37 PM * Purpose: Calculate sum and multiplication of two numbers */ //System Libraries #include <iostream> using namespace std; //User Libraries //Global Constant const char nmbr1=20; //Fir...
ALGO
0.999263
4.104527
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2016-01-05T18:29: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": "4356fbb2...
324541dd-4c1a-4e4c-bb2b-6547072ffd03
guyulongcs/Leetcode
Leetcode Program/220.cc
#include <iostream> #include <vector> #include <string> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <algorithm> using namespace std; class Solution { public: bool containsNearbyAlmostDuplicate(vector<int>& nums, int k, int t) { bool flag = false; mul...
ALGO
0.999718
5.809411
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-07-18T08:26: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": "8c850dbe6e...
14b58548-3ba9-4f7a-86b1-20edbcbee5b0
lucqiiiii/class-provided-code
my-TowersOfHanoi.cpp
#include <cstdlib> #include <iostream> #include <string> using namespace std; int moveDisk(int numDisks, int src, int dest, int temp, int recursion_level) { int countMoves = 0; if (numDisks == 1) { for (int i = 0; i < recursion_level; i++) cout << " "; cout << "Move Disk#" << numDisks << " from Tower #" ...
ALGO
0.999343
5.666956
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-11-29T01:05: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": "4275db1c9f...
18ea9371-1c7a-471d-8a64-d49076384ea3
imhyunjun/Algorithm
Graph/1260 DFS와BFS.cpp
#include <iostream> #include <queue> using namespace std; int N, M, V; int graph[1001][1001] = { 0, }; int DFSvisited[1001]; int cnt = 0; void DFS(int _v) { DFSvisited[_v] = 1; cnt++; cout << _v << ' '; if (cnt == N) { return; } for (int i = 1; i <= N; i++) { if (!DFSvisited[i] && graph[_v][i]) { D...
ALGO
0.999995
4.285974
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2021-07-21T08: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": "726b12403...
1f203cf8-3fb6-4c06-bf67-39d134656f3c
VeloxChem/VeloxChem
src/t4c_electron_repulsion_geom_X0Y0/ElectronRepulsionGeom1010RecPDPP.hpp
// // VELOXCHEM // ---------------------------------------------------- // An Electronic Structure Code // // SPDX-License-Identifier: BSD-3-Clause // // Copyright 2018-2025 VeloxChem developers // // Redistribution and use in source and binary ...
ALGO
0.993952
6.548585
{ "github_metadata": { "branch": "master", "commit_count": 6590, "repo_created_at": "2024-03-15T09:59:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 2, "issues": 4, "pull_requests": 9 }, "file_meta": { "content_id": "2aec571...
5d8a44b5-1619-474f-901f-a70593debc86
PedroAngeli/Competitive-Programming
Solutions/URI/MARATONA DE PROGRAMAÇÃO DA SBC 2019/maratona_2019_J.cpp
#include <bits/stdc++.h> using namespace std; map <char,int> carta_value; vector <string> cartas; int N,K; bool passar_coringa; int vencedor(){ for(int i=1;i<=N;i++){ int count = 0; for(int j=0;j<cartas[i].size()-1;j++){ if(cartas[i][j] == cartas[i][j+1]){ count++; }else{ break...
ALGO
0.99991
3.796538
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-07-26T00:01: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": "9782bb641...
324b299b-3321-4c86-9c1a-f32a2e85a23c
aeshes/cpp_primer_5th
Exercise 16.1-16.7/main.cpp
#include <iostream> #include <string> #include <vector> #include <list> template <typename T> inline int compare(const T& lhs, const T& rhs) { if (lhs < rhs) return -1; if (rhs < lhs) return 1; return 0; } struct complex { double re; double im; }; template <typename Iter, typename T> Iter xfind(Iter begin, Iter...
ALGO
0.99881
4.776967
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2017-03-26T10:12:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa7270dd5...
109bc609-53d0-4075-b04a-faac3e48e042
slupov/Softuni-Homeworks
C++ Programming/DataStructures/Stack.cpp
#include <iostream> using namespace std; #pragma region Node template<typename T> class Stack; template<class T> class Node { public: Node(T t = {}, Node *_next = nullptr) : data(t), next(_next) {} Node() {} ~Node() { delete next; } friend class Stack<T>; private: T data; Node *next; }; #pragma endregion #pra...
ALGO
0.997544
4.509394
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-07-13T14:19: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": "09d4be502...
eed0f46b-5000-45a7-a0c6-46bd0ed8a6b1
iampkuhz/OnlineJudge_cpp
src/unSolved/174-dungeon-game.cpp
/* * 174-dungeon-game.cpp * * Created on: Aug 9, 2015 * Author: hanzhe */ #include <iostream> #include <vector> #include "memory.h" #include "limits.h" using namespace std; class Solution { public: int calculateMinimumHP(vector<vector<int> >& dungeon) { int m = dungeon.size(); if(m < 1) ...
ALGO
0.999396
3.793718
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2014-10-07T13:36: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": "deff19bbb...
0bd74b8b-4224-44fb-9c65-13fffa349a1f
rachitiitr/DataStructures-Algorithms
Famous-Coding-Interview-Problems/TheCoinChangeProblem.cpp
//The Coin Change Problem //Given an Array of coins C, and money S, print number of ways to make a change for S //Eg: A=[1,2] S=4 answer is {1,1,1,1}, {2,2}, {2,1,1} i.e 3 ways #include <bits/stdc++.h> using namespace std; const int N = 1e3; int A[N], n; int vis[N][N], dp[N][N]; int ways(int pos, int S) { if(pos == ...
ALGO
0.999898
3.590243
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2017-10-01T07:04:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2879, "forks": 995, "issues": 1, "pull_requests": 34 }, "file_meta": { "content_id": "63...
0345a15b-436e-448d-97e4-f6be55ab41b8
Priyo002/DSA
CSES/Introductory Problems/Two_Knights.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define pb emplace_back #define setbits(x) __builtin_popcountll(x) #define zerobits(x) __builtin_ctzll(x) #define endl '\n' #define sort(X) sort(X.begin(),X.end()) const int mod = 1e9 + 7; const long long INF = 1e18; void init() { ios::sync_with_stdi...
ALGO
0.999766
4.092754
{ "github_metadata": { "branch": "master", "commit_count": 238, "repo_created_at": "2023-06-21T09:23:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c20ada1...
28a67654-2591-41ce-b6e8-5287ee22bb67
GSGFs7/algorithm
luogu/P8747 双向排序.cpp
#include <bits/stdc++.h> /* * 将前缀降序或者将后缀升序 * 在两个相同类型的操作中大的会覆盖掉小的,小的作用的在大的范围上会不起作用 * 例如: 前边 0 3 操作变为 3 2 1 后面的 0 2 操作就依旧是 3 2 1可以省略 * 得到的结构必定是由后面最大的数决定的 在最大范围的基础上再加上其他的小范围覆盖 * 例如: 3 1 2 就会被操作 0 3 覆盖为 3 2 1 * 因此只需要看在大范围的基础上覆盖的小范围的情况,所以操作的流程是从两边向中间靠拢 * 又因为前缀降序,后缀升序,先在两边排的数字都是剩下未排的最大值 * * 具体流程: * 将操作压入栈内,压栈的时...
ALGO
0.999985
4.253316
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-08-28T14:53:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1fece170b0...
6d3775a6-745e-492f-b25f-febb55d79100
zimpha/acm-icpc
archived/CCWC2015/CREDFIBO.cc
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; const int MAXN = 100000 + 10; int fib[MAXN], pw[MAXN]; int main() { fib[0] = 0; fib[1] = 1; pw[0] = 1; pw[1] = 3; for (int i = 2; i < MAXN; ++ i) { fib[i] = (fib[i - 1] + fib[i - 2]) % 4; pw[i] = pw[i - 1] * 3...
ALGO
0.99998
4.021913
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2013-06-01T11:50:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "123e548...
3604df8d-ca2d-4b83-af7d-3808e03dc276
gyorigab/discreteLms
matvec/transmat.h
/* C++ Matrix/Vector templates (GNU Gama / matvec) Copyright (C) 1999, 2007, 2012 <NAME> <<EMAIL>> This file is part of the GNU Gama C++ Matrix/Vector template library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as pub...
ALGO
0.992827
6.376507
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-10-31T22:05: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": "c1c3ae9ca...
2e133894-6ad1-4665-b419-e6521f7f8109
Z-Fran/Greedy-Snake-Game
AdvanceGame.h
#define _CRT_SECURE_NO_WARNINGS #include "Client.h" #include<graphics.h> #include<conio.h> #include<cmath> #include<stdlib.h> #include<ctime> #include<vector> #include<fstream> #include<iostream> #include<sstream> #include<string> #include<strstream> using namespace std; using namespace NetworkHelper; #define PI 3.1415...
TOOL
0.995212
3.083842
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-04-11T08:51: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": "5a9212b73dd5...
10c2df21-b6ac-4cf9-b28a-001156293617
wlghsp/cpp_ps
cpp_study/code_tree/novice_mid/BruteForce/part2/11.cpp
#include <iostream> #include <algorithm> #include <climits> #define MAX_N 100 #define MAX_AB 1000 using namespace std; /* 겹치지 않는 선분 2 해설 풀이 언제 겹치는지 파악이 어렵다. 그리고 선분 하나를 잡고 다른 선분들과 비교해서 겹치는지 확인한다는 개념 */ int n; int x1[MAX_N], x2[MAX_N]; void Input() { cin >> n; for (int i = 0; i < n; i++) { cin >> x1[i] >>...
ALGO
0.999833
4.446024
{ "github_metadata": { "branch": "master", "commit_count": 223, "repo_created_at": "2022-09-01T13:49:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b892f1e3...
8f2d13c3-0e4d-46c3-8dd8-d423729dedd4
CrypticSai-08/LeetCode
2717-semi-ordered-permutation/2717-semi-ordered-permutation.cpp
// class Solution { // public: // int semiOrderedPermutation(vector<int>& nums) { // int n = nums.size(); // int first = index(nums, 1, n); // int last = index(nums , n, n); // int ans = 0; // if(last<first){ // ans = n - 1 - last + first -1; // } // ...
ALGO
0.999986
5.607291
{ "github_metadata": { "branch": "main", "commit_count": 1045, "repo_created_at": "2023-04-27T05:33: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": "a373700b2...
8b31ee22-cfb4-43c5-9990-d7599391283d
BrownLEE99/Algorithm
SWEA/D6/1263. [S/W 문제해결 응용] 8일차 - 사람 네트워크2/[S/W 문제해결 응용] 8일차 - 사람 네트워크2.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; int N; vector <int> adj[1001]; bool visited[1001]; void init() { for(int i = 0; i < 1001; ++i) visited[i] = false; } int CC(int nd) { queue <pair<int,int>> q; q.push({nd,0}); visited[nd] = true; int su...
ALGO
0.999886
4.364398
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2023-06-21T07:36: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": "ccbf0b273b...
d8bd57c3-7ed8-49ef-be9d-9314912eacbe
RuiVarela/rengine
source/librengine/src/rengine/image/Filter.cpp
// __!!rengine_copyright!!__ // #include <rengine/image/Filter.h> #include <rengine/math/Math.h> #include <rengine/string/String.h> #include <algorithm> #include <iostream> namespace rengine { // Bessel function of the first kind from <NAME>'s article. // http://mathworld.wolfram.com/BesselFunctionoftheFirstKind.h...
ALGO
0.993257
5.755962
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2016-05-19T12:30: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": "50ded60d2...
8359f64c-38e7-4ec9-b2f5-b4392eab7e8a
Yugtgupta/DAA
Algo codes/01_knapsack_dp.cpp
#include<bits/stdc++.h> using namespace std; //coin change me we make (no of deno) X (amt+1) ka array and if j >= deno[i] we use wahi row ka value ie 1 + table[i,j-deno[i]] .. // Knapsack is very similar bas isme profits store karte hai hum and differences are- // The table is of (no of weights + 1) X (capacity + 1) i...
ALGO
0.999971
5.055079
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2024-05-07T15:47: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": "c0ca42334...
d9683d4c-2ac7-4b70-ae93-736194d6398b
NVIDIA/thrust
thrust/system/omp/detail/partition.inl
/* * Copyright 2008-2013 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
ALGO
0.999132
7.228583
{ "github_metadata": { "branch": "main", "commit_count": 4758, "repo_created_at": "2012-03-06T01:01:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4980, "forks": 764, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "5bfa7...
103aee43-963c-4cff-b1ad-39399309b96e
rodmartin30/competitive-programming
Regional icpc/Latam 09/b.cpp
#include <bits/stdc++.h> #define fore(i,a,n) for(int i=a;i<n;i++) #define EPS 1e-9 using namespace std; typedef long long ll; typedef pair<int,int> ii; int mi[4] = {0,1,0,-1},mj[4] = {1,0,-1,0}; int a[105][105],b[105][105],n,r,c,k; bool bound(int i, int j) { if(i >= 0 && i < r && j >= 0 && j < c) return true; re...
ALGO
0.999933
3.251512
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-09-25T23:09: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": "e4139e9104...
4b9e61ee-8d92-428e-8bac-ee34ed62e217
Sharknevercries/Online-Judge
UVA/Volume VI/608 Counterfeit Dollar.cpp
/* 608 Counterfeit Dollar Accepted C++ 0.028 2011-02-02 09:37:24 */ #include<stdio.h> #include<string.h> int main(){ int n; while(scanf("%d",&n)==1){ char c=getchar(); int i; for(i=1;i<=n;i++){ char str1[10],str2[10],str3[10]; int m[12][3]={0}; int index[12]={0}; int j,k; int time=3; bool f...
ALGO
0.99928
3.044719
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-08-03T15:45:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96d42ef...
e0358d2c-44d8-43da-86b0-b44741ad0821
Srinith04/DS_CODE
CircularQueue/Assignment3.cpp
#include <iostream> #include <cstdlib> #include <stdlib.h> using namespace std; class Queue_arr { public : int length; int elements; int first; int end; int* arr; public: Queue_arr() { cout << "Enter the length of the array : " ; cin >> this->lengt...
ALGO
0.982111
3.432207
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-06-08T08:16: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": "36fc8da532...
43d94fdf-ad6b-4003-b0d2-8a711feba6d3
oreillymedia/Learning-OpenCV-3_examples
example_17-02.cpp
// Example 17-2. Farneback optical flow example code #include <vector> #include <iostream> #include <cstdlib> #include <fstream> #include <opencv2/opencv.hpp> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> using std::cout; using std::cerr; using std::string; // Argument values for calcOptica...
ALGO
0.998579
5.959671
{ "github_metadata": { "branch": "master", "commit_count": 228, "repo_created_at": "2016-12-06T14:06:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2279, "forks": 904, "issues": 15, "pull_requests": 3 }, "file_meta": { "content_id": "25d...
f79d4cd9-4e21-4d64-a881-db2c81fe5cf2
Samarpitdua/Daily_Problems
0 - 1 Knapsack Problem - GFG/0-1-knapsack-problem.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int solve(int ind , int wt[] , int val[] , int n , int W , vector<vector<int>>& dp) { if(ind == n) { return 0; } if(dp[ind][W] != -1) ...
ALGO
0.999998
5.279694
{ "github_metadata": { "branch": "main", "commit_count": 3725, "repo_created_at": "2021-07-31T05:44:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "639036e57...
076609f1-f2e3-40fb-98d9-7f441735feef
fzhao06/micromouse
Maze.cpp
#include "Maze.h" Maze::Maze(suint vv[16][17], suint hh[17][16]) { for (int ii = 0 ; ii < 16 ; ii++) { vWalls[ii][16] = 1 ; vWalls[ii][0] = 1 ; hWalls[16][ii] = 1 ; hWalls[0][ii] = 1 ; for (int jj = 0 ; jj < 16 ; jj++) maze[ii][jj] = 1 ; } for (int ii = 0 ; ii < 2 ; ii++) { maze[ii + 7][7] = 0 ; ...
ALGO
0.971662
4.34914
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-01-19T10:02:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e7e7fc34d...
7cf96cdf-120a-4b8d-87dc-c421d1061fba
taitruong256/Competitive-programming
Codeforces/Codeforces904/C.cpp
/*============================================================================================================== __ __ _____ ______ _______ | | | | / __ \ / _____| / __...
ALGO
0.999982
4.347514
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-04-14T06:59: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": "1003ee67cc5a...
852338bc-5fa9-477e-baf1-79bcff517b2a
Dobromi/Uva
Uva665.cpp
#include <iostream> #include <math.h> #include <cstdio> #include <cmath> #include <string> #include <vector> #include <stack> #include <queue> #include <list> #include <algorithm> #include <map> #include <sstream> using namespace std; int main() { int M; scanf("%d",&M); while(M--){ int N,K; ...
ALGO
0.999912
3.248839
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-08-11T15:04: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": "c855835497...
bca04f18-c215-45ae-8355-a77b4967ce06
farazalam2017/C-Language
C in Depth assignment/2. Control Statement/.vscode/prime.cpp
/* 1.Check prime number or not */ /* #include <bits/stdc++.h> using namespace std; int main(){ int n = 0, i, num; cout << "\n Enter the number:- "; cin >> num; for (i = 1; i <= num;i++){ if(num % i ==0){ n++; } } if(n == 2){ cout << "\n It is prime numbe...
ALGO
0.999568
4.142531
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-12-28T15:45:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9618c05153...
d8452404-984d-4054-932a-097fbc7b8a8b
binisg/ioi
Categories/Complete Search/balancing/main.cpp
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; #define MAX_N 10000005 typedef pair<int, int> pi; int my_sort(pi &p1, pi &p2) { if (p1.second > p2.second) return 0; else if (p1.second == p2.second) { if (p1.first > p2.first) return 0; return 1...
ALGO
0.999958
3.37975
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-05-26T17:12: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": "fe935502cfc1...
bfb56658-4136-4f22-a748-df4c075d5320
shahnawaaz1901/Basic_Programming
139-Second_largest_in_Array.cpp
/* Second Largest in array You have been given a random integer array/list(ARR) of size N. You are required to find and return the second largest element present in the array/list. For Input : 5 4 3 10 9 2 Output : 9 For Input : 7 13 6 31 14 29 44 3 Output : 31 */ #include <iostream> #include<climits> using namesp...
ALGO
0.999748
4.893772
{ "github_metadata": { "branch": "main", "commit_count": 195, "repo_created_at": "2023-07-20T14:33: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": "2cbc0b065b...
8a8eea26-761b-4fe2-b14f-98ae0ea4af28
ab4295/C_plusplus_Training
Cpp(6)/exercise/pe11/pe11-3/usevector.cpp
// usevector.cpp -- 11장 프로그래밍 연습 // vector.h, vector.cpp 파일과 함께 컴파일한다 #include <iostream> #include <cstdlib> // rand(), srand()의 원형 #include <ctime> // time()의 원형 using namespace std; #include "vector.h" int main() { using VECTOR::Vector; srand(time(0)); // 난수 발생기에 씨를 뿌린다 double direction; Vector step; Vector r...
ALGO
0.988513
3.847643
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-07T05:05: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": "14a0b9c502...
8963cce4-4edd-4c1b-97d1-b96ba1542f00
io-abhishek2206/Cpp-repo
A_Olympiad_Date_Round1013.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int arr[6] = {3, 1, 2, 1, 0, 1}; int size_array; cin >> size_array; int bag[size_array]; for (int i = 0; i < size_array; i++) cin >> bag[i]; int count = 0; ...
ALGO
0.999853
3.893844
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2025-03-23T06:53:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac39d4fdc54...
a3006f69-3713-4a5b-896e-4fd475557f0d
bitsch/codeitry
asp.cpp
#include<stdio.h> #include<iostream> using namespace std; // Prints a maximum set of activities that can be done by a single // person, one at a time. // n --> Total number of activities // s[] --> An array that contains start time of all activities // f[] --> An array that contains finish time of all activitie...
ALGO
0.999904
3.34677
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-10-08T07:13: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": "bbfb86014...
852dacac-c447-44d2-a5a1-7b5895f06c1e
koying/Merkaartor
include/builtin-ggl/ggl/multi/algorithms/sectionalize.hpp
// Generic Geometry Library // // Copyright <NAME> 1995-2009, Geodan Holding B.V. Amsterdam, the Netherlands. // Copyright <NAME> 2008, 2009 // 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...
ALGO
0.974402
6.239064
{ "github_metadata": { "branch": "master", "commit_count": 1922, "repo_created_at": "2013-02-27T13:23: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": "7e261fb...
ee1cde9f-cb83-4bf6-8837-967a03a8da53
edsomjr/TEP
Grafos/slides/bellman-ford/codes/bellman-ford-path.cpp
#include <bits/stdc++.h> using namespace std; using ii = pair<int, int>; using edge = tuple<int, int, int>; const int oo { 1000000010 }; pair<vector<int>, vector<int>> bellman_ford(int s, int N, const vector<edge>& edges) { vector<int> dist(N + 1, oo), pred(N + 1, oo); dist[s] = 0; pred[s] = s; ...
ALGO
0.999965
4.939806
{ "github_metadata": { "branch": "master", "commit_count": 2072, "repo_created_at": "2016-07-12T18:57:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 475, "forks": 155, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8fc...
7e0b6bd8-1b5b-4782-bd18-b478e77cd8db
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/05/0511/personal_submission/cf1028c_k423.cpp
// https://codeforces.com/contest/1028/submission/260525098 /* 我永远喜欢爱莉希雅♪ */ struct rect { int l, b, r, t; rect() : l(-inf), b(-inf), r(inf), t(inf) {} rect &operator+=(const rect &o) { chmax(l, o.l), chmin(r, o.r); chmax(b, o.b), chmin(t, o.t); return *this; } bool test(...
ALGO
0.999698
3.616699
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "c39f...
84a840f3-e8f9-48b1-ae56-228d1d675ee5
Pranav-Kumar-Singh-038/Striver_A2Z_DSA_Sheet
Sliding_Window_/Medium_Problems/Fruit_Into_Baskets.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int totalFruit(vector<int> &fruits)// make a hashmap, and store the freq of fruits in it, if the hash map size // increases more than 2 than keep moving the head until its freq is 0 then erase from hashmap, other wise // also remember t...
ALGO
0.99995
5.350462
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2023-08-21T15:11:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90435e71bb...
9b4eefd9-8aca-42d7-ab25-e26d4ab4bfef
abhaysp95/essential_cp
a20j/div2_ladder/petya_and_origami.cpp
#include <iostream> #include <fstream> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <deque> #include <list> #include <cmath> #include <string> #include <cstring> #include <iterator> #include <algorithm> #include <unordered_set> #include <unordered_map> using namespace std;...
ALGO
0.999249
3.524973
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2024-06-21T15:35: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": "6b282b4acf...
ff299f40-5614-467d-9715-a4307b27c81a
bsaunderss/cse3353
algoLab3/AlgoRunner.cpp
// // organizer.cpp // lab3 // // Created by <NAME> on 11/3/18. // Copyright © 2018 <NAME>. All rights reserved. // #include "AlgoRunner.hpp" using namespace std; using namespace std::chrono; AlgoRunner::AlgoRunner(){} void AlgoRunner:: go(){ Graph *g = new Graph(); readInPositions(*g); g->createGra...
ALGO
0.996347
3.280263
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-09-06T21:20: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": "7ca5cecb1...
a498007c-dbd5-4d94-9674-75b553c80278
hfbassani/pbml
Libs/Parameters/LatinHypercubeSampling.h
#ifndef LHS_H_ #define LHS_H_ #include <vector> #include "MatMatrix.h" #include "MatVector.h" class LHS { public: static double nextDouble() { return (double)rand() / RAND_MAX; } static void getPermutation(double min, double max, int N, MatVector<double> &perm) { double step...
ALGO
0.910163
3.87154
{ "github_metadata": { "branch": "master", "commit_count": 417, "repo_created_at": "2016-12-12T20:39:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d01d542...
8a57fb39-1d04-4087-98c3-8766fffa304f
moradza/FEA-CSE451
01-FEA-Spring/C-Code/sample.cpp
#include <SpringFEA.h> using namespace std; void Initialize( const int n_node, int& total_dof , const arma::imat& elem_node, arma::imat& eq_num,int& n_pre_disp) { int fixeddofs = total_dof-n_dof; eq_num = arma::zeros<arma::imat>(n_node,1); Pf = arma::zeros<arma::colvec>(n_dof); Uf = arma::ones<arma::col...
ALGO
0.991163
3.098794
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-02-06T23:05: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": "45073813f1...
ca4ed43a-edb4-4cde-aa8c-550af56eeef1
zj2016201428/HaiZeiOJ
80.cpp
/************************************************************************* > File Name: 80.cpp > Author: > Mail: > Created Time: 四 3/19 11:44:00 2020 ************************************************************************/ #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<ctime>...
ALGO
0.999837
3.771521
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-03-19T03:38:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ad57aaaae...
f9c6faff-749d-43bb-928e-7672ceb0b6a8
thegamer1907/Code_Analysis
DP/2937.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define F(i, j, k) for(register int i = j; i <= k; ++i) #define D(i, j, k) for(register int i = j; i >= k; --i) #define random(x) (rand() % (x)) + 1 #define pb push_back #define pp pair<int, int> #define mp make_pair /// ********* debug template *******...
ALGO
0.999991
3.207114
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-05-24T10:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a498358f1...
b1a9f5b5-9626-4127-b9b0-39e94a827671
Sania-Singla/DSA
Lab/headerFiles/minMax.h
#ifndef MAXMIN_H #define MAXMIN_H #include <iostream> #include <vector> using namespace std; void print(vector<int> x) { for (int val : x) { cout << val << " "; } cout << endl; } // Divide & Conquer // T(n) = 2T(n/2) + c // O(n) // indices void solve(const vector<int> &arr, int s, int e, in...
ALGO
0.999547
5.516658
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2024-09-28T14: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": "168f3eae2c7...
835d53a6-d391-4d14-9b02-c528f7e76fec
manwar/perlweeklychallenge-club
challenge-289/ulrich-rieke/cpp/ch-1.cpp
#include <iostream> #include <string> #include <vector> #include <sstream> #include <set> #include <algorithm> std::vector<std::string> split( const std::string & text , char delimiter ) { std::vector<std::string> tokens ; std::string word ; std::istringstream istr { text } ; while ( std::getline( istr , ...
ALGO
0.999055
4.539299
{ "github_metadata": { "branch": "master", "commit_count": 44412, "repo_created_at": "2019-03-30T01:15:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 194, "forks": 332, "issues": 5, "pull_requests": 4 }, "file_meta": { "content_id": "34...
2dca42c5-c581-4e56-a3ef-e7b8f27338f6
doyubkim/fluid-engine-dev
src/jet/grid_backward_euler_diffusion_solver3.cpp
// Copyright (c) 2018 <NAME> // // I am making my contributions/submissions to this project solely in my // personal capacity and am not conveying any rights to any intellectual // property of any third parties. #include <pch.h> #include <jet/grid_backward_euler_diffusion_solver3.h> #include <jet/constants.h> #include...
ALGO
0.999678
6.734841
{ "github_metadata": { "branch": "main", "commit_count": 279, "repo_created_at": "2016-05-08T06:05:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2018, "forks": 277, "issues": 60, "pull_requests": 0 }, "file_meta": { "content_id": "75e9...
81db8741-fb1f-4ab0-a937-6eb45837321e
ishandutta2007/codeforces-s
scanhex/normal/1103/E.cpp
#include <bits/stdc++.h> using namespace std; using num=unsigned long long; const num mod=(1LL<<58); const int B=10; const int SZ=(B+1)/2; //B=5 using elem=array<num,SZ>; elem operator +(const elem& a,const elem& b){ elem c={0}; for(int i=0;i<SZ;++i)c[i]=a[i]+b[i]; return c; } elem operator -(const elem& a,const...
ALGO
0.999964
4.217682
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f9d0b8421c8...