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
fd1988dc-6541-4089-bfd7-c768905af17d
dirkarnez/fuzzylite-boilerplate
src/main.cpp
#include "fl/Headers.h" int main(int argc, char** argv){ FL_IUNUSED(argc); FL_IUNUSED(argv); using namespace fl; // 300 - 850, 660 Engine* engine = new Engine; engine->setName("ObstacleAvoidance"); engine->setDescription(""); InputVariable* credit = new InputVariable; credit->setN...
TOOL
0.962173
4.660404
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-06-29T12:52: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": "56fb4cc8c4f7...
4f84718b-3833-4109-9e9c-a30b53e350fb
hmofrad/CodingPractice
skinnyleetcode/depthSum.cpp
/* * https://leetcode.com/problems/nested-list-weight-sum/submissions/ * (c) <NAME>, 2020 * (e) <EMAIL> */ /** * // This is the interface that allows for creating nested lists. * // You should not implement it, or speculate about its implementation * class NestedInteger { * public: * // Constructor in...
ALGO
0.999909
6.085819
{ "github_metadata": { "branch": "master", "commit_count": 660, "repo_created_at": "2016-07-22T04:19:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59d45002...
9b02d619-a2e6-42ac-808b-1d9b74d61037
limyeonsoo/Algorithm
문자열/1786_찾기.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; string T, P; vector <int> fails; vector <int> answer; void Input() { ios_base::sync_with_stdio(false); cin.tie(NULL); getline(cin, T); getline(cin, P); } void Fail() { fails.resize(T.size()*2); for (int i = 1, j=0;...
ALGO
0.999961
4.468602
{ "github_metadata": { "branch": "master", "commit_count": 152, "repo_created_at": "2020-03-16T15:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2464ab9...
cb7b9b6a-37c5-49e8-a229-2078ac90eb2c
YoungJooYoo/For_Coding_Test
Leet Code/3099. Harshad Number.cpp
class Solution { public: int sumOfTheDigitsOfHarshadNumber(int x) { int digit_sum = 0; int temp = x; while (temp != 0) { digit_sum += (temp % 10); temp /= 10; } if (x % digit_sum == 0) { return digit_sum; } return -1...
ALGO
0.999916
5.429658
{ "github_metadata": { "branch": "master", "commit_count": 3706, "repo_created_at": "2020-01-30T20:47: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": "7a8dd9e...
51b9e594-6c28-4261-a669-26c93d2b89d8
ashwin-narkar/Connect-N
player.cpp
// Player.cpp #include "provided.h" #include "support.h" #include <vector> #include <string> #include <iostream> #include <chrono> using namespace std; class Timer { public: Timer() { start(); } void start() { m_time = std::chrono::high_resolution_clock::now(); } double elapsed() const { std::chrono::...
ALGO
0.939429
5.742881
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-01-06T21:33: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": "fd4036a2a0...
dad6074d-4f76-4f5e-9fe8-95babe18f71b
cnicaudie/project_tiv
tiv/src/utility/ImageRecognitionManager.cpp
// // Created by <NAME> on 01/12/2020. // #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include "opencv2/features2d.hpp" #include "opencv2/calib3d.hpp" #include <iostream> #include <algorithm> #include <cmath> #include "utility/ImageRecognitionManager.hpp" #include "utility/SnippetExtractor.hpp" #d...
ALGO
0.970583
6.34313
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-28T10:39: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": "3c59ef726fac...
03adc150-a2af-41ef-8055-3f7eab231f9c
YtkaZero/My_PC_Repos
repos/Weydeman/Weydeman/Osnova.cpp
#include "stdio.h" #include "stdlib.h" #include "locale.h" #include "ctime" #define Q1 11 #define Q2 21 #define Q3 31 #define Q4 41 #define Q5 51 #define Q6 61 #define QE 99 #define D1 1 #define D2 1 #define D3 1 #define D4 1 #define D5 1 #define D6 1 #define D7 1 int conv_speed; int State; int Dat; int rotor=0; in...
ALGO
0.998907
3.460649
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-11-28T22:29: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": "840dea511d...
6bb3eb69-a229-487a-a25f-db2ea6aa91a4
HarshYadav175/Leetcode-Questions
0084-largest-rectangle-in-histogram/0084-largest-rectangle-in-histogram.cpp
#include <iostream> #include <vector> #include <stack> #include <algorithm> using namespace std; class Solution { public: int largestRectangleArea(vector<int>& heights) { int pseudoindex = -1; vector<int> left; stack<pair<int, int>> s; for (int i = 0; i < heights.size(); i++) { ...
ALGO
0.999942
6.375803
{ "github_metadata": { "branch": "main", "commit_count": 811, "repo_created_at": "2022-08-08T09:36: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": "0c6464e098...
a8052947-0743-4786-94b5-8138ff463387
gauravjha0711/DSA
stack/stack1/basicArray.cpp
#include<iostream> using namespace std; class Stack{ public: int top; int size; int* arr; Stack(int n){ size=n; top=-1; arr=new int[size]; } void push(int data){ if(top==size-1){ cout<<"Stack Overflow"<<endl; return; } e...
ALGO
0.998146
4.166589
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2025-02-10T04:51:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df8b5f6f9c7...
4560910b-6972-4e93-8aa2-0c48976f70c2
neofizik/zebra
main.cpp
#include <iostream> #include <cmath> #include "AVL.h" #include <queue> using namespace std; using namespace avl; using namespace atl; using namespace avs; struct Line { public: double m; double b; }; // Нахожднние коэффициентов m и b уравнения прямой y = mx + Line lineCalc(double vx, double vy, double x0, d...
ALGO
0.999699
4.08626
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-10-28T12:58: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": "a7252b9d21...
f5e8adbd-3866-4b50-8ba9-c3533b93b3e6
shimizudev/Levenshtein-Distance
Levenshtein Distance.cpp
#include <vector> #include <string> #include <algorithm> #include <iostream> #include <iomanip> class LevenshteinDistance { public: static float calculate(const std::string& str1, const std::string& str2) { if (str1.empty()) return 0.0f; if (str2.empty()) return 0.0f; int m = static_cast<i...
ALGO
0.999645
5.298583
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-01-21T13:39: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": "bde46b9e38...
37afa452-0cb1-4c5e-9742-e784fd85ccea
JoKeR-VIKING/DS_Algo
Coding Ninjas/Time And Space Complexity Analysis/pairSum.cpp
// You have been given an integer array/list(ARR) and a number 'num'. Find and return the total number of pairs in the array/list which sum to 'num'. // Note: // Given array/list can contain duplicate elements. // Input format : // The first line contains an Integer 't' which denotes the number of test cases or querie...
ALGO
0.99959
4.895936
{ "github_metadata": { "branch": "main", "commit_count": 105, "repo_created_at": "2021-08-21T14:53:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0722db8aad...
66fab52b-3c03-47b1-9d3f-c289da0a4366
ishandutta2007/codeforces-a
arterm/normal/449/D.cpp
#include <iostream> #include <algorithm> using namespace std; #define A 20 #define M 1111000 #define mod 1000000007ll int f[A + 1][M], p[M]; void read() { int n; cin >> n; for (int i = 0, x; i < n; ++i) { cin >> x; f[0][x]++; } } void din() { for (int k = 0; k < A; ++k) ...
ALGO
0.999984
4.101649
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "e1d1ef9b2f03...
fb992263-506a-413d-ba62-ce1015b6d558
mar80nik/Tracker
src/metricon.h
#pragma once #include "my_gsl.h" enum Polarization {TE, TM}; ////////////////////////////////////////////////////////////////////////// struct AngleFromCalibration: public SolverData { int status; double teta, Npix; DoubleArray cal; AngleFromCalibration() {teta = Npix = 0; status = GSL_FAILURE;} AngleFromCalibr...
ALGO
0.993554
5.488426
{ "github_metadata": { "branch": "MASTER_Tracker", "commit_count": 117, "repo_created_at": "2015-11-15T17:35: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": "...
814889f1-0443-4613-8667-499fe6d1db92
redboltz/cpp_sample
boost_training/bimap/bimap_test.cpp
#include <string> #include <iostream> #include <boost/bimap/bimap.hpp> #include <boost/bimap/multiset_of.hpp> namespace bm = boost::bimaps; struct T1 {}; // Area Handle struct T2 {}; // Area int main() { typedef bm::bimap< bm::tagged< std::string, T1>, bm::multiset_of< bm::tagged < int , T2 > > ...
TOOL
0.916766
5.627939
{ "github_metadata": { "branch": "master", "commit_count": 254, "repo_created_at": "2010-12-25T01:53:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09b5874d...
019604b9-a6b3-461e-b1fd-6ec2880263cf
jayanth2406/algos
old/pw/pw9/a2.cc
#include<bits/stdc++.h> using namespace std; struct LinkedList { int v; LinkedList* l; LinkedList* r; LinkedList(int v): v(v), l(nullptr), r(nullptr) {} }; int llsize(LinkedList* node, int k) { if(node->l == nullptr && node->r == nullptr) { return -1; } else { int le=0, ri=0; ...
ALGO
0.999785
3.496047
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-03-12T14:32:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "747fa8cc4f55...
3a3216eb-2910-4e5a-a0e7-2751afe1ee77
metehkaya/Algo-Archive
Problems/LeetCode/Solutions/2067.Number_of_Equal_Count_Substrings.cpp
class Solution { public: int equalCountSubstrings(string s, int k) { int n = s.length(); vector<vector<int>> sum(n+1,vector<int>(26,0)); for( int i = 0 ; i < n ; i++ ) { sum[i+1] = sum[i]; sum[i+1][s[i]-'a']++; } int ans = 0; for( int i = 0 ; i...
ALGO
0.999931
5.630337
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2023-04-04T19:44: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": "b70eafc67ef...
404c4bd7-62f9-482e-8ec8-b0a9b3af8cdd
chaeyeunpark/ExactDiagonalization
include/edlib/EDP/ConstructSparseMat.hpp
#pragma once #include <Eigen/Dense> #include <Eigen/Sparse> #include <cstdlib> namespace edp { template<typename T, class ColFunc> auto constructMat(size_t dim, ColFunc&& colFunc) -> Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> { Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> res(dim, dim); res.setZero(...
TOOL
0.977979
5.893683
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2019-03-30T00:27:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f7ae0f99...
30822c78-15d4-4c84-8f0a-ce7f3902ad66
1779296311/acwing
2.cpp
/********************************************* * ------------------------ * ------------------------ * file name: 2.cpp * author : @ JY * date : 2020--11--18 **********************************************/ #include <iostream> #include <vector> #include <algorithm> #include <functional> #includ...
ALGO
0.999981
4.024376
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2020-12-07T01:58: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": "4552cb56365a...
d9b15c9a-10cd-4ae5-b555-f5d60a37e054
nabobery/PROJECT-MADS
LeetCode/1001 - 1100/1029.cpp
// 1029. Two City Scheduling /* naive O(nlogn) time and O(n) space solution we first calculate the cost to travel to City A and calculate the difference when we travel to city B instead of A . We get the differences and sort them. now, we choose the least differences greedily(first n persons) as it implies that trave...
ALGO
0.999979
6.059192
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2022-03-04T16:30: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": "745bdceb3e...
3d9a9a1e-9afb-45db-879a-54738840a842
ishandutta2007/codeforces-j
jdurie/normal/1618/C.cpp
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; template<class T, class S> ostream& operator << (ostream &o, const pair<T, S> &p) { return o << '(' << p.first << ", " << p.second << ')'; } template<template<class, class...> cla...
ALGO
0.998693
4.50286
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05: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": "65b6f92bed9d...
d975726a-ba73-4169-b881-3bd4d7d30333
GersonCavalheiro/OpenMPSnapshot
May2023/RepCPP/164461391/neuron.h
#pragma once #include "activation_function.h" #include <iostream> #include <fstream> #include <vector> #include <random> #include <omp.h> #include <iterator> #include <algorithm> #include <numeric> #include <memory> #include <iomanip> #include "optimization.h" using namespace std; bool f_abs_sort(const double &a, ...
ALGO
0.981554
4.158334
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-08-19T17:35:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30b066a7ac...
c6a7c263-2a3d-462f-a28a-18378d4e3184
pratyakshroy47/Strivers-SDE-Sheet-Challenge
2508-maximum-sum-of-an-hourglass/2508-maximum-sum-of-an-hourglass.cpp
// formula to find how many hourglasses can be form in 2D matrix: // (r-2)(c-2) class Solution { public: int maxSum(vector<vector<int>>& grid) { int m = grid.size(); int n = grid[0].size(); int Max = 0; int sum = 0; for(int i=0; i<=m-3; i++){ for(int j=0; j<=n-...
ALGO
0.999887
5.894104
{ "github_metadata": { "branch": "main", "commit_count": 551, "repo_created_at": "2023-05-16T18:00: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": "95675130f6...
be91ff1f-3fe8-4b23-b3c9-c3f7c9b873cc
FrankWork/LeetCode
algorithm/dynamic_program/换零钱.cc
#include "template.h" class Exchange { public: int countWays(vector<int> coins, int n, int x) { /* v1: f(i, j) 用硬币0..i组成j钱数的方案数 不用i硬币 用了i硬币 f(i, j) = f(i-1, j) + f(i, j-coins[i]), j-coins[i]>=0 f(i-1, j) , ...
ALGO
0.999887
5.230736
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2015-07-31T00:30:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd7b1a73...
702511c5-bd11-47f4-b591-3d4233972d3c
hi-ogawa/practice
cses/range_queries/task1737/main_v3.cpp
// AC #include <bits/stdc++.h> using namespace std; #define ALL(X) (X).begin(), (X).end() #define FOR(I, X, Y) for (auto I = decltype(Y)(X); I < (Y); ++I) using ll = int64_t; using ull = uint64_t; namespace std { template<class ...Ts> istream& operator>>(istream& i, tuple<Ts...>& x) { apply([&](auto&&......
ALGO
0.999888
5.508774
{ "github_metadata": { "branch": "main", "commit_count": 888, "repo_created_at": "2020-07-14T04:24:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1077472fb3...
c6c2865c-b9b7-4402-bf15-cd651bc92171
danyfedorov/ga-optimum-kpi
main.cpp
#include "Population.h" #include "config.h" #include "fns.h" #include <iostream> #include <vector> #include <sstream> #include <stdlib.h> using std::cout; using std::cin; using std::endl; using std::vector; int more_iterations_dialog() { while (true) { cout << "Iterate more? (yNUM/n) > "; char a;...
ALGO
0.99977
4.909393
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2018-04-10T08:22:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "880b67eaf...
1de79ceb-fc33-4c56-8c49-bfb6ffbc803b
anmolkohli13/DSA-practice
gfg solutions/intersection_point_of_2_LL.cpp
/* Linked List Node struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; */ //Function to find intersection point in Y shaped Linked Lists. int intersectPoint(Node* head1, Node* head2) { // Your Code Here if(head1 == NULL || head2 == NULL) return 0; ...
ALGO
0.999953
4.970669
{ "github_metadata": { "branch": "main", "commit_count": 408, "repo_created_at": "2021-05-31T07:58: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": "3855f8dbc2...
28ecfec6-84fd-453c-a269-153723f7c025
NitkarshChourasia/pro-b_lang_master_private
downloaded_completely/C++/expert/[1628] Additive Number [Ex].cpp
/* #### Additive Number #### Write a function that checks if a given string contains an additive sequence or not. A string contains an additive sequence if its digits can make a sequence of numbers in which every number is the sum of the previous two numbers. A valid additive sequence should contain at least three n...
ALGO
0.997179
3.762455
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2022-12-11T14:53:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82dc6253b7...
6c19ed04-6935-4116-8b2d-b90534861093
dsorvq/cf
div4/1692/c.cpp
#include <bits/stdc++.h> #include <numeric> using namespace std; void solve() { vector<string> grid(8); for (int i = 0; i != 8; ++i) { cin >> grid[i]; } for (int i = 1; i < 7; ++i) { for (int j = 1; j < 7; ++j) { if (grid[i - 1][j - 1] == '#' and grid[i - 1][j + 1] == '#' and grid[i + 1][j...
ALGO
0.99994
4.18812
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-05T12:18: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": "b60617b542d8...
0dc50eac-8cc4-42f0-9e85-4a8f10475cf1
olimpiadi-informatica/oii
2018/territoriali/lwf/cor/correttore.cpp
/** * Autore: Nessuno */ #include <cstdio> #include <cstdlib> #include <ctype.h> #include <cstring> void err(const char *msg) { fprintf(stderr, "%s\n", msg); exit(1); } void ex(const char *msg, float res) { if(msg) fprintf(stderr, "%s ", msg); printf("%f\n", res); exit(0); } const in...
ALGO
0.999514
3.366074
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2015-01-04T00:55:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 4, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "42a7b32c5...
e0537c2b-9a27-4730-bb61-31943e5a5289
alexandraback/datacollection
solutions_1483485_0/C++/hxhxhxhx/A.cpp
#define INPUT "test.in" #define OUTPUT "test.out" #include <fstream> #include <string> using namespace std; void get_mapping(string encoded, string decoded, char mapping[]) { int inverse[26]; for (int i = 0; i < 26; i++) inverse[i] = -1; for (int i = 0, l = encoded.length(); i < l; i++) { if (encoded[i] == ' ...
ALGO
0.999334
3.665003
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44f2d428c...
8a8b4df1-e153-48c9-99a4-c73cd81e77d0
ryzom/opennel_svn
nel/include/nel/misc/bsphere.h
/** \file bsphere.h * TODO: File description * * $Id$ */ /* Copyright, 2000 Nevrax Ltd. * * This file is part of NEVRAX NEL. * NEVRAX NEL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either versio...
TOOL
0.942835
5.056272
{ "github_metadata": { "branch": "trunk", "commit_count": 626, "repo_created_at": "2022-04-15T11:18:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b459ee1381...
a0134a8d-4e7f-4170-b03d-e5949a430fc5
jlstr/FlightPaths
src/path_finder.cpp
#include <iostream> #include "./headers/path_finder.h" #include "./headers/string_helper.h" using namespace std; PathFinder::PathFinder(Graph& graph) { this->graph = graph; for (auto& [city_key, _]: graph) city_name_mapper[StringHelper::toLower(city_key)] = city_key; } vector<PathResult> PathFinder::solve(co...
ALGO
0.998936
5.092382
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2025-05-30T16:12: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": "9cde7836a...
d3a16d9b-1b43-4962-9978-e2a02ac27cdf
intervalrain/Cpp
leetcode/Backtrack/140.word-break-ii.cpp
#include <bits/stdc++.h> using namespace std; /* * @lc app=leetcode id=140 lang=cpp * * [140] Word Break II */ // @lc code=start class Solution { public: vector<string> wordBreak(string s, vector<string>& wordDict) { vector<string> res; string path; helper(s, wordDict, res, path); ...
ALGO
0.999421
5.997981
{ "github_metadata": { "branch": "main", "commit_count": 265, "repo_created_at": "2022-04-25T18:46:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "866e783ec5...
c6e6e213-567b-463f-b99d-87aa01a1a017
jtlap/nt2
modules/core/euler/include/nt2/euler/functions/stirling.hpp
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
ALGO
0.976098
5.833356
{ "github_metadata": { "branch": "master", "commit_count": 14374, "repo_created_at": "2010-11-02T16:07:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 39, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3186...
d41f6735-0855-488a-bbd8-e2e0a697c610
ideahitme/contest
codeforces/gym/24_01_17/A/code.cpp
#include <algorithm> #include <vector> #include <iostream> #include <string> #include <set> using namespace std; typedef long long ll; typedef pair<int, int> pii; void largest_prime(int k, int i, vector<pii> &primes) { while(i * i <= k){ if (k % i == 0){ primes.push_back({i, 0}); while(k % i == 0) { k /...
ALGO
0.999795
4.287383
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-11-08T15:52:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77bc19c7d...
35ca1b7f-c7c0-4646-a479-094457c2d106
gitaantonia/alpro1
tugas.cpp
#include <iostream> using namespace std; main() { int array[] = {1, 2, 6, 4, 5}; int *ptr = array; int n = sizeof(array) / sizeof(array[0]); int i; cout << "Semua elemen array: "; for (i = 0; i < n; i++) { cout << *(ptr + i) << " "; } int maks = *ptr; int min = *ptr; ...
ALGO
0.997221
3.655315
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-02-15T03:48: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": "17708baecafc...
d28917ab-bb5b-4f78-832a-12a1691bce68
FarwaToor/OOP_lab
Lab_1/task2.cpp
// ConsoleApplication24.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> using namespace std; struct student { string name; string reg_no; string faculty; int course; int marks[3]; }; int main() { int CH = 3; float sum = 0; ...
TOOL
0.958315
3.062755
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2022-04-16T15:32: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": "1ee28b10f55...
315f38cc-e062-4042-b62c-f24bf864f486
jianniskouts/advcomparch
advcomparch-2015-16-ex2-helpcode/advcomparch-2015-16-ex2-helpcode_v1/pintool/pentium_m_predictor/saturating_predictor.h
#ifndef SATURATING_PREDICTOR_H #define SATURATING_PREDICTOR_H #include <stdint.h> // From http://www.josuttis.com/tmplbook/meta/pow3.hpp.html template <int N> class Pow2 { public: enum { pow = 2 * Pow2<N-1>::pow }; }; template <> class Pow2<0> { public: enum { pow = 1 }; }; template <unsigned n> class Saturat...
ALGO
0.99821
6.569921
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2016-04-23T08:42:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca67cb11d5...
e7ea58f4-41fd-4755-8010-9b2c441baa10
ssjf409/PS
알고리즘스터디/2194유닛이동시키기.cpp
// https://www.acmicpc.net/problem/2194 #include <iostream> #include <vector> #include <queue> #define INF 987654321 #define endl '\n' using namespace std; struct Point { int y; int x; int dist; Point(int a, int b, int c) : y(a), x(b), dist(c) {} }; const int dy[4] = {0, 0, -1, 1}; const int dx[4] ...
ALGO
0.999967
4.630018
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2019-09-26T17:51: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": "446963e7d...
492bbedd-dbd9-416c-9cd4-f399bef1dc05
z-learner/LeetCode
哈希/LeetCode_146_LRU缓存机制.cpp
#include <iostream> #include <unordered_map> #include <list> #include <vector> using namespace std; class LRUCache { public: int _capacity; int _size; list<int> bidirectionList; unordered_map<int, pair<int, list<int>::iterator>> hashMap; //key value List::ite LRUCache(int capacity) :_cap...
ALGO
0.99744
5.63483
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-12-10T12:09:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "677b4c8eb7...
d3e3fc3d-c8ca-40b6-bf74-92ba56572ef9
unrealengine47/UnrealEngine4
Engine/Source/ThirdParty/PhysX/APEX-1.3/module/destructible/fracture/core/IceRevisitedRadixBase.h
/* * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this so...
ALGO
0.999518
5.729881
{ "github_metadata": { "branch": "master", "commit_count": 27536, "repo_created_at": "2015-06-30T06:33:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 36, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "88fc...
e14fcb96-90b1-4312-8005-6cd3a2329098
levanlong2603/KTLT_laptrinh.ptit
KTE_003 - Ước nguyên tố luỹ thừa lớn nhất.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main(){ int t; cin >> t; while(t--){ ll n; cin >> n; if(n == 1){ cout << 0 << endl; continue; } else if(n == 2){ cout << 2 << " " << 1 << endl; c...
ALGO
0.999935
4.630879
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2024-10-08T15: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": "b3cff1aa77...
f9712b9b-ed3f-4990-a807-33150fc26782
Dharamveer21/Data-Structures-and-Algorithms
Striver Playlists/Dynamic Programming/Cherry Pickup II.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: // memoisation int cherrys[70][70][70]; int maxcherrys(int row, int col1, int col2, vector<vector<int>> &grid) { if (col1 < 0 || col1 >= grid[0].size() || col2 < 0 || col2 >= grid[0].size()) { return -1;...
ALGO
0.999968
5.02484
{ "github_metadata": { "branch": "main", "commit_count": 204, "repo_created_at": "2023-11-13T10:48:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "293d1c9298...
4917a126-88ff-4b41-9e83-9b9caa043c16
atmtools/arts
3rdparty/invlib/src/invlib/algebra/matrix_transpose.h
/** \file algebra/matrix_transpose.h * * \brief Proxy class for computing the transpose of a matrix. * * Contains the invlib::MatrixTranspose class template with provides a proxy * class for transposing an algebraic expression. * * Also provides the function template transp(), to compute the transpose of * an a...
TOOL
0.987238
6.82682
{ "github_metadata": { "branch": "main", "commit_count": 10626, "repo_created_at": "2012-10-29T12:51:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 78, "forks": 32, "issues": 19, "pull_requests": 2 }, "file_meta": { "content_id": "cb7275...
a30a042d-6323-4388-84e5-6e7e5267c91d
maliput/maliput
src/maliput/math/matrix.cc
// BSD 3-Clause License // // Copyright (c) 2022, <NAME>. All rights reserved. // Copyright (c) 2019-2022, Toyota Research Institute. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redis...
TOOL
0.990579
6.850434
{ "github_metadata": { "branch": "main", "commit_count": 633, "repo_created_at": "2019-03-26T16:38:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 5, "issues": 81, "pull_requests": 1 }, "file_meta": { "content_id": "036527fed...
8127c68e-af64-4930-9640-3f3565f17f1b
patflick/psac
include/divsufsort_wrapper.hpp
/* * Copyright 2015 Georgia Institute of Technology * * 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 applicab...
ALGO
0.950699
6.766896
{ "github_metadata": { "branch": "master", "commit_count": 318, "repo_created_at": "2015-03-10T21:53:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 9, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "ae70499...
b27acc8c-0a10-4e99-aaac-557d3d081613
mindspore-ai/mindspore
mindspore/ccsrc/plugin/device/gpu/kernel/math/cumsum_gpu_kernel.cc
/** * Copyright 2020-2022 Huawei Technologies Co., Ltd * * 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 applicabl...
ALGO
0.99851
6.947004
{ "github_metadata": { "branch": "master", "commit_count": 83896, "repo_created_at": "2020-02-11T08:43:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4559, "forks": 740, "issues": 181, "pull_requests": 20 }, "file_meta": { "content_id": ...
4bc23a43-0880-4b7a-ab8f-bb683cc78006
jbelenob/proyecto-intermedio-herr-comp
calculating_probabilities.cpp
#include "percolation_problem.h" int main(int argc, char** argv) { //size va a ser el número de filas o de columnas. const long SIZE = std::atol(argv[1]); int SEED = std::atoi(argv[2]); //const double probability = std::atof(argv[3]); //Se repite este número de veces para calcular 1 vez. const int REPS_P...
ALGO
0.99596
4.220516
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2022-05-04T14:48: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": "75444e15d...
dafa6e4c-a1c0-47d3-b7ba-114726d7e73c
dillongoostudios/goo-engine
source/blender/compositor/realtime_compositor/cached_resources/intern/morphological_distance_feather_weights.cc
/* SPDX-FileCopyrightText: 2023 Blender Authors * * SPDX-License-Identifier: GPL-2.0-or-later */ #include <cmath> #include <cstdint> #include <memory> #include "BLI_array.hh" #include "BLI_hash.hh" #include "BLI_index_range.hh" #include "RE_pipeline.h" #include "DNA_scene_types.h" #include "GPU_shader.h" #includ...
TOOL
0.922007
6.75055
{ "github_metadata": { "branch": "goo-engine-main", "commit_count": 132039, "repo_created_at": "2021-05-08T09:53:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1109, "forks": 148, "issues": 44, "pull_requests": 6 }, "file_meta": { "conte...
241adda1-95d1-4f6d-b162-b17fd67c71ff
SchrodZzz/ITMO
term_1/Labs/dis_1/01-B.cpp
/* * Written by Andrei "SchrodZzz" Ivshin * Date: 11.2018 */ #include <iostream> #include <vector> using namespace std; int main() { int n, k; cin >> n >> k; vector<int> addition, values(static_cast<unsigned long>(n + 1), -1); vector<vector<int> > coefficents(static_cast<unsigned long>(k), additio...
ALGO
0.999989
4.138061
{ "github_metadata": { "branch": "master", "commit_count": 151, "repo_created_at": "2019-01-22T15:36:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "e5e056ad...
1cb9beee-4457-4fc8-9aa9-6d6f528a3bb8
blackbird410/DSA
19.cpp
#include <cstdlib> #include <ctime> #include <iostream> #define LEFT -1 #define RIGHT 1 using namespace std; template <class T> class BinarySearchThreadedTree; template <class T> class BinaryThreadedTreeNode { private: protected: T *data; BinaryThreadedTreeNode *left, *right; bool isThread; public: BinaryTh...
ALGO
0.999914
4.540955
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2024-09-23T08:15: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": "5442a1c5bba...
3a4254b8-4cee-457e-a59e-cc2c6041c88d
shra1dhar/CP
CF/1466/q3.cpp
#include <bits/stdc++.h> using namespace std; int getChangeCount(string &str) { int len = str.length(); map<int, bool> m; int count = 0; for (int i = 0; i < len; i++) { int left = i; int right = i; while (left > -1 && right < len) { left--; right++; if (m.find(left) == m.en...
ALGO
0.999953
4.385081
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-03-12T18:38:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7edaa5fc7...
a3f7e7df-b658-46f2-b75c-d6e784ff6dbb
Jeffrin2005/HEAP-
Stone Game VI.cpp
class Solution { public: int stoneGameVI(vector<int>& aliceValues, vector<int>& bobValues) { int n = aliceValues.size(); // max heap to sort stones based on the sum of values to Alice and Bob priority_queue<pair<int, int>> maxHeap; // Fill the heap with pairs of (sum of values, ind...
ALGO
1
5.457009
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2024-08-01T16:51: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": "2b375bcfd73...
07fab851-6eb7-40c2-be6c-543ddb229af5
Zantyhago/Programacion-Procedural
santiago sanchez.cpp
#include <stdio.h> #include <string.h> #include <malloc.h> struct nodo{ char nombre[25]; int legajo; int anyo; struct nodo *sig; }; typedef struct nodo *puntero; void headmaker(puntero &xcab){ xcab=NULL; } void insertar(puntero &xcab){ int xleg; puntero nuevo; printf("Ingrese legajo ...
TOOL
0.996467
3.037702
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-04-22T14:30:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d950b6c33bc2...
dfa668b3-562b-4582-86b7-dcb8c62b3837
hossainemruz/My-Codes
UVA/657.cpp
//<NAME> #include<stdio.h> #include<string.h> #include<math.h> #include<algorithm> #include<string> #include<map> #include<queue> #include<vector> #include<iostream> using namespace std; #define inf 1<<25 #define sz 200 #define eps 1e-9 void star(int x,int y,int w,int h); char str[sz][sz]; int visit[sz][sz]; int R[]={1...
ALGO
0.999855
3.077837
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-12-17T08:10: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": "106dd670a...
e1709b8e-d380-4514-82b5-0ba2e7e65b17
Winibo/Advent-of-Code
2022/Day11/Day11P2.cpp
#include <bits/stdc++.h> using namespace std; class Monkey { public: Monkey(vector<int> startItems, string operation, int test, int trueThrow, int falseThrow): test(test), trueTest(trueThrow), falseTest(falseThrow) { for (int i : startItems) { items.push(i); } istringstream i(operation); cou...
TEST
0.998418
4.387321
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2022-12-02T07:23: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": "39fc8f974c...
9ecca365-d0df-4d20-8281-2476a7ccf62c
wang2470616413/MyCode
2019.5.11/Poj_3225.cpp
#include<stdio.h> #include<algorithm> #include<string.h> #define ll long long #define mmset(a,b) memset(a,b,sizeof(a)) #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 using namespace std; const int N = 7e4 + 5; int col[N << 2], mark[N << 2]; int len; void PushUp(int rt) { if(col[rt << 1] == 0 && col[rt << 1 | 1...
ALGO
0.999418
3.142843
{ "github_metadata": { "branch": "master", "commit_count": 377, "repo_created_at": "2019-02-05T03:45:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c2f863a...
d1ac2188-7c16-4108-8954-b023343c5c57
TruongPersonal/Coder_HUSC
Nhap_mon_lap_trinh/PB146/Cplusplus.cpp
#include <iostream> #include <sstream> #include <vector> #include <map> #include <algorithm> using namespace std; // Hàm tách các từ trong chuỗi vector<string> splitList(string word) { vector<string> v; stringstream ss(word); string w; while (ss >> w) { v.push_back(w); } return v; ...
ALGO
0.999964
4.910547
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-10-06T12:37: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": "ad8c860c926...
4d6d5b95-dd9d-45db-8bcb-a43cea927ae8
DreamLife-Jianwei/Qt-Vtk
03_ThirdVtk/Vtk9/include/vtk-9.0/vtkTableBasedClipDataSet.h
/*========================================================================= Program: Visualization Toolkit Module: vtkTableBasedClipDataSet.h Copyright (c) <NAME>, <NAME>, <NAME> All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distribut...
TOOL
0.908966
5.891075
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2021-06-22T02:34:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 174, "forks": 45, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4398cf...
253f6e1e-ffd5-4f7d-9354-8bf8c5b6cc34
eolonno/study
ОАиП/2-й семестр/ЛР №9/Доп. задания/Доп. ЛР №9.1/Доп. ЛР №9.1/List.cpp
#include "List.h" #include<iostream> void insert(Person* e, Person** phead, Person** plast) //Добавление в конец списка { Person* p = *plast; if (*plast == NULL) { e->next = NULL; e->prev = NULL; *plast = e; *phead = e; return; } else { p->next = e; e->next = NULL; e->prev = p; *plast = e; } } ...
TOOL
0.943685
3.466272
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-09-09T17:42:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31f88eb8e...
49504eba-1a44-4803-a9fb-8e5e34f5e98a
Robin005cr/Professional_CPP
const_keyword/ConstFunctionArguments.cpp
/* * project : https://github.com/Robin005cr/Professional_CPP * file name : ConstFunctionArguments.cpp * author : <NAME> * mail id : <EMAIL> * LinkedIn : https://www.linkedin.com/in/robin-cr/ * portfolio : https://robin005cr.github.io/ * * Note : If any mistakes, errors, or inconsistencies are found in the code...
TOOL
0.943867
6.088386
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2024-07-28T02:46:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23193c8d843...
1f84d4ce-e6f2-4fef-a544-057847b4940a
stalker5217/problem-solving
BAEKJOON/17822.cpp
#define DEBUG 0 #define LOG(string) cout << string #include <iostream> #include <cstring> #include <vector> #include <deque> #include <algorithm> #include <functional> using namespace std; int N, M, T; vector<deque<int> > map; int visit[51][50]; vector<pair<int, int> > candidate; void rotateCW(int, int); // 시계방향 ...
ALGO
0.999941
4.177925
{ "github_metadata": { "branch": "master", "commit_count": 934, "repo_created_at": "2019-06-09T06:19: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": "146cec06...
a06eb668-948f-4f72-afbb-5ddc01891827
qiaopengju/computer_graphics
operation2/maze/create_map.cpp
#include "data.h" #define Rand(a, b) do{\ do{\ a = rand() % width * high;\ b = rand() % width * high;\ }while(a == b || a % 2 != 0 || b % 2 != 0);\ }while(0) #define get_edge(edge) do{\ do{\ edge = rand() % (width * high);\ }while(edge % 2 != 1 || map[edge] != 0);\ }while(0) #define dig_point() do{\...
TOOL
0.990552
3.898849
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-12-01T08:58: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": "d25822645...
f476b262-99b7-4e13-bca5-b58bda1900c7
amidg/playground
adventofcode/2015/3/main.cpp
#include <iostream> #include <vector> // custom #include "input.h" #include "house.h" int main() { std::pair<int, int> santa_xy {0, 0}; std::pair<int, int> robot_xy = santa_xy; std::vector<House> houses; // iterate over the elf commands House temp(santa_xy); std::vector<House>::iterator foun...
ALGO
0.999877
4.666343
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2024-06-15T16:59: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": "85600a993...
c01692da-ca65-4a7e-ab1f-03ea6067b559
gautam-bits/CompetitiveCoding
Spoj/MLASERP.cpp
// This is an intellectual property of <NAME> , // So please use it with extreme CAUTION . //-------We can be heroes , just for one day!!.---------// #include <bits/stdc++.h> using namespace std; //*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ knowledge $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*// #define...
ALGO
0.999981
3.728031
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-09-16T19:20: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": "6d1d28703...
50cdaa75-abfe-40d1-9cf6-670973de5863
mostafa-talat72/leetcode-solutions
1147-flip-columns-for-maximum-number-of-equal-rows/1147-flip-columns-for-maximum-number-of-equal-rows.cpp
class Solution { public: int maxEqualRowsAfterFlips(vector<vector<int>>& matrix) { int ans = 0, tst = 0, conv, sum = 0, n = matrix.size(), m = matrix[0].size(), mnconvert = INT_MAX; vector<int>converter; for (int i = 0; i < n; i++) { sum = 0; for (int j = 0; j < m; j++) { sum += matrix[i][j]; } if ...
ALGO
0.999991
5.813229
{ "github_metadata": { "branch": "main", "commit_count": 1310, "repo_created_at": "2025-04-28T23:17:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2184b31e2...
e5f3ae6f-8ccc-42d3-ba06-f8d693547dc4
messyidea/ACM-Codes
集训/2015年1月/杂/postre_.cpp
#include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> using namespace std; typedef long long LL; #define MAXN 200005 struct Seg{ int y,x1,x2; int flag; bool operator<(const Seg& seg) const{ return y<seg.y; } } seg[MAXN<<1]; struct Node{ LL sum,l,r; int cov...
ALGO
0.998738
3.472689
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2014-12-09T10:03: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": "81c67681a...
7dfa928b-354b-4f77-9b86-ab0e0970bb85
abietic/Test-Trees
bst.h
#ifndef BST_H #define BST_H #include <queue> #include <stack> #include <iostream> #include <utility> #include <cassert> #include <vector> template <typename Key, typename Value> class BSTNode { public: Key key; Value val; BSTNode<Key, Value> *left, *right; BSTNode(Key k, Value v) : key(k), val(v) { left...
ALGO
0.999235
4.439987
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-03-26T02:38: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": "6f51163bc65e...
b1e65091-97fc-4cdb-a354-1cf4275fdb24
celik-yusuf/Stl_Library
4.Vector.cpp
/* vector = dinamik diziyi uygulayan bir dizi kapsayıcı sınıfıdır; bu, öğe eklerken boyutun otomatik olarak değiştiği anlamına gelir. Bir vektör, öğeleri bitişik bellek konumlarında saklar ve belleği, çalışma zamanında gerektiği gibi tahsis eder. vector ve dizi arasındaki fark = Bir dizi statik yaklaşımı takip eder,...
ALGO
0.970463
4.506376
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-05-16T13:10: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": "a2e14fcbd9f4...
93579bed-46be-4a00-ae5e-ed919e86eef7
CaDe27/Co-digos
ICPC/segundaFecha2022/c.cpp
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.h> #include <iomanip> #include <string> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <unordered_map> #include <unordered_set> using namespace std; typedef int64_t ll; typedef pair<int,int> pii; #de...
ALGO
0.999593
3.134956
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-11-13T17:57:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d50e5e0e0...
785cca88-fccc-4007-8a2f-106293ded4bc
manasbis10/code
C_Team.cpp
#include<bits/stdc++.h> using namespace std; #define endl '\n' #define int long long int mod = 1e9+7; int mod_add(int a, int b, int m) {return (a % m + b % m) % m;} int mod_mul(int a, int b, int m) {return (a % m * b % m) % m;} int mod_sub(int a, int b, int m) {return ((a % m - b % m) + m) % m;} int bin_exp(int base, i...
ALGO
0.999983
3.489292
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-18T19:45: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": "f00d26245efa...
d973ec54-d1bf-4c78-bea2-87d3a42bc342
AlonsoPaulino/competitive-programming
LeetCode/The Maze.cpp
class Solution { vector<vector<int>> v; int n, m; public: int isValid(int i, int j) { return i >= 0 && i < n && j >= 0 && j < m; } bool hasPath(vector<vector<int>>& maze, vector<int>& start, vector<int>& destination) { n = (int) maze.size(), m = n > 0 ? (int) maze[0].size() : 0,...
ALGO
0.999959
5.753049
{ "github_metadata": { "branch": "master", "commit_count": 749, "repo_created_at": "2015-01-22T15:10:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb30e104...
30fe8749-5697-475a-ad2e-ab0a1571e9c3
ShaiHoresh/experis
cpp/bignumbers/BigNums.cpp
#include <climits> #include <cstring> #include <cstdio> #include <algorithm> #include <iomanip> #include <locale> #include <sstream> #include "BigNums.h" ostream& operator<<(ostream& os, const BigNumber& _num) { os << _num.Get(_num); return os; } istream& operator>>(istream& is, BigNumber& _num) { ...
ALGO
0.937343
4.023171
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-04T12:42: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": "990a30894b...
724f9e95-6563-4a29-acc2-cb849f31f6e0
AtomicGameEngine/AtomicGameEngine
Source/ThirdParty/kNet/include/kNet/Sort.inl
/* Copyright The kNet Project. 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 writi...
ALGO
0.999959
6.730647
{ "github_metadata": { "branch": "master", "commit_count": 3398, "repo_created_at": "2015-01-24T20:35:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3326, "forks": 581, "issues": 389, "pull_requests": 5 }, "file_meta": { "content_id": "d...
e39c1b8f-b870-47b5-825e-d88038692a64
raincross7/code-similarity
codes/train_code/problem499/problem499_270.cpp
#include <bits/stdc++.h> using namespace std; template <class T, class U> ostream &operator<<(ostream &os, const pair<T, U> &p) { os << "(" << p.first << "," << p.second << ")"; return os; } #ifdef __LOCAL #define debug(x) cerr << __LINE__ << ": " << #x << " = " << x << endl #define debugArray(x, n) ...
ALGO
0.999974
3.858674
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e979778df36b...
82c6e551-b0d6-4b55-b1b5-061ee2e98c3c
barti777/concurrent-processing
lab12/mpi_casablanca.cpp
#include <mpi.h> #include "pbm.h" #include "helper.h" int main(int argc, char *argv[]) { image image_casablanca, image_casablanca_out; int width, height; int numProc, myRank; double start = 0, end = 0; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &numProc); MPI_Comm_rank(MPI_COMM_...
ALGO
0.998144
4.526032
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-06-18T20:05:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f66c97e7...
0871d539-0d56-476f-bc2a-58959e03ce6f
joonhoi95/Coding-Test
1004/1004.cpp
#include <iostream> #include <math.h> using namespace std; class STEND_info { public: int startx,starty,endx,endy; STEND_info() {} }; class Space_info { public: int x, y, r; Space_info() {} }; int main() { int Test_No=0; int Test_Count=1; int Space_No; //cout << "Number of Test: "; cin >> Test_No...
ALGO
0.999648
3.87876
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2020-04-21T06:33:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f130e8ad...
4b4c374a-ab6c-490c-8187-a7d2dca15387
ethz-asl/sampling_based_control
mppi/include/mppi/utils/gaussian_sampler.h
/*! * @file gaussian_sampler.h * @author <NAME> * @date 21.07.2020 * @version 1.0 * @brief description */ #pragma once #include <iostream> #include "mppi/utils/multivariate_normal_eigen.h" namespace mppi { class GaussianSampler { public: using sampler_ptr = std::shared_ptr<GaussianSampler>; ...
ALGO
0.978379
6.552505
{ "github_metadata": { "branch": "master", "commit_count": 496, "repo_created_at": "2020-09-25T12:10:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 64, "forks": 8, "issues": 4, "pull_requests": 6 }, "file_meta": { "content_id": "6663b251...
df2a69a4-0d6d-4ec6-a6d8-ee9927603f1f
DASHxc/Practice-Code
Graphs/Validate Binary Tree Node.cpp
#include<vector> #include<unordered_map> #include<unordered_set> #include<queue> #include<string> using namespace std; class Solution { public: bool validateBinaryTreeNodes(int n, vector<int>& leftChild, vector<int>& rightChild) { vector<int> graph[n]; vector<int> indegree(n,0); for(int i=0;...
ALGO
0.999947
5.397129
{ "github_metadata": { "branch": "Graphs", "commit_count": 45, "repo_created_at": "2023-04-24T19:13:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "502d277b4...
1ca44a3c-36e3-4c23-b9bd-b8c9456cf4c8
Costath/Linked-queue
biblioteca.cpp
/* Author: <NAME> Discipline: ED1 Professor: Irineu May/2017 */ #include "biblioteca.h" int quant = 0; Queue* enqueue(Queue* L, int element){ quant++; if(L == NULL){ //L == NULL enquanto a fila estiver vazia L = (Queue*) malloc(sizeof(Queue)); L->prox = NULL; L->conteudo = element; return L; }else...
ALGO
0.959185
4.581864
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-10-26T23:05: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": "f7fdf12de7...
bedd9741-4fd5-4466-b6a2-97563a6dde67
itsAdnan16/DSA_Practice
LinkedList/check.cpp
#include <iostream> #include <vector> #include <iomanip> #include <sstream> #include <string> using namespace std; struct Process { int id; int size; bool allocated = false; int blockIndex = -1; }; struct MemoryBlock { int size; bool allocated = false; int processIndex = -1; }; int main(...
ALGO
0.998632
4.471406
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-05T18:05: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": "ff944fab90b4...
0a7f9c31-d4b4-4377-9ee7-581e8becf282
ishandutta2007/codeforces-t
tiramister/normal/1098/B.cpp
/* ---------- STL Libraries ---------- */ // IO library #include <cstdio> #include <fstream> #include <iomanip> #include <ios> #include <iostream> // algorithm library #include <algorithm> #include <cmath> #include <numeric> #include <random> // container library #include <array> #include <bitset> #include <deque> #...
ALGO
0.999995
4.710148
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4da227862168...
96a08354-758b-4a71-90a7-8921a91acb17
DjDolan/python-interpreter
python-interpreter-v2/postfixcalculator.h
#ifndef POSTFIXCALCULATOR_H_INCLUDED #define POSTFIXCALCULATOR_H_INCLUDED #include <stdio.h> #include <stack> #include "parser.h" using namespace std; bool IsNumber(char c) { if(c >= '0' && c <= '9') return true; else return false; } bool IsVariable(char c) { if(c >= 'a' && c <= 'z') return true; el...
ALGO
0.974197
3.910441
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-10-08T19:59:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6d21fc9aa...
713308da-88da-418e-88c9-044b5b0703e8
priyanshu1101/Leetcode-Practice-Problems
0987-vertical-order-traversal-of-a-binary-tree/0987-vertical-order-traversal-of-a-binary-tree.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...
ALGO
0.999993
6.122659
{ "github_metadata": { "branch": "main", "commit_count": 338, "repo_created_at": "2024-01-24T03:28: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": "59161079f4...
3ae17082-f9c0-4629-a371-7e9df70a3338
mzry1992/workspace
OJ/CDOJ/P1316.cpp
#include <stdio.h> int tcase,fcase; int n,m,i,j,a,b,flag; int map[210][210];//保存各个球的重量关系,我用的是邻接边存储。 int indegree[210];//保存各点的入度 int ans[210];//保存答案 int AOV[210];//保存拓扑序列 int solve()//主要过程 { int i,j,k,use[210]; for (i = 1;i <= n;i++)//标记结点I是否已经删除 use[i] = false; for (i = 1;i <= n;i++)//需要找...
ALGO
0.999987
3.372888
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2012-11-03T05:40: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": "e82d78467...
4f9e3b00-16a9-4a4e-ba29-c610f342570f
ENGaliyasser/OS_Schedular_GUI
OS_Process_Scheduler-main/OS_Scheduler/sjf_algorithm.cpp
#include "sjf_algorithm.h" #include <algorithm> // for std::sort #include <climits> // for INT_MAX extern QVector<int> inProgress; // Function to calculate average waiting time float calculate_avg_waiting(const QVector<Process>& execution_order) { int total_waiting_time = 0; for (const Process& process : e...
ALGO
0.999989
6.417101
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-04-14T14:21:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41dba01213a...
081f867c-50bd-46a5-9f87-a432599ea1aa
P79N6A/Codes-1
2015.9~2016.3/Nearest vectors2.cpp
#include<algorithm> #include<cctype> #include<cmath> #include<cstdio> #include<cstring> #include<iomanip> #include<iostream> #include<map> #include<queue> #include<set> #include<sstream> #include<stack> #include<string> #define lowbit(x) (x & (-x)) #define root 1, n, 1 #define lson l, m, rt << 1 #define rson m + 1, r, ...
ALGO
0.999952
3.724008
{ "github_metadata": { "branch": "master", "commit_count": 232, "repo_created_at": "2019-04-23T01:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e3491ef...
b15f3877-af48-44f6-b7dc-448a81de29ef
Charulatha5/CSA0601-design-analysis-algorithms
set9 permutation.cpp
#include <stdio.h> void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } void generatePermutations(int arr[], int size, int index) { if (index == size) { for (int i = 0; i < size; i++) { printf("%d ", arr[i]); } printf("\n"); return; } fo...
ALGO
0.999896
5.471207
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-08-30T16:19: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": "3f735462aee1...
ace08ab2-f6c0-474d-9e1d-c4bf5b3dbb02
neetcode-gh/leetcode
cpp/2013-detect-squares.cpp
/* Given stream of points, add new points, return count of squares Find diagonals, if exists then forms a square, loop thru all points Time: O(1) add O(n^2) count -> n = number of points Space: O(n) */ class DetectSquares { public: DetectSquares() { } void add(vector<int> po...
ALGO
0.999498
6.273418
{ "github_metadata": { "branch": "main", "commit_count": 9682, "repo_created_at": "2021-01-20T16:10:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6062, "forks": 2417, "issues": 330, "pull_requests": 215 }, "file_meta": { "content_id": ...
1ecff260-11ce-440e-9d58-c78befa22e4c
ltdt-apex/codeforces
question/codeforces/contest/2050/B_Transfusion.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<vector<vector<int>>> vvvi; typedef pair<int, int> pii; typedef vector<pair<int,int>> vii; typedef vector<vector<pair<int,int>>> vvii; typedef vector<tuple<int, int, int>> viii; typedef tuple<int, in...
ALGO
0.999694
4.168171
{ "github_metadata": { "branch": "master", "commit_count": 274, "repo_created_at": "2023-12-27T03:24: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": "1ec5604f...
553d21f5-9fb8-427d-935d-3a7b426d6020
igorjoz/cpp-course
^^ SPOJ, Szkopuł/Plan lekcji - Halinka.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; bool isBeginning = true, isEnd = true; vector<bool> lessons; //vector<bool> lessons(n); for (int i = 0; i < n; i++) { bool temp; cin >> temp; lessons.push_back(temp); } // 'trim' beggining & end free hours while...
ALGO
0.999996
3.912306
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-04-06T21:38:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1e2d94d436...
c577e880-d59b-49b8-b869-0fb01c2db240
theprithwisingh/cpp
5-2DArray/firstLecture/14.cpp
#include <iostream> #include <vector> using namespace std; void transposeMatrix(vector<vector<int>>& matrix, int n) { for (int i = 0; i < n; ++i) { for (int j = i + 1; j < n; ++j) { swap(matrix[i][j], matrix[j][i]); } } } void printMatrix(const vector<vector<int>>& matrix, int n) ...
ALGO
0.999819
5.907341
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2024-03-07T12:55:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "904782539c...
53049577-a63e-4b0d-b899-2a8e6b6f207d
devon-g/robot-kinematics
ros2_ws/src/wx200_control/src/ik_srv/ik.cpp
#include "ik.h" #include "fk.h" #include <iostream> std::array<double, 5> IK::get_next_thetas(std::array<double, 5> current_thetas, std::array<double, 5> goal_pose) { Vector5d new_thetas = Vector5d::Map(current_thetas.begin(), current_thetas.size()); // Max change w...
ALGO
0.999871
5.443913
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2022-03-02T19:16:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d62fa81a...
c34fb8ab-a75d-45af-93a5-dd397b1686ef
hjain5164/Data-Structures-and-Algorithms
Strings/String Key Sort Problem.cpp
// /* Sample Input --------------- 3 92 022 82 12 77 13 2 false numeric Sample Output --------------- 82 12 77 13 92 022 */ #include <bits/stdc++.h> using namespace std; string extractStringAtKey(string str, int key){ char *s = strtok((char *)str.c_str(), " "); while(key > 1){ s = strtok(NULL, " ");...
ALGO
0.999596
4.234406
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2021-07-03T12:49: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": "8c53dca3cab...
964df5ca-ea3c-4616-ab81-6d395cd8f3a8
asinshaik/192210538-C-
happy num.cpp
#include <iostream> #include <unordered_set> using namespace std; int sumOfSquareOfDigits(int num) { int sum = 0; while (num > 0) { int digit = num % 10; sum += digit * digit; num /= 10; } return sum; } bool isHappyNumber(int n) { unordered_set<int> seen; wh...
ALGO
0.999849
4.904266
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-10-06T06:19:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1179b38929c...
70da1fa6-59c9-48dd-aae5-383932be1e3a
MinhDuc-book/leetcode
MiddleLinkedList.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* middleNode(...
ALGO
0.999459
5.900548
{ "github_metadata": { "branch": "Easy", "commit_count": 50, "repo_created_at": "2025-01-04T04:03: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": "c0c146e839d...
fde8cc83-8cd0-4455-bded-ce381f1876f6
MashPlant/undergraduate_projects
面向对象程序设计基础/week9/problem1/v2/OptRouter.cpp
#include "OptRouter.h" const static int X[4] = {1, -1, 0, 0}; const static int Y[4] = {0, 0, 1, -1}; const static int inf = 0x3f3f3f3f; //BaseRouter中的route函数的copy //因为mazeBacktrace不是虚函数,而且BaseRouter不能修改,所以route函数也必须重写一遍 bool OptRouter::route() { if (m_sourceIndex < 0 || m_targetIndex < 0 || m_row <= 0 || m_col <= 0)...
ALGO
0.998847
4.348326
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-05-14T01:07:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 51, "forks": 11, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "9da79786...
eb4ba155-c16f-4e09-a81e-82c5bfdef766
Tushar443/Data_Structure
Exam_Practice/CircularQueue.cpp
#include<iostream> using namespace std; class Queue{ private : int data; int* store; int front; int rear; int n; int size; public: Queue(int size){ data=0; store=new int[size]; front=-1; rear = -1; ...
ALGO
0.998563
3.664981
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2020-05-11T05:07:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e173bdc9e...
f60316bb-4665-42ea-bcb8-37c8db4e7b8e
Roman-Muntian/lab6-2
lab6-2/main.cpp
#include <iostream> #include <cmath> using namespace std; // Абстрактний базовий клас class Figure { public: virtual double perimeter() const = 0; // чисто віртуальна функція virtual ~Figure() {} // віртуальний деструктор }; // Прямокутник class Rectangle : public Figure { private: double width, height; p...
TOOL
0.991629
4.391278
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-29T10:31: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": "63225d638efe...