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 |
|---|---|---|---|---|---|---|---|
1cb541de-271a-49be-89a1-75bd9fa2504c | jastinbeaber/OpenScan3D | libs/openMVG/openMVG/matching_image_collection/VladBase.hpp | // This file is part of OpenMVG, an Open Multiple View Geometry C++ library.
// Copyright (c) 2020 <NAME>, <NAME>
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#... | ALGO | 0.973932 | 7.614791 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2024-01-13T16:11:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "41ad8e33a60... |
61d585e1-d4e3-4279-8a2c-943a753888d0 | jishu-yadav/CrackYourPlacement | Day9/q1.cpp |
#include <iostream>
using namespace std;
class Node{
public:
int data;
Node* next;
//constructor
Node(int d){
data = d;
next = NULL;
}
};
void build(){
}
int length(Node* head){
int len=0;
while(head!=NULL){
len++;
head=head->next;
}
retur... | ALGO | 0.999959 | 5.588586 | {
"github_metadata": {
"branch": "main",
"commit_count": 1360,
"repo_created_at": "2022-05-03T19:30:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "43a88ebbe... |
75eb96ff-e34b-4075-af86-f55e5c893b5c | stevenjackowski/Fractal-Generator | fractal.cpp | //
// fractal.cpp
// Fractal Generator
//
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include "complex.h"
#include "fractal.h"
using std::abs; using std::log2;
using std::sqrt;
// generates a grid from -2 to 2 on both axes
Grid::Grid(std::size_t size): real_axis() {
cons... | ALGO | 0.984155 | 4.906129 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2013-11-30T04:38:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "90abbc0fd4... |
0b4d922f-1000-4ab8-894d-81c59ad0f4bb | Vaa3D/vaa3d_tools | released_plugins/v3d_plugins/bigneuron_AmosSironi_PrzemyslawGlowacki_SQBTree_plugin/libs/ITK_include/itkAdaptiveHistogramEqualizationImageFilter.hxx | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* h... | ALGO | 0.996782 | 7.28737 | {
"github_metadata": {
"branch": "master",
"commit_count": 7983,
"repo_created_at": "2016-01-27T18:19:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 110,
"forks": 70,
"issues": 11,
"pull_requests": 12
},
"file_meta": {
"content_id": "b3a... |
7828ccc0-2e65-4aa7-aa2f-b724532d8130 | Avichal14/Problem-Of-The-Day | Medium/Sum of bit differences/sum-of-bit-differences.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution{
public:
long long sumBitDifferences(int arr[], int n) {
// code here
long long ans=0;
//traversing 32 bits each at once
for(int i=0;i<32;i++){
... | ALGO | 0.99988 | 5.635537 | {
"github_metadata": {
"branch": "master",
"commit_count": 1993,
"repo_created_at": "2023-02-20T04:08:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7e590b3... |
de76eeea-92f8-43ed-82d4-005778f840a9 | whattadarsh/competitive-coding-online-platforms-solutions | DSA/trees/bst/zigzag_traversal.cpp | #include<iostream>
#include<vector>
#include<stack>
#include<deque>
using namespace std;
// Sol: 1) Using 2 stacks
// 2) Using deque
struct Node {
int val;
Node *left, *right;
Node (int x) : val(x) {
left = right = NULL;
}
};
Node * insertBST(Node *root, int val) {
if(root == NULL)
return n... | ALGO | 0.999998 | 4.93056 | {
"github_metadata": {
"branch": "master",
"commit_count": 121,
"repo_created_at": "2020-07-15T12:09: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": "c4002059... |
e43471cc-6de6-48fd-855a-b3a12ce4c970 | MukuFlash03/data-structures-algos-CPP | LC_Self/Arrays/E_217_Contains_Duplicate.cpp | /*
Problem: https://leetcode.com/problems/contains-duplicate/
Solution(s):
YouTube
NC - https://www.youtube.com/watch?v=3OamzN90kPg
*/
/*
A. Optimal Solution (HashSet, One Pass)
Time: O(n) Space: O(n)
0. If list size = 0 or 1, Return false.
1. Iterate through list.
2. If ith element in HashSet
Return tr... | ALGO | 0.999595 | 5.549497 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2021-10-21T08:19:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a6bf1d839... |
d3840538-c984-4e29-ab6e-961c040022cc | KailasMahavarkar/interview-prep | Codeforces/800/united_we_stand_codeforces_A.cpp | #include <algorithm>
#include <climits>
#include <iostream>
#include <iterator>
#include <unordered_set>
#include <vector>
#pragma GCC optimize("O3,unroll-loops")
using namespace std;
class Solution {
public:
void solve(int n, vector<int>& a) {
unordered_set<int> b, c;
sort(a.begin(), a.end());
... | ALGO | 0.999876 | 4.259279 | {
"github_metadata": {
"branch": "master",
"commit_count": 219,
"repo_created_at": "2023-02-21T13:25: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": "31e3633b... |
47688ef6-694f-4697-9967-f87b4fa44a7a | CSUwangj/LeetCode | 1169.invalid-transactions.cpp | /*
* @lc app=leetcode id=1169 lang=cpp
*
* [1169] Invalid Transactions
*/
// @lc code=start
struct Transaction {
int amount;
int time;
string city;
string name;
Transaction(int _time = 0, int _amount = 0, string _city = "") : amount(_amount), time(_time), city(_city) {}
Transaction(string trans) {
... | ALGO | 0.991831 | 6.236017 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2020-10-10T01:43: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": "eb2b1e7fb... |
e379386b-47dc-4afb-ab45-77f5078a5412 | pibloo94/TAIS | Ej36/Archipielago.h | //<NAME>
#include "GrafoValorado.h"
#include "PriorityQueue.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <queue>
using namespace std;
//Aplicamos el algoritmo de PRIM
class Archipielago {
private:
std::vector<bool> marked; //MST vertices
std::queue<Arista<int>> mst; //MST edges (Minimum S... | ALGO | 0.993867 | 3.890285 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2019-09-09T14:13:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c237f24a0... |
99441256-2297-4518-80ab-07047a41f093 | Veeresh-R-G/Leet_Code_Questions | 897-increasing-order-search-tree/897-increasing-order-search-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999995 | 6.322081 | {
"github_metadata": {
"branch": "main",
"commit_count": 1927,
"repo_created_at": "2022-04-09T17:28:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce65e7501... |
0783764d-f295-499e-8c93-bccedb72444c | rcgoodfellow/Splash2 | Arnoldi.cxx | #include "Arnoldi.hxx"
using namespace splash;
using std::runtime_error;
Arnoldi::Arnoldi(dsmatrix A, dvec xi) : A(A), Q{A.N, 10}, H{10,10}, xi(xi) {
if(A.N != xi.N) {
throw runtime_error("Arnoldi arguments of incompatible size");
}
}
Arnoldi& Arnoldi::operator()() {
//zero out for debugging
Q.zero()... | ALGO | 0.999378 | 5.146954 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2014-07-30T22:30:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b929f3b7... |
1d5c83ed-6a1e-4435-8025-5e7e2c36b54f | Realhyeonwoo/study-algorithm | 백준문제/17281.cpp | #include<cstdio>
#include<vector>
using namespace std;
int n;
bool visited[10] = {false,};
vector<int> v;
int arr[51][10];
int new_arr[51][10];
int last = 1;
int out = 0;
int ground[4];
int score;
vector<int> total;
void Simulate(int num) {
if (num == 0) {
out++;
}
else if (num == 1) {
if (ground[1] == 0 &&... | ALGO | 0.999943 | 3.689973 | {
"github_metadata": {
"branch": "master",
"commit_count": 108,
"repo_created_at": "2019-09-20T15:53: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": "079d74b8... |
64afdb81-e53b-40cb-906d-12ef5dc8a54c | CavemanDigital/gits | classCode/cop3530_c++/Knapsack/Project5Test.cpp | #include<iostream>
using namespace std;
int knapsack(){
//initialize
int capacity=0;
cout<<"Capacity:";
cin>>capacity;
int item=0;
cout<<"Number of Items available: ";
cin>>item;
int val[item+1];
int size[item+1];
char name[item+1];
name[0]=' ';
for(int l=1; l<item+1; l++){... | ALGO | 0.999892 | 4.054326 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2013-09-21T22:50: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": "770f964a2b... |
fcefb774-0b50-41c8-83e5-c01a40245c8f | Bungmint/competitiveprogramming | contest/cses/sum_of_four.cpp | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_upda... | ALGO | 0.999961 | 4.211682 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2021-02-28T11:36: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": "938e1ceb6... |
4979f01e-8f8c-4d72-9aa0-046610fa049b | cloud-007/Online-Judge-Solutions | CodeChef/GSUB.cpp | /*One touch and i IGNITE*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define F first
#define S second
#define endl "\n"
#define Endl "\n"
const int N = 2e5 + 5;
int tc, n, casee = 1, a[N];
int main() {
#ifdef cloud_007
freopen("in.txt", "r", stdin);
#endif // cloud_007
ios_base::sync_w... | ALGO | 0.999678 | 3.825888 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2022-09-20T19:30:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7b834d1f2... |
c623328a-aff4-4d62-8b6c-ee0d5b432a90 | thiagofons/google-prep | FreeCodeCamp/Graphs/UndirectedPath.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef unordered_map<char, vector<char>> Graph;
Graph buildGraph (vector<vector<char>> edges) {
Graph graph;
for (vector<char> edge : edges) {
char a = edge[0];
char b = edge[1];
if (graph.... | ALGO | 0.99996 | 5.010792 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2025-05-07T17:57:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ee757d1353d... |
d928c7aa-0325-4089-a170-86b229d62494 | jgabrieldsl/PUC-2-Semestre | Matérias/Algoritmos e Linguagem de Programação/Aula 11 - String/Exercicio_3.cpp | // Exercício 3 - Faça um programa que lê uma string de 5 caracteres e inverte esta string. No final o programa deverá imprimir a string original e a invertida.
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
string palavra;
string invert_palavra (string palavra) {
string palavra_inv... | ALGO | 0.999388 | 4.094609 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2024-09-09T18:04:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea62fb53fe0... |
5e136d85-a70c-4fe1-a33e-1db7762000b1 | RobuRishabh/Coding-Ninjas-Data-Structures-Algorithm-in-Cpp | Linked List 1/Insert_node_(recursive).cpp | /*
Insert node (recursive)
Send Feedback
You are given a singly linked list of integers and position 'i'.
You must insert the given node at the 'i-th' position in the linked list recursively.
Note :
Assume that the Indexing for the linked list always starts from 0.
No need to print the list. It has already been tak... | ALGO | 0.999976 | 4.84477 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-06-07T03:40: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": "74d898a26a97... |
d4d048c5-de67-4a84-92f3-39790f77c9d1 | Quanhaoli2641/MachineLearningVoter | KMeans.cpp | #include <stdio.h>
#include "Kmeans.h"
#include <fstream>
#include <string>
#include <iostream>
#include "Silhouette.h"
#include <math.h>
using namespace Silhouette;
using namespace std;
namespace KMeans {
// Fills a vector of unlabeled data given a file
void fillVector (vector<vector<float>>& v, ifstrea... | ALGO | 0.997656 | 4.133948 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2016-12-10T22:50: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": "61217d865... |
b74d91d3-9382-4ef0-9b54-021efd100c0e | trieuminhpham/baitaplon | test.cpp | #include <iostream>
/* Mảng 2 chiều */
// Hàm khởi tạo
void __init(int **&arr , int &row , int &col)
{
arr = new int *[row] ;
for(int i=0 ; i<row ; i++)
arr[i] = new int [col] ;
}
// Hàm thu hồi
void del(int **&arr , int &row , int &col)
{
for(int i=0 ; i<row ; i++)
delete[] arr[i] ;
... | ALGO | 0.994462 | 3.570475 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-05-25T02:31: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": "cc486298e4cd... |
77ddde53-4a63-4e38-9c86-d0e71c3c07e3 | UCSBRoboticsClub/Teensy-Mouse-2015 | Teensymouse2015/BFS.h | #ifndef BFS_HPP
#define BFS_HPP
#include "Maze.h"
#include "BitArray2D.h"
#define MAX_NODES (16*16)
struct Node
{
int i;
int j;
bool operator==(const Node& other) const
{
return i == other.i && j == other.j;
}
bool operator!=(const Node& other) const
{
return !(*this == ... | ALGO | 0.999251 | 5.462757 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2015-04-07T02:55:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "656f17c275... |
43139e30-d574-44a9-8aff-7003b979a1ce | SamuliRiihikoski/PolyWorld | headers/RayHit.h | #ifndef RAYHIT_H
#define RAYHIT_H
#include <pthread.h>
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <iostream>
#include "Camera.h"
#include "Scene.h"
#include "App.h"
#include <vector>
struct ThreadResult
{
unsigned int polyID = -1;
float distance = ... | ALGO | 0.955505 | 5.187531 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2020-11-17T04:47: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": "ec72a1739d0... |
f3f3f392-34ea-42ad-aacf-c91e497ae999 | OpenSees/OpenSees | SRC/analysis/integrator/HHTGeneralizedExplicit_TP.h | /* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** ... | ALGO | 0.928034 | 6.200526 | {
"github_metadata": {
"branch": "master",
"commit_count": 8721,
"repo_created_at": "2018-09-12T00:49:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 667,
"forks": 719,
"issues": 42,
"pull_requests": 23
},
"file_meta": {
"content_id": "6e... |
5fc77cb2-06f3-4b5e-81da-51f8d7ab6405 | Arpit-AD/CrackYourPlacement | Day_39/all_nodes_in_k_dist_in_bt.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
vector<vector<int>> adj;
vector<int> ans;
public:
int giveCount(TreeNode* root)
{
i... | ALGO | 0.999991 | 5.504732 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2024-07-15T15:57:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6624b2de2c4... |
4c1c7d92-aa2e-4a3c-905e-26c06eb9d9ba | avik-samanta99/Topics-In-Networks | Queuing_Theory_CaseB.cpp | #include<bits/stdc++.h>
using namespace std;
double lambda, mu, totalTime;
queue<double> serviceQueue;
double recentArrival, totalWaitingTime, totalResponseTime;
double currentServiceTime1, currentServiceTime2;
int arrivalCount, checkCount;
string outputFilename;
double RandomProbability(){
srand(time(0) + rand());
... | ALGO | 0.992006 | 4.543856 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-09-11T16:42: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": "dc6016c949... |
fb8c9b0f-6fca-49eb-84d1-6e96349d5847 | sajalkumar725/coding-ninja-competitive-programming | dynamic programming 2/party.cpp | /*
You just received another bill which you cannot pay because you lack the money.
Unfortunately, this is not the first time to happen, and now you decide to investigate the cause of your constant monetary shortness. The reason is quite obvious: the lion's share of your money routinely disappears at the entrance of par... | ALGO | 0.999819 | 4.138334 | {
"github_metadata": {
"branch": "master",
"commit_count": 170,
"repo_created_at": "2020-02-05T02:05:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7121bfbd... |
7dc94b75-d760-4991-8257-25d233b79b70 | logix1099/bump | bump.cpp | #include <stdlib.h>
#include <fstream>
#include <vector>
#include "heap.h"
#include <deque>
#include "minheap.h"
#include <time.h>
using namespace std;
int main(int argc, char* argv[])
{
int bumpCount = 0;
int u,v,n,k, prevMinNode, prevMaxNode;
int nextLexNum = 1;
int prevLexNum = 0;
int minNode;
int maxNode;
b... | ALGO | 0.999381 | 3.294929 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-04-30T03:20: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": "9c3dfee379... |
e735c6d5-9f97-4acc-9e7f-bfe0af94aba7 | risentveber/Old-code | haffmen_code/main.cpp | #include <iostream>
#include <fstream>
#include <map>
#include <queue>
#include <utility>
#include <deque>
#include "Node.h"
using namespace std;
Node* tree_maker(ifstream &input){
int a;
map<unsigned char, size_t> symbols;
//size_t i = 0;
while((a = input.get()) != -1){
++symbols[a];
}
priority_queue<Node> tr... | ALGO | 0.999806 | 3.439968 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2015-11-06T08:52:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6db5c2f069... |
d1e1608b-fb0c-486c-ba5e-44a9bc426a77 | mysql/mysql-server | storage/heap/hp_update.cc | /* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including... | TOOL | 0.920198 | 5.459576 | {
"github_metadata": {
"branch": "trunk",
"commit_count": 186679,
"repo_created_at": "2014-09-26T09:31:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11540,
"forks": 4072,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "... |
51a7e2e3-912c-4dc2-8699-a4f68cc483df | bashlord/boggle | boggleutil.cpp | /*
* Filename: boggleutil.cpp
* Author: <NAME>
* Userid: hbeglary, A09501980
* Description: Contains the insert and search functions for
* the trie traversal
* Date: 3/13/14
*/
#include "boggleutil.h"
#include <set>
#include <string>
#include <ctype.h>
#define ASCII_VALUE 97
using namespace std;
void Bogg... | ALGO | 0.999514 | 3.491464 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-04-02T15:18: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": "7eb5878e05... |
01dd45c2-62ef-423d-8987-698bd9d01c2f | yuyichao/cs-doc | Programming/C_C++/C++_Primer_Plus中文第四 五版 源码+习题/C++_Primer_Plus中文第四 五版 源码+习题/C++_Primer 第四版 习题解答 源码/源码/16/swap.cpp | /*
* This file contains code from "C++ Primer, Fourth Edition", by <NAME>.
* Lippman, <NAME>, and <NAME>, and is covered under the
* copyright and warranty notices given in that book:
*
* "Copyright (c) 2005 by Objectwrite, Inc., <NAME>, and <NAME>."
*
*
* "The authors and publisher have taken care in the pr... | ALGO | 0.998578 | 5.215216 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2011-04-11T01:56:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 254,
"forks": 155,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb77a7... |
f702db7b-a042-4170-99bb-eda0764937f8 | D3m1urg3/RayTracerRenderer | geometries.cpp | #include "globals.h"
#include "geometries.h"
#include "ray.h"
#include "mramdon.h"
//------------------------------------------------------------------------------------------------------
// Materials
bool lambertian::scatter(const ray& r_in, const hit& rec, vec3f& attenuation, ray& scattered) const
{
vec3f targe... | ALGO | 0.902972 | 6.169164 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2019-03-02T17:45:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea10ea8b6... |
39e1523f-e01c-49aa-950b-cb4e29b24130 | Eukky/Algorithm | nowcoder/netease/word_maze.cpp | // 字符迷阵
// 字符迷阵是一种经典的智力游戏。玩家需要在给定的矩形的字符迷阵中寻找特定的单词。
// 在这题的规则中,单词是如下规定的:
// 1. 在字符迷阵中选取一个字符作为单词的开头;
// 2. 选取右方、下方、或右下45度方向作为单词的延伸方向;
// 3. 以开头的字符,以选定的延伸方向,把连续得到的若干字符拼接在一起,则称为一个单词。
// 以图1为例,如果要在其中寻找单词"WORD",则绿色框所标示的都是合法的方案,而红色框所标示的都是不合法的方案。
// 现在的问题是,给出一个字符迷阵,及一个要寻找的单词,问能在字符迷阵中找到多少个该单词的合法方案。注意合法方案是可以重叠的,如图1所示的字符迷阵,其中单词"W... | ALGO | 0.999715 | 5.204203 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2019-05-27T07:23:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5e41cb8f... |
bb9f0035-5342-489e-9c6c-9cbcdd25d5a9 | diohabara/competitive_programming | ac/abc224/B/main.cpp | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const ll MOD = 1e9 + 7;
const int INF = INT_MAX;
const ll LLINF = LLONG_MAX;
const string YES = "Yes";
const string NO = "No";
int main() {
// in... | ALGO | 0.999976 | 4.273497 | {
"github_metadata": {
"branch": "master",
"commit_count": 407,
"repo_created_at": "2019-01-21T06:09: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": "d582189b... |
10a171a7-5a3d-4ff7-b91a-4dc879514052 | arnabs542/interviews | leetcode/228_summary-ranges.cpp | //Given a sorted integer array without duplicates, return the summary of its ranges.
//
//For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"].
#include <iostream>
#include <vector>
#include <string>
using namespace std;
class Solution_228 {
public:
// Sim to LC163: Missing Ranges
// Exp: https://dis... | ALGO | 0.998886 | 6.530512 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2021-01-15T05:19: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": "4d4984e35... |
6f29ee8e-0894-4c88-8bb6-01d554781b36 | hongwoomin/object-oriented-programming | c++/prob23.cpp | #include <iostream>
using namespace std;
int main() {
int data[101];
int count = 0;
while (1) {
int num;
cin >> num;
if (num == -1){
break;
}
int duplicate = 0;
for (int i = 0; i < count; i++) {
if(data[i]==num){
duplicate = 1;
c... | ALGO | 0.999772 | 3.64871 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-07-02T11:55:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "401ed6b32a04... |
a21fb1d6-171b-4993-943b-4c8498d11021 | eduardgg/courses | algorithms_upc/Dia 09/p3.cc | // Troba un arbre generador de cost minim d'un graf no dirigit connex donat
// amb pesos positius a les arestes.
#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
#define X first
#define Y second
typedef pair<int, int> P;
typedef pair<int, P> PP;
typedef vector<PP>... | ALGO | 0.999919 | 3.80685 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-10-09T12:36: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": "0ec504f67e84... |
689b6a65-ca29-48e9-8874-c418475912dc | rahulb5/FRE6883 | bootstrap.h | # pragma once
#include "Group.h"
#include "Matrix.h"
#include "Stocks.h"
#include "bootstrap.h"
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
namespace fre
{
class Bootstrap
{
private:
int MCN = 10; // no. of bootstrap (monte carlo) iteration... | ALGO | 0.992273 | 4.492862 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-12-14T22: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": "7c00780c9192... |
3d1bd8c9-732e-43b0-9ba4-a3467237de4e | D4-83889-Assignments/Cpp_assignment | Assignment_9.cpp/Sol_3.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
template <class T>
class Stack
{
int top = -1;
int Size;
T *arr = NULL;
public:
Stack()
{
cout << "Enter Size of Stack" << endl;
cin >> Size;
arr = new T[Size];
}
void push(T x)
{
if (isFul... | TOOL | 0.94305 | 3.486242 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-03-07T16:30:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f56e25a5457... |
e3f37df1-0885-43a7-956b-feb370b3359b | mangoqwq/competitive-programming | Other/ac20p5.cpp | #include <bits/stdc++.h>
using namespace std;
#define ms(x,a) memset(x,a,sizeof x)
typedef long long ll;
const int mod=1e9+7, inf=0x3f3f3f3f, MAXN=4e5+1;
vector<int> adj[MAXN];
int diff[MAXN], p[MAXN], sz[MAXN];
map<int,int> m;
vector<pair<int,int>> ans;
int dfs(int v){
sz[v]=1;
for (int to:adj[v]){
... | ALGO | 0.99979 | 3.369178 | {
"github_metadata": {
"branch": "master",
"commit_count": 540,
"repo_created_at": "2020-08-28T16:37:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd9498bf... |
d944824d-538f-4f2e-9ce8-8e7aaefb2b11 | yougwypf1991/mySURF_match | main.cpp | /***********************************************************
* --- OpenSURF --- *
* This library is distributed under the GNU GPL. Please *
* contact <EMAIL> for more information. *
* *
* <NAME>, Research Into Robust... | ALGO | 0.960805 | 4.715386 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-12-28T13: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": "909b552c01... |
62405ed4-7811-4b5b-86a2-e1bbfb1cafe6 | swiftqwq/code | 2021.2.10/F.cpp | // Problem: F. Copy or Prefix Sum
// Contest: Codeforces - Codeforces Round #701 (Div. 2)
// URL: https://codeforces.com/contest/1485/problem/F
// Memory Limit: 256 MB
// Time Limit: 2000 ms
//
// Powered by CP Editor (https://cpeditor.org)
// v v v s s s v
#include <bits/stdc++.h>
#define MOD 1000000007
using namespa... | ALGO | 0.999754 | 4.058829 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2020-09-17T12:21: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": "09a752616... |
998dc293-4c41-4dc3-bcd7-2ef3ac7ddbbc | cenacrharsh/dsa-practice | Supercoder Codequotient DSA/Week 3/Find the special index of array.cpp | #include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <climits>
#include <unordered_map>
using namespace std;
//! Approach 1 -> suffix sum array and prefix sum variable
int specialIndex(vector<int> arr)
{
// Write your code here
int n = arr.size();
int ans = -1;
int prefixSum = 0;
vector<i... | ALGO | 0.999893 | 5.323846 | {
"github_metadata": {
"branch": "main",
"commit_count": 1005,
"repo_created_at": "2022-02-09T08:55: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": "81cb97bc6... |
77671d31-e1c1-4603-a732-437b8f06dae4 | naohisas/KVS | Source/Core/Visualization/Mapper/CellByCellSampling.cpp | /*****************************************************************************/
/**
* @file CellByCellSampling.cpp
* @author <NAME>
*/
/*****************************************************************************/
#include "CellByCellSampling.h"
#include <kvs/Coordinate>
#include <kvs/Xorshift128>
#include <kvs... | ALGO | 0.974343 | 6.28791 | {
"github_metadata": {
"branch": "develop",
"commit_count": 987,
"repo_created_at": "2014-12-19T06:25:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 44,
"forks": 25,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "9ce77... |
745ca59e-76d1-43ff-892b-eb829c6edc6a | ML-UCV/ML-CodeBert-DistinctSolutions | Raw Dataset/cmap/divide_conquer/train/48c88eb9-fba6-4835-8d44-5c4d39c11ee4.cpp | #include <fstream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>
using namespace std;
ifstream fin("cmap.in");
ofstream fout("cmap.out");
const long long INF = 4e18;
int n;
vector<pair<long long, long long> > v, w;
vector<pair<long long, long long> > m, aux;
long long get_dist(pair<lon... | ALGO | 0.999727 | 3.93005 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-03-06T17:44:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "682fa240dcadb... |
f1242f0f-c4f8-46ec-a0e0-b8da7e4791fa | onaisahmed/Cpp-Practice-Projects | CustomLanguage and Compiler/compiler.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <unordered_map>
#include <sstream>
#include <limits>
using namespace std;
class MiniCompiler {
private:
unordered_map<string, int> variables;
void handleLetCommand(const string& line) {
istringstream iss(line);
string keyword, ... | TOOL | 0.924219 | 4.546954 | {
"github_metadata": {
"branch": "develop",
"commit_count": 10,
"repo_created_at": "2024-11-05T12:58: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": "3d6d9107... |
2387b7e3-c9c6-40d7-9c62-cd5fff371eec | siidney/Cpp-How-To-Program-9E | Chapter06/exercises/6.26/ex_626.cpp | /*
* =====================================================================================
*
* Filename: ex_626.cpp
*
* Description: Exercise 6.26 - Celsius and Farenheit Temperatures
*
* Version: 1.1
* Created: 14/04/16 18:04:23
* Revision: 11/02/18 03:30:32
* Compiler... | TOOL | 0.942457 | 5.791239 | {
"github_metadata": {
"branch": "master",
"commit_count": 159,
"repo_created_at": "2016-03-11T11:59:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 63,
"forks": 33,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "9facb9... |
ea49251a-3132-4c88-a208-3ac2482b48fd | MastersAbh/competitive-programming | Binary_Tree_Spiral_Order.cpp | //Spiral Order Traversal of a Tree
#include <bits/stdc++.h>
using namespace std;
#define mkp make_pair
// Node of Binary Tree storing data, level, left and right child information
struct Node
{
int data;
int level;
Node *left, *right;
Node(int val)
{
data = val;
level = 0;
... | ALGO | 0.999999 | 5.935834 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2018-07-12T08:57:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 10,
"issues": 1,
"pull_requests": 2
},
"file_meta": {
"content_id": "8bc1532... |
bd55b5f8-2bee-4c8f-82af-f84c066c9f11 | Ishan-Saraf/Striver-SDE-Sheet-Challenge | Day 8 - Greedy/jobScheduling.cpp | #include<bits/stdc++.h>
bool compare(vector<int> &job1, vector<int> &job2)
{
return job1[2] > job2[2]; // Sort in descending order of profit
}
vector<int> jobScheduling(vector<vector<int>> &jobs)
{
sort(jobs.begin(), jobs.end(), compare); // Sort the jobs in non-increasing order of profit
int maxProfit =... | ALGO | 0.999961 | 5.449749 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2023-06-04T13:30: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": "8f0bba63828... |
01d4529d-43e5-47c7-8d57-cedba643999d | zabir-nabil/Competitive-Programming | acm hust/UVA/10616/5657601_AC_6ms_0kB.cpp |
/****************************************
Cat Got Bored
*****************************************/
#include <bits/stdc++.h>
#define loop(i,s,e) for(int i = s;i<e;i++) //excluding end point
#define pb(a) push_back(a)
#define sqr(x) ((x)*(x))
#define CIN ios_base::sync_with_stdio(0); cin.tie(0);
#define ll lon... | ALGO | 0.995179 | 3.052534 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2017-03-03T19:04:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0db28fa69... |
ff92ee7f-2eb1-4715-b7c8-6620baae6437 | imtiaz1710/competitive-programming | mixed programme Part1/Dev skill contest 1/t.cpp | // #include <bits/stdc++.h>
// #define ll long long
// #define filein freopen("/home/imtiaz/Desktop/Dev skill contest 1/in.txt", "r", stdin)
// #define fileout freopen("/home/imtiaz/Desktop/Dev skill contest 1/out.txt","w", stdout)
// using namespace std;
// int main(){
// ios_base::sync_with_stdio(false);
// ... | ALGO | 0.999711 | 3.804727 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-11-01T15:12: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": "dc77964593a8... |
a0548eca-3f5b-444b-81a7-24d361719886 | YazanIST/CP | Notebooks/CSESSolutions/06-Mathematics/06-SumOfDivisors.cpp | // Let σ(n) denote the sum of divisors of an integer n. For example, σ(12)=1+2+3+4+6+12=28.
// Your task is to calculate the sum ∑ni=1σ(i) modulo 109+7.
const int MOD = 1e9 + 7;
__int128 read() {
__int128 x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-') f = -1;
... | ALGO | 0.999963 | 4.910251 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2022-09-25T23:55:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "62e8df737ad... |
56d42afb-06d7-422d-9006-b68c40119b18 | raincross7/code-similarity | codes/train_code/problem356/problem356_373.cpp | #include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#in... | ALGO | 0.999941 | 3.022841 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07: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": "708d981003b9... |
8a520aed-7164-4efc-83b8-39092b4e87fa | ishandutta2007/codeforces-s | ssrs_/normal/737/B.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, a, b, k;
cin >> n >> a >> b >> k;
string s;
cin >> s;
s = '1' + s + '1';
n += 2;
vector<int> cnt(1, 0);
for (int i = 1; i < n; i++){
if (s[i] == '1'){
cnt.push_back(0);
} els... | ALGO | 0.999897 | 3.230658 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07: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": "a2dc24874ff8... |
f713aaf2-47fb-4acb-b004-2e4e7f3a7865 | NUCAR-DEV/Hetero-Mark | src/knn/knn_cpu_partitioner.h | /*
* Hetero-mark
*
* Copyright (c) 2015 Northeastern University
* All rights reserved.
*
* Developed by:
* Northeastern University Computer Architecture Research (NUCAR) Group
* Northeastern University
* http://www.ece.neu.edu/groups/nucar/
*
*
* Permission is hereby granted, free of charge, to any pe... | TOOL | 0.967324 | 6.416228 | {
"github_metadata": {
"branch": "Develop",
"commit_count": 853,
"repo_created_at": "2015-07-20T16:01:22.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 53,
"forks": 15,
"issues": 7,
"pull_requests": 0
},
"file_meta": {
"content_id": "3b8899... |
d99b0904-a0f0-484a-8412-c214eb4b3ff9 | MientusJJ/algorithms | number theory/1646C.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cstring>
#include <string>
#include <queue>
#define es ios::sync_with_stdio(false);cin.tie(0);
#define x first
#define y second
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define rs resize
using namespace std;
using ll ... | ALGO | 0.999925 | 4.787061 | {
"github_metadata": {
"branch": "main",
"commit_count": 179,
"repo_created_at": "2022-09-03T15:40:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "658b7f3044... |
a14542b7-9277-4928-ac25-3e4db6629bcd | rconover06/COSC-1436 | Chapter 4/Ch 4 Lab 1.cpp | /* <NAME>
09/27/2017
COSC 1436 LAB - Program together,
Accept 4 grades
Drop lowest grade
Find average and print with one place afer the decimal.
print corresponding letter grade. */
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
int ex1, ex2, ex3, ex4, low;
... | TOOL | 0.997785 | 4.894154 | {
"github_metadata": {
"branch": "master",
"commit_count": 92,
"repo_created_at": "2017-08-02T19:44:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "62e639c44... |
80e05c9b-1606-4e42-b939-159d02e5a876 | metrumresearchgroup/Torsten | cmdstan/stan/lib/stan_math/stan/math/rev/prob/std_normal_log_qf.hpp | #ifndef STAN_MATH_REV_PROB_STD_NORMAL_LOG_QF_HPP
#define STAN_MATH_REV_PROB_STD_NORMAL_LOG_QF_HPP
#include <stan/math/rev/meta.hpp>
#include <stan/math/rev/core.hpp>
#include <stan/math/prim/fun/constants.hpp>
#include <stan/math/prim/fun/sign.hpp>
#include <stan/math/prim/prob/std_normal_log_qf.hpp>
#include <cmath>
... | ALGO | 0.995814 | 6.750082 | {
"github_metadata": {
"branch": "master",
"commit_count": 655,
"repo_created_at": "2018-03-09T17:48:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 59,
"forks": 13,
"issues": 7,
"pull_requests": 1
},
"file_meta": {
"content_id": "e1b49b0... |
bc3bc61a-7ff3-472d-abe4-aed1a51427eb | apache/openoffice | main/svx/inc/svx/svdmrkv.hxx | /**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to yo... | TOOL | 0.940524 | 6.205091 | {
"github_metadata": {
"branch": "trunk",
"commit_count": 9123,
"repo_created_at": "2013-11-13T08:00:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1049,
"forks": 341,
"issues": 0,
"pull_requests": 18
},
"file_meta": {
"content_id": "cbc... |
6430aa8f-7e32-4230-9a2f-846f1081b5d1 | SlopePlotnick/DataStructure_Experiments_and_Design | 实验/代码/第五次实验/二叉链表遍历/二叉链表遍历/main.cpp | #include<iostream>
#define TYPE char
using namespace std;
class BiNode
{
public:
TYPE data;
BiNode *lchild;
BiNode *rchild;
};
class Queue
{
public:
BiNode **dataPointers;
int first,rear,room;
};
class Stack
{
public:
BiNode **base;
BiNode **top;
int stackSize;
};
void initStack(Stack &S... | ALGO | 0.999985 | 3.600965 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-10-12T06:16:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5199b97bd3... |
f061ed12-57a7-4f9c-abe3-f0369ffb1b9a | sumanthsprabhu/sudoku | sudoku_z3.cpp | #ifdef USE_Z3
#include "common.h"
#include "z3++.h"
using namespace std;
using namespace z3;
int solve_sudoku_z3(const vector<vector<int> > & input_grid)
{
context c;
solver s(c);
vector<vector<expr> > grid;
for (int row = 0; row < ROWS; row++) {
vector<expr> tmp;
for (int col = 0; col < COLS; col+... | ALGO | 0.999744 | 5.578826 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-05-18T11:30: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": "708940e3b6bc... |
7fe128b5-2cc8-47d7-940a-e2dade14aeb8 | httin/cses | sorting-and-searching/towers.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vpii = vector<pii>;
#define sz(x) int((x).size())
#define bg(x) begin(x)
#define all(x) bg(x), end(x)
#define rall(x) x.rbegin(), x.rend()
#define sor(x) sort(all(x)... | ALGO | 0.999945 | 4.2823 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2021-06-20T17:29:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6a1cbab9c4b7... |
da86eae8-0fc7-4c8b-81bc-4b3fd8f7a7c9 | wbzhang233/RunwayDetection | src/FastLineDetector.cpp | //
// Created by wbzhang on 2019/12/16.
//
#include <iostream>
#include "opencv2/imgproc.hpp"
#include "opencv2/ximgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
using namespace cv::ximgproc;
int framecount;
void callBackOnHLD(int,void *)
{
}
int... | DATA | 0.946307 | 5.393958 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-01-10T06:57:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "93a449f47d... |
e7700434-819d-43b5-b23e-e7b79911bec9 | kirankum/morbidel-timus | done/1148.cpp | /*
* ACM Timus Online
* Building Towers - Problem 1148
*
* Sol: simple recurence (N, H, M) = (N - M, H - 1, M - 1) + (N - M, H - 1, M + 1) with memoization and some optimizations:
* - the map holds only the values for odd values for N, otherwise will get MLE
* - filter N carefully between N min and N max (nu... | ALGO | 0.999975 | 3.347778 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2015-08-12T16:26:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "827f17104... |
b78c4cc6-2f8f-40ab-bcb6-8b03a8577567 | OpenSourceRisk/Engine | QuantExt/qle/models/lgmfdsolver.cpp | /*
Copyright (C) 2024 Quaternion Risk Management Ltd
All rights reserved.
This file is part of ORE, a free-software/open-source library
for transparent pricing and risk analysis - http://opensourcerisk.org
ORE is free software: you can redistribute it and/or modify it
under the terms of the Modified BSD License... | ALGO | 0.981079 | 6.702404 | {
"github_metadata": {
"branch": "master",
"commit_count": 24865,
"repo_created_at": "2016-10-07T09:15:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 567,
"forks": 245,
"issues": 58,
"pull_requests": 7
},
"file_meta": {
"content_id": "6f... |
a9e04402-4236-4705-8467-6f0d9a3395ad | dawib19992/WizualizatorSortowania | radixsort.cpp | #include "radixsort.h"
#include <thread>
#include <chrono>
#include <cmath>
#include <QMetaObject>
void RadixSort::countingSort(std::vector<int>& data, int exp, std::mutex& mtx, bool& paused, bool& reset, MainWindow* window) {
int n = data.size();
std::vector<int> output(n);
std::vector<int> count(10, 0);
... | ALGO | 0.999647 | 5.542834 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2025-06-03T15:14: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": "4cb3ecae044... |
b3753252-dea5-49fc-96e6-60d3ab9820eb | yshagit31/DSA | POTD/22-3-2025CountCompleteComponents.cpp | // 2685. Count the Number of Complete Components
// You are given an integer n. There is an undirected graph with n vertices, numbered from 0 to n - 1. You are given a 2D integer array edges where edges[i] = [ai, bi] denotes that there exists an undirected edge connecting vertices ai and bi.
// Return the number of c... | ALGO | 0.999892 | 6.538238 | {
"github_metadata": {
"branch": "master",
"commit_count": 258,
"repo_created_at": "2024-04-23T19:26:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "17c50b79... |
9c756cfe-96c7-4c4d-9465-8f4f3c134fc4 | ShucunZhao/Leetcode | C++/13MonotonicStack/84LargestRectangleinHistogram/solwithDpCountFirstSmallerIndex.cpp | class Solution {
public:
int largestRectangleArea(vector<int>& heights) {
int ans = 0;
int size = heights.size();
vector<int> lH(size);//dp: The first left smaller element's index from current
vector<int> rH(size);//dp: The first right smaller element's index from current
lH[... | ALGO | 0.999974 | 6.144819 | {
"github_metadata": {
"branch": "main",
"commit_count": 1047,
"repo_created_at": "2022-09-27T05:51: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": "1640b72a9... |
6411e47f-4e5b-4785-a2dc-8d16d749eda3 | hoangsonha/C_C-Plus-Plus | SHtanggiamtrongmang.cpp | #include<iostream>
using namespace std;
main() {
int ha[100];
int n;
cout<<"Nhap so phan tu cua mang : ";
cin>>n;
for(int i=0; i<n; i++) {
cout<<"\nha["<<i<<"] = ";
cin>>ha[i];
}
for(int i=0; i<n; i++) {
cout<<"\n"<<"ha["<<i<<"] = ... | ALGO | 0.999768 | 3.775053 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-07-30T10:33: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": "3214d60dd855... |
16fed6a6-4c27-40a1-b33d-61a004c96e57 | ojy0216/BOJ | 10830.cpp | #include <cstdio>
#include <vector>
using namespace std;
vector<vector<int>> mat_mul(vector<vector<int>> v1, vector<vector<int>> v2){
int n = v1.size();
vector<vector<int>> result(n, vector<int> (n, 0));
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
for(int k = 0; k < n; k++)
... | ALGO | 0.999932 | 3.733186 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2021-02-09T07:37: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": "4f23fad45... |
19ab7909-2af6-4de9-b95e-a538a8cde636 | kartikcode/Data-Structures-Algorithms | Binary Search/binSearch.cpp | #include <bits/stdc++.h>
#include<algorithm>
using namespace std;
#define loop(x,n) for(int x = 0; x < n; ++x)
#define ll long long int
typedef vector<int> vi;
typedef pair<int, int> pi;
#define pb push_back
int binarysearch(int a[], int x, int l, int r)
{
if (r >= l) {
int m = l + (r - l) / 2;
... | ALGO | 0.999912 | 4.18454 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2020-08-19T05:11:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a49b91869... |
9ee203d2-c114-49a5-8af3-b3213f51d17f | jonathanmcdermid/Hopper-Chess-Engine | src/Engine.h | #pragma once
#include "Board.h"
#include "Hashtable.h"
#include "Killers.h"
#include "Movelist.h"
#include "Evaluate.h"
namespace Hopper
{
typedef struct limits
{
unsigned time[2] = { 300000, 300000 };
unsigned inc[2] = { 10000, 10000 };
unsigned movetime = 0;
unsigned movesleft = 20;
int depth = MAXDEPT... | ALGO | 0.992221 | 5.609141 | {
"github_metadata": {
"branch": "master",
"commit_count": 148,
"repo_created_at": "2020-03-18T19:34:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "035cdb9a... |
f7e5b6b8-3c99-4f6e-aec4-5e192bb5acf5 | DAANVALE/ArbolCalculadora | Separate.cpp | #include "Separate.h"
#include<iostream>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string>
#include<string.h>
#include <cstring>
using namespace std;
Separate::Separate(string operator_) {
operator_0 = operator_;
}
string Separate::Suma(){
int contadorparentesis = 0;
int coordenadadato = 0;
... | ALGO | 0.996345 | 3.390658 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2022-06-19T06:11: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": "108e29bb8f... |
ae09f07f-1ec4-4dda-9d68-8e27401b5f82 | faust-is/viterby27 | viterby/sim.cpp | /* Simulate AWGN channel
* Copyright 1994 <NAME>, KA9Q
* May be used under the terms of the GNU Public License
*/
#include "sim.h"
#include <math.h>
#include <time.h>
#include <stdlib.h> // srand()
#define OFFSET 128
double normal_rand(double mean, double std_dev);
/* Turn binary symbols into individual 8-bit ch... | ALGO | 0.999616 | 4.445978 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2020-12-01T13:30: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": "3c2332bf1dbf... |
4a88ffe3-6eea-4fbc-a035-cf52e155f1de | Passion-Love/data-structure | graph.cpp | #include "graph.h"
void create(algraph &g){
int j=0;
arcnode *a,ar[maxv];
cout<<"vertex number"<<endl;
cin>>g.n;
cout<<"arc number"<<endl;
cin>>g.e;
for(int i=0;i<g.n;i++){
cout<<"vnode data"<<endl;
cin>>g.adjlist[i].data;
g.adjlist[i].firstarc=NULL;
cout<<"a... | ALGO | 0.999914 | 3.798754 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2019-11-10T08:19:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83e7eba13... |
2b94216e-cf40-4bff-8252-6aa0ca7a2fbe | maddiemackey/GASP | SAD_Total/SAD_Total.ino | //Libraries
#include "Sensor.h"
#include "DOFSensor.h"
#include "BarometricSensor.h"
#include "GPSSensor.h"
#include "HumiditySensor.h"
//Define the outputs
//PWM0=3, PWM1=5, PWM2=9, PWM3=11
Servo myservo;
#define Buzzer 3
#define Led1 5
#define servo 11
#define para 9
//Power variables
#define currentPower 100
#de... | TOOL | 0.942817 | 5.468214 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-01-24T10:35:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ed67bdea7... |
9f1a7b21-9963-4d73-b7b9-1314e6a26b6e | DuNguyen107/Learn-Data-Structure-and-Algorithms-UTC2 | BaiTapTrenLop/Buoi_5/Tree.cpp | /*###Begin banned keyword - each of the following line if appear in code will raise error. regex supported
define
include
using
###End banned keyword*/
#include <iostream>
using namespace std;
//###INSERT CODE HERE -
struct node{
int info;
node *left, *right;
};
typedef node* Tree;
Tree getNode(int x){
Tree T = ne... | ALGO | 0.999929 | 4.668223 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-09-15T13:56: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": "fa64a22989d... |
71d6b426-c0e3-473e-9fa8-9009b06295a8 | cluelessog/IIITB-CS501-DSA | linkedList.cpp | /*
* linkedList.cpp
*
* Created on: 03-Sep-2017
* Author: sourabh
*/
#include <bits/stdc++.h>
using namespace std;
struct node{
int data;
struct node *next;
};
bool search(struct node *head,int x){//remove if else if causes problem
if(head == NULL){
cout << "list is empty"<<endl;
}
else{
while(head !... | ALGO | 0.999823 | 4.624284 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-10-12T17:26: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": "58a65b139d... |
1cff2875-f9c5-45a5-9326-6f41b0af0a70 | ishandutta2007/codeforces-c | clovers/normal/1344/C.cpp | /*
the vast starry sky,
bright for those who chase the light.
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define mk make_pair
const int inf=(int)1e9;
const ll INF=(ll)2e18;
const int MOD=998244353;
int _abs(int x){return x<0 ? -x : x;}
int add(int x,int y){x+=y; ret... | ALGO | 0.999979 | 3.540878 | {
"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": "febd479c2dec... |
b3dbcb1e-14a2-439c-b140-f1cf83ea04c7 | seetaface/SeetaFaceEngine | FaceAlignment/src/face_alignment.cpp | /*
*
* This file is part of the open-source SeetaFace engine, which includes three modules:
* SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification.
*
* This file is part of the SeetaFace Alignment module, containing codes implementing the
* facial landmarks location method described in the follo... | TOOL | 0.942512 | 5.576322 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2016-09-13T17:50:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4638,
"forks": 1772,
"issues": 109,
"pull_requests": 14
},
"file_meta": {
"content_id": "... |
9b760c7a-8464-45e6-81cd-dbef3bfc7935 | Seojeonguk/Algorithm_practice | SW Expert Academy/3000.cpp | #include<cstdio>
#include<queue>
using namespace std;
int MOD = 20171109;
int t, n, mid, a, b;
int main() {
scanf("%d", &t);
for (int tc = 1; tc <= t; tc++) {
priority_queue<int, vector<int>, less<int> > l;
priority_queue<int, vector<int>, greater<int> > r;
int ans = 0;
scan... | ALGO | 0.999842 | 3.787489 | {
"github_metadata": {
"branch": "master",
"commit_count": 2978,
"repo_created_at": "2018-10-23T02:25: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": "87c17b9... |
2957fbe5-64e1-4576-90c2-1b7044b8396e | eyangch/competitive-programming | USACOcontests/silver/2020.01/berries.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
template <typename T1, typename T2>
ostream &operator <<(ostream &os, pair<T1, T2> p){os << p.first << " " << p.second; return os;}
template <typename T>
ostream &operator <<(ostream &os, vector<T> ... | ALGO | 0.999992 | 3.888448 | {
"github_metadata": {
"branch": "master",
"commit_count": 1164,
"repo_created_at": "2019-04-01T01:31:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 21,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "65e0da... |
d17d1b17-273b-47fa-8ecd-0c1b0a5302db | Evantopian/DS-ALG | Hashing/HashTables/linear_probing.h | #ifndef LINEAR_PROBING_H
#define LINEAR_PROBING_H
#include <vector>
#include <algorithm>
#include <functional>
// Linear probing implementation.
template <typename HashedObj>
class HashTableLinear
{
public:
enum EntryType
{
ACTIVE,
EMPTY,
DELETED
};
/**
* Linear HashTab... | ALGO | 0.990238 | 6.153812 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-12-01T19:04: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": "332a799193... |
15ed663d-2b9d-496c-8275-6795ee83f9d0 | colinw7/CQCharts | test/CDragon3DCalc.cpp | #include <CDragon3DCalc.h>
#include <CMathRand.h>
#include <cmath>
CDragon3DCalc::
CDragon3DCalc()
{
init();
}
CDragon3DCalc::
CDragon3DCalc(int start, int end) :
iteration_start_(start), iteration_end_(end)
{
init();
}
void
CDragon3DCalc::
init()
{
qval_ = 0.967;
i_ = 0;
kmin_ = -3.0;
kmax_ = 3.0;
... | ALGO | 0.962405 | 5.13383 | {
"github_metadata": {
"branch": "master",
"commit_count": 746,
"repo_created_at": "2017-07-31T23:46:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63d04c... |
70ceaeae-60a4-44c0-b372-f9fd0ac245a1 | DOOMSTERR/My_DSA_Learning | Data Structures and Algorithm (C++)/Program and Codes/17_Sorting_in_Arrays/1_Selection_sort.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
#ifndef ONLINE_JUDGE
freopen("Input.txt", "r", stdin);
freopen("Output.txt", "w", stdout);
#endif
int n;
cout << "Enter the size of the array " << endl;
cin >> n;
int arr[n];
cout << "Enter the elements of... | ALGO | 0.999904 | 4.605905 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-09-13T11:13: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": "6c033628b9... |
ccc674bb-fef9-4d5d-b141-4d2aa70417ab | JingruLuo/BenchmarkOMP | RRTStarOMPL.h | /*
* RRTStarOMPL.h
*
* implementation is from OMPL, modified for storing extra information
*
*/
#ifndef RRTSTAROMPL_H_
#define RRTSTAROMPL_H_
#include "ompl/geometric/planners/PlannerIncludes.h"
#include "ompl/datastructures/NearestNeighbors.h"
#include <set>
#include <vector>
#include <cfloat>
#include <list>
... | ALGO | 0.999072 | 6.775551 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2014-09-14T22:18:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca85823caf... |
b78b2e1e-f0b9-45d0-b05a-1b76d30800ae | vothuckhanhhuyen/algorithms | applied_algorithms/Training 2_DST/Training2_POSTMAN.cpp | #include <bits/stdc++.h>
using namespace std;
long long distance(vector<pair<long long, long long>> v, int k) {
sort(v.rbegin(), v.rend());
long long x, m;
long long used, times, remain = 0, result = 0;
for (int i = 0; i < v.size(); i++) {
x = v[i].first;
m = v[i].second;
used... | ALGO | 0.999951 | 4.168312 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2021-10-05T09:00:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "51bacb430... |
7864797e-d535-461a-8a60-ec5a6383648b | kiwiwin/topcoder | srm_422_div1_250.cpp | #include <string.h>
class PrimeSoccer {
public:
double dp[19][19][19]; //interval, A, B
//prime number: 2, 3, 5, 7, 11, 13, 17
bool isPrime(int x) {
return x == 2 || x == 3 || x == 5
|| x == 7 || x == 11 || x == 13
|| x == 17;
}
double getProbability(int skillA, int skillB) {
memset(dp, 0, sizeof(dp))... | ALGO | 0.999756 | 4.323172 | {
"github_metadata": {
"branch": "master",
"commit_count": 222,
"repo_created_at": "2012-04-28T08:49:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4623b749... |
960888be-3466-4bd3-9202-27bcba42f1df | mono-1729/AtCoder_cpp | ABC/364/c.cpp | #include <bits/stdc++.h>
#include <unordered_map>
#include <stdlib.h>
#include <boost/multiprecision/cpp_int.hpp>
#include <atcoder/all>
using namespace atcoder;
using namespace boost::multiprecision;
using namespace std;
#define rep(i, a, n) for(ll i = a; i < n; i++)
#define rrep(i, a, n) for(ll i = a; i >= n; i--)
#d... | ALGO | 0.999989 | 3.871141 | {
"github_metadata": {
"branch": "main",
"commit_count": 296,
"repo_created_at": "2023-07-13T08:05: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": "86f4d66774... |
aa126c07-b351-464f-8d4f-d1564b9ff7e2 | xyiyy/icpc | src/杂/2014 Super Training #4/B.cpp | #include <iostream>
#include <sstream>
#include <ios>
#include <iomanip>
#include <functional>
#include <algorithm>
#include <vector>
#include <string>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring... | ALGO | 0.999897 | 3.908804 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2015-08-04T13:49:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "84259181... |
f01ec481-52cd-4d28-a384-c138489c4acb | arangodb/arangodb | 3rdParty/boost/1.78.0/boost/hana/functional/fix.hpp | /*!
@file
Defines `boost::hana::fix`.
@copyright <NAME> 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_FUNCTIONAL_FIX_HPP
#define BOOST_HANA_FUNCTIONAL_FIX_HPP
#include <boost/hana/config.hpp>
... | ALGO | 0.967414 | 7.075197 | {
"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": ... |
00f078bb-e639-44ff-9bd4-694675ef87d7 | AkshatAggarwal14/Competitive-Programming | CodeChef/RCBPLAY.cpp | #ifndef ONLINE_JUDGE
#include "Akshat.hpp"
#else
#include "bits/stdc++.h"
using namespace std;
#define dbg(...)
#define debug(...)
#endif
using ll = int64_t;
#define fo(i, n) for (ll i = 0; i < n; i++)
#define sz(x) ((ll)(x).size())
const double eps = 1e-12;
const double PI = acos(-1);
void Solution() {
ll x, y, ... | ALGO | 0.999897 | 5.002135 | {
"github_metadata": {
"branch": "master",
"commit_count": 850,
"repo_created_at": "2021-08-16T13:49:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5936607d... |
510ca07a-7e17-44de-b1c9-4d0ac1000b5a | Jayvashishtha123/Competitive_programming | D_1_Infinite_Sequence_Easy_Version.cpp | #include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
vector<int> parents(n - 1);
for (int i = 0; i < n - 1; ++i) {
cin >... | ALGO | 0.999972 | 5.951165 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-06-14T16:21: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": "cd17143c7c33... |
d0c7b967-d6c2-409b-8fe5-b4a06752a5dc | Chirantan2002/DSA | Binary Tree/pathSum2.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class TreeNode{
public:
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
};
void helper(TreeNode *root, vector<int> &arr, vector<vector<int>> &ans, int t... | ALGO | 0.99999 | 5.682928 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2025-06-19T09:56: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": "41d936de3a9... |
321a9704-0d95-4b43-87ad-648f5b800f0b | that-coder-q/CPP-JAVA-DSA | Arrays/leetcode_807_max_inc_to_keep_skyline.cpp | // In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there.
// We are allowed to increase the height of any number of buildings, by any amount
// (the amounts can be different for different buildings). Height 0 is considered to be a building as well.
// At the end, the "sk... | ALGO | 0.999976 | 5.881154 | {
"github_metadata": {
"branch": "master",
"commit_count": 129,
"repo_created_at": "2021-05-19T18:15: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": "bc9d44f7... |
c958fbcb-b8f0-491f-abf0-6acf0052597e | saisathwik22/leetcode-dsa | BinarySearch/Search2DMatrix.cpp | /*
2D array -> 1D array -> find mid of 1d array -> row of 2d array = mid / n, col = mid % n;
*/
class Solution {
public:
bool searchMatrix(vector<vector<int>>& matrix, int target) {
int m = matrix.size();
int n = matrix[0].size();
int i = 0, j = n - 1;
while(i < m && j >= 0) {
... | ALGO | 0.999976 | 6.044151 | {
"github_metadata": {
"branch": "main",
"commit_count": 98,
"repo_created_at": "2024-09-05T07:55:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "86b7fa540e5... |
39b2f446-0829-4a5f-86b2-f79271a3dec8 | zkck/ethz-algolab2019 | week03/hit/main.cpp | #include <iostream>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/intersections.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point_2;
typedef K::Ray_2 Ray_2;
typedef K::Segment_2 Segment_2;
int main(int argc, char const *argv[])
{
... | ALGO | 0.998323 | 4.489439 | {
"github_metadata": {
"branch": "master",
"commit_count": 196,
"repo_created_at": "2019-11-08T18:33:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61c6a14b... |
7743d3d1-b772-4b10-a14f-272c32a5a959 | asterixorobelix/cPlusPlus | Savitch-Mock/Chapter7/chapter7,progProj5.cpp | /*
Assignment 3 for CSCP1DB-17-Y1
By <NAME>, Student Number: 7936-717-8
Chapter 7, Savitch, pg 471, project5
Write a program which reads in a list of integers into an array with base type int.
Provide the facility to either read this array from the keyboard or from a file, at the user’s choice.
If the user chooses f... | ALGO | 0.998278 | 4.082593 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2017-07-30T12:35: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": "3a17945c... |
3e39739c-a145-47e9-8d30-df12afb56506 | jeffreyqdd/usaco-train | prefix/prefix.cpp | /*
ID: jeffrey66
TASK: prefix
LANG: C++11
*/
#include <iostream>
#include <fstream>
#include <vector>
#include <queue>
#include <string>
using namespace std;
int main()
{
ifstream fin("prefix.in");
ofstream fout("prefix.out");
vector<string> primitives;
vector<bool> visited;
string sequence = "... | ALGO | 0.998396 | 3.889811 | {
"github_metadata": {
"branch": "master",
"commit_count": 118,
"repo_created_at": "2018-09-17T00:38:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63f03dbf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.