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
a163ffe6-e5fd-4a6e-839c-37b3b67583cf
aemior/code_train
151202/main.cpp
#include <bits/stdc++.h> using namespace std; void ptable(vector<vector<int> >& tb_get, int m, int n){ for(int i=0; i<n; i++){ for(int j=0; j<m; j++){ cout << tb_get[i][j] << ' '; } cout << endl; } } int main() { freopen("test2.txt", "r", stdin); int n,m, tmp; v...
ALGO
0.999974
3.018911
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2020-10-26T01:08:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d7baf223...
c5272781-ff21-4fdd-ac69-26c83623da0d
JoaoVitorNatali/Bisca-Ia
src/main.cpp
#include <string> #include "PIG.h" #include "definicoes.h" #include "objetos.h" #include "desenhar.h" #include "verificaTecladoEMouse.h" void randomMutations() { static double RangeRandom = baralhos[0].jogadores[0].TamanhoDNA; int quantidadeIndividuos = QTD_JOGOS; Jogador* Vetor[QTD_JOGOS * 2]; Jogador* ...
TOOL
0.972517
4.445701
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-16T19:53:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b10ba5b788c...
7fb304ca-6d54-4f5b-a791-f6707c2c585d
Niladree60/Number-Theory
Check a number is a palindrome or not.cpp
#include <bits/stdc++.h> #include<stdio.h> #include<stdlib.h> #define mod 1000000007 using namespace std; #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef long long ll; const double pi = acos(-1.0); template <class T> using Ordered_Set = tree<T, null_type,...
ALGO
0.999744
4.819279
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-04-01T19:09: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": "165d49e93082...
d3b086ae-6a2c-4953-9f59-34f7b2775f31
Lokeshraj-D/LeetCode-GfG-Problems-solved
Dominant-File/dominant-files.cpp
class Solution{ public: void merge(vector<int> &arr, int l, int m, int r) { int i, j, k; int n1 = m - l + 1; int n2 = r - m; /* create temp arrays */ int L[n1], R[n2]; /* Copy data to temp arrays L[] and R[] */ for (i = 0; i < n1; i++) ...
ALGO
0.999941
5.244287
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2023-04-16T11:51: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": "adbc451860...
aaa9da7e-8799-4928-9304-52fc6d41fdff
tyt0815/BaekJoon_Solved
Silver1/2343.cpp
// // #include <iostream> // // #include <vector> // // using namespace std; // // int main() // // { // // ios::sync_with_stdio(false); // // cin.tie(nullptr); // // uint32_t n, m, TotalSize = 0, MaxSize = 0; // // vector<uint32_t> CourseSizes; // // cin >> n >> m; // // CourseSizes.resize(n...
ALGO
0.999991
5.280877
{ "github_metadata": { "branch": "main", "commit_count": 193, "repo_created_at": "2023-03-29T01:03:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64c96439ad...
da2b7a1d-8d72-41ad-866f-3b8e7b601127
hpc203/yolov8-face-landmarks-opencv-dnn
main.cpp
#include <fstream> #include <sstream> #include <iostream> #include <opencv2/dnn.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> using namespace cv; using namespace dnn; using namespace std; class YOLOv8_face { public: YOLOv8_face(string modelpath, float confThreshold, float nmsThreshold); void d...
ALGO
0.984252
4.804855
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-05-12T06:59:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 264, "forks": 50, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "bc2ba24...
bbec784e-f52b-40f7-87db-238301f198e1
AlaaAbuHantash/Competitive-Programming
UVA/11283 - Playing Boggle.cpp
#include <iostream> #include<string> #include<stdio.h> #include<vector> #include<algorithm> #include<map> #include<math.h> #include<string.h> using namespace std; #define mp make_pair int dx[] = {0 , 0 , 1 ,-1 , 1 , 1 , -1 , -1 } ; int dy[] = {1 , -1 , 0 , 0 , 1 ,-1 , 1 , -1 } ; vector<string > st(4); int vis[...
ALGO
0.999698
3.531482
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2018-04-10T11:13:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6341499b...
6c354deb-0e10-49a7-b10a-e3482834f88b
BennyIB/BennysFirst
batteship.cpp
#include <iostream> #include <ctime> #include <time.h> #include <array> using namespace std; char cpuboard[10][10]; // the ships are placed here char playerboard[10][10]; // the board that the player sees // resets the board to all underscores void reset(char b[10][10]); // displays board b with letter and numbers v...
TOOL
0.944101
3.24859
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-06-17T15:53: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": "3aadaef468...
5d11d63c-2140-49da-a66f-ffabbc0eb96f
Tugasunsikaabdulazizawan/Tugas-8
tugas8_abdulazizawan_1E.cpp
#include <iostream> #include <string> using namespace std; struct Zodiak { string nama; int mulai_bulan; int mulai_hari; int akhir_bulan; int akhir_hari; }; int main() { Zodiak zodiak[] = { {"Capricorn", 1, 1, 1, 19}, {"Aquarius", 1, 20, 2, 18}, {"Pisces", 2, 19, 3, 20...
TOOL
0.975796
4.773436
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-20T12:08:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f010dbe082b...
3488cf8c-4fd4-4e20-a7ca-0821e83152b1
PallaviCodeVoyage/DSA
STACK/678. Valid Parenthesis String.cpp
class Solution { public: bool checkValidString(string s) { stack<int> leftParen; // Stack to keep track of '(' positions stack<int> asterisk; // Stack to keep track of '*' positions for (int i = 0; i < s.length(); i++) { if (s[i] == '(') { leftParen.push...
ALGO
0.998034
6.225517
{ "github_metadata": { "branch": "main", "commit_count": 164, "repo_created_at": "2024-07-11T07:26:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7dbc16c895...
489aad15-0584-48e8-9c8e-122a3fa10c93
tokitsu-kaze/ACM-Solved-Problems
Codeforces/Educational Codeforces Round 23/817F - MEX Queries.cpp
#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <climits> #include <cctype> #include <map> #include <list> #include <stack> #include <queue> #include <vector> #include <set> #define mem(a,b) memset((a),(b),sizeof(a)) #define MP make_pair #define...
ALGO
0.99993
4.054167
{ "github_metadata": { "branch": "master", "commit_count": 1180, "repo_created_at": "2018-06-24T10:28:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb62c56...
6c696cba-543c-41bf-9026-9ebdcc948662
pnl-iiitd/2023-P4-for-all-tutorial
FPGA/Matrix_mul/HLS_Solution/matrix_tb.cpp
#include"mat.h" void mat_mul(M_TYPE mat1[row1][col1], M_TYPE mat2[row2][col2], M_TYPE result[row1][col2]); int main() { M_TYPE mat1[row1][col1], mat2[row2][col2],result[row1][col2],result_hw[row1][col2]; int i,j,k; //populating the input for(i=0;i<row1;i++) { for(j=0;j<col1;j++) mat1[i][j]=i; } for(i=0;i...
ALGO
0.999097
4.347803
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-07-15T10:57:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de12d84d6e86...
52f0a728-2afa-4672-921d-c5e77e517c79
habanero-rice/hclib
test/performance-regression/full-apps/qmcpack/src/QMCDrivers/CorrelatedSampling/CSRMCUpdatePbyP.cpp
////////////////////////////////////////////////////////////////// // (c) Copyright 2003- by <NAME> and <NAME> ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // <NAME> // National Center for Supercomputing Applications & // Mat...
ALGO
0.993409
5.858234
{ "github_metadata": { "branch": "master", "commit_count": 705, "repo_created_at": "2014-08-11T16:15:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 71, "forks": 36, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "334f10...
daad6232-6811-487e-9ab2-1910e9edb554
SwapnilBorse123/LeetCodeIsFun
lcIslandPerimeter_463.cpp
/* author: <NAME> date: 10th Feb 2018 */ #include <bits/stdc++.h> using namespace std; class Solution { public: int islandPerimeter(vector<vector<int>>& grid) { int perimeter = 0; for (int row = 0; row < grid.size(); ++row){ for(int col = 0; col < grid[0].size(); ++col){ if(grid[row][col] ...
ALGO
0.999946
4.896953
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2017-12-22T18:23:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c030c1d99...
e96d91b7-958b-4841-93ce-41d3716097e2
ishandutta2007/codeforces-m
maspy/normal/1352/E.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll using pi = pair<int, int>; using vi = vector<int>; #define FOR(i, n) for (int i = 0; (i) < (int)(n); ++(i)) #define FOR3(i, m, n) for (int i = (m); (i) < (int)(n); ++(i)) #define FOR_R(i, n) for (int i = (int)(n)-1; (i) >= 0; --(i)) #d...
ALGO
0.999393
4.278717
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5de69801d9cd...
d8881140-0704-4704-b521-e604b083bc88
igorbragaia/algorithms
util/sorting.cpp
#include <bits/stdc++.h> using namespace std; class Sort { public: Sort(vector<int> input): arr(input){} virtual void sort(){}; void printArray(){ for (int el : arr) { cout << el << " "; } cout << endl; } vector<int> getArray(){ return arr; } protect...
ALGO
0.999472
5.066693
{ "github_metadata": { "branch": "master", "commit_count": 292, "repo_created_at": "2017-10-06T16:34: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": "57d8abcf...
37ba5fa0-2085-40c4-8bde-4cd05ef85cd8
jungseokyoung-cloud/Algorithm
C++/Gold 1/BOJ_9328(열쇠).cpp
// // BOJ_.cpp // BOJ // // Created by jung on 11/17/23. // #include <iostream> #include <queue> #include <string> #include <cstring> using namespace std; #define FAST ios::sync_with_stdio(0),cin.tie(0),cout.tie(0) #define endl '\n' int dx[] = {-1, 0, 1, 0}; int dy[] = {0, -1, 0, 1}; char key[26]; char arr[100]...
ALGO
0.99938
4.256238
{ "github_metadata": { "branch": "main", "commit_count": 264, "repo_created_at": "2021-03-26T04:53: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": "9a05b74a35...
7315f7f6-7963-4baf-8708-611bf9d5d8a0
zhouyong1234/SLAM-All-In-One
SLAM框架搭建/SLAM-KDQ/SlamCodes/vo_initialization/src/Initialization/Initializator.cpp
#include <numeric> #include "Initialization/Initializator.hpp" #include <opencv2/core/eigen.hpp> Initializator::Initializator(CameraPtr camPtr,float focalLength) :camPtr_(camPtr),focalLength_(focalLength),resetReferFlg_(true) { ref_ = nullptr; std::cout << "Focal Length = " << focalLength_ << std::endl; } Initial...
ALGO
0.985231
5.60192
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-08-04T02:28:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 366, "forks": 92, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e8af997f1...
f91afbb2-bfed-4e7d-a96c-27866013e944
ManashSwain/DSA
9_Arrays/arrays.cpp
// Basic array example : #include <iostream> using namespace std ; int main(){ // method 1 : // initialization of an array int marks[5]; // filling data in an array marks[0] = 65; marks[1] = 67; marks[2] = 43; marks[3] = 87; marks[4] = 34; cout << "Marks at index 0 is : " <...
ALGO
0.997698
4.214097
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-08-20T18:36: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": "aa685d8f048...
0a02ac84-234a-4ac8-84c8-7ff0d8dd5411
my4-dev/atcoder
01_abc/abc131/b.cpp
#include<iostream> #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) using P = pair<int,int>; /* 大文字を小文字に変換 */ char tolower(char c) {return (c + 0x20);} /* 小文字を大文字に変換 */ char toupr(char c) {return (c - 0x20);} // if('A'<=s[i] && s[i]<='Z') s[i] += 'a'-'A'; /* s...
ALGO
0.999854
3.370559
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-12-01T11:16: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": "6a007cd0a3...
bcb68b71-c8c9-4c5c-85ff-31c6d0e72d0e
yinghaoyu/LeetCodeInHardWay
src/Problem_0204_countPrimes.cc
#include <iostream> #include <vector> #include "UnitTest.h" using namespace std; class Solution { public: // 埃式筛法 int countPrimes(int n) { if (n < 3) { return 0; } // f[i] true表示被筛选过 vector<bool> f(n); // 首先排除一半的数,因为偶数一定不是质数 int count = n / 2; // 筛选所有的奇数,注意这里的上界是 i*i < n ...
ALGO
0.998953
5.485729
{ "github_metadata": { "branch": "master", "commit_count": 1326, "repo_created_at": "2022-08-08T13:33: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": "d5e1ce9...
736f5dcb-b414-40f7-80de-78cf4ae68eb5
ftiasch/acm-icpc
codeforces/25-codeforces-beta-round-25/C.cpp
// Codeforces Beta Round #25 // Problem C -- Roads in Berland #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> const int N = 300; int n, dist[N][N]; int main() { scanf("%d", &n); for (int i = 0; i < n; ++ i) { for (int j = 0; j < n; ++ j) { scanf("%d", &dist[i...
ALGO
0.999943
4.520029
{ "github_metadata": { "branch": "master", "commit_count": 934, "repo_created_at": "2012-04-22T02:50:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 113, "forks": 35, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf0cb...
ac697240-ab1d-42e4-9e2d-f39af2064697
Bennuny/graphic_is_awsome
Games101/code/pa2/rasterizer.cpp
// clang-format off // // Created by goksu on 4/6/19. // #include <algorithm> #include <vector> #include "rasterizer.hpp" #include <opencv2/opencv.hpp> #include <math.h> rst::pos_buf_id rst::rasterizer::load_positions(const std::vector<Eigen::Vector3f> &positions) { auto id = get_next_id(); pos_buf.emplace(i...
ALGO
0.971812
6.145176
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2022-08-11T03:44: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": "4c883904336...
7bfb95e2-8670-4b0e-81da-4b4af5d29681
trilinos/Trilinos
packages/nox/src-loca/src-epetra/LOCA_Epetra_AdaptiveStepper.H
// @HEADER // ***************************************************************************** // LOCA: Library of Continuation Algorithms Package // // Copyright 2001-2005 NTESS and the LOCA contributors. // SPDX-License-Identifier: BSD-3-Clause // **************************************************************...
ALGO
0.987777
4.946398
{ "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":...
bd580c9f-e19c-4345-9568-5e55429265ae
apache/mesos
3rdparty/stout/include/stout/flags/parse.hpp
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed und...
TOOL
0.948187
7.149222
{ "github_metadata": { "branch": "master", "commit_count": 18448, "repo_created_at": "2013-07-17T07:00:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5328, "forks": 1676, "issues": 0, "pull_requests": 12 }, "file_meta": { "content_id": "...
2b9a7b1b-90fa-43e8-af14-53b73633e4f8
nandha1nks/CSD_Project
Virtual-Machine/vm.h
#include <bits/stdc++.h> #include "token.h" using namespace std; #define outputTemVM "temp.vm" class VM { private: string ifname, ofname; vector<Token> tokens; string token; stack<vector<string>> localVars; stack<vector<string>> args; int inputLabel=0; void threeAddToVMCode(); void vmC...
TOOL
0.98992
3.450939
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-11-30T21:51:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9ec1577b9...
b17ae87b-060f-4b03-a5c1-c5bb2bbdd425
woojon12/Practicing-Gamblers-fallacy
큰 수의 법칙과 독립시행의 동시성립에 대한 실험.cpp
/* * 흔히 도박사의 오류, 겜블러의 오류라고 불리는 그것. * 지금까지 동전의 앞면이 많이 나왔으니 * 앞으로도 많이 나올 것이다 or 이제는 뒷면이 나올 때이다 * 와 같이 생각하는 것은 잘못된 것이라고 한다. 하지만 이는 직관적으로 받아들이기 어렵다. 동전 1000번 던져서 앞면(or뒷면)이 300번 이하로 나올 확률은 너무너무너무 작다. 실제로 프로그램 돌려보면 430 아래로 내려가는 일이 잘 없다. 이 정도면 분명 한쪽 면이 많이 나왔으면 다른 한쪽 면이 보충되어줘야 그런 법칙이 성립한다고 할 수 있지 않은가? 도박사의 오류는 사실 오류가 아니게 되지...
ALGO
0.989153
4.432679
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-06-12T06:52:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34a50afb78a8...
d2a38b40-a203-463f-b7c5-9e7175d9d567
Aheed-Siddiqui-Official/DSA
Lecture 63 Doubly LL/pop_back.cpp
#include <iostream> using namespace std; class Node{ public: int data; Node* next; Node* prev; Node(int val) { data = val; next = prev = NULL; } }; class DoublyList { Node* head; Node* tail; public: DoublyList() { head = tail = NULL; } void push...
ALGO
0.999415
5.833591
{ "github_metadata": { "branch": "main", "commit_count": 371, "repo_created_at": "2025-03-20T01:50:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb864dabbd...
fc8ec137-f194-4f37-add6-d814b7438059
caleb-j-kim/bank-simulation
main.cpp
/* <NAME> 4/10/2025 CS 4348.501 Main file that starts the simulation and creates the threads. */ #include "BankSimulation.h" #include "Customer.h" #include "Teller.h" #include <iostream> // for printing messages to the console. #include <thread> // for creating threads for each teller and customer. #inclu...
ALGO
0.989733
4.913563
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-04-08T05:25: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": "3defa5296b0c...
f9912359-ae30-4437-8bdf-f3b80666b3b0
tanzil7890/practice-c-
DSAlgo/Arrays/ADT/Duplicateelement.cpp
#include <iostream> using namespace std; struct Array{ int A[100]; int size; int length; }; void Display(struct Array arr){ for (int i = 0; i < arr.length; i++) { cout<<arr.A[i]; } } int biggestElementInArray(struct Array arr){ int high = arr.A[0]; for (int i = 0; i< arr.lengt...
ALGO
0.999153
4.447977
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2022-06-16T14:49: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": "075e6bd70...
b573e2ef-586b-4f2d-ad89-a62ec6b73285
dhruv-yadav-nitj/striver-a2z-dsa-cpp
Step 09 ~ Stacks and Queues/.INTERVIEW-TYPE-PROBLEMS/08-LRU-CACHE.CPP
#include <bits/stdc++.h> using namespace std; // IMPORTANT PROBLEM // ITS LOGIC IS VERY EASY -> BUT IMPLEMENTATION IS QUITE LENGTHY // https://leetcode.com/problems/lru-cache/description/ // using linked list since we need O(1) time in get and put function class Node { public: int key, value ; Node *prev, *next...
ALGO
0.997845
5.928339
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2023-06-07T19:26:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 52, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6e8fc8a...
62e44a85-b488-4c3e-933d-859690770c99
b3hr0uz/Radix-Sort-Using-Bins
main.cpp
// // main.cpp // Radix-Sort-Using-Bins // // Created by <NAME> on 6/15/24. // #include <iostream> #include <vector> #include <queue> #include <string> #include <algorithm> using namespace std; // Function to pad names with spaces to make them equal length void padNames(vector<string> &names) { size_t maxLeng...
ALGO
0.999961
6.118447
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-16T07:05: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": "584a71f77d56...
e469656a-1944-45ee-9d7b-3af64e3b5d8a
kennent/for_scsc_code_save
codeforces/edu151/a.cpp
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; int t; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> t; while (t--) { int n, k, x; cin >> n >> k >> x; if (k == 1) cout << "NO\n"; else { if (n%2) { if (x != 1) { cout <<...
ALGO
0.999744
3.848524
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-16T23:16:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f3548c2ff96...
63433c1d-9106-4bc4-8503-acf4eedf58bb
gaojs/algorithm
leetcode/clang/153. 寻找旋转排序数组中的最小值.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int findMin(int*a, int n) { if (a == NULL || n == 0) { return -1; } else if (n == 1) { return a[0]; } int left = 0, right = n - 1; while (left < right) { int mid = left + (right - left)/ 2; // printf("(%d-%d)=%d=[%d]\n", left, ri...
ALGO
0.999988
3.012498
{ "github_metadata": { "branch": "master", "commit_count": 262, "repo_created_at": "2019-11-05T00:14:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c5b6e6c...
c48ca1a1-f040-4e54-87b3-1ecd7f41c7ec
Pisces311/vscode_workspace
ACM/Online Judges/vjudge/kuangbin/12. Easy dp/Super_Jumping!_Jumping!_Jumping!.cpp
#include <bits/stdc++.h> using namespace std; //#define DEBUG typedef long long ll; typedef pair<int, int> pii; #define scan(a) scanf("%d", &a) #define print(a) printf("%d\n", a) #define up(i, a, b) for (int i = a; i <= b; ++i) #define dn(i, a, b) for (int i = a; i >= b; --i) const int maxn = 1e3 + 5; int n; int a[m...
ALGO
0.999863
3.49799
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2020-03-21T02:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78745f63...
4337fb9b-927c-4eaf-a35e-86cc0a07b947
navom7/DS-Algo
C++/CheatSheets/Stacks.cpp
#include <iostream> #include <stack> using namespace std; int main() { // Creating a stack stack<int> s; // Push elements onto the stack s.push(10); // O(1) s.push(20); // O(1) s.push(30); // O(1) // Check if stack is empty if (s.empty()) { cout << "Stack is empty\n"; }...
ALGO
0.920239
6.447043
{ "github_metadata": { "branch": "main", "commit_count": 254, "repo_created_at": "2021-07-28T09:31: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": "b60b5be243...
fdc648df-0afb-432e-b473-216806c7666b
ghnjk/gomoku-ai
history_code/cpp_mcts_code/gomoku-common/code/gomoku/gomoku_simulator.h
/** * @File gomoku/gomoku_simulator.h * @Brief file_description * Details: * @Author guohainan * @Version v0.0.1 * @date 2017-09-08 23:39:18 */ #ifndef gomoku__GOMOKU_SIMULATOR_H__ #define gomoku__GOMOKU_SIMULATOR_H__ #include <map> using std::map; #include "gomoku/chess_board.h" namespace gomoku { class Gom...
ALGO
0.99741
4.160005
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2017-09-05T01:17:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87ae27183...
9e9d6704-686d-4e0a-aaf2-17f9d2cb5c39
NVIDIA-Omniverse/PhysX
physx/source/geomutils/src/contact/GuContactSphereSphere.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 binary...
ALGO
0.985661
6.09372
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-10-04T09:07:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4056, "forks": 524, "issues": 38, "pull_requests": 8 }, "file_meta": { "content_id": "d45b09...
315bc517-1d79-47a0-8765-07758a75fa80
tensonohikari/.happy-coooding
AlgoKit (3rdp)/Code-store v1.0/code-jam/cpp/algorithms/DivisorsCalculator.cpp
#include<iostream> #include<math.h> #define MAX 100 using namespace std; using namespace std; int factors[MAX]; int times[MAX]; int total = 0; int divisors[MAX]; int totalDivisors = 0; long insertFactor(long lastFact, long actualFact) { if(lastFact != actualFact) { factors[total] = actualFact; times[t...
ALGO
0.999855
4.130369
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2018-10-14T21:04:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5f6a8696...
5dd6ed81-b59b-4400-a642-8d88e32c3f5d
xcf1992/leetcode
C++/split_array_into_consecutive_subsequences.cpp
/* 659. Split Array into Consecutive Subsequences https://leetcode.com/problems/split-array-into-consecutive-subsequences/ You are given an integer array sorted in ascending order (may contain duplicates), you need to split them into several subsequences, where each subsequences consist of at least 3 consecutive integ...
ALGO
0.999908
6.370272
{ "github_metadata": { "branch": "master", "commit_count": 1784, "repo_created_at": "2017-12-26T04:19:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb44df7...
5da391c7-016c-49eb-b758-4c4444d8754d
Manaswini1832/AoC2024
day8/day8_2.cpp
/* Guessing that we need to find pairs of same frequency antennas - for each pair, make a line equation - count the number of points of the grid that are on this line */ #include <iostream> #include <vector> #include <unordered_map> using namespace std; struct Line { int A, B, C; Line(vector<int> pt1...
ALGO
0.999854
5.090744
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-12-03T10:55: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": "5dc8401b26f...
9f4b669a-d6ed-44bf-8969-8d7f043de727
deepam20050/competitive-programming
solutions/CF294C.cpp
#include "bits/stdc++.h" using namespace std; const int N = 1e3 + 5; const int MOD = 1e9 + 7; int pascal[N][N], f[N]; bitset < N > on; int n, m; void precalc () { pascal[0][0] = 1; for (int i = 1; i <= n; ++i) { pascal[i][0] = 1; for (int j = 1; j <= i; ++j) { pascal[i][j] = (pascal[i - 1][j] + pa...
ALGO
0.999998
4.176
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-01-05T12:59: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": "ff2800bc9f8...
6525c027-8a32-42c9-a9a2-1de72658c232
Aayush-Sood101/CSES-ProblemSet
DynamicProgramming/CoinCombinations1.cpp
#include<bits/stdc++.h> #define mod 1000000007 #define ll long long int using namespace std; //TOP DOWN SOLUTION DOES NOT SUBMIT DUE TO LARGE NUMBER OF RECUSRSIVE CALLS vector<int> dp; int f(int target , vector<int> coins){ if(target == 0) return 1; if(target < 0) return 0; if(dp[target] != -1) return...
ALGO
0.999987
4.751019
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-12-09T05:04: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": "0268300b6514...
b5ad50ee-32fb-4acf-944e-ef31fa835bda
CitrusRokid/OpenNPD
src/npd_train/NPD.cpp
#include "common.h" #include "opencv2/core/core.hpp" #include <omp.h> #include <math.h> using namespace std; void NPD(vector<cv::Mat>& imageArray, cv::Mat& feaMat) { // Set the number of threads int numProcs = omp_get_num_procs(); int numThreads = (int)floor(numProcs * 0.8); omp_set_num_threads(numThreads); i...
ALGO
0.999912
4.29198
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-06-10T09:25:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 125, "forks": 128, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "e0a20...
4d3bfbc7-5497-43ca-87d4-266903c099d2
wang1qing1/Cpp
24 01 29 oj/将有序数组转换为二叉搜索树.cc
/** * 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.999985
6.494432
{ "github_metadata": { "branch": "main", "commit_count": 290, "repo_created_at": "2023-01-04T13:12:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7c7a26045...
474fd2a5-c1ee-42a6-bcf3-2b69b0e149fa
Darsh1907/LeetCode-solutions
0501 - 1000/601-700/654. Maximum Binary Tree/self.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.646213
{ "github_metadata": { "branch": "main", "commit_count": 868, "repo_created_at": "2023-06-06T04:45: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": "a5e9244b53...
64c16aed-1a4e-4e55-8885-211810e6eb40
Quancoder260503/Programming-Contest-Solution
ARCHIVE/EulerWalk.Cpp
#include<bits/stdc++.h> #include<iostream> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> ii; const int N = 5e5 + 5; vector<pair<int,int>>adj[N + 1]; int n,m,timer; int indeg[N + 1]; int outdeg[N + 1]; bool vis[N + 1], use[N + 1]; list<int> EulerWalk(int u){ list<int>a...
ALGO
0.999995
4.174906
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-26T07:27: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": "fe7591e71740...
b9f5463c-fc8c-4bda-b6c2-f53d59a1c7ff
harrynull/Logic-Expression-Solver
main.cpp
#include <iostream> #include <string> #include <set> #include "solver.h" inline std::ostream& operator << (std::ostream& os, Logic rhs) { if (rhs == Logic::True) os << "True"; else if (rhs == Logic::False) os << "False"; else if (rhs == Logic::Unknown) os << "Any"; return os; } int main() { while ...
ALGO
0.997926
5.060458
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-04-22T09:17: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": "bef941b2e9...
ada111c7-2eb4-4467-962a-916ceb0307fb
BenDavisonPetch/BAMReX
Source/Fluxes/SLIC.cpp
#include "Fluxes/Flux_Helpers.H" #include "Fluxes/Fluxes.H" #include <AMReX_Box.H> #include <AMReX_Extension.H> #include <AMReX_FArrayBox.H> #include <AMReX_GpuQualifiers.H> #include <AMReX_REAL.H> using namespace amrex; template <int dir> AMREX_GPU_HOST void compute_SLIC_flux(amrex::Real time, const amrex::Box &bx,...
ALGO
0.999691
6.123022
{ "github_metadata": { "branch": "main", "commit_count": 230, "repo_created_at": "2024-04-04T14:10: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": "1705fe8161...
53d73687-87da-4aff-a387-f0b3f589ea35
ApoorvaSunkad/StringQuestions_Cpp
findfirstrepeatedchar.cpp
/* Given a string S. The task is to find the first repeated character in it. We need to find the character that occurs more than once and whose index of second occurrence is smallest. S contains only lowercase letters. Example 1: Input: S="geeksforgeeks" Output: e Explanation: 'e' repeats at third position. Ex...
ALGO
0.999981
4.137996
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2023-11-30T10:05: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": "59280d9019b...
5aeeb628-96d7-42dd-a510-6fb121b1d630
shreyansh28801/StriverCpSheet
BinarySearch/Edu/Step2/q1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long int li; #define int long long int typedef long double ld; #define lb lower_bound #define ub upper_bound #define pub push_back #define pob pop_back #define nl "\n" typedef long double ld; template <typename ...
ALGO
0.999976
4.361906
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2022-06-28T17:38:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83e32a873...
66fa036d-0a6b-4b78-8baf-72b4a5d13bdb
codingosol/BOJ
복습/Class/3/Day3/1541.cpp
#include <iostream> #include <vector> using namespace std; int main(void) { string str; cin >> str; vector<int> v; vector<char> oper; bool flag = false; // -가 식 내에 존재하는지 판별 int temp = 0; for(int i = 0; i < str.length(); i++) { if(str[i] >= '0' && str[i] <= '9') { ...
ALGO
0.999972
4.147267
{ "github_metadata": { "branch": "master", "commit_count": 224, "repo_created_at": "2023-02-04T13:55:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5baa9e2...
c58ff5e9-5438-4d4b-bc42-c8745241c655
luliyucoordinate/Leetcode
src/1395-Count-Number-of-Teams/1395.cpp
const int N = 1e5; class Solution { public: int numTeams(vector<int>& rating) { if (rating.size() < 3) return 0; int leftTree[N + 1] = {}; int rightTree[N + 1] = {}; for (int r : rating) update(rightTree, r, 1); int res = 0; for (int r : rating) { updat...
ALGO
0.999964
5.502765
{ "github_metadata": { "branch": "master", "commit_count": 1055, "repo_created_at": "2018-05-09T12:30:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1490, "forks": 481, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19...
2e5b2eba-799f-48d0-a92b-3d228630a2e1
fextivity/codeforces-submissions
codeforces/1185/G1.cpp
#include<bits/stdc++.h> using namespace std; // Shortcut #pragma optimize ("O3") #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 (i...
ALGO
0.999996
3.524873
{ "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": "f9a91c2...
ab9a0207-21c3-4bc6-adce-29c769689ada
ishandutta2007/codeforces-h
hellkitsune/normal/966/D.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define forn(i, n) for (int i = 0; i < (int)(n); ++i) typedef long long LL; typedef pair<int, int> PII; int n, m; vector<int> g[300000]; int dist[300000], pre[300000], cm[300000], cnt = 0; vector<int> cv[300000]; queue<int> q; ve...
ALGO
0.999987
3.659548
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e38d6873fdb0...
da790c29-8a53-4f6a-9a85-efabc23da4ea
sadiaripa81/Basic-Data-Structures
module 8 assignment 2/Remove_Duplicate.cpp
// You will be given a singly linked list of integer values as input. You need to remove duplicate values from the linked list and finally print the linked list. // The process is, for each node N, traverse from that node and delete all nodes where the values are same with N. // Input Format // First line will contain ...
ALGO
0.999936
5.171438
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2025-07-01T09:31:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e50fb2811e5...
572db2ca-cd59-43aa-b681-2c22aa0acb92
mohit-jethwani49/LRU-Cache
LRU Cache.cpp
#include<bits/stdc++.h> using namespace std; struct entry { entry(string k, int v, entry *n, entry *p): key(k), value(v), next(n), prev(p){} string key; int value; entry *next; entry *prev; }; struct hash_item { hash_item(string k, entry *p): key(k), ptr(p){} string key; ...
ALGO
0.993338
4.719141
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-11-02T02:00: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": "b310ed1c4b12...
065ef2ec-54c8-4346-a037-0ab56c5d1b36
Huyneef/DSA_as9_linked_as10_bts_as12_cnptk
pro9.cpp
#include <iostream> using namespace std; struct Node { int data; Node *left; Node *right; }; typedef Node *Tree; Tree getNode(int x) { Tree p = new Node; p->data = x; p->left = NULL; p->right = NULL; return p; } void insertTree(Tree &t, int x,bool& isFlag) { if (t) { if(...
ALGO
0.999915
4.166065
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-06-16T03:50: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": "21cdae60822c...
e0ad7092-1359-423d-a3fc-df84c8ef86f8
Lakshya-249/DSA_C-_repo
graph_disjoint-sets_remove-stones.cpp
#include<bits/stdc++.h> using namespace std; class disjoint_set{ public: vector<int>parent,size; disjoint_set(int n){ parent.resize(n+1); size.resize(n+1); for(int i=0;i<n+1;i++){ parent[i]= i; size[i]= 1; } } ...
ALGO
0.999822
5.193197
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-05-12T11:55: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": "7f23ff2cbc6...
283ec128-fe5f-425f-87f6-368fe0db724b
tensorflow/tensorflow
tensorflow/compiler/tf2xla/kernels/unique_op.cc
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
ALGO
0.98275
7.82441
{ "github_metadata": { "branch": "master", "commit_count": 182413, "repo_created_at": "2015-11-07T01:19:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 190773, "forks": 74758, "issues": 873, "pull_requests": 553 }, "file_meta": { "content...
9f469239-a521-422a-9c48-56d6308ba62a
tirelt/AdventOfCode
2022/day10/main.cpp
#include <fstream> #include <iostream> #include <string> #include <vector> #include <utility> #include <set> using std::string; using std::cout; using std::endl; using std::vector; using std::pair; using std::set; int main(){ std::ifstream file("input"); string line; int res_1 = 0, x = 1, cycle = 0;...
ALGO
0.999578
4.865738
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2024-10-05T04:36:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa577704...
6dc09b51-e266-4b38-afb6-b193c9d67c2a
chris-hong/basic_algorithm
acmicpc/10972_다음순열/10972_다음순열/main.cpp
#include <iostream> #include "quickSort.h" using namespace std; /* << 알고리즘 >> 뒤에서 앞의 방향으로 탐색하여 K와 K-1의 값을 비교하여 K-1의 값이 K보다 작은 K를 구한다.(경계점) LEFT : K-1 RIGHT : K 뒤에서 앞의 방향으로 탐색하여 Left의 값보다 큰 첫번째 값과 Left의 값을 서로 바꾼다. (SWAP) RIGHT ~ N 의 영역에 대하여 오름차순 정렬을 한다. (정렬) */ int main() { ios::sync_with_stdio(false); int N; i...
ALGO
0.999976
4.493873
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2018-03-23T14:30: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": "3d6e22913...
bb9e9a72-a1c6-4b9a-a046-fa4f0faa97ba
nitin-sharma04/Leetcode-Solutions
1605-minimum-number-of-days-to-make-m-bouquets/1605-minimum-number-of-days-to-make-m-bouquets.cpp
class Solution { public: bool ispossible(vector<int>& arr, int mid, int m, int k) { int count = 0; int ans = 0; for (int i = 0; i < arr.size(); i++) { if (arr[i] <= mid) { count++; } else { ans += (count / k); count = 0;...
ALGO
0.999996
5.613781
{ "github_metadata": { "branch": "main", "commit_count": 1530, "repo_created_at": "2024-06-30T13:50:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5634cdf4e...
ccc262e6-1b2b-4675-a75a-25308088e399
LiuXinchen1997/MyOJRecord
LeetCode/39.组合总和2.cpp
/* * @lc app=leetcode.cn id=39 lang=cpp * * [39] 组合总和 */ // @lc code=start // bfs struct Obj { vector<int> v; int id; int sum; Obj(const vector<int>& v_, int id_, int sum_) { v = v_; id = id_; sum = sum_; } Obj(const Obj& obj) { v = obj.v; id = obj.i...
ALGO
0.999945
6.524087
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2018-01-21T14:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e4d81b8...
3f884242-30ce-48cf-a847-d686a4991ea9
Axel-ex/SEAME-ADS-Autonomous-lane-detection-24-25
lane_keeping_ws/src/motion_control/src/MotionControlNode.cpp
#include "MotionControlNode.hpp" #include "PolyFit.hpp" #include <opencv2/opencv.hpp> using namespace rclcpp; /** * @brief Initializes ROS2 subscriptions, publishers, and control parameters. * * Parameters: * - `kp`, `ki`, `kd`: PID gains. * - `base_speed`: Default forward velocity. * - `lookahead_index`: Verti...
TOOL
0.982536
7.033673
{ "github_metadata": { "branch": "main", "commit_count": 160, "repo_created_at": "2025-02-05T16:42: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": "a363820ee1...
d613e3d8-47ed-4cac-80b0-f8493bc7ef5f
mycbxzd1/myCppCode
other-system/上海计算机学会/2024年12月月赛/分组问题.cpp
#include<bits/stdc++.h> using namespace std; const long long mod=1e9+7; class IO{ private: void _read(int &x){ x=0; char ch=getchar(); bool f=0; while(ch<'0'||ch>'9'){ if(ch=='-')f=1; ch=getchar(); } while(ch>='0'&&ch<='9'){ x=(x<<3...
ALGO
0.99997
3.601139
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2024-12-02T10:45: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": "54371e7f0...
19e38d80-475a-4c07-bafc-420d6dd406aa
blinderchief/CP_Practice
27-09-24/boxfitting.cpp
// #include<bits/stdc++.h> // using namespace std; // #define ll long long int // #define f(i,a,n) for(int i =a;i<n;i++) // #define vll vector<ll> // #define pb push_back // #define po pop_back // #define all(v) v.begin(),v.end() // #define no cout << "NO" << '\n'; // #define yes cout << "YES" << '\n'; // #define sot(...
ALGO
0.999993
4.929439
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2025-02-17T18:25:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f4cbf6784f...
f550d927-0e66-45aa-8381-4f9ad8d878a1
saiyajinu/labSD
lab4exc5.cpp
#include <iostream> using namespace std; struct Node{ int data; Node* next; }; class Queue{ public: Node *ffront, *rear; Queue(){ ffront = rear = NULL; } void insertQ (int val){ Node* p = new Node(); p->data = val; p->next = NULL; if (rear == NULL) ...
ALGO
0.999848
3.748251
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-04-06T21:32: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": "8ba3b8930cce...
9d4c3e1e-c348-48e3-aeb6-772587e37435
Gaurav-20/LeetCode-Solutions
1020-number-of-enclaves/1020-number-of-enclaves.cpp
class Solution { public: int n, m; // void traverse(vector<vector<int>>& grid, int i, int j, vector<vector<bool>>& visited, // int& count, bool& isClosed) { // if (i < 0 || j < 0 || i >= n || j >= m || visited[i][j] || grid[i][j] == 0) { // return; // } // ...
ALGO
0.999959
6.133994
{ "github_metadata": { "branch": "main", "commit_count": 4680, "repo_created_at": "2022-03-05T07:21:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b5c1fd63...
9c78a8d6-49f1-47ae-84e7-bbfe49d81af2
cubercsl/The-road-to-ACMer
ECNU/EOJ_Monthly_2018_07/C.cpp
#include <bits/stdc++.h> using namespace std; #pragma optimize("-O3") typedef long long ll; typedef long double ld; typedef vector<int> VI; typedef vector<ll> VL; typedef pair<int, int> PII; typedef pair<ll, ll> PLL; string to_string(string s) { return '"' + s + '"'; } string to_string(const char* s) { return to_st...
ALGO
0.999763
3.98972
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2017-04-28T00:42:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 54, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d086f83...
8c2680cc-5219-4f41-bebe-1313d63f2ac4
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/14/52/14.cpp
#include <stdio.h> #include <memory.h> #include <algorithm> using namespace std; int h[102]; int g[102]; int dt[130][11][1003]; // current hitting monster, tower hit count, my remainings. int main(){ int T; scanf("%d",&T); for(int testcase = 1; testcase <= T; testcase++) { int p,q,n; scanf("%d%d%d",&p,&q,&n)...
ALGO
0.99987
3.039819
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "dc5307ac...
30f16872-25ea-4823-8718-d704e345f568
ishandutta2007/codeforces-g
geniucos/normal/799/B.cpp
#include<bits/stdc++.h> using namespace std; int ind[3][3], N, M, p[200009], a[200009]; vector < int > v[3][3]; int main () { //freopen ("input", "r", stdin); //freopen ("output", "w", stdout); scanf ("%d", &N); for (int i=1; i<=N; i++) scanf ("%d", &p[i]); for (int i=1; i<=N; i++) scanf ("%d", &a[i]); for ...
ALGO
0.999956
3.359859
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:55:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7eedf7c62282...
efa4a69a-6fdf-47d6-ae9d-ec048ec55f45
ishandutta2007/codeforces-s
summitwei/normal/966/B.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<pair<int, int> > vpii; typedef pair<int, int> pii; typedef long long ll; typedef pair<ll, ll> pll; #define INF 1000000000 #define MOD 1000000007 #define EPSILON 0.00001 #define f first #define s second #define pb push_back #define mp m...
ALGO
0.99999
3.278444
{ "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": "2ee4d02d8376...
37b3037d-69f6-466e-82ef-6914b4a05c30
viplix3/DSA
BinarySearchTree/AVL_Tree.cpp
#include<bits/stdc++.h> using namespace std; namespace AVL { struct Node { int data; Node *left, *right; int height; Node(int x) // new node is always added at leaf, so height is 1 : data(x), left(NULL), right(NULL), height(1) {} }; int height(Node *root) { if(root == NULL) return 0; return...
ALGO
0.999963
5.541441
{ "github_metadata": { "branch": "main", "commit_count": 775, "repo_created_at": "2020-11-02T01:41: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": "a02c96fa00...
6c9e7744-0ace-48ee-9bbc-80e739704ed1
bibimoni/codeStuff
cp/nhamtan/olp304_10_24/a.cpp
// time-limit: 3000 /** * Author: distiled */ #include<bits/stdc++.h> using namespace std; #ifdef DEBUG #include </Users/distiled/codeStuff/templates/debug.h> #else #define dbg(x...) #endif #define int long long signed main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; int ...
ALGO
0.999359
3.75242
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-08-23T09:31: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": "a7501759997...
3174a576-f27a-4f60-848d-500e637ba561
ishandutta2007/codeforces-i
-is-this-fft-/normal/617/C.cpp
#include <iostream> #include <vector> #include <algorithm> const long long INF = 1e+18 + 1000; using namespace std; struct point { long long x, y; point () { x = 0; y = 0; } }; long long distsq (point a, point b) { return (b.x - a.x) * (b.x - a.x) + (b.y - a.y) * (b.y - a.y); } int main () { i...
ALGO
0.999685
3.666363
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "3be001a68254...
c8cee0ea-ceb9-412c-9eaf-ed1abc475f53
DawnteaStudio/TIL
coding-test/Baekjoon/1000/1072.cpp
#include <iostream> #define fast ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); using namespace std; long long game, win; long long solve(long long win_rate) { long long left = 1; long long right = game; long long mid, tmp; while(left <= right) { mid = (left + right) / 2; ...
ALGO
0.999519
3.011698
{ "github_metadata": { "branch": "main", "commit_count": 1633, "repo_created_at": "2023-04-27T15:22: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": "558465d31...
3f2fce63-4223-4509-9a32-079c1ac069ed
bholagabbar/algorithmic-programming
Code/WorkspaceB/C++_Files/CC/RECRECOV.cpp
//<NAME> [bholagabbar] #include <bits/stdc++.h> using namespace std; #define readFile freopen("E:/Shreyans/Documents/Coding Workspace/STDINPUT.txt","r",stdin); #define getPrecision(s,p) fixed<<setprecision(p)<<s #define boostIO ios_base::sync_with_stdio(0), cin.tie(0) #define CLR(s) memset(&s, 0, sizeof s) #define ha...
ALGO
0.999801
3.755676
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2015-08-24T18:02:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00e801d...
3d6664cb-f8a4-4157-bc61-5ebe14ed1c7c
akash4-sys/DSA
Codeforces/900/1870B.cpp
#ifdef __INTELLISENSE__ #include "../../headers.h" #else #include <bits/stdc++.h> using namespace std; #endif #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define II ({ int a; cin>>a; a; }) void solve() { int n = II, m = II, a = 0, b = 0; for (int i = 0; i < n; i++) a ...
ALGO
0.99997
3.739259
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2022-07-17T09:39:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "016293924a...
f60d6274-6529-4a14-a36c-b7729b417863
SmileLingyong/Code
[回溯]八皇后II.cpp
/** * Creation : 2019.04.04 14:50 * Last Reversion : 2019.03.04 15:22 * Author : <NAME> {<EMAIL>} * File Type : cpp * ----------------------------------------------------------------- * EightQueenII(八皇后问题II,不定义全局变量实现) * 问题描述: * 即在一个8*8的矩形格子中排放8个皇后,要满足的条件包括: ...
ALGO
0.99965
4.38689
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-26T06:07: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": "af3e262a3f...
6eeedd5d-1136-4907-a82d-ca3375eb0974
darthchild/DSA-practice
arrays/alternatingGroup-1.cpp
/* 3206. Alternating Groups I Easy There is a circle of red and blue tiles. You are given an array of integers colors. The color of tile i is represented by colors[i]: colors[i] == 0 means that tile i is red. colors[i] == 1 means that tile i is blue. Every 3 contiguous tiles in the circle with alternating colors (the m...
ALGO
0.99998
5.474603
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2023-12-14T17:11:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a5ed51fe68...
cf6d1cf5-bcf2-4dbc-9164-007db5bc4d16
a1batross/Paranoia2_original
game_shared/mathlib.cpp
//======================================================================= // Copyright (C) Shambler Team 2005 // mathlib.cpp - shared math library //======================================================================= #include "mathlib.h" #include "const.h" #include "com_model.h" #include <math.h> con...
ALGO
0.983807
5.48989
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-08-30T22:08:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f541cdfdd5...
83bc42cc-e4ec-4fa0-8cd7-3237b6bb3727
Seokwon-Park/BAEKJOON-BOJ
백준/Silver/16506. CPU/CPU.cc
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; using tiii = tuple<int, int, int>; const int INF = 0x3f3f3f3f; const ll MOD = 1'000'000'007; map<string, string> m; string toBin(int k, int sz) { string ret(sz, '0'); int n = ret.size()...
ALGO
0.999424
5.246038
{ "github_metadata": { "branch": "main", "commit_count": 2927, "repo_created_at": "2023-03-13T07:02: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": "1ed4fdcde...
26f35ec7-4f3b-44c5-afd1-bec61c21d140
arnabs542/InterviewBootcamp
Concurrency/DiningPhilosophers2.cc
/* Comments : */ #include <iostream> #include <vector> #include <mutex> #include <chrono> #include <thread> using namespace std; class DiningPhilosophers { class Philosopher { public: Philosopher(int id, timed_mutex& left, timed_mutex& right) : m_id(id), m_leftChopstick(left), m_rightChopstick(ri...
ALGO
0.997479
5.110529
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-12-30T17: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": "0890458e7...
0a113b38-6109-47de-96ff-d02cb2c5d41c
sunrize0714/AtCoder
ABC/301-400/ABC322/b.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long int; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<vvll> vvvll; typedef vector<bool> vb; #define rep(i,a,n) for(ll i=a;i<n;i++) #define revrep(i,a,n) for(ll i=n-1;i>=a;i--) #define mod 998244353 ll modinv(ll a, ll m) { ll b = m, u...
ALGO
0.999977
4.007443
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2024-07-02T14:58: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": "dbdad9da40...
473c3015-dcb4-4465-9ac5-f56df71b4ba1
shangjiadong/parallel_programming
project3/project3Fix2.cpp
#include <stdlib.h> #include <omp.h> #include <stdio.h> #include <math.h> //#define NUMT 4 #define NUMTRIES 10 struct s { float value; }Array[4]; int main(int argc, char *argv[]) { #ifndef _OPENMP fprintf(stderr, "OpenMP is not supported here -- sorry. \n"); return 1; #endif omp_set_num_threads( NUMT ); print...
ALGO
0.994399
4.208772
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-12-29T07:39: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": "cafbbdac3f...
fcba8ed2-1523-4ffe-8288-f3f4d7e49ea9
spranjal3301/Coding
Competitive Programming/Data Structure & Algorithmes/Data Structure/Graphs/TopoSort_KahnsAlgo.cpp
#include<bits/stdc++.h> using namespace std; //!Topological Sort using BFS class Solution { public: //~ Time Complexity: O(V + E) - V is the number of vertices, E is the number of edges. //~ Auxiliary Space: O(V) - space for the indegree vector and the queue. vector<int> topoSort(int V, vector<int> adj[]) ...
ALGO
0.999986
6.225049
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2023-07-06T07:39:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eae0b7db9...
1c53eba3-738a-4f2f-9fdc-5c38b7dc18b5
joses97/SanchezJose_CSC17a_42824
Homework/Assignment 1/TruthTable/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on February 29 2016 * Purpose: Truth Table * */ //System Libraries #include <iostream> using namespace std; //User Libraries //Global Constants //Function prototypes //Execution Begins Here int main(int argc, char** argv) { //Declare and initialize variab...
ALGO
0.994719
4.138683
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2016-03-03T05:10:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf484a7b0...
07939820-d614-4aaa-8ce5-ac7d26ba7ec4
PeterAnunda/Design-Analysis-of-Algorithm
BST.cpp
#include <iostream> #include <memory> #include <string> using namespace std; struct Node { int isbn; string bookData; Node* left; Node* right; Node(int isbn, const string& data) : isbn(isbn), bookData(data), left(nullptr), right(nullptr) {} }; class BookBST { private: Node* root; Node* ...
ALGO
0.997419
6.229031
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-07T11:22: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": "2c47e8081237...
6a920125-d967-4264-ae9e-85f7ea9cffaa
yoyobuzz/codeforces-solution
2020D.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io std::ios::sync_with_stdio(0); cin.tie(0); #define int long long #define nl "\n" typedef vector<int> vi; typedef long long ll; #define test int ttttt; cin>>ttttt; while(ttttt--) solve(); #define all(a) (a).begin(), (a).end() #define f(i, p, n) for(int i=p; ...
ALGO
0.999923
3.6839
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-10-21T19:24: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": "e0e3de7def...
7cd73968-de01-4345-8753-ddad8b108583
Victo-1940381/prog3
statistique.h
#pragma once #include <vector> #include <algorithm> #include <cmath> #include <math.h> using namespace std; float moyenne(vector<float> valeurs) { float total = 0.0; float moyenne = 0.0; int longueur = valeurs.size(); for (int i = 0; i < longueur; i++) { total += valeurs[i]; } moyenne = total / longueur; re...
ALGO
0.997276
4.410048
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2025-01-27T14:10: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": "211d547ac...
69a789fd-ff60-4788-9fd9-031e6af8c154
kaustavshouvik/Striver-SDE-Sheet
Arrays1/05_MergeIntervals.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int>> mergeIntervals (vector<vector<int>>& intervals) { vector<vector<int>> res; sort(intervals.begin(), intervals.end()); int n = intervals.size(); res.push_back(intervals[0]); for (int i=1; i<n; i++) { int m = res.size(); int...
ALGO
0.999994
5.391969
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-06-22T18:51:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e49279ac1...
deeeb01f-3ced-48d2-a53f-409965a36555
ngrj93/Competitive-Programming
Hackerrank/Week_of_Code_26/twins.cpp
#include <iostream> #include <cmath> #include <cstring> using namespace std; int main () { int m, n; cin >> m >> n; int sieve_size = n - m + 1, root = sqrt (n), ans = 0; bool sieve[sieve_size]; memset (sieve, 0, sizeof (sieve)); if (m == 0) sieve[0] = sieve[1] = true; else if (m == 1) sieve[0] = true; for...
ALGO
0.999966
3.679528
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-03-07T06:51: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": "c480a91c97...
b61fbf8a-0bdc-422a-b29f-ddc0e423363c
elc139/t3-lfLersch
OpenMPDemoABCsemOrdered.cpp
#include <algorithm> #include <iostream> #include <string> #include <thread> #include <mutex> #include <omp.h> using std::string; omp_lock_t writelock; class SharedArray { private: char* array; int size; bool usemutex; int index; public: SharedArray(int n, bool use) : size(n), index(0), usemutex(use) { ...
TOOL
0.940656
5.640631
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-03-31T21:50:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c59421914...
88b87060-0c92-48a5-bde0-e5db7d4ae1d2
rui314/mold
third-party/tbb/examples/parallel_reduce/pi/common.h
/* Copyright (c) 2023 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
ALGO
0.999407
6.599195
{ "github_metadata": { "branch": "main", "commit_count": 7418, "repo_created_at": "2020-09-29T05:12:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15444, "forks": 506, "issues": 167, "pull_requests": 14 }, "file_meta": { "content_id": "...
01634048-7d7f-4be0-b4e9-4222b7b27689
abaurens/ascii-gl
ascii-gl/include/graphics/primitives/Primitives.hpp
#pragma once #include "core/types.h" #include <array> #include <concepts> template<size_t VertexCount> struct Primitive; #pragma pack(push, 1) struct IPrimitive { protected: using index_type = unsigned; public: uint8_t vertexCount; size_t Size() const { return vertexCount * sizeof(index_type); } template<...
TOOL
0.902331
7.437595
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2024-10-14T20:01: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": "117242bc0...
ade7244e-4ca8-462b-b1ad-1d7c7516b4e7
99Alphapriority/AlgorithmsCompilation
code/Leetcode/0257_Binary_tree_paths/binary_tree_paths.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.99996
5.956213
{ "github_metadata": { "branch": "main", "commit_count": 188, "repo_created_at": "2024-01-31T20:58: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": "5bcdbc6159...
e8d3354c-4deb-4e2c-83ed-5ff8a94afc28
theduardomaciel/cc-paa
section1/10.cpp
#include <iostream> #include <chrono> using namespace std; using namespace std::chrono; // Função que calcula o tamanho da sequência de Collatz a partir de um valor inicial. // A sequência termina quando os três últimos valores forem 4, 2 e 1 (nessa ordem). int getUlamAlgorithmSequenceLength(unsigned short start) { ...
ALGO
0.999975
6.515438
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2025-02-23T17:48: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": "e017f30b6...
d8cd8c38-8977-4961-a4bc-1fd24bcaba93
meng-cz/nullrvsim
src/configuration.cpp
#include <assert.h> #include <regex> #include <filesystem> #include "configuration.h" namespace conf { typedef std::unordered_map<string, string> IniSection; std::unordered_map<string, IniSection> sections; void insert_item(string sec, string name, string value) { auto res1 = sections.find(sec); if(res1 ...
TEST
0.90404
5.743882
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2024-05-30T08:33:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3dc5403f5...
20a058dd-2e48-4c75-8f6a-f7753633e214
PandaMinh/CPP2023
bien_cua_ma_tran_1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; // by sunmin int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin >> t; while(t--){ int n; cin >> n; int a[105][105] = {}; for(int i = 0; i <...
ALGO
0.999882
3.812046
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-08-24T06:26:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5713b79e25...