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
fc63d832-b6d2-4fe1-9635-489341e7ebe9
noko206/AtCoder
tessoku/9/b64.cpp
// clang-format off #include <bits/stdc++.h> using namespace std; #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif #define _overload3(_1,_2,_3,name,...) name #define _REP(i,n) REPI(i,0,n) #define REPI(i,a,b) for(int i=int(a);i<int(b);++i) #define REP(...) _overload3(__VA_ARGS__,R...
ALGO
0.999998
3.899327
{ "github_metadata": { "branch": "main", "commit_count": 244, "repo_created_at": "2023-05-21T12:02: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": "01203031be...
e0bc40fd-0584-4de1-9484-bdeca3ac66d5
Gautam2086/DSA-Practice
525-contiguous-array/525-contiguous-array.cpp
/* Here the idea is to just consider the zero as -1 and take the prefix sum and maintain a hashmap where the key is the prefixSum and value is its index. Whenever we see the prefixSum inside the hashmap, then we can update our maxLength = max(maxLength, i - map.get(prefixSum)). otherwise we just put the prefixSum and i...
ALGO
0.999997
5.280868
{ "github_metadata": { "branch": "main", "commit_count": 755, "repo_created_at": "2022-01-31T08:25: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": "1662eb4e9a...
7ef60f23-9284-4500-83f0-e261a64835c8
rjenez/W266-final-project
data/programming-homework-dataset-plagiarism-detection/src/B2017/Z2/Z1/student8815.cpp
/*B 2017/2018, Zadaća 2, Zadatak 1 NAPOMENA: ulaz/izlaz za zadatke je specificiran javnim autotestovima. Zalbe za ne analiziranje testova se ne uvazavaju! NAPOMENA: nece svi (javni) testovi sa zamgera biti dostupni na c9. Za sva ostala pitanja i nedoumice vezane za autotestove javiti se na forum (c2). */ ...
ALGO
0.949663
4.319029
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T00:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5137373cd...
78bbec9a-5bbe-420d-8ba1-1965e69582fa
roetzerfau/Rhizosphere_CAM
particleSizeDistribution.cpp
#include <vector> #include <algorithm> #include <ctime> #include <math.h> #include "mex.h" class Pair { public: int blockSize, number; Pair(int _blockSize, int _number) : blockSize(_blockSize), number(_number) {} void increment() { ++number; } bool operator== (const int bSize) const { return blockSize == ...
ALGO
0.999345
5.541921
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2022-10-10T11:54: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": "8868010ffa0...
e6371ae9-05c0-4b8c-983c-813396176516
ftiasch/dreadnought-code-library
src/Hopcroft.cpp
// 左侧 N 个点, 右侧 K 个点 , 1-based, 初始化将 matx[],maty[] 都置为 0 int N, K; int que[N], dx[N], dy[N], matx[N], maty[N]; int BFS() { int flag = 0, qt = 0, qh = 0; for(int i = 1; i <= K; ++ i) dy[i] = 0; for(int i = 1; i <= N; ++ i) { dx[i] = 0; if (! matx[i]) que[qt ++] = i; } while (qh < qt) { int u = que[qh ++]; ...
ALGO
0.999941
3.581449
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2019-02-02T10:12:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 47, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba6aeb4b...
52776b62-e5b5-44ff-872f-430fd86f0937
W0nee/Coding_Test
Samsung/14503-로봇 청소기/B14503.cpp
#include <iostream> #include <queue> #include <deque> #include <stack> #include <map> #include <string> #include <string.h> #include <math.h> #include <vector> #include <algorithm> using namespace std; int row, col; int x, y, dir; int Map[60][60]; bool Flag = false; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, 1, 0, -1...
ALGO
0.999586
4.421726
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2020-07-02T06:06: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": "793d8d7d01...
dcb8e01e-b089-431b-8615-ccfba4293b5c
thanhpci/Competitive-Programming
TheSeasonalWar.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int dx[] = {-1, -1, -1, 0, 0, 1, 1, 1}; int dy[] = {-1, 0, 1, -1, 1, -1, 0, 1}; void dfs(int x, int y, vector<vector<int>> &image, int n) { image[x][y] = 2; for (int i = 0; i < 8; i++) { int _x = x + dx[i]; int _y = y + dy[i...
ALGO
0.999412
4.384577
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-09-20T01:52:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f790190abec...
9bf5d8b9-6327-4192-9eba-0db0b9662f1f
xex238/Programming_2018
4 semester/Discrete_math/course_work_new_version/cows_and_bulls.cpp
#include "cows_and_bulls.h" #include <iostream> using namespace std; Cows_and_bulls::Cows_and_bulls(int count_of_numbers_) { count_of_numbers = count_of_numbers_; if (count_of_numbers % 2 == 0) { length_cdi_part_1 = count_of_numbers / 2; length_cdi_part_2 = count_of_numbers / 2; } else { length_cdi_part_1...
ALGO
0.991414
3.985165
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2018-02-24T17:36: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": "435442ec...
b925d44e-558c-48d4-ae40-5fac4e40934e
mcvine/sansmodels
sans/models/c_models/ellipticalcylinder.cpp
/** This software was developed by the University of Tennessee as part of the Distributed Data Analysis of Neutron Scattering Experiments (DANSE) project funded by the US National Science Foundation. If you use DANSE applications to do scientific research that leads to publication, we ask that you acknowledge the...
ALGO
0.995264
6.39409
{ "github_metadata": { "branch": "master", "commit_count": 353, "repo_created_at": "2015-04-18T00:11:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7421e62f6...
f9fd7818-92b1-48df-a1db-38fc4fa25eb6
zengguojiang/zeng_guojiang
main4.19.cpp
#include <iostream> using namespace std; int main() { int counter = 0; int number; int largest; int second; cout << "Enter the first number: "; cin >> largest; cout << "Enter next number: "; cin >> number; if ( number > largest ) { second = largest; largest = number; } ...
ALGO
0.999975
3.704661
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-03-10T02:52: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": "60c9f365c...
ddbdfc14-de9e-4132-9dcf-afa46fd73209
PatrikOkanovic/ETH-AlgoLab-2020
week04/Ant Challenge/ant_challenge.cpp
#include <iostream> #include <vector> #include <algorithm> #include <boost/graph/dijkstra_shortest_paths.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/kruskal_min_spanning_tree.hpp> typedef boost::property<boost::edge_weight_t, int> EdgeWeightProperty; typedef boost::adjacency_list<boost::vecS,...
ALGO
0.999677
3.876775
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-02-25T00:57: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": "9f046917ae71...
cfe1392b-75bd-4844-a86b-963dea3ab742
SHIVAMCP18/CP-Book
Two Pointers/Longest Mountain in Array.cpp
class Solution { public: int longestMountain(vector<int>& arr) { int n = arr.size(); int p1 = 0 , p2 = 0; int maxMntn = 0; //two pointer // window pointer while(p1 + 2 < n and p2 < n) { bool hillUp = false; //hill up while(p2 + ...
ALGO
0.999988
5.524099
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2024-02-04T11:47: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": "dfb6ce3f29...
9313c6c3-a969-46cc-8122-fbb1162e3c26
NTDSuper/1101
Untitled228.cpp
#include <bits/stdc++.h> using namespace std; int id = 0; struct NhanVien{ string ma = "000"; string ten; string gt; string ns; string dc; string mst; string nkhd; }; void chuanhoaid(string a,int n){ string s = to_string(n); while(s.size() < 2){ s = '0' + s; } a = a + s; } void input(NhanVien &a){ id++; ...
ALGO
0.931966
3.574807
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-10-29T15:33: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": "a195099bc8...
477cfb06-9224-499a-a152-69ee84671499
zeyadkhaled1/XML-Project
Cpp/Compression.cpp
#include"Compression.h" // Function to get a new tree node either in the left or right Node1* getNode(char character, int frequency, Node1* left, Node1* right) { //create new node Node1* node = new Node1(); node->character = character; node->frequency = frequency; node->left = left; node->righ...
ALGO
0.999955
4.168713
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2021-11-11T21:04:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "177d50afa6b...
ccb3fd58-cb1f-435b-b548-37710309f578
PranshuJadaun/DSA-CPP
ARRAY/2nd_largest_in_array.cpp
#include <iostream> using namespace std; int main(){ // Enter Size of Array int size; cout<<"Enter size of array : "; cin>>size; // Initialise array with size int arr[size]; // Enter value of each element of Array using loops for(int i=0; i<size; i++){ cout<<"Enter "<<(i+1)<<" el...
ALGO
0.999689
4.410394
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-06-10T19:41: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": "176cf966fb0...
283aa7f1-8061-4852-b856-7449cd7f31e1
utkarshmaken/cp
inter iit 2019/sprinklr/4.cpp
//FIND PRIME #include <bits/stdc++.h> typedef long long ll; typedef long double ld; #define f(i,a,b) for(int i = a;i<b;i++) #define rep(i,a,b) for(int i = a;i<=b;i++) #define fd(i,a,b) for(int i = a;i>b;i--) #define repd(i,a,b) for(int i = a;i>=b;i--) #define pii pair<int,int> #define pll pair<ll,ll> #define fi f...
ALGO
0.999931
4.103301
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-06-28T05:46:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73ad6b1c95fe...
7130abb0-f4aa-4ce9-8cb4-a95fd1320ba7
lipaboy/lipaboyLibrary
src/long_numbers/long_number.h
#pragma once #include <functional> #include <iterator> #include <numeric> #include <algorithm> #include <array> #include <cstdint> #include <string> #include <cmath> #include <tuple> #include <iostream> #include <string_view> #include <charconv> #include "extra_tools/extra_tools.h" #include "intervals/cutoffborders....
TOOL
0.966037
5.267948
{ "github_metadata": { "branch": "master", "commit_count": 461, "repo_created_at": "2017-07-07T13:24: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": "f0a79a1a...
7f453bc0-95a6-4cba-b117-a46ef3d01f3d
NVIDIAGameWorks/PhysX-3.4
PhysX_3.4/Source/PhysXExtensions/src/ExtRevoluteJointSolverPrep.cpp
// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in bin...
TOOL
0.950913
6.637269
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2016-10-12T16:34:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2383, "forks": 282, "issues": 49, "pull_requests": 9 }, "file_meta": { "content_id": "6da3...
a17b7d87-098d-4567-a008-b477ee53d7c2
SmallPeanutPark/BAEKJOON
Personal Study/정렬/[1431번] 시리얼 번호.cpp
#include <bits/stdc++.h> using namespace std; int addNumber(const string& str) { int sum = 0; for(int i = 0; i < str.length(); ++i) { if(!isalpha(str[i])) { sum += (str[i] - '0'); } } return sum; } bool cmp(const string& x, const string& y) { if(x.length() != y.length()...
ALGO
0.999875
5.487633
{ "github_metadata": { "branch": "main", "commit_count": 406, "repo_created_at": "2022-07-05T11:48: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": "faed4120c3...
16d30d7b-df6b-4209-b498-ee40994bd280
saimon-cse/CSE2105-data-structures-and-algorithms-I
Lab_final _exam/question_B1.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int key; Node *left, *right, *parent; Node(int key); }; Node::Node(int key){ this->key = key; left = right = parent = nullptr; } class BST{ public: Node *root; BST() : root(nullptr){} void insert(int key); ...
ALGO
0.999993
5.618084
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-11-05T06:34: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": "b7a48f998f5...
2352c452-7002-4971-80cf-4c5bbbdd59a9
weakson/code
tools/gmp.cpp
#include<bits/stdc++.h> #include<gmp.h> using namespace std; struct Bignumber{ bool is_sign=0; mpz_t bignum; inline static bool counter = 0; inline static mpz_t one; static void bigone(){ mpz_init(one); mpz_set_str(one,"1",10); } Bignumber(const char b[]=nullptr,int base=10)...
ALGO
0.998644
3.397193
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-06-10T06:30: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": "40567fcb2b4...
8e6b8c72-260d-4d9e-ad32-de3b2d1718e5
victorbc/speedprogramming
uri - 1018 - Banknotes.cpp
#include <iostream> using namespace std; int main () { int n,a = 0,b= 0, c= 0, d =0, e =0, f =0, g=0; cin >> n; while(n > 0){ if(n >= 100){ n -= 100; a++; continue; } if(n >= 50){ n -= 50; b++; continue; } if(n >= 20){ n -= 20; c++; continue; } if(n >= 10){ n -= 10; d...
ALGO
0.999124
3.591875
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-12-05T20:18: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": "88d077f7f7...
b8da1182-5674-42a6-8e79-b0caa3fa74e0
NelsonGomesNeto/Competitive-Programming
Online Judges/Kattis/Tourists.cpp
#include <bits/stdc++.h> #define lli long long int using namespace std; const int maxN = 2e5, maxLog = ceil(log2(2e5)); int n, logn; vector<int> tree[maxN]; int level[maxN], ancestor[maxN][maxLog], logDP[maxN + 1]; void dfs(int u = 0, int prv = -1) { for (int v: tree[u]) if (v != prv) { level[v] = lev...
ALGO
0.999852
3.706893
{ "github_metadata": { "branch": "master", "commit_count": 333, "repo_created_at": "2019-08-07T17:50:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7995bb...
7c1856b1-af15-4051-8bab-5467dfce9ccf
Yousef697/cp_codes
sqrt_decomposition.cpp
#include <bits/stdc++.h> using namespace std; // Sqrt Decomposition // For Sum struct SqrtDecomposition { int n, sq = 448; vector<long long> arr, ans; vector<vector<long long>> blocks; SqrtDecomposition(vector<long long> &v) { arr = v; n = v.size(); ans.assign(sq, 0); ...
ALGO
0.999971
5.192106
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-12-12T18:43: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": "e59a17a5de0...
33f20bba-b19e-49b1-95be-7be516da1e6c
ayoubserti/design-pattern-guide
Composite/main.cc
/* * Composite Design pattern * I pick the problem described in book 'Dive Into Design Patterns' * The problem of order receipt's */ #include <iostream> #include <vector> #include <memory> #include <numeric> using std::vector; using std::shared_ptr; class IOrderComponent { public: virtual uint32_t getPrice() =...
ALGO
0.998441
6.551222
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-07-19T15:27: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": "26cac9c0f2...
aeeee068-6c61-4b47-a88a-477c357184cd
Djazy-Faradj/Leetcode
Easy/169. Majority Element/solution1.cpp
/* Author: <NAME> Problem: 169. Majority Element Description: - Given an array nums of size n, return the majority element. - The majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that the majority element always exists in the array. Note: My approach was to use an unordered map ...
ALGO
0.999984
6.197311
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-10-12T17:31: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": "1b4da7a03fd...
e1902deb-ab09-4d0f-915a-a604b24c69a6
Kuldeepagrahari/Programming-DSA-Shell-BashScripting-OOPS
CP/Atcoder_DP_Contest/knapsack1.cpp
#include<bits/stdc++.h> using namespace std; #define int long long //N = 100, W = 10^5, vi = 10^9 //O(NW) int K(vector<pair<int, int>> &vp, vector<vector<int>> &dp, int ind, int W){ if(ind == vp.size()) return 0; if(dp[ind][W] != -1) return dp[ind][W]; int t = 0, nt = 0; if(W - vp[ind].first >= 0) t = vp[ind...
ALGO
0.999989
4.435143
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2024-02-02T15:45:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0402a1ad8a7...
8cc437c2-07d6-49a2-8534-96b9640f85a9
vivek0739/Ir
Lab 8 Naive Bayes Classifier/naiveBayes.cpp
#include <bits/stdc++.h> using namespace std; map<string, int> termFrequency[100]; map<string, vector<int> > classDocs; map<string, double> classProb; map<int, int> totalDocTerms; int main() { int n; cout << "Enter the number of docs: "; cin >> n; int i; string temp; string word; char ch; scanf("%c", &ch); for...
ALGO
0.998792
4.166489
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-04-05T03:24: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": "56be7aa855...
385ad513-9afe-4d93-8544-d61707468c6b
harshsrivastava0/DS-Project
Q.28_LLnthNodeFromEnd.cpp
#include <iostream> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int value) : val(value), next(nullptr) {} }; ListNode* findNthFromEnd(ListNode* head, int n) { if (head == nullptr || n <= 0) { return nullptr; } ListNode* slow = head; ListNode* fast = head;...
ALGO
0.999961
6.004262
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-10-26T08:36: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": "d82c8c32f2...
d72c5820-04c2-43c4-a9c5-4dc801c777e4
freesinger/Cpp_Primer_Notes
Fun/circle.cpp
/* Calculate square of a circle */ #include<iostream> #define OK 1 #define pi 3.14 using namespace std; class Circle { public: Circle(int radius) { Radius=radius; } Circle(Circle &C); ~Circle() {} int GetR() { return Radius; } int GetArea() const; private:...
TOOL
0.985058
4.694536
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-12-17T12:03: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": "11d710276...
4f0b115f-269e-4c29-9ed9-0de3c51f21c2
kant/Always-be-learning
Algorithms/sorted_range/set_intersection.cpp
#include <iostream> #include <array> #include <algorithm> #include <iterator> #include "auxiliary.h" template< class InputIt1, class InputIt2, class OutputIt > constexpr OutputIt set_intersection( InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, ...
TOOL
0.98769
5.460644
{ "github_metadata": { "branch": "master", "commit_count": 147, "repo_created_at": "2020-11-18T23:32: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": "1c11b98c...
23e3ad38-31c1-440a-84eb-5d98b35f58f6
samkitsamsukha/LeetCode-Problems
3001-3500/3239_minimumNumberOfFlipsToMakeBinaryGridPalindromicI.cpp
/* You are given an m x n binary matrix grid. A row or column is considered palindromic if its values read the same forward and backward. You can flip any number of cells in grid from 0 to 1, or from 1 to 0. Return the minimum number of cells that need to be flipped to make either all rows palindromic or all columns...
ALGO
0.999998
6.406803
{ "github_metadata": { "branch": "main", "commit_count": 505, "repo_created_at": "2024-01-19T14:10: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": "879417a6fa...
06299a24-76ae-4fdb-b358-e6d84fd1a254
st117211/2023-cpp-autumn
23.10.08-homework-4/Project6/Source.cpp
#include <iostream> #include <cstdlib> int main(int argc, char** argv) { int n = 0; std::cin >> n; int* a = (int*)malloc(sizeof(int) * n); for (int i = 0; i < n; ++i) { int b = 0; std::cin >> b; *(a + i) = b; } int num_max = 0; int max = 0; int num_min = 0; int min = 0; for (int i = 0; i < n; ++i...
ALGO
0.999937
3.880813
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-09-06T18:37:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a375e42746c...
85a8c097-84b2-47c4-b86c-4b620537b576
MaryiaBabinskaya/Programming-UJ
Napisy/BACA4.cpp
//<NAME> #include <cstdarg> #include <cstdio> //////////////////////////////////////////////////////////////////////// char przeksztalc(char *s, char (*f)(char)){ //Zadaniem funkcji przeksztalc jest zamiana każdego //znaku napisu s na wartość funkcji f obliczonej dla tego zna...
ALGO
0.99087
3.871836
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2023-09-29T14:55: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": "9913321fb00...
1af15bed-5e88-487c-b5c6-a0e197962675
dizhenhuoshan/C-plus-plus-template
segtree.cpp
//SJTU OJ 4117 #include <iostream> #include <cstring> #include <cmath> #include <cstdio> using namespace std; const int maxn = 100005; long long sum[maxn<<2]; long long add[maxn<<2]; long long A[maxn]; int N; void pushup(int rt) { sum[rt] = sum[rt<<1] + sum[rt<<1|1]; } void buildtree(int l ,int r, int rt) { ...
ALGO
0.999841
4.847653
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-05-07T12:55: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": "7f79c30ad0...
102c5f33-f3ed-4d40-9612-c8b1c7e43a22
xiaoxiaozengzen/exercises
technology_stack/design_patterns/iterator/dp_iterator.cpp
/** * Iterator Design Pattern * * Intent: Lets you traverse elements of a collection without exposing its * underlying representation (list, stack, tree, etc.). */ #include <iostream> #include <string> #include <vector> template <typename T, typename std::size_t N> class MyContainer { private: T data[N]; std...
TOOL
0.929605
5.874413
{ "github_metadata": { "branch": "main", "commit_count": 150, "repo_created_at": "2024-06-03T16:30: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": "f1947be3ab...
a7802f75-8d67-465c-a0d7-b3f5b1cd9ee4
skdudn321/algorithm
baekjoon/1260.cpp
#include<stdio.h> #include<queue> #include<algorithm> using namespace std; int check[1001]; int connect[1001][1001]; int first; queue <int> qu; void recursion(int num); void BFS(int num); int main(void) { int V, E; int i, temp1, temp2; scanf("%d %d %d", &V, &E, &first); for (i = 0; i < E; i++) { scanf("%d %d...
ALGO
0.999982
3.603916
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2016-06-28T16:49: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": "ae68d9339...
d646b439-000a-4c23-8c8c-516ccc4fe64f
repickliu/sousuo
include/trie.h
#pragma once #include "Mylog.h" #include "Config.h" #include <stdio.h> #include <unistd.h> #include <sstream> #include <fstream> #include <string> #include <iostream> #include <cstring> using namespace std; namespace wd{ struct trie_node_en{ int count; trie_node_en * child[26]; string str; trie_no...
TOOL
0.957426
3.481124
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-12-13T08:07: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": "ab3fb1d0e8d...
dc7d04f1-69a6-47ef-9cd2-883dcddef66b
iwakawa0510/AtcoderSolution
practice/aizu38a.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { double a, b, C; cin >> a >> b >> C; // 円周率を手動で定義 const double PI = 3.141592653589793; // 角度をラジアンに変換 double C_rad = C * PI / 180.0; // 面積 S の計算 double S = 0.5 * a * b * sin(C_rad); // 周の長さ L...
ALGO
0.999679
4.020788
{ "github_metadata": { "branch": "main", "commit_count": 179, "repo_created_at": "2024-05-10T06:38: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": "8680734f3c...
6fd15c3c-737b-4ef4-ad7c-278f449cbc51
Rk-2005/DSA
2220-find-all-possible-recipes-from-given-supplies/2220-find-all-possible-recipes-from-given-supplies.cpp
class Solution { public: vector<string> findAllRecipes(vector<string>& recipes, vector<vector<string>>& ingredients, vector<string>& supplies) { int n = recipes.size(); unordered_map<string, vector<int>> mp; unordered_set<st...
ALGO
0.999795
5.964307
{ "github_metadata": { "branch": "main", "commit_count": 469, "repo_created_at": "2025-03-15T19:57:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b86cc0ba68...
fcad5a0c-833e-49dd-bf67-e744e6dc1104
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p02635/s625066846.cpp
#include <algorithm> #include <array> #include <assert.h> #include <bitset> #include <chrono> #include <cmath> #include <complex> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <istream> #include <map> #include <math.h> #include <numeric> #include <ostream> #include <queue> #i...
ALGO
0.999908
4.664509
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "aba45ca2ba...
7a93e5e6-3196-47b9-bdfb-f36f74f156d7
wasdylb/Microduino
project/logo_wall/key_matrix_003/key_matrix_003.ino
#include <Microduino_Key.h> #include "Microduino_Matrix.h" uint8_t Addr[MatrixPix_X][MatrixPix_Y] = { { 64} }; Matrix display = Matrix(Addr); Key KeyA(8, INPUT_PULLUP); static const uint8_t logoA[] PROGMEM = { //低位在前 逐行 0x0A, 0x15, 0x15, 0x15, 0x00, 0x00, 0x00, 0x00 }; int color[8][3] = { {255, 0, 0}, {2...
TOOL
0.948263
4.743801
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-04-22T03:03:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bfd8c577...
2e183048-5ad7-4ec3-ae86-eea60f8af8ea
25kudit/DSA-CP
B_Cryptography.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma GCC optimization("unroll-loops") #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; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_ord...
ALGO
0.999924
5.14998
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-07-19T13:22:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a3421b35d6...
f9f34225-cab7-41bc-a2f1-542aa71732f4
Mulab11/cntt2016-hw1
TC-SRM-550-div1-300/xhk.cpp
// BEGIN CUT HERE // END CUT HERE #line 5 "RotatingBot.cpp" #include<bits/stdc++.h> using namespace std; typedef pair<int,int> PI; int n,bx,by,sx,sy,ans; int b[60],a[210][210],v[4][2]={0,1,-1,0,0,-1,1,0}; vector<PI> c; int solve(int d) {int i,j,x,y,nx,ny; bx=by=sx=sy=100; x=100; y=100; memset(a,0,sizeof(a)); ...
ALGO
0.999967
4.135214
{ "github_metadata": { "branch": "master", "commit_count": 4450, "repo_created_at": "2016-09-28T13:04:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 28, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "ae514...
2790c6fc-9f90-4641-9669-5e230f1c4e52
marnold831/Advanced-Programming-for-Games-Fifteen-Puzzle
Fifteen_Puzzle/Puzzle.h
/* Author: <NAME> Last Edited: 24/10/19 Description: Class to store puzzle member fields and the relative functions to act on those fields */ #pragma once #include <iostream> #include <vector> #include <algorithm> #include <cstdint> #include "MathUtil.h" enum class direction { UP, DOWN, LEFT, RIGHT }; c...
ALGO
0.951107
5.982614
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-10-15T12:47: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": "fda9e1b0a...
0093b33f-8408-4106-a039-561c6f65487c
amiradridi/Job-Resume-Matching
venv/Lib/site-packages/torch/include/ATen/ops/linalg_matrix_norm_compositeimplicitautograd_dispatch.h
#pragma once // @generated by torchgen/gen.py from DispatchKeyFunction.h // NB: The implementing C++ file is RegisterDispatchKey.cpp // The only #includes we need are for custom classes that have defaults in the C++ API #include <c10/core/MemoryFormat.h> #include <c10/core/Scalar.h> #include <ATen/core/Reduction.h> ...
TOOL
0.901388
7.085615
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2022-08-05T15:27:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 122, "forks": 34, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "1c3fa0...
39ad854d-fada-4d4a-badf-2afa664d1f3e
Viing3107/Source-Code
Tìm Kiếm Nhị Phân/Bedao Mini Contest 05 - MEDIAN.cpp
/* Author : <NAME> Kim Son A High School - Ninh Binh Created : 11:19:55 - 30/05/2024 */ #include <bits/stdc++.h> #define int long long #define double long double #define task "test" #define forUp(i, l, r, step) for(int i = l;...
ALGO
0.999963
4.950479
{ "github_metadata": { "branch": "main", "commit_count": 450, "repo_created_at": "2024-04-27T09:52: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": "e9b6bbb070...
5a0a0bf3-1f5a-4a22-9bb8-daaaffb2930f
sanjays27/ADA_Assigment
Salesmanproblem.cpp
#include<iostream> using namespace std; int arr[10][10], n, visit[10]; int cost_opt = 0, cost_apr = 0; int least_apr(int c); int least_opt(int c); void mincost(int city){ int i, ncity; visit[city] = 1; cout<<"--> "<<city<<endl; ncity = least_opt(city); if (ncity == 999){ ncity = 1; ...
ALGO
0.999933
3.456824
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-07-04T05:02:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d467245370...
f9905404-4871-4abc-b890-7ecb6d13ce6d
yenthanh132/Codes
Codeforces/CF 145/D.cpp
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <vector> #include <cstring> #include <string> #include <cmath> #include <ctime> #include <utility> #include <map> #include <set> #include <queue> #include <stack> #include <sstream> #define FOR(a,b,c) for (int a=b,_c=c;a<=_c;a++) #de...
ALGO
0.999854
3.139487
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-11-24T09:41:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d8a8aa2d5...
b371486a-48ab-4486-a5a2-1053b3cf6a51
MagdasTeodora/PBinfo
Centrale.cpp
#include <fstream> #include <cmath> using namespace std; ifstream fin("centrale.in"); ofstream fout("centrale.out"); int main() { int n; fin >> n; int cntNrCentrale = 0; for (int i = 0; i < n; i++) { int a; fin >> a; int ca = a / 10; // eliminam ultima cifra int p...
ALGO
0.999418
4.261226
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-03-26T17:53: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": "8a3cafb81b4f...
a2fd6ff7-8ceb-4fd8-83b5-2fe4fc562868
arsaccol/sanjigen-keisan
matrix.h
#pragma once #include <initializer_list> #include <stdexcept> #include <algorithm> #include <cstdio> //#include <array> #include <sstream> #include <iostream> #define STR(x) #x template <int M, int N> struct Matrix { float data[M][N]{}; //std::array<float, M * N> data; Matrix() = default; Matrix(s...
TOOL
0.900993
5.731665
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-06-21T07:23:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35c14f4b47c...
a17e64ef-eb01-46ca-842c-8c6911c4b1cd
SrinivasuluCharupally/expert_programming
module-1/1-6.cpp
//String Compression: Implement a method to perform basic string compression using the counts //of repeated characters. For example, the string aabcccccaaa would become a2blc5a3. If the //"compressed" string would not become smaller than the original string, your method should return //the original string. You can assu...
ALGO
0.999595
3.742412
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-06-02T07:49:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7cd9b872a...
bc45cba1-b10b-44e8-9c58-19a3eed3f90c
fextivity/codeforces-submissions
codeforces/1278/C.cpp
#include<bits/stdc++.h> using namespace std; // Optimization //#pragma GCC optimize("O3") #define endl '\n' // Shortcut #define int long long #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 #def...
ALGO
0.999865
3.870954
{ "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": "1ea5558...
515e55e9-f900-4fc2-b25d-95824b0fe8ec
Xiaxue0109/Datastructure
1.leetcode/234.回文链表.cpp
/************************************************************************* > File Name: 234.回文链表.cpp > Author: > Mail: > Created Time: 2020年02月28日 星期五 14时36分16秒 ************************************************************************/ /*回文链表的主要思想: 1. 不能增加数组链表之类的,要求空间复杂度O(1) 2. 将原链表分成两部分,前一半正常,后一半是反转过来的 3. 两部...
ALGO
0.999956
5.480789
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2020-02-26T05:03: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": "823d3394...
85a22f4c-d339-4fb0-af44-32570c95ea66
coxm/aoc2020
02/main.cpp
#include <memory> #include <algorithm> #include <iostream> #include <fstream> int main(int const argc, char const* const* const argv) { char const* filepath = argc < 2 ? DEFAULT_INPUT_FILE : argv[1]; std::ifstream file(filepath); unsigned partOne = 0; unsigned partTwo = 0; while (file.good()) { int low...
ALGO
0.983688
5.407523
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2020-12-10T11:13:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4cc24939a54...
4ccf787d-2567-4f1f-a1b8-4910cf282200
ameerkhan123ak/VisualStudioCode
Cplusplus/Data Structures/Graphs/detectCycleinDirectGraph.cpp
#include<iostream> #include<vector> #include<cstring> using namespace std; class Graph { public: int V; vector<vector<int>> adj; Graph(int V) { this->V = V; adj.resize(V); } void addEdge(int u,int v) { adj[u].push_back(v); //adj[v].push_back(u); } ...
ALGO
0.999091
3.830882
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-06-21T10:07: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": "9406e7becd9...
3ee679a4-d14c-41b5-a04d-0a33987a8640
ValveSoftware/source-sdk-2013
src/tier1/generichash.cpp
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: Variant Pearson Hash general purpose hashing algorithm described // by Cargill in C++ Report 1994. Generates a 16-bit result. // //============================================================================= #include <stdli...
ALGO
0.905171
5.388388
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2013-06-26T22:21:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9165, "forks": 2667, "issues": 352, "pull_requests": 507 }, "file_meta": { "content_id": ...
075dd075-d69f-4959-b6e8-83fbd466bd59
gaoxifeng/Feature-Preserving-Octree-Hex-Meshing
extern/vcg/wrap/gl/pick.h
/**************************************************************************** * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * * Copyri...
ALGO
0.992335
5.867501
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-06-18T01:40:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 24, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "153c4aed...
0e760365-70d3-45c7-9e2e-56b6d63a7458
VishalSingh-07/Geeks-for-Geeks
Medium/Length_of_the_longest_substring.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends // Brute Force Approach // Time complexity -> O(n^2) and Space -> O(1) // class Solution{ // public: // int longestUniqueSubsttr(string s){ // //code // int n=s.size(); // if(n==0 || n==1) // ...
ALGO
0.999929
5.740071
{ "github_metadata": { "branch": "master", "commit_count": 250, "repo_created_at": "2022-12-29T15:13:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d3dcf7e...
beaa7742-1a7b-4d8b-9165-2fe5e4266a5a
kaipoffenbarger/AMATH483
HW3/ref_gemvt.cpp
#include <iostream> #include <vector> #include <cmath> #include <stdexcept> template <typename T> void gemv(T a, const std::vector<std::vector<T>> &A, std::vector<T> &x, T b, std::vector<T> &y) { //checks if (A.empty() || A[0].empty()) { throw std::invalid_argument("Matrix A must not be empty."); ...
ALGO
0.999536
6.06425
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-13T19:02:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "213f66ce9ce2...
f5863c53-fa03-435f-9ad0-34146cdcdde8
natelakes96/CPP_II
CS202/assignment5/linked_list.tpp
/** * @file linked_list.tpp * @author <NAME>, NSHE 8000617279 * @brief This file will define the destructor, insert value * insert node, pretty print, print, search, delete value, * and delete node functions. * * */ using std::cout; using std::endl; #include <string> using std::string; using std...
ALGO
0.998885
6.243636
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-26T17:02: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": "4bfea9163734...
d20dc8ff-a865-4dd6-88eb-65aa53c7fd56
piotrbla/transitive-closure-experiments
work_bst_compare_threads/bst.cpp
#include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #define min(x,y) ((x) < (y) ? (x) : (y)) #define max(x,y) ((x) > (y) ? (x) : (y)) #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) #define S0(a, i, j, k) c[i][j] = c[i][k] +...
ALGO
0.99994
3.28303
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2019-11-10T12:50: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": "575a671f4...
f28442cf-34fe-407f-89a3-f059d477fb05
themicp/Algorithms
segment-intersection/segment-intersection.cpp
#include <cstdio> #include <vector> using namespace std; struct point { float x; float y; }; struct segment { point start; point end; }; inline bool inRange( float start, float end, float value ) { if ( end < start ) { float t = end; end = start; start = t; } ret...
ALGO
0.99919
4.171257
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2011-08-23T00:48:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 9, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "25f2af5...
7d5b04b3-742d-4368-b53d-eb4437fc2acc
Twinklebear/libbat
bat/ba_treelet.cpp
#include "ba_treelet.h" #include <iostream> #include <glm/ext.hpp> #include "borrowed_array.h" #include "byte_cursor.h" BATreeletHeader::BATreeletHeader(uint32_t n_nodes, uint32_t n_points) : num_nodes(n_nodes), num_points(n_points) { } BATreelet::BATreelet(const ArrayHandle<uint8_t> &buf, co...
TOOL
0.986856
3.751231
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-04-21T02:00:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3bf4cec85...
614d2fb6-c882-44a7-b131-04272def6523
stellamaro/diversify-topk-pois
src/rtree/rtree.cpp
/** * @file * Implementation of indexed algorithm. */ #include "rtree.hpp" #include "../util/commons.hpp" #include "../util/constants.hpp" #include "index_impl.hpp" #include <algorithm> // for_each, prev_permutation namespace popular { template < Indexed_Variant variant > void Indexed< variant >::preproce...
ALGO
0.997174
6.874234
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-05-11T09:44: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": "b625ebdc4d...
b6ec9210-6902-4f23-8cc5-bd0747da574e
vinci-grape/Rectifier
output/CodeGen/avatar/Java/C++/atcoder_AGC046_A.c++
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <algorithm> using namespace std; class FastReader { private: char buf[100005]; int cur; int buf_size; int toRead; public: FastReader() { buf_size = 100005; cur = 0; ...
ALGO
0.999495
3.490836
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-09T09:23:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2518dc3e2645...
6515cad2-cdfc-4f88-be06-b619b0b85569
arrayfire/arrayfire
src/backend/opencl/magma/laset_band.cpp
/******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause **********************************************...
ALGO
0.933183
5.714507
{ "github_metadata": { "branch": "master", "commit_count": 6246, "repo_created_at": "2014-10-28T20:58:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4739, "forks": 546, "issues": 277, "pull_requests": 18 }, "file_meta": { "content_id": "...
9ebb0ae5-8dec-4f9f-98b9-6da57cd5b84d
choisb/Study-Cpp-STL
Ch08_Algorithm/ex43_sort_heap.cpp
// sort_heap() 알고리즘 예제 // 순차열이 힙 상태일때 힙을 정렬하기 위해서는 sort_heap()을 사용. // sort_heap()을 사용하기 위해서는 순차열이 반드시 힙 상태여야 한다. // [출력 결과] // vec1: 10 20 30 40 50 60 70 80 // make_heap(vec1.begin(), vec1.end()); // vec1: 80 50 70 40 10 60 30 20 // sort_heap(vec1.begin(), vec1.end()); // vec1: 10 20 30 40 50 60 70 80 #include <io...
ALGO
0.999574
4.778915
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2021-01-15T02:21: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": "b135ad889...
05071d5a-e4d9-4ba7-b077-c3a5ba3950ca
BulletGG/fatality-source-code
internal_hvh/misc/math.h
#pragma once #include "intrinsics.h" class Quaternion // same data-layout as engine's vec4_t, { // which is a float[4] public: inline Quaternion( void ) {} inline Quaternion( float ix, float iy, float iz, float iw ) : x( ix ), y( iy ), z( iz ), w( iw ) {} inline void Init( float ix = 0.0f, float iy = 0...
TOOL
0.95889
6.326742
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-12-11T19:23:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d25ed188...
e4163f4d-0c04-4a72-b7ac-de230a597461
varunkmr038/Data-Structures-and-Algorithms
Trees/6. Boundary Traversal (R).cpp
// boundary traversal - // 1. Left boundary without leaf - har level pe leftmost node // 2. Bottom boundary - saari leaf nodes // 3. Right Boundary in reverse without leaf - har level pe rightmost node bool isLeaf(TreeNode<int>* root) { return (root->left == NULL and root->right == NULL); } void leftBoundary(TreeN...
ALGO
0.999993
5.518829
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-08-27T09:19: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": "cb9bd3a0ea...
566245d8-d838-482a-9263-dcf8a2895a63
stan-dev/math
stan/math/prim/prob/logistic_lpdf.hpp
#ifndef STAN_MATH_PRIM_PROB_LOGISTIC_LPDF_HPP #define STAN_MATH_PRIM_PROB_LOGISTIC_LPDF_HPP #include <stan/math/prim/meta.hpp> #include <stan/math/prim/err.hpp> #include <stan/math/prim/fun/as_column_vector_or_scalar.hpp> #include <stan/math/prim/fun/as_array_or_scalar.hpp> #include <stan/math/prim/fun/as_value_column...
ALGO
0.98011
7.118748
{ "github_metadata": { "branch": "develop", "commit_count": 28933, "repo_created_at": "2015-07-01T18:40:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 785, "forks": 195, "issues": 298, "pull_requests": 19 }, "file_meta": { "content_id": ...
ecd14709-7d48-4dbb-b857-4621ed7c3967
Mentor2108/My-codes-
C or C++/Competitive Questions/AtCoder/abc260_b.cpp
#include <bits/stdc++.h> #define ll long long int #define max(a, b) (a > b ? a : b) #define min(a, b) (a > b ? b : a) #define mod 1000000007 #define YOURMENTOR ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); #define FOR(i, n, k) for(int i = 0; i<n; i+=k) #define endl "\n" #define PB push_back #define...
ALGO
0.999956
3.55454
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-08-28T14:40:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "b73788820ea...
ff81a70e-6f1f-4f6a-9568-a126e3bdb11d
TheCodingThread/DSA
03_ARRAY PROBLEMS(easy)/05_left_shifting_of_elements_by_one_place.cpp
#include<bits/stdc++.h> using namespace std; void lShift(int *arr, int n){ int num = arr[0]; // Store the first element for(int i=0; i<n; i++){ if(i==n-1){ arr[i] = num; // Last element becomes the first element } else{ arr[i] = arr[i+1]; // Shift each element to...
ALGO
0.999928
4.515489
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2025-02-22T19:04: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": "f5b44833bfd...
2e54d93d-666c-4cbd-8c0f-f4520da282d6
maxim-yakupov/University
2013-2014/2term/HomeTask_2/Task_1/main.cpp
#include <iostream> #include <ctime> #include "heapsorter.h" #include "quicksorter.h" #include "randomsorter.h" using namespace std; void genArray(int array[], int length); void writeArray(int array[], int length); int main() { const int arrayLength = 10; int array[arrayLength] = {0}; //writeArray(array...
ALGO
0.999463
4.775328
{ "github_metadata": { "branch": "master", "commit_count": 206, "repo_created_at": "2016-05-14T17:33:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8323fe42...
e2248bec-5979-4e2a-bd2e-a3ed8706867f
erleben/OpenTissue
OpenTissue/core/math/noise/noise_improved_perlin.h
#ifndef OPENTISSUE_CORE_MATH_NOISE_NOISE_IMPROVED_PERLIN_H #define OPENTISSUE_CORE_MATH_NOISE_NOISE_IMPROVED_PERLIN_H // // OpenTissue Template Library // - A generic toolbox for physics-based modeling and simulation. // Copyright (C) 2008 Department of Computer Science, University of Copenhagen. // // OTTL is licensed...
ALGO
0.998937
6.225308
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2018-02-11T18:06:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 101, "forks": 28, "issues": 14, "pull_requests": 0 }, "file_meta": { "content_id": "9cedf...
476d310f-9ddc-4ec2-ab4f-b0e4189c0915
shahriar-ruet14/Practice-Problem
Codding Interview By Subin/Array Search Range.cpp
/* Find inside a sorted array and return the id if not found then return the possition where it should be */ #include<bits/stdc++.h> using namespace std; void print(vector<int> &arr) { for(int i =0 ; i< arr.size() ; i++) cout<<arr[i]<< " "; cout<<endl; } vector<int> searchRange(vector<int> & data...
ALGO
0.999991
5.22595
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-10-27T17:51:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9681e188...
bd00eaed-cb3c-497f-a939-66e78be6dfbf
balasurajp/biometric_iris_recognition
src/houghcircle.cpp
#include "houghcircle.h" #include "addcircle.h" Mat Houghcircle::hough(Mat inimage, int rmin, int rmax) { int rows = inimage.rows; int cols = inimage.cols; int nradii = rmax - rmin + 1; Mat h =Mat::zeros(rows,cols*nradii, CV_32SC1); Mat x ,y; for(int col=0;col<cols;col++) { for (int row = 0; row < rows;...
ALGO
0.993959
4.191378
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-11-20T05:04: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": "ef205a6fe50...
3948b0c8-6be9-486a-9963-da89ed6b1698
donbasta/competitive-programming
submissions/online-judges/tlx/troc25/E.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const int INF = 2e9; const int MOD = 998244353; struct Segtree { vector<int> tree, lz; Segtree(int n) : tree(4 * n + 5), lz(4 * n + 5) {} void push(int v, int s, int e) { if (lz[v]) { lz[v << 1...
ALGO
0.999925
5.222145
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2018-10-17T04:26:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a32d6891...
83099bb9-d3c5-4f5b-952c-25887800f16d
koide3/direct_visual_lidar_calibration
src/test/calib/nearest_neighbor_search.cpp
#include <vlcal/calib/nearest_neighbor_search.hpp> #include <queue> #include <nanoflann.hpp> #include <opencv2/opencv.hpp> namespace vlcal { ImageSpaceNearestNeighborSearch::ImageSpaceNearestNeighborSearch(const cv::Mat& image, const int max_radius) : image(image), x_blank(build_x_blank(image)), max_radius(max_...
ALGO
0.999068
6.650179
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2022-09-13T01:06:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1096, "forks": 155, "issues": 66, "pull_requests": 0 }, "file_meta": { "content_id": "5781...
39b6c888-be37-48c7-b10f-566937e5582c
p-andelfinger/PeerSim-MPI-Kademlia
mpi-wrapper.cc
#include <sys/types.h> #include <sys/stat.h> #include <sys/wait.h> #include <fcntl.h> #include <mpi.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <errno.h> #include <sys/time.h> #include <unistd.h> #include <iostream> #include <map> #include <set> #include <sstream> #define MAX_MPI_MESSAGE_SIZ...
TOOL
0.92684
5.073621
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-11-05T18:52:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6aab1bffc...
753dcfc8-e7c1-4e06-826c-794385fe183c
AmanouToona/ABC
ABC209/E.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; ll pow_ll(ll x, ll y) { ll ret = 1; while (y > 0) { if (y & 1) ret *= x; x *= x; y >>= 1; } return ret; } int const INF = INT_MAX; int main() { int N; cin >> N; vector<string> S(N); map<strin...
ALGO
0.999965
4.058105
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2020-06-14T11:43:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "82a65f65...
102251f8-5bbf-4dce-96e2-d3a62df4ce7b
SebastianMestre/Competitive-Programming
Codeforces/OIACuarentena10/c.cpp
#include <iostream> #include <map> #define forn(i,n) for(int i = 0; i < int(n); ++i) #define forsn(i,s,n) for(int i = s; i < int(n); ++i) #define forrn(i,n) for(int i = int(n)-1; i >= 0; --i) using namespace std; using ll = long long; constexpr ll INF = 1ll<<50; // 1e15 constexpr int MOD = 1000000007; // 1e9+7 usi...
ALGO
0.999947
3.929877
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2019-07-18T20:21: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": "21891f842...
1c676aca-49ac-479f-ba20-e692c392c222
surajbanthot/DS_Algo
circular_list/circular_list.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; }; class CircularList { public: Node *addToEmpty(Node *last, int data) { if (last != NULL) return last; Node *temp = new Node(); temp->data = data; last = temp; ...
ALGO
0.999423
4.92397
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2020-08-20T23:54: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": "9c94be54...
4e6ef2c5-a696-4773-8f12-642243d3d2d4
weolar/miniblink49
third_party/pdfium/core/fxge/cfx_pathdata.cpp
// Copyright 2016 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxge/cfx_pathdata.h" #include "core/fxcrt/fx_system.h" #includ...
TOOL
0.995178
3.938266
{ "github_metadata": { "branch": "master", "commit_count": 1788, "repo_created_at": "2016-09-27T03:41:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7578, "forks": 1142, "issues": 340, "pull_requests": 6 }, "file_meta": { "content_id": ...
a940032a-0a2e-475c-8b0e-f4dfafd93249
liaozhenyi/leetcode
112_Path_Sum/sum.cc
/********************************************************************** Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below binary tree and sum = 22, 5 / \ ...
ALGO
0.99997
5.770984
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2015-02-05T17:13:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c0f25254...
49144496-345d-4d75-9e51-5a7d8c433e5e
giuseppe-crea/AppliedCriptography2021
client/auth.cpp
#include "signature_utilities.cpp" // authentication between client and server void auth(string cl_id, EVP_PKEY* cl_pr_key, EVP_PKEY* cl_pub_key, int sockfd, unsigned char** sv_session_key, X509_STORE* store){ //generates random nonce to be sent int32_t na; RAND_bytes((unsigned char*)&na, sizeof(int32_t)); //cr...
TOOL
0.923397
3.747115
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2021-08-30T15:56: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": "6a4c222f...
ef98ea26-720b-4c56-9593-1aecb06054ea
vancegroup-mirrors/include-what-you-use
iwyu_stl_util.h
//===--- iwyu_stl_util.h - STL-like utilities for include-what-you-use ----===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
TOOL
0.928905
6.281354
{ "github_metadata": { "branch": "master", "commit_count": 516, "repo_created_at": "2013-01-18T21:20:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "cb501dba...
82c7d71f-5ee8-4238-971c-cd7bdcb6017f
XiaoBeiAjie/ACM
洛谷/模板题/线段树/P2574 XOR的艺术.cpp
#include <bits/stdc++.h> using namespace std; const int N = 100010; typedef long long ll; struct Tree { int l, r; ll sum, tag; }; void solve() { int n, m; cin >> n >> m; string s; cin >> s; s = " " + s; vector<int> w(n + 1); for (int i = 1; i <= n; i ++ ) w[i] = (s[i] == '1');...
ALGO
0.99998
4.320111
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-11-14T06:45:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5462e58bfbc9...
3cacc4c4-c13f-4f0a-909e-8ad61a3d32a6
YJL33/LeetCode
current_session/c++/88.merge-sorted-array.cpp
/* * @lc app=leetcode id=88 lang=cpp * * [88] Merge Sorted Array */ // @lc code=start #include <iostream> #include <vector> using namespace std; class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { // simply use two pointer // first copy all m numbers in nums1 to...
ALGO
0.999936
6.156639
{ "github_metadata": { "branch": "master", "commit_count": 740, "repo_created_at": "2016-03-02T06:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54b60a91...
132a77a2-88bf-4dba-8220-7bec16d9ac19
jigyasaG18/Data-Structures-And-Algorithms
Trees/37)Morris Preorder Traversal of a Binary Tree.cpp
Morris Preorder Traversal of a Binary Tree Given the root of a binary tree, return the preorder traversal of its nodes' values. Example 1: Input: root = [1,null,2,3] Output: [1,2,3] Example 2: Input: root = [1,2,3,4,5,null,8,null,null,6,7,9] Output: [1,2,4,5,6,7,3,8,9] Example 3: Input: root = [] Output: [] Example...
ALGO
0.999998
7.028442
{ "github_metadata": { "branch": "main", "commit_count": 255, "repo_created_at": "2024-12-24T05:09: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": "430bca132a...
806b7155-cbfb-4b7c-85d0-93d41ec72b2c
Sushant-Bansode/Data-Structures-And-Algorithms
06.Searching/Q14-Median-Of-2_Sorted-Array.cpp
/* Given two sorted arrays, a[] and b[], the task is to find the median of these sorted arrays, in O(log n + log m) time complexity, when n is the number of elements in the first array, and m is the number of elements in the second array. This is an extension of median of two sorted arrays of equal size problem. H...
ALGO
0.999997
6.019885
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-07-23T14:29: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": "495ed2babb2a...
f3ce397b-1c34-4a2c-800b-bee75981a4c0
shafiqzx2/365Days_challange
q2.cpp
#include<bits/stdc++.h> using namespace std; class mystack { public: list<int> l; void push(int val) { l.push_back(val); } void pop() { l.pop_back(); } int top() { return l.back(); } bool empty() { return l.empty(); } }; class myqu...
ALGO
0.999995
3.631005
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-12-31T18:06: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": "c2b3c6630d5...
271ebc29-dd82-4b4b-84ca-52dd814a4aa9
Koo-ling/Data-structure-work-and-practic
SortPractice/BinaryInsert.cpp
/* #include<iostream> using namespace std; void print(int a[], int n) { for (int i = 0; i <= n; i++) { cout << a[i] << " "; } cout << endl; } void InsertSort(int a[], int n) { int i, j, low,high, mid; for (i = 2; i <= n; i++) { a[0] = a[i]; low = 1; high = i-1; while (low <= high) { int mid = (high +...
ALGO
0.99998
4.180952
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2019-11-23T02:30:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "917021efe...
e3b5b41a-a5ac-4424-9206-59a159ef7380
abuzafarhaqq/programmingContest
book/dawn_of_Programming_Contest/page_22/palindrome_of_nth_number.cpp
/** Book Name: Dawn of Programming Contest Page: 22 Practice Problem: Palindrome হল সেই জিনিস সা সামনে থেকে পড়তেও যা পেছন দিক পড়তেও তা। যেমনঃ কিছু Palindrome number হলঃ 1, 2, 3, . . . 9, 11, 22, 33, . . . 99, 101, 111, 121, . . .. তোমাকে n তম Palindrome Number প্রিন্ট করতে হবে। (n < 100) Solver: Abu Zafar Haque Lang...
ALGO
0.998457
4.559978
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-11-13T19:20: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": "da05b67b4b...
8c2a691f-d1b6-4dac-b383-f5d20b5c5df8
Hailaylin/Algorithm
6_grath/S0603_.cc
/* * @Description: * @Author: HailayLin * @Date: 2021-11-15 11:10:38 * @LastEditTime: 2021-11-15 11:51:17 * @FilePath: \Algorithm\6_grath\S0603_.cc */ /** * @brief 题号:S0603 题目:无向图的深度优先搜索遍历(邻接表) 得分:0 作业提交截止时间:2021/11/15 12:00:00 题目内容: 在S0601的基础上修改程序,使用邻接表完成无向图的深度优先搜索遍历。 例1(只有最后2行为输出): 3 ...
ALGO
0.999958
5.167018
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2021-05-01T06:10: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": "f1b6a8c8...
d1cf863b-844c-41a5-91e2-b40e17f990be
rburaksaritas/threading-or-not
tenthreads.cpp
#include <iostream> #include <pthread.h> #include <vector> #include <chrono> /** * @author <NAME> * 2020400321 */ int findMin(std::vector<int> integers); int findMax(std::vector<int> integers); int findRange(std::vector<int> integers); int findMode(std::vector<int> integers); double findMedian(std::vector<int> inte...
ALGO
0.998285
5.837506
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-11-16T10: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": "134075c3ff2...
b8a248b2-b951-4ede-8911-ddef743b9f8c
raincross7/code-similarity
codes/train_code/problem155/problem155_357.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for (int (i)=0;(i)<(n);i++) #define INF 1001001001 #define LLINF 1001001001001001001 #define MOD 1000000007 template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b...
ALGO
0.999991
3.510706
{ "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": "de1bcc827e80...
870ded85-ddbe-4629-9061-fb4843b830b9
ishandutta2007/codeforces-p
popovicirobert/normal/1188/B.cpp
#include <bits/stdc++.h> #define lsb(x) (x & (-x)) #define ll long long #define ull unsigned long long /*const int MOD = ; inline int lgput(int a, int b) { int ans = 1; while(b > 0) { if(b & 1) ans = (1LL * ans * a) % MOD; b >>= 1; a = (1LL * a * a) % MOD; } return ans; } in...
ALGO
0.999907
4.091055
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49: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": "96ed79691814...
1f3a00b2-3f51-414b-9bd0-7e313473efbb
igoroogle/codeforces
div530/ZAD_D_2.cpp
#include<bits/stdc++.h> #define x first #define y second #define mp make_pair #define pb push_back #define em emplace_back #define sqr(x) (x) * (x) using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; vector<int> ed[100010]; ll ans[100010], sm[100010]; void dfs(int v, int ...
ALGO
0.999937
3.528033
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-09-05T19:15:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "837f4f44e1...
20ac34f1-f394-4aee-87b0-ef914ef07258
Martins3/ACM
leetcode/0/54.cpp
#include <iostream> #include <fstream> #include <vector> #include <cmath> #include <stack> #include <sstream> #include <climits> #include <deque> #include <set> #include <utility> #include <queue> #include <map> #include <cstring> #include <algorithm> #include <iterator> #include <string> #include <cassert> using name...
ALGO
0.999958
3.630141
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2018-03-05T11:57:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f7c70273...