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 |
|---|---|---|---|---|---|---|---|
069f162f-0559-4559-a253-931396d15b13 | VixenLights/Vixen | src/Vixen.Modules/Analysis/QMLibrary/QMFiles/dsp/rateconversion/Decimator.h | /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
/*
QM DSP Library
Centre for Digital Music, Queen Mary, University of London.
This file 2005-2006 <NAME>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public... | ALGO | 0.959645 | 5.742447 | {
"github_metadata": {
"branch": "master",
"commit_count": 7439,
"repo_created_at": "2018-05-24T14:21:11.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 110,
"forks": 27,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "adf25... |
05fc3a1f-d5f7-4195-98a4-bbd8edfbec4e | stelgic/platform | samples/sources/processors/rsi/RsiKernel.h | #pragma once
#include <iostream>
#include <cmath>
/**
* This kernel compute Relative Strength Index (RSI)
* For accurracy propose replace double type with double
*/
inline bool RelativeStrengthIndex(
size_t idx, const double* input_values, size_t dataLen, size_t aSize, double *output_values,
int winSize... | ALGO | 0.991856 | 6.479676 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2024-08-04T22:22: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": "c427de92cbd... |
4d0654d8-0b12-456d-a87d-d967f6ddfa32 | volmodaoist/STUACM | D图论2-4连通性问题/并查集/AC0237.cpp | #include<bits/stdc++.h>
using namespace std;
#define MAXN 300005
int id;
map<int, int >hash_in;
int get(int x){
if(!hash_in.count(x)){
hash_in[x] = ++id;
}
return hash_in[x];
}
int pt[MAXN];
int find(int x){
return pt[x] != x ? pt[x] = find(pt[x]) : x;
}
int n, m, a, b, e,kase;
int main()... | ALGO | 0.999936 | 4.54262 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2021-01-24T13:40:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 11,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf00fa6a3... |
d4a0cf66-052b-4471-a9be-bb0b6d018556 | Noiszombie/Computational-practice | 5_point_scheme/5-point scheme/interiorPoints.cpp | #include "interiorPoints.h"
#include <iostream>
#include "data.h"
interiorPoints::interiorPoints(char **visual, unsigned int size)
{
neighbourHood = new int *[size];
int step = 1;
for (int i = 0; i < size; i++)
{
neighbourHood[i] = new int[size];
}
for (int i = 0; i < size; i++)
{
for (int j = 0; j < size; ... | ALGO | 0.998333 | 3.387747 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-03-08T16:45:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "32eac85d01... |
36a6884c-e0af-4523-af87-3ba36d35593c | Shefilkhan/Project1 | CH_02.cpp | /*
FILE : Area_of_Circle.cpp
PROGRAMMER : <NAME>
DATE : 2025-07-05
DESCRIPTION : This program calculates the area of a circle and the volume of a cylinder
based on user input for radius and height.
*/
#include <stdio.h>
int main(void) {
// initializing variables
int radius, height;
float pie = 3.141... | TOOL | 0.980864 | 5.64165 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2025-07-05T22:48: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": "bda72f3f8d... |
7156f3f5-6f26-4cfe-bfbe-632ccc9f0bf3 | chesterli29/LeetCode | RemoveNthNodeFromEndOfList/RemoveNthNodeFromEndOfList.cpp | /**
* Definition for singly-linked list.
*/
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(nullptr) {}
};
class Solution {
public:
//Solution 1 my version
ListNode* removeNthFromEnd(ListNode* head, int n) {
ListNode* first = head, *second = head;
if (n == 1) {
if (head->... | ALGO | 0.999979 | 5.573767 | {
"github_metadata": {
"branch": "master",
"commit_count": 188,
"repo_created_at": "2016-03-01T01:38:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "295ef015... |
2ad61506-2b30-4e80-b639-173ab57354ae | Melvin121/Cuarto-corto-FP | promedio.cpp | #include "iostream"
using namespace std;
float estatura [25];
float prom;
const int n = 25;
int men (float estatura[], int n);
float promedio (float estatura[], int n);
int may (float estatura[], int n);
int i;
int main(){
cout << "Promedio de estaturas de alumnos"<< endl << endl;
for (i = 0; i < n; i+... | TOOL | 0.99403 | 3.430393 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-06-28T00:56: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": "5af45074e4... |
861a57b4-ee86-4a55-8354-372b03649b4c | princebansal7/DSA-Sheets-Code | TUF/03.Arrays/01.Fundamentals/05.leftRotateByOne.cpp | /*
@author: princebansal_
*/
#include <iostream>
#include <vector>
using namespace std;
#define nl '\n'
// TC: O(N), SC: O(1)
// Note: Space complexity: O(N) for this algo as we are using and modifying given array,
// but it is O(1) in context we didn't use any extra space
void rotateArr... | ALGO | 0.999952 | 5.438278 | {
"github_metadata": {
"branch": "main",
"commit_count": 142,
"repo_created_at": "2021-12-27T20:42:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f1d949650... |
8cbb4d93-fac4-45c0-857b-1fb25488b168 | tYen0809/2021-Spring-Data-structures | HW3/HW3_MouseInMaze.cpp | //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "HW3_MouseInMaze.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
using namespace std;
#define MaxStack 200
st... | TOOL | 0.946778 | 3.186077 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2022-09-16T13:46: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": "0600fee8b60... |
87e789e5-63c3-454a-a6e5-108c8a756d82 | gowdachaithanya-05/DSA_Practice | CPP/DAA_LAB/dijkstra.cpp | // #include <iostream>
// #include <vector>
// #include <queue>
// #include <climits>
// using namespace std;
// typedef pair<int, int> pii;
// void addEdge(vector<vector<pii>>& graph, int u, int v, int weight) {
// graph[u].push_back(make_pair(weight, v));
// graph[v].push_back(make_pair(weight, u));
// }
/... | ALGO | 0.999964 | 5.896695 | {
"github_metadata": {
"branch": "main",
"commit_count": 111,
"repo_created_at": "2024-11-16T11:54:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3dbcb78025... |
d64d8a0d-1d9e-4634-8219-a2d3b773b157 | Akashkulkarni200512/DSAlabassignments | assign7.cpp | #include <iostream>
#include <vector>
#include <climits>
using namespace std;
#define MAX 10 // Maximum number of cities
// Structure for edges
struct Edge {
int start, end, weight;
};
class Graph {
int adj[MAX][MAX]; // Adjacency matrix
string city[MAX]; // City names
int numCities; ... | ALGO | 0.999956 | 4.968627 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-04-01T11:49: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": "d99733cd4eac... |
af98c54d-b64c-49ae-955a-44ec591d6bd2 | myoshimi-old/443ray | main.cpp | #include<iostream>
#include<cmath>
#include<ctime>
#include<fstream>
#include<vector>
#include<list>
#include<omp.h>
#include<sys/time.h>
#include "443ray.hpp"
#include "vector3.hpp"
#include "polygon3.hpp"
#include "aabb3.hpp"
#include "color.hpp"
#include "screen.hpp"
#include "light.hpp"
#include "scene.hpp"
usin... | ALGO | 0.978798 | 3.89758 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2012-09-08T07:13: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": "112af65d85... |
ffdcbd62-8555-4fcd-9b6d-328a06ed15d8 | OpenFOAM/OpenFOAM-dev | src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.H | /*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
\\... | ALGO | 0.974333 | 6.78915 | {
"github_metadata": {
"branch": "master",
"commit_count": 8589,
"repo_created_at": "2014-12-10T15:47:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1770,
"forks": 642,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "c5... |
7d667f81-10e3-4813-8261-df01981a28de | AndreyTokmakov/CppProjects | EigenTests/Matrices/Matrices.cpp | //============================================================================
// Name : Matrices.cpp
// Created on : 09.11.2021.
// Author : <NAME>
// Version : 1.0
// Copyright : Your copyright notice
// Description : LeastSquares
//==================================================================... | ALGO | 0.991462 | 5.124431 | {
"github_metadata": {
"branch": "main",
"commit_count": 983,
"repo_created_at": "2022-12-29T16:27:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff6e4b3782... |
d045f603-68fd-47d1-a382-cf710a79aca0 | Pietro-PPC/CP_problems | on_hold/cf715b.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define LL_MAX 0x7fffffffffffffff
#define ende "\n"
#define MP make_pair
#define PB push_back
#define MAX 1123
ll g[MAX][MAX], prnt[MAX];
ll dst[MAX];
ll l_eg1, l_eg2;
ll n;
void dijkstra(ll s,... | ALGO | 0.999984 | 4.433493 | {
"github_metadata": {
"branch": "master",
"commit_count": 97,
"repo_created_at": "2022-05-13T19:31: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": "b25bb26fb... |
918e8a12-cce4-431c-bc0b-40c6a2946fb8 | mnhtng/C-plus-Algorithm | C++/Char and String/xauThuanNghichCoCsNto.cpp | #include <bits/stdc++.h>
using namespace std;
int notPrime( int n ){
return n != 2 && n != 3 && n != 5 && n != 7;
}
int check( string s ){
if( notPrime( (int)s[s.size() / 2] - 48 ) )
return 0;
for( int i = 0; i < s.size() / 2; i++ ){
if( notPrime( (int)s[i] - 48 ) || (int)s[i] != (int)s[s... | ALGO | 0.99969 | 4.453133 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-01-01T05:07: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": "ed31ad2c60e... |
aac501d2-b037-4ac9-8125-48e607bfedd2 | dholzmueller/sfcpp | src/sfc/CurveSpecification.hpp | /* Copyright 2017 The sfcpp Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | ALGO | 0.973938 | 7.671677 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-10-11T06:56:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e2769489a... |
e09b3e56-42e9-4c7a-ba7a-5ab502b0e46b | guilingxz/hello | 实验5_二叉链表实现二叉树/text.cpp | #include<stdio.h>
#include<stdlib.h>
#define ok 1
#define error 0
#define overflow -2
typedef struct treenode{
int data;
struct treenode *lchild,*rchild;
}treenode,*tree;
int menu();
int inittree(tree &t);
int createtree(tree &t);
void input(int a[],int n);
void output(int a[],int n);
void firsttree(tree t);
void mi... | ALGO | 0.99996 | 3.260226 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-07-18T03:04: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": "0f1d3a1cc9... |
b220b477-91ef-4cb3-adcf-6e439fb996df | saarang123/Competitive-Programming | codeforces/1032C.cpp | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
// ----------------------------------------Defines and Template-------------------------------------//
//#define int long long
#define ll long long
#define double long ... | ALGO | 0.999991 | 3.898406 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2021-05-13T07:29:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "87a17b4f... |
d99c1b84-3275-4c75-8a1e-8a8b83e40ae1 | lab530/algo-daily | 洪想想/2023/11/国王游戏.cpp | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
struct node{
int l, r;
};
string ans = "A";
vector<int> A;
bool cmp(node x, node y){
return x.l*x.r < y.l*y.r;
}
string compare(string a, string b){
if(a.length() < b.length()) return b;
if(a.length() == b.length()){
... | ALGO | 0.999961 | 3.731427 | {
"github_metadata": {
"branch": "main",
"commit_count": 320,
"repo_created_at": "2022-10-17T05:34:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "00fd3e08b6... |
dc26b24a-a113-4a94-8dd8-b4a9de4a9970 | AgriculturalModelExchangeInitiative/SQ_Energy_Balance | src/cpp/Conductance.cpp | #define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
# include<vector>
# include<string>
# include<numeric>
# include<algorithm>
# include<array>
#include <map>
# include <tuple>
#include "Conductance.h"
using namespace std;
Conductance::Conductance() { }
double Conductance::getvonKarman() {return this-> von... | ALGO | 0.991273 | 4.414591 | {
"github_metadata": {
"branch": "master",
"commit_count": 82,
"repo_created_at": "2018-11-26T16:10:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b66ee8413... |
b4542d20-67ab-4a89-b9ed-79b3e2c32fc7 | maisquemaker/arduinoPratico | video007/video007.ino | /*
Vídeo 7
Neste vídeo, ainda com a mesma montagem com o display de 7 segmentos,
vamos aprimorar ainda mais o nosso código através do aprofundamento na
linguagem C.
Apresento o tipo 'byte' (um 'alias' para o tipo nativo `unsigned char`)
e a sua vantagem sobre o tipo 'int', apresentado anteriormente.
Ap... | ALGO | 0.92683 | 4.044984 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2020-06-11T19:43:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dac491d3c... |
903c0230-ba75-4c4d-9865-5503d0b09fe3 | GeekBand/GeekBand-CPP-1501-Homework | G2015010571/binaryTreePrint.cpp | #include <iostream>
#include <vector>
#include <utility>
#include <iomanip>
using namespace std;
struct TreeNode{
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int val): val(val), left(NULL), right(NULL){ }
};
void dfs(TreeNode *root, vector<int>& temp, vector<vector<int> >& paths){
temp.push_back(root->val)... | ALGO | 0.999942 | 5.127497 | {
"github_metadata": {
"branch": "master",
"commit_count": 359,
"repo_created_at": "2015-08-07T12:50:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12,
"forks": 48,
"issues": 0,
"pull_requests": 6
},
"file_meta": {
"content_id": "c9b6853... |
690c276d-3c2a-4ccc-bedc-3e6f3ce971ee | mytony/Leetcode | BasicCalculator.cpp | class Solution {
public:
int calculate(string s) {
stack<string> stack;
int sum, num, i = 0;
while(i < s.size()){
char c = s[i];
if(c == '(' || c == '+' || c == '-'){
stack.push(string(1, c));
} else if(isdigit(c)){
int end ... | ALGO | 0.999981 | 5.001324 | {
"github_metadata": {
"branch": "master",
"commit_count": 72,
"repo_created_at": "2016-02-15T20:24: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": "c0579164c... |
62fca473-f38b-4d8b-9b13-b04e6f845692 | Yonghui56/ComponentialMultiphase | ogsNumerics/DiscreteLib/lis/LisMPILinearSystem.h |
#pragma once
#include "MathLib/LinAlg/LinearEquations/LisMPILinearEquation.h"
namespace DiscreteLib
{
/**
*
*/
template<class T_SPARSITY_BUILDER>
class LisMPILinearSystem : public AbstractMeshBasedDiscreteLinearEquation
{
public:
///
LisMPILinearSystem(MeshLib::IMesh &msh, MathLib::LisMPILinearEquation &... | ALGO | 0.971881 | 5.252035 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2015-09-21T09:42:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "edf9c5c20... |
ff89d004-4a77-465a-a8e5-61243dbdd9c7 | diwww/algorithms-hse | semester-1/11/kmp.cpp | // Name: <NAME>
// Group: BSE151
// Used books: Introduction to Algorithms by <NAME>
#include "kmp.h"
// Prefix function
int *pref(std::string temp)
{
int *p = new int[temp.length()];
p[0] = 0;
int k = 0;
for (int i = 1; i < temp.length(); ++i)
{
while (k > 0 && temp[i] != temp[k])
... | ALGO | 0.999817 | 5.687509 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-07-01T08:39:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1af1246c8d... |
d63af6f3-d378-4422-8ca4-cb2c777386cd | OriD-19/aoc_2024 | day02.cpp | #include "split.cpp"
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
freopen("input.txt", "r", stdin);
vector<int> reports;
string report;
int total = 0;
while (getline(cin, report)) {
vector<int> curr_report = split_input(report, " ");
... | ALGO | 0.999387 | 4.37917 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-12-11T04: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": "4b67c134f8... |
56960a77-89eb-45f6-a7f8-576b1d47ee50 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/04/0425/personal_submission/cf1114c_yakultgo.cpp | #include <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
void solve() {
ll n, b;
cin >> n >> b;
// 把b质因数分解了
map<ll, int> mp;
for (int i = 2; 1ll * i * i <= b; i++) {
if (b % i == 0) {
int cnt = 0;
while (b % i == 0) {
b /=... | ALGO | 0.999609 | 4.750349 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "4bfe... |
1b21294e-5952-459d-92dc-85ce43693712 | Accagain2014/leetcode | Algorithms/CPP/19.cpp | // Author : Accagain
// Date : 17/2/16
// Email : <EMAIL>
/***************************************************************************************
*
* Given a linked list, remove the nth node from the end of list and return its head.
*
* For example,
*
* Given linked list: 1->2->3->4->5, and n = 2.
*
* ... | ALGO | 0.999969 | 4.708656 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2017-02-16T02:35:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b8d72dad... |
28359b82-fc76-4ff6-81d3-5a07b29205fc | raincross7/code-similarity | codes/train_code/problem183/problem183_174.cpp | /*
URL_HERE
*/
/*
*/
#ifdef _WIN32
#pragma warning(disable:4996)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <math.h>
#include <unordered_map>
using namespace std;
FILE* _fin = stdin;
FILE* _fout = stdout;
#define PI 3.14159265358979323846264338327950288419716939937... | ALGO | 0.999978 | 4.381165 | {
"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": "a36b176122e2... |
88c9637d-f122-4221-9b5f-97fab3600783 | kocsist-git/UniversityOfSzeged-Cpp | 02-string-basic/feladat.cpp | #include <iostream>
#include <stdexcept>
#include <cassert>
using namespace std;
/////////////////////////
// Ide dolgozz!!
////////////////////////
int count_mM()
{
int sum = 0;
string input;
cin >> input;
for (size_t i = 0; i < input.length(); i++)
{
if (input[i] == 'm' || input[i] == 'M')
{
... | ALGO | 0.998408 | 3.684607 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2022-09-27T08:59: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": "00afabbdf... |
c651f9a9-9f3f-4dbd-981e-7895f1aaea1f | khs960616/Algorithm | BOJ15654.cpp | #include <bits/stdc++.h>
using namespace std;
//DEBUG F5
/*
첫째 줄에 N과 M이 주어진다. (1 ≤ M ≤ N ≤ 8)
둘째 줄에 N개의 수가 주어진다. 입력으로 주어지는 수는 10,000보다 작거나 같은 자연수이다.
한 줄에 하나씩 문제의 조건을 만족하는 수열을 출력한다. 중복되는 수열을 여러 번 출력하면 안되며, 각 수열은 공백으로 구분해서 출력해야 한다.
수열은 사전 순으로 증가하는 순서로 출력해야 한다.
---
input으로 받은 수를 오름차순으로 정렬시키고 실행하는 경우 n과 m (1)번쨰 문제와 풀이가 동일하... | ALGO | 0.999976 | 4.378498 | {
"github_metadata": {
"branch": "master",
"commit_count": 414,
"repo_created_at": "2019-12-31T05:10:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "94fd60e1... |
89c535e3-321c-42ec-91d5-29bd8bdb8576 | durgesh0187/Data-Structure | Graph/cycle_dictected_dricted_graph_using_dfs.cpp | #include<bits/stdc++.h>
using namespace std;
class Graph{
list<int> *l;
int v;
public:
Graph(int v)
{
this->v=v;
l = new list<int> [v];
}
void addEdge(int x, int y, bool dricted = true)
{
l[x].push_back(y);
if(!drict... | ALGO | 0.999871 | 4.717804 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-08-12T13:43: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": "1dbd128edb... |
16c67523-cf24-4883-8227-77faa8dc3258 | chirag1992m/geeky | cormen/chapter_4/maximum_subarray_problem.cpp | /*
@author: <NAME>
This program finds the subarray which has the maximum sum of all the sub-arrays. As the output, it gives the starting and ending positions of the maximum subarray in the original array.
*/
/* Method 1
This method is the brute force method, and goes though all the possible sub-arrays
to find the... | ALGO | 0.999918 | 4.924903 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2013-03-16T22:18:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c3fca6033... |
38819987-454c-4b1e-b462-736200e15312 | wcorder1/5-Number-Operation-Possibilities | main.cpp | #include <iostream>
#include <string.h>
#include "proj1.h"
#include <vector>
using namespace std;
int main(int argc, char* argv[]) {
vector<int>v;
int e;
for (int i = 1; i < argc; i++) { //for loop looping through all cmd args
if (strcmp(argv[i],"-e") == 0) { //checks for cmd arg "-e" then stores value in str... | TOOL | 0.955256 | 3.58895 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-11-07T03:01: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": "c9dd03d5ed... |
9baf5222-16ff-4eb0-b5ca-805e7c4d51d0 | slongle/GPU-Renderer | src/renderer/bvh.h | #pragma once
#include <device_launch_parameters.h>
#include <thrust/reduce.h>
#include <thrust/device_ptr.h>
#include <algorithm>
#include "renderer/aabb.h"
#include "renderer/triangle.h"
inline
uint32 LeftShift3(uint32 x) {
assert(x <= 1024);
if (x == (1 << 10)) --x;
x = (x | (x << 16)) & 0x30000f... | ALGO | 0.999349 | 4.762963 | {
"github_metadata": {
"branch": "master",
"commit_count": 72,
"repo_created_at": "2019-11-26T04:56:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 2,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "57f0e908... |
0f97c853-c704-434e-a292-690fa124b436 | dina-lab3D/CombFold | CombinatorialAssembler/BestK.cc | #include "BestK.h"
bool BestK::push(std::shared_ptr<SuperBB> in) {
std::lock_guard<std::mutex> locker(_mu);
if (size() < k_) {
insert(in);
return true;
} else {
if (internalMinScore() < score(in)) {
erase(begin());
insert(in);
curMinScore = scor... | ALGO | 0.994269 | 5.45537 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2023-04-04T16:10:50.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 85,
"forks": 18,
"issues": 10,
"pull_requests": 0
},
"file_meta": {
"content_id": "16ddab8... |
e100095a-ab3f-42b9-a433-743f766b5773 | EEDK/StudyBaekJoon | 백준/Gold/2533. 사회망 서비스(SNS)/사회망 서비스(SNS).cc | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define FASTIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define FOR(i, n) for(int i = 0; i < (n); ++i)
#define INF (~0U >> 2)
#define PB push_back
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
int N;
vector<vi> Graph... | ALGO | 0.999887 | 4.347828 | {
"github_metadata": {
"branch": "main",
"commit_count": 393,
"repo_created_at": "2023-02-19T12:44: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": "88a2014e21... |
fbd8bcbb-2e25-42f8-a7cf-02830764babd | black-shadows/LeetCode-Topicwise-Solutions | C++/word-squares.cpp | // Time: O(n^2 * n!)
// Space: O(n^2)
class Solution {
private:
struct TrieNode {
vector<int> indices;
vector<TrieNode *> children;
TrieNode() : children(26, nullptr) {}
};
TrieNode *buildTrie(const vector<string>& words) {
TrieNode *root = new TrieNode();
for (int... | ALGO | 0.999978 | 7.206493 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2019-05-26T15:41:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 271,
"forks": 107,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "5cacd... |
004e91a1-0091-48ab-b835-3ecce82e45be | manoflearning/cp-codes | Codeforces/Codeforces Round 905 (Div. 1)/C.cpp | // #pragma GCC optimize("O3")
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <cassert>
using namespace std;
#define ll long long
#define ull unsigned long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define fr first
#define... | ALGO | 0.999883 | 5.104767 | {
"github_metadata": {
"branch": "main",
"commit_count": 1899,
"repo_created_at": "2020-08-06T14:38: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": "7389fa889... |
244be2bb-c862-4754-96ca-67c776c814ee | kantuni/Codeforces | 1206D/shortest-cycle.cpp | #include <bits/stdc++.h>
#define INF (int) 1e9
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<long long> a;
for (int i = 0; i < n; i++) {
long long ai;
cin >> ai;
if (ai > 0) {
a.push_back(ai);
}
}
// If we have more than 1... | ALGO | 0.999841 | 3.598902 | {
"github_metadata": {
"branch": "master",
"commit_count": 1466,
"repo_created_at": "2017-02-05T18:52:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 211,
"forks": 58,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d87d... |
b583a8f6-956f-4f3b-824b-85bff3a4dc1b | DeepakGoyalDev/polynomail_equation | polynomial.h | #ifndef POLYNOMIAL_H_INCLUDED
#define POLYNOMIAL_H_INCLUDED
#include<iostream>
#include<cmath>
class Term
{
public:
int cof;
int exp;
public:
Term(int c=0, int e=0)
{
cof = c;
exp = e;
}
int eval_term(int var = 0)
{
return cof*pow(var, exp);
}
void o... | TOOL | 0.927964 | 4.079383 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-04-20T07:58:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f09bc1dcb... |
512d16ee-fa55-4909-b052-9763c59c9151 | Jay1105/LeetCode | 0098-validate-binary-search-tree/0098-validate-binary-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.999989 | 6.011921 | {
"github_metadata": {
"branch": "main",
"commit_count": 953,
"repo_created_at": "2022-12-04T12:27: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": "3540bb7745... |
b201cfc3-6834-4d3d-95e8-2c8f04419b4d | Tpt/megasat | main-egalite.cpp | #include<iostream>
#include"include/TransformationTseitin.h"
#include"include/LanceurSolveur.h"
#include"include/FormuleTseitin.h"
#include"parser/egalite/driver.h"
#include"include/InsatisfiableException.h"
#include"include/TheorieGreffonEgalite.h"
#include<chrono>
using namespace std;
using namespace std::chrono;
F... | ALGO | 0.998453 | 4.310012 | {
"github_metadata": {
"branch": "master",
"commit_count": 506,
"repo_created_at": "2014-02-12T09:33:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4ea4808... |
36954bda-0be2-48d1-a660-f523ebd4332f | Octobug/notes | algorithms_and_data_structures/leetcode/backtracking/h_00051_n-queens/main.cpp | #include <iostream>
#include <vector>
#include "array.h"
using namespace std;
class Solution
{
public:
vector<vector<string>> result;
vector<pair<int, int>> points;
bool cols[9] = {0};
bool isCollide(int n, int row, int col)
{
if (cols[col])
return true;
for (int i = ... | ALGO | 0.999697 | 4.838707 | {
"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": "67320675... |
525c73b0-3d73-48dc-980c-97a07572452a | vladimirbahmetyev/Homework | 1st_course/1st_sem/HomeWork_7/Hw7_2/Hw7_2/Tree.cpp | #include "Tree.h"
#include <fstream>
#include <iostream>
using namespace std;
struct Tree
{
Tree *leftSon;
char value;
Tree *rightSon;
};
bool isTreeFinish(Tree *binaryTree)
{
if (!binaryTree)
{
return binaryTree;
}
if (('0' <= (binaryTree->value)) && ('9' >= (binaryTree->value)))
{
return true;
}
if (... | ALGO | 0.997885 | 3.387868 | {
"github_metadata": {
"branch": "master",
"commit_count": 110,
"repo_created_at": "2016-12-01T15:09: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": "adc50615... |
f818b04b-c18c-42c7-8b28-c0bb9581c4cc | rifatahsanpul0k/CompetitiveProgramming | MaximumTheScore.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void insertionSort(vector<int> &array){
int temp;
for (int i = 0; i < array.size(); i++)
{
for (int j = i; j > 0; j--)
{
temp = array[j];
if (temp<array[j-1])
{
... | ALGO | 0.999971 | 4.239001 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-09-06T16:46: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": "ae1339e1d20b... |
48579bff-cb69-462b-b0b6-534de33796d9 | tedyash/PW | 7th_assignment.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int findElement(int arr[], int n)
{
int leftMax[n];
leftMax[0] = INT_MIN;
for (int i = 1; i < n; i++)
leftMax[i] = max(leftMax[i - 1], arr[i - 1]);
int rightMin = INT_MAX;
for (int i = n - 1; i >= 0; i--)
{
if (le... | ALGO | 0.998418 | 3.571897 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-02-10T05:56:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a62529fada... |
d97481c6-1b5e-4bef-b6d8-c2552d61c8d8 | ruanertanjing/- | shu_ju_jie_gou/shu_ju_jie_gou/shu_ju_jie_gou.cpp | /*数据结构练习*/
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>//动态申请,sizeof
//顺序表的基本操作
/*插入,删除*/
#define ok 1
#define error 0
#define overflow -2//溢出
#define initsize 50//初始数组长度
#define addsize 20//每次追加的长度
typedef int status;//返回状态
typedef int elemtype;//数据类型
typedef struct list
{
... | ALGO | 0.999847 | 3.900566 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2024-03-23T01:03: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": "40d32aaf1... |
08c07e8c-8b9b-4f1d-8884-e5307e1bbccf | SNbappy/CP-Vault | B_Digits.cpp | /*
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
Author: Depressed_C0der
Created: 2025-01-23 14:40:09
*/
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define ll long long
#define tst \
int t; \
cin >> t; \
while (t--)
#define el '\n'
#def... | ALGO | 0.99989 | 4.846486 | {
"github_metadata": {
"branch": "main",
"commit_count": 223,
"repo_created_at": "2025-02-09T15:36: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": "94e6b20f21... |
541bc17c-60dd-4fcf-a29b-1be83375324e | JiachunWang/CodingInterviewChinese2- | offer11_v1.cpp | /*
题目描述
把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。 输入一个非减排序的数组的一个旋转,
输出旋转数组的最小元素。 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,该数组的最小值为1。
NOTE:给出的所有元素都大于0,若数组大小为0,请返回0。
*/
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int minNumberInRotateArray(vector<int> rotateArray) {
int len = rotateA... | ALGO | 0.999988 | 5.709988 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-05-09T06:31: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": "e3b86d7713... |
867574b0-a90c-4f33-82e6-b71f6470f59d | aakashsharma003/Striver-SDE-Sheet-Challenge | 0652-find-duplicate-subtrees/0652-find-duplicate-subtrees.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.999863 | 5.959317 | {
"github_metadata": {
"branch": "main",
"commit_count": 663,
"repo_created_at": "2023-06-04T19:00:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba79c5ad06... |
0a8af9f1-f80a-496d-83cb-55ae5665ee3f | bartilyska/oldMaturaPrep | programowanie/suma osemek/main.cpp | #include <iostream>
#include <cmath>
using namespace std;
int suma8(int a,int b)
{
int suma=0,liczba=0,przeniesc=0,pozycja=1;
while(a>0 || b>0 || przeniesc>0)
{
liczba=a%10+b%10+przeniesc;
if(liczba>7)
{
przeniesc=1;
liczba=liczba%8;
}
else prz... | ALGO | 0.998682 | 3.178709 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-12-26T13:06: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": "a92fff2ed105... |
3f4ca972-ccc1-4e66-b7a6-b253c6bb0385 | wang-haihua/TechStack | AlgorithmLearning/LeetCode_Cpp/Code/Greedy/605.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
//Code Content
bool canPlaceFlowers(vector<int>& flowerbed, int n) {
if(n==0){
return true;
}
int len = flowerbed.size();
if(1==len&&flowerbed[0]==0){
return true;
}
for(int i=0;i<len-1;++i){
... | ALGO | 0.999995 | 5.571602 | {
"github_metadata": {
"branch": "master",
"commit_count": 171,
"repo_created_at": "2019-10-30T09:29:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "293d0e84... |
87ad8e30-5e0d-4a1a-9296-d5acb15c9988 | vancegroup-mirrors/sofa-framework | Sofa/doc/principles/liverTreeVisualCollision.cpp | /** Deformable liver */
/** Root of the data tree (scene graph)
GNodes define the structure of the scene.
They have basically two lists:
- components: the modules dedicated to a given task
- children: GNodes used to model alternative models of the body
Auxiliary lists and singletons are used to rapidly access comp... | TOOL | 0.926524 | 3.101223 | {
"github_metadata": {
"branch": "master",
"commit_count": 2616,
"repo_created_at": "2013-03-26T20:22:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "500b5b74... |
56c56872-8f6c-4601-b1b1-48b9057aa344 | Nolan-Rewega/GM-Assessment | Histogram.cpp | #include "Histogram.hpp"
#include <iostream>
Histogram::Histogram(int bins)
{
m_bins = bins;
m_histogramData.resize(m_bins, 0);
m_numDataPoints = 0.0;
m_smallest = std::numeric_limits<double>::max();
m_largest = std::numeric_limits<double>::lowest();
}
void Histogram::updateHistogram(std::vector... | TOOL | 0.926881 | 6.062722 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2022-07-01T19:43: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": "28da32da5d2... |
d4bc418e-a35a-4d9c-b4fd-752285f06834 | huyuguang/ZkPod2-lib | public/pds_pub.h | #pragma once
#include <algorithm>
#include <array>
#include <boost/endian/conversion.hpp>
#include <boost/filesystem.hpp>
#include <boost/noncopyable.hpp>
#include <numeric>
#include <vector>
#include "ecc.h"
#include "tick.h"
class PdsPub : boost::noncopyable {
public:
#ifdef _DEBUG
static inline int64_t const k... | TOOL | 0.908053 | 6.69222 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2019-10-16T10:58:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "25043cad3... |
86ef5571-5c70-47d6-813c-83047168f97a | sselicrem/oop-gr1-proj2 | ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.cpp | #include "stdafx.h"
#include <iostream>
using namespace std;
class Shortset {
private:
bool x[65535];
int y[65535];
public:
Shortset() {
for (int i = 0; i < sizeof(x) / sizeof(*x); i++) {
x[i] = false;
y[i] = 0;
}
};
bool empty();
void insert(short x);
bool find(short x);
void erase(short x);
int ... | ALGO | 0.999353 | 4.280239 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-10-02T11:07: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": "e61aeaa71c... |
c218177f-50c2-4467-9cec-bbe784c6b890 | akhikolla/testpackages | fuzzedpackages/MatrixLDA/src/M_Update_Rcpp.cpp | #include <RcppArmadillo.h>
using namespace Rcpp;
using namespace arma;
// soft thresholding
double ST1(double z,double gam){
double sparse=0;
if(z>0 && gam<fabs(z)) return(z-gam);
if(z<0 && gam<fabs(z)) return(z+gam);
if(gam>=fabs(z)) return(sparse);
else return(0);
}
// [[Rcpp::depends("RcppArmadillo")]]
//[[R... | ALGO | 0.999929 | 5.927347 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-01-15T17:42:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ddf01466a6... |
b687cabd-f2b1-423a-8f32-913e2b0f0cac | ltedgar-ed/AngioFE_original | AngioLib/BC.h | ///////////////////////////////////////////////////////////////////////
// BC.h
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// The BC class is used by the CULTURE class to handle boundary
// conditions within the mod... | TOOL | 0.978504 | 4.310325 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-03-24T09:14:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "94922cbfe998... |
f2e7b3e7-4b2a-475d-9962-df6d9fc330c6 | bilgili/Voreen | ext/tgt/line.h | /**********************************************************************
* *
* tgt - Tiny Graphics Toolbox *
* *
* Copyright (C) 2005-2013 Visua... | ALGO | 0.990313 | 6.369049 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2013-12-13T11:13:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 23,
"forks": 17,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "78052ed... |
f6de4a03-92cf-4273-bf19-4a989f0f9d0a | jigneshdarji91/algorithms | sorting/rselect_iterative.cpp | #include <iostream>
#include <stack>
#include "../utilities.h"
using namespace std;
int a[] = {55, 56, 77, 44, 22, 11, 10, 5, 47};
int partition(int p, int r)
{
int x = a[r];
int i = p - 1;
int temp = 0;
for(int j = p; j < r; j++)
{
if(a[j] <= x)
{
i++;
tem... | ALGO | 0.999957 | 5.024861 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2015-10-15T05:54: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": "9f3f5834a... |
df6b8df7-04fb-49d5-8d1e-f19c2f7b044e | SiddhantAttavar/Competitive-Programming | ICO/IOITC 2021/TST 3/EdgeSubsets.cpp | #include <bits/stdc++.h>
using namespace std; typedef long long ll; typedef vector<int> vi;
template<typename T> inline void input(T& inVar) {cin >> inVar;}
template<typename T, typename... S> inline void input(T& inVar, S&... args) {cin >> inVar; input(args ...);}
template<typename T> inline void print(T outVar) {cout... | ALGO | 0.999881 | 4.016833 | {
"github_metadata": {
"branch": "main",
"commit_count": 607,
"repo_created_at": "2021-09-16T08:14:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd7e1bf89... |
25be5f58-4586-47dc-8715-9c492c5037f3 | hmwang2002/Algorithm-Learning | leetcode/leetcode-2316.cpp | #include <bits/stdc++.h>
using namespace std;
auto _{
[]() noexcept
{
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr), std::cout.tie(nullptr);
return 0;
}()};
class UnionFind
{
private:
vector<int> parents;
vector<int> sizes;
public:
UnionFind(int n) : parents... | ALGO | 0.999938 | 5.727329 | {
"github_metadata": {
"branch": "master",
"commit_count": 179,
"repo_created_at": "2024-01-26T11:41:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cfdd4f6e... |
35eb7bf0-9e67-4ca3-ae9e-d4d24f3a8068 | dinhjeffrey/Hacker-Rank | data structures/linked-lists/merge-two-sorted-linked-lists/merge-two-sorted-linked-lists.cpp | /*
Merge two sorted lists A and B as one linked list
Node is defined as
struct Node
{
int data;
struct Node *next;
}
*/
#include <iomanip>
Node* MergeLists(Node *headA, Node* headB)
{
// check if either linked list is empty, then return the other one. when doing recursive, a new headA and headB will be pas... | ALGO | 0.999641 | 5.669211 | {
"github_metadata": {
"branch": "master",
"commit_count": 93,
"repo_created_at": "2016-06-07T03:10:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "90f3fcf08... |
a83d24b4-8911-4ba1-9b32-32a0fe3c7cdc | cshung/Competition | Competition/UVa127.cpp | #include "stdafx.h"
// http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=63
#include "UVa127.h"
#include <iostream>
#include <stack>
#include <vector>
#include <list>
#include <algorithm>
using namespace std;
struct card
{
char rank;
char suit;
};
bool read_cards(vector<car... | ALGO | 0.996201 | 3.827278 | {
"github_metadata": {
"branch": "main",
"commit_count": 1275,
"repo_created_at": "2014-09-06T20:52:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "045978daf... |
df9b1c89-f39f-4003-a073-693ea6487c06 | AreYouKhush/dsa-cpp | C++ DSA/Stack Questions/next_greater_element_I.cpp | #include<bits/stdc++.h>
using namespace std;
vector<int> nextGreaterElement(vector<int>& nums1, vector<int>& nums2) {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
unordered_map<int, int> mpp;
for(int i = 0; i < nums2.size(); i++){
mpp[nums2[i]] = -1;
for(int j = i + 1; j < nums2.size()... | ALGO | 0.999991 | 5.388487 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2023-05-19T14:15: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": "2bd441a8c6... |
4311cbcf-df14-4004-868b-b1cc97f23692 | apple/turicreate | src/external/boost/boost_1_68_0/boost/geometry/srs/projections/proj/sconics.hpp | // Boost.Geometry - gis-projections (based on PROJ4)
// Copyright (c) 2008-2015 <NAME>, Amsterdam, the Netherlands.
// This file was modified by Oracle on 2017, 2018.
// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
// Contributed and/or modified by <NAME>, on behalf of Oracle.
// Use, modific... | ALGO | 0.959495 | 6.982043 | {
"github_metadata": {
"branch": "main",
"commit_count": 1571,
"repo_created_at": "2017-12-01T00:42:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11198,
"forks": 1137,
"issues": 502,
"pull_requests": 21
},
"file_meta": {
"content_id": "... |
3b04ef76-06b1-424b-ad15-a6536b7449f6 | GabrieldotMasterson/Estudos_para_OBI | anotacoes/buscaBinaria.cpp | #include <cstdio>
#define MAXN 100100
int n, m, vetor[MAXN];
int buscab(int x){ // declaro a função buscab, que recebe um int como parâmetro
// declaro os inteiros ini, meio e fim
int ini=1, fim=n, meio; // ini já começa com 1 e fim com n
while(ini<=fim){ // enquanto houver algum elemento no intervalo
me... | ALGO | 0.999984 | 4.376513 | {
"github_metadata": {
"branch": "main",
"commit_count": 53,
"repo_created_at": "2024-07-15T03:36:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "213e5e3557b... |
662ef8ed-a091-4519-bbc4-d9534d1131f1 | Bassadin/OOP-SoSe21-AIN | Vorlesungskapitel/06_Operatoren/main.cpp | //
// Created by basti on 03.05.2021.
//
#include <cstdio>
#include <iostream>
#include "main.h"
namespace operatoren_06 {
class Point {
private:
int x, y;
public:
Point(int x, int y) :
x(x), y(y) {
}
Point &add(const Point &other) const {
Poin... | TOOL | 0.985847 | 5.832829 | {
"github_metadata": {
"branch": "main",
"commit_count": 90,
"repo_created_at": "2021-03-23T11:36: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": "05d82f99d4d... |
53aa9069-66f7-40a9-8502-db818397ef47 | ajisubarkah/programming-event | Gemastik/SaklarLhompatII/SaklarLhompatII-plankton.cpp | #include <iostream>
#include <stdio.h>
#include <bits/stdc++.h>
#include <math.h>
#define MAX 50
using namespace std;
int factorial(int n)
{
return (n == 1 || n == 0) ? 1 : factorial(n - 1) * n;
}
int saklarLhompatII(int r, int c, int n, int g[][MAX])
{
int total = 0, meja = r * c, countMhs = 0;
vector<in... | ALGO | 0.999245 | 4.495993 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2018-08-30T08:31:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "84803c09d... |
3f710011-4ba6-47ef-9f0d-b90efda0d837 | ishandutta2007/codeforces-h | hank55663/normal/1473/F.cpp | #include<bits/stdc++.h>
#define pb push_back
#define x first
#define y second
#define pdd pair<double,double>
#define pii pair<int,int>
#define pll pair<LL,LL>
#define mp make_pair
#define LL long long
#define ULL unsigned long long
#define sqr(x) ((x)*(x))
#define pi acosl(-1)
#define MEM(x) memset(x,0,sizeof(x))
#def... | ALGO | 0.999581 | 3.231372 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T02:01: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": "949767387249... |
fad4d8a0-481e-4e15-8c65-17a583f5d962 | venkatkumar1810/dsa-series | graphs/snakeLadder.cpp | #include<bits/stdc++.h>
using namespace std;
int mindice(vector<int> &moves, int n){
vector<int> vis(n,0);
queue<vector<int>> q;
vis[0] = 1;
q.push({0,0});
while(!q.empty()){
vector<int> curr = q.front();
q.pop();
int vert = curr[0];
if(vert == n-1) return curr... | ALGO | 0.99991 | 4.099303 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2021-11-12T09:22: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": "afbd9806744... |
39a5e55c-dab5-4612-9c33-6f516d7ae3b7 | Nathaniel-Rodriguez/graphgen | graphgen/weighted_directed/weighted_directed_graph_generator.cpp | /*
* Provides access in Python to LFR graphs generated from c++ code
*/
#include <Python.h>
#include <cstddef>
#include <deque>
#include <set>
#include <map>
#include <iostream>
#include <vector>
#include "numpy/arrayobject.h"
#include "benchm.hpp"
#include "weighted_directed_graph_generator.hpp"
/*
* Calls LFR c+... | TOOL | 0.961257 | 6.235487 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2016-08-22T16:35:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 3,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "b9b7cb8e7... |
16c9ae59-1e88-45b4-84ed-370fa8376fd6 | tsfdssm/leetcode | 29.两数相除.cpp | /*
* @lc app=leetcode.cn id=29 lang=cpp
*
* [29] 两数相除
*/
// @lc code=start
class Solution
{
public:
int divide(int dividend, int divisor)
{
if (0 == divisor)
return 0;
if (1 == divisor)
return dividend;
if (-1 == divisor)
{
if (INT_MIN != ... | ALGO | 0.999679 | 5.993966 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2021-05-04T05:37:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "227564582... |
63e0410b-9df2-4e1b-a449-9f342ba41ebb | Limineses/JS | additional 3/3/3.1.cpp | #include <iostream>
#include <cstdlib>
#include <cmath>
using namespace std;
void func(int a, int b, int c, int d)
{
if( a>b && a>c && a>d )
{
cout<<"Найбольшее число А";
return;
}
if( b>a && b>c && b>d)
{
cout<<"Найбольшее число B";
return;
}
if( c>a && c>b && c>d )
{
cout<<"Найбольшее число C";
r... | ALGO | 0.998949 | 3.299149 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2019-07-07T08:15: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": "2ab7556e1... |
ae6d0a50-1eac-42f6-9c30-eb8eef8a024a | abrarshahok/Programming-Practice | C++/18_Bridge_Prog.cpp | #include<iostream>
using namespace std;
struct Bridge{
double bridge_1,bridge_2,bridge_3;
};
int main(){
system("clear");
struct Bridge count_area[3];
double sum[3],average[3],largest[3];
for(int i=0;i<3;i++){
cout<<"\nEnter Month "<<i+1<<" traffic Across the Golden Gate Bridge : ";
... | TOOL | 0.950885 | 3.67177 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2023-01-02T19:42: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": "058ea946a88... |
d39a3e67-3640-45c8-88ef-60b8ce47011e | hunar4321/compressing-numbers | digit_length_main.cpp | #include "digit_length.h"
int main(int argc, const char* argv[]) {
std::vector<int32_t> numbers = { 1,2,3,54,3,5667,23,1,2,4,56, 39484, 492837, 2,3,45,7263, 476, 2,1,20 ,0, 0, 230, 94, 2930, 3948, 4,5, 6, 3,40,6 };
std::vector<int8_t> lengths = DigitLengths(numbers);
auto string_digits = NumToString(numb... | TEST | 0.984808 | 4.538458 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-06-11T22:23:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "86c6b4fc5947... |
c756c80c-c28e-4d6e-9ccf-b4a97907292f | BigAchiever/Hitting-DSA-Everyday | All About STL/Unordered_maps.cpp | #include<iostream>
#include<unordered_map>
// If order does not matter in a question then use this data structure
// Inbuilt implementation - // Har ek ki ka hash value calculate kijati hai (hashtables)
// time complexity - //O(1) - average TC
// valid keys datatypes - // unordered_map<pair <int, string> >m
using nam... | TOOL | 0.97843 | 4.105645 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2022-10-26T07:00:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "53967bf3d73... |
d0062292-351c-4b76-bd57-30e4b926d435 | AleksanderSiwek/Fluide_Engine | src/fluid_solvers/forward_euler_diffusion_solver.cpp | #include "forward_euler_diffusion_solver.hpp"
ForwardEulerDiffusionSolver::ForwardEulerDiffusionSolver()
{
}
ForwardEulerDiffusionSolver::~ForwardEulerDiffusionSolver()
{
}
void ForwardEulerDiffusionSolver::Solve(const FaceCenteredGrid3D& sourceGrid, const ScalarGrid3D& fluidSdf, const ScalarGrid3D& colliderSdf, d... | ALGO | 0.999631 | 6.127511 | {
"github_metadata": {
"branch": "main",
"commit_count": 46,
"repo_created_at": "2021-12-19T22:25: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": "41ae1ce7a3e... |
771cbff3-d786-44df-9e5e-affe8ed1b4ce | biyotte/Code_of_gunwookim | BOJ_solve/15107.cpp | #include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define all(v) v.begin(),v.end()
#pragma gcc optimize("O3")
#pragma gcc optimize("Ofast")
#pragma gcc optimize("unroll-loops")
using namespace std;
const int INF = 1e9;
const int TMX = 1 << 18;
const long long llINF = 2e18;
const long long ... | ALGO | 0.999989 | 4.249691 | {
"github_metadata": {
"branch": "main",
"commit_count": 45,
"repo_created_at": "2021-01-27T11:17:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f18cdfd29b... |
ea2a0b16-c717-4d68-aa43-e64fbc0cac81 | FebruaryAmber/CPP_project2 | randomNum/main.cpp | #include <cstdlib>
#include <iostream>
#include <iomanip>
#include <ctime>
#include <fstream>
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
int n = 0;
int i = 0;
int j = 0;
int array[40]={0};
srand((unsigned)time(NULL));
ofstream fileOne;
fileOne.open(... | TOOL | 0.94206 | 3.206075 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-02-09T03:36:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "122c3fc6d8... |
b08afb5e-b256-4415-807c-3a253f6e8e1b | Tawishi/Data-Structures-and-Algorithms | Trees/BST/insertion.cpp | #include<bits/stdc++.h>
using namespace std;
class BST {
public:
int data;
BST * left;
BST * right;
BST();
BST(int);
BST* insert(BST * ,int);
void inorder(BST*);
};
BST ::BST() : data(0), left(NULL), right(NULL) {}
BST ::BST(int val) {
data = val;
left = right = NULL;
... | ALGO | 0.999948 | 4.3765 | {
"github_metadata": {
"branch": "main",
"commit_count": 63,
"repo_created_at": "2020-11-23T18:40: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": "aa273131b9e... |
4e0f5744-e090-4e51-8b22-83308ead3a42 | Abdul-Wasi/Cpp | stringPalindromeChecker.cpp | #include <iostream>
using namespace std;
int main() {
string str;
cin >> str;
// string reverse_string = str;
int n = str.size();
// for(int i = 0; i < n/2; i++){
// swap(reverse_string[i], reverse_string[n-i-1]);
// }
// if(reverse_string == str){
// cout << "This is a pali... | ALGO | 0.999872 | 4.061745 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-01-13T08:03: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": "866c9a038610... |
d458f0d2-3862-445f-bd7a-e44e4f57b692 | i-am-arvinder-singh/CP | CF_Round Raif 2020-E-Carrots for Rabbits-Comparator on multiset intuitive.cpp | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;//which means policy based DS
#define endl "\n"
#define ll long long
#define int ... | ALGO | 0.999883 | 4.582393 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2020-05-25T21:25: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": "5045dede... |
9e91fbc9-84c3-45d5-89c7-37469aa2bc11 | jk-jung/problem-solving | codeforces/Codeforces Round 70x/R705_div2_D.cpp | #include <string.h>
#include <stdio.h>
#include <math.h>
#include <cassert>
#include <set>
#include <map>
#include <array>
#include <stack>
#include <queue>
#include <vector>
#include <numeric>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef vecto... | ALGO | 0.999943 | 4.460989 | {
"github_metadata": {
"branch": "main",
"commit_count": 1582,
"repo_created_at": "2021-06-24T13:40:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f2ab2c0b1... |
ad476404-b82a-4d0d-948e-863ae1ff7876 | Md-Monir-Hosen/new-any-position-insert-link-list | specified.cpp | #include <iostream>
#include <cstdlib>
#include <conio.h>
using namespace std;
void create(int);
void randominsert(int);
struct node
{
int data;
struct node *next;
};
struct node *head;
void create(int item)
{
struct node *newnode=new node;
if(newnode==NULL)
{
cout<<"\overflow";
}
el... | ALGO | 0.999242 | 3.641973 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-08-22T11:20: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": "68005d5b48ec... |
4ad843be-2a2a-4873-903b-02abaabb0cc0 | mongodb/mongo | src/third_party/boost/boost/mpl/aux_/preprocessed/no_ctps/times.hpp |
// Copyright <NAME> 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Preprocessed version of "boost/mpl/times.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
tem... | ALGO | 0.953172 | 6.570173 | {
"github_metadata": {
"branch": "master",
"commit_count": 90314,
"repo_created_at": "2009-01-15T16:15:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27329,
"forks": 5655,
"issues": 0,
"pull_requests": 82
},
"file_meta": {
"content_id": ... |
47f8c6e3-23bf-49f7-b8c0-a0e6039adf6a | jonghwan83/StudyAlgo1 | swExpert/NewsNotifications/solution.cpp | #define TABLESIZE 2048
#define MAXUSER 500
#define MAXARR 30000
class Node {
public:
int id;
int idx;
int time;
Node* next;
};
class LinkedList {
public:
int length;
Node* head;
void init() {
length = 0;
head = nullptr;
}
void push(int id, int idx, int time) {
... | ALGO | 0.999357 | 4.592778 | {
"github_metadata": {
"branch": "main",
"commit_count": 431,
"repo_created_at": "2022-01-08T03:36:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9a53991c0... |
f2085761-a9c9-48d3-9dd5-1d3f46ec784d | anikChandraDeb/Competitive-Programming | Graph/24. Round Trip(CSES).cpp | /* <NAME> -> CSE,DUET
Praying(Everything is depend on God):
<NAME>
<NAME>
<NAME>
<NAME>
*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define N 100005
vector<int> adj[N];
bool vis[N];
vector<int> temp;
bool dfs(int node,int par){
vis[node]=1;
temp.push_back(node);
... | ALGO | 0.999984 | 3.807941 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-01-13T13:28: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": "0e35313e658a... |
11f3092d-3255-43f0-b685-3c54c8b2f768 | jovid18/problem_solving | 백준/Platinum/27304. 동우의 마음씨는 착할까 나쁠까/동우의 마음씨는 착할까 나쁠까.cc | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
const int MAX = 500001;
int N;
vector<pair<int, ll>> G[MAX];
int cnt[MAX];
ll sum[MAX];
ll ans[MAX];
void dfs1(int n, int p = 0) {
int siz = 1;
ll wgt = 0;
for (auto e : G[n]) {
if (e.first == p) continue;
dfs1(... | ALGO | 0.999756 | 4.223668 | {
"github_metadata": {
"branch": "main",
"commit_count": 841,
"repo_created_at": "2024-01-14T07:53: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": "2d71e7f24d... |
64892f96-3674-4f66-a1fd-2c023025b9eb | shiquansu/ConcurrentPsi-SQ | examples/test2.cpp | #include <iostream>
#include "../src/Parallelizer.h"
#include "../src/CriticalStorage.h"
class KernelInner {
public:
typedef double RealType;
KernelInner(SizeType totalInner)
: totalInner_(totalInner),
outerIndex_(0)
{}
template<typename SomeCriticalStorageType>
void operator()(SizeType index,
... | ALGO | 0.921614 | 4.583061 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2014-10-09T19:23: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": "103f8ea86... |
fcab65f7-dd5d-4978-9eaf-3be24cd42a2a | DDmosUriel/09-CursoCPlusPlus | c065_Fecha y Hora IV.cpp | /*
Curso de C++
Autor: JAOR
Clase 65 - Fecha y Hora IV
Función para obtener la diferencia entre 2 fechas.
La diferencia serán devuelta en años, o en meses,
o en dias, o en horas o en minutos o en segundos.
*/
// Incluímos las librerías
#include <iostream>
#include <ctime>
// Definición de espacios de nombre
using ... | ALGO | 0.991428 | 4.674516 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-02-28T16:03: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": "97d051e942f... |
e8eb85be-90e1-420d-b3f3-afb8879e47a6 | strengthen/LeetCode | C++/1320.cpp | __________________________________________________________________________________________________
sample 0 ms submission
class Solution {
public:
int minimumDistance(string word) {
vector<int> dp(26);
int res = 0, save = 0, n = word.size();
for (int i = 0; i < n - 1; ++i) {
int ... | ALGO | 0.999977 | 5.094822 | {
"github_metadata": {
"branch": "master",
"commit_count": 518,
"repo_created_at": "2018-11-03T06:47:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 883,
"forks": 297,
"issues": 19,
"pull_requests": 0
},
"file_meta": {
"content_id": "564... |
02e3b9e3-25c8-430d-a584-59b4fd380c89 | josetascon/mop | core/DepthProjection.hpp | /**
* @file DepthProjection.hpp
* @brief This file has all functions related with projection of depth with Kinect data.
*
* @author <NAME>
* @date May/08/2013
*/
// AXIS Y without -1, postive coordinates downward
#ifndef __DEPTHPROJECTION_HPP__
#define __DEPTHPROJECTION_HPP__
// Eigen Libraries
#include <eigen... | ALGO | 0.914499 | 5.532898 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2014-05-13T17:38:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed56e4a72... |
11392acc-3e9d-4a2c-8817-f9fdab82f8ab | alexandraback/datacollection | solutions_5669245564223488_0/C++/sachith500/B-2.cpp | #include <vector>
#include <list>
#include <map>
#include <fstream>
#include <iostream>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include... | ALGO | 0.999948 | 3.424584 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "487660fa4... |
10519c97-bee1-46c6-a33e-0aefda813d41 | djk613/BitConverter_Calculator | BitConverter&Calculator/Calculator_Window/DigitOperator.cpp | #include "DigitOperator.h"
string DigitOperator::Add(string str_num1, string str_num2)
{
bool b_num1Signed = IsSigned(str_num1);
bool b_num2Signed = IsSigned(str_num2);
/*erase sign and will be attached after this algorithm if it has sign*/
SetSign(str_num1, false);
SetSign(str_num2, false);
... | ALGO | 0.98492 | 4.638864 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-05-22T08:13: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": "95ae986b69... |
1f8a346b-4081-4df6-ae22-0c2c26f11dd4 | swiftlang/swift | lib/SILOptimizer/SemanticARC/Context.cpp | //===--- Context.cpp ------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | TOOL | 0.953155 | 7.115966 | {
"github_metadata": {
"branch": "main",
"commit_count": 185715,
"repo_created_at": "2015-10-23T21:15:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 68847,
"forks": 10498,
"issues": 5000,
"pull_requests": 1122
},
"file_meta": {
"content_... |
929751f5-6605-4c42-b7b8-ef9509254b5e | BrandonZu/LeetCode | C++/3rd_072021-102022/50_Pow(x,n).cpp | //
// Created by BrandonZu on 2021/8/10.
//
#include "common.h"
// Runtime 0ms(100%) | Memory Usage 6MB(>40%)
class Solution {
public:
double myPow(double x, int n) {
double res = 1;
// Notice: abs(INT_MIN) exceeds the scope of int
long p = abs(n);
while(p) {
if(p & 1) ... | ALGO | 0.999937 | 6.232598 | {
"github_metadata": {
"branch": "master",
"commit_count": 147,
"repo_created_at": "2021-07-09T15:06: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": "227f71b2... |
0a0e64b3-d2b0-432d-b750-24b89bb16d64 | Tushar-Sukhwal/codeforces | B_Outstanding_Impressionist.cpp | #include <bits/stdc++.h>
#define int long long
using namespace std;
template <typename Node, typename Update>
struct SegTree {
vector<Node> tree;
vector<int> arr;
int n;
int s;
SegTree(int a_len, vector<int> &a) {
arr = a;
n = a_len;
s = 1;
while (s < 2 * n) {
s = s << 1;
}
tree... | ALGO | 0.999997 | 4.171751 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-01-31T11:16: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": "cf2cb2522bb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.