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
a6f5ae8a-e0c5-4f93-9ce3-f3fb4172b095
Sanchitbajaj02/CppPrograms
graphadj.cpp
/*==============================|-problem statement-|==============================*/ /* Represent a graph using adjacency list. */ /*===================================|-solution-|===================================*/ #include <iostream> #include <stdlib.h> using namespace std; /* linked list node*/ struct node{ ...
ALGO
0.999394
4.4202
{ "github_metadata": { "branch": "master", "commit_count": 155, "repo_created_at": "2020-10-01T11:09:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 57, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "3be1cc3...
fe566ba1-732a-4d42-9235-8301266777ba
alexC6/CPPProjectL2
foot.h
/** * Fichier : foot.h -> fichier d'entete du programme principal * Auteur : <NAME> - 2020 */ #include <climits> #include <cstring> #include <dirent.h> #include <fstream> #include <unistd.h> #include "Match.h" #define USAGE() { \ printf("Usage : %s -d <repertoire> [-j <buts|buts/match>] [-e <points|v...
TOOL
0.958124
3.837127
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-01-01T09:18: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": "83fe1abc1fa7...
79caae6e-a861-4f64-ad40-9e50301950d1
ariloc/CompetitiveProgrammingCodes
CodeForces/519D.cpp
#include <bits/stdc++.h> #define forn(i,n) for(int i = 0; i < int(n); i++) #define forsn(i,s,n) for(int i = int(s); i < int(n); i++) #define dforn(i,n) for (int i = int(n)-1; i >= 0; i--) #define dforsn(i,s,n) for(int i = int(n)-1; i >= int(s); i--) #define all(c) (c).begin(),(c).end() #define pb push_back #define fst...
ALGO
0.999615
3.463625
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2020-08-19T01:48:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47795ade...
0d1f5557-83e0-4787-be46-4df7d096d071
ProudOwl/Labba_1
LR_1.cpp
#include<iostream> #include<cmath> using namespace std; double perimeter(double down, double top, double wall_left, double wall_right){ return top+down+wall_left+wall_right; } double square(double top, double down, double height){ return (top+down)/2*height; } double middle_line(double top, double down){ return (top...
ALGO
0.99803
3.642501
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-03-13T08:36:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19d15cf2d22...
ec3a028f-b48a-4423-88a6-d3a92dfedc5a
MohdAqib8267/6-Companies_30_days_Challenges
0416-partition-equal-subset-sum/0416-partition-equal-subset-sum.cpp
class Solution { public: bool solve(int i,int target,int sum,vector<int>&nums,vector<vector<int>>&dp){ if(i>=nums.size()){ return false; } if(dp[i][sum]!=-1) return dp[i][sum]; if(sum==target) return true; int take=solve(i+1,target,sum+nums[i],nums,dp); in...
ALGO
0.99993
5.795303
{ "github_metadata": { "branch": "main", "commit_count": 3018, "repo_created_at": "2023-01-03T12:30:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cef1ad08...
4fd44a99-32f2-4ae4-bd24-84ef29493b67
aljozu/EDA_PF
RStar/Test.h
// // Created by lojaz on 30/11/2022. // #ifndef LINES_TEST_H #define LINES_TEST_H #include <random> #include <chrono> #include <fstream> #include "RTree.h" #define LIENZO 2048 float minBoundingLength = LIENZO*0.0042; float maxBoundingLength = LIENZO*0.0084; std::random_device deva; std::mt19937_64 enga(deva()); templ...
TEST
0.959067
3.960585
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-12-01T23:57:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d77c2167965d...
0f35ba0b-e73e-42d5-bc98-df20bafbbb2f
lempound/Algorithmen-und-Programmieren
Algorithmen-und-Programmieren/fourier_coef.cpp
// FOURIER TRANSFORMATION COEFFICIENTS // #include<math.h> #include<stdio.h> double trapez(double *x, double *y, int& n); void main() { int count = 0; //COUNTER double tt, ff; FILE *fin; // VARIABLE fin FÜR FILE MANAGEMENT fopen_s(&fin, "fourier.dat", "r"); // OPEN THE fourier.dat do { fscanf_s(fin, "%lf %l...
ALGO
0.996813
3.62083
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-02-27T11:36: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": "8b670b956...
908827ce-41d7-4a22-bbfc-2093ba85d202
Mathesis-Software/Knots
src/ke/seifert.h
/* * Copyright (c) 1995-2021, <NAME> <<EMAIL>> * * 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 ...
ALGO
0.998863
5.455607
{ "github_metadata": { "branch": "master", "commit_count": 574, "repo_created_at": "2021-07-26T21:34:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 19, "forks": 2, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "82eec47b...
6f69e3cc-442f-4a36-ab39-72d6cd4bd37d
f129096835/stepper_motor_face_track
arduino_code/face_track_arduino_AccelStepper/face_track_arduino_AccelStepper.ino
//Face Tracker using TensorRT and PID by Ed #include <MultiStepper.h> #include <AccelStepper.h> #define DRIVER_TYPE 1 #define MOTOR_PUL_PIN 4 #define MOTOR_DIR_PIN 5 #define MOTOR_SPEED 600 #define MOTOR_POS HIGH #define MOTOR_NEG LOW #define width 640 #define height 480 int x_stop_range = width*0.04; int y_...
TOOL
0.996104
5.89462
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-06-09T04:39: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": "60fcc42ca0ba...
50d4481d-e9dd-4f35-b494-e68f1cfe34af
ys0333/Autonomous_driving_practices
traffic_light/include/traffic_light/traffic_light.h
#include <iostream> #include <string> #include <ros/ros.h> #include <algorithm> #include <vector> #include <std_msgs/Bool.h> #include <yolov5_cone/BoundingBox.h> #include <yolov5_cone/BoundingBox_vector.h> #include <sensor_msgs/Image.h> #include <sensor_msgs/CameraInfo.h> #include <sensor_msgs/image_encodings.h> #inc...
TOOL
0.948787
3.839768
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-07-20T07:37: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": "5e039262025...
30dcc557-5940-4a49-aad6-68ce552ea377
steller-nafees/codeforces-code
41A.cpp
//============================================================================ // 41A. Translation - Codeforces // Author: <NAME> // Institution: North South University (NSU), CSE // Description: Checks whether one string is the reverse of another //======================================================================...
ALGO
0.999989
5.884541
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2025-05-07T06:37: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": "3e36316332...
d568d865-79ac-48cf-8169-388085d2f68a
tinhpham2004/series-30-days-of-upskill
Day8/divide-array-into-arrays-with-max-difference.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<vector<int>> divideArray(vector<int> &nums, int k) { sort(nums.begin(), nums.end()); int n = nums.size(); for (int i = 0; i < n; i += 3) { if ((nums[i + 1] - nums[i]) > k || (nums[i + 2] -...
ALGO
0.999889
5.292685
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-01-09T16:06: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": "b580ecdbce0...
85b4b969-83fb-487e-a688-2e9b9d4bc969
Cipher0xf/SecChat
src/crypto/sk_crypto/AES.cpp
#include <cstdlib> #include <cstring> #include <bitset> #include <ctime> #include <cmath> #include <algorithm> #include <cstdio> #include <iostream> using namespace std; #include "util.hpp" #include "AES.hpp" #define ROUND 10 #define MAX_LENGTH 1000 const uint8_t Sbox[16][16] = { 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B...
ALGO
0.998417
4.570815
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-06-13T15:34: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": "a4ed09b75dd...
cccbd77a-51a8-45a8-abc2-dead988854b2
jahneff/countdown_game_show
iterativecountdown.cpp
#include <iostream> using namespace std; void print_intro(){ cout << "*****************************************************************************************" << endl; cout << "** Welcome to the Countdown problem solver system, iterative version! **" << endl; cout << "** This program takes n int...
ALGO
0.999756
3.88143
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-06-10T02:01:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "956b32670...
d6052594-3f5e-4043-89a7-4807b6d82e76
romanasa/olymp_codes
trains/train09012018/F.cpp
#include <bits/stdc++.h> #define err(...) fprintf(stderr, __VA_ARGS__), fflush(stderr) using namespace std; typedef long long ll; const int mod = (int)1e9 + 7; void add(int &a, int b) { a += b; if (a >= mod) a -= mod; } int dp[107][(1 << 11) + 7]; int G[(int)1e4 + 7]; #define TASK "lcm" int main() { #ifndef HOME...
ALGO
0.999969
4.555853
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-04-11T12:03: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": "72c4bc23c1...
a90ee33a-4498-4e5d-921f-cd0cd42f9e53
ITlearning/ROKA_CPP
2021_02/2021_02_04/Ex06.cpp
#include <iostream> #include <string> using namespace std; class Matrix { int n1,n2,n3,n4; public: Matrix(int n1 = 0,int n2 = 0,int n3 = 0,int n4 = 0) { this->n1 = n1; this->n2 = n2; this->n3 = n3; this->n4 = n4; } void show() { cout << "Matrix = { " << n1 << ' ' << n2 << ' ' << n3 << ' ' << n4 << " }" << endl; } ...
ALGO
0.997345
4.365138
{ "github_metadata": { "branch": "main", "commit_count": 184, "repo_created_at": "2020-12-27T14:24:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "335acd83fa...
0a56fd58-b94d-4545-887a-6146cfff4113
time-iter/fs_cache
vcache3/manage/vspace.cpp
#include<stdio.h> #include<stdlib.h> #include<string.h> #include"vspace.h" #include"vdefine.h" /*size of nvm data structure*/ extern const int log_size = sizeof(struct cache_log); extern const int entry_size = sizeof(struct cache_entry); extern const int index_size = sizeof(struct cache_index); extern const int addr_s...
TOOL
0.927681
3.554255
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-21T07:56: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": "44186ec47f...
65225b17-94dd-4562-9905-3d120a02a03d
mzuenni/kattis-export
nwerc2023/joggingtour/submissions/time_limit_exceeded/paul-permutations-no-trig.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> x(n), y(n); for (int i = 0; i < n; i++) { cin >> x[i] >> y[i]; } vector<int> p(n); iota(begin(p), end(p), 0); double res = 1e20; do { vector<pair<int,int>> v(n-1); vector<int> dx(n-1), dy(n-1); for (int i = 0; i <...
ALGO
0.999917
4.250121
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-09-19T16:52:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2bb8d6eec53...
a6581d34-5835-4946-ace2-776a03a4e00b
ishandutta2007/codeforces-t
teapotd/normal/1012/D.cpp
#define _USE_MATH_DEFINES///////////////////////////////////////////////////// #include <bits/stdc++.h>////////////////////////////////////////////////////// #ifdef LOC//////////////////////////////////////////////////////////////////// #include "debuglib.h"///////////////////////////////////////////////////////// #els...
ALGO
0.99993
3.618443
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "3ea8b9b9ffb2...
9c614e00-481d-4c96-94c2-8fc333104b60
WhiZTiM/coliru
Archive2/53/b83793ccde5b49/main.cpp
#include <cstdio> #include <cstdlib> using namespace std; const int n = 1024; int a[n][n], b[n][n], c[n][n]; void mul() { for (int i = 0; i < n; i += 8) for (int j = 0; j < n; j += 8) for (int k = 0; k < n; ++k) for (int ii = i; ii < i + 8; ++ii) for (int jj...
ALGO
0.99948
3.377648
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34: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": "a56454...
7800709d-0523-464c-9894-94adb471fe94
facebookresearch/ELF
rts/engine/map.h
/** * Copyright (c) 2017-present, Facebook, Inc. * 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. */ #ifndef _MAP_H_ #define _MAP_H_ #include <functional> #include <vector> #include "common.h" #include "locality_s...
ALGO
0.933584
5.812999
{ "github_metadata": { "branch": "main", "commit_count": 518, "repo_created_at": "2017-06-06T00:07:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2093, "forks": 285, "issues": 37, "pull_requests": 10 }, "file_meta": { "content_id": "412d...
6c74a0cb-29d6-4238-8614-5bcba10166db
libmv/libmv
src/tools/stabilize.cc
// Copyright (c) 2011 libmv authors. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish...
ALGO
0.996437
4.521167
{ "github_metadata": { "branch": "master", "commit_count": 859, "repo_created_at": "2011-05-17T07:35:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 318, "forks": 83, "issues": 5, "pull_requests": 2 }, "file_meta": { "content_id": "214a20...
72486e8e-06df-4c44-a94e-941f1cdd783f
Wulala1119/myLeetCode
21_MergeTwoSortedLists/21_MergeTwoSortedLists.cpp
#include <iostream> #include <vector> #include <math.h> #include <string> #include <map> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { if(l1 == NU...
ALGO
0.999953
5.368631
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-05-18T13:40: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": "a509c26a49...
e3b1caf4-96c5-43f1-9e60-d5d506ce214c
scilab/scilab
scilab/modules/sparse/sci_gateway/cpp/sci_lufact.cpp
/* * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab * Copyright (C) 2014 - Scilab Enterprises - <NAME> * * Copyright (C) 2012 - 2016 - Scilab Enterprises * * This file is hereby licensed under the terms of the GNU GPL v2.0, * pursuant to article 5.3.4 of the CeCILL v.2.1. * This file was origin...
TOOL
0.985514
3.841605
{ "github_metadata": { "branch": "master", "commit_count": 55253, "repo_created_at": "2017-06-12T08:25:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 373, "forks": 87, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "621c...
19a4aa98-9b5c-4c32-a1e5-7e3a2c6cfc5a
OmerHavakook/ReversiConsole
ReversiClient/src/AIPlayer.cpp
#include "../include/AIPlayer.h" using namespace std; AIPlayer::AIPlayer(char type, ConsoleScreen *screen) : Player(type, screen) { } string AIPlayer::chooseCell(GameLogic &game) { // checking computer's options. if (game.checksIfMovesArePossible('O', *game.getBoard())) { // saving the computer's opt...
ALGO
0.983515
4.845426
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-11-16T18:08:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "404ce8e4fe...
0afef667-7323-4f3b-90c7-d7141e3d8a55
ishandutta2007/codeforces-l
lhic/normal/845/G.cpp
#ifndef BZ #pragma GCC optimize "-O3" #endif #include <bits/stdc++.h> #define FASTIO #ifdef FASTIO #define scanf abacaba #define printf abacaba #endif typedef long long ll; typedef long double ld; typedef unsigned long long ull; using namespace std; /* ll pw(ll a, ll b) { ll ans = 1; while (b) { while (!(b & 1...
ALGO
0.999985
4.122097
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "529750254b15...
b9111220-ae30-44e7-af3a-ad0ef8694866
DebugMind/Algorithm
Algorithm/괄호추가하기_2.c++
#include <iostream> #include <string> #include <vector> #include <limits> using namespace std; int N; string S; int result = INT32_MIN; int cal(int a, char m, int b) { switch(m) { case '+' : return a + b; case '-' : return a - b; case '*' : return a * b...
ALGO
0.99994
3.950119
{ "github_metadata": { "branch": "main", "commit_count": 319, "repo_created_at": "2021-12-07T03:04:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a97f4fdb53...
2166b769-a12b-4868-b7fc-c59c8f368e76
vin18/cplusplus
pointers.cpp
#include <iostream> #include <memory> using namespace std; void increase_price(double* price) { *price *= 1.2; } void swap(int* first, int* second) { int temp = *first; *first = *second; *second = *first; } void print_numbers(int numbers[], int size) { numbers[0] = 0; } int main() { int num...
TOOL
0.94323
5.068839
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-16T11:19: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": "f0b2358eaf31...
53ff604f-0157-42d9-8441-6e04f5b65854
alexandrerays/computational_physics
introduction-to-programming/2010-1 - Introdução à Programação/introduction-programming/trabalho2/ALEATÓRIOS/algoritimos_teste/quicksort.cpp
#include<stdio.h> #include<conio.h> #include<time.h> #include<stdlib.h> #define num 5 int Separa (int p, int r, int v[]) { int c, j, k, t; c = v[r]; j = p; for (k = p; k < r; k++) if (v[k] <= c) { t = v[j], v[j] = v[k], v[k] = t; j++; } v[r] = v[j], v[j] = c; retu...
ALGO
0.999965
4.20786
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-01-26T23:14: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": "9fbaa65912...
be99056a-fe1a-468c-8367-f06ade82fc8b
niuyi1017/algorithm-demos
PAT-Test/advanced/1013.cpp
#include <iostream> #include <algorithm> using namespace std; bool visit[1010]; int cities[1010][1010]; int n; void dfs(int node) { visit[node] = true; for (int i = 1; i <= n; i++) { if (visit[i] == false && cities[node][i] == 1) { dfs(i); } } } int main(int argc, ...
ALGO
0.999973
3.783869
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2018-09-26T07:48: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": "f446b8977...
08707615-5988-4b53-8968-38102a8d27b5
psybrg/CPP
lc/LCLargestNumber.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long class Solution { public: static bool comparator(int a, int b) { string c = intToString(a); string d = intToString(b); string e = c + d; string f = d + c; return e > f; } static string intToString(in...
ALGO
0.999914
5.351262
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-09-23T00:22: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": "92d2a2451d41...
79f3ccc6-7172-446f-8a74-0930c34a3293
zardam/epsilon
poincare/include/poincare/inv_norm.h
#ifndef POINCARE_INV_NORM_H #define POINCARE_INV_NORM_H #include <poincare/approximation_helper.h> #include <poincare/normal_distribution_function.h> namespace Poincare { class InvNormNode final : public NormalDistributionFunctionNode { public: // TreeNode size_t size() const override { return sizeof(InvNormNo...
ALGO
0.957556
7.361047
{ "github_metadata": { "branch": "khicas", "commit_count": 9612, "repo_created_at": "2017-09-15T20:49:35.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "numworks/epsilon", "stars": 26, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content...
95dc44da-8ce0-47a5-8974-d9130d2289e3
cdsc-github/Fluid-Registration
C++Source/Convolution2D.cpp
// //##################################################################### // Convolution2D.cpp //##################################################################### // // <NAME> (C) UCLA // //##################################################################### // #include <iostream> using namespace std; #inc...
ALGO
0.999142
5.360278
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-01-13T05:29:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "793d2487c22...
53c8d658-e5bc-4f2a-bbc2-ec6dfe47da25
sanesedu/CompetitiveProgramming
uva/10943a/main.cpp
#include <bits/stdc++.h> #define pb push_back #define all(x) (x).begin(), (x).end() #define fori(i, n) for(int i = 0; i < (int)(n); ++i) #define forid(i, n) for(int i = (int)(n) - 1; i >= 0; --i) #define forl(i, n) for(long long i = 0; i < (long long)(n); ++i) #define forld(i, n) for(long long i = (long long)(n) - 1;...
ALGO
0.999947
4.671977
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-06-23T16:29: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": "4f3f4675f...
e9d90fab-6e53-4adb-a1b4-4a4f2f673842
fanfank/leetcode
spiral-matrix.cpp
class Solution {//extremely ugly code, the definitions of my parameters are misleading public: vector<int> v; int rw, cl; struct node { int x, y; node(int xx = 0, int yy = 0) : x(xx), y(yy){} }; void printCircle(vector<vector<int> > &vv, node upperLeft, node lowerRight) { int...
ALGO
0.999991
5.673695
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2013-11-02T16:32:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 95, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "256c61...
c292654d-ab5e-4b22-a835-2dbdc6cc9357
minusbrain/aelib
base/sorted_find.h
/** * @author <NAME> * * @copyright Copyright © 2020 <NAME> * * MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the “Software”), to deal in the Software * without restriction, including without limitation t...
ALGO
0.999921
7.004076
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-07-05T18:50:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e05b3b18...
54153543-5250-4434-9b71-0b1ed2cb156f
ethz-asl/rmp_dl
rmpcpp_torch/include/comparison_planners/rrt/planner_rrt.h
#ifndef RMPCPP_PLANNER_PLANNER_RRT_H #define RMPCPP_PLANNER_PLANNER_RRT_H #include "rmpcpp_planner/core/world.h" #include "Eigen/Dense" #include <boost/multi_array.hpp> #include <memory> #include "rmpcpp/core/state.h" #include "comparison_planners/rrt/parameters_rrt.h" #include <map/common_names.h> #include <ompl/b...
ALGO
0.973035
7.214774
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2024-02-26T08:51:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65b3ec9fda...
e3f74a45-d14e-422b-a036-5a4315c7d2a8
luisaras/TBH
SAT/formula.cpp
#include <vector> using std::vector; #include <string> using std::string; using std::stoi; #include <iostream> using std::cout; using std::cin; using std::endl; using std::cerr; #include <fstream> using std::ifstream; using std::istream; #include <unordered_set> using std::unordered...
ALGO
0.999081
4.639393
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2019-04-02T13:11:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ab83ff28...
d4f28885-c33a-492f-8190-9d9586bcb031
trooperli/my-leetcode
problems/K_Closest_Points_To_Origin.cpp
/** * In this problem we used the mini heap and hash to solve. Map is to * store the distance with its corresponding coordinate. There could * be cases 1 corresponds to [1,0] and [0,1]. When these 2 points * exist, the second one will overwrite the first one. But that's OK * because the second one will always be t...
ALGO
0.999996
6.128005
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2020-03-19T06:49:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "15375a14d...
dd3e6fe6-059b-4a49-b4b6-a9a224f1ab13
zsiciarz/aquila
aquila/ml/Dtw.cpp
/** * @file Dtw.cpp * * An implementation of the Dynamic Time Warping algorithm. * * This file is part of the Aquila DSP library. * Aquila is free software, licensed under the MIT/X11 License. A copy of * the license is provided with the library in the LICENSE file. * * @package Aquila * @version 3.0.0-dev *...
ALGO
0.992482
6.532227
{ "github_metadata": { "branch": "master", "commit_count": 666, "repo_created_at": "2010-03-26T11:12:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 474, "forks": 114, "issues": 30, "pull_requests": 3 }, "file_meta": { "content_id": "bf6...
8dde73a5-db96-42cd-a355-5fc022599d12
KingGZX/Leetcode
tree/Lowest_Common_Ancestor_of_Binary_Tree.cpp
/* Q236 给定一个二叉树, 找到该树中两个指定节点的最近公共祖先。 百度百科中最近公共祖先的定义为:“对于有根树 T 的两个节点 p、q,最近公共祖先表示为一个节点 x, 满足 x 是 p、q 的祖先且 x 的深度尽可能大(一个节点也可以是它自己的祖先)。” 示例 1: 输入:root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1 输出:3 解释:节点 5 和节点 1 的最近公共祖先是节点 3 。 示例 2: 输入:root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 4 输出:5 解释:节点 5 和节点 4 的最近公共祖先是节点 5...
ALGO
0.999956
5.704397
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2022-02-02T02:00:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07256e7f7...
8314c8a6-121d-4511-ac9a-39f383596a18
LeadCoding/3-weeks-Google-Prep
01. Graphs/02. BFS/3. MultiSourceBFS.cpp
/* This is a really good usecase of multi-source BFS In this question we see how we can traverse from a point to tht point itself using minimum path. We can go back and forth btw nodes but should never land on the same config again */ //847. Shortest Path Visiting All Nodes int shortestPathLe...
ALGO
0.999873
5.476243
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-06-18T11:18:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1624, "forks": 777, "issues": 1, "pull_requests": 3 }, "file_meta": { "content_id": "74948a...
38aaf389-89bd-495f-b338-6f12cb21bce3
menon92/Competitive-Programming
Uva/cpp-solution/10653.cpp
//----------------------------------------------- // Problem : 10653 - Bombs! NO they are Mines!! // Status : Accepted. // Author : <NAME>. // Submission time : 26-01-2016. //----------------------------------------------- #include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <queue> us...
ALGO
0.999812
3.917473
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2015-09-08T05:28:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04855690...
4e143995-3b58-4e8a-b7d7-18072ec74686
ishandutta2007/codeforces-g
geniucos/normal/526/E.cpp
#include<bits/stdc++.h> using namespace std; int N, Q, a[1000009], t[1000009], lev[1000009], fin[1000009]; long long sumA, maxD; int main () { //freopen ("input", "r", stdin); //freopen ("output", "w", stdout); scanf ("%d %d", &N, &Q); for (int i=0; i<N; i++) scanf ("%d", &a[i]), sumA += a[i]; while (Q --) ...
ALGO
0.999842
3.139147
{ "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": "edeee8a7ef9c...
d078f340-b1dd-4ef9-95cf-b2a196240d0a
bioyoshoo/atcoder
Boot-camp/Medium-lap2/47.cpp
#include <bits/stdc++.h> using namespace std; int main() { int64_t N, P; cin >> N >> P; vector<int64_t> A(N); for (int i = 0; i < N; i++) cin >> A.at(i); vector<vector<int64_t>> dp(N, vector<int64_t>(2, 0)); if (A[0] % 2 == 0) dp[0][0] = 2; else { dp[0][0] = 1; dp[0][1] = 1...
ALGO
0.999938
4.308797
{ "github_metadata": { "branch": "master", "commit_count": 176, "repo_created_at": "2022-02-22T06:01: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": "35a0f46e...
0228b5a4-a287-4d95-8402-4d8472e0a2e8
zero-bean/Algorithm
백준/Gold/1644. 소수의 연속합/소수의 연속합.cc
#include <iostream> #include <vector> using namespace std; vector<int> primes; int n; void find_Primes() { vector<bool> visited(n + 1, true); visited[0] = visited[1] = false; for (int i = 2; i*i <= n; i++) { if (visited[i]) { for (int j = i * i; j <= n; j+=i) visited[...
ALGO
0.999905
4.928813
{ "github_metadata": { "branch": "main", "commit_count": 676, "repo_created_at": "2024-06-05T04:40: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": "a38314c4af...
fb080e2d-9b63-4e75-b36f-28dc7d38a81a
saadakhtar12/lab_saad_rafay
Matrix Inverse.cpp
#include<iostream> #include"stdafx.h" using namespace std; void Transpose(int r, int c, int a[10][10]){ int i = 0, j = 0, transpose[10][10]; //original matrix cout << endl << "Entered Matrix: " << endl; for (i = 0; i < r; ++i) for (j = 0; j < c; ++j) { cout << " " << a[i][j]; if (j == c - 1) cout << endl...
ALGO
0.999123
4.32376
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-09-13T07:27: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": "c21fda6dd0...
8ea571ad-156e-4d31-8269-a018c69b059e
rodea0952/competitive-programming
AOJ-ICPC/1144.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> #include <cfloat>...
ALGO
0.999857
3.675162
{ "github_metadata": { "branch": "master", "commit_count": 408, "repo_created_at": "2019-08-15T06:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d536cb4d...
18ba3f45-6990-456b-9beb-992d793c8a1f
waveletApplications/carmen
Burgers.cpp
/*************************************************************************** Burgers.cpp - description ------------------- begin : Wed Jun 27 2001 copyright : (C) 2001 by <NAME> & <NAME> email : <EMAIL>, <EMAIL...
ALGO
0.99995
4.382298
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-12-02T11:57:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8bccd86ff5...
2bdc7d93-6e8a-4f1d-b8de-c944f5137e66
FuHongbao/OJ_Code
56_1.cpp
/************************************************************************* > File Name: 56_1.cpp > Author: victoria > Mail: <EMAIL> > Created Time: 2019年06月27日 星期四 15时19分56秒 ************************************************************************/ #include <iostream> #include <algorithm> #include <string.h> usin...
ALGO
0.999982
3.607274
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-10-02T11:25: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": "0caf0fada9...
66171f4c-bd81-4493-90d9-01ae7aea667d
Neal854386/inter
BinaryTreeLevelOrderTraversal.h
/* Author: <NAME>, <EMAIL> Date: Apr 6, 2013 Update: Aug 15, 2013 Problem: Binary Tree Level Order Traversal Difficulty: easy Source: http://leetcode.com/onlinejudge#question_102 Notes: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, le...
ALGO
0.999997
6.111898
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2016-03-03T09:56: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": "95d981ffb...
99bd0146-17df-45b3-a6bd-ec7ba33f8b0c
theleftmostguy/opengl_lecture
playgrounds/exercise2-medium/playground.cpp
// Include standard headers #include <stdio.h> #include <stdlib.h> #include <string> #include <vector> #include <iostream> #include <fstream> #include <math.h> // Include GLEW #include <GL/glew.h> // Include GLFW #include <glfw3.h> GLFWwindow* window; // Include GLM #include <glm/glm.hpp> #include <glm/gtc/matrix_tr...
TOOL
0.919771
4.62656
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-05-13T18:18: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": "cfe074cb1d...
b2d26351-44b1-4122-9cbc-814ba27fce6d
crimson000000/OIcode
luogu/1005.cpp
#define LOCAL #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> PII; inline __int128 read() { __int128 x = 0, f = 1; char ch = getchar(); while(ch < '0' || ch > '9') { if(ch == '-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9')...
ALGO
0.999927
3.237534
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-07-06T06:03:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83d8c379c93...
db031c23-e0a5-4b73-a8d5-2e6d19a732c4
101magikarp101/USACO
scusa-2024/office-building.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define MOD 998244353 #define MOD2 1000000007 #define vt vector #define endl '\n' #define pb push_back #define pf push_front #define all(x) x.begin(),x.end() #define sz(x) (int)x.size() #define uset unordered_set #define umap unordered_map #define mset...
ALGO
0.999851
5.620142
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-09-25T15:08: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": "37f46235e83...
70ff40f8-cdb2-42e7-a86c-d554ab805915
amoghsinkar910/Data-Structures-Algorithms
Linked List/rotateLL.cpp
//author: _mayor #include <bits/stdc++.h> #define for0(i, n) for (long long i = 0; i < n; i++) #define for1(i, n) for (long long i = 1; i <= n; i++) #define forc(i, l, r) for (long long i = l; i <= r; ++i) #define forr0(i, n) for (long long i = n - 1; i >= 0; i--) #define forr1(i, n) for (long long i = n; ...
ALGO
0.999892
3.228178
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2021-02-02T17:32:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b9af459...
1c51cdd0-d742-4857-b2f0-c5d8ee5bb566
sugyan/leetcode
problems/0893-groups-of-special-equivalent-strings/main.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int numSpecialEquivGroups(vector<string>& A) { set<pair<string, string>> s; int l = A[0].length(); for (string a : A) { string even, odd; for (int i = 0; i < l; ++i) { if (i % 2 =...
ALGO
0.999692
5.391521
{ "github_metadata": { "branch": "master", "commit_count": 1320, "repo_created_at": "2019-03-30T09:31:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f652de...
88265880-d95c-4d38-a3b0-1fff0257c48f
SliverOverlord/252projects
DeNio1/main2.cpp
//<NAME> //Using the radius of a circle find the diameter, circumference, and area. #include <iostream> #include <cmath> #include <iomanip> using namespace std; const double pie = 3.141592653589793238; int main(){ double radius, diameter, circumference, area; cout << "Enter the radius of the circle: "; cin >> ra...
TOOL
0.936535
4.473509
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-08-07T19:09: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": "11fc352125...
573f1098-42da-4a44-8289-2e6522f2abf7
zachoriel/Game-Math-2-
MathLib/shapes.cpp
#include "shapes.h" #include <cmath> // transform: // position, rotation, scale /* [sx 0 0] [0 sy 0] [0 0 1] */ circle operator*(const mat3 & M, const circle & C) { circle ret = C; ret.position = (M * vec3{ C.position.x, C.position.y, 1.f }).xy; vec2 scale; scale.x = mag(M[0].xy); scale.y = mag(M[...
ALGO
0.939189
5.265326
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2017-10-11T16:03: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": "5c9adc77d...
cd791893-5767-47b6-a468-30c3e6e25c38
mimunzar/parallel_independent_sets
src/seq_ind_sets.cpp
// Name: seq_ind_sets.cpp // Description: Sequentialy computes maximal independent set in given graph. // Author: <NAME>, <EMAIL> #include "seq_ind_sets.hpp" #include <iostream> using namespace std; namespace { enum { NOP = 0, R, N, S }; // Prints row in state matrix. void printRow(vector<int> *row) { ...
ALGO
0.999721
6.566236
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2015-10-12T11:35: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": "e0ee72d4e...
aa07f16f-b599-45ce-b11e-d2657bc42231
Matistjati/Competitive-programming-solutions
open/searchwizard.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define int ll const int inf = int(1e18); typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int, int> p2; #define rep(i, high) for (int i = 0; i < (high); i++) #define repp(i, low, high) for (int i = (low); i < (high); i++) #define repe(i...
ALGO
0.999969
4.390727
{ "github_metadata": { "branch": "master", "commit_count": 870, "repo_created_at": "2021-09-14T12:27: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": "7afdfcf2...
ef53e66e-1616-4ff0-af97-eaae260c20fc
WuyangPeng/ProgrammingBooksCode
C++/算法/数据结构 C++语言描述/ch14/prg14_1.cpp
// File: prg14_1.cpp // program illustrates pushHeap()/popHeap() for vectors vA and vB; // vA is array-based tree for maximum heap and vB for minimum heap. // loop copies 7 elements from arr to vA and vB using pushHeap() // using objects greater<int>() and less<int>() respectively. // calls to popHeap() remove elements...
ALGO
0.999183
4.415627
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-08-02T03:48:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d51d3449318...
1f170503-1edb-4f62-bf7e-0e9c29fcad21
ssrrjj/Lane-detection
src/traffic_sign.cpp
#include "utils.h" #include "pcfitplane.h" #include <pcl/filters/voxel_grid.h> void FindTrafficSignByROI(CloudPtr cloud) { if (cloud->points.size() < 100) return; CloudPtr cloud_filtered(new pcl::PointCloud<pcl::PointXYZI>); vector<int> plane_inliers; Eigen::Vector4d plane_model; // downsample point cloud for b...
ALGO
0.991149
4.425755
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2021-06-18T00:26: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": "ae78e2793...
65638c3a-f94d-4a42-b5ea-cc04531f99a6
Codinator29/LeetCode
MedianOf2SortedArrays.cpp
/* https://leetcode.com/problems/median-of-two-sorted-arrays/ Median of Two Sorted Arrays Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. Example 1: Input: nums1 = [1,3], nums2 = [2] Output: 2.00000 Explanation: merged array = [1,2,3] and median ...
ALGO
0.999987
6.375636
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2021-03-03T16:12: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": "49789009c1c...
db2d0601-2987-4bf7-ab02-461d3287b906
sclshu3714/MODELWORX.CORE
OCCT.Foundation.Net/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_RstInt.cxx
// Created on: 1993-05-07 // Created by: <NAME> // Copyright (c) 1993-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser ...
ALGO
0.96618
4.784906
{ "github_metadata": { "branch": "master", "commit_count": 259, "repo_created_at": "2020-09-29T03:16:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9420113d...
2d6e851d-92a0-4093-acbe-ba27b9cc8e1a
PMS25/Facultate
Anul 1/Semestrul 2/Algoritmica grafurilor - Balcau Costel/Tema/Lab1/L01_PS2.cpp
#include <iostream> using namespace std; //Se citesc n,m1,...,mn si c1c2...cn. //Sa se verifice daca c1c2...cn este element al produsului cartezian {1,2,...,m1} x {1,2,...,m2} x ... x {1,2,...,mn} //si daca da sa se afiseze numarul de ordine al acestui element, conform ordinii lexicografice, fara generare. //EX: Pentru...
ALGO
0.999858
3.674614
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-10-31T09:01:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df23e0522...
044552cd-f109-4e24-8a2a-bbdc757d2968
maf29/ESIN
Preparar-Parcial/X98633 (DONE)/solution.cpp
#include <iostream> #include "llista.hpp" //llista doblement encadenada void Llista::separa(Llista &l2, int x){ // Pre: l2 és buida // Post: S'han separat els elements del p.i., quedant al p.i. els elements // menors a x i a l2 els elements majors a x amb el mateix ordre. node *now = _prim, *now_l2 = NULL; ...
ALGO
0.998569
4.560823
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-12-18T17:21: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": "be82e24416b5...
b433887b-e7c8-4d2d-9c36-047c3e5ab157
amrithm98/Competitive-Coding
Coding-Ninjas/Lecture-12-Graphs-2/dijkstras_algo.cpp
#include <bits/stdc++.h> using namespace std; int findMinVertex(int *dist,bool *visited,int V) { int minVertex = -1; for(int i = 0; i < V; i++) { if(!visited[i] && (minVertex == -1 || dist[i] < dist[minVertex]) ) { minVertex = i; } } return minVertex; } void dij...
ALGO
0.999976
4.542427
{ "github_metadata": { "branch": "master", "commit_count": 188, "repo_created_at": "2017-08-14T13:14:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 48, "forks": 31, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "46a789...
c706e7f8-6a59-4b7b-9811-0d002b1bce4a
tweirzweith/rucode-lectures
december2020-components/cutpoints.cpp
#include <iostream> #include <vector> #include <algorithm> #include <chrono> #include <random> using namespace std; const int N = 100 * 1000 + 17; int n, m; vector<int> g[N]; int tin[N], tup[N]; int timer = 0; bool used[N]; void dfs(int v, int p) { used[v] = true; tin[v] = timer++; tup[v] = tin[v]; ...
ALGO
0.999843
4.58594
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-09-29T15:16:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76da5ffa9f...
22cc721b-16bd-4bbe-bc3c-ec0149e4625e
maiphuonghoang/AppleOfMyEye
CTDLGT/BuoiHocChinh/Buoi18/toiuuDSU.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1000001; int n, parent[maxn], sz[maxn]; void init(){ cin >> n; for (int i=1; i<=n; i++){ parent[i] = i; sz[i] = 1; //số lượng đỉnh mà i quản lý } } int find(int u){// TỐI ƯU NÉN ĐƯỜNG if(u == parent[u]) return u; ...
ALGO
0.999597
3.730808
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2023-05-17T18:10: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": "b87d4b9b8c...
24275d95-0ae8-4995-9d3a-c8ebacc6ac3f
bwzhou/misc
leetcode/140.cpp
class Solution { public: /* void wordBreakHelper(vector<vector<int> > &mark, string s, int start, unordered_set<string> &dict, string buffer, vector<string> &result) { if (start == s.size()) { result.push_back(buffer); return; } for (auto &next : mark[start]) { ...
ALGO
0.999744
5.305027
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2014-02-03T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ead88c59...
b9587b52-4d2c-46eb-9e14-bb09cb3fa851
daveonthegit/HUNTER-CS-WORK
C/checkerboard3x3.cpp
/* Author: <NAME> Course: CSCI-135 Instructor: <NAME> Assignment: Lab 4 Prints out a checkerboard using user input */ #include <iostream> using namespace std; int main() { int width; int height; cout <<"Input width: "; cin >> width; cout << "Input height: "; cin>> height; cout<<"Shape: "<< en...
ALGO
0.964179
4.242634
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-09-23T04:56: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": "693913c2bc4...
c137254d-88b7-41a7-a1db-31ea167b9f10
SaksheePhade/Data_structures
Assignment3.cpp
/*//============================================================================ // Name : Assignment3.cpp // Author : Sakshee Roll no : 23244 // Problem Statement : Create Binary tree and perform following operations: a. Insert b. Display c. Depth of a tree d. Display leaf-nodes ...
ALGO
0.999122
4.372398
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-10-27T16:58: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": "98d43c6ba...
69ccaa63-a6f4-4fd6-a364-50e2c2a996ff
TomGrosman/PracticalCryptAnalysis
Attacker.cpp
#include "Attacker.h" #include "md5.h" #include "utils.hpp" using namespace project1; Attacker::Attacker() {} Attacker::~Attacker() { // TODO Auto-generated destructor stub } void Attacker::Attack(Fob theFob) { unsigned int reply = 0; unsigned int theKey = 0; std::vector<std::pair<unsigned int,unsigned int>...
TOOL
0.998662
3.409678
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-06-23T17:20: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": "89490b654e...
f421c77a-488a-4e94-91c4-5b4d4ee420f7
vibek01/Basic_DSA_Questions
OBJECTS AND CLASSES/singly_linked_list.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node* next; Node(int data){ this->data = data; this->next = NULL; } }; void insertAtHead(Node* &head, int value){ Node* temp = new Node(value); temp->next = head; head = temp; } void insertAtEnd(...
ALGO
0.999646
4.114667
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-05-30T17:22: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": "bce98b04e61...
370983df-71b1-4280-900b-daefb2bb1291
yekesit/OA-or-Interview-Questions
C3/LT-437 Path Sum III.cpp
// // Created by <NAME> on 2019-07-21. // #include <iostream> using namespace std; /Double DFS, do same thing for each substree from root //n^2. slow. go again and again, do many duplicate operations. // class Solution { // public: // int pathSum(TreeNode* root, int sum) { // if(!root) return 0; // ...
ALGO
0.999893
5.214023
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2019-06-14T20:33: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": "84257faa4...
eb04c5e2-1413-402c-b4f3-fba4b6c05811
Anshit01/Competitive-Programming
leetcode/june_20/coin_change_2.cpp
/* *>>>>>Anshit_Bhardwaj<<<<<* */ #include <bits/stdc++.h> #define ll long long #define f(i, x, n) for(int i = x; i < n; i++) #define dbg(x) cout << x << endl #define dbg2(x, y) cout << x << ' ' << y << endl #define dbg3(x, y, z) cout << x << ' ' << y << ' ' << z << endl #define mod 1000000007 using namespace std; int...
ALGO
0.999977
4.826024
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2020-05-23T11:21:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcbb7698...
b6859342-84fb-419c-8ced-fea61a58ca0b
mdipierro/fermiqcd
Libraries/fermiqcd_lanczos.h
///////////////////////////////////////////////////////////////// /// @file fermiqcd_lanczos.h /// @version 2009-12-21 /// @author <NAME> <<EMAIL>> /// /// Lanczos routine /// /// Distributed under GPL2 License /// /// Created with support from the US Department of Energy //////////////////////////////////////////////...
ALGO
0.998755
6.031287
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2015-12-20T15:28:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 5, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6e765a62...
2b8e1d50-2409-4924-8b66-9cce79bbf95e
fhall18/data_structures
sort/main.cpp
// header files #include "age.h" #include "bubble.h" #include "Crime.h" #include "heap.h" #include "insertion.h" #include "merge.h" #include "quick.h" #include "radix.h" #include "selection.h" // packages #include <chrono> #include <iomanip> #include <iostream> #include <vector> #include <string> using namespace std; ...
ALGO
0.998944
4.526756
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-05-09T23:16: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": "2a6d3d092...
2602cfe9-b607-47f7-bd34-bd8de64ee52d
kassonlab/gmxapi
api/nblib/integrator.h
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2020, by the GROMACS development team, led by * <NAME>, <NAME>, <NAME>, and <NAME>, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. * * GROMACS is f...
ALGO
0.990599
6.849015
{ "github_metadata": { "branch": "master", "commit_count": 19315, "repo_created_at": "2017-05-25T14:05:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 53, "forks": 13, "issues": 93, "pull_requests": 2 }, "file_meta": { "content_id": "bb37...
f4f9dabf-7eaa-431b-bdb2-aecfa63446ce
deniscostadsc/playground
solutions/beecrowd/1470/1470.cpp
#include <algorithm> #include <cstdint> #include <iostream> std::int64_t *fold( std::int64_t *tape, std::int16_t tape_size, std::int64_t *new_tape, std::int16_t new_tape_size, std::int16_t folding_index) { std::int16_t i, j, shift = 1; if (folding_index >= tape_size) { return tape;...
ALGO
0.99963
4.793607
{ "github_metadata": { "branch": "main", "commit_count": 2321, "repo_created_at": "2012-07-10T11:53:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 21, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c23209...
0b6ed35b-708b-4826-948c-eb213300143a
polgrisha/AlgorithmsMIPT
semester2/AdditionToStronglyBounded/main.cpp
/* Дополнение до сильносвязного. * Дан ориентированный граф. * Определите, какое минимальное число ребер необходимо добавить, * чтобы граф стал сильносвязным. В графе возможны петли.*/ #include <iostream> #include <vector> using std::cin; using std::cout; using std::vector; using std::max; void timeDfs(const vec...
ALGO
0.999855
4.728967
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-04-17T16:17: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": "e37dadd96a...
4806caa2-6b2d-4155-8465-10385eb22d42
sp9324/questions-that-taught-me-something-new
coin_combinations_2.cpp
#include <iostream> #include <vector> #include <set> #include <algorithm> #include <utility> #include <iterator> #include <cmath> #include <limits> #include <numeric> #include <map> #include <climits> #include <iomanip> // #include <bits/stdc++.h> using namespace std; #define ll long long #define nl "\n" #define all(x...
ALGO
0.999993
4.722486
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2024-07-25T14:37: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": "3db10d5bb4c...
af352570-e2ce-4c87-ad50-d66923c7aef9
Voregen/Algorithms
all/sparce_table_SLAVIC.cpp
struct sparse_table { int dp[MAXN][MAXLOG]; int prec_lg2[MAXN], n; sparse_table() { memset(dp, 0, sizeof(dp)); memset(prec_lg2, 0, sizeof(prec_lg2)); n = 0; } void init(vector<int> &a) { n = a.size(); for(int i = 2; i < 2 * n; i++) prec_lg2[i] = prec_lg2[i >...
ALGO
0.999912
4.078556
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-09-25T09:42: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": "8ba5a3ac2e...
48454f23-86ba-4ab3-85af-5787716fc310
luoyuping/APUE
double_pipe.cpp
#include <iostream> #include <unistd.h> #include <sys/types.h> #include <cstring> #include <sys/wait.h> using namespace std; // 管道读写的顺序不要搞错,是先写再读,一读一写,可能会造成死锁 // 两者都先读后写,一定造成死锁 void child_rw_pipe(int fd_r,int fd_w) { char* message_send =(char*) "the message is from the child"; char message_recv[100]; ...
TOOL
0.946355
3.743418
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2014-10-08T15:35: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": "3fb916416...
8a2c79ec-154f-4842-9200-87af8bc6bb2d
zuhaib786/CSES_SOLUTIONS
Dynamic Programming/RemovalGame.cpp
#include<bits/stdc++.h> #define MAX 1000000007 using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin>>n; vector<int>v(n); for(int i = 0;i<n;i++) { cin>>v[i]; } long long int prefix_sum[n+1] = {0}; for(int i = 0;i<n;i++) { p...
ALGO
0.999997
3.487077
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2021-06-08T12:57:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8f921296cd...
f60f3f85-d171-4944-a50e-26d6714f3d78
manelsa1912/FCUP
Ia/2ano/Grupo39_IA1_Final/source/search.cpp
#include "search.h" double pheromones[MAX][MAX]={0}; void nearest_Neighbour(Map *m){ int r =rand()%(m->Points.size()-1); Point *inicial_Point = m->Points[r]; Point *final_point; m->Openlist.push_back(inicial_Point); m->Path.push_back(inicial_Point); bool goalFound=false; w...
ALGO
0.999995
3.796572
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-02-27T10:02: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": "5b2370d58e...
ebac69eb-1d15-4a72-a1ee-79501e868365
shepardo/my_daily_leet_codes
may2020/8-binary-tree-tilt/solution.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.999996
6.138961
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-12-10T05:38: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": "360ce8df5...
e3b80a50-9ef5-4546-8c31-316694e7caa1
marcosajc/cloned_mk
src/libmeasurement_kit/http/request.cpp
// Part of measurement-kit <https://measurement-kit.github.io/>. // Measurement-kit is free software. See AUTHORS and LICENSE for more // information on the copying conditions. #include "../http/request_impl.hpp" #include "../common/utils.hpp" namespace mk { namespace http { using namespace mk::net; /* _ __...
WEB
0.968499
7.027116
{ "github_metadata": { "branch": "master", "commit_count": 2461, "repo_created_at": "2017-05-07T04:41:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd0d6c5...
a2e3448f-7afb-4ad8-a1df-177ceb2ca22a
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/sorted-gcd-pair-queries-Solution.gcdValues/177841_+Info.cpp
_PUBLIC_ char *strupper_talloc_n_handle(struct smb_iconv_handle *iconv_handle, TALLOC_CTX *ctx, const char *src, size_t n) { size_t size=0; char *dest; if (!src) { return NULL; } /* this takes advantage of the fact that upper/lower can't change the length of a character by more than 1 byte */ dest = ...
ALGO
0.998761
4.888453
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-22T14:39:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4fe67b01d53f...
509f4f83-5144-49af-ae81-f107080d9e50
the-nexus/AdventOfCode2021
AdventOfCode/Source/Challenges/Challenge_15.cpp
#include "Challenge_15.h" #include "../Helpers/FileHelpers.h" #include <algorithm> //////////////////////////////////////////////////////////////////////////////////////////////////// struct CellSortByHighestCostPredicate { bool operator() (CChallenge_15::SCell const* lhs, CChallenge_15::SCell const* rhs) const ...
ALGO
0.999918
5.448703
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-11-24T16:52:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6013da2ce...
3b3d7366-f00c-4954-a750-03f6edb38ac7
chrisdxie/rrtstar_and_trajopt
other_things/optcontrol/double_integratorV2/double_integrator_sqp.cpp
extern "C" { #include "double_integrator_QP_solver.h" double_integrator_QP_solver_FLOAT **f, **lb, **ub, **C, **e, **z; } #include <iostream> #include <vector> #include <ctime> #include "../util/logging.h" #include "../../dynamics_library/dynamics_library.hpp" using namespace dynamics_library; #define INFTY 1e10 #...
ALGO
0.999921
4.744506
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2014-07-23T07:47:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48461acc8...
00d3df24-f4ac-434b-b006-e104439fb851
scratchapixel/scratchapixel-code
global-illumination-path-tracing/indirectdiffuse.cpp
//[header] // This program simulates indirect diffuse using Monte-Carlo integration //[/header] //[compile] // Download the raytracetransform.cpp, geometry.h and teapot.geo file to a folder. // Open a shell/terminal, and run the following command where the files are saved: // // c++ -std=c++11 -o indirectdiffuse -O3 in...
ALGO
0.974663
6.394962
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2022-12-24T11:19:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 372, "forks": 77, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "51eaace9...
49aa988d-30e4-429e-87d9-27a600a8dc40
goltong1/RoboCup_Humanoid_Soccer_Localization_2022
localization_v2/src/robit_mcl.cpp
#include "../include/localization_v2/robit_mcl.h" #define alpha1 0.001 #define alpha2 0.001 #define alpha3 0.001 #define alpha4 0.001 #define deg(r) (180.0/M_PI) * r // radian to degree #define rad(d) (M_PI/180.0) * d // degree to radian #define AUGMENTED 0 #define ROBOTAROUND 1 #define AROUNDRANGE 20 bool drawlin...
ALGO
0.980466
4.829193
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-11-29T11:35:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "731fd3349d4c...
2170f831-1c63-4f70-8528-d5cf5f661664
ermine27/atcoder
abc/075/075-c2.cpp
/* 連想配列を使ってDFSで解く */ #include <bits/stdc++.h> using namespace std; #define _overload2(a,b,f,...) f #define _overload3(a,b,c,f,...) f #define _rep1(i,n) for(int i = 0; i < (int)(n); ++i) #define _rep2(i,s,n) for(int i = (int)(s); i < (int)(n); ++i) #define rep(...) _overload3(__VA_ARGS__, _rep2, _rep1)(__VA_ARGS__) #d...
ALGO
0.999981
3.972502
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2022-05-16T12:56:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "43bd074e0b...
26db076a-decb-45d7-ba99-41d1c177270a
kabirchhabra/Leetcode
23-merge-k-sorted-lists/23-merge-k-sorted-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* mergeL...
ALGO
0.999902
6.140369
{ "github_metadata": { "branch": "main", "commit_count": 474, "repo_created_at": "2022-01-10T06:08: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": "dd59f33b3c...
22387139-87aa-4121-8558-609632fe62b4
xg-wang/leetcodes
CppCode/E_283_Move_Zeros.cpp
#include <vector> #include <iostream> using namespace std; class Solution { public: void moveZeroes(vector<int>& nums) { vector<int>::iterator it_next; for (vector<int>::iterator it = nums.begin(); it != nums.end(); ++it) { if (*it == 0) { it_next = it < it_next ? it_ne...
ALGO
0.999884
6.000743
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2016-07-02T14:32:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a95f08d5b...
2d430704-33e4-4554-8c0c-460c71909671
bangash-media/Fucntions-for-minimum-among-3
Lab8-T5-211232..cpp
#include <iostream> /*a function that finds the minimum number among 3 default arguments of function. Now find the minimum number again by calling the same function, with 2 default arguments and 1 passed by value. Do it again for all arguments passed by value*/ using namespace std; void minima(int num1=5,int num2=6,in...
ALGO
0.998504
4.726486
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-09-10T14:59: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": "7d943b1318c8...
c21646c5-5c7c-4624-8161-215147435404
ishandutta2007/codeforces-t
tdpencil/normal/987/C.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define f first #define s second #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int main() { cin.tie(0)->sync_with_stdio(0); cin.ex...
ALGO
0.999969
3.757471
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "c3ff1b7eb272...
08fad769-4a4b-4ab3-98b6-cd675d13f03e
sushantkumar143/Complete-Data-Structures
DSA with C++/Stack/infixToPostfix.cpp
// #include<iostream> // #include<stack> // using namespace std; // bool isOperator(char c){ // return c=='+' || c=='-' || c=='*' || c=='/' || c=='^'; // } // int precedence(char c){ // if(c=='+' || c=='-'){ // return 1; // } // if(c=='*' || c=='/'){ // return 2; // } // else{ ...
ALGO
0.999892
5.661472
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-05-28T06:34: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": "b82ab0a543...
61e5cf43-f1d8-4808-bc38-22de0d98d707
akhilsharmaa/Competitive-Programming
Codeforces-Practice/A_Divide_and_Multiply.cpp
/* Author - @akhilsharmaa C++ code by <NAME> */ #include <bits/stdc++.h> using namespace std; #define ll long long int #define vt vector #define pb push_back #define pNo cout<<"NO"<<endl; #define pYes cout<<"YES"<<endl; #define loop(i,a,b) for(int i=(a);i<=b;++i) ...
ALGO
0.999927
4.552153
{ "github_metadata": { "branch": "master", "commit_count": 757, "repo_created_at": "2021-09-05T16:38:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "836e2f56...