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
6b97cd18-d1fa-4312-9456-612b6894ad6c
dagangfang/leetcode
daily/20220729#593/Solution.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <unordered_set> #include <map> #include <utility> #include <algorithm> #include <cmath> #include <sstream> #include <deque> #include <limits.h> #include <string.h> #include <stack> #include <string> #include <list> #include <queue> using namespace...
ALGO
0.9999
5.02883
{ "github_metadata": { "branch": "main", "commit_count": 312, "repo_created_at": "2020-11-18T06:06: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": "8e2a448e7d...
84d8da83-79a5-477c-a363-403884cc88d7
AymaxLi/What-I-Learned
Data-Structure/demo/SequenceStack/sequenceStack.cpp
/** * 初始化顺序栈 * @param S 要初始化的顺序栈 * @param size 顺序栈的初始容量 * @param inc 初始增量值 * @return 状态值 */ Status InitStack_Sq(SqStack &S, int size, int inc) { S.elem = (ElemType*)malloc(size * sizeof(ElemType)); // 分配储存空间 if (S.elem == NULL) { return OVERFLOW; } else { S.top = 0; // 设为空栈 S.size = size; ...
ALGO
0.990458
4.107453
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2016-10-20T13:58: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": "361868030...
36e1c809-fbb8-4c9d-a9c7-6bf0b6b756d0
Akash21Thakur/DSA-AND-CPP-PRACTICE-PROBLEMS
data_structure/MAP STL/practice problems/longestStreakArray.cpp
#include<iostream> #include<unordered_map> #include<map> #include<vector> #include<unordered_set> using namespace std; int longestContiStreak(vector<int> v,int n) { unordered_map<int,int> m; //num,length for(int i=0;i<n;i++) { int num=v[i]; if(m.count(num)) continue; if(m.count(n...
ALGO
0.99993
3.982427
{ "github_metadata": { "branch": "main", "commit_count": 128, "repo_created_at": "2022-01-31T11:19: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": "ae63513dd7...
fea1d71a-b742-4456-9038-d05c4a317609
Rohit2301/Coding
linked_list/floyd_cycle/detect_cycle2_142.cpp
#include <bits/stdc++.h> using namespace std; class Node { int data; Node *next; }; class Node { public: int data; Node *next; Node() { data = 0; next = NULL; }; Node(int val) { data = val; next = NULL; }; }; void print(Node *head) { while...
ALGO
0.999884
4.080526
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-01-17T20:25: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": "ce5f6b136b6...
53a5150f-d4f0-47a3-a8f0-bca03f7fc48e
emp-toolkit/emp-ot
emp-ot/ferret/preot.h
#ifndef _PRE_OT__ #define _PRE_OT__ #include "emp-tool/emp-tool.h" #include "emp-ot/emp-ot.h" using namespace emp; template<typename IO> class OTPre { public: IO* io; block * pre_data = nullptr; bool * bits = nullptr; int n; vector<block*> pointers; vector<const bool*> choices; vector<const block*> pointers0; ...
ALGO
0.985299
5.21382
{ "github_metadata": { "branch": "master", "commit_count": 244, "repo_created_at": "2016-06-09T19:39:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 173, "forks": 64, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "723101...
ae6f3516-eb3c-423b-a29f-99a4a1102a15
kshumilov/NE591
submissions/shumilov_outlab06/include/methods/linalg/Axb/gauss_seidel.h
#ifndef LINALG_AXB_GS_H #define LINALG_AXB_GS_H #include <concepts> #include <vector> #include <span> #include "methods/array.h" #include "methods/linalg/matrix.h" #include "methods/optimize.h" #include "methods/linalg/Axb/utils.h" template<std::floating_point DType> constexpr auto gauss_seidel( const Matr...
ALGO
0.999703
7.236601
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2025-01-17T00:08: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": "63236588d0...
81faa9c2-0aa6-4421-976c-b873964ebda8
miakook/PS
BOJ/bfs/2589.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 50 #define REP(i, a, b) for(auto i=a; i<b; i++) int n, m, dist[MAX][MAX], dr[4] = {1,-1,0,0}, dc[4] = {0,0,1,-1}; char graph[MAX][MAX]; bool visited[MAX][MAX]; bool valid(int r, int c){ return (r>=0 && r<n && c>=0 && c<m) && (graph[r][c] == 'L'); } int m...
ALGO
0.99972
3.581787
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2019-08-12T08:50: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": "c7cfd09d...
a2ba11e0-ba48-4d7c-b443-fcdc90a48113
sky11fca/Homework-OOP
w4/1/Sort.cpp
#include "Sort.h" #include <stdio.h> #include <stdlib.h> #include <cstring> #include <cstdarg> #include <cstdlib> Sort::Sort(int nr, int min, int max): size(nr) { int i; srand(time(NULL)); for(i=0; i<size; i++) { this->arr[i]=rand()%(max-min+1)+min; } } Sort::Sort(int *init, int nr): size(...
ALGO
0.994145
4.563514
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-03-05T16:15: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": "28d0a082e3a...
062b3fbe-2640-4ffc-b315-927c874e8fb7
Next-Gen-UI/Code-Dynamics
Leetcode/0581. Shortest Unsorted Continuous Subarray/0581.cpp
class Solution { public: int findUnsortedSubarray(vector<int>& nums) { const int n = nums.size(); int mini = INT_MAX; int maxi = INT_MIN; bool meetDecrease = false; bool meetIncrease = false; for (int i = 1; i < n; ++i) { if (nums[i] < nums[i - 1]) meetDecrease = true; if...
ALGO
0.999958
6.146423
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2022-01-06T07:57:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 44, "forks": 35, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "650e1a6050...
3b5d3ca0-ca06-4116-ba7a-602761d17ea8
Ruturaj54/C-CPP-JAVA-Compitative-Programs
Assignment28_1.cpp
//Problem Statement:1.Write a program which accept string from user and accept one //character. Check whether that character is present in string or not. //Input : “Marvellous Multi OS” //e //Output : TRUE //Input : “Marvellous Multi OS” //W //Output : FALSE #include<iostream> using namespace std; class Alpha { ...
TOOL
0.966907
4.522435
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-03-08T09:27: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": "18102f2754...
85362974-1ecc-4c72-aaca-72cf8de1b021
Yasin-Durra/problems
B_Minesweeper.cpp
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define pb push_back #define mpa make_pair #define fr first #define sc second #define ever (;;) #define pii pair<int, int> #define pll pair<ll, ll> #define SPEED \ ios::sync_with_stdio(0); \ cin.tie(0); \ ...
ALGO
0.999957
3.944872
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-07-08T15:11: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": "84d8bf51349b...
842cafbc-30ed-43d9-a012-ac55d01dfe9c
blender/blender
extern/ceres/include/ceres/cubic_interpolation.h
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2023 Google Inc. All rights reserved. // http://ceres-solver.org/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of so...
ALGO
0.999399
7.566699
{ "github_metadata": { "branch": "main", "commit_count": 152123, "repo_created_at": "2019-10-09T12:47:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15670, "forks": 2395, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8...
81a5812d-a3f2-49b6-9c93-45a4965bdd6b
dhdhdh-stream/sorting
side_experiments/reward_signal/solution/commit_experiment_helpers/explore_helpers.cpp
// #include "commit_experiment.h" // #include <iostream> // #include "action_node.h" // #include "branch_experiment.h" // #include "branch_node.h" // #include "constants.h" // #include "globals.h" // #include "new_scope_experiment.h" // #include "obs_node.h" // #include "problem.h" // #include "scope.h" // #include "...
ALGO
0.991006
6.744353
{ "github_metadata": { "branch": "main", "commit_count": 850, "repo_created_at": "2022-06-18T02:24: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": "0571b53888...
ed3ca012-f8bb-4a33-b363-ff676f3dcdf7
alexfreud/winamp
Src/Plugins/General/gen_crasher/feedback/xzip/XZip.cpp
// XZip.cpp Version 1.1 // // Authors: <NAME> et al. (see below) // // Modified by: <NAME> // <EMAIL> // // Version 1.0 - Turned C files into just a single CPP file // - Made them compile cleanly as C++ files // - Gave them simpler APIs // - Added the abi...
TOOL
0.96206
3.691916
{ "github_metadata": { "branch": "community", "commit_count": 9, "repo_created_at": "2024-09-24T14:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 435, "forks": 3010, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "ef...
b5eaf4c5-9e35-4058-8c9c-66113dcbc60f
ishandutta2007/codeforces-r
rajat1603/normal/543/B.cpp
#include "bits/stdc++.h" using namespace std; const int N = 3e3 + 3; const int inf = 1e9; int n , m; int a , b; vector < int > v[N]; int s1 , t1 , l1 , s2 , t2 , l2; int dist[N][N]; int ans; void bfs(int start){ for(int i = 1 ; i <= n ; ++i){ dist[start][i] = inf; } dist[start][start] = 0; queue...
ALGO
0.999844
3.6083
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1abe3012ef25...
365f6fa5-9a92-43fd-8ba0-fb4d61a87ef2
steemit/steem
libraries/fc/include/fc/crypto/blowfish.hpp
//////////////////////////////////////////////////////////////////////////// /// // Blowfish.h Header File // // BLOWFISH ENCRYPTION ALGORITHM // // encryption and decryption of Byte Strings using the Blowfish encryption Algorithm. // Blowfish is a block cipher that encrypts data in 8-byte blocks. The algorith...
TOOL
0.933195
6.336386
{ "github_metadata": { "branch": "main", "commit_count": 5156, "repo_created_at": "2016-03-23T00:17:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1954, "forks": 792, "issues": 349, "pull_requests": 8 }, "file_meta": { "content_id": "89b...
4115003a-52c5-455e-b455-bff0b30835c8
armandogutierrez4802/GutierrezArmando_CSC5_Spring2017
Hmwk/Assignment_2/Assignment_3/Savitch_8thEd_Chap3_Prob17_ActivityLevel/main.cpp
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.cpp * Author: <NAME> * Created on March 7th, 2017, 10:00 PM * Purpose: To update the user's BMR based on activ...
DATA
0.969062
3.820992
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-03-07T19:46:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9b717ce6...
0be0843b-66b0-4b0f-afa6-dd72d9a02649
facebookresearch/xformers
third_party/sputnik/sputnik/spmm/cuda_spmm.h
// Copyright 2020 The Sputnik Authors. // // 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 agre...
TOOL
0.981189
7.212935
{ "github_metadata": { "branch": "main", "commit_count": 1070, "repo_created_at": "2021-10-13T18:08:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9754, "forks": 695, "issues": 323, "pull_requests": 7 }, "file_meta": { "content_id": "6f2...
28f59a62-1744-4fb1-9989-99b188ec37ae
seekaddo/breath
breath/random/subrange_max.hpp
// =========================================================================== // Copyright 2011-2013 <NAME> // // Licensed under the 3-Clause BSD License. // (See accompanying file 3_CLAUSE_BSD_LICENSE.txt or // <https://opensource.org/licenses/BSD-3-Clause...
ALGO
0.969482
5.467469
{ "github_metadata": { "branch": "master", "commit_count": 2489, "repo_created_at": "2020-08-24T09:41: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": "09371fa...
586fcc0f-d14e-41dc-b850-a7afd92eb1c4
MadVyang/boj
solved/1068.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll N; int p[55]; bool isAlive(int i) { if (i == -1) return true; if (i == -2) return false; return isAlive(p[i]); } bool isLeaf(int i) { for (int j = 0; j < N; j++) { if (p[j] == i) return false; } return isAlive(p[i]);...
ALGO
0.999816
3.63252
{ "github_metadata": { "branch": "main", "commit_count": 380, "repo_created_at": "2021-12-13T23:52:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "7be4642d81...
cfa9bc8a-bf19-4f56-9c46-ae16bf846675
HectorIGH/Competitive-Programming
Leetcode Challenge/06_June_2020/C++/Week 2/5_Insert Delete GetRandom O(1).cpp
//Design a data structure that supports all following operations in average O(1) time. // // // //insert(val): Inserts an item val to the set if not already present. //remove(val): Removes an item val from the set if present. //getRandom: Returns a random element from current set of elements (it's guaranteed that at l...
ALGO
0.98967
6.299315
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2020-07-16T01:13: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": "3782ab4d5...
b3ea353d-85f6-40e7-9902-a0cd83b5a8aa
PiotrHernik/Informatyka-Algorytmiczna
aod/lista1/zad1/BFS.cpp
#include "BFS.hpp" BFS::BFS(Graph* graph): graph(graph) { distance = new int[graph->amountOfVertices + 1]; parent = new int[graph->amountOfVertices + 1]; for (auto i = 1; i <= graph->amountOfVertices; i++) { distance[i] = -1; parent[i] = 0; } } BFS::~BFS() { delete[] distance; ...
ALGO
0.9859
3.545124
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2024-10-21T18: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": "716bb2953d1...
dafd3044-2985-4405-b074-54dcdb134bc7
zw267/acm-icpc
data structure/cf258E.cpp
//File Name: cf258E.cpp //Author: long //Mail: <EMAIL> //Created Time: 2016年05月02日 星期一 14时39分40秒 #include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <vector> #include <map> #include <queue> #d...
ALGO
0.999961
3.484978
{ "github_metadata": { "branch": "master", "commit_count": 188, "repo_created_at": "2017-06-27T22:28: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": "c3af6f37...
5c0d4a17-0fe6-4b5b-a9c3-4f535f203433
victorGeek9/Euler
48.cpp
#include <iostream> #include <cmath> using namespace std; void sum(short*& arr1, short*& arr2, int arr_size1, int arr_size2, short*& result); void comp(short*& arr1, short*& arr2, int arr_size1, int arr_size2, short*& result); namespace { short* result = new short[5010], *templ = new short[5010]; short* temp = new sh...
ALGO
0.999855
4.241884
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-10-24T19:39: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": "47f8881d8...
c1c5810e-3fd5-45a3-803e-15b1697400a1
Yuvraj883/CPP-DSA
Arrays/19_keyAndSegment.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int n; cout << "Enter the size of the array: "; cin>>n; int arr[n]; cout << "Enter the array elements: "; for (int i = 0; i < n; i++) { cin >> arr[i]; } bool isPresent = true; int key, segme...
ALGO
0.999998
4.701248
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2021-01-17T17:23:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab18b6105bb...
f95ab351-255e-4af3-8067-cca7a14efcfa
fang-tech/Algorithm
Solution/last/Code/hdu/2602.Bone collector.cpp
#include <cstring> #include <iostream> #include <algorithm> using namespace std; int N, C; int w[1000+3], c[1000]; int dp[1000+3][1000+3]; const int INF = 0x3f3f3f3f; int package(int i, int j) { if (dp[i][j] != INF) return dp[i][j]; if (i == 0 || j == 0) {dp[i][j] = 0; return dp[i][j];} if (c[i] > j) retu...
ALGO
0.999998
3.703757
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-17T06:01: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": "602c189bf005...
0925fa71-ad93-4a2c-b670-134196abbb1e
NgTienHungg/PTIT-Source
TRR 2/6_2_ShortestPathUsingDijkstraAlgorithm.cpp
#include <bits/stdc++.h> #define II pair<int, int> #define inf 1e9 using namespace std; int n, s, u, v, w; vector<vector<II>> G; vector<int> d, truoc; vector<bool> vs; struct cmp { bool operator() (II a, II b) { return a.second > b.second; } }; void Dijkstra(int s) { d[s] = 0, vs[s] = true; p...
ALGO
0.999913
3.701781
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2021-07-04T02:14:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 130, "forks": 36, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aff223f...
604258cb-1548-4d3c-b2d9-59c06d30915e
zhgn/whiteboard-code
leetcode/leetcode/Palindrome_Partitioning.cpp
/* Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ["aa","b"], ["a","a","b"] ] */ #include "stdafx.h" #include <string> #include <vector> using namespace std; class Sol...
ALGO
0.99986
6.148774
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2013-12-03T15:54: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": "7afad4e32...
c8f18a69-129b-4f6b-9426-895d6916d8aa
ds4dm/ecole
libecole/src/instance/independent-set.cpp
#include <array> #include <stdexcept> #include <fmt/format.h> #include <range/v3/range/conversion.hpp> #include <range/v3/view/enumerate.hpp> #include <range/v3/view/iota.hpp> #include <range/v3/view/transform.hpp> #include "ecole/instance/independent-set.hpp" #include "ecole/scip/cons.hpp" #include "ecole/scip/model...
ALGO
0.914897
7.477455
{ "github_metadata": { "branch": "master", "commit_count": 1512, "repo_created_at": "2019-10-18T13:59:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 347, "forks": 76, "issues": 52, "pull_requests": 7 }, "file_meta": { "content_id": "6c94...
d2f3bbd7-634a-4811-a28e-fd9f382db0c1
colorbox/leetcode
127/step1.cpp
/* Solve Time : over 1 hours Time : O(N^2 * log N) Space : O(N^2) 単語同士の距離から隣接リストを形成して探索すれば良い、というところまではすぐにたどり着いたが 微妙なミスを連発してしまい、時間がかかってしまった。 priority_queueのデフォルが最大を取り出す仕様を失念していた 最短距離を出す探索方法をしばらく失念しており、間違ったコードを書いていた */ class Solution { public: int ladderLength(string beginWord, string endWord, vector<string>& wor...
ALGO
0.999994
6.053832
{ "github_metadata": { "branch": "main", "commit_count": 134, "repo_created_at": "2024-02-13T16:52:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "47031f752a...
b8ad498f-a20e-476c-a565-f9e1b1781116
alan0526/MtfMapper-1
src/loess_fit.cc
/* Copyright 2011 <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 list of conditions and the following dis...
ALGO
0.99994
5.679756
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-05-25T00:24: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": "b2224ccc4f...
94188caa-7f73-47b0-8409-926b764f0419
mk28r/Competative_Programming
selectionsort.cpp
#include<bits/stdc++.h> using namespace std; void swap(int *p , int *q ) { int temp = *p; *p = *q; *q = temp; } void bubble(int arr[], int n) { int i, j; for (i = 0; i < n - 1; i++) //pass will be n-1 for (j = 0; j < n - i - 1; j++)//n-i-1 length reduce kar rha ha taki element lock hote rhe if (arr[j] ...
ALGO
0.999991
4.870879
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-06-11T09:35: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": "2c12d239b27...
ea8e0fd5-3dac-448e-be37-e3bbc2b4189d
Kenkindom/LeetCode
225. Implement Stack using Queues.cpp
//C++ Code //Title Implement Stack using Queues //Difficulty Easy class MyStack { public: /** Initialize your data structure here. */ MyStack() { } /** Push element x onto stack. */ void push(int x) { s.push(x); } /** Removes the element on top of the stack a...
ALGO
0.999635
5.687339
{ "github_metadata": { "branch": "master", "commit_count": 243, "repo_created_at": "2018-04-01T14:02: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": "075b6ebb...
34d9b0f2-8da1-40a4-b99d-f2142afcee1d
anderqxr/POO
array list ( II )/Topic/solver.cpp
#include <iostream> #include <vector> #include <sstream> #include <memory> #include <utility> #include <aux.hpp> class Pass{ std::string id; int idade; public: Pass(std::string id = "", int idade = 0 ){ this->id = id; this->idade = idade; } void setId(std::string id) { thi...
TOOL
0.953299
4.409369
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-09-08T15:44:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f3d3445e63...
87b9e30e-85de-40c7-a378-1cff3e0feb14
MultivacX/leetcode2020
algorithms/medium/0775. Global and Local Inversions.h
// 775. Global and Local Inversions // Runtime: 416 ms, faster than 5.16% of C++ online submissions for Global and Local Inversions. // Memory Usage: 71.3 MB, less than 14.29% of C++ online submissions for Global and Local Inversions. // Time Complexity: O(N * lg(N)). // Space Complexity: O(1). class Solution { ...
ALGO
0.999991
5.509424
{ "github_metadata": { "branch": "master", "commit_count": 1856, "repo_created_at": "2019-12-31T13:19: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": "e8ce58e...
65efdbf0-4a8c-438b-bf5d-bc4a7a8c8ebc
DaisyCheng102/arts_of_coding_and_algorithms
gettingpoints.cpp
#include <iostream> #include <fstream> using namespace std; int main() { ios::sync_with_stdio(false); ifstream fin("gettingpoints.txt"); cin.rdbuf(fin.rdbuf()); int cases; cin >> cases; while (cases--) { long long n, p, l, t; cin >> n >> p >> l >> t; // k: number of...
ALGO
0.999843
3.50111
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-09-04T03:28: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": "2a6b862bf17...
b43cde45-03f4-4336-847f-b8a3826b559c
susantabiswas/Software-Interview-Essentials
Leetcode/Greedy/gas-station.cpp
/* https://leetcode.com/problems/gas-station/ TC: O(n) SC: O(1) Points to note: 1. We can only cover the path if total fuel > total distance cost 2. We can only reach a stop if there is >= distance from the previous stop 3. This means each time we reach a stop, there is a possibili...
ALGO
0.999971
6.093342
{ "github_metadata": { "branch": "master", "commit_count": 1053, "repo_created_at": "2019-04-01T15:21:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9814898...
a0a06eb8-845b-4ff8-8b53-d0fdba5006b2
hgarbeil/tirfallwin
geomag.cpp
/* PROGRAM MAGPOINT (GEOMAG DRIVER) */ /************************************************************************ Contact Information Software and Model Support National Geophysical Data Center NOAA EGC/2 325 Broadway Boulder, CO 80303 USA Attn: <NAME> or <NAME> Phone: (303) 497-6478 or -6522 Email: ...
ALGO
0.973038
3.880413
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-08-22T22:52: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": "26cde3c9ee...
fe122f6e-17e6-4998-a7d7-f025a2f7b41b
AniruddhSharma23/LeetCode-Solutions
Prime Number of Set Bits in Binary Representation.cpp
class Solution { public: bool isPrime(int n) { if (n <= 1) { return false; } if (n <= 3) { return true; } if (n % 2 == 0 || n % 3 == 0) { return false; } for (int i = 5; i * i < n; i += 6) ...
ALGO
0.999981
5.458116
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2022-03-26T08:50: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": "2b202567a49...
2d02b503-f2d1-4909-9fd8-9123fbde952c
Kelym/ACM_Training_Archive
ICPC/2014 North America Southeast Regionals/-Hy-phe-na-tion -v2.cpp
#include <cstring> #include <iostream> #include <vector> using namespace std; char toLower(char c){ if(c>='A' && c<='Z') c = 'a'+c-'A'; return c; } bool isVowel(char c){ return (c=='a' || c=='e' || c=='i' || c=='o' || c=='u' || c=='y'); } bool isDoubleConsonant(string s){ s[0]= toLower(s[0]); s[1]= toLower(s[1]...
ALGO
0.999761
3.474525
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2015-10-05T04:17:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58e6fcf39...
1df16dfa-0590-4887-ace2-92390287217a
katshup/544
Challenge6/hearbeat_c_or_i/hearbeat_c_or_i.ino
#include <XBee.h> #include <SoftwareSerial.h> #include <TimerOne.h> #define HELLO 0x11 #define LEADER 0x12 #define NODE 0x13 #define INFECT 0x04 #define CLEAR 0x05 #define ELECTION 0x06 #define LEADER_HEARTBEAT_c 0x07 #define LEADER_HEARTBEAT_i 0x08 #define RedPin 7 #define BluePin 8 #define GreenPin 9 #define Button...
TOOL
0.920606
4.116479
{ "github_metadata": { "branch": "master", "commit_count": 359, "repo_created_at": "2015-09-08T19: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": "3be3105c...
02524ded-09ed-42fb-a956-6ef7d510ae83
RishabhRD/leetcode_problems
contests/312/3.cc
#include <algorithm> #include <array> #include <bitset> #include <cmath> #include <deque> #include <iostream> #include <iterator> #include <limits> #include <map> #include <numeric> #include <optional> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> ...
ALGO
0.999897
6.428608
{ "github_metadata": { "branch": "master", "commit_count": 212, "repo_created_at": "2021-07-09T10:41: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": "a8d41feb...
8c19c15b-96ab-42d4-b077-4bb9c0b10e8e
oishikm12/cpp-collection
datastructures/singlylinkedlists/delete_greater_right.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; Node(int val = 0, Node *link = NULL) : data(val), next(link) {}; ~Node() { delete next; } }; Node* build(Node *, int); void print(Node *); Node* reverse(Node *); Node* compute(Node *); int main() ...
ALGO
0.999952
4.610613
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2021-01-17T19:12:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b74abfb02...
8cff09e7-f556-430e-80cd-c3306b5e193b
anantsingh404/GeeksforGeeks
Difficulty: Medium/Flood fill Algorithm/flood-fill-algorithm.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int col=0; int n,m; vector<vector<int>>vis; void solve(int i,int j,vector<vector<int>>&im,int nc) { if(i>=n || i<0 || j>=m || j<0 || im[i][j]!=col || vis[i][j]==1) { return; }...
ALGO
0.991476
6.141255
{ "github_metadata": { "branch": "main", "commit_count": 888, "repo_created_at": "2024-05-30T17:40: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": "2375f9fa61...
ca844eb9-72d6-4d77-9eb6-74053288f641
deguchi-04/pm_proj3
src/pm_proj2/src/detector.cpp
#include "pm_proj2.h" ros::Publisher pub_obs; ros::Publisher pub_dist; ros::Publisher pub_bb; void callback_point_cloud(const sensor_msgs::PointCloud2ConstPtr &pcl_msg) { // ref: https://pcl.readthedocs.io/en/latest/cluster_extraction.html#compiling-and-running-the-program pcl::PCLPointCloud2 point_cloud; ...
DATA
0.954376
3.231498
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-01-03T20:43: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": "02c6a96614b...
fc8507aa-5519-4919-9971-869c4ada778c
MohamedMamdouh18/Problem-Solving
Code Forces Problems/Level A/Three swimmers/main.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define eb emplace_back #define se second #define fi first #define el "\n" #define ll long long #define all(a) a.begin(),a.end() #define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define PREC cout.precision(20); const ll mod = 1e9 + 7,...
ALGO
0.99992
4.932257
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2023-03-31T21:01: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": "037f55363a6...
9c77d9b2-f9fa-40de-b0b2-89440c278608
Ixorlive/algos
itmo/c6/F.cpp
#include <cstring> #include <iostream> #include <sstream> #include <vector> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vector<int>>; using vb = vector<bool>; const ll MAX = 1e9; struct Edge { ll c, f; int u, v, rev; }; using ve = vector<Edge>; struct Graph { vvi adj;...
ALGO
0.999973
3.890454
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-04-20T16:21: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": "655f7f13786e...
1bff4cb0-e95d-42f8-951d-c50ec838ce56
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/15/12/19.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <vector> #include <algorithm> #define SZ(x) ((int)(x).size()) #define FOR(it, c) for(__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it) using namespace std; typedef long long LL; int T, cs; LL a[1005]; void solve() { int B...
ALGO
0.999924
3.416158
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "94af8b12...
6b877b51-bf03-44cc-a5d9-a3eb4e142185
NataRazmochaeva/ADS_7383
Chemova_Ksenia_lr3/stack.cpp
#include "stack.hpp" void Stack::pop() { // удаляем верхний элемент if (head == NULL) { cerr<<"Stack is empty"<<endl; return; } Stack *temp = head; head = head->prev; delete temp; } void Stack::push(char b) { // добавляем новый элемент Stack *temp; temp = new Stack; temp->br = b; temp->prev ...
ALGO
0.935972
3.767951
{ "github_metadata": { "branch": "master", "commit_count": 511, "repo_created_at": "2018-09-17T06:43:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 17, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f6f3a36...
f4d5756e-8a48-4076-9e17-5e1ae1a0698d
nullyng/AlgorithmStudy
week3/juyoung/problem1/problem1.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); int N, M; int A[100000]; cin >> N; for (int i = 0; i < N; i++) cin >> A[i]; sort(A, A + N); cin >> M; for (int i = 0; i < M; i++) { int input; cin >> ...
ALGO
0.999968
4.496745
{ "github_metadata": { "branch": "main", "commit_count": 505, "repo_created_at": "2022-11-28T08:15:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35d5d0eed0...
11e1f91d-7251-4e0b-b4f0-e7ae916ef620
MuhammadBinIsmail/OOP-ASSIGNMENTS
LAB ASSIGNMENT # 4/TASK3.cpp
#include <iostream> using namespace std; class DynamicArray { private: int *data; int length; public: DynamicArray() : data(nullptr), length(0) {} DynamicArray(int size) : length(size) { data = new int[length]{}; } DynamicArray(const DynamicArray &other) : length(other.length) {...
TOOL
0.953953
5.204953
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2025-01-27T19:39: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": "fd5183bdd98...
8271bbb1-7d1d-435c-8db0-a2c73933a396
renjmindy/PythonPractice
LeetCode/Explore/TopInterview/Blind75/Tree/102_binary_tree_level_order_traversal.cpp
// Recursion // Complexity Analysis // Time complexity : \mathcal{O}(N)O(N) since each node is processed exactly once. // Space complexity : \mathcal{O}(N)O(N) to keep the output structure which contains N node values. /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *lef...
ALGO
0.999972
6.675782
{ "github_metadata": { "branch": "main", "commit_count": 2339, "repo_created_at": "2021-03-18T05:28: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": "ef03331e6...
3aada0b1-2e46-464f-bb65-f7e94bdc8bdc
shreyas-k98/CPP
rotate.cpp
#include<bits/stdc++.h> using namespace std; void arrayrotate(int arr[], int n, int d){ int temp[d]; for(int i=0;i<d;++i){ temp[i]=arr[i]; } for(int i=d;i<n;++i){ arr[i-d]=arr[i]; } for(int i=0;i<d;++i){ arr[n-d+i]=temp[i]; } for(int i=0;i<n;++i){ cout<...
ALGO
0.999954
4.891715
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-08-02T08:07: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": "e07b14a157...
15c20684-80ff-4596-8a54-b266a7c5aba7
agrmadhav/datasSructuresAndAlgo
stack/evaluation.cpp
#include<iostream> using namespace std; #include<stdlib.h> #include<stdio.h> struct node { int data; struct node*next; }*top = NULL; void push(int x) { struct node*t; t= (struct node*)malloc(sizeof(struct node)); if(t== NULL) { cout<<"stack overflow or heap is full"<<endl; } e...
ALGO
0.999906
3.601242
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-08-30T03:55: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": "d8e64c62f0...
ef80d16e-0559-46ba-8e5b-42c0cd579e46
autowarefoundation/autoware_ai_planning
mpc_follower/src/lowpass_filter.cpp
/* * Copyright 2018-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...
ALGO
0.973329
5.685745
{ "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": "6a1...
847b4e14-a859-4c75-b29a-445663865e51
ymj68520/cfiles
LeetCode/19_删除链表的倒数第N个节点.cc
#include <iostream> #include <climits> #include <vector> #include <unordered_map> #include <string> #include <cstring> #include <sstream> #include <cmath> #include <algorithm> using namespace std; /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : v...
ALGO
0.999971
4.823008
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2022-11-27T14:09: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": "89f46e88a...
b01c3876-bf9e-48ce-9a11-d75e5a6db528
harsh-797/codeforces
main.cpp
#include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define pb push_back #define pob pop_back #define mp make_pair #define ff first #define ss second #define pi 3.14159265 #define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0) typedef long long ll; typedef unsigned long long ull; typedef long doub...
ALGO
0.999976
3.675821
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-01-02T08:15: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": "563ccc031...
accd5832-1d2c-444e-9321-2cb6b2af52f5
Biggergig/Advent-Of-Code
2018/c++/Day 13/main.cpp
#include "../aoc.h" #include "../point.h" #include <bitset> struct cart{ Point p; short turn; short dir; char onSquare; cart(int x, int y, short dir):p(x,y), turn(0), dir(dir){ switch(dir){ case 0: case 2: onSquare = '|';break; case 1: case 3: onSquare = '-';break; } } }; Point dirMod[4] = {Poin...
ALGO
0.999943
4.905156
{ "github_metadata": { "branch": "master", "commit_count": 584, "repo_created_at": "2021-03-22T04:59:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6cb8e306...
2e74298a-091a-46cc-817b-dc6c83677b07
kkishi/atcoder
contests/abc288/abc288_d/main.cc
#include <bits/stdc++.h> #include "atcoder.h" #include "cumulative_sum.h" void Main() { ints(n, k); V<int> a(n); cin >> a; VV<int> b(k); rep(i, n) b[i % k].eb(a[i]); V<CumulativeSum1D<int>> cs; rep(i, k) cs.eb(CumulativeSum1D(b[i])); ints(q); rep(q) { ints(l, r); --l; // Take the last k ...
ALGO
0.999766
4.768502
{ "github_metadata": { "branch": "master", "commit_count": 924, "repo_created_at": "2020-05-17T21:30: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": "ec8ceb2f...
16f44966-548b-444a-980b-59af6ae13c1c
ChenKang256/FPDB
fpdb-expression-gandiva/src/And.cpp
// // Created by matt on 11/6/20. // #include <fpdb/expression/gandiva/And.h> #include <gandiva/tree_expr_builder.h> #include <sstream> using namespace fpdb::expression::gandiva; And::And(const vector<shared_ptr<Expression>>& exprs): Expression(AND), exprs_(exprs) { } void And::compile(const shared_ptr<arrow::...
TOOL
0.931589
6.537205
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-07-24T03:36:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31d413e45c5...
74c4de31-4a35-4d10-acc0-483f42ded2cf
HliasMpGH/Permutation-Flow-shop
src/Heuristics.cpp
#include "headers/Heuristics.h" Solution Heuristics::neh(std::map<std::string, std::vector<int>> times) { int jobsNum = times["M1"].size(); if (jobsNum < 2) { return Solution({1}, times); } std::vector<int> sortedJobs = sortJobs(times); Solution finalSolution(times); // sort the firs...
ALGO
0.999904
4.261514
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-03-19T21:42:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb978bcf8f9...
00f19e61-4d37-43c7-bef5-196b7e731fc3
AdityaDabgotra/dsaQuestions
Take_U_Forward/BST/inorder_sucessor_BST.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(r...
ALGO
0.999997
4.393973
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2025-05-03T02:20: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": "4a76b29d49b...
2445300b-1409-4597-82ae-1ec049a985a1
xtrkoi/Competitve_Programming
spoj - vnoi/dfs-bfs/chinh_dong_ho/clock.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define X first #define Y second #define sz(A) A.size() typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; struct state { int clock[3][3]; }; state st; queue<state> q; bool make_move[9][9] = {{1, 1, 0, 1...
ALGO
0.999956
3.582802
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-05-29T15:51: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": "0defe1e266...
24b6fb6d-78a8-4d3d-ace2-b7efc4b5a5ce
juliettepera/3DMetricTools
Libraries/MeshValmet.cxx
/* 3DMeshMetric is a visualization tool used to measures and display * surface-to-surface distance between two triangle meshes. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either vers...
TOOL
0.921009
3.212118
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2013-11-08T16:10:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f85a78fe...
0a2ec2e8-f7a8-4e34-8ff7-8c3a3062acd3
Jajopi/Plachy-bc-thesis
src/ilp/optimize.h
#define GUROBI_DIR "./gurobi/gurobi_c++.h" #include <vector> #include <sstream> #include <math.h> #include <map> #include <set> #include GUROBI_DIR #include "../kmers.h" template <typename kmer_t> class PathFinder : public GRBCallback { size_t K; bool COMPLEMENTS; std::vector<kmer_t> const &kMers; s...
ALGO
0.999977
5.32329
{ "github_metadata": { "branch": "main", "commit_count": 212, "repo_created_at": "2024-11-03T11:38: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": "f652555980...
117a71d7-4a75-46b5-b4b0-a36b85cb80e4
mshen119/Projects
callcenter/MyCallCenter.cpp
#include "MyCallCenter.h" #include <iostream> CallCenter* CallCenter::create(std::vector<Employee> employees) { return new MyCallCenter(employees); } MyCallCenter::MyCallCenter(std::vector<Employee> employees){ //sort all employees with skill. Useless near front, most valued near back. No need for maps ;] sort...
ALGO
0.973658
4.567398
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-09-19T17:17: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": "8d7f2d62e...
633f49b1-eb88-4ffe-9f15-86fb150a354c
IhmeGroup/PMCToolbox
src/oneD/StFlow_PMB.cpp
//! @file StFlow_PMB.cpp // This file is part of Cantera. See License.txt in the top-level directory or // at https://cantera.org/license.txt for license and copyright information. // ======================================================================== // <NAME>, Karlsruhe Institute of Technology // <NAME>, Sta...
ALGO
0.915793
5.951109
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2023-07-18T18:54:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 3, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "b1a634affce7...
dc15fa6f-017b-41e8-84f3-7b9c0a497c99
Plabon-Dutta/Competitive-Programming
Graph/Subtree Sum Pre Computation.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 7; vector <int> graph[N]; int val[N]; int subtreeSum[N]; int depth[N]; void DFS(int vertex, int parent = 0) { subtreeSum[vertex] += val[vertex]; for (auto child : graph[vertex]) { if (child == parent) continue; DFS(child, verte...
ALGO
0.999966
4.418628
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2023-03-03T13:50:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1915616a13...
f700469d-372c-4ec9-abdb-35fb8a2bea08
Shakil-Muhit/Billiard-
vec.cpp
/* This module contains necessary functions about vectors */ #include "include/vec.h" #include <math.h> #include "include/consts.h" double dist(point a,point b){ return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)); } point rotate(point p,double x){ return {p.x*cos(x)-p.y*sin(x),p.y*cos(x)+p.x*sin(x)}; } Vec tove...
TOOL
0.963188
5.36947
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-06-26T15:13: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": "26134fa599c0...
efe215fa-6b05-4e10-bc15-8251febab1e8
jj116/Theory-of-Computaion
Thompson_NFA.cpp
#include<iostream> #include<vector> #include<string> #include<set> #include<stack> using namespace std; struct transition { int vertex_from; int vertex_to; char transition_symbol; }; class Non_Finite_Automata { public: vector<int> vertex; vector<transition> transitions; int final_state; Non_Finite_Automata...
ALGO
0.999872
3.798412
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2017-03-09T04:24:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f8d9fe8fe...
a44df3eb-1f76-48a2-9a6a-9a6f557b52e5
Bastozzz/Anos15-17
POO/P11/P11/Fracao.cpp
#include "Fracao.h" using namespace std; Fracao::Fracao(int x, int y) : num(x) { if (y == 0) den = 1; else den = y; } void Fracao::setNum(int x) { num = x; } void Fracao::setDen(int x) { if (x != 0) den = x; } Fracao& Fracao::operator*=(const Fracao& x) { *this = *this * x; return *this; } Fracao Fracao::op...
TOOL
0.971638
5.504278
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2020-11-10T09:45:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c271606c699e...
6f4da97d-440c-4752-90e2-9280b8538072
manoj-sahu-dev/cpp
advance-class/dynamic-programming/scaler/min-sqaures.cpp
#include <bits/stdc++.h> using namespace std; class Solution { private: int countMinSquaresRecursive(int A) { if (A == 0) { return 0; } int count = A; for (int i = 1; i * i <= A; i++) { int temp = i * i; count = min(1 + count...
ALGO
0.999711
4.648648
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2022-06-25T06:32: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": "7118d50a8...
c56558bc-e4a5-4fa9-8b55-622bc3a44256
raincross7/code-similarity
codes/train_code/problem497/problem497_97.cpp
#include<bits/stdc++.h> using namespace std; #define FOR(i, x, y) for(int i = (x); i < (y); ++i) #define REP(i, x, y) for(int i = (x); i <= (y); ++i) #define MP make_pair #define PB push_back #define PH push #define fst first #define snd second typedef long long ll; typedef unsigned long long ull; typedef double db; ...
ALGO
0.999936
3.122204
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8988531244f...
db2cf757-1e75-460c-8423-0a291bdc0514
viren-sureja/Love-Babbar-450
03_string/29_first_repeated_word_in_string.cpp
/* link: https://practice.geeksforgeeks.org/problems/second-most-repeated-string-in-a-sequence0534/1# */ // ----------------------------------------------------------------------------------------------------------------------- // /* using map we would have use the stack (priority_queue of min_heap as w...
ALGO
0.999945
4.261942
{ "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": "d43cc...
8d3ccec8-a2c1-40c8-a648-5a01bc471950
Leapense/problems
20416번: 역전의 제왕 (Easy)/역전의 제왕 (Easy).cpp
#include <iostream> #include <vector> #include <sstream> #include <string> #include <algorithm> #include <cassert> using namespace std; struct Frozen { int problem; int time; // in minutes int subCount; }; struct Participant { int id; int solved = 0; int penalty = 0; int lastTime = 0; // l...
ALGO
0.999921
4.588737
{ "github_metadata": { "branch": "master", "commit_count": 2661, "repo_created_at": "2024-10-12T10:53: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": "0f5ba0f...
499567e3-8a37-4e83-9cc5-169950711a05
Saifu0/Competitive-Programming
CP/1500/658A.cpp
// ----- In the name of ALLAH, the Most Gracious, the Most Merciful ----- #include<bits/stdc++.h> using namespace std; #define NINJA ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define fo(i,n) for(int i=0;i<n;i++) #define Fo(i,k,n) for(int i=k;i<n;i++) #define for1(i,n) for(int i=1;i<=n;i++) #define dloop(i...
ALGO
0.999968
3.343627
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-08T08:09:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba401cf2ee...
059fb4ad-b1d4-4024-8dae-1da75412439b
AlienceGG/LeetCode-3
problems/010.Regular_Expression_Matching/AC_dfs_n!.cpp
/* * Author: illuz <<EMAIL>]<EMAIL>> * File: AC_bruteforce_n!.cpp * Create Date: 2014-12-01 08:11:49 * Descripton: I guess its complexity is n! (worst) * if p[j+1] == '*' -> (i+1,j+1) * else if p[i] == p[j] -> (i+1, j+2) or (i, j+2) * else -> (i, j+2) */ #i...
ALGO
0.999544
3.896457
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2017-02-27T15:37:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5880b82...
1d42272d-b752-41c9-bf71-c5b24d727f15
jjlynch2/z-transform-method
src/Variance.h
/* * Variance.h * * Created on: Jan 14, 2017 * Author: Julia */ #ifndef VARIANCE_H_ #define VARIANCE_H_ #include <iostream> #include <math.h> using namespace std; template <class T> class Variance { public: Variance(); virtual ~Variance(); double getVar(const T *, const int, const double) const; doubl...
ALGO
0.906449
5.187469
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2018-10-04T08:55: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": "f4ff9e7a6...
f531f541-164d-4733-832f-2b1872d51681
StevenDunn/CodeEval
StringList/cpp/StringList.cpp
// String List solution in C++ for CodeEval.com by <NAME> #include <algorithm> #include <cstdlib> #include <fstream> #include <iostream> #include <sstream> #include <string> using std::cout; using std::endl; using std::ifstream; using std::ostringstream; using std::sort; using std::string; void printPermutations(int...
ALGO
0.999578
5.045518
{ "github_metadata": { "branch": "master", "commit_count": 731, "repo_created_at": "2013-07-20T16:17:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3484b804...
0c93a4e0-2575-48d5-ac40-994cd125e207
amanchoudhary8/Leetcode
148-sort-list/148-sort-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* midf(ListNo...
ALGO
0.999996
5.968183
{ "github_metadata": { "branch": "main", "commit_count": 804, "repo_created_at": "2022-07-02T10:46: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": "0d37924802...
2d3ac0f4-9306-4696-9df1-144981d4cf5d
Moongss/ps
Baekjoon/29756.cpp
#include <iostream> int N; int K; int s[1001]; int h[1001]; int dp[1001][101]; int main() { std::cin >> N >> K; for (int i = 1; i <= N; i++) { std::cin >> s[i]; } for (int i = 1; i <= N; i++) { std::cin >> h[i]; } for (int i = 1; i <= N; i++) { for (int j = 0; j <= 10...
ALGO
0.999925
3.731809
{ "github_metadata": { "branch": "master", "commit_count": 553, "repo_created_at": "2023-09-05T09:21:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f690f81...
8e6eb8dd-bcc7-4e75-9bcf-cd9668e00d8e
DionysiosB/CodeForces
0300-0399/317B-Ants.cpp
#include <cstdio> int main(){ const int F = 4; const int N = 65; long a[2 * N][2 * N] = {0}; long t(0); scanf("%ld %ld", &a[N][N], &t); bool done(false); while(!done){ done = true; for(long x = 1; x < 2 * N - 1; x++){ for(long y = 1; y < 2 * N - 1; y++){ ...
ALGO
0.999914
3.962152
{ "github_metadata": { "branch": "master", "commit_count": 4487, "repo_created_at": "2013-06-27T18:15:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 690, "forks": 163, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fab...
e9cdaeed-94b1-4e91-8f35-fdc4160face0
xiaojingzi/randompathexp
epsiloneff/rolesim/Util.cpp
/* Util: Collection of functions used for RoleSim/SimRank post-processing. In general, the functions here do not need direct knowledge of the original graph, only the SimMatrix or IcebergSimMap containing the results */ #include "Util.h" #include <iostream> #include <sstream> #include <fstream> #include <algorithm>...
ALGO
0.993215
5.216146
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-03-18T13:08:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce36a8c1fe...
28088fce-20d6-47eb-825a-33b3d6a95c37
SanchitKumbhar/fds-repo
Practical9.cpp
#include <iostream> #include <stack> #include <string> bool isWellParenthesized (const std::string& expression){ //created an input "expression" std :: stack<char> s; //created a stack 's' for (char ch : expression){ if (ch == '(' || ch == '{' || ch == '[') { s.push (ch); } ...
ALGO
0.97124
6.112873
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-18T03:23: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": "732c2265e0e9...
cc63ae36-83a0-43cd-9d9a-d5ec0192c145
azjf/leetcode
archive/2022/53/3/Solution.h
#pragma once #include <algorithm> #include <limits> #include <vector> class Solution { public: int maxSubArray(std::vector<int> &nums) { return recur(nums, 0, nums.size() - 1); } int recur(const std::vector<int> &nums, int l, int r) { if (l > r) { return std::numeric_l...
ALGO
0.999817
6.614887
{ "github_metadata": { "branch": "main", "commit_count": 218, "repo_created_at": "2021-03-22T06:26: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": "407a99358a...
ed370bbc-3fb0-4f93-a37f-dd9091b12ef6
mohammadimtiazz/find-diagonal-values-of-square-matrix
diagPosSquareMat/diagPosSquareMat/main.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <stdlib.h> using namespace std; int diagonalDIff(vector<vector<int>> matIn){ int size = matIn.size(); int dig1 = 0, dig2 = 0; int diff; for(int i = 0; i < size; i ++){ for (int j = 0; j < size; j++){ //this...
ALGO
0.999962
4.183839
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-12-08T22:54:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1b3c3b3be...
53bd5b50-4053-4d84-abeb-acc34d0fc4bb
tweakoz/orkid
ork.core/src/math/cmatrix4_imp.cpp
//////////////////////////////////////////////////////////////// // Orkid Media Engine // Copyright 1996-2023, <NAME>. // Distributed under the MIT License. // see license-mit.txt in the root of the repo, and/or https://opensource.org/license/mit/ //////////////////////////////////////////////////////////////// #inclu...
TOOL
0.92188
6.28208
{ "github_metadata": { "branch": "develop", "commit_count": 4774, "repo_created_at": "2013-02-10T18:59:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 10, "issues": 86, "pull_requests": 0 }, "file_meta": { "content_id": "525...
2c1086bf-d689-4fd3-97eb-23076158a161
faizan-siddique193/dsa
tree/binary_search_tree/bst.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int data) { this->data = data; left = NULL; right = NULL; } }; void insert(Node *&root, int data) { Node *newNode = new Node(data); if (root == NULL) { ...
ALGO
0.999987
5.124977
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-10-21T13:13: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": "af5decd8470...
e2fe6350-aec5-4e95-96bd-3fdebd5409af
mh-majumdar/codeforces-submission
C.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int t; cin >> t; // Read the number of test cases while (t > 0) { int p; cin >> p; int arr[p]; vector<int> evenInd; vector<int> oddInd; vector<int> even; v...
ALGO
0.999919
4.994287
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-05-18T18: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": "ed21168938...
8aca53da-5de5-4e89-aa22-d1a67e51f05e
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/03/0320/personal_submission/cf1956d_alwaysce.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; i64 mod = 1e9 + 7; int main() { int n; cin >> n; vector<int> nums(n); for (auto&x: nums) { cin >> x;} // 先求dp的最大值 vector<int> dp(n + 1), from(n + 1, -1); for (int i = 1; i <= n; i++) { int cur; for (in...
ALGO
0.999989
3.887706
{ "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": "efcd...
2e5818d3-e12e-4c4a-97c1-a5d8c2bd189b
DavidePicchieri/LSN_Davide_Picchieri_2021
Esercitazione 10/10.2/functions.cpp
#include "functions.h" using namespace std; double Slope(double x1, double y1, double x2, double y2){ return (y2-y1)/(x2-x1); } double Y_Intersection(double m, bool halfplane, double r){ if (halfplane == true){return abs(r*m/(sqrt(m*m+1)));} else {return -abs(r*m/(sqrt(m*m+1)));} } double Price(doubl...
ALGO
0.999535
3.885534
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2021-07-15T12:04: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": "659f13787...
f65248b1-483c-4b34-a132-3d26ea15de96
victorjgomez/cp3_competitive_programming_book_problems
chapter1/1.2.3/3/main.cpp
#include <iostream> #include <map> using namespace std; /* * 3. Given a date, determine the day of the week (Monday, . . . , Sunday) on that day. (e.g. 9 August 2010—the launch date of the first edition of this book—is a Monday.) * * */ int main() { // string months[12] = { // "March", "April", "May...
ALGO
0.999277
3.416454
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-03-21T22:55: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": "607c429144ba...
13fbc30e-1998-4e31-b2ad-37b9a72ea780
IraShinking/CPP-Programming-Homework
Lab8_1.cpp
#include<iostream> #include<string> using namespace std; class Person {public: Person() { cout << "Constructor of Person is called." << endl; } ~Person() { cout << "Deconstructor of Person is called." << endl; } string GetName() { return name; } void SetName(char *nameIn) { ...
TOOL
0.926191
4.61863
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-09-28T05:12: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": "ace5b7433a...
6e85acfb-95ec-456e-8a86-8466224ad994
ShubhPundir/DSA_Practice
General Trees/Graph Traversals/DFS_Stack.cpp
#include <bits/stdc++.h> using namespace std; const int V = 5; // Number of vertices int adj[V][V] = { {0, 1, 1, 0, 0}, // Node 0 {1, 0, 0, 1, 1}, // Node 1 {1, 0, 0, 0, 0}, // Node 2 {0, 1, 0, 0, 0}, // Node 3 {0, 1, 0, 0, 0} // Node 4 }; bool visited[V]; void dfs_iterative(int start) { ...
ALGO
0.999987
6.3359
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2025-01-13T14:08: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": "0f18aeb4af...
372d1b0a-edbd-4c6d-8349-d9d45456446c
BioMedIA/MIRTK
Modules/Numerics/src/Matrix.cc
/* * Medical Image Registration ToolKit (MIRTK) * * Copyright 2008-2015 Imperial College London * Copyright 2008-2015 <NAME>, <NAME> * Copyright 2013-2015 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obta...
TOOL
0.940466
4.072534
{ "github_metadata": { "branch": "master", "commit_count": 2061, "repo_created_at": "2016-01-03T22:25:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 197, "forks": 71, "issues": 64, "pull_requests": 3 }, "file_meta": { "content_id": "af8a...
8d73d4a1-30c5-4627-9b63-3e266cda6a71
ChrizzFeller/Christian-Henriquez-Lab-3
Main.cpp
#include <iostream> #include <math.h> #include <string> #include <sstream> #include <bitset> using namespace std; int menu(); //int Convert(int); int main() { int resp = menu(); while (resp != 3) { if (resp == 1) { int numeroI, numeroB, cont = 0;//Numero ingresado, Numero binario string stringB; cout <<...
ALGO
0.992137
3.780495
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-05-05T19:32: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": "f3816badb...
a7306186-4c7c-40d6-99da-ce308003e4e4
GregDefender/Summer-2017-CPlusPlus
7-20-17 HW.cpp
struct Node { Node* next = NULL; int data; }; struct BNode{ BNode* left = NULL; BNode* right = NULL; int data = 0; }; //HW comments //Doubly linked list, its goona be push front and push back. //Binary Tree, if oyu do push back, it should go to the next available spot. If you do push front it should almost cre...
ALGO
0.998408
3.399682
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-07-19T03:39:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bf6f79e0...
2061ff59-5dff-476e-aecd-d1e3698ef2c8
gerardpc/sde_simulator
C++/sde.cpp
/********************************************************************** * DESCRIPTION: * * Function to numerically simulate a dynamical system defined by the SDE * * dY = a(t,Y)dt + b(t,Y)*dW_t, Y(t0) = Y0. * * Two simulation options are allowed: * * - Deterministic dynamical system (ODE). No noise in...
ALGO
0.999807
5.906538
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-09-26T16:11:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "61b4dce24...
69d13666-5261-4e49-9192-135c86b184f7
pizibing/swingengine
SEFoundation/SEMath/SEMapper2.h
// Swing Engine Version 1 Source Code // Most of techniques in the engine are mainly based on David Eberly's // Wild Magic 4 open-source code.The author of Swing Engine learned a lot // from Eberly's experience of architecture and algorithm. // Several sub-systems are totally new,and others are re-implimented or // re...
TOOL
0.940922
5.200625
{ "github_metadata": { "branch": "master", "commit_count": 833, "repo_created_at": "2015-04-15T02:44: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": "4fd8aacc...
a1b90213-95ff-4955-8e74-de845b5b5157
atef7534/codeforces1000
#418 Stable Arrangement of Rooks/solve.cpp
#include <iostream> #include <vector> #include <algorithm> #include <limits> #include <cmath> #include <string> #include <set> int main(void) { int tests; std::cin >> tests; while (tests--) { int n, k; std::cin >> n >> k; int limit = (n + 1) / 2; if (k > l...
ALGO
0.999956
3.908896
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2024-04-26T08:40:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e12ba93c8d...