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
c626f2cb-b3b5-4d52-9a09-a8aec9414725
dtlavendar/DStructuresNAlgos
ec.cpp
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; typedef int64_t ll; struct lz_segtree { ll cur; ll lazy_update; struct lz_segtree* lchild; struct lz_segtree* rchild; int leftmost, rightmost; lz_segtree(int l, int r, vector<int64_t> &sps) { leftmost = l; ...
ALGO
0.999852
5.089496
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2020-12-05T03:19: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": "f58e2a835b7...
542c0e32-c681-4eeb-939b-4b48693f9ad7
informationengineering/Learn
資結(1)/q2.cpp
#include <iostream> #include <string> using namespace std; int main(){ int x; int longest = 0; cout << "how much names: "<< endl; cin >> x; cin.ignore(); string *arr = new string[x]; for(int i = 0; i < x; i++){ getline(cin, arr[i]); } int *num = new int[x]; for(int i = 0; i < x; i++){ for(int j = ...
ALGO
0.999612
3.787723
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-09-15T17:23: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": "9c3bbc6d3bb...
c9d23bf6-30de-43d3-b1ef-4c05abfa008b
martijnws/Compiler
Grammar/First.cpp
#include "First.h" #include <iostream> namespace mws { namespace grammar { inline std::ostream& operator << (std::ostream& os_, const std::set<TokenID>& set_) { for (auto i : set_) { os_ << (int)i << " "; } return os_; } void first(grammar::Grammar& grammar_, GSID ntt_, std::vector<bool>& isFirstComputed_) { ...
ALGO
0.963912
4.432333
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2018-01-05T10:57: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": "7638aca0c...
a3d461d9-4c41-4f76-a294-13cc5fe80958
dktkr1118/hello_world
2022-11-15/2022-11-15/SW-12051.cpp
//#include <iostream> //#include <cmath> //using namespace std; //int main() //{ // int TC; // long long int N; // int PerD; // 오늘 이긴 판의 퍼센트 // int PerG; // 오늘까지 이긴 판의 퍼센트 // cin >> TC; // for (int i = 1; i <= TC; i++) // { // bool flag = false; // cin >> N >> PerD >> PerG; // if ((PerG == 100 && PerD != 100) || (Pe...
ALGO
0.985413
3.619662
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2021-06-14T15:09: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": "3f803365916...
2b9fe408-4e57-4f3b-9a27-0b15d260ab0a
kiruba-r11/LeetCode-Solutions
1870-minimum-speed-to-arrive-on-time/1870-minimum-speed-to-arrive-on-time.cpp
class Solution { public: bool condition(vector <int> &dist , double hour , int speed) { int n = dist.size(); double time = 0; for(int i = 0; i < n; i++) { if(i == n - 1) time += ((double)dist[i]) / speed; else time += ceil((double)dist[i] / speed); } ...
ALGO
0.999984
5.232306
{ "github_metadata": { "branch": "main", "commit_count": 3218, "repo_created_at": "2022-01-26T12:07:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2af882686...
16444cf0-b220-4a09-8d68-2591af502264
xiyuanyang-code/Data-Structure-Awesome
Class_implementation/Queue.cpp
/* * @Author: <NAME> <EMAIL> * @Date: 2025-01-22 15:06:31 * @LastEditors: <NAME> <EMAIL> * @LastEditTime: 2025-04-10 13:18:37 * @FilePath: /Data_structure/Class_implementation/Queue.cpp * @Description: * Do you code and make progress today? * Copyright (c) 2025 by <NAME>, All Rights Reserved. */ /* This ...
ALGO
0.980457
5.569535
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2025-01-22T09:19:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9eac11946...
def228dd-ea81-4913-9a28-b71a55acd893
nikhilbarthwal/Samples
Cpp/openmp.cpp
// g++ openmp.cpp -fopenmp -o openmp.exe #include <iostream> #include <ctime> #ifdef _OPENMP #include "omp.h" #endif using namespace std; // double Calc() // void Calc(int a, int& b) int Calc(int a) { const int N = 1000000000; static double A[N]; for ( int i = 0, sign = 1; i < N; i++, sign = -sign ) { ...
ALGO
0.999602
3.572694
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2025-02-14T04:41: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": "519b6407ee...
2c560c30-fc51-4ee2-ab14-9270a4ec0d67
EEngblo/18F_CS202
2주차/2/Main.cpp
#include <iostream> #include <algorithm> #include <utility> #include <vector> #include <deque> #include <queue> #include <map> #include <functional> #include <set> #include <string> using namespace std; int main() { queue<int> que; // 관심 대상 map<int, int> apples; // 최소값 찾기 위한 map; 1번 문제 응용 map<int, int>::i...
ALGO
0.999984
3.316944
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2018-09-09T12:00: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": "3e797ee24...
943a5766-3dfa-4f03-be6f-40fe3da79f0a
clMathLibraries/clFFT
src/cuFFT-client/cuFFT-client.cpp
// ######################################################################## // Copyright 2015 Advanced Micro Devices, 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://w...
ALGO
0.931412
5.172453
{ "github_metadata": { "branch": "master", "commit_count": 498, "repo_created_at": "2013-08-13T15:07:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 637, "forks": 194, "issues": 37, "pull_requests": 5 }, "file_meta": { "content_id": "08dc...
422af39e-7d75-4758-affd-8990dd32adfd
K4R70FF3L/simple-wires
src/state_init.cpp
#include "constants.h" #include "led.h" #include "rule.h" #include <Arduino.h> bool ruleApplies(Rule rule, Color wireSetup[], bool serialOdd) { if (rule.additionalRule != nullptr) { if (!ruleApplies(*rule.additionalRule, wireSetup, serialOdd)) { return false; } } // TODO for an...
ALGO
0.995637
5.583564
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-07-02T08:06: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": "2788f8f3589b...
5d97a61e-6e65-4997-a754-273e434001a9
chen8913w/my-acm-solutions
leetcode/climbing-stairs.cc
#include <iostream> #include <algorithm> class Solution { public: int climbStairs(int n) { if (n <= 0) { return 0; } int f1 = 1, f2 = 2; if (n == 1) { return f1; } // DP. // F(i) = F(i - 1) + F(i - 2), // means using one step f...
ALGO
0.999854
4.90767
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2014-10-28T19:21:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "423e43cb...
c677769d-81bd-4a28-a6ad-597f622e993e
viren-sureja/Love-Babbar-450
10_stack_and_queues/31_minimum_time_required_to_rot_all_oranges.cpp
/* link: https://practice.geeksforgeeks.org/problems/rotten-oranges2536/1 sol: https://www.geeksforgeeks.org/minimum-time-required-so-that-all-oranges-become-rotten/ */ // ----------------------------------------------------------------------------------------------------------------------- // /* naive ...
ALGO
0.999868
5.395861
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2021-03-21T14:17:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 356, "forks": 169, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ad0dc...
a871d965-afb7-49ff-becc-e0d94affbf46
jenilgandhi2111/DAA-lab
job_assgn.cpp
/*********************************************************** * Written By:- <NAME> * Sem:- CE 4 * Date:- 13/03/2021 * Roll no:- CE038 * Subject:- DAA(Design and Analysis of Algorithm) * Guidance by:- <NAME> * Objective:- Solve Job assignment problem using Branch and...
ALGO
0.999884
4.655066
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2020-12-10T17:56:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8464ec46bc1...
4a3c5412-2542-4c15-8ccb-f7d9c54f586b
arponbasu/CS154_Labs_2ndSem
CS154_Labs_2ndSem/Lab2/singleliftdraft.cpp
/* #include <bits/stdc++.h> #include <unistd.h> using namespace std; const static int capacity = 4; class Lift { int currentFloor; const static int MAX_FLOOR = 6; bool isRunning; bool direction; int userArray[capacity]; public: Lift() { currentFloor = 0; isRunning = false; direction = true;...
TOOL
0.935794
3.624924
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-08-04T21:10: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": "1f4501c52f7...
6bc2ec2d-4186-4956-972b-edbbd20ac945
nasa/EMTG
src/Mission/Journey/Phase/ParallelShootingPhase/PSBIphase/PSBIstep.h
// EMTG: Evolutionary Mission Trajectory Generator // An open-source global optimization tool for preliminary mission design // Provided by NASA Goddard Space Flight Center // // Copyright (c) 2013 - 2024 United States Government as represented by the // Administrator of the National Aeronautics and Space Administratio...
ALGO
0.999203
6.212629
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2020-06-16T22:56:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 74, "forks": 17, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2cff917d...
ee220ece-cf4b-41ad-90e8-4c5ec0c6a6af
PNU-PULSE/2022-Spring
2021_Kakao_Internship/Alcholrithm/시험장_나누기.cpp
#include <vector> using namespace std; vector<int> adj[10101]; bool check[10101]; int root; bool flag; int cnt{}; int dfs(vector<int>& num, int u, int m) { if (num[u] >m) { flag = false; } int k1, k2; if (adj[u].size() == 2) { k1 = dfs(num, adj[u][0], m); k2 = dfs(num, adj[u][...
ALGO
0.999796
4.480878
{ "github_metadata": { "branch": "main", "commit_count": 235, "repo_created_at": "2022-03-21T10:47:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a838d5d93b...
60223c9e-c24b-46f8-b8fa-9257c26da3ab
axelvag/Simulator_temperature
apps/MouvementAir/main_MouvementAir.cpp
#include <Grapic.h> #include <cmath> #include <iostream> using namespace std; using namespace grapic; const int DIMW = 512; const int MAX_HEATDIM = 64; const int AIR = 0; const int WALL = 1; const float TEMP_MIN= -5.f; const float TEMP_MAX= 38.f; struct Color { int r,g,b; }; Color make_color(int r, int g, in...
ALGO
0.994722
3.868717
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-12-20T19:02:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5797ea56d3...
5b8a79c8-d350-4fa8-89a4-01c0e684290c
RobinSchmidt/RS-MET
Libraries/RobsJuceModules/romos/Algorithms/romos_FilterDesign.cpp
//#include "romos_FilterDesign.h" //#include "../Modules/romos_FilterModules.h" //using namespace romos; void biquadBypassCoeffs(double *coeffs) { coeffs[0] = 1.0; // b0 coeffs[1] = 0.0; // b1 coeffs[2] = 0.0; // b2 coeffs[3] = 0.0; // a1 coeffs[4] = 0.0; // a2 } void biquadLowpassCoeffsBilin...
ALGO
0.998336
4.75852
{ "github_metadata": { "branch": "work", "commit_count": 12452, "repo_created_at": "2016-10-25T07:53:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 61, "forks": 6, "issues": 77, "pull_requests": 0 }, "file_meta": { "content_id": "4084c3...
a49ed659-51d7-4673-81f0-718667844757
xwlee9/cpp
leetcode/leetcode016_双指针.cpp
class Solution { public: int threeSumClosest(vector<int>& nums, int target) { if (nums.size() < 3) return NULL; int diff = abs(nums[0] + nums[1] + nums[2] - target); int close = nums[0] + nums[1] + nums[2]; sort(nums.begin(), nums.end()); for (int i = 0; i < nums.size();...
ALGO
0.999992
6.054812
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2019-04-08T14:49: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": "b5a0a6da6...
2b76e813-b449-4a93-aebd-54229b81434c
Yedzinovich/Course-Project-Cpp-BFT-BFS-Topological-Sort
Graph.h
/***********************************************************************************************/ /* Programmer: <NAME> */ /* Date: 12/07/2017 */ /* Purpose: This class creates and i...
ALGO
0.983268
4.986866
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-09T16:19: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": "330d8d53ef...
46fad30a-79c7-4e69-91e6-727b9455e44d
aimon1337/tema-bartos
tema.cpp
// 1 #include <iostream> using namespace std; int main() { int s = 0, a; do { cin >> a; s += a; } while (a != 0); cout << s; return 0; } //2 #include <iostream> using namespace std; int main() { int i; for (i = 1; i <= 50; i = i + 2) { cout << i << " "; } cout << '\n'; for (i = 50; i <= 100; i = i + 2)...
ALGO
0.999241
3.116503
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-03-23T18:29: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": "20a13fe704...
91828f4f-585d-4337-b64d-6698220d463a
vb8725/Google-Code-Jam-Problems
AlphabetCake/AlphabetCake.cpp
#include <iostream> #include <fstream> #include <string> #include <math.h> #include <algorithm> #include <vector> int main() { int n; std::cin >> n; for (int i=1; i<=n; ++i) { int r; int c; std::cin >> r >> c; char** grid = new char*[r]; for(int i = 0; i < r; ++i) grid[i] = new char[c...
ALGO
0.999847
3.956249
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-05-21T18:03: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": "0952e6fdcd...
f0e70256-163e-485e-801e-a21b3b888555
Constantine-L01/Gitbook
dynamic programming/1641. Count Sorted Vowel Strings.cpp
Given an integer n, return the number of strings of length n that consist only of vowels (a, e, i, o, u) and are lexicographically sorted. A string s is lexicographically sorted if for all valid i, s[i] is the same as or comes before s[i+1] in the alphabet. Example 1: Input: n = 1 Output: 5 Explanation: The 5 sorted...
ALGO
0.999967
6.348298
{ "github_metadata": { "branch": "main", "commit_count": 777, "repo_created_at": "2021-01-19T11:19:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1da454ef8...
6ab8a299-2368-44d4-ba8b-ebe27b2092d4
Hsu1997/Leetcode
daily/2022/160_Intersection_of_Two_Linked_Lists.cpp
#include <iostream> #include <vector> using namespace std; // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { ListNode *ans = NUL...
ALGO
0.999993
5.300403
{ "github_metadata": { "branch": "main", "commit_count": 1965, "repo_created_at": "2022-01-25T09:04:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99bb9e543...
232ba02f-72e1-4b31-9498-04922ace424b
YangletLiu/Graph-tensor
GPU/test/gSVD/test_gSVD.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include "gSVD.h" #include <iostream> using namespace std; #include <random> using std::default_random_engine; using std::uniform_real_distribution; #define random(x) (float(rand()%x))/x void inital_graph(float* adjacent, float* laplacian, int...
ALGO
0.989989
3.689028
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-05-22T12:04:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9719df58c...
a2416510-f474-4b39-a0f3-f2c3971c0cb6
diohabara/competitive_programming
ac/typical90/010/main.cpp
#include <bits/stdc++.h> #include <atcoder/all> #include <boost/multiprecision/cpp_int.hpp> using namespace atcoder; using namespace boost::multiprecision; using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) const ll MOD = 1e9 + 7; const int INF = INT_MAX; const ll LLINF = ...
ALGO
0.999831
4.910044
{ "github_metadata": { "branch": "master", "commit_count": 407, "repo_created_at": "2019-01-21T06:09: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": "e2c38432...
01604638-3ff5-4814-bc65-2f50b866431b
anikxt/DS_Templates_Blaze
Mathematics/Number Theory/segmentedSieve.cpp
#include <bits/stdc++.h> #define endl '\n' #define blaze ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); //======================= using namespace std; //======================= vector<long long> SegmentedSieve(long long a, long long b) { // generate all primes up to sqrt(b) long long lim = sqrt(b); ...
ALGO
0.998851
3.909966
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2021-03-07T10:58:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26057033d1c...
68425986-0283-4fa6-bbb6-ff3c1b6963f0
RizviBR0/Practice
C++/AdjacencyMatrix.cpp
#include <iostream> using namespace std; int i, j, u, v, V, E, input; int vertexAndEdgeInput() { cout << "Enter number of vertices: "; cin >> V; cout << "Enter number of edges: "; cin >> E; } void directed(int V, int E) { int Adjacent_Matrix[V + 1][V + 1]; for (i = 0; i <= V; ++i) { ...
ALGO
0.999471
5.721211
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2023-12-13T12:51:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "958b5bd0ac2...
ab8928a5-dbf1-46fb-913c-12f4e51d0542
gitJaesik/algorithm_archive
codility/common_prime_divisors.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <cstring> using namespace std; // 쌍 pair // Z : 1 ~ 6000 // 보이면 오버플로우 확인 // 여기서는 소수 구하는 끝 // long long으로 소수를 구해야함 j*j 가 overflow가 발생 할 수 있음 // int max많큼 존재하는 경우이기 때문에, 소수를 그 때 그 때 구하는게 낫지 않을까? // 라고 생각하면 O(n) = 20억이니까 1초가 걸림 // A, B...
ALGO
0.999875
5.41307
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2016-10-22T14:09: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": "df873949...
bc12213d-a477-4ed8-b4e4-42c848f58fb0
Mahimatestgithub/GFGPOTD
Job Sequencing Problem.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> jobSequencing(vector<int> &deadline, vector<int> &profit) { int n = deadline.size(); vector<pair<int, int>> jobs; // Store jobs with their profit and deadline for (int i = 0; i < n; i++) { ...
ALGO
0.999994
5.959419
{ "github_metadata": { "branch": "main", "commit_count": 215, "repo_created_at": "2025-01-01T17:34: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": "a43ac99d09...
571177be-ee20-489a-bdaf-82cf5b41ccfc
strapidustra125/cpp-learning
courses/yandex_dsa/sprint_1/task1.cpp
// Успешная посылка: 78886466 #include <iostream> #include <set> #include <vector> #include <algorithm> #include <fstream> #ifdef MY_IDE #define out fout #define in fin #else #define out std::cout #define in std::cin #endif std::ifstream fin("../in"); std::ofstream fout("../out"); int main() ...
ALGO
0.999972
3.338002
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2022-04-05T14:23:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f37b740d0...
ce5aa32f-9c05-4809-9de2-c046239fcd57
ndb796/python-for-coding-test
6/12.cpp
#include <bits/stdc++.h> using namespace std; int n, k; vector<int> a, b; bool compare(int x, int y) { return x > y; } int main(void) { // N과 K를 입력받기 cin >> n >> k; // 배열 A의 모든 원소를 입력받기 for (int i = 0; i < n; i++) { int x; cin >> x; a.push_back(x); } // 배열 B의 모든 원...
ALGO
0.999996
4.662929
{ "github_metadata": { "branch": "master", "commit_count": 584, "repo_created_at": "2020-04-15T21:07:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2378, "forks": 843, "issues": 131, "pull_requests": 1 }, "file_meta": { "content_id": "b...
05e0c5e8-ebb3-4cde-abd0-055045444a72
HimanshuMohanty-Git24/DSA-Pratice
Leetcode/MaxDiffAncestor.cpp
#include <bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right...
ALGO
0.999943
5.70896
{ "github_metadata": { "branch": "master", "commit_count": 521, "repo_created_at": "2022-07-26T13:31:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ebd4696...
f5bef0cc-5c16-4ed9-97f5-b6ddda88c8a4
Voleco/biexp
abstractionalgorithms/CorridorAStar.h
/* * $Id: corridorAStar.h,v 1.6 2006/09/18 06:19:31 nathanst Exp $ * * corridorAStar.h * hog * * Created by <NAME> on 6/22/05. * Copyright 2005 <NAME>, University of Alberta. All rights reserved. * * This file is part of HOG. * * HOG is free software; you can redistribute it and/or modify * it under the...
ALGO
0.9862
6.155735
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-29T06:32: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": "e95ed74714...
ae25c101-6bda-453a-9265-1562a8ef5330
josephxiao8/USACO
2015-2016/Gold/Feb/fencedin.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef tuple<int,int,int> ti; typedef tuple<ll,ll,ll> tl; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<pi>...
ALGO
0.999889
3.338763
{ "github_metadata": { "branch": "master", "commit_count": 293, "repo_created_at": "2020-07-11T00:56: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": "72062ad8...
3bb34343-9043-4158-a9df-9d3631a8913a
ApolloAuto/apollo
modules/planning/planners/lattice/trajectory_generation/trajectory_combiner.cc
/****************************************************************************** * Copyright 2017 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
ALGO
0.998599
7.056735
{ "github_metadata": { "branch": "master", "commit_count": 19341, "repo_created_at": "2017-07-04T19:03:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25847, "forks": 9793, "issues": 895, "pull_requests": 104 }, "file_meta": { "content_id...
18e1fdb9-bed9-4dff-a8a5-c72fc0710643
wDxce/Norwalk-Template
include/subsystemHeaders/drivebase.hpp
#include "main.h" #include "pros/motors.hpp" #include "pros/imu.hpp" /* Structures */ struct adjustedMotors{ float fr; float mr; float rr; float fl; float ml; float rl; }; /* Helper Functions */ //Simple function to allow the motors to spin based off the input values, most speed will just be...
ALGO
0.952603
5.255049
{ "github_metadata": { "branch": "NorwalkTemplate", "commit_count": 3, "repo_created_at": "2024-10-17T04:45: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": "3...
b8262e4f-a0d5-4d5e-aac4-dd9c0e738fd3
Rashed112/LeetCode-Solutions
solutions/826_most_profit_assigning_work.cpp
// Approach-1: using sorting class Solution { public: int maxProfitAssignment(vector<int>& difficulty, vector<int>& profit, vector<int>& worker) { vector<pair<int, int>>v(profit.size()); for(int i=0;i<profit.size();i++){ v[i] = {difficulty[i], profit[i]}; } int res = 0, j...
ALGO
0.999952
6.054679
{ "github_metadata": { "branch": "master", "commit_count": 337, "repo_created_at": "2022-10-01T19:58:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "308950d7...
22109952-be68-419d-b207-37a1d39fb918
jhonber/Programming-Contest
codeforces/Codeforces Beta Round #12 (Div 2 Only)/A.cpp
// http://codeforces.com/contest/12/problem/A #include<bits/stdc++.h> using namespace std; #define __ ios_base::sync_with_stdio(0); cin.tie(0); #define endl '\n' #define foreach(it, x) for (__typeof (x).begin() it = (x).begin(); it != (x).end(); ++it) #define all(x) x.begin(),x.end() #define D(x) cout << #x " = " << (...
ALGO
0.999982
4.582697
{ "github_metadata": { "branch": "master", "commit_count": 861, "repo_created_at": "2014-02-05T00:06:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8849db46...
eadb2197-045f-4864-b81b-d235e02950e0
EmmanuelEmu/DSA_-_leetcode
Leetcode/leetcode_611. Valid Triangle Number.cpp
#include <bits/stdc++.h> using namespace std; int triangleNumber(vector<int> &nums) { sort(nums.begin(), nums.end()); int count = 0; int n = nums.size(); for (auto i = 0; i < n; i++) { for (auto j = i + 1; j < n; j++) { int twoSide = nums[i] + nums[j]; int lb...
ALGO
0.9999
4.915417
{ "github_metadata": { "branch": "master", "commit_count": 1070, "repo_created_at": "2024-07-12T20:20: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": "afb7b32...
3ce17050-51d8-4e13-92fa-3210118ebfeb
metaphysis/Code
UVa Online Judge/volume006/631 Microzoft Calendar/program.cpp
// Microzoft Calendar // UVa ID: 631 // Verdict: Accepted // Submission Date: 2017-06-03 // UVa Run Time: 0.000s // // 版权所有(C)2017,邱秋。metaphysis # yeah dot net #include <bits/stdc++.h> using namespace std; const int daysOfYear = 365; const int daysOf4Years = daysOfYear * 4 + 1; const int daysOf100Years = daysOf4Year...
ALGO
0.997371
3.79249
{ "github_metadata": { "branch": "master", "commit_count": 1710, "repo_created_at": "2016-03-07T13:28:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 229, "forks": 50, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b96a...
31523b27-e54d-4c36-9bca-e631d65098e0
Astrid1898/PAT
乙级/1002.cpp
#include <iostream> #include <string> using namespace std; bool Judge(string s) { bool Pexist = false, Aexist = false, Texist = false; //定义P,A,T存在标志 for (int i = 0; i < s.length(); i++) { //如果存在P,A,T,则标记为真 if (s[i] == 'P') Pexist = true; else if (s[i] == 'A') Aexist =...
ALGO
0.999807
4.171195
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-01-18T10: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": "cd4432dfd...
05378db6-85a8-49d3-ae3d-32cc240fcb3f
Ufrooq/DSA
Graphs/test_code.cpp
#include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <limits.h> using namespace std; class Graph { public: int no_of_vertex; Graph(int v) { this->no_of_vertex = v; } map<string, list<pair<string, int>>> adjMatrix; map<string, int> distMatrix; ...
ALGO
0.999909
4.983805
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-03-26T22:06:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d920b9fac1...
55b5c215-d3b3-4b1e-8215-ef46afc57f7e
wonghoifung/tips
leetcode/medium_find_minimum_in_rotated_sorted_array.cpp
#include <string> #include <vector> #include <iostream> #include <map> #include <unordered_map> #include <unordered_set> #include <set> #include <queue> #include <deque> #include <stack> #include <array> #include <memory> #include <sstream> #include <functional> #include <algorithm> #include <bitset> #include <tuple> #...
ALGO
0.999828
4.88522
{ "github_metadata": { "branch": "master", "commit_count": 811, "repo_created_at": "2015-11-26T10:36:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "372c82c0...
671098af-2033-4b3b-a5c5-2fbd2c1fce1e
mehtaSamiksha/cpp-leetcode-bank
2444. Count Subarrays With Fixed Bounds.cpp
// Problem: 2444. Count Subarrays With Fixed Bounds // Difficulty: Hard // Topics: Sliding Window, Greedy // Link: https://leetcode.com/problems/count-subarrays-with-fixed-bounds/ // Approach: // - Track the latest occurrence of minK and maxK using j1 and j2. // - Track the last invalid index (where nums[i] is out ...
ALGO
0.999974
6.504733
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2025-04-08T04:09: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": "9283bad0090...
48792fc1-292e-43a7-b802-6540e6d915ad
TheMetaSetter/sorting-algorithm-analysis
sorting-algo/ShakerSort.cpp
// // ShakerSort.cpp // Sorting Algorithm Analysis // // Created by <NAME> on 18/07/2023. // #include "SortingAlgorithms.hpp" // ShakerSort function void ShakerSort(int arr[], int n) { bool swapped = true; int start = 0; int end = n - 1; while (swapped) { // reset the swapped flag on ...
ALGO
0.99926
5.979973
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2023-07-16T15:31:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eda0cce02...
9b355c74-6a1b-4dd0-bc1c-4e28c2653913
romeorizzi/cms_algo2020
gameia/sol/solcina.cpp
/* SOURCE: https://blog.csdn.net/yjf3151731373/article/details/77072661 Rivisitato per funzionare su input singolo invece dell'intero batch. */ #include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> #include<fstream> #include<cmath> #include<string> #include <bits/stdc++.h> using namespace std; const i...
ALGO
0.999989
3.773612
{ "github_metadata": { "branch": "master", "commit_count": 168, "repo_created_at": "2020-03-04T22:40:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6cd4b19c...
a7717f39-ada5-4e31-9022-d1bf6a18ff86
swwayam/learn-cpp
bitwiseOperators/main.cpp
#include <iostream> #include <iomanip> #include <bitset> const unsigned char mask_bit_0{0b00000001}; // Bit0 const unsigned char mask_bit_1{0b00000010}; // Bit1 const unsigned char mask_bit_2{0b00000100}; // Bit2 const unsigned char mask_bit_3{0b00001000}; // Bit3 const unsigned char mask_bit_4{0b00010000}; // Bit4 co...
TOOL
0.910712
3.712689
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-08-11T11:47: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": "0a47f1b7b6...
454e7884-7d4e-4d6c-a862-ee361e5a7260
acuoci/laminarSMOKE
solvers/openSMOKEpp4laminarSMOKE/maps/FluxAnalysisMap.hpp
/*----------------------------------------------------------------------*\ | ___ ____ __ __ ___ _ _______ | | / _ \ _ __ ___ _ __ / ___|| \/ |/ _ \| |/ / ____| _ _ | | | | | | '_ \ / _ \ '_ \\___ \| |\/| | | | | ' /| _| _| |_ _| |_ | | | |_| | |_) | ...
TOOL
0.911653
5.34797
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2016-05-24T16:43:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 46, "forks": 25, "issues": 12, "pull_requests": 2 }, "file_meta": { "content_id": "142ca...
ed82771e-9276-4b29-98fd-ba9571755cd9
Shantanu1099/LeetCode
0382-linked-list-random-node/0382-linked-list-random-node.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: vector <int> v; S...
ALGO
0.999486
5.494686
{ "github_metadata": { "branch": "master", "commit_count": 217, "repo_created_at": "2023-11-17T06:34: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": "9f9e3a51...
1662a96a-f9b8-4663-9e8c-c83010a9ebe1
NVIDIA/tensorflow
tensorflow/core/util/einsum_op_util.cc
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
ALGO
0.982564
6.055834
{ "github_metadata": { "branch": "r1.15.5+nv23.03", "commit_count": 64202, "repo_created_at": "2020-05-13T21:34:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1146, "forks": 178, "issues": 41, "pull_requests": 9 }, "file_meta": { "conten...
394b8e71-764a-4390-88ca-a4f17532852c
PointCloudLibrary/pcl
common/src/projection_matrix.cpp
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2012-, Open Perception, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condition...
ALGO
0.944393
6.345677
{ "github_metadata": { "branch": "master", "commit_count": 14566, "repo_created_at": "2013-02-12T16:40:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10495, "forks": 4656, "issues": 432, "pull_requests": 147 }, "file_meta": { "content_id...
7e7543c3-abdc-4bd6-a4ab-140ddfc3fe1e
thbloomquist/TB-LinkedList
LinkedList.cpp
// // LinkedList.cpp // #include "LinkedList.h" #include "Flags.h" /* **************************************************************** */ #if CONSTRUCTOR || ALL // Constructor template <class T> LinkedList<T>::LinkedList() { // TODO: Allocate dummy node dummy = new Node<T>(0); dummy->next = dummy; d...
TOOL
0.990354
5.851346
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-02T20:01: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": "be1d27972333...
455ab85f-a12a-4168-a21d-2f3b9b3711f9
EGyeom/ProblemSolving
leetcode/1094/1094.cpp
/* Input: trips = [[2,1,5],[3,3,7]], capacity = 4 Output: false Input: trips = [[2,1,5],[3,3,7]], capacity = 5 Output: true */ #include <bits/stdc++.h> using namespace std; bool compare(vector<int> a, vector<int> b) { return a[1] < b[1]; } class Solution { public: bool carPooling(vector<vector<int>> trips, ...
ALGO
0.998221
5.58587
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2020-11-18T07:47: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": "877202e9...
594c7ce3-9cd7-45e9-8f00-d19899192e94
songrunxian/computerScienceStudy
001-C_data_structure/0006.haffman.cpp
#include <stdio.h> #include <stdlib.h> #define MAX_N 10000 /**在这个宏里面我让temp的类型和a一致**/ #define swap(a, b) { \ __typeof(a) temp = a; \ a = b, b = temp; \ } typedef struct Node { char ch; //数据域 double p; //当前节点对应的概率值 struct Node *next[2]; //左孩子,右孩子 } Node; //相关字符,以及相关字符的编码 typedef struct Code { ...
ALGO
0.999927
3.574581
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-09-20T08:01: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": "342cd3946ba...
7ed40b22-1809-4daa-b3f7-c5ffb7d5cfc6
guiyang882/TrackingToolBox
package_bgs/db/imbs.hpp
/* * IMBS Background Subtraction Library * * This file imbs.hpp contains the C++ OpenCV based implementation for * IMBS algorithm described in * <NAME> and <NAME> * "Independent Multimodal Background Subtraction" * In Proc. of the Third Int. Conf. on Computational Modeling of Objects * Presented in Images: Fund...
ALGO
0.906424
5.997283
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-01-03T13:46:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2d17f745...
1d157a3b-bea7-4611-a9e2-9b1dc7449efa
prachikedia07/DSA-Leetcode-Practice
Week-8( BST + Trees )/construct-binary-tree-from-preorder-and-inorder-traversal.cpp
# Code ```cpp [] /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *r...
ALGO
0.999997
6.777934
{ "github_metadata": { "branch": "main", "commit_count": 138, "repo_created_at": "2025-05-25T10:02:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb95982006...
f451b41b-5b94-4ec9-9616-9260f339cf8c
vinodpatidar0808/Data-structures-and-Algorithms
Tree/22-burn-tree.cpp
// given a binary tree leaf, find maximum time taken to burn the tree from given leaf #include <iostream> #include "binaryTree.h" using namespace std; int res = 0; int burnTree(node *root, int leaf, int &maxDist) { if(root == NULL) return 0; if(root->val == leaf) { maxDist = 0; return 1;...
ALGO
0.999876
4.593435
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-08-07T08:39:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3ea1fd6207...
7764b329-5b32-4802-a629-858e8b3701f9
rsghotra/DSA_BARI
Hashing_Quadratic/main.cpp
#include<iostream> using namespace std; /* ==> NEED NOT TO WORRY ABOUT IF THE ELEMENT COULD BE INSERTED OR NOT AS HASH TABLE SIZE IS EQUAL TO INPUT SIZE Closed Hashing - Quadratic Probing: Collision Resolution Technique - Implemented Using Array Key Points: H'(x) = (H(x) + i*i)%size; where H(x) = x%siz...
ALGO
0.999878
5.429914
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2020-10-01T23:47:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9b70837b9...
eb78db61-905d-4b90-8458-bb3b2547a519
AnastasiiaKormanovska/sp-lab2
lab2.cpp
#include <iostream> #include <fstream> #include <set> #include <map> #include <vector> #include <stdexcept> using namespace std; // Клас DFA (детермінований скінченний автомат) class DFA { public: set<char> alphabet; // Алфавіт set<int> states; // Множина станів int startState; // Початковий стан s...
ALGO
0.981734
4.635767
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-05-29T05:14: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": "b99f337b6f8b...
3b6c0f58-3de0-4971-989e-cab8758b8dee
haibin-chen/leetcode_record
leetcode_39.cpp
// // Created by 陈海斌 on 2020-08-15. // #include <vector> #include <stack> #include <iostream> #include <algorithm> using namespace std; /* * 1. candidate赋值1 * 2. 每个值为所有子因数值的和,且可重复 */ class Solution { public: void dfs(vector<vector<int>> &res, vector<int> &now, int &value, int target, vector<int> candidates, in...
ALGO
0.999969
6.085682
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-08-21T08:00: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": "dee4d72200...
3348ea2d-aa1f-4d94-b35b-eac8c47ba264
bh11111/uc-algorithm-analysis
algos/test/bubbleSort.h
// // Created by <NAME> on 2/18/17. // #ifndef ALGOS_HORNER_H #define ALGOS_HORNER_H #include <string> #include <string.h> #include <vector> #include <iostream> #include <algorithm> class bubble { public: bool isSorted(std::vector<int> data){ if (data.size() <= 1){ std::cout << "List is Sort...
ALGO
0.998865
4.130476
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2017-01-25T04:13:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "2da89c1d3...
23d83647-72c3-4c93-8d3e-79a6d45ee0e8
HarshSaxena837/DSA---Problem-Solving
Easy/Longest Common Prefix in an Array/longest-common-prefix-in-an-array.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: string longestCommonPrefix (string arr[], int N) { // your code here sort(arr, arr+N); string start = ar...
ALGO
0.999652
5.131482
{ "github_metadata": { "branch": "main", "commit_count": 781, "repo_created_at": "2023-05-28T06:01:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d5beccb92...
d02b29e5-dc12-4cc4-953e-67fb8d407fc0
zach1502/Sorting-Visualizer
time_trials/sorting_algorithms/BitonicSort.hpp
#pragma once #include <iostream> #include <vector> void BitonicSort(std::vector<int>& arr) { unsigned long long int n = arr.size(); for (unsigned long long int k = 2; k <= n; k *= 2) { for (unsigned long long int j = k / 2; j > 0; j /= 2) { for (unsigned long long int i = 0; i < n; i++) { unsign...
ALGO
0.999982
5.755196
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2023-08-21T19:57: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": "d7202a0fb58...
1dfff1a2-67fa-4183-b510-163eec7c1b8f
pierrekurza/exos_en_cpp
ControleTP1/Algorithmique-2015-DSTP1-GroupeB1.cpp
#include <iostream> #include <numeric> #include <cmath> #include <cfloat> #include <cctype> #include <cstdlib> using namespace std; // Si besoin, la valeur maximum d'un double est DBL_MAX (définie dans l'header cfloat) //----------------------------------------------------------------------------- // // Ne pas effac...
ALGO
0.998986
4.440297
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-01-10T09:33: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": "4bd098b8d4...
0474f8a2-786d-4886-8772-ada7470e3290
palash214004/Algorithms11
after mid break/lab7/topology.cpp
#include <bits/stdc++.h> using namespace std; int n, m; vector<int> in_degree, order; vector<vector<int>> graph; void topologicalSort() { queue<int> q; for (int i = 0; i < n; i++) { if (in_degree[i] == 0) q.push(i); } while (!q.empty()) { int u = q.front(); q.pop(); or...
ALGO
0.999997
4.891387
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-22T19:37: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": "a7656e198d52...
a2908ac6-9fdb-4976-b9f7-496d3efdd13a
Brandoxx/MPI_OPENMP_PTHREADS_Projects
project2.1/src/Distribution.hpp
// @copyright c_la_vie 2022 #ifndef DISTRIBUTION_HPP #define DISTRIBUTION_HPP #include <mpi.h> #include <vector> #include <string> #include <array> struct heatPlate; namespace Distribution { /** * @brief Sends a heat plate to a process * @param heatPl the heat plate to be sent * @param dest the destination...
ALGO
0.961261
4.936481
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-12T03:51: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": "efd2b32c8c84...
b5af7e5c-dd8b-40b0-a9e5-82bcb01b10cf
mtai000/leetcode
cpp/50.powx_n.cpp
/* Pow(x, n) * * [Medium] [AC:33.5% 42.7K of 127.4K] [filetype:cpp] * * 实现 pow(x, n) ,即计算 x 的 n 次幂函数。 * * 示例 1: * * 输入: 2.00000, 10 * * 输出: 1024.00000 * * 示例 2: * * 输入: 2.10000, 3 * * 输出: 9.26100 * * 示例 3: * * 输入: 2.00000, -2 * * 输出: 0.25000 * * 解释: 2-2 = 1/22 = 1/4 = 0.25 * * 说明:...
ALGO
0.999866
5.954914
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2019-11-03T12:42: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": "4573e0522...
c4b64e1d-5314-49be-ba5c-66557416ddce
equinor/gaussianfft
src/flens/lapack.h
/* * Copyright (c) 2007, <NAME> * * 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) Redistributions of source code must retain the above copyright * notice, this ...
TOOL
0.989595
5.442423
{ "github_metadata": { "branch": "main", "commit_count": 219, "repo_created_at": "2021-04-12T15:12:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 2, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "9fc7b6da145...
f4fc7ccc-29b3-464d-95e2-8b67245dd92c
tinawebdev/cpp-primer-plus
chapter04/ex10.cpp
#include <iostream> #include <array> int main() { std::array<float, 3> times; std::cout << "Enter the first 40m time in seconds: "; std::cin >> times[0]; std::cout << "Enter the second 40m time in seconds: "; std::cin >> times[1]; std::cout << "Enter the third 40m time in seconds: "; std::...
ALGO
0.986742
3.489018
{ "github_metadata": { "branch": "master", "commit_count": 163, "repo_created_at": "2020-09-21T08:41:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f14a2f0...
4e233919-898f-499b-998c-0c225b35579a
meat124/BAEKJOON_My_Solution
Gold_3/백준_26009_험난한등굣길.cpp
#include<bits/stdc++.h> using namespace std; struct info { int x , y , dist; info(int x , int y , int dist) : x(x) , y(y) , dist(dist) {} }; int N , M , K; bool board[3005][3005]; bool vis[3005][3005]; int dx[4] = { 1,0,-1,0 } , dy[4] = { 0,1,0,-1 }; void Visualize_Traffic_Jam(int r , int c , int d) { // 테...
ALGO
0.999926
4.658137
{ "github_metadata": { "branch": "master", "commit_count": 392, "repo_created_at": "2022-05-13T04:35: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": "179450cd...
ca33790c-40ea-45bb-ab51-61751ff31b71
hnil/opm-flowgeomechanics
opm/geomech/vem/topology.cpp
#include "topology.hpp" #include "vem.hpp" #include <map> #include <algorithm> #include <cmath> #include <iostream> // @@ for debug/warning using namespace std; namespace { // ---------------------------------------------------------------------------- struct FaceCorners // -------------------------------------...
ALGO
0.998538
6.023098
{ "github_metadata": { "branch": "master", "commit_count": 291, "repo_created_at": "2023-03-15T09:26:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0130e1ff...
82c0111c-e4ab-45ed-a402-e6161aaba19c
project-arcana/clean-core
src/clean-core/utility.hh
#pragma once #include <cstddef> // size_t #include <clean-core/assert.hh> namespace _external_cc_detail { template <class T> constexpr void do_swap(T& a, T& b, char) // priority 0 { T tmp = static_cast<T&&>(a); a = static_cast<T&&>(b); b = static_cast<T&&>(tmp); } template <class T> constexpr auto do_swa...
TOOL
0.962211
7.163628
{ "github_metadata": { "branch": "develop", "commit_count": 1035, "repo_created_at": "2019-03-30T09:18:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 3, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "27a4a9...
9dbd59fa-17be-4687-b130-1fe20282018a
kriti-raj/CodeChef-Contests-CPP
START54D/Equal_Distinct.cpp
// Code by <NAME> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define PI 3.14159265358979323846; /*================================================*/ /*================================================*/ int main() { ll t; // ll case_no = 1; cin >> ...
ALGO
0.998763
4.319687
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2023-01-04T21:23:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4116eb45b9...
08f6d3b9-f5b4-4904-bbd1-dbc34d8e0b64
xiw2-0/ParallelProgrammingProject
src/quick_sort.h
// MIT License // // Copyright (c) 2020 xiw // \author <NAME> // Parallel quick sort using OpenMP. #ifndef QUICK_SORT_H_ #define QUICK_SORT_H_ #include <vector> #include <memory> #include <omp.h> using std::vector; namespace para { // when array size is smaller than MIN_SIZE, no more tasks will be created const i...
ALGO
0.999914
6.329794
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-05-27T09:25:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05a824b458...
bd0da00c-ecf7-4dc1-8c3a-d52d3566615d
jeffabc1997/CSES_Problem_Set
Longest Flight Route/LongestFlightRoutes.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; /* find Topological sort order and do relax */ bool relax(vector<int>& dis, vector<int>& parent, int source, int neighbor) { // cout << "Neighbor " << neighbor << ", Source: " << source << endl; if(dis[neighbor-1] < dis[source-1] ...
ALGO
0.999997
4.198807
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-06-10T15:22: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": "76de04a5728...
7e49bbec-74fa-4225-b21b-e86c289efead
Mukesh1848/Mar_2024_Leetcode
19. Remove Nth Node From End of List.cpp
// 19. Remove Nth Node From End of List /** * 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 So...
ALGO
0.999979
5.699224
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-02-01T17:06: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": "0995396afbb9...
a82b7e1f-2fc8-4814-a8b2-7d1b4afa48c3
sunilgaikwad/coderunner
algorithms_analysis/insertionsort.cpp
//Big O of N square #include <iostream> using namespace std; template <typename T> void insertionsort(T *arry, int size) { int noofelements = size/sizeof(T); int i = 1; int j = i - 1; for(int start = i; start < noofelements; start++) { j = start - 1; if(*(arry + start) >= *(arry + j)) continu...
ALGO
0.999412
4.290022
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2017-06-16T04:03: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": "170d63c58...
af821feb-9754-4653-b1a9-cd611b149788
lixiao-yang/LZU-MindSpore
mindspore/ccsrc/backend/kernel_compiler/cpu/scatter_arithmetic_cpu_kernel.cc
/** * Copyright 2021 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 applicable law...
TOOL
0.973395
7.40182
{ "github_metadata": { "branch": "master", "commit_count": 27482, "repo_created_at": "2022-11-01T20:08:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "516326...
ad993df8-93db-4abf-a142-1a6efd5a9693
aic25/relaychannelsim
MMSE-weight.cpp
#include "const-function-declerations.h" extern double CNR, channel_power[N][2]; double channel_gain[N][2], p_in[N]; void MMSE_Weight_Matrix(double(*H)[TS][BS][2], double(*W)[BS][CL][2]){ int rx, tx, tx2, f_index, i; double WH[N][BS][TS][2]; double g_i[BS][2], g_iH[BS][2], power_i[2], g[TS][2], gH[TS][2], power[2...
ALGO
0.999858
4.38946
{ "github_metadata": { "branch": "v4.6-AFDFfix-3cellSepDet-DFaddon-ChannelEncoding", "commit_count": 5, "repo_created_at": "2019-01-06T10:52:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "f...
0d5b7464-0e77-4041-ac23-ab6b8b4dd537
rbx1219/cmaesXD
FHH/chromosome.cpp
#include <iostream> #include <iomanip> #include <cassert> #include "random.hpp" #include "chromosome.hpp" #include "gene.hpp" #include "parameter.hpp" #include "objfunc.hpp" using namespace std; extern randomG RANDOM; // initializes a chromosome. alleles are not initialized. chromosome::chromosome( int ell ) { Leng...
ALGO
0.997953
4.959552
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2014-03-15T03:37: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": "07ccd7c9b...
9f174ba9-9561-4c72-9a16-f569e5db539d
Kolsha/HackerRank
Algorithms/Search/Connected Cells in a Grid.cpp
#include <bits/stdc++.h> /* * Difficulty Medium * Max Score 50 * https://www.hackerrank.com/challenges/connected-cell-in-a-grid/ * same as: https://www.hackerrank.com/challenges/ctci-connected-cell-in-a-grid/ */ using namespace std; // Complete the connectedCell function below. vector <vector<bool>> used; int d...
ALGO
0.999966
5.137771
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2019-08-06T09:35: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": "f700cc390...
f19d16cb-1689-471a-ba43-924fd8af6331
juce-framework/JUCE
modules/juce_audio_devices/native/oboe/src/flowgraph/Limiter.cpp
/* * Copyright 2022 The Android Open Source 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 applica...
ALGO
0.942423
5.817635
{ "github_metadata": { "branch": "master", "commit_count": 15168, "repo_created_at": "2012-03-31T11:19:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7401, "forks": 1859, "issues": 239, "pull_requests": 174 }, "file_meta": { "content_id"...
32684a05-d451-4baf-801b-a7ae2e30b722
shishirRsiam/CSE-Fundamentals-With-Phitron
3. Data Stracture/Module 6.5/practice_4.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int vall; Node* next; Node(int vall) { this->vall=vall; this->next=NULL; } }; void insert(Node*&head,int vall) { Node* newnode=new Node(vall); if(head==NULL) { head=newnode; return; ...
ALGO
0.999627
3.696707
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2024-03-16T11:05:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc3b5d5d6a...
3d1ef4dc-dd8b-46d3-87a6-1678c885e6f0
Savio-Carlos/Maratona
CursodeGrafos/Detetive.cpp
#include <iostream> #include <vector> #include <queue> #include <set> #include <algorithm> using namespace std; int main() { int E, I, V; cin >> E >> I >> V; // Grafo representado como uma lista de adjacências vector<vector<int>> implications(E + 1); vector<int> in_degree(E + 1, 0); // Grau de en...
ALGO
0.999996
5.722142
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2025-05-16T17:28:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "014573bcc36...
f6061fb6-d7df-4cb8-bef1-cf5ea98c47c8
Oziach/Code-Challenges-And-Practice
LeetCode/verticalOrderTraversalOfABinaryTree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999992
6.250238
{ "github_metadata": { "branch": "main", "commit_count": 240, "repo_created_at": "2023-06-06T20:05: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": "b204356a33...
5ceec5c9-e63e-46e1-b81a-2816045139c6
coin-or/Bcp
Applications/Mkc/include/MKC_optim.hpp
// Copyright (C) 2000, International Business Machines // Corporation and others. All Rights Reserved. #ifndef _MKC_OPTIM_H #define _MKC_OPTIM_H #include "BCP_vector.hpp" class MKC_knapsack_entry; class MKC_knapsack_fixing; class MKC_knapsack_set; class BCP_var; class MKC_var; //###################################...
ALGO
0.90668
3.636169
{ "github_metadata": { "branch": "master", "commit_count": 473, "repo_created_at": "2014-12-28T02:02:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30, "forks": 14, "issues": 9, "pull_requests": 1 }, "file_meta": { "content_id": "96f9a87...
ab527e2e-5c0c-4565-876d-a29e7140cb2e
AlexAUT/AdventOfCode2023
day12/main.cpp
#include "common.hpp" #include <algorithm> #include <catch2/catch_test_macros.hpp> #include <cstdint> #include <fmt/core.h> #include <fmt/format.h> #include <map> #include <numeric> #include <ranges> #include <scn/scan.h> #include <string> #include <string_view> #include <vector> namespace r = std::ranges; namespace ...
ALGO
0.998847
6.449898
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-12-08T18:33: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": "08a6eb35ccb9...
37894fc3-913f-4372-a91d-c09e9b898406
akt9802/DSA
Heap/maxHeap.cpp
#include<iostream> using namespace std; class heap{ public: int arr[100]; int size; // constructor heap(){ arr[0] = -1; size = 0; } void insertion(int val){ size = size+1; int index = size; arr[index] = val; while(index > 1){ int...
ALGO
0.999537
3.865815
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-15T07:06: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": "76a6895cdc8f...
61d59ec9-b4a2-473f-baea-652183f3d79a
jekovic/Beakjoon
Problem_1072/Problem_1072/소스.cpp
#include <iostream> #include <queue> #include <vector> #include <algorithm> #include <stack> #include <cmath> #include <cstring> using namespace std; unsigned long long X, Y; unsigned long long Z; long long result; void input() { cin >> X >> Y; Z = (unsigned long long)(Y * 100 / X); } void bs() { unsigned long ...
ALGO
0.999339
3.335134
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2024-06-08T03:40: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": "e8830ed0443...
6941ad4b-362a-4508-9550-5561afaabbe4
phonpaseuth/supplemental-instructor
2017 Fall/delete_banana/delete_banana/Source.cpp
/* Write a program to remove the node of Fruit type which contains “Banana” from a given linked list and then print the updated linked list. Part of the program is given below but it is incomplete. You need to complete it. You should create your own data file. After you complete the program, please check it carefully t...
ALGO
0.994222
4.490507
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-02-20T05:47: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": "5e1dadda4f...
deea2b79-c1bb-4d77-ae0e-92fdfd64b55c
minsu20/DataStructure
7.Recursion(LinkedList)/listrec.cpp
//-------------------------------------------------------------------- // // Laboratory 7 listrec.cpp // 2020112377 컴퓨터공학과 김민수 // Partial linked list implementation of the List ADT with // additional recursive linked list functions // //----------------------------------------...
TOOL
0.901233
5.395819
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-01-30T22:46: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": "48ddd66894...
cfb63e2d-a4bc-4919-b308-585d51231639
YarKhan02/Data-Structures-And-Algorithms
LinkedList/SinglyLinkedList/Reverse.c++
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; class ListNode { public: int data; ListNode* next; ListNode(int data) { this->data = data; this->next = nullptr; } }; class SinglyLinkedList { private: ListNode* head;...
ALGO
0.999811
5.845233
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2023-06-18T20:13: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": "f0e765afb19...
3e8a387c-1615-4550-8e91-ec40a150b265
autowarefoundation/autoware_ai_planning
pure_pursuit/include/pure_pursuit/pure_pursuit.h
/* * Copyright 2015-2019 Autoware Foundation. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
TOOL
0.988037
7.599409
{ "github_metadata": { "branch": "master", "commit_count": 1610, "repo_created_at": "2020-05-29T05:42:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 220, "forks": 147, "issues": 12, "pull_requests": 1 }, "file_meta": { "content_id": "c81...
9461cbde-8f2e-4b72-88f8-c2c8318dde03
Lomna21/Coding-problems
DSA/Array/Stock_buy_and_sell.cpp
// Stock Buy And Sell // Problem Statement: You are given an array of prices where prices[i] is the price of a given stock on an ith day. // Example 1: // Input: prices = [7,1,5,3,6,4] // Output: 5 //-------------Brute Force Approach------------------- // Intuition: We can simply use 2 loops and track every transac...
ALGO
0.99985
6.126205
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2024-03-09T10:21:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f1b3f133...
4dc98d14-45bf-46dc-a20c-cb1e7e30aea2
MarcWio/PO_Lab5_MW
ModelARX.hpp
#ifndef MODEL_ARX_H #define MODEL_ARX_H #include <iostream> #include <queue> #include <random> #include "ObiektSISO.hpp" class ModelARX : public ObiektSISO { private: std::vector<double> denominatorPolynomialA; // Współczynniki dla wielomianu mianownika A std::vector<double> numeratorPolynomialB; ...
ALGO
0.972849
5.679497
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-12T18:23: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": "ba0ee598709d...
d84a547c-c12a-4991-99fa-b16fb4a4b948
Darkclaw1704/DSA-BABBAR
Lectures/lecture 53/mergeSortLL.cpp
#include <iostream> using namespace std; 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) {} }; void print(ListNode* &head){ ListNode* currentNode = head; while(c...
ALGO
0.999994
5.650119
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2023-12-16T05:56: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": "a06ee3516af...
be5e1a74-4105-4c90-be8a-4611b3a8afd6
canyos/algorithm
백준/Gold/2240. 자두나무/자두나무.cc
#include <iostream> #include <vector> #include <string> #include <queue> #include <stack> #include <algorithm> #include <map> using namespace std; typedef long long ll; int t, w; int arr[1001]; int dp[1001][31]; int result= 1; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> t >> w; for (in...
ALGO
0.999983
3.929034
{ "github_metadata": { "branch": "main", "commit_count": 314, "repo_created_at": "2024-08-16T08:08: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": "403d43ae92...
d180556d-b0c7-44ed-9298-551d3557bb86
GeekyMatrix/Code
Matrix/Special Positions in a Binary Matrix(1582).cpp
class Solution { public: // //Approach-1 (Brute Force) // //T.C : O((m*n) (m+n)) // //S.C : O(1) int numSpecial(vector<vector<int>>& mat) { int m = mat.size(); int n = mat[0].size(); int cnt = 0; for(int row = 0; row < m; row++){ for(int col = 0; col < n; col++){ ...
ALGO
0.99998
6.078025
{ "github_metadata": { "branch": "main", "commit_count": 602, "repo_created_at": "2023-07-13T07:30: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": "14877bdd8b...
4adae1fe-4c86-42f5-8f38-54cebbeab41d
quangrtit/PTIT_C_PLUS
CPP0214-So_lon_nhat_cua_day_con_lien_tuc.cpp
#include<iostream> #include<unistd.h> #include<math.h> #include<string.h> #include<cctype> #include<set> #include<limits.h> #include<map> #include<queue> #include<algorithm> #include<iomanip> using namespace std; #define MOD 1000000007 #define endl '\n' #define fast() ios::sync_with_stdio(false); cin.tie(0); void p_de...
ALGO
0.999973
4.072694
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-10-23T08:04: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": "28b58c4c997...