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
308aa6ed-43ee-4e17-b42c-4e37020bbe65
ttyang/sandbox
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/rt_explicit_rk.hpp
/* * rt_explicit_rk.hpp * * Created on: May 11, 2011 * Author: mario */ #ifndef RT_EXPLICIT_RK_HPP_ #define RT_EXPLICIT_RK_HPP_ #include <vector> #include "rt_algebra.hpp" using namespace std; template< class StateType > class rt_explicit_rk { public: typedef StateType state_type; typedef vector<...
ALGO
0.99979
5.297157
{ "github_metadata": { "branch": "trunk", "commit_count": 20907, "repo_created_at": "2013-10-11T03:08:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ce6d64...
f952b59f-62e3-493c-b64d-1b801736832b
vukanoa/Coding_Problems
4_N_539/Trees/337_House_Robber_III/house_robber_III.cpp
#include <iostream> /* ============== === MEDIUM === ============== =========================== 337) House Robber III =========================== ============ Description: ============ The thief has found himself a new place for his thievery again. There is only one entra...
ALGO
0.999993
6.045655
{ "github_metadata": { "branch": "main", "commit_count": 2647, "repo_created_at": "2022-10-27T12:00:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d21802d4b...
234f3d06-e907-46fd-80d1-87c48ff4f6a8
gavinmcroy/Fun-Projects
Interview-Preparation/Study Plans/Programming Skills-1/String/Merge-Strings-Alternitvely/main.cpp
#include <iostream> #include <string> using namespace std; string mergeAlternately(string word1, string word2); int main() { std::cout << mergeAlternately("ABC", "ABCDE"); return 0; } string mergeAlternately(string word1, string word2) { string tmp; bool alternate = true; int firstWord = 0; ...
ALGO
0.999922
5.377497
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2022-05-09T16:09:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe4a59dcd7...
7d7de0f3-29c6-420c-8a74-63213e2d4150
devyanigoil/CPP
Graphs/GetPathBFS.cpp
#include <iostream> #include <unordered_map> #include <queue> using namespace std; //Get the shortest path with BFS //bfs always gives shortest path //eg: 8 7 //np. of vertices and edges //0 1 //0 2 //0 7 //1 4 //4 5 //5 6 //2 6 //0 6 // starting and ending vertices void getpath(int** edges,int v,int sv,int ev,int* v...
ALGO
0.999979
4.613138
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2021-05-03T06:20: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": "0a390c28c6c...
dedec471-b1f5-401e-8be3-7a67f355be60
gkahn13/bsp
parameter/working-source/common.h
#ifndef __COMMON_H__ #define __COMMON_H__ #include "callisto.h" #include "matrix.h" #include "utils.h" #include "POMDP-On4.h" #include <time.h> #include <iostream> #include <fstream> #include <vector> #include <typeinfo> #include <sstream> #include <direct.h> // Needed for _mkdir #include <process.h> #include <limi...
TOOL
0.955601
4.056336
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2013-12-08T06:04:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b0dac52...
fdff5b45-5133-48ac-9930-5b56a0eeaa39
Anzanda/codetree-TILs
241012/루돌프의 반란/rudolph-rebellion.cpp
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run a...
ALGO
0.999909
4.224988
{ "github_metadata": { "branch": "main", "commit_count": 180, "repo_created_at": "2024-08-02T12:25:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2870d9143a...
80c3f348-acfb-4303-8d80-5ccddb11afed
sandakalum/Mobile-Manipulator-Planning
Real_Time_Adaptive_Motion_Planning_(RAMP)_of_Mobile_Manipulators_in_Dynamic_Environments_With_Unforeseen_Changes/ramp-master/trajectory_generator/src/prediction.cpp
#include "prediction.h" Prediction::Prediction() {} Prediction::~Prediction() {} void Prediction::init(const ramp_msgs::TrajectoryRequest req) { path_ = req.path; } bool Prediction::trajectoryRequest(ramp_msgs::TrajectoryRequest& req, ramp_msgs::TrajectoryResponse& res) { //ROS_INFO("In Prediction::tra...
ALGO
0.948732
5.576367
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-01-21T04:53:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 72, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eee88c362e...
d6fd1f7d-faca-42ce-8b87-c3ef9e9c755f
JefferyXie/mycodes-cpp
main/utility.h
#ifndef UTILITY_H #define UTILITY_H #include "header.h" template<class T> string ToString(T v) { ostringstream ss; ss << v; return ss.str(); } // swap values without introducing temp variable template<class T> void swap_plus(T& a, T& b) { a = a + b; b = a - b; a = a - b; } // sorting algorit...
TOOL
0.988241
4.741897
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2015-10-05T19:41:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f46adaa9...
25aafe89-eb7d-4ef2-baaf-63cf2992b04f
Kitware/iMSTK
Source/CollisionDetection/imstkCollisionDetectionAlgorithm.cpp
/* ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK) ** iMSTK is distributed under the Apache License, Version 2.0. ** See accompanying NOTICE for details. */ #include "imstkCollisionDetectionAlgorithm.h" #include "imstkAnalyticalGeometry.h" #include "imstkCollisionData.h" #include "imstkSurfa...
ALGO
0.994332
6.701383
{ "github_metadata": { "branch": "master", "commit_count": 4139, "repo_created_at": "2021-09-20T17:10:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "516e26...
3089c018-133e-419b-9605-90ddb58f15e3
miaoZmiao/zuo_algorithm_class_cpp_impl
src/42、四边形不等式技巧(二)/Code02_ThrowChessPiecesProblem.hpp
#pragma once #ifndef Code02_ThrowChessPiecesProblem_HPP #define Code02_ThrowChessPiecesProblem_HPP #include "utility_func.hpp" namespace Code02_ThrowChessPiecesProblem { int process1(int rest, int k) { if (rest == 0) { return 0; } if (k == 1) { return rest; } int ans = INT_MAX; for (int i = ...
ALGO
0.999092
4.714603
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-10-20T15:43: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": "fadde93e50...
34926399-3a6f-45e9-8006-e184ee625ffb
dxiiren/employee-salary-counter
assesment3try.cpp
#include <iostream> #include <cctype> #include <string> using namespace std; void input3data (string & id , string & name , int & hour ) { cout<<"\nEnter employee id : "; cin>>id; cin.get(); cout<<"Enter employee name : "; getline(cin,name); cout<<"Enter total hours of work (weekly) : "; cin>...
TOOL
0.961324
3.681132
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-10-28T15:01:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f48567a3cbfd...
f0b13c68-34af-4453-a0f8-8b3623a72e0b
CherryCobbler/lab17
Project5/Point.ipp
#ifdef HEADER_H struct point { int x = 0; int y = 0; int z = 0; bool operator<(const point& p) const { if (sqrt(x * x + y * y + z * z) < sqrt(p.x * p.x + p.y * p.y + p.z * p.z)) return true; else return false; } bool operator>(const point& p) const { if (sqrt(x * x + y * y + z * z) > sqrt(p.x * p.x + p.y ...
TOOL
0.944638
4.171455
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-07-20T18:22: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": "b1ca98896...
28b8d0d7-b858-40e4-acd5-2f351e17ad7c
mklsbali/Algorithms-in-libajul-C
buble_insert_select_sort/Source.cpp
/*<NAME> Grupa 30224 Analiza sortarilor bubble, insertion si selection*/ /*Observatiile finale: Cazul avg: -Buble sort face cele mai multe asignare, dupa ce urmeaza insertion sort, selection sort este ultimul -Numarul comparatiilor este acelasi la bubble si la selection sort dupa ce urmeaza insertion sort -In to...
ALGO
0.999453
5.137159
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-03-14T11:34: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": "aa9433cb84...
b8bba285-2e2e-441c-831f-51d079ada19a
satyam-software-developer/DSA-in-CPP
data structures with c++/recursion/check_palindrome.cpp
/* Problem statement Determine if a given string ‘S’ is a palindrome using recursion. Return a Boolean value of true if it is a palindrome and false if it is not. Note: You are not required to print anything, just implement the function. Example: Input: s = "racecar" Output: true Explanation: "racecar" is a palindr...
ALGO
0.999795
6.362017
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-15T21: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": "26bf50e68720...
da680b79-20f4-4863-9510-a43158ddf50c
wrsuperboy/UEPAL
Source/PAL/YJ.cpp
// Copyright (C) 2022 Meizhouxuanhan. #include "YJ.h" typedef struct _YJ1_TreeNode { uint8 value; uint8 leaf; uint16 level; uint32 weight; struct _YJ1_TreeNode* parent; struct _YJ1_TreeNode* left; struct _YJ1_TreeNode* right; } YJ1_TreeNode; typedef struct _YJ1_TreeNodeList { YJ1_TreeNode* node; struct _Y...
ALGO
0.986188
3.606186
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2023-03-05T02:55:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90491fbf5b...
5d17f575-7800-4721-89e9-8f06e6164f81
MicrochipTech/fpga-hls-examples
Training4/icicle-kit-reference-design/script_support/additional_configurations/smarthls/invert_and_threshold/main_variations/main.fifo.cpp
#include "hls/streaming.hpp" #include "hls/thread.hpp" #include "hls/ap_int.hpp" #include "bmp.h" void invert(uint32_t *in, hls::FIFO<uint32_t> &fifo, int do_invert) { #pragma HLS loop pipeline II(1) for (int j = 0; j < WIDTH*N_ROWS; j++) { uint32_t p = in[j]; p = do_invert ? ~p : p; fi...
ALGO
0.957877
4.876404
{ "github_metadata": { "branch": "main", "commit_count": 179, "repo_created_at": "2021-05-13T17:30:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 45, "forks": 11, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "451852c72...
a2da0e33-8f56-4e0e-a7ee-90afcd6bc951
mjwybrow/adaptagrams
cola/libcola/connected_components.h
/* * vim: ts=4 sw=4 et tw=0 wm=0 * * libcola - A library providing force-directed network layout using the * stress-majorization method subject to separation constraints. * * Copyright (C) 2006-2008 Monash University * * This library is free software; you can redistribute it and/or * modify it unde...
ALGO
0.952108
5.231274
{ "github_metadata": { "branch": "master", "commit_count": 1288, "repo_created_at": "2011-06-10T06:35:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 285, "forks": 89, "issues": 28, "pull_requests": 5 }, "file_meta": { "content_id": "5fe...
3f2e6850-2138-4ce8-ad6c-149aa1b4e7d2
achrafoo2018/Competitive_Programming_Contests
kickstart/kickstart21/c.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<char> vchr; typedef vector<string> vstr; typedef vector<vi> vvi; typedef vector<vchr> vvchr; typedef vector<ll> vll; typedef vector<pii> vpii; typedef vector<v...
ALGO
0.999786
4.335799
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-02-22T18:08: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": "a9e8b276e54...
eb173ea9-21ad-47a8-a903-1d9ec9d558a6
yydaily/project-euler-solution
code/628/solution.cpp
#include <iostream>/*{{{*/ long long mod = 1008691207; const long long e8 = 1e8; using namespace std; /*}}}*/ long long cal(int a) { long long fac = 1; // fac[0] = 1 long long ans1 = 1; long long ans2 = 0; for (int i = 1; i < a; i++) { ans2 = (ans2 + fac * (a - i)) % mod; fac = f...
ALGO
0.999989
4.196918
{ "github_metadata": { "branch": "master", "commit_count": 712, "repo_created_at": "2021-11-17T10:31:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9114af...
eac8094c-e283-45bd-96a8-e21396e8267a
koba-e964/contest
codeforces/424/1a.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include ...
ALGO
0.999978
3.79496
{ "github_metadata": { "branch": "master", "commit_count": 2836, "repo_created_at": "2013-09-13T04:48:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 5, "issues": 20, "pull_requests": 0 }, "file_meta": { "content_id": "ea0aa...
29a0184e-0ad3-4b73-ba9d-9cd6e4dee687
paulscherrerinstitute/PSIPositronProduction
RunningSimulations/Geant4/FCCeeTargetTracking/Injector/Fot/Bremsstrahlung.cc
#include "Bremsstrahlung.h" #include "mathematics.h" BremsStrahlung::BremsStrahlung(PhotonCollection& fcol, double phomin, double poimin, statistiques* stat) : _photons(fcol), _phomin(phomin), _poimin(poimin), _stat(stat) { _part = NULL; _ancoll = 0.0; } void BremsStrahlung::reInit(ParticleInCrystal* p) { _pa...
ALGO
0.998622
4.44874
{ "github_metadata": { "branch": "master", "commit_count": 271, "repo_created_at": "2021-09-07T09:29:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a96cd840...
a10d2899-5f9b-486f-a536-daf832b52fb5
sachuverma/DataStructures-Algorithms
DSA Crack Sheet/solutions/Reverse Level Order Traversal.cpp
/* Reverse Level Order Traversal ============================= Given a binary tree of size N, find its reverse level order traversal. ie- the traversal must begin from the last level. Example 1: Input : 1 / \ 3 2 Output: 3 2 1 Explanation: Traversing level 1 : 3 2 Traversing level 0 : 1 Exa...
ALGO
0.999993
5.788885
{ "github_metadata": { "branch": "master", "commit_count": 1430, "repo_created_at": "2020-10-07T10:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2049, "forks": 541, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "84...
cffe85be-0502-4321-b26c-74f4d10dc244
LouisBrusset/UE12-Rendu-CPP
ant-war-2023-win/ant-war/Boid.cpp
# include <iostream> # include <vector> # include <math.h> # define SMALL 1e-5f # include "Boid.hpp" # include "Simulator.hpp" # include "Vector.hpp" Boid::Boid() : x(0.f), y(0.f), vx(1), vy(1), position(x, y), velocity(vx, vy) {} Boid::Boid(float x, float y, float vx, float vy) : x(x), y(y), vx(vx), vy(vy), positio...
ALGO
0.998977
5.780276
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-03-25T17:17: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": "3564bfc81c3...
8690e79a-4848-4b18-8275-3c58c1aabd25
suvoooo/GALPROP_Local_Sources
Kcapture_cs.cc
//**.****|****.****|****.****|****.****|****.****|****.****|****.****|****.****| // * Kcapture_cs.cc * galprop package * 2001/08/16 //**"****!****"****!****"****!****"****!****"****!****"****!****"****!****"****| //**.****|****.****|****.****|****.****|****.****|****.****|****.****|****.**...
ALGO
0.963918
4.355844
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-12-07T06:15:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a40ff8d1...
253117f3-73c1-4362-82b8-5c4baba5ab41
sergiovmdo/EDA-UPC
STL/P40902.cpp
#include <map> #include <iostream> using namespace std; int main() { map<string,int> players; string name,comando; int x; while (cin >> name >> comando){ if (comando == "enters"){ if (players.find(name) != players.end()) { cout << name << " is already in the casino"<<endl; } else { players.insert(...
TOOL
0.931643
3.58117
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-01-27T10:23: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": "929f5d950e...
e3bbee49-9f8b-4287-a06e-f95d2d58504a
ms303956362/myexercise
Cpp/LeetCode/wc281_4.cpp
#include "usual.h" class Solution { public: long long coutPairs(vector<int>& nums, int k) { vector<long long> cnt(max(*max_element(nums.begin(), nums.end()), k) + 1); int n = nums.size(); long long ans = 0; for (int i = n - 1; i >= 0; --i) { int f1 = __gcd(k, nums[i]), f...
ALGO
0.999961
5.491367
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2020-01-10T06:47:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1e5fbed...
8e482b15-97c6-4416-b2fa-45c7a34fcfdb
aditi-anand1/Codes
miscellaneous/negative_head_positive_tail.cpp
/* Question-- to shift all the negative number to the left and all the positive numbers to right for a given array * Input: 1,-3,2,-7,-6,5,0 * Expected Output: -3,-7,-6,1,2,5,0 */ /* Algorithm: 1. take 2 pointer itr and ptr in the starting of the index 2. itr will iterate and stop when it finds the negative nu...
ALGO
0.999989
4.697694
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-07-25T17:18: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": "ee10d5bc06...
817cca0e-a448-42ca-b418-545925ba7199
ohbumjun/Algorithm_CodingTest
Algorithm/BOJ/백준/Python/2025안풀어도될것들/로봇청소기_240928.cpp
// https://www.acmicpc.net/problem/14503 #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <thread> #include <vector> #include <string> #include <cstring> #include <climits> #include <set> #include <queue> #include <math.h> #include <stack> #include <algorithm> #include <unordered_map> #define endl "\n" #...
ALGO
0.999877
4.634306
{ "github_metadata": { "branch": "master", "commit_count": 633, "repo_created_at": "2020-10-31T12:20:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e698234b...
6ec705cc-1781-4654-9363-142f6581a623
yehyun3459/algorithm
Baekjoon/P9376 (탈옥)/yhyh.cpp
//이잉ㅠㅠ 혼자 해결못함 //deque가 필요하다고는 하는데 사실 잘 모르겠다 pq안쓰고 그냥 queue써도 다익스트라로만 잘 구현하면 해결됨 //세 구역에서 BFS돌려서 해결하는 방법 신기하다 생각못함 ㅠㅠ //이잉ㅠㅠ 혼자 해결못함 #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cstring> #include <queue> #include <vector> using namespace std; #define MIN(a,b)(a<b?a:b) int T; int H, W; vector<vector<c...
ALGO
0.999795
3.926753
{ "github_metadata": { "branch": "master", "commit_count": 152, "repo_created_at": "2019-03-14T12:05: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": "7cdb5135...
bb295bf8-4ed1-4529-bfed-df3db8412449
Nafyaz/my-codes
SPOJ/HORRIBLE.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll, ll> #define ff first #define ss second #define show(x) cout << #x << ": " << x << "; " #define mod 1000000007 #define maxN 1000006 ll arr[maxN]; ll Tree[4*maxN], Lazy[4*maxN]; void Build(ll node, ll bg, ll ed) { if(bg == ed) ...
ALGO
0.999776
5.23346
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2022-04-17T23:51:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7679493e...
1d1e3f4f-9d54-4905-b572-d421c26300c7
NestZ/competitive-programming
CSES/2181.cpp
#include<bits/stdc++.h> using namespace std; #define endl '\n' typedef long long int ll; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > struct rge { c b, e; }; sim > rge<c...
ALGO
0.999952
3.742419
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2019-01-23T05:34:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9308455...
7fb7d0f1-3943-4e20-90d9-dcbcb3d861a5
Nayeem-XTREME/C-Programs
head insert,display,search,heapify,dalete.cpp
#include<bits/stdc++.h> using namespace std; int arr[1000]; int f=0; int par; void heapify(int fr) { int p,temp; p=fr/2; while(p>0) { if(arr[fr]>arr[p]) { temp=arr[p]; arr[p]=arr[fr]; arr[fr]=temp; } else break; ...
ALGO
0.99917
3.396185
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-07-25T18:58: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": "50d71af7a3...
9f3f2e1f-591f-4470-a226-ae313129bbaa
hieupham1103/TINHOC
ONLINE OJ/Contest_thayPhong/magic/magic/magic.cpp
#include <bits/stdc++.h> using namespace std; int m,n; char a[60][60]; //char ans[110][110]; int x,y; int main(){ cin>>m>>n; int ip = 1; int jp = 1; for (int i=1;i<=m;i++) for (int j=1;j<=n;j++) cin>>a[i][j]; cin>>x>>y; for (int i=1;i<=m;i++){ for (int j=1;j<=n;j++){ if (ip == x and j...
ALGO
0.999668
3.338699
{ "github_metadata": { "branch": "main", "commit_count": 406, "repo_created_at": "2021-08-20T03:38: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": "fe61859c11...
c6e54684-462f-4bce-8f54-17ee2b17bee1
AniGayake/DSF_Submission
Assignment_2.cpp
/* Problem Statement : Construct an expression tree from postfix expression and perform non-recursive Inorder and Preorder traversals */ #include<iostream> #include<stack> using namespace std; struct treenode { char data; treenode *lptr; treenode *rptr; }; treenode *root=NULL; struct stackNode{ tree...
ALGO
0.999794
4.542128
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-04-24T11:33:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9bc79a3ee8...
24e0d2f4-72a0-4ed9-8cbb-2a84d4b89e42
coding1919/Cpp-with-DSA
16 DSA/01 Arrays/Searching/3 Binary Search/Problems/Distinct/binarysearch.cpp
// 0 1 2 3 4 5 6 7 // arr | 1 | 4 | 6 | 8 | 10 | 14 | 16 | 18 | // key = 5 // start = 0, end = 7, mid, index = 8 (n) // mid = (0+7)/2 = 3 -> 8 // 8==5 (false) // 8<5 (false) // 8>5 (true) // index = 3 // start = 0, end = 3 - 1 = 2 // mid = (0+2)/2 = 1 -> 4 // 4==5 (false) // 4<5 (true) // index...
ALGO
0.999969
5.655796
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-11-28T18:25: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": "1ed0496529...
0ed55c79-c922-48b1-ad87-314e7e84d901
alisw/AliRoot
STEER/STEER/AliTrackFitterRieman.h
#ifndef ALITRACKFITTERRIEMAN_H #define ALITRACKFITTERRIEMAN_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ /////////////////////////////////////////////////////////////////////////////// // // Class ...
ALGO
0.962567
5.516822
{ "github_metadata": { "branch": "master", "commit_count": 74535, "repo_created_at": "2016-03-07T09:20:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 57, "forks": 256, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "32e9...
fc956784-b7f5-4f1e-a105-e4a062fc74e8
anshulsoni4/DSA-questions
remove duplicates.cpp
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run a...
ALGO
0.999414
4.784514
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2023-06-02T11:30: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": "e402716da2...
0cf25653-58b1-4ed0-8503-db6f0aabcb74
RPLtemp/auto_trax
auto_trax_sensors/src/library/image_processing.cpp
#include "auto_trax_sensors/image_processing.h" namespace auto_trax { ImageProcessing::ImageProcessing() { transform_matrix_ = Eigen::MatrixXd(3, 4); transform_matrix_ << 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0; } ImageProcessing::~ImageProcessing() { } void ImageProcess...
ALGO
0.926314
5.622205
{ "github_metadata": { "branch": "master", "commit_count": 314, "repo_created_at": "2016-04-16T15:42:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f613ad44...
559833d8-5146-4226-865d-1fb7a78f34f9
kimjaehyun131/2016-1
DS02/DS02/CircularQueue.h
#include <iostream> using namespace std; #define MAX_ITEMS 50 /** * @brief Exception class thrown by Push when queue is full. */ class FullQueue { public: /** * @brief Display a message for full queue on screen. */ void print() { cout << "FullQueue exception thrown." << endl; } }; /** * @brief Exception cla...
ALGO
0.988919
5.092184
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-06-08T08:13: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": "3dd101c7b9...
f9b06deb-0cef-412f-91e0-0b4a5be679fa
aryamanarora/competitive-programming
competitions/usaco/contests/2015-16/open/gold/248.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> ii; typedef tuple<int, int, int> iii; typedef vector<int> vi; typedef vector<ii> vii; typedef vector<ld> vd; typedef vector<ll> vl; typedef set<int> si; typedef set<ii> sii; ty...
ALGO
0.999974
3.841795
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2018-06-13T03:25:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "769cab777...
9ada2ef7-825b-49d2-8c80-b927214eef80
watermantle/LeetCode_watermantle
2-add-two-numbers/2-add-two-numbers.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* addTwoNumbe...
ALGO
0.999974
6.341212
{ "github_metadata": { "branch": "main", "commit_count": 1446, "repo_created_at": "2021-07-16T03:08: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": "570053e2b...
20d8da76-0e8d-406a-81ea-3188900f2e18
shuza/Competitive-Programming
uva_572.cpp
#include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <string> #include <cstring> #include <map> using namespace std; #define READ() freopen("in.txt", "r", stdin) #define WRITE() freopen("out.txt", "w", stdout) #define MAXROW 102 string...
ALGO
0.99977
4.132362
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-03-29T16:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50fe563ed0...
9abff916-d9d8-4182-9b51-94ff01c907dd
Northberth/NAI
lab8/main.cpp
#include <opencv2/opencv.hpp> #include <opencv2/highgui.hpp> #include <iostream> #include <opencv2/imgcodecs.hpp> #include <opencv2/imgproc.hpp> bool compareContourAreas ( std::vector<cv::Point> contour1, std::vector<cv::Point> contour2 ) { double a = fabs( contourArea(cv::Mat(contour1)) ); double b = fabs( c...
TOOL
0.913575
5.394333
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-10-05T13:16:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1acd0edf8a...
95177f76-fbe6-499f-9970-0ddbeaaafe28
proudot/u-track-PMMS
src/mathfun/kdtree/KDTreeClosestPoint.cpp
/* [idx, dist] = KDTreeClosestPoint(inPts,queryPts); * * (c) <NAME>, 2011 (last modified Oct 7, 2011) * * Compilation: * Mac/Linux: mex -I. -I../../mex/include/c++ KDTreeClosestPoint.cpp * Windows: mex COMPFLAGS="$COMPFLAGS /TP" -I"." -I"..\..\mex\include\c++" -output KDTreeClosestPoint KDTreeClosestPoint.cpp ...
ALGO
0.999662
5.703625
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-02-15T16:50:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db02d91fc0...
6a864db2-4bdc-42f4-9227-afcf18567e56
sashank1608/Multi-Dimesional-Vector-Bin-Packing
Best_Fit.cpp
#include "item.h" #include <algorithm> #include <functional> #include <cmath> #include <iostream> using namespace std; void best_fit_d(const vector<item>& items, vector<int>& assignment, vector<item>& free_space) { int n = items.size(); int bin = 0; item cap ; cap.d1=1; cap.d2=1; cap.d3=1; ...
ALGO
0.999924
4.788672
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-11-13T11:46: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": "6701ab5c27ba...
c2550c7b-5301-4cd9-934b-98301dbe76cd
atif721/Varendra-University
03 Third Semester/CSE 2104/Lab Reports/Lab 4 21.04.2025/TraversingLinkedList.cpp
#include <iostream> using namespace std; class Node { public: int data; Node* next; Node(int value) { data = value; next = nullptr; } }; Node* createLinkedList(int arr [], int size) { Node* head = nullptr; Node* temp = nullptr; Node* current = nullptr; for (int i = 0...
ALGO
0.999154
4.557221
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-12-09T13:31: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": "72430d2d112...
b28a4bc0-9367-4ede-9379-ef5d296212d7
phoenix-aditya/codes
hackerearth/monk and the islands hackerearth.cpp
#include<bits/stdc++.h> #include<chrono> #include<string.h> #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #define pi 3.14159265359 #define ll long long #define wh(t) int t;cin>>t; while(t--) #define speed ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define f(i,a,b) for(int i=...
ALGO
0.999385
4.172716
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-02-28T09:11: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": "3a02b0e06...
73bcce6c-0f46-47ac-9dc3-586a31cfc0b3
CloudCompare/CloudCompare
plugins/core/Standard/qRANSAC_SD/extern/RANSAC_SD/BitmapPrimitiveShape.cpp
#include "BitmapPrimitiveShape.h" #include "Bitmap.h" #include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include "IndexIterator.h" #include <MiscLib/Performance.h> #include <float.h> using namespace MiscLib; void BitmapPrimitiveShape::PreWrapBitmap( const GfxTL::AABox< GfxTL::Vector2Df > &b...
TOOL
0.905164
5.314595
{ "github_metadata": { "branch": "master", "commit_count": 5089, "repo_created_at": "2012-11-06T20:15:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4019, "forks": 1100, "issues": 256, "pull_requests": 4 }, "file_meta": { "content_id": "...
22c11db9-67b0-4f35-9862-8327955938ed
sageslayers/CP
TROC/TROC10/B.CPP
#include <bits/stdc++.h> using namespace std ; int main ( ) { int n ; cin >> n ; if ( n == 0 ) cout << 1 << endl ; else if ( n == 1 ) cout << 0 << endl ; else { if ( n % 2 == 0 ) { for ( int i = 0 ; i < n / 2 ; i ++ ) cout << 8 ; cout << endl ; } ...
ALGO
0.999938
4.002785
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-12-06T13:38: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": "109c0460f...
617d559c-cad3-4dd1-bab8-1f8aa547dc82
DamianArado/LeetCode-tracker
2279-maximum-bags-with-full-capacity-of-rocks/2279-maximum-bags-with-full-capacity-of-rocks.cpp
class Solution { public: int maximumBags(vector<int>& capacity, vector<int>& rocks, int additionalRocks) { int n = size(capacity); // Step 1: create a ds based on the format [capacity, rocks, space available] vector<int> bag(n); for(int i = 0; i < n; ++i) bag[i] = capacit...
ALGO
0.998736
5.649312
{ "github_metadata": { "branch": "master", "commit_count": 4716, "repo_created_at": "2021-10-28T18:31:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34fac99...
05400299-bc44-4b08-99fd-db51248e7b9a
Kim0914/AlgoGYM
JINSEOP/프로그래머스_지난_문제/성격 유형 검사.cpp
#include <string> #include <vector> #include <unordered_map> using namespace std; unordered_map<char, int> score_board; void init_map() { score_board['R'] = 0; score_board['T'] = 0; score_board['C'] = 0; score_board['F'] = 0; score_board['J'] = 0; score_board['M'] = 0; score_board['A'] = 0; score_board...
ALGO
0.999954
4.942111
{ "github_metadata": { "branch": "main", "commit_count": 2065, "repo_created_at": "2022-03-07T05:35:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2930d0d58...
f73db2e3-c509-4b65-bb36-f8a3e76b4f38
HieronyM/Competitive-Programming-Code
UVa OJ/4. Graph/Bicoloring.cpp
/* ----- Bipartite Graph Check Using Adjacency List (Unweighted) --- Step 1. Initialisasi warna awal semua node, misal 0. // for (i =0 -> i < n) nodeColor[i] = 0; 2. Set warna node awal misal 1. // nodeColor[root] = 1; 3. Untuk setiap child dari node berikan warna yang berbeda dari warna node itu. Ada...
ALGO
0.998512
4.891218
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2014-07-21T08:19:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e076ca723...
00e57504-cdaf-4780-9ed6-44b340a952f5
lulufa390/AI-Reversi
reversi.h
#ifndef REVERSI_H #define REVERSI_H #include <cmath> #include <stdlib.h> #include <time.h> #include "treenode.h" const int SearchConst = 3000; class Reversi { public: Reversi(); Reversi(const Reversi & c); void init(); void print(); int play(int row,int cow); int getPlayer(); int board[8...
ALGO
0.999463
3.468864
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-08-13T20:38: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": "acc3fb15be...
a4d779d9-99c4-4087-8675-6d9541c64ef5
NewRussianPirat/MethodsOfComputationalMathematics
src/CauchyProblem.h
// // Created by <NAME> on 20.05.2024. // #pragma once #include <functional> #include "Double.h" #include "SolveNonlinearEquation.h" class CauchyProblem { public: template<typename T> // Неявные трапеции static std::vector<T> solveImplicitTrapezoids(const std::function<T(T, T)> &f, ...
ALGO
0.999979
5.634387
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2024-03-09T22:19: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": "61d0b2c8a...
2b3ed004-3893-4e25-a986-f75278770925
young-zy/algorithm
contest/USSTforces#5 (Div 2)/D.cpp
#include<bits/stdc++.h> #define endl "\n" #define INF 0x3f3f3f3f using namespace std; unordered_map<long long,int> uma; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); long long b1,q,l,m; cin>>b1>>q>>l>>m; int a; for(int i = 0; i<m;i++){ cin>>a; uma[a]++; } ...
ALGO
0.999949
3.395693
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2018-09-19T11:21: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": "ade69593c...
cbd9a438-7c05-4116-9cf6-1857c278c9b8
mercurist/AlgoExpert
Medium/numberOfIslands.cpp
#include <bits/stdc++.h> using namespace std; void riverSizesHelper(vector<vector<char>> &matrix, int totalRows, int totalColumns, int row, int column) { if (row >= totalRows or row < 0) return; if (column >= totalColumns or column < 0) return; if (matrix[row][column] == '1') { ...
ALGO
0.999925
5.809161
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-05-20T13:47: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": "5413eb4cf3...
5d2e977a-5735-475c-8302-ef6b34d996f6
Averesoft/DMOJ_Solutions
oly21practice65/oly21practice65.cpp
#include <bits/stdc++.h> using namespace std; const int mm = 1000 + 5, mmm = mm * 15; int n, a[mm], cnt = 0; bool dp[mm][mmm]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } int sum = 0; for (int i = 0; i < n; i++) { sum += a[i]; } for (int i = 0; i <= n;...
ALGO
0.999967
3.696251
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-03-02T19:18:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92e049abe99...
90bc23e1-4012-4319-8f85-c04482f76a0e
slam-code/apollo
apollo-src/modules/control/controller/lon_controller.h
/****************************************************************************** * Copyright 2017 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
TOOL
0.921878
6.853871
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-08-22T15:11:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 178, "forks": 89, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "653ec4...
743cd129-836f-4e76-8b68-ff3b495efe71
belight2/BOJAlgorithm
백준/Gold/3584. 가장 가까운 공통 조상/가장 가까운 공통 조상.cc
// Authored by : chjh2129 #include <bits/stdc++.h> using namespace std; const int MX = 100'005; const int MK = 33 - __builtin_clz(MX); int n; vector<int> adj[MX]; vector<bool> vis(MX); int d[MX]; int p[MK][MX]; void dfs(int cur){ vis[cur] = 1; for(int nxt : adj[cur]){ if(vis[nxt]) continue; p[0][nxt] =...
ALGO
0.99998
5.680015
{ "github_metadata": { "branch": "master", "commit_count": 1026, "repo_created_at": "2023-07-15T10: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": "bca8aa2...
419e757c-892c-4b7a-9302-058d0b5c56d5
preityzz/Go-2024
2024/Prefix-Suffix/2874. Maximum Value of an Ordered Triplet II.cpp
class Solution { public: long long maximumTripletValue(vector<int> &nums) { // see video by coding samurai int n = nums.size(); long long ans = INT_MIN; vector<int> s(n); vector<int> p(n); p[0] = nums[0]; for (int i = 1; i < n; i++) { p...
ALGO
0.999958
5.398956
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2023-12-30T07:15:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ef6e072ea2...
25dabb24-8491-4f6a-af68-e5b37a4c8666
InnoFang/miscode
Cpp/LFJ/leapfrog.hpp
#ifndef __LEAPFROG_HPP__ #define __LEAPFROG_HPP__ #include <iostream> #include <algorithm> #include <vector> namespace LFJ { template<class RandomAccessIterator, class T> inline RandomAccessIterator leapfrogSeek(RandomAccessIterator first, RandomAccessIterator last, const T &val) { // 1. We first look for an int...
ALGO
0.999538
5.576849
{ "github_metadata": { "branch": "master", "commit_count": 383, "repo_created_at": "2017-11-15T12:37:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f491efdc...
3d8771eb-bd7b-42eb-ba2a-7beeaa9aad36
marissalmoser/CS210_FinalProject
ProjectFiles/Milestone1/DriverProgram.cpp
#include <iostream> #include <fstream> #include <sstream> #include <unordered_map> #include <list> #include "CacheStrategy.h" #include "FIFO.h" #include "LFU.h" #include "RR.h" using namespace std; void mainMenu(); void promptUser(); void StartSearch(string cc, string cn); CacheStrategy* cache; int main() { st...
TOOL
0.97476
4.212908
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-04-20T21:48:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f5a582d6fc2...
087b4b10-c243-4bd5-b262-0f90ab356d36
hossam7amdy/computer-science-major
04-data-structures/03-Doubly-Linked-List/HW2[Medium-Hard]/02_swap_kth_forward-backward.cpp
#include <iostream> using namespace std; class LinkedList{ private: struct Node{ int data{ }; Node* next{ }; Node* prev{ }; Node(int data): data(data){ } ~Node(){ //cout << "Destroy value: " << data << " at address " << this << "\n"; } }; Node* ...
ALGO
0.999615
5.187485
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2021-07-24T20:21:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c137957f56...
84ca2718-4abf-41d1-9c89-dfc7e53ace61
R-writes-cpp/cpp-leetcode-solutions
solutions/792.cpp
#include <string> #include <vector> #include <array> #include <algorithm> using namespace std; // best time: 120 ms (95th percentile), 52.79 MB (78th percentile) /* explanation: * for a word to be a subsequence of s, there must be some indices i < j < k and so on such that s[i], s[j], s[k]... are all equal to word[0...
ALGO
0.99998
6.026872
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-02-08T07:33: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": "ab5e2832d05...
8d19b2fd-9e2d-4ed1-88ad-d431c53726f8
egekabas/Competitive-Programming-Solutions
codeforces/egekabas/normal/1072/B.cpp
#include <bits/stdc++.h> #define ff first #define ss second #define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> pll; typedef pair<int, int> pii; typedef pair<ld, ld> pld; int n; int a[100009]; int b[100009]; int ans0[100009]; int ans1...
ALGO
0.999988
3.237867
{ "github_metadata": { "branch": "main", "commit_count": 204, "repo_created_at": "2023-06-19T10:43: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": "2d0968d822...
a585fdbe-c9cd-4ee6-86cf-87c364efbd40
amazy2596/Algorithm-Competition
program_2025/program_04/program_08/102742_D.cpp
#include <bits/stdc++.h> #define uint uint64_t #define int long long using namespace std; void solve() { int n, m; cin >> n >> m; vector g(n + 1, vector<int>(m + 1)); for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) cin >> g[i][j]; int t; cin >> t; vector tag(n...
ALGO
0.999853
5.185358
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2025-06-20T15:02: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": "41847cbc1b9...
8ab5e34f-0702-4221-85b5-a98ac577ebf8
anchit11/Cpp_DSA
avl trees/AVLtree.cpp
#include <iostream> using namespace std; class Node{ public: Node *lchild; Node *rchild; int height; int data; }; class AVL{ public: Node* root; AVL(){ root=NULL; } Node * Rinsert(Node * p,int key); void Inorder(Node *p); void Inorder(){Inorder(root);} Node * ...
ALGO
0.999945
4.939006
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-01-02T06:22: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": "f5ddc213360e...
4590571b-7634-4adf-9f8d-f127c0ab400d
superj6/CPcode
c++ sol/CSES/String Algorithms/minimal_rotation.cpp
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; #define endl '\n' #define pi pair<int, int> #define f first #define s second struct Suf{ int ind; pi rnk; friend bool operator <(Suf a, Suf b){ return a.rnk < b.rnk; } }; const int maxn = 1000000; int n; string s; Suf suf[maxn]; ...
ALGO
0.999994
3.455021
{ "github_metadata": { "branch": "master", "commit_count": 441, "repo_created_at": "2019-09-09T05:55:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 129, "forks": 37, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "350f6...
1b0a0476-97ad-4587-bf7c-79a01350cc2e
rui-mo/velox
velox/common/base/SimdUtil-inl.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 applic...
TOOL
0.979446
6.509404
{ "github_metadata": { "branch": "main", "commit_count": 1981, "repo_created_at": "2021-10-22T09:27:21.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "facebookincubator/velox", "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "con...
687b7452-84c7-4950-a666-b4009cad4e1d
tsakiridis/deplusplus
include/algorithm/differential_evolution.hpp
/*! * \file * \author <NAME> <<EMAIL>> * \version 1.0 * * \brief Useful global functions for various DE algorithms * * The core of the Differential Evolution (\cite Storn1997) algorithm is the * same for most of the variants. */ #ifndef DE_ENGINE_HPP #define DE_ENGINE_HPP #include <vector> #include "rand.hpp...
ALGO
0.999835
6.530352
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-08-01T11:05: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": "1a7420a599...
a394de18-8ac3-4f4c-9633-97fdb35cc42f
ZoranPandovski/al-go-rithms
data_structures/quadtree/c++/BIT.cpp
#include<bits/stdc++.h> #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define ll long long int #define ld long double #define vi vector<int> #define vll vector<long long int> #define sc(n) scanf("%d",&n); #define scll(n) scanf("%lld",&n); #define scld(n) s...
ALGO
0.999783
3.936512
{ "github_metadata": { "branch": "master", "commit_count": 7457, "repo_created_at": "2017-06-05T19:20:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1359, "forks": 1929, "issues": 20, "pull_requests": 44 }, "file_meta": { "content_id": ...
a424cf70-6b8a-4bfb-9c27-4954118f5f72
pakd/cppCodes
DataStructure/Array/1.Rotation/3.binary_search_in_rotated_and_sorted_array.cpp
#include <iostream> int modifiedBinarySearch(int *arr, int low, int high, int key) { // key not present if(low > high) { return -1; } int mid = (low + high)/2; if(arr[mid] == key) { return mid; } // if left half is sorted if(arr[low] <= arr[mid]) { ...
ALGO
0.999997
5.420082
{ "github_metadata": { "branch": "master", "commit_count": 310, "repo_created_at": "2017-02-14T10:45:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "460d2541...
5032d9f1-a3b6-4f7a-864d-0d92beccd8c3
ML-UCV/ML-CodeBert-DistinctSolutions
Raw Dataset/sate/bfs_lee/train/bdb1a615-40ac-11ec-8bd9-dc7196033e92.cpp
#include <iostream> #include <fstream> #include <queue> #include <vector> std::ifstream in("sate.in"); std::ofstream out("sate.out"); int n, m, x, y; int dist[1000005]; std::vector<std::pair<int,int>> g[30001]; std::vector<int> bfs; int main() { in >> n >> m >> x >> y; for(int i = 1; i <= m; i++) { ...
ALGO
0.999981
4.141326
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-06T17:44:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2e136fa25303...
1afe22ab-c5e9-4be4-81a1-0a5f0940c193
lunarc/cpp_course
ch_data_structures/ranges1.cpp
#include <algorithm> #include <iostream> #include <vector> #include <functional> void print_vector(auto v) { for (auto& item : v) std::cout << item << " "; std::cout << std::endl; } int main() { std::vector v = { 6, 4, 7, 3, 9, 0, 1, 5 }; std::for_each(v.begin(), v.end(), [](int i) { std::co...
ALGO
0.995133
5.978163
{ "github_metadata": { "branch": "master", "commit_count": 156, "repo_created_at": "2016-11-18T19:44:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "517368304...
df133942-73c4-42e0-9310-c73010a85275
anaypaul/LeetCode
CheckIfANumberIsAMajorityElementInASortedArray.cpp
//Approach 1 : find major element and check count > n/2 //linear time and constant space class Solution { public: bool isMajorityElement(vector<int>& nums, int target) { int candidate = nums[0]; int count = 1; for(int i = 0; i<nums.size(); i++){ if(candidate == nums[i]){ ...
ALGO
0.99999
6.327816
{ "github_metadata": { "branch": "master", "commit_count": 753, "repo_created_at": "2018-10-16T05:10: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": "8743cb52...
5ec7c8c2-3694-49c8-ba0b-0b1418db024e
anshul45-github/Leet-GFG-360
Heaps/Find_Median_from_Data_Stream.cpp
// https://leetcode.com/problems/find-median-from-data-stream/ #include<bits/stdc++.h> using namespace std; // Approach 1 - Brute Force (Sorting) - TLE class MedianFinder { private: vector<int> arr; public: MedianFinder() { // No initialization needed for vector, it's done automatically } vo...
ALGO
0.999995
6.743593
{ "github_metadata": { "branch": "main", "commit_count": 764, "repo_created_at": "2024-08-15T05:38:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40b37df9bf...
d8b9de02-714b-48fd-b1e6-9c04c9176645
raincross7/code-similarity
codes/train_code/problem051/problem051_22.cpp
#include <stdio.h> #include <iostream> #include <algorithm> #include <string> #include <iomanip> #include <math.h> #include <utility> #include <vector> #include <map> #include <cstdlib> #define div1 1000000007 const long long INF = 1LL << 60; using namespace std; // a>b -> a==b; template<class T> inline bool chmin(T& a...
ALGO
0.999972
3.875083
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "c06c5bb8b67b...
936bcad4-0aa0-42fe-b078-8734cd5cff6c
Abrynos/AdventOfCode2020
6/main.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> int main() { std::ifstream file("input.txt"); if(!file.is_open()) { std::cout << "Could not open file!" << std::endl; return 1; } int sum = 0; int sum2 = 0; std::vector<bool> vals(26, false); std::vector<int> vals2(26, 0); int ...
ALGO
0.999683
4.234622
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-12-25T23:22:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2c33393d5...
28bd97dc-63d5-4f37-bdf8-b14df9bef21d
irvinodjuana/acm
archive/old/codeforces/675/D.cpp
#include <bits/stdc++.h> using namespace std; // shortened type names typedef long long ll; typedef vector<int> vi; typedef pair<int, int> node; // macros #define X first #define Y second #define PB push_back #define MP make_pair #define REP(i, a, b) for (int i = a; i < b; i++) #define REPI(i, a, b) for (int i = a; i...
ALGO
0.999984
4.183991
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-01-09T01:30: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": "17403ccd8...
817f3847-385f-45e6-88b6-d1e4e9d108ba
oicatalana/solucions_oicat_2019
concurs_classificatori1/pb10-2.cpp
#include <iostream> #include <string> #include <vector> using namespace std; using VE = vector<int>; using VVE = vector<VE>; void mou(int x, int y, char c, int& x2, int& y2) { x2 = x; y2 = y; if (c == 'N') ++y2; else if (c == 'S') --y2; else if (c == 'E') ++x2; else --x2; // 'O' } int main() { strin...
ALGO
0.999854
4.390603
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-02-12T21:15:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6812e4ba6...
ace03266-3274-411f-baa1-3d96e6da013d
ALEKS-REM/ALEKS-REM
task_1.cpp
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <iostream> #include <ctime> int main(void) { int a; int k; srand(static_cast<unsigned int>(time(0))); std::cout << "Enter array dim:" << std::endl; std::cin >> a; int* arr = new int[a]; int* arr1 = new int[a - 4]; std::cout << "Array:" << std:...
ALGO
0.991711
3.13874
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-12-26T11: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": "d060139a88d6...
fa7f8361-fd4d-4351-9650-845993aa07f6
qlb7707/webrtc_src
src/chromium/src/third_party/stp/src/lib/Sat/cryptominisat2/RestartTypeChooser.cpp
/**************************************************************************************** MiniSat -- Copyright (c) 2003-2006, <NAME>, <NAME> CryptoMiniSat -- Copyright (c) 2009 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "...
ALGO
0.990722
5.648555
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-12-05T01:31:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "a7d11624c0...
39af99ee-650d-45f2-b339-47b603f6c76e
RyanPioneer/Leetcode
3001~3500/3241. Time Taken to Mark All Nodes/main.cpp
/** * Source: ibit.ly/03y8P * Date: 2025/1/4 * Skill: * Ref: * Runtime: 354 ms, faster than 71.05% of C++ online submissions * Memory Usage: 341.25 MB, less than 65.79% of C++ online submissions * Time complexity: * Space complexity: * Constraints: * */ #include <iostream> #include <vector> #include <algo...
ALGO
0.999945
4.971104
{ "github_metadata": { "branch": "main", "commit_count": 504, "repo_created_at": "2021-05-09T23:57: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": "36032daad2...
0220ab19-cd39-4912-ab44-0bd4f25f00ae
CadQuery/OCP
opencascade/GCPnts_AbscissaPoint.hxx
// Created on: 1992-03-25 // Created by: <NAME> // Copyright (c) 1992-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser ...
TOOL
0.943571
7.506028
{ "github_metadata": { "branch": "master", "commit_count": 222, "repo_created_at": "2019-12-17T20:02:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 122, "forks": 36, "issues": 28, "pull_requests": 2 }, "file_meta": { "content_id": "c7c59...
538eb1e9-ece9-4bf3-9b60-dba24e16966a
shahanajshana/cryptography
cns exp 18.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #define ALPHABET_SIZE 26 #define MAX_TEXT_LENGTH 1000 #define TOP_PLAINTEXTS 10 void frequency_analysis(const char *ciphertext, int *freq) { for (int i = 0; ciphertext[i]; i++) { if (ciphertext[i] >= 'a' && ciphertext[i] <= 'z') { freq...
ALGO
0.999828
4.924128
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-05-27T10:47: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": "85630a91a529...
d83b7673-af91-421c-8081-05375ee5b90d
huukhoa04/Toan-cntt
BUOI_10/cauC.cpp
// A C++ program to find convex hull of a set of points. Refer // https://www.geeksforgeeks.org/orientation-3-ordered-points/ // for explanation of orientation() //graham scan #include <bits/stdc++.h> #include <iostream> #include <stack> #include <stdlib.h> using namespace std; struct Point { int x, y; }; // A globa...
ALGO
0.999995
4.896558
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-05T14:13: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": "7085eb9a7c3b...
f108aac3-e942-46e6-bf84-aed4ee20a1a4
leisheyoufu/study_exercise
algorithm/leetcode/124_Binary_Tree_Maximum_Path_Sum/main2.cpp
/* 124. Binary Tree Maximum Path Sum Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The path must contain at least one node and does not need to go through the root. For ex...
ALGO
0.99997
5.547281
{ "github_metadata": { "branch": "master", "commit_count": 738, "repo_created_at": "2013-10-13T11:13:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "2b14e0b8...
5b1a4980-f9bb-4fff-993f-9df0301ac9a9
KANIZM/progcomp
Yukicoder197.cpp
#include <set> #include <map> #include <list> #include <queue> #include <stack> #include <cmath> #include <ctype.h> #include <ctime> #include <cstdio> #include <vector> #include <string> #include <bitset> #include <cctype> #include <cstdlib> #include <cstring> #include <utility> #include <numeric> #include <complex> #i...
ALGO
0.9998
3.585704
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2015-09-11T14:59: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": "97dd5eb7a...
7c9fef79-c36d-476a-842b-430695b6ec0e
esix/competitive-programming
poj/volume-10/1979/main.cpp
#include <iostream> #include <utility> #include <vector> #include <string> #include <sstream> #include <algorithm> #include <map> #include <set> #include <queue> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); while (true) { int w, h; cin >> w >> h; if (w == 0) break; ...
ALGO
0.999866
3.965042
{ "github_metadata": { "branch": "master", "commit_count": 1923, "repo_created_at": "2015-11-18T10:10:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bfe69...
d349990a-73a6-499b-9bc5-601c1604cb6d
ishandutta2007/codeforces-k
krk/normal/605/B.cpp
#include <cstdio> #include <algorithm> using namespace std; typedef pair <int, int> ii; typedef pair <ii, int> iii; const int Maxn = 100005; int n, m; iii E[Maxn]; int P[Maxn], cur = 2; int nxt = 2; ii res[Maxn]; int main() { scanf("%d %d", &n, &m); for (int i = 0; i < m; i++) { scanf("%d %d", &E[i].first.first...
ALGO
0.999966
3.636725
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06: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": "811afd195fd9...
da6d5cb7-2ad9-4be1-bd34-9683b7f5de47
mich4612021/Amanzi11282021
src/common/chemistry/reactions/RadioactiveDecay.hh
/* Chemistry Copyright 2010-201x held jointly by LANS/LANL, LBNL, and PNNL. Amanzi is released under the three-clause BSD License. The terms of use and "as is" disclaimer for this license are provided in the top-level COPYRIGHT file. Class for radioactive decay of aqueous and sorbed components. Does...
TOOL
0.955418
6.868195
{ "github_metadata": { "branch": "master", "commit_count": 13172, "repo_created_at": "2021-11-28T20:33: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": "cf41ad...
4ba8cf2e-cd93-4b76-8552-ff550a7a3934
rjra19/dataCompression
HCTree.cpp
/* * Names: <NAME>, <NAME> * Date: May 18th 2017 * Description: This file create the huffman tree by builiding it and then * encode and decode the file. * PA3 * */ #include "HCTree.h" #include <stack> using namespace std; std::vector<HCNode*> orderedNodes(256, (HCNode*) 0); /*PRECONDITION: freqs is a v...
ALGO
0.999557
4.472041
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-01-30T22:13: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": "814b06846e...
ebc11821-7137-4c0f-832f-f6a9695325c8
sambayless/minisatpb
Solver.h
/****************************************************************************************[Solver.h] Copyright (c) 2005-2010, <NAME>, <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 ...
ALGO
0.993021
6.754977
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-12-10T22:25: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": "d02b0d0a1f...
c0b498bc-71c2-4d63-9214-ed049caeaab8
COMP2113-game/Tic-tac-toe
Game.cpp
#include "Game.h" #include "Chesspiece.h" #include <iostream> #include <fstream> #include <cctype> #include <limits> #include <cstdlib> #include <ctime> #include <vector> #define LIGHT_PURPLE "\033[01;35m" #define RED "\033[22;31m" #define RESET "\033[0m" #define LIGHT_GREEN "\033[01;32m" using namespace std; static ...
ALGO
0.953527
3.433059
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-10-20T13:04:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "927e1a3cfe...
68e77a76-96e5-4a3a-bab7-c7ac2d6fbe7a
GKhomutov/Algorithms
Algo/Convex_Hull_Trick/CHT.cpp
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() using namespace std; using ll = long long; struct Line { ll k, b; Line() {} Line(ll k, ll b): k(k), b(b) {} ll intersect(Line l) const { assert(k != l.k); ll db = l.b - b; ll dk = k - l.k; if (dk < 0) db = -...
ALGO
0.999806
4.72946
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2023-10-07T17:52:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f9c9849985...
eec16da7-26f5-4c88-8a4f-ffe632b5657c
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1244/all/28895249_62486806.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; const ll maxn = 100009; ll n, m, x, y, z; ll deg[maxn]; ll cst[4][maxn]; vector < ll > edges[maxn]; ll clr[maxn]; ll dfs(ll pos, ll par, ll prv1, ll prv2) { ll xx[4]; memset(xx, 0, sizeof(xx)); xx[prv1] = xx[prv2] = 1; ll cur = -1; ...
ALGO
0.999914
3.634202
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40: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": "602988331...
fdfa54e6-4c45-4dcf-81b0-f4d1019042a2
TangJinXuan/LeetCode-exercise
352.cpp
352. 将数据流变为多个不相交区间 给你一个由非负整数 a1, a2, ..., an 组成的数据流输入,请你将到目前为止看到的数字总结为不相交的区间列表。 实现 SummaryRanges 类: SummaryRanges() 使用一个空数据流初始化对象。 void addNum(int val) 向数据流中加入整数 val 。 int[][] getIntervals() 以不相交区间 [starti, endi] 的列表形式返回对数据流中整数的总结。 struct Node { int left; int right; Node*prev; Node*next; Node() ...
ALGO
0.999947
5.751696
{ "github_metadata": { "branch": "main", "commit_count": 98, "repo_created_at": "2021-09-12T04:39: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": "33fc3f4b02f...
b04576b0-fd53-43b1-9c45-1f5dea51632a
yizhiqingshu/vscode
cpp_2/baseSort.cpp
#include<iostream> #include<list> using std::list; using std::cout; using std::endl; /* 主要原理就是首先将个位排序,放入列表数组中(push_back),在将数据存入数组中 把列表中的数据初始化10个列表 将十位作同样处理,放入列表中 先遇到哪个数据把哪个数据放入对应的列表中 Init data 123 234 2 6 765 456 5 543 968 142 baseSort data 2 142 123 543 234 765 5 6 456 968 2 5 6 123 234 142 543 456 765 9...
ALGO
0.999753
3.999903
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2021-01-19T12:40: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": "334f1adbb...
6bc15b3b-3cf9-480a-b3e6-cb2e60efc68f
moonjinhwan/Algorithm-Code-Up
back_Joon/bfs, dfs/2753 빙산(그룹 지정).cpp
#include<iostream> #include<queue> #include<cstring> using namespace std; int n, m; int map[300][300]; int type[300][300]; bool visit[300][300]; int backUp[300][300]; int dx[4] = { 1,-1,0,0 }; int dy[4] = { 0,0,-1,1 }; void bfs(int y,int x) { queue<pair<int, int>> q; q.push({ y,x }); visit[y][x] = true; while (!q.e...
ALGO
0.999986
3.259387
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2020-04-14T07:50:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0669fe57...
130d79ec-b870-4e1d-88c4-dc24f0b6881e
Xiaoming-Zhao/advtex_init_align
advtex_init_align/tex_init/project/src/HoleFiller.cpp
/* The MIT License (MIT) Copyright (c) 2017 <NAME> and <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, including without limitation the rights to use, copy, modify, m...
ALGO
0.980118
5.223632
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-07-20T17:02:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 61, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec28a3b8e5...