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
1be8c945-933c-4876-861d-919702e0ab9d
peter18181818/Snake
Snake/functions.cpp
#include <iostream> #include <cstdlib> // system("CLS"); rand(); srand(time(NULL)); #include <windows.h> // Sleep(500); // void cursor_return(int x, int y) #include <conio.h> // getch(); #include "functions.h" using namespace std; void board_filling(int & board_width, int & board_height, char ** board, int & snake_x_c...
TOOL
0.902736
3.891867
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-06-20T08:27:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d32f71cef...
368cc4c7-a65a-43c9-942f-b9a13b5d66f3
Ahana001/Data-structure
Other/ticket.cpp
// g++ index.cpp -o index // ./index // ceil result <= x #include <iostream> #include <queue> #include <string> class TicketQueue { private: std::queue<std::string> queue; public: bool isEmpty() const { return queue.empty(); } void enqueue(const std::string &item) { queue....
ALGO
0.998591
6.431681
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2023-12-29T06:58:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "357490a6281...
663f3775-819e-4ccd-9e22-8b4d657c26d0
NekomammaT/StocDeltaN
source/StocDeltaN_conf.hpp
#ifndef INCLUDED_StocDeltaN_hpp_ #define INCLUDED_StocDeltaN_hpp_ #include "JacobiPDE_conf.hpp" #include "SRK32_conf.hpp" class StocDeltaN: virtual public JacobiPDE, virtual public SRKintegrater { protected: string model; double maxstep, tol, timestep, Nmax, deltaN; int recursion; public: StocDeltaN(){} ...
ALGO
0.996571
4.519497
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2018-09-07T02:57: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": "2404e052c...
8d21568e-0473-4167-a37c-9e4e73a993c6
01shuaib01/DSA-Question
ARRAY/02_MaxMinAnArray.cpp
#include <iostream> using namespace std; void print(int arr[], int size); int getMinMax(int arr[], int size); int getMinMax(int arr[], int size) { // initialize variable. int min = arr[0]; int max = arr[0]; // looping for (int i = 0; i < size; i++) { if (arr[i] < min) min ...
ALGO
0.999538
4.592717
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-01-21T10:17:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3edd877215...
f5c5b88e-be71-4703-b0bb-bdc5bdaf8cc7
yyytir777/Codes
C++/Baekjoon/9934.cpp
// 9934 cpp #include <bits/stdc++.h> #define MAX 100000 using namespace std; // LVR int k, n = 1; int seq[MAX]; vector<int> tree[10]; void input() { cin >> k; int cnt = 0; while(cnt < k) { n *= 2; cnt++; } for(int i = 0; i < n; i++) { cin >> seq[i+1]; } } int cnt = 1; void dfs(int d, int s,...
ALGO
0.999956
3.753974
{ "github_metadata": { "branch": "main", "commit_count": 343, "repo_created_at": "2023-01-13T17:49: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": "c621819386...
2067e548-c769-4935-b231-844e860eeb5a
jiyadkhan10/FAST-Resources
Object Oriented Programming/OOP Assignments/Assignment 3/Question 10.cpp
//Name: <NAME> //Roll Number: 19I-1771 //Assignment 3 //Q10 #include<iostream> #include<cstring> using namespace std; class Array { private: // think about the priate data members int *array; int size; public: Array() //default constructor { array = NULL; size = 0; }...
ALGO
0.997916
4.041523
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-03-01T17:56:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc17fa6cf4f...
3781dc77-87e0-4f84-a28b-8d0faad67f2a
luorui93/novelti
novelti/src/map_divider_cwave.cpp
/* +--------------------------------+ * | \ | * | ____ \ | * | / \ | | * |/ \ 1 | 0 | * | \ / | * | \ _/ | ...
ALGO
0.997625
4.843464
{ "github_metadata": { "branch": "master", "commit_count": 461, "repo_created_at": "2021-11-01T16:53: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": "b07ad67c...
426cf057-7214-4979-8cb9-d08c7203dc66
mehstruslehpy/Documents
C/bigprimes/mersenne_bigint_lucas.cpp
/***************************************************** <NAME> CISP 400 - MW 5:30 pm Programming Project 1 September 11, 2017 Please grade extra credit *****************************************************/ #include <iostream> #include <gmp.h> bool LucasLehmer ( unsigned long long n ); using namespace std; int ma...
ALGO
0.995485
4.791641
{ "github_metadata": { "branch": "master", "commit_count": 170, "repo_created_at": "2016-05-14T15:22:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2132e481...
ddbe4cf6-eb17-47f9-88a0-ec7b834db168
raincross7/code-similarity
codes/train_code/problem111/problem111_333.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 114514 #define NIL -1 struct Node {int p,l,r;}; //Node?????????????????????????????????????????????????????±??????????????? Node T[MAX]; int n,D[MAX]; void print(int u){ int i,c; printf("node %d: ",u); printf("parent = %d, ",T[u].p); printf...
ALGO
0.99991
4.089797
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac1c36debce8...
1c2afaf4-2ebf-4c99-bd7d-662291a4430e
Geminicodedreamer/Cplus
小红不想做平衡树.cpp
#include <bits/stdc++.h> #define int long long using namespace std; const int N = 2000010; int T; int n; int a[N]; vector<int> v; void solve() { cin >> n; v.push_back(1); for (int i = 1; i <= n; i++) cin >> a[i]; int flag = 1; if (a[1] > a[2]) flag = 0; for (int i = 2; i < n; ...
ALGO
0.999892
4.10929
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-04-22T05:05: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": "288dba173e93...
23c666eb-a473-457c-8f91-7511009769df
vivCoding/practice
leetcode/1043_partitionArrayMaxSum.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> pll; typedef pair<ld, ld> pld; typedef vector<ll> vll; const ll MOD9 = 1e9 + 7; /* * Problem: https://leetcode.com/problems/partition-array-for-maximum-sum/ */ class Solution { public: int maxSumAfte...
ALGO
0.999804
4.978809
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2021-10-28T17:28: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": "6ece8e6d3aa...
c728b190-c2a8-4824-b7ba-336fdddda288
trilinos/Trilinos
packages/rol/src/step/krylov/ROL_Lanczos.hpp
// @HEADER // ***************************************************************************** // Rapid Optimization Library (ROL) Package // // Copyright 2014 NTESS and the ROL contributors. // SPDX-License-Identifier: BSD-3-Clause // *************************************************************************...
ALGO
0.998378
6.816824
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
78d6682e-674d-4bad-af50-28d0b7f961c5
Antonc3/Competitive-Programming
codeforces/practice/edu/Segment Tree Part 2/addarithmeticprogressiononsegment.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef ll item; struct segtree{ vector<item> S; vector<item> a_; vector<item> d_; int size; item NEUTRAL_ELEMENT = 0; item NO_OP = 0; item calc_op(item a, item b){ return a+b; } void init(int n){ ...
ALGO
0.99962
4.56109
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-06-04T01:54:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86602a690e6...
aeb0e9ec-4f21-4031-9928-9d338d08825c
notjedi/cp
codeforces/hexadecimaltheorem.cc
#include<iostream> #include<math.h> #include<vector> using namespace std; using ll = long long; vector<ll> DP; void fibo(ll n) { ll t1 = 0, t2 = 1, ans = 1, i = 2; DP[0] = 0; DP[1] = 1; while(ans <= n) { DP[i] = ans; t1 = t2; t2 = ans; ans = t1 + t2; i++; ...
ALGO
0.999996
3.661417
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2021-03-18T08:21:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c2a56ee5...
3cc52491-61dd-4ee4-84cf-76a8520d2741
letscodedanish/CrackYourPlacement
Minimum Moves to Equal Array Elements II.cpp
class Solution { public: int minMoves2(vector<int>& nums) { int ans = 0; sort(nums.begin(),nums.end()); int n = nums.size(); if(n == 1) return 0; int num = nums[n/2]; for(int i=0;i<nums.size();i++){ ans += abs(num - nums[i]); } return ans;...
ALGO
0.999908
6.007793
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-07-16T14:08: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": "4c47a447ba0...
0eb9de5b-99b8-4ac0-8ddc-1bb1c85a21dd
19865044959/code_test
leetcode/leetcode/剑指 Offer 68 - I. 二叉搜索树的最近公共祖先.cpp
#include<iostream> #include<assert.h> #include <vector> #include<algorithm> #include<queue> #include<deque> #include<unordered_set> using namespace std; class TreeNode { public: int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; //利用二叉树性质 // class Solutio...
ALGO
0.999986
5.931899
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-05-13T01:40: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": "b9ef1ad7380d...
6b9b8478-8d7f-43f9-969a-7b1c16aa59ee
zowiter/parallel
pthread_create_md5.cpp
#include <cstring> #include <iomanip> #include <iostream> #include <atomic> #include <openssl/md5.h> #include <pthread.h> #include <sstream> #define NUM_THREADS 2 std::atomic<bool> flag{false}; struct ThreadParams { unsigned long long start; unsigned long long end; std::string original_password; }; void...
ALGO
0.979022
5.757872
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-10-26T21:58: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": "6fe071362baa...
673bc663-7a9b-4897-a340-0c2fd3a38cd0
duyn-cate/duyn-cate
MST/dong_co.cpp
#include <bits/stdc++.h> using namespace std; struct node { int u, v, w; bool operator <(const node &a) { return w < a.w; } }; struct DSU { int n; vector<int> pa,sz; DSU(int size) { this->n = size; pa.resize(n + 1); sz.resize(n + 1); for(int i = ...
ALGO
0.999991
3.656365
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-11-14T12:57:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84d6fe679e8...
74515792-e0a4-4034-8cff-c6fc9cf844e1
kensh1ro/NativeTeleBackdoor
telebot/Utils.cpp
#include "Utils.hpp" std::string replaceAll(std::string* str, const std::string& from, const std::string& to) { size_t start_pos = 0; while ((start_pos = str->find(from, start_pos)) != std::string::npos) { str->replace(start_pos, from.length(), to); start_pos += to.length(); // Handles case where 'to' is a subst...
TOOL
0.915128
5.600276
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-06-18T10:28:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2559aa322d...
f0894325-89c0-4824-baa4-4726ebfc9475
Sambodhi-Roy/LeetCode
C++/Move Zeroes/move_zeroes.cpp
/* 283. Move Zeroes Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements. Note that you must do this in-place without making a copy of the array. Example 1: Input: nums = [0,1,0,3,12] Output: [1,3,12,0,0] Example 2: Input: nums = [0] Output: [0] ...
ALGO
0.999986
6.020931
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-05-10T18:46: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": "a3573eb96f4...
0c0871d1-4d46-4e11-a485-ba3aaa410226
keijak/comp-pub
cf/contest/1646/D/main_D.cpp
#include <bits/stdc++.h> #define REP_(i, a_, b_, a, b, ...) for (int i = (a), END_##i = (b); i < END_##i; ++i) #define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define ALL(x) std::begin(x), std::end(x) using Int = long long; using Uint = unsigned long long; using Real = long double; template<typen...
ALGO
0.999911
4.021732
{ "github_metadata": { "branch": "master", "commit_count": 2362, "repo_created_at": "2020-04-12T08:07: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": "86aa5af...
683e53b8-86f4-4b1f-bbaa-43c74c7740ac
agente-e-alex-palmada/Fronto_game
Fronto_game/ballCollisionWithBlock.cpp
#include "ourheader.h" void ballCollisionWithBlocks(Sprite& ball, FloatRect& ballBounds, Sprite block[], FloatRect blockBounds[], int& blockCount, float& ballSpeedX, float& ballSpeedY) { for (int i = 0; i < BLOCKS; ++i) { blockBounds[i] = block[i].getGlobalBounds(); // Check if the ball touches a ...
ALGO
0.955727
4.822833
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2024-12-16T09:02: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": "cc7827ef7e0...
f4b5a90a-139a-4941-b117-ec549ba3b99a
TeamCrazyPerformance/Algorithm_Basic
김영진/6주차/1463.cpp
#include<iostream> using namespace std; int dp[1000001] = { 0,0,1,1 }; int tabulation(int n) { if (n == 1) { return 0; } if (dp[n]) { return dp[n]; } if (n % 3 == 0) { if (!(n & 1)) { if (dp[n / 2] < dp[n / 3]) { return dp[n] = dp[n / 2] + 1; } } if (dp[n - 1] < dp[n / 3]) { return dp[n] =...
ALGO
0.999983
3.800146
{ "github_metadata": { "branch": "main", "commit_count": 269, "repo_created_at": "2023-02-28T15:20:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f05f6490923...
436018fd-d2bf-492c-b138-b3c7caa7cd17
DemoAtom/seng1120A1
SENG1120A1/linked_list.hpp
/* * LinkedList.hpp * Written by : SENG1120 Staff (c1234567) * Modified by  : <NAME> C3437787 * * This class represents the template implementation for a LinkedList class. * This file should be used in conjunction with Assignment 1 for SENG1120. */ template <typename T> LinkedList<T>::LinkedList() { // Create s...
TOOL
0.967098
6.184924
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-22T00:47: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": "910040ce1892...
31d9904e-5d6a-48e5-a9fe-4a45ced8780b
stefdasca/CompetitiveProgramming
Codeforces/CF1059-D2-C.cpp
#include<bits/stdc++.h> #pragma GCC optimize("O3") #define mod 1000000007 #define fi first #define se second using namespace std; int n; int frq[1000002]; bool still[1000002]; int mx = 1; int cc = 0; map<int, int>m; void ciur() { int val = 0; for(int i = mx + 1; i <= n; ++i) { frq[i] = 0; if...
ALGO
0.999977
3.738199
{ "github_metadata": { "branch": "master", "commit_count": 917, "repo_created_at": "2018-09-28T18:19:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 48, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0da48af...
7b185159-f89d-4d56-b1b9-b5383f074fe5
mayank7jha1/ISA_FEB
Lecture 23/Hashmap.h
#include<bits/stdc++.h> using namespace std; const int N = 0; template<typename T> // <> //Jaha Jaha aapne T likha hoga main jo user mujhe data type batayega main //t ko usse replace kardungaa: //Main Sirf Key ko generic bana raha hu class node { public: int value; T key; node<T> *next; node(T s, int d) { key...
ALGO
0.96284
3.418867
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-02-15T11:09:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32b6aaf15cc...
971147a6-b0dc-438d-a10c-1a165668da49
MiguelABatista/icpc-training
vjudge/706921/b.cpp
#include <bits/stdc++.h> using namespace std; typedef int ll; typedef pair<ll, ll> p64; typedef vector<ll> v64; #define forn(i, s, e) for(ll i = (s); i < (e); i++) #define ln "\n" #if defined(DEBUG) #define _ (void)0 #define debug(x) cout << __LINE__ << ": " << #x << " = " << x << ln #else #define _ ios...
ALGO
0.999862
4.148823
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-03-10T22:08: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": "94db38ea67cf...
23131e2b-dd4f-4842-937e-149c9b99409c
kaloyantihomirov/DSA
graphs/dynamicGraphConnectivityAndCycleDetection.cpp
/* Problem: Given a graph with initially N vertices and no edges, edges are added one by one. After each edge addition, output: 1. The number of connected components in the graph. 2. If the edge created a cycle, append "CYCLE FORMED!" to the output. Input: - First line: Integer N (number of vertices). - Following line...
ALGO
0.999775
5.927664
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-10-10T20:27:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0f657cd2c9...
4d00ff5d-d5cf-4d57-a4b3-02467dafba6f
ecmwf/eccodes
src/eccodes/deprecated/grib_accessor_class_number_of_points_gaussian.cc
#if 0 /*Legacy mode*/ static long num_points_reduced_gauss_old(grib_handle* h, long nj, long pl[], long max_pl, double lats[], double angular_precision, double lat_first, double lat_last, ...
ALGO
0.967995
4.606071
{ "github_metadata": { "branch": "develop", "commit_count": 11453, "repo_created_at": "2018-12-10T19:52:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 227, "forks": 93, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "5f5...
c4b931df-a039-4617-8411-c3f0eebd2230
xxhaonan/awesome_tools
calibrate_zhengyouzhang/ch5/cameraCalibration/calibration.cpp
#include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/calib3d/calib3d.hpp" #include "opencv2/highgui/highgui.hpp" #include <iostream> #include <fstream> #include <boost/format.hpp> // for formatting strings using namespace cv; using namespace std; int main(int argc, char **argv) ...
TOOL
0.949297
3.792898
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-31T05:27: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": "1ef0459312bd...
ab8a0faa-ed27-4666-a346-f49998799d6f
xieyi4650/nowcoder-BAT-algorithm-practice
7_binary_tree/tree_to_squence_nore.cpp
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class TreeToSequence { public: void pre(TreeNode* root, vector<int>& result) { if(NULL == root) return; stack<TreeNode*> stk; ...
ALGO
0.999984
5.357367
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-09-07T12:59: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": "81ca13e46...
2c7f314f-cd82-45f4-b178-a2afbdae266b
gurusarath1/Algorithms_2
LeetCode_Problems/BinarySearchTree/Convert_Sorted_List_to_Binary_Search_Tree.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) {} * }; */ /** * Definition for a binary tree node. * struc...
ALGO
0.999996
6.484578
{ "github_metadata": { "branch": "master", "commit_count": 845, "repo_created_at": "2019-12-14T09:36: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": "649c1582...
a4755916-95a5-4675-bac4-fc66bc7412e9
eryoyo/AlgorithmGo
leetcode/editor/cn/64_minimum-path-sum.cpp
//给定一个包含非负整数的 m x n 网格 grid ,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。 // // 说明:每次只能向下或者向右移动一步。 // // // // 示例 1: // // //输入:grid = [[1,3,1],[1,5,1],[4,2,1]] //输出:7 //解释:因为路径 1→3→1→1→1 的总和最小。 // // // 示例 2: // // //输入:grid = [[1,2,3],[4,5,6]] //输出:12 // // // // // 提示: // // // m == grid.length // n == grid[i].lengt...
ALGO
0.99999
6.280027
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2020-12-26T13:21: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": "7bdbd0718...
45cd4737-8bf0-4f8a-9dbd-879e13373127
Taspol/Kalmanfilter
STM32KalmanFilter/BMI088EKF.h
#ifndef BMI088_EKF_H #define BMI088_EKF_H #include <cmath> #include <cstring> #include <cstdint> /** * @brief Real-time Extended Kalman Filter for BMI088 sensor * * Optimized for: * - Hard real-time constraints (deterministic execution time) * - High sample rates (1kHz+) * - High G-force environments (up to 50G...
ALGO
0.911654
7.462662
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-06-05T19:07: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": "74a8c6c95771...
8505914c-6166-4936-8d7c-399b0399a280
GloriaMoraaRiechi/Spring-2025
CSE703/Assignemnt2/question3.cpp
/* Create a simple program that defines two 1-D arrays: x=[15, 10, 30, 20, 17] and y=[2, 7, 3, 4, 5] and a third empty array of size 5. Then first use the for loop to subtract array y from array x element-wise and store the results on the array z. Second use another for loop to print the elements of the array z each...
ALGO
0.999033
4.608712
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2025-02-16T21:48: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": "5c7911144f3...
309d7348-26f0-4e8c-93c1-a7529d4913a0
101rror/CodeForces
Practice_Problems/B - Codeforces Subsequences.cpp
///Codeforces Subsequences /** * * author :: 101rror * **/ #include <bits/stdc++.h> using namespace std; const int N = 1e6+10; #define MAX 1000000 //101rror #define FastRead() (ios_base:: sync_with_stdio(false),cin.tie(0)) #define YES cout << "YES"; #define NO co...
ALGO
0.999972
3.119597
{ "github_metadata": { "branch": "main", "commit_count": 1002, "repo_created_at": "2023-03-30T18:09:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6460ac226...
00424a1e-1907-4cc4-afae-742895e3736f
davidepatti/epic-explorer
spea2/src/containers.cpp
/* * containers.cpp * spea2 * * Created by <NAME> [gmorales(at)diit.unict.it] on 24/11/07. * */ #include <assert.h> #include <iostream> #include <iomanip> #include <cstring> #include <list> #include "utility.h" #include "containers.h" using namespace std; /*---INDIVIDUAL---*/ unsigned int individual::uid = ...
ALGO
0.987436
4.29502
{ "github_metadata": { "branch": "master", "commit_count": 231, "repo_created_at": "2015-03-23T11:07:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8e93104...
73390437-d2d1-4d7a-a10f-e04168097c60
mooner92/2022algo
17936-트리와쿼리13/17936-트리와쿼리13_1.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; const int MAXN = 100000; struct node { int min_val, max_val, sum; int lazy_set, lazy_add; bool has_set; }; int n, m, r; vector<int> adj[MAXN + 1]; int a[MAXN + 1]; int parent[MAXN + 1], depth[MAXN + 1], siz...
ALGO
0.999938
4.847274
{ "github_metadata": { "branch": "main", "commit_count": 559, "repo_created_at": "2022-02-22T15:07:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81265d113...
2ae9e7cf-afad-4042-b62d-cac6c34c48f4
vbalab/algorithms_and_data_structures
problems/leetcode/0167_two_sum_ii__input_array_is_sorted.cpp
#include <algorithm> #include <cstdint> #include <stdexcept> #include <vector> class Solution { public: size_t BinarySearch(size_t left, size_t right, const std::vector<int32_t>& numbers, int32_t target) { while (left < right) { size_t mid = left + (right - left) / 2; ...
ALGO
0.999871
6.238071
{ "github_metadata": { "branch": "master", "commit_count": 304, "repo_created_at": "2023-12-29T00:01:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b10a5bfe...
a03764cd-3532-4de7-9f82-e582d211f31b
fuhailin/show-me-cpp-code
leetcode_cc/CodingInterview/数组中出现次数超过一半的数字.cpp
#include <iostream> #include <vector> using namespace std; bool CheckMoreThanHalf(vector<int> &nums, int number) { int count = 0; for (auto num : nums) { if (num == number) ++count; } if (count * 2 > nums.size()) return true; return false; } int MoreThanHalfNum(vec...
ALGO
0.999954
5.189748
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2018-04-06T11:47: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": "2607c49c...
4807250f-6efe-49f9-b85a-a27d83d3d36c
ShobhitBehl/Competitive-Programming
Codeforces Solutions/990C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lli; #define pi 3.141592653589793238 typedef pair<lli,lli> pll; typedef map<lli,lli> mll; typedef set<lli> sl; typedef map<int,int> mii; typedef set<int> si; #define x first #define y second #define mp make_pair #define pb push_back lli power(lli a, l...
ALGO
0.999673
3.943377
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-01-17T18:22: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": "7fe9937e65...
39c52535-481a-469e-8c2e-23178ced5f51
AyushUnleashed/CppBase
ApnaCollege/8.6Subarrays/BF2MaximumSumSubarray.cpp
#include<iostream> #include<conio.h> #include<cmath> using namespace std; int main() { system("cls"); int n; cin>>n; //size of array int arr[n],currSum=0,maxSum=INT32_MIN; int start=-1,end=-1; //pointers for printing sub array in last //Enter Array for(int i=0;i<n;i++) { cin...
ALGO
0.99983
3.981626
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2021-10-15T14:01:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5253806fa...
75e8f72f-6026-41e0-9900-8a71a5e573ff
dvyn01/Codeforces_Submissions_dvyn01
1033/1033-C-Permutation_Game.cpp
/* * AUTHOR : Divyanshu * */ #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define ll long long #define ull unsigned long long #define f(a,b) for(ll i=a; i<b; i++) #define mod 1000000007 #define mp make...
ALGO
0.999926
3.543768
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-08-09T17:42:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29ffca0b8d...
aa1b8fa3-9a34-456f-bc89-6d2bc06b45e1
fearlessghoul/Cplusplus
19 Utilities/Polynomial.cpp
#include <iostream> #include <initializer_list> #include <cmath> #include <algorithm> #include <sstream> template <typename T> class Polynomial { private: T* terms; // Pointer to array of coefficients int degree_; // Degree of the polynomial public: Polynomial()=default; // Constructor using initial...
TOOL
0.978794
6.696446
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-18T04: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": "46a6fb0aaa17...
47cfd920-1ad7-4051-a777-cc5f33be8f0c
fextivity/codeforces-submissions
codeforces/1167/F.cpp
#include<bits/stdc++.h> using namespace std; // Shortcut #define int long long #define endl '\n' #define eb emplace_back #define pb push_back #define pob pop_back #define mp make_pair #define upb upper_bound #define lwb lower_bound #define fi first #define se second #define For(i, l, r) for (int i = l; i < r; i++) #d...
ALGO
0.999949
4.05349
{ "github_metadata": { "branch": "master", "commit_count": 1484, "repo_created_at": "2020-12-21T15:42:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f346d17...
616a5bcf-b1a2-42ca-bae2-609591705aa0
annaliselacourse/Compiler
main.cc
//<NAME> #include <iostream> #include <cstdlib> #include <cstdio> #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <ctype.h> #include <string.h> #include <sstream> #include "run.h" #include "lex.h" #include <vector> using namespace std; Lexer lexer; Node * head = NULL; Node * previous = NULL; N...
TOOL
0.971088
3.648062
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-01-15T19:31: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": "7115a30422ea...
a374f240-dc36-4411-93b3-44ec6e0154e1
Igor-Mont/COMP0427-IA
cpp/utils.cpp
#include <random> #include <cmath> #include <map> #include <functional> #include <memory> #include <algorithm> #include <string> #include <vector> #include <utility> #include <iostream> /* * Cleaner alias for duples. */ using Index2D = std::pair<int, int>; template<typename S> S generateRandomIndividual(int size) {...
ALGO
0.998748
5.47238
{ "github_metadata": { "branch": "main", "commit_count": 100, "repo_created_at": "2023-11-23T15:23: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": "fdf5fa53d3...
ccaf64d5-458f-490b-9e0f-25661211859b
edderick/advent-of-code-2018
day-12/part-2.cpp
#include <iostream> #include <unordered_map> using namespace std; int main(int argc, char* argv[]) { string input; getline(cin, input); const string initialState = input.substr(15); getline(cin, input); unordered_map<string, char> map; while (getline(cin, input)) { map[input.substr...
ALGO
0.998385
4.177563
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2018-12-01T09:09:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a19c96287...
a8136dd5-5f8f-469e-9cd9-8774508755f2
VladJahaleanu/Sorting-algorithms
main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <chrono> #include <fstream> #include <queue> #include <random> #include <bits/stdc++.h> using namespace std; using namespace std::chrono; void afisare(vector <long long> v) { for(long long i = 0; i < v.size(); i++) cout << v[i] << " "; ...
ALGO
0.999425
4.262466
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-03-14T16:16: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": "e725213c518f...
50d736a6-bc64-488d-af22-df05ab338411
jcharit1/Ostrich-Project
src/investorThreadDetailed.cpp
//in investorThread.cpp #include <iostream> #include <vector> #include <string> #include <math.h> #include "investorThread.h" #include "investorResultsFileName.h" #include "restore_point.h" #include "vec_functions.h" #include "J.h" #include "makeComparable.h" #include "investor_data.h" #include "import_export_text.h" ...
ALGO
0.902422
3.583491
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2016-03-21T01:00:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a5f31a55...
16483db9-f7e1-4f2e-a826-65762d4bc3b1
gabrieldavid98/E865163
E865163/core.h
class E865163 { private: std::string cadena; public: E865163(std::string); std::string encrypt(); std::string decrypt(std::string); std::string convertIntToBin(int); void guardarCadena(std::string); void leerCadena(); }; E865163::E865163(std::string cad) { cadena = cad; } std::string E865163::encrypt() { st...
TOOL
0.911059
3.589805
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-10-24T22:40: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": "baa5412486...
7d6c68e2-502e-4a8d-9ddf-dcb3d7729c1a
enosads/estrutura_dados
arvores/avl.cpp
#include <iostream> using namespace std; struct No{ int dado; No* esq; No* dir; int fe; }; No* criar_arvore(){ No* no = new No; no = NULL; return no; } void imprimir_pre(No *raiz){ if (raiz != NULL) { cout << raiz->dado << " "; imprimir_pre(raiz->esq); imprimir_pre(raiz->dir); ...
ALGO
0.99998
4.886488
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2019-03-12T23:07:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b2c80908...
901ec950-7d32-4521-bae5-d719ebd51f68
syohex/leetcode
challenge/202410/cousins_in_binary_tree2/main.cpp
#include <cassert> #include <queue> #include <cstdio> struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) { } ~TreeNode() { delete left; delete right; } }; TreeNode *replaceValueInTree(TreeNode *root) { std...
ALGO
0.999974
5.361099
{ "github_metadata": { "branch": "master", "commit_count": 1794, "repo_created_at": "2020-06-01T00:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86128dc...
68c70f1b-441d-49d3-8154-1fb77194fa28
jwlee-vcl/shading-based-refinement-of-RGBD
ShadingBasedRefinementOfRGBD/ShadingBasedDepthOptimizer.cpp
#include "ShadingBasedDepthOptimizer.h" #include <pcl/surface/organized_fast_mesh.h> #include <pcl/visualization/pcl_visualizer.h> #include <pcl/io/ply_io.h> ShadingBasedDepthOptimizer::ShadingBasedDepthOptimizer( OptimizerSettings& settings) :settings_(settings) { } ShadingBasedDepthOptimizer::~ShadingBasedDe...
ALGO
0.98332
6.127735
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-09-11T03:21:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2b944f08a5...
74b36754-7f5a-4f5e-8f4c-1ba262ac8cac
ale27pop/FundamentalAlgorithms
4.MergeKListis/main.cpp
#include <stdio.h> #include <stdlib.h> #include "Profiler.h" Profiler p("Sort"); #define STEP_SIZE 100 #define MAX_SIZE 10000 void swap(struct Node** a, struct Node** b) { struct Node* oki = *a; *a = *b; *b = oki; } struct Node { int data; struct Node* next; }; void PrintList(struct Node* head...
ALGO
0.998645
5.200325
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-31T03:20:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f176067a7bf1...
2e7d748b-829a-4874-be74-a046ce04700e
g33kyaditya/OJs
LeetCode/179.cpp
class Solution { public: static bool comp(int a, int b) { if (a == b) return true; string str1 = ""; string str2 = ""; str1 = std::to_string(a) + std::to_string(b); str2 = std::to_string(b) + std::to_string(b); if (str1 < str2) ...
ALGO
0.999983
5.881552
{ "github_metadata": { "branch": "master", "commit_count": 246, "repo_created_at": "2015-08-01T14:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83786534...
160af5c9-bfd2-4ca9-bce8-78ae77c2a500
devanjan81/graph-algorithms
acyclicity.cpp
#include <iostream> #include <vector> using std::vector; using std::pair; struct Node { Node(): visited(0), previsit(0), postvisit(0) {} void setPreVisitTime() {previsit = clock++;} void setPostVisitTime() {postvisit = clock++;} int visited; int previsit; int postvisit; static int clock; }...
ALGO
0.999978
4.552866
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-08-12T17:21: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": "179555411a...
49da7078-a7cf-4aeb-8599-3e9d64c04901
thomai-sta/kattis
Fair Division/division.cpp
#include "division.hpp" bool division::is_possible(int amount, std::vector<int> contributions) { if (std::accumulate(contributions.begin(), contributions.end(), 0) < amount) { return false; } else { return true; } } std::vector<int> division::fair_division(int amount, std::vector<int> max_contr) {...
ALGO
0.986035
3.964056
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-12-02T17:56:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38e7e5c00...
412d1d3e-cac6-4884-aeb5-3105a48ebff7
rushi-code/PPA_Applications
C++/Operator1.cpp
#include<iostream> using namespace std; class Demo { public: int A, B; Demo(int i = 10, int j = 20) { A = i; B = j; } Demo operator + (Demo& op2) { cout << "Inside + operator" << "\n"; return Demo(A + op2.A, B + op2.B); } Demo operator - ( Demo& op2) ...
TOOL
0.918678
5.18877
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-05-30T02:09:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abb9716410b3...
000f028f-6ce1-4a71-a953-007b11e0d812
nikup-collab/Nikup_leetcode
105-construct-binary-tree-from-preorder-and-inorder-traversal/105-construct-binary-tree-from-preorder-and-inorder-traversal.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.999998
6.728705
{ "github_metadata": { "branch": "main", "commit_count": 1621, "repo_created_at": "2022-05-10T01:46: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": "53feb16d8...
41c90657-161e-4114-9170-10123ac34227
gfjallais/Trabalhos-Praticos
TP2-ESTRUTURA_DE_DADOS/TP/src/main.cpp
#include <iostream> #include <string> #include <fstream> #include <getopt.h> #include <cctype> #include <sstream> #include "memlog.cpp" #include "list_template.h" #include "process_string.h" #include "quicksort.h" char logname[100]; int regmem, median, part_max; char arqin[100], arqout[100]; void parseArgs(int argc,c...
ALGO
0.997623
4.224209
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-10-27T01:31: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": "ad9884bc7f9...
e308288c-3ba4-4a4b-ba18-62f6db038ab5
Romasa102/CompetitiveProgramming
JOI/6/JOIEmblem.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(ll i = 0; i < (n); ++i) #define repp(i,o,n) for(ll i = o; i < (n); ++i) using P = pair<ll,ll>; int main(){ ll M,N; cin >> M >> N; string A[M]; rep(i,M) cin >> A[i]; string Emblem[2]; cin >> Emblem[0] >> Embl...
ALGO
0.999972
3.419523
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2023-04-30T09:21: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": "2a25ada493...
8133448a-0769-4ffb-882a-bcc461b0e317
Junlin-Yin/myLeetCode
mine/79-word_search.cpp
class Solution { public: struct coord{int x, y;}; map<char, int> m1, m2; int m, n; vector<coord> getPossiblePos(coord curr){ vector<coord> pos; if(curr.x < 0 && curr.y < 0){ for(int i = 0; i < m; ++i){ for(int j = 0; j < n; ++j){ pos.push_...
ALGO
0.999924
5.875222
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-02-20T13:02: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": "79934711cd90...
56c79973-daa8-45aa-b90d-370a86cb3399
Aanok/cpc19
remapper.hpp
#include <vector> #include <utility> #include <algorithm> template <class T> class remapper { private: std::vector<std::pair<T,typename std::vector<T>::size_type>> m_a; inline static bool compare_only_first(const std::pair<T, typename std::vector<T>::size_type> &x, const std:...
ALGO
0.996769
4.921049
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2019-11-26T14:58: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": "aaba8d4ad...
a7db14eb-2e48-4492-a763-4877f1885c83
LLNL/COGENT
COGENT/src/coord/configuration/SingleNullBlockCoordSysModel.cpp
#include <array> #include "SingleNullBlockCoordSysModel.H" #include "Directions.H" #include "CONSTANTS.H" // Poloidal namespace headers #undef CH_SPACEDIM #define CH_SPACEDIM POL_DIM #include "BSplineInterp.H" #include "HermiteInterp.H" #include "SplineInterp.H" #ifdef CH_SPACEDIM #undef CH_SPACEDIM #endif #define CH_...
ALGO
0.985364
4.351759
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2016-06-24T23:22:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4cb3dee75...
eeb802b2-7ed5-4014-a68f-b6023e1f3512
gtxygyzb/OI_and_ICPC
2022train/221016/1411E.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 50, M = 26; typedef long long ll; int n, cnt[M]; ll t, bin[M] = {1}; char s[N]; int main() { for (int i = 1; i < M; i++) bin[i] = bin[i - 1] << 1; scanf("%d%lld%s", &n, &t, s + 1); for (int i = 1; i <= n - 2; i++) ++cnt[s[i] -...
ALGO
0.999995
3.655041
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-04-16T11:13:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe3c8a5dc3a5...
022bf3be-1793-48a6-a16c-e314aec742ed
trilinos/Trilinos
packages/intrepid/src/Discretization/Integration/Intrepid_AdaptiveSparseGrid.hpp
// @HEADER // ************************************************************************ // // Intrepid Package // Copyright (2007) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on behalf of the ...
ALGO
0.975845
6.226744
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
764a9965-c9d7-4cf6-aa78-ef5cf3445ff7
amalzewita/Cpp-Programming-Guide
switch.cpp
// Counting letter grades #include <iostream> // function mean begins program execution int main() { int x = 0; int y = 1; int z = 2; switch (z + 5) { case 2: y++; case 5: x = y + 8; // this will implement for case 2 and case 5 case 7: x = y + 9;...
ALGO
0.939608
3.019441
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-10-13T20:16:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d1b7a4e14...
ab94451e-6cef-4435-9799-bf52e5373822
prasoon0459/Binary-Tree-Drawing
tools.cpp
#include <bits/stdc++.h> #include "tools.h" #include <climits> using namespace std; /* @brief prints a tree by recursion of nodes * @param root root node of tree */ void printTree(Node *root) { if(root != nullptr){ printTree(root->left); std::cout << "info = " << root->info << " x = " << root-...
ALGO
0.999478
3.385643
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-02-20T19:22: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": "1467203ea...
b67941d1-e3a7-4679-b037-75f8502bc795
ishandutta2007/codeforces-s
strawberryc/normal/1349/B.cpp
#include <bits/stdc++.h> template <class T> inline void read(T &res) { res = 0; bool bo = 0; char c; while (((c = getchar()) < '0' || c > '9') && c != '-'); if (c == '-') bo = 1; else res = c - 48; while ((c = getchar()) >= '0' && c <= '9') res = (res << 3) + (res << 1) + (c - 48); if (bo) res = ~res + 1; } co...
ALGO
0.999894
4.045208
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba51e736579b...
9605feb2-a8bd-456b-a51d-17512529fd28
souravpaul8/DSA
Data Structures/Arrays/toilet.cpp
#include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; int cnt1=0,cnt2=0,cnt3=0; if(s[0]==s[1] && s[0]=='U'){ cnt1 = 0; cnt2 = 1; cnt3 = 0; } if(s[0]==s[1] && s[0]=='D'){ cnt1 = 1; cnt2 = 0; cnt3 = 0; } ...
ALGO
0.999792
3.375876
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2019-06-23T19:12:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c13971d1...
f9e4a24e-64b9-4bec-a87f-18296d5f0ae8
Virato913/geEngine
geUtility/Source/geColorGradient.cpp
/*****************************************************************************/ /** * @file geColorGradient.cpp * @author <NAME> (<EMAIL>) * @date 2018/06/06 * @brief Class to manage a multi-keys color gradient. * * Class to manage a multi-keys color gradient. * * @bug No known bugs. */ /*********...
TOOL
0.936404
7.049121
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2019-01-18T16:14:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "881daadee...
0cb14b83-3297-4f2b-af5a-a9d41d397c43
nelson-deschampslaplateformeio/runtrack_cpp
jour3/job14.cpp
#include <iostream> #include <string> using namespace std; // Fonction qui vérifie si une chaîne est un palindrome bool estPalindrome(const string& mot) { int gauche = 0; int droite = mot.length() - 1; while (gauche < droite) { if (mot[gauche] != mot[droite]) { return false; } ...
ALGO
0.979838
5.036198
{ "github_metadata": { "branch": "jour1", "commit_count": 6, "repo_created_at": "2025-05-17T04:01: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": "c374493cc62...
6921fefd-2d43-4b29-8ba5-e96689e5a32e
Tipto-Ghosh/Data-Structure-and-Algorithm
SlidingWindow/Variable_Window/leetcode_76.cpp
#include <bits/stdc++.h> #define endl "\n" #pragma GCC optimize ("Ofast") #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #pragma GCC optimize ("-ffloat-store") using namespace std; #define firstio() ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); // Author Name: Tipto_Ghosh // Last_...
ALGO
0.999997
6.512798
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2025-02-21T16:03:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6fe8a18cf...
33ea6c2e-4a88-42ec-af01-618b42ad89f4
kt117/ProCom
atcoder/arc/122/a.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; const ll MOD = 1e9+7; const ll INF = 1e18; #define rep(i,m,n) for(ll i = (m); i <= (n); i++) #define zep(i,m,n) for(ll i = (m); i < (n); i++) #define rrep(i,m,n) for(ll i = (m); i >= (n); i--) #define print(x) cout << (x) << end...
ALGO
0.999991
4.088734
{ "github_metadata": { "branch": "master", "commit_count": 280, "repo_created_at": "2020-04-09T05:59:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "fce80ab...
408af596-d6e6-4178-9ed9-90bfd630d419
angela-hung/cpsc221_pa2
drawingio.h
// File: drawingio.h // Author: gctien // Date: 2018-02-15 // Description: Contains definitions and implementations of functions for file IO // and drawing on PNG images #ifndef _DRAWINGIO_H_ #define _DRAWINGIO_H_ #include <string> #include <vector> #include "cs221util/HSLAPixel.h" #i...
TOOL
0.96856
6.092099
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-02-21T22:53: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": "f9b48d15d1...
e1119e6b-2af2-457f-9c31-b0e4d153f676
UncannyBingo/luna
luna/router.h
// // _ // ___/_) // (, / ,_ _ // / (_(_/ (_(_(_ // CX________________ // ) // // Luna // A web application and API framework in modern C++ // // Copyright © 2016–2018 <NAME> // #pragma once #include <luna/types.h> #include <luna/config.h> #include <luna/optional.hpp> #include <rege...
WEB
0.917147
7.357924
{ "github_metadata": { "branch": "main", "commit_count": 378, "repo_created_at": "2016-02-11T17:13:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 101, "forks": 21, "issues": 12, "pull_requests": 14 }, "file_meta": { "content_id": "7d3a2...
523de5e0-f744-4d8d-8530-196291b210a2
phumipatc/C_Competitive_Programming
Website/Bangmod_Hackathon/Delicious_Smothies.cpp
/* Author : <NAME>. [MAGCARI] feat. Wasrek, Aphrodicez School : RYW Language: C++ Algo : Heap Status : Untested */ #include<bits/stdc++.h> #define all(x) (x).begin(),(x).end() #define allst(x,y) (x).begin()+y,(x).end() #define MOD (LL )(1e9+7) using namespace std; using LL = long long; using PII = pair<int ,int >;...
ALGO
0.99999
3.619621
{ "github_metadata": { "branch": "master", "commit_count": 203, "repo_created_at": "2019-11-09T11:56:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a35460a...
96a8331e-f2b9-49f9-a396-b7fdf0b05652
NandishM0618/DSA
IMPORTANT QUESTIONS ON DSA/Stacks/stackimplementationspecial.cpp
#include <iostream> using namespace std; // class Stack // { // private: // static const int max = 100; // int arr[max]; // int top; // public: // Stack() { top = -1; } // bool isempty(); // bool isfull(); // int pop(); // void push(int x); // }; // bool Stack::isempty() // { // if ...
ALGO
0.999959
4.476042
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-08-09T18:20: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": "7d87c2dcddf...
642f2b9f-3cfe-40f5-aa2d-087fd666ca86
r-chiba/competitive_programming
atcoder/atc/001/a.cpp
// {{{ #include <iostream> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <complex> #include <vector> #include <list> #include <set> #include <queue> #include <stack> #include <map> #include <string> #include <algorithm> #if __cplusplus >= 201103 #include <numeric> #endif using namesp...
ALGO
0.999854
3.819072
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-02-23T03:20: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": "92f7e8d9cf...
856ca913-83ad-45bb-a95a-d43f6ed0ceaa
johannesgerer/jburkardt-cpp
blas1_c/blas1_c.cpp
# include <cstdlib> # include <iostream> # include <iomanip> # include <cmath> # include <ctime> # include <complex> using namespace std; # include "blas0.hpp" # include "blas1_c.hpp" //****************************************************************************80 void caxpy ( int n, complex <float> ca, complex <fl...
ALGO
0.9961
5.368431
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2012-12-02T14:18:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 41, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26d0b7f8...
ee280116-c86a-4d76-a2a8-cce1417a07c5
M-Salameh/codeforces-problems
C - Palindrome Again !!.cpp
#include <bits/stdc++.h> #define endl '\n' using namespace std; int minf(char a,char b) { if(a<b) { return min(abs(int(a)-int(b)),(int('z')-int(b))+int(a)-int('a')+1); } else { return minf(b,a); } } int main() { ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); ...
ALGO
0.99998
4.32795
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2024-09-03T20:13:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0aada0f3ab...
0000c2b3-cd11-4a90-84bf-95667782a513
Cyril-Grelier/gc_wvcp_adaptive_mcts
src/representation/ProxiSolutionILSTS.hpp
#pragma once #include "Solution.hpp" /** * @brief Proxi solution for ILSTS * * Add unassigned vertices * */ class ProxiSolutionILSTS { /** @brief the current solution*/ Solution _solution; /** @brief For each vertex, * number of color the vertex can take without increasing the score*/ std:...
ALGO
0.986119
5.895002
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2023-01-24T14:38:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27ff7285523...
8d192cf2-1c39-4ce6-8a45-42ad3af57f31
MBAParters/sarl-star-ros2
sarl_star/people/leg_detect/src/leg_detector.cpp
#include <rclcpp/rclcpp.hpp> #include "leg_detect/laser_processor.h" #include "leg_detect/calc_leg_features.h" #include <opencv2/core.hpp> #include <opencv2/ml.hpp> #include <opencv2/ml/ml.hpp> #include <people_msgs/msg/position_measurement.hpp> #include <people_msgs/msg/position_measurement_array.hpp> #include <sen...
DATA
0.975634
4.38374
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2025-04-30T04:50:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "230bcbca5...
9cf23e70-9446-4cfb-97d2-4ab1a22499c5
gnahtcouq/cpp
Chuong 7 Chuoi/remake/Ly Thuyet/Xay dung ham doi Chuoi thanh So/source.cpp
/* Co 2 dang: doi thanh so nguyen & doi thanh so thuc Doi thanh so nguyen "123" ->123 ta thay 123 = 1*10^2 + 2*10^1 + 3*10^0 s[0] = '1' -> co ma ascii la 49 s[1] = '2' -> co ma ascii la 50 s[2] = '3' -> co ma ascii la 51 "12345" -> 12345 ta thay 12345 = 1*10^4 + 2*10^3 + 3*10^2 + 4*10^1 + 5*10^0 quy tac: - Tu 1 ky...
TOOL
0.992388
3.289406
{ "github_metadata": { "branch": "main", "commit_count": 398, "repo_created_at": "2021-10-29T10:48: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": "9b834d9976...
598eece9-1a75-4c65-ad95-3c192db96646
jiry17/PolyGen
src/basic/bitset.cpp
#include "bitset.h" #include <cassert> #include <iostream> void Bitset::append(unsigned int k) { #ifdef DEBUG assert(k == 0 || k == 1); #endif if ((n & 31u) == 0) A.push_back(k); else if (k) A[n >> 5u] |= (1u << (n & 31u)); ++n; } bool Bitset::operator<(const Bitset &x) const { if (n < x.n) retur...
ALGO
0.999132
5.261252
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-05-31T16:06:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "060b62b12...
bfa9c764-6e80-43fb-8512-9685bec933dc
apache/mxnet
src/operator/tensor/la_op.cc
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
ALGO
0.990589
6.960802
{ "github_metadata": { "branch": "master", "commit_count": 11896, "repo_created_at": "2015-04-30T16:21:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 20806, "forks": 6757, "issues": 1805, "pull_requests": 204 }, "file_meta": { "content_i...
3a5ae0c5-5a5d-43f5-949e-9fd705e639d8
SimFlowCFD/RapidCFD-dev
src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | --------...
ALGO
0.998885
7.015832
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2015-02-12T11:35:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 369, "forks": 103, "issues": 69, "pull_requests": 1 }, "file_meta": { "content_id": "a566...
fb0f44d1-76c3-4a67-847a-a710f66647cb
kraaddys/OOP
OOP/Lab 1/Lab 1/attestation/attestation/Source.cpp
#include <iostream> using namespace std; class Product { protected: string productName; double price; int quantity; public: Product(string name, double price, int quantity) { this->productName = name; this->price = price; this->quantity = quantity; } string getName() { return productName; } double getP...
TOOL
0.948077
5.650711
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-06T18:04: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": "a75c2342425c...
5950f047-5e22-44fa-9f12-83f3d9afb132
quocbaolinux-beta/not-a-file
4425/gifts.cpp
#include <bits/stdc++.h> #define int long long #define endl '\n' #define all(x) x.begin(), x.end() #define pb push_back #define pi pair<int, int> #define fi first #define se second using namespace std; int32_t main() { int n; cin >> n; vector<pi> gi(n); for (int i = 0; i < n; i++) { ...
ALGO
0.999976
4.22708
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-03-25T15:18: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": "88549e05372...
ba3f00c0-9d83-4964-a8fa-0e986c4b6bbc
kth-competitive-programming/kactl
old-unit-tests/geometry/test_convexHull.cpp
#include "../UnitTest.h" #include "../../content/geometry/convexHull.h" #include <fstream> #include <sstream> typedef Point<double> P; template<class T> ostream & operator<<(ostream & os, const vector<T> p) { os << "[ "; for(auto &it:p) os << it << " "; os << "]"; return os; } class test_convexHull : public UnitT...
ALGO
0.998452
4.712636
{ "github_metadata": { "branch": "main", "commit_count": 984, "repo_created_at": "2017-05-28T21:22:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2974, "forks": 819, "issues": 51, "pull_requests": 17 }, "file_meta": { "content_id": "0c05...
d99d570c-bd81-4263-931c-54a8b488e9c5
Dimpal-Kalita/My-cp-codes
Atcoder/ABC 292/ABC304/F_Shift_Table.cpp
/** * * author: <NAME> * */ #include<bits/stdc++.h> using namespace std; #define md 998244353 #define pb push_back #define endl " \n" #define F first #define S second #define sz(x) (int)(x).size() #define inp(v)...
ALGO
0.999539
3.902024
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2022-07-23T04:55: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": "8272745c9...
4f7c842e-e709-433a-ae51-245370d79551
thom-treebus/codeforces
trash-bins.cpp
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int t; cin >> t; int count = 1; while(t--) { int n; cin >> n; string s; cin >> s; int result = 0; int left, right; for (int i = 0; i < n; ++i) { if (s[i] == '1') left = i; if (s[i] == '0') { ...
ALGO
0.99992
4.046575
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-02-04T10:51:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db13f350d4a8...
edd17170-4b12-442e-b774-e36ba4c96476
NipunRathore/GFGPracticeSolutions
Easy/Product array puzzle/product-array-puzzle.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: // nums: given vector // return the Product vector P that hold product except self at each index vector<long long int> productE...
ALGO
0.999806
6.763241
{ "github_metadata": { "branch": "main", "commit_count": 584, "repo_created_at": "2023-09-22T16:33:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f75667be89...
70ab370f-d4db-4841-96ed-ed9522b9137d
ankamsriman/AZ-solutions
Stl applications/5. Buy Maximum Objects II.cpp
//<NAME> #include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define fi(i, a, b) for (long long int i = a; i < b; i++) #define fd(i, a, b) for (long long int i = a; i >= b; i--) #define vl(a, n) vector<ll> a(n) #define scarr(a) for (long long int i = 0...
ALGO
0.999853
3.891574
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2023-06-06T22:01:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3bd64f9d5...
331e290b-40fb-448c-abc5-d8d2c7c26cea
jesserobertson/lecode
LECODE/Initialiser/FlowAccumulation/Flow_accumulation.cpp
/****************************************************************************** Flow-transfer-matrix-based sequential MFD-md algorithm Reference: <NAME> et al. An adaptive approach to selecting a flow-partition exponent for a multiple-flow-direction algorithm. International Journal of Geographical Information Science...
ALGO
0.999054
3.709105
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-08-13T11:57:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "617fbabef4...
8afa1dff-8fe7-4114-8a29-a6b91d3700ea
taehyoen-park/Online-Judge
beakjoon-c,cpp/최솟값.cpp
#include<iostream> #include<vector> #include<algorithm> #include<cmath> using namespace std; typedef long long ll; const ll INF = 2000000000; vector<ll> segmenttree; vector<ll> arr; ll make_segmenttree(int node,ll start, ll end) { if(start == end) return segmenttree[node] = arr[start]; ll mid = (start + end) / 2...
ALGO
0.999998
4.480632
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2022-04-03T21:17: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": "5af1abbdf...
ebd73cb3-6819-4b65-b87a-7904d3eb441a
larics/euroc_stage_2
mav_planning_utils/include/mav_planning_utils/helper.h
/* * Copyright (c) 2015, <NAME>, ASL, ETH Zurich, Switzerland * You can contact the author at <markus dot achtelik at mavt dot ethz dot ch> * * 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 ...
ALGO
0.995934
6.943544
{ "github_metadata": { "branch": "master", "commit_count": 362, "repo_created_at": "2018-02-16T11:10:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "139a3e512...
377c83c0-addd-443c-bbfb-6b69afd9ccab
AhsanSium/problem-solving
Intro to Algorithms and Problem Solving/Module 16/BellmanFord_Algorithm.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1e5 + 5; const int INF = 1e9; vector <pair <int, int> > adj_list[N]; int d[N]; int main() { int n, m; cin >> n >> m; for(int i = 0; i <= n; i++){ d[i] = INF; } // Assuming No Negative Cycle for(int i = 0; i < m; i++){ ...
ALGO
0.999977
4.176379
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2022-12-24T14:57: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": "02dbf60a9...
c5adc36d-bfc0-4d5c-9f26-614550cd888c
SIDDPADWAL/SD
#DSA/4.Binary tree.cpp
#include<iostream> #include<stdlib.h> using namespace std; class bstnode { public: int data; bstnode * left, * right; bstnode(int x) { data = x; left = right = NULL; } }; class bst { bstnode * root; public: bst() { root = NULL; } bstnode * create(); void insert(int x); bstnod...
ALGO
0.999876
3.486367
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-12-09T17:17: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": "fcecfaf2eba...