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
23b5d53d-796b-4be9-939c-c704eaefe5a8
flashshan/SSEngine
SSEngine/Engine/Core/Private/Memory/BitArray.cpp
#include "Core\Memory\BitArray.h" // Branch Free Scan 0 from forward, return 1 - 32 or 1 - 64 #ifdef _WIN64 void BitScanForwardZero64(uint32 *o_index, uintPtr i_value) { uint32 i32 = ((i_value & 0xffffffff) == 0xffffffff) << 5; i_value >>= i32; uint32 i16 = ((i_value & 0xffff) == 0xffff) << 4; i_value >>= i16; ...
ALGO
0.994969
5.764504
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-03-24T07:47:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e375e57f...
c5f4d737-b2bf-4c3f-9977-186d6c249794
gzgreg/ACM
2016-09-10/I.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef vector<int> vi; #define endl '\n' int main(){ ios::sync_with_stdio(0); string keyboard[] = {"qwertyuiop", "<KEY>", "zxcvbnm"}; map<char, map<char, int>> dist; for(int i = 0; i < 3; i++...
ALGO
0.999865
3.202322
{ "github_metadata": { "branch": "master", "commit_count": 130, "repo_created_at": "2016-07-09T17:21:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5df2273e...
19d8896e-19c6-40b8-91b1-8c9737e11edd
haqu/tiny-wings
tiny-wings/libs/Box2D/Dynamics/Joints/b2WeldJoint.cpp
/* * Copyright (c) 2006-2011 <NAME> http://www.box2d.org * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, * inclu...
ALGO
0.989447
7.292805
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2011-06-08T08:38:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 814, "forks": 179, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "c12a6...
6582b09d-6fc6-4ed8-9ae6-e5bcc80aa6f0
mukerem/ICPC-Journey
ICPC/icpc 2011/Codeforces/Enlarge GCD.cpp
#include<iostream> #include<algorithm> using namespace std; int num[300005]; int n; int search_num(int x,int l,int r){ if(l>r) return 0; int m = (l+r)/2; if(num[m] == x) return m; else if(num[m]<x && num[m+1]>x) return m+1; else if(num[m] < x) search_num(x,m+1,r); else search_num(x , l, m-1); ...
ALGO
0.999982
3.532443
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-08-27T18:33:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f58b7ca67b...
936707aa-a04d-4005-9355-d02d4345798b
polossk/Code-Archive
HDU/21 - 23/hdu2268.cpp
// <!-- encoding UTF-8 --!> /***************************************************************************** * ----Stay Hungry Stay Foolish---- * * @author : Shen * * @name : hdu 2268 ...
ALGO
0.997185
3.406345
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2014-08-03T14:23:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ce974bf9...
4600d952-bd30-44db-aa39-f117cd0c296f
atorys/kfu_practice
hw1_2709/N1.cpp
// // Created by atory on 25.09.2021. // #include <iostream> /** * (без циклов) * определить является ли число трехзначным */ int main(void) { setlocale(LC_ALL, "Russian"); int digit; int len = 0; std::cout << "Ведите число : "; std::cin >> digit; if (digit % 10) len++; digit /= 10; if (digit % 10) ...
ALGO
0.996069
4.108776
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2021-09-27T18:34:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94d8c4bc7...
0810234d-0ebe-4b00-abd4-7cac6e424ba8
OpenFOAM/OpenFOAM-dev
src/twoPhaseModels/incompressibleCavitation/Kunz/Kunz.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\...
ALGO
0.977281
5.200247
{ "github_metadata": { "branch": "master", "commit_count": 8589, "repo_created_at": "2014-12-10T15:47:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1770, "forks": 642, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "4d...
fa2c1e45-114f-4c33-9e89-3be018410b0d
ishandutta2007/codeforces-b
black_horse2014/normal/724/F.cpp
#include <cstdio> #include <cassert> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <algorithm> #include <vector> #include <map> #include <set> #include <climits> #include <cctype> #include <utility> #include <queue> #include <cmath> #include <complex> #include <bitset> using names...
ALGO
0.999944
4.282178
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f3178938276...
bc10e9bf-777b-49bc-a137-3df142ed5884
Aphrodicez/POSN
POSN17/Camp3/Data_Structure/Stack/Peatt_Punch.cpp
/* Author : ~Aphrodicez School : RYW Lang : CPP Algo : Status : */ #include <bits/stdc++.h> using namespace std; #define i first #define j second #define pb push_back #define eb emplace_back #define all(a) (a).begin(), (a).end() #define SZ(a) (int)(a).size() #define pc(x) putchar(x) #define MP m...
ALGO
0.999948
4.17516
{ "github_metadata": { "branch": "master", "commit_count": 270, "repo_created_at": "2020-11-21T02:11:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8195ac3...
7014f5dc-0498-4f81-b642-1a2cc5c6d6f6
SuprDewd/T-414-AFLV
03_data_structures/segment_tree.cpp
struct segment_tree { segment_tree *left, *right; int from, to, value; segment_tree(int from, int to) : from(from), to(to), left(NULL), right(NULL), value(0) { } }; segment_tree* build(const vector<int> &arr, int l, int r) { if (l > r) return NULL; segment_tree *res = new segment_tree(l, r)...
ALGO
0.999976
5.450333
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2017-03-28T04:37:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 829, "forks": 237, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01177d5...
40ccdb93-120b-4004-a7fe-224bd32d74b1
KrishnaCAmjuri/DSAImplementation
linkedListProblems/main.cpp
// // main.cpp // linkedListProblems // // Created by <NAME> on 07/07/16. // Copyright © 2016 <NAME>. All rights reserved. // #include <iostream> #include "SCLinkedList.hpp" #include "DoubleLinkedList.hpp" using namespace std; #pragma mark - main function int main(int argc, const char * argv[]) { // insert co...
ALGO
0.99449
4.894876
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-07-10T19:06: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": "08383649c8...
0a0ee310-4d7d-4fc7-8d1e-9678a68e379d
Rzegarra/RSAA
RSA 2.0/functions.h
#include <vector> #include <NTL/ZZ.h> #ifndef LFSR_3_0_functions_h #define LFSR_3_0_functions_h typedef int tipo; typedef std::vector<bool> Vector; using namespace NTL; using namespace std; ZZ aleatorio(){ time_t t; srand((unsigned) time(&t)); int res=rand(); return to_ZZ(res); } ZZ modulo_for_ZZ...
ALGO
0.999346
3.125559
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-05-27T15:44: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": "b3d4916b4a...
8c48b712-2cad-4862-8214-32d98346ba8a
Andwerpz/Competitive-Programming-Practice
- cpp -/secondsecondfriend.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; //Meta Hacker Cup 2022 B2 //notice that some tiles only have 1 or 0 neighbors. We can call these tiles disconnected, since //a tree there would not be able to have the required 2 friends. //disconnected tiles can in turn make other tiles disconnec...
ALGO
0.999948
4.865026
{ "github_metadata": { "branch": "main", "commit_count": 339, "repo_created_at": "2021-02-26T19:38: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": "2975beceb1...
4ca28df5-6163-443b-9972-dd672fdd5609
rcjosue/eee196-mobile-aqm
depreciated/arduino-ide/SimpleKNN/SimpleKNN.ino
#include <Arduino_KNN.h> // Create a new KNNClassifier, input values are array of 2 (floats), // change if you need a bigger input size KNNClassifier myKNN(2); void setup() { Serial.begin(9600); while (!Serial); Serial.println("Simple KNN"); Serial.println(); Serial.print("Adding examples to myKNN ... ");...
ALGO
0.966988
6.342515
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2022-01-08T09:08: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": "4b18bdf5298...
b7320850-33ff-4702-9a55-8bb70cb446c3
sunfenghao2017/svscan
src/msa.h
#ifndef MSA_H #define MSA_H #include <set> #include "aligner.h" #include "matrix2d.h" #include "aligncfg.h" /** class to do multiple sequence alignment */ class MSA{ public: std::multiset<std::string>* mSeqs = NULL; ///< sequences to do msa AlignConfig* mAlignConfig = NULL; ///< alignment ...
ALGO
0.975199
5.368677
{ "github_metadata": { "branch": "master", "commit_count": 739, "repo_created_at": "2020-07-09T03:47:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ad26cd3...
f819ef98-6119-4b3c-be70-8cb5535f0786
manoj9april/cp-solutions
codeforces/1054c.cpp
#include<bits/stdc++.h> using namespace std; /******* All Required define Pre-Processors and typedef Constants *******/ #define sci(t) scanf("%d",&t) #define scll(t) scanf("%lld",&t) #define scc(t) scanf("%c",&t) #define scs(t) scanf("%s",t) #define scf(t) scanf("%f",&t) #define sclf(t) scanf("%lf",&t) #define ini(a...
ALGO
0.999999
3.033668
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2020-03-22T03:09:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db32b845c...
2edf9eb6-2053-43de-985a-6b54d84b8bbd
margaritka9596/C_Cplusplus_projects
Block Lu decomposition/Block Lu decomposition recursive changed.cpp
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <iomanip> //setw() #include <cassert> using namespace std; #define Size 100 //размер матрицы кратности 2 void print_array(double * Arr, int Size_Of_Array, int Step) { int i, j; for (i = 0; i < Size_Of_Array; ++i) { int l ...
ALGO
0.999896
4.011991
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-03-14T07:41: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": "8e6462af04...
d2820ab7-2e12-4445-9547-bc41f0ff48cd
czhang-trinity/Data-Structure
BSTMap.h
#include<utility> #include<iostream> using namespace std; template<typename K, typename V> class BSTMap{ typedef K key_type; typedef V mapped_type; typedef std::pair<K,V> value_type; struct Node{ value_type data; Node* left; Node* right; Node* parent; }; int sz; ...
ALGO
0.999302
5.152042
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-09-23T17:40: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": "41993ee6e3...
8d81a79c-cbfc-415e-9338-296cc22afd19
codetronaut/templating_and_stl_cp
questions/Dutch_national_flag.cc
/* Q.Move all zeroes(0) to thr beginning of an array. Dutch NAtional Flag ________________________________________ | pivot < 4 | pivot = 4 | pivot > 4 | |____________|_____________|_____________| | | | unsorted chalega! */ #include <iostream> using namespace std; # define my_sizeof(type) ((char *)...
ALGO
0.999753
4.262547
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-04-11T21:06:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "dc95fd5a1...
5182bc28-9da4-4e16-9d4a-352e30bc3e82
NREL/EnergyPlus
third_party/kiva/src/libkiva/Functions.cpp
/* Copyright (c) 2012-2022 Big Ladder Software LLC. All rights reserved. * See the LICENSE file for additional terms and conditions. */ #ifndef Functions_CPP #define Functions_CPP #include "Functions.hpp" namespace Kiva { bool isLessThan(double first, double second, double epsilon) { if (first - second < -epsilo...
ALGO
0.941489
6.347705
{ "github_metadata": { "branch": "develop", "commit_count": 40658, "repo_created_at": "2013-11-22T14:47:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1278, "forks": 441, "issues": 908, "pull_requests": 48 }, "file_meta": { "content_id":...
20fc85e5-c143-47e6-a723-59471757680a
NEERAJASHISH/projectaurdinocode
sneha/sketch_mar24b_copy_20230324165039/sketch_mar24b_copy_20230324165039.ino
#define SAMPLE_RATE 75 #define BAUD_RATE 115200 #define INPUT_PIN A0 const int MAX_INPUTS = 5; // maximum number of inputs to process const int TIMEOUT_MS = 10000;// timeout value in milliseconds const int numInputs = 5; String inputs[numInputs]; int inputCount1 = 0; char result; void setup() { // Serial connection ...
ALGO
0.989886
5.860551
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-04-07T15:34: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": "0f40a1a3dc69...
edbe2cb4-3ea4-4146-aebe-c796b9a5c300
longnguyen1997/comp_graphics
assn4/starter4/vecmath/Quat4f.cpp
#define _USE_MATH_DEFINES #include <cmath> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #include <cstdio> #include "Quat4f.h" #include "Vector3f.h" #include "Vector4f.h" ////////////////////////////////////////////////////////////////////////// // Public ////////////////////////////////////////////////////...
ALGO
0.985461
5.84757
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2019-09-06T15:40:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 56, "forks": 37, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b3f9e5c...
d3463149-01f8-41ec-96d1-28ad7bacd6d3
rkibel/LeetCode
226.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999961
5.689467
{ "github_metadata": { "branch": "main", "commit_count": 381, "repo_created_at": "2021-10-06T04:37: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": "5f6521c53b...
078abca0-75b0-40da-8d2f-a34f65aceea8
alvelinov/Introduction-to-programming-2020-2021
Exercise 9/matrixFun.cpp
#include <iostream> using namespace std; /* Да се въведе от стандартния вход масив с размери NxN. Ако сумата на елементите в главния диагонал е четна, да се изведат индексите на всички редове, в които сумата на елементите е просто число. Ако сумата на елементите в обратния диагонал е нечетна, да се изведа...
ALGO
0.999479
3.852528
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2020-10-16T13:58:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8ed5828f1d...
2a25da9d-3dc2-4eec-acb1-96da6831778c
WEGFan/Algorithm-Contest-Code
online-judge/HDU/HDU 1159.cpp
#include <iostream> #include <string> #include <algorithm> #include <cstring> using namespace std; int dp[2007][2007]; int main() { string a, b; while (cin >> a >> b) { memset(dp, 0, sizeof(dp)); int lena = a.length(), lenb = b.length(); for (int i = 0; i <= lena; i++) { ...
ALGO
0.999778
4.13195
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-12-19T11:49:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e128b33600...
cd530cee-2c9b-4801-ab9a-40fd2ac411d8
kaushik2107-bit/aurora
debug/masks.cpp
#include <bits/stdc++.h> #include "../constants/constants.h" void printNumberAsBoard(uint64_t number) { for (int row = 0; row < 8; row++) { for (int col = 0; col < 8; col++) { uint64_t bit = (number >> ((7 - row) * 8 + col)) & 1; std::cout << bit; } std::cout << std:...
ALGO
0.997294
4.674857
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-08-16T07:40: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": "482fa3b007f...
555e652c-8965-460a-829a-8d41bace3344
xpharry/coding-battle
lintcode/cpp/394.cpp
// Problem description: https://www.lintcode.com/problem/coins-in-a-line/description // Problem solution: https://www.jiuzhang.com/solutions/coins-in-a-line/ /* * DP + Game Theory (博弈论) * */ // version 1: cannot pass due to the Time Limit. class Solution { public: /** * @param n: An integer * @return...
ALGO
0.999995
4.719017
{ "github_metadata": { "branch": "master", "commit_count": 226, "repo_created_at": "2015-10-04T05:11:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a634c5cf...
ea647582-48a8-4c79-ad5b-ebdb95434336
onkar-sawarna/Classy-LeetCode-Problems
set-matrix-zeroes/set-matrix-zeroes.cpp
class Solution { public: void setZeroes(vector<vector<int>>& mat) { /*{ bool row1,col1; row1=col1=false; int n = matrix[0].size(); int m = matrix.size(); //Checking for the first row and column for(int i=0;i<m;i++){ for(int j=0;i<n;j++){ if(...
ALGO
0.999496
6.04735
{ "github_metadata": { "branch": "main", "commit_count": 201, "repo_created_at": "2021-06-27T07:32:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92f8855c64...
95085027-67f4-48c2-aaf3-97c6c844f5cf
lisnb/leetcode
leecode-II/Sqrt(X)/源.cpp
#include <algorithm> #include <iostream> #include <vector> #include <limits> #include <exception> using namespace std; class Solution { public: int mySqrt(int x) { if (x < 0) throw invalid_argument("x can't be less than 0"); if (x == 0) return 0; long long lowerbou...
ALGO
0.998695
4.509074
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2014-07-20T14:34:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b64a284cb...
dbcd7d61-fa29-4a77-b575-5fb7b2f8b477
RosettaCommons/rosetta
source/src/numeric/geometry/projection_area.hh
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // // vi: set ts=2 noet: // // // // (c) Copyright Rosetta Commons Member Institutions. // // (c) This file is part of the Rosetta software suite and is made available under license. // // (c) The Rosetta software is deve...
ALGO
0.944531
3.964076
{ "github_metadata": { "branch": "main", "commit_count": 11737, "repo_created_at": "2023-11-17T16:42:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 296, "forks": 100, "issues": 27, "pull_requests": 9 }, "file_meta": { "content_id": "c6bf...
bf9a89e4-4337-4bf2-a791-f78a0c9119a5
BoxedOffStudios/leet-code-problems
easy/arrays/searchInsertPosition.cpp
/** * 35. Search Insert Position * * Given a sorted array of distinct integers and a target value, return the index if the target is found. * If not, return the index where it would be if it were inserted in order. * * You must write an algorithm with O(log n) runtime complexity. * */ #include <vector> #inc...
ALGO
0.999989
6.730093
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-07-01T16:53:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a5eda0dc83...
87d0266c-feee-4e46-88a7-7dd67a97ff16
InnoFang/algo-set
LeetCode/0480. Sliding Window Median/solution.cpp
/** * 42 / 42 test cases passed. * Runtime: 32 ms * Memory Usage: 14.1 MB */ class Solution { public: priority_queue<int> small; priority_queue<int, vector<int>, greater<int>> big; unordered_map<int, int> rec; double get(int &k) { if (k & 1) return small.top(); return small.top() *...
ALGO
0.999997
5.786219
{ "github_metadata": { "branch": "master", "commit_count": 3209, "repo_created_at": "2017-03-28T03:57:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3ea41...
1da9395c-41dd-46ef-ad08-a5cfc436d849
elijah-kurland/CSC_142
Week_4/prime_factorial.cpp
#include <iostream> #include <ctime> using namespace std; //function to check if a number is prime bool isPrime(int num){ //determines whether a given int num is a prime number if (num < 2) return false; //numbers below 2 are not considered prime numbers and are returned as false for (int i = 2; i * i <= num; ...
ALGO
0.998532
4.617836
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2025-01-22T16:17: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": "544e63ff0c1...
f226fdbd-3347-4bdc-a694-4afac5abc25f
Mush2h/University---UGR
First course/Programing fundamentals -- C++/Sesion 1 -- Introduction/Gaussian function.cpp
#include<iostream> #include<cmath> using namespace std; int main(){ // declaracion de variables double med , desv, x ,gau,max,min,incremento,i; const double PI=3.1416; cout<<"Escriba el valor de la media:"; cin>>med; cout<<"Escriba el valor de la desviacion:"; cin>>desv; cout<<"Escriba el ...
ALGO
0.997881
3.445099
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-06-23T06:32: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": "8daee178ed5...
9c1156d6-e0d2-49a8-bee1-0e06b1aa1ada
YaeSaraki/OI
Algorithms/CodeForces/GYM/104081/C. 测量学.cpp
#include <iostream> #include <algorithm> #include <cmath> using namespace std; using ll = long long; const double PI = acos(-1); inline void solve() { int n; double r, theta; cin >> n >> r >> theta; theta = min(theta, 2 * PI - theta); double ans = r * theta; for (int i = 1; i <= n; ++i) { double r1; ...
ALGO
0.999425
4.220745
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2022-11-25T08:48: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": "f04bd6f26fe...
2de41394-3659-463c-9774-424f932f04b2
543877815/algorithm
leetcode/c++/101. Symmetric Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ bool isMirror(struct TreeNode *t1, struct TreeNode *t2) { if (t1 == NULL && t2 == NULL) return true; if (t1 == NULL || t2 == NULL) return false; return (t1->...
ALGO
0.999994
6.380558
{ "github_metadata": { "branch": "master", "commit_count": 283, "repo_created_at": "2019-05-26T12:35: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": "d3ab2bcf...
bb6125c7-93d7-4ca5-8fc9-7172e6d49e2b
MengeCrowdSim/Menge
src/Menge/MengeCore/BFSM/FSM.cpp
/* License Menge Copyright © and trademark ™ 2012-14 University of North Carolina at Chapel Hill. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for educational, research, and non-profit purposes, without fee, and without a written agreement is hereby granted...
ALGO
0.938189
6.458183
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2014-10-19T00:01:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 148, "forks": 66, "issues": 68, "pull_requests": 2 }, "file_meta": { "content_id": "cae6e...
cd4b898f-3d69-4d27-83ff-df04f2131b02
tianbingsz/SVRGDL
paddle/internals/math/ImportanceSampler.h
/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. */ #pragma once #include <vector> #include <memory> #include <random> namespace paddle { class RandomNumberGenerator { public: RandomNumberGenerator() {} virtual ~RandomNumberGenerator() {} // generate a number between 0 and 1, uniformlly virtual doub...
TOOL
0.906868
7.143901
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-09-05T00:43:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1b39fc62...
be631bab-1769-49eb-be0d-08f233366c1a
ppaquay/MPArithmLibrary
CryptoC_C++/librairiesRSA/librsa__.cpp
/*********************************************************************** * * * Code source pour la librairie RSA en C++ * * * * ...
TOOL
0.915646
4.927804
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-12-27T20:43: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": "7ef63ef745...
bbbcc2c8-e203-4122-b7a1-4ca139389e72
sora-taka/online-contest
codeforces/edu/181/2125C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; void solve() { ll l, r; cin >> l >> r; auto f = [](ll x) -> ll { ll u = x / 2 + x / 3 + x / 5 + x / 7; u -= x / 6 + x / 10 + x / 14 + x / 15 + x / 21 + x / 35; u += x / 30 + x / 42 ...
ALGO
0.999861
4.388056
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-06-14T06: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": "66ec549525c...
50a52b32-221f-4178-a2c5-9b28f4a1df8e
mahendra49/online-judge-spoj-solutions
HORRIBLE-HorribleQueries.cpp
/*mahendra25---PVPSIT-IT IT ONLY HAS TO WORK ONCE! */ #include<bits/stdc++.h> using namespace std; #define pi 3.14159265358979323846264338327950 const int N=1e6+20,mod=(int)(1e9)+7; #define pb push_back #define ull unsigned long long #define ll long long #define rep(i,n) for(ll i=0;i<(ll)(n);++i) #define repin(i,j,k) f...
ALGO
0.999708
4.713458
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2017-04-18T13:32: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": "c3e6e2099...
fd92c1da-59d9-4963-9bee-839ef722d4b6
connor-wong/jerrynian-brain
lib/PIDDriver/pid_driver.cpp
#include <pid_driver.h> // Wall PID Parameters const double wallKp = 0.70; const double wallKi = 0.0; const double wallKd = 2.0; // Encoder PID Parameters const double encoderKp = 1.0; const double encoderKi = 0.0; const double encoderKd = 0.0; const int availableSpaceThreshold = 130; const int wallDistance = 117; ...
ALGO
0.998443
6.053471
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-01-21T09:42: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": "ebeb0bf60085...
9dd9edd6-564d-46ae-af5f-6a4fa3730ffc
nehal3103/striver_sde
987-vertical-order-traversal-of-a-binary-tree/987-vertical-order-traversal-of-a-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999995
6.15705
{ "github_metadata": { "branch": "main", "commit_count": 263, "repo_created_at": "2022-08-01T15:32: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": "7189c7098b...
3d7d164c-fc5b-4594-8e75-5f70bfc1356b
1337DaKL/Bai_Tap_C_Plus_Plus
baitaphacker28tech/mang2chieu/sapxepcacphantutheohang.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin >> a[i][j]; } } for (int j = 0; j < n; j++) { vector<int> mp; for (int i = 0; i < n...
ALGO
0.999986
4.364321
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-01-21T13:07:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce5019fc7f6...
9b61884a-a9dc-415c-b08b-959b86cef8d6
hitonanode/cplib-cpp
sparse_table/rmq_sparse_table.hpp
#pragma once #include <algorithm> #include <cassert> #include <vector> // CUT begin // Range Minimum Query for static sequence by sparse table // Complexity: $O(N \log N)$ for precalculation, $O(1)$ per query template <typename T> struct StaticRMQ { inline T func(const T &l, const T &r) const noexcept { return std...
ALGO
0.990164
6.830009
{ "github_metadata": { "branch": "master", "commit_count": 1134, "repo_created_at": "2019-08-10T00:24:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 81, "forks": 11, "issues": 62, "pull_requests": 7 }, "file_meta": { "content_id": "e7e8...
4a062afd-884e-4d10-b206-7019227587a2
donnyrla10/CodingTest
BOJ/cpp/1238.cpp
#include <iostream> #include <queue> #include <vector> #include <algorithm> #define inf 0x7fffffff #define MAX 10001 using namespace std; int n, m, x; vector<pair<int, int>> st[MAX]; int dist[MAX]; //1. 각자 자신의 집에서 X로 가는데 걸리는 시간을 dist[]에 저장한다. //2. X에서 각자 자신의 집으로 돌아가는데 걸리는 시간을 dist[]에 추가로 더해준다. void input(){ cin >...
ALGO
0.99995
4.671542
{ "github_metadata": { "branch": "main", "commit_count": 457, "repo_created_at": "2022-01-16T07:00:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7c2ab0768...
07075cd9-cfed-4ddb-89da-b7cf4b0d3e22
oybek/competitive-programming
uva/11479.cpp
#include <cmath> #include <vector> #include <cassert> #include <iostream> #include <algorithm> using namespace std; #define is_triangle(a, b, c) ((a < b + c) && (b < a + c) && (c < a + b)) int main() { long long n, i, a, b, c; cin >> n; for ( i = 1; i <= n; ++i ) { cin >> a >> b >> c; cout << "Case " << i <<...
ALGO
0.999866
4.644285
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2014-10-18T16:47:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "24c0752e...
e5e10555-b977-4d0b-a0eb-53929310a665
brein-ded-Dev/DSA
extra/vectors/permutations.cpp
#include "/home/yestodrugs/Desktop/DSA/print.h" #include <iostream> #include<vector> using namespace std; void permutations(vector<int> &nums, vector<vector<int>> &ans, int index =0){ if(index == nums.size()){ ans.push_back(nums); return; } for(int i=index;i<nums.size();i++){ if(i...
ALGO
0.999541
5.871582
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2025-04-28T16:45: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": "001141c8f45...
4c11475b-f1d1-4500-bef2-c879e0c0b341
Porlain/Cpp-Primer
ch09/ex9_22.cpp
/* * @Author: Porlain <EMAIL> * @Date: 2023-11-13 20:09:03 * * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. */ // cause the reallocation will lead the iterators and references // after the insertion point to invalid. Thus, we need to call reserver at first. #include <iostream> #include <vector> u...
ALGO
0.999846
5.726154
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-11-08T02:40:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c7411bfaa2...
53693b00-f31b-4d3b-83f5-4b013a6c90cd
neomatrixcode/arduino
tocadiscos/tocadiscos.ino
int led = 12; int motor = 10; long start=0; // int base =95; // parte externa int base= 110; //int valoroptimo=1743; //int valoroptimo=59; //parte externa int valoroptimo= 54; int valoroptimof=54; int distancia=0,lento=0,rapido=0,velocidad = 0,estable=0; double extremo=0,medio=0,interior=0; int minimo=140,maximo=200...
ALGO
0.97495
4.406192
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-04-17T05:30: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": "133c924cd...
449be808-0a4c-49f4-ad32-759d38d42e10
KKanghh/ct
백준/Gold/18869. 멀티버스 Ⅱ/멀티버스 Ⅱ.cc
#include <bits/stdc++.h> using namespace std; int galaxy[100][10000]; bool selected[100]; int n, m; bool cmp(int* a, int* b) { for (int i = 0; i < m; i++) { if (a[i] != b[i]) return false; } return true; } int main() { ios::sync_with_stdio(0); cin.tie(0); fill(selected + 2, selected + 100, true); cin >>...
ALGO
0.999989
3.393313
{ "github_metadata": { "branch": "main", "commit_count": 681, "repo_created_at": "2021-06-04T14:22:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c13a7a794...
69fd2837-a371-4389-980d-acac8f3b6f5e
ArdaBakici/Competitive-Programming
cses/Graph Algorithms/Flight_Discount.cpp
#include <iostream> #include <bits/stdc++.h> #define ll long long #define int ll #define INF 1000000000000000000 #define forn(i, n) for(int i = 0; i < n; i++) #define fornn(i, n) for(int i = 1; i <= n; i++) #define iter(i) i.begin(),i.end() #define pb push_back #define endl "\n" #define vi vector<int> #define p(x) arra...
ALGO
0.999965
3.846041
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2022-09-12T09:59: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": "d1fc6477bfa...
76adce4d-4992-41fd-9b2e-9974803498cd
SaladJack/ragdoll_simulator
Source/LowLevel/software/include/PxsSolverContact.h
/* * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this so...
ALGO
0.947584
6.459318
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-11T07:25:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97fc4310c...
c7796bed-62d1-4691-abb3-acc8bedda569
llvm/llvm-project
openmp/runtime/test/tasking/omp_record_replay_deps_multi_succ.cpp
// REQUIRES: ompx_taskgraph // RUN: %libomp-cxx-compile-and-run #include <omp.h> #include <cassert> #include <vector> constexpr const int TASKS_SIZE = 12; typedef struct ident ident_t; extern "C" { int __kmpc_global_thread_num(ident_t *); int __kmpc_start_record_task(ident_t *, int, int, int); void __kmpc_end_record...
TEST
0.913166
5.22876
{ "github_metadata": { "branch": "main", "commit_count": 545188, "repo_created_at": "2016-12-07T09:39:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 33545, "forks": 14484, "issues": 5000, "pull_requests": 5000 }, "file_meta": { "content_...
325c0b0f-a514-40ce-b640-841d4cfabb66
davidepatti/noxim
other/mapping_core2switch.cpp
#include <stdio.h> #include <cmath> #include <iostream> using namespace std; int main(int argc, char* argv[]) { int n; // n: number of tiles in butterfly cout << "give tile number n = "; cin >> n; int stg = log2(n); // stg: stage number int sw = n/2; // sw: number of switche in each stage /* EXPLE: // ...
ALGO
0.998597
4.020223
{ "github_metadata": { "branch": "master", "commit_count": 682, "repo_created_at": "2015-03-23T11:41:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 282, "forks": 139, "issues": 17, "pull_requests": 1 }, "file_meta": { "content_id": "725...
ef966e60-7ea3-466b-bc76-95bdf2318f4a
syedukkashah/DSA-Fall-24
Lab/03/Q5.cpp
#include "iostream" using namespace std; class node{ int data; node* next, *prev; public: node():next(NULL), prev(NULL), data(0){} node(const int d): data(d), next(NULL), prev(NULL){} friend class DLL; }; class DLL{ node *head, *tail; public: DLL():head(NULL), tail(NULL){} void i...
ALGO
0.999985
5.344951
{ "github_metadata": { "branch": "main", "commit_count": 175, "repo_created_at": "2024-08-10T20:11: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": "02cdc93cce...
38f944f7-518b-43d2-8407-082986f4ebec
Petrichor2333/Coordinate-Calibration
CoordinateCalibration/FindIsometryofRobotbasetoTablebase.cpp
#include "pch.h" #include <Eigen/SVD> #include "config.h" #include "FindIsometryofRobotbasetoTablebase.h" using namespace std; //using namespace Eigen; //using namespace Eigen::internal; //using namespace Eigen::Architecture; Eigen::Isometry3d FindIsometryofRobotbasetoTablebase(vector<Eigen::Vector3d> CoordinatesinT...
ALGO
0.993959
3.782525
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-03-28T13:44: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": "70812de781...
3a0e124f-13e8-4d6f-a767-2992df2a6dfe
Sachinrodies/Tle-eliminators-sheets
tempCodeRunnerFile.cpp
#include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; // Function to check if a given sum 'x' is consistent with all pairs (a[i], b[i]) // Returns true if for all i: // - If b[i] is known (!= -1), then a[i] + b[i] must equal x // - If b[i] is unknown (== -1), then x - a[i] ...
ALGO
0.999926
5.992909
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2025-04-26T13:08:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3047cd9b239...
d0ac06c2-624d-4f7d-8235-56a7c86ad940
PZhx09/SwordOffer
55.cpp
#include<iostream> using namespace std; // 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: //第一直觉想到的方法,递归 树的深度等于左右子树的最大深度+1 超出时间限制 37/39 说明方法是正确的 ...
ALGO
0.999976
5.333696
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-05-21T12:37: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": "ea44e315b8...
9a264364-8321-495a-a250-a0b191e6e9cd
ishandutta2007/codeforces-f
fishcathu/normal/1607/F.cpp
#include<bits/stdc++.h> #define ls i<<1 #define rs i<<1|1 #define pb push_back using namespace std; typedef long long ll; typedef array<int,2> pii; const int N=4E6+10; const int inf=4E6+9; auto min(auto l,auto r){return l<r?l:r;} auto max(auto l,auto r){return l>r?l:r;} void cmin(auto &l,auto r){l=l<r?l:r;} void cmax(a...
ALGO
0.999855
3.074512
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3716c9a3829d...
cda0ecf8-c3ac-4eb0-a4f3-132a41ec234d
adishijha/Algorithms-and-Data-Structures
warmup/fibonacci_partial_sum.cpp
#include <iostream> #include <vector> using namespace std; using std::vector; /*long long get_fibonacci_partial_sum_naive(long long from, long long to) { long long sum = 0; long long current = 0; long long next = 1; for (long long i = 0; i <= to; ++i) { if (i >= from) { sum =(sum...
ALGO
0.999423
3.660406
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-05-18T19:51:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19ca4ff09...
9a9f8b08-f2b8-4ffc-a239-a59f50db7b33
SincereXIA/gitlab-code
371.两整数之和.cpp
/* * @lc app=leetcode.cn id=371 lang=cpp * * [371] 两整数之和 * * https://leetcode-cn.com/problems/sum-of-two-integers/description/ * * algorithms * Medium (58.03%) * Likes: 461 * Dislikes: 0 * Total Accepted: 58.8K * Total Submissions: 99.9K * Testcase Example: '1\n2' * * 给你两个整数 a 和 b ,不使用 运算符 + 和 - ​...
ALGO
0.999626
5.551288
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-06-04T08:07: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": "9b87f71b975...
0e3433e7-ceee-4c78-8ae3-bbff78f472cf
QuanNM-PTIT/Data_Structures_and_Algorithms_PTIT
Divide and Conquer/DSA04019 - CẶP ĐIỂM GẦN NHẤT.cpp
// Created by <NAME> #include<bits/stdc++.h> using namespace std; #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define ll long long #define FOR(i, a, b) for(int i = a; i <= b; i++) #define FORD(i, a, b) for(int i = a; i >= b; i--) #define F(i, a, b) for(int i = a; i ...
ALGO
0.999973
5.025764
{ "github_metadata": { "branch": "main", "commit_count": 228, "repo_created_at": "2022-03-09T14:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 93, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44e4ba28...
e796372b-69fa-445c-a744-fc6467b63ebc
Ameame1/Optimizing_Classical_Sorting_by_OpenMP-MPI
OpenMP/QuickSortOpenMp2.cpp
#include <iostream> #include<stdlib.h> #include<stdio.h> #include<random> #include<omp.h> using namespace std; //<NAME> //22910358 void QuickSort(double *arr,int low,int high) { //If the interval is more than one number if(low < high) { double temp = arr[low]; //Take the first number of the interval as the ref...
ALGO
0.999969
4.761208
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-05-03T20:41: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": "40afc558933...
c6509668-7a5d-4452-b5cd-26770acf70a6
muhammadhasan01/cp
Online Judge/Codeforces/Contests/DIV2/DIV2-830/B.cpp
#include <bits/stdc++.h> using namespace std; const int K = 2; void solve() { int n; cin >> n; vector<char> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } vector<set<int>> pos(K); for (int i = 0; i < n; i++) { int x = a[i] - '0'; pos[x].emplace(i); } in...
ALGO
0.999951
4.380552
{ "github_metadata": { "branch": "master", "commit_count": 1187, "repo_created_at": "2019-07-13T15:49:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dccd1a2...
02499ac7-9974-4f20-a70d-1bc1bcfb7673
elrinor/chaos-devices
projects/videodenoiser/src/Denoising.cpp
#include "Denoising.h" #include "FastOps.h" #define sqr(x) ((x)*(x)) #define KNN_STRENGTH 1500 #define NLM_STRENGTH 70 void DenoiseStart( int width, int height, BYTE strength ) { //this function is called once for filter chain startup //place here code for all memory allocations and initializations you want to do...
ALGO
0.996985
3.587598
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2015-03-30T14:16: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": "bfa34e47f...
9beb94be-1e28-4f81-aa6f-b4c74fff6af0
dmmv2r/21mcdonoug.4
scheduler.cpp
//Name:<NAME> //Date: 4/4/2021 #include <iostream> using namespace std; void findWaitTime(int processes[], int n, int bt[], int wt[], int quantum) { int rem_bt[n]; for (int i = 0; i < n; i++) { rem_bt[i] = bt[i]; } int t = 0; while(1) { bool done = true; for(int i = 0; i < n; i+...
ALGO
0.999762
4.580985
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-03-22T23:56: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": "b8abae6ef5...
6de3ced8-dfde-4da5-912e-e4cedf643ba8
Haichao-Zhang/XWorld
teacher.cpp
// Copyright (c) 2017 Baidu Inc. 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 la...
ALGO
0.994434
6.144841
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-08-24T07:12:34.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "PaddlePaddle/XWorld", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_...
3b6c692e-999c-48c6-91bd-53217415d52d
harsh-gulati-14/Competitive-programming-
1352E.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; typedef long long int ll; #define vec vector<int> #define pb push_back #define ma map<int,int> int main() { #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif ll i,j,k,l; cin...
ALGO
0.999777
4.015187
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-12-17T15:55: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": "84c1769e9...
d4795549-c47f-4345-bd5f-adcb1e5756b5
Vinay-Basargekar/DSA
arrays/2D Array/multiplication.cpp
#include<iostream> using namespace std; int main(){ const int size = 10; int arr1[size][size]; int arr2[size][size]; int result[size][size]; int n; cout << "Enter order: "; cin >> n; for(int i=0 ; i<n ; i++){ for(int j=0 ; j<n ; j++){ cin >> arr1[i][j]; } } ...
ALGO
0.999943
4.087934
{ "github_metadata": { "branch": "main", "commit_count": 107, "repo_created_at": "2023-11-11T04:42:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8acfb9229...
3f952b58-3324-4156-b4bb-236dde55a292
Roberto888888/Cpp-Exercises
Assignment-4-Containers/Assignment-4-v1/Assignment-4-v1/Assignment-4-v1.cpp
#include <iostream> #include <string> #include <vector> #include <unordered_set> using namespace std; // For this assignment, when a value is deleted, ALL occurrences are removed from // the bag. There is NO condition for adding values or on the number of repeated // values. It's NOT important to retrieve actual valu...
ALGO
0.994826
4.518531
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2022-11-23T19:04: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": "e4e3d56e48...
e819be59-462b-40a8-ae6e-53c37f147c42
raincross7/code-similarity
codes/train_code/problem269/problem269_28.cpp
#include <iostream> #include <cstdio> #include <cctype> #include <cstring> #include <cmath> #include <cstdarg> #include <cstdlib> #include <string> #include <tuple> #include <queue> #include <algorithm> using namespace std; typedef pair<int, int> P; int main(int argc, char const *argv[]) { int h, w; cin >> h ...
ALGO
0.999842
3.883255
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f87a80e50f8...
2eefef21-a189-4bde-8b58-ea2cc14ac7c8
DontAskMeWhy0507/CodeFun
C++/DSA/BTTH2/Insert_a_node_at_specific_position_in_a_linked_list.cpp
/* * Complete the 'insertNodeAtPosition' function below. * * The function is expected to return an INTEGER_SINGLY_LINKED_LIST. * The function accepts following parameters: * 1. INTEGER_SINGLY_LINKED_LIST llist * 2. INTEGER data * 3. INTEGER position */ /* * For your reference: * * SinglyLinkedListNode ...
ALGO
0.999957
4.927874
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2023-10-09T05:52: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": "5476b27002...
e216334c-5a2a-4775-9fb9-450bf1e36184
EL-800/LeetCode-Problems
2370. Longest Ideal Subsequence.cpp
#include <bits/stdc++.h> using namespace std; class Solution { private: vector<vector<int>> memo; int dp(string& s, int k, int ind, int last){ if (ind >= s.length()) return 0; if (memo[ind][last] != -1) return memo[ind][last]; int left = 0, right = 0, currLette...
ALGO
0.999821
4.810301
{ "github_metadata": { "branch": "main", "commit_count": 524, "repo_created_at": "2023-11-27T23:21:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9980d5bfc7...
08fc660c-d174-411c-a7dc-51209aec91a3
samuelpmish/fm
include/fm/operations/linear_solve.hpp
#pragma once #include "fm/types/vec.hpp" #include "fm/types/matrix.hpp" namespace fm { template < Kind kind, uint32_t n, typename T > __host__ __device__ constexpr auto linear_solve(const matrix<kind, n, n, T>& A, const vec<n,T>& b) { vec<n,T> x{}; if constexpr (kind == Kind::General) { constexpr auto abs...
ALGO
0.999872
6.079667
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2023-08-11T20:09: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": "b289fab648a...
7c839525-7421-40c1-a172-6e6be969cd1b
rishabhs/sygus-comp14
solvers/enumerative/esolver-synth-lib/src/z3-4.3.1/src/ast/simplifier/maximise_ac_sharing.h
/*++ Copyright (c) 2006 Microsoft Corporation Module Name: maximise_ac_sharing.h Abstract: <abstract> Author: <NAME> (leonardo) 2008-10-22. Revision History: --*/ #ifndef _MAXIMISE_AC_SHARING_H_ #define _MAXIMISE_AC_SHARING_H_ #include"simplifier.h" #include"hashtable.h" #include"bv_decl_plugin.h" ...
ALGO
0.968734
5.588447
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2014-01-02T19:42:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 19, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "e9bcb0d...
fbb6919e-f61d-49be-a7d7-a33a6120995a
MowMowchow/Competitive-Programming
Misc/awildgoosechase.cpp
#include <bits/stdc++.h> using namespace std; int foxes[100010], N, T, f, d, oadd = 0; vector<int> guilty; int main(){ memset(foxes, 0, sizeof(0)); cin >> N >> T; for (int i = 1; i <= N; i++){ cin >> f >> d; if (d == -1){ foxes[f]--; oadd++; } else { ...
ALGO
0.999964
3.779063
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2019-11-03T05:28: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": "3d5b42fd...
84768768-70f1-4c39-aa9a-97aa1cc01908
vildenst/3D-heart-models
VTK/Infovis/Parallel/vtkPBGLVertexColoring.cxx
/*========================================================================= Program: Visualization Toolkit Module: vtkPBGLVertexColoring.cxx Copyright (c) <NAME>, <NAME>, <NAME> All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distribute...
ALGO
0.923912
6.22861
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2017-09-14T08:41:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "206be6d...
ff029767-080e-4af3-9e15-a76310cc754c
Sunday361/leetcode
leetcode_375.h
// // Created by panrenhua on 2021/10/15. // #ifndef LEETCODE_LEETCODE_375_H #define LEETCODE_LEETCODE_375_H #include "allheaders.h" /** 375. 猜数字大小 II * 转移方程 dp[j][j + i - 1] = min(dp[j][j + i - 1], max(dp[j][k - 1], dp[k + 1][j + i - 1]) + k) * * 选择 k 时, 极大情况下也可以完成猜迷, 对应到 k 上 在区间 [i, j] 上选择 k 使得总的代价最小 * */ clas...
ALGO
0.998712
4.981536
{ "github_metadata": { "branch": "master", "commit_count": 276, "repo_created_at": "2020-12-02T09:23:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92d368d8...
e4837d39-5409-418a-bbfd-e65a60e3bf8a
hottinggot/AlgorithmPractice
src/BOJ_14003/problem_14003.cpp
//가장 긴 증가하는 부분 수열 5 #include<iostream> #include<stack> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; int arr[n]; int D[n+1]; int p[n]; D[0] = -1000000000; int index = 0; for(int i=0; i<n; i++) { cin >> arr[...
ALGO
0.999998
4.192792
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2020-07-18T11:08: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": "0b8550b30...
f988c60a-a7f7-44d4-a0c8-ef2fbcfb0974
AbdulRahmanSalaah/DataStructure
BinaryTree/Tree.h
// Author: <NAME> // This file contains the class Tree which is a template class that represents a binary search tree // The class contains the following methods: // 1. Tree() : constructor that initializes the root to NULL and the size to 0 // 2. ~Tree() : destructor that calls the clear method to delete all nodes in ...
ALGO
0.99906
4.538544
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-02-05T17:57: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": "557279b4d46...
1beb4f45-7325-4b10-ab91-c5f9ddd07ba8
bycore/atcoder
arc058-060/arc060c.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int n, L, m; int a[N], to[N]; int block, num, ans; int nxt[N], val[N], belong[N]; int find(int x) { int l = x + 1, r = n, ans = 0; while (l <= r) { int mid = (l + r) >> 1; if (a[mid] - a[x] <= L) l = mid + 1, ans =...
ALGO
0.999984
4.115409
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-05-19T13:50:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "766a24d8f6...
e1cc7b07-e561-4eae-8d11-f5793b6ef3c9
Kdawg1425/CSCI-10
CS10 HW 2/HW_2.1c.cpp
#include <iostream> using namespace std; int main() { double total = 0; double input = 0; int counter = 0; double max = 0; double min = 30; while (input != -1) { cout << "Enter score" << endl; cin >> input; if(input > 30 || input < -1) { cout << "Invalid input" << endl; continue; ...
TOOL
0.946989
3.853463
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-04-20T00:10: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": "18454b8e723...
8409041e-0e87-45e1-9fa7-2375d8df65b2
alexypdu/nyu-tandon-bridge-winter-2021
Week 11/Homework 11/yd2263_hw11_q1.cpp
#include <iostream> using namespace std; void print_triangle(int n); void print_opposite_triangles(int n); void print_ruler(int n); int main() { cout << "print_triangle(4):\n"; print_triangle(4); cout << endl; cout << "print_opposite_triangles(4):\n"; print_opposite_triangles(4); cout << endl;...
ALGO
0.999248
5.227594
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2021-01-22T15:52:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 54, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "984c8c527...
2ddc2ed0-0fde-44f1-b7cb-aa5c3709cc80
cheidegg/cmg-cmssw_oldAndStable
DQM/BeamMonitor/plugins/Vx3DHLTAnalyzer.cc
// -*- C++ -*- // // Package: Vx3DHLTAnalyzer // Class: Vx3DHLTAnalyzer // /**\class Vx3DHLTAnalyzer Vx3DHLTAnalyzer.cc plugins/Vx3DHLTAnalyzer.cc Description: beam-spot monitor entirely based on pixel detector information Implementation: the monitoring is based on a 3D fit to the vertex cloud */ // //...
ALGO
0.942848
4.744
{ "github_metadata": { "branch": "heppy_74X", "commit_count": 147862, "repo_created_at": "2016-02-15T12:57:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89...
a28406f3-90b0-4077-bd3d-96a446ec7d11
Karicho21/MergeSort-Tasking
mst.cpp
#include <omp.h> #include <stdio.h> #include <iostream> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <algorithm> #include <chrono> #include <vector> #include <thread> #include <mutex> #define DEBUG 0 const size_t PARALLEL_THRESHOLD = 10000; void generateMergeSortData(s...
ALGO
0.999879
5.600881
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-04-23T01:34:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4fdacef0a84...
c1c5d278-4a79-4758-8abe-e9e98db06e4d
LaylaRateb/Cplusplus.Projects
TowersOfHanoi.cpp
//Project 9 - Towers of Hanoi #include <iostream> #include <vector> using namespace std; int main(){ vector<int> t[3]; // Three towers A, B, C represented as an array of 3 vectors int n, candidate, to, from, move = 0; // move counts the move number cout << "Please enter an ODD number of rings to mov...
ALGO
0.999928
5.396261
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-02T02:59: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": "2ce86c67ce99...
37f35e6c-5bd5-4bd1-a867-d12e1a60f495
Zihua-Liu/LeetCode
28/Implement_strStr().cpp
class Solution { public: int strStr(string haystack, string needle) { if(needle.length() == 0) return 0; return KMPStrMatching(haystack, needle, findNext(needle)); } int* findNext(string p) { int i = 0; int k = -1; int m = p.length(); int *next = new int[...
ALGO
0.999965
5.506828
{ "github_metadata": { "branch": "master", "commit_count": 278, "repo_created_at": "2016-10-31T17:01:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27e8113f...
9316864c-e39d-4c84-b0f6-bfd5ef7cb317
yunsangq/opencv-singleviewgeometry
opencv_singleviewgeometry/opencv_singleviewgeometry/_homography.cpp
#include <opencv2\core\core.hpp> #include <opencv2\highgui\highgui.hpp> #include <opencv2\imgproc\imgproc.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> #include <fstream> using namespace cv; using namespace std; float fx = 0.0, fy = 0.0, cx = 0.0, cy = 0.0, k1 ...
ALGO
0.995421
4.792691
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-10-26T00:49: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": "28ff94b29d...
db402e42-459c-4896-ab6b-efe775d620df
ishandutta2007/codeforces-h
heno239/normal/1133/D.cpp
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> #include<utility> usi...
ALGO
0.999929
3.747655
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e6fb26bcb0e...
071c91ed-cbba-4eb6-b1dc-8e24a564acc5
Elvis-199-afk/04_eficiencia
comparaOrd.cpp
#include <iostream> #include <ctime> #include <cstdlib> using namespace std; void ordenarDirecto(int[],int); void ordenacionLogaritmica(int[],int); int nuevosDatos(int[]); void copia(int[],int[],int); int main(){ int n=0,op; const int MAX_SIZE=100000; int a[MAX_SIZE],b[MAX_SIZE]; double duracion; ...
ALGO
0.992881
4.277235
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-11T20:23: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": "f6254726f56c...
4ffc0ce2-1ffc-4d96-9dd5-13d33c9860b2
clarklee777/CSCE-629
kruskal.cpp
/* Kruskal's Maximum Spanning Tree algorithm for max-bandwidth path. Utilizes a max-heap to sort the original graph's edges for max extraction File: kruskal.cpp Author: <NAME> Date : 2017/11 */ //--------------------------------------------------- // **** INCLUDES **** //------------...
ALGO
0.999962
3.831012
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2017-11-13T03:40: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": "6240827cb...
7b62ddc5-8f1c-4515-aac9-99cbd6998d61
DenisDesimon/LeetCode
539_Minimum_Time_Difference.cpp
//#539 Minimum Time Difference - https://leetcode.com/problems/minimum-time-difference/ #include <iostream> #include <vector> #include <algorithm> #include <cassert> using namespace std; class Solution { public: int findMinDifference(vector<string>& timePoints) { sort(timePoints.begin(), timePoints.end());...
ALGO
0.999715
5.965904
{ "github_metadata": { "branch": "master", "commit_count": 646, "repo_created_at": "2019-02-05T17:04: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": "7c7beefc...
d37b41e2-0286-496b-8184-37e94aede096
dipta007/Competitive-Programming
@DOC by DIPTA/collected/sgtlaugh/Miller Rabin (Deterministic + Integer).cpp
#include <bits/stdtr1c++.h> #define MAX 1000010 #define isprime(x) prm::miller_rabin(x) #define clr(ar) memset(ar, 0, sizeof(ar)) #define read() freopen("lol.txt", "r", stdin) #define dbg(x) cout << #x << " = " << x << endl using namespace std; namespace prm{ /// hash = 663918 bitset <MAX> flag; int p = 0, p...
ALGO
0.999231
3.097029
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2016-03-27T22:30:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e08ab0428...
486e419a-fced-45bb-8320-b1eea99e5e46
Nafyaz/my-codes
CSES/1194.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll, ll> #define ff first #define ss second #define show(x) cout << #x << ": " << x << "; " #define MOD 1000000007 #define MAXN 2000006 ll n, m; string grid[1003]; ll mDist[1003][1003], aDist[1003][1003]; ll parent[1003][1003]; ll dirR[...
ALGO
0.999966
3.681464
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2022-04-17T23:51:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a45919611...
5cfa10ef-bfcf-45e1-a10d-b8fc9080e5c5
ajaymalik2592/practice_cpp_code
code/pro/academics/neurofuzzy/lab2/code.cpp
#include<bits/stdc++.h> using namespace std; int main() { cout<<"enter the number of input signals ::: = \n"; int n; cin>>n; int r = pow(2,n); vector <int> vec; vec.resize(r); cout<<"we will take input as the number serialwise \n "; for(int x= 0 ; x< r ;x++) { cout<<"enter the otput value for "<<x<...
ALGO
0.999729
3.648339
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-03-23T18: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": "9d83d588ff...
dbb0eb16-60fa-46f8-9e23-8676427ae569
liangkyle08/competitive-programming
USACO/closet-cow-wins.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second const int MOD = 1e9+7; int K, M, N; vector<long long> P; long long T[200001]; long long arr[200001]; long long pSum[200001]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> K >> M >> N; P.resize(K+1);...
ALGO
0.999946
3.56324
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-06-26T21:56:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe16459a71c...
134a0b95-4e30-49c5-853e-b00fd4845689
anubhav-jangra/ds
graphs/BFS-cycle_detection.cpp
// also referred to as level order transversal // This is for undirected graphs // cycle detection for undirected graphs can be done by either BFS or DFS #include<iostream> #include<iomanip> #include<list> #include<vector> #include<queue> #include<iterator> using namespace std; // implementation using adjacency lists c...
ALGO
0.999223
4.753629
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-06-04T15:36: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": "574d762e8...
de51d42c-567a-48a0-bf3f-c39fe642172f
KrishanKantAgnihotri/CP-Solutions
CodeChef/C++14/HOSPBEDS/32451372.cpp
#include<bits/stdc++.h> #include<boost/multiprecision/cpp_int.hpp> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #define ull unsigned long long int #define ll long long #define vi vector<int> #define mii map<int,int> #define all(x) x.begin(),x.end() #define fast_io ios_base::sync_with_std...
ALGO
0.999929
4.761443
{ "github_metadata": { "branch": "main", "commit_count": 2619, "repo_created_at": "2022-06-03T05:34: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": "70c463827...
fa99010e-eb09-4884-9573-5721a14114c7
puneethsaikumar2000/Codeforces
round649/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef unsigned long long int ulli; typedef vector<int> vi; typedef vector<lli> vlli; typedef pair<int, int> pii; typedef map<int, int> mii; int main(int argc, char const *argv[]) { ios_base::sync_with_stdio(false); cin.tie(0); cout...
ALGO
0.999209
3.445131
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-07-21T11:15: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": "3687eb123c...