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
998275e5-bbf3-46a3-82db-18cc9b937c03
ishandutta2007/codeforces-a
adalbert/normal/817/C.cpp
#include <bits/stdc++.h> using namespace std; #define y1 cgbngfgn #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define fir first #define m_p make_pair #define sec second #define files(name) freopen(name".in","r",stdin); freopen (name".out","w",stdout); #define time pdojegoritg #define pb push_bac...
ALGO
0.999207
3.816709
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "f730afd8799e...
5c513812-cc0f-429c-9a5c-1352e1eea414
nsjinie/solved
class_3/G4_9019_bfs/g4_9019_bfs.cpp
// 문제 : 9019 DSLR // https://www.acmicpc.net/problem/9019 // 시간 복잡도 : O() // 알고리즘 : BFS // 풀이 방향 : 최종값과 일치할때까지 DSLR 명령을 BFS로 순회한다. #include <iostream> #include <queue> using namespace std; int T, A, B; char cmd[4] = {'D', 'S', 'L', 'R'}; int result; int check[10001]; void checkClear() { for (int i = 0; i ...
ALGO
0.999705
5.027752
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2024-04-07T15:11: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": "fe3aac4f05...
bb89fe74-7b4f-444c-8c65-b64bf1c3d470
goblivend/Courses
ing3/IPRO/project/algo-frames.cpp
#include <iostream> #include <opencv2/opencv.hpp> enum Color { RED, YELLOW }; // Equalization with histogramm using hsv temp image void equalizationHisto(cv::Mat& frame, cv::Mat& res) { cv::Mat res_hsv(frame.size(), CV_8UC3); unsigned char min_pix = 255; unsigned char max_pix = 0; cv::Mat fra...
TOOL
0.98161
5.394605
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2023-01-24T13:38: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": "11d06c7659f...
285506ea-329c-40df-a32e-42582f3e377e
samkitshah1262/CMCP
BS/B_Update_Files.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vector<int>>; using vl = vector<ll>; using vvl = vector<vector<ll>>; using pi = pair<int, int>; using pl = pair<ll, ll>; #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define pb push_b...
ALGO
0.999939
4.271252
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-11-11T04:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3063bb4168c...
ac7e3805-9b49-4a62-9e0c-ee250640e803
dinosauce-285/btlt
classWork/02/08.cpp
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if ((a + b) > c && (a + c) > b && (b + c) > a) { cout << "tam giac" << " "; } else { cout << "khong la tam giac" << " "; exit(0); } if ((a == b ...
ALGO
0.999864
3.647501
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-11-20T02:53:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a940574cc...
6134e030-6b61-49ee-99d7-98775df92211
Shrikant727/Interesting-algorithms
Increase&Decrease.cpp
//Codeforces #264B /*Polycarpus has an array, consisting of n integers a1, a2, ..., an. Polycarpus likes it when numbers in an array match. That's why he wants the array to have as many equal numbers as possible. For that Polycarpus performs the following operation multiple times: he chooses two elements of the array ...
ALGO
0.999926
3.839794
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-09-10T11:38:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5856b8f16bb0...
e7252d4a-6840-43f7-a257-042e734e4102
ckw20/thupc2024_pre_public
day0/I/data/antigen.cpp
#include <iostream> #include <random> #include <chrono> std::vector<int> antigen(int N) { if (N == 1) return {1}; std::vector<int> sub = antigen((N + 1) / 2); sub.resize(N); for (int i = (N + 1) / 2; i < N; ++i) { sub[i] = 1 - sub[i - (N + 1) / 2]; } return sub; } int main(int argc, ch...
ALGO
0.999921
4.280321
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-17T10:56:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8bdc0801e17e...
525f41c4-95fe-4573-8cdc-857159de26a3
RomeoV/Analytic-derivative
main.cpp
#include <iostream> #include <iomanip> #include "Nodes.h" int main(int argc, char *argv[]) { Node_ptr expression( std::make_shared<Power>( std::make_shared<Symbol>('x'), std::make_shared<Symbol>('x') ) ); /* * Node_ptr expression( * std::make_shared<Logarithm>( * ...
ALGO
0.982079
5.576598
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-07-13T14:49: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": "655eb07cad...
fbd31061-018b-4caf-b1bf-eba96d67ca4e
AplusB/ACEveryDay
flag/2016_05_09.cpp
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long LL; const int md = 2015; const int maxn = 1e5 + 5; int dp[7][maxn][2][7]; void add(int &a, int b){ (a += b) %= md; } void init(){ for(int x = 1; x < 7; x++){ dp[x][x + 1][0][1] = 1; for(int i = x...
ALGO
0.999398
3.558744
{ "github_metadata": { "branch": "master", "commit_count": 3924, "repo_created_at": "2016-05-15T06:08:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 19, "forks": 21, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "abdefa...
52fe421d-9e77-4148-8e0a-bf0c68563aa6
lardandweed/Programming-Principles_and_Practice_Using_Cpp
Chapter 5/Chapter 5 Exercises/Ex_05.14.cpp
/* Read (day-of-the-week,value) pairs from standard input. Collect all the values for each day of the week in a vector<int> . Write out the values of the seven day-of-the-week vectors. Print out the sum of the values in each vector . Ignore illegal days of the week, such as Funday, but accept common synonyms such ...
ALGO
0.985775
4.992908
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2017-12-23T04:10: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": "b228939a3...
0f9c6b9b-504b-4773-98be-47ba40a1eca8
siwangqishiq/algorithm
MinHeap.cpp
#include <iostream> #include <random> #include <memory> #include <vector> #include "data.h" // int data[] = {9,8,2,1,4,7,6,5,3,101,1,10,100,88,77,55,99}; // int data_len = sizeof(data) / sizeof(data[0]); //最小堆 class MinHeap { public: MinHeap(int _capacity) : capacity(_capacity){ pData = std::unique_ptr<int []>(new...
ALGO
0.99909
3.9718
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2015-11-25T04:42:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebbc59be...
bde7f552-370a-43d4-b899-d560470250f1
erwincoumans/tiny-differentiable-simulator
src/utils/cuda/cuda_library_processor.hpp
#pragma once #if CPPAD_CG_SYSTEM_WIN #include <windows.h> #endif #include "../file_utils.hpp" #include "../stopwatch.hpp" #include "cuda_codegen.hpp" namespace tds { static std::string exec(const char *cmd) { std::array<char, 1024> buffer; std::string result; #if CPPAD_CG_SYSTEM_WIN std::unique_ptr<FILE, decl...
TOOL
0.962046
6.689626
{ "github_metadata": { "branch": "master", "commit_count": 718, "repo_created_at": "2020-05-14T18:04:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1305, "forks": 134, "issues": 8, "pull_requests": 5 }, "file_meta": { "content_id": "301...
1d39df7e-afb8-4b9b-9a9b-2a802586006b
ABenazzou/Competitive-Programming
CP4/Chapter1/Section 6/c/Kattis_connectthedots.cpp
/* * Author: @adnanebenazzou */ #include <bits/stdc++.h> using namespace std; template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; } template<typename T_container, typename T = typename enable_if<!is_same<T_container, stri...
ALGO
0.999432
3.998492
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2025-01-05T21:03:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6c14e4a6d5...
f7e73742-12e6-4aca-b32f-eddb12d95011
Amitgiri2001/DSA
CHAPTER/math/tempCodeRunnerFile.cpp
// we are trying to count all zeros in the last of any trailing_zeros number... // first we try to calculate the trailing_zeros of this number then try to module this number by 10----> while the output of this module is Zero----------> this is the brute force approach..... /* #include <iostream> using namespace std; ...
ALGO
0.999887
6.136677
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-07-10T14:21:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a60ab4c2ef8...
8b677763-c18b-4040-851d-d38690d5e4ae
noss3885/library_cpp
src/math/fibonacci_matrix.cpp
/* fibonacci with matrix O(logN) */ #include <iostream> #include <vector> using namespace std; typedef long long ll; typedef vector<vector<ll> > mat; const ll MOD = ll(1e9 + 7); mat init(mat m, int xlen, int ylen) { m.resize(xlen); for (int i = 0; i < xlen; i++) { m[i].resize(ylen); for (int ...
ALGO
0.999987
4.664039
{ "github_metadata": { "branch": "main", "commit_count": 129, "repo_created_at": "2018-05-24T08:40: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": "3a2c826f97...
8453a5c6-b569-4b35-8e3b-264317b9753e
sptsway/cses-solutions-tt89
solutions/cses1132.cpp
//tt89 ;) #include<bits/stdc++.h> using namespace std; //typedef long long ll; #define int long long #define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); void testcase(int t) { cout<<"Case #"<<t<<": "; } void online() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("o...
ALGO
0.999964
4.457682
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-05-11T11:14: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": "1cb3b47681d9...
bc2ade04-68b0-478d-a31e-5f0508ce499e
yiwang89/LLNL-spheral
src/CRKSPH/SolidCRKSPHHydroBase.cc
//---------------------------------Spheral++----------------------------------// // SolidCRKSPHHydroBase -- The solid CRKSPH/ACRKSPH hydrodynamic package for Spheral++. // // Created by JMO, Fri Jul 30 11:07:33 PDT 2010 //----------------------------------------------------------------------------// #include "FileIO/Fi...
ALGO
0.923634
5.713312
{ "github_metadata": { "branch": "CRK_Variant", "commit_count": 3589, "repo_created_at": "2020-12-18T02:09: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": "4c...
e9026bc9-3949-4425-9ed4-f5b0f00a1015
arnabsahawrk/DSA
Introduction to Algorithms/Bellman Ford, Floyd Warshall, DSU/10.5-Practice Day/743. Network Delay Time.cpp
// https://leetcode.com/problems/network-delay-time/ #include <bits/stdc++.h> using namespace std; class Solution { public: int networkDelayTime(vector<vector<int>> &times, int n, int k) { vector<vector<int>> dist(n, vector<int>(n, INT_MAX)); for (int i = 0; i < n; i++) dist[i][i] =...
ALGO
0.999959
5.713595
{ "github_metadata": { "branch": "main", "commit_count": 158, "repo_created_at": "2024-12-07T13:55:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6fb1e306c...
008e202a-051c-4edf-8ccf-8934f76b431d
kaykymomoli/uHunt-Exercises
572.cpp
#include <bits/stdc++.h> using namespace std; char mat[101][101]; bool vis[101][101]; int vetl[8]={-1,1,0,0,1,-1,-1,1}; int vetc[8]={0,0,-1,1,1,-1,1,-1}; int cont= 0; bool isValid(int i, int j, int n, int m){ if(i >= 0 && i < n && j >= 0 && j < m && !vis[i][j] && mat[i][j] == '@') return true; return false; } void ...
ALGO
0.99952
4.378512
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-06-02T19:37: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": "ebbb9d3336e...
178bdad4-1be4-45d6-845e-5e7972cb1544
shashwat0105/CPP-Data-Structures-and-Algorithms
01 (Mathematics(Number Theory) & Arrays) & Sliding Window/Arrays/19) containerWithMostWater.cpp
https://leetcode.com/problems/container-with-most-water/ class Solution { public: int maxArea(vector<int>& height) { int n = height.size(); int res=0; int l = 0; int r = n-1; while(l<r){ int left_height = height[l]; int right_height ...
ALGO
0.999997
7.182257
{ "github_metadata": { "branch": "master", "commit_count": 225, "repo_created_at": "2021-01-23T10:22:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "b2655461...
c3fa0345-42b9-4390-9dab-e5b46b8a9904
hameem008/Competitive_Programming
Codeforces_and_others/Digital_Logarithm.cpp
/* "I would never fall in love again until I found her" I said, "I would never fall, unless it's you I fall into" I was lost within the darkness, but then I found her I found you ---Until I Found You lyrics from my favourite song */ #i...
ALGO
0.999878
4.307892
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-06-02T07:22: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": "ab86676b0beb...
21a7bf10-4ad2-4069-b35e-784abf960eb3
aliemadabdo/CPP-with-The-Cherno-
Problem_sloving/8_linked_list/31. Reverse Linked List/mine.cpp
#include <iostream> #include <vector> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class Solution { public: ListNode* reverseList(Li...
ALGO
0.999971
6.313205
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2024-08-18T00:06: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": "761d810efbc...
5ca0a18f-932f-49f8-8846-ffe08dab52b5
ishandutta2007/codeforces-g
geothermal/normal/1237/D.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pai...
ALGO
0.999829
3.685696
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:55: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": "73b75a2c5dd5...
815fcf04-0cfe-4a3d-acf7-9176c327924e
vij-duggirala/ds_algos
tree/lca_bst.cpp
Node * util ( Node *root , int n1 , int n2) { if(!root) return NULL; if( n1 == root->data || n2 == root->data) return root; if( n1< root->data && n2<root->data ) return util ( root->left , n1 , n2); if( n1>root->data && n2>root->data) return util( root->right, n...
ALGO
0.999987
5.450912
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-02-11T18:10: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": "293b76c0b...
4c88760e-2185-422a-9437-b45f35f0295d
Nemat-Allah-Aloush/Parallel_Programing_Codes
MPI_Gobal_14.cpp
#include <cstdlib> #include <iostream> #include "mpi.h" using namespace std; #define n 1000 void smod5(void* a, void* b, int* l, MPI_Datatype* type) { int i; for (i = 0; i < *l; i++) ((int*)b)[i] = (((int*)a)[i] + ((int*)b)[i]) % 5; } void max_fun(void* in, void* inout, int* l, MPI_Datatype* dtp) { for (int i = ...
ALGO
0.999956
3.777055
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2021-12-15T09:09:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1db5c22a1...
98ea4405-cea9-416a-a651-c4b23a446693
MZT-DW/SG-EMTF
data process/源.cpp
#include<iostream> #include<string> #include<fstream> #include<time.h> #include<sstream> using namespace std; /* float Weierstrass() { float result_1 = 0; for (int j = 0; j <= 20; ++j) { result_1 += powf(0.5, j) * cosf(2 * 3.1415926 * powf(3, j) * 0.5); } return result_1; } float W_para = Weierstrass(); int ma...
DATA
0.990669
3.332443
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-07-06T03:55: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": "cf66efc55c7...
940f68f2-9ecb-4947-aaa9-2f6f9eedbf5d
luzhen-linux/test
162.find-peak-element.cpp
/* * [162] Find Peak Element * * https://leetcode.com/problems/find-peak-element/description/ * * algorithms * Medium (38.84%) * Total Accepted: 147.9K * Total Submissions: 380.7K * Testcase Example: '[1,2,3,1]' * * A peak element is an element that is greater than its neighbors. * * Given an input ar...
ALGO
0.999921
5.439521
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2018-02-02T23: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": "fa986967c...
2f76529f-d61a-488e-9abf-8e106ef52441
buckeye-cn/ACM_ICPC_Materials
solutions/kattis/naq24/bikesandbarricades_hcz.cpp
// https://open.kattis.com/problems/bikesandbarricades #include <cstdlib> #include <cstdint> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.precision(10); int n; ...
ALGO
0.999547
3.846518
{ "github_metadata": { "branch": "master", "commit_count": 1094, "repo_created_at": "2017-09-09T18:26:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 40, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bfcf03...
c948838e-3f14-4050-b643-16a8e3166ef2
mathisre/VMC-bosons2
testwhy/Hamiltonians/hamiltonian.cpp
#include "hamiltonian.h" #include "../WaveFunctions/simplegaussian.h" #include "../system.h" #include "../particle.h" #include "vector" #include <iostream> using namespace std; Hamiltonian::Hamiltonian(System* system) { m_system = system; } double Hamiltonian::computeNumericalDoubleDerivative (std::vector<Partic...
ALGO
0.99915
3.528861
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2018-01-26T14:41: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": "c220f17b9...
21b01bbd-112c-41ad-828b-6f10ace077d4
hello-fri-end/Genetic-Algorithm-TSP
OpenMp - Parallelization/main.cpp
#include "Point/point.hpp" #include "Genetic-Algorithm/path_representation.hpp" #include "Genetic-Algorithm/Crossover/crossover_base.hpp" #include "Genetic-Algorithm/Crossover/random_crossover.hpp" #include "Genetic-Algorithm/Crossover/partially_mapped_crossover.hpp" #include "Genetic-Algorithm/Crossover/uniform_partia...
ALGO
0.999897
4.759118
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2021-09-12T04:12: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": "0341a22e8...
85b83105-0b42-43a3-afbb-c62f351d3232
tmaswang03/CP-Solutions
CSES/Traffic Lights.cpp
#include<bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #define boost() cin.tie(0); cin.sync_with_stdio(0); #define scan(x) do{while((x=getchar())<'0'); for(x-='0'; '0'<=(_=getchar()); x=(x<<3)+(x<<1)+_-'0');}while(0) #define REP(i, N) for(int i = 0; i < N; ++i) #define ms(a,b) memset(a...
ALGO
0.999974
3.583
{ "github_metadata": { "branch": "main1", "commit_count": 102, "repo_created_at": "2021-04-10T04:27: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": "f4ef0e82c...
69d7c44f-b02d-451b-b9ca-d893e23a7023
Spr1te76/-llvm
Release/ConstantSubstitution.cpp
#include "llvm/IR/Function.h" #include "llvm/IR/Module.h" #include "llvm/Pass.h" #include "llvm/Support/raw_ostream.h" #include "llvm/IR/Instructions.h" #include "llvm/Support/CommandLine.h" #include <vector> #include <cstdlib> #include <ctime> #include "Utils.h" #include"ConstantSubstitution.h" using namespace llvm; u...
TOOL
0.953401
6.249932
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-08-04T14:45:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "005777a4be6c...
8d65274d-7528-47b2-9120-d3fb58bda5ed
Yefri97/Competitive-Programming
Training/ITMOx Course/Semana 4/B.c++
/* * ITMOx Course - 3nd Week Problems * Problem: Inversions * Level: Easy */ #include <bits/stdc++.h> #define endl '\n' using namespace std; ifstream fin("input.txt"); ofstream fout("output.txt"); long long inversions(int A[], int l, int r) { // Base case if (l + 1 == r) return 0; // Split long long ta...
ALGO
0.999984
4.927605
{ "github_metadata": { "branch": "master", "commit_count": 378, "repo_created_at": "2016-06-01T01:51:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de4ca83c...
90fed266-a09e-4931-8d68-93e34286bd47
AL2423287/LopezAmos_CIS5_47948
Hmwk/CIS-5_Assignment_5/Gaddis_9thEd_Chap6_Prob8_CoinToss/main.cpp
/* * File: main.cpp * Author: <NAME> * Purpose: Simulate coin toss. Use function coinToss to toss coin * and return to function main * Created on November 11, 2018, 9:02 PM */ //System Libraries #include <iostream> //I/O Library #include <cstdlib> //srand and rand #include <ctime> //time using namespace st...
ALGO
0.993448
5.361815
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-11-15T20:13: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": "43c44c4685...
ab60188e-2335-4c43-8321-f517857c7587
satyampandey9811/competitive-programming
2. Leetcode/medium level/382. shortest path in binary matrix.cpp
// link to question - https://leetcode.com/problems/shortest-path-in-binary-matrix/ class Solution { public: int shortestPathBinaryMatrix(vector<vector<int>>& a) { if(a[0][0]) return -1; int m = a.size(), n = a[0].size(), len = 1; vector<vector<bool>> vis(m, vector<bool>(n)); ...
ALGO
0.999985
5.497321
{ "github_metadata": { "branch": "master", "commit_count": 1478, "repo_created_at": "2019-08-20T10:43: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": "7221b65...
bf398d34-5948-44c9-a6cf-d0e291db80ee
Arijeet1729/AlgorithmsDesignAndAnalysis
7.job_scheduling.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef struct job { string name; int profit; int deadline; } jobs; // Sort jobs by profit in descending order bool comparator(job j1, job j2) { return j1.profit > j2.profit; } // Find the maximum deadline in the job li...
ALGO
0.999944
5.344161
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-04-22T08:54: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": "d3540d2305bc...
e82418c2-438d-493f-85c5-429b1ca04bd5
TanishKumarDev/Problem-Solving-DSA
Hashing/1. 2sum.cpp
#include <bits/stdc++.h> using namespace std; // Variety 1 - Return true/false if any pair exists with sum = target // Variety 2 - Return the indices of the two elements // 🔴 Brute Force (Variation 1): Check all pairs (i, j) // TC: O(n^2), SC: O(1) bool twoSumBruteV1(vector<int>& arr, long long target) { int n =...
ALGO
0.999905
6.307596
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2025-03-31T06:57: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": "5dbef552f1d...
b06c4b48-2fce-4499-bf57-97e28814d81b
akshat123436/DSA_questions
GCDPRF.cpp
#include <bits/stdc++.h> using namespace std; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define MOD 1000000007 #define MOD1 998244353 #define INF 1e18 #define endl "\n" #define pb push_back #define ppb pop_back #define mp make_pair #define ff first #define ss second #define PI 3.1...
ALGO
0.999873
4.456681
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2023-06-05T07:39: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": "1b9401754...
e3fb83ef-7535-4163-83ef-bcd52dda41b2
MohamedElbashar/ProblemSolving-Archive
shageer sheets/Sagheer pubil sheet/Math/AdHoc 2/389 - Basically Speaking.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<pi> vpi; #define EPS 1e-9 #define PI 3.1415926535897932384626433832795 #define pb push_back #define mp make_pair #define all(v) v.begin(),v.end() #define ...
ALGO
0.999115
3.285364
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2017-09-26T00:02: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": "23eafb5b8...
43d0acd5-f3a4-45e9-a8ce-7f34a14c968a
kaidul/Solved_programming_problems_Online_judges
uva/11307 ALTERNATIVE ARBORECSENCE/main.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <vector> #include <stack> #include <queue> #include <map> #include <algorithm> #include <climits> using namespace std; /** state: dp[i][j] - minimum color sum at node i colored color j transition: dp[i][j] += min(dp[k][l]), f...
ALGO
0.999565
3.510223
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2014-02-02T22:14:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9f53f3cf...
fb41b60f-4e77-4737-ade4-7f1e171d736e
NeverWait/algorithm
sort/sortTree.cpp
/***************************************************** > File Name: sortTree.cpp > Author: Yonqi > Mail: <EMAIL> > Created Time: 2016年03月22日 星期二 21时08分56秒 > 二叉排序树 即给定一个序列建立一个二叉排序树,二叉排序树不允许重复值 > 时间复杂度:O(nlogn) > 注意:每次插入的元素一定是叶子节点; > 删除时,若是叶子节点直接删除;若只有左/右子树则直接用左/右节点代替它的位置;若有两个孩子的话左子树的最右值代...
ALGO
0.999982
4.370702
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-03-22T02:39:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00ca247f2...
289fb1e7-1130-4907-b7d1-1c5f29b32454
OI-wiki/OI-wiki
docs/graph/code/graph-matching/bigraph-weight-match/bigraph-weight-match_1.cpp
#include <algorithm> #include <cstring> #include <iostream> #include <list> using namespace std; using LL = long long; constexpr LL INF = (LL)1e15; constexpr int MAXV = 105; int N, mateS[MAXV], mateT[MAXV], p[MAXV]; LL u[MAXV], v[MAXV], slack[MAXV]; LL W[MAXV][MAXV]; bool m[MAXV]; list<int> Q; void readMatrix() { c...
ALGO
0.999893
4.017405
{ "github_metadata": { "branch": "master", "commit_count": 12101, "repo_created_at": "2018-07-11T03:28:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23612, "forks": 4310, "issues": 112, "pull_requests": 9 }, "file_meta": { "content_id":...
0bc5b0ef-a8df-4787-b7f6-090350c90eed
Cyberius8/Simple-CPP-Program
Simple Math Disc V2.cpp
#include <iostream> using namespace std; int gcd(int a, int b) { if (a == 0 || b == 0) { return a + b; } while (b != 0) { int temp = b; b = a % b; a = temp; } return a; } int modulo(int a, int b) { return (a % b + b) % b; } int moduloInverse(int a, int m) { ...
ALGO
0.998795
5.123251
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-15T10:53: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": "4209ebb165d2...
2ce19082-f3f0-44fe-8d76-7bc94f615b0a
sajjadhussains/problem_solving
hacker_rank/nth_prime.cpp
#include <bits/stdc++.h> using namespace std; vector<int> sieve(int upper_limit) { vector<bool> is_prime(upper_limit + 1, true); vector<int> primes; for (int p = 2; p * p <= upper_limit; ++p) { if (is_prime[p]) { for (int i = p * p; i <= upper_limit; i += p) { is_prime...
ALGO
0.999968
5.301794
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-12-08T22:31: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": "ffec7e7e703...
6c0926b9-0e5b-4f6f-9421-e3b0c04d166f
mattjr/structured
vcgapps/numeric_stuff/TAUCS/generic/taucs_ccs_ooc_lu.inc
/*********************************************************/ /* TAUCS */ /* Author: <NAME> */ /* */ /*********************************************************/ #include <stdio.h> #includ...
TOOL
0.970785
3.129334
{ "github_metadata": { "branch": "master", "commit_count": 1457, "repo_created_at": "2013-06-16T23:23:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 15, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "e31ce...
0c2b7fb7-1ec7-4af0-9553-35b23b648007
Ankur-2003/CPP-BinaryTree
LevelOrderTraversal.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node *left; Node *right; Node(int data){ this->data = data; this->left = NULL; this->right = NULL; } }; vector<vector<int>> LevelOrder(Node* root){ vector<vec...
ALGO
0.999993
5.443852
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-02-01T03:34: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": "b03feb61f27f...
617db343-b1df-47eb-b9a6-24b582da5976
Kunalgarg108/CP
CP Lab/Week3/Lab3Q2.cpp
#include<bits/stdc++.h> using namespace std; vector<int> HeapSort(vector<int> &arr,int n,int k){ priority_queue<int,vector<int>,greater<int>> pq; for(int i=0;i<k;i++){ pq.push(arr[i]); } int j=0; vector<int> ans(n); for(int i=k;i<n;i++){ int node=pq.top(); pq.pop(); ...
ALGO
0.999987
4.236807
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-07T04: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": "a188151fde5e...
f52b8f6c-3f76-4301-b399-ebae5107f396
mumumu6/kyopro
atcoder/typical90/021/gpt.cpp
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using mint = modint998244353; using ll = long long; #define rep(i, n) for (ll i = 0; i < (n); i++) #define reps(i,a,b) for(ll i = (a); i < (b); i++) bool chmin(auto& a, auto b) { return a > b ? a = b, 1 : 0; } bool chmax(auto&...
ALGO
0.999878
4.899108
{ "github_metadata": { "branch": "main", "commit_count": 197, "repo_created_at": "2024-06-21T10: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": "fe70685877...
fad0fbd3-c3a2-45ce-8a0a-e6a1f0e6becf
Masoudas/educational_material
CPPMaterial/ATourOfC++11/Specialization_25/TemplateParametersAndArguments_1/2_2_4_operations_as_template.cpp
/** * As we already know, operations can be supplied as as templates too, and this is what we normally do in std * containers. For example, consider the following simplified version of map: * template<typename Key, Class V> * class map { * // ... * }; * * Note that we can't hardwire a comparison (using the <), nor ca...
TOOL
0.997462
6.80203
{ "github_metadata": { "branch": "main", "commit_count": 546, "repo_created_at": "2021-02-20T10:59: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": "f955bcf5be...
01b566aa-19e8-423c-bd9c-3559c05f338f
isunchy/cuboid_abstraction
cext/src/octree_conv_op.cc
#include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/shape_inference.h" #include "tensorflow/core/framework/common_shape_fns.h" #include "cuda_runtime.h" #include "octree.h" namespace tensorflow { void init_neigh_index(OpKernelContext* ctx, Te...
ALGO
0.992619
6.646493
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-08-29T07:34:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 10, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "05861e8...
446580fd-64a1-4dc7-ad7e-8861518e3f8f
infinit/elle
range-v3/include/range/v3/view/for_each.hpp
/// \file // Range v3 library // // Copyright <NAME> 2014-present // // Use, modification and distribution is subject to the // Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Project home: https://github.com/ericniebler/range...
TOOL
0.905849
7.274417
{ "github_metadata": { "branch": "master", "commit_count": 18330, "repo_created_at": "2016-02-14T00:38:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 475, "forks": 43, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "9248...
69594a90-6fb1-4ce4-9431-28086eb64faa
JeromeHou27/LeetCode
LeetCode/LeetCode_222.h
#pragma once #include <iostream> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} ~TreeNode() { if (left != nullptr) delete left; if (right != nullptr) d...
ALGO
0.999881
5.574767
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-11-08T01:55: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": "5fbf6c7ac84...
91d3cd80-3697-430a-b2b7-ee4ee8fc2eed
naxingyu/opensmile
src/include/rnn/rnnVad2.hpp
/*F*************************************************************************** * * openSMILE - the Munich open source Multimedia Interpretation by * Large-scale Extraction toolkit * * This file is part of openSMILE. * * openSMILE is copyright (c) by audEERING GmbH. All rights reserved. * * See file "COPYI...
ALGO
0.958856
7.390121
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-09-08T02:31:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 217, "forks": 79, "issues": 34, "pull_requests": 1 }, "file_meta": { "content_id": "1a079...
60522b75-7a39-4def-b01f-55bf1f279533
XyeHyin/vscode
newcoder/weak1/a.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define PII pair<int, int> #define dbg(x) std::cout << #x << ":" << x << " " #define MP make_pair #define PB push_back #define rep(i, x, n) for (int i = x; i <= n; i++) #define dep(i, x, n) for (int i = x; i >= n; i--) #defi...
ALGO
0.999937
3.308592
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-07-02T00:53: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": "38302ed38760...
31eb26ab-9203-4b4b-8671-9dcac9226e54
haxpor/comppuva
Leetcode/3/main.cpp
/** * Problem 3 - Longest Substring Without Repeating Characters * * Format of testcase.txt is as follows * * ---- start of testcases.txt file format ---- * Number of testcases * TC#1 Input string (NUL for empty string) * TC#1 Expect output * TC#2 ... and so on * ---- end of testcases.txt file format ---- * ...
ALGO
0.998964
5.932622
{ "github_metadata": { "branch": "master", "commit_count": 158, "repo_created_at": "2019-09-13T07:18: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": "548b7503...
e3294aa9-869d-4872-ac2b-fda649c52ba9
Z-Other-Languages/C_and_CPP
Doubts_are_Here/Solved✌✌✌/Passing_int_value_as_address.cpp
/* !Error. Only two array are passing arr[0] and arr[1] and gettion error when passing third array arr[2] Solution : Bhai array hamsa pass by reference hota hai ... *Pointer lagane ki jrurat nhi */ #include<iostream> using namespace std; void pass_integer(int *arr) { arr[0] = 545; ...
TOOL
0.939153
3.362015
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2021-08-08T19:20:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f01b84c5ce57...
e357e908-59e2-492d-999d-308bce86578c
Sumanth-NR/CompetitiveProgramming
Platforms/CodeForces/Rounds_0951-1000/CFR_0961_Div2/C_Squaring.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; void solve() { int n; cin >> n; vector<int> a(n); for (auto &x: a) { cin >> x; } reverse(a.begin(), a.end()); while (not a.empty() and a.back() == 1) { a.pop_back(); } reverse(a.begin(), a.end()); ...
ALGO
0.999855
4.257586
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2022-04-18T13:29: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": "a701aca8...
dc2a3de0-fb10-413a-ab54-e8c0005b5ac6
201311113/BaekjoonCode
BruteForce_code/연구소_14502.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<cstring> #include<string> #include<cstdio> #include<stack> #include<algorithm> #include<cmath> #include<vector> #include<queue> #include<ctime> #include<set> using namespace std; int N, M; int map[9][9]; bool chk[9][9]; //bfs에서 쓰임 queue<pair<int, int>> virus_a...
ALGO
0.999787
3.728716
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2019-07-24T09:54: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": "e75fb7d3...
499f163c-f786-44f5-9f7d-b684076a436d
abhijitmanna912001/DSA-Problem-Solving
DP/WordBreak.cpp
#include <iostream> #include <vector> #include <unordered_set> using namespace std; class Solution { public: // M4- Boundary Substring Bottom Up DP int wordBreak(string &s, vector<string> &dictionary) { unordered_set<string> wordSet(dictionary.begin(), dictionary.end()); int n = s.size(); ...
ALGO
0.998993
5.592844
{ "github_metadata": { "branch": "main", "commit_count": 379, "repo_created_at": "2024-07-20T11: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": "c05b655f4d...
b7807a02-a18f-4141-a793-ecce0ffeccfc
sachuverma/DataStructures-Algorithms
Leetcode Daily Challenge/March-2021/22. Vowel Spellchecker.cpp
/* Vowel Spellchecker ================== Given a wordlist, we want to implement a spellchecker that converts a query word into a correct word. For a given query word, the spell checker handles two categories of spelling mistakes: Capitalization: If the query matches a word in the wordlist (case-insensitive), then th...
ALGO
0.998992
6.67466
{ "github_metadata": { "branch": "master", "commit_count": 1430, "repo_created_at": "2020-10-07T10:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2049, "forks": 541, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "44...
0cdf8d52-4462-4402-8b33-8c07fca11c6f
jun-pac/PS
240705/8set/D.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define cediv(a,b) ((a)%(b)==0?((a)/(b)):((a)/(b))+1) #define rng(i,a,b) for(int i=int(a);i<=int(b);i++) #define rep(i,b) rng(i,0,b-1) #define gnr(i,b,a) for(int i=int(b);i>=int(a);i--) #define per(i,b) gnr(i,b-1,0) #define pb push_back...
ALGO
0.99994
4.492606
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-02-19T18:00: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": "ff1496f0e27...
f6da9c54-d9d7-48ba-994d-0bcadf3d77b1
koalaink/hdoj
hdoj/1879.cpp
#include<iostream> #include<memory.h> #include<stdio.h> using namespace std; const int INF = 0xffffff ; const int MAX = 105 ; int matrix[MAX][MAX] ; bool visit[MAX] ; int cost[MAX] ; int n ; int Prim( int s = 1 ){ int i , j ; int ans = 0 ; for( i = 1 ; i <= n ; ++i ){ cost[i] = matrix[s][i] ; visit[i] = false ...
ALGO
0.999937
3.471563
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-11-30T15:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01077ac3f4...
769bd90b-4549-4177-aa34-00e681bc7cd7
apple/swift-lldb
packages/Python/lldbsuite/test/functionalities/type_completion/main.cpp
//===-- main.cpp ------------------------------------------------*- C++ -*-===// // // 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 // //===---------------------------...
TOOL
0.939688
4.553425
{ "github_metadata": { "branch": "stable", "commit_count": 31524, "repo_created_at": "2015-10-23T21:13:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 672, "forks": 195, "issues": 0, "pull_requests": 10 }, "file_meta": { "content_id": "de...
14736d8e-13af-4fa6-b27d-87cb1ac6f59d
TnkPpj/nodejs_nogdb
src/traverse.cc
#include <nogdb/nogdb.h> #include "classFilter.hpp" #include "txn.hpp" #include "toV8type.hpp" #include "traverse.hpp" NAN_MODULE_INIT(Traverse::Init) { v8::Handle<v8::Object> t = v8::Object::New(v8::Isolate::GetCurrent()); Nan::SetMethod(t, "inEdgeBfs", inEdgeBfs); Nan::SetMethod(t, "outEdgeBfs", outEd...
TOOL
0.930174
6.614378
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-07-17T05:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2440cbd07c...
5c2e54a1-b503-436b-800f-fdc5092ec911
AlejandroFrndz/FP
Guión 7/Ejercicio 8.cpp
//Programa que lee un vector de caracteres y elimina los elementos repetidos #include<iostream> using namespace std; int main() { const int MAX = 1000; char V[MAX]; int UtilV, encontrado; cout << "Introduzca el tamaño del vector "; cin >> UtilV; if(UtilV > MAX || UtilV < 0) { do { cout << "El tamaño ...
ALGO
0.99925
3.51057
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-02-04T17:01: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": "403bbb6cf2...
3a5c455a-70ff-4d27-93ac-53403fe6fe4a
vbonnici/grafe-sim
analysis/data/p02262/s825963735.cpp
#include <iostream> #include <vector> using namespace std; void fnInsertionSort(vector<int> &a_rviSort, int a_iGap, int &a_riSortCnt) { for (int ixSorting = a_iGap; ixSorting < a_rviSort.size() ; ixSorting++) { int iTarget = a_rviSort[ixSorting]; int ixSorted = ixSorting - a_iGap; while (ixSorted >= ...
ALGO
0.999923
4.074825
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-07-10T13:21: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": "950501474a3...
04dcd6ab-aa76-4396-8105-c835f67894cc
omkarsp45/DSA
104.cpp
// Iterative Method Of Binary Search Algorithm #include <iostream> using namespace std; class FindElement { private: int *arr, mid; public: void setArray(int size) { arr = new int[size]; for (int i = 0; i < size; i++) { cout << "Enter Element : "; cin >> ar...
ALGO
0.999996
5.581905
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-10-28T17:41: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": "4328c1a739b...
17103f50-03d7-4e5c-aa1e-e474bcb3e29c
MuditPandey/Computer-Graphics
Tidy and Tider Tree/tree.cpp
#include "tree.h" #include "primitives.h" #include <math.h> #include <gl/glew.h> #include <GL/GL.h> #include<cstdlib> #include <GL/glut.h> #include <iostream> #include<time.h> #include<vector> #define rr 10 #define MINSEP 50 #define YSCALE 30 using namespace std; primitives p; /*! Returns the maximum of the two number...
ALGO
0.996081
3.036467
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-03-02T10:19:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7cdf331f61...
333b28e8-dd33-4db0-9441-36d218a47e0a
ebang091/Baekjoon
백준/Silver/1010. 다리 놓기/다리 놓기.cc
#include <stdio.h> #include <iostream> #include <vector> #include <algorithm> #include <math.h> #include <queue> #define MAX 1005 using namespace std; int N, M, T; long long nums[MAX][MAX] = { 0, }; int save; void calculate() { for (int i = 0; i <= 30; i++) { for (int j= 0; j <= i; j++) { if (j == 0) nu...
ALGO
0.999915
3.714604
{ "github_metadata": { "branch": "main", "commit_count": 266, "repo_created_at": "2022-10-19T13:36: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": "244ff5fa5e...
c0032eb6-4e68-4f6e-8534-ae5adaea4f96
kukkadapudheeraj/Algorithms
Fractional Knapsack.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Item{ int value; int weight; }; // } Driver Code Ends //class implemented /* struct Item{ int value; int weight; }; */ struct newItem{ int value; int weight; double ratio; }; bool compareRatio(newItem a,newItem b...
ALGO
0.99999
5.338077
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-02-07T20:37: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": "92430848e51...
d7d7b01c-fec5-4cd6-97ab-250475de7714
mmorshedulislam/03-Basic-Data-Structures-Phitron
Week - 05 - Binary Tree/19.5 - Week 05 - Practice day 02/3.Leaf-Similar_Trees.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.999904
6.109739
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2024-06-11T03:12: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": "5f9d37d34...
ab838728-e83c-4d19-9615-f0a9de962c6c
ZVGorshkov/Test1
Test1/Source.cpp
#include <algorithm> #include <span> #include <array> #include <iostream> #include <fstream> #include <string> #include <vector> #include <Windows.h> using namespace std; void main() { srand(time(0)); SetConsoleCP(1251); SetConsoleOutputCP(1251); const int size = 10; int arr[size]; for (int i = 0; i < size; ...
TOOL
0.985194
4.033874
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-04-04T14:52: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": "af0d2654037b...
b976dbb9-ebf2-4bdd-bee7-70f11f3b4c99
ShortTailLab/ph-open
proj.android/jni/puzzleHero/platforms/android-9/android/view/ViewConfiguration.hpp
/*================================================================================ code generated by: java2cpp author: <NAME>, mailto://<EMAIL> class: android.view.ViewConfiguration ================================================================================*/ #ifndef J2CPP_INCLUDE_IMPLEMENTATION #ifndef J...
CONFIG
0.924172
3.468094
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2014-08-20T03:23:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 518, "forks": 332, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "0d353f...
699ddf95-bfa1-4382-9638-1c3301e6cf08
rogerlasch/3d-Engine
gpp_physics/geometry/Sphere3d.cpp
#include<cmath> #include"geometry.h" using namespace std; namespace gpp { Sphere3d::Sphere3d(decimal radius, Transform* transform) : GeometricShape(GTYPE_SPHERE, transform), radius(radius) {} string Sphere3d::toString() const { stringstream ss; ss<<fixed; ss.precision(2); quaternion q=transform->getOrientation...
ALGO
0.954473
6.189534
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2022-08-20T00:23: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": "f8c3e6190d2...
457eb04c-fc18-4ee7-9892-6073db23adad
yasuhiroinoue/celldynamics
restructure/cellrearrangement2.cpp
/*****************/ // 2D Vertex Model // <NAME> (<EMAIL>) /*****************/ #include "../restructure.h" #include "../_class.h" #include "../vec.h" #include "../_parameters.h" #include <iostream> #include <algorithm> #include <utility> #include <vector> #include <cassert> #include <cmath> namespace restructure { vo...
ALGO
0.98638
3.949517
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2020-11-27T23:27: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": "d882f1999b6...
d90cc541-bb85-49f5-8c7b-8bf7c48bf2b9
ConRoXP/object_oriented_programming_cpp_uniwa
(Evolved)A5.cpp
/* I modified A5 to be an actual usable program instead of a demonstration of functions. The differences from the exam version are marked in comments. */ #include <iostream> #include <vector> #include <fstream> #include <sstream> using namespace std; class Entry{ private: string word; string definition...
TOOL
0.982165
4.535428
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-12-25T23:47:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb44beb970e...
697a53cf-612c-4f2b-9d3f-3d041ae2a1c1
AlexaVD/Programming-Concepts-and-Methodology-II
Lesson 5 - Introduction to Vectors/Source.cpp
#include<iostream> #include<vector> using namespace std; int main() { //declarations vector<int> stats; int userNum; int userChoice = 1; char wantToContinue = 'y'; while (wantToContinue == 'y'|| wantToContinue == 'Y') { cout << "1 - add a number to the vector" << endl; cout << "2 - remove the last number o...
TOOL
0.919366
3.942997
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2022-10-13T01:33: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": "79fb6bba366...
90413697-7fd9-4843-8e56-89b9865e33f9
ZhanXix/wangdao-training-camp
C++/teach/day5_MutexLock/TestThread.cc
#include "MutexLock.h" #include "Condition.h" #include <iostream> using std::cout; using std::endl; int ticket = 200; int flag = true; wd::MutexLock gmutex; wd::Condition gcondition(gmutex); //wd::MutexLock gmutex2(gmutex);//要让该语句不能编译通过 void * windows1(void *arg) { int cnt = 20; while(cnt--) { //使用...
TOOL
0.937664
4.787858
{ "github_metadata": { "branch": "master", "commit_count": 631, "repo_created_at": "2019-06-06T06:26:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 7, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "fde43ec...
78b7a0be-a946-4428-84e7-e16e72ad20de
Cgfyufsygsm/OI-Codes
Atcoder/ABC213F.cpp
#include <cstdio> #include <cstring> #define FOR(i, a, b) for (int i = a; i <= b; ++i) #define DEC(i, a, b) for (int i = a; i >= b; --i) typedef long long ll; const int maxn = (1000000 * 2) + 5; int sa[maxn], rk[maxn], oldrk[maxn], id[maxn], cnt[maxn], ht[maxn]; char s[maxn]; int n, m; inline bool cmp(int i, int j, ...
ALGO
0.999984
3.619248
{ "github_metadata": { "branch": "main", "commit_count": 169, "repo_created_at": "2021-04-21T12:27: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": "5933147690...
c649a694-bbeb-4512-880a-9bc329420a26
yusooo/BOJwithC
002748.cpp
#include<stdio.h> int main(){ int n; scanf("%d", &n); long long arr[91]={0,1}; for(int i=2;i<=n;i++){ arr[i]=arr[i-1]+arr[i-2]; } printf("%lld", arr[n]); return 0; } /* #include <stdio.h> long long fibo(int n){ 피보나치 함수 선언 long long fiboNum[2] = {0, 1}; 피보나치 배열 1, 2번째 값 정의 for (int i ...
ALGO
0.999977
3.760602
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2022-03-07T13:02: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": "c876088f8...
506384ba-34de-4b7b-81a3-d43f64bab534
Kushagra164/My_own_CSES_Solutions_and_DSA_Sol
Movie_Festival_II.cpp
// #include <bits/stdc++.h> // #define rep(i,a,b) for(int i = a; i < b; i++) // #define ll long long // #define pb push_back // #define all(a) a.begin(),a.end() // #define MOD 1000000007 // using namespace std; // Code By Kush // void solve() { // int n,k; // cin >> n >> k; // vector<pair<int,int>> arr(n...
ALGO
0.999993
5.138012
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-09-17T16:09: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": "04a29b80512...
d00a5758-77e1-46d2-94d7-f4bc0ee247f8
Harshitrai01/DSA-GFG-Solutions
Medium/Sorting Elements of an Array by Frequency/sorting-elements-of-an-array-by-frequency.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //Complete this function //Function to sort the array according to frequency of elements. static bool compare(pair<int,int> i1, pair<int,int> i2){ if(i1.first==i2.first) ...
ALGO
0.999991
5.973313
{ "github_metadata": { "branch": "main", "commit_count": 462, "repo_created_at": "2023-02-05T08:21:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ab0c203c6...
21c5532b-c306-454d-9b74-3a573853c6e0
gustav0leal/MonkeysLIB
solutions/String/aho.cpp
const int K = 26; struct node { int fim = 0,p,link = 0,elink = -1,len; int go[K] = {0},nxt[K] = {0}; node(int p=0,int len = 0) : p(p),len(len) {}; }; vector<node> t(1); void add_string(string const& s) { int v = 0; for (char ch : s) { ch-='a'; if (!t[v].nxt[ch]) { t[v].nx...
ALGO
0.999969
3.957359
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-30T21:57:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "071fd83887ba...
e87ca225-cd57-4728-8437-770b7b5d7c2b
shubhgkr/leetcode
recursion/1137.cpp
/* * @author <NAME> (shubhgkr) * github: http://www.github.com/shubhgkr * Created on 8/24/20. * Problem link: https://leetcode.com/problems/n-th-tribonacci-number/ */ #include <vector> using namespace std; vector<int> ans; class Solution { public: void recursion(int n) { if (ans.size() <= n) { recursion(n...
ALGO
0.999801
5.528268
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2020-08-20T12:56:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d556462b...
3ee9b50d-5388-4a4f-8720-3771aa8dfc8d
kunidesuyo/competitive-programming
ABC/251~300/264/C.cpp
#include <bits/stdc++.h> #include <cmath> #define all(x) (x).begin(),(x).end() using ll = long long; const ll INF = 1LL<<60; const int inf = INT_MAX / 2; using namespace std; int main() { string s; cin >> s; string at = "atcoder"; int ans = 0; for(int i = 0; i < at.length(); i++) { char a = at[i]; ...
ALGO
0.999467
3.768976
{ "github_metadata": { "branch": "master", "commit_count": 332, "repo_created_at": "2021-05-23T09:30:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c33fd45e...
f26a97ef-9841-4ad9-8c30-be722beb622d
dcsuka/leetcode
3D_Rain_Water.cpp
#include <iostream> #include <vector> #include <algorithm> #include <chrono> #include <queue> using namespace std; using tup = tuple<int ,int, int>; class Solution { public: int DIR[5] = {-1, 0, 1, 0, -1}; int trapRainWater(vector<vector<int>>& heightMap) { int m = heightMap.size(), n = heightMap[0]....
ALGO
0.99997
6.006849
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2022-09-24T02:38: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": "cf21e7c81...
14035979-d66a-4738-aec1-7786667acd10
UrbanCee/Advent_of_Code
Cpp/2024/day8.cpp
#include "../Common/Advent_of_Code.h" #include <iostream> #include <fstream> #include <filesystem> #include <cmath> #include <iterator> #include <numeric> #include <unordered_map> #include <set> #include <sstream> void output(std::vector<char> playfield, int height, int width) { for (int y=0;y<height;y++){ ...
ALGO
0.997979
4.643343
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2024-12-07T21:21: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": "257e555be...
dceae49b-1ddc-4b04-ae55-c1bad2fa8bb6
lacrimak3/study_notes
PS/BOJ/11097.cpp
#include <iostream> #include <cstring> #include <algorithm> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; const int SIZE = 301; int N, M, cnt, SN, tc; int dfsn[SIZE], sn[SIZE], sg[SIZE][SIZE]; bool fin[SIZE]; vector<int> g[SIZE]; vector<vector<int>> scc; stack<int> st; int ...
ALGO
0.999964
3.702909
{ "github_metadata": { "branch": "master", "commit_count": 145, "repo_created_at": "2019-05-27T05:49: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": "72ad19f0...
8112142c-2ab4-4feb-9007-7c972a4f3867
surpise/Problem-Solving
백준/Silver/6064. 카잉 달력/카잉 달력.cc
#include <iostream> #include <algorithm> using namespace std; int main(){ int t, m, n, x, y; cin >> t; for(int tc = 0; tc < t; tc++){ cin >> m >> n >> x >> y; int s = 1; for(int i = 2; i <= min(m, n); i++){ if(m % i == 0 && n % i == 0){ if(i > s) s == i;...
ALGO
0.999979
3.85155
{ "github_metadata": { "branch": "main", "commit_count": 592, "repo_created_at": "2023-03-12T07:11: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": "7fe83479a6...
fb56027b-6c40-4dd0-a96d-ebd403b0429c
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1243/Standings1/29769088_64389408.cpp
#include <bits/stdc++.h> using namespace std; string to_string(bool x) { return x ? "true" : "false"; } string to_string(char x) { return string(1, x); } string to_string(string s) { return '"' + s + '"'; } string to_string(const char *s) { return to_string((string) s); } template<typename A, typen...
ALGO
0.999975
4.466462
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "507f13c3f...
1a99313a-b65e-47ee-85d2-ef043e355aba
neverlee/acm
HOJ/ACWithName/10370-虫食算.cpp
//10370-虫食算.cpp #include <cstdio> #include <cstring> #include <algorithm> #include <cstdlib> using namespace std; int nhex; char exp[3][40]; int *order[40]; int ref[40]; bool used[40]; int mode[40];//-1无效,0无进位,1有进位 void init() { int i, j; scanf( "%d", &nhex ); scanf( "%s%s%s", exp[0], exp[1], exp[2] ); for( i=0; i...
ALGO
0.999875
3.256138
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-07-16T07:06: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": "137e4e2ef3...
b07d6d91-7901-4049-bb70-7e21329cc08f
Csully01/DisbeliefTests
kdRaycasting.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Point { float x, y, z; }; struct Node { Point point; Node *left; Node *right; }; Node *buildKDTree(vector<Point> &points, int depth = 0) { if (points.empty()) return nullptr; int axis = depth % 3;...
ALGO
0.999602
5.109688
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-30T21:52: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": "e35044631259...
1f70a555-85b7-491e-8d2f-5b8d4aee98a3
Mitsun0bu/42-CPP_Piscine
module09/ex02/PmergeMe.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* PmergeMe.cpp :+: :+: :+: ...
ALGO
0.996049
6.058238
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2022-06-29T09:18: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": "969ef43ed...
2161fc03-288d-4cad-8ca0-0a60a9e12c2a
CRLab/geodesic_comparison
include/integral.h
#ifndef INTEGRAL_H #define INTEGRAL_H #include <stdlib.h> #include <vector> #include <algorithm> #include <cmath> #include <iostream> #include <fstream> #include <cstring> #include <numeric> #define PI 3.1415926535897 using namespace std; //functions for getting median of list bool sort_l2h(double i, double j); dou...
ALGO
0.96165
4.446632
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-02-07T21:50:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a1900b982...
329ebc59-78cb-4854-92a6-7e8e8c0b5d0e
paridhigulati/LeetCode
743-network-delay-time/743-network-delay-time.cpp
class Solution { public: int networkDelayTime(vector<vector<int>>& times, int n, int src) { vector<pair<int,int>> adj[n+1]; for(int i=0; i<times.size(); i++){ adj[times[i][0]].push_back({times[i][1], times[i][2]}); //we have stored the data in adj list } p...
ALGO
0.999991
5.615072
{ "github_metadata": { "branch": "main", "commit_count": 2292, "repo_created_at": "2021-03-13T07:26: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": "1bc8f9a29...
8bc34bf9-bfc8-464a-98e4-309173680d34
GaussGreen/old-code
JP/code/drlib/products/src/LHPADensityPrior.cpp
//---------------------------------------------------------------------------- // // Group : Quatitative Research // // Filename : LHPADensityPrior.cpp // // Description : Probability density prior using large homogeneous pool approximation // Currently supports Gaussian Copula // // Author : ...
ALGO
0.988293
5.420606
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-02-17T09:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "568d146ab1c2...
961cc1ef-6bd5-4223-9a5a-f73df21d9605
osama-afifi/RBF-Radial-Basis-Function-Network
RadialBasisFunctionNetwork/KmeansPP.cpp
#include "KmeansPP.h" using namespace std; KmeansPP::KmeansPP(const std::vector<datapoint> &input_data) : input_data(input_data), random_index_gen(0, input_data.size()-1), random_real_gen(0, 1), random_engine(rd()) {} KmeansPP::~KmeansPP(void) {} vector<vector<int> > KmeansPP::RunKMeansPP(int K, vector<datapoint>...
ALGO
0.999894
5.549177
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-05-02T21:17:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 18, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c79edf...
41790277-7f15-4fab-8aa2-3463a6a5afc0
vurusovs/openvino
src/plugins/intel_cpu/src/nodes/common/permute_kernel.cpp
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "permute_kernel.h" #include <vector> #include <ie_parallel.hpp> #include <dnnl_types.h> #include <dnnl_extension_utils.h> #include "cpu_memcpy.h" #include "utils/bfloat16.hpp" #include "cpu/x64/jit_generator.hpp" #include...
ALGO
0.999126
7.109081
{ "github_metadata": { "branch": "master", "commit_count": 8696, "repo_created_at": "2020-05-26T09:10:32.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "openvinotoolkit/openvino", "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "...
9f1c82a7-06a7-43af-8fd2-4185f8358cf1
vikram-rathore1/competitive_programming
codechef/MAR17/SCHEDULE/7_brute_old_opt.cpp
#include <bits/stdc++.h> using namespace std; int t, n, k, occ, tmp, min_block_size; vector<int> freq; string sch; int max_occ(string s) { int occ = INT_MIN, this_occ; this_occ = 1; for (int i = 1; i < s.length(); i++) { if (s[i] == s[i - 1]) this_occ++; else { occ = max(occ, t...
ALGO
0.999932
4.883764
{ "github_metadata": { "branch": "master", "commit_count": 407, "repo_created_at": "2016-08-13T20:39: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": "e869b8da...
7b62feaf-63e4-4196-ad6b-d9e732f7df14
ajaysoni12/Love-Bubber-450-DSA-Sheet-Solutions
5-LinkedList/147-compute.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node *next; Node(int x) { data = x; next = NULL; } }; /* method 1 (brute force approach-using two loops) */ Node *compute(Node *head) { // some edge cases if (head == nullptr or head->next == nullptr) ...
ALGO
0.999994
5.042682
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-01-25T05:55:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cd1cb81d74...