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
c1bd6573-d253-48ec-bf3a-72aa960dcacd
Dinirubanuka/Multi-Queue-Scheduling
21000212.cpp
#include <iostream> #include <numeric> using namespace std; int T=1; void roundrobin(int proc, int *jobs, int *jobstart, int *jobfinish);//q0 void shortestjobfirst1(int proc, int *jobs, int *jobstart, int *jobfinish); void shortestjobfirst2(int proc, int *jobs, int *jobstart, int *jobfinish);//q1 void fifo(int proc, i...
ALGO
0.999916
3.649397
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-06-10T05:54:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22ab35928880...
0a14ad75-c0e5-4150-9aaf-57804ed463f7
lightless233/RSAConsole
RSAConsole/rsa.cpp
#ifndef _RSA_H #define _RSA_H #include "rsa.h" #endif static void RSA_InitContext(RSA_PCONTEXT rsa_pcontext) { rsa_pcontext->uKeySize = 4096; rsa_pcontext->p = mirvar(0); rsa_pcontext->q = mirvar(0); rsa_pcontext->e = mirvar(19); rsa_pcontext->n = mirvar(0); rsa_pcontext->d = mirvar(0); } static void RSA_SetKey...
ALGO
0.96531
5.246523
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-04-27T06:38: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": "5f4000cd33...
2442177f-9c22-4099-b41d-ec12216106a8
Super-long/Leetcode
Leetcode/面试题/13.cpp
// 机器人的运动范围 #include <bits/stdc++.h> using namespace std; class Solution { private: bool vis[105][105]; int get(int x) { int res=0; for (; x; x /= 10) { res += x % 10; } return res; } public: int movingCount(int m, int n, int k) { if(!k) return 1; ...
ALGO
0.999887
4.908128
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2019-12-08T07:31:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49c893ec...
877ba3bc-8d8a-4461-ad84-62a8b3696158
Osprey-DPD/osprey-dpd
src/ccSelectPolymerTypeHeadInPentagonImpl.cpp
/* ********************************************************************** Copyright 2020 Dr. <NAME> and Prof. Dr. <NAME>, Director at the Max Planck Institute (MPI) of Colloids and Interfaces; Head of Department Theory and Bio-Systems. Redistribution and use in source and binary forms, with or without modification, a...
ALGO
0.974225
6.178438
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2020-10-29T14:23:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "22b18bee5b...
b332a3e9-840e-43a4-94ac-58f0f98c7951
AbdelruhmanSamy/competitive-programming
CF/Turtle and Good Pairs_2003C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define pii pair<int , int> #define lp(i, j, n) for (int i = j; i <= n; i++) #define vi vector<int> #define popcnt(a) __builtin_popcount(a) #define vvi vector<vector<int>> #define vll vector<ll> #define vch vect...
ALGO
0.999974
3.830408
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2023-07-11T12:25:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "076dff3893d...
eec3fdf3-0454-4231-b58e-51ea4acffd43
wh2per/SW-PRO-Algorithm
SW_PRO_Algorithm/기출I-0013(달리기 시험).cpp
#include <iostream> #include <algorithm> #include <vector> #include <climits> #include <queue> #include <string> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); freopen("input.txt", "r", stdin); int tc; cin >> tc; for (int t = 1; t <= tc; ++t) { int n, m; ...
ALGO
0.999509
3.638988
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2019-09-12T12:03:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf37e8c00...
642948a7-b706-4dfa-a826-d1c853b8522f
ayush049/DATA-STRUCTURES
Different Programs/Cfpractice/codechef3.cpp
// // #include <bits/stdc++.h> // // using namespace std; // // int main() { // // int tc; // // cin>>tc; // // while(tc--){ // // string str; // // cin>>str; // // int ct = 0; // // bool x = false; // // for (int j = 0; j < str.size(); j++) { // // if(str[j] == 'arr' || s...
ALGO
0.998983
4.46511
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2022-09-19T06:47: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": "7723276bb...
267c1016-c208-433e-bd1f-2348f038c07c
goldenRabbit-23/BOJ
2022/1753.cpp
#include <bits/stdc++.h> using namespace std; const int INF = (int)1e9; priority_queue<pair<int, int>> pq; vector<pair<int, int>> v[20001]; int d[20001]; int V, E, K; void dijkstra(int u) { d[u] = 0; pq.push({0, u}); while (!pq.empty()) { int cur_cost = -pq.top().first; int cur_node = pq.t...
ALGO
0.999977
4.619689
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2022-12-12T09:15: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": "bfcbb7926...
1ab9658e-dacf-4edf-b406-ef2750ab2d37
joberle42/42_Cursus
CPP_Module_09/ex01/Rpn.cpp
#include "Rpn.hpp" Rpn::Rpn(){} Rpn::~Rpn(){} int Rpn::Calcul(std::string str) { int nb; int nb2; for (int i = 0; i < str.length(); i++) { if (str[i] == ' ') continue ; else if (isdigit(str[i])) { nb = stoi(std::string(1, str[i])); _stack.p...
TOOL
0.981397
3.839783
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2023-06-14T12:38: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": "de23ff4061d...
3d5fde18-5abc-47f8-9840-044a6b809466
microsoft/MixedRealityToolkit
SpatialUnderstanding/Src/FRGSolver/FRGUtils_W.h
// Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. #pragma once #ifndef __FRG_UTILS_H__ #define __FRG_UTILS_H__ //------------------------------------------------------------------------------------ // FRGFindNearestFree //-----...
ALGO
0.981883
5.109741
{ "github_metadata": { "branch": "main", "commit_count": 524, "repo_created_at": "2015-11-11T20:37:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 866, "forks": 277, "issues": 54, "pull_requests": 1 }, "file_meta": { "content_id": "be55c6...
dd9271c1-99f8-45fd-905a-4fb6a8a836ef
ftiasch/shoka
dom_tree.h
#include "types/graph.h" #include <climits> #include <vector> template <IsGraph Graph> class DomTree { void prepare(int u) { visited[u] = true; dfn[u] = order.size(); order.push_back(u); for (int v : graph[u]) { if (!visited[v]) { parent[v] = u; prepare(v); } } } ...
ALGO
0.999637
6.295687
{ "github_metadata": { "branch": "master", "commit_count": 441, "repo_created_at": "2013-10-23T08:29:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7873a96...
7766bbf6-35ff-42e3-a460-3da4d267f6a8
zhushh/AlgorithmHomeWork-2014
hw_02_00.cpp
enum ErrorCode { success, underflow, overflow }; const int maxStack = 100; // 栈的最大容量 template <class StackEntry> class MyStack { public: MyStack() : size(0) { for (int i = 0; i < maxStack; i++) { entry[i] = 0; ...
ALGO
0.994123
4.339444
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2014-11-03T16:31: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": "dd16c5765...
5f31b45d-22d4-4f8a-aa3b-bb80a72d48c6
maditya01/Code-snippets
DynamicProgramming/GridBasedDP/DungoneGame.cpp
// Return the knight's minimum initial health so that he can rescue the princess. //Health can not be less than 0. at any point in time. itself at last cell atMin we have 1 value of health. //initially knight is at top left cornor. //knight can move in only 2 directions right and bottom after seeing this you can apply...
ALGO
0.999989
5.274068
{ "github_metadata": { "branch": "master", "commit_count": 167, "repo_created_at": "2022-01-06T12:16:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dba69897...
9c5ae4bf-eda9-4b0e-9098-a214f8753a58
nv-0203/Data-Structures
Trees/Binary Trees/22_BurnBT.cpp
#include <bits/stdc++.h> #include <iostream> #include <string> #include <map> #include <unordered_map> #include <math.h> #include <vector> #include <iomanip> #include <queue> #include <stack> #include <set> using namespace std; typedef long long int ll; struct Node { int key; Node *left; Node *right; ...
ALGO
0.99995
4.020568
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2023-05-21T09:15: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": "8e447632a51...
8572a540-6bc9-4b69-81d7-16285188c613
yongnam-kwon/Professional_Study
cpp/ConsoleApplication1/ConsoleApplication1/★(중) [연습A-0016] 보석 도둑.cpp
// (중)[연습A - 0016] 보석 도둑 /* */ #if 0 #pragma warning(disable: 4996) #include <cstdio> #include <queue> #include <algorithm> using namespace std; #define NKMAX (300000) typedef long long ll; typedef pair<int, int> pii; pii jewerly[NKMAX+5]; // 보석 무게, 보석 가격 int T, N, K, bag[NKMAX+5]; // 가방 수용 능력 ll result_val; void i...
ALGO
0.999447
3.60978
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-06-20T05:09: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": "7fe5acb1b...
dcca21c5-1904-4fa6-a7d1-48918ecc98ba
NIRALUser/neoseg
register/ChainedAffineTransform3D.h
/* Chained affine transform Forward evaluation: Transform = Translate * Rotate * Scale * Skew * Centering Backward evaluation: Transform = Centering * Skew * Scale * Rotate * Translate ---- For matrix inverse, the "inverse" of each parameter is computed and then the composition order is set to the ...
TOOL
0.930391
7.238481
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2014-10-08T20:05:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f6c51577bc...
a5595734-634c-4078-afa0-2eda542a9188
ethz-asl/kalibr
aslam_optimizer/aslam_backend/include/aslam/backend/Optimizer2.hpp
#ifndef ASLAM_BACKEND_OPTIMIZER_2_HPP #define ASLAM_BACKEND_OPTIMIZER_2_HPP #include <boost/shared_ptr.hpp> //#include <boost/function.hpp> #include <sm/assert_macros.hpp> #include <Eigen/Core> #include "Optimizer2Options.hpp" #include "backend.hpp" #include "OptimizationProblemBase.hpp" #include <aslam/Exceptions.hp...
ALGO
0.971767
7.250574
{ "github_metadata": { "branch": "master", "commit_count": 359, "repo_created_at": "2014-05-29T12:31:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4839, "forks": 1450, "issues": 101, "pull_requests": 17 }, "file_meta": { "content_id": "...
8d5e2371-4228-41bb-88e9-25e6887dcc17
ishandutta2007/codeforces-j
jo_ulej/normal/919/B.cpp
#include <iostream> #include <iomanip> #include <random> #include <algorithm> #include <vector> #include <set> #include <map> #include <cmath> #include <numeric> #include <cstdlib> #include <cstring> #include <deque> #include <sstream> #include <bitset> #include <cassert> #include <fstream> #include <queue> #define le...
ALGO
0.999284
4.179204
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:42:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba7e1b5b5dd7...
6134c2ba-198f-453f-a82f-b0fb49a60d02
caogl/Algorithms_practice
string/One edit distance/main.cpp
// reference: leetcode clean code handbook // The definition of edit is the same in the problem "Edit Distance", ONLY return distance 1, and 0 distance is not included! /* O(n) runtime, O(1) space – Simple one-pass: For the case where m is equal to n, it becomes finding if there is exactly one modified character. Now...
ALGO
0.99987
5.820229
{ "github_metadata": { "branch": "master", "commit_count": 816, "repo_created_at": "2014-01-29T11:35:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "013610dd...
68618bf9-0d97-4de9-bcfd-8351fd618508
Anubhav12345678/competitive-programming
JOSEPHUSPROBLEMRECURSIVE.cpp
#include <stdio.h> int josephus(int n, int k) { if (n == 1) return 1; else /* The position returned by josephus(n - 1, k) is adjusted because the recursive call josephus(n - 1, k) considers the original position k%n + 1 as position 1 */ return (josephus(n - 1, k) + k-1) % n + 1; } // Driver Program to t...
ALGO
0.999996
4.508293
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-11-18T08:04: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": "902e99dccd...
d17f4445-3472-4fc2-9338-8f5a09209a36
dishant4163/A2Z-DSA-Striver
Step-16 Dynamic Programming (Patterns and Problems)/Lec-2 1D_DP/03_FrogJump-2.c++
// 1D-DP: Frog Jump With K Distances (follow up of Frog Jump) /*// Problem-Link-> https://www.naukri.com/code360/problems/minimal-cost_8180930 int minimizeCost(int n, int k, vector<int> &height){ // Write your code here. vector<int> dp(n, -1); dp[0] = 0; for(int i = 1; i < n; i++) { int m...
ALGO
0.999956
5.604103
{ "github_metadata": { "branch": "main", "commit_count": 732, "repo_created_at": "2024-07-30T12:22:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fca6377891...
9275fe77-4f42-4880-a292-9ca7752ce48f
rosswelltiongco/Data-Structures
Recursion/Recursion/utility.cpp
#include <iostream> #include "utility.h" #include "stack.h" Utility::Utility() { } string Utility::reverse(string s) { if (s.size() <= 1) return s; else return (s.back() + reverse(s.substr(0, s.size() - 1))); } int Utility::factorial(int n) { if (n <= 1) return n; else return n*factorial(n - 1); } int Utility::cou...
ALGO
0.999803
4.753205
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2017-10-24T20:32: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": "c222188df...
2bab286a-9f59-447b-a8a0-15faaefcbbff
Elbarqy/problem-solving
algorithms/graph/articulation/uva.10765.cc
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; class Solution { private: int UNVISITED = -1; int n, m, dfsRoot, rootChildren; int dfs_num[10003], dfs_low[10003], dfsCounter = 0, dfs_parent[10003], artCounter[10003]; vi adjList[100...
ALGO
0.999954
4.044637
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2020-08-30T19:20: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": "8f4840697...
16ed7a1f-f9ba-4682-a6a5-e2b89cd5e98f
akashrwt7/DSA-Questions
Minimum Spanning Tree - GFG/minimum-spanning-tree.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find sum of weights of edges of the Minimum Spanning Tree. int spanningTree(int V, vector<vector<int>> adj[]) { // code here vector<bool> visited(V,false); ...
ALGO
0.999953
5.888314
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2022-07-04T06:16: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": "344f635fd3...
611cf4fd-ba39-4ce4-98ef-7e1c6461beb5
sky21kr/algorithm
백준/3036.cpp
#include <iostream> using namespace std; int main() { int N; int A[100]; int big, small; int temp; cin >> N; for(int i = 0 ; i < N ; i++ ) { cin >> A[i]; } for(int i = 1 ; i < N ; i++ ) { if(A[0] >= A[i]) { big = A[0]; small = A[i]; } ...
ALGO
0.999983
3.250408
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2019-10-09T13:19: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": "9da9de8d...
6ed0ee4b-5235-4e7c-b14e-43f85af0e143
robdoesstuff/batterytech
src/batterytech/src/batterytech/math/Triangulator.cpp
// COTD Entry submitted by <NAME> [<EMAIL>] // ** THIS IS A CODE SNIPPET WHICH WILL EFFICIEINTLY TRIANGULATE ANY // ** POLYGON/CONTOUR (without holes) AS A STATIC CLASS. THIS SNIPPET // ** IS COMPRISED OF 3 FILES, TRIANGULATE.H, THE HEADER FILE FOR THE // ** TRIANGULATE BASE CLASS, TRIANGULATE.CPP, THE IMPLEMENTATION...
ALGO
0.998174
5.851689
{ "github_metadata": { "branch": "master", "commit_count": 645, "repo_created_at": "2015-04-07T22:00:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 5, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "2f86e19...
75bf68a0-aae0-4c13-9db7-3cb50cc18756
CodyBuilder-dev/Algorithm-Coding-Test
problems/baekjoon/BOJ-2422-union.cpp
//제목 : 한윤정이 이탈리아에 가서 아이스크림을 사먹는데 //목적 : 아이스크림에 포함되어서는 안되는 조합을 찾기 //조건 : 아이스크림은 최대 200가지. 선택은 3이므로 200C3 /*아이디어 : 유니온 파인드로 풀면?ㄴ 1. 먹어선 안 되는 아이스크림의 세트들을 union으로 묶는다 2. next_permutation을 돌면서 조합을 찾는다 3. 조합의 원소들을 isUnion해서 같으면 fail (X) -> 그냥 부모가 같은지 다른지만 보면 됨(X) */ #include <iostream> #include <vector> #include <algorithm...
ALGO
0.999913
3.922018
{ "github_metadata": { "branch": "master", "commit_count": 267, "repo_created_at": "2019-11-02T08:06: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": "bd9a83db...
d0647d30-876c-4f70-a9f9-84df94fe58ea
mprysiazhnyi/school_projects
2 year/petya/LAB3/Массив/Массив/Массив.cpp
/*Код Присяжного Максима 9) Дано целое число N. Сформировать матрицу a(i,j) порядка N, для которой: a(i,j)=sin(i+j+k); где k - псевдослучайное число. Упорядочить строки матрицы по убыванию минимальных элементов строк. */ #include <iostream> #include <conio.h> #include <time.h> void main() { class ArrayCS { public: ...
ALGO
0.998524
3.834693
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-04-01T16:13: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": "8bf693583d...
41c9e494-3d31-4981-baaa-e68264fc3899
mmtran0210/OS_Project
proj2/main.cpp
// <NAME> - CSCE 311 - Project 2 - 002 #include "HashTable.h" #include "OpQueue.h" #include <fstream> #include <iostream> #include <sstream> #include <string> #include <vector> #include <pthread.h> // Global operation queue OperationQueue operationQueue; // Global output vector to store results std::vector<std::str...
ALGO
0.937536
5.473081
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-11-15T14:51: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": "044754f5a09...
52e6b427-77ec-4f74-b508-4582bf672c84
ayushD123/LeetCode
Eventual Safe States - GFG/eventual-safe-states.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: // bool checkdfs(int node,vector<int> adj[],int vis[],int pathvis[]){ // vis[node] = 1; // pathvis[node] = 1; // //...
ALGO
0.999974
6.823202
{ "github_metadata": { "branch": "main", "commit_count": 2035, "repo_created_at": "2022-11-20T15:14: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": "4445cb3bf...
1db3fcfe-0f6e-4fcb-a220-8f9e2a0e9b7b
emrul-chy/Competitive-Programming
UVa/10930 - A-Sequence.cpp
#include <bits/stdc++.h> #define LL long long int using namespace std; int main() { LL T=1, x, n, ar[50], p, i, flg, j, dp[30050]; while(scanf("%lld", &n) == 1) { flg = 0; LL sum = 0; memset(dp, 0, sizeof dp); for(i=0; i<n; i++) { scanf("%lld", &ar[i]); ...
ALGO
0.999362
3.03902
{ "github_metadata": { "branch": "master", "commit_count": 309, "repo_created_at": "2016-10-09T17:17:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f95e904...
0136d560-db0e-4990-aa68-736e27326bcf
Kdawg1425/CSCI-10
CS10 HW 1/HW_1.2.cpp
#include <iostream> using namespace std; int main() { const double SODA_FRACTION = .001; double p_weight; double m_weight; double sweetener; double human_limit; double amount_soda; cout << "How much artificial sweetener is needed to kill a mouse?" << endl; cin >> sweetener; cout << "How much did th...
ALGO
0.99628
4.270863
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-04-20T00:10: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": "9cc514c6287...
a1bb7577-70bc-4132-98c3-31093e1bc61b
GeorgiyIsaev/ITMO.Course2021.CPP
Lab03.MyFunction/Lab03.SumValues.h
#pragma once #include "MyInclude.h" /*Задание 1. Сумма чисел 1. Создайте новый проект и объявите функцию, реализующую алгоритм вычисления суммы чисел от 1 до любого целого положительного числа n: int addNumders(int n) { if (n == 1) return 1; // выход из рекурсии else return (n + addNumders(n - 1)); } 2. В функции main...
ALGO
0.99282
4.636345
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2022-01-15T21:21:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32e3c5a2...
770aa1da-de31-430b-9bae-2cb40634c228
aman0275/c-
c++/graph/maxLengthCycleGraph.cpp
#include <bits/stdc++.h> using namespace std; bool isCycle(vector<int> arr, int curr, vector<bool> &visited, vector<int> &path) { if (curr == -1) { return false; } if (visited[curr]) { return true; } visited[curr] = true; path.emplace_back(curr); if (isCycle(arr, arr[...
ALGO
0.999964
3.836403
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-09-12T02:16: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": "e064b9d9c45...
779c74cf-d224-4a17-acfe-be49aa646983
cpuggal/dependency_finder
dependency_rough_code.cpp
/* Output: (R, Z, B) (Q, Y, A) (P, X) */ #include <iostream> #include <vector> #include <map> using namespace std; /* y (5) -> x (4) x (4) -> a (3) -> b (1) -> c (0) b (1) -> d (0) e (5) -> f (4) -> a (3) -> g (2) -> b (1) */ /* [ 2 => (c, d) 1 => (b) 0 => (a) ] */ class Graph { ma...
ALGO
0.999961
4.521667
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-25T06:22: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": "17714ae7814f...
ff8d241b-511d-477f-affe-eff25acc82a4
yqxd/LEETCODE2
173BinarySearchTreeIterator.cpp
// // Created by lenovo on 2021/10/21. // //Implement the BSTIterator class that represents an iterator over the in-order traversal of a binary search tree (BST): // //BSTIterator(TreeNode root) Initializes an object of the BSTIterator class. The root of the BST is given as part of the constructor. The pointer should ...
ALGO
0.999967
6.328492
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-07-20T07:23: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": "4586ff16c...
3b46f185-ee5d-4c98-9a93-219410d5e59a
Pikne-Programy/nasze-rozwiazania
oi28-1/gan-nircek.cpp
#include <bits/stdc++.h> using namespace std; #define DEBUG false vector<pair<unsigned, unsigned>> sasiady[100001]; // droga, miasto unsigned biciaki[100000]; // biciaki na drogach unsigned droginamiasto[100000]; queue<unsigned> bfs; struct miasto { unsigned parent; // ojciec unsigned vi...
ALGO
0.999598
3.672485
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-12-14T15:15:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "deb84447bd...
c25d24d6-9f75-4683-a55c-4d05a241a368
ArcherSore/codeforces
Codeforces Round 1033 (Div. 2)/A_Square_of_Rectangles.cpp
#include <bits/stdc++.h> using namespace std; using LL = long long; using PII = pair<int, int>; void solve() { int l1, b1, l2, b2, l3, b3; cin >> l1 >> b1 >> l2 >> b2 >> l3 >> b3; if (l1 == l2 && l2 == l3 && b1 + b2 + b3 == l1) { cout << "YES\n"; return; } if (b1 == b2 && b2 == b3...
ALGO
0.9999
4.554077
{ "github_metadata": { "branch": "main", "commit_count": 171, "repo_created_at": "2024-02-15T14:27:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe7ad3a98b...
ee86e776-63aa-4245-bba8-f09c98d648f5
LucasGPellegrini/SettersPG-2023-1
solucoes/d.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<string> ordena(const vector<string> &vetor) { vector<string> ordenado = {}; vector<vector<string>> matriz_vogais = {{},{},{},{},{}}; for (int i = 0; i < vetor.size(); i++) { string palavra = vetor[i]; ...
ALGO
0.999926
5.425755
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2024-03-02T16:38:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b60984235e...
87dc25a4-ffdc-43e6-870c-f639d8489de0
ShivakantDwivedi/ShivakantDwivedi-Competative-Programming
LOVE BABBAR DSA SHEET/pair_sum.cpp
/* 2 5 6 1 2 3 4 5 6 7 1 2 3 4 5 6 Sample Output 1: 2 3 Explanation for Sample Output 1: In test case 1, there exist only 2 pairs whose sum is equal to ‘TARGET’ i.e (1, 5) and (2, 4). In test case 2, there are 3 pairs whose sum is equal to ‘TARGET’ which are (1, 6), (2, 5), and (3, 4). Sample Input 2: 2 4 10 1 3 5 ...
ALGO
0.999936
4.954108
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2022-09-01T06:47: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": "16ae218d...
7c7ea736-764d-4fad-8f8d-edfd7667f258
Niloyb34/LUV-Babbar-related
Lecture #74 insertion and Deletion both from a heap.cpp
//Insertion hoice aikane #include<bits/stdc++.h> using namespace std; class heap///making a class name heap { public: int arr[100]; int size; heap() { arr[0]=-1; size=0; } void insert(int val) { size=size+1;///jehuto kono element ke insert korte hole last e add korte ...
ALGO
0.999922
3.955861
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-03-23T13:52: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": "8ef7bba6f4f...
8923c99e-d764-46af-b3d0-f6266f1dab2d
yakode/CandCPP-practice
NTHUOJ/I2P(II)/11010 - List class.cpp
#include <iostream> #include <string> class ListNode { friend class OWList; //make OWList a friend friend class TWList; //make TWList a friend public: ListNode( const int &info ) //constructor : data( info ), nextPtr( NULL ) { } //end ListNode constructor private: int data; //data Lis...
ALGO
0.988113
5.132486
{ "github_metadata": { "branch": "master", "commit_count": 313, "repo_created_at": "2019-10-19T02:44: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": "aeb8622b...
ca8d7294-ffc4-4e0f-a58c-f3e44927933f
ndina/competitive-programming
timus/a.cpp
#include <iostream> #include <cmath> #include <algorithm> using namespace std; int main(){ int n, cnt1 = 0, cnt2 = 0; cin >> n; int a[n][n]; for(int i = 0; i < n; i ++){ for(int j = 0; j < n; j ++){ cin >> a[i][j]; } } for(int i = 0; i < n; i ++){ for(int j = 0; j < n; j ++){ if(i == j){ cnt1...
ALGO
0.99998
3.41017
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-06-06T18:12:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8434fcf606...
9b5b9fe1-6954-4eeb-8101-4b511ada4d12
PedroHernandez654/Code.Spanish
C++/Promocion1.cpp
#include <ctime> #include <iostream> using namespace std; using namespace std; int main(){ int a, b, c, promo; cout << "Ofrecemos el 3 x 2 en nuestro servicio" << endl; cout << "Ponga el precio del 1er producto: "; cin>> a; cout << "Ponga el precio del 2do producto: "; cin>> b; cout << "Ponga el precio del 3er producto...
ALGO
0.999553
3.6042
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2021-10-03T21:10: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": "bcf78e84d51...
f7dfd3d5-45e6-485d-ac33-9b02fc226643
SamuelAdamson/zero-to-hero
LC/dynamic_programming/LC_45/jumpGameII.cpp
class Solution { public: int jump(vector<int>& nums) { /* Similar to Jump Game 1. Starting at first index, you can jump a maximum of nums[i] places, find minimum number of jumps to reach end. NOTE: We can always reach the end. So, start iterating...
ALGO
0.999932
5.848821
{ "github_metadata": { "branch": "main", "commit_count": 255, "repo_created_at": "2022-06-29T04:05: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": "7656e7618e...
e39078bb-5940-482c-b96b-f7245600c149
Antoineloiseau1/Piscine_CPP
Module 09/ex02/PmergeMe.hpp
#ifndef PMERGEME_HPP # define PMERGEME_HPP # include <vector> # include <string> # include <sstream> # include <cstdlib> # include <algorithm> # include <iostream> # include <ctime> void PmergeMe(char **argv); std::vector<std::string> extractArgs(char **argv); void check_errors(std::vector<std::string> & ar...
TOOL
0.985467
4.336572
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2023-02-15T16:51: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": "a985b314e...
aa22965c-da2d-4544-ae5d-cb1850bf81b9
ishandutta2007/codeforces-e
emptysoulist/normal/1284/D.cpp
#include<bits/stdc++.h> using namespace std ; #define rep( i, s, t ) for( register int i = s; i <= t; ++ i ) #define re register #define int unsigned long long int gi() { char cc = getchar() ; int cn = 0, flus = 1 ; while( cc < '0' || cc > '9' ) { if( cc == '-' ) flus = - flus ; cc = getchar() ; } while( cc >= '0' ...
ALGO
0.999926
4.022809
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "e38489ba6fa7...
f120056a-8a6c-446b-8b26-028eab7260c5
hulk006/my_ws
lidar_track/src/roboCluster.cpp
// // Created by mjj on 17-5-26. // #include "roboCluster.h" namespace Robosense{ roboCluster::roboCluster(){ initFlag = false; } void roboCluster::roboClusterInit(std::string str,double maxHeight,double maxWidth,double miniGrid, int dilaSize,double clip_min_h...
DATA
0.995784
4.701348
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-06-11T16:35:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c602362896...
b0e6706a-a658-42be-92d4-926ab6fca557
KsushaRomano/Laba_19
Laba_19_2.cpp
using namespace std; #include <iostream> #include <stdio.h> int main() { setlocale(LC_ALL, "Russian"); int M, N, i, j, c, max, min, l, k; l = 0; k = 0; cout << "Введите количество строк: "; cin >> M; cout << "Введите количество столбцов: "; cin >> N; float** A = new float* [M]; for (c = 0; c < M; c++) A[...
ALGO
0.999759
3.230849
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-10-20T23:45: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": "b1fd455a3...
303d559e-34d8-4540-ad99-775f091d9a7f
OI-wiki/OI-wiki
docs/graph/code/block-forest/block-forest_1.cpp
#include <algorithm> #include <iostream> #include <vector> constexpr int MN = 100005; int N, M, cnt; std::vector<int> G[MN], T[MN * 2]; long long Ans; int dfn[MN], low[MN], dfc, num; int stk[MN], tp; int wgh[MN * 2]; void Tarjan(int u) { // 求点双 low[u] = dfn[u] = ++dfc; stk[++tp] = u; ++num; for (int v : G...
ALGO
0.999878
4.523282
{ "github_metadata": { "branch": "master", "commit_count": 12101, "repo_created_at": "2018-07-11T03:28:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23612, "forks": 4310, "issues": 112, "pull_requests": 9 }, "file_meta": { "content_id":...
2a9b7294-b21b-4a03-8509-f2c150b3f8aa
111qqz/ACM-ICPC
51nod/1081.cpp
/* *********************************************** Author :111qqz Created Time :2015年12月26日 星期六 13时20分31秒 File Name :code/51nod/1081.cpp ************************************************ */ #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #i...
ALGO
0.999818
3.987568
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2017-07-27T12:09:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ac2ce731...
507f207e-01e6-4ce0-96b1-4ff8553b6e36
ajaygunalan/hybrid_force_admittance_control
src/impedance.cpp
#include <rclcpp/rclcpp.hpp> #include <std_msgs/msg/float64_multi_array.hpp> #include <geometry_msgs/msg/wrench.hpp> #include <sensor_msgs/msg/joint_state.hpp> #include "joint_effort_msg/msg/joint_efforts.hpp" #include "impedance/Impedance.h" // Your header if needed #include "impedance/KDL_Base.h" // Adjus...
ALGO
0.928072
6.620166
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-02-09T20:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "56968fd289b...
a9a5c73d-fd7b-448c-8f93-9bf1e6d07c82
HeNeos/CompetitiveProgramming
ProjectEuler/513/cpp/513.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define N 2000 #define MAX 11 set <pair<ll, ll> > s; map <ll, vector <ll> > m; ll isqrt(ll x){ if(x <= 1) return x; ll x0 = x/2; ll x1 = (x0 + x/x0)/2; while(x1 < x0){ x0 = x1; x1 = (x0 + x/x0)/2; } return x0...
ALGO
0.999511
3.57343
{ "github_metadata": { "branch": "master", "commit_count": 409, "repo_created_at": "2019-01-08T21:26:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73396e4f...
c84b4f2b-e7f2-4a99-8150-165720f8d57a
yenthing/CPP09_42
ex02/main.cpp
#include "PmergeMe.hpp" #include <iostream> #include <vector> #include <stdexcept> #include <sstream> void printVector(const std::vector<size_t>& vec) { for (std::vector<size_t>::const_iterator it = vec.begin(); it != vec.end(); ++it) { std::cout << *it << " "; } std::cout << std::endl; } void pri...
ALGO
0.998585
6.168046
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-07T15:42: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": "439b5a6d63d0...
73a22da5-8921-4a3b-a2c3-39f272fb7c06
MalenQuilla/DSA
Labwork3/Ex1.cpp
#include<iostream> #include<math.h> using namespace std; struct items { int quantity[3]; string name[3]; int size = 3; }; void createlist(items *l) { cout << "Please refill products in stock:" << endl; for (int i = 0; i < 3; ++i) { cout << "Enter name of items " << i + 1 << ": "; ...
ALGO
0.972084
3.512861
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-21T16:35: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": "13620f3a33e9...
482294ef-5827-4a54-a80c-d38b539c1880
hmofrad/GraphTap
src/singlenode/odcsc_spmspv.hpp
/* * odcsc.cpp: ODCSC SpMSpV implementation (LA3) * (c) <NAME>, 2019 * (e) <EMAIL> */ #ifndef ODCSC_SPMSPV_HPP #define ODCSC_SPMSPV_HPP #include <chrono> #include "pair.hpp" #include "io.cpp" #include "odcsc_base.hpp" class ODCSC { public: ODCSC() {}; ODCSC(const std::string file_...
ALGO
0.987759
6.028403
{ "github_metadata": { "branch": "master", "commit_count": 1586, "repo_created_at": "2018-05-17T18:27:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5da0881...
effe956f-28c5-4357-b2f2-7ecdf2eb8bf9
raincross7/code-similarity
codes/train_code/problem321/problem321_218.cpp
#pragma GCC optimize("Ofast") #include<iostream> #include<cstdlib> #include<cstdio> #include<string> #include<iomanip> #include<algorithm> #include<vector> #include<math.h> #include<utility> using namespace std; int main(){ long long int n, k; cin >> n >> k; vector<long long int> a(2*n); for(long long...
ALGO
0.999976
3.641271
{ "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": "cfbe28d7a99f...
899055c2-e478-44f7-ac84-22b9e9a2a8ec
reckhhh/LeetCodeSolutons
C++/114_FlattenBinaryTreeToLinkedList_Medium.cpp
/* Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2 \ 3 \ 4 \ 5 \ 6 click to show hints. ...
ALGO
0.999997
6.008654
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-05-30T16:03:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69652cd76c...
450449e4-d8cf-4fc3-91e1-171d8bf09b45
triuduongg/dsa
SCTDLTree010.cpp
#include <iostream> #include <vector> #include <string> using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; // Hàm xây dựng cây từ mảng theo level-order TreeNode* buildTree(const vector<int>& arr) { int n = ...
ALGO
0.999972
5.741646
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2025-03-21T06:11: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": "aac80dc484d...
f721fd34-1c7d-428c-a8bf-1b04c542d348
Rahul-r-a/Training_Project
friendfunction_overoading/main.cpp
#include <iostream> using namespace std; class person { private : int weight; public : person(int num=0) { weight=num; } friend bool operator>(person x, person y); //We are using bool since it s if ie true or false operation is considered. so we overload ...
ALGO
0.999889
3.403541
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-10-03T11:14: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": "e9f9709e13a...
33b93693-1776-4000-a25b-3a4c86edd37b
evejaeyong/OOP_Assignment
maze.cpp
#include <iostream> #include <cstdlib> #include <time.h> #include <Windows.h> using namespace std; char map[63][63]; //미로 여기에 넣음 char short_map[63][63]; //이 안에 경로 집어넣음 int maze[4][2]{ {0, 2}, {0, -2}, {-2, 0}, {2, 0} }; //상,하,좌,우 순서 int solve_maze[4][2]{ {0, 1}, {0, -1}, {-1, 0}, {1, 0} }; //상,하,좌,우 순서 int queue[63...
ALGO
0.998
3.586765
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-06-23T17:23: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": "e074debf4667...
34a71dd5-39ee-4046-96eb-6e05d61d333e
checkoutb/LeetCodeCCpp
ge800/LT0828_2021-08-26_Count_Unique_Characters_of_All_Substrings_of_a_Given_String.cpp
#include "../header/myheader.h" class LT0828 { public: // D // 上一次出现在什么时候,下一次出现在什么时候, 这2个界限的范围内的,包含自己的所有substring, 都只含有一个自己。 // tle. int lt0828a(string s) { int sz1 = s.size(); vector<vector<int>> vvi(sz1, vector<int>(26, 0)); int ans = 0; vvi[0][s[0] - 'A'] = 1; ...
ALGO
0.999974
3.607722
{ "github_metadata": { "branch": "master", "commit_count": 285, "repo_created_at": "2019-04-22T09:20:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc6019b9...
5dabc1d5-076f-48f6-a9f5-d17915e10845
beste-oztop/ec504-project
quake_heap.hpp
#include <utility> #include <string> #include <list> #include <vector> #include <cmath> #include <iostream> #include <stdexcept> #include <unordered_map> template <typename Key, typename Value> class QuakeHeap { private: unsigned long _size; float _alpha; public: struct TEntry; struct TNode...
ALGO
0.998989
5.278499
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-10-16T19:19: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": "38da4dd68de...
54db48d5-e6d8-4d9f-9884-5026271d5418
RenatoBrittoAraujo/Competitive-Programming
Codeforces-Online-Judge/Contest_TEP/contest4/C.cpp
#include <bits/stdc++.h> using namespace std; #define ss second #define ff first #define pb push_back #define eb emplace_back #define loop(i,a,b) for(int (i)=(a);(i)<(b);(i)++) #define len(a) (int)(a).size() #define allv(a) (a).begin(),(a).end() using ll = long long; using ii = pair<int,int>; using vi = vector<int>; c...
ALGO
0.999718
3.360099
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-05-14T01:40: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": "1e9be2fdab...
1301c026-d137-4f32-8c9f-345dd1adef5f
onelxj/codewars
binaries/Source.cpp
#include <string> #include <vector> #include <math.h> using namespace std; string get_binary(int n) { string temp; if (!n) return "0"; while (n) { temp += to_string(n % 2); n /= 2; } reverse(temp.begin(), temp.end()); return temp; } int from_bin(string s) { int num = 0, p = 0; for (int i = s.size() - 1; i ...
ALGO
0.999989
3.633025
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2019-12-27T07:41: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": "8da5e27d5...
45e59a84-2b18-43bc-8179-b4053a414133
asterism45/MyCompProgramming
Atcoder/abc/abc297/B.cpp
#include <bits/stdc++.h> #define rep(i, l, r) for (ll i = (l); i < (r); i++) #define INF ((1LL << 62) - (1LL << 31)) /*オーバーフローしない程度に大きい数*/ #define MOD 1000000007 using namespace std; using ll = long long; using vll = vector<ll>; using vvll = vector<vector<ll>>; ll A, B, C, D, F, G, H, I, J, K, L, M, N, O, P, Q, S, T, U...
ALGO
0.999934
3.180348
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2023-04-17T03:46: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": "b8a74f61e...
82d86f6e-322e-4cd4-80b4-f52ea59e9715
TedXpro/StartingOutWithCpp
Chapter11_Structured_Data/companySalary.cpp
/*This program will accept employee information such as name, id, salary and tenure and calculates the average salary, finds the highest paid and total salary the company pays for the employees per month.*/ #include <iostream> using namespace std; struct EmpInfo { string firstName; string secondName; int ...
TOOL
0.990885
4.796722
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2022-12-06T05:52:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99027343...
978a68f6-9e7a-416c-8a91-60f410485ea0
krnkrXD/DynamicProgramming
3_Subsequences/19_01Knapsack.cpp
#include<bits/stdc++.h> using namespace std; int recursion(int i, int W, int N, vector<int> wt, vector<int> val){ // if(W==0) return 0; personal choice to add this, just reduce the no of calls if(i == 0){ if(wt[i] <= W) return val[i]; else return 0; } // possible stuffs int notpick...
ALGO
0.999998
5.144198
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-05-26T14:10: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": "46adee2f03...
b0066d1c-bf1a-43c2-81c3-50eb77359893
hsnavarro/imepp
Codeforces/Round570/H.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 100 + 5; int n, last[30]; string s; ll k, dp[N][N], sum, ans, aux; int32_t main(){ ios_base::sync_with_stdio(0), cin.tie(0); cin >> n >> k >> s; for(int i = 0; i < 30; i++) last[i] = -1; for(int i = 0; i <= n; i++) dp[i][0] =...
ALGO
0.999968
3.596062
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2018-08-22T02:40:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b78bdc98...
3102dce3-3da7-405e-9f2f-43d935a3606c
sitic/SPHinXsys
SPHINXsys/src/shared/particle_dynamics/fluid_dynamics/eulerian_fluid_dynamics/eulerian_fluid_dynamics_inner.cpp
/** * @file eulerian_fluid_dynamics.cpp * @author <NAME>, <NAME> and <NAME> */ #include "eulerian_fluid_dynamics_inner.h" //=================================================================================================// using namespace std; //==================================================================...
ALGO
0.981601
4.860565
{ "github_metadata": { "branch": "master", "commit_count": 253, "repo_created_at": "2021-08-24T23:46:31.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "Xiangyu-Hu/SPHinXsys", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "conte...
a8fe3ce2-a79d-411e-ba15-07be984ae5ea
Mathwizard1/ag.AI.n
rand_walls.cpp
#include "rand_walls.h" std::vector<std::vector<std::pair<short, short>>> gridPaths; MazeGenerator::orientation MazeGenerator::chooseOrientation(int width, int height) { if (width < height) { return orientation::Horizontal; } else if (height < width) { return orientation::Vertical;...
ALGO
0.998563
4.639097
{ "github_metadata": { "branch": "master", "commit_count": 165, "repo_created_at": "2025-01-17T13:42:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3eac140e...
8afee8d3-b414-4811-aab5-9633a0433e96
augustinasjucas/CompetitiveProgramming
Prize.cpp
//#include "prize.h" #include <iostream> #include <vector> #include <algorithm> using namespace std; static int query_count = 0; static const int max_q = 10000; static vector<vector<int> > rank_count; int n; static vector<int> g; vector<int> ask(int i) { query_count++; if(query_count > max_q) { cerr << ...
ALGO
0.999857
3.4438
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-05-20T12:06: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": "6d0168ce73ee...
6d868303-b7f3-4cc6-8b5e-ec2c5b3ebbf6
sanjanakanoje/OOP
23UAM048_multipleinheritance.cpp
#include <iostream> #include <string> using namespace std; // Base class Person class Person { protected: string name; int age; public: // Constructor Person(string n, int a) : name(n), age(a) {} // Virtual function display() virtual void display() { cout << "Name: " << name << endl...
TOOL
0.961465
7.488122
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-17T05:13: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": "54dcb557707b...
6e5d495a-f065-4f84-89b2-495ff88df56e
mkowalczyk570/CS-385
sqrt/sqrt.cpp
/************************************************ * Name: sqrt.cpp * Author: <NAME> * Version: 1.0 * Date: September 2, 2021 * Description: Computes the square root of the command-line argument * Pledge: I pledge my honor that I have abided by the Stevens Honor System ********************************************...
ALGO
0.998555
5.499707
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-02-18T00:59:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee62fdfa78d0...
ce7e17ff-d6a9-4ed4-b093-cfee036456af
FrankJRix/automata
apps/main.cpp
#include <iostream> #include <sstream> #include <automata/cellular_automata_base.h> #include <automata/heightmap_automata.h> int main(int argc, char* argv[]) { std::cout << "Hello World from Automata!" << std::endl; int w{100}; int h{100}; int n{1000}; int r{1}; if(argc > 1) { for(int i{ 1 }; i < argc;)...
ALGO
0.913665
4.662604
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2024-11-28T16:06: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": "b2d351647...
af933c95-2cc8-4252-bd2c-ac76a35c03b0
LucDemortier/pValueMethods
cdflib/beta_log.cpp
# include <iomanip> # include <cmath> using namespace std; # include "cdflib.hpp" //****************************************************************************80 double beta_log ( double *a0, double *b0 ) //****************************************************************************80 // // Purpose: // // BETA_...
ALGO
0.97768
4.935993
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-09-01T03:46: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": "3ab9acc5e...
f16ed50b-d82a-47e2-86db-fdd8a5c7a059
Qinzhehan52/pat-basic
src/1031.cpp
#include <iostream> #include <string> int weights[17] = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; char checkCodes[11] = {'1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'}; int main(int argc, char const *argv[]) { int n, e = 0; std::cin >> n; for (int i = 0; i < n; i++) { st...
ALGO
0.99211
4.904886
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-06-26T07:20: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": "3c713a102...
d4ccd40f-823a-49d9-a22f-4b9cefe1ca93
Namo1999/Leetcode
leetcode/editor/cn/19-remove-nth-node-from-end-of-list.cpp
//给你一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点。 // // // // 示例 1: // // //输入:head = [1,2,3,4,5], n = 2 //输出:[1,2,3,5] // // // 示例 2: // // //输入:head = [1], n = 1 //输出:[] // // // 示例 3: // // //输入:head = [1,2], n = 1 //输出:[1] // // // // // 提示: // // // 链表中结点的数目为 sz // 1 <= sz <= 30 // 0 <= Node.val <= 100 // 1 <= ...
ALGO
0.999971
5.772978
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-11-17T10:28: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": "f06b901cf72d...
669304b0-f429-4bbf-ad23-331773967239
maruf-ahammed-75/problem-solve-for-cp
Code Forces/Boredom.cpp
#include <bits/stdc++.h> #define ll long long #define ff first #define ss second #define full(a) a.begin(),a.end() using namespace std; ll dp[100000+9999]={0}; ll dp2[100000+9999]; //--------using recursion it's right but get tle------------- // ll Boredom(ll n){ // if(n==0)return 0; // if(n==1)return dp[1]; //...
ALGO
0.999971
3.776135
{ "github_metadata": { "branch": "main", "commit_count": 351, "repo_created_at": "2024-09-24T15:20:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89dce4f684...
e3cbdf2e-6e62-4488-b0c6-6deca83b3f00
shawpujaa/LeetCode
25-reverse-nodes-in-k-group/25-reverse-nodes-in-k-group.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* reverseKGro...
ALGO
0.999991
5.77793
{ "github_metadata": { "branch": "main", "commit_count": 848, "repo_created_at": "2022-03-17T15:31: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": "c108c70866...
12d18182-c6f0-4c7c-b002-40d6093ca8e5
thilio/Competitive-programming-team
Trainings/2019-2020 ICPC, Asia Jakarta Regional Contest/e.cpp
#include "bits/stdc++.h" using namespace std; #define pb push_back #define mp make_pair #define fst first #define snd second #define fr(i,n) for(int i=0;i<n;i++) #define frr(i,n) for(int i=1;i<=n;i++) #define ms(x,i) memset(x,i,sizeof(x)) #define dbg(x) cout << #x << " = " << x << endl #define all(x) x.begin(),x.en...
ALGO
0.999997
3.232012
{ "github_metadata": { "branch": "main", "commit_count": 391, "repo_created_at": "2021-01-09T16:55:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "455b1d24f1...
aca5e1ce-ec5d-4146-b4c8-680bc5c63ee9
pradeep-kumar-1705807/Data-structure-and-Algorithms
BottomViewOfATreeUsingVertivalOrderTraversal.cpp
#include<bits/stdc++.h> using namespace std; // Tree node class struct Node { int data; //data of the node Node *left, *right; //left and right references // Constructor of tree node Node(int key) { data = key; left = right = NULL; } }; // Method that prints the bottom view. void...
ALGO
0.999952
4.056211
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-03-30T08:45: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": "7e6dd8eb31...
e328a2d5-22e3-452a-9618-929618f09231
ddeka0/CP
leetcode/samsung_1.cpp
#include <stdio.h> const int N = 10; // 100010; int K; int arr[N]; long long pref[N]; // pref[0.........i] = sum(arr[0]+arr[1]+......arr[i]) from front long long suf[N]; // suf[0.........i] = sum(arr[N-1]+arr[N-2]+......arr[i]) from back // either search value of pref or suffix // flag == 1 -> on prefx sum array // f...
ALGO
0.999821
3.603323
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2018-07-25T17:48:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a111185a6...
3bca2cb0-5289-4587-97ed-568a0317ac43
bryanSME/hipparchus-_cpp
geometry/euclidean/twod/hull/ConvexHull2D.h
#pragma once /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "Licens...
ALGO
0.999637
3.977532
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-08-15T23:45:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "602b8e30b2e...
059cfc29-2e5d-4e4c-bccc-175295301700
yushengtzou/Leetcode
1.ProgrammingSkills/976_LargestPerimeterTriangle/main.cpp
// 976. Largest Perimeter Triangle // 鄒雨笙 2024.1.7 #include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; int largestPerimeter(vector<int>& nums) { int a, b, c; int perimeter = 0; bool isTriangle = false; sort(nums.begin(), nums.end()); for (int i = num...
ALGO
0.999071
4.409381
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-12-20T10:14: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": "1a438e9007fc...
611ded82-4ddc-4615-ada2-ee5b5a32b3cc
yjl9903/XCPC
Codeforces/global7/b.cpp
#include <iostream> #include <cstdio> #include <cassert> #include <cstring> #include <cmath> #include <functional> #include <algorithm> #include <utility> #include <vector> #include <string> #include <map> #include <set> #define ms(a,b) memset(a,b,sizeof(a)) using namespace std; using ll = long long; using PII = pair<i...
ALGO
0.999857
3.502144
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-03-25T19:33:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "590c9de06fcf...
fef5f870-78a3-4a83-9f09-65d3bce36b6a
saifoff/Competitive_programming_submissions
AtCoder/AtcoderContest241B.cpp
#include<bits/stdc++.h> using namespace std; int binarySearch(long long int array[], long long int x, int low, int high) { // Repeat until the pointers low and high meet each other while (low <= high) { int mid = low + (high - low) / 2; if (array[mid] == x){ array[mid]=-2; return mid; ...
ALGO
0.999992
3.6048
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-02-22T19:06: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": "d9d3b16167b6...
a016d7e8-1c01-4dac-9fb5-b8b0422afbd1
Apphle/C_programming
Physics_Trainer_Chap2 ver3/20230429/20230429_2/Project1/main.cpp
#include <stdio.h> #include <stdlib.h> #define _USE_MATH_DEFINES // M_PI를 사용하기 위해서 추가 #include <math.h> #define SHOW 1 #define NOT_SHOW 0 #define Show_Solution 1 #define Answer 1 #define DEG2RAD(x) x*M_PI/180. #define RAD2DEG(x) x*180/M_PI void Excersize_2_15(int solution, int answer) { ...
ALGO
0.995788
3.468872
{ "github_metadata": { "branch": "main", "commit_count": 191, "repo_created_at": "2023-03-08T00:47: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": "5d25f75dbc...
eb912956-49f5-4556-8b20-af6ecb7cb072
bitcoin-sv/bitcoin-sv
src/test/bn_helpers.h
// Copyright (c) 2019 Bitcoin Association // Distributed under the Open BSV software license, see the accompanying file // LICENSE. #pragma once // requires Op models concept of Binary Operation with Domain(T) // requires N models concept of Integer template <typename T, typename Op, typename N> T power_binary(T t, O...
ALGO
0.999459
6.986595
{ "github_metadata": { "branch": "master", "commit_count": 18949, "repo_created_at": "2018-08-29T16:02:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 672, "forks": 307, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id": "04e...
38ecb2bc-645f-48b4-b86a-18626a6d634d
AnasImloul/JNJD-2024
A/chunks.cpp
#include <vector> #include <iostream> #include <map> #include <climits> #include <algorithm> using namespace std; using ll = long long; #define endl '\n' #define square(x) ((x) * (x)) #define distance(x1, y1, x2, y2) (square(x1 - x2) + square(y1 - y2)) const ll MAX = 1 << 30; const ll CHUNKS = 1 << 4; const ll CHUN...
ALGO
0.999686
4.81679
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-05-14T10:14:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9576c5fc0a8...
82612989-be35-40af-b9e8-f2623417c7f9
Srishtigoel1/Problem-Solving
HOMEWORK/Searching-5/kth_element_in_matrix.cpp
int possible(int mat[MAX][MAX], int n, int mid) { int count = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (mat[i][j] <= mid) { count++; } else { break; } } } return count; }...
ALGO
0.99999
5.741473
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2024-03-09T17:32: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": "f0510502583...
1232f69b-ddd7-47af-b10d-acd57e7a046c
joshuathurston/CSCI550
project2/proj2.cpp
/*Author: <NAME> *Date: 9/16/2017 *Brief: Project 2 */ #include <iostream> #include <stdio.h> #include <vector> using std::cin; using std::cout; using std::endl; using std::vector; using std::pair; enum Vstate{WHITE, GRAY, BLACK}; vector<int> parent; vector<int> last; vector<int> first; void DFSVisit(vector< ve...
ALGO
0.999721
3.649729
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-03-16T21:10: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": "afeb9a8fbe...
6a9f1564-e6b3-4a34-83a6-bcc1cdb8492d
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/06/0615/personal_submission/cf1282b2_yawn_sean.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3") using namespace std; signed main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t; cin >> t; while (t --) { int n, p, k; cin >> n >> p >> k; vector<int> dp(n + 1); for (int i = 1; i <= n; i...
ALGO
0.999956
4.131061
{ "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": "c800...
cdc61c20-176d-43c5-b0fd-2e7b09034eb3
marsp0/Shmick
c++/merge_bst.cpp
#include <vector> struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) { if ((t1 != NULL) and (t2 != NULL)) { t1->val = t1->val + t2->val; } else...
ALGO
0.999987
5.674447
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2017-04-15T10:01: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": "2a84523ad...
6edd4346-a96c-4302-95ca-a1bf20d0930e
dholzmann/icl_ros_segmentation
src/PlanarRansac.cpp
#include "PlanarRansac.h" struct PlanarRansac::Data { Data(Mode mode) { clReady = false; if(mode==BEST || mode==GPU){ useCL=true; }else{ useCL=false; } } ~Data() { } bool clReady; bool useCL; }; PlanarRansac::PlanarRansac(Mode mode) : m_data(new Data(mode)) { } Planar...
ALGO
0.983389
5.9883
{ "github_metadata": { "branch": "dholzmann", "commit_count": 65, "repo_created_at": "2021-06-17T08:36: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": "3dc1c1...
131f92f2-072d-4d5b-8673-4f74a0dd8a4f
ninad-moree/DataStructuresAlgorithms
!-NotLeetCode/LinkedList/TwoSumLinkedList.cpp
/* A doubly-linked list is a data structure that consists of sequentially linked nodes, and the nodes have reference to both the previous and the next nodes in the sequence of nodes. You are given a sorted doubly linked list of size 'n', consisting of distinct positive integers, and a number 'k'. Find ...
ALGO
0.999988
5.362812
{ "github_metadata": { "branch": "main", "commit_count": 1213, "repo_created_at": "2023-12-12T04:49:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39c8b0582...
261b8353-e02a-48a3-8e36-6c7b6c129572
quelopelo/prog-2
pr03/pr03ej01.cpp
#include <stdio.h> struct nodo { int elem; nodo *sig; }; typedef nodo * lista; /* Dada una lista no vacía, retorna su último elemento. */ nodo last (lista l); /* Dada una lista no vacía, retorna el promedio de sus elementos. */ float average (lista l); /* Dados un entero x y una lista l ordenada, inserta x ...
ALGO
0.998989
5.389502
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-03-03T22:46:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d23f82ee8da...
ca346172-2dff-447d-a171-b1daa2008137
b-chae/AlgorithmStudy
baekjoon/트라이/16934.cpp
#include <iostream> using namespace std; class Tree { public: Tree *next[26] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU...
ALGO
0.999971
4.169043
{ "github_metadata": { "branch": "master", "commit_count": 449, "repo_created_at": "2020-04-20T08:39:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c45f2598...
db372a51-486f-4e37-899b-79e61b4bab08
flyfj/RGBDMaze
RGBDSearch/SmartWindows/a9wins/DisjointSet.h
// Confidential, Copyright 2013 A9.com, Inc. #ifndef LOGO_RECOGNITION_DISJOINT_SET_H_ #define LOGO_RECOGNITION_DISJOINT_SET_H_ #include <vector> template<class TYPE> class DisjointSetNode { public: typedef TYPE value_type; typedef float weight_type; // Constructors. inline DisjointSetNode() : parent_(NULL),...
ALGO
0.948864
5.21867
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2013-10-03T01:30:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 7, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "18d864242...
46db926c-b91c-45fa-8cf7-e3cd6abe36f8
mukesh567/ALL-DSA-PROBLEMS
Array/Questions/MaxandMinElement.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } int max, min; if (n == 1) { max = arr[0]; min = arr[0]; } else { if (arr[0] > arr[1]) ...
ALGO
0.999954
4.173899
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-06-12T10:04: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": "6765f3d9ae...