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 |
|---|---|---|---|---|---|---|---|
b66f833f-6ae1-47c4-9951-f7dacc6e97c9 | ebertolazzi/Utils | src/Utils_HJPatternSearch.hh | /*--------------------------------------------------------------------------*\
| |
| Copyright (C) 2022 |
| |
| ... | ALGO | 0.999164 | 5.701525 | {
"github_metadata": {
"branch": "master",
"commit_count": 218,
"repo_created_at": "2020-10-22T09:22:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e0ed7cf... |
1f8cd4a8-a647-4b2e-9116-32440a22afc1 | acgessler/blender-assimp | extern/libmv/third_party/ceres/internal/ceres/low_rank_inverse_hessian.cc | // Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2012 Google Inc. All rights reserved.
// http://code.google.com/p/ceres-solver/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistr... | ALGO | 0.999706 | 7.121535 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2013-04-14T15:43:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b4cca8e79... |
4c98299f-4ca8-4630-a0ee-66d01a5a0958 | NveCorporation/Sensor-Lookup-Tables | Robo-cylinder-look-up.ino | /******************************************************************************
Auto-reversing Robocylinder using a look-up table for speed vs distance
to correct for the inherent nonlinearity of a magnetic field vs. distance.
SparkFun ROB-12779 steppert controller; "Step" is IO2; "Direction" is IO3.
Cylinder 10 mm/r... | ALGO | 0.980876 | 3.407288 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-05-19T16:24:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fcce7accdda... |
6b2f3bfe-3b83-4cc2-8a9b-b5295f271c05 | Ankit8607/algozenith-training | two pointers/Number of Subarray with sum at most K.cpp | // https://www.learning.algozenith.com/problems/Number-of-Subarray-with-sum-at-most-K-57
/*
Description
Given an array of N integers, find the number of subarrays with a sum less than equal to K.
Input Format
The first line contains T, the number of test cases (1<=T<=10).
The first line of each test case contain... | ALGO | 0.999797 | 5.537872 | {
"github_metadata": {
"branch": "main",
"commit_count": 135,
"repo_created_at": "2022-10-04T08:36:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "03d5837b5d... |
71154587-d25a-407e-a493-def13c2f7d0f | greenfox-zerda-sparta/nagyzsuska | week9/Amoba/MyGame.cpp | #include "MyGame.h"
MyGame::MyGame() {
board_vector = std::vector<std::vector<int>>(19, std::vector<int>(19, 0));
}
void MyGame::init(GameContext& context) {
context.load_file("board.bmp");
context.load_file("x.bmp");
context.load_file("circle.bmp");
}
void MyGame::set_board(int i, int j, int key) {
board_... | TOOL | 0.970369 | 3.91326 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2016-10-19T11:37:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5b788e9939... |
dcbb0cc8-f5a1-4b13-bdde-b01635f2449d | jscheiny/Streams | source/providers/Zip.h | #ifndef SCHEINERMAN_STREAM_PROVIDERS_ZIP_H
#define SCHEINERMAN_STREAM_PROVIDERS_ZIP_H
#include "StreamProvider.h"
#include <tuple>
#include <type_traits>
namespace stream {
namespace provider {
namespace detail {
template<typename L, typename R>
struct ZipperImpl {
using Type = std::tuple<L, R>;
static Ty... | TOOL | 0.946235 | 7.548984 | {
"github_metadata": {
"branch": "master",
"commit_count": 211,
"repo_created_at": "2014-06-05T16:36:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 689,
"forks": 55,
"issues": 6,
"pull_requests": 4
},
"file_meta": {
"content_id": "e675f... |
cba2ad45-331a-4230-8663-50257a547fe8 | stephenbakalian/Game-Dev-Class | Physics for Students - VS12 LEAN/Game/SDKs/GeomUtils/src/GuRTree.h | // This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation... | ALGO | 0.936158 | 7.11412 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2015-03-16T17:16: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": "3ddf9de77... |
855ece47-7c13-4039-aab0-ae437a0e04b7 | bsb808/geonav_transform | matlab/geonav/xy2ll.cpp | /*==========================================================
* xy2ll.cpp for conversion to MEX file for MATLAB
*========================================================*/
#include "mex.h"
#include "../../include/geonav_transform/navsat_conversions.h"
/* Computational routine */
void xy2ll(double x, double y, double ... | TOOL | 0.992975 | 6.154763 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2016-12-23T05:21:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 72,
"forks": 31,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e00e76... |
09a8b04c-9308-40f4-b22a-024ed0737315 | yindaz/pbrs | mitsuba-af602c6fd98a/src/libbidir/mut_manifold.cpp | /*
This file is part of Mitsuba, a physically based rendering system.
Copyright (c) 2007-2014 by <NAME> and others.
Mitsuba is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation.
Mits... | ALGO | 0.994832 | 7.161337 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2017-04-09T03:02:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 143,
"forks": 26,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "29ae23... |
a3a3eab9-3768-4573-aa60-ba5db3623a70 | AMReX-Codes/amrex | Src/EB/AMReX_EB_FluxRedistribute.cpp | #include <AMReX_BCRec.H>
#include <AMReX_EBFluxRegister.H>
#include <AMReX_YAFluxRegister.H>
#include <AMReX_EBFArrayBox.H>
#include <AMReX_MultiCutFab.H>
#include <AMReX_YAFluxRegister_K.H>
#include <AMReX_EBMultiFabUtil_3D_C.H>
#include <AMReX_EB_Redistribution.H>
namespace amrex {
void
amrex_flux_redistribute (
... | ALGO | 0.998941 | 5.450385 | {
"github_metadata": {
"branch": "development",
"commit_count": 27456,
"repo_created_at": "2017-04-28T19:37:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 637,
"forks": 407,
"issues": 21,
"pull_requests": 19
},
"file_meta": {
"content_id... |
ce46d646-9e79-4a20-8d0c-6a4c4c490aea | Hank-learner/Data-Structures-with-Algorithms | samples/avltree.cpp | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <sstream>
using namespace std;
#define pow2(n) (1 << (n))
#define basespace 10
struct avl {
int d;
struct avl *l;
struct avl *r;
} * r;
class avl_tree {
public:
int height(avl *);
int difference(avl *);
avl *rr_rotat(avl ... | ALGO | 0.999572 | 4.525053 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2019-11-14T05:41:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "8de417215... |
df882f3e-58e5-4fce-b68c-51912b18b463 | jupv4s/curso_metodos_numericos | ejercicios_codigo/evaluaciones/2025_prueba_2/pregunta_2/main.cpp | #include <iostream>
#include <fstream>
#include "Polynomial.h"
#include "Complex.h"
using namespace std;
int main()
{
// tamaño de la imagen
//int width = 1600;
//int height = 1600;
// la imagen generada pesa 21.7 MiB, por lo que el tiempo de ejecución es relativamente mas alto
int width = 800;
... | ALGO | 0.999243 | 4.458213 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2025-07-14T08:14: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": "7f2101a1464... |
1910ee28-2d91-4b4f-a9bf-d8babd8bdef0 | zhhehao/zhhehao | uvaoj/uva120.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
const int maxn = 30;
string buf;
int panc[30], spanc[30], pos, cnt;
bool cmp(const int a, const int b) {
return a > b;
}
inline void flip(int p) {
int e = cnt - 1;
while (p < e)
... | ALGO | 0.999983 | 3.4296 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2016-02-26T12:54: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": "b3dcc643... |
60558365-23e8-4f31-a3ff-1fcfe050521d | Hoang2006-creater/Session10.C | Session10-Lesson6.cpp | #include <stdio.h>
int main() {
// Khoi tao mang va cac bien
int array[] = {16, 11, 6, 34, 33, 22, 11, 6};
int n = sizeof(array) / sizeof(array[0]);
int key, i, count = 0;
// Mang luu cac vi tri tim duoc
int positions[n];
// In mang ban dau
printf("Mang ban dau: \n");
for (i = 0; ... | ALGO | 0.99985 | 4.994962 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-12-02T16:02: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": "f5f9b8391763... |
00c91cd1-0bc8-4177-88e1-ba44cce1757f | iumar28/cp_codes | Dynamic Programming/CountOfSubsetWithMinimumDifference.cpp | #include <bits/stdc++.h>
using namespace std;
int minimumDifference(vector<int> &nums)
{
int sum = 0;
int n = nums.size();
if (n == 0)
{
return 0;
}
for (int i = 0; i < n; i++)
{
sum += nums[i];
}
vector<vector<int>> dp(n + 1, vector<int>(sum + 1));
for (int i = 1... | ALGO | 0.999839 | 5.008243 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-04-17T08:10: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": "f015eb7943ee... |
cf069789-4fb3-4a62-939a-11acc21d6b08 | arthurlebourg/ani3d | scenes_epita_ani3d/04_sphere_collision/src/simulation/simulation.hpp | #pragma once
#include "cgp/cgp.hpp"
#include <memory>
#define MAX_DEPTH 8
struct particle_structure
{
cgp::vec3 p; // Position
cgp::vec3 v; // Speed
cgp::vec3 c; // Color
float r; // Radius
float m; // mass
};
struct plane_structure
{
cgp::vec3 p;
cgp::vec3 n;
};
class Node
{
p... | ALGO | 0.998828 | 4.017807 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-09-22T12:18: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": "ad87095438e... |
78cc6e30-d970-4780-92b3-4f21800e1a27 | kholboevfozilbek/-Algorithms-Complexity | Sort/topics_recovered/QuickSort/main.cpp |
#include <vector>
#include <iostream>
using namespace std;
void swapp(vector<int> arr, int i, int pIndex);
int Partion(vector<int> arr, int const left, int const right);
void QuickSort(vector<int> arr, int const begin, int const end);
void display(vector<int> arr);
int main()
{
vector<int> arr{ 2, 11, 48, 13, 9... | ALGO | 0.999949 | 5.822401 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-01-26T10:23: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": "89c2e199a398... |
81076a25-cdc8-47d8-b601-a41f11760c3f | adityaa-rana/DSA | LinkedList/addone.cpp | #include<bits/stdc++.h>
using namespace std;
typedef struct Node {
int data;
Node* next;
Node(int val) : data(val), next(nullptr) {}
}Node;
class Solution {
public:
Node* addOne(Node* head) {
Node* mover = head;
int num = 0;
// Step 1: Convert linked list to in... | ALGO | 0.999969 | 5.863836 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2025-05-27T06:39: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": "60ec7d82c31... |
8927aaa3-b7ae-485d-8621-3875f9c29369 | Aaronhdez/Grado-Ingenieria-Informatica | Segundo Ingenieria Informatica (Plan 40)/Metodos Numericos para la Computacion/Ejercicios Alumno/Prueba 2/RegulaFalsiPolinomios_hacer_alumno (X)/RegulaFalsiPolinomios/main.cpp | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "mn_raices_polinomios.h"
#include "../tnt_array/tnt.h"
#include "mn_aritmeticas.h"
int main()
{
cout << "EJEMPLO 1 (METODO FUNCIONA)\n";
Array1D< real > a(4);
a[0]=-6.; a[1]=1.; a[2]=-7.; a[3]=1.;
cout << "P(x)= " << a[0] << " + " << a[1... | ALGO | 0.999895 | 4.537644 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2021-11-28T21:56:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "fbcbb307... |
dcd1bc77-76ce-4c4f-9d1b-272bee74e339 | theCodeCrusaderX/learningDsa | Shradha_mam_DSA/array/2d-array/digonalSum.cpp | ps : find the digonal sum of given given square matrix(n) that mean sum of first digonal and second digonal and if n is odd than exclude the middle ele i.e repeated ele.
burte approach ::
#include <iostream>
using namespace std;
int maxSum(int mat[][3],int row, int col)
{
int fdig = 0;
int sdig = 0;
int ... | ALGO | 0.999983 | 4.991831 | {
"github_metadata": {
"branch": "main",
"commit_count": 51,
"repo_created_at": "2024-01-02T13:02: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": "08d6e60cbe7... |
9d4e9eb0-3a24-4777-be6a-57671f251105 | aaron-wang/competitive-programming-solutions | CCC/ccc09s4.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long; constexpr char nl= '\n';
const int MM = 5003;
using pi = pair<int,int>;
vector<pi> adj[MM];
int pen[MM], d[MM];
bool vis[MM];
priority_queue<pi> q;
int main() {
ios::sync_with_stdio(0); cin.tie(0);
// freopen("in.txt","r",stdin);
// freop... | ALGO | 0.999906 | 4.311994 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2020-12-26T23:08: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": "26dab0686... |
ee394ac5-5c0c-4138-b83c-7cc8913ca0c2 | GersonCavalheiro/OpenMPSnapshot | May2023/RepCPP/124574336/splaytree_algorithms.hpp |
#ifndef BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP
#define BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/intrusive_fwd.hpp>
#include <boost/intrusive/detail/assert.hpp>
#include <boost/intrusive/detail/algo_type.hpp>
#include <boost/intrusive/detai... | ALGO | 0.993638 | 6.358892 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2024-08-19T17:35:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "70702165ec... |
93a9aa94-0a0a-469f-af48-f08c491ec9c2 | bethesirius/ChosunTruck | linux/tensorbox/utils/stitch_rects.hpp | #ifndef STITCH_RECTS_HPP
#define STITCH_RECTS_HPP
#include <vector>
#include <math.h>
#include <stdlib.h>
#include "./hungarian/hungarian.hpp"
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
using std::vector;
class Rect {
public:
int cx_;
int cy_;
int width_;
int height_;
floa... | ALGO | 0.978534 | 6.758773 | {
"github_metadata": {
"branch": "master",
"commit_count": 145,
"repo_created_at": "2016-07-04T12:10:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 734,
"forks": 104,
"issues": 9,
"pull_requests": 0
},
"file_meta": {
"content_id": "f66b... |
8070685e-d8e1-4023-ba54-ad32fb19a3ce | JACazares/Competitive | Codeforces/2084/C/main.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vpi = vector<pii>;
using vpl = vector<pll>;
#define all(x) x.begin(), x.end()
#define... | ALGO | 0.999962 | 3.851801 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2022-06-30T18:05:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b3fe757b... |
c1903768-de3e-4e06-a859-e4b5fbf2cece | frandibar/acm-valladolid | accepted/p10205_stackem_up/entrega_03_AC.cpp | /* @JUDGE_ID: 40922FK 10205 C++ */
/* @BEGIN_OF_SOURCE_CODE */
/**************************************************************************
Solution to Problem 10205 - Stack'em up
by: <NAME>
date: Dec-26-2005
**************************************************************************/
//#define DEBUG
//#defin... | ALGO | 0.996427 | 4.83694 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2012-05-17T03:00:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c651351915... |
10cf3af9-a4ed-4729-85a6-89aea76f3ff9 | r0cket007/450_DSA_Question | Binary Tree/Diameter of Binary Tree.cpp | /*
Diameter of Binary Tree
Link: https://practice.geeksforgeeks.org/problems/diameter-of-binary-tree/1#
*/
#include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
struct Node *left;
struct Node *right;
};
Node *newNode(int val)
{
Node *temp = new Node;
temp->data = val;
tem... | ALGO | 0.999655 | 4.731886 | {
"github_metadata": {
"branch": "master",
"commit_count": 143,
"repo_created_at": "2021-04-22T06:31: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": "a3afa5c7... |
471dfac9-fa28-400f-9aad-309115a9febe | miranda-ng/deprecated | NotWorkingStuff/NotAdopted/SmartAutoAway/aa_utils.cpp | #include "globals.h"
//Proto_Status2Flag
int OldIndexToStatus(int oldIndex){
switch (oldIndex){
case 0 : return ID_STATUS_AWAY;
case 1 : return ID_STATUS_DND;
case 2 : return ID_STATUS_NA;
case 3 : return ID_STATUS_OCCUPIED;
case 4 : return ID_STATUS_INVISIBLE;
case 5 : return ID_STATUS_ONTHEPHONE;
ca... | TOOL | 0.908799 | 3.790557 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2016-10-26T09:53:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dcc0a50e63... |
fdb8bc87-e950-43b5-95d2-f15c361deb9c | patrick9326/ds | dbhw3/src/hw3.cpp | #include <iostream>
#include <cmath>
using namespace std;
// 節點結構
struct Node {
double coef; // 係數
int exp; // 指數
Node* link;
Node(double c = 0, int e = 0, Node* l = nullptr) : coef(c), exp(e), link(l) {}
};
class Polynomial {
private:
Node* head;
static Node* avail;
... | ALGO | 0.999496 | 4.935077 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-10-30T10:38:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e2f15b85d4f... |
127913b2-ffff-45da-bd3e-f5a985828431 | Ultimatereo/ITMO-UNIVERSITY | sem2/algorithms/SplayTree.cpp | #include <cstdio>
#include <iostream>
#include <fstream>
using namespace std;
class node {
public:
int key;
int size;
node *left, *right;
};
void swap(int a, int b) {
int temp = a;
a = b;
b = temp;
}
node *newNode(int key) {
node *Node = new node();
Node->size = 1;
Node->key = key;
Node->left = Node... | ALGO | 0.999985 | 4.350171 | {
"github_metadata": {
"branch": "main",
"commit_count": 137,
"repo_created_at": "2021-04-01T14:07:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5c1f76e71... |
32e74af4-3b49-4a3b-b20e-d633bef8aedb | Olive-Noire/Sorting-algorithms | Sort.hpp | #ifndef DEF_SORT_HPP
#define DEF_SORT_HPP
#include <unordered_map>
#include <cstdlib>
#include "./NodeStructure.hpp"
template <typename Type> std::vector<Type> Fusion(std::vector<Type> l, std::vector<Type> r) {
std::vector<Type> fusion;
while (!r.empty() && !l.empty()) {
if (r[0] <= l[0]) {
... | ALGO | 0.999841 | 5.687951 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2021-08-19T14:32: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": "c042f1b4b... |
d8f58c63-6099-4df6-a24a-9d99bef7517d | aBBassam/CP-Solutions | CodeForces/GNU C++20 (64)/1708A | Difference Operations/164659728.cpp | // Problem: A. Difference Operations
// Contest: Codeforces - Codeforces Round #808 (Div. 2)
// URL: https://codeforces.com/contest/1708/problem/A
// Memory Limit: 256 MB
// Time Limit: 1000 ms
//
// Powered by CP Editor (https://cpeditor.org)
#include <bits/stdc++.h>
#define ll long long
#define all(x) x.begin(),x.... | ALGO | 0.99991 | 4.391872 | {
"github_metadata": {
"branch": "main",
"commit_count": 543,
"repo_created_at": "2022-08-19T12:03:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c30972cd01... |
9981d946-d4f2-4c02-8f20-0bcad6fc4860 | matko-k/aoc_2022 | src/daily_task_11.cpp | #include <DailyTask/daily_task_11.h>
struct Monkey
{
std::vector<long> items_;
std::function<long(long)> inspect_;
std::function<long(double)> relax_ = [](long item) { return item/3;};
long test_;
long true_dest_;
long false_dest_;
long inspections_;
Monkey(const std::vector<long>& items, std::functio... | ALGO | 0.993807 | 5.520437 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2022-12-01T18:38:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a6dc96cf1... |
7e7dc3b4-1a05-4663-82e0-200e15e0c6ce | Paghe/CppModule | cpp09/ex02/PmergeME.cpp | #include "PmergeME.hpp"
MergeMe::MergeMe(std::string input) : _input(input), _straggler(false) {}
MergeMe::MergeMe(const MergeMe &cpy) : _mainArray(cpy._mainArray), _input(cpy._input), _straggler(cpy._straggler){}
MergeMe& MergeMe::operator=(const MergeMe &cpy)
{
if (this != &cpy)
{
this->_input = cpy._input;
... | ALGO | 0.999689 | 3.918794 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2023-07-10T10:55:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d02a0f61f... |
3a7ea98c-1fca-4278-aa1b-466251e59fb4 | uriiromeero/C-Codes | Proyecto-1/compras_supermercado.cpp | #define _CRT_SECURE_NO_WARNINGS
// Incluimos las librerías (estandar para C#)
#include <stdio.h>
#include <stdlib.h>
int main(void) {
const float PUNTOSxEURO = 0.25;
// Declaración de variables
int producto, producto_max, n, cantidad;
float precio, precio_max, precio_min, total, media;
// Inicializa... | ALGO | 0.973968 | 3.738257 | {
"github_metadata": {
"branch": "main",
"commit_count": 56,
"repo_created_at": "2023-12-11T08:07: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": "415627f43e7... |
8d9a535b-3579-488d-b7cd-9bb1529f02c5 | kipgorey/hw3 | llrec.h | #ifndef LLREC_H
#define LLREC_H
#include <cstdlib>
#include <iostream>
/**
* Node struct for both problems
*/
struct Node
{
int val;
Node *next;
Node(int v, Node* n) : val(v), next(n) {}
};
/**
* Given a linked list pointed to by head, creates two lists
* where all values less than or equal to the ... | ALGO | 0.999849 | 5.990028 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-10-05T23:16: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": "9f9d3b227072... |
fc33bfd1-ef1f-42ad-a979-d0d8fd8ece70 | shobhit32/LeetCode-Solution | solutions/1. Two Sum.cpp | class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
vector<int> ans;
int len=nums.size();
if(len <2)
return {};
unordered_map <int,int> mp;
for(int i=0;i<nums.size();i++)
{
auto it=mp.find(target-nums[i]);
i... | ALGO | 0.999963 | 5.908773 | {
"github_metadata": {
"branch": "master",
"commit_count": 110,
"repo_created_at": "2020-08-04T15:12:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae4f0434... |
dc9494d6-aa96-40bb-b601-1a0f22c2a6fd | 42somoim/42somoim5 | gim/week_2/스티커.cpp | #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main(void)
{
int T;
scanf("%d", &T);
while (T--)
{
int N, max_n;
int arr[2][100001] = {};
int dp[2][100001];
scanf("%d", &N);
for (int i = 0; i <= 1; i++){
for (int j =... | ALGO | 0.999906 | 3.295854 | {
"github_metadata": {
"branch": "main",
"commit_count": 407,
"repo_created_at": "2020-10-02T06:28:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b30f7869e2c... |
3f47f99b-0bfa-4589-922c-4445f278184c | AmanTechWiz/Leetcode-Submissions | 0890-lemonade-change/0890-lemonade-change.cpp | class Solution {
public:
bool lemonadeChange(vector<int>& bills) {
int five = 0;
// Counter for $10
int ten = 0;
// Iterate through each customer's bill
for (int i = 0; i < bills.size(); i++) {
/* If the customer's
bi... | ALGO | 0.999534 | 5.66089 | {
"github_metadata": {
"branch": "main",
"commit_count": 786,
"repo_created_at": "2024-10-24T05:18: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": "dc60471f06... |
c6f09485-3608-48f2-a926-16f1d981a51b | rdkit/rdkit | Code/Numerics/EigenSolvers/PowerEigenSolver.cpp | // $Id$
//
// Copyright (C) 2004-2008 <NAME> and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include "PowerEig... | ALGO | 0.999733 | 6.447213 | {
"github_metadata": {
"branch": "master",
"commit_count": 8182,
"repo_created_at": "2013-05-12T06:19:15.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3003,
"forks": 931,
"issues": 110,
"pull_requests": 25
},
"file_meta": {
"content_id": "... |
71d6a53f-ee0b-4b3b-836c-48b911b89d51 | hamko/sample | topcoder/past/TheLongPalindrome.cpp | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include... | ALGO | 0.999425 | 3.680555 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2013-04-24T05:47:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1df4c412... |
bf7b828d-375f-4e65-8eef-8537a42b7438 | LS-IMP/TKDE_Resource | LS-IMP/call.cpp | #include <stdio.h>
#include "sol.h"
#include "propagation.h"
#include "parallel.h"
int main(int argc, char *argv[]) // pri
{
ParallelSolver solver(argv[1], argv[2], std::atof(argv[3]), 32);
solver.Solve();
// solver.get_best_obj();
return 0;
int flag = 2;
if (flag == 0)
{
solver::qp... | ALGO | 0.995692 | 3.541015 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-06-29T04:48: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": "1ad05888c06... |
37ddc846-925b-4793-bd9b-75a85619da01 | limon2009/ACM-UVA-Online-Judge-solution | 825.cpp | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MAXN 200
char Road[MAXN][MAXN];
char f[MAXN][MAXN];
char str[MAXN];
struct ss {
int r, c;
int move;
}q[MAXN*MAXN];
int qh, qt, R, C, Count;
int mx[] = {0,0,1,-1};
int my[] = {1,-1,0,0};
void Push(int r, int c, int move) {
q[qh].r = r;
q[qh].c = ... | ALGO | 0.999929 | 3.82693 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-11-13T05:46:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1032800673... |
dcb69e33-be80-4ae9-a9c9-a2463e71d847 | ZhaiKai0922/Rep_pure_pursuit | double_pure_pursuit/src/pure_pursuit.cpp | #include </home/zk/zk/pure_pursuit/cmd_pursuit_ws/src/double_pure_pursuit/include/pure_pursuit.hpp>
//#include "pure_pursuit.hpp"
PurePursuit::PurePursuit(std::vector<std::vector<double>> path_points) : ld_(1.0), v_max_(0.2), v_(v_max_), w_max_(1.0), pos_tol_(0.1), idx_(0),
goal_reached_(t... | ALGO | 0.998391 | 4.354916 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2022-08-14T07:06: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": "ce9315a7401d... |
dd09e0d7-a68d-4659-9dcc-58d497fc4f98 | cadaker/aoc2020 | aoc2020/day07.cpp | #include "input_helpers.hpp"
#include "range_helpers.hpp"
#include <regex>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <ranges>
using bag_contained_by_graph = std::unordered_multimap<std::string, std::string>;
using bag_contains_graph = std::unordered_multimap<std::string, std::pair<in... | ALGO | 0.985038 | 5.419789 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2020-11-30T18:20: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": "6be9b1d9c5f... |
076fe6bf-a9d2-476c-9248-51e8c1710aa0 | flydzen/ITMO_algo | course2/laba3/E/main.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <unordered_map>
using namespace std;
int n, m, nm;
int get_left(int y, int x) {
return y <= x ? x - y : m + y - x - 1;
}
int get_right(int y, int x) {
return x + y;
}
bool dfs_kuhn(int v, vector<bool> &used, vector<vector<int>> &ss, vector<int... | ALGO | 0.999926 | 3.432163 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-11-13T22:00: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": "5dbc2e83ad... |
c47ace99-8779-4ffb-bd1e-3c2958e2baea | tunabrain/tungsten | src/core/integrators/photon_map/PhotonMapIntegrator.cpp | #include "PhotonMapIntegrator.hpp"
#include "PhotonTracer.hpp"
#include "sampling/UniformPathSampler.hpp"
#include "sampling/SobolPathSampler.hpp"
#include "cameras/PinholeCamera.hpp"
#include "thread/ThreadUtils.hpp"
#include "thread/ThreadPool.hpp"
#include "bvh/BinaryBvh.hpp"
namespace Tungsten {
CONSTEXPR uin... | TOOL | 0.924177 | 6.134214 | {
"github_metadata": {
"branch": "master",
"commit_count": 985,
"repo_created_at": "2014-09-15T18:38:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1798,
"forks": 172,
"issues": 14,
"pull_requests": 4
},
"file_meta": {
"content_id": "4f... |
59337501-d121-49f9-b01b-aebe28671e78 | kliment-olechnovic/voronota | src/apollota/tangent_sphere_of_four_spheres.h | #ifndef APOLLOTA_TANGENT_SPHERE_OF_FOUR_SPHERES_H_
#define APOLLOTA_TANGENT_SPHERE_OF_FOUR_SPHERES_H_
#include <vector>
#include "basic_operations_on_spheres.h"
#include "rotation.h"
#include "safer_quadratic_equation_root.h"
#include "safer_summation.h"
namespace voronota
{
namespace apollota
{
class TangentSpher... | ALGO | 0.999678 | 6.540639 | {
"github_metadata": {
"branch": "master",
"commit_count": 4420,
"repo_created_at": "2019-08-22T12:20:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 35,
"forks": 6,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1ad9b... |
20535dde-699f-4965-a3e9-8cb6b45833b4 | wangtiaoke/github-upload | 2.cpp | #include <iostream>
#include <vector>
#include <map>
using namespace std;
template <typename T>
class mySet
{
private:
vector<T> m_ele;
public:
mySet() = default;
mySet(const vector<T> &elem) : m_ele(elem) { }
mySet(const mySet<T> &r) : m_ele(r.m_ele) { }
~mySet() { vector<T>().swap(m_ele); }
... | ALGO | 0.997331 | 4.716865 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-06-28T07:44: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": "174c8535d8... |
f6195913-8c1d-4b25-a54d-f68a4cea9fd3 | elias-rs/Grafo-Bipartido | Bipartido.cpp | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <queue>
#define MAX 100
void verifica_bipartido(int matriz[MAX][MAX], int vertices, int cor[MAX]){
int grupo1[MAX], grupo2[MAX], contador1 = 0, contador2 = 0, bipartido = 1;
std :: queue <int> fila;
for(int i = 0; i < vertices; i++){
if(cor[i... | ALGO | 0.99931 | 4.785161 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-06-04T01:04:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "23701d57a14a... |
b3fcffc8-02e4-4af2-b2b6-67bbb32dfa99 | ScientificWord/mozilla | toolkit/crashreporter/google-breakpad/src/common/solaris/dump_symbols.cc | // Copyright (c) 2007, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditi... | TOOL | 0.933742 | 5.969674 | {
"github_metadata": {
"branch": "master",
"commit_count": 18465,
"repo_created_at": "2022-01-30T18:14:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27,
"forks": 4,
"issues": 4,
"pull_requests": 4
},
"file_meta": {
"content_id": "cebe5b... |
9579810d-f3fd-4d83-9df1-8162c2ad94e1 | AvS2016/ParallelTSP | src/genetic/FitnessUpdater.cpp | #include <cassert>
#include <cmath>
#include <algorithm>
#include "FitnessUpdater.hpp"
#include "data/PathVerifier.hpp"
namespace tsp
{
static double nodeDistance(const Node &n1, const Node &n2)
{
double dx = n1.x() - n2.x();
double dy = n1.y() - n2.y();
return std::sqrt(dx * dx + dy ... | ALGO | 0.999874 | 6.054979 | {
"github_metadata": {
"branch": "master",
"commit_count": 234,
"repo_created_at": "2016-04-12T12:48:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "b592eaf8f... |
9b72b4db-22fc-4b88-8ba8-49f0fd3e2fc3 | koth/elements-of-programming-interviews | Queue_with_max_using_deque.h | // Copyright (c) 2013 Elements of Programming Interviews. All rights reserved.
#ifndef SOLUTIONS_QUEUE_WITH_MAX_USING_DEQUE_H_
#define SOLUTIONS_QUEUE_WITH_MAX_USING_DEQUE_H_
#include <algorithm>
#include <deque>
#include <queue>
#include <stdexcept>
using std::deque;
using std::length_error;
using std::queue;
// @... | ALGO | 0.961455 | 6.662384 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2016-03-30T01:43:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 14,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f0aa92... |
d3685dba-ec85-49c7-aa8c-4e99d7b63a0a | Po-Ting-lin/RandomizedHoughEllipse | RandomizedHoughEllipseTransform/RandomizedHoughEllipseTransform/rhet.cpp | #include "rhet.h"
#include "rhet_exception.h"
void RandomizedHough::_mainLoopFindCandidate(cv::Mat& image, std::vector<cv::Point>& locations, int iters) {
for (int i = 0; i < iters; i++)
_mainFindCandidate(image, locations);
}
void RandomizedHough::_mainFindCandidate(cv::Mat& image, std::vector<cv::Point... | ALGO | 0.999434 | 4.324032 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2020-03-18T15:37:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3040d999c... |
836ba06c-c878-4309-9c85-947a9166afc4 | lowRISC/opentitan | hw/ip/kmac/dv/dpi/vendor/kerukuro_digestpp/algorithm/detail/shake_provider.hpp | /*
This code is written by kerukuro and released into public domain.
*/
#ifndef DIGESTPP_PROVIDERS_SHAKE_HPP
#define DIGESTPP_PROVIDERS_SHAKE_HPP
#include "../../detail/functions.hpp"
#include "../../detail/absorb_data.hpp"
#include "sha3_provider.hpp"
#include <array>
namespace digestpp
{
namespace detail
{
names... | TOOL | 0.963192 | 7.106011 | {
"github_metadata": {
"branch": "master",
"commit_count": 27583,
"repo_created_at": "2019-08-26T16:30:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2891,
"forks": 868,
"issues": 1348,
"pull_requests": 408
},
"file_meta": {
"content_id"... |
42e5b643-d7f3-4e14-ad24-857769b94271 | gonestar321/45-Days-DSA | LeetCode/Easy/0448-find-all-numbers-disappeared-in-an-array/0448-find-all-numbers-disappeared-in-an-array.cpp | class Solution {
public:
vector<int> findDisappearedNumbers(vector<int>& nums) {
//USING SET GIVES O(nlog(n)) time complexity
// vector<int> answer ;
// set<int> s( nums.begin() , nums.end());
// int n = nums.size();
// for( int i = 1 ; i <= n ; i++ ){
// if( s.find(i... | ALGO | 0.999273 | 4.88827 | {
"github_metadata": {
"branch": "main",
"commit_count": 330,
"repo_created_at": "2024-07-28T10:33: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": "7b170a0529... |
bb2558b3-5159-40f3-a52d-62ea769866dc | phats/Leetcode | bst/sortedArrayToBST.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.999993 | 6.262705 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2021-09-19T04:07: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": "c7185277267... |
d10d40c7-4154-46eb-a37d-93ae38a1e402 | yash0530/Competitive-Programming | 03 CF PRACTICE/APRIL CF/1154E.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define INF (int) 9e18
#define HELL (int) (1e9 + 7)
#define int long long
#define double long double
#define uint unsigned long long
#define deb(x) cerr << #x << " => " << x << "\n"
#define deba(x) cerr << #x << "\n"; for (auto a : x) cerr << a << " "; ce... | ALGO | 1 | 3.879241 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2019-12-15T06:50:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 20,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4597bad... |
37ffdced-a815-43fe-b174-a5720016ee9b | Kenshin2438/CP-Code-Collection | Contest/Codeforces Round 858 (Div. 2)/C.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.hpp"
#else
#define debug(...) 42
#endif
using ll = long long;
#define all(a) begin(a), end(a)
#define sz(x) (int)((x).size())
void solve() {
int n; cin >> n;
vector<int> a(n * 2);
for (int &x : a) cin >> x;
sort(all(a));
if (n == 1... | ALGO | 0.999634 | 4.61754 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2022-04-15T06:16:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d74e10896... |
7b5c2f88-b8bf-421c-a43f-6212528ee935 | opencv/opencv_attic | opencv_extra/learning_opencv_v2/ch12_ex12_4.cpp | //Example 12-2. Example of 2D line fitting.
/* License:
July 20, 2011
Standard BSD
BOOK: It would be nice if you cited it:
Learning OpenCV 2: Computer Vision with the OpenCV Library
by <NAME> and <NAME>
Published by O'Reilly Media
AVAILABLE AT:
http://www.amazon.com/Learning-OpenCV-Co... | ALGO | 0.989182 | 5.352897 | {
"github_metadata": {
"branch": "master",
"commit_count": 7903,
"repo_created_at": "2012-07-26T08:08:12.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 49,
"forks": 62,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f4c72... |
862be62a-4afd-41fe-b087-b52c8630d619 | geekyUtkarsh99/sampleopengl | app/src/main/cpp/matrixOperation.cpp | //
// Created by DELL on 01-04-2021.
//
#include <cmath>
#include "matrixOperation.h"
void matrixOperation::createVolume(float *matrix) {
matrix[0] = 1.0f;
matrix[1] = 0.0f;
matrix[2] = 0.0f;
matrix[3] = 0.0f;
matrix[4] = 0.0f;
matrix[5] = 1.0f;
matrix[6] = 0.0f;
matrix[7] = 0.0f;
... | ALGO | 0.904218 | 4.739375 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2021-09-14T11:16: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": "865ac79109... |
90a94f84-3699-407e-a327-460520e2fcc9 | Vedansh5545/Data-Structures | LinkedList/1.cpp | /*
Linked List
*/
#include <iostream>
using namespace std;
class node{
public:
int data;
node *next;
node(int val){
data = val;
next = NULL;
}
};
void insertAtTail(node* &head, int val){
node *n = new node(val);
if(head == NULL){
head = n;
return;
... | ALGO | 0.999912 | 5.240887 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-02-28T20: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": "c91d64018d7... |
c62eccca-072e-451d-95f0-d409b4eb88ba | Masahiro-Obuchi/Atcoder | ARC/ARC040/ARC040C.cpp | #include <bits/stdc++.h>
#include <cassert>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define PI 3.14159265358979
using namespace std;
using ll = long long;
using P = pair<int, int>;
struct Edge
{
int to;
int weight;
Edge(int t, int w) : to(t), weight(w) {}
};
// using Graph = vector<vector<Edge>>;
using Gr... | ALGO | 0.99991 | 4.161328 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2019-04-19T11:49:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d46e63a6... |
c52278f7-c54d-41b3-a533-769bd3f2cafc | Raziel10/AlgorithmsAndMore | GoogleKickStart/DogsAndCats.cpp |
#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
string DogsAndCats(int N, int D,int C, int M, string cad){
long long int TotalCatFood = C;
int Dogs = 0;
string res = "NO";
for (const char& animal : cad){
if( animal == 'D'){
Dogs++;
}
}
for (const ... | ALGO | 0.999733 | 4.724371 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2020-04-08T20:49: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": "602428064... |
2dbb444a-391e-423e-8afd-c3cdadb6e9a7 | M0D4/Competitive-Programming-Problems-Solutions | CodeForces/GNU C++17/1408C | Discrete Acceleration/94332556.cpp | #include "bits/stdc++.h"
#pragma GCC optimize("-Ofast")
#pragma GCC optimize("trapv")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx2,tune=native")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-funroll-all-loops,-fpeel-loops,-funswitch-loops"... | ALGO | 0.999907 | 3.537307 | {
"github_metadata": {
"branch": "main",
"commit_count": 3590,
"repo_created_at": "2022-06-03T20:54:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0efe4e69d... |
a6066b8c-f0bf-4730-9133-d363a2cbdc69 | ishandutta2007/codeforces-e | ei133333/normal/1272/E.cpp | #include <bits/stdc++.h>
using namespace std;
using int64 = long long;
const int mod = 1e9 + 7;
// const int mod = 998244353;
const int64 infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;
struct IoSetup {
IoSetup() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10... | ALGO | 0.999939 | 4.196588 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:34: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": "b5b6fc48e004... |
2b7f663e-a876-4897-a7a1-2a7d4dc1fa1e | vijaiks/leetcode_sol_cpp | topKFreqElements.cpp | #include<iostream>
#include<string>
#include<vector>
#include<unordered_map>
#include<queue>
using namespace std;
vector<int> topKFrequent(vector<int>& nums, int k)
{
if ( k == nums.size()) return nums;
//Map to count freq
unordered_map<int,int> map;
vector<int> result;
for(int num : nums){
... | ALGO | 0.999984 | 5.604975 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2020-05-18T22:37: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": "1fda93868... |
8d0d9160-ac0a-4b51-9579-f37ac1364d1b | Xilinx/Vitis_Libraries | graph/L2/tests/label_propagation/kernel/label_propagation_top.cpp | /*
* Copyright 2020 Xilinx, Inc.
*
* 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 to... | ALGO | 0.995042 | 5.922128 | {
"github_metadata": {
"branch": "main",
"commit_count": 471,
"repo_created_at": "2019-09-23T19:13:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 988,
"forks": 381,
"issues": 0,
"pull_requests": 12
},
"file_meta": {
"content_id": "093903... |
3fe06788-8161-451f-9407-f8159fde6320 | AvoTovm/CppOdyssey | LeetcodeExperience/DynamicProgramming/Longest_Pallindromic_SubStr5.cpp | #include <iostream>
#include <cstring>
using namespace std;
string longestPalindrome(string s) {
string Result = "";
int resultLenght = 0;
for(int i = 0; i < s.size(); i++){
//odd lenght
int l = i;
int r = i;
while(l >= 0 && r <s.size() && s[l... | ALGO | 0.999919 | 4.472934 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2025-01-05T09:39: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": "85ff2bb1f1c... |
f567d21e-cdd1-4fbe-8417-d0d453b615af | QuwsarOhi/CodeTree | solved_probs/codeforces/A.Ice_Skating.cpp | // Codeforces
// http://codeforces.com/contest/217/problem/A
// Ice Scating
#include <bits/stdc++.h>
using namespace std;
#define MAX 200100
#define EPS 1e-9
#define INF 1e7
#define MOD 1000000007
#define pb push_back
#define mp ... | ALGO | 0.999821 | 4.209534 | {
"github_metadata": {
"branch": "master",
"commit_count": 816,
"repo_created_at": "2016-12-02T12:39:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ef37225f... |
3786385c-9d8a-40c4-8fb1-99ecb522f1c6 | 260058433/LeetCode | src/043_MultiplyStrings.cpp | #include <string>
using std::string;
using std::to_string;
class MultipleStrings {
public:
string multiply(string num1, string num2) {
string result(num1.size() + num2.size(), '0');
for (int i = num2.size() - 1; i >= 0; --i) {
int b = num2[i] - '0';
int carry = 0;
... | ALGO | 0.999698 | 5.835092 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2015-10-06T08:05: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": "355bb44228... |
d9d48c38-6062-4656-b7ef-303404b3e7d9 | Komorebi660/Data-Structure-and-Algorithm | Search/A_star/CheckAnswer.cpp | /*************************************************************
* Copyright © 2022 Komorebi660 All rights reserved.
* File Name: "CheckAnswer.cpp"
* Function: Check the correction of A* Search
*************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#... | ALGO | 0.999779 | 4.426298 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2021-10-04T11:08:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "91c6a3aec... |
6ac52379-fccf-4fb9-8921-dac3487ae207 | ishandutta2007/codeforces-z | zhukov_dmitry/normal/19/C.cpp | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define bublic public
#define clr(x) memset((x), 0, sizeof(x))... | ALGO | 0.999986 | 3.029567 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:43:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "534c134aefd7... |
9cc381d4-2cfa-4edc-9562-686eb765bc50 | LargeDumpling/Programming-Contest | OnlineJudges/Contest Hunter/#69/Solve&Std/D.cpp | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <cctype>
using namespace std;
const int N = 10007, M = 1000007;
struct Edge
{
int s, t, a, b, c, Next;
} e[M];
struct C_Edge
{
int t, Next;
} ce[M];
const int INF = 0x7fffffff;
int Head[N], ch[N], n, a, b, c, Res = INF;
bool v[N];
... | ALGO | 0.999852 | 3.587487 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2017-10-17T05:22:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d14929f5... |
0ec5376f-4511-4637-a00b-fe74a47d879f | Tom-CaoZH/cs106L | hws/02_WikiRacerLinksB/WikiRacer/src/wikiscraper.cpp | #include <iostream>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include "wikiscraper.h"
#include "error.h"
using std::cout; using std::endl;
using std::cerr; using std::string;
using std::unordered_map; using std::unordered_set;
string itTostring(string::iterator wo... | TOOL | 0.972831 | 4.877494 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2022-04-11T03:46: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": "4c58c1d19... |
25f8ae75-0c02-4222-b0c3-0c9f4aa7f937 | zbatul/Algorithms | Boggle Solver/BoggleSolver.cpp | /*
* Name: <NAME>
* Class: CS301 Data Structures
* Program: A C++ program to solve a Boggle Board and find all the words in it using a given dictionary.
*/
#include "Dictionary.h"
// global variables
bool verbose = false;
int numWords = 0;
int stepnum = 0;
ofstream outFile; // file containing output
// Decl... | ALGO | 0.933172 | 5.021327 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-05-31T21:58: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": "e8e192ed9747... |
7f5483ae-679b-4d28-b97b-807090578efc | TejasSoni1/my-wato-asd-training | src/robot/control/src/control_node.cpp | #include "control_node.hpp"
#include <tf2/LinearMath/Quaternion.h>
#include <tf2/LinearMath/Matrix3x3.h>
ControlNode::ControlNode() : Node("control"), control_(robot::ControlCore(this->get_logger())) {
path_sub_ = this->create_subscription<nav_msgs::msg::Path>(
"/path", 10, [this](const nav_msgs::msg::Path::Shar... | TOOL | 0.958356 | 6.494424 | {
"github_metadata": {
"branch": "main",
"commit_count": 77,
"repo_created_at": "2025-06-17T19:32: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": "033a898b512... |
ec3b9f33-b59d-4d7c-9c3a-dc782399eec9 | priyesh0453/LeetCode-Solutions | Hard/4. Median Of Two Sorted Array.cpp | #include <iostream>
#include <climits>
#include <vector>
using namespace std;
double findMedianSortedArrays(vector<int> nums1, vector<int> nums2, int m, int n) {
if(m < 0 || m > 1000 || n < 0 || n > 1000)
{
return NULL;
}
else
{
if(m > n)
{
return findMedianSortedA... | ALGO | 0.999994 | 4.910768 | {
"github_metadata": {
"branch": "main",
"commit_count": 238,
"repo_created_at": "2023-01-02T12:04: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": "7532844cc2... |
7a55b716-dd13-41ac-af03-ff09b6d39280 | cs23b2009/leetcode-solutions | 0222-count-complete-tree-nodes/0222-count-complete-tree-nodes.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.999943 | 6.141918 | {
"github_metadata": {
"branch": "main",
"commit_count": 776,
"repo_created_at": "2025-06-17T05:44:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "181eab5852... |
b32136a0-d007-40a9-a05b-9fc97c3a8b11 | Hamid165/2311102129_Hamid-Sabirin | Pertemuan7/unguided1.cpp | #include <iostream>
using namespace std;
const int maks_129 = 5;
// Struktur Node untuk linked list
struct Node
{
string data_129;
Node *next;
};
// Penunjuk head global untuk linked list
Node *head = nullptr;
// Fungsi untuk memeriksa apakah antrian penuh
bool isFull()
{
return false;
}
// Fungsi un... | ALGO | 0.997128 | 4.875344 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2024-03-06T07:47:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fe47b97733b... |
0506c099-3974-43f3-886c-ae1f2c956846 | durgeshkk/Codeforces-Contests | 2024_03_06_Practice/Contest_946_DIV_3/F_Cutting_Game.cpp | /*
Once in a LifeTime,
Will never let you Down!!
*/
#include <bits/stdc++.h>
#include<iomanip>
#include <deque>
#include <bitset>
#include <cstdint>
//#include <ext/pb_ds/assoc_container.hpp> // Common file
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//#define ordered_set tree<int, null_type,le... | ALGO | 0.999686 | 3.564678 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2023-11-23T16:31: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": "2dc2211f971... |
290089bc-8ece-46fd-abc2-fd0673b899db | IIIIIIIIIU/TXT | QBXT20171001/D7C1/bonus.cpp | #include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
const int MAXK = 120;
const int MAXN = 16;
const int MAXST = 1 << 15;
long double f[MAXK][MAXST] = {{0}};
int value[MAXN], need[MAXN] = {0};
int k, n;
int main()
{
freopen("bonus.in", "r", stdin);
... | ALGO | 0.999457 | 3.437267 | {
"github_metadata": {
"branch": "master",
"commit_count": 293,
"repo_created_at": "2017-09-22T11:31:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c045932... |
28540027-bb2e-49ee-9c20-5365b3736f68 | facebookresearch/pytorch3d | pytorch3d/csrc/mesh_normal_consistency/mesh_normal_consistency_cpu.cpp | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <ATen/ATen.h>
#include <utility>
#include <vector>
at::Tensor MeshNormalConsistencyFindVe... | ALGO | 0.994316 | 6.388273 | {
"github_metadata": {
"branch": "main",
"commit_count": 1223,
"repo_created_at": "2019-10-25T02:23:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9387,
"forks": 1383,
"issues": 268,
"pull_requests": 26
},
"file_meta": {
"content_id": "1... |
d77f2f18-d28e-484e-b80c-3472c1d4571f | Apress/Concurrent-Programming-Interviews | ch6/6-9.cc | #include <functional>
#include <iostream>
#include <list>
#include <optional>
#include <shared_mutex>
#include <thread>
using namespace std;
namespace {
class ThreadSafeQueue {
public:
optional<int64_t> Front();
void Pop();
void Push(int64_t value);
bool PopIf(function<bool(int64_t)> predicate);
private:
... | TOOL | 0.961657 | 6.959199 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-10-23T19:41:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7d4f32cd85876... |
767d767d-63bd-4725-859c-0abde250e113 | haolong2001/demos_v_matrix | src_2050/forecast_fertility.cpp | #include "../include/forecast_fertility.h"
#include "../include/utils_2050.h"
#include <iostream>
#include <fstream>
#include <filesystem>
#include <iomanip>
#include <limits>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
vector<vector<vector<double>>> readFertilityMatrix(const string& filename) ... | ALGO | 0.992424 | 5.642501 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-10-18T16:00: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": "2a04e4ae0f5... |
4e8a4115-dc9f-48c6-ae92-54d9d09427ea | jobmankazakh/encryption | cpp/xor.cpp | /*
* Simple File Encryptor/Decryptor
*
* Processes all files in a directory (./raw for encryption, ./encrypted for decryption)
* using a user-supplied arbitrary-length decimal key.
*
* Usage:
* - Place raw files in ./raw directory for encryption.
* - Place .enc files in ./encrypted directory for decryptio... | TOOL | 0.912865 | 6.831131 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-05-16T06: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": "2753aacf9fb8... |
df0182bc-48c8-4f86-b753-50a9bb023a80 | softdream/robot_projects | dnn_body_detect/include/dnn_node/util/output_parser/detection/fasterrcnn_output_parser.h | // Copyright (c) 2022,Horizon Robotics.
//
// 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 agr... | DATA | 0.915794 | 5.947789 | {
"github_metadata": {
"branch": "master",
"commit_count": 91,
"repo_created_at": "2023-04-17T03:42:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 34,
"forks": 9,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "d0a98e8f... |
9912bdfd-b051-4706-8001-bc8bfa7cc780 | n-engine/nebuladevice | code/extlibs/bullet/src/Physics/RigidBody/common/Contact.h | /* [SCE CONFIDENTIAL DOCUMENT]
* $PSLibId$
* Copyright (C) 2006 Sony Computer Entertainment Inc.
* All Rights Reserved.
*/
#ifndef __CONTACT_H__
#define __CONTACT_H__
#include <float.h>
#include <vectormath_aos.h>
using namespace Vectormath::Aos;
#inc... | ALGO | 0.976962 | 4.890762 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-11-16T20:03:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "506c931a8... |
da621219-0f15-4a1f-9c2a-b4c08c530665 | ganeshkumar269/400 | search/rotatedArray.cpp | #include <iostream>
#include <random>
#include <algorithm>
using namespace std;
/*
https://youtu.be/GU7DpgHINWQ?t=1237
Rotated Array:
Given a sorted array but rotated in a random fashion, find the smallest element
eg. 6789123 -> ans = 1
(watch video for explanation)
binary search but compare mid with... | ALGO | 0.999786 | 4.55486 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2020-03-06T11:30: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": "7d124207d5... |
92340e14-de1b-4816-b2a3-4f933d2795af | Moontasir1091/Competetive_PRGRM | TOPIC - CP/Binary_Search/CF_EDU_binaryS/C. _Very Easy Task.cpp | #include<bits/stdc++.h>
using namespace std;
int n, x, y;
bool good(long long t){
return (t / x) + (t / y) >= n - 1;
}
int main(){
cin >> n >> x >> y;
if (n == 1) {
cout << min(x, y) << endl; // প্রথম copy করতে যেটা কম সময় লাগে
return 0;
}
long long l = 0;
long long r = 1e1... | ALGO | 0.999978 | 3.841761 | {
"github_metadata": {
"branch": "main",
"commit_count": 161,
"repo_created_at": "2024-10-30T12:44: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": "bcac9af468... |
ec383059-3d96-487e-b64d-0ade4dae8cc8 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/07/0731/personal_submission/cf1041d_kamtuo.cpp | /*----------------------------------*/
/* Author : KaMtuo */
/* Email : <EMAIL> */
/* Creation_time : 2024-07-31 17:05 */
/* Software : Visual Studio Code */
/*----------------------------------*/
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullp... | ALGO | 0.999782 | 4.098216 | {
"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": "b2c5... |
4b98394d-4651-47d8-8741-785ece1cad04 | ishandutta2007/codeforces-g | gullesnuffs/normal/1178/F1.cpp | #include <bits/stdc++.h>
#define MOD 998244353
using namespace std;
#define rep(i, a, b) for(int i = (a); i < int(b); ++i)
#define rrep(i, a, b) for(int i = (a) - 1; i >= int(b); --i)
#define trav(it, v) for(auto &it : (v))
#define all(v) (v).begin(), (v).end()
#define what_is(x) cerr << #x << " is " << x << endl;
#d... | ALGO | 0.999989 | 4.256271 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01: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": "b41a9fb241a4... |
e62ce868-d254-4b6e-aabf-c2dc3b39a9f0 | NaVIn69/AlgoZenith_DSA | graph2/namo3.cpp | #include <iostream>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t;
cin >> t; // Number of test cases
for (int tc = 0; tc < t; ++tc) {
int n;
... | ALGO | 0.999725 | 5.194635 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-01-31T04:07: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": "04e3581daa95... |
8b7ea2d3-2d2e-4701-be9b-68b60df0d52c | FMartine7i/Practicos_Proga1UTN | Practico_5/Ejercicio6.cpp | #include <iostream>
using namespace std;
int main(){
srand(time(0));
int size = 10;
int arreglo[size];
// Rellenar el arreglo con valores aleatorios entre 1 y 100
for (int i = 0; i < size; i++){
arreglo[i] = rand() % 100 + 1;
}
// ordenar el arreglo
for (int i = 0; i < size... | ALGO | 0.995933 | 4.43809 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2023-04-06T17:13: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": "97a7d9ae844... |
f1e14bee-5e0d-43fd-8713-6dfd768df717 | Siddharth-Gandhi/Parallel-Path-Finding | dijkstra_compare.cpp | #include <bits/stdc++.h>
#include <chrono>
#include "parallel_dijkstra.h"
#include "random_distance_matrix.h"
#include "serial_dijkstra.h"
using namespace std;
using namespace std::chrono;
const int COUT_PRECISION = 16;
const int START_N = 10;
const int END_N = 500;
const int STEP_N = 10;
const vector<int> num_thre... | ALGO | 0.997909 | 5.713055 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2021-11-28T21:55: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": "0b3de2a94680... |
2ae0f86a-161a-4d3e-96c0-d405ea612904 | liubang/leetcode | src/912.sort-an-array.cpp | // Copyright (c) 2024 The 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by app... | TEST | 0.998104 | 6.403193 | {
"github_metadata": {
"branch": "main",
"commit_count": 103,
"repo_created_at": "2022-01-17T06:30:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fafd4d09fe... |
46394c5c-4879-47a3-8bcb-6e2e01ce337c | Sean-Lan/leetcode | algorithms/minimumDepthOfBinaryTree/minimumDepthOfBinaryTree.cpp | /**
*
* Sean
* 2016-06-15
*
* https://leetcode.com/problems/minimum-depth-of-binary-tree/
*
* Given a binary tree, find its minimum depth.
*
* The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
*
*/
#include <iostream>
using namespace std;
// D... | ALGO | 0.999774 | 6.479862 | {
"github_metadata": {
"branch": "master",
"commit_count": 754,
"repo_created_at": "2015-04-08T02:27:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "71f0abd8... |
e03bdd13-6b59-486a-9de1-66ae29370388 | Wauro21/elo328 | F1_Release/Projection.h | #ifndef PROJECTION_H
#define PROJECTION_H
/*
* Proyecto ELO328 - 2020.S2 - G1
* Modulo de proyeccion de pista
* Autor: <NAME> - 06/12/2020
*/
#include <cmath>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/core... | ALGO | 0.995221 | 5.121969 | {
"github_metadata": {
"branch": "master",
"commit_count": 135,
"repo_created_at": "2020-09-11T17:15:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c3397f25... |
ca029002-1409-4335-9dae-54fe267bc7fd | MohsinTaj/DSA-linked-list-assignment | hamza.cpp | #include <stdio.h>
#include <stdlib.h>
//create node function
struct node{
int data;
struct node *next;
} ;
typedef struct node *nodeptr;
int main()// create linked list having three nodes//
{
nodeptr head = (nodeptr)malloc (sizeof (struct node));
nodeptr p =(nodeptr) malloc (siz... | ALGO | 0.999635 | 3.611058 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-09-11T16:59:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ce09024dfc6... |
eccd8bbe-0a7c-4cea-ab57-d3ed49a525e9 | baskervill/Cracking_The_Code_Interview | Chapter_3_src/Q3_6.cpp | #include <iostream>
#include <stack>
#include <cstdlib>
#include <queue>
using namespace std;
//use another stack as the insertion sort , O(n ^ 2), stack t maintain sorted everytime a new data
//come in , those in t who bigger than it will be pushed into s
stack<int> Ssort(stack<int> s){
stack<int> t;
while(!s.... | ALGO | 0.999636 | 4.731499 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-11-28T02:37:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "79ed73b3cf... |
ad2e31c8-88cf-4bf5-89a6-e920d11556f0 | malctaylor15/Black-Litterman-and-Mean-Variance-Portfolio-Optimization | Main.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <Eigen/core>
#include <Eigen/dense>
using namespace Eigen;
using namespace std;
double CalculateMean(vector<vector<double>>::iterator AssetReturns)
{
double sum = 0;
int numberOfDataPoints = 0;
for (vector<double>::iterator aRetu... | ALGO | 0.999824 | 4.765038 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-12-18T19:58:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b8a71e9660... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.