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
1dd427fd-9740-4ebf-9800-f6e0ebe9a401
intel/llvm
sycl/test-e2e/Matrix/Inputs/joint_matrix_prefetch_impl.hpp
//===---joint_matrix_prefetch_impl.hpp - DPC++ joint_matrix----------------===// // // 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.910968
6.087322
{ "github_metadata": { "branch": "sycl", "commit_count": 568881, "repo_created_at": "2019-01-16T09:05:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1355, "forks": 794, "issues": 640, "pull_requests": 241 }, "file_meta": { "content_id": ...
d1048525-cf7a-4eb1-b6a9-3815c1c78d1d
loyno-cosc-a211-201901/cosc-a211-term-project-Manseung
Woo_FinalProject.cpp
//Program Name: Hangman //Purpose: Study simple words through game. //Description : An user will see a words unseen. The user should find out what the words is in 8 trials. //Author: <NAME> //Date Last Modified: December 9th, 2019 #include <iostream> #include <cstdlib> #include <ctime> using namespace std; // Constan...
TOOL
0.967469
3.376133
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-12-09T23:03:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e59ed1ec8e...
6a373267-5a9e-457b-872f-1df3e313fa4d
MojoisMojo/DSA
_LeetCode/368/c.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: bool check(int X, int m) { return (X / m) * (m + 1) >= X; } int calNum(int X, int m) { return (X + m) / (m + 1); } int minGroupsForValidAssignment(vector<int> &nums) { unordered_map<int, int> numbersOfNu...
ALGO
0.999982
5.02584
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2023-09-17T08:11: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": "2a2a2383...
3922b36d-9fe1-4cde-bb00-7b7872262043
AndrewEppich/Personal-Portfolio
School Projects/CPSC 350/Student Faculty Database/bst.h
#include <iostream> #include <cmath> #include <string> using namespace std; template <class T> class TreeNode { public: TreeNode(); TreeNode(T k); virtual ~TreeNode(); T key; // data TreeNode<T> *left; TreeNode<T> *right; TreeNode<T> *parent; int leftDepth; int rightDepth; int...
ALGO
0.999275
3.325395
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2024-07-31T20:12:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18a6bc63e60...
c52d8793-b5cf-4174-8564-2a0449c02254
oda251/Atcoder_archive
ABCxxx/ABC396/D.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < n; ++i) auto boostIO = []() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); return 0; }(); /*####################################################*/ auto input = []() { retur...
ALGO
0.99991
4.766464
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-05-17T16:13: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": "be6834ddf69...
d147d818-64cd-4a38-ad2c-5a3bfc77ce9d
vallesda/Technical-Interview-2018
LeetCodev2/surrondedRegions.cpp
class Solution { public: bool isValid (vector<vector<char>>& board, int row, int col) { if (row < 0 || row >= board.size() || col < 0 || col >= board[0].size()) return true; return false; } void dfs (vector<vector<char>>& board, int row, int col) { if (isValid(board, row, col) |...
ALGO
0.999796
6.111444
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2018-03-03T17:58: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": "8998e6a5...
28ba2f11-bcfc-44d8-9ca0-71e419d91778
Kryptexas/UE4-GameWorks-4.19.2
Engine/Plugins/Experimental/ProxyLODPlugin/Source/ThirdParty/DirectXMeshCode/Utilities/WaveFrontReader.h
//-------------------------------------------------------------------------------------- // File: WaveFrontReader.h // // Code for loading basic mesh data from a WaveFront OBJ file // // http://en.wikipedia.org/wiki/Wavefront_.obj_file // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF // ANY KIND,...
TOOL
0.95788
6.7201
{ "github_metadata": { "branch": "master", "commit_count": 61513, "repo_created_at": "2018-06-20T23:53:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 69, "forks": 69, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "23f8...
d605fe53-95f7-488a-8139-6e0412625f10
lichenk/AlgorithmContest
codeforces/756/A/A.cc
#include <bits/stdc++.h> #include <assert.h> using namespace std; typedef long long ll; typedef long double ld; #define PB push_back #define MP make_pair #define MOD 1000000007LL #define endl "\n" const ll UNDEF = -1; const ll INF=1e18; template<typename T> inline bool chkmax(T &aa, T bb) { return aa < bb ? aa = bb, tr...
ALGO
0.999936
3.573662
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-07-29T03:21: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": "cc56f9e90...
867b1c19-53c2-407b-82df-82b354a09150
theodorekwok/codepractices
Div 3 R697/problem_D/D.cpp
#include <bits/stdc++.h> #define ll long long ll c_one[1000000] = {0}; ll c_two[1000000] = {0}; using namespace std; int bs(ll c[], int start, int end, ll diff) { int size = end - start; end--; while (start <= end) { int middle = (start + end)/2; if (c[middle] == diff) { ...
ALGO
0.999973
3.775574
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-03-12T14:24: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": "1ff2e168a05d...
6feffa91-6254-400d-992a-2aa73caa38d1
BogdanAriton/starter_kit_cpp
multi-tasking/problems/matrix-multiply.cpp
/* Multiply to matrices and making use of parallelism. A 4x2 matrix x 2x3 matrix will produce a 4x3 matrix - because the number of columns in the first matrix is the same as the number of rows in the second matrix | 1 2 | A= | 4 5 | | 3 6 | B = | 5 8 3 | | 9 1 6 | C i,j = a i,0 * b 0,j + a i,1 * b1,j */...
ALGO
0.999552
5.782498
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2021-06-15T14:32:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d75f70ebc...
33685c6b-abfa-4fc1-bcf2-93ae692855ad
artloko/BSU
computer-architecture/MPI/MPI_3/Program.cpp
#include <mpi.h> #include <iostream> #include <fstream> #include <cctype> #include "Process.h" class Program { public: static void Main() { auto process = MPI::Process(); std::ifstream(fin); std::ofstream(fout); fin.open("task3_input.txt"); fout.open("task3_output.txt"); int* data = nullptr; int* r...
ALGO
0.996686
4.000883
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2018-12-02T14:50: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": "a78fcec9d...
90d31a59-583e-4fc6-8395-729e0189633f
DarkySparkyx/Academic-Projects
2 SEMESTER/Alghoritms and Data Structures/PROJECTS/GRAPHS_PROJ3/Graph.cpp
#include <iostream> #include "Graph.h" #include <algorithm> using namespace std; void setTableToZero(int* table,int size) { for(int i=0; i<size; i++) { table[i]=0; } } Graph::Graph() { numberOfComponents=0; numberOfVertexes=0; liczbaKrawedzi=0; lastChecked=0; maxDegree=0; ...
ALGO
0.999944
3.713937
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-03-20T12:31: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": "c30ec23a38c...
94bae897-decc-4229-9cde-c4f38f761109
cpmech/tensors
examples/ex09.cpp
/************************************************************************************* * Tensors - A C++ library to work with tensors * * Copyright (C) 2004 <NAME> <<EMAIL>> * * * * This file...
ALGO
0.922486
4.871556
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-02-28T04:39:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d05de3dda...
cb84c74f-0cc2-4d2c-a0b3-1c7e8256d2b9
ishandutta2007/codeforces-w
wasa855/normal/1354/G.cpp
#include<bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define Fast_IO ios::sync_with_stdio(false) mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); #define DEBUG fprintf(stderr,"Running on Line %d in Function %s\n",__LINE__,__FUNCTION__) #define fir first #define sec ...
ALGO
0.999251
3.4199
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2070ecff63c4...
2fdb8f76-50cf-4737-9be4-8830fae5f0ff
TannerPlumbABK/LUUCourseWork
03_01_Algorithms/03_01_Algorithms.cpp
// Functions with more comments in them are the ones that I didn't grasp // as easily. The comments should help me navigate what's happening better. /* Big O Notation O(1) = takes exactly the same amount of time to run no matter how big the array is O(n) = increases in time required linearly based on how big the array...
ALGO
0.999293
3.693216
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2022-07-19T23:48: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": "d69252595ed...
7bf405d5-b17b-4bad-8068-8bd3a444c6b0
ichunshenjun/Data-Structures-and-Algorithm
src/codefun2000/HW/20220923/2022092301.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> using namespace std; vector<int> postorder; vector<int> order(vector<int>& nums); int traverse(vector<vector<int>>& graph, int s); int main() { int n; cin >> n; vector<int> nums(n); for (int i = 0; i < n; i++) cin >> nums[i]; ...
ALGO
0.999991
4.568951
{ "github_metadata": { "branch": "master", "commit_count": 148, "repo_created_at": "2023-09-19T01:06:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "233bb08d...
8b78203c-f281-4f37-9571-7617e232c882
raven91/spc2_langevin_integration
Steppers/StochasticRungeKuttaStepper.hpp
// // Created by <NAME> on 2019-02-01. // #ifndef SPC2ODEINTEGRATION_STOCHASTICRUNGEKUTTASTEPPER_HPP #define SPC2ODEINTEGRATION_STOCHASTICRUNGEKUTTASTEPPER_HPP #include "../Definitions.hpp" #include "../DynamicalSystems/ChimeraSystem.hpp" #include "../Parallelization/Thread.hpp" #include <cmath> #include <algorithm>...
ALGO
0.99889
6.285388
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-03-22T12:10:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dff129603e...
e0ae3298-cb4a-4ee6-a313-464f7d2b8758
ARM-software/ComputeLibrary
src/core/NEON/kernels/arm_conv/depthwise/kernels/sme2_fp32_nhwc_3x3_s1_output4x4_mla_depthfirst/generic_direct.cpp
/* * Copyright (c) 2022-2024 Arm Limited. * * SPDX-License-Identifier: MIT * * 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 * ri...
ALGO
0.994964
6.016743
{ "github_metadata": { "branch": "main", "commit_count": 4770, "repo_created_at": "2017-03-10T14:51:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3008, "forks": 795, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "89973...
fecab45e-8c87-43f6-85b2-291274a0e1d9
philleer/coding
leetcode/067_addBinary.cc
/****************************************************************************** * The source is part of my coding practice, a lightweight C++ solution for * leetcode program practice. * * For all of my code, after check it online by submit, I also compile and run * it by my offline machine * =====================...
TEST
0.99615
5.328675
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2019-04-13T14:52:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "0ccd6cb4b...
0f2746ae-e27a-44d3-88ea-7db816c87361
Kostebelova-Elizaveta/CodeRunnerTasks_practice
alg-teachers-support-sorting/2 var/2_task.cpp
#include <iostream> #include <vector> #include <map> using namespace std; void countSort(vector<int> &input) { // создаем пустую карту для хранения частот элементов массива map<int, int> freq; // сохраняем различные значения во входном массиве как ключ и // их соответствующие счетчики как значения ...
ALGO
0.999992
5.009923
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-09-01T14: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": "e9cfbd2290a4...
a80be0aa-003d-4023-95e2-2ae140092184
chetan7020/CP
graph & general tree/cses/Labyrinth.cpp
/* Build | ..... | Peace cpy mat kar bc */ #include<bits/stdc++.h> //----------------------- MACRO START --------------------------- #define endl "\n" #define pb push_back #define ff first #define ss second #define int long long #define fore(i, a, b) for(int i = (a); i < (b); i++) #define fori(i, a, b) for(int ...
ALGO
0.99995
4.311647
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2023-08-13T03:05:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0cd8be2cb85...
c274ae11-8542-4c83-8d32-b1063f2920e7
GazPrash/AdventOfCode2023
day3_part2.cpp
#include<bits/stdc++.h> #include<algorithm> using namespace std; bool isnumber(char ch){ if (ch >= 48 && ch <= 57) return true; return false; } bool isSpecial(const char ch) { if ((ch>=48 && ch<=57)|| (ch>=65 && ch<=90)|| (ch>=97 && ch<=122) || ch == '\n' || int(ch) == 0){ return false; } retu...
ALGO
0.999642
4.562016
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-08T09:01: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": "644d6f8accf8...
a666ec9c-1911-4289-893b-808456deb0ad
utec-poo/tarea-semana-1-3-JuanTorres7
ejercicio5/main.cpp
#include <iostream> using namespace std; int main (){ int cant, pares = 0, impares = 0; for (int i;; i++){ int num; cout << "Ingrese numero " << i+1 << ":\n"; cin >> num; cant = i; if (num % 2 == 0){ pares++; } else if (num % 2 != 0){ ...
ALGO
0.999128
3.699766
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-09-13T20:40:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6953cabd84...
54e1c7cc-4468-4fd8-9c05-01439a4fa7cb
jvleta/rec
src/distributions.cpp
#include "misc.h" #include <math.h> double exponential_pdf(double lambda, double x) { return lambda * exp(-lambda * x); } double exponential_cdf(double lambda, double x) { return 1.0 - exp(-lambda * x); } double exponential_cdf_inverse(double lambda, double p) { return (-1.0 / lambda) * log(1.0 - p); } double...
ALGO
0.998878
5.161873
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2017-11-12T22:50:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "6e238cbe2...
78cd58b0-161a-4fb3-9b94-270b7296297e
Renee967/Garage-Stacks-
stack.h
#ifndef STACK_H #define STACK_H #include <cstdlib> using namespace std; template<class StackType> class Stack { public: Stack(int MaxStackSize = 10); ~Stack() { delete[] stack; } bool isEmpty(); bool isFull(); StackType Top()const; void push(StackType x); StackType pop(); bool Search(StackType x); private...
TOOL
0.915957
3.488099
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-07-22T21:11:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1938775cbdf...
d8c701c5-a26f-4538-a9f8-fe654cf019d2
a3828162/LeetCode
0234.PalindromeLinkedList.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: bool isPalindrome(Lis...
ALGO
0.999761
6.224422
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2021-10-25T13:15: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": "8af150a6e29...
95a47c65-9ddb-4d96-b00b-5ecd89390e83
Kirinosama/code
bzoj2124/ac.cpp
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #define N 10010 #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define p 3 #define mod 1000000007 using namespace std; typedef long long ll; ll Hash[N<<2],Hash2[N<<2]; ll pow[N]; int a[N]; int n,t; void pushup(int rt,int m) { ll t...
ALGO
0.999913
3.377115
{ "github_metadata": { "branch": "master", "commit_count": 173, "repo_created_at": "2017-12-22T08:52: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": "32de6725...
d2a6dfc0-2bbb-4f84-badc-3a9569d95e95
ivayloknchv/Polynomial-Calculator
polynomialFuncs.h
#pragma once #include "rationalNumFuncs.h" #include <vector> typedef std::vector<std::pair<int, int>> Polynomial; typedef std::vector<std::vector<std::pair<int, int>>> Grid; size_t getLeadingZerosCount(const Polynomial& poly); void removeLeadingZeros(Polynomial& poly); void setAllCoeffsToZero(Polynomial& poly); P...
ALGO
0.993624
4.52462
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-09-25T14:18:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47b7cdfe2229...
3597e51a-f490-49a2-bf50-71966d0a93f0
Chanwoongs/Algorithm_Studies
SelfSoving/Debuging/Debuging/10026_적록색약.cpp
#include <iostream> using namespace std; const int dy[] = { 1, 0, -1, 0 }; const int dx[] = { 0, 1, 0, -1 }; int n, visited1[104][104], visited2[104][104], res1, res2; char map[104][104]; void DFS1(int y, int x, char col) { visited1[y][x] = 1; for (int i = 0; i < 4; i++) { int ny = y + dy[i]; ...
ALGO
0.999728
4.057182
{ "github_metadata": { "branch": "main", "commit_count": 529, "repo_created_at": "2023-01-03T13:30: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": "25e02967f3...
ef20606f-18ae-4caa-b0c6-b34e5c7aeee4
jingli-jenny/demo
thirdparty/faiss/utils/substructure-inl.h
// Copyright (C) 2019-2020 Zilliz. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
TOOL
0.905852
6.006979
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-01-10T08:49:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b479117e00a5d...
b698d89e-5e72-4a49-b4f8-b273176a566f
04github/gpurouter
mazeRouter.cpp
#include "mazeRouter.h" const int turnCost = 50; struct Node { int d, x, y, dist; Node(int d, int x, int y, int dist) : d(d), x(x), y(y), dist(dist) {} bool operator < (const Node &rhs) const { return dist > rhs.dist; } }; pair<int, int> MazeRouter::Route(const vector<vector<int>> &cost, cons...
ALGO
0.999952
4.868805
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-04-12T06:37:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "927a6ae4dbb4...
653896bc-2a90-4804-b8e5-1923cbf557e1
minyoung529/AlgorithmStudy
자료구조 교과과목 연습파일/Organic_Cabbage.cpp
#include<iostream> using namespace std; int dx[4] = { -1,0,1,0 }; int dy[4] = { 0,1,0,-1 }; int width, height, cnt, answer = 0; int field[51][51]; bool visited[51][51] = { false, }; void DFS(int y, int x); int main() { int testCnt; cin >> testCnt; while (testCnt--) { // 초기화 fill_n(field[0], 51 * 51, 0); ...
ALGO
0.999708
4.459064
{ "github_metadata": { "branch": "main", "commit_count": 559, "repo_created_at": "2022-07-07T15:39:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "59387e349a...
90d254c5-3484-40c9-a4b6-748c64abf47a
Ra1nWarden/Online-Judges
UVa/1455.cpp
#include <cstdio> #include <algorithm> #include <cstring> #include <set> #define LEFT(x) (x<<1) #define RIGHT(x) (x<<1)|1 #define MID(x, y) ((x+y)>>1) using namespace std; const int maxn = 100000; typedef pair<int, int> Point; Point points[maxn+5]; int n; const int maxl = 30; char buffer[maxl]; int fa[maxn+5]; int cn...
ALGO
0.999467
3.699914
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2014-04-02T05:35:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 38, "pull_requests": 0 }, "file_meta": { "content_id": "e904827...
b400cb08-194b-499c-a0a8-a8b2d31c7634
Amritapandey22/Daily-codes
Minimum sum partition - GFG/minimum-sum-partition.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: int minDifference(int arr[], int n) { // Your code goes here int sum=0; for(int i=0;i<n;i++)sum+=arr[i]; vector<vector<bool>>dp(n+1,vector<bool>(sum+1,false)); for(i...
ALGO
0.999634
5.434801
{ "github_metadata": { "branch": "main", "commit_count": 644, "repo_created_at": "2020-12-17T15:56:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dc064ef1b...
58471cb3-e4c8-4a3c-80e8-ad29eb290419
Md-Noman-Biswas/Codeforces_problems
D_Number_into_Sequence.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define nl "\n" #define YES cout << "YES\n" #define NO cout << "NO\n" #define pb push_back #define llmx LONG_LONG_MAX #define llmn LONG_LONG_MIN #define mod 1000000007 const int N = 1e5 + 7; const int INF = 1e9 + 10; void solve(){ ll n; cin >> n...
ALGO
0.9999
4.368008
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-07-24T09:21: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": "15345513d6e...
6b5217f3-18b9-47c5-b1cc-bcb866197d18
setesami/CTPPS
RecoTracker/TkNavigation/src/SimpleNavigableLayer.cc
#include "RecoTracker/TkNavigation/interface/SimpleNavigableLayer.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "DataFormats/GeometrySurface/interface/BoundCylinder.h" #include "DataFormats/GeometrySurface/interface/BoundDisk.h" #include "TrackingTools/PatternTools/interface/TransverseImpactPo...
ALGO
0.985393
3.928121
{ "github_metadata": { "branch": "CMSSW_4_1_X", "commit_count": 98972, "repo_created_at": "2016-09-22T13:13:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1...
937b0c5b-67b9-446c-b006-118afa692575
Funnel-web03/fuzz
Tut32.cpp
#include <iostream> using namespace std; class Bankdp { int years; float amount,rate,rtamt=0; public: Bankdp(); Bankdp(float,int,int); Bankdp(float,int,float); void setdata(); void show(); void calculate(); }; Bankdp::Bankdp() { amount=rate=years=0; } Bankdp::Bankdp(float a,int y...
ALGO
0.99408
3.318359
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-05T15:13:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69ec2158dcb3...
25b3d0fe-f9f3-4aaf-8458-5dd7a46944bb
Chandiharh-university/opps-and-dsa-Archit2408-12
sum of natural no..cpp
#include <iostream> using namespace std; class NaturalNumberSum { private: int n; public: // Constructor to initialize the value of n NaturalNumberSum(int num) : n(num) {} // Method to calculate sum using iterative approach int sumIterative() { int sum = 0; for (int i = 1; i <= n;...
ALGO
0.999731
5.829372
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-12-19T09:30:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a69cf1ea36ab...
c3c0a1bb-7d60-4fac-9a7a-6dd505a28dd0
tiny-dnn/tiny-dnn
tiny_dnn/xtensor/xreducer.hpp
/*************************************************************************** * Copyright (c) 2016, <NAME>, <NAME> and <NAME> * * * * Distributed under the terms of the BSD 3-Clause License. * * ...
TOOL
0.981692
7.532026
{ "github_metadata": { "branch": "master", "commit_count": 1012, "repo_created_at": "2012-12-17T14:08:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5953, "forks": 1385, "issues": 273, "pull_requests": 23 }, "file_meta": { "content_id": ...
a3c0e2bb-ccb1-4682-9ce7-107b2ad5e781
dubzzz/property-based-testing-cpp
shadows-of-the-knight/implem.1bis.inl.hpp
#include "space.hpp" void locate_in_space(Space& space, std::size_t rounds) { std::size_t x_min = 0; std::size_t x_max = space.dimension_x() -1; std::size_t y_min = 0; std::size_t y_max = space.dimension_y() -1; for (std::size_t n {} ; n != rounds && ! space.solved() ; ++n) { if (x_min > x_max || y_...
ALGO
0.999555
6.18084
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2017-06-28T18:40:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "683578a9...
1b75bfc0-ee77-463b-873f-c5d8f82d699d
Igorjan94/CF
TopCoder/TC602/C.cpp
#include <cstdlib> #include <iostream> #include <stdio.h> #include <vector> #include <set> #include <algorithm> #include <queue> #define enter printf("\n"); #define pb push_back #define ll long long #define fors(it, r) for (set<int>::iterator it = r.begin(); it != r.end(); it++) #define forvit(it, r) for (vector<int>::...
ALGO
0.999942
3.56173
{ "github_metadata": { "branch": "master", "commit_count": 748, "repo_created_at": "2014-04-24T20:52:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c1ecb546...
35c1bd29-86b4-4423-8b1c-39a73d2e0532
CosminHorjea/fmi
Sem II/Programare Orienta pe Obiecte/Seminarii/stiva.cpp
/* Seminar 1 Program simplu care implementeaza o clasa Stiva Poate sa adauge sau sa scoata din stiva */ #include <iostream> class Stiva { int *p; //pointer la zona de memorie a stivei int size; int top; public: Stiva() { p = new int[5]; size = 5; top = -1; }; Sti...
ALGO
0.989923
3.859477
{ "github_metadata": { "branch": "master", "commit_count": 164, "repo_created_at": "2019-10-05T20:11:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72e1ae5e...
cca35cc7-fe7d-46ea-b8bf-b1547976772d
techiew/DirectXHook
include/MemoryUtils.h
#pragma once #include <Windows.h> #include <map> #include <vector> #include <Windows.h> #include <Psapi.h> #include <sstream> #include <unordered_map> #include <iomanip> #define NMD_ASSEMBLY_IMPLEMENTATION #define NMD_ASSEMBLY_PRIVATE #include "nmd_assembly.h" #include "Logger.h" // Contains various memory manipula...
TOOL
0.959276
5.090338
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2019-06-08T18:58:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 210, "forks": 28, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "a79d4...
ab217146-2385-4cd7-9bcc-30bf93e947d8
nninarao09/CSCE221
PA4/MinHeap.h
#ifndef MIN_HEAP_H #define MIN_HEAP_H using namespace std; class MinHeap { private: int *arr; // pointer to array of elements in heap int capacity; // maximum possible size of min heap int heap_size; // Current number of elements in min heap public: // Constructor for the MinHeap ...
ALGO
0.997868
3.43808
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-02-24T22:50:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "679c9150a...
116428dc-143a-4aab-949c-92e0c9fbc2d2
hypnosapple/cpp_NYU_Bridge
Week5/Homework/hl3714_hw5_q3/hl3714_hw5_q3.cpp
// hl3714_hw5_q3.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> using namespace std; int printMonthCalendar(int numOfDays, int startingDay) { // print the head line cout << "Mon\tTue\tWed\tThr\tFri\tSat\tSun" << endl; // print leading spaces ...
TOOL
0.994934
4.175163
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-01-18T18:21: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": "77677be7eb7...
f9abbc85-d2c2-4b54-87ef-453d46f1078c
puyoai/puyoai
src/cpu/hamaji/db.cc
#include "db.h" #include <stdio.h> #include <string.h> #include <algorithm> #include <glog/logging.h> static int countTrailingZero(int n) { for (int i = 0; i < 4; i++) { if (n & (1 << i)) return i; } LOG(FATAL) << n; return 0; } static void countTrailingZeroTwice(int n, int* o) { int c = 0; f...
ALGO
0.983266
4.73556
{ "github_metadata": { "branch": "master", "commit_count": 3505, "repo_created_at": "2013-02-03T12:18:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 139, "forks": 29, "issues": 40, "pull_requests": 1 }, "file_meta": { "content_id": "9893...
1d07410f-fe02-41cc-93f1-276850a1db04
MarquesDevADS/studies-first-semester
C - 16.10/ex7.cpp
#include <stdio.h> #include <locale.h> /* Em uma empresa, existiam dois funcionários: o Mario que ganhava 1500,00 por mês, e o Rodrigo que ganhava 1100,00 por mês. A empresa apresentou um plano para que o Rodrigo pudesse ganhar mais que o Mario. Considerando que a empresa daria um aumento de 10% ao ano para o Mario e ...
ALGO
0.992877
3.824507
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-09-19T04:10: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": "260ef036da0...
a36ddc9f-20f2-4cd4-a573-acbf0cb2bd1b
A-lioth/Cpp_Program
Experiment_1/T_6.cpp
#include <iostream> using namespace std; const int MaxSize = 20; typedef struct { int data[MaxSize]; int length = 0; } SeqList; void Create(SeqList &L, int Data[]) { int len = 5; for (int i = 0; i < 5; i++) L.data[i] = Data[i]; L.length = len; } void Combine(SeqList &L1, SeqList &L2, Seq...
ALGO
0.999925
4.677282
{ "github_metadata": { "branch": "main", "commit_count": 150, "repo_created_at": "2024-03-11T11:31: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": "7426c659a6...
74ef8944-af2e-46a8-a72f-8ea6da02280b
AndreyFlyAway/algorithms
sprint3/D/code.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> int main() { int children_n, cookies_n, val; std::cin >> children_n; std::vector<int> children(children_n, 0); for(int i = 0 ; i < children_n ; ++i) { std::cin >> children[i]; } std::cin >> cookies_n; std::...
ALGO
0.999918
4.169517
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-02-24T17:04:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd7ed3685f5d...
97bc11ca-6320-4a2d-84ff-d177e29eb6a9
mchaisso/blasr
utils/Join.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <sstream> #include "utils.h" #include "utils/StringUtils.h" #include <assert.h> using namespace std; // This is a sort of an implementation of a join of two text files based on keywords in each text file. class Line { public: vect...
ALGO
0.996264
4.431736
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2014-02-13T20:03:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 16, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "b9f00d...
cbdba8e9-3a82-49ea-bedc-4dbd1ae2336b
os-vector/recovery-os
vicos-oelinux/anki/victor/coretech/common/engine/math/convexPolygon2d.h
/** * File: convexPolygon2d.h * * Author: <NAME> * Created: 2017-10-3 * * Description: A class wrapper for a 2d polygon with convexity helpers and constraints. * * Copyright: Anki, Inc. 2014 * **/ #ifndef __COMMON_BASESTATION_MATH_CONVEXPOLYGON2D_H__ #define __COMMON_BASESTATION_MATH_CONVEXPOLYGON2D_H__ #in...
ALGO
0.997666
7.715231
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-04-28T03:37:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61029b4da6bfd...
6ce104fe-6e48-4a60-ba5c-356596e274a4
rmallela0426/LeetCodeProblems
Medium/583-DeleteOperation2Strings.cpp
/* * Author: <NAME> */ /* LeetCode 583: Delete Operation for Two Strings Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one character in either string. Example 1: Input: "sea", "eat" Output: 2 Explanation: You need one s...
ALGO
0.999934
6.129503
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2021-02-27T00:02:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d5836ce0...
f33e0d67-2b26-42d4-b77d-ef7e3921e88c
uni-kakurenbo/cp-solutions
practice/AtCoder/abc220/c.cpp
#include <bits/stdc++.h> using namespace std; // #include <atcoder/...> // using namespace atcoder; #ifdef LOCAL_JUDGE #include<debug> #define debug(...) Debug::debug(Debug::split(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__) #define DEBUG(...) do { Debug::DEBUG(nullptr, "\033[3;35m#" + to_string(__LINE__) + "...
ALGO
0.999918
4.5626
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2022-07-23T02:32:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76c87e4016...
3c018a6f-155f-4e6e-8f9a-217b67ad8f56
alekseyberegov/centro-rate-check
tools/woffstrip/cmaps.cpp
#include "cmaps.hpp" bool Cmaps::parse0(const char* b, size_t l, std::map<char_t, index_t>& map) { if (l < sizeof(WoffCmap0)) return false; const WoffCmap0* cmap = (const WoffCmap0*)b; cmap->print(" ", "charmap 0"); assert(map.empty()); for (char_t i=0; i<sizeof(cmap->glyphIndexArray); ++i) { if (cmap->glyph...
TOOL
0.926539
4.803152
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-07-12T23:54: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": "8de4faaf21...
a670f4a2-212f-4f59-9194-52128eb1322c
bonezuk/blackomega
source/engine/blackomega/inc/Hybrid.h
//------------------------------------------------------------------------------------------- #ifndef __OMEGA_ENGINE_BLACKOMEGA_HYBRID_H #define __OMEGA_ENGINE_BLACKOMEGA_HYBRID_H //------------------------------------------------------------------------------------------- #include "common/inc/Allocation.h" #include "...
ALGO
0.92495
5.632102
{ "github_metadata": { "branch": "master", "commit_count": 350, "repo_created_at": "2018-05-26T16:30:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 1, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "ac9b82...
704a1da1-5b03-4e54-b32a-0dcfd0037013
emlowry/AiE
Year 1 Classwork/MathLibrary/Implementations/Matrix_MathFunctions.inl
/****************************************************************************** * File: Matrix_MathFunctions.inl * Author: <NAME> * Date Created: January 5, 2014 * Description: Function implementations for Matrix template class. * Last Modified: February 12, 2014 * Last...
ALGO
0.999049
7.033499
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2013-09-17T17:35: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": "02a8f02b...
0006da66-4038-443a-98e3-305ae2076a26
stefanreuther/c2ng
game/map/minefieldformula.cpp
/** * \file game/map/minefieldformula.cpp * \brief Minefield Formulas */ #include "game/map/minefieldformula.hpp" #include "game/map/configuration.hpp" #include "game/map/minefieldmission.hpp" #include "game/map/planet.hpp" #include "game/map/ship.hpp" #include "game/map/universe.hpp" #include "util/math.hpp" ...
ALGO
0.932536
6.884505
{ "github_metadata": { "branch": "master", "commit_count": 703, "repo_created_at": "2016-10-02T17:00:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8696881...
0834f469-c621-4186-80de-3ca0ee2e739e
algorithm006-class01/algorithm006-class01
Week_02/G20200343030497/LeetCode_144_497.cpp
/** * 144 二叉树的前序遍历 * https://leetcode-cn.com/problems/binary-tree-preorder-traversal */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: //...
ALGO
0.999975
6.010971
{ "github_metadata": { "branch": "master", "commit_count": 1978, "repo_created_at": "2020-02-03T10:13:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 17, "forks": 110, "issues": 686, "pull_requests": 0 }, "file_meta": { "content_id": "194...
95f3ef49-6903-49e5-87f3-135840c6fa90
trungliennd/EwardCurves
Code/Curves/RSAagorithm.cpp
#include <NTL/ZZ.h> #include <iostream> using namespace std; using namespace NTL; long witness(const ZZ& n, const ZZ& x) { ZZ m, y, z; long j, k; if (x == 0) return 0; // compute m, k such that n-1 = 2^k * m, m odd: k = 1; m = n/2; while (m % 2 == 0) { k++; m /= 2; } z = Po...
ALGO
0.999949
5.41023
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2018-01-28T16:59:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "caa4dfdb...
ae0007b6-14f2-410e-911f-f4cdd20a9cfd
njumathdy/code-practice
Leetcode/373_Find K Pairs with Smallest Sums/c++/solution.cpp
/******************* You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from the first array and one element from the second array. Find the k pairs (u1,v1),(u2,v2) ...(uk,vk) with the smallest sums. *******************/ #inclu...
ALGO
0.999997
5.210073
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2019-03-13T03:39:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3dcfaba6...
816ba407-2d79-4b14-a963-8a5b46e24123
zzz0906/LeetCode
Scripts/201.cpp
class Solution { public: int rangeBitwiseAnd(int m, int n) { long long ans = m; // 15/2 = 7 .. 1 7/2 = 3 3/2 = 1 1/2 = 0 2/2 = 1 1/2 = 0 10 int le = 0; int tmp = m; while (tmp != 0) {le++; tmp = tmp / 2;} int re = 0; tmp = n; while (tmp != 0) {re++;...
ALGO
0.999983
5.838177
{ "github_metadata": { "branch": "master", "commit_count": 492, "repo_created_at": "2017-06-08T06:26:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5990595...
1691b44a-c1c3-4d02-a844-af55b3603d0c
knightzf/review
leetcode/designSearchAutocompleteSystem/main.cpp
#include "header.h" struct TrieNode { TrieNode* children[27]; unordered_map<int, int> idxHeatMap; int endStrIdx = -1; }; class AutocompleteSystem { private: vector<string> data; string inputStr; TrieNode* root; int dataIdx = 0; TrieNode* currNode; public: AutocompleteSystem(vector...
ALGO
0.999741
4.555274
{ "github_metadata": { "branch": "master", "commit_count": 846, "repo_created_at": "2013-05-15T02:50: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": "28bd330a...
b3c04b60-02e5-4f59-8460-7092a98a4e6a
yujinjo0111/algorithm
BOJ/1018체스판.cpp
#include <iostream> #include <algorithm> #include <string> using namespace std; string WB[8] = { "WBWBWBWB", "BWBWBWBW", "WBWBWBWB", "BWBWBWBW", "WBWBWBWB", "BWBWBWBW", "WBWBWBWB", "BWBWBWBW"}; string BW[8] = { "BWBWBWBW", "WBWBWBWB", "BWBWBWBW", "WBWBWBWB", "BWBWBW...
ALGO
0.999867
3.850192
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-07-07T12:37: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": "c0d4f820cf0...
0ec50d1b-a15b-4d69-88b0-5563f39e57de
WW92030-STORAGE/cses
BFS_0 [CONNECTED].cpp
#include <bits/stdc++.h> #include <stdio.h> #include <math.h> #include <iostream> #include <vector> #include <algorithm> #include <map> #include <iterator> #include <set> #include <string> #include <queue> #include <stack> #include <functional> using namespace std; #define ll long #define pii pair<ll, ll> #define pb p...
ALGO
0.999971
3.461438
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-07-09T04:56: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": "321c06ded...
ab53a2d7-cc2e-445e-9bd5-6cfa655738eb
Aditya-A-garwal/cses
string_algorithms/string_matching.cpp
#pragma GCC optimize("Ofast") #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; using ll = long long; using ull = unsigned ll; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vll = ...
ALGO
0.99996
4.807063
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2021-07-02T10:44:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0dcdce8e8f4...
4e6d1312-18b4-46ba-992a-27cf586bca57
shibrahmachari/Graphs
dictionary.cpp
#include <bits/stdc++.h> using namespace std; class graph{ int v; list<int> * adj; public: graph(int v){ this->v=v; adj=new list<int>[v]; } void topologicalsortutil(stack<int>& s, bool* visited, int v){ visited[v]=true; for(int i=0;i<v;i++){ if(!visited[i]) top...
ALGO
0.999991
4.051366
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-03-22T15:24: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": "1e4b8c6f73...
de788fdd-7941-46c0-8f50-10cac1b04954
afaqsa/Data-Structure
Mearge Array/Marge_Array.cpp
#include <iostream> using namespace std; // Get value from user in Array void insertElementsInArray(int *arr, int size){ for (int i = 0; i < size; i++) { cout<< "Element of Array["<<i<<"] :: "; cin >>arr[i]; } } //Display the values of array on console void printArray(int* arr, int size){ for (int ...
ALGO
0.995009
3.921768
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-03-16T05:41: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": "ceaeb206e9...
45cfe477-231e-4afe-892c-2539d72afb4d
Ayesha049/all-contest-code
OCTOBER 2017/B. Race Against Time.cpp
#include <bits/stdc++.h> #define ll long long #define f(i,a,b) for(int i=(a);i<(b);i++) #define fd(i,a,b) for(ll i=(a);i>(b);i--) #define x first #define y second #define si(a) scanf("%d",&a) #define sii(a,b) scanf("%d %d",&a,&b) #define siii(a,b,c) sca...
ALGO
0.999907
3.397585
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-04-07T14:29: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": "899170832b...
027bba82-93b1-470e-aca5-05db80be3c8d
1592063346/Codes
Codes(since 12-01)/AtCoder M-SOLUTIONS PC F.cpp
#include<bits/stdc++.h> using namespace std; const int N = 2345; int n; bitset<N> beat[N], ll[N], rr[N]; bool dp_l[N][N], dp_r[N][N]; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n; for (int i = 2; i <= n; ++i) { string s; cin >> s; for (int j = 1; j < i; ++j) { ...
ALGO
0.999981
3.730104
{ "github_metadata": { "branch": "master", "commit_count": 436, "repo_created_at": "2018-12-27T22:56: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": "38918f07...
6635261b-d243-438d-ae3c-7eab48a4a56c
zhiyingy/zhiyingy.github.io
ChineseChess/montecarlo.cpp
#include "montecarlo.h" #include "cChess.h" #include "evaluate.h" #include "generateMove.h" #include <math.h> #include <iostream> #include <vector> #include <stdio.h> #include <stdlib.h> #include <float.h> void makeCopyBoard (int **board, int **result) { int i, j; for (i=0; i < 10; i++) { for (j=0; j<9...
ALGO
0.999824
4.393675
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2018-10-30T19:18:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f1af2023f...
66da9052-5495-498d-9c4f-3bb669e21377
maxyuan6717/Competitive_Programming
USACO/binary search tree/binary search tree/binary_search_tree.cpp
#include <iostream> #include <fstream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <list> #include <stack> #include <map> #include <set> #include <utility> using namespace std; struct node { int val; node* left; node* right; }; node* root = NULL; n...
ALGO
0.999941
4.239409
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-08-25T20:40:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fae4992e46...
0e6af2c8-4f48-48b2-94a4-6e5e3c382c3a
task4233/contest
AtCoder/ABC/080/c.cpp
// ------------------------------------ // Date:2018/ 3/ 6 // Problem:ABC 080 ShoppingStreet c.cpp // // ------------------------------------ #include <bits/stdc++.h> using namespace std; #define EACH(i,a) for (auto&& i : a) #define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i) #define RFOR(i,a,b) for(int i=(int)b-1;i>=...
ALGO
0.999543
4.154848
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2018-03-08T13:28:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "a08937ab...
60f9c904-e67f-4608-ac35-00fa9e3ce972
koala999cn/DataVis
3rdparty/kfr/simd/horizontal.hpp
/** @addtogroup horizontal * @{ */ /* Copyright (C) 2016 <NAME> (https://www.kfrlib.com) This file is part of KFR KFR is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, ...
ALGO
0.966602
7.173411
{ "github_metadata": { "branch": "master", "commit_count": 1134, "repo_created_at": "2022-02-16T02:04:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3a63621...
8af3fc9b-26b4-4859-a56c-91927b1f3286
amplitudesxd/IPHasher
opencl/main.cpp
#define CL_TARGET_OPENCL_VERSION 120 #include <CL/cl.h> #include <fstream> #include <cstring> #include <atomic> #include <thread> #include <iostream> #include <sstream> #include <iomanip> #include <vector> // by default the kernel file is embedded on x86 builds (using objcopy) // if you are having problems with the ...
ALGO
0.980899
5.314544
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2023-08-08T19:57:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f624de7d45...
f5c7ccd0-3543-43c9-a64f-fc227ddf0757
sanchezsan2809/AYED-Pr-ctica-2024
AyED_Practica/Leccion_1/Problemas.cpp
#include <iostream> using namespace std; struct Pago { int dni; int fechaPago; int importe; }; struct Persona { int dni; NodoSublista* pagos; }; struct NodoSublista { Pago info; NodoSublista* sgte; }; struct Nodo { Persona info; Nodo* sgte; }; Nodo* descubrirPersona(Nodo*& pers...
TOOL
0.909929
3.982019
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-30T19:46: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": "0bc133fdca80...
4a6bab76-8095-41be-a744-5468200469b5
Chinkyu/CXXExercise
MyAlgorithmPractice/MyAlgorithmPractice/1899.MergeTripletstoFormTargetTriplet.cpp
// easy #include <iostream> #include <vector> #include <unordered_map> #include <map> #include <queue> #include <set> #include <unordered_set> #include <string> #include <sstream> #include <iomanip> #include <algorithm> #include <stack> #include <bitset> #include <set> using namespace std; class Solution { public: ...
ALGO
0.999646
4.290006
{ "github_metadata": { "branch": "master", "commit_count": 754, "repo_created_at": "2016-11-04T06:14: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": "be7fd464...
807c71b8-0f07-4ee7-af9f-d071b9176926
haozzzzzzzz/osgEarthX
environment/build/3rdParty/include/geos/geos/algorithm/MinimumDiameter.h
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2005-2006 Refractions Research Inc. * Copyright (C) 2001-2002 Vivid Solutions Inc. * * This is free software; you can redistribute and/or modify it under * th...
ALGO
0.999008
6.045285
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2015-09-19T06:19:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 75, "forks": 48, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "1d3582c...
9954467d-1862-4ed9-b460-f55ae9b7fb6f
Vledusss/SLAE
src/householder/HHAlg.hpp
#ifndef HOUSHOLDER_ALG_HPP_ #define HOUSHOLDER_ALG_HPP_ #include "matrices/MatrixCSR.hpp" #include "matrices/MatrixDense.hpp" #include "matrices/MatrixOps.hpp" namespace Householder { template<typename T, typename Matrix> Matrix calcP(const std::vector<T>& vec, indexType k) { const indexType initSize = vec.size(...
ALGO
0.999455
6.644751
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2025-02-12T13:45:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "55de3423036...
b99c98a7-d05d-4bcd-8b6e-3cf72f27f000
devilzCough/Algorithm
DFS/C++/acm10971.cpp
#include <stdio.h> #include <algorithm> using namespace std; int n, s; int g[11][11]; int visited[11]; int dfs(int c); int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) scanf("%d", &g[i][j]); int min_p = 100000000; for (s = 1; s <= n; s++) ...
ALGO
0.999927
4.000292
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-03-16T03:55:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f382636e...
9b1ba3c0-8e99-4822-9a82-de58f6112160
Abrackadabrr/CompMath
LinAlg/ThreeDiagonal/ThreeDiagonalSolver.hpp
// // Created by evgen on 05.02.2022. // #ifndef MY_PROJECT_THREEDIAGONALSOLVER_HPP #define MY_PROJECT_THREEDIAGONALSOLVER_HPP #include "../ThreeDiagonal/ThreeDiagonalMatrix.hpp" namespace Slae::Solvers { /** @brief The method solves the system of equations using the sweep method * Solves a system of linear ...
ALGO
0.999755
6.105431
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-09-27T14:13:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1480b8f1a5d5...
35f3703f-f9b6-437e-91c8-c236e76c2752
TanzimRusho/OLD-MATERIALS
Online_Judge/UVA_Solutions/11151 - longest palindrome inline custom io unlocked.cpp
/** * @author Quickgrid ( <NAME> ) * @link https://quickgrid.wordpress.com * Problem: UVA */ #include<stdio.h> static unsigned a[1000][1000]; static char s[1000]; static unsigned len, n; static char S[16]; int main(){ register unsigned i, j, k, x, y, d; for(i = 0; i < 1000; ++i) a[i][i] = ...
ALGO
0.999938
3.35085
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-08-11T20:01:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa1defa2e9...
911c2bbe-8b5a-47e7-9577-907039ff34f9
misbahulamin/problem-solving
trail.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; void insertAtTail(Node *&head, int v) { Node *newNode = new Node(v); if (head == nullptr) { head = newNode; } ...
ALGO
0.999863
4.840026
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-05-04T13:20: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": "6ac19996b299...
e68c4d6a-3be9-4f04-8df4-3335ece1b7cb
ismi4/cpp-algorithms-and-data-structures
reachableNumbers.cpp
/* Let's denote a function f(x) in such a way: we add 1 to x, then, while there is at least one trailing zero in the resulting number, we remove that zero. For example, f(599)=6: 599+1=600→60→6; f(7)=8: 7+1=8; f(9)=1: 9+1=10→1; f(10099)=101: 10099+1=10100→1010→101. We say that some number y is reachable from x if w...
ALGO
0.999919
4.787591
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-05-12T09:51:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd9307e2c...
9ebeb83a-fe8a-4288-93a5-708d4a9e3212
gubaojian/trylearn
WebLayoutCoreOnly/Source/WebCore/RenderMultiColumnSet.cpp
/* * Copyright (C) 2012 Apple 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: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions ...
TOOL
0.953865
7.280542
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2016-04-06T11:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19e0341dd...
0078f00a-43ff-426d-a1c4-6214170f5821
Mulab11/cntt2016-hw1
TC-SRM-554-div1-500/wwt.cpp
/* 注意到有序的排肯定是最优的,字典序最小的话就逐位确定,计算接下来的最优值是否等于原来的最优值即可。 */ #include <bits/stdc++.h> using namespace std; vector<int> a; bool cmp(int x,int y) {return a[x] < a[y];} class TheBrickTowerMediumDivOne { public: vector<int> find(vector<int> h) { a = h; int n = h.size(),mp = 0,sum = 0; for(int i = 0;i < n;i ++) { ...
ALGO
0.999985
3.994116
{ "github_metadata": { "branch": "master", "commit_count": 4450, "repo_created_at": "2016-09-28T13:04:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 28, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "028d3...
29d3fe0a-3358-45bd-829b-efc068b5d9dc
anonymouslei/LeetCode
list/160.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { if(!headA || !headB) return NULL; int lenA = getLe...
ALGO
0.999764
5.120639
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2019-06-15T19:39: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": "b3d2e69fd...
a2cdf2b3-4308-42a6-90e5-97b625dce220
vgslavov/Problems
leetcode/search_rotate.cpp
#include <algorithm> #include <vector> // number: 33 // title: Search in Rotated Sorted Array // url: https://leetcode.com/problems/search-in-rotated-sorted-array/ // section: binary search // difficulty: medium // tags: array, binary search, top 150, meta // constraints // 1 <= nums.length <= 5000 // -10^4 <= nums[i...
ALGO
0.999976
6.284328
{ "github_metadata": { "branch": "main", "commit_count": 549, "repo_created_at": "2014-12-02T05:33: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": "f35262dd80...
ef34a15f-2bad-41d9-9b8e-2c19491df9e3
Tiramister/CppLibrary
Verify/hld_path.test.cpp
#define PROBLEM "https://judge.yosupo.jp/problem/vertex_add_path_sum" #include "../DataStructure/segment_tree.hpp" #include "../Graph/heavy_light_decomposition.hpp" #include <iostream> using lint = long long; int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); int n, q; std::cin >...
ALGO
0.999098
5.53606
{ "github_metadata": { "branch": "master", "commit_count": 204, "repo_created_at": "2019-12-22T08:28:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "4d1e26d...
d64c89cf-dfbd-45da-a863-e44bf7d4b31a
hanganflorin/Sources-and-Algorithms
prieteni3/main.cpp
#include <fstream> #include <vector> #include <queue> #include <bitset> #include <algorithm> using namespace std; ifstream is("prieteni3.in"); ofstream os("prieteni3.out"); int n, A, K, nod, dim; vector<int> G[101], aux; queue<int> Q1, Q2; bitset<101> b; void Read(); void Write(); int main() { Read(); for (...
ALGO
0.999963
3.375053
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-06-10T23:47:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd61559941...
01a6fa07-454e-480d-b9d3-9b5bab9a8f63
kardinal95/recollection_lab
Recollection/sort.h
#pragma once #include <iostream> // Bubble sort section /* Sort the array using bubble sort algorithm. Params: size - array size, array - array (int) pointer. */ void bubble_sort(int size, int* array); // Shell sort section /* Sort the array using shell sort algorithm. Params: size - array size, array - array (int)...
ALGO
0.999408
5.069092
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-05-29T12:20: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": "a5c03f6863...
94f09e10-2738-4fda-9afb-43177b0cb4d2
bradelement/coding_exercise
zoj/shortest_path/1148_dijkstra_heap.cpp
#include "cstdio" #include "cstring" #include "functional" #include "algorithm" #include "vector" #include "queue" struct Edge { int end, len; Edge(int a=0, int b=0): end(a), len(b) {} bool operator< (const Edge &e) const { return len > e.len; } }; const int MAXN = 80; const int inf = 0x12345...
ALGO
0.999813
3.645119
{ "github_metadata": { "branch": "master", "commit_count": 214, "repo_created_at": "2014-03-11T14:19:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41a990d7...
0c076033-e23a-47b6-abde-a4ea0ca14446
kashyapkale/Algorithms
linkedlist.cpp
#include<iostream> #include<algorithm> #define lli long long int using namespace std; //LinkedList Class class node{ public: int data; node*next; node(int d){ data = d; next = NULL; } }; //Function to insert data at the tail void insertdata(int data,node* &h...
ALGO
0.999865
4.256024
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2020-05-27T21:11:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0a1795a6...
6044b4e7-4045-4f7d-9e59-34dc6f120d9f
ishandutta2007/codeforces-s
solarpea/normal/1610/C.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define fill0(a) memset(a, 0, sizeof(a)) #define fill1(a) memset(a, -1, sizeof(a)) #define fillbig(a) memset(a, 63, sizeof(a)) #define pb push_back #define ppb pop_back #define mp make_pair #define mt make_tuple #define eprintf(...) fprint...
ALGO
0.99989
3.468545
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ad3bd5fbd21...
828d153d-ce75-475a-8657-e099fbdcadc1
yuyilei/LeetCode
Data-Structure/LRU缓存机制.cpp
/* 运用你所掌握的数据结构,设计和实现一个 LRU (最近最少使用) 缓存机制。它应该支持以下操作: 获取数据 get 和 写入数据 put 。 获取数据 get(key) - 如果密钥 (key) 存在于缓存中,则获取密钥的值(总是正数),否则返回 -1。 写入数据 put(key, value) - 如果密钥不存在,则写入其数据值。当缓存容量达到上限时,它应该在写入新数据之前删除最近最少使用的数据值,从而为新的数据值留出空间。 进阶: 你是否可以在 O(1) 时间复杂度内完成这两种操作? 示例: LRUCache cache = new LRUCache( 2 ); cache.put(1, 1); cache...
ALGO
0.998622
5.940009
{ "github_metadata": { "branch": "master", "commit_count": 372, "repo_created_at": "2017-08-24T07:13:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67a10045...
fa31dba6-2965-434c-a8d0-3c0a108297b9
Larionova-Anastassiya/ALGO
Lab3/J.cpp
#include <bits/stdc++.h> using namespace std; //Запросы отсортираны по убыванию. Чем больше он сможет за час тем меньше ему нужно времени. // нужно найти первое меньше или равно нашему m по запросу long long getTime(vector<long long> &bags, long long size) { long long ans = 0; for(auto i : bags) { // (auto i...
ALGO
0.999974
4.15007
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-09-18T13:58:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1df3f7da5fc1...
d79ae364-4672-4819-b5d9-b4cbf3345960
DylanStrnad/Track-User
MultArray'.cpp
// keeping track of the path taken by the mouse in the maze // using a multidimentional array // <NAME> // 4/24/2024 #include <cmath> #include <iostream> using std::cout; using std::cin; using std::endl; // maze dimensions const int mazeLength = 7; const int mazeWidth = 7; int main() { int mouseX = 0; // curren...
ALGO
0.983439
3.93438
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-06-04T17:53: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": "54b0f61e3ba7...
e4fb8399-fe67-4469-8ef9-3e2b3738c9ba
VivekChatterjee/Data-Structures-and-Algorithms-2
1857-largest-color-value-in-a-directed-graph/1857-largest-color-value-in-a-directed-graph.cpp
class Solution { private: /* State */ enum VisitedKind { GREEN = 0, /* Visited but not an ancestor. */ YELLOW = 1, /* Visited ancestor. Means a cycle. */ RED = 2 /* Not visited. */ }; vector<vector<int>> al; vector<array<int, 26>> cv_cache; vector<VisitedKind> visited; string colors; ...
ALGO
0.999333
5.376568
{ "github_metadata": { "branch": "master", "commit_count": 1983, "repo_created_at": "2022-12-13T05:28:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2f68d9...
17e07fa5-b4be-4d14-8b2d-0d652c4c9675
shahed73iu/Contest_Programming_Practice_Dev_skill
SegmentTreeProblems/A_Array_Queries.cpp
#include <bits/stdc++.h> #define left st, (st+en)/2, nd+nd #define right (st+en)/2+1, en, nd+nd+1 using namespace std; const int MAX = 100010; int tree[4 * MAX], arr[MAX]; void buildTree(int st, int en, int nd) { if(st == en) { tree[nd]= arr[st]; return; } buildTree(left); buildTre...
ALGO
0.999962
5.166062
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2022-08-12T12:39: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": "7a24a0a83...
813617f3-199e-4307-a055-9a89679980ee
lballabio/QuantLib
ql/experimental/math/piecewiseintegral.hpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2015 <NAME> This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modif...
ALGO
0.998845
6.960867
{ "github_metadata": { "branch": "master", "commit_count": 17543, "repo_created_at": "2015-12-17T16:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6151, "forks": 1964, "issues": 51, "pull_requests": 11 }, "file_meta": { "content_id":...
b7db2634-1d41-42e0-873b-0362eda7d7e3
songwenas12/csp-drl
or-tools-6.7.2-customized/ortools/sat/cp_model_expand.cc
// Copyright 2010-2017 Google // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
ALGO
0.999514
7.350003
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-12-09T14:20:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4eed1e7eb7...