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
c8be1d83-9b63-4854-9792-4f6f2cdada32
tkocmathla/hackerrank
c++/journey_to_the_moon/journey_to_the_moon.cpp
#include <stack> #include <vector> #include <iostream> using namespace std; vector<int> dft(const vector<vector<int>> &g, vector<bool> &visited, int start) { vector<int> nodes; stack<int> s; s.push(start); while (s.size() > 0) { auto v = s.top(); s.pop(); if (!visited[v]) { for (auto i = ...
ALGO
0.999868
4.420379
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2016-12-13T13:46: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": "f844ba651...
af3207fe-2122-4f57-8bf0-ff3c89872b09
183aryan/LeetCode-Solutions
Largest subarray with 0 sum - GFG/largest-subarray-with-0-sum.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /*You are required to complete this function*/ class Solution{ public: int maxLen(vector<int>&A, int n){ unordered_map<int, int> um; int preSum = 0, res = 0; for(i...
ALGO
0.999565
5.551079
{ "github_metadata": { "branch": "main", "commit_count": 2202, "repo_created_at": "2022-04-11T16:58:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95a1c90b0...
bcae3979-52c8-48c4-8550-c58279cd50a8
AhmedGharseldin/Coach-Academy_PST-LEVEL-1-
Sheet 2/181A - Series of Crimes.cpp
//https://codeforces.com/problemset/problem/181/A #include <bits/stdc++.h> using namespace std; int main() { int n, m; char P[101][101] = {}; cin >> n >> m; int x[n + 1] = {}, y[m + 1] = {}; for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { cin >> P[i]...
ALGO
0.999915
3.168078
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-01-17T12:09: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": "6984b4ed4edc...
fa49f8ca-31fd-46f6-9695-72b54b3d94a4
MahajanPreksha/DSA-in-CPP
LinkedList/Singly Linked List/traverseLinkedListInReverseOrder.cpp
#include<iostream> using namespace std; class Node{ public: int val; Node* next; Node(int data){ val = data; next = NULL; } }; class LinkedList{ public: Node* head; LinkedList(){ head = NULL; } void insertAtTail(int value){ Node* new_node = new Nod...
ALGO
0.999985
5.118385
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2023-09-06T18:02:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49471e34b...
4b2604ae-02d5-482d-9ef5-fa0cde75ea1e
ishandutta2007/codeforces-b
batman/normal/534/A.cpp
////////////////////////////////////////////////////////////////// ////////////////// Sa1378 Platform Vesion 1.2 /////////////////// //////////////////////////////////////////////////////////////// // Yesterday is history... // Tomorrow is a mystery... // But Today is a GIFT. #include <bits/stdc++.h> using namespac...
ALGO
0.999924
3.682159
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b3114265b43...
b15445ef-0d24-482f-b8e5-41c6a12855da
nobuyuki83/delfem2
examples_oldgl_glfw/202_DynTri2dRemesh/main.cpp
/* * Copyright (c) 2019 <NAME> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <cstdlib> #include <vector> #include <random> #if defined(_WIN32) // windows # define NOMINMAX // to remove min,max macro # include <windows....
ALGO
0.997564
5.226184
{ "github_metadata": { "branch": "master", "commit_count": 1719, "repo_created_at": "2018-07-12T03:25:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 194, "forks": 18, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "7e0...
c3afd65c-f8db-41c6-9dbf-440176d0d2d4
Sarwar05/LightOJ
1042 - Secret Origins.cpp
#include<bits/stdc++.h> using namespace std; int bin[32]; void getBin(int num) { int i=30; while(num!= 0){ bin[i--] = num%2; num/=2; } } void makeBig() { int i = 30; while(bin[i]!= 1) i--; while(bin[i]!=0) i--; swap(bin[i], bin[i+1]); bool f = false; int j = 30; i...
ALGO
0.999896
4.036062
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2017-04-18T11:57:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a689946e3...
9a1c4f15-c77e-4c78-b7c3-3f4558e7d89e
neuronsimulator/nrn
src/utils/enumerate.h
#pragma once #include <algorithm> #include <functional> #include <tuple> template <typename T, typename F, typename value_type = typename T::value_type, typename TIter = decltype(std::begin(std::declval<T>())), typename = decltype(std::end(std::declval<T>()))> void apply_to_fir...
TOOL
0.957311
7.164996
{ "github_metadata": { "branch": "master", "commit_count": 6258, "repo_created_at": "2016-10-22T08:47:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 452, "forks": 126, "issues": 319, "pull_requests": 84 }, "file_meta": { "content_id": "d...
380558e8-d676-4609-9ca9-dda8d9e2da12
yuyuyuyurisuki/CODE_CXX
practice/datastruct/graph.cc
#include<iostream> #include<string> #include<cstring> #include<vector> #include<algorithm> #include<deque> #include<queue> #include<stack> using namespace std; using ll = long long; const double EPS = 1e-8; const ll MAXN = 1e18; const int INF = 0x3f3f3f3f; const int N =1e3 + 5; int mp[N][N]; int main(int argc, char *...
ALGO
0.999894
3.358985
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-08-26T15:15: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": "3ed75088d...
b3a28eec-e93c-4b47-81b6-87317166b802
RishabhSkr/LeetcodeProblem
1002-maximum-width-ramp/1002-maximum-width-ramp.cpp
class Solution { public: /* Plan-> we need to maximise j-i but with condition nums[i] <=nums[j] && i<j what if we sort indice of nums acc to nums values this will always nums[i]<=nums[j] hold now if we have to check i<j and maximise (j-i) we not i is min ind and j max ind-> iterate of sort ind and store mi...
ALGO
0.999963
5.844469
{ "github_metadata": { "branch": "main", "commit_count": 1915, "repo_created_at": "2023-07-02T18:39:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a44fb6bc...
0793de55-f43d-41db-8f8a-ad94ba9e6db0
Nanboy-Ronan/LeetCode
LC102_BinaryTreeLevelOrderTraversal/BFS/LevelTraversal.cpp
#include <iostream> #include <stdlib.h> #include <vector> #include <queue> 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,...
ALGO
0.999765
4.942495
{ "github_metadata": { "branch": "main", "commit_count": 177, "repo_created_at": "2021-05-19T06:08:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5183e62c5...
8a874eeb-1283-4841-b5fc-9b847b3d03ab
mschmit6/jpl_ephemeris
jpl_ephemeris/celestial_bodies/earth.cpp
#include "earth.hpp" // standard library includes #include <stdexcept> // jpl_ephemeris includes #include "jpl_ephemeris/celestial_bodies/ephemeris_tables/moon_gcrf_table.hpp" #include "jpl_ephemeris/celestial_bodies/ephemeris_tables/earth_from_ssb_gcrf_table.hpp" #include "jpl_ephemeris/celestial_bodies/ephemeris_...
ALGO
0.993687
4.102981
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-05-21T01:40: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": "30f00ee0ea9c...
4f26333e-5117-420e-a7a5-479bb2b8f64c
AryanK37/competitiveProgramming
cf/contests/Codeforces Round 983 (Div. 2)/B_Medians.cpp
#include <bits/stdc++.h> #define int long long #define float long double #define br cout << "\n" #define pb push_back #define sp cout << " " #define all(x) (x).begin(), (x).end() #define fast_io \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); \ cout.tie(nullpt...
ALGO
0.999845
4.296731
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-18T20:41:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5257386f29c4...
df5d6f25-43f7-47fa-98d8-e4df6abf6ed3
lucsaito/DataStructures-Algorithms
Algorithms/mergesort.cpp
// // Created by Lucas on 14/04/21. // // Template function of Merge Sort algorithm, it accepts an std::vector as input. // // 1. The console reads the number of elements of the array to be sorted. // 2. The console reads all the numbers of the array separated by space. // 3. The console outputs the sorted array. #inc...
ALGO
0.999911
6.336541
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2021-04-01T03:49:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7d9ee3be0...
bd90b116-eff7-48cb-8525-efa49d091318
sarge1077/HW01
HW0101.cpp
#include <iostream> using namespace std; class Add{ private: int a,b; public: void setValue(int x, int y); int calculate(); }; class Sub{ private: int a,b; public: void setValue(int x, int y); int calculate(); }; class Mul{ private: int a,b; public: void setValue(int x, int y); in...
ALGO
0.996283
3.654279
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-09-30T04:21:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d5332a17b97...
f840ccaf-0e42-4ba6-9591-86f15fa7e896
ishandutta2007/codeforces-i
i_love_tanya_romanova/normal/313/B.cpp
/* Mental vigour's been right on the egde To a 'stupefying' hole of no return Now we dance a holy war is won But there must be more we got to learn Don't you know that I'm here I must go Into the morning light - illuminate the night Be the guide on our side - the Gnosis No return - I will go, follow the call of my sp...
ALGO
0.999785
3.774353
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "ab4451b2ff39...
e82c1daa-60a5-4cd9-9719-43ceef0996fc
mtheggi/CP-solutions
LeetCode/1568. Minimum Number of Days to Disconnect Island.cpp
class Solution { public: bool valid( const int & i ,const int & j ,const int & n,const int & m ) { return (i<n && i>=0 && j<m && j>=0 ); } void dfs(const vector<vector<int>> & grid , vector<vector<bool>> & vis, int i , int j , const int & n , const int & m ) { if (!valid(i,j, n ,m ...
ALGO
0.999949
5.789537
{ "github_metadata": { "branch": "master", "commit_count": 117, "repo_created_at": "2022-11-03T18:13: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": "0471b915...
7d5c4931-993b-438c-829b-0b5dd791bfbd
muxamot/zhenuhin_SPbETU
zad8/zad8/src.cpp
#include <iostream> int Day(int D, int M, int Y) { int a, y, m, R; a = (14 - M) / 12; y = Y - a; m = M + 12 * a - 2; R = 7000 + (D + y + y / 4 - y / 100 + y / 400 + (31 * m) / 12); return R % 7; } int returnDayOfWeek(int d1, int m1, int y1, int wd, int d, int m, int y) { int curr = Day(d1, m1, y1); int diff =...
ALGO
0.996427
3.645781
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-01-06T20:57: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": "b14848ac38...
b0a5df28-22f7-47ac-9aa4-cd74270476f3
MonDataa/metaheuristique-setcover
main.cpp
#include <iostream> #include <vector> #include <limits> #include <string> #include <chrono> #include "utils.h" #include "algorithms.h" #include "grid_search.h" using namespace std; class MetaheuristicSolver { public: void run() { int m, n; string filename; //string filename = ""; ...
ALGO
0.999976
6.330329
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-12-17T01:05:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "872f0ea26f8...
fe73e47b-4a80-4cc8-b13b-e3cf5b872f30
NelleV/ROVAR
TP1/src/vlfeat/mser/vl_erfill.cpp
/** ** @author <NAME> ** @author <NAME> (Python wrapping) ** @brief Extremal Regions filling **/ #include "../py_vlfeat.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <assert.h> extern "C" { #include <src/generic-driver.h> #include <vl/generic.h> #include <vl/stri...
ALGO
0.968584
6.687936
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2011-10-06T05:18:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77f069cf9...
69a918c8-af59-43f2-877e-d8cc4551a932
pine939/LeetCode
merge-two-sorted-lists/merge-two-sorted-lists.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* mergeTwoLis...
ALGO
0.999973
6.119979
{ "github_metadata": { "branch": "main", "commit_count": 273, "repo_created_at": "2021-08-22T23:25: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": "aa6552d44b...
04a91656-ed98-4b14-9bee-da754fbdd1f6
MauAlvarado43/CompetitiveProgramming
_DataStructures & Algorithms/Search/bfs.cpp
#include <bits/stdc++.h> #include <chrono> #define ll long long int using namespace std; void recursive_bfs(vector<vector<int>>& adj, vector<int>& visited, queue<int>& q) { if(q.empty()) return; int u = q.front(); q.pop(); cout << u + 1 << " "; for(int v : adj[u]) { if(!visit...
ALGO
0.999984
4.619908
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-03-22T02:58: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": "3f75f6cffab5...
ace1b20b-a081-4d8b-84d5-e619311eef82
xBigJhow/Estrutura-de-Dados
Tarefa 4/aula.cpp
#include <iostream> using namespace std; typedef struct No{ float info; struct No* prox; } No; typedef struct Fila{ No *inicio; No *fim; } Fila; Fila* cria(void){ //cria a fila, inicialmente Fila* f = new Fila; // e os 2 parametros da fila, inicio e fim são nulos. f->inicio = f->fim...
ALGO
0.999509
4.061006
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-03-19T16:41:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dbd003bfe8...
39402b37-9adf-4815-affd-be5dadc9e8ab
PaulWagener/mapnik-ios-framework
include/boost/polygon/detail/polygon_arbitrary_formation.hpp
/* Copyright 2008 Intel Corporation Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). */ #ifndef BOOST_POLYGON_POLYGON_ARBITRARY_FORMATION_HPP #define BOOST_POLYGON_POLYGON_...
ALGO
0.988439
3.474033
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2012-12-07T17:32:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 8, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "17072295...
391a9938-83fd-4d90-9d10-5ab46c3784f9
uniyalsarthak/DSA
binary_trees.cpp
#include<bits/stdc++.h> using namespace std; class node{ public: int data; node* left; node* right; node(int d) { this->data=d; this->left=NULL; this->right=NULL; } }; node* root=NULL; node* buildTree(node* root) { cout<<"Enter the data:"; int data; cin>>...
ALGO
0.99997
4.79243
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-08-05T17:46:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "dcda4885070...
542a23ea-247c-41c6-a92f-60a3102de1e6
ParAlg/ParGeo
src/spatialGraph/spanner/spanner.cpp
#include "kdTree/kdTree.h" #include "parlay/parallel.h" #include "parlay/primitives.h" #include "pargeo/point.h" #include "pargeo/getTime.h" #include "spatialGraph/spatialGraph.h" template<int dim> parlay::sequence<pargeo::edge> pargeo::spanner(parlay::sequence<pargeo::point<dim>> &S, double t) { using namespace std...
ALGO
0.999691
5.375355
{ "github_metadata": { "branch": "main", "commit_count": 583, "repo_created_at": "2021-12-20T20:22:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 47, "forks": 12, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6f832d6ea...
095d88a3-ab8e-4f4c-80a6-c69cd481b246
pvc97/on-tap-ung-dung-thuat-toan
Bai11/liet_ke_hoan_vi_quay_lui.cpp
// https://youtu.be/ZpVjwr7RB7Q #include <iostream> using namespace std; const int MAX = 100; void show(int a[], int n) { for (int i = 0; i < n; ++i) { cout << a[i]; } cout << endl; } void Try(int i, int a[], int checked[], int n) { for (int j = 1; j <= n; ++j) { if (checked[j] == fa...
ALGO
0.999918
4.429009
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-06-25T13:12:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "636f50417e76...
a7ff9a9b-9edc-4a33-8a36-a7a6e2a95cb3
ultimateebeast/DSA
Difficulty: Hard/Median in a row-wise sorted Matrix/median-in-a-rowwise-sorted-matrix.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: int median(vector<vector<int>> &mat) { // code here vector<int>arr; for(auto &row:mat){ ...
ALGO
0.999901
5.656369
{ "github_metadata": { "branch": "main", "commit_count": 995, "repo_created_at": "2025-02-04T13:58:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f51935bc7...
3c88d13a-e005-4f63-82df-01b1e618091f
Kodsport/swedish-olympiad-2022
onlinekval/ornattack/submissions/accepted/gustav.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vl> vvl; typedef vector<pi> vpi; typedef vector<vi> vvi; const int inf = 0x3f3f3f3f; const ll linf = 1234567890123456789; const ll mod = 1000000007; #define all(x)...
ALGO
0.999913
4.28707
{ "github_metadata": { "branch": "main", "commit_count": 330, "repo_created_at": "2021-10-01T17:48:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "bd1e6d7b1cc...
c3c7f09a-3086-46c4-bc9a-18e84ef63920
supertuxkart/stk-code
lib/bullet/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 <NAME> http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is ...
ALGO
0.997917
7.056636
{ "github_metadata": { "branch": "master", "commit_count": 23677, "repo_created_at": "2014-01-15T00:28:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4811, "forks": 1110, "issues": 463, "pull_requests": 8 }, "file_meta": { "content_id": ...
c91f428b-6a6e-4e7a-bb79-cd35ecc5b4f0
Ayush-Vish/DSA-CP-Codes
random-practice/Even_Sum_Subarray.cpp
#include <bits/stdc++.h> using namespace std; bool checkSorted(vector<int> &a) { for (int i = 0; i < a.size() - 1; i++) { if (a[i] > a[i + 1]) return false; } return true; } void takeInput(vector<int> &a, int n) { for (int i = 0; i < n; i++) { int ele; cin >>...
ALGO
0.999647
4.713289
{ "github_metadata": { "branch": "main", "commit_count": 210, "repo_created_at": "2023-07-28T06:14:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cca0af27dd...
965dfb13-45c4-4c83-a59c-0e95cce2fe46
ashutoshadhao/Leetcode
623-add-one-row-to-tree/623-add-one-row-to-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), left(left), right(r...
ALGO
0.999944
5.941169
{ "github_metadata": { "branch": "main", "commit_count": 519, "repo_created_at": "2022-08-30T09:15: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": "f6c4f82897...
da9e56d4-d462-4a65-ba15-6359fdcfb4dd
Wartori54/aoc2024
day15/main.cpp
#include <cassert> #include <iostream> #include <fstream> #include <queue> #include <vector> using namespace std; void part1() { ifstream input("../day15/input.txt"); string line; vector<string> map; int px = -1, py = -1; int height = 0; while (getline(input, line)) { if (line.empty())...
ALGO
0.999622
4.887134
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-07-13T15:22:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1f0dd8bd0...
63987188-3956-4f04-8fdd-703901176110
DanielPark827/Code
Data_Structure_P_Lee/이문규 자료구조/Heap sort.cpp
//#include <iostream> //#include <vector> //using namespace std; // //class Priority_Queue //{ //private:// 원소를 저장할 arr vector, 마지막 인덱스 // vector<int> arr; // int lastIdx; // bool greater;//기본적으로 true라고 생각하면 될듯 // //private: // void Swap(int i1, int i2) // 인자로 들어오는 두 인덱스의 원소 교환 // { // arr[0] = arr[i1]; // arr[i1] = ...
ALGO
0.99991
4.580488
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-01-05T15:16: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": "71835189eb...
3c2aca2b-23d2-4566-8f15-ae7882b3c04e
shadid-reza/Lab_work_3rd_semester
Data_structure_labs/week_6(AVL)/task_2.cpp
#include <iostream> using namespace std; struct node { int data; struct node *left; struct node *right; struct node *parent; int height; }; struct node *root = NULL; struct node *newNode(int key) { struct node *newnode = new node(); newnode->data = key; newnode->left = NULL; newn...
ALGO
0.999931
4.813604
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-06-27T08:21:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "763d8516cd3...
988559e0-4a3d-4d19-b5f2-3e73d57d2bd6
Lazarus-10/75-Days-Coding-Challenge
Arrays/Day-2/square_of_sorted_array.cpp
// https://leetcode.com/problems/squares-of-a-sorted-array/ #include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> sortedSquares(vector<int>& nums) { int n = nums.size(); vector<int> ans(n); int k = n-1; int start = 0, end = n - 1; while(start <= ...
ALGO
0.999989
5.978815
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2022-03-27T09:05:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "044ac1f9634...
c19c24c2-4856-4172-9f80-195b4d1a32f7
LutzGross/esys-escript.github.io
trilinos_source16/packages/rol/adapters/sacado/test/HS/HS_Problem_008.hpp
// @HEADER // ************************************************************************ // // Rapid Optimization Library (ROL) Package // Copyright (2014) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on be...
ALGO
0.998308
5.095314
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "865c...
9192854e-75f5-42a6-9b4f-3da3fe85a230
AdamusPL/EAD2
SimulatedAnnealing.cpp
// // Created by adamc on 07.12.2023. // #include "SimulatedAnnealing.h" SimulatedAnnealing::SimulatedAnnealing(Matrix *matrix, double a, int stopCriteria) { this->matrix=matrix; this->a = a; this->stopCriteria = stopCriteria; this->bestObjectiveFunction = this->currentObjectiveFunction = 0; } void S...
ALGO
0.999985
4.572363
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2023-11-29T19:04: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": "595edf0fc...
ab715f93-56b9-4e3f-ac48-d929d8a39c9d
y123456yz/reading-and-annotate-mongodb-4.4
mongo-r4.4.6/src/mongo/db/matcher/expression_algo.cpp
/** * Copyright (C) 2018-present MongoDB, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the Server Side Public License, version 1, * as published by MongoDB, Inc. * * This program is distributed in the hope that it will be useful, * but W...
ALGO
0.960651
7.654587
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2021-07-31T10:06:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 118, "forks": 19, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ac3e59be...
df960919-62f8-4731-b191-d374f8b095f8
tchomphoochan/cmutoi_codes
solutions/programming-in-th/10xx/29-magnet.cpp
#include <cstdio> #include <set> using namespace std; int main() { int n, m, q; scanf("%d %d %d", &n, &m, &q); set<int> border; for (int i = 0; i < m; i++) { int x, r; scanf("%d %d", &x, &r); int y = x + r; pair<set<int>::iterator, bool> xi = border.insert(x);...
ALGO
0.999943
3.497737
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-11-15T18:15:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a754b6eadb...
53665465-e165-48f2-a9ce-7c744dafae7f
JGridleyMLDL/RPI-Coursework
DataStructures/Labs/Lab9/Lab9/Lab9/part1.cpp
// // main.cpp // Lab9 // // Created by <NAME> on 4/1/20. // Copyright © 2020 <NAME>. All rights reserved. // #include <iomanip> #include <fstream> #include <map> #include <string> #include <algorithm> #include <iostream> using namespace std; typedef map< int, int> mode; int main(int argc, const char * argv[]) { ...
ALGO
0.960889
4.110867
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2021-09-20T16:54: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": "32b2d06f347...
de32ed5a-9be4-419d-b884-5c70cfc74cea
LutzGross/esys-escript.github.io
trilinos_source15/packages/rol/adapters/sacado/test/HS/HS_Problem_009.hpp
// @HEADER // ************************************************************************ // // Rapid Optimization Library (ROL) Package // Copyright (2014) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on be...
ALGO
0.998773
5.645689
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "ec07...
1443699e-1e6e-4310-b821-e8a4142b6380
sophiashuv/navch_practice
task8/main.cpp
#include <iostream> #include "Polynomial.h" using namespace std; int main() { Polynomial a, b; cin >> a >> b; cout << "a: " << a << "\n"; cout << "b: " << b << "\n"; cout << "sum(a, b): " << a + b << "\n"; int aa, bb, h; cout << "Enter interval: \na = "; cin >> aa; cout << "b = "...
ALGO
0.989156
4.342997
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2020-02-22T18:17: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": "e1d61b6bf...
1f368aa5-49e7-4246-a7d9-20488e8f82a9
uvarc/rc-learning
content/courses/parallel-computing-introduction/solns/mpitrap.cxx
#include <iostream> #include <iomanip> #include <string> #include <sstream> #include <cmath> //For templated function objects #include <functional> #include <mpi.h> using namespace std; float f(float x) { return sin(x); } //Function pointer //float trap(float a, float b, float h, int n, float (*function)(float)) {...
ALGO
0.999874
4.853843
{ "github_metadata": { "branch": "staging", "commit_count": 729, "repo_created_at": "2020-08-03T19:29:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 13, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "d095121...
f8fcfec8-a69e-4eb8-8aa6-e704888d783e
EraEKV/ADS
9/f.cpp
#include <iostream> #include <vector> using namespace std; void constructLps(string & pat, vector <int> &lps) { int len = 0; lps[0] = 0; int i = 1; while(i < pat.length()) { if(pat[i] == pat[len]) { len++; lps[i] = len; i++; } else { ...
ALGO
0.999973
4.994083
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-09-15T17:07: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": "0f7fee4e661...
cab1505c-66a3-4cb2-8e9a-7de958bf5d03
ivaibhavjindal/data-structures-and-algorithms
arrays_and_vectors/shortest_unsorted_continuous_subarray.cpp
// https://leetcode.com/problems/shortest-unsorted-continuous-subarray/ class Solution { public: bool outOfOrder(vector<int> &nums, int ind) { if (ind == 0) return nums[ind] > nums[1]; if (ind == nums.size() - 1) return nums[ind] < nums[ind - 1]; return (nums[i...
ALGO
0.999993
6.192539
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-08-13T19:49:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1de51ac2c...
287a2359-5b52-452e-b336-b8652accc711
Kr-Raman/HackerRank
Problem Solving/450 DCS/ARRAY/Reverse_array.cpp
#include<bits/stdc++.h> using namespace std; //------------------------> Brute FORCE APPROACH void rvereseArray_brute (int arr[] , int start_i , int size) { int temp [ size+1]; //space complexity ---> +n for(int i = 0 ; i < size+1 ;i++) { temp[i] = arr[i]; // n times } ...
ALGO
0.999891
5.18046
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2020-04-25T08:46:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de4bc557c13...
338dc1fc-c131-4b8c-a3ea-95b3b2ce400e
victorcroisfelt/embd-magnetic-sensor-calib
visual-studio/magnetic-sensor-calib/src/mve.cpp
/** ****************************************************************************** * @file mve.cpp * @author @victorcroisfelt * @version v2.0 * @date May 13, 2019. * @brief MVE functions. ****************************************************************************** */ /* Includes -----------...
ALGO
0.999403
3.415107
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-05-13T22:49: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": "0a307952b...
e521c71f-ebdf-4d61-aa8e-3078a6d7ab2a
jhasan2026/Road_To_Grandmaster
2_Data_Structure_and_Algorithm/7_Graph/6_CheckCycle(BFS_and_Kahns).cpp
#include "iostream" #include "vector" #include "list" #include "unordered_map" #include "queue" using namespace std; class Graph{ public: unordered_map<int,list<int>> adjList; vector<vector<int>> edges; void addEdge(int from,int to,bool direction){ adjList[from].push_back(to); adjList[to]...
ALGO
0.999868
4.872921
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2025-05-06T04:19:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f50374718...
994bae45-8f5e-404d-8157-855b5081a528
feri-gnwn/Hitung-Rata-rata-dalam-fstream
fstream(rata-rata).cpp
// program untuk membuat dan membaca dua kumpulan // data dari dua buah file bernama data1.txt dan data2.txt // dimana file data1.txt berisi bilangan-bilangan berjenis integer, // sedangkan file data2.txt berisi bilangan-bilangan berjenis float. // Kemudian mengitung rata-rata bilangan pada masing-masing array tersebut...
TOOL
0.90066
4.307587
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-23T08:09: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": "7735a63dc487...
eafd046c-0d80-457b-b16a-6f8b2f196bb9
ouczbs/UE4
Runtime/Renderer/Private/Lumen/LumenScreenProbeFiltering.cpp
// Copyright Epic Games, Inc. All Rights Reserved. /*============================================================================= LumenScreenProbeFiltering.cpp =============================================================================*/ #include "LumenScreenProbeGather.h" #include "RendererPrivate.h" #include "S...
TOOL
0.945326
6.533525
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-09-12T10:35:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd49c3b1ab...
d86b71aa-3a84-4359-9b1f-cdb3d43a50ec
amannitp131/CSES_soln
Sorting and Searching/9.cpp
// https://cses.fi/problemset/task/1641 #include <bits/stdc++.h> using namespace std; typedef long long int ll; #define fast() \ { \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); ...
ALGO
0.999995
4.490655
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-06-20T04:43: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": "d3129fe2edc...
24e753a2-a5f3-460f-8a78-caa00384d7ac
the-shoaib2/Sector-2.0
Algorithms/Graph/DFS_.cpp
#include <bits/stdc++.h> using namespace std; void dfs(vector<vector<int>> &image, int sr, int sc, int newColor, int oldColor) { if (sr < 0 || sc < 0 || sr >= image.size() || sc >= image[0].size() || image[sr][sc] != oldColor) return; if (image[sr][sc] == newColor) return; image[sr][sc] =...
ALGO
0.999708
5.690612
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-11-27T11:50:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a22dca77daa...
778347e9-ad2d-4699-84fb-3f03096f3ef0
bdqnghi/bi-tbcnn
code/quicksort/cpp/2184.cpp
#include <string> #include <vector> #include <iostream> using namespace std; void quickSort(vector<int>& arr, int left, int right) { int i = left, j = right; // 0 4 int tmp; int pivot = arr[(left + right)/2]; // 2 /* partition */ while (i <= j) { while (arr[i] < pivot) ...
ALGO
0.999992
4.757708
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2017-10-04T10:39:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 51, "forks": 18, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "55d7bd...
e955af41-1e45-4c1a-a393-d2bdf8f401d4
nbozsi/mintaillesztesi_algoritmusok
c++_implementációk/regi_implementáciok/Horspool.cpp
#include <iostream> #include <map> using namespace std; map<char, int> tav(string minta, string szoveg) { map<char, int> E; for (int i = 0; i < szoveg.length(); i++) { E[szoveg[i]] = minta.length(); } for (int i = 0; i < minta.length() - 1; i++) { E[minta[i]] = minta.length() -...
ALGO
0.999971
4.468545
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2022-11-02T16:02: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": "84eaec7a...
aa107646-c03e-47d6-ba90-bd13f7f452ee
jigjnasu/discrete_mathematics_and_its_applications
chapter_2_basic_structures/2.4_sequences_and_summations/exercises/repo/solution_17_f.cpp
/* C++ solution for Problem 17 f. Iterative solution and recursive solution. Need to check the sequence is correct or not, it must be matching. Discrete Mathematics and its Applications Author: <NAME> @ <EMAIL> Date: Jan 3rd, 2017 */ #include <cstdio> #include <cmath> int recursive_17_f(int n) { if (n...
ALGO
0.999705
4.550696
{ "github_metadata": { "branch": "master", "commit_count": 2690, "repo_created_at": "2016-09-04T15:23:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 165, "forks": 37, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2d2c...
a5e6290f-3622-4e9f-bccf-415e7f630008
puarts/WspTools
Programs/Include/wsp/math/_tpl_fn-math.h
/** * @file _tpl_fn-math.h * */ #ifndef WSP_MATH_TEMPLATE_FUNCTION_MATH_H__ #define WSP_MATH_TEMPLATE_FUNCTION_MATH_H__ #include "_define_mathutil.h" namespace wsp{ namespace math{ /* ------------------------------------------ Basic ------------------------------------------*/ template...
ALGO
0.921609
6.186098
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-01-14T08:32: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": "79bb5a7678...
5eab503c-075f-4606-8144-8e6ef56c91ce
tinwoon/baekjoon_algorithm
Algorithm_code/2042.cpp
#pragma warning (disable:4996) #include <iostream> #include <vector> //2042 구간합 문제 //전형적인 펜윅트리를 작성하는 문제 //개인적으로 굉장히 세상에 천재는 많다는 생각을 느끼게 해준 문제이다. //정형화되어 있는 공식이 없지만 과정을 기억해야한다. long long N, M, K; std::vector<long long> data; std::vector<long long> prefix; std::vector<long long> tree; //n번의 segment prefix를 구하는 함수 void...
ALGO
0.999944
5.32604
{ "github_metadata": { "branch": "master", "commit_count": 250, "repo_created_at": "2020-02-06T06:35:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70f029e1...
b69c4144-16fd-4ecf-aaf0-e75fe9834a03
millathossain115/Data-Structure-and-Algorithms-Il
Assignment 04/dijkstra.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; #define MX 105 #define INF 1000000000 #define NIL -9999 struct node { int val; int cost; }; vector<node> G[MX]; bool vis[MX]; int dist[MX]; class cmp { public: bool operator()(node &A, node &B) { if (A.cost > B.cost)...
ALGO
0.999959
4.296118
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-05T11:36: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": "71775dc21fc5...
280bc64a-0de1-4af7-8eb0-cb00b95ebe1e
raman7073/AllAboutCPP
Contest/gfg/GFG33/2.cpp
#include <bits/stdc++.h> using namespace std; // identify identical subarrays, and check for min operations // considering removing all elements from left or right int arrayOptimization(int n, vector<int> &arr) { // code here unordered_map<int, int> map; int l = 0, r = 0; int res = INT_MAX; while (...
ALGO
0.999857
4.572454
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-04-01T17:08:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3eff20e5de5...
897bedf0-a1ea-4c3c-9596-46c2b7e52ad6
MHF2145/Data-Structure-2023
random/E.cpp
// C++ program for the above approach #include <bits/stdc++.h> using namespace std; // DSU data structure // path compression + rank by union class DSU { int* parent; int* rank; public: DSU(int n) { parent = new int[n]; rank = new int[n]; for (int i = 0; i < n; i++) { parent[i] = -1; rank[i] = 1; ...
ALGO
0.999977
4.862705
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-04-12T09:46:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b5c26201c8...
a8533b40-ad76-462a-a281-7065b4fb5f78
qingswu/Transim
Transims60/PerfPrep/Set_Min_Time.cpp
//********************************************************* // Set_Min_Time.cpp - set the minimum travel time //********************************************************* #include "PerfPrep.hpp" //--------------------------------------------------------- // Set_Min_Time //----------------------------------------------...
ALGO
0.991374
5.14949
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2015-05-07T16:53: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": "98639cffb...
18ec62c2-c95d-4740-87e7-abbde8d2f3c8
MAZHARMIK/Interview_DS_Algo
Tree/Construct Binary Tree from Preorder and Inorder Traversal.cpp
/* MY YOUTUBE LINK : https://www.youtube.com/watch?v=G5c1wM3Kpuw&list=PLpIkg8OmuX-K23LhcamOcDlTBisiNJy5E&index=4 Company Tags : Accolite, Amazon, Microsoft Leetcode Link : https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ */ //Basic Approach class Solution { ...
ALGO
0.999997
6.810939
{ "github_metadata": { "branch": "master", "commit_count": 5946, "repo_created_at": "2020-07-12T13:13:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2586, "forks": 1357, "issues": 7, "pull_requests": 37 }, "file_meta": { "content_id": "...
0f605cf1-da84-46ba-a1f0-f0dc733b24a4
wangyenjen/JAW-codebook
contest/Petrozavodsk 2011 Kyiv + Kharkov NU/A.cpp
#pragma GCC optimize("O3") #pragma GCC target("avx") // #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <vector> #include <cstring> #include <unordered_map> using namespace std; int P, t; short table[100000000 + 7]; inline int power(int a, int n) { int x = 1; while (n) { if (n & ...
ALGO
0.999804
4.532483
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2019-02-25T14:54:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ddb365ca...
6bee4f48-ab0d-44db-bed7-3950b12ab0d6
hugoresende27/c-_Exercicios
Exercicios_PDF/exc10_vendedora_frutas.cpp
/* ) Uma vendedora de frutas quer analisar como foi sua venda no dia. Supondo que ela venda por gramas, faça um programa em C que: a) Leia um número N correspondente ao número de vendas do dia (10 <= N <= 1.000). b) Leia um vetor de números reais chamado Peso, correspondente ao peso de uma das vendas. Calcule e imprima...
ALGO
0.995246
3.566485
{ "github_metadata": { "branch": "main", "commit_count": 282, "repo_created_at": "2021-08-31T21:31: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": "31b181098c...
62dfd2af-96a9-4073-89ba-298726056244
Nsteel/Apollo_13
car_handler/src/ForwardKinematics.cpp
/* * ForwardKinematics.cpp * * Authors: <NAME> * <NAME> * <NAME> * <NAME> */ #include <car_handler/ForwardKinematics.h> /* The standard constructor for ForwardKinematics only requries the distance * between front and back axis als input arguments. That means the starting * postion is always (...
ALGO
0.999049
5.860699
{ "github_metadata": { "branch": "master", "commit_count": 173, "repo_created_at": "2015-10-30T10:02:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df36302f...
95b312d1-6b1a-4875-b196-6a1792717d7f
Qu-Ack/codes_os
PAGE_REPLACEMENT_OPTIMAL.cpp
#include <bits/stdc++.h> using namespace std; int optimal(vector<int> refs, int nFrames) { set<int> frames; int faults = 0; for (int i = 0; i < (int)refs.size(); ++i) { int page = refs[i]; if (frames.count(page)) continue; if ((int)frames.size() < nFrames) { frames.inser...
ALGO
0.999174
4.783541
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-04-27T18:50:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b960857e4ad6...
4a607536-59ec-4ace-b861-50729e4018b9
marcogroot/leetcode-solutions
misc/1752.cpp
#include <algorithm> #include <iostream> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> // https://leetcode.com/problems/check-if-array-is-sorted-and-rotated/?envType=daily-question&envId=2025-02-02 // 01-02-2025 @ marcogroot using namespace std; bool check2(int start, vector<...
ALGO
0.999969
6.048907
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-10-15T10:05:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2d5d3b73a6...
3b963866-d528-48f5-8108-10b89b7595dc
AngelKitty/review_the_national_post-graduate_entrance_examination
books_and_notes/professional_courses/data_structures_and_algorithms/sources/国家集训队论文/国家集训队2009论文集/罗穗骞《后缀数组——处理字符串的有力工具》/附件/附件3---源程序/pku3261/pku3261_dc3.cpp
#include "stdio.h" #define maxn 20003 #define maxm 1000002 #define F(x) ((x)/3+((x)%3==1?0:tb)) #define G(x) ((x)<tb?(x)*3+1:((x)-tb)*3+2) int wa[maxn],wb[maxn],wv[maxn],ws[maxm]; int c0(int *r,int a,int b) {return r[a]==r[b]&&r[a+1]==r[b+1]&&r[a+2]==r[b+2];} int c12(int k,int *r,int a,int b) {if(k==2) return r[a]<r[b...
ALGO
0.99998
3.610447
{ "github_metadata": { "branch": "master", "commit_count": 242, "repo_created_at": "2019-03-30T09:23:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1026, "forks": 205, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "7f7...
03e9fb25-7887-466c-8c2e-f280e278fb46
LuisAlbertoVasquezVargas/CP
otherRepos/Codes/Home/luis/10180_UVA.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999876
3.70596
{ "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": "a4f5418718...
3c08f25d-9455-4eaa-8769-618bb30d20e6
NilFoundation/boost-crypto3
include/boost/crypto3/block/detail/md5/md5_functions.hpp
//---------------------------------------------------------------------------// // Copyright (c) 2018-2020 <NAME> <<EMAIL>> // // Distributed under the Boost Software License, Version 1.0 // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt //--------------------------------------...
ALGO
0.995099
7.280034
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2020-04-06T21:32:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5f8312f73a...
c8fb7e64-ae3f-4128-89a2-d76e87662603
LOVKUSH9888/DSA-Basics
Array/maxElementofArray.cpp
#include <iostream> using namespace std; // Function to find the maximum element in the array int findMax(int arr[], int n) { int max = arr[0]; // Initialize max with the first element in the array for (int i = 1; i < n; i++) { if (arr[i] > max) { // If the current element is greater than max ...
ALGO
0.999966
5.958818
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2023-02-08T01:09:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "987de054...
f26930bf-f968-4a02-8260-e9519e281ef6
Ankitjarwall/code-with-ankit
c++/sem-3/link-list.cpp
#include <iostream> using namespace std; struct node { int data; node *next; } *head = NULL, *temp = NULL; void traverse() { temp = head; while (temp != NULL) { cout << temp->data << " "; temp = temp->next; } } // void traverse(struct node *temp) // { // if (temp != NULL) /...
ALGO
0.999066
4.017055
{ "github_metadata": { "branch": "main", "commit_count": 3180, "repo_created_at": "2022-01-20T06:59:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87eb831f9...
99108776-7c17-4b18-a687-215fe2c39f7f
ishandutta2007/codeforces-f
fanache99/normal/1246/D.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <stack> #include <cassert> #include <map> #include <numeric> #include <cstring> #include <set> #include <ctime> #include <queue> #include <cmath> #include <iomanip> #include <iterator> #include <bitset> #include <unordered_map> #incl...
ALGO
0.999895
4.122376
{ "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": "b3672ef35ca0...
35bb6b23-3db2-499a-82cd-5656eb9e8a2d
alone2time/Lab14_640610651
lab14_1.cpp
#include <iostream> #include <cmath> using namespace std; void stat(const double[],int,double[]); int main(){ double A[] = {1.2,3.5,6.9,7.8,12.5,0.5}; int N = sizeof(A)/sizeof(A[0]); double B[6]; stat(A,N,B); cout << "Arithmetic Mean = " << B[0]; cout << "\nStandard Deviation = " << B[1]; ...
ALGO
0.998957
3.332249
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2021-12-28T05:33: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": "7168921ce...
aa779dd5-0bc8-4baf-afdd-ab8458234bda
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/08/0807/personal_submission/cf578b_InnerWorldExplorer.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3,Ofast,unroll-loops") using namespace std; template <class T> bool ckmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; } // set a = max(a,b) int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, k, x; cin >> n >> k >> x; const int N =...
ALGO
0.999728
4.831706
{ "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": "3aae...
d0847c34-8986-4df8-8577-6de80b7aeae0
fer9828/Cpp_Course
Seccion11_FuncionesEnC++/Clase 122 - Calcular fecha actual dependiendo en numero de dias.cpp
/* Escriba una funcion nombrada calc_anos() que tenga una parametro entero que represente el numero total de dias desde la fecha 1/1/2000 y parametros de referencias nombrado años, mes y día. La función es calcular el año, mes y día actual para el número dado de días que se le transmitan. Para este pro...
TOOL
0.998682
3.942537
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-04-27T03:17: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": "796e69802243...
49e5abd6-b4c9-47d4-b9c9-3c3d2921964e
maldonadoq/molecular
cluster/test-find.cpp
#include <iostream> #include <thread> #include <vector> #include <utility> #include <chrono> #include "../utils/read.h" using namespace std::chrono; using std::cout; using std::vector; using std::string; using std::pair; using std::thread; using std::make_pair; vector<vector<float> > distances; vector<pair<int,int> ...
ALGO
0.999668
4.595285
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2019-03-20T17:57: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": "e2f847f0...
0ff68ca8-1655-4570-b5c5-d56af4e1c003
FCHXWH/GAACT
GAACT_v0/GAACT.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <random> #include <assert.h> #include <algorithm> #include "GAACT.h" using namespace std; //void GA_GeneSort(ACT_Man_t& ActMan, Gene gnew) //{ // ActMan.Populations[ActMan.nGenes] = gnew; // for (int i = ActMan.nGenes - 1; i >= 0;...
ALGO
0.999989
4.137599
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-12-28T08:39: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": "5efa05ebd...
43d9adf0-c138-4b22-b608-0791e6b98452
f4t4nt/competitive-programming
archive/Kattis/birthdaygift.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; using ll = long long; using ull = unsigned long long; using ld = long double; using ch = char; using str = string; #define pb push_back #define elif else if #define sz(C) (ll) C.size() #define mp make_p...
ALGO
0.999828
4.539902
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2021-12-06T03:40:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95726d07a26...
ab4f9070-72f2-4272-a20b-b716c98347f5
Muneef-10/2nd-Year
DAA LAB-MANUAL/W8_2.cpp
#include<bits/stdc++.h> using namespace std; int FindParent(int u, vector<int> &parent) { if(u==parent[u]) return u; return parent[u]=FindParent(parent[u],parent); } void Union(int u,int v, vector<int> &parent,vector<int> &rank) { int pu=FindParent(u,parent); int pv=FindParent(v,parent); if(rank[p...
ALGO
0.999974
5.058387
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-07-02T08:01: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": "26fb3c51589...
32cc76b7-408e-4357-9ec2-7bc1e7feef99
helfo2/competitive-programming
1362a.cpp
#include <iostream> #include <cmath> #define ll unsigned long long using namespace std; int main(void){ int t; cin >> t; while(t--){ ll a, b; cin >> a >> b; ll _a, _b; if(a > b){ _a = b; _b = a; } else { _a = a; _b = b; ...
ALGO
0.999933
3.960147
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-01-17T20: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": "49d5d6f3e6...
2c80828d-3bff-4cae-bf9b-6d6b5770d374
Ricxel/PROGRAMMAZIONE_1
funzioni/number_operations.cpp
#include "number_operations.h" double pow(double a, int n){ double ris = 1; for(int i = 1; i <= n; i++){ ris *= a; } return ris; } int binToDec(char * bin){ int dec = 0,i; int len = 0; for(int i = 0; bin[i] != '\0'; i++){ len++; } int p = len - 1; for(int i = 0; b...
ALGO
0.999348
3.47855
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2023-10-15T16:01: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": "b08fb3ccb86...
f28ae567-480f-43c3-8e2a-3440284808c6
gsy3761/Pile
ProblemSet/pintia.cn/2020-CCPC-WannaFly-Winter-camp/Day5/M.cpp
#include <algorithm> #include <iostream> #include <map> #include <vector> using LL = long long; const long long MAX_N = 100; const long long MAX_M = 10; const long long MAX_W = 5000; int ProblemAcceptCount[MAX_M]; bool Accepted[MAX_N][MAX_M]; int MemberAcceptCount[MAX_N]; int SubmitCount[MAX_N]; int MaxContinueF...
ALGO
0.999749
4.074201
{ "github_metadata": { "branch": "master", "commit_count": 316, "repo_created_at": "2020-01-26T11:05: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": "9eb19326...
507733d4-ac7a-4de2-b5da-97a34d143b84
ishandutta2007/codeforces-c
cxy07/normal/888/F.cpp
//Code By CXY07 #include<bits/stdc++.h> using namespace std; //#define FILE #define int long long #define file(FILENAME) freopen(FILENAME".in", "r", stdin), freopen(FILENAME".out", "w", stdout) #define randint(l, r) (rand() % ((r) - (l) + 1) + (l)) #define LINE() cout << "LINE = " << __LINE__ << endl #define debug(x) ...
ALGO
0.999983
4.036213
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17: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": "1591c523f40b...
41835b0f-4cee-4948-bcbd-a27e2e2adefd
Ash0369/LeetCode2
2999.cpp
#define ll long long ll int dp[30][3]; ll int dfs(int index,bool tight,string &upper,int limit,string &s) { if(dp[index][tight]!=-1) { return dp[index][tight]; } int sz=s.size(); int need=upper.size(); if(index+sz>need) { return 0; } if(index+sz==need) { ...
ALGO
0.999808
4.798209
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2023-11-19T04:53: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": "85d56b28cb...
5a97e095-8450-4672-854c-91d94e1f47fe
patriya-piyawiroj/MAPF
task2/task2.cpp
#include <iostream> #include <fstream> #include "MAPFInstance.h" #include "AStarPlanner.h" #include <tuple> int main(int argc, char *argv[]) { MAPFInstance ins; string input_file = argv[1]; string output_file = argv[2]; if (ins.load_instance(input_file)) { ins.print_instance(); } else { ...
ALGO
0.953974
4.764674
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-11-07T02:11:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df4ab1a959...
d09999e3-37c5-43d6-b7ce-1ee248be8738
IvanAli/ACMICPC2017Training
NCPC14/d/d.cpp
#include <bits/stdc++.h> #define pb push_back using namespace std; int ga1, ga2, gb1, gb2; int ea1, ea2, eb1, eb2; int main() { scanf("%d%d%d%d", &ga1, &ga2, &gb1, &gb2); scanf("%d%d%d%d", &ea1, &ea2, &eb1, &eb2); vector<int> g, e; for (int i = ga1; i <= ga2; i++) for (int j = gb1; j <= gb2; j++) g.pb(i + j); fo...
ALGO
0.99995
3.61678
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-12-14T05:43: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": "beffa79384...
fde5ba17-144e-4d80-9aa3-785de89d4241
PankajJoshi-05/CSES-ProblemSet
GraphAlgorithms/Monsters.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define nl endl #define vi vector<int> #define vvi vector<vector<int>> #define vll vector<long long> #define vc vector<char> #define vvc vector<vector<char>> #define pii pair<int,int> #define f first #define s second void fastIO() { ios_base::syn...
ALGO
0.999955
4.691182
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-11-15T10:47:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "983d82ef951...
41e70cc2-fb60-48b1-a78f-07ac67dfa31d
NREL/EnergyPlus
third_party/DElight/WxTMY2.cpp
/* Copyright 1992-2009 Regents of University of California * Lawrence Berkeley National Laboratory * * Authors: <NAME> and <NAME> * Building Technologies Department * Lawrence Berkeley National Laboratory */ /************************************************************** * C Language Im...
TOOL
0.91529
4.12817
{ "github_metadata": { "branch": "develop", "commit_count": 40658, "repo_created_at": "2013-11-22T14:47:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1278, "forks": 441, "issues": 908, "pull_requests": 48 }, "file_meta": { "content_id":...
773d93ed-fec4-4d64-85b4-a022fb3c7220
Frusciante/codetree
250523/독서실의 거리두기 2/study-cafe-keeping-distance-2.cpp
#include <iostream> #include <string> using namespace std; int N; string seats; int main() { cin >> N; cin >> seats; // Please write your code here. int max_dist = 0; int dist_start = 0; int max_dist_idx = 0; for (int i = 0; i < seats.length(); i++) { if (seats[i] == '1') ...
ALGO
0.99999
3.853037
{ "github_metadata": { "branch": "main", "commit_count": 292, "repo_created_at": "2025-04-01T08:51:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f540c018d...
30f5f5ad-a7d2-4870-93a6-c96a8154cb10
Tlpatna/Student
Student.cpp
#include<iostream> #include<string> using namespace std; char grade; int numstudent,score[100]; void Liststudent(string name[100],int score[100],int); char Calgrade(int); char main() { string name[100]; cout << "Input number of student : "; cin >> numstudent; for (int l = 0 ; l < numstudent ; l++) { cout << "Inp...
TOOL
0.907101
3.217136
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-09-10T14:25: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": "6de9b60740...
eef851e2-9601-4c5e-b9e9-3c139e8b8cd9
richard-shaw/algo
contest/1586/c/c.cpp
/* Generated by powerful Codeforces Tool * Author: RichardShaw * Time: 2021-10-17 19:05:03 */ //#pragma GCC optimize("Ofast", "inline", "-ffast-math") //#pragma GCC target("avx,sse2,sse3,sse4,mmx") #include<bits/stdc++.h> using namespace std; void fast_stream() { ios_base::sync_with_stdio(0); cin.tie(0); ...
ALGO
0.999967
4.361366
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2021-09-21T15:08: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": "78dcca70d...
f69879d8-3d53-4ecf-af5b-c3743a7c33af
fffffggggggggg14/Library_String
fffggggg_clsString.h
#pragma once #include <iostream> #include <vector> #include <string> using namespace std; class clsString { private: string _S; public: static char UpperChar(char C){ return (C >= 97 && C <= 122) ? C -= 32 : C; } static char LowerChar(char C){ return (C >= 65 && C <= 90) ? C += 32 : C; } static bool IsLowerChar(c...
TOOL
0.984083
3.711262
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-14T14:11: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": "8308f854fd65...
f45904e4-687b-40cc-be34-00aa3ca7b4b8
arthurherbout/crypto_code_detection
data/code-jam/files/5314486_PavelSavchenkov_5687148430753792_1_extracted_main.cpp
#include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <set> #include <map> #include <utility> #include <cstdlib> #include <memory> #include <queue> #include <cassert> #include <cmath> #include <ctime> #include <complex> #include <bitset> #include <fst...
ALGO
0.999947
3.602531
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2019-09-20T18:35:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "adc20241...
2cd59284-98ba-4125-8e32-927e01d57709
praat/praat.github.io
LPC/LPC_to_Spectrogram.cpp
/* LPC_to_Spectrogram.cpp * * Copyright (C) 1994-2019 <NAME> * * This code is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * *...
ALGO
0.992053
6.076286
{ "github_metadata": { "branch": "master", "commit_count": 9387, "repo_created_at": "2014-04-11T18:36:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1717, "forks": 256, "issues": 57, "pull_requests": 7 }, "file_meta": { "content_id": "11...
7d7b0063-cb90-4966-b055-95b72ff010c2
mdzobayer/Problem-Solving
Light OJ/1044 – Palindrome Partitioning.cpp
#include <bits/stdc++.h> #define SIZE 1000+5 using namespace std; int dp[SIZE], n; char s[SIZE]; bool isPalindrome(int l, int r) { while(l < r) { if(s[l] != s[r]) return false; ++l; --r; } return true; } int solve(int p) { if(p == n) return 0; if(dp[p] != -1) return dp[p...
ALGO
0.999798
4.074219
{ "github_metadata": { "branch": "master", "commit_count": 987, "repo_created_at": "2019-01-14T15:44:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd7b25ba...
bb4335cd-7eab-492a-89c6-75cbc270233d
RahulScripted/LeetCode-Problems
Leetcode POTD/December 2024/_5_2337_MovePiecesToObtainString.cpp
// You are given two strings start and target, both of length n. Each string consists only of the characters 'L', 'R', and '_' where: // 1. The characters 'L' and 'R' represent pieces, where a piece 'L' can move to the left only if there is a blank space directly to its left, and a piece 'R' can move to the right onl...
ALGO
0.99998
5.384426
{ "github_metadata": { "branch": "main", "commit_count": 151, "repo_created_at": "2024-09-24T14:55: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": "eacf9192e3...
894052f0-a8c6-458e-a527-f2be1c33ae8b
PanduDcau/Algorithms
Cpp/ActivitySelectionUnsorted.cpp
//C++ program for activity selection problem when unsorted. #include <bits/stdc++.h> using namespace std; //Each activity has a start time and finish time. struct Activitiy{ int start, finish; }temp; //Prints the maximum set of activities that can be done by a single person, one at a time. void ActivitySelectio...
ALGO
0.999984
4.88358
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-10-21T05:57:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "468d3e25792...
69cc08a8-f8fd-4a48-bfee-e21218b1a639
LutzGross/esys-escript.github.io
trilinos_source15/packages/rol/adapters/sacado/test/HS/HS_Problem_007.hpp
// @HEADER // ************************************************************************ // // Rapid Optimization Library (ROL) Package // Copyright (2014) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on be...
ALGO
0.988285
5.654932
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "3fad...