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
aed33ce8-dc11-4b58-ae0d-acfc33603d95
MarpleJane/KickStart
odd/CCI/RecursionAndDynamicProgramming/recursiveMultiply.cpp
#include <iostream> #include <vector> using namespace std; // recursive int recursiveMultiply(int a, int b) { if (a == 0) return 0; else if (a == 1) return b; int left = a / 2; int right = a - left; return recursiveMultiply(left, b) + recursiveMultiply(right, b); } int multiply(int a, int...
ALGO
0.999957
4.648213
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-07-12T05:57:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "3391c65ea...
fde1b27d-6490-4494-a886-ea3b670b0001
theksbd/Coding_Challenge
C++/Codewars/EqualSidesOfArray.cpp
// success // https://www.codewars.com/kata/5679aa472b8f57fb8c000047/train/cpp #include <iostream> #include <string> #include <math.h> #include <iomanip> #include <list> #include <vector> #include <stack> #include <queue> #include <map> #include <algorithm> using namespace std; int find_even_index(const vector<int> n...
ALGO
0.999734
5.400925
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2022-02-02T13:54: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": "6b30c725...
096eb00b-84ae-4a0d-8ed5-1f1bcbf42eff
1105Lakshya/DSA-TOPIC-WISE
17_BINARY_SEARCH_TREE.CPP/14_LARGEST_BST_IN_A_BINARY_TREE.CPP
// #APPROACH /* WE WILL RETURN SIZE, MAX VALUE ,WEATEHR THAT NODE IS A BST OR NOT , MIN VALUE IN ORDER TO CHECK FOR ANY NODE WE WILL CHEKK WEATHER LEFT PART IS BST && RIGHT PART IS BST && CURRNODES DATA SHOULD BE LESS THAN THE MINMUM VALUE OBTAINED FROM ITS RIGHT AND SHOULD BE GREATER THAN MAXIMUM VALUE OBTAINDED FR...
ALGO
0.99992
5.648645
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-07-12T17:47:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "53948080a6de...
96bac087-0b6e-48d1-b99e-bc41b01fba90
vespa-engine/vespa
searchlib/src/vespa/searchlib/queryeval/exact_nearest_neighbor_iterator.h
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "searchiterator.h" #include "nearest_neighbor_distance_heap.h" #include <vespa/eval/eval/value.h> #include <vespa/searchlib/fef/termfieldmatchdata.h> #include <vespa/searchlib/tensor/i_ten...
ALGO
0.995481
7.36371
{ "github_metadata": { "branch": "master", "commit_count": 91001, "repo_created_at": "2016-06-03T20:54:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6249, "forks": 649, "issues": 204, "pull_requests": 15 }, "file_meta": { "content_id": ...
35e8fd67-44f6-4724-a5e0-14fd4cca4e5f
evenvalue/atcoder
abc335_e.cpp
#include <bits/stdc++.h> using namespace std; #ifdef evenvalue #include "debug.h" #else #define debug(...) #endif using int64 = long long; using ld = long double; template<typename T> using min_heap = priority_queue<T, vector<T>, greater<T>>; template<typename T> using max_heap = priority_queue<T, vector<T>, les...
ALGO
0.99995
3.980828
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2021-04-30T18:13:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9906eab1...
9f196430-7d27-467d-8c3b-67a082c779c1
MATHUR-LUV/crypto
Assignment 5/task2.cpp
#include <iostream> #include <vector> #include <string> #include <unordered_map> using namespace std; // Function to generate the Playfair matrix from the key vector<vector<char>> generateMatrix(const string& key) { string alphabet = "ABCDEFGHIKLMNOPQRSTUVWXYZ"; unordered_map<char, bool> used; vector<vect...
ALGO
0.999874
6.931026
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-12-08T21:07: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": "7f7ba97b52d7...
cc37d2d8-6d6b-4bde-8312-b6ca77b53e4a
iganna/lspec
ugene/src/plugins_3rdparty/hmm2/src/hmmer2/checksum.cpp
/***************************************************************** * HMMER - Biological sequence analysis with profile HMMs * Copyright (C) 1992-2003 Washington University School of Medicine * All Rights Reserved * * This source code is distributed under the terms of the * GNU General Public License. See the f...
ALGO
0.999008
5.185585
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2018-01-26T20:51: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": "5477548ff...
bc8c0179-bfbe-4652-ad78-6dd651ad54f2
jinchengKuang/leetcode
cpp/Binary_Tree/0106_Construct_Binary_Tree_from_Inorder_and_Postorder_Traversal.cpp
#include <vector> using namespace std; 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), left(left), right(right) {} }; /...
ALGO
0.999994
6.465713
{ "github_metadata": { "branch": "main", "commit_count": 274, "repo_created_at": "2021-04-22T03:52: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": "773ee8ac32...
8c235be6-d122-4717-ae9f-1e46c83691b4
tianmn2109/leetcode
code_c++/86/86.cc
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *partition(ListNode *head, int x) { ListNode *smallHead = NULL; ListNode *largeHead = NULL; ListNod...
ALGO
0.999997
5.493406
{ "github_metadata": { "branch": "master", "commit_count": 403, "repo_created_at": "2015-01-08T01:55:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ebd8d9f...
2f39b382-8878-4c72-ae83-6a1418a56c3e
rushioda/PIXELVALID_athena
athena/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ ////////////////////////////////////////////////////////////////// // ForwardKalmanFitter.cxx // Source file for class ForwardKalmanFitter /////////////////////////////////////////////////////////////////// // (c) ATLAS Detector software...
ALGO
0.995368
6.658872
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-01-19T03:53: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": "dafe1d91b7...
2f6aa221-6da0-4099-afc0-c9eb870285a0
DbettKK/AmpereSparseMatmul
9.spmma/spmma.hpp
#include<iostream> #include<fstream> #include<cuda_runtime_api.h> // cudaMalloc, cudaMemcpy, etc. #include<cuda_fp16.h> #include<cstdio> #include<cstring> // memset #include<cstdlib> // malloc #include"utils.hpp" using namespace std; /* src: device IN dest: device OUT (need to allocate) */ templ...
DATA
0.973299
3.953835
{ "github_metadata": { "branch": "main", "commit_count": 374, "repo_created_at": "2021-12-14T08:50:15.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "lenLRX/AmpereSparseMatmul", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "co...
ddc1f408-9436-4ade-b847-5f1f1c922961
mfranberg/besiq
libs/besiq/stats/normal_models.cpp
#include <besiq/stats/normal_models.hpp> using namespace arma; normal_full::normal_full() : closed_form_model::closed_form_model( 9 ) { } log_double normal_full::prob(const arma::mat &count) { arma::vec mu_full = count.col( 0 ) / count.col( 1 ); arma::vec residual = count.col( 1 ) % mu_full % mu_full - 2 * ...
ALGO
0.998559
6.076437
{ "github_metadata": { "branch": "master", "commit_count": 272, "repo_created_at": "2013-08-26T13:50:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab931464...
a0d55fa0-238c-4129-bd13-087153c90364
lab104yifan/ACM
zoj/824b.cpp
#include <cstdio> #include <cstring> #include <vector> #include <algorithm> using namespace std; const int N = 10005; int n; vector<int> g[N]; int dfs(int u) { int sz = g[u].size(); vector<int> save; for (int i = 0; i < sz; i++) save.push_back(dfs(g[u][i])); sort(save.begin(), save.end()); sz = ...
ALGO
0.999659
3.80196
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2013-09-13T08:21:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c47a79571...
e5788662-6686-4869-995b-c7a7257f5c81
IndieVisualLab/UnityGraphicsProgrammingBook1
articles/MarchingCubes.re
= 雰囲気で始めるマーチングキューブス法入門 == マーチングキューブス法とは? === 歴史と概要 マーチングキューブス法とは、ボリュームレンダリング法の一つで、スカラーデータで満たされた3次元ボクセルデータを、ポリゴンデータに変換するアルゴリズムです。<NAME> と <NAME> によって1987年に最初の論文が発表されました。 マーチングキューブス法は特許が取得されていましたが、2005年に特許が切れているので、現在は自由に使用できます。 === 簡単な仕組みの解説 まず、ボリュームデータの空間を3次元グリッドで分割します。 //image[marching_cubes_001@4x][3次元ボリュームデ...
ALGO
0.998597
3.825387
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-04-26T06:25:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 5, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "27680bdd5f5...
09e369ca-e682-47e0-8116-174157d12526
GOPIS28/c_plus0522
pro (101).cpp
#include <iostream> using namespace std; int main() { int rows1, cols1, rows2, cols2; cout << "Enter the number of rows for the first matrix: "; cin >> rows1; cout << "Enter the number of columns for the first matrix: "; cin >> cols1; cout << "Enter the number of rows for the second matrix: "; ...
ALGO
0.999777
4.949959
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-05-14T07:41: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": "c9acdd69079a...
7b30e826-f866-402a-9b1d-0987c1dcc831
Char1sk/AlgorithmContestBook
Book/Unit3/Example3.3/Palindromes.cpp
#include <iostream> #include <string> char getMirroredChar(char c) { const std::string mirrorString("A***3**HIL*JM*O***2TUVWXY51SE*Z**8*"); if (isalpha(c)) { return mirrorString[c-'A']; } else { return mirrorString[c-'0'+25]; } // switch (c) // { // case 'A': ...
ALGO
0.999379
4.439389
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2021-03-12T07:42:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68876b08...
ab244f2a-cecb-42ff-b41b-34dd781104e2
ChandlerNgo/CP
CSCE430 Lab #1/H.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; while(n != 0){ int pile1 = 0; int pile2 = 0; while(n--){ string command; int amount; cin >> c...
ALGO
0.999237
4.165945
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-01-13T16:44: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": "90e8dbd40c0a...
8761aa9c-5c6c-409a-9eb4-31bd339eb0fe
kawin789/c-_tasks
TRANNING-kawin-main/TRANNING-kawin-main/divisor.cpp
#include <iostream> using namespace std; void findDivisors(int n) { int divisors[100]; // Example fixed size int count = 0; for (int i = 1; i <= n; ++i) { if (n % i == 0) { divisors[count++] = i; } } cout << "The divisors of " << n << " are: "; for (int i = 0; i <...
ALGO
0.99921
5.142431
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-04T04:10: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": "d06a395af17f...
e8cde7e9-5e19-4a03-87f3-b515c9e987d4
sneakyHulk/its
visualization/deprecated/DrawingUtils.h
#pragma once #include <OpenDriveMap.h> #include <common_output.h> #include <Eigen/Eigen> #include <algorithm> #include <autodiff/reverse/var.hpp> #include <autodiff/reverse/var/eigen.hpp> #include <map> #include <opencv2/opencv.hpp> #include <random> #include <ranges> #include <vector> #include "Config.h" #include "...
TOOL
0.937795
5.871737
{ "github_metadata": { "branch": "master", "commit_count": 323, "repo_created_at": "2024-07-01T13:00:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d7cab8a...
33e62eae-2449-449f-aad6-1707c2db4618
Aman-droid/CP_Essentials
CODES/C1_k_LCM_easy_version_.cpp
#include<bits/stdc++.h> #define ll long long #define endl '\n' #define rep(i,a,b) for(int i=a;i<=b;i++) #define pll pair<ll,ll> #define pii pair<int,int> #define vpll vector<pll> #define SZ(x) ((int)x.size()) #define FIO ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL) #define watch(x)cout<<(#x)<<" is "<<(x...
ALGO
0.99993
4.147429
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-06-28T19:31: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": "0b286eb266...
af170cba-cb70-44c6-8edf-4e42dc41a9cb
JosephLovato/advent-of-code
day-6b.cpp
#include <algorithm> #include <iostream> #include <fstream> #include <vector> #include <sstream> #include <unordered_set> #include <unordered_map> #include <bitset> #include <map> // #include <math> using namespace std; class lantern_fish { public: lantern_fish(int t, int i): timer(t), id(i) {}; int timer; ...
ALGO
0.974037
4.262768
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-01-12T05:49:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "703474746742...
dc00cd9c-03fb-4103-84ec-a01f02c56e93
Benedicte/FYS9411_project1
HF_program/HF.cpp
/** HF.cpp Purpose: Programming a very basic HF program @author <NAME> @version 1.1 01/11/16 */ #include <iostream> #include <armadillo> using namespace arma; using namespace std; /** @param bond_length the bond length og the diatomic. zeta_atom_1 The slater orbital exsponent for function 1...
ALGO
0.995425
3.740978
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-01-19T15:47: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": "29bb779b62...
d422477f-7c3a-4f86-9792-135bcbcfa4be
ANA-CNU/ANA-Daily-Algorithm
이수민/2568.cpp
#include <bits/stdc++.h> using namespace std; typedef struct { int a; int b; }st; bool compare(st a, st b) { return a.a < b.a; } int num[500001]; int check[500001]; int main() { int t,a,b; vector<st> v; vector<st> arr; //for(int i=0; i<500001; i++) num[i] = check[i] = 0; scanf("%d",&t); ...
ALGO
0.999965
3.125787
{ "github_metadata": { "branch": "main", "commit_count": 3037, "repo_created_at": "2022-03-01T01:05:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf47531b...
91b25b6a-b4b8-4b90-9198-aa75b38f5851
4z0t/extended-math-library
extended math library/legacy/Ubit.cpp
#include "Ubit.h" #define max(a,b) ((a) > (b) ? (a) : (b)) #include <iostream> using namespace std; char num_len(uint32_t num) { char i = 0; while (num) { num >>= 1; i++; } return i; } sum smart_sum(const uint32_t& n1, const uint32_t& n2) { sum result; result.num = n1 + n2; result.rest = (result.num < max(n1...
ALGO
0.999364
3.966872
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2021-12-24T11:03: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": "e8acfd969...
a93257a1-e93f-406d-a24d-9451e57c9fed
7oSkaaa/LeetCode_DailyChallenge_2023
01- January/25- Find Closest Node to Given Two Nodes/25- Find Closest Node to Given Two Nodes (Ahmed Gamal).cpp
// Author: <NAME> class Solution { public: // we need to find a common node that node1 and node2 that the maximum distance from them is the minimum possible // in similar problems we can use BFS to find the shortest path from node1 to each node and the shortest path from node2 to each node (dfs will give wron...
ALGO
0.999992
5.872384
{ "github_metadata": { "branch": "main", "commit_count": 6874, "repo_created_at": "2023-01-02T11:28:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 104, "forks": 86, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "d51fb3...
a9a630c4-0fa3-4474-9533-89decea6b9f6
ammarhakim/gkyl
Updater/DiscontPoissonImpl.h
// Gkyl ------------------------------------------------------------------------ // // C++ back-end for 2D FEM Poisson solver // _______ ___ // + 6 @ |||| # P ||| + //------------------------------------------------------------------------------ #ifndef DISCONT_POISSON_H #define DISCONT_POISSON_H #include <std...
ALGO
0.990074
5.429087
{ "github_metadata": { "branch": "main", "commit_count": 4960, "repo_created_at": "2019-11-11T14:48:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 74, "forks": 19, "issues": 31, "pull_requests": 1 }, "file_meta": { "content_id": "1314af...
0ecbad46-85bd-4158-804b-442ca03c02d2
shashwat-2077/LeetCode-100Days
0606-construct-string-from-binary-tree/0606-construct-string-from-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.999905
6.220571
{ "github_metadata": { "branch": "main", "commit_count": 542, "repo_created_at": "2023-08-08T03: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": "ae9fc67ebe...
09a85b53-026a-4cd6-ad2b-cb88fb5952fc
skyellen/robwork-mirror
RobWork/src/rw/pathplanning/QToTPlanner.cpp
/******************************************************************************** * Copyright 2009 The Robotics Group, The Maersk Mc-Kinney Moller Institute, * Faculty of Engineering, University of Southern Denmark * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file e...
ALGO
0.928357
5.793548
{ "github_metadata": { "branch": "master", "commit_count": 5380, "repo_created_at": "2019-01-12T02:01:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8c5286...
8b439b3f-afa8-4f5f-b8c5-ce6b36ac14d3
siamcodes/arduino-thinkpad
ATX2_TRAC_PID_4ADC/CN.ino
void CN1() //สนามที่บ้าน { Forward(SlowSpeed, 100); //เดินจากจุดเริ่มต้น 200 TracNormalJC(Speed, 30); //แทรกเดินเตรีียมเลี้ยว TurnRight(); //เลี้ยว TracNormalJC(ACCSpeed, 30); //ข้ามแยก TracNormalJC(Speed, 30); TurnRight(); //เลี้ยว TracNormalJC(Speed...
ALGO
0.998969
3.972816
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-03-09T16:53: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": "ab694451958...
2bee20eb-0f4f-4c9e-806e-382c2905a30a
gandhi56-zz/Competitive-Programming
codeforces/solved/405a.cpp
#define LIN cout << __LINE__ << endl; #define INF 0x3f3f3f3f #include <bits/stdc++.h> using namespace std; #define max(a, b, c) max(a, max(b, c)) #define min(a, b, c) min(a, min(b, c)) #define rep(i, a, b) for(int i = a; i < (b); ++i) #define trav(a, x) for(auto& a : x) #define all(x) x.begin(), x.end() #define sz(x) ...
ALGO
0.999994
4.449731
{ "github_metadata": { "branch": "master", "commit_count": 253, "repo_created_at": "2019-03-08T20:07: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": "3ff4b41e...
37e6cf1e-d673-46ac-a576-b1c7c55e6412
Kurorororo/mrw
src/trie.cc
#include "trie.h" #include <algorithm> #include <numeric> #include <iostream> #include <utility> #include <vector> #include "data.h" namespace mrw { void InsertToTable(int query, std::vector<var_value_t> precondition, const std::vector<int> &fact_offset, TrieTable *table) { int i = 0; int j =...
ALGO
0.938063
4.637533
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2017-04-23T09:18: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": "e608a11b9...
a6b07857-0dc3-4f6e-8554-bf2331ca1260
unit0113/projects
C_Playground/db_tutorials/3.cpp
#include <cstdlib> #include <iostream> #include <string> #include <vector> #include <numeric> #define NEWSECTION "****************************************" void new_section(); double add_numbers(double, double); void assign_age(int); void assign_age2(int*); std::vector<int> range(int, int, int); double calc_interest(...
TOOL
0.927681
4.348515
{ "github_metadata": { "branch": "main", "commit_count": 582, "repo_created_at": "2021-05-01T21:21:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "410ad319ca...
e70d200d-e4d0-46e1-8786-178b1e536aea
NestZ/competitive-programming
ThaiProgramming/TOI9Wizards.cpp
#include<bits/stdc++.h> using namespace std; #define endl '\n' typedef long long int ll; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int tx, ty;cin >> tx >> ty; int n;cin >> n; vector<pair<int, int>> a; vector<pair<int, int>> b; vector<pair<int, int>> c; vector<pair<int, int>> d; for(int i = ...
ALGO
0.999898
3.227662
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2019-01-23T05:34:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5f036d4...
1dd55b70-6583-4b08-b246-b1945bfff993
tenzingrabgyal/Udemy_DSA_Cpp
146-LetsCodeSparseMatrixUsingCppContinued/146-LetsCodeSparseMatrixUsingCppContinued/main.cpp
// // main.cpp // 146-LetsCodeSparseMatrixUsingCppContinued // // Created by <NAME> on 8/13/19. // Copyright © 2019 <NAME>. All rights reserved. // #include <iostream> using namespace std; class Element { public: // public so that they are directly accessible int i; // row number int j; // column numb...
ALGO
0.988891
4.650352
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-08-07T18:11:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 76, "forks": 33, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ef034b...
36a2355c-e931-42a2-bc3a-b5f5091861ac
Dhik/Pretest-04
Untitled1.cpp
/* Nama: <NAME> npm: 140810180075 tanggal pembuatan: 26 Maret 2019 Deskripsi: pretest 04 no :1 Kelas: A */ #include <iostream> using namespace std; struct elmntList{ char npm[14]; char nama[40]; float ipk; elmntList* next; }; typedef elmntList* pointer; typedef pointer list; void createList(list& first){ first=NU...
TOOL
0.914205
3.789303
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-03-26T01:27: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": "4f84771d61...
289f3b22-b03d-4ccb-af18-da9de0efb0cf
adrian-colombo/FATEC-Banco-de-Dados
C++/Algoritmos/Lista 006/Ex3.cpp
/* Ler 3 valores e um código de condição. Se o código for c' os valores devem ser escritos em ordem “crescente”. Se o código for ‘d’, ‘deve-se escrevê-los em ordem “decrescente”. */ #include <locale.h> #include <iostream> using namespace std; main (){ setlocale(LC_ALL,""); int num1,num2,num3; char ordem; c...
ALGO
0.9994
4.173701
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2021-11-26T02:15: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": "53cf0cde203...
d2940918-de4f-46a8-8d34-afd8312aad12
Kill-Nekarakubae/baekjun-dailly
kxxhyorim/beakjoon/graph/dfs/bj21922.cpp
#include <iostream> #include <vector> using namespace std; int n, m; // ㅅㅔ로, 가로 int map[2001][2001]; int isVisited[2001][2001]; int dx[4] = {0, 0, -1, 1}; int dy[4] = {-1, 1, 0, 0}; int direction[4] = {0, 1, 2, 3}; #define toUp 0 #define toDown 1 #define toLeft 2 #define toRight 3 // 상 == toUp == 밑에서 위로 // 우 == toR...
ALGO
0.999935
4.215372
{ "github_metadata": { "branch": "main", "commit_count": 249, "repo_created_at": "2023-07-01T12:16:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae6fd952168...
7b60ac5b-03ed-40b0-b5dd-05ee8e2cf8d1
AaronNGray/prop-cc
include/AD/sort/insort.h
////////////////////////////////////////////////////////////////////////////// // NOTICE: // // ADLib, Prop and their related set of tools and documentation are in the // public domain. The author(s) of this software reserve no copyrights on // the source code and any code generated using the tools. You are encourag...
ALGO
0.999954
5.711129
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2011-07-01T17:29:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 6, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4fb4bfcb...
4c50103e-889f-419b-8b21-c97f4b9a196a
cms-sw/cmssw
CalibPPS/AlignmentRelative/src/LocalTrackFitter.cc
/**************************************************************************** * Authors: * <NAME> (<EMAIL>) ****************************************************************************/ #include "CalibPPS/AlignmentRelative/interface/LocalTrackFitter.h" #include "CalibPPS/AlignmentRelative/interface/Utilities.h" #...
ALGO
0.98867
6.27677
{ "github_metadata": { "branch": "master", "commit_count": 251237, "repo_created_at": "2013-06-26T14:09:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1144, "forks": 4480, "issues": 947, "pull_requests": 108 }, "file_meta": { "content_id...
f8f7e7d4-7068-451b-9e4a-c1aa43ba69e7
kuangbin/ACM-ICPC
SGU/SGU198.cpp
/* *********************************************** Author :kuangbin Created Time :2014/11/10 20:16:21 File Name :D:\github\ACM-ICPC\SGU\SGU198.cpp ************************************************ */ #include <stdio.h> #include <string.h> #include <iostream> #include <algorithm> #include <vector> #include <...
ALGO
0.999793
3.974536
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2014-11-07T04:13:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 274, "forks": 50, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "863272...
09e2128d-0efa-41ee-b391-a133dfdddda6
andreasterrius/algos
archive/CF-717B.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <set> #include <unordered_set> #include <climits> #include <cmath> #include <queue> #include <algorithm> #include <stack> #include <string> using namespace std; typedef pair<int, int> pii; typedef long long ll; typedef unsigned long long ull; #de...
ALGO
0.999984
4.130636
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2021-03-14T03:49: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": "b02cfa3da...
6239ea58-cdaf-4641-9502-883b447310a0
ww5365/tiny_util
src/leetcode/cpp/leetcode_my/002_34_position_in_array.cpp
/* * Copyright (c) Technologies Co., Ltd. 2021-2021. All rights reserved. * Description: 文件功能描述 * leetcode 34 lintcode 38 34. 在排序数组中查找元素的第一个和最后一个位置 给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。 如果数组中不存在目标值 target,返回 [-1, -1]。   * */ #include "01_all.h" #include <stack> #include <vector> #inclu...
ALGO
0.999956
5.881507
{ "github_metadata": { "branch": "master", "commit_count": 777, "repo_created_at": "2016-02-19T06:33:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d70de389...
0e4e1c3f-1512-4e5d-ad1b-aac794918e45
svcool/origin
diplom/httpclient/indexator.cpp
#include <iostream> #include <fstream> #include <string> #include <regex> #include <locale> #include <algorithm> #include <cctype> #include <sstream> using namespace std; string clean_and_process_text(const string& html) { string no_nbsp = regex_replace(html, regex(R"(&[^;\s]*;)", regex::icase), " "); // Заменяе...
TOOL
0.930858
4.252826
{ "github_metadata": { "branch": "main", "commit_count": 160, "repo_created_at": "2024-03-28T14:29: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": "4e36388eef...
32e665e1-3a6e-4608-a644-f61b4bb80cb9
Compiler/AdventOfCode_2024
Demetri/Day8/DayEight.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <unordered_map> #include <vector> #include <unordered_set> #include "../Point.h" bool is_in_bounds(int W, int r, int c) { return !(r < 0 || r >= W || c < 0 || c >= W); } std::vector<std::vector<char>> read_in_map(const std::strin...
ALGO
0.999632
5.751437
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-12-01T09:32:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c77da237660...
854723f0-3588-406d-9278-f92a8aff27a5
Xiangyu-Hu/SPHinXsys
src/shared/particle_dynamics/configuration_dynamics/particle_sorting.h
/* ------------------------------------------------------------------------- * * SPHinXsys * * ------------------------------------------------------------------------- * * SPHinXsys (pronunciation: s'finksis) is an acronym from Smoothed Particle * * H...
ALGO
0.999363
6.658354
{ "github_metadata": { "branch": "master", "commit_count": 5288, "repo_created_at": "2019-05-28T17:05:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 406, "forks": 291, "issues": 29, "pull_requests": 28 }, "file_meta": { "content_id": "6...
abb0e8ef-71ff-4c16-bd42-47d94772b2b0
md-qubais/DSA_new_questions
pepcoding_direct_graph_levelup.cpp
#include<bits/stdc++.h> #define IOS ios_base::sync_with_stdio(false); cin.tie(NULL) #define int long long #define endl "\n" #define pb push_back #define p push #define fori(n) for(int i=0;i<n;i++) #define ford(n) for(int i=n-1;i>=0;i--) #define fl(x,n) for(int i=x;i<n;i++) #define Maxheap priority_queue<int> #define M...
ALGO
0.999994
4.4182
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-08-01T08:12: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": "38342d95a61...
a249b5a6-e151-4837-a837-98ef657a4d2c
LuisAlbertoVasquezVargas/CP
FAMAF/Round1/A.cpp
#include <bits/stdc++.h> using namespace std; #define sc( x ) scanf( "%d" , &x ) #define REP( i , n ) for( int i = 0 ; i < n ; i++ ) #define clr( t , val ) memset( t , val , sizeof(t) ) #define all(v) v.begin() , v.end() #define pb push_back #define SZ( v ) ((int)(v).size()) #define mp make_pair #define fi first #d...
ALGO
0.999872
3.612553
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-02-12T20:18: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": "2743f9fdf5...
d8d328d1-ead1-4c22-94be-db6e8e7c5d67
gcamargo96/Competitive-Programming
problem-solutions/codechef/2017/october/CHEFGP.cpp
#include <bits/stdc++.h> using namespace std; #define INF 0X3f3f3f3f #define M 1000000007 #define For(i,a,b) for(int (i)=(a);(i) < (b); ++(i)) #define mp make_pair #define pb push_back #define fi first #define se second #define endl "\n" #define PI acos(-1) typedef long long ll; typedef vector<int> vi; typedef vector<...
ALGO
0.999988
3.459473
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2016-08-23T18:09:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20a0e0670...
84dac794-7cbd-4a52-af8e-fbc5604ea646
snl-dakota/dakota-packages
acro/tpl/momhlib/MOMHLib/MO/momhsolution.h
/* Multiple Objective MetaHeuristics Library in C++ MOMHLib++ Copyright (C) 2001 <NAME> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation (www.gnu.org); either version 2.1 of the License, or (at...
ALGO
0.998484
6.16542
{ "github_metadata": { "branch": "devel", "commit_count": 279, "repo_created_at": "2021-08-17T16:15:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 6, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "85cd383055...
2d270cb3-5731-4bff-bff5-1932102ba646
NiceCharlesX/raHit
2d-algo/2DRAH/dp.cpp
#include "struct.hpp" void search_restricted_DP(int i, int j, Sol & sol, vector<int> const& PhiI, IntervalList const& IL, vector<vector<bool>> const& DDP, vector<vector<bool>> const& DRDP); void search_DP(int i, int j, Sol & sol, vector<int> const& PhiI, IntervalList const& IL, vector<vector<bool>> const& D...
ALGO
0.999919
4.600993
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-10-13T12:10: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": "48a663ca181...
2934396b-a63d-4ecb-833d-bafbe7b096b5
NikitinAleksander/Lab_algorithms
1 семестр/5/linkedmap.cpp
#include <iostream> #include <fstream> #include <stdlib.h> using namespace std; struct Node{ string key; string x; Node *prew, *next, *last, *sled; }; Node *cur = NULL; class List{ Node *Head, *Tail; long n = 0; public: List():Head(NULL),Tail(NULL){}; void add(string k,string x){ Node *...
ALGO
0.999078
3.869856
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-02-08T19:24:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e3fadf32...
6ceaf8e9-00da-41e2-9371-a4ef193d4b35
Riti0208/EscapeFromTheCity
コード/bossAction.cpp
/**************************************************************************** * タイトル: ボスAIの処理 * ファイル名:scene.cpp * 作成者: 芳崎大地 * 作成日: 2017/02/12 *******************************************************************************/ /******************************************************************************* * 更新履歴: * ***...
TOOL
0.980075
3.557721
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-05-10T01:47: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": "dbfbaa7295...
7a3cb79f-9934-4efa-8382-b7e49029eea2
AaryanGoswami04/Graph
DistanceofNearest0.cpp
//Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. class Solution { public: //TC: O(M*N) //SC: O(M*N) vector<vector<int>> updateMatrix(vector<vector<int>>& mat) { int n = mat.size(); int m = mat[0].size(); ...
ALGO
0.999992
6.395326
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2022-12-07T03:40: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": "6657cf782bc...
4592bedb-6b1d-49b8-951c-d13edb5dea44
lawrence8358/ESP32Lab
Lab8_RSA/RSA.h
#ifndef LawrenceLib_RSA_H #define LawrenceLib_RSA_H #define RSA_P 997 #define RSA_Q 1009 #define RSA_E 65537 #include<stdint.h> #include <stdio.h> class RSA { public: /** RSA參數 */ struct Params { uint64_t p; /**< 質數p */ uint64_t q; /**< 質數q */ uint64_t n; /**< RSA模數 */ uint64_t e;...
ALGO
0.985715
4.987151
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-03-28T09:12: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": "9ed8f6f25d6...
4fc5a60e-1df3-414e-9222-dc5a2f55a1bb
tmoux/prog-contests
codeforces/985/C/C.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <set> #include <math.h> using namespace std; typedef long long ll; const int maxm = 100005; int n, k, l; int main() { //ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n >> k >> l; multiset<int> s; for (int i...
ALGO
0.999893
3.610522
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2018-10-21T03:33:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0bac8e9...
49201c82-82cc-479b-994c-36f2339693fe
rishi10rana/dsa-rishi
LeetCode Problem's/Linked List/707. Design Linked List/Design_Linked_List.cpp
// Approach - 1 : Singly Linked List /* class Node{ public: int val; Node* next; // Constructor Node(int value){ this->val = value; this->next = NULL; } }; class MyLinkedList { public: Node* head; int size; MyLinkedList(){ this->size = 0; this->head...
ALGO
0.99997
5.69659
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-05-15T15:15: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": "f0e35cb3a30...
97d07c6e-b9a7-42d3-b807-153e75e42abe
sunilkumarswami/LeetCode-Pratice
Ceil The Floor - GFG/ceil-the-floor.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; pair<int, int> getFloorAndCeil(int arr[], int n, int x); int main() { int t; cin >> t; while (t--) { int n, x; cin >> n >> x; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; ...
ALGO
0.999891
5.668088
{ "github_metadata": { "branch": "main", "commit_count": 875, "repo_created_at": "2022-11-14T07:32: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": "554b3634ad...
1f4fea6c-ca47-4c5d-8298-2995b392ffc4
Bruce0A0Z/Monte-Carlo-Realization-Practices
MC_2D Numerical Integrals_Random Sample.cpp
#include <math.h> #include <iostream> #include <stdlib.h> #include <ctime> using namespace std; double f(const double& x, const double& y) { double numer = exp(-2 * x - 3 * y); double denom = sqrt(x * x + y * y + 1); double retval = numer / denom; return retval; } int main() { const double area = atan(1); /...
ALGO
0.99966
4.671031
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-09-03T14:40: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": "31ca19b05f6...
75762d76-52f0-4068-8a21-66a32cfda8ae
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/13_7143_11.cpp
/* Author: <NAME> * Date: 27-Apr-2013 * Email: <EMAIL> */ #include <iostream> #include <cstdio> #include <vector> #include <deque> #include <list> #include <set> #include <string> #include <cmath> using namespace std; typedef long long int ll; /* Basic Macros */ #define FOR(i, begin, end) for ( typeof(beg...
ALGO
0.999389
3.66895
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b34e0f45...
a2c86ef0-9248-46ce-866d-ee5355acb938
rosekc/cpp
acm/contest/2016/8.29/C.cpp
#include <cstdio> #include <algorithm> #include <cstring> using namespace std; #define lson l, m, rt << 1 #define rson m + 1, r, rt << 1 | 1 const int maxn = 50000 + 20; int col[maxn << 2]; int sum[maxn << 2]; void pushup(int rt) { sum[rt] = sum[rt << 1] + sum[rt << 1 | 1]; } void pushdown(int rt, int m) { if...
ALGO
0.999936
3.443403
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2016-10-17T14:39: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": "3eb443895...
45c4a001-e5d2-43a6-8ec7-ede525bfcfcb
enuguru/algorithms_and_datastructures
c++_programming/Data Structures Through C++/Source code/Chapter 05/Ch05pr01.cpp
// Program Ch05pr01 // Program to create a 3-tuple from a given matrix #include <iostream.h> const int MAX1 = 3 ; const int MAX2 = 3 ; class sparse { private : int *sp ; int row ; public : sparse( ) ; void create_array( ) ; void display( ) ; int count( ) ; void create_tuple ( sparse &s ) ; ...
ALGO
0.996695
4.276033
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-03-03T08:25:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f182b307c86...
6e6e0d93-b4fa-4ba7-8e34-daed4698ba23
atsuchak/Competitive-Programming
CodeForces/Problem Set/59A-Word.cpp
#include <bits/stdc++.h> using namespace std; void fastIO() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } #define ll long long #define vi vector<int> #define vl vector<ll> #define pii pair<int, int> #define pll pair<ll, ll> #define vpii vector<pii> #define vpll vector<pll> #define pb push_ba...
ALGO
0.999637
3.996514
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2025-04-29T16:04: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": "066ffb314fd...
cd38eca0-e0e7-454e-8aad-635fb22cb6ca
liardanc3/algorithm
cpp/1495.cpp
#include <bits/stdc++.h> using namespace std; int n, s, m, v[51], dp[51][1001]; int main() { cin >> n >> s >> m; for (int i = 1; i <= n; i++) cin >> v[i]; dp[0][s] = 1; for (int i = 1; i <= n; i++) { int now = v[i]; for (int next = 0; next <= m; next++) { if (dp[i - 1][next] && 0 <= now + next && now + nex...
ALGO
0.999997
3.73396
{ "github_metadata": { "branch": "master", "commit_count": 673, "repo_created_at": "2021-06-30T06:52: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": "e0e77c1b...
a018158d-30d1-424b-b2c1-2e1d9c2b0378
rverma999/wes237C
project2/phase_detector/HLS/phasedetector/phasedetector.cpp
/* Filename: phasedetector.cpp Phase detector INPUT: I: signal for I sample Q: signal for Q sample length: array size OUTPUT: R: Radius Theta: Angle */ #include "phasedetector.h" void phasedetector ( data_t *I, data_t *Q, data_t *R, data_t *Theta, int length ){ // Buffers for matc...
ALGO
0.998739
4.790217
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-10-11T22:11:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "422ca6eb626...
050d7f25-9f9f-4e82-b10d-821df4cca446
Roshanyadav1324/DSA_complete_codes
Hashing/HashingStart.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: // arr[]: input array // n: size of array //Function to return non-repeated elements in the array. vector<int> printNonRepeated(int arr[],int n) { //Your code he...
ALGO
0.999459
6.037457
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-03-11T00:23: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": "659f5bc54b9...
6e38fbd9-0937-4810-b2eb-8c356711db82
trilinos/Trilinos
packages/kokkos-kernels/ode/src/KokkosODE_Newton.hpp
//@HEADER // ************************************************************************ // // Kokkos v. 4.0 // Copyright (2022) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Governmen...
ALGO
0.998366
6.465088
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
1216eabe-8c08-4488-99dd-6d5e9b7baaf5
xbtan/ndnLibdash
ndn-cxx-ndn-cxx-0.5.0/src/security/transform/digest-filter.cpp
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /** * Copyright (c) 2013-2016 Regents of the University of California. * * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions). * * ndn-cxx library is free software: you can redistribute it and/or modify it under the ...
TOOL
0.947695
6.943368
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-12-02T05:12:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a6b718ae2...
9a8e2c41-6d33-4d9d-b0f4-6c0343c6abde
Viktoriaset/parallel
Laba-14/main.cpp
#include <iostream> #include <mpi.h> #include <math.h> using namespace std; int mass1[1000000]; int mass2[1000000]; void fillMassIdentity(int *mas, int len) { for (int i = 0; i < len; i++) { mas[i] = 1; } } int *getMassForProcess(int *mas, int masLen) { int *result = (int *)malloc(masLen * s...
DATA
0.997989
3.561521
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-11-21T07:57:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5eb4d4ecbf...
388e9e4c-c619-4fe0-ac82-b36a99435f39
mkn-root12/leetcode-DSA-solutions
209. Minimum Size Subarray Sum.cpp
// two-pointer O(N) class Solution { public: int minSubArrayLen(int s, vector<int>& nums) { int res = INT_MAX; int j = 0; int sum = 0; for (int i = 0; i < nums.size(); ++i) { while (j < nums.size() && sum < s){ sum += nums[j++]; ...
ALGO
0.999979
6.111317
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2021-10-09T09:15:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70aadde53c...
ef08ef20-c2ab-4e47-a298-be7e1eeb8449
anishagg17/Cses
Nearest Smaller Values .cpp
#include <iostream> #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define endl '\n' #define ll long long #define re register #define pb(x) push_back(x) #define ce(x) cout << x << endl; using db = long double; using pii = pair < int, int >; using ...
ALGO
0.9999
3.331382
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-12-08T18:45: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": "b11e32b427...
4f1fb5ef-f583-4092-9236-662d24c0ad1e
kassonlab/gmxapi
src/gromacs/linearalgebra/gmx_lapack/dgebd2.cpp
#include "../gmx_lapack.h" void F77_FUNC(dgebd2,DGEBD2)(int *m, int *n, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *work, int *info) { int i,i1,i2,i3; *info = 0; if(*m>=*n) { /* reduce to upper bidiag. form */ for(i=0;i<*n;i++) { i1 = *m - i; ...
ALGO
0.999803
3.846953
{ "github_metadata": { "branch": "master", "commit_count": 19315, "repo_created_at": "2017-05-25T14:05:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 53, "forks": 13, "issues": 93, "pull_requests": 2 }, "file_meta": { "content_id": "1fce...
39b865a9-b0be-44b1-b91f-077cdf3ae831
MijaelTola/icpc
JV/bomberman.cpp
#include <iostream> #include <cstring> using namespace std; int m[110][110]; int main(){ int n; while(cin >> n){ for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) cin >> m[i][j]; int ans = -1; for (int i = 0; i < n; ++i){ for...
ALGO
0.999965
3.61832
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-08-28T22:47: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": "f1491ed8b9...
c3ed6a53-62fa-4012-ae20-97d053cba300
da-lucky/CCI
CCI/lists/permutate.h
// // permutate.h // lists // // Created by <NAME> on 23.03.2018. // #ifndef permutate_h #define permutate_h #include <iterator> #include "node.h" template <typename T> Node<T>* permutate(Node<T>* listStart, const T& p) { if(nullptr == listStart) { return nullptr; } Node<T>* lowerPart =...
ALGO
0.999313
5.952901
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2018-03-20T12:37: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": "25dccdd1a...
2c0b2a8b-f7a0-4fb6-98aa-a6632595391f
he-lau/OpenCV
td4.cpp
#include <iostream> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> using namespace cv; using namespace std; // fonction pour déplacer une image Mat translateImg(Mat &img, int offsetx, int offsety){ Mat trans_mat = (Mat_<double>(2,3) << 1, 0, offsetx, 0, 1, offsety); warpAffine(img,img,trans_ma...
ALGO
0.961554
3.819971
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2022-02-18T21:16: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": "1357352ae...
42e5e6c6-c53c-4f5b-ad5c-a8cd73656378
ranjodhsingh1729/CodeForces-Solutions
Archives/Marked/1703F.cpp
#include <bits/stdc++.h> #define MAXLEN 100000 using namespace std; typedef long long ll; void init_io() { #ifndef ONLINE_JUDGE freopen(".streams/input.txt", "r", stdin); freopen(".streams/output.txt", "w", stdout); #endif } ll nlessthan(ll x, ll n, ll arr[]) { ll p, l = 0, h = n; while (l !=...
ALGO
0.99987
4.38085
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-04-05T10:27: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": "89f543c8f360...
9d6af50f-98d8-415f-a9af-05b38cf4db4d
7kia/CG
Task1/Lab1_2/Shedule/NormalDistribution.h
#pragma once #include <vector> #include <memory> #include <random> // Создано на основе http://stackoverflow.com/questions/28618900 class CClampedNormalDistribution { ////////////////////////////////////////////////////////////////////// // Methods public: // m_distribution требует два параметра: // `mean`, т.е....
ALGO
0.97697
5.568312
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2016-06-20T13:21: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": "2b9f5283...
fd611ba6-8598-4c33-9129-5114dc70d25b
BambooDay/OI
code/模拟赛/中考信心赛div2/三叉戟.cpp
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long const int N = 1e6+10; const int M = 1e4+10; const int INF = 0x3f3f3f3f; const int mod = 1e9+7; using namespace std; int n; struct Node{ char fa,l,r,mid; bool v; }node[150]; void yxx(int pos){ cout << char(pos); if(node[pos].l != '*' && n...
ALGO
0.999847
3.097705
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-10-07T03:51:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24b994292d0...
4f9b3ad6-33bd-40fe-bcc3-d66e04410324
kramer04/France-Ioi
Niveau 4/Exercices d'entraînement du niveau 4/Passage de cables/main.cpp
#include <iostream> #include <vector> #include <utility> #include <algorithm> int main() { std::ios::sync_with_stdio(false); int l, h, nbMurs; std::cin >> l >> h >> nbMurs; std::vector<std::pair<int, int>> mur; for (int i {0}; i < nbMurs; i++) { int ax, by, cx, dy; std::cin >> ax >> by >> cx >> dy; ...
ALGO
0.999966
3.505202
{ "github_metadata": { "branch": "main", "commit_count": 470, "repo_created_at": "2024-06-18T16:28: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": "db48d032e6...
badfb856-ae72-42a6-ae4b-5bd3d2d5da29
swilsonmelo/UVA--Online-Judge
sin asignar/903-spiralNumbers.cpp
#include <bits/stdc++.h> using namespace std; int x,y; void findNumber(int n){ int ini,pos,z; ini = 1; for(int i = 1; i < n+1; i += 2){ z = i*i; if(z>n){ ini = i; break; } } //printf("%d %d %d %d \n",ini,x,y,n); ini -= 2; pos = ini; x = i...
ALGO
0.99976
3.460215
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2017-12-21T15:19:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6578c77f8...
5f9b7f2e-c5a7-4697-8ce4-9a9796a2fcf9
naeem4265/Coding
codeforces/1932F.cpp
#include<bits/stdc++.h> #define Fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define Freed freopen ("0in.txt","r",stdin); #define Fout freopen ("0out.txt","w",stdout); #define ll long long int #define pb push_back #define pi acos(-1.0) const ll limit = 1e6+5; const ll Mod = 1e9+7; using namespace std; ll cnt[l...
ALGO
0.999985
3.241336
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2020-10-05T18:22:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e1b42e3...
4d34108c-936e-4c17-b809-949f4eea7183
shafayethossaing/XB
Week-10/Day-2/Sliding_Window_Median.cpp
#include<bits/stdc++.h> // PBDS #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define yes cout << "YES\n" #define no cout << "NO\n" #define endl "\n" #define ll long long int #define pub push_back #define pob pop_back #define puf push_front ...
ALGO
0.999994
3.923967
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-03-22T16:24: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": "32a64bd2c56...
6812ccca-68da-4a0a-a8be-dfb6364281c3
DLo930/Competitive-Programming
C++Tutorial/CLRS/Chapter2/existsSum.cpp
/* * Author: DLo930 * Date: 10/28/18 */ #include <iostream> #include <vector> using namespace std; void mergeArr(vector<int> &arr, int l, int m, int r) { int tmp[r-l+1]; int i=l, j=m+1, k=0; while(i <= m && j <= r) tmp[k++] = (arr[i] < arr[j]) ? arr[i++] : arr[j++]; while(i <= m) tmp[k++] = arr[i++]; while(...
ALGO
0.999951
4.724184
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-02-03T14:07: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": "846d7b2f6b...
0b85dc36-0645-4b81-bc5f-d20b2ada6224
cosmicray001/Online_judge_Solutions
uva/10921.cpp
#include <bits/stdc++.h> using namespace std; void fnc(char ch){ if(ch == 'A' || ch == 'B' || ch == 'C') printf("2"); else if(ch == 'D' || ch == 'E' || ch == 'F') printf("3"); else if(ch == 'G' || ch == 'H' || ch == 'I') printf("4"); else if(ch == 'J' || ch == 'K' || ch == 'L') printf("5"); else if(ch == 'M' ...
ALGO
0.999373
3.697215
{ "github_metadata": { "branch": "master", "commit_count": 291, "repo_created_at": "2018-01-08T00:53:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87bb25b6...
1af80f5d-2ae2-411d-a8c5-dbd3fb828208
neoml-lib/neoml
NeoML/src/TraditionalML/SMOptimizer.h
/* Copyright © 2017-2020 ABBYY Production LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
ALGO
0.998852
6.712168
{ "github_metadata": { "branch": "master", "commit_count": 1258, "repo_created_at": "2020-06-14T17:37:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 783, "forks": 127, "issues": 12, "pull_requests": 22 }, "file_meta": { "content_id": "57...
b91e9366-1edb-45a6-9103-bc6a2b1c3965
appris/appris
code/opt/hhsuite-3.0.0/hhsuite-3.0.0/src/cs/crf_state.h
/* Copyright 2009-2012 <NAME>, <NAME> This file is part of the CS-BLAST package. The CS-BLAST package is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opti...
TOOL
0.974226
7.579102
{ "github_metadata": { "branch": "master", "commit_count": 1678, "repo_created_at": "2016-05-19T09:07:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 8, "issues": 15, "pull_requests": 1 }, "file_meta": { "content_id": "80f00...
92f57ae0-e8a8-4550-ab4e-8bb691fbe727
siwang65/AQUABOT
main.ino
/* ---------------------------------------------------------------------------- PROJECT: AQUABOT C3 AUTHORS: <NAME> <NAME> <NAME> SCHOOL: UNIVERSITY OF ARIZONA COURSE: ENGR 498 2022 - 2023 * -------------------------------------------------------------...
TOOL
0.971649
4.7515
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-10-10T01:36: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": "7ac071e25fe2...
2223dbe2-fd7f-4415-9c75-aa78d5b2dfa6
cuitao111/Leetcode
queue/255.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <unordered_set> #include <algorithm> #include <stack> #include <memory> #include <queue> using namespace std; /* 将一个queue移动到另一个中 */ class MyStack { queue<int> q1; queue<int> q2; public: MyStack() { } void push(int x) {...
ALGO
0.999443
4.591562
{ "github_metadata": { "branch": "main", "commit_count": 198, "repo_created_at": "2022-02-11T04:43: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": "f62123f85d...
8ef5d50b-8d7a-426e-98d0-9b3ff1047423
jujubebat/problem-solving
cpp/Programmers/수식최대화.cpp
/* // [20/08/26] #include <string> #include <vector> #include <algorithm> #include <iostream> #include <set> using namespace std; vector<char> operPriority; set<char> s; long long cal(vector<long long> numbers, vector<char> operations) { for (char operation : operPriority) { for (int i = 0; i < operations.size(...
ALGO
0.999997
4.680696
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2020-02-26T06:23:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91e2f9d6...
d69c525a-02be-452f-9983-7e7c9ea1c369
rayhanulmukul/Structural-Programming-Language
@Contest && Codeforce/43A.cpp
#include <bits/stdc++.h> #include<vector> using namespace std; #define ll long long int #define ld long double #define pb push_back #define mp make_pair #define F first #define S second #define ft front() #define bk back() #define pi 2*acos(0.0) /// acos(-1) , 3.14159265359 const int MOD = 1e9+7; // 998244353; con...
ALGO
0.999979
3.674688
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2022-03-08T06:20:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "453b3648f...
b05f401e-a07d-4083-b02f-e6a336646260
PrikshitKumar/Data-Structure-Questions-For-Placement
11) Heap/13) Check if a Binary Tree is Heap.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int data; Node *left, *right; Node(int data) { this->data = data; left = right = NULL; } }; bool isHeap(struct Node* root) { if(!root) return 1; queue<Node *> q; q.push(root); bool nullNode = fa...
ALGO
0.996473
4.064356
{ "github_metadata": { "branch": "main", "commit_count": 286, "repo_created_at": "2022-03-10T19:28:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8d7e435e7...
4e322565-ef63-4ca0-b48c-3a68c39ccf11
Fortitude42/CompetitiveProgrammingArchive
Other Contests/KBTU_OPEN/D/a.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; //#define int long long //#pragma GCC optimize("Ofast") //#pragma comment(linker, "/stack:200000000") //#pragma GCC targe...
ALGO
0.999925
3.457774
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-08T16:52:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e5a5796bb06...
7dc9ecf7-ddf7-4dc1-ba45-a5123d660a1f
panteleev-ya/C-CPP
LeetCode/OtherTasks/PetyaCars/solution.cpp
#include <iostream> #include <vector> #include <map> #include <queue> #include <vector> using std::cin; using std::cout; using std::vector; using std::string; using std::map; using std::queue; using std::priority_queue; auto gucciGang = []() {std::ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);return ...
ALGO
0.999826
4.318636
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2020-03-11T11:35:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5220b59e6...
9df44ac3-fa4f-4724-8541-f89080187305
xingchen8800/xingchen8800.github.io
cppcode/CSP-S/d15/Prim堆优化.cpp
#include <bits/stdc++.h> using namespace std; #define INF 0x3f3f3f3f const int N = 5001, M = 200001; struct Edge { int v, w; }; vector<Edge> g[N]; //邻接表存图 int n, m; struct Cmp { bool operator()(Edge a, Edge b) { return a.w > b.w; } }; int vis[N]; int Prim() { memset(vis, 0, sizeof vis); ...
ALGO
0.99996
3.892305
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2024-05-19T08:58: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": "167e19b2e8...
b9bb9ad6-ef94-4e2c-aa95-d5df550bf9df
antlr/antlr4
runtime/Cpp/runtime/src/atn/ParseInfo.cpp
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. * Use of this file is governed by the BSD 3-clause license that * can be found in the LICENSE.txt file in the project root. */ #include <vector> #include <cstddef> #include "atn/ProfilingATNSimulator.h" #include "dfa/DFA.h" #include "atn/ParseInfo....
ALGO
0.919365
6.107021
{ "github_metadata": { "branch": "dev", "commit_count": 9401, "repo_created_at": "2010-02-04T01:36:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 18144, "forks": 3372, "issues": 868, "pull_requests": 157 }, "file_meta": { "content_id": "...
7bc2df67-b9b3-4282-8dfc-c19e43198aec
WyattERobinson/Leetcode-Submissions
2-add-two-numbers/add-two-numbers.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* addTwoNumbe...
ALGO
0.999979
6.535694
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2024-05-28T05:06: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": "fbff5e53bd3...
6d92f7ec-cab0-4986-9ad0-05f64ccb07bd
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/09/13/1.cpp
#include <algorithm> #include <string> #include <vector> #include <ctype.h> #include <math.h> //#include <iostream> //#include <set> //#include <map> //#include <sstream> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<int> vll; typedef vector<string> vs; #de...
ALGO
0.999858
3.618627
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a6426c13...
ece2b6bd-554d-4c96-b06f-3428afc7cdbf
JunChangM/ProblemSolving
백준/Gold/17387. 선분 교차 2/선분 교차 2.cc
#include <iostream> using namespace std; pair<int, int> d1, d2, d3, d4; // 선분 교차 알고리즘 : 외적을 통해 시계방향인지, 반시계 방향인지, 직선인지 판단함. long long ccw(pair<int, int> a, pair<int, int> b, pair<int, int> c) { long long res = (long long)(b.first - a.first) * (c.second - a.second) - (long long)(c.first - a.first) * (b.second - a.second...
ALGO
0.999984
4.125601
{ "github_metadata": { "branch": "main", "commit_count": 346, "repo_created_at": "2023-06-13T12:57: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": "c6a8b5c732...
9602c67b-3cfc-49cc-a414-9c8180b9e079
Parzival1509/GFG_POTD
2023/2023-06/GFG_POTD_2023-06-24_Prefix_Match_with_Other_Strings.cpp
// GFG POTD 2023/06/24 // Prefix Match with Other Strings // Medium #include<bits/stdc++.h> using namespace std; class Solution { public: int klengthpref(string arr[], int n, int k, string str) { map<string, int> mp; for(int i = 0; i < n; i++) if(k <= arr[i].size()) mp...
ALGO
0.999801
5.387804
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-06-01T09:54:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f71a27abcaf...
9a2c166c-abee-43c5-a925-5f52f3b1e922
alexandraback/datacollection
solutions_5686275109552128_0/C++/mcsharma1990/main.cpp
// // main.cpp // Codejam // // Created by <NAME> on 4/10/15. // Copyright (c) 2015 <NAME>. All rights reserved. // /* Author: Mahesh */ /* 1. Did u interpret the qns correctly ? 2. Is your i/o correct ? 3. Int overflow, double precesion 4. Array size correct ? 5. Clearing/resetting vector, map etc. 6. Stack...
ALGO
0.99996
4.205172
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "add4cab50...
8a947640-e1ad-42dc-85b0-c36ceac2622b
wkdehdlr/Doo-it
etc/삼성공채대비/삼성공채대비/BOJ 14888 연산자 끼워넣기(dfs).cpp
#pragma warning(disable : 4996) #include<cstdio> bool visit[11]; int num[12]; int res[11]; int op[11]; int N, idx = 1; int mn = 0x7fffffff, mx = -210000000; void func(int dep) { if (dep == N) { int idxx = 1; int num1 = num[1]; int num2 = num[2]; switch (res[idxx]) { case 1:num1 += num2; break; case 2:n...
ALGO
0.999987
3.273367
{ "github_metadata": { "branch": "master", "commit_count": 117, "repo_created_at": "2017-11-09T11:23:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "697f1f65...