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
b2aa24fe-5b04-4f9a-b483-06ad3d60c982
killer-abhi/Data-Structure-and-Algorithms
Graphs/get_path_DFS.cpp
#include <bits/stdc++.h> #include "graphInput.h" using namespace std; bool getPathDFS(int **edges, int n, int s, int e, bool *visited, vector<int> &res) { if (e == s) { res.push_back(s); return true; } visited[s] = true; bool ans = false; for (int i = 0; i < n; i++) { ...
ALGO
0.999859
3.763138
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-05-02T19:10: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": "de5409432d...
b362dbe3-5719-4cf8-bb62-4ef3b5d827fe
RosettaCommons/rosetta
source/external/include/ndarray/fft_fwd.h
// -*- c++ -*- /* * Copyright (c) 2010-2012, <NAME> * All rights reserved. * * ndarray is distributed under a simple BSD-like license; * see the LICENSE file that should be present in the root * of the source distribution, or alternately available at: * https://github.com/ndarray/ndarray */ #ifndef NDARRAY_FFT_...
CONFIG
0.921387
6.426175
{ "github_metadata": { "branch": "main", "commit_count": 11737, "repo_created_at": "2023-11-17T16:42:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 296, "forks": 100, "issues": 27, "pull_requests": 9 }, "file_meta": { "content_id": "230a...
731cf08a-f2ee-4e0c-81bb-07984862b424
navneetujjain/LeetCode-Problems
1753-path-with-minimum-effort/1753-path-with-minimum-effort.cpp
class Solution { public: int minimumEffortPath(vector<vector<int>>& heights) { priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>, greater<pair<int, pair<int, int>>>> pq; int m = heights[0].size(), n = heights.size(); if(n - 1 == 0 && m - 1 == 0) return 0; ...
ALGO
0.999979
5.822932
{ "github_metadata": { "branch": "main", "commit_count": 720, "repo_created_at": "2023-09-18T00:16:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10914f9b27...
0108a8a9-caf2-4c94-be8a-ba4b3ca30dad
UG4/ugcore
ugbase/lib_algebra/graph_interface/bidirectional.h
/* * Copyright (c) 2022: G-CSC, Goethe University Frankfurt * Author: <NAME>, 2022 * * This file is part of UG4. * * UG4 is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License version 3 (as published by the * Free Software Foundation) with the fo...
ALGO
0.924891
6.604373
{ "github_metadata": { "branch": "master", "commit_count": 11149, "repo_created_at": "2015-11-09T09:17:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36, "forks": 24, "issues": 9, "pull_requests": 8 }, "file_meta": { "content_id": "6df51...
8a282147-8290-4b7c-8423-91446da42127
siosio34/AlgorithmStudy
search/2251.cpp
#include <iostream> #include <queue> #include <utility> using namespace std; bool check[201][201]; bool ans[201]; int main() { int first, second, third; cin >> first >> second >> third; int sum = third; queue<pair<int,int> > q; q.push(make_pair(0,0)); check[0][0] = true; ans[third] = true; while(!q.empt...
ALGO
0.999964
3.284086
{ "github_metadata": { "branch": "master", "commit_count": 656, "repo_created_at": "2018-06-06T04:32:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "160f3fca...
0bf691ca-ef0e-46ed-bb7d-1f7009fc2629
akhilkammila/leetcode-screenshotter
editorial_code/1-999/059. Spiral Matrix II/cpp-0.cpp
class Solution { public: vector<vector<int>> generateMatrix(int n) { vector<vector<int>> result (n, vector<int>(n)); int cnt = 1; for (int layer = 0; layer < (n + 1) / 2; layer++) { // direction 1 - traverse from left to right for (int ptr = layer; ptr < n - layer; ...
ALGO
0.999986
6.107408
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-06-02T16:24:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 912, "forks": 294, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "c41c030...
9ebb198a-8a7b-4786-b458-4087466fbf91
mamikonyana/6.854-project-fall2016
src/polyarc.h
#ifndef POLYARC_H #define POLYARC_H #include <vector> struct Point2D { double x, y; bool operator == (Point2D other) { return fequal(x, other.x) && fequal(y, other.y); } }; struct Vertex { Point2D location; Point2D arch_center; int circle_index; // index of circle }; class PolyArc {...
ALGO
0.962707
5.937442
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2016-12-09T18:34: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": "0e9d76b2...
2a8bf464-90dd-4004-983b-aa0cb509be44
leejunguk/2dgample
Source (2).cpp
#include <iostream> #include <queue> using namespace std; const int NumberOfCPU = 4; struct PCB { int PID; int arrive_time; int length; int executed_Length; int priority; }; int current_time; void GenerateProcess() { struct data { int time; int length; int priority; }; vector <data> proc; const in...
ALGO
0.999091
4.347085
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2016-10-14T09:31: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": "83b85d384...
f6d5084a-46fc-4b0c-9198-a2c892efb796
chillcicada/MySchoolwork
src/cpp2/HW02/_t1_original.cpp
#include <cctype> #include <iostream> #include <string> using namespace std; int main() { for (string s; getline(cin, s);) { // 遍历输入的每一行 bool first; // 是否是当前行的第一个整数 size_t n = s.size(); for (size_t i = 0; i < n; i++) if (s[i] >= 0 && s[i] <= 9) { // s[i] 是一个数字 ...
ALGO
0.998614
4.302496
{ "github_metadata": { "branch": "main", "commit_count": 415, "repo_created_at": "2024-01-15T15: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": "70ce9fb2b0...
37308b15-80be-49c7-bbba-f879a4816c39
tanlizhi/leetcode
src/old/letter-combinations-of-a-phone-number.cpp
// // Created by mayfly on 18-12-3. // #include <iostream> #include <string> #include <vector> using namespace std; //用进位的方法生成全排列,来循环输出所有结果 vector<string> letterCombinations(string digits) { int strLen=digits.size();//获取字符串长度 vector<string> result; if(strLen<1){ return result; } vector<vect...
ALGO
0.999337
5.45125
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2018-11-17T14:01: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": "293fd6734...
288f3e9f-b293-4913-b0f0-9474199df34f
SwapnanilHalder/CodingFiles
CSES/1745_money_sums.cpp
#include <bits/stdc++.h> #define SPEED1 ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL) #define int long long int #define For(i, a, b) for(int i=a; i<b; i++) #define endl '\n' #define pl(x) cout << x << "\n" #define deb(x) cout << '\t' << #x << "= " << x << endl #define vi vector<int> #define vi2d vector<v...
ALGO
0.99996
4.006045
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2020-06-12T18:02:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 30 }, "file_meta": { "content_id": "f4b4c80...
10c5e843-4383-423c-aec4-ddf796010139
MadhuBabuBairu/DSA-Prep
BinarySearch/LogicBuilding/searchInRotatedSortedArrayOptimal.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int search(vector<int> &nums, int k) { int n = nums.size(); int low = 0,high = n-1; //searching element in a sorted & rotated array while(low <= high){ int mid = (high + low)/2; if(nums[mid] =...
ALGO
0.999996
6.075466
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2024-12-08T11:25: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": "a01e47a1c89...
bd40c4b5-56c7-43f3-af89-918cef75c817
ravirj0601/cpp
Old_DSA_Prac/ArrayQ/arrF_Duplic.cpp
#include<iostream> #include<vector> #include<bits/stdc++.h> using namespace std; vector<int> find_Dupli(vector<int> &,int); void inputElem(vector<int> &,int); void printArray(vector<int> &); int main(){ vector<int> arr; int size; cout<<"Input The size of The Array:- "; cin>>size; inputElem(arr,size); vector<int> arr1...
ALGO
0.999957
3.906432
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2022-02-12T05:25:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b28186ab...
b562b547-5422-4a26-ae1c-75fcaffdc782
deepam20050/IOI-training-archive
solutions/4D.cpp
// http://codeforces.com/problemset/problem/4/D #include <bits/stdc++.h> using namespace std; const int N = 5010; int dp[N], peche[N]; vector < pair <int, int> > p; map < pair <int, int> , int > mp; int main() { int sz, w, h; scanf("%d %d %d", &sz, &w, &h); for (int i = 0; i < sz; ++i) { int x, y; scanf("%d...
ALGO
0.999978
3.444346
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-10-31T10:44:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae41e086e0ff...
12aa5015-0f38-4848-b39c-dfb6c3d22ae9
hyunji0618/My_Solution_To_Kattis
Solutions/RestaurantOrders.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n,m,s; vector<int> v(30000,-1); v[0] = 0; cin >> n; vector<int> c(n); for (int i = 0; i < n; ++i){ cin >> c[i]; } for (int i = 0; i < n; ++i) { for (int j = 0; j + c[i] < 30...
ALGO
0.99997
3.450194
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2022-06-22T03:50: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": "5a58ea284b9...
4308f018-fef7-4fd6-949a-e035d416a3a6
MDNoorUddin/UVA-Solutions
118.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); int n,m; cin>>n>>m; int I=0,J=0; int position; string str; vector<vector<int> > x(n+1); for(int i=0;i<=n;i++) { for(int j=0;j<=m;j++) { ...
ALGO
0.999929
3.956364
{ "github_metadata": { "branch": "master", "commit_count": 471, "repo_created_at": "2017-08-21T17:52:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb08fb42...
a54d6944-646a-4f30-8336-f0daf03d19be
Pragati1419/Leetcode
Boundary Traversal of binary tree - GFG/boundary-traversal-of-binary-tree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; ...
ALGO
0.999765
5.797251
{ "github_metadata": { "branch": "main", "commit_count": 2395, "repo_created_at": "2022-01-25T11:39: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": "8933ea570...
b0d64437-d5be-4669-ab6d-5a1f65462f2c
YiPrograms/NTHU
DS/lab3/13183.cpp
#include <iostream> #include <set> using namespace std; set<long long> st; int main() { int n; cin >> n; while (n--) { string s; cin >> s; if (s[0] == 'H') { long long x; cin >> x; st.emplace(x); } else if (s[0] == 'B') { long long a...
ALGO
0.991986
3.404222
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2020-10-25T03:11:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebc01fd2e...
6a8a73bf-5d12-44f4-9115-b3b72cca7787
ashishmodi2081/Constructors
main.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class fraction{ private : int numerator; int denominator; public: fraction(int numerator ,int denominator){ this->numerator=numerator; this->denominator=denominator; cout<<this<<endl; } int getNumerator() ...
ALGO
0.99624
5.515755
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-02-10T17:59:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fd3e882550d...
259914ba-e966-426a-8ad6-c57d726d8b14
TrungKienUS-HCM/DSARepository
Week2/ex3.cpp
#include <iostream> using namespace std; // Using binary search to find the minimum element of a sorted and rotated array int findRotatedMin(int* arr, int n) { int left = 0, right = n - 1; while (left < right) { int mid = (left + right) / 2; // Since the array is rotated after it's sorted in an ascending order, ...
ALGO
0.99992
5.646522
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-03-19T06:16: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": "82e8ef98db8...
df711658-e073-40a6-a8f0-79065dfbd0d0
laurimi/npgi
include/EigenUtils.hpp
// EigenUtils.hpp // Copyright 2019 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ...
ALGO
0.996612
7.114993
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-04-26T11:32:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "410daeaa...
8c3961cf-61cd-41e6-bc57-711207989efd
cggos/DSA-CPP
hash.cpp
#include <iostream> #include <fstream> #include <cstring> #include <cctype> #include <iomanip> #include <cstdio> // remove(), rename(); using namespace std; const int bucketSize = 2, tableSize = 3, strLen = 20; const int recordLen = strLen; class File { public: File() : empty('*'), delMarker('#') { } voi...
TOOL
0.987284
4.265327
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-11-10T08:37:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e668ed82...
e47b8c30-3fac-4354-ae2d-c01d5d80d190
DaniCastr0/RoutePlanner
src/route_planner.cpp
#include "route_planner.h" #include <algorithm> #include <functional> RoutePlanner::RoutePlanner(RouteModel &model, float start_x, float start_y, float end_x, float end_y): m_Model(model) { // Convert inputs to percentage: start_x *= 0.01; start_y *= 0.01; end_x *= 0.01; end_y *= 0.01; // TODO...
ALGO
0.955152
5.580623
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-05-13T10:10: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": "a69518152f...
0eb4e228-6321-4ec2-a2d8-c96c2d3bdf17
Kevin-White/Homework
Year 1/1435&1436/CountSearch.cpp
//******************************************************************** //Name:<NAME> //Class: COSC 1436 SP21 //Instructor: <NAME> //Assignment 2 Problem 1 //Date:2/8/2021 //Program description: Looks through 1 array 2 different ways to search for a number and outputs the number of comparisons it took. //*****...
ALGO
0.999742
5.061354
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-10-14T15:49: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": "b5fc452b02a...
1b238721-049e-49ef-8f2e-c5ad0b6c1b7a
DPChanny/ps
Baekjoon/2143.cpp
#include<iostream> #include<algorithm> #include<vector> using namespace std; #define s(x, f, t) (x[(t)] - x[(f) - 1]) long long int t, n, m, ns[1'000 + 1], ms[1'000 + 1], c; vector<long long int> nss; int main(void) { cin >> t >> n; for (long long int _n(1); _n < n + 1; _n++) { cin >> ns[_n]; ns[_n] += ns[_n ...
ALGO
0.999984
3.317694
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-04-26T17:33: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": "0d2279865c...
c5bf9940-8e7c-4772-87f8-4d116b95e8dc
rsln-s/aggregative-coarsening-for-multilevel-hypergraph-partitioning
packages/stk/stk_classic/stk_util/stk_util/parallel/ParallelIndex.hpp
/*------------------------------------------------------------------------*/ /* Copyright 2010 Sandia Corporation. */ /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */ /* license for use of this work by or on behalf of the U.S. Government. */ /* Export o...
ALGO
0.994802
6.263544
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-04T20:05:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee39357977...
72214e44-3b13-4fdc-8673-96feba94a66a
ritvikbharti/Graph
courseschedule4.cpp
class Solution { public: void dfs(vector<int> adj[],int node,stack<int>& st,vector<int> &vis){ vis[node] =1; for(int i : adj[node]){ if(!vis[i]){ dfs(adj,i,st,vis); } } st.push(node); } void bfs(int node,vector<int> ad...
ALGO
0.999726
5.66081
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-01-27T19:22: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": "4240d67bcf3f...
69a5c9b7-f1c2-4c71-b9c5-bd92d194f665
LuxCoreRender/LuxCore
src/slg/lights/strategies/dlscacheimpl/dlscbvh.cpp
/*************************************************************************** * Copyright 1998-2020 by authors (see AUTHORS.txt) * * * * This file is part of LuxCoreRender. * * ...
ALGO
0.988166
5.814433
{ "github_metadata": { "branch": "master", "commit_count": 7178, "repo_created_at": "2017-11-22T14:36:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1235, "forks": 153, "issues": 93, "pull_requests": 3 }, "file_meta": { "content_id": "6f...
17bbf984-9237-4ad6-b571-15cbbc7bc4bb
keitaroyam/yamtbx
yamtbx/dataproc/crystfel/merge_equivalents.h
#ifndef YAMTBX_DATAPROC_CRYSTFEL_MERGE_EQUIVALENTS_H #define YAMTBX_DATAPROC_CRYSTFEL_MERGE_EQUIVALENTS_H #include <cctbx/sgtbx/space_group.h> #include <scitbx/array_family/ref.h> #include <boost/unordered_map.hpp> namespace af = scitbx::af; namespace cctbx { namespace miller { size_t hash_value(const index<>& ...
ALGO
0.920215
5.914657
{ "github_metadata": { "branch": "master", "commit_count": 348, "repo_created_at": "2015-11-21T01:00:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 12, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "02b229...
d10c60f9-9a65-4561-a1c9-909fcf526fac
nick-quant/cpp_testing
dequeue.h
class Overflow; class Underflow; template<typename T, int max> class Dequeue { private: T _array[max]; int _head; int _tail; public: Dequeue(): _head(0), _tail(-1) {} void push_back(const T& val) { int tmp = _tail != max - 1 ? _tail + 1 : 0; if (_tail == -1 || tmp != _head) { _array[tmp] = val; _tail...
ALGO
0.938354
5.25319
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-11-11T21:47:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c11f4c564...
619d4714-db57-4436-8fc7-a299d9d92282
patrick-burasan24/pbinfo
AEMI.cpp
#include <fstream> using namespace std; ifstream cin("aemi.in"); ofstream cout("aemi.out"); const int NMAX = 100005; const int INF = 2e9; int n, m, t, a, b, arr[NMAX], segment_tree[4 * NMAX]; void Build(int node, int left, int right) { if (left == right) { segment_tree[node] = arr[left]; return;...
ALGO
0.999969
5.012418
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2023-06-12T11:37: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": "3cfafa2613e...
6b494667-39c4-4e1b-bf0c-2a2fec27c651
eJimm2015/cpp_3des
main.cpp
#include <iostream> #include "Sequence.h" #include "SequenceD.h" #include "Permutation.h" #include "KeyGen.h" #include "SBox.h" #include "S_Fonction.h" #include "F.h" #include "DES.h" #include "Crypt.h" #include "Decrypt.h" int main() { SequenceD<64> key1 = SequenceD<64>(); operator>>(std::cin, key1); Sequ...
ALGO
0.999088
3.82027
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-05-26T17:14:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb739fabcd...
e5ae0fc9-02fc-4f29-9dd2-caa0594344db
arindam-modak/CodeBuddy-codes
PRIMECNT.cpp
#include<bits/stdc++.h> using namespace std; long long int a[10000007]; long long int tree[4000000]; bool p[10000007]; void sieve() { long long int i,j; p[0]=true; p[1]=true; for(i=2;i*i<=10000000;i++) { if(!p[i]){ for(j=i*i;j<=10000000;j=j+i) p[j]=...
ALGO
0.999913
4.682051
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2017-05-26T20:21: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": "daf079821...
db27c760-fb06-44ac-afab-47dcae98a8e7
Kiids/OJ_Practice
Dota2 参议院.cpp
/* Dota2 的世界里有两个阵营:Radiant(天辉)和 Dire(夜魇) Dota2 参议院由来自两派的参议员组成。现在参议院希望对一个 Dota2 游戏里的改变作出决定。他们以一个基于轮为过程的投票进行。在每一轮中,每一位参议员都可以行使两项权利中的一项: 禁止一名参议员的权利: 参议员可以让另一位参议员在这一轮和随后的几轮中丧失所有的权利。 宣布胜利: 如果参议员发现有权利投票的参议员都是同一个阵营的,他可以宣布胜利并决定在游戏中的有关变化。 给定一个字符串代表每个参议员的阵营。字母 “R” 和 “D” 分别代表了 Radiant(天辉)和 Dire(夜魇)。然后,如果有 n 个参议员,给定字符串的大...
ALGO
0.999974
5.621424
{ "github_metadata": { "branch": "master", "commit_count": 1531, "repo_created_at": "2019-10-23T13:47: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": "5997fbd...
6a0b8b11-4722-4124-8777-1fd6a7074d73
VinayBhupelli/Striver-Sheet
2 ARRAYS/21_rearrange_elements_by_sign.cpp
#include <bits/stdc++.h> using namespace std; // Method 1: Separate pos & neg and page alternative by traversing n/2 through // these elements vector<int> RearrangebySign(vector<int> A, int n) { vector<int> pos; vector<int> neg; for (int i = 0; i < n; i++) { if (A[i] > 0) pos.push_back(A[i]); else ...
ALGO
0.999994
4.988457
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-12T20:01: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": "c2c93a3d96f0...
4d88ca04-acb0-432c-ad0c-9b70ed8a8939
inquisitive9/Strivers-SDE-Sheet-Challenge
180. Subset Sum Equal To K.cpp
/* Time Complexity : O(N * K) Space Complexity : O(N * K) Where N is the number of elements in the array and K is the target sum. */ int helper(vector < int > & arr, int n, int k, vector < vector < int >> & memo) { // Base condition. if (n <= 0) { // If k = 0, we reached target...
ALGO
0.999986
6.192024
{ "github_metadata": { "branch": "main", "commit_count": 186, "repo_created_at": "2023-06-04T05:09:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "687ebdb944...
643f3f0f-0791-4be9-b729-d2711345459a
isyanthony/algorithm
Wit/第三届ACM校赛/C.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mm memset #define LL long long #define FAST ios::sync_with_stdio(false) , cin.tie(0) , cout.tie(0) #define rep(i , a , b) for(int i=a;i<=b;i++) #define per(i , a , b) for(int i=a;i>=b;i--) const int INF = 0x3f3f...
ALGO
0.999985
3.481214
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2021-12-06T12:45: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": "2bfcf745f...
487cbffb-eeb9-4c10-9337-61e192ffc20b
ihs-ustutt/dtOO
src/geometryKernel/analyticGeometryHeaven/aGBuilder/trans6SidedCube_splitTrans6SidedCube.cpp
/*---------------------------------------------------------------------------*\ dtOO < design tool Object-Oriented > Copyright (C) 2024 <NAME>. ------------------------------------------------------------------------------- License This file is part of dtOO. dtOO is distributed in the hope that it will ...
ALGO
0.956921
5.465442
{ "github_metadata": { "branch": "main", "commit_count": 2306, "repo_created_at": "2024-03-06T15:19:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "42fc783281...
f8049b34-52c8-471d-9ef5-6fb577609619
alexypdu/nyu-tandon-bridge-winter-2021
Week 6/Homework 6/yd2263_hw6_q2.cpp
#include <iostream> using namespace std; void printShiftedTriangle(int n, int m, char symbol); void printPineTree(int n, char symbol); int main() { int numOfTriangles; char symbol; cout << "Please enter the number of triangles: "; cin >> numOfTriangles; cout << "Please enter a symbol: "; cin...
ALGO
0.998889
4.912055
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2021-01-22T15:52:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 54, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa52de627...
10b40fc1-2d1f-4ad3-8525-7ea42fa554c2
huangzl19/FPGA-implementation-of-MLP-for-MCTS
history/2-StreamVecL/Mydataflow.cpp
#include "./Mydataflow.h" #include "./params.h" extern "C"{ void loadIn(float *input, hls::stream<VecL0> &outStream){ VecL0 tmp; #pragma HLS ARRAY_PARTITION variable=tmp.a cyclic factor=2 // p0 // #pragma HLS aggregate variable=tmp loop_load: for (int i = 0; i < L0/P0; i++){ #pragma HLS PIPELINE for(int ii ...
ALGO
0.987223
3.809625
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-08-23T14:57:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64f31dea85...
6703a38e-f64a-46e4-85d3-68d39feee752
Octobug/notes
algorithms_and_data_structures/leetcode/stack/m_00150_evaluate_reverse_polish_notation/main.cpp
#include <iostream> #include <stack> #include <vector> using namespace std; class Solution { public: int evalRPN(vector<string> &tokens) { stack<int> stk; for (int i = 0; i < tokens.size(); i++) { string token = tokens[i]; char op = token[0]; if (tok...
ALGO
0.999779
5.441161
{ "github_metadata": { "branch": "main", "commit_count": 1765, "repo_created_at": "2021-01-27T06:21:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "b09ee5a3...
769fd31b-4b4a-474c-bb63-f7b9d6832d17
joshem/EC602
8_wordplayer/wordplayer_sol.cpp
// Copyright 2017 <NAME> <EMAIL> #include <algorithm> #include <string> #include <vector> #include <map> #include <set> #include <unordered_set> #include <cmath> #include <ctime> #include <fstream> #include <iostream> typedef std::map<unsigned int, std::vector<std::string>> MySizeMap; typedef std::array<unsigned int...
ALGO
0.999605
4.665425
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-10-23T15:56:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e88261d62...
bcf2888b-89d5-4a1a-afc4-8fe7b35d51b8
RajMakkad/LeetCode
Smallest factorial number - GFG/smallest-factorial-number.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ bool isPossible(int x, int n){ int ans = 0; for(int i = 5;i<=x;i *= 5){ ans += x/i; } return ans >= n; } public: int findNum(int n){ int s =...
ALGO
0.999968
5.762657
{ "github_metadata": { "branch": "main", "commit_count": 2566, "repo_created_at": "2021-12-24T08:28: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": "64615029b...
559d7f90-284c-4664-b54d-5ccbc3017042
aosp-mirror/platform_development
vndk/tools/header-checker/src/repr/symbol/version_script_parser.cpp
// Copyright (C) 2017 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 applic...
TOOL
0.919642
7.175307
{ "github_metadata": { "branch": "main", "commit_count": 40479, "repo_created_at": "2008-10-21T18:19:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2699, "forks": 2619, "issues": 0, "pull_requests": 17 }, "file_meta": { "content_id": "40...
2911e56c-4aca-48f7-983e-0fed348c6764
zcy05331/code-backup
洛谷/P3975.cpp
#include <bits/stdc++.h> #define R register #define ll long long #define sum(a, b, mod) (((a) + (b)) % mod) const int MaxN = 1e6 + 10; int n, t, k; char s[MaxN]; struct SuffixAutomaton { struct state { int len, link; int next[30]; }; struct edge { int next, to; }; ...
ALGO
0.999899
3.330506
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2020-02-19T14:44:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c531c2ba3...
b02879de-10a5-4852-8ad9-0f3edbd340e6
codingarmy45/LP3
daa/05_NQueen.cpp
#include<bits/stdc++.h> using namespace std; bool isSafe(int row, int col, vector<string>&board, int n) { int dupRow = row; int dupCol = col; while(col >= 0 && row >=0) { if(board[row][col] == 'Q') return false; col--; row--; } col = dupCol; row = dupRow; ...
ALGO
0.999975
5.5675
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-11-05T03:50: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": "2601cd09e08...
ea6e1085-1950-4d88-9ac3-f6f60a334a09
thegamer1907/Code_Analysis
Codes/AC/443.cpp
#include <iostream> #include <cctype> #include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #inclu...
ALGO
0.998697
3.599051
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-05-24T10:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e36abd565...
42ca98ef-0bbc-458c-8e33-0c20a61a54bf
harshsinghs1058/codeforce_solutions
A_Doors_and_Keys.cpp
// this code is created by HARSH. #include <bits/stdc++.h> #define f(i, n) for (lli i = 0; i < (n); i++) #define fs(i, p, n) for (lli i = (p); i < (n); i++) #define fi(i, p, n) for (lli i = (p); i <= (n); i++) #define MAX(x, y) ((x) > (y) ? (x) : (y)) #define MIX(x, y) ((x) < (y) ? (x) : (y)) #define p(x) cout << x << ...
ALGO
0.997699
4.14805
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2020-12-30T10:21: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": "b419c7b22...
ea500bc5-ab8f-4fc8-a46f-f5176b647133
volzkzg/Tempus-Fugit-Code-Machine
TeamTraining/8_2/H.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> using namespace std; const int MAXN = 50000 + 10; const int INF = 0x7FFFFFFF >> 2; int m1[MAXN], m2[MAXN]; int n, m, q; pair <int, int> P[MAXN]; int main () { while (scanf("%d%d%d", &n, &m, &q) == 3) { for (int a, b,...
ALGO
0.999984
3.406683
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2015-07-23T16:02:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1643a123...
63e48ef6-78ac-42e9-baa8-bd8b28a12449
kennethdmiller3/AdventOfCode2019
07/07.cpp
// https://adventofcode.com/2019/day/7 #include <iostream> #include <sstream> #include <vector> #include <string> #include <array> constexpr int N = 5; enum class Opcode { Add = 1, Multiply = 2, Input = 3, Output = 4, JumpIfTrue = 5, JumpIfFalse = 6, LessThan = 7, Equals = 8, Halt = 99 }; enum class Mode {...
ALGO
0.999756
5.604118
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-12-01T05:32: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": "c2a8d9463...
f0ab0572-9913-4e1d-8f41-31fc33c2ee94
jatucker4/Motion_Planning
5519_HW4/GoalRRT.h
// // Created by John on 11/3/2020. // #ifndef INC_5519_HW4_GOALRRT_H #define INC_5519_HW4_GOALRRT_H #include "PRMPlanner.h" class GoalRRT { public: GoalRRT(CSpace2D &myspace, int numIters, double radius, tuple<double,double> qStart, tuple<double,double> qgoal, double goalProb, double goalTerm); // ...
ALGO
0.999723
4.237169
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-09-22T22:47: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": "befaf733d4...
8ffd1946-1ff3-487e-8000-79533f6ff02f
hiramekun/CompetitiveProgrammingContests
contest/agc/agc007/b.cpp
#include <cstring> #include <sstream> #include <cstdio> #include <algorithm> #include <iostream> #include <vector> #include <map> #include <unordered_map> #include <cmath> #include <queue> #include <set> #include <stack> using namespace std; typedef long long ll; #define rep(i, n) for(ll i = 0; i < (ll)(n); i++) #defi...
ALGO
0.999734
3.547112
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2019-12-09T08:40: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": "31f86059...
3cd2a03c-51c1-4b3f-939a-ba2797f4c852
mlpack/mlpack
src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort_impl.hpp
/*** * @file methods/neighbor_search/sort_policies/furthest_neighbor_sort_impl.hpp * @author <NAME> * * Implementation of templated methods for the FurthestNeighborSort SortPolicy * class for the NeighborSearch class. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the...
ALGO
0.998833
7.067449
{ "github_metadata": { "branch": "master", "commit_count": 30653, "repo_created_at": "2014-12-17T18:16:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5396, "forks": 1663, "issues": 16, "pull_requests": 9 }, "file_meta": { "content_id": "...
d51146e8-a20b-4fdb-98b8-735734955fbf
sonndinh/leetcode
155_MinStack.cpp
class MinStack { private: // Each pair contains current element and minimum value of all elements from // bottom of the stack to the current element. list<pair<int, int>> data; public: /** initialize your data structure here. */ MinStack() : data{} { } void push(int x) { i...
ALGO
0.999939
6.658637
{ "github_metadata": { "branch": "master", "commit_count": 152, "repo_created_at": "2019-05-06T16:25:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "517654d0...
213857db-dfa6-41c5-8f10-4e24cc63eab2
TaznimHimel/ICT-2104-Data-Structures-and-Algorithm-
9a.cpp
#include <bits/stdc++.h> using namespace std; int main() { vector<int> Kumu = {1, 2, 3, 4, 5, 6}; /*Here, you declare a vector named Kumu of integers and initialize it with values 1, 2, 3, 4, 5, and 6. Just like before, a vector is a dynamic array-like data structure in C++.*/ vector<int>::iterator NomN...
ALGO
0.982672
3.962223
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-29T16:11: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": "f00ea7ccb433...
2bd79174-a900-401d-bd63-679a8863aa97
yzz951029/leetcodePractice
5(DP,memory limit).cpp
#include<iostream> #include<string> using namespace std; class Solution { public: string longestPalindrome(string s) { int **p;//二位数组p记录i到j是否为回文串 int size = s.size(); int maxlen = 0; int index = 0; p = new int*[size]; for (int i = 0; i < size; i++) { p[i] = new int[size]; } for (int i = 0; i < si...
ALGO
0.999332
3.669965
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2016-07-05T08:54: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": "54d3d7b21...
1ddb1309-3b6e-4bea-a6a5-e9336f50ffd5
Sanmyla/OBI-2024
nivel2-2019/imperial.cpp
#include <bits/stdc++.h> using namespace std; /*Esse valor é a quantidade máxima de números da sequência que poderiam ser marcados com um círculo, de modo que a sequência de números marcados não contenha dois números iguais consecutivos e seja composta de no máximo dois números distintos.*/ vector<int>aux; int main(...
ALGO
0.999935
3.627936
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-05-14T13:00: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": "a8be31622d9b...
8881fa85-b4ca-42b2-a510-1bfb35845b37
wangchen/Programming-Game-AI-by-Example-src
Buckland_Chapter7 to 10_Raven/goals/Goal_Think.h
#ifndef GOAL_THINK_H #define GOAL_THINK_H #pragma warning (disable:4786) //----------------------------------------------------------------------------- // // Name: Goal_Think .h // // Author: <NAME> (www.ai-junkie.com) // // Desc: class to arbitrate between a collection of high level goals, and // to p...
ALGO
0.938413
5.990259
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-08-28T06:19:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 452, "forks": 193, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9708af...
cce31bb0-5af8-4858-bf03-96dc6a849b47
Wos2610/ALGORITHM_CPP
Contest2/T.cpp
#include<iostream> #define M 1000006 using namespace std; int a[M]; int mark[M]; void process(){ int n,m,k; scanf("%d%d%d", &n,&m, &k); for(int i = 0; i < m; i++){ scanf("%d", &a[i]); for(int j = a[i] - k; j <= a[i] + k; j++){ if(j >= 1){ mark[j] = 1; ...
ALGO
0.999798
3.221276
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-11T17:54:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "006c7bad462d...
3837dc42-11fe-4bd5-85b6-4a1bf91faabb
sgrumley/Numerical-Algorithms-Questions
Q5/Q5.cpp
#include <bits/stdc++.h> using namespace std; vector<double> tval; vector<double> eulval; vector<double> rkval; void dataDump() { ofstream myfile; myfile.open("graph.txt"); for (int i = 0; i < tval.size(); i++) { myfile << tval[i] << " " << eulval[i] << " " << rkval[i] << endl; } myfi...
ALGO
0.999846
4.168409
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-03-21T08: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": "ad9aab34b...
f403387e-2864-42fe-915a-ec3cab7e41f8
Santigoncalves11/Programa-en-lenguaje-c
programadefabrica.cpp
// Los empleados de una fabrica trabajan en dos tumos: diumo y noctumo. Se desea ca!cular e! jorna! diario de acuerdo al siguiente baremo: A) Las horas diumas se pagan a 1000 Bsf. // B)Las horas nocturas se pagan a 1600 Bsf.. C) En caso de ser domingo, la tarifa se incrementará en 400 Bsf. el tumo diumo #include <stdi...
ALGO
0.982322
3.73992
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-22T21:53:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67d6c448037b...
c1624f9a-658f-4b20-bc6a-18562d6772e9
bhavya2711/MergeSort_OpenMp_Adv
mergesort.cpp
#include <omp.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <iostream> #include <unistd.h> #include <chrono> #include <cstring> using namespace std; #ifdef __cplusplus extern "C" { #endif void generateMergeSortData (int* arr, size_t n); void checkMergeSortResult (...
ALGO
0.999556
5.035871
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-10-11T08:42: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": "331c546d0b...
b691e322-a7b4-4384-b8c1-13bf49fdf847
Arup-Deb/60-days-DSA-Problems
13 remove duplicates fron unsorted linked list.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; void print(Node *root) { Node *temp = root; while(temp!=NULL) { cout<<temp->data<<" "; temp=temp->next; } } // } Driver Code Ends /* The structu...
ALGO
0.999848
5.769532
{ "github_metadata": { "branch": "main", "commit_count": 190, "repo_created_at": "2022-06-08T17:14: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": "62592b6f51...
234916da-cb11-41cf-a6c8-fe67e01d66c1
liuguangxi/acmsguru
Codes/sgu259.cpp
#include <bits/stdc++.h> using namespace std; const int MaxN = 100; int N; int T[MaxN]; int L[MaxN]; void solve() { vector<pair<int, int>> v; for (int i = 0; i < N; i++) v.emplace_back(L[i], T[i]); sort(v.begin(), v.end(), [] (const pair<int, int> & p1, const pair<int, int> & p2) {return...
ALGO
0.999978
4.524326
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2020-05-12T13:27:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "544a55ee1...
6c3534f8-c17c-42a0-9591-562c1fbca8e3
05sachin/DSAwithCpp
16-BinaryTreeAssignment/3LevelOrderTraversal.cpp
// For a given a Binary Tree of type integer, print it in a level order fashion where each level will be printed on a new line. Elements on every level will be printed in a linear fashion and a single space will separate them. #include<iostream> #include<queue> #include "BinaryTreeNode.h" using namespace std; void pr...
ALGO
0.999848
5.099422
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-04-29T20:46: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": "8743da4bbd96...
843e3fbc-8649-4503-996d-7692ac38d2e1
ankan24/GFG-Solutions
Difficulty: Basic/Sum of Array/sum-of-array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: int solve(vector<int>& arr,int n){ if(n==0) return 0; return arr[n-1]+solve(arr,n-1); } // Function to return sum of elements int arraySum(ve...
ALGO
0.999427
6.379659
{ "github_metadata": { "branch": "main", "commit_count": 524, "repo_created_at": "2024-10-24T14:44:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c52a3cda3f...
79dcb99d-192b-478a-886e-d92b5303e4a2
Walterkd/Research-and-Projects
Data Struture and Operating System/Find and Sort/ex5_3/ex5_3.cpp
// ex5_3.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<stdio.h> #include<stdlib.h> #define TRUE 1 #define FALSE 0 int insertsort(int x[], int n) { int i, j; int a; for (i = 0; i < n - 1; i++) { a = x[i + 1]; j = i; while (j > -1 && a < x[j]) { x[j + 1] = x[j]; j--; } x[j + 1] = a; pri...
ALGO
0.999822
4.262063
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2019-11-15T02:11:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "c8c996902...
1c167cfd-2ed3-4801-b45a-87516a362f87
Amitkr-2004/CPP
Singly_LinkedList/swap_adjacent_Nodes.cpp
#include <iostream> using namespace std; class Node { public: int val; Node *next; Node(int val) { next = NULL; } }; int length(Node *head) { int n = 0; while (head) { head = head->next; n++; } return n; } Node *Adjacent_Swap(Node *head) { int len =...
ALGO
0.999983
5.250968
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-02-07T21:43: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": "0b7e0c9a790...
91c39f76-53af-48e5-8ee0-df465b462295
hiahiahia0-0/Parallel-programming
OMP/GaussOMP.cpp
#include <iostream> #include <fstream> #include <math.h> #include <sys/time.h> #include <xmmintrin.h> #include <pthread.h> #include <semaphore.h> #include <omp.h> using namespace std; int NUM_THREADS = 8; int N; const int L = 100; const int LOOP = 10; float **data; float **matrix = NULL; void init_data() { da...
ALGO
0.999907
4.546337
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-03-12T14:16: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": "8a0cc04c123e...
ee83c82f-72f4-489d-8dc8-dc2df936f6b0
uniyalsarthak/ADA
16_april/lcs.cpp
#include <bits/stdc++.h> using namespace std; string printLCS(vector<vector<int>> &c, string x, string y) { int i = x.length(); int j = y.length(); string lcs = ""; while (i > 0 && j > 0) { if (x[i - 1] == y[j - 1]) { lcs += x[i - 1]; // character is part of LCS ...
ALGO
0.999966
5.051224
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2025-01-23T19:12: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": "a347968c75f...
b2cef1a8-599b-4b26-906d-2c90829f4545
lballabio/QuantLib
ql/experimental/finitedifferences/fdmextoujumpsolver.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2011 <NAME> This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modif...
ALGO
0.934875
6.897187
{ "github_metadata": { "branch": "master", "commit_count": 17543, "repo_created_at": "2015-12-17T16:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6151, "forks": 1964, "issues": 51, "pull_requests": 11 }, "file_meta": { "content_id":...
8ab2b34f-2d5f-4b63-9aaa-0dd4a5620cf8
LeoKang0801/TEL_2022_WS
race/src/vl53l0x_control.cpp
#include <vl53l0x_control.h> void callbackfunc(const std_msgs::Float64MultiArray::ConstPtr &msg){ vl53l0x[0] = msg->data[0]; vl53l0x[1] = msg->data[1]; vl53l0x[2] = msg->data[2]; vl53l0x[3] = msg->data[3]; } void calib_front(){ ros::spinOnce(); if(vl53l0x[0] > vl53l0x[1]){ //counterclockwi...
TOOL
0.994032
4.723613
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-09-28T14:58: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": "876444dc46be...
435d92c1-eac5-4d6b-b3f0-47cad722cbb9
andreacasalino/GaussianProcesses
src/src/GaussianProcess.cpp
/** * Author: <NAME> * Created: 29.11.2021 * * report any bug to <EMAIL>. **/ #include <GaussianProcess/Error.h> #include <GaussianProcess/GaussianProcess.h> #include <TrainingTools/ParametersAware.h> #include "Common.h" namespace gauss::gp { NegativeCovariancePredictionError::NegativeCovariancePrediction...
ALGO
0.959056
6.607655
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2021-11-21T22:02:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 3, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "d1c21944b...
71d2b976-289e-45d9-9ab0-5337f2084e80
Al3p4/PC-Practica
Practica2/busqMatriz2D.cpp
#include <iostream> #include <vector> using namespace std; // busqueda de una matriz 2D bool busqueaMatriz2D(vector<vector<int> > matriz, int b){ if(matriz.empty()){ return false; } int m = matriz.size(); int n = matriz[0].size(); int begin = 0; int end = m*n-1; while(begin <= en...
ALGO
0.997279
4.48019
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-10-05T01:14:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69bff218bdd...
bf7b7f8b-d48a-48b2-ba53-99bbf2774b2d
lijinpei/leetcode
leetcode/hard/329.cpp
#include <vector> using BoardTy = std::vector<std::vector<int>>; class LongestIncreasingPathImpl { int N, M; const BoardTy & matrix; BoardTy path; int dfs(int x, int y) { if (path[x][y]) { return path[x][y]; } int h = matrix[x][y]; int d = 0; if (x && matrix[x - 1][y] > h) { d ...
ALGO
0.999995
5.754356
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2018-02-08T01:52: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": "d6dffb6c9...
ca2504e8-33c7-40df-b19f-7e7b96949a4f
liuyang21cn/Numerical_ODE_Multirate_Project
MPRK2.h
/* <NAME> SMU Mathematics MPRK2 method */ #ifndef MPRK2_DEFINED__ #define MPRK2_DEFINED__ // Inclusions #include <math.h> #include "mat.h" #include "rhs.h" class MPRK2Stepper { private: // private reusable local data Mat *f; // storage for ODE RHS vector RHSFunction *frhs...
ALGO
0.999126
4.981763
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-08-31T15:01: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": "6292e88acb...
0f23bfbe-f9ad-44eb-9ed6-36498a186f56
jihoonwang98/BOJ
15663 N과 M (9).cpp
#include <iostream> #include <string> #include <cstring> #include <vector> #include <sstream> #include <list> #include <queue> #include <stack> #include <deque> #include <utility> #include <algorithm> #include <cmath> #define NUM 1000 #define MOD 1000000009 const int INF = (unsigned)(-1) >> 1; using namespace std; in...
ALGO
0.999994
3.559944
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2020-07-22T10:41: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": "03a8fc4d3...
4cf5df4d-c23c-410c-adbf-eeadb32b8cd5
Mr-Python-in-China/LuoguProblem
contest/MX1306/B/B.cpp
#include <bits/extc++.h> using namespace std; namespace pbds = __gnu_pbds; istream &fin = cin; ostream &fout = cout; using ui = unsigned int; using uli = unsigned long long int; using li = long long int; int main(void) { ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); size_t n, k; fin >> n...
ALGO
0.999983
4.315066
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-01-24T15:00: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": "d3d76c579...
fd9d374e-c313-423a-8a6e-60ba7ba3587e
cjld/data_struct_hw
homework2/p4/zh2.cpp
// // main.cpp // Mooney // // Created by <NAME> on 13-10-21. // Copyright (c) 2013年 <NAME>. All rights reserved. // #include <iostream> #include <stdio.h> using namespace std; int e[1900000][2] = {0}, et[1900000][2] = {0}, ue; int bm[1300000][2]; int n, m; int v[600000] = {0}; int ans; int minl[600000]; int q[1...
ALGO
0.999942
3.378535
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2013-10-19T12:55:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f2ca8520...
f2df67ce-a9f3-4fdc-8f0b-56ef12f19e64
Sourabh25002/CrackYourPlacement
8_Tree/38_binaryTreeToDLL.cpp
#include <bits/stdc++.h> using namespace std; // 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) :...
ALGO
0.999974
7.112167
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-07-19T15:10: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": "786f8726194e...
182307ad-bd02-4639-bfd4-563e030536e9
xujqiao/leetcode
No41_first-missing-positive.h
// // Created by <NAME> on 2021/5/16. // #include <vector> using namespace std; namespace ns41 { class Solution { public: int firstMissingPositive(vector<int> &nums) { for (int i = 0; i < nums.size();) { if (nums[i] > 0 && nums[i] <= nums.size() && num...
ALGO
0.999944
4.859892
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-05-16T16:27:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0322f7501ce...
ca875e85-738b-402f-b6d2-3262ffab3efd
belmicr/ProyectoProgramacion2023
main.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include "ArbolAVL.h" using namespace std; int main(int argc, char **argv){ string archivo= argv[argc-1]; cout<<"Archivo: "<<archivo<<endl; for(int i=1; i<argc-1; i++) { string arg = argv[i]; cout...
TOOL
0.977551
3.247778
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-10-21T14:02: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": "b66c659a596b...
261c57b8-d539-4bb1-b8b2-b0b5044cb348
priyanshu27-git/Cpp
linkedlist/ll6.cpp
//Creation of linkedlist and add a node before given data #include <stdio.h> #include <iostream> #include <cstdlib> using namespace std; #define null 0 struct Node { int data; Node *next; }; Node *first, *temp, *ttemp, *p; void init() { first = temp = ttemp = null; } void createfirst(int x) { temp = fir...
ALGO
0.999933
3.953661
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2025-04-21T08:15:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03396af3952...
d5873734-509c-40e3-b71c-2dd69ac472cd
RadoslawNowak3/Cpp
Sorting algorithms/insertionsort/Project7/Source.cpp
#include <iostream> #include <thread> #include <ctime> long long int counter; using namespace std; void genRandom(int A[], int n) { srand(time(NULL)); for (int i = 0; i < n; ++i) { A[i] = rand() % 9999 + 1; } } void genSorted(int array[], int n) { array[0] = 1; for (int i = 1; i < n; ++i) { array[i] = 2 * i + ...
ALGO
0.996803
4.042376
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-04-07T14:59: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": "4a0b8a37aa73...
68d870e6-9500-4bbc-af12-867ac56b8454
KockataEPich/Chess
HardBot.cpp
#include "HardBot.h" #include "HardEvaluator.h" HardBot::HardBot(PlayerSide color, int depth, Evaluator* evaluator) { this->color = color; this->depth = depth; this->evaluator = evaluator; } HardBot::~HardBot() { delete(evaluator); } Move* HardBot::getMove(Board* board) { MinMaxAlphaBeta(board, color, 0, INT_...
ALGO
0.977284
4.614398
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2021-05-22T07:45: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": "b77ca940c...
c85f4105-8a42-4679-b4fe-7e32664d4e34
Sambeetkumar/DSA
step_5/5.2/8_reverseWords.cpp
#include <bits/stdc++.h> using namespace std; string reverseWords(string s) { /*i ptr iterates through the whole string, ptr l points to the start of a word and ptr r points to end+1 of a word*/ int i = 0, l = 0, r = 0; int n = s.size(); reverse(s.begin(), s.end());//reverse the whole string initia...
ALGO
0.999929
4.504733
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-08-23T09:51:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3872e2809d2...
61a001f8-a354-4e26-a33f-5f00cc24377c
DnlPinguin/GeosocialReach
bfl/bfl.cpp
#include "bfl.h" #include <iostream> #include <fstream> #include <set> using namespace std; vector<node> nodes; int vis_cur, cur; void read_graph_for_bfl(const char *filename) { timeval start_at, end_at; gettimeofday(&start_at, 0); FILE *file = fopen(filename, "r"); char header[] = "graph_for_greach"; fs...
ALGO
0.994202
4.065529
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-09-08T06:13:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "493f70ae8b...
0508f4cf-411e-4d0d-a33a-a7b02f831f6c
bossjoker1/algorithm
dynamic programming/数组中的最长山脉.cpp
class Solution { public: int longestMountain(vector<int>& arr) { // 拆分最长连续递增序列和最长连续递减序列 // 求和 // 注意输出为0的奇怪输入 int n = arr.size(); vector<int> dp1(n+1, 1), dp2(n+1, 1); for(int i = 2; i <= n; i++){ if(arr[i-1] > arr[i-2]) dp1[i] = dp1[i-1] + 1; ...
ALGO
0.999994
5.353904
{ "github_metadata": { "branch": "master", "commit_count": 281, "repo_created_at": "2021-09-17T01:12:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4591c39a...
e3631fc2-4ecc-44e3-9880-d6e7c0b899db
ccter-prog/CPlusPlus-Code
Object-Oriented-Programming/test/04/Bubble_Sort.cpp
#include <iostream> #include "Bubble_Sort.h" using namespace std; Bubble_Sort::Bubble_Sort() { control = -1; } void Bubble_Sort::kongzhi(int *arr, int size_arr) { do { cout << "1.正冒泡排序 2.反冒泡排序 0.退出,请输入:"; cin >> control; switch(control) { case 1: ...
ALGO
0.996859
3.694241
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-06-09T10:59: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": "c109e8465f2...
9c2e0f81-18e5-4dfb-b2db-8ff727961788
Ramazanm1nd3R/univer_learning_materials
Algoritmiz/Lab6/Lab611.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; vector<vector<double>> array(n, vector<double>(m)); for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> array[i][j]; } } vector<double> x; // Replace "fla...
ALGO
0.99998
4.261947
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-10-12T17:10: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": "28aae8b9a94...
b21d6118-b1d6-4c8d-9e7f-a8228a1a119a
kerBiy/ubb-computer-science
Algoritmica-Grafurilor/lab4/4HuffmanDecoding/4.cpp
#include <fstream> #include <iostream> #include <map> #include <queue> struct Node { char chr; int freq; Node *left, *right; Node(char chr = '\0', int freq = 0, Node* left = nullptr, Node* right = nullptr) : chr(chr), freq(freq), left(left), right(right) {} }; struct compare { bo...
ALGO
0.999998
4.419095
{ "github_metadata": { "branch": "main", "commit_count": 357, "repo_created_at": "2023-10-22T10:00:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57c644f91c...
03b8efe5-096f-46f9-b19e-a38da11c29a4
romilpunetha/Online-Judges
SPOJ/labyr1.cpp
// {{{ #includes #include <limits.h> #include <string.h> #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #includ...
ALGO
0.999957
4.247042
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2016-09-10T10:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a70c65db6...
00d6b1a4-c6c1-47ae-8fc4-d9a08bcde5bd
slaierno/AoC2022
Day13/part2.cpp
#include <cassert> #include <charconv> #include <fstream> #include <iostream> #include <memory> #include <range/v3/all.hpp> #include <variant> #include "utils.hpp" using namespace ranges; class IntOrList { using List = std::vector<std::shared_ptr<IntOrList>>; std::variant<std::monostate, int, List> m_data; ...
ALGO
0.971641
5.618061
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2022-12-01T07:56:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02a028de5c5...
543a1e88-b298-49cf-aaf9-d70f790f004a
Saiyangodgoku1/start-450
Step-11(Greedy)/medim_hard/09.merge_overlapping_subintervals.cpp
/* QUESTION: Given an array of intervals where intervals[i] = [start_i, end_i], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. Example: Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since int...
ALGO
0.999995
6.881081
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2024-06-28T08:53:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34fa9c6c92d...
afc6dcc0-f1d1-4512-8077-578d58d1b3e9
amir5200fx/Tonb
TnbGlobal/include/Adt_Ary1dI.hxx
#pragma once namespace tnbLib { template<class T> Adt_Ary1d<T> operator+(const Adt_Ary1d<T>& V1, const Adt_Ary1d<T>& V2) { if (V1.Size() NOT_EQUAL V2.Size()) { FatalErrorIn("tnbLib::ADT_Ary1d<T>& tnbLib::ADT_Ary1d<T>::operator/=(const ADT_Ary1d<T>& Other)") << "No match between two array sizes" << ab...
TOOL
0.940964
6.638189
{ "github_metadata": { "branch": "master", "commit_count": 2430, "repo_created_at": "2019-12-25T02:29:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 29, "pull_requests": 1 }, "file_meta": { "content_id": "3e361c...
0e6f3abb-9cce-46ad-aa8c-ae4d28196f5c
lo1734/DSA-Questions
Arrays/XOR_Queries_of_a_Subarray.cpp
You are given an array arr of positive integers. You are also given the array queries where queries[i] = [lefti, righti]. For each query i compute the XOR of elements from lefti to righti (that is, arr[lefti] XOR arr[lefti + 1] XOR ... XOR arr[righti] ). Return an array answer where answer[i] is the answer to the ith...
ALGO
0.999991
6.430682
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2025-01-12T11:10: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": "03f4d3d954...
9906e608-19a1-4436-87cf-bc26378f00bd
rohakdebnath/CodeForces-Solutions
runningmiles.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define UNSYNC ios::sync_with_stdio(false); cin.tie(nullptr); #define sci(x) static_cast<i64>(x) #define all(x) x.begin(), x.end() #define rep(i, ini, x) for (i64 i = ini; i < x; ++i) #define per(i, fin, x) for (i64 i = fin; i >= x; --i) #define VI ...
ALGO
0.999912
4.661096
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-07-17T12:11: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": "f9d014ad26...
0f103915-7d70-4957-8a6d-8bc25eff6b4f
Ashishtorq/codeTocent
2023/15. Singly Linked-List/05InsertAnywhere.cpp
#include<iostream> using namespace std; class node{ public: int data; node*next; node(int data){ this -> data = data; this -> next = nullptr; } }; void insertAtHead(node* &head, int data){ node*temp = new node(data); temp ->next = head; head = temp; } void insertAttail(no...
ALGO
0.999908
4.755947
{ "github_metadata": { "branch": "main", "commit_count": 197, "repo_created_at": "2023-09-05T19:24: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": "6d40bcfd57...
9f366aa8-65f8-4af0-9609-554662ef04cc
arangodb/arangodb
3rdParty/icu-legacy/icu64/test/intltest/punyref.cpp
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * * Copyright (C) 2003-2005, International Business Machines * Corporation and others. All Rights Reserved. * ****...
TOOL
0.925013
4.493778
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
723edb5e-6842-4e59-b1c0-6fb9cae38277
zandershah/contest-problems
acm/PostalDelivery.cpp
#include <algorithm> #include <cstdio> #include <iostream> #include <set> #include <utility> #include <vector> #include <queue> #include <cmath> #include <stack> #include <deque> #include <unordered_map> #include <map> #include <bitset> #include <string> #include <cstring> #define pb push_back #define mp make_pair #de...
ALGO
0.999947
3.930827
{ "github_metadata": { "branch": "master", "commit_count": 291, "repo_created_at": "2016-02-06T06:45: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": "9b925e24...