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
68e95b87-05bd-4e85-9400-8d938ac34364
2442427120/C.learning
learing-9.3/9.3-function.cpp
//#include <iostream> //#include "main903.h" // ////stcak.cpp -- Stack member functions //Stack::Stack() //{ // top = 0; //} // //bool Stack::isempty() const //{ // return top == 0; //} // //bool Stack::isfull() const //{ // return top == MAX; //} // //bool Stack::push(Item& item) //{ // if (top < MAX) // { // items[t...
TOOL
0.909317
3.912596
{ "github_metadata": { "branch": "main", "commit_count": 270, "repo_created_at": "2022-04-02T08:08:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f787263907...
926ed1cd-a8d0-4480-8f59-66fdd245cfc0
AlexanderShulgin/shad_algo
alghoritms/seminar_contest/B/func.cpp
#include <algorithm> #include <cstdint> #include <iostream> #include <vector> struct FromToPivot { int from; int to; int pivot = 0; }; struct Bound { int64_t l; int64_t r; }; struct JLast { int l; int r; }; void CountIntervals(std::vector<int64_t>& array, FromToPivot ftp, ...
ALGO
0.999978
5.946296
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-02-03T00:20: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": "3cdf850e81c...
82ff3f61-c0c0-47a3-9626-c09cc7e1efc6
stan-dev/stan
src/stan/mcmc/hmc/hamiltonians/softabs_metric.hpp
#ifndef STAN_MCMC_HMC_HAMILTONIANS_SOFTABS_METRIC_HPP #define STAN_MCMC_HMC_HAMILTONIANS_SOFTABS_METRIC_HPP #include <stan/math/mix.hpp> #include <stan/mcmc/hmc/hamiltonians/base_hamiltonian.hpp> #include <stan/mcmc/hmc/hamiltonians/softabs_point.hpp> #include <boost/random/variate_generator.hpp> #include <boost/rando...
ALGO
0.989876
6.731788
{ "github_metadata": { "branch": "develop", "commit_count": 16998, "repo_created_at": "2013-02-06T03:25:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2672, "forks": 380, "issues": 133, "pull_requests": 11 }, "file_meta": { "content_id":...
7ff53355-43e7-4d64-8348-d4a3a6595268
xealits/LipTop
src/KinAnalysis.cc
#include "LIP/Top/interface/KinAnalysis.h" #include "TRandom.h" using namespace std; // TLorentzVectorCollection randomlyRotate(TLorentzVectorCollection &leptons, TLorentzVectorCollection &jets) { //get rotated leptons TLorentzVectorCollection rotLeptons; //create a rotated copy of all leptons for(TLorentzVe...
DATA
0.977046
4.754715
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-05-23T16:29:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "357572de0e...
7649b7c9-8109-4037-9bfb-9d842675c061
pengfei9403/Lintcode
二叉树/buildTree.cpp
#include <iostream> #include <algorithm> #include <stack> #include <vector> using namespace std ; class TreeNode { public: int val; TreeNode *left, *right; TreeNode(int val) { this->val = val; this->left = this->right = NULL; } }; class Solution { /** *@param preorder : A lis...
ALGO
0.999993
5.748865
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-04-18T10:49: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": "eb4199eb0...
04744f40-231f-436c-a4e9-714defeb41e7
arhanash/OODP-WEEKLY-TUTORIALS
Week 2/ReverseArray.cpp
#include <iostream> using namespace std; void reverseArray(int* arr, int size) { int* left = arr; // Pointer to start of array int* right = arr + size - 1; // Pointer to end of array while (left < right) { // Swap values using pointers int temp = *left; *left = *ri...
ALGO
0.999924
6.037821
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-04-16T20:46:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd274df62bff...
4367e79b-7b7c-443b-b236-90ae61d88ad0
tbellosta/CppIntroduction
4) Linear scalar hyperbolic equation/src/Numerics.cpp
#include "Numerics.h" void Solution::resizeSolution(const int &size) { this->u.resize(size); } Solution &Solution::operator=(const Solution &rhs) { this->u = rhs.u; return *this; } //======================================================================== funzioni classe madre FiniteDifferenceMetho...
ALGO
0.999957
5.231735
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-09-18T09:43:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2096f7dac...
d203c6e7-be82-4566-83fb-7cbf362b9f82
redwan-faris/leet-code
problems/34. Find First and Last Position of Element in Sorted Array/main.cpp
#include <bits/stdc++.h> using namespace std; using namespace std; vector<int> searchRange(vector<int> &nums, int target) { int left = -1, right = -1; int low = 0, high = nums.size() - 1; while (low <= high) { int mid = low + (high - low) / 2; if (nums[mid] == target) { ...
ALGO
0.999971
4.797672
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2024-03-20T18:59:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4eb3a745374...
48ba1217-6d31-46a3-940e-d7313cc1052e
shas9/codehub
BAPS/Mo/Hash/F.cpp
#include <bits/stdc++.h>` #define slld(longvalue) scanf("%lld", &longvalue) #define plld(longvalue) printf("%lld\n", longvalue) #define slf(longvalue) scanf("%lf", &longvalue) #define plf(longvalue) printf("%lf\n", longvalue) #define sc(letter) scanf("%c", &letter) #define pc(letter) printf("%c", letter) #define ss(...
ALGO
0.999533
3.91837
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-07-25T17:32: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": "61fcc2ad54...
f60fb31a-b751-4c98-9635-745eba9827c2
phlrain/Paddle
paddle/cinn/adt/anchor_sd_equation_context.cc
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
ALGO
0.914465
5.852985
{ "github_metadata": { "branch": "develop", "commit_count": 45481, "repo_created_at": "2018-10-19T02:15:54.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "PaddlePaddle/Paddle", "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "con...
4e2e6e3a-6cb1-4766-b5d1-576c8d7b1887
sapphire2207/A-Z-DSA--Striver-s-Sheet-
Step 8 Bit Manipulation/Learn Bit Manipulation/12_PowerSet.cpp
// Finding Power Set // Ex: [1,2,3] // [[], [1], [2], [3], [1,2], [2,3], [1,3], [1,2,3]] // So basically what you need to do is need to iterate from zero till 2 to the power n where n is the number of elements in the set so 0 till 2^ n minus 1 this is what you need to iterate and for every binary you have to check the...
ALGO
0.99955
6.549837
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-28T07:33: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": "e933ba56b48f...
0ff535eb-ad4a-4b0f-9ecb-45044e2bc036
LSthemagic/vetores-e-matrizes-em-c
q16.cpp
/* Rotação: Faça um programa que leia uma lista de números inteiros digitados pelo usuário, armazenando-a em um vetor A. Após ter armazenado todos os números no vetor, "rotacione" os seus elementos, de modo que cada elemento passe a ocupar a posição seguinte à que se encontra no vetor. O último elemento do vetor passa ...
ALGO
0.999589
4.750016
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-30T14:52: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": "c336cac74529...
840dcad1-80d2-4634-aec5-0fa775a00540
lynnprosper/leetcode
[leetcode]054-Spiral Matrix[数学逻辑].cpp
/* 1. 原题 https://leetcode.com/problems/spiral-matrix/ 2. 思路 题意: 数学逻辑题,中等,环形输出矩阵。 算法: 按层循环输出即可。 */ class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int> res; int left = 0, right = matrix[0].size()-1, top = 0, bottom = matrix.size()-1; i while(1)...
ALGO
0.999996
6.572055
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2018-12-28T13:27: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": "5f1e6d437...
0cdecf30-4a77-4c74-92e9-d64d31c21fe5
ishandutta2007/codeforces-f
function348/normal/1081/G.cpp
/* * =template=.cpp * Copyright (C) 2017 hzw <<EMAIL>> * * Distributed under terms of the MIT license. */ #include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<set> #include<map> #include<queue> #include<string> #include<cstring> #include<cstdlib> #include<cassert> #define FR first #def...
ALGO
0.999888
3.535201
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cbbdd8b228c...
c1e4f924-f99c-41ad-b80c-3f8ca1779b9a
lineagech/LintCode
K-Similar_Strings.cpp
class Solution { public: int kSimilarity(string A, string B) { int step = 0; queue<string> q; unordered_set<string> visited; q.push(A); visited.insert(A); while( !q.empty() ) { int q_size = q.size(); for( int i=0; i<q_size; i++...
ALGO
0.99999
5.443325
{ "github_metadata": { "branch": "master", "commit_count": 255, "repo_created_at": "2018-05-28T15:40: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": "52eef398...
7c9b6b45-3d9f-4c35-bbb3-aa5fb9503256
ladamalina/leetcode-2022-cpp
214. Shortest Palindrome (hard)/main.cpp
//#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std::literals; using ll = long long; using ld = long double; using ull = unsigned long long; using ii [[maybe_unused]] = std::pair<int, int>; using pll [[maybe_unused]] = std::pair<ll, ll>; using pdd [[maybe_...
ALGO
0.999998
6.451694
{ "github_metadata": { "branch": "master", "commit_count": 837, "repo_created_at": "2022-07-23T05:09:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "acccc739...
e83f233c-bc5b-476a-9855-98133f6b8ab4
saurav6719/my-codes
c++ dsa /queue/queue_using_two_stacks.cpp
#include<iostream> #include<stack> using namespace std; class Queue{ public: stack<int> st1; stack<int> st2; void push(int val){ st1.push(val); } void pop(){ while(!st1.empty()){ st2.push(st1.top()); st1.pop(); } st2.pop(); while(!...
ALGO
0.992229
4.094295
{ "github_metadata": { "branch": "main", "commit_count": 1170, "repo_created_at": "2023-12-25T16:15: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": "d1e296b73...
c2a5a322-68fe-4abf-b289-1c09d10142a1
K-W-J/Baekjoon_Cplusplus
Test/1019.cpp
#include<iostream> int main() { long pages = 0, temp = 0, temp2 = 1, temp3 = 0; long arr[10]{0}; std::cin >> pages; for (long i = pages; i > 0; i = i / 10) // 223 { temp = i % 10; // 3 2 2 if (pages != i) //일의 자리수가 아니라면 temp2 *= 10; temp3 = pages % temp2; for (int j = 0; j <= temp; j++) { f...
ALGO
0.997375
3.461711
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-03-29T07:29: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": "8119f15735ae...
819ea9e6-f3c6-4974-b10f-bdf0043a28e1
floresloyd/Undergraduate_CUNY_Queens
CSCI_313-323_Data_Structures_And_Algorithms/CSCI_323_Design_And_Analysis_Of_Algorithms/Algorithms/16-ChainMM/LeetCode/LeetCode-0312-2.cpp
class Solution { public: /// Idea: Chain matrix multiplication /// Let's say the original nums = [3, 2, 4] /// We first insert 1 at the beginning and at the end /// So, nums becomes [1, 3, 2, 4, 1] /// The problem now is very similar to chain matrix multiplication /// That is, we have matrices A...
ALGO
0.999965
5.403419
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2024-07-07T23:57:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3949bc3da...
f9acb834-37ce-4442-87b6-ea5897d6a235
VeloxChem/VeloxChem
src/t4c_electron_repulsion_geom_XY00/ElectronRepulsionGeom1100RecPPPP.hpp
// // VELOXCHEM // ---------------------------------------------------- // An Electronic Structure Code // // SPDX-License-Identifier: BSD-3-Clause // // Copyright 2018-2025 VeloxChem developers // // Redistribution and use in source and binary ...
ALGO
0.96872
6.099959
{ "github_metadata": { "branch": "master", "commit_count": 6590, "repo_created_at": "2024-03-15T09:59:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 2, "issues": 4, "pull_requests": 9 }, "file_meta": { "content_id": "26069d5...
ddf5b743-7c56-4a55-a0fb-8270c218c6c7
RHL-RWT-01/-6Companies30days
problem_25.cpp
#include <iostream> using namespace std; class Solution { public: // Comparator order: predefined sequence to match const string order = "!#$%&*?@^"; // Helper function to partition the array int partition(char arr[], int low, int high, char pivot) { int i = low; for (int j = low; j < ...
ALGO
0.999659
5.184989
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2025-01-01T14:20: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": "8d8145a97dc...
a06d9c52-0dd2-4d12-8849-570f3fa4739d
KaHIP/KaHIP
parallel/parallel_src/app/edge_list_to_metis_graph.cpp
/****************************************************************************** * edge_list_to_metis_graph.cpp * * * Source of KaHIP -- Karlsruhe High Quality Partitioning. * <NAME> <<EMAIL>> *****************************************************************************/ #include <stdio.h> #include <iostream> #inc...
ALGO
0.981907
4.599445
{ "github_metadata": { "branch": "master", "commit_count": 648, "repo_created_at": "2013-10-16T15:25:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 442, "forks": 101, "issues": 13, "pull_requests": 8 }, "file_meta": { "content_id": "3da4...
f5dc89db-2ba1-47f1-a0a3-a9cf8cbb1934
uni-kakurenbo/cp-solutions
practice/AtCoder/abc232/d.cpp
#include <bits/stdc++.h> using namespace std; // #include <atcoder/...> // using namespace atcoder; #ifdef LOCAL_JUDGE #include<debug> #define debug(...) Debug::debug(Debug::split(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__) #define DEBUG(...) do { Debug::DEBUG(nullptr, "#" + to_string(__LINE__) + " "); Debu...
ALGO
0.999962
4.64588
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2022-07-23T02:32:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bf7e7ef83...
0fa5d434-689e-48ab-8655-15ec991fa40f
joshuaSYSS/ApproxCC
approxCC.cpp
vector<int> n_u; void bfs(int i, int n, vector<vector<int>>& graph, int end) { int exploredVertices = 0; queue<int> q; q.push(i); vector<bool> visited(n, false); while (!q.empty()) { int u = q.front(); q.pop(); exploredVertices++; if (exploredVertices >= end) break; ...
ALGO
0.999115
5.20577
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-06-23T12:54: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": "eb8ed0204639...
789f61eb-fe7f-4ee9-8ce6-fbe73724e7cc
ishandutta2007/codeforces-d
dreamoon_love_aa/normal/1038/E.cpp
/*{{{*/ #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<string> #include<iostream> #include<sstream> #include<set> #include<map> #include<queue> #include<bitset> #include<vector> #include<limits.h> #include<assert.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).be...
ALGO
0.999902
3.759473
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "ccf1bfb8a4d2...
0b780ffe-bd9b-4225-9fdf-f45a1db83600
zhangru-ng/leetcode
C++/MissingRanges.cc
// Given a sorted integer array where the range of elements are [lower, upper] inclusive, return its missing ranges. // For example, given [0, 1, 3, 50, 75], lower = 0 and upper = 99, return ["2", "4->49", "51->74", "76->99"]. class Solution { void findRange(vector<string>& output, int prev, int cur) { if...
ALGO
0.999726
5.97763
{ "github_metadata": { "branch": "master", "commit_count": 390, "repo_created_at": "2015-08-29T01:14:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "201f10f7...
5e1bed51-02c1-4185-a26b-95da594b1814
Dipto801/Graph
cyclick graph cnt.cpp
#include<bits/stdc++.h> #define dipto ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define nl '\n' #define yes cout<<"YES"<<'\n'; #define no cout<<"NO"<<'\n'; #define gcd(x,y) __gcd(x,y) #define lcm(x,y) y*x/__gcd(x,y) #define pb push_back #define nextp(x) ...
ALGO
0.999902
3.684101
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-15T11:14: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": "f73faeeaee9e...
84dea23a-6703-4814-a123-e151093bccc9
Shahbaz898414/Code_Cheff
Pratice/Puppy and game.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define Time cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl; #define pb push_back #define mp make_pair #define line cout << endl; #define ff first #define ss second #define vi vector<int> #define no ...
ALGO
0.999974
4.305092
{ "github_metadata": { "branch": "main", "commit_count": 654, "repo_created_at": "2023-01-23T10:35: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": "0711a0f3af...
25962564-c875-43ea-b086-e2565a3556e6
kashyapvinay/leetcode-challenge
cpp/june/day_26_Sum Root to Leaf Numbers.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.999984
5.649127
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2020-06-01T09:07: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": "c7ab3a82...
316b6305-13d4-4240-a542-5b882ffc1e75
jauhararifin/cp
codeforces_498_div3/d.cpp
#include <bits/stdc++.h> using namespace std; int n,h; char s1[100001],s2[100001]; int main() { scanf("%d%s%s", &n, s1, s2); h = 0; for (int i = 0; i < n / 2; i++) { char p[4] = {s1[i], s1[n-i-1], s2[i], s2[n-i-1]}; char q[4]; q[2] = p[2]; q[3] = p[3]; int m = 4; for (int i = 0; i < 4; ...
ALGO
0.999983
3.380854
{ "github_metadata": { "branch": "master", "commit_count": 200, "repo_created_at": "2016-12-02T13:56:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bad9270...
9edde617-701e-4b89-b105-1e5d27e102af
Abysman/MyLeetCode
778.Swim in Rising Water/778.Swim in Rising Water/main.cpp
// // main.cpp // 778.Swim in Rising Water // // Created by stevenxu on 10/11/19. // Copyright © 2019 stevenxu. All rights reserved. // #include <iostream> class Solution { vector<vector<int>> dirs = {{0, -1}, {0, 1}, {1, 0}, {-1, 0}}; public: int swimInWater(vector<vector<int>>& grid) { int res =...
ALGO
0.999958
5.633672
{ "github_metadata": { "branch": "master", "commit_count": 548, "repo_created_at": "2018-03-16T02:31: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": "b8c4bc7c...
a4f90450-74d8-4a15-9b32-217d4e186c69
Xumengqi0201/OJ
Leetcode/401-500/450.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* deleteNode(TreeNode* root, int key) { bool flag = false; TreeNode *paren...
ALGO
0.999997
5.672502
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-09-03T05:46: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": "c0a51b9eb...
6ee3943d-0803-46c3-b071-20991f623186
ROCm/OpenFOAM_HMM
src/OpenFOAM/primitives/Barycentric2D/Barycentric2D.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | -----------------------------------...
ALGO
0.930329
7.02053
{ "github_metadata": { "branch": "suyash/hmm", "commit_count": 25733, "repo_created_at": "2022-10-27T12:31:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 4, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "41...
bb2f4331-5817-4489-9215-64047744eff3
iamnotfelix/calendar
UMT.cpp
/* * Assumptions: * - the given calendars are sorted in ascending order; * - there is no missing data in the input; * - the input data is correct and it has the correct format; * - each calendar contains at least one interval; * Explanation: * - first I parse the input data creating a data structure with all ...
ALGO
0.999622
5.330615
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-03-28T20:49: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": "4c7295f2d686...
9df8746e-df5f-4906-a65d-ef72712e9b1e
microsoft/ELL
libraries/trainers/include/ThresholdFinder.h
//////////////////////////////////////////////////////////////////////////////////////////////////// // // Project: Embedded Learning Library (ELL) // File: ThresholdFinder.h (trainers) // Authors: <NAME> // //////////////////////////////////////////////////////////////////////////////////////////////////// #...
ALGO
0.968652
6.1977
{ "github_metadata": { "branch": "master", "commit_count": 3771, "repo_created_at": "2016-09-27T19:12:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2291, "forks": 295, "issues": 30, "pull_requests": 3 }, "file_meta": { "content_id": "d6...
8b4c5893-01e2-4577-9016-9b71db84d597
Ishmaelk/BinarySearchTree
Dictionary.cpp
#include "Dictionary.h" // Node Implementation template<class KeyType, class Value> Node<KeyType, Value>::Node(void) { parent = nullptr; left = nullptr; right = nullptr; } template <class KeyType, class Value> Node<KeyType, Value>::Node(const KeyType & newKey) { parent = nullptr; left = nullptr; right = nullptr...
TOOL
0.905075
5.183092
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-03-24T23:31: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": "6c5381dd20...
ed6de95b-194e-42f4-b654-09f913a461b8
minhchauU23/cppptit
nam2/classandobject/cpp0627.cpp
#include<string> #include<iostream> #include<sstream> #include<iomanip> using namespace std; class GiangVien{ private: string hvt, bo_mon, vtbm; int stt; public: GiangVien(){ hvt = ""; bo_mon = ""; stt = 0; } static int count; ...
ALGO
0.998062
4.067587
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-01-18T02:19: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": "f1b6709c1810...
86d672c9-c749-496b-98d1-3977547890d5
NealShankarGit/Project149
main.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <unordered_map> #include <queue> #include <functional> #include <ctime> #include <cmath> #include <chrono> #include <iomanip> #include "minHeap.h" #include "hashmap.h" // initialize hashmap of 50 buckets hashMap hash...
ALGO
0.993319
6.637013
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-12-02T20:36:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "7b94a60b950b...
5937827d-79c3-4dae-97aa-3cc7874c40a8
nikku1234/Code-Practise
LintCode/search-range-in-binary-search-tree.cpp
/** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * this->left = this->right = NULL; * } * } */ class Solution { public: /** * @param root: param root: The root of the binary searc...
ALGO
0.999992
5.156936
{ "github_metadata": { "branch": "master", "commit_count": 411, "repo_created_at": "2019-05-27T08:10:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "3390f2d3...
4ff3c3d3-b760-4f54-8a56-7cbdf8d604b2
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/03/0331/personal_submission/cf847i_alwaysce.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; i64 mod = 998244353; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, m, q, p; cin >> n >> m >> q >> p; vector<vector<int>> cnt(n, vector<int>(m, 0)); vector<vector<int>> vis(n, vector<i...
ALGO
0.99984
4.518022
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "1625...
03de525a-2f13-4cb5-bebe-cf77f8136098
tony056/vfx_hdr
gil/dip/NearestFilter.h
#ifndef GIL_NEAREST_FILTER_H #define GIL_NEAREST_FILTER_H #include <algorithm> #include "Filter.h" namespace gil { template<class DstImage> class NearestFilter: public Filter<NearestFilter<DstImage>, DstImage> { friend class Filter<NearestFilter<DstImage>, DstImage>; public: NearestFilter(size_t x, size_t y...
TOOL
0.963062
6.385774
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-03-20T15:44:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "923af1e734...
6c41c395-0ef1-49e3-b626-e561a7586f99
khaitranhq/compprogram
Codeforces/VNOI/ALAKE/data_t.cpp
#include<algorithm> #include<iostream> #include<cstdio> #define prev asdfasdfas #define next asdfasdf using namespace std; const int N = 1e5 + 2, INF = 1e9 + 7; int h[N], w[N], next[N], prev[N], n; long long res[N]; int main() { ios::sync_with_stdio(false); // Reading input cin >> n; h[0] = h[n + 1] = INF; ...
ALGO
0.999982
3.206369
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2020-01-23T05:25: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": "7798467c...
dcb0e8a7-3a74-47f6-8f26-ba068df6c295
Gatovsky/estructura-de-datos_isc_3er
unidad-5-y-6/examen_omega/main.cpp
#include<bits/stdc++.h> //ordenar precios /* 8 axion 23.60 fud 23.00 LaLa 23.01 Petalo 129.5 2Kg_manzanas 58.6 BimboG 30.5 MayonesaM 50.5 Colgate 23 */ using namespace std; int main(){ int N; double precio, T_compras, aux=0.00; string nombre, aux_nombre; cin >> N; string array_nombre[N]; doub...
ALGO
0.999806
3.973116
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-09-06T07:28: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": "991e36cb23a8...
d4207f50-c994-45a1-b23d-aa10acee29bc
austinadams104/C-Projects
Binary Search Tree/BianrySearchTree.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; ofstream outputFile; //outputFile is defined as a global variable struct TreeNode { int value; TreeNode *left; TreeNode *right; //constructor of the struct TreeNode (int key, TreeNode *left1 = NULL, TreeNode *right1 = NULL) {...
ALGO
0.999737
4.508672
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-06-11T20:52:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2bb9c68b6...
ec1e17a1-9438-41d6-9544-f0b5ca9d83e6
Ajay-go/dsa-codes
disjoint_set.cpp
#include <iostream> #include <vector> using namespace std; class disjoint_set { private: vector<int> rank; vector<int> ulp; // ultimate parent public: disjoint_set(int n) { ulp.resize(n + 1); rank.resize(n + 1, 0); for (int i = 1; i <= n; i++) { ulp[i] = i; ...
ALGO
0.99996
5.174495
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-10-21T13:08:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89a2ac47b0e...
23c21502-22eb-472f-b44a-69adf008eaec
sundarayamrita/dijkstra
dijkstraPROJECT.cpp
#include<iostream> #include<cstdlib> using namespace std; const int inf=10000,NoN=10; int matrix[NoN][NoN]={ {0,70,32,inf,83,inf,314,inf,inf,inf}, {70,0,inf,inf,inf,inf,inf,inf,inf,inf}, {32,inf,0,44,52,inf,inf,inf,inf,326}, {inf,inf,44,0,inf,59,inf,inf,inf,223}, {83,inf,52,inf...
ALGO
0.999945
3.346353
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-11-17T05:21:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1c06ba045...
1ac81e92-1e20-4a91-b9ad-f1d222314335
the-hyp0cr1t3/CC
末 Snippets/Spread queue (using two stacks).cpp
/* Spread queue (using two stacks) */ /* Calculate and maintain associative functions over a segment (pair with 2-pointer) in O(n) Eg: Find the number of segments of an array with gcd = 1 or max - min <= k Blog: https://codeforces.com/edu/course/2/lesson/9/2 Gcd: https://codeforces.c...
ALGO
0.999869
5.545146
{ "github_metadata": { "branch": "master", "commit_count": 547, "repo_created_at": "2020-01-25T20:41:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 971, "forks": 201, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "39b9...
057eb13f-bb7f-4e61-a3c1-8c8db738c4d9
skyqnaqna/algorithm_study
boj/DynamicProgramming/BOJ_1915.cpp
/* 백준 1915 가장 큰 정사각형 21.07.15 https://github.com/skyqnaqna/algorithm_study */ #include <bits/stdc++.h> using namespace std; #define INF 2e9 #define endl "\n" typedef long long ll; typedef double dd; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int MAX = 1001; int n, m, graph[MAX][MAX], dp[MAX][M...
ALGO
0.999967
4.047278
{ "github_metadata": { "branch": "main", "commit_count": 562, "repo_created_at": "2020-11-16T10:28:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "7b0afc0bca...
f28c4d4c-260d-4cbc-9e02-ac1ae1aa96b9
ccc-math/dominating_set
src/Algo/cp_sat.cpp
#include "Algo/cp_sat.hpp" Output cp_sat(const Graph& G, const double& time) { auto timer_start = std::chrono::high_resolution_clock::now(); Output dom; operations_research::sat::CpModelBuilder model; // Creating the model int n = G.getNumVertices(); // Boolean vector containing the variables for t...
ALGO
0.99987
5.52878
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2024-11-05T14:00:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0576187772...
fc0c798d-1886-45bf-8f83-f2664b2afb08
RyanPioneer/Leetcode
2501~3000/2850. Minimum Moves to Spread Stones Over Grid/main4.cpp
/** * Source: https://rb.gy/c053g * Date: 2023/9/10 * Skill: * Runtime: 7 ms, faster than 100% of C++ online submissions * Memory Usage: 18.6 MB, less than 85.71% of C++ online submissions * Time complexity: O(n) * Space complexity: O(n) * Constraints: * */ #include <vector> #include <iostream> #include <alg...
ALGO
0.999891
6.068227
{ "github_metadata": { "branch": "main", "commit_count": 504, "repo_created_at": "2021-05-09T23:57:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a90f689b0f...
34fc31fe-7df8-49d1-9933-bd3f1052406b
sakiib/RandomSolving
Misc/EasyPrintDP.cpp
#include <bits/stdc++.h> using namespace std; vector <int> cost = {1, 2, 3, 2, 2}; vector <int> value = {8, 4, 0, 5, 3}; int capacity = 4; int dp[5][15]; int mx_profit; int solve(int idx, int rem) { if (idx >= cost.size()) return 0; if (dp[idx][rem] != -1) return dp[idx][rem]; int mx = 0; mx = max(mx,...
ALGO
0.999936
4.559157
{ "github_metadata": { "branch": "master", "commit_count": 394, "repo_created_at": "2020-08-16T10:57: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": "f9d6238e...
36a0b435-9db5-41fd-bc3c-5763cc4274d6
CGRM2/4TO-BIM
Ejercicio 6 Almacenamiento.cpp
#include <iostream> #include <string> using namespace std; int main() { // Arreglo de nombres string nombres[] = {"Juan", "María", "Carlos", "Ana", "Luis"}; // Tamaño del arreglo de nombres int numNombres = sizeof(nombres) / sizeof(nombres[0]); // Pedir al usuario que ingrese un nombre a buscar ...
ALGO
0.995492
5.435034
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-10-03T23:08: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": "f8ce1b094fc6...
42bf7b00-7e21-4e1b-bece-60dfd257efc7
akhil14shukla/Brograms
ESO207_PA1_3.cpp
#include <iostream> using namespace std; #define ll long long int // #define mod int(1e9 + 7) ll *multiply(ll *a1, ll *a2) { ll x1 = (a1[0] * a2[0] + a1[1] * a2[2]) % (1000000007); ll x2 = (a1[0] * a2[1] + a1[1] * a2[3]) % (1000000007); a1[0] = x1; a1[1] = x2; a1[2] = x2; a1[3] = x1; return ...
ALGO
0.999971
3.880058
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2021-01-05T10:06: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": "2a34807c0...
e3e59ec5-96c4-4f5d-95d8-f2ca3f030463
pa7i3nt/Data-Structure-and-Algorithms-PTIT-2020
Exam_1/Code/test.cpp
// CPP rogram to print all subsequence of a // given string. #include <bits/stdc++.h> using namespace std; // set to store all the subsequences unordered_set<string> st; // It computes all the subsequence of an string void subsequence(string str) { // iterate over the entire string for (int i = 0; i < str...
ALGO
0.999624
5.856752
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-05-27T13:47:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9120bb994...
fa356802-e32a-49c2-aa1f-12fdcbcd40ab
lxmliu2002/Mathematical_Basis_of_Information_Security
第2章 同余/编程/2/2.cpp
#include <iostream> using namespace std; // 扩展的欧几里得算法求逆元 // a: 待求逆元的数,m: 模数,x: 逆元 // 返回值: 是否存在逆元 bool extGcd(int a, int m, int& x) { int x1, y1, x0, y0, y; x0 = 1; y0 = 0; x1 = 0; y1 = 1; int m0 = m; int r = a % m; int q = (a - r) / m; while (r) { x = x0 - q * x1; ...
ALGO
0.999971
4.15988
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-03-18T07:52:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca6df69e752...
51325c4b-c299-4818-a419-12757ad578f1
ndhuanhuan/16_coding_practice
1-200/54. Spiral Matrix.cpp
// https://zxi.mytechroad.com/blog/simulation/leetcode-54-spiral-matrix/ class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { if (matrix.empty()) return {}; int l = 0; int t = 0; int r = matrix[0].size(); int b = matrix.size(); const int total = (r--) * (b--); ...
ALGO
0.999995
7.065582
{ "github_metadata": { "branch": "master", "commit_count": 1546, "repo_created_at": "2016-07-14T03:20: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": "ab89381...
1e645f68-08c1-441b-a821-a7e99024d1c7
shuklapranav1011/my-dsa-codes
Practise/topological_sort.cpp
//directed_Graph #include <bits/stdc++.h> using namespace std; void add_Edge(vector<int> adj[], int u, int v){ adj[u].push_back(v); } //dfs_topological_sort void topo_dfs(vector<int> adj[], stack<int> &st, bool visited[], int src){ visited[src] = true; for(auto v: adj[src]){ if(!visited[v]) ...
ALGO
0.999988
4.922392
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2020-10-29T15:25: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": "8320fe90e...
11294b84-c694-4ad0-bc12-a00e3a4aa554
jhan756k/Study
c++/14939/14939/14939.cpp
#include <iostream> using namespace std; bool lighton[15][15]; char tmp; int dx[5] = { 1, 0, -1, 0, 0}; int dy[5] = { 0, 1, 0, -1, 0}; int cnt = 0, bsize = 5; void printb() { cout << endl; for (int i = 0; i < bsize; i++) { for (int j = 0; j < bsize; j++) { cout << lighton[i][j]; } cout << endl; } return...
ALGO
0.999733
3.958789
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2023-03-14T04:56: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": "86b34173b0...
11f4309b-de6d-4f96-a43f-e86bc6ae387f
caneto/Programacao-C-para-Arduino
Projetos/Arduino_TDS_Exemplo/Arduino_TDS_Exemplo.ino
#define TdsSensorPin A0 #define VREF 5.0 // tensão de referência analógica (Volt) do ADC #define SCOUNT 30 // ADC analog reference voltage (Volt) int analogBuffer[SCOUNT]; // armazenar o valor analógico na matriz, lido do ADC int analogBufferTemp[SCOUNT]; int analogBufferIndex = 0; int cop...
ALGO
0.968575
4.705404
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2021-11-16T00:26: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": "6bc7af1af28...
4316b96f-859c-4a96-b610-1ee7499afe18
alexandraback/datacollection
solutions_5769900270288896_0/C++/Truer/소스.cpp
#define _CRT_SECURE_NO_WARNINGS C4996 #include <stdio.h> int T,P; int n,r,c; int data[32][32]; int minget = 0x7ffffff; void su(int x, int y, int num) { if (x == r+1 && y==1) { if (num == 0) { int i, a,cnt=0; for (i = 1; i <= r; i++) { for (a = 1; a <= c; a++) { if (data[i][a] && data[i][a - ...
ALGO
0.999811
4.340349
{ "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": "5f6396113...
505a7f7c-a5f5-488d-95b8-48f3eb9afbca
Warning10/bubble
Bubble.cpp
#include <omp.h> #include <iostream> #include <time.h> using namespace std; void serialBubbleSort(int array[], int n) { for (int i = 0; i < n - 1; ++i) { for (int j = 0; j < n - i - 1; ++j) { if (array[j] > array[j + 1]) { int temp = array[j]; array[j] = array[j ...
ALGO
0.99989
5.215643
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-25T01:54: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": "aa0d15ba86d5...
212db97a-6ba2-48aa-93bb-694264b24ab2
rishit-singh/Hacktoberfest2021
DataStructures/Trees/tree.h
// Tree implementations. #ifndef TREE_H #define TREE_H #include "node.h" #include <cinttypes> #include <iostream> #include <utility> enum class TraversalType { PreOrder, PostOrder, InOrder }; // Stores the binary tree nodes and related functions. template<typename T> class BinarySearchTree { private: ...
ALGO
0.998847
3.906146
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2021-10-02T14:40:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 26, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "2cf7f6db34...
430b4e85-bd5b-4744-b82a-497b61e5487b
jon-daeh/cgal-swig-bindings-maven
SWIG_CGAL/Polyline_simplification_2/Polyline_simplification_2.h
// ------------------------------------------------------------------------------ // Copyright (c) 2014 GeometryFactory (FRANCE) // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // ---------------------------------...
TOOL
0.969458
6.511737
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-12T20:58:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "0c354d5c13...
7fc6e0b6-80fd-467b-8548-3ad70e40bc8e
WodahsReklaw/DataAndAlgo
include/heap.tpp
#ifndef __HEAP_TPP__ #define __HEAP_TPP__ #include <algorithm> #include <iterator> #include <vector> #include <heap.h> template <typename T> void heap::MaxHeapify(std::vector<T>& vec, unsigned i){ unsigned heap_sz = vec.size(); heap::MaxHeapify(vec, i, heap_sz); } template <typename T> void heap::MaxHeapify(std...
ALGO
0.989969
5.570511
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-01-20T18:47: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": "0e74b44833...
5b8a61a6-1312-4959-ba35-a57478460e64
MasterIceZ/IMSO
competition_upsolve/toi13_art.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MxA = 3000030; struct event_t { int pos, height, width; bool operator < (const event_t &o) const { if(pos != o.pos) { return pos < o.pos; } if(height != o.height) { return height < o.height; } return wid...
ALGO
0.998776
4.011942
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2022-01-04T04:37:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c11518a409...
459353c5-4b36-4033-ad1b-8e1725cf3e0f
ArghyaB118/Guide2ICPC
Tree/lca.cpp
// lowest common ancestor in a binary search tree // BST = max(left subtree) < node < min(right subtree) V all nodes // LCA is a node farthest from the root #include <iostream> using namespace std; class Node { public: int data; Node *left, *right; Node* newNode(int data); }; Node* newNode (int data) { Node* nod...
ALGO
0.999983
5.776373
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2019-07-24T05:16:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f2d8fb7e...
023a7cab-e9e5-41bc-9555-ed192f10ce17
maruf-git/daily-competitive-programming-practice
stl/vector.cpp
// In The Name of Allah #include <bits/stdc++.h> #define ll long long int using namespace std; int main() { // creating a vector of 5 elements vector<int> v({10, 20, 30, 40, 50}); v.push_back(60); // inserting at 1st index v.insert(v.begin() + 1, 5); // takes iterator v.push_back(5); cout <...
TOOL
0.990389
3.422033
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2025-01-01T18:31: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": "69b1e704b9e...
f67e9705-25a4-438b-a4fd-742ee02131fd
jerryxu20/kattis
archeryaccuracy.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, from, to) for (int i = from; i < (to); ++i) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; const int MAXN = 17; int n; double hit[MAXN]; int threshold[MAXN + 1]; dou...
ALGO
0.99994
3.801559
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-01-10T02:04: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": "573572d9ae1...
df0f2e9f-2e8c-4960-a19a-619eeb328442
RDLLab/oppt
src/plugins/heuristicPlugins/shared/RRTConnect/Tree.cpp
/** * Copyright 2017 * * This file is part of On-line POMDP Planning Toolkit (OPPT). * OPPT is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License published by the Free Software Foundation, * either version 2 of the License, or (at your option) any later ...
ALGO
0.996318
6.015048
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-11-03T02:50:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 46, "forks": 16, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "bae3dbd05...
2ec521ba-db95-407a-b605-22f9eacc85c8
SaklainTheSpellbinder/Coding
1-2/DSA CSE 106/Offline 2/2305004/stack.h
#pragma once /** * Stack - Abstract Data Type (ADT) that follows the Last-In-First-Out (LIFO) principle * This interface defines the operations that any stack implementation must support */ class Stack { public: /** * Pushes an element onto the top of the stack * @param value The element to push ...
TOOL
0.927007
7.208757
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2024-10-19T18:10: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": "40b43bde67b...
d229a902-49f4-4586-ad12-bf23db9abb67
crismariudenis/CppTemplate
template.cpp
/** * @author <NAME> */ #include <bits/stdc++.h> using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int rand(int a, int b) { int ans = uniform_int_distribution<int>(a, b)(rng); return ans; } #define fastio std::ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(...
ALGO
0.99868
3.183791
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-08-21T10:46: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": "ef7eca4a1e...
4aebe9e4-a957-4c6e-bdb6-d997f1eda651
Dhliv/Competitiva
USACO/Bronze/Cowntact Tracing.cpp
#include <bits/stdc++.h> #define INF INT_MAX #define MINF INT_MIN #define ll long long #define PB push_back #define PF push_front #define P_F pop_front #define P_B pop_back #define F front #define B back #define f first #define s second #define MP make_pair #define FOR(i, a, b) for(ll i = a; i < b; i++) #define FORI(i...
ALGO
0.999902
3.29104
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2020-10-15T03:14:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bfab9ed...
294b6e8c-efe7-4d9f-87fb-0d2c8a36d65e
MasisOznigolyan/programming-II-exercises
Flip and invert an image from array.cpp
#include <iostream> #define ROW 3 #define COLL 3 using namespace std; int** arrayToMatrix(int* arr,int rows,int colls){ int** array= new (nothrow) int* [rows]; for(int i=0; i<rows; i++){ array[i]= new (nothrow) int [colls]; } int index_of_arr=0; for(int i=0;i<rows;i++){ for(int j=0;...
ALGO
0.999814
4.614049
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-10-29T15:04:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dafd883dc1...
141800d5-a0dd-4df3-b387-7d022c3a69b7
parikshit223933/Coding-Ninjas-Competitive-Programming
Greedy Problems/Nikunj_And_Donuts.cpp
/* Nikunj loves donuts, but he also likes to stay fit. He eats n donuts in one sitting, and each donut has a calorie count, ci. After eating a donut with k calories, he must walk at least 2^j x k(where j is the number donuts he has already eaten) miles to maintain his weight. Given the individual calorie counts for eac...
ALGO
0.999982
4.306347
{ "github_metadata": { "branch": "master", "commit_count": 677, "repo_created_at": "2020-03-09T07:20:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 555, "forks": 299, "issues": 4, "pull_requests": 7 }, "file_meta": { "content_id": "81c5...
eb4c5ac2-ad5e-4d1f-9f2e-19b05da38987
doldre/ACM
codeforces/vkround/e.cpp
/************************************************ *Author :mathon *Created Time :日 5/ 8 00:58:42 2016 *Problem class: *************************************************/ #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <...
ALGO
0.999617
3.132848
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2016-04-09T08:35:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e217c5d64...
8faba742-e368-472f-bd37-5887ebe0959c
Prathyusha68/Leet-Code-and-GFG
Medium/M-Coloring Problem/mcoloring-problem.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: // Function to determine if graph can be coloured with at most M colours such // that no two adjacent vertices of graph are coloured with same colour. bool graphColoring(bool graph[101][101],...
ALGO
0.99992
5.681655
{ "github_metadata": { "branch": "main", "commit_count": 780, "repo_created_at": "2023-01-15T16:21: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": "585ba27d9d...
65f5a28a-b56b-4eb5-8b6a-bdea2d3b995f
mittrayash/CPP-Projects
Oops1_MultiplyMatrices/main.cpp
#include <iostream> #include <stdlib.h> #include <stdio.h> using namespace std; int multiply(int[][3], int[][3]); int row1, row2, column1, column2; int main() { int i, j, mat1[3][3], mat2[3][3]; cout << "No. of rows & columns of first matrix: " << endl; cin >> row1 >> column1; //cout << row1 << " " <<...
ALGO
0.999072
3.70546
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-10-02T06:43:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "452cddf5e2...
13a5d0bb-ffa6-4694-b532-956f2469ba4b
barnrang/Pro-con
Atcoder/Regular-130/C.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <complex> #include <queue> #include <set> #include <unordered_set> #include <list> #include <chrono> #include <random> #include <iostream> #in...
ALGO
0.99999
4.521555
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-04-10T14:03: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": "f9d29a525...
dc195204-7cd9-4bb2-870e-cae043ca6da0
hridyansh68/Codes-for-DS-and-ADA
algorithms/Greedy/dijkstra.cpp
#include<bits/stdc++.h> using namespace std; #define INF 0x3f3f3f3f typedef pair<int,int> ipair; class Graph { int V; list< pair<int, int> > *adj; public: Graph(int V); void addEdge(int u, int v, int w); void shortestPath(int s); }; Graph::Graph(int V) { this->V = V; adj = new list< pair...
ALGO
0.999982
4.294545
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-02-10T10:05: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": "4e07502aa...
40e1aea5-155d-4709-bc82-34cc4fceb070
MuhammadKA/Sensor-Fusion-ND
2- Camera Feature Matching/2- Camera: 2D Feature Matching/src/matching2D_Student.cpp
#include "matching2D.hpp" #include <numeric> using namespace std; // Find best matches for keypoints in two camera images based on several // matching methods void matchDescriptors(std::vector<cv::KeyPoint> &kPtsSource, std::vector<cv::KeyPoint> &kPtsRef, cv::Mat &descSource, ...
ALGO
0.997183
6.578384
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-11-20T11:10:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b7914364...
9b76194e-8695-4fb8-a6f6-6c2795acbe0b
levanliu/leetcode
src/search/bfsSearch.h
// // Created by le on 2022/12/19. // #ifndef MAIN_BFSSEARCH_H #define MAIN_BFSSEARCH_H #include<iostream> #include <cstring> #include "algorithm" #include "queue" using namespace std; typedef pair<int,int> PII; class bfsSearch { private: static const int N = 10; int n,m; int g[N][N]; //graph int d...
ALGO
0.999866
4.963164
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2023-08-25T04:34: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": "7420a18f0...
f8b9cd82-a205-4288-b790-e6e5f5f0e53c
rohankan/USACO
competitions/2020/GOLD_February_Delegation.cpp
#include <iostream> #include <algorithm> #include <fstream> #include <vector> #include <deque> #include <queue> #include <stack> #include <set> #include <unordered_set> #include <numeric> #include <math.h> #include <map> #include <string.h> #include <unordered_map> #include <list> #include <string> #include <utility> #...
ALGO
0.999756
3.780612
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2020-03-18T19:09: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": "41d032f3d...
3778e3e9-98e0-456a-bde8-04adcd42ff39
ashok201198/C-course
C-Strings2-Worksheet/binaryStrOp.cpp
/* ProblemCODE : BINARYSTROP Difficulty : Medium Marks : 15 Given two binary numbers in form of strings and a string representing "AND", "OR", "NOR" or "XOR". Return the output string which forms by doing the specified operation on those 2 strings . Ex: Input: "101", "111", op = "OR" Output: "111" Ex: Input: "10...
ALGO
0.999824
5.611229
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-05-15T04:27: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": "4e350afc3b...
b4a9a5db-47fa-468f-ba42-49b00d53cc61
CaiJinFu/android14
packages/modules/NeuralNetworks/common/cpu_operations/Densify.cpp
/* * Copyright (C) 2021 The Android Open Source Project * * 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 app...
TOOL
0.995653
7.718968
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-08-04T15:29:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ce0b1a9e42...
fbb96dc1-fa1f-4c90-9eb5-d27e0de5fe57
v4if/leetcode
gtest/tests/048_rotate_image.cpp
// // Created by root on 6/6/17. // #include <iostream> #include <gtest/gtest.h> /* You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? * */ using namespace std; class Solution { public: // 对角线交换,然后左右交换 void rotate(vect...
ALGO
0.980983
6.322381
{ "github_metadata": { "branch": "master", "commit_count": 340, "repo_created_at": "2017-02-24T12:41:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f972fbed...
9ff54b3a-dee5-4774-9ac9-3ca7e884308e
oguzhantavsan/CS307_Airline_Reservation_System
CS307HW1.cpp
#include <iostream> #include <pthread.h> #include <unistd.h> #include <time.h> #include <stdlib.h> using namespace std; //Warning: Global variables should be declared before functions to be seen int seatsnumber[2][50]; int turn=0; int m=0;//number of seats that are got by the user. /* There are there functions that ...
ALGO
0.995042
4.163168
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-11-22T20:00: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": "4c5f9225ba...
100128c8-d838-458b-863c-629055936157
guilhermealbm/CC-UFMG
programacao_competitiva/List4/1378/1378.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { /** * Escreva a sua solução aqui * Code your solution here * Escriba su solución aquí */ int n; while (cin >> n) { if (n == 0) return 0; int arrayX[1001] = { 0 }; int arrayY[1001] =...
ALGO
0.999804
3.736694
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2019-07-08T20:04: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": "22ab5155e...
e173bd1e-3695-4e99-bffe-ec39b7daa80c
MishkatIT/codeforces-atcoder-submissions
codeforces/1542/1542C Strange Function.cpp
/* author : MishkatIT created : Wednesday 2024-02-28-16.29.58 */ #include<bits/stdc++.h> #define fio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define debug(_) cout << #_ << " is " << _ << '\n'; using namespace std; using ll = long long; using ld = long double; const ll mod = ...
ALGO
0.999965
5.467574
{ "github_metadata": { "branch": "main", "commit_count": 1762, "repo_created_at": "2023-10-28T07:54:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1363b0171...
d4098f15-5580-461f-b2bc-f0f5efd94726
shammya/Advanced-Datastructure-Implementation
BinomialHeap.cpp
/* Author : Name : <NAME> Institution : Bangladesh University of Engineering and Technology check the text file assigned to understand the how the function works */ #include <bits/stdc++.h> using namespace std; const int MAX = 1e9; class Node { public: int key; list<Node *> children; }; class B...
ALGO
0.999967
4.477158
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2020-11-11T05:22: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": "155a430f987d...
d0a4515c-63fd-47c0-a7af-134605efd30e
lispc/leetcode
search-in-rotated-sorted-array-ii.cpp
class Solution { public: int bf(int*ps,int*pe,int t){ auto it = lower_bound(ps,pe,t); if(it==pe){ return -1; } if(*it!=t){ return -1; } return it-ps; } bool search(int A[], int n, int target) { if(n<=2){ for(int i=0;...
ALGO
0.999977
5.709812
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-07-14T13:29:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0142782ff9...
5de83052-e2ee-46d4-aed9-fc68c90b6b1f
7oSkaaa/LeetCode_DailyChallenge_2023
07- July/28- Predict the Winner/28- Predict the Winner (Ahmed Hossam).cpp
// Author: <NAME> class Solution { public: int solve(vector<vector<int>>& dp, vector<int>& nums, int l, int r) { // Base case: if left pointer exceeds right pointer, return 0 if (l > r) return 0; // Reference to the current memoization cell int& ret = dp[l][r]; ...
ALGO
0.999999
6.369793
{ "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": "8cb7cc...
f5ccef0e-01dd-452d-8fbe-ece193e4bd12
Hargreawe/NaturalDialogSystem
NaturalDialogSystem/Source/NaturalDialogSystem/Private/DefaultClasses/Tf_idf_PickerFunction.cpp
// Created by <NAME>. All rights reserved. #include "DefaultClasses/Tf_idf_PickerFunction.h" #include "Core/DictionarySubsystem.h" #include "Kismet/KismetMathLibrary.h" #include "Resources/DictionaryRepresentation.h" #include "Resources/NaturalDialogSystemLibrary.h" DEFINE_LOG_CATEGORY(Log_Tf_Idf_PickerFunction); ...
TOOL
0.975203
6.484033
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-05-25T09:12: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": "6ebcb2343...
2f851dd7-a931-403b-b9e0-38f9f7e7038f
ZeroOnePro/PS-Gym
Baekjoon Practice/Greedy/회의실 배정.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; // n번째 회의로 시작하면 총 몇개의 회의가 생기는지 체크 // 탐욕기준: 시작시간이 같은 경우 (끝시각 - 시작시각)이 제일 짧은 것, 이전 // 회의와 다음회의의 간격이 가장 짧은 것 안되는 것: 다음 회의시작시간이 ...
ALGO
0.999976
4.510258
{ "github_metadata": { "branch": "main", "commit_count": 817, "repo_created_at": "2021-11-10T16:20:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "2790b957a8...
b816a36c-7cd9-499b-97a8-11e894e42ae1
prateekmohanty63/LeetCode
LinkList/swapping_nodes.cpp
#include <iostream> using namespace std; /// 1st approach /// Most optimized /// One pass solution // Runtime: 774 ms, faster than 63.43% of C++ online submissions for Swapping Nodes in a Linked List. // Memory Usage: 180.2 MB, less than 60.56% of C++ online submissions for Swapping Nodes in a Linked List. class Sol...
ALGO
0.999994
6.176759
{ "github_metadata": { "branch": "master", "commit_count": 1103, "repo_created_at": "2021-09-27T04:55:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3426bd6...
8c07e3f0-d89f-446d-ad58-2ff70f21bcc1
TurkerKoc/Data-Structures
Heap Implementation/Heap Implementation/main.cpp
// // main.cpp // Heap Implementation // // Created by <NAME> on 9.01.2019. // Copyright © 2019 <NAME>. All rights reserved. // #include <iostream> using namespace std; #define MAX_ITEM 100 class heap { public: heap() { size = 0; } bool isEmpty() { if(size==0) return...
ALGO
0.999117
4.451949
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-01-12T20:44: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": "d232a144ff...
c336ab7e-b04a-4094-9ef0-fab15000b1cd
LiaR2128/Float-Point-Repr
multiplicadorpuntoflotante.cpp
#include <iostream> #include <bitset> #include <cstdint> using namespace std; void multiply_floats(float x, float y) { const int bias = 127; union { float value; uint32_t bits; } float1, float2, product; float1.value = x; float2.value = y; int sign1 = (float1.bits >> 31) & 1...
ALGO
0.999454
5.081774
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-10-02T22:59: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": "203be0e99bf8...
a42b747c-30ef-498b-86c0-d1670411853c
watermeloy/main
6 zadacha.cpp
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Russian"); int sequence = 0; int maxNumber = 0; int maxIndex = -1; int product = 1; int n; cout << "Введите размер последовательности: "; cin >> n; cout << "Введите элементы последовательности: "; ...
ALGO
0.998101
4.542862
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-10-04T11:02: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": "1589480ab3a...
4dcf6490-2d95-4209-890c-a3f51463427b
Mr-Phoebe/ACM-ICPC
比赛源码/2015 Multi-University Training Contest 08/1011.cpp
#pragma comment(linker, "/STACK:1024000000,1024000000") #include<cstdio> #include<algorithm> #include<cstring> #include<ctime> #define rep(i,x,y) for(int i=x;i<=y;++i) #define dep(i,x,y) for(int i=x;i>=y;--i) using namespace std; const int N=100005, S=10000005; int n,m,sn[N],nx[N],x,v[N],dpt,cur,tn,tmpv[N]; int...
ALGO
0.999968
3.577152
{ "github_metadata": { "branch": "master", "commit_count": 421, "repo_created_at": "2015-11-16T08:47:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b4d255...
2dba0c9e-be01-4b75-8041-796946234a34
rajeshtva/leetcode
coding-ninjas/aggressive-cows.cpp
#include <bits/stdc++.h> using namespace std; int aggressiveCows(vector<int>& stalls, int k) { int n = stalls.size(); sort(stalls.begin(), stalls.end()); int s = 0; int e = stalls.back(); function<bool(int)> isPossible = [&](int mid) -> bool { int cowsCount = 1; int lastPosition =...
ALGO
0.999942
5.738319
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2022-04-05T04:26: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": "67ea7ff81c2...
1c4cfb20-4550-44de-b5ee-bd514259069b
Emon-X/ATCODER_CODE
E_Min_Max_MEX.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define ll long long int #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define pb push_back #define pp pop_back() #define mod 100000000...
ALGO
0.999815
5.100547
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-06-28T08:19:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1a87102a7...