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
0e4c82e4-10a3-4669-8bc5-a055368d893c
mobenh/cpp_bootcamp
median.cpp
#include <cmath> #include <cstdio> #include <cctype> #include <vector> #include <iostream> #include <algorithm> #include <string> using namespace std; string ltrim(const string&); string rtrim(const string&); vector<string> split(const string&); int findmedian(vector<int> arr) { int n = arr.size(); sort(arr.b...
ALGO
0.999951
4.982178
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-12-16T06:48: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": "cb8a5d3cbf39...
082abf2d-1c9f-43a6-b6dc-649526ce2546
hanleiyu/algorithms
jingxuan200/1100.cpp
#include <iostream> #include <vector> #include <string> using namespace std; class Solution { public: int numKLenSubstrNoRepeats(string s, int k) { int num = 0; if(s.size() >= k){ int i = 0; int j = 0; vector<int> word; word.assign(26, -1); ...
ALGO
0.999976
5.265291
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-06-21T00:11: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": "5ac7e32da...
1b9c91f7-c4d1-4561-8717-1ecefc9d569e
nigel-bruce-khan/Hpc_Turbulence_code
Source/Stencils/StencilFunctions.hpp
#ifndef __STENCILS_STENCIL_FUNCTIONS_HPP__ #define __STENCILS_STENCIL_FUNCTIONS_HPP__ #include "Parameters.hpp" #include "Definitions.hpp" #include <math.h> namespace NSEOF::Stencils { // Load the local velocity cube with relevant velocities of the 2D plane inline void loadLocalVelocity2D(FlowField& flowField, FLOA...
ALGO
0.987791
6.299423
{ "github_metadata": { "branch": "master", "commit_count": 320, "repo_created_at": "2022-08-17T11:48: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": "5f99ae43...
32587c19-dbb8-463b-974a-7f2fe6ec5a7e
pichenettes/eurorack
streams/svf.h
// Copyright 2013 <NAME>. // // Author: <NAME> (<EMAIL>) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, mo...
TOOL
0.927645
6.881792
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2013-08-26T15:53:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2769, "forks": 775, "issues": 4, "pull_requests": 3 }, "file_meta": { "content_id": "8a7...
53cf474c-3a7d-4dfa-b3a3-9f04e12f588e
cnyali-czy/code
atcoder/agc002/D.cpp
#define REP(i, s, e) for (register int i(s), end_##i(e); i <= end_##i; i++) #define DEP(i, s, e) for (register int i(s), end_##i(e); i >= end_##i; i--) #include <iostream> #include <cstdio> #include <vector> using namespace std; const int maxn = 1e5 + 10, maxm = 1e5 + 10, maxq = 1e5 + 10; int n, m, q; namespace SMT...
ALGO
0.999968
3.922868
{ "github_metadata": { "branch": "master", "commit_count": 1593, "repo_created_at": "2018-02-24T06:16: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": "8d9d945...
67ce4b33-57a1-4367-985d-4cd221486ff2
tusharuiit/EvergreenCPlusPlus
more_cPlusPlus/stack.cpp
#include<iostream> #include<cstdlib> void create_random_array( int **arr , const int num ) ; //void print_array( int *arr , const int beg , const int end ) ; void swap ( int *a , int *b ) ; void push( int ** arr , const int num ) ; void pull( int ** arr , const int num ) ; void display( int ** arr , const int num ) ; ...
TOOL
0.971664
4.01789
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-01-04T00:10: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": "2dfd3eb33d...
b3f2132c-6236-4e46-a28d-41274910c97c
Sukhov-Dmitriy/Chisl_mths
Task2.cpp
#include <iostream> #include <vector> #include <fstream> #include <string> #include <cmath> #include <cstdlib> using namespace std; const double eps = 0.0000001; const double AA = 0, BB = 1;// пределы интегрирования void print(const vector <double> &x) { for (int i = 0; i < x.size(); i++) { cout<< x[i...
ALGO
0.999861
3.791591
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-11-06T15:26:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "cbc12b888a1...
a070dbb5-51bb-4bc5-8566-3ba7faeb6285
phatlt17420/UITCode
CauTrucDuLieuVaGiaiThuat/2024.06.28_Graph/4_DoThiCoHuongCoTenDinh/main.cpp
/*###Begin banned keyword - each of the following line if appear in code will raise error. regex supported define include using ###End banned keyword*/ #include <iostream> #include <vector> #include <map> #include <string> using namespace std; // ###INSERT CODE HERE - class Graph { private: vector<vector<int>> max...
ALGO
0.999926
4.95478
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2024-04-18T17:02: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": "bfe767f5...
e2cfde02-23db-4b94-8b9e-f62c78f8772c
chanwoong1/Solved-Algorithm
백준/Gold/13549. 숨바꼭질 3/숨바꼭질 3.cc
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <queue> #include <vector> using namespace std; #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(0), cout.tie(0) #define ll long long int main() { fast; int N, K; cin >> N >> K; vector<in...
ALGO
0.999966
3.983008
{ "github_metadata": { "branch": "main", "commit_count": 1236, "repo_created_at": "2021-11-21T07:15: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": "72256081d...
cd463124-9b00-451a-88fa-b43e234a76bc
ThomasDavenel/TP_SIA
src/Math/Internal/JacobiSVD.h
#ifndef _Math_Internal_JacobiSVD_H #define _Math_Internal_JacobiSVD_H #include <Eigen/Dense> namespace Math { namespace Internal { //////////////////////////////////////////////////////////////////////////////////////////////////// /// \class JacobiSVD /// /// \brief Extension of the Jacobi singular value d...
ALGO
0.984348
6.166842
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-02-14T22:40: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": "87fbbdc2e92...
cb5c4c24-6c52-4c07-9dea-50f6caafe783
Arpit-Khandelwal/CPP-Practice
Leetcode/Medium/Strings/StringCompression.cpp
//https://leetcode.com/problems/string-compression/ #include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 int compress(vector<char> &chars) { int l = chars.size(); // vector<char> ans; int count = 1, k = 0; for (int i = 0; i < l; i += count) { count = 1...
ALGO
0.999995
5.052715
{ "github_metadata": { "branch": "master", "commit_count": 503, "repo_created_at": "2021-05-23T07:21: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": "d3474e96...
c7166cac-2b2a-44fd-ad4c-06a13e150d29
InteractiveComputerGraphics/SPlisHSPlasH
SPlisHSPlasH/Utilities/CholeskyAVXSolver.cpp
#include "CholeskyAVXSolver.h" #include "Utilities/Logger.h" #if USE_AVX using namespace SPH; CholeskyAVXSolver::CholeskyAVXSolver(const Eigen::SparseMatrix<float>& lhs) { this->_init(lhs.cast<double>()); } CholeskyAVXSolver::CholeskyAVXSolver(const Eigen::SparseMatrix<double>& lhs) { this->_init(lhs); } void Ch...
ALGO
0.976479
5.986555
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2016-11-17T19:14:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1723, "forks": 307, "issues": 11, "pull_requests": 7 }, "file_meta": { "content_id": "918...
3546b9f2-3a92-4973-a764-459930e7bed6
mukulgpt17/CP
CodeForces/342A.cpp
#include "bits/stdc++.h" using namespace std; #define max(a, b) (a < b? b : a) #define min(a, b) ((a>b)?b:a) #define mod 1e9+7 #define FOR(a,c) for ( int (a)=0; (a)<(c); (a)++) #define FORL(a,b,c) for ( int (a)=(b); (a)<=(c); (a)++) #define FORR(a,b,c) for ( int (a)=(b); (a)>=(c); (a)--) #define INF 10000000000000...
ALGO
0.999796
3.253513
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-09-11T15:11: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": "d5f5845a86dd...
c3434cae-ee10-44b1-8928-76919e70467d
SNbappy/CP-Vault
A_Maximize_the_Last_Element.cpp
/* بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ Author: Depressed_C0der Created: 2024-09-07 21:33:09 */ #include <bits/stdc++.h> using namespace std; #define tst \ int t; \ cin >> t; \ while (t--) #define el '\n' #define yes cout << "YES" << el #define no cout << "NO" << el #define ll long long #define Depr...
ALGO
0.99989
5.181768
{ "github_metadata": { "branch": "main", "commit_count": 223, "repo_created_at": "2025-02-09T15:36: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": "16d66aec5b...
38378773-9a26-4d4d-8cf0-8362b5cde8b1
JoshuaSchwartz00/leetcode
23.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* mergeTwoLis...
ALGO
0.99989
6.160253
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-01-12T08:38: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": "b58e9edadba...
2ef6aeaa-1193-4087-adc7-a4f27770e1d5
nhhoang14/CodePTIT_Source
CodePTIT - CPP/CPP0613.cpp
//https://code.ptit.edu.vn/student/question/CPP0613 //<NAME>ÊN - 3 #include <bits/stdc++.h> using namespace std; typedef long long ll; class SinhVien{ private: string msv; string name; string cl; string date; float gpa; public: SinhVien(); static int cnt...
ALGO
0.906589
3.870656
{ "github_metadata": { "branch": "main", "commit_count": 646, "repo_created_at": "2024-04-19T11:42:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d4fc7e465...
dff1e164-7fa3-42a1-944d-ea772a1fb114
AladdinT/modern-cpp
session3/s3_tasks.cpp
#include <iostream> #include <array> #include <numeric> #include <signal.h> void signal_callback_handler(int signum) { std::cout << "Caught signal " << signum << std::endl; // Terminate program exit(signum); } int main (void) { /*TASK1: Initialize an array with numbers from 10 to 10000*/ std::array<i...
TOOL
0.900098
3.980866
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2023-02-18T00: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": "1ea7954541...
30b4f5b2-7858-4566-8785-d5f77e532a8f
Harjot01/standard-dsa
sorting-algorithms/radix_sort.cpp
// Don't Overthink, Just Code #include <bits/stdc++.h> using namespace std; void CountingSort(int input_arr[], int size, int div) { int output_arr[size]; int count_arr[10] = {0}; for (int i = 0; i < size; ++i) { count_arr[(input_arr[i] / div) % 10]++; } for (int i = 1; i < 10; ++i) ...
ALGO
0.999856
4.93902
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-09-12T06:44:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e52373b14a7...
f5853a85-25c6-48ac-a1b7-049af7049d85
HarshCasper/NeoAlgo
C-Plus-Plus/ds/BFS_Binary_Tree.cpp
/* Binary tree is a data structure that has at most 2 child node i.e. left and right child For BFS traversal, we will traverse all nodes level by level. That means first root node is traversed, then all the direct children of the root node is traversed. Similarly we move to their children and so on. */ #include <bits/s...
ALGO
0.99991
4.771387
{ "github_metadata": { "branch": "master", "commit_count": 7521, "repo_created_at": "2020-06-24T16:04:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 887, "forks": 1041, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47...
6bc07519-de99-4935-82e9-63bd91db22a7
nikkov/wavgen
lib/coredsp/convolution/convolfft.cpp
#include <math.h> #include "convolfft.h" #include "fft/arith.h" namespace namespace_convolution { COREDSP_API void fft_complex_auto_convolution( Complex *f, ulong n, double v, namespace_fft::fftProc *func ) // // (complex, cyclic) self convolution: f[] := f[] (*) f[] // (use zero padded data for linear convolution) ...
ALGO
0.99811
5.766231
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-12-12T06:04:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "382befaed7...
e33771fb-b5e4-419e-a8ff-9160ba287566
y42sora/soraSRM
00001-00500/SRM490/Div2/LuckyCounterTest.cpp
#include "LuckyCounter.h" #include <iostream> #include <vector> using std::cerr; using std::cout; using std::endl; using std::vector; class LuckyCounterTest { static void assertEquals(int testCase, const int& expected, const int& actual) { if (expected == actual) { cout << "Test case " << tes...
TEST
0.903365
5.197519
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2011-02-13T02:59: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": "4fb053a10...
44add522-aa79-49c6-86e2-e5f02dbdc442
ammardab3an/ACM
problems/done/codeforces/B. Zuma.cpp
// Problem: <NAME> // Contest: Codeforces - Codeforces Round #336 (Div. 1) // URL: https://codeforces.com/problemset/problem/607/B // Memory Limit: 512 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org) // By AmmarDab3an #include "bits/stdc++.h" using namespace std; #define int int64_t #...
ALGO
0.999978
4.168682
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-10-06T07:54:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60e1112b8c3...
9eece163-5137-435f-9549-23996cc06ace
davfront/42_cpp
02/ex03/bsp.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* bsp.cpp :+: :+: :+: ...
ALGO
0.999584
6.094936
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2024-05-28T08:36: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": "d4d991858...
765f1887-368f-4eb8-87f5-2c0866d6f6ee
aroques/parser
src/parser/tree.cpp
#include <iostream> #include <vector> #include <algorithm> #include "string/include/string.hpp" #include "scanner/include/token.hpp" #include "parser/include/Node.hpp" static int height(struct Node* node) { if (node == NULL) // null leaf, so return 0 return 0; else if (node->children.s...
ALGO
0.903291
5.196489
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2018-10-25T16:43:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9cc3e704...
b1c28b31-c05c-4690-8f16-68b67603b831
Mjolnir-MD/Mjolnir
mjolnir/forcefield/MultipleBasin/MBasinRepulsivePotential.hpp
#ifndef MJOLNIR_POTENTIAL_LOCAL_MULTIPLE_BASIN_REPULSIVE_POTENTIAL_HPP #define MJOLNIR_POTENTIAL_LOCAL_MULTIPLE_BASIN_REPULSIVE_POTENTIAL_HPP #include <cmath> namespace mjolnir { template<typename T> class System; // the original MultipleBasin uses positive part of normal GoContact. // template<typename realT> class...
ALGO
0.99537
6.135622
{ "github_metadata": { "branch": "master", "commit_count": 3792, "repo_created_at": "2016-11-23T08:53:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 34, "forks": 7, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id": "d7a376e...
268cb5d2-92df-421e-b40e-4d85af3bb2ed
cpatrick/calatk
Code/Libraries/Numerics/COneStepEvolver.h
/* * * Copyright 2011, 2012 by the CALATK development team * * 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 a...
ALGO
0.97319
6.985094
{ "github_metadata": { "branch": "master", "commit_count": 360, "repo_created_at": "2012-12-12T22:14:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aef382fb...
42530276-8212-4082-8b22-d32ce59f0653
Taekyukim02/usaco
cf/presuf.cpp
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; typedef pair<int,int> ii; int N; string strList[200]; vector <ii> order; int main() { cin >> N; for(int i=0; i<2*(N-1); i++) { cin >> strList[i]; order.emplace_back(strList[i].length(), i); } sort(order.begin(...
ALGO
0.999938
3.322206
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-07-28T19:13: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": "7860d14f85...
a540b87d-dc17-4bc7-8433-2e0e32fb23ef
iamassaduzzaman/introduction-to-algorithms
Module 07/cycle_detection.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; vector<int> adjList[N]; bool visited[N]; // list 1: 3 // list 3: 1, 2, 5 // step 01. if value is the parent of list (since undirected graph) then skip // step 02. if value is already visited and not a parent of list then cycle detected // step 03. i...
ALGO
0.999927
5.235569
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2023-08-03T02:45: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": "2d52f7151cb...
5361aa67-941e-480a-91e9-a4bc84463381
behruznezerov/Task1
Task/Source.cpp
#include <iostream> using namespace std; //Task 1 //class Fraction { //private: // int numerator; // int denominator; //public: // void init(int num, int den) { // numerator = num; // denominator = den > 0 ? den : 1; // } // Fraction Multiply(const Fraction& f2) { // Fraction f3; // numerator = numerator * f2.num...
TOOL
0.949163
5.416006
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-10-31T15:11:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "619c4eac5a...
7c957ee0-7e71-4a1a-8292-8c915b1edb61
JiteshGupta17/Competitive-Programming
LinkedList/Insert_Del.cpp
#include <iostream> using namespace std; class node{ public: int data; node* next; node(int d) { data = d; next = NULL; } }; void insertAthead(node* &head,int x) { node* n = new node(x); n->next = head; head = n; } int length(node* head) { int len = 0; ...
ALGO
0.9995
4.693945
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2019-08-29T09:47:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19b7fb2fd...
2d765473-1eba-4068-be56-2dff893e6dd3
bielskij/AOC
2019/day24/main.cpp
#include <algorithm> #include <limits.h> #include <cstring> #include <unistd.h> #include "common/types.h" #include "utils/utils.h" #include "utils/file.h" #define DEBUG_LEVEL 4 #include "common/debug.h" #define GRID_SIZE 403 struct Tile { static const int W = 5; static const int H = 5; char area[W * H]; Til...
ALGO
0.999596
4.650775
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2019-12-05T10:57:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6ac5deb...
68852fbb-7e61-4547-8868-f84836e7789a
YashSoni878/TCS-NQT-PYQ-
Problem-16.cpp
Problem Statement: Your task is to print three things- 1. Higher selling item 2. Total selling price (upto 2 decimal places) 3. Average selling price (upto 2 decimal places) Sample test case: Input: {["apple", 1.0, 5], ["orange", 10.0, 5], ["apple", 10.0, 5]} Output: apple 105.00 35.00 #include <bits/stdc++.h> us...
ALGO
0.999547
6.156426
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-04-23T16:32: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": "658739dc2f9f...
14cdcfe1-164d-4a2e-9caf-c380cceac959
dubeyKartikay/sembed-engine
src/utils/Vamana.cpp
#include "vamana.hpp" #include <algorithm> #include <bitset> #include <filesystem> #include <iostream> #include <memory> #include <ostream> #include <string> #include <unordered_set> #include <vector> Vamana::Vamana(std::unique_ptr<DataSet> datset, int degreeThreshold, float distanceThreshold) : m_gr...
ALGO
0.999839
5.327582
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-07-28T07:56:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ee6dfc7c04...
137454a6-58ae-4306-a427-8424348a207d
Dajtbaeva/LEETCODE
110.cpp
// 110. Balanced Binary Tree // https://leetcode.com/problems/balanced-binary-tree/ // двоичное дерево, в котором левое и правое поддеревья каждого узла отличаются по высоте не более чем на 1. /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; ...
ALGO
0.999875
6.240781
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-09-27T10:23:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b035ee3380b...
7f82d93d-bae6-4f02-9b1c-2867210aa9a0
khanayaan7/StriverSDEsheet
0493-reverse-pairs/0493-reverse-pairs.cpp
class Solution { public: int ans=0; void merge(vector<int>&arr,int low,int mid,int high) { vector<int> temp; int left = low; int right = mid + 1; int i=low,j=mid+1; while(i<=mid){ while(j<=high && arr[i]>2*1LL*arr[j])j++; ans+=j-mid-1; i++; } while (left...
ALGO
0.99995
5.376937
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2023-10-16T17:01: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": "880eefde03...
d8e861ce-8b9f-4030-8268-c320fd7d12bb
ivan-malaver/microprocesador
DIGITAL1.ino
bool estado1,estado2, estado3, estado4, ledA, ledB,ledC,ledD; void setup() { pinMode(8, INPUT); // Inicializa el pin de entrada 1 como entrada pinMode(7, INPUT); // Inicializa el pin de entrada 2 como entrada pinMode(6, INPUT); // Inicializa el pin de entrada 3 como entrada pinMode(5, INPUT)...
ALGO
0.988403
3.508262
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-02-16T15:39:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "189572cd9e38...
cb8d79ab-139b-45ab-b164-df1defaae518
moinulshaon/UVa-Problems
vol 8/820__completed flow/820_test.cpp
#include <cstdio> #include <cstring> #include <queue> #define INF 100000000 #define sz 110 using namespace std; int d[sz][sz]; bool vis[sz]; int prvnode[sz]; int nodes; int dfs(int source,int destination) { memset(vis,false,sizeof(vis)); for (int i=0;i<nodes;++i) prvnode[i]=-1; queue <int> q; ...
ALGO
0.998701
3.597282
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2016-07-05T15:35:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "042470e08...
f13c2898-d8d3-4085-8c7b-51196ba56f02
psungkyu/ProblemSolving
kakao/2020_install_pillar_and_bo.cpp
#include <string> #include <vector> using namespace std; int map[111][111] = {0, }; bool isPilarAvailable(int n, int x, int y) { bool ret = false; if (y == 0) { ret = true; } else { if (map[x][y - 1] == 1 || map[x][y - 1] == 3) { ret = true; } i...
ALGO
0.99952
4.821954
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-10-23T12:42: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": "12de6a9be...
90d4c0fe-aafb-43df-aec8-97b26396fa1a
LuChienTanSang5001104132/OOP_exercise
ClassNgay(moi).cpp
#include<iostream> using namespace std; class Ngay{ private: int ng, th, na; public: friend istream&operator >>(istream&input, Ngay&n); friend ostream&operator <<(ostream&output,Ngay n); bool NamNhuan(); bool NgayHopLe(); friend Ngay operator +(Ngay a, int k); friend Ngay operator -(Ngay a, int k); frie...
ALGO
0.999746
3.514847
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-27T17:23:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "252228ed88da...
bd105f9c-6446-47e3-9632-bf1ea521f0cf
cuppar/dsa_in_cpp
ch03/ex21.2/main.cpp
#include <iostream> #include <algorithm> #include <sstream> #include <list> #include <map> #include "util.h" static const char END{'#'}; static std::istringstream input("{[hello](world!)}x[]*/* [ [(foo)bar]/* * /] /* ()*/#"); static std::string identifierStr; static int currentToken; enum Token { tok_identifier...
ALGO
0.910924
4.618569
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-06-23T15:43:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "650c2ee8bd1...
975f7d25-5e94-4f39-b118-2fee2e5cf84b
oss5824/practice
분할정복/2630_2.cpp
#include<iostream> using namespace std; int arr[129][129], w, b; int color(int x, int y, int sz) { for (int i = y; i < y + sz; i++) for (int j = x; j< x + sz; j++) if (arr[i][j] != arr[y][x])return -1; return arr[y][x]; } void recursive(int x, int y,int sz) { int val = color(x, y, sz); if (val != -1) { if (val...
ALGO
0.999853
3.793404
{ "github_metadata": { "branch": "master", "commit_count": 800, "repo_created_at": "2020-12-16T12:26:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "148e5d88...
783581b3-1a04-47de-8e5a-78bd688f2993
gabrieltaets/Competitive-Programming
uri/1221.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; ll _sieve_size; bitset<10000010> bs; vi primes; void crivo(ll upperbound) { upperbound = (ll) sqrt((double)upperbound); _sieve_size = upperbound + 1; bs.set(); bs[0] = bs[1] = 0; for (ll i = 2; i <= _sieve_size; i++) ...
ALGO
0.999762
4.257387
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-08-04T05:16: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": "6f2f4934ed...
158070ab-67e4-4855-a917-ac640b2e29fc
neal2018/oj_env
atcoder/abc229/f.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; // https://space.bilibili.com/672328094 int main() { cin.tie(nullptr)->sync_with_stdio(false); ll n, inf = 1e18; cin >> n; vector<ll> a(n), b(n); for (auto &x : a) cin >> x; for (auto &x : b) cin >> x; vector<vector<vector<ll>>> dp(n, {{...
ALGO
0.999987
3.966329
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2021-08-18T06:24:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5415cb9...
f49a43c0-7fe0-4689-9fdd-feea67872746
Hangjun/CPPLeetCode
253. Meeting Rooms II.cpp
/* Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference rooms required. For example, Given [[0, 30],[5, 10],[15, 20]], return 2. */ /* 这道题是之前那道Meeting Rooms的拓展,那道题只让我们是否能参加所有的会,也就是看会议之间有没有时间冲突,而这道题让我们求最少需要安排几个会议室, 有时间冲突的肯定需要安...
ALGO
0.999988
6.22004
{ "github_metadata": { "branch": "master", "commit_count": 852, "repo_created_at": "2013-11-06T14:49:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88d3ba20...
323ca13b-d887-4f05-b2c8-5341e9c55a28
foosaan/doublelinkedlist_096
double_linked_list/double_linked_list.cpp
#include <iostream> #include <string> using namespace std; class Node { public: int noMhs; string name; Node* next; Node* prev; }; class doublelinkedlist { private: Node* START = NULL; public: void addNode(); bool search(int rollNo, Node** previous, Node** current); bool deleteNode(int rollNo); bool listEmpt...
ALGO
0.999486
4.029249
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2023-05-26T13:54: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": "df61d6852...
af252556-1cab-4b9c-8270-29366c8e21db
manch1n/leetcode
559.maximum-depth-of-n-ary-tree.cpp
/* * @lc app=leetcode.cn id=559 lang=cpp * * [559] Maximum Depth of N-ary Tree */ /* // Definition for a Node.*/ #include <vector> using namespace std; // class Node // { // public: // int val; // vector<Node *> children; // Node() {} // Node(int _val, vector<Node *> _children) // { // ...
ALGO
0.999927
6.098652
{ "github_metadata": { "branch": "easy", "commit_count": 77, "repo_created_at": "2019-04-05T08:51:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e549d97393...
e4bbedcc-ff8b-4c5a-8ca4-05fc6fec82c0
mrsp/g2o_slam3d
baRGB.cpp
// for std #include <iostream> // for opencv #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <opencv2/features2d/features2d.hpp> #ifdef USE_CONTRIB #include <opencv2/xfeatures2d/nonfree.hpp> #include <opencv2/xfeatures2d.hpp> #endif // for g2...
ALGO
0.908081
5.361954
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2020-06-22T12:57:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eaf349344...
d9277b74-1aae-4670-9c7c-367cd73870ce
tsunamiboat/gridproblem
grid.cpp
#include "grid.h" #include <math.h> #define PI 3.141592654 /* Container class for points */ //Empty Constructor point::point() { } /* Grid class */ //Empty Constructor grid::grid() { } //Sorting functions for an input grid //Sorts all points by lowest y value, then x if y values are equal void grid::top_down_sor...
ALGO
0.903327
4.551018
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-09-08T16:09: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": "0272887eb9...
244f8166-c907-45ab-9b3a-cc45fd868067
mini-soda-uwisc/competition-code
ICPC/ncna2024/b.cpp
// // Created by EHPC6 on 11/9/2024. // #include <bits/stdc++.h> using namespace std; struct Node { string toward, label; int length, ants; bool operator == (const Node &n) const { return toward == n.toward && label == n.label && length == n.length && ants == n.ants; } bool operator < (cons...
ALGO
0.999621
4.093026
{ "github_metadata": { "branch": "main", "commit_count": 105, "repo_created_at": "2024-10-13T02:55:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e81c96edf6...
5c801c14-546c-4454-83d3-c02dcd8a9e65
me17b016/Data-Structures-and-Algorithms
BT-Traversal.cpp
#include<bits/stdc++.h> using namespace std; struct Node { int val; Node* left; Node* right; Node (int data) { val = data; left = NULL; right = NULL; } }; void preOrderT(Node* root) { if (root == NULL) return; cout << root -> val << ' '; preOrderT(root -> le...
ALGO
0.999975
5.281646
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-07-21T11:14: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": "f839ce8d30...
f58392e1-5de5-4e59-b792-7001445cc266
TiagoSilva35/Competitive-programming
CSES/dp/a2.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef pair<double,double> pdd; typedef vector<ll> vll; typedef vector<int> vi; typedef vector<vector<int> > vv; typedef vector<vector<ll> > vvll; typedef vector<vector<p...
ALGO
0.999973
4.29917
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2023-08-09T20:38:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "559f6909399...
7c766296-b1e7-45a2-b358-13ae3b45b1a0
solareenlo/atcoder
05_AtCoder-Beginner-Contest/abc116/C/main.cpp
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (n); i++) using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector<int> h(n, 0); REP(i, n) cin >> h[i]; int count = 0; int sum = accumulate(h.begin(), h.end(), 0); while (sum) ...
ALGO
0.999991
4.143456
{ "github_metadata": { "branch": "main", "commit_count": 256, "repo_created_at": "2020-11-30T21:16: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": "2421562ebf...
e28e3361-9b43-45b0-b5de-13364d0ca2e7
Asad-Bin/cf-ac-problems
codeforces/1354/A..cpp
//...<NAME>... // Code by <NAME> // 17 05 2020 #include <bits/stdc++.h> using namespace std; // typedefs... typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<int, pii> piii; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<ll, ll> pll; // constants... const...
ALGO
0.999512
3.588753
{ "github_metadata": { "branch": "master", "commit_count": 1445, "repo_created_at": "2024-06-24T14:45: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": "baba12d...
681b1ed3-1579-400e-bd5d-29b370f647b1
jane-csj/CodeLearning
算法模板/prim.cpp
#include <iostream> #include <stack> #include <string.h> #include <vector> #include <map> #include <queue> using namespace std; const int INF = 0x3f3f3f3f; const int MAX_V = 1e2; // 最大顶点数 int cost[MAX_V][MAX_V]; //cost[u][v] 表示边e(u, v)的权值, 不存在的情况下设为INF int mincost[MAX_V]; // 从集合X出发到每个顶点的最小权值 bool used[MAX_V]; // 顶点i是否包...
ALGO
0.999811
3.619524
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2023-03-21T13:14: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": "38018f269...
5c83bc07-316f-4f40-abc9-6ed0714b1bfa
Armiu/tasks_cmc_2course
tasks c++/simulation of the motion of particles in 2D/prac2/src/particle.cpp
#include "particle.hpp" Particle::Particle(double, double, double x, double y, double vx, double vy) : x(x), y(y), vx(vx), vy(vy) {} Particle::Particle(){} double Particle::get_x() const { return x; } double Particle::get_y() const { return y; } double Particle::get_vx() const { return vx; } double P...
ALGO
0.913297
5.896572
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-01-30T22:02: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": "132b8fcc2509...
92c4524a-c572-441d-8dbf-a52ecc437e88
aorait/mobile_3D_Reconstruction
CV_Apps/CVApps/armadillo_bits/fn_qz.hpp
// Copyright (C) 2015 <NAME> // Copyright (C) 2015 NICTA (www.nicta.com.au) // Copyright (C) 2015 <NAME> // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \ad...
ALGO
0.959888
5.383053
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2016-11-06T19:34:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d834df5c...
a1b7aac6-3b1c-41c9-b7a9-103f8980cf20
tranhuy105/hocdot
ttud/graph/scc.cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 1e6 + 4; vector<int> adj[MAX]; // Danh sách kề int num[MAX], low[MAX], timer = 0; bool onStack[MAX]; // Kiểm tra đỉnh có nằm trong stack không stack<int> s; // Stack lưu các đỉnh trong SCC int sccCount = 0; // Đếm số SCC void tarjanDFS(int u) { num[u]...
ALGO
0.999891
5.578646
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-09-18T09:11: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": "b754d4914725...
60012a48-4b74-498c-9cbd-2a64163d2b7a
Hemantgithubpro/leetcode
Codeforces/Contests/2124/B/main2.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } long...
ALGO
0.999971
4.616111
{ "github_metadata": { "branch": "main", "commit_count": 236, "repo_created_at": "2025-03-06T19:40: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": "20db3238b0...
7c011936-a584-45f2-bd80-bb652fa5b0ff
TejaChilumula/Leetcode_Submissions
1056-CapacityToShipPackagesWithinDDays/1056-CapacityToShipPackagesWithinDDays.cpp
// Last updated: 7/2/2025, 11:51:25 PM class Solution { public: int shipWithinDays(vector<int>& weights, int days) { int l = 0, h = 10e7, ans = INT_MAX; //for(auto i : weights) h += i; while(l <= h) { int mid = l + (h-l)/2; if(help(mid,weights) <= days) ...
ALGO
0.999975
5.963378
{ "github_metadata": { "branch": "main", "commit_count": 378, "repo_created_at": "2025-07-03T06:47: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": "852477ee0b...
f4fb0e39-d714-4f47-8e6d-49d5ab29e4b4
Niceno/PSI-BOIL
Src/Equation/Centered/ConcentrationTP/concentrationtp.h
#ifndef CONCENTRATIONTP_H #define CONCENTRATIONTP_H #include <functional> /* std::function */ #include "../centered.h" #include "../../../Parallel/communicator.h" #include "../../Heaviside/MarchingSquares/MSaxisym/ms_axisym.h" #include "../../Heaviside/MarchingCubes/marching_cubes.h" /********************************...
ALGO
0.998926
5.141044
{ "github_metadata": { "branch": "main", "commit_count": 575, "repo_created_at": "2023-01-26T11:23:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "76bd36343...
7874dec0-3d64-4bea-958b-fab268fca2e6
Intiser/ProblemSolvingAndContest
LightOJ/1044.cpp
#include<bits/stdc++.h> #include<iostream> #include<stdio.h> using namespace std; #define lli long long int char s[1005]; //int dp[1005][1005]; //int vis[1005][1005]; int siz; int dp[1005][1005]; int dp1[1005]; int vis[1005][1005]; int vis1[1005]; vector<int>fns[1005]; lli rec(int i,int j){ //cout<<i<<" "<<...
ALGO
0.999939
3.804952
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-09-06T19:17: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": "87f2518c27...
a19da441-8544-416c-801f-c77ee637da9d
cpchristensen615/wk10p1
main.cpp
#include <iostream> #include <iostream> #include <cstring> using namespace std; void displayWinLose(bool winFlag); bool testWin(char wordArray[], char guessArray[], int wordchar, bool winFlag); int main() { string wordString; char wordArray[16]; char guessArray[26]; bool winFlag = false; int wordchar; ...
ALGO
0.999924
3.833166
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-10-31T00:48: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": "e375135431d8...
04db7bd9-eeb3-4155-9149-5e1589e6a100
Tearnote/MinoteRT
src/gfx/modules/pathtracer.ixx
export module minote.modules.pathtracer; import <utility>; import <memory>; import <array>; import <vuk/CommandBuffer.hpp>; import <vuk/RenderGraph.hpp>; import <vuk/Pipeline.hpp>; import <vuk/Future.hpp>; import <vuk/Image.hpp>; import minote.modules.sky; import minote.resource; import minote.samplers; import minote....
ALGO
0.997846
6.047719
{ "github_metadata": { "branch": "trunk", "commit_count": 87, "repo_created_at": "2023-03-18T12:55:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "8435eafa9...
d9a50049-1969-4d27-bdbc-f14f0d4518e4
memset0/vjudge-code
Gym/104639B/46000735_MLE_249ms_262144kB.cpp
#include<bits/stdc++.h> typedef long long ll; typedef unsigned long long ull; const int MAXN = 200011,B = 105; const ull base = 131131; char a[MAXN],b[MAXN],rb[MAXN],t[MAXN],rt[MAXN]; int nxt1[MAXN],nxt2[MAXN],f1[MAXN],f2[MAXN],tf[MAXN]; ull pw[MAXN],h1[MAXN],h2[MAXN]; ull get1(int l,int r) { if(!l)return h1[r]; retu...
ALGO
0.999851
4.067891
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2020-11-05T04:40:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f237bcaab...
f4337657-452c-40c4-8e1a-0ced782ee1ef
mailtokartik1/InterviewBit-Solutions
Cpp/Stacks-and-Queues/Problems/simplify-directory-path.cpp
string Solution::simplifyPath(string A) { stack<string> s; // Maintain a stack of all the values between the / / slashes // Pop and push the values according to A[i] for (int i = 0; i < A.size(); i ++) { if (A[i] == '/') { string p = ""; i ++; while (A[i] !=...
ALGO
0.997971
5.255795
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2019-06-14T13:36:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 52, "forks": 10, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "09055de...
851475ac-380e-4752-b103-f976e4699798
githubcai/hiho
1/1062.cpp
#include <iostream> #include <string> #include <map> #include <set> using namespace std; int main(){ int N; cin >> N; string name1, name2; map<string, string> ref; for(int i = 0; i < N; ++i){ cin >> name1 >> name2; ref[name2] = name1; } cin >> N; for(int i = 0; i < N; ++i){ ...
ALGO
0.999977
3.996926
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-11-22T10:47: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": "90d324061f...
7469911a-d50c-48f8-8638-a7bb8e6e15c6
orangeate/LeetCode
solution/Array/189. Rotate Array.h
#include "../global.h" class Solution { public: /* ---- 额外数组 ---- */ void solution(vector<int>& nums, int k) { int size = nums.size(); vector<int> ans(size); for(int i = 0; i < size; i++) { ans[(i+k)%size] = nums[i]; } nums.assign(ans.begin(), ans....
ALGO
0.999996
5.706993
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-04-30T05: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": "e3a800191e0a...
fc8d8a94-e380-43d5-8491-5e35920ad2d2
tomytp/icpc-training
codeforces/103960/f.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p64; typedef vector<ll> v64; #define forn(i, s, e) for(ll i = (s); i < (e); i++) #define ln "\n" #if defined(DEBUG) #define _ (void)0 #define debug(x) cout << __LINE__ << ": " << #x << " = " << x << ln #else #define...
ALGO
0.999966
3.594354
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-08-01T19:05: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": "9c0d5c4b717...
1d946738-2c8c-46a1-90af-c3075bdf9b43
cbwood/algorithm
codeforce/codeforce460-C.cpp
/************************************************************************* > File Name: codeforce460-C.cpp > Author: wood > Mail: <EMAIL> > Created Time: 2018年01月31日 星期三 22时06分32秒 ************************************************************************/ #include<iostream> #include<cstdio> #include<cstring> #inclu...
ALGO
0.999917
3.589145
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2021-09-13T02:43: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": "11954e5573...
fb9cf2c8-a3ed-456d-9415-0908aad49d59
saikat-007/DSA
889-construct-binary-tree-from-preorder-and-postorder-traversal/889-construct-binary-tree-from-preorder-and-postorder-traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99998
6.081086
{ "github_metadata": { "branch": "main", "commit_count": 921, "repo_created_at": "2021-12-24T15:29:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c52b7f557...
90584ab9-c3e6-4cc8-a414-e9d4f06c511a
ippunt/cpp
yrtd.h
//#include <bits/stdc++.h> using namespace std; class RomanToD{ public: int value(char r) { if (r == 'I') return 1; if (r == 'V') return 5; if (r == 'X') return 10; ...
ALGO
0.999682
4.205867
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2017-09-06T03:47: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": "ca4e5dc68...
0b2d33be-a0dc-4eb0-96d9-26cec72c1b0a
JayTheCoder77/Striver-Dsa
Heaps/Learning/maxHeap.cpp
class maxHeap { public: vector<int> list; maxHeap() { // Optional constructor logic } void downheap(int i) { int maxI = i; int l = 2 * i + 1; int r = 2 * i + 2; if (l < list.size() && list[l] > list[maxI]) maxI = l; ...
ALGO
0.997305
5.424633
{ "github_metadata": { "branch": "main", "commit_count": 177, "repo_created_at": "2024-11-18T12:45: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": "5f489842ea...
5a42295d-1a63-484e-85b6-5ab61216003a
s402xggy/C-
template/1.cpp
#include <iostream> using namespace std; /* 1、普通函数可以发生隐式类型转换。 2、模版自动类型推导不可以发生隐式类型转换。 3、模板显示指定类型推导不可以发生隐式类型转换。 */ template <class T> void Swap(T &a, T &b) { T temp = a; a = b; b = temp; } // 选择排序模版 template <class T> void SelectSort(T arr[], int len) { for (int i = 0; i < len; i++) { ...
TOOL
0.958958
4.636392
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-04-24T02:05: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": "c61a8d67445...
ede85c82-7e61-49a2-8c8c-c074e0f0a8ea
AustenLindley/Career-Seminar-CS
C++/Part List/PartList.cpp
#include <iostream> #include <list> #include <algorithm> using namespace std; template<typename T> void partitionList(T& splittingValue, list<T>& startingList, list<T>* lessThanList, list<T>* greaterThanList); template<typename T> list<T>* quicksort(list<T>& inputList); int main() { list<int> input = { 5, 2, 1,...
ALGO
0.999971
6.05761
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-10-15T13:31:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c97917016a...
067c4c87-f380-45ec-8fed-064145335e8c
xuchang193/Practice
daimayuan/DP/401.cpp
#include <bits/stdc++.h> using namespace std; #define x first #define y second #define all(c) (c).begin(), (c).end() #define sz(x) (int)(x).size() typedef long long LL; typedef unsigned long long ULL; typedef pair<int, int> PII; const int mod = 1e9+7; const double E = 1e-8; const int N = 100010; int n; int f[N]; int...
ALGO
0.999956
4.092589
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-03-01T13:41:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f60be645...
e113728a-8472-4cd0-9bd6-fca5e1716ea0
JulienDesdo/OpenMP_fractales
fractales.cpp
#include "CImg.h" // Bibliothèque graphique #include <complex> // Pour les nombres complexes #include <iostream> // Pour les entrées/sorties #include <omp.h> // Pour OpenMP using namespace cimg_library; using namespace std; // Fonction pour calculer si un point appartient à Julia et ses variantes int julia(const c...
ALGO
0.995297
5.631446
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-25T17:53:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa62778dac76...
fb0a5145-d30c-4d85-93cd-51a902df088c
open-goal/jak-project
game/mips2c/jak1_functions/collide_cache.cpp
//--------------------------MIPS2C--------------------- #include "common/dma/gs.h" #include "game/kernel/jak1/kscheme.h" #include "game/mips2c/mips2c_private.h" using namespace jak1; const uint32_t* max_tri_count = nullptr; namespace { u32 vu0_buffer[1024]; // todo, maybe can be 512. u32 vi1 = 0; void vlqi(Mips2C::...
ALGO
0.971538
4.082895
{ "github_metadata": { "branch": "master", "commit_count": 2816, "repo_created_at": "2020-08-22T23:55:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3065, "forks": 199, "issues": 156, "pull_requests": 18 }, "file_meta": { "content_id": "...
28e4b181-0222-40bd-b89f-84e22099fa80
Reyeselda95/IC
Práctica 4/Práctica 4 Ingeniería de los Computadores - Grupo 2/COVARIANZA_V1_P4/main_paralelizado.cc
// Tareas 1-Aplicación en OpenMP // 2 - Salida por fichero de los resultados. // #include <iostream> #include <vector> #include <fstream> #include <stdlib.h> #include <string.h> #include "mpi.h" //Libreria mpi using namespace std; vector<vector<vector<double> > > matrices; //Muestra el tiempo de uso de la CPU desde...
ALGO
0.999416
4.09541
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-11-30T10:33:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "266e8abb16...
31f5944c-519f-4b12-b59c-69d504632f72
Yugsolanki/pattern
0_Helpers/LinkedList.cpp
// Linked List #ifndef LINKEDLIST_H #define LINKEDLIST_H #include <iostream> using namespace std; class Node { public: int value = 0; Node *next; Node(int value) { this->value = value; next = nullptr; } }; class LinkedList { public: Node *head = nullptr; void add(int value...
TOOL
0.98876
5.807268
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-03T02:58:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e798ccb69d3c...
9e5004b8-c4a3-4e91-84f2-a58c994eb7a7
chengyiwei/algorithm
xcpc/2024CCPC Chongqing/I/I.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; const ll MAXN = 2e5 + 5; const ll MOD = 998244353; ll Tex, a[10]; void AC(){ priority_queue<ll, vector<ll>, greater<ll>> op; for(int i = 1; i <= 9; i ++){ cin >> a[i]; if(i >= 2){ for(int j = 1; j <= a[i]; j ++){ ...
ALGO
0.999949
4.132516
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-08-13T07:27: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": "ff7c98e0a6e...
e3d6d814-214a-4f34-b646-4133f95ff9c4
CuongVo24/Week4
LinkedList.cpp
#include "list.h" NODE* createNode(int data) { NODE* newNode = (NODE*)malloc(sizeof(NODE)); if (newNode == NULL) return NULL; newNode->key = data; newNode->p_next = NULL; return newNode; } List* createList(NODE* p_node) { List* newList = (List*)malloc(sizeof(List)); if (newList == NULL) r...
ALGO
0.960562
5.3406
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-04-17T12:56: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": "cc925edc0399...
1cfb9f6f-638c-4084-91ca-800454958650
sjj118/OI-Code
51Nod/marathon/16/D/code.cpp
#include<iostream> #include<cstdio> #include<cstring> #define cls(a) memset(a,0,sizeof(a)) #define rep(i,x,y) for(register int i=(x);i<=(y);++i) #define per(i,x,y) for(register int i=(x);i>=(y);--i) typedef long long LL; const int inf=1e9,maxn=2016,maxm=50,maxp=100000,maxv=400000; const double eps=1e-8; using namespace...
ALGO
0.999952
3.358186
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2016-08-10T09:42: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": "91d3889d...
c37d2cc4-6778-42e1-a22e-4561f4d8f9cb
arnaudrco/festisol
tournesol-avec-servomoteur.ino
// Tournesol 1 axe 2 cellules solaires // arnaudrco https://github.com/arnaudrco/exemples/blob/main/README.md // placer une resistance de 20 à 50 KOhms entre A6 et la masse (GND) // placer les 2 cellules tête-bêche entre A6 et A7 // seuil d'hysteresis réglé pour un arduino nano3 avec convertisseur 12 bits #include <Se...
TOOL
0.928575
5.489202
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2021-09-14T13:22:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91837312a84...
96fb9a4c-030b-4ec4-a97f-b326c2184bdc
kuihao/Coding-Problem-Solved
MSC/King_puzzle.cpp
#include <iostream> #include <cstring> using namespace std; void Reverse(int a[][3]){ /*cout<<"Reverse start!"<<endl;*/ a=XOR(a); /* int i,j; for(i=0;i<3;i++){ for(j=0;j<3;j++){ a[i][j]=!(a[i][j]); } }*/ } void InputData(char (*a1)[3], char (*a2)[3]){ int i;cha...
ALGO
0.999811
3.197656
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-10-13T06:52: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": "874023905...
4a6a3197-397c-4fe4-b4ca-1eaf1d41b174
chengshunzhang/my_leetcode
301-400/329_Longest_Increasing_Path_in_a_Matrix/329_Longest_Increasing_Path_in_a_Matrix.cpp
#include <vector> #include <iostream> using namespace std; class Solution { private: int helper(vector<vector<int> >& matrix, vector<vector<int> >& sub, int row, int col) { int res = 1, temp = 1; int up = row - 1, down = row + 1, left = col - 1, right = col + 1; if(row > 0 && matrix[up]...
ALGO
0.999972
5.399807
{ "github_metadata": { "branch": "master", "commit_count": 421, "repo_created_at": "2018-09-16T03:54:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94048a9c...
57cb4fed-3dfe-42be-8c3b-96707d45bcb0
zhaoxuyan/leetcode_cpp
dp/subsequence/1143-lcs-longest-common-subsequence.cpp
/* * 1143. 最长公共子序列 * 给定两个字符串text1 和text2,返回这两个字符串的最长公共子序列的长度。 * 一个字符串的子序列是指这样一个新的字符串: * 它是由原字符串在不改变字符的相对顺序的情况下删除某些字符(也可以不删除任何字符)后组成的新字符串。\ * 例如,"ace" 是 "abcde" 的子序列,但 "aec" 不是 "abcde" 的子序列。 * 两个字符串的「公共子序列」是这两个字符串所共同拥有的子序列。 * 若这两个字符串没有公共子序列,则返回 0。 * 来源:力扣(LeetCode) * 链接:https://leetcode-cn.com/problems/longest-...
ALGO
0.999777
6.022955
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2020-11-05T04:51: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": "1a81edc9f...
c168d4d7-f229-4e97-8d01-5ae33aeb7dde
ishandutta2007/codeforces-k
krk/normal/1551/B2.cpp
#include <bits/stdc++.h> using namespace std; const int Maxn = 200005; int T; int n, k; vector <int> seq[Maxn]; int res[Maxn]; void Empty(vector <int> &V) { for (int i = 0; i < V.size(); i++) res[V[i]] = i + 1; V.clear(); } int main() { cin >> T; while (T--) { scanf("%d %d", &n, &k);...
ALGO
0.999933
3.51893
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06: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": "f45354f2ed1d...
75727537-7e3b-4f30-910f-0c8d28e3aabf
WhiteCells/code
algo/daily/23/09/9-29.cpp
#include "../../head_file.h" /* problme: 605. 种花问题 假设有一个很长的花坛,一部分地块种植了花,另一部分却没有。可是,花不能种植在相邻的地块上,它们会争夺水源,两者都会死去。 给你一个整数数组 flowerbed 表示花坛,由若干 0 和 1 组成,其中 0 表示没种植花,1 表示种植了花。另有一个数 n ,能否在不打破种植规则的情况下种入 n 朵花?能则返回 true ,不能则返回 false 。 示例 1: 输入:flowerbed = [1,0,0,0,1], n = 1 输出:true 示例 2: 输入:flowerbed = [1,0,0,0,1], n = ...
ALGO
0.999997
6.103652
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-07-29T04:29: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": "7cce5b7c8634...
5b5e4fef-f7fe-4cbb-b124-8240fac01638
tommy-lang/DataStructure
LinearList/CircularStructureDoublyLinkedList.cpp
#include<iostream> #define OK 1 #define ERROR 0 #define OVERFLOW (-2) typedef int Status; typedef struct DuLNode { int data; int count;//记录数据结点个数 struct DuLNode* prior; struct DuLNode* next; }DuLNode,*DuLinkList; Status InitList(DuLinkList& L) { L=new DuLNode ; L->count=0; L->next=L; L-...
ALGO
0.999899
3.834815
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2025-01-23T01:08: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": "8bb52ff7075...
bcdf66e3-f74b-41f5-ae26-d05dcac1a592
mwong775/cuckoo-project
test.cpp
#include "cuckoofilter/src/cuckoofilter.h" #include <assert.h> #include <math.h> #include <iostream> #include <vector> #include <tr1/unordered_map> using namespace std; // generate n 64-bit random numbers void random_gen(int n, vector<uint64_t> &store, mt19937 &rd) { store.resize(n); for (int i = 0; i < n; i++...
ALGO
0.923252
4.668506
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-05-04T03:10: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": "43bb8cb61...
48059f15-6608-41ba-8641-2b8f27959163
bentate92/coursework
s17/25/week3/To_Submit/Experimental.cpp
/********************************************************************* ** Program Filename: Experimental.cpp // exp.o ** Author: <NAME> and <NAME> ** Date: 2016/4/21 ** Description: Experimental.cpp is used to test the runtime of the various max subarray algorithms ** using vectors containing randomly generated p...
ALGO
0.927502
5.233385
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-11-21T20:38: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": "ba411a8c7f...
d28b4718-481c-4de1-b130-cef9769a8bd6
sparsh-1/Codeforces-Problem-solutions
GCD Length.cpp
// https://codeforces.com/contest/1511/problem/B #include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define mp make_pair #define ll long long #define pll pair<long, long> #define vll vector<long long> #define inf 1e18 #d...
ALGO
0.999941
3.595483
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-08-01T20:38:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7ae6037e6c...
3b5e6091-a9f0-459b-b161-efd5344c0c6d
26TOXIC26/CPP-09
ex01/RPN.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* RPN.cpp :+: :+: :+: ...
ALGO
0.99557
4.88162
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-23T22:34: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": "520ca502cbdd...
f1f05bb6-7d48-4bb3-84b5-f1f8d4745cca
reddyak123/My-LeetCode-Solutions
Steps by Knight - GFG/steps-by-knight.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find out minimum steps Knight needs to reach target position. int x4[8] = {2, 1, -1, -2, -2, -1, 1, 2}; int y4[8] = {1, 2, 2, 1, -1, -2, -2, -1}; int minStepToReachTarg...
ALGO
0.999883
5.921534
{ "github_metadata": { "branch": "main", "commit_count": 290, "repo_created_at": "2022-05-14T13:25: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": "25850a0580...
13550b4d-1288-444a-bbab-7499ef5c34a1
jcamposobando/tp1
Main.cpp
#include "Ordenador.h" #include <string> #include <iostream> #include <cstdlib> #include <cmath> #include <iomanip> #include "time.h" using namespace std; #define cronometrar(funcion, arreglo, tamano) \ do { \ int* nuevo_arreglo = new int[tamano]; \ c...
ALGO
0.999584
4.943521
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-05-11T02:41:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "a27837f84...
1fda7258-363e-4f5e-b636-a84f4aecee74
kunapavk/Data-Structures
Lab 10/BTreeOrderTesting.cpp
#include "BTree.h" #include "Node.h" #include "studentClass.h" #include <iostream> #include <string> #include <math.h> #include <time.h> #define ORDER_CHOICE 5 #define NUMBER_OF_STUDENTS 50 using namespace std; int main() { srand(time(NULL)); BTree<student> tree(ORDER_CHOICE); string m_numbers[NUMBER_OF_STUDENTS]...
ALGO
0.99937
3.669364
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-09-06T13:49: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": "355b1b9668...
c0230e27-3f1a-4ded-b9ad-8fcdf4c67769
DHEERAJHARODE/Hacktoberfest2024-Open-source-
spiralpattern.cpp
#include <bits/stdc++.h> using namespace std; void pattern(int value) { int row = 2 * value - 1; int column = 2 * value - 1; int arr[row][column]; int i, j, k; for (k = 0; k < value; k++) { j = k; while (j < column - k) { arr[k][j] = value - k; ...
ALGO
0.999982
4.506068
{ "github_metadata": { "branch": "main", "commit_count": 945, "repo_created_at": "2020-10-03T04:58:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 473, "forks": 3840, "issues": 177, "pull_requests": 1367 }, "file_meta": { "content_id": "...
7a340e33-07d7-4245-8d84-1b70cd6b670c
dmhung1508/DSA_PTIT
hecosok.cpp
#include <bits/stdc++.h> using namespace std; string tong(string a,string b, int k){ while (a.length() < b.length()){ a = '0' + a; } while (b.length() < a.length()){ b = '0' + b; } string c = ""; int nho = 0; for (int i = a.size()-1; i >= 0; i--){ int x = a[i] - '0';...
ALGO
0.999924
4.352849
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-03-02T08:05: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": "dd483f940a5e...
cd88c984-3d9b-46ec-9b83-2ea52a4e8367
dsynkd/cs371p
allocator/allocator.cpp
#include <cassert> #include <cstddef> #include <new> #include <stdexcept> #include <cmath> #include <iostream> #include <string> using namespace std; template <typename T, std::size_t N> class my_allocator { private: char a[N]; // defined as char array to be byte iterable public: class iterator { private: int* _...
ALGO
0.996646
4.513225
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-07-15T01:01:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d5f2cce9f...
4a8c4943-cefc-4ef9-849b-4af857e8fb17
MariamRaouf30/SecurityProject_OpenSSL
Security_Project_WS/security_project/src/rsa.cpp
/* * rsa.cpp * * Created on: Dec 11, 2023 * Author: dell */ #include "rsa.h" #include <string.h> // Function to generate RSA key pair RSA* generate_key() { RSA* keypair = NULL; BIGNUM* bne = NULL; int ret = 0; bne = BN_new(); ret = BN_set_word(bne, RSA_F4); keypair = RSA_new(); ...
ALGO
0.974132
6.246077
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-23T23:56:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57cf126d2ace...