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
31f672c7-2787-4a99-91b1-a94645c69042
robjinman/dodge_old
Dodge/include/dodge/Quadtree.hpp
/* * Author: <NAME> <<EMAIL>> * Date: 2012 */ #ifndef __QUAD_TREE_HPP__ #define __QUAD_TREE_HPP__ #include <vector> #include <memory> #include "Range.hpp" #include "definitions.hpp" #include "SpatialContainer.hpp" namespace Dodge { template <typename T> class Quadtree : public SpatialContainer<T> { public:...
ALGO
0.970228
6.276208
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2013-03-21T20:46:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe65080f...
9b97dafb-fa1d-4cfc-8bcc-1d5558164d85
itsPrajapat/DSA
Arrays/5.cpp
// Given an array A[ ] of positive integers of size N, where each value represents the number of chocolates in a packet. Each packet can have a variable number of chocolates. There are M students, the task is to distribute chocolate packets among M students such that : // 1. Each student gets exactly one packet. // 2. ...
ALGO
0.999993
3.83804
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-10-08T17:18:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84b6f1745ec...
57ee06e5-4741-4b89-8fd6-26e8b8a3eb25
judithmarg/AlgoritmosAvanzadosContests
algoritmoKMP.cpp
#include <bits/stdc++.h> using namespace std; int main() { string p, t; //patron y texto while(getline(cin, p) && getline(cin, t)){ int m = t.length(); int n = p.length(); int arrayKMP[n]; if(m >= n){ //construccion del array sufijo mas largo como prefijo /*arrayKMP[0] = 0; ar...
ALGO
0.999638
4.172247
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2023-04-04T01:06: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": "233e3b126...
f590e84e-05b3-4e11-a4ab-358faa6fcb4e
kamyu104/LeetCode-Solutions
C++/detect-squares.cpp
// Time: ctor: O(1) // add: O(1) // count: O(n) // Space: O(n) class DetectSquares { public: DetectSquares() { } void add(vector<int> point) { x_to_ys[point[0]].emplace(point[1]); ++point_counts_[point[0]][point[1]]; } int count(vector<int> point...
ALGO
0.999463
6.485637
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
9c728624-1c35-43e1-8b50-ab6c4d2c4936
kzrobin/CodeForce-solution
0099-0100/A_Bicoloring.cpp
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<map> #include<cmath> #include<cstring> #include<queue> #include<stack> #define scll(n) scanf("%lld",&n) #define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); typedef long long ll; using namespace std; void DFS_bicolor(vect...
ALGO
0.999705
3.935117
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-09-11T19:28: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": "2c259b1f01e...
3626ee9e-c541-4be7-8c7d-bb5213e4cc2c
sebastien17/PyFDM
vendors/jsbsim/src/input_output/FGGroundCallback.cpp
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Header: FGGroundCallback.cpp Author: <NAME> Date started: 05/21/04 ------ Copyright (C) 2004 <NAME> (<EMAIL>) ------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU Le...
TOOL
0.956886
6.107264
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2015-03-17T15:37:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11d43caaa...
2e9ddf4c-7ed5-4b70-b7b5-e392bfd9c60b
5JM/AlgorithmNotebook
BarkingDog_cpp/0x0D/example/main.cpp
// #include <bits/stdc++.h> #include <iostream> #include <utility> using namespace std; int n, m, stickers; int r, c; // sticker int board[40][40]; int sticker[10][10]; bool canPost(int x, int y){ for(int i = 0; i < r; ++i){ for(int j = 0; j < c; ++j){ if(board[x + i][y + j] == 1 && sticker[...
ALGO
0.999698
4.667333
{ "github_metadata": { "branch": "main", "commit_count": 247, "repo_created_at": "2024-01-18T09:26: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": "d1c011cf5f...
a777d8d4-cf44-48a0-8d19-62ee9115ffb7
cctbx/cctbx_project
mmtbx/tls/utils.cpp
#include <cmath> //#include <math.h> #include <iostream> #include <iomanip> #include <scitbx/array_family/shared_algebra.h> #include <scitbx/array_family/versa_algebra.h> #include <mmtbx/tls/tls.h> #include <mmtbx/tls/utils.h> // define rint for Windows #if defined(_WIN32) double rint(double x) { //middle value po...
TOOL
0.981665
5.733933
{ "github_metadata": { "branch": "master", "commit_count": 38660, "repo_created_at": "2015-07-22T13:36:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 256, "forks": 121, "issues": 120, "pull_requests": 31 }, "file_meta": { "content_id": "...
f3c92ba8-fd2a-40a4-be39-b07c85e7e412
bdcbqa314159/cpp_non_linear_solvers
non_linear_solvers/src/BrentsMethod.cpp
#include "BrentsMethod.hpp" #include "common.hpp" #include <cassert> #include <cmath> double BrentsMethod(const FunctionC0 &myFunction, double a, double b, double epsilon, size_t maxIterations) { double f_a = myFunction(a); double f_b = myFunction(b); double product = f_a * f_b; assert(pr...
ALGO
0.999976
5.913351
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-03-14T08:31: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": "a540dd5a1cf...
9282177a-6dfe-40d3-a682-924c67cae4b0
Deveshvishwakarma004/DSA_codes
count sort.cpp
// WAP for count sort #include<iostream> using namespace std; void fillarray(int a[],int n); void displayarray(int a[],int n); void countsort(int a[],int n); void swap(int &x, int &y); //pass by refernce int findmax(int a[], int n); int main() { int n; cout<<"Enter the size of array : "<<endl; cin>>n; int a[n]; ...
ALGO
0.999943
5.078412
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-10-13T06:37: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": "723c5b3a55e0...
a89107a4-fdb0-4e8a-a794-7f2d8b39601b
KseniiaVengsar/Symbols
Symbols/Symbols.cpp
// Symbols.cpp : This file contains the 'main' function. Program execution begins and ends there. //Íóæíî ïîñ÷èòàòü, ñêîëüêî ðàç êàæäûé ñèìâîë âñòðå÷àåòñÿ â çàäàííîì òåêñòå, è îòñîðòèðîâàòü ïî óáûâàíèþ ÷àñòîòû. #include <iostream> #include <string> #include <map> #include <cctype> // Для функции tolower #include <loc...
ALGO
0.999623
4.194406
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-20T17:50: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": "80c2f1be853a...
3fec3717-b4b8-403b-b9bc-ec314e29e4d1
initial-mockingbird/SC-2022
Class15/CostoMinimo.h
#pragma once #include <string> #include <vector> #include <tuple> #include <map> #include <set> #include "To_String.h" #include <stdexcept> #include "Graph.h" #include <limits> #include <stack> #include <iostream> #include <queue> #ifndef CostoMinimo_H // include guard #define CostoMinimo_H namespace costoMinimo { ...
ALGO
0.997885
3.901393
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-02-06T04:17: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": "b693ec63dc3...
ce05bec6-dc73-4c2e-9e19-2d650bfa709c
Julia-meets-String-Theory/RootCounter
tst/simple_root_counting_test.cpp
// #################### // (0) Include libraries // #################### #include "include.cpp" // ######################################## // (1) Make simple root counting // ######################################## void test0(const std::string & full_path){ std::vector<std::vector<boost::multiprecision::int128_...
TEST
0.925876
4.358931
{ "github_metadata": { "branch": "master", "commit_count": 373, "repo_created_at": "2023-01-09T09:27:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d19cf2ef2...
2acf103e-cf57-4fd4-953d-b20879130cfb
WnFg/Algorithm
LA4329.cc
#include <iostream> #include <queue> #include <cstring> #include <cstdio> #include <cstdlib> #include <algorithm> #include <map> #include <string> #include <set> #include <cmath> using namespace std; #define LL long long #define max_size 20010 struct arrayTree { int cnt[max_size*5]; int size; inline int f(int x) ...
ALGO
0.999542
3.498532
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2016-02-23T14:09:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25c4abfb4...
edebaa98-3950-421e-a56f-64b32436a104
MichaelZp0/WiFiDirectTests
Windows/SharedWinSock/winsockutils.cpp
#include "pch.h" #include "winsockutils.h" #include <vector> #include <sstream> #include <winsock2.h> #include <ws2tcpip.h> #include <iphlpapi.h> #pragma comment(lib, "iphlpapi.lib") #pragma comment(lib, "ws2_32.lib") #define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x)) #define FREE(x) HeapFree(GetProcessHeap(),...
TOOL
0.906224
5.65404
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2025-03-12T09:06: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": "552765aa8ce...
406720dc-7f04-41fa-a937-af337c820a9b
fescrb/misc-code
src/Math/Plane.cpp
/* This program is free software. It comes without any warranty, to * the extent permitted by applicable law. You can redistribute it * and/or modify it under the terms of the Do What The Fuck You Want * To Public License, Version 2, as published by Sam Hocevar. See * http://sam.zoy.org/wtfpl/COPYING for more detai...
ALGO
0.990996
5.46355
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2012-08-07T14:14: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": "f551c5c96...
de443c87-0c5f-4ab8-a33a-732c09f735c5
Meow-2/LeetCode-Everyday
math/372-超级次方.cpp
// @before-stub-for-debug-begin #include <vector> #include <string> #include <cmath> #include "commoncppproblem372.h" using namespace std; // @before-stub-for-debug-end /* * @lc app=leetcode.cn id=372 lang=cpp * * [372] 超级次方 */ // @lc code=start class Solution { const int base = 1337; int powmod(int a, i...
ALGO
0.999664
5.772375
{ "github_metadata": { "branch": "main", "commit_count": 336, "repo_created_at": "2021-11-19T10:09: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": "a7e559d467...
92b45094-c2f0-4cff-9b79-90358608a5d5
Xilinx/Vitis_Libraries
quantitative_finance/L1/tests/pentadiag_pcr/pentadiag_top.cpp
/* * Copyright 2019 Xilinx, Inc. * * 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...
ALGO
0.988984
4.727972
{ "github_metadata": { "branch": "main", "commit_count": 471, "repo_created_at": "2019-09-23T19:13:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 988, "forks": 381, "issues": 0, "pull_requests": 12 }, "file_meta": { "content_id": "aeb776...
9e7a6f50-bec7-4cd9-a68c-7d25c5871ade
Jeong-Bright/algorithm
boj/tree/1991.cpp
#include <iostream> #include <algorithm> #include <cmath> #define endl '\n' #define io ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr) using namespace std; #define ll long long int rc[50]; int lc[50]; void preorder(int cur) { cout << char(cur+'A'-1); if(lc[cur] != 0) preorder(lc[cur]); if(...
ALGO
0.999926
3.721625
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2024-06-24T08:24:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "795acaf4a8e...
441f017b-d420-49ca-adaa-5095d4dff9ca
RiteshRajMoond/Leetcode
139-word-break/word-break.cpp
class Solution { unordered_set<string> st; vector<vector<int>> dp; bool f(string s, int i, int j) { // base case if(i == s.size() && j == s.size()) return true; if(j == s.size()) return false; if(dp[i][j] != -1) { if(dp[i][j] == 1) return true; return...
ALGO
0.999604
5.655267
{ "github_metadata": { "branch": "main", "commit_count": 1112, "repo_created_at": "2024-09-04T12:26:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1c0715ad...
b1bcdb83-2b5b-4f9d-bf62-f8bbd61b2500
langou/latl
include/bdsqr.h
// // bdsqr.h // Linear Algebra Template Library // // Created by <NAME> on 12/19/14. // Copyright (c) 2014 University of Colorado Denver. All rights reserved. // #ifndef _bdsqr_h #define _bdsqr_h /// @file bdsqr.h Computes singular values and, optionally, the singular vectors of a n-by-n bidiagonal matrix B. #inclu...
ALGO
0.999314
5.786354
{ "github_metadata": { "branch": "master", "commit_count": 369, "repo_created_at": "2013-06-26T18:08:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8fe05208...
943d4b47-b332-41f2-86c9-90300adacd02
joyjeetcoding/codecontributions
Codestudio/search in a rotated sorted array.cpp
int getPivot(vector<int>& arr,int n) { int s = 0; int e = n - 1; int mid = s + (e-s)/2; while(s < e) { if(arr[mid] >= arr[0]) { s = mid + 1; } else { e = mid; } mid = s + (e-s)/2; } return s; } int bsearch(...
ALGO
0.999999
5.713302
{ "github_metadata": { "branch": "master", "commit_count": 203, "repo_created_at": "2022-07-05T14:33: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": "eb726a50...
c95d6ebf-3a8c-46cc-957d-77f6335f79c5
kchung1995/code_test_personal
na_codwpy/10-5_크루스칼 알고리즘.cpp
#include <iostream> #include <vector> using namespace std; //노드의 개수 V, 간선 (union 연산)의 갯수 E //V의 최댓값은 100,000 이라고 가정하겠습니다. #define MAX_V 100001 int v, e; int parent[MAX_V]; vector <pair <int, pair<int, int> > > edges; int result = 0; int findParent(int x) { if (x != parent[x]) parent[x] = findParent(paren...
ALGO
0.999969
4.820308
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2021-01-30T07:20: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": "0193fe0a...
280eae3e-92e7-4c2d-bdb9-7aa3037a4a5e
cxz5309/Coding_Test
C++/acmicpc.net/최대 힙/최대 힙/최대 힙/소스.cpp
#include <cstdio> #include <iostream> #define MAX_SIZE 100001 using namespace std; void swap(int* a, int* b) { int temp = *a; *a = *b; *b = temp; } typedef struct priorityQueue { int heap[MAX_SIZE]; int count; }priorityQueue; void push(priorityQueue* pq, int data) { if (pq->count >= MAX_SIZ...
ALGO
0.999938
4.074644
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2021-04-07T21:56: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": "557b4e4919b...
e6ce97ff-a496-4dd8-83d9-bd294fe759bc
Onaiplee/leetcode_oj
trapping_rain_water.cc
// Given n non-negative integers representing an elevation map where // the width of each bar is 1, compute how much water it is able to // trap after raining. // // For example, // Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6. /** * I spent 3 hours to get the OJ passed... Don't feel frustrated if * spent a longer...
ALGO
0.999989
6.560969
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2012-07-25T06:54:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f431d5e...
74484741-8bb5-42c7-a988-0ebe4f73d69a
tlc-pack/relax
src/relay/quantize/calibrate.cc
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
ALGO
0.997502
6.675576
{ "github_metadata": { "branch": "relax", "commit_count": 10428, "repo_created_at": "2021-06-22T22:05:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 196, "forks": 56, "issues": 43, "pull_requests": 2 }, "file_meta": { "content_id": "aa8e...
cd9689fd-d349-4789-9497-225a6268aa0f
jolars/slopesolvers
src/project_to_OWL_ball.cpp
// // project_to_OWL_ball.cpp // // // Copyright 2015, <NAME> // // This file is part of OWL Ball Toolbox version 1.0. // // The OWL Ball Toolbox 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, ...
ALGO
0.999873
4.865779
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-02-17T10:45:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e66682fc9...
ca54a7dd-b269-46d9-8ef9-196476183fe2
ADJA/PlagiarismDetector
vkcup-2015-wildcard-2-samples-1.1/vkcup-2015-wildcard-2-samples-1.1/04/3535.cpp
#include <algorithm> #include <iostream> #include <cstdlib> #include <iomanip> #include <cstring> #include <vector> #include <cstdio> #include <cmath> #include <map> using namespace std; int n; void setUp(bool *t, int v) { for(int i = n; i >= v; i--) if(t[i-v]) t[i] = true; } vector <int> e[5...
ALGO
0.999896
3.648834
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2015-04-19T12:50:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30a2bfc8...
063e1552-d47e-4a88-97c7-5c2a7d464435
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/05/0528/personal_submission/cf1185e_BlackCat_.cpp
#include<bits/stdc++.h> #define endl '\n' using i64 = long long; using u64 = unsigned long long; using d64 = double; using ld64 = long double; void solve(){ int n,m; std::cin>>n>>m; std::vector<std::string> a(n); std::vector<std::string> b(n); for(int i=0;i<n;i++){ std::cin>>a[i]; f...
ALGO
0.999658
3.944693
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "7d74...
c564f8c0-06b6-46ba-b7e3-b8065235e957
Pierre-Terdiman/PEEL
PEEL/Physics/Ice/APIs/Ice/Meshmerizer/IceConvexHull.h
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains code to compute a convex hull in 3D. * \file IceConvexHull.h * \author <NAME>, original code by <NAM...
ALGO
0.999531
7.295042
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-04-07T13:33:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 163, "forks": 22, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "9fd01b...
7c4d112b-6f98-49b5-a736-608da2718ab3
VincentLau0928/Leetcode
66_PlusOne.cpp
//66. Plus One //Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. // //You may assume the integer do not contain any leading zero, except the number 0 itself. // //The digits are stored such that the most significant digit is at the head of the list. #include <iostream>...
ALGO
0.999316
4.950727
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-03-24T10:27:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "499a48b708...
4cf6c35b-d0a9-48f1-b4ff-a64006d66a07
ishandutta2007/codeforces-a
anta.baka/normal/979/B.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define sz(a) (int)((a).size()) #define all(a) (a).begin(), (a).end() int main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); //freopen("in.txt", "r", stdin); int n; cin >> n; string s; vector<int> c, C; cin >> s; c...
ALGO
0.999804
4.015145
{ "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": "c5c98283b55c...
4dac94a7-731b-40dd-8cfb-1590d4bfdd93
KevinGarciaM/SolucionSumaArreglosParalela_Kevin_Garcia
SolucionSumaArreglosParalela_Kevin_Garcia.cpp
// SolucionSumaArreglosParalela_Kevin_Garcia.cpp : Este archivo contiene la función "main". La ejecución del programa comienza y termina ahí. // #include <iostream> #include <omp.h> #define N 500 //Define el tamaño de los arreglos como 1000 elementos. #define chunk 200 //Establece el tamaño de las "tareas"...
ALGO
0.999385
4.598798
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-01-27T01:22: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": "5e1ff25ccf1e...
9fb77363-53d0-42e8-9d03-2ed8faa76c97
gavinleroy/puzzles
HackerRank/insert_node_at_specific_pos_in_linked_list_HR.cpp
/* * THIS FILE WAS CONTRIBUTED BY THE HACKER RANK PROBLEM * * THE PARTICULAR CHALLENGE WAS TO FINISH THE 'INSERT_NODE_AT_SPECIFIC_POSITION' FUNCTION * * THIS CODE ALONE WON'T COMPILE UNLESS DONE ON THE SPECIFIC HR PROBLEM. * * */ #include <bits/stdc++.h> using namespace std; class SinglyLinkedListNode { p...
ALGO
0.999882
5.038403
{ "github_metadata": { "branch": "master", "commit_count": 494, "repo_created_at": "2019-05-14T02:13:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e0be67b...
9afd266e-63f1-4323-b5b9-e108a3fc1a36
Pushpendra766/maze-solver-lfr
mazereducer.cpp
// Online C++ compiler to run C++ program online #include<bits/stdc++.h> using namespace std; // bool B_exist(string path){ // for(int i=0;i<path.length();i++){ // if(path[i] == 'B'){ // return true; // } // } // return false; // } void reduce_path(string path){ for(int i=0...
ALGO
0.999986
4.570229
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-09-29T18:47: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": "2b6f030945e...
61e199c2-9754-44fb-8ce8-4cf5ce84de3b
seansovine/numerical_projects
cpp_matrix/matrix_lib/operations.hpp
#include "matrix.hpp" #include "vector.hpp" namespace matrix { // Internal helpers namespace internal { template <typename T> inline T prodIK_(const Matrix<T> &lhs, const Matrix<T> &rhs, unsigned i, unsigned k) { T result{}; for (unsigned j = 0; j < lhs.cols; j++) result += lhs(i, j) * rhs(...
ALGO
0.985207
7.145164
{ "github_metadata": { "branch": "master", "commit_count": 211, "repo_created_at": "2023-09-21T11:03: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": "369cec57...
d43b3a9c-3347-4926-8667-5a8c8d0af671
Bayyys/Algorithm
Leetcode/practice/101.symmetric-tree.cpp
/* * @lc app=leetcode.cn id=101 lang=cpp * @lcpr version=30110 * * [101] 对称二叉树 */ // @lcpr-template-start using namespace std; #include <algorithm> #include <array> #include <bitset> #include <climits> #include <deque> #include <functional> #include <iostream> #include <list> #include <queue> #include <stack> #in...
ALGO
0.999985
6.606284
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-03-06T08:58: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": "08f2d94ea8f...
80273465-793a-40ac-b750-ca4088554481
haiku/haiku
src/add-ons/translators/gif/SFHash.cpp
//////////////////////////////////////////////////////////////////////////////// // // File: SFHash.cpp // // Date: December 1999 // // Author: <NAME> // // Copyright 2003 (c) by <NAME>. This file is made publically available // under the BSD license, with the stipulations that this complete header must // remain at th...
ALGO
0.913375
4.688488
{ "github_metadata": { "branch": "master", "commit_count": 67939, "repo_created_at": "2011-06-16T05:35:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2042, "forks": 378, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10...
d9d4e72e-9f26-4c56-be7a-8b07e2ce791b
bushuhui/fastslam
libs/eigen3/doc/snippets/SelfAdjointEigenSolver_SelfAdjointEigenSolver_MatrixType.cpp
MatrixXd X = MatrixXd::Random(5,5); MatrixXd A = X + X.transpose(); cout << "Here is a random symmetric 5x5 matrix, A:" << endl << A << endl << endl; SelfAdjointEigenSolver<MatrixXd> es(A); cout << "The eigenvalues of A are:" << endl << es.eigenvalues() << endl; cout << "The matrix of eigenvectors, V, is:" << endl << ...
ALGO
0.999778
3.63735
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2013-05-26T23:44:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 114, "forks": 39, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "23d835...
5241e35c-57fb-42e9-9acf-ebee638629d9
Mrrsol033/c-plus-plus
chapter05/basicarray.cpp
#include <iostream> using namespace std; void printArray(int array[], int size) { cout << "Lenght is :" << size << endl; for (int i = 0; i < size; i++) { cout << " " << array[i]; } cout << endl; } int main() { system("cls"); int students[5]; cout << " [ Input scores ]" << endl; ...
ALGO
0.969619
3.062984
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-03-30T01:27:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87571ed1bd46...
e64634c6-7dd7-407b-9924-7abb6dcece6b
Litusuwu/Competitive
C_Coins_And_Triangle.cpp
#include <bits/stdc++.h> using namespace std; #define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) #define rep(i,n) for (int i = 0; i < n; ++i) #define REP(i,k,n) for (int i = k; i < n; ++i) #define REPR(i,k,n) for (int i = k; i >= n; --i) #define pb push_back #define fill(x,v) memset(x,v,sizeof(x)) #defin...
ALGO
0.999836
3.088721
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2023-11-12T16:38: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": "e14622fa43...
c68c696d-8d9c-40d0-90af-1c266819552b
vinodpkd/leetcode
0234.cpp
//234. Palindrome Linked List /* Given the head of a singly linked list, return true if it is a palindrome or false otherwise. */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullp...
ALGO
0.998408
5.957877
{ "github_metadata": { "branch": "main", "commit_count": 418, "repo_created_at": "2024-10-04T11:39:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ca2cdcd85...
5b97edf8-8c8c-4c87-9388-cfccb95eea96
NolanHo/HUST-CSE-Crypto
密码课程设计/7.中国剩余定理/china.cpp
#include <iostream> #include <openssl/bn.h> using namespace std; int main() { int n; scanf("%d", &n); char p_str[4096], q_str[4096], e_str[4096]; scanf("%s %s %s", p_str, q_str, e_str); BIGNUM *p = BN_new(), *q = BN_new(), *e = BN_new(), *phi_n = BN_new(); BN_dec2bn(&p, p_str); BN_dec2bn(&...
ALGO
0.999768
4.719053
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2023-06-29T03:19:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7be58522b...
07ebcbc4-43d0-4ca8-b31b-82cc23f8b30d
arrows-1011/CPro
AOJ/Volume01/0181.cpp
#include <bits/stdc++.h> using namespace std; bool c(int x, int M, vector<int> &a) { int N = a.size(); int cnt = 0, sum = 0; for (int i = 0; i < N; ) { if (a[i] > x) return 0; while (i < N && sum < x) { sum += a[i++]; } if (sum > x) { i-...
ALGO
0.999984
4.036758
{ "github_metadata": { "branch": "master", "commit_count": 258, "repo_created_at": "2015-11-18T15:08:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1937ba6...
45382f0f-e262-4c5f-af1d-c390aa1c03af
hs094/CP
AtCoder/AtCoder Beginner Contest 053/B_-_A_to_Z_String.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__) #else #define dbg(...) #endif #define ar array #define ll long long #define ld long double #define sza(x) ((int)x.size()) #define all(a) (a).begin(), (a).end() #define forn(i, n) for (in...
ALGO
0.999722
3.788088
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-09-08T13:44: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": "5e69229902d...
3d896e52-3169-4280-8e37-bfc90753e9d6
ngthanhtrung23/CompetitiveProgramming
codeforces/100030/H.cpp
//#pragma comment(linker, "/STACK:66777216") #include <iomanip> #include <sstream> #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <algorithm> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <string> #include <deque> #inclu...
ALGO
0.999881
3.190807
{ "github_metadata": { "branch": "master", "commit_count": 4554, "repo_created_at": "2019-04-04T14:21:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 90, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09f93...
48e8ba79-66a7-4f6b-9522-e80f4ede5fd7
wjhssfs/myLeetcode
200/228SummaryRanges.hpp
// 228 Summary Ranges // Given a sorted integer array without duplicates, return the summary of its ranges. // For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"]. class Solution { public: vector<string> summaryRanges(vector<int>& nums) { vector<string> r; if(nums.empty()) return r; ...
ALGO
0.999401
6.140027
{ "github_metadata": { "branch": "master", "commit_count": 628, "repo_created_at": "2015-03-15T19:18:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "404a646c...
a94b74cd-b377-4989-8b13-d4da6971f2c6
ykrx/nyu-tandon-bridge
Week8/HW/Coding Questions/yk2562_hw8_q3.cpp
/* * <NAME> * yk2562 * HW8 * Question 3 * * Array manipulations. */ #include <iostream> using namespace std; /* Function Prototypes */ void printArray(int arr[], int arrSize); void reverseArray(int arr[], int arrSize); void removeOdd(int arr[], int& arrSize); void splitParity(int arr[], int arrSize); bool isEv...
ALGO
0.999556
5.677714
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-09-08T02:16:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d68294fb16...
c7b08e2e-a70a-4982-a741-f86bc5d430ea
liuyubobobo/Play-Leetcode
1001-1500/1147-Longest-Chunked-Palindrome-Decomposition/cpp-1147/main4.cpp
/// Source : https://leetcode.com/problems/longest-chunked-palindrome-decomposition/ /// Author : liuyubobobo /// Time : 2019-08-04 #include <iostream> #include <vector> using namespace std; /// Greedy - Iterative Implementation /// Time Complexity: O(n^2) /// Space Complexity: O(n) class Solution { public: ...
ALGO
0.999956
5.087525
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "15...
94844c8a-d622-49c9-a23c-461247618d2d
shariarf39/Code-Forces
contest2049/pD.cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1e9; int main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while (t--) { int n, m, k; cin >> n >> m >> k; vector<vector<int>> grid(n, vector<int>(m)); for (int i = 0; i < n; ++i) { ...
ALGO
0.999958
4.778513
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-12-12T14:05:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40d37b7cba75...
65c55fd8-4229-4f08-8e9e-0a24da8d2877
paramkansagra/CPP-codes
DSA/Graphs/GraphCycleDetectionDirectedGraphDFS.cpp
#include <bits/stdc++.h> using namespace std; void inputPairs(vector<pair<int,int>>& pairs,int n){ for(int i=0;i<n;i++){ int u,v; cin>>u>>v; pairs.push_back(make_pair(u,v)); } } void makeAdjList(unordered_map<int,set<int>>& adjList,vector<pair<int,int>> pairs){ for(auto i:pairs){...
ALGO
0.999914
3.982856
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2022-02-06T05:02: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": "2b7f51a1a...
572c15e5-7584-4458-a60b-4ab1f3f56e00
rutuja-patil923/Data-Structures-and-Algorithms
Searching and Sorting/upperBound_lowerBound.cpp
// lower_bound and upper_bound are two STL functions in C++ library // lower_bound : i) if no. exists in array it will return first occurrence of element // ii) if no. not exists in array it will return next immediate greater element index // upper_bound : i) if no. exists in array it will return index of...
ALGO
0.999886
5.127207
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2021-03-02T05:52:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a6a8190c...
5b8b7b3a-5edd-4eab-81b6-d097999d71d8
kyle-pish/CS128-Lab10
.ccls-cache/@home@runner@Lab-Template/linked_list.cpp
// Original Author: <NAME> // #include <iostream> #include <string> #include "linked_list.h" // Create a new linked list. LinkedList::LinkedList() { // Initialize the head pointer to null, to indicate 0 nodes. this->head_ = 0; } LinkedList::~LinkedList() { // If there is a head node, delete it. // Recursive ...
TOOL
0.95748
5.514308
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-03-14T15:49: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": "cad2edd9b462...
2b917d47-d65f-40fd-90db-998a80809ee6
weiii8708271688/UVA
UVA/11960/28881315_AC_540ms_0kB.cpp
#include <iostream> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <iomanip> using namespace std; vector <int> prime; bool check[1000] = {0,0,1,1}; void primetry() { for(int i = 3 ; i < 1000 ; i+=2) { check[i] = true; } for(int i = 3 ; i < 1000 ; i+=2) { ...
ALGO
0.999944
4.06386
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-10-19T12:29:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e576b500b...
cb05a99e-4832-4f29-b169-01d537d5ea3b
DudeDope/BStat-Projects
Sequential Testing/Bacltracking_Algorithm.cpp
#include <bits/stdc++.h> using namespace std; map<vector<int>, double> memMap; double gain(int x, int y, int C, int V, int N) { vector<int> key {x,y,C,N}; if (memMap.find(key) != memMap.end()) return memMap[key]; if (x >= C || y > N - C) return memMap[key] = 0; double p = static_cast...
ALGO
0.998884
4.442142
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-03-05T09:14:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a364b403e7c...
6b71dd7b-0643-42df-b889-2404c3da900d
l0stplains/my-kattis-solutions
problems/downtime/downtime.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define el "\n" #define F first #define S second #define pb push_back #define mp make_pair #define fast cin.sync_with_stdio(0); cin.tie(0); const int INF = numeric_limits<int>::max(); void solve() { int n,k; cin >> n >> k; int arr[1100...
ALGO
0.999661
3.764511
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-06-11T11:51: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": "67a982d4ef2...
8aaaec4b-5632-48eb-9d54-8669a2873f57
ShoLee01/Arboles-binarios-en-C
Funcion.h
#pragma once #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; template< class T > class Nodo { public: Nodo* der; Nodo* izq; int ID; int altura; string Nombre; Nodo(){ der = nullptr; izq = nullptr; altura = 0; } }; template<class T> class Arbol { private: v...
ALGO
0.999506
3.79629
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-10-27T16:00:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb5735f090...
75076349-8bea-4965-a946-275437930814
KeiShimon/AtCoder-C-
ABC036/D.cpp
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <numeric> #include <queue> #include <sstream> #include <string> #include <string.h> #include <tuple> #include <vector> #define REP(i,x) for(int i{ 0 }; i < (int)(x); i++) #define REPC(i,x) for(int i{ 0 }; i <= (int)(x); i++) #define RR...
ALGO
0.999827
4.106688
{ "github_metadata": { "branch": "master", "commit_count": 259, "repo_created_at": "2019-03-06T05:55:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "213ab69a...
736d16e2-69b6-4b5e-90ef-c87235c1168e
osak/POJ
1538.cc
//Name: Extrapolation Using a Difference Table //Level: 2 //Category: やるだけ //Note: /* * 最初にテーブルを作る. * 列の追加は,一番下の列だけを覚えておけばできる. */ #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); while(true) { i...
ALGO
0.999898
4.417321
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2011-11-28T13:53:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fdc7d4a...
89cf39ee-9d6c-4ea5-bacc-94503c837077
guidop/Repo
MatrixMultiplication/matrixmult.cpp
////////////////////////////////////////////////////////////////////////////// //// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF //// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO //// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A //// PARTICULAR PURPOSE. ////...
ALGO
0.954469
6.132859
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2013-08-05T16:04:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47c3b4c6...
69a020c2-6f35-40ab-8ce2-d634a81d0194
CrkJohn/CompetitiveProgramming
UVa/C++/10614.cpp
#include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forn(i, n) for (int i = 0; i < (int)(n); ++i) #define for1(i, n) for (int i = 1; i <= (int)(n); ++i) #define...
ALGO
0.99807
3.640644
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2018-04-01T17:17: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": "5cf85de8...
b9b96258-aae0-4c20-8589-4d9ba80603e0
pontsuyo/procon
atcoder/abc/181d.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, l, r) for (int i = l; i <= (int)(r); i++) #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) #define all(v) v.begin(), v.end() #define MOD (...
ALGO
0.999844
3.377797
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2019-03-12T14:53: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": "f4f60e90...
5555a241-fccb-4480-9515-cc69f518163b
voy49er/voyager
src/assignment.cpp
#include "core.hpp" static void BuildAlpha(SwitchGraph &sg, SwitchGraphAlpha &alpha, TargetsSet &tss); static void BuildBeta(SwitchGraph &sg, SwitchGraphBeta &beta, TargetsSet &tss); static void BuildMatrix(SwitchGraph &sg, SwitchGraphMatrix &matrix, TargetsSet &tss, unordered_map<int, int> &s_root); void QuickAssign...
ALGO
0.953494
4.481738
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-04-19T12:39:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "148a49e623ee...
7a1c596e-0146-4314-89c0-fa580c784a70
truongduy134/uva-online-judge-solutions
Volume_6/UVA670.cpp
#include <cstdio> #include <vector> #include <cmath> using namespace std; class Point { private: int _xCoord, _yCoord; public: Point() : _xCoord(0), _yCoord(0) { } Point(int xCoord, int yCoord) : _xCoord(xCoord), _yCoord(yCoord) { } Point(const Point & another) : _xCoord(another._xCoord), _yCoord(another._yCoord)...
ALGO
0.999929
4.07614
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2013-05-09T16:23:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9f086c...
f0530be4-38d4-4fd6-8f92-f20668f7f591
ishandutta2007/codeforces-m
maxplus/normal/1515/A.cpp
#include <algorithm> #include <iostream> using namespace std; int main() { cin.tie(0), ios::sync_with_stdio(0); int t, n, w; cin >> t; while (t--) { cin >> n >> w; int a[n], b[n]; for (int i = 0; i < n; ++i) { cin >> a[i]; } sort(a, a + n); int s = 0, ok = 1; for (int i = 0; ...
ALGO
0.999925
3.657246
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d0686a057b4...
eafb25d6-3c74-4ef8-a3f1-9782df3dabcc
Ingenious-c0der/University_Assignments
LP-1/SynchronizationProblems/readerWriters.cpp
#include<mutex> #include<thread> #include<iostream> std::mutex printer_mutex ; bool is_printing = false; // condition variable for exclusive printing void wait_print() { while(is_printing) { std::this_thread::sleep_for(std::chrono::milliseconds(1)); } } void printLine(std::string line ){ i...
TOOL
0.976434
5.670277
{ "github_metadata": { "branch": "main", "commit_count": 263, "repo_created_at": "2021-09-09T12:45:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08495e0170...
42e4c606-2a24-4e22-8b5e-861986b40e5c
m-skolnick/CSC4400_GroupProject_Skol_Ochs
CSC4400_GroupProject_Skol_Ochs/Main.cpp
//************************************ PROGRAM IDENTIFICATION *************************************** //* * //* PROGRAM FILE NAME: Main.cpp ASSIGNMENT #: 2 Grade: _________ * //* ...
ALGO
0.941665
3.576098
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2017-04-12T04:26:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81d44bd95...
2492c471-b996-401f-af44-4b29747a131e
antran22/cp-code
Previous/nearest/nearest.cpp
//code.cpp #include <bits/stdc++.h> using namespace std; #define whole(x) x.begin(),x.end() #define sz(x) ((int)x.size()) #define sqr(x) ((x)*(x)) #define pb push_back #define mp make_pair #define ins insert #define _(a) #a << " : " << (a) typedef long long ll; typedef unsigned long long ull; typedef long double ld; ty...
ALGO
0.999987
4.59902
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2017-11-13T04:30: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": "6d27c4832...
0f737c69-96fa-4e83-b25e-e6020d695cc3
ywwynm/AlgorithmPractice
AlgorithmPractice/leetcode23_TODO_merge_k_sorted_lists.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode * mergeKLists(vector<ListNode*>& lists) { ListNode* head = new ListNode(0); ListNode* cur = head; whi...
ALGO
0.99989
5.775426
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2018-02-28T06:27:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02c4d305...
411e0879-b349-4aaa-87d9-9800c07a72e9
Shreyankthehacker/JustGIt
practice/nqueen/nqueen.cpp
#include "nqueen.h" using namespace std; NQueenSolver::NQueenSolver(int N) { this->N = N; } bool NQueenSolver::isSafe(int row, int col, vector<string>& board) { for (int i = 0; i < row; ++i) { if (board[i][col] == 'Q') return false; if (col - (row - i) >= 0 && board[i][col - (row - i)] == 'Q'...
ALGO
0.999672
4.782246
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2025-03-11T04:59: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": "61793cfde3...
814bf7e1-155f-439b-9ae4-ecd245395238
matsuoka-601/compro_library
DataStructure/LazyPropagationSegmentTree.hpp
#pragma once #include <vector> template <class F, class T, class Func_mf, class Func_op, class Func_mv> class LazyPropagationSegmentTree { int n_org, n; Func_mf merge_function; Func_op operate; Func_mv merge_values; F fe; T te; std::vector<T> dat; std::vector<F> lazy; void eval(int ...
ALGO
0.99923
6.399657
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2021-08-21T05:01:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1727adf6297...
e174f87a-a904-452e-a3cb-58e6fc6e94c9
ks0727/AtCoder-Archive
ABC/351-400/363/e.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;++i) using P = pair<int,int>; const int di[] = {0,1,0,-1}; const int dj[] = {1,0,-1,0}; int main(){ int h,w,y; cin >> h >> w >> y; vector<vector<int> > a(h,vector<int>(w)); vector<vector<P> > fs(y); rep(i,h)rep(j,w){ ...
ALGO
0.999878
3.635587
{ "github_metadata": { "branch": "main", "commit_count": 324, "repo_created_at": "2023-11-02T02:23: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": "9e43b7ef9a...
61a3b11b-3d71-4213-bcbb-5b316dd13939
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/10/1014/personal_submission/cf257c_xylu.cpp
#include <bits/stdc++.h> using namespace std; int __FAST_IO__ = []() { std::ios::sync_with_stdio(0); std::cin.tie(0); return 0; }(); const double pi = acos(-1); void solveC() { int n, x, y; cin >> n; vector<double> pos(n); for (int i = 0; i < n; i++) { cin >> x >> y; pos[i]...
ALGO
0.999843
5.042133
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "c19f...
cea9d82b-e797-44f4-9809-4b18d1d0a69e
Tangjiahui26/CrackingCode
BitManipulation/FlipBitToWin/main.cpp
#include <iostream> #include <algorithm> using namespace std; int flipOneBit(int num){ if (~num == 0) { return sizeof(num) * 8; } int currentLength = 0; int previousLength = 0; int maxLength = 1; while (num != 0) { if ((num & 1) == 1) { currentLength++; } ...
ALGO
0.99932
5.315415
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2019-04-26T06: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": "878fd5fd...
871aa20d-5017-44f8-a35f-3a2c07ce9515
ZYBaisichen/Algorithm-bsc
基础知识/动态规划/样本对应尝试模型/最长公共子序列.cpp
/* * @Author: baisichen * @Date: 2024-02-26 15:02:38 * @LastEditTime: 2024-07-10 00:07:04 * @LastEditors: baisichen <EMAIL> * @Description: */ #include <iostream> #include <stack> #include <vector> #include <string> #include <set> #include <ctime> #include <cstdlib> #include <map> #include <limits.h> using names...
ALGO
0.999857
5.584795
{ "github_metadata": { "branch": "main", "commit_count": 192, "repo_created_at": "2023-10-17T04:03:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38505d4867...
b121b83a-5d42-470b-900c-72d9a5596f4d
georgerapeanu/c-sources
lot2019/day1/zombies/zombies.cpp
#include <bits/stdc++.h> using namespace std; const int inf = 1e6; struct Zombie { int sx,sy,v; string moves; }; struct Plant { int lx,ly; char dir; }; map<int,int> to_norm_x,to_norm_y; vector<int> inv_norm_x = {0}; vector<int> inv_norm_y = {0}; struct MyZombie : Zombie { int stx,drx; int ...
ALGO
0.999985
3.887326
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2018-08-15T14:37:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2656e565...
5140aa85-fc45-4513-a1d5-4834932297f5
archester/cpp
algo_sort.cpp
#include <array> #include <iostream> using namespace std; using ArrayInt = array<int,10>; void printArray(const ArrayInt& a) { for (const auto& i: a) { cout << i << " "; } cout << "\n"; } void insertionSort(ArrayInt& a) { for (size_t i=0; i<a.size(); ++i) { auto x = a[i]; aut...
ALGO
0.999715
5.546838
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-12-30T20:47: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": "f3dbe6923b...
bd01fa0a-fe8f-42a6-aaed-a12acf835cfd
mejibyte/competitive_programming
Interview Street/CodeSprint RocketFuel/RoulettePredictor/roulette.cpp
// <NAME> using namespace std; #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <sstream> #include <fstream> #include <cassert> #include <climits> #include <cstdlib> #include <cstring> #include <bitset> #include <string> #include <cstdio> #include <vector> #include <cmath> #inclu...
ALGO
0.999944
3.550069
{ "github_metadata": { "branch": "master", "commit_count": 355, "repo_created_at": "2011-10-27T01:25:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 196, "forks": 66, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "6c611...
9acdd255-c25d-4f88-a5e0-b0d190d2f615
PrithMDP/cplusplus
ATT-iv/AT&T Interview/main.cpp
// // main.cpp // AT&T Interview // // Created by <NAME> on 6/30/15. // Copyright (c) 2015 <NAME>. All rights reserved. // #include <iostream> #include <vector> using namespace std; void oddprinter(); int fib(int n); void pingpong(); void palindromechecker( char arr[], int size); int main(int argc, const char * a...
ALGO
0.998095
3.301877
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2015-09-26T02:13: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": "d2bc46717...
e59d8fea-9c7d-47fe-b278-e65991498ac7
Hifzu04/DSA_Practice_2.0
recursion/sayDigits.cpp
/*input : 125 output : one two five*/ #include<iostream> #include<string> #include<stack> using namespace std; //simple approach /*int main(){ string arr[10] = { "zero" , "one" , "two" , "three" , "four" , "five" , "six" , "seven" , "eight" , "nine" }; int digit; stack <string>mystack; cin>>dig...
ALGO
0.9997
4.678588
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2024-01-08T12:44: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": "fdf079cc1...
eba4755d-86b6-4aa5-9738-e63b2005515b
belsouza/backupexercises
antigos/teste_teorema_pitagoras.cpp
/* Determine e informe as raízes da equação a.x2 + b.x + c = 0, sendo a, b e c fornecidos pelo usuário. */ #include <stdio.h> #include <math.h> void baskhara ( float a, float b, float c ){ double delta, x1, x2; delta = (b * b) - 4 * a * c; if (delta >= 0){ x1 = (- b + (sqrt(delta)))/ 2*a; x2 = (- b - (sq...
ALGO
0.995844
3.616869
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-08-30T00:50: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": "1e332f88fe...
6273832a-0605-446d-9c38-885aaffcd48f
PX4/PX4-Autopilot
src/modules/fw_mode_manager/figure_eight/FigureEight.hpp
/**************************************************************************** * * Copyright (c) 2025 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistri...
ALGO
0.978867
6.912784
{ "github_metadata": { "branch": "main", "commit_count": 47555, "repo_created_at": "2012-08-04T21:19:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9767, "forks": 14212, "issues": 1547, "pull_requests": 574 }, "file_meta": { "content_id"...
7dc877f9-5a7d-46bc-9b3c-1d3495648b7b
AlexWei061/cpp
practice/SeniorHigh1/semester1/November2021/20211118test/solution/milk.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF=1000000000000005; const ll maxn=5e5+5; const int mod=998244353; ll n,m; int deep[maxn];//树的深度 int f[maxn][30];//fa[i][j] 节点i的2^j次方的祖先 struct node{ int e,next; }edge[maxn]; ll cnt=0; int head[maxn]; int dis[maxn]; char str[maxn]; v...
ALGO
0.999979
3.957908
{ "github_metadata": { "branch": "master", "commit_count": 499, "repo_created_at": "2019-10-21T06:10:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a67a651...
702b10d9-9813-458e-8040-8bbf7397b7a2
ljs9904ljs/Junseok
C_C++_Projects/CPP_files/search/binary_search.cpp
#include<iostream> #include<cstdlib> #include<ctime> int arr2[10000]; int binarySearch(int arr[], int left, int right, int x) { if (right >= 1) { int mid = (left + right - 1) / 2; if(arr[mid] == x) return mid; if(arr[mid] > x) return binarySearch(arr, lef...
ALGO
0.999914
3.832657
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2019-12-27T10:12:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b0914220...
a61e8c3f-821c-4169-bd9f-2df17a66a92e
leskofil/fit_ctu
PA2/semestral/src/CTextFilter.cpp
// // Created by filip on 6/17/21. // #include "CTextFilter.h" using namespace std; CTextFilter::CTextFilter() : CFilter() {} std::map <std::string, std::shared_ptr<CNote>> CTextFilter::Find(const std::map <std::string, std::shared_ptr<CNote>> &notes) const { map <string, shared_ptr<CNote>> textNotes; stri...
TOOL
0.910461
5.479233
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-05-25T13:34: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": "1f8f86626a5c...
3862f383-21d6-4f09-a37b-506fd7432dcc
nick24github/CPP_DSA
coding_Question/ques3.cpp
/*You have given an integer number N determine the number of bricks needed to make a house of bricks of N level. Input: 1 Output: 2 Input: 3 Output: 15 */ /*---This is a builtin function using */ // #include<iostream> // #include <cmath> // using namespace std; // int bricks_needed(int N) { // if (N < 1)...
ALGO
0.999871
4.719953
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-24T10:19: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": "ceb9aff1a5b0...
1f29ed3f-fe3d-44da-9e99-b27b4048e159
nguyenhoang4875/CompetitiveProgramming
codeforces/set_1300/E_DivisorChain_U.cpp
#include <bits/stdc++.h> #define int long long using namespace std; /** * Problem: https://codeforces.com/gym/482326/problem/E * Solution: find max n that 2^n <= x then spit two parts * - part 1: 1 -> 2^n * - part 2: 2^n + 1 -> x * * TC: O(log n) * MC: O(n) * */ #define pb push_back #define all(x) x.begin...
ALGO
0.999668
4.6968
{ "github_metadata": { "branch": "main", "commit_count": 328, "repo_created_at": "2023-02-28T01:38:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2eb19182b3...
789536ac-9b8e-4e1e-bbb6-cb003be856d9
Azura-yuwi/Code
AtCoder/EducationalDPContest/Subtree.cpp
//DP on Trees all roots #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define f first #define s second int n; ll m; vector<int> adj[100005]; ll dp[100005]; //ways to color subtree if i was colored black ll rt[100005]; void dfs(int at, int p) { dp[at]...
ALGO
0.999982
4.391806
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2021-05-02T04:12: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": "82830393dbf...
f1474466-786c-42fb-966d-e0e5914136c7
CEDT-Ovenbreak/problem-2025
C-loop/C07-croissaria-number/solution.cpp
#include <iostream> #include <string> #include <cmath> using namespace std; typedef long long ll; ll power(ll a, ll x) { ll res = 1; for (int i = 0; i < x; i++) res *= a; return res; } ll count(ll x) { ll ans = 0; string num = to_string(x); for (int i = 1; i < num.length(); i++) { ...
ALGO
0.999578
4.709462
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-07-07T10:32:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1eedabfd104...
6fafc105-7f76-4469-8362-2cfa5410fbe2
Allex-Lin/Data-Structures-Based-on-C-
数据结构/MyStudyAboutC/MyStudyAboutC/图的基本术语以及邻接矩阵创建图.cpp
#include<iostream> #define MaxInt 32767//表示极大值 即无穷大 #define MVNum 100//图中最大顶点数 using namespace std; /* 图:G=(V,E) V:顶点的有穷非空集合 E:边的有穷集合 无向图:每条边都是无方向的 有向图:每条边都是有方向的 完全图:任意两个顶点之间都有边 稀疏图:有很少边或弧 网:边或弧带权值的图 顶点的度:与该顶点相关联的边的数目 连通图:任意两个顶点之间都有路径 强连通图:有向图任意两个顶点之间都有路径 无向图的极大连通子图称为连通分量 有向图的邻接矩阵可能是不对称的 顶点的出度=第i行元素之和 顶点的入度=第i列的元素和 *...
ALGO
0.999326
3.678408
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-04-22T11:47: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": "67e685971715...
df43aa66-05d5-4786-b962-ad5da0de6c71
cjkjackee/CPE
pass_year/2015_08.cpp
#include <iostream> #include<cstring> using namespace std; int maxi = 5000; int *arr; void display(int arr[]){ int ctr = 0; for (int i=0; i<maxi; i++){ if (!ctr && arr[i]) ctr = 1; if(ctr) std::cout<<arr[i]; } cout<<endl; } void climbingstairs(long long int n)...
ALGO
0.999913
3.341558
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2017-08-07T14:16: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": "ed5a41451...
b71b8a70-4d80-4b4d-a196-07d7cd74da3b
OpenHUTB/hutb
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/V2X/PathLossModel.h
// Copyright (c) 2024 Institut fuer Technik der Informationsverarbeitung (ITIV) at the // Karlsruhe Institute of Technology // // This work is licensed under the terms of the MIT license. // For a copy, see <https://opensource.org/licenses/MIT>. #pragma once #include <vector> using ActorPowerMap = std::map<AActor *...
ALGO
0.960113
7.542768
{ "github_metadata": { "branch": "hutb", "commit_count": 6448, "repo_created_at": "2024-05-05T13:22:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 207, "forks": 371, "issues": 58, "pull_requests": 0 }, "file_meta": { "content_id": "346fe...
9d00faaf-31c4-4b36-a886-26060441e76b
riteme/test
oi/algs/Data-Structure/AST/Equation/Equation.cpp
#include <cctype> #include <cstdlib> #include <cstdio> #include <string> #include <list> using namespace std; #define NULL_CHAR '\0' #define EQUATION_SIZE 512 // 表示单项式 struct Element { Element():Const(1),Unknown(NULL_CHAR) {} Element(int c,char u):Const(c),Unknown(u) {} int Const; // 单项式的系数 char Unknown; // 未...
ALGO
0.999778
3.641513
{ "github_metadata": { "branch": "master", "commit_count": 550, "repo_created_at": "2015-04-26T07:16:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "5d2efd6b...
30e0e59d-4da1-4185-8338-9ed3e394e5d5
0xpranay/Algorithms
learn/inversion.cpp
#include<bits/stdc++.h> using namespace std; int merge(vector<int>& arr, int left, int right) { int count = 0; int mid = left + (right - left) / 2; int lsize = mid - left + 1; int rsize = right - mid; vector<int> left_array(lsize, 0); vector<int> right_array(rsize, 0); for(int i = 0;i < lsiz...
ALGO
0.999902
4.562287
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-11-20T13:14:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e780bdb5d0...
c5a36db6-1cde-4d6f-9e13-6b993d8844f1
daoyang33/Large-Scale-Localization-System
functions2.cpp
#include"functions2.h" functions2::functions2() {}; vector<vector<Point2f>> functions2::img_lines(vector<Point2f> image_points) { vector<Point2f> image_points2(image_points); vector<vector<Point2f>> s; vector<int> delete_index; // 根据共线点数量筛除错误检测 vector<Point2f> Intersect; ...
ALGO
0.990683
3.446516
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-03-28T12:53: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": "fcf254f990ef...
bde84b46-b9b1-4231-99c4-d6c560b988fc
Suman-Jaiswal/DSA
20. DP/subset_sum_dp.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define loop(itr, start, end) for (int itr = start; itr < end; itr++) #define v1(name, type) vector<type> name #define v2(name, type, size) vector<type> name(size) #define v3(name, type, size, fill) vector<type> name(size, fill) #define mat1(name, t...
ALGO
0.999779
4.497451
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-05-23T04:35: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": "034067a5787...
a8925445-5959-4452-a577-bb824c0139f9
lnxhigh/Baekjoon
백준/Silver/1421. 나무꾼 이다솜/나무꾼 이다솜.cc
#include <bits/stdc++.h> using namespace std; using ll = long long; ll N, C, W; const int MAX = 1 << 6; ll A[MAX]; ll solve(ll len) { if (C >= W * len) { ll res = 0; for (int i = 0; i < N; i++) { if (A[i] % len != 0) continue; ll tmp = 0; ll cnt = A[i] / len; ...
ALGO
0.999989
4.615992
{ "github_metadata": { "branch": "main", "commit_count": 1355, "repo_created_at": "2023-11-23T13:44: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": "e73d0ba04...
aa2bd6a7-c6b7-4633-9c99-87f8d0c387c5
KeepCoding365days/DataStructure_Course_Fall2022
Huffman's code/tree_node.cpp
#include "Node.cpp" #include <vector> class Tree{ Node* root; void print(Node* ptr) {//------ if (ptr != nullptr) { ptr->Print(); //if(ptr->left!=nullptr) print(ptr->left); //if(ptr->right!=nullptr) print(ptr->right); } } public: Tree() { root = nullptr; } Tree(Node* ptr) { root = pt...
ALGO
0.999788
3.531179
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-01-03T22:58: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": "78766a331261...
4a004222-669b-482f-8c5c-12fa825a8e61
surpise/Problem-Solving
백준/Silver/14940. 쉬운 최단거리/쉬운 최단거리.cc
#include <iostream> #include <queue> using namespace std; int n, m; int arr[1000][1000]; int d[2][4] = {{-1, 1, 0, 0}, {0, 0, -1, 1}}; bool v[1000][1000]; queue<pair<int, int>> q; void bfs(){ int r, c, _r, _c; while(!q.empty()){ r = q.front().first, c = q.front().second; v[r][c] = 1; ...
ALGO
0.99965
3.86115
{ "github_metadata": { "branch": "main", "commit_count": 592, "repo_created_at": "2023-03-12T07:11: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": "731350299c...
20decfa5-4364-4d61-8b24-075272101faf
CERN-PH-CMG/cmg-cmssw
TrackingTools/KalmanUpdators/src/KFUpdator.cc
#include "TrackingTools/KalmanUpdators/interface/KFUpdator.h" #include "TrackingTools/PatternTools/interface/MeasurementExtractor.h" #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h" #include "DataFormats/GeometrySurface/interface/Plane.h" #include "DataFormats/TrackingRecHit/interfac...
ALGO
0.993516
6.517787
{ "github_metadata": { "branch": "heppy_94X_dev", "commit_count": 185721, "repo_created_at": "2013-09-25T08:23:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 19, "forks": 242, "issues": 16, "pull_requests": 1 }, "file_meta": { "content_i...