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
c520a95c-2bd8-4c28-9cfc-3c212fa55113
coppolam/swarmulator
sw/math/fmat.h
#ifndef FMAT_H #define FMAT_H #include "trigonometry.h" #include "auxiliary.h" /** * @brief Template class for matrix operations. * * Header class for matrix operations. Can be invoked anywhere by using fmat<type>::function(inputs). * The class uses a template type so the matrix can be any std::vector<type>. * @...
TOOL
0.969658
6.807338
{ "github_metadata": { "branch": "master", "commit_count": 461, "repo_created_at": "2017-04-28T10:53:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 14, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "ba4725...
14629505-0217-4dc6-a695-1f0161ebec4f
lanl/scout
lib/Runtime/old/volren/hpgv/hpgv_composite.cpp
/** * hpgv_composite.c * * Copyright (c) 2008 <NAME> * * Contact: * <NAME> * <EMAIL> * * * All rights reserved. May not be used, modified, or copied * without permission. * */ #include "scout/Runtime/volren/hpgv/hpgv_composite_in.h" #include <stdint.h> #include <inttypes.h> #include <stdio.h> #include ...
ALGO
0.978267
3.791093
{ "github_metadata": { "branch": "devel", "commit_count": 3318, "repo_created_at": "2015-02-11T00:52:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c37e1d10...
ecdf5d08-f589-4387-a87b-fa4148bd4faf
thalals/Algorithm_Study
Taewoo/problem_solving/2021.04/2021.04.08/16235.cpp
/* Comment : 시간초과 발생... */ #include<iostream> #include<vector> #include<algorithm> #include<queue> using namespace std; /* 1. 봄에, 나무가 자신의 나이만큼 양분을 먹고, 나이가 +1 2. 하나의 칸에 나무가 여러 개 있다면, 나이가 어린 나무부터 양분을 먹는다. 3. 양분이 부족해 자신의 나이만큼 양분을 못먹으면 죽는다. 4. 여름에, 죽은 나무가 양분으로 변한다. 죽은 나무마다 나이를 2로 나눈 값이 나...
ALGO
0.9998
4.010616
{ "github_metadata": { "branch": "main", "commit_count": 1277, "repo_created_at": "2021-01-19T15:10:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4cc19188d...
e4caedda-e68d-4bad-84c9-9753b39e8a4c
HazardyKnusperkeks/advent-of-code-2023
challenge5.cpp
#include "challenge5.hpp" #include "helper.hpp" #include "print.hpp" #include <algorithm> #include <future> #include <ranges> #include <string_view> using namespace std::string_view_literals; namespace { struct Map { std::int64_t Source; std::int64_t Destination; std::int64_t Length; }; struct SeedMap ...
ALGO
0.999683
5.649357
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-12-01T20:27: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": "44227515a31...
3f50bc3a-2dc7-4b1c-a401-21b36bb63f44
soadkhan/My-Code
C++/team1.cpp
#include<bits/stdc++.h> using namespace std;// third parameter of sort ..... jei operator er jonno true sevabe kaj korbe .... sekhane caile condition lagano jabe .... long long int se_si; bitset<10>bs;//boundary is the size ....... use in prime vector<long long int>primes; // use in prime typedef unsigned long long i...
ALGO
0.999828
3.426326
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-03-24T14:38: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": "62552b3a41...
3f214bb6-5e32-4e30-9590-43c29bbb5edd
paulocezar/problem-solving
SPOJ BR/HEARTPMG.cpp
#include <map> #include <set> #include <list> #include <stack> #include <cmath> #include <queue> #include <ctime> #include <cfloat> #include <vector> #include <string> #include <cstdio> #include <bitset> #include <climits> #include <cstdlib> #include <cstring> #include <cassert> #include <iomanip> #include <s...
ALGO
0.999804
3.513307
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2015-04-23T17:19:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58bfb7a0...
adbb4198-88ec-49ba-b029-0edab1fde498
VandyUAVCourse/Documents
SLAMTeamDocs/Code/kalman_filters/src/state_ukf_node.cpp
#include "kalman_filters/state_ukf_node.h" #include <eigen3/Eigen/Cholesky> namespace kalman_filters { /** * Constructor. */ StateUKF::StateUKF() { // Retrieve parameters if (!mN.getParam("state_ukf_alpha", mAlpha)) { mAlpha = 1.0; mN.setParam("state_ukf_alpha", mAlpha); } if (...
ALGO
0.979253
6.785967
{ "github_metadata": { "branch": "master", "commit_count": 145, "repo_created_at": "2014-01-09T22:20:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 18, "pull_requests": 0 }, "file_meta": { "content_id": "9059728c...
b4fe1d9a-2f3d-484e-bf38-6d728970e265
SteveWolligandt/tatooine
fields/include/tatooine/analytical/numerical/rayleigh_benard_convection.h
#ifndef TATOOINE_ANALYTICAL_NUMERICAL_H #define TATOOINE_ANALYTICAL_NUMERICAL_H //============================================================================== #include <tatooine/field.h> //============================================================================== namespace tatooine::analytical::numerical { //====...
ALGO
0.997986
5.560803
{ "github_metadata": { "branch": "main", "commit_count": 1976, "repo_created_at": "2022-10-10T09:16:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1b4bf41e...
62a37841-e576-44ca-9bd5-8136904d37fc
Matistjati/Competitive-programming-solutions
po/pokval13/wikipediasprak.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") #define enablell 0 #define ll long long #if enablell #define int ll #endif #define vi vector<int> #define vb vector<bool> #define vvi vector<vi> #define vvvi vector<vvi...
ALGO
0.999965
4.119833
{ "github_metadata": { "branch": "master", "commit_count": 870, "repo_created_at": "2021-09-14T12:27: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": "fe55e6f6...
f886200c-2f53-46fa-a2f1-97ec8c95ad30
jl-wynen/code_stuffs
cpp/expressionTemplates/expTmplt.cpp
#include <iostream> #include <vector> #include <assert.h> #include <cmath> #include <chrono> using namespace std; template <typename E> class VecExpression { public: double operator[](size_t i) const { return static_cast<E const&>(*this)[i]; } size_t size() const { return static_cast<E con...
ALGO
0.984163
5.226928
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-08-13T08:14:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "432a07176...
b59d7983-001a-47b1-a347-65eb504e4587
hu18yuanwai/rankpooling
hollywood/trainAndTest/trainAndTest.cpp
#include "initialize.h" #include "svm.h" #define INF HUGE_VAL //static int (*info)(const char *fmt,...) = &printf; //void (*print_func)(const char*) = NULL; // default printing to stdout //void print_null(const char *s) {} struct svm_parameter param; // set by parse_command_line struct svm_problem prob; //...
DATA
0.968167
3.327197
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2016-08-15T06:49:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ff1d01b62...
59d318e0-488b-4bdf-a700-58ce31d35725
umass-forensics/IBLT-optimization
iblt.cpp
#include <cassert> #include <iostream> #include <list> #include <sstream> #include <utility> #include <iomanip> // std::setbase #include "iblt.h" #include "murmurhash3.h" #include "utilstrencodings.h" std::string IBLT::parameter_file = "./param.export.0.995833333333333.2018-07-12.csv"; static const size_t N_HASH...
ALGO
0.985513
4.601161
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-07-13T00:51:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6f7a588974...
9bb924a4-a235-4f1c-ba57-f843f4f24135
nampham041297/Rep2022CPSLD_05CE
Lesson 21/Bai21_4.cpp
#include <iostream> using namespace std; /** *@author <NAME> *@website braniumacademy.net */ int getAnIntegerNumber() { int n; while (true) { cout << "Nhap vao mot so nguyen > 0: "; cin >> n; if(n > 0) { break; } } return n; } bool isPrimeNumber(int n) ...
ALGO
0.999231
3.93787
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2022-02-08T04:21: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": "5d49c3fe6a...
9e706314-af8a-40e6-b42d-044bc4ff1551
cacophonix/SPOJ
DRAWM.cpp
/* USER: zobayer TASK: DRAWM ALGO: simulation */ #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int MAX = 80, INF = (1<<20); int main() { int c, i, j, n, m, now, seq[MAX]; char grid[MAX][MAX], p; while(scanf("%d", &c)==1 && c > 0) { memset(grid, 0x20, sizeof(grid)); for(i...
ALGO
0.99998
3.245512
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2012-11-13T17:07:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 92, "forks": 101, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "48ff73...
35bcb89e-a724-4b76-b369-1126061f9d1b
3l-d1abl0/DS-Algo
cpp/practise/merfe_sort.cpp
#include<bits/stdc++.h> using namespace std; void heapify(int parent, int arr[], int N){ while( ((parent*2)+1) < N ){ int child = parent*2 +1; if(child+1 <N && arr[child]< arr[child+1]) child++; if(arr[parent]< arr[child]){ swap(arr[parent], arr[child]); ...
ALGO
0.999908
4.841239
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-02-02T18:28: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": "815c1417e...
8e1fdd93-9673-47cd-8d10-0998e460a721
Coltoncx245/SimpleSudoku
main.cpp
#include "util.h" // ************ FUNCTION DECLARATIONS ************ bool solve(int (*grid)[9][9], int* backtracks); void print(int (*grid)[9][9]); bool findNextEmpty(int (*grid)[9][9], int* r, int* c); // const so things aren't accidentally changed while verifying bool isValid(int const (*grid)[9][9], int const &r, ...
ALGO
0.99896
6.221777
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-10-03T17:10: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": "91b2c9694c7b...
53df104f-69a7-4771-8b40-af6cbd95fed9
jw96118/Project-Warlock
Engine/Utility/Code/Calculator.cpp
#include "Calculator.h" USING(Engine) Engine::CCalculator::CCalculator(LPDIRECT3DDEVICE9 pGraphicDev) : m_pGraphicDev(pGraphicDev) { m_pGraphicDev->AddRef(); } Engine::CCalculator::~CCalculator(void) { } HRESULT Engine::CCalculator::Ready_Calculator(void) { return S_OK; } _float Engine::CCalculator::Compute_He...
TOOL
0.909064
4.146816
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-08-16T04:18: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": "4c050e5c01da...
e642d860-ece3-432e-8197-10d7a1d109ca
zvict/qfr
src/CircuitOptimizer.cpp
/* * This file is part of IIC-JKU QFR library which is released under the MIT license. * See file README.md or go to http://iic.jku.at/eda/research/quantum/ for more information. */ #include "CircuitOptimizer.hpp" namespace qc { void CircuitOptimizer::removeIdentities(QuantumComputation& qc) { // delete the ide...
ALGO
0.997426
6.352106
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2021-03-12T08:09: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": "ac019108d2c...
52322725-4cd8-4251-8392-e8af19a95b39
Guillembc23/PRO1
exprac/happy.cc
#include <iostream> #include <vector> using namespace std; typedef vector<char> vc; typedef vector<vc> vvc; int main() { int n, m; while (cin >> n >> m) { vvc matrix(n, vc(m)); for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> matrix[i][j]; } } // Iterem per t...
ALGO
0.998821
4.073523
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-22T10:46: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": "08eb6fffd286...
0391b2ba-72ef-4873-995e-96633436dd20
nkb02/dsa
array/snippet array.cpp
================ EASY ======================= 1. Remove duplicates from Sorted array int removeDuplicates(vector<int>& nums) { int j = 0, i = 1;; int n = nums.size(); for(; i < n; i++){ if(nums[j] != nums[i]) { nums[j+1] = nums[i]; j++; ...
ALGO
0.999717
5.206426
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-06-24T09:54: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": "12bd2909e0c5...
5daba65c-0808-4728-812f-015d68117046
Mohannad141/My-Work
The Ultimate Board Game/pyramids.h
#ifndef ASSIGNMENT_DEMO_WITHOUT_AI_BONUS_PYRAMIDS_H #define ASSIGNMENT_DEMO_WITHOUT_AI_BONUS_PYRAMIDS_H #include "BoardGame_Classes.h" template <typename T> class Pyramids_boards:public Board<T> { public: Pyramids_boards (); bool update_board (int x , int y , T symbol); void display_board () ; bool ...
TOOL
0.98687
5.361828
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2024-08-14T14:23: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": "e7a96ab84dc...
50ce8de0-3ed9-4fe3-9570-0d20e318df0c
viennacl/viennacl-dev
viennacl/linalg/opencl/amg_operations.hpp
#ifndef VIENNACL_LINALG_OPENCL_AMG_OPERATIONS_HPP #define VIENNACL_LINALG_OPENCL_AMG_OPERATIONS_HPP /* ========================================================================= Copyright (c) 2010-2016, Institute for Microelectronics, Institute for Analysis and Scientific Computing, ...
ALGO
0.971021
6.686309
{ "github_metadata": { "branch": "master", "commit_count": 1482, "repo_created_at": "2013-02-22T14:47:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 288, "forks": 89, "issues": 85, "pull_requests": 4 }, "file_meta": { "content_id": "14f...
cd19b03e-037d-4fef-8260-5addc60196f7
xiaoqiuuuu/MyCodetemplate
2023USST-ACM集训队专题场5--典中典之动态规划2(树型dp)/A(括号树).cpp
// Problem: // P5658 [CSP-S2019] 括号树 // // Author : Weiqt // URL: https://www.luogu.com.cn/problem/P5658 #include <bits/stdc++.h> using namespace std; using LL = long long; const int N = 5e5 + 10 , M = 2 * N; int h[N] , e[M] , ne[M] , idx; string s; int n ; int stk[N] , tt; int f[N] ,p[N]; LL sum[N]; void...
ALGO
0.999942
3.880272
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-06-30T09:44:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e5f1c1f13b8...
da3fed44-edf9-4bee-a86b-20d85430b921
TrynBug/HSKim_proj
08-09. 길찾기 프로그램/SearchAlgorithm_win32/SearchAlgorithm_win32/utils.cpp
#include <iostream> #include <Windows.h> #include <algorithm> #include <unordered_set> #include "utils.h" using namespace utils; COLORREF utils::hcl_to_rgb(double hue, double chroma, double luma, double alpha) { // hue, chroma, luma must be in the range (0, 1) // do the conversion double _h = hue - (dou...
ALGO
0.940065
4.089655
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2023-07-28T04:14: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": "5f50802b6e6...
d17dbaa2-9a91-4cb1-a9c5-cc0b9bf44a73
risal-shefin/Competitive-Programming
LightOJ/1037 - Agent 47 - 1468979.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long ll dp[1 << 15], h[20], dam[20][20], lim, shot[1 << 15][20], gun[20], n; ll solve(ll msk) { if(msk == lim - 1) return 0; ll &ret = dp[msk]; if(ret != -1) return ret; ret = 1e18; for(ll i = 0; i < n; i++) { ...
ALGO
0.999813
3.187687
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2019-06-28T19:28:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e507f51...
0a5ab6f0-e172-488b-9e39-75f09feb9e6b
bekasov/Cloned.SoftPixelEngine
sources/Base/spMathRasterizer.cpp
/* * Rasterizer file * * This file is part of the "SoftPixel Engine" (Copyright (c) 2008 by <NAME>) * See "SoftPixelEngine.hpp" for license information. */ #include "Base/spMathRasterizer.hpp" namespace sp { namespace math { namespace Rasterizer { SP_EXPORT void rasterizeTriangle( const RenderPixelCallb...
ALGO
0.96337
6.15167
{ "github_metadata": { "branch": "master", "commit_count": 304, "repo_created_at": "2015-08-05T20:36:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e90666b...
98a77c92-6bc2-40e5-a48a-7a701d2e7ab3
prak5192/C-Plus-Plus-Programming
Functions/inline_function.cpp
/* C++ offers a way to combine the advantages of functions with the speed of code written in-place: inline functions. The inline keyword is used to request that the compiler treat your function as an inline function. When the compiler compiles your code, all inline functions are expanded in-place — that is, the f...
ALGO
0.996584
5.346421
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2013-01-05T15:14: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": "2f82f213a...
e02c0616-591b-44ec-826b-4a4ad6f6c3f8
hmofrad/CodingPractice
skinnyleetcode/largestValues.cpp
/* * https://leetcode.com/problems/find-largest-value-in-each-tree-row/submissions/ * (c) <NAME>, 2020 * (e) <EMAIL> */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; ...
ALGO
0.999998
6.500408
{ "github_metadata": { "branch": "master", "commit_count": 660, "repo_created_at": "2016-07-22T04:19:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3c5dfe3...
e74041d9-7d39-477f-a7de-794032f9046c
HuanHuanHuanFFF/HuanF-CodeX
Code Instrumentality Initiative/CF/CF 1029 d3/C_Cool_Partition.cpp
// // Created by 幻 on 2025/6/8. // #include <bits/stdc++.h> using std::cin; using std::cout; using std::endl; using std::pair; using std::vector; using std::string; using ll = long long; using ull = unsigned long long; using PII = pair<int, int>; constexpr int MOD = 1e9 + 7; constexpr int INF = 1e9 + 17; constexpr in...
ALGO
0.999767
5.115912
{ "github_metadata": { "branch": "master", "commit_count": 255, "repo_created_at": "2025-04-16T15:06:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbb784f2...
35b26f63-0d71-4098-9fad-f5cdcbcaa020
FluffyDou/HangDou
Gorgon_Hang/Gorgon/GraphMatch/WongMatch15.h
/* Graph Matching algorithm based on the following paper: Wong et al., An algorithm for graph optimal monomorphism, IEEE Transactions on Systems, Man, and Cybernetics, Vol 20, No 3, May/June 1990, pp628-636 Author: <NAME> Date : 01/23/2006 */ #ifndef WONGMATCH15_H #define WONGMATCH15_H #include "StandardGraph....
ALGO
0.999235
3.643858
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2016-10-26T15:50:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02dfa8ccb...
502a3352-d1c9-48c7-8173-4107ae2b165d
HardikJainGit/LeetCode
1475-maximum-sum-bst-in-binary-tree/1475-maximum-sum-bst-in-binary-tree.cpp
class Solution { public: class ds { public: int mx; // Max left int mi; // Min right bool isBST; int sum; }; ds dfs(TreeNode* root , int &ret) { if(!root) { return {INT_MIN , INT_MAX , true , 0}; } // Bottom up dfs...
ALGO
0.999989
6.385266
{ "github_metadata": { "branch": "main", "commit_count": 405, "repo_created_at": "2024-05-11T12:56: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": "1f347387df...
f9b8756b-ef3d-4cf7-91a9-95f34a6e7556
Yukariko/study
n4_bfs2/14466.cpp
#include <bits/stdc++.h> #ifdef ONLINE_JUDGE #define endl '\n' #endif using ll = long long; using ld = long double; using namespace std; const int dy[] = {1, -1, 0, 0}; const int dx[] = {0, 0, 1, -1}; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int N, K, R; cin >> N >> K >> R; ...
ALGO
0.999652
4.7145
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2021-08-13T14:27:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "acb1da87293...
04b5f532-f363-49ec-9c96-7ff6eff36505
stdstring/leetcode
Algorithms/Tasks.0001.0500/0090.SubsetsII/solution.cpp
#include <algorithm> #include <vector> #include "gtest/gtest.h" namespace { class Solution { public: std::vector<std::vector<int>> subsetsWithDup(std::vector<int> const &nums) const { std::vector<int> numbers(nums); std::sort(numbers.begin(), numbers.end()); std::vector<std::vector<in...
ALGO
0.992305
6.773234
{ "github_metadata": { "branch": "master", "commit_count": 1715, "repo_created_at": "2018-03-28T05:24:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c12f650...
252181f0-ede8-41b4-a9f7-5d9d849e2f83
vinnyshin/Samsung-SW-academy
5.graph/1.basic_dfs_practice/user.cpp
int tree[100][5]; int child_cnt[100]; int stack[100]; void dfs_init(int N, int path[100][2]) { for (int i = 0; i < 100; i++) { child_cnt[i] = 0; } int parent; int child; for (int i = 0; i < N - 1; ++i) { parent = path[i][0]; child = path[i][1]; tree[parent]...
ALGO
0.999934
4.020487
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-07-11T10:00:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "363bbe852cf...
df7ab4ca-923a-4766-8574-6b2a0d866260
SkyRainWind/XCPC_Library
Luogu/Luogu5357.cpp
// by SkyRainWind #include <cstdio> #include <vector> #include <map> #include <cstring> #include <iostream> #include <queue> #include <algorithm> #define mpr make_pair #define debug() cerr<<"Yoshino\n" #define rep(i,a,b) for(int (i)=(a);(i)<=(b);(i)++) #define pii pair<int,int> using namespace std; typedef long long...
ALGO
0.999748
3.560447
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-04T06:47: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": "3d531a266c0b...
03f9e92d-8197-4a21-8e2e-993c07ee83c9
hudsonvdsf/alg-prog
progC.cpp
#include <stdio.h> #define TAMANHO 24 // Função para gerar valores simulando o consumo da maquina ao longo do dia void gerarValores(int valores[]) { int max = 200; int min = 20; int mid = TAMANHO / 2; for (int i = 0; i < mid; i++) { valores[i] = min + (max - min) * i / (mid - 1); } for (int i = mid; ...
ALGO
0.980816
4.59136
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-09T18:46:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "500d7854f938...
adf022db-cb60-4fab-9bfe-21a9f732fcbb
DepInjoy/geektime
algorithm/CPP/topic/DP/03_SingleSeq/L198_HouseRobber.cpp
/** * @brief 你是一个专业的小偷,计划偷窃沿街的房屋。每间房内都藏有一定的现金, * 影响你偷窃的唯一制约因素就是相邻的房屋装有相互连通的防盗系统, * 如果两间相邻的房屋在同一晚上被小偷闯入,系统会自动报警。 * 给定一个代表每个房屋存放金额的非负整数数组,计算你不触动警报装置的情况下 * 一夜之内能够偷窃到的最高金额。 * 链接:https://leetcode-cn.com/problems/house-robber * * 实现思想: * 1. 动...
ALGO
0.999959
5.285652
{ "github_metadata": { "branch": "main", "commit_count": 1321, "repo_created_at": "2021-08-02T14:09:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89d04cd5d...
ebc8f316-19bd-43fb-ac45-9b3c194fca52
therajsoren/leetcode-solutions
sliding-window/subarrays.cpp
#include <bits/stdc++.h> #define endl '\n' #define rep(i, n) for (int i = 0; i < (n); i++) #define all(x) (x).begin(), (x).end() using namespace std; using ll = long long; void solve() { int n; cin >> n; vector<int> v(n); rep(i, n) cin >> v[i]; int k; cin >> k; vector<int> res; deque<int> dq;...
ALGO
0.999967
4.604393
{ "github_metadata": { "branch": "main", "commit_count": 105, "repo_created_at": "2024-01-27T14:10: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": "32a5ae8fea...
144ae712-546b-472a-b294-0f36750630f6
arvind-sahu/Data-Structures
Binary Tree/maximumPathSumFromRoot.c++
#include<bits/stdc++.h> using namespace std; class Node { public: int data; Node* left; Node* right; Node(int val) { this->data = val; this->left = NULL; this->right = NULL; } Node* newNode(int val) { } Node* buildTree(Node* root) { cou...
ALGO
0.999963
4.642159
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-06-10T16:21:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "10489bf9d52...
bd8906c1-bd7f-44ba-bb20-680bb957d09f
AlessandroScrem/Esercizi-cpp
Es-ch-19/es07-template-numbers.cpp
/****************************************************************************** 7. Try your solution to exercise 2 with some Numbers. ******************************************************************************/ #include <iostream> #include <vector> #include <cmath> using namespace std; // error() simply disguise...
ALGO
0.987362
4.811515
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2019-09-22T19:23:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2170b68d7...
a9f8667f-4a66-4272-a0f2-a757f61d3a80
ndhoang123/Practical-Algo
Study-Plan-Leetcode/Day7/DS/RemoveLinkedListElement.cpp
// https://leetcode.com/problems/remove-linked-list-elements/ #include <bits/stdc++.h> using namespace std; 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) {} }; ListN...
ALGO
0.999609
4.786528
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2021-07-11T16:05:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09e8757b42...
5daf072b-b7c5-4489-98e8-991fc314015e
Badhansen/LeetCode-Solutions
0029-divide-two-integers/0029-divide-two-integers.cpp
class Solution { public: int divide(int dividend, int divisor) { if (dividend == INT_MIN && divisor == -1) { return INT_MAX; } int neg = (dividend < 0) ^ (divisor < 0); if (neg == 0) { return abs(dividend) / abs(divisor); } else { return -1...
ALGO
0.999809
6.122829
{ "github_metadata": { "branch": "master", "commit_count": 5823, "repo_created_at": "2021-10-31T19:53:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c13ccd7...
1a52d0a0-b6a7-4f3e-b712-8245c2384f30
FeelUsM/zadrotstvo
progs/graphs/listgraphs.cpp
/* перебор всех возможных графов, состоящих не более чем из VERTEX вершин. */ #include <map> #include <iostream> using std::cout; using std::endl; #define VERTEX 4 class GraphVirt; class GraphMatrix; void makeDirect(const GraphMatrix & GM, GraphVirt * pGV); void makeInverse(const GraphMatrix & GM, GraphVirt * pGV); c...
ALGO
0.999256
3.658239
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2019-03-14T22:25:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c1250ec...
73ed6504-77de-4fa6-b135-327ecd61adcb
rodea0952/competitive-programming
AtCoder/ABC/154/F.cpp
#pragma GCC optimize("O3") #include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include...
ALGO
0.999877
4.426373
{ "github_metadata": { "branch": "master", "commit_count": 408, "repo_created_at": "2019-08-15T06:22: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": "bd70073e...
124160c3-8a2a-4ab6-b6cb-d408f90a9dcc
EduardoReis7/ed2
aula6/insertSort/main.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #define SIZE 100000 main () { //Inicializaçã do Vetor clock_t start, end; start = clock(); double execution_time; FILE *fUnordered, *fOrdered; int *p = (int*) malloc(SIZE * sizeof(int)); int i, j, chave, q; int c = 0; //Lei...
ALGO
0.999536
4.211168
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-04-03T19:01: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": "20cc0dce0815...
2043056d-bc42-41cc-9bf5-73e36a6f7d4c
zjhj0814/object-oriented-programming
oop2/oop2_12/oop2_12/Practice1.cpp
#include<iostream> #include<cstring> #include<string> using namespace std; //EOF 원래 콘솔창에 안 보이게 해야 하는 거 아닌가? int main() { char str[50]; cout << "Type any strings you want to convert." << endl; while (!cin.eof()) { //cin >> str; cin을 이용해서 char[] 안에 넣을 수 있겠구나! 띄어쓰기 전까지 받아옴 cin.get(str,50);//cin.get()으로 char[]에...
TOOL
0.908244
3.115842
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-04-25T07:54: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": "609c3858b4fa...
ba95ead1-91e8-47b6-97db-feae82e5b72e
Mogikan/OpenMP
ASTU.PSMP.ConcurentGeneticAlgorithm/ASTU.PSMP.ConcurentGeneticAlgorithm/BalancerAlgorithmOrganism.cpp
#include "BalancerAlgorithmOrganism.h" BalancerAlgorithmOrganism::BalancerAlgorithmOrganism(shared_ptr<TaskList> tasks,int pcCount) { this->tasks = tasks; this->pcCount = pcCount; } BalancerAlgorithmOrganism::BalancerAlgorithmOrganism(std::list<shared_ptr<PCTaskDescriptorList>> newPCList, shared_ptr<TaskList> tas...
ALGO
0.999754
4.512714
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2016-09-25T16:19: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": "14ecf602a...
0824d822-fa0b-4cd1-ac82-5350f879998e
koalaa13/ITMO-University-AaDS-labs
dfs/solves/J.cpp
#include <set> #include <iostream> #include <string> #include <vector> #include <bitset> #include <algorithm> #include <stack> #define FILE "bipartite" using namespace std; const int N = 111111; vector<vector<int>> g(N); vector<int> cols(N, -1); int timer = 0; void dfs(int v, int col = 0) { cols[v] = col; f...
ALGO
0.999983
4.523856
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-03-07T16:27: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": "210d10a22...
c7b9c5c2-b63d-4921-9188-da14d187446c
riqueGo/leetcode
cp/PointInPolygon/PointInPolygon.cpp
#include<iostream> #include<vector> using std::vector; typedef long long ld; const ld eps = 1e-9; bool eq(ld a, ld b) { return abs(a - b) <= eps; } struct pt { // ponto ld x, y; pt(ld x_ = 0, ld y_ = 0) : x(x_), y(y_) {} bool operator < (const pt p) const { if (!eq(x, p.x)) return x < p.x; if (!eq(y, p.y)) ...
ALGO
0.999976
4.432519
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2024-04-20T15:28: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": "f4d9e9a46d8...
66ecf5b7-9a81-45fe-9a25-6637e20be404
alirz-pixel/Problem_solving
baekjoon/1005 ACM Craft.cpp
/* 2021-09-30 4:20 백준 1005번 ACM Craft || 골드3 https://www.acmicpc.net/problem/1005 선배님꼐서 이 문제가 위상정렬을 이용해서 푸는 문제라 알려주셔서 위상정렬 알고리즘을 처음 검색하여 풀음. (위상정렬을 구현하는 소스코드는 참고하지 않고, 문제를 풀었음.) (위상정렬은 사이클이 존재하는 경우 사용할 수 없다.) 위상정렬이 가능한 이유 : 문제의 조건에서 '건설순서는 모든 건물이 건설 가능하도록 주어진다.' 라는 내용이 있는데 만약, 문제의 입력에서 사이클이 존재하게 될 경우 X 건물은...
ALGO
0.999949
4.909274
{ "github_metadata": { "branch": "main", "commit_count": 261, "repo_created_at": "2023-04-08T13:32: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": "7836034e21...
bf539dbd-e4ce-4328-8345-e23dae5a2210
billylin14/piiccar_software_prototype
pid_motor_control/pid_motor_control.ino
/* * Main program of the ball-balancing robot (prototype 2) * * ECE 498 ENGINE Capstone-Spring 2021 * Authors: <NAME>, <NAME> * Last update: May-27-2021 */ extern float angleX; //sensor output angle in X direction extern float angleY; //sensor output angle in Y direction // Main setup of the robot void s...
ALGO
0.935491
4.597972
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2021-03-04T01:40: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": "22929edef...
1d93fac8-e5d0-4f34-ad46-3f6982ac3228
koulritanshu/SE_COMP_2019_SEM-I_OOP
ASSIGNMENT-05.cpp
#include <iostream> using namespace std; template<class T> class Sort{ public: void selectionSort(T arr[], int n){ for(int i=0;i<n;i++){ for(int j=(i+1);j<n;j++){ if(arr[i] > arr[j]){ T temp = arr[i]; arr[i] = arr[j]; ...
ALGO
0.996757
3.929042
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-03-23T12:53: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": "815e99869490...
8e1463a1-1f91-41e9-af1b-626bba71b1a2
rayz1065/competitive-programming
olinfo/baguette/main.cpp
#include <bits/stdc++.h> #define ALF 26 #define MAXN 10000005 using namespace std; int n, k; string baguette; int memo[MAXN]; int solve_for_letter(int j) { // memo[i] = best solution for [0:i) for flavor [j] for (int i = 0; i < n; i++) { int old_i = max(i + 1 - k, 0); int sol = memo[old_i] + ...
ALGO
0.99993
3.608892
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2022-09-27T13:27: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": "fea390d642...
94b22a7f-6ac1-4c58-a74a-741bdd43c0cb
xptree/NetSMF
src/redsvd/redsvd.hpp
/* * Copyright (c) 2010 <NAME> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above Copyright * notice, this list of conditions and the foll...
ALGO
0.999092
6.920898
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-02-25T05:25:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 132, "forks": 25, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "9c8fe0...
1667c3ea-6512-4da8-95bf-72c61ea0dcb5
Msithiphong/Sorting-Contest
src/mysort.cpp
#include <iostream> #include <fstream> using namespace std; void bubble(int A[], int size); int main(int argc, char* argv[]) { ofstream fout; ifstream fin; int* a = new int[1000000]; int count = 0; fin.open(argv[1]); fout.open(argv[2], ios::out | ios::trunc); ...
TOOL
0.906961
3.959701
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-03-07T16:58: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": "27c3d050e467...
f3200519-1781-4b75-8107-cfcbf3a5d3cc
alexandraback/datacollection
solutions_1485490_0/C++/ithlony/c.cpp
#include <iostream> using namespace std; const int maxn = 110; int n, a[maxn], m, b[maxn]; long long ac[maxn], bc[maxn], ans; void dfs(int x, int y, long long g) { if (x == n + 1 || y == m + 1) { ans = max(ans, g); } else { if (a[x] == b[y]) { int xx = x, yy = y; long long t = min(ac[x], bc[y]); if (a...
ALGO
0.999982
3.555731
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef2fa432c...
ae6b1c86-c660-4986-96e8-4512eb1cbcbf
digant2482/CSES
C++/SortingAndSearching/NestedRangesCount.cpp
#include <iostream> #include <vector> #include <algorithm> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; struct Element...
ALGO
0.999879
4.46013
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2023-07-12T13:06: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": "09f75d0d92b...
800d9adf-927d-4134-92c9-fefd1e54e397
kautsiitd/Games-and-BOTS
Quoridor Game and Bot/client.cpp
#include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <netdb.h> #include <unistd.h> #include <errno.h> #include <arpa/inet.h> #include <bits/stdc++.h> #include "globals.h" /* Complete the function below to print 1 integer which will be your next move */ int N,M,K, total_time, player,opp...
ALGO
0.995539
3.1976
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2015-10-27T18:52:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "606abd552...
5a1b7d2b-1a44-44a3-9e28-32efdca00823
ttzztztz/leetcodeAlgorithms
概率期望/Luogu1297. 单选错位.cpp
#include <iostream> #include <vector> #include <algorithm> #include <limits> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <deque> #include <cstring> using namespace std; const int MAX = 1e7+5; int a[MAX]; int main() { int n, A, B, C; scanf("%d%d%d%...
ALGO
0.999757
3.770914
{ "github_metadata": { "branch": "master", "commit_count": 872, "repo_created_at": "2019-09-03T06:57:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9347cc...
cdb6942b-b0da-4dae-a691-c7c719e5327a
MinkuruDev/December2021Problems
dpBuild/main.cpp
#include <bits/stdc++.h> #define fast_io ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define fow(i,a,b) for(auto i = a; i<b; i++) #define rep(i,a,b) for(auto i = a; i<=b; i++) #define red(i,a,b) for(auto i = a; i>=b; i++) #define repa(i,a) for(auto i: a) #define db(x) cout << #x << " = " << x << endl #define el...
ALGO
0.999408
3.52863
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-05-23T09:01: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": "5b23cd7ef3...
981272a9-745e-401a-9f2e-621d2d04b33c
Arashalter/0225
lab01/main.cpp
#include <QCoreApplication> #include <QString> #include <QVector> #include <qDebug> typedef struct student//定义结构体 student,保证score,name,number在同一类下 { int score1; int score2; QString name; int number; }student; int com(const void *a, const void *b)//比较数据大小,确定排序位置 { student * aa; student * bb; ...
ALGO
0.998373
3.905607
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2018-09-15T13:15: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": "05c3466f2...
60e7f55d-9699-442e-9b34-bab552e394b1
overIsAC/contest
cf/1900/1902/f.cpp
#include <bits/stdc++.h> using namespace std; using LL = long long; using PII = pair<int, int>; #define lson (k << 1) #define rson (k << 1 | 1) #if LEMON #define db(x) \ cout << "function " << __FUNCTION__ << ", line " << __LINE__ << " : " \ << #...
ALGO
0.999984
5.537358
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2022-10-30T18:24: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": "f3d239173c...
e65f64b2-81d4-43ca-8bb5-ce0a4fff7de8
hqztrue/LeetCodeSolutions
1001-1100/1048. Longest String Chain 24ms.cpp
//IO int _IO=[](){ std::ios::sync_with_stdio(0); cin.tie(0); //cout.tie(0); return 0; }(); template<class T> struct Gethash{ size_t operator ()(const T &x)const{return x;} }; template<> size_t Gethash<int>::operator ()(const int &x)const{return x;} template<> size_t Gethash<long long>::operator ()(const long long ...
ALGO
0.999993
4.553804
{ "github_metadata": { "branch": "master", "commit_count": 292, "repo_created_at": "2019-05-13T09:30:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 390, "forks": 46, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "289ce...
ed2355b7-6e58-4469-8b7c-b87f95cc9f80
RChehowski/rotated-binary-search
main.cpp
#include <iostream> #include <cmath> #include <vector> #include <algorithm> const size_t ARRAY_LENGTH = 10; size_t g_iter_count = 0; #ifdef ENABLE_LOGGING #define LOG(fmt, ...) printf(fmt, ##__VA_ARGS__) #define LOG_VEC(vec, l, h, mid) pretty_print_vec(vec, l, h, mid); #else #define LOG(fmt, ...) #def...
ALGO
0.999867
5.219362
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-11-30T23:26: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": "2135a8afc...
b7d1d85d-98c1-4b4b-8a88-142fe8a339e2
vt-asaplab/MUSES
MUSES/Server/search_index.hpp
#pragma once #include <random> #include <types.hpp> #include <khprf.hpp> #include <ThreadPool.h> #include "pke/pke.hpp" extern int party; extern int port; extern int num_writers; extern int bloom_filter_size; extern int num_documents; extern int num_parties; extern int n_s; ...
ALGO
0.999077
5.315517
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2024-05-06T21:40:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a1380b0f9...
25b7c53f-7606-4e6a-8b7b-a84bdfd3aff2
qpwoeirut/competitive-programming
Codeforces/Contest/Div1/1383/1383d/1383d.cpp
/* * 1383d.cpp * * Created on: Jul 23, 2020 * Author: Stanley */ #include <iostream> #include <algorithm> #include <cassert> #include <queue> #include <set> #include <string> #include <vector> #include <map> #include <deque> #include <cctype> #include <climits> #include <cmath> #include <cstdlib> #include ...
ALGO
0.999992
3.162702
{ "github_metadata": { "branch": "master", "commit_count": 348, "repo_created_at": "2020-09-17T05:10:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa445be...
76e61ff6-9694-4a95-923b-67115212fcff
Hunterdii/GeeksforGeeks-POTD
January 2025 GFG SOLUTION/January-01.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> #include <unordered_map> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: vector<vector<string>> anagrams(vector<string>& arr) { unordered_map<string, vector<string>> umap; ...
ALGO
0.999792
6.369867
{ "github_metadata": { "branch": "main", "commit_count": 3732, "repo_created_at": "2024-03-09T09:48:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 202, "forks": 54, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94f4b5...
e63fd8a9-db37-4f5f-81b6-e7138b84318d
mdsiaofficial/ProblemSolving
ICPC/icpc-dhaka-23-preli-mock/BB.cpp
#include <iostream> using namespace std; pair<long long, long long> findCallerCallee(long long N, long long P, long long K) { if (K == 0) { return {N, -1}; } if (N < P) { if (K == 1) { return {N, -1}; } else { return {N, -1}; } } lon...
ALGO
0.999671
5.134521
{ "github_metadata": { "branch": "master", "commit_count": 1863, "repo_created_at": "2022-06-28T02:10:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c7ab28...
e50e0cfc-f24e-4b35-a796-e9c093de939d
Rishoven-jasuja/DSA-practice
17search_in_rotated_arr.cpp
// this method is used to search an element in a rotated sorted array. // it has time compexity of O(log n) and space complexity of O(1). // The array is rotated at some pivot, and we need to find the target element. #include<iostream> using namespace std; int main(){ int arr[]={7,8,9,10,0,1,2,3,4,5}; int n=si...
ALGO
0.99998
5.296005
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-06-21T13:18:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3a59fe00a8...
c8158ab7-3ee3-4914-a921-e3c5a005a0f8
davor0809/multiMUMs
programs/streamMultiMUM.cpp
#include <sdsl/suffix_trees.hpp> #include <iostream> #include <string> #include <vector> #include <deque> #include <algorithm> #include "streamMultiMUM.hpp" using namespace sdsl; using namespace std; using namespace stream; using namespace std::chrono; using timer = std::chrono::high_resolution_clock; /* cst-functio...
ALGO
0.998668
5.345338
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-12-12T11:42:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8314d29aa0a5...
cac0b287-4bc2-4387-8f04-dbb36bb71846
onenewarm/codetree-TILs
240224/주사위 던지기/roll-a-dice.cpp
#include <iostream> using namespace std; int n,m; int y,x; int matrix[101][101]; int dy[4] = {-1, 1, 0, 0}; int dx[4] = {0, 0, -1 , 1}; int u = 1, f = 2, r = 3; int main() { // 여기에 코드를 작성해주세요. cin >> n >> m >> y >> x; char dir; matrix[y][x] = 6; while(m--) { cin >> dir; ...
ALGO
0.999633
4.023375
{ "github_metadata": { "branch": "main", "commit_count": 494, "repo_created_at": "2023-12-13T03:27: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": "392d247098...
ae86cbe6-65c2-45a2-97ba-f30e563b0f13
Dhanushiya123-ece/c-class
matrices.cpp
#include <iostream> using namespace std; int main(){ int rowsA=0,colsA=0,rowsB=0,colsB=0; cout<<"Enter the number of rows and columns in matrix A: "<<endl; cin>>rowsA>>colsA; cout<<"Enter the number of rows and columns in matrix B: "<<endl; cin>>rowsB>>colsB; if (colsA != rowsB){ cout<<...
ALGO
0.995264
4.036183
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-05-22T10:30:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a87c57ed5ce...
8cd397f0-4740-4e85-9d60-2689ebde59f8
tonykoval/GeneratorOrbitMatrices_C
isomorphism.cpp
#include <vector> #include <iostream> #include "isomorphism.hpp" using namespace std; vector<vector<int>> fix_col_permutation(vector<int> row, vector<vector<int>> indexes) { vector<vector<int>> tmpMatrix; for (int i=0; i<indexes.size(); i++) { vector<int> list1; vector<int> list2; for...
ALGO
0.999937
4.711343
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2015-10-04T14:26: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": "c4eb9fc20...
9d24def8-5d1f-4441-af39-1d5ce24873fd
Vilas51/Cses-Problems
Search N Sort/Movie_festival.cpp
// #include <bits/stdc++.h> // using namespace std; // #define ll long long // #define ld long double // #define upd upper_bound // #define lpd lower_bound // #define pb push_back // #define endl "\n" // #define f(i,a,b) for(ll i = a;i<=b;i++) // #define ff(i,a,b) for(ll i=a ;i>=b;i--) // #define mod 1000000007 // voi...
ALGO
0.999991
5.001098
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-06-16T08:47: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": "a76ec615d13...
e0f800f8-a2c7-4e80-8570-7a51ac7d07a9
CGAL/cgal
Interpolation/examples/Interpolation/sibson_interpolation_2.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Delaunay_triangulation_2.h> #include <CGAL/natural_neighbor_coordinates_2.h> #include <CGAL/Interpolation_gradient_fitting_traits_2.h> #include <CGAL/sibson_gradient_fitting.h> #include <CGAL/interpolation_functions.h> #include <iostream> ...
ALGO
0.992659
5.607718
{ "github_metadata": { "branch": "master", "commit_count": 113659, "repo_created_at": "2014-10-01T12:22:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5443, "forks": 1475, "issues": 511, "pull_requests": 136 }, "file_meta": { "content_id...
a3092042-766c-447c-ad1f-4a6d553a13f8
sendoru/ps-cpp-new
source/atcoder/abc383_f.cpp
// #include "atcoder/all" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const ll MOD9 = 998244353; const ll MOD1 = (ll)1e9 + 7; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(null...
ALGO
0.99964
5.431919
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2024-04-17T08:42: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": "da58e9cca9...
8b92cfbf-56a2-4701-b5c7-94f11c8c3508
GuoYL36/algorithm
leetcode121_买卖股票的最佳时机.cpp
#include<vector> #include<iostream> #include<string> using namespace std; // // 给定一个数组 prices ,它的第 i 个元素 prices[i] 表示一支给定股票第 i 天的价格。 // 你只能选择 某一天 买入这只股票,并选择在 未来的某一个不同的日子 卖出该股票。设计一个算法来计算你所能获取的最大利润。 // 返回你可以从这笔交易中获取的最大利润。如果你不能获取任何利润,返回 0 。 // 输入:[7,1,5,3,6,4] // 输出:5 // 解释:在第 2 天(股票价格 = 1)的时候买入,在第 5 天(股票价格 = 6)的时候卖出,最大...
ALGO
0.999589
5.09592
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2017-05-04T12:03: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": "ea985da35...
59d6629c-a95c-4bd7-a56b-bba9c3eeb30e
HuXiaoling/TopoLoss
Code/cPers/blitz/vecwhere.h
// -*- C++ -*- /*************************************************************************** * blitz/vecwhere.h where(X,Y,Z) function for vectors * * $Id: vecwhere.h,v 1.5 2005/05/07 04:17:56 julianc Exp $ * * Copyright (C) 1997-2001 <NAME> <<EMAIL>> * * This program is free software; you can redistribute it...
TOOL
0.970068
6.505863
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2019-10-21T04:24:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 168, "forks": 25, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "fda13...
7a51482c-9671-41fd-bfb2-6af364e24826
tangjz/acm-icpc
poj/1845.cpp
#include <cstdio> const int mod = 9901; int pow(int x, long long k) { int ret = 1; while(k) { if(k & 1) ret = ret * x % mod; x = x * x % mod; k >>= 1; } return ret; } int sum(int x, long long k) { if(!k) return 1; int ret = sum(x, k - 1 >> 1) * (1 + pow(x, (k >> 1) + 1)) % mod; if(!(k & 1)) { ret ...
ALGO
0.999987
4.599079
{ "github_metadata": { "branch": "master", "commit_count": 293, "repo_created_at": "2013-10-06T18:57:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 45, "forks": 13, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "7f6573...
0b79f6bd-53a2-466c-b583-d5ec677242cd
balajipachai/curiosity
leetcode/arrays-101/sortArraysByParity.cpp
/* Given an integer array nums, move all the even integers at the beginning of the array followed by all the odd integers. Return any array that satisfies this condition. Example 1: Input: nums = [3,1,2,4] Output: [2,4,3,1] Explanation: The outputs [4,2,3,1], [2,4,1,3], and [4,2,1,3] would also be accepted. Exampl...
ALGO
0.999995
6.308867
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2023-03-24T10:15: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": "aaebaa0b6b...
7e2a2fc1-773b-4be3-a0bb-dbf04d7f1274
BillyLjm/LeetCode-Problems
0075-Sort_Colors.cpp
/******************************************************************************* * 0075-Sort_Colors.cpp * Billy.Ljm * 12 June 2024 * * ======= * Problem * ======= * https://leetcode.com/problems/sort-colors/ * * Given an array nums with n objects colored red, white, or blue, sort them * in-place so that obje...
ALGO
0.999954
6.457489
{ "github_metadata": { "branch": "master", "commit_count": 237, "repo_created_at": "2023-02-26T14:11:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f63d519...
b2f4cb85-8720-4049-987e-998ac0d61b2c
tflovorn/anomtrans
include/anomtrans/fermi_surface.h
#ifndef ANOMTRANS_FERMI_SURFACE_H #define ANOMTRANS_FERMI_SURFACE_H #include <cmath> #include <limits> #include <exception> #include <vector> #include <boost/container/vector.hpp> #include <petscksp.h> #include "util/constants.h" #include "observables/energy.h" namespace anomtrans { /** @brief Compute a reasonable t...
ALGO
0.987655
7.094957
{ "github_metadata": { "branch": "master", "commit_count": 244, "repo_created_at": "2018-02-28T17:04:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "e1b0fac...
fdac0aed-2294-45ed-bd68-5f41986304a7
GustavoHenriqueMuller/ray-chess
src/pieces/King.cpp
#include "King.h" std::vector<Move> King::GetPossibleMoves(const Board &board) { std::vector<Position> possiblePositions = { // Up. {position.i - 1, position.j}, // Down. {position.i + 1, position.j}, // Right. {position.i, position.j + 1}, ...
ALGO
0.90447
6.150962
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2023-05-03T14:19:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86fef259175...
cc787a9b-11bd-4a44-80d3-7080784b8ee2
guyihan-zb/74bite
20201122/猜名次.cpp
#include<stdio.h> int checkData1(int* p) { int tmp[7] = { 0 }; int i; for (i = 0; i < 5; i++) { if (tmp[p[i]]) { return 0; } tmp[p[i]] = 1; } return 1; } int checkData(int* p) { char tmp = 0; int i; for (i = 0; i < 5; i++) { tmp |= 1 << p[i]; } return tmp == 0x3E; } void swapArgs(int* a, int* b...
ALGO
0.999975
3.32157
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-11-03T14:05:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4a322453d...
c6827a5b-6b2c-4e54-8e61-3031ae623140
naresh2002/Leetcode-Practice
0139-word-break/0139-word-break.cpp
class Solution { public: struct TrieNode { TrieNode* child[26]; bool wordEnd; TrieNode() { wordEnd = false; for (int i = 0; i < 26; i++) { child[i] = NULL; } } }; void insertTrie(TrieNode* node, string s) { ...
ALGO
0.999597
5.848702
{ "github_metadata": { "branch": "main", "commit_count": 1389, "repo_created_at": "2022-01-03T13:51: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": "7666fdf68...
32a15ee5-aa53-4a90-afac-8ab606167f4c
P79N6A/Codes-1
OJ-CQU/Training Contest For CCCC (No.9)/Inna and Dima.cpp
#include<algorithm> #include<cctype> #include<cmath> #include<cstdio> #include<cstring> #include<iomanip> #include<iostream> #include<map> #include<queue> #include<set> #include<sstream> #include<stack> #include<string> #define ll long long #define pr(x) cout << #x << " = " << (x) << '\n'; using namespace std; const i...
ALGO
0.999945
3.383087
{ "github_metadata": { "branch": "master", "commit_count": 232, "repo_created_at": "2019-04-23T01:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5e024b8...
53c384c8-8374-4e0d-ba21-88d23346500c
markdellostritto/AtomNN
src/struc/cell.cpp
// c++ libraries #include <iostream> // ann - math #include "src/math/const.hpp" #include "src/math/special.hpp" #include "src/math/eigen.hpp" // ann - cell #include "src/struc/cell.hpp" //==== operators ==== std::ostream& operator<<(std::ostream& out, const Cell& cell){ out<<"V = "<<cell.vol_<<"\n"; //out<<"R = \n...
ALGO
0.941553
5.743464
{ "github_metadata": { "branch": "main", "commit_count": 118, "repo_created_at": "2021-11-30T15:53:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a213cd3f01...
29f3d8ee-f817-465f-a5a1-e27bb6e98054
zjin-lcf/HeCBench
src/tonemapping-sycl/kernels.cpp
/********************************************************************** Copyright ©2013 Advanced Micro Devices, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: • Redistributions of source co...
ALGO
0.986737
6.198668
{ "github_metadata": { "branch": "master", "commit_count": 4592, "repo_created_at": "2020-08-06T17:44:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 248, "forks": 89, "issues": 1, "pull_requests": 3 }, "file_meta": { "content_id": "15d4...
a21b7d91-618f-46f1-bead-d4a9fe05c11e
wsyunine/ACM
2025/001/CF2056/D_.cpp
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <mutex> #include <queue> #include <set> #include <stack> #include <thread> #include <vector> #include<unorder...
ALGO
0.999792
3.883808
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2025-01-13T06:58:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08e266a96...
b830a1e5-fdaa-4b55-9739-271e47dd3efe
simplybrix/C-plus-plus
Scott_Brianna_Prog4.cpp
/* Author: <NAME> Purpose: Write a function that accepts an array and the size of the array as parameters, prompts the user to enter 10 values one by one, stores each input values in the array, prints each of the values in the array that is a multiple of 5 and how many values are a multiple, finds the smallest value i...
ALGO
0.999082
4.948543
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-11-29T05:38:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75a01d8047...
92f6d42a-caa3-47ae-acb8-d36026072a15
shreyanshg2010/Competitive_Programming
Bracket Sequence.CPP
A bracket sequence is called regular, if by inserting '+' and '1' into it we can get a correct mathematical expression. For example, sequences '(())()', '()' and '(()(()))' are regular, while ')(', '(()' and '(()))(' are not. Since, ((1+(1+1))+(1+1)) is a valid mathematical expression hence, '((())())' is valid sequen...
ALGO
0.999908
4.493122
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2018-12-04T18:26:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "813847f...
c53ffb20-5575-407d-b3de-18f120cc529a
callmehai/Advanced-Problems
LichaoTree_Leaves.cpp
#include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #incl...
ALGO
0.999896
3.283912
{ "github_metadata": { "branch": "main", "commit_count": 117, "repo_created_at": "2023-09-08T08:29: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": "dfdc37e9c7...
8ca89661-afea-4adb-9736-9217f5c251cc
jamipouchi/FP-practice
368-largestDivisibleSubset/largestDivisibleSubset.cpp
#include <vector> #include <unordered_map> #include <unordered_set> #include <algorithm> #include <iostream> class Solution { private: std::unordered_set<int> factors(int x) { std::unordered_set<int> result; for (int i = 2; i <= x / 2; i++) { if (x % i == 0) { ...
ALGO
0.999958
5.497017
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2023-01-01T11:01: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": "1448ba59...
3ac36d24-f011-4253-bb32-804cbc463a28
sophiacarlone/CS447
hw2/hw2.cpp
#include<iostream> #include <fstream> #include<vector> using namespace std; int main(){ double pxx; // prob of staying on x if x was last thrown double pxy; // prob changing to y if x was last thrown double pyy; // prob staying y if y was last thrown double pyx; // prob changing to x if y was last ...
ALGO
0.998929
3.787205
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2023-09-04T19:06:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "671c5e26a...
de67a891-6c08-4808-bebe-1a1b861ad487
ziglang/zig
lib/libcxx/include/__algorithm/sample.h
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
ALGO
0.984344
7.453101
{ "github_metadata": { "branch": "master", "commit_count": 34092, "repo_created_at": "2015-08-06T00:51:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 40012, "forks": 2915, "issues": 3389, "pull_requests": 267 }, "file_meta": { "content_i...
40b1513d-16a0-43b5-aec3-1b4864ea27a9
ydb-platform/ydb
ydb/core/formats/arrow/program/functions.cpp
#include "functions.h" #include <contrib/libs/apache/arrow/cpp/src/arrow/compute/api.h> #include <contrib/libs/apache/arrow/cpp/src/arrow/compute/kernels/aggregate_basic_internal.h> #include <contrib/libs/apache/arrow/cpp/src/arrow/compute/kernels/codegen_internal.h> #include <contrib/libs/apache/arrow/cpp/src/arrow/c...
TOOL
0.985727
6.901107
{ "github_metadata": { "branch": "main", "commit_count": 35208, "repo_created_at": "2022-02-07T14:52:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4512, "forks": 701, "issues": 2263, "pull_requests": 682 }, "file_meta": { "content_id": ...
e8fc3727-ef41-4a67-b2ba-e2e103d88276
Saimouli7424/Data-Structures-Algorithms-Learning-Journey
leetcodequestions/1462.CPP
//Course Schedule IV(Medium) //using Floyd-Warshall algorithm #include <iostream> #include <vector> #include <climits> using namespace std; class Solution { public: vector<bool> checkIfPrerequisite(int numCourses, vector<vector<int>>& prerequisites, vector<vector<int>>& queries) { vector<bool> result; ...
ALGO
0.999742
6.274762
{ "github_metadata": { "branch": "main", "commit_count": 289, "repo_created_at": "2025-02-01T13:21:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62bc025917...
a746f5e1-c32d-41dc-b90b-63e717334758
KimWoongwon/2A_TOTAL
심화학기/chap6_map/chap6_map/02.cpp
#include <iostream> #include <map> using namespace std; void main() { map<int, int, less<int>> m; pair<map<int, int>::iterator, bool> pr; m.insert(pair<int, int>(5, 100)); // 임시객체를 활용해 저장하는 방법 m.insert(pair<int, int>(3, 100)); m.insert(pair<int, int>(8, 30)); m.insert(pair<int, int>(4, 40)); m.insert(pair<int, ...
ALGO
0.993919
4.342345
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-07-01T11:01: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": "be8a8bf5c...
60ae254f-64bf-402d-b2f3-406d5ee252d5
libgdx/libgdx
extensions/gdx-bullet/jni/src/bullet/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 <NAME> http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is ...
ALGO
0.999574
6.155369
{ "github_metadata": { "branch": "master", "commit_count": 15526, "repo_created_at": "2012-08-10T19:34:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 24195, "forks": 6492, "issues": 240, "pull_requests": 81 }, "file_meta": { "content_id"...
10577f5f-71d4-42e6-acf4-2d39d54c56aa
ni9999/my_works_till_2022
problems(dsa)/lastwordlen.cpp
#include <iostream> using namespace std; // the idea is start counting starting from every space. we will get wordlength + 1 number this way int solve(string A) { int i = 0; int word = 0; int x = 1; // for the first element we won't get any space to count while (A[i] != '\0') { if (A[i] == ...
ALGO
0.998894
3.873793
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-06-01T16:27: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": "a7965ed502e4...