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
e9542ad6-5c83-46b1-a344-a221c424c57d
m3h3d1/CP-Edu
binary search/15. Search for a Range (template 2).cpp
//finding lower-bound & upper-bound #include<bits/stdc++.h> using namespace std; int lowerBound(vector<int>& v, int x) { int l=0, r=v.size()-1; while(l<r) { int m = l+(r-l)/2; if(v[m] < x) l = m+1; else r = m; } if(v[l] == x) return l; return -1; } int upperBound(vector<int>...
ALGO
0.999997
5.794285
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-02-17T07:22: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": "d6439ff1642...
84bb6631-f0b7-4717-b50e-6f99418c997c
farmJun/Algorithm_BOJ_PS
수열과쿼리15_14427.cpp
#include "iostream" #include "vector" using namespace std; typedef long long ll; pair<ll, ll> arr[1000001]; vector<pair<ll, ll>> tree; //first = value, second = idx; int n, m; pair<ll, ll> compare(pair<ll, ll> a, pair<ll, ll> b) { if (a.first == b.first) { return (a.second < b.second) ? a : b; } ...
ALGO
0.999976
4.746732
{ "github_metadata": { "branch": "main", "commit_count": 235, "repo_created_at": "2022-07-04T13:27:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74eb59acea...
f12537f3-5335-4d22-a15e-e68a4c56cf35
Silverutm/Soluciones-UVA
Concurso/F9/F.cpp
#include <iostream> #include <cstdio> #include <cmath> using namespace std; #define tam 2502 //typedef long double ld; double A[tam], B[tam], C[tam], faclog[tam]; //int arra[tam], arrb[tam], arrc[tam]; double EPS = 1e-7; int main() { faclog[0] = faclog[1] = 0.0; faclog[2] = 1.0; for (int i = 3; i < tam; ++i) faclo...
ALGO
0.999211
3.205196
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-04T03:16: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": "22167ba400...
d434d81f-e221-4868-bca8-8f98241a0388
gustavo-marini/UOJProblems
1062.cpp
#include <iostream> #include <cstdio> #include <stack> #include <string.h> #include <vector> using namespace std; void limpaPilha(stack<int> &p) { while(p.size()!=0) p.pop(); } void mostraPilha(stack<int> &p, string s = " ") { stack<int> pAux = p; while(p.size()!=0){ cout << p.top() << s; ...
ALGO
0.999924
3.53868
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2019-10-09T02:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77bfcb1f...
8649e5c7-15e4-4c00-a06e-1778b2e817af
raggedgenes/Chemoton_Game
chemoton/chemotonbf.cpp
/*Copyright 2013, <NAME> Project started on 11/11/2013 Chemoton modelling based on the work <NAME> and <NAME>. */ #include "chemotonbf.h" #include "fixedratereaction.h" #include "concdependentreaction.h" #include "polimerization.h" #include "membranegrowthreaction.h" #include <stdio.h> #include <sstream> usi...
ALGO
0.957295
3.124377
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-12-05T08:51:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e145c4811...
df3ece53-6431-4e17-989c-3b7e9947e98b
hhcoder/ImageProcAlgo
BlockMatching/block_matching.cpp
// Practice: MSE-based block matching, user can specify block size and search range // Commandline Usage: // TBD #include <stdio.h> #include <stdlib.h> void BlockMatching( const Image* src_img, const Image* dst_img, vector<loc_pair>& src_points, vector<loc_pair>& dst_points, const MatchingConfi...
ALGO
0.973042
5.451715
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-12-04T00:23:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e247e0868c...
d5b87904-9f28-46b5-9724-7e42e4d799f6
MereyPolatkhan/Algorithms_and_Data_Structures
exam_problems/prime.cpp
// prime: 2 ways: // 1) O(sqrt(n)) // 2) Eratosphene #include <bits/stdc++.h> using namespace std; bool check_if_prime(int n) { if (n == 1) { return false; } for (int i = 2; i <= sqrt(n); i++) { if (n % i == 0) { return false; // Prime emes } ...
ALGO
0.998767
4.901724
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2022-08-07T17:40:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ff401c5c...
6f11e1b0-ee07-4e64-a803-c79753a8e82e
MAHISHARMA-2023A1R078/Mahi-Sharma-2023A1R078-Cpp-Lab
constantvariablevalue5.cpp
/* Write a program to 1/04/25 a. create a constant variable a initialize with value 5 b. create a local variable b initialize with value 6 c. create a constant function modify() and increment value of a and b by 2 inside function definition. d. create a member function update() and increment value o...
ALGO
0.995781
5.075631
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2025-02-23T06:30: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": "36e3f09f2da...
4c12214d-8d28-492b-99f5-45765c9c0c2a
KKRainbow/LeetCode
Accepted/120.triangle.56095315.ac.cpp
/* * [120] Triangle * * https://leetcode.com/problems/triangle * * Medium (33.48%) * Total Accepted: * Total Submissions: * Testcase Example: '[[-10]]' * * Given a triangle, find the minimum path sum from top to bottom. Each step * you may move to adjacent numbers on the row below. * * * For examp...
ALGO
0.999939
6.499517
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2015-11-08T09:31:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "484c5071...
7c14176d-17a2-40ea-9834-def2f6f2e7b1
Rajkumarsahu-xyz/Data-Structures-and-Algorithms-Leetcode
0802-find-eventual-safe-states/0802-find-eventual-safe-states.cpp
class Solution { public: bool dfs(int start, int V, vector<vector<int>>& graph, vector<int>& visited, vector<int>& path_visited, vector<int>& check) { visited[start] = 1; path_visited[start] = 1; check[start] = 0; for(auto x : graph[start]) { if(visit...
ALGO
0.999977
6.119791
{ "github_metadata": { "branch": "master", "commit_count": 2997, "repo_created_at": "2022-09-23T14:55: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": "45e6a3a...
161ef0cc-f8f5-445b-9f9b-f4002fb69504
yukiCodesStuff/Competitive-Practice
codeforces/progressiveSquare.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <algorithm> using namespace std; int main() { int t; cin >> t; while (t--) { long long n, c, d; cin >> n >> c >> d; vector<long long> a(n * n); for (int i = 0; i < n * n; ++i) { cin >> a[i]; } ...
ALGO
0.999369
3.958132
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-02-29T15:59:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "237f8fc4f81...
c0c04580-d089-42a8-8153-35dddf449824
nicoleviarengo/C-
Final Nicole Viarengo 27-12-22.cpp
/*Cargar en un arreglo: Numero de provincia, numero de campo, numero de cereal, toneladas de cereal. Cosecados en N establecimients agropecuarios que una epresa administra sus cosechas. El numero de provincia puede ser 1- cordoba, 2-santa fe 3-bs as (validar). Numero de cereal puede ser 1-soja, 2-trigo, 3-girasol (vali...
ALGO
0.999484
3.323445
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-04-09T18:52: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": "d3a339d3722...
7bb2a63e-3a87-4dbc-bc5a-b0d765a01c27
yash-shashank-vakilna/model-brain-diffusion
include/brian/preconditioner.h
#ifndef PRECONDITIONER #define PRECONDITIONER /* * * preconditioner.h: preconditioners for sparse linear systems * BRIAN Software Package Version 3.0 * * $Id: preconditioner.h 508 2017-03-26 20:13:21Z frithjof $ * * 0.10 (17/06/11): preconditioners introduced * 0.20 (23/09/12): split from solver * 0.30 (31/12...
ALGO
0.999196
5.49769
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-08-28T07:11:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe71252895...
7fe72253-3695-4331-b3f5-7b35720dd2e9
gabriela2/GraficaPeCalculator
Laborator6-All/main.cpp
//SURSA: lighthouse3D: http://www.lighthouse3d.com/tutorials/glut-tutorial/keyboard-example-moving-around-the-world/ #include<gl/freeglut.h> #include<math.h> // angle of rotation for the camera direction float angle=0.0; // actual vector representing the camera's direction float lx=0.0f,lz=-1.0f; // XZ position of t...
TOOL
0.925117
4.238969
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-03-25T09:30: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": "8b26828252...
bca74a76-1d6d-453e-ba7a-4f738d09f5a4
printfchan/Leetcode
Leetcode/63. Gray Code/Gray Code.cpp
/************************************************************************/ /* https://oj.leetcode.com/problems/gray-code/ The gray code is a binary numeral system where two successive values(相邻) differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequenc...
ALGO
0.999826
4.94225
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2014-04-06T14:30: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": "e203232fc...
fb312019-bb15-4518-a766-3add859215e1
wanglei828/leetcode
algorithms/Find_Mode_in_Binary_Search_Tree-easy/solution.cpp
/* Given the root of a binary search tree (BST) with duplicates, return all the mode(s) (i.e., the most frequently occurred element) in it. If the tree has more than one mode, return them in any order. Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than or equal to ...
ALGO
0.999997
6.978714
{ "github_metadata": { "branch": "master", "commit_count": 1063, "repo_created_at": "2016-06-24T00:56: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": "41ae8af...
82275300-3035-4a46-81d1-def94680bdc4
huyhoang8704/CSE-LabDSA-HCMUT
LinkedList/main.h
#ifndef __Singly_Linked_List_H__ #define __Singly_Linked_List_H__ #include "main.h" class Singly_Linked_List { public: class Node; public: class Node{ public: int data; //! dữ liệu Node* next; //! trỏ tới node tiếp theo public: Node(int data = 0, Node* next = nullptr) ...
ALGO
0.998885
4.145809
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2024-06-20T06:50:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d0ff5494...
f048cfa0-17c6-4e15-94ae-031677f5c49e
sweeneychris/TheiaSfM
src/theia/sfm/pose/util.cc
// Copyright (C) 2013 The Regents of the University of California (Regents). // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above...
ALGO
0.997677
6.928987
{ "github_metadata": { "branch": "master", "commit_count": 958, "repo_created_at": "2015-02-11T18:15:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 933, "forks": 280, "issues": 36, "pull_requests": 10 }, "file_meta": { "content_id": "4f...
0bfbcfe8-ac41-47ea-ab29-f8f30c68e41e
Sadi-Hurayv/Competitive-Programming
Online Judge/URI/URI problem(solve)/Data Structure/c++/uri 1083.cpp
#include<bits/stdc++.h> using namespace std; int priority(char ope); int main() { int n; cin >> n; for(int i=0; i<n; i++) { string expr; cin >> expr; stack <char> s; for(int j=0; j<expr.length(); j++) { if(isalnum(expr[j])) { ...
ALGO
0.999971
4.365821
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-01-05T10:17: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": "2d518fab2215...
e273e7e5-1c2c-4f66-a0e0-5a94ecb08f95
lucifer1004/codeforces
1336/b/b.cc
#include <algorithm> #include <climits> #include <cstdio> #include <iostream> #include <set> using namespace std; typedef long long ll; int left(int target, set<int> &s) { if (*s.begin() > target) return -1; return *prev(s.upper_bound(target)); } int right(int target, set<int> &s) { auto it = s.lower_bound...
ALGO
0.999668
4.660944
{ "github_metadata": { "branch": "master", "commit_count": 380, "repo_created_at": "2019-10-02T04:53:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f4a091e2...
e5e17f77-b978-4798-b4ec-4761de8b328a
zuhaib786/CSES_SOLUTIONS
Range Queries/DynamicRangeMinimumQueries.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 1000000007 // Segment Tree. int seg_tree[16*(100005)]; void build(int a[], int v, int l , int r) { if(l==r) { seg_tree[v] = a[l]; } else { int m =(l+r)/2; build(a, v*2, l,m); build(a, v*2+1, m+1, r); se...
ALGO
0.999979
4.369236
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2021-06-08T12:57:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "230d03a63b1...
5949bd78-25f4-4a15-a86b-34b2dd6aefb0
yunga53u/threads
reader.cpp
#include <iostream> #include <fstream> #include <stdlib.h> #include <thread> #include<sys/mman.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include "reader.h" using namespace std; //=================================================== Reader::Reader() { in_file_name = "file.txt"; out_file_nam...
TOOL
0.972525
3.282648
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-12-27T20:01: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": "7c2c43c73f...
72d02ae0-0c7b-4eaa-ba35-dcf6ca37ac73
rlj1202/problemsolving
baekjoon/6203_serious_cow_tag/main.cpp
#include <iostream> #include <queue> using namespace std; struct Point { int x, y; }; int N; Point points[1003]; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> adj[1003]; bool out[1003]; int main() { scanf("%d", &N); for (int n = 0; n < N; n++) { int x, y; scanf("%d %d", &x, ...
ALGO
0.999951
3.910081
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2019-05-12T13:03:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6564aa1642e...
baba1c75-6588-459b-95a8-7169fb08b680
satylogin/CODEFORCES
540B.cpp
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define ll long long int #define ld long double #define pb push_back #define mkp make_pair #define scan(x) scanf("%d", &x) int arr[100001]; int main() { int c, n, k, p, x, y, i, j, a, b; cin >> n >> k >> p >> x >> y; for (i = 0; i < k; ++i) { ...
ALGO
0.999888
3.453226
{ "github_metadata": { "branch": "master", "commit_count": 251, "repo_created_at": "2016-10-13T06:21:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "226890aa...
a04affb7-a1a5-477a-be47-74bcb6da8252
dhruv-colosus/DSA-and-CP
DSA/Queues/Circular_Queue.cpp
#include <iostream> using namespace std; struct Queue { int size; int front; int rear; int *Q; }; void create(struct Queue *q, int size) { q->size = size; q->front = q->rear = 0; q->Q = new int[q->size]; } void Enqueue(struct Queue *q, int x) { if ((q->rear + 1) % q->size == q->fro...
ALGO
0.998543
3.783734
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-10-02T11:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11d535ad2d9...
567e13d7-1a8b-42e9-b1cc-da5351583f35
cpp-review-dune/gascoignelib
src/Discretization/Q1/triabase2d.h
/*---------------------------- triabase2d.h ---------------------------*/ #ifndef __triabase2d_H #define __triabase2d_H /*---------------------------- triabase2d.h ---------------------------*/ #include "numfixarray.h" #include "vertex.h" #include <array> #include <cmath> #include <iostream> namespace Gas...
ALGO
0.974229
6.070159
{ "github_metadata": { "branch": "tutorials", "commit_count": 1084, "repo_created_at": "2023-05-15T22:38:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2e91...
8826e466-a2a6-45e1-8b30-6b34a24f94f8
hijkl2e/problem_solving
boj/Volume 13/boj13418.cpp
#include <bits/stdc++.h> using namespace std; using edge = tuple<int, int, int>; class UF { public: UF(int N) : par(N), sz(N, 1) { for (int i = 0; i < N; ++i) { par[i] = i; } } int root(int x) { return par[x] == x ? x : (par[x] = root(par[x])); } bool same(int x, int y) { return root(x) == root(y); ...
ALGO
0.999972
4.642776
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-12-04T14:16:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e18c87750599...
6caddf23-53ab-487d-af57-a94336ab9e18
Tefariv/testrepositorio
metodos.cpp
#include <iostream> using namespace std; void burbuja(int mat[]){ for (int i=0; i<5; i++){ for(int j=0; j<4; j++){ if(mat[j] >mat[j+1]){ int aux=mat[j]; mat[j]=mat[j+1]; mat[j+1]=aux; } } } cout<<"Num en orden ascendente"; for(int i=0; i<5; i++){ cout<<endl; cout<<mat[i]; } cout<<"N...
ALGO
0.999616
4.277301
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2021-09-22T01:28:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d959c93553...
6ace44e0-52b7-4987-ae68-c6e4f86cb314
aaafwd/Online-Judge
Volume 006 (600-699)/628.cpp
/* @JUDGE_ID: 19899RK 628 C++ "By Anadan" */ // Passwords // Accepted (0.060 seconds using as much as 420 kbytes) #include <stdio.h> int N, res[256]; char dict[100][256], rule[256]; void genpasswords(char *s, int n){ int i; if (*s == 0){ for (i = 0; i < n; ++i){ if (res[i] > 100) putchar(res[i] - 100); els...
ALGO
0.997447
3.442658
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-04-11T10:48:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bcd027c209a...
33b5615c-60d5-4cf3-be5b-1d4a25a7eae3
chandanagrawal23/DSA-Sheet
Graph/FindAllGroupsOfFarmland.cpp
class Solution { const int dx[4] = {0, 0, 1, -1}; const int dy[4] = {1, -1, 0, 0}; // Perform BFS to explore connected farmland and return the top-left and bottom-right corners vector<int> bfs(int i, int j, vector<vector<int>> &grid) { int rows = grid.size(), cols = grid[0].size(); ...
ALGO
0.999996
7.484114
{ "github_metadata": { "branch": "main", "commit_count": 515, "repo_created_at": "2021-11-10T17:59: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": "20922a64c0...
beb9aeff-58e9-4485-a39e-04739e1c3488
ThatDevShparki/M-368K-Spring-2019
Homework 1/iterativeLA.cpp
// iterativeLA.cpp // <NAME> #include <iostream> using namespace std; #include <math.h> #include "iterativeLA.h" #include "matrix.h" #define MONITOR // Returns true if matrix is Strictly Diagonally Dominant and false otherwise bool is_sdd(const Matrix& A, int& n) { bool sdd = true; for (int i=0; i<n; i++)...
ALGO
0.999897
5.586672
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-02-07T04:07: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": "4295f77498...
5f8e194f-3ed0-49bb-bdb2-9e0b25f60a6e
RUI6938/blog
dev c++_code/练习code/单链表逆置2.cpp
#include <stdio.h> #include <stdlib.h> struct ListNode { int val; struct ListNode *next; }; struct ListNode* createList(int n) { struct ListNode *head = NULL; struct ListNode *tail = NULL; for (int i = 0; i < n; i++) { int value; scanf("%d", &value); struct ListNode *newNod...
ALGO
0.999813
4.655838
{ "github_metadata": { "branch": "main", "commit_count": 181, "repo_created_at": "2024-07-04T09:06:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 96, "pull_requests": 0 }, "file_meta": { "content_id": "b08e857b1...
19e8deb6-6e6d-49e7-9a83-69931b763e45
new-zelind/cpsc1020
lab10/driver.cpp
/*<NAME> zelindl Lab 10 Section 2 <NAME> & <NAME>*/ #include "lab10.h" using namespace std; int main(int argc, char const *argv[]) { /*Check to determine if the appropriate number of files were passed to the *command line.*/ if(argc!=3){ cout<<"Error: incorrect number of command line arguments give...
ALGO
0.968998
4.486059
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-02-20T19:55:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "043d8ba754...
596252e8-9a0d-47fa-9a96-16b5b9792a27
codeisart/tick_tack_toe
main.cpp
#include <stdio.h> #include <vector> #include "SDL2/SDL.h" #include <SDL2/SDL_ttf.h> #define WIDTH 600 #define HEIGHT 600 template<typename T> T ABS(T x) { return x < 0 ? -x : x; } template<typename T> T MAX(T a, T b) { return a > b ? a : b; } template<typename T> T MIN(T a, T b) { return a < b ? a : b; } uint32_t RGB...
TOOL
0.908344
5.146146
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-03-06T23:48: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": "f4792b4abc3a...
67fef9bf-000a-4719-a40c-eab20de11579
CP-TSAI/NTUST-Computer-Vision
04-image-rectification/rectification.cpp
// #include "opencv/opencv2/opencv.hpp" #include <vector> #include <fstream> #include <string> #include <sstream> #include <cctype> #include <Eigen/Dense> #include <math.h> #include <chrono> #include <iostream> #include "opencv2/opencv.hpp" #define PI 3.14159265 using namespace std; // describe the coordination o...
ALGO
0.997988
4.414171
{ "github_metadata": { "branch": "master", "commit_count": 247, "repo_created_at": "2017-08-26T14:20: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": "55f73bb1...
20123018-4961-41ed-b666-dc768471164b
SajibBarua-art/Graph-Theory
Basic/19. Tarjan's Algo finding SCC.cpp
// Tarjan's Algorithm for finding SCC // It is almost the same principle for finding bridges in a graph #include <bits/stdc++.h> using namespace std; const int nodes = 1e3 + 4; vector<int> graph[nodes]; bool isVisited[nodes], onStack[nodes]; stack<int> st; int in[nodes], low[nodes]; int timer=1, SCC=0; void dfs(int...
ALGO
0.999929
4.891847
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-09-25T05:47: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": "dc1c944e3c0...
c4eb1db6-dad8-4352-9ba0-6854e5c1ac6b
akankshaaa013/10DaysRecursionChallenge
Day10/ProRam_Numbers.cpp
#include <bits/stdc++.h> using namespace std; //getDigits() function returns the vector of seperate digits of an integer. for e.g : if num = 123 then the function returns {1,2,3}. vector<int> getDigits(int num){ vector<int> nums; while(num!=0){ nums.push_back(num%10); num/=10; } rever...
ALGO
0.999973
4.918568
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-07-03T17:03:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc3dd91ef1d...
9950f069-294b-4649-aa5e-0d69b1ca2b80
1000oki/C-study
Skyline_1910896/Skyline_1910896/Skyline.cpp
#include <iostream> #include <string> #include "Skyline.h" using namespace std; void Skyline::add(size_t l, size_t r, size_t h) { //height벡터의 크기와 height벡터의 원소 삽입 if (r > height.size()) { //오른쪽 x값이 height벡터 크기보다 크면 height.resize(r); //오른쪽 x값만큼 height벡터의 크기를 재할당해준다. } for (size_t i = l; i != r; ++i) { //왼쪽 x값부터 오른쪽...
ALGO
0.999635
4.106075
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-03-13T13:43: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": "b743a60754...
6f202efe-889f-4eb1-adc7-a818d812ecd6
thethanh02/cpp-dsa
DSA11003.cpp
#include <bits/stdc++.h> using namespace std; int Search(int a[], int x, int n) { for (int i = 0; i < n; i++) if (a[i] == x) return i; return -1; } void printPostOrder(int in[], int pre[], int n) { int x = Search(in, pre[0], n); if (x != 0) printPostOrder(in, pre + 1, x); if (x != n - 1) pr...
ALGO
0.999986
4.495295
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2022-03-10T12:55: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": "a1f6d4d3d2...
edb0e44d-c332-4e72-a0a6-af2bb378c896
tridibsamanta/Algorithmic-Toolbox
Week 3/covering_segments.cpp
#include <bits/stdc++.h> using namespace std; void minPoints(int n, vector< pair<int, int> >& seg) { if (n == 1) { cout << 1 << '\n'; cout << seg[0].second; return; } vector<int> points; sort(seg.begin(), seg.end()); int curr_end = seg[0].second; for (int i = 1; i <...
ALGO
0.999995
3.803642
{ "github_metadata": { "branch": "master", "commit_count": 591, "repo_created_at": "2020-07-12T15:14:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "935a3f4a...
2a6e522b-dcd8-4164-8866-7761428142cc
DylanGuedes/uva-problems
108.cpp
#include <iostream> using namespace std; int grid[105][105]; #define FOR(i, j, k)for(int i=j;i<k;++i) int main() { int n; scanf("%d", &n); FOR(i, 0, n) { FOR(j, 0, n) { scanf("%d", &grid[i][j]); if (i > 0) grid[i][j] += grid[i-1][j]; if (j > 0) grid[i][j] += g...
ALGO
0.999963
3.503375
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-05-15T12:09: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": "971f28cf4...
086e34ae-83ae-47c6-8651-cee7080a1141
Hinski2/CP
grafy/dijkstra/astmatyk/cpp91.cpp
#include<bits/stdc++.h> using namespace std; const int maksimum = 100015; const int inf = 1000007; int n, m; int wysokosc[maksimum]; //wysokości wierzchołków bool odwiedzony[maksimum]; //do sprawdzania czy wierzchołek został odwiedzony vector<pair<int, int>>G[maksimum]; //vector połączeń vector<int>maks(maks...
ALGO
0.999959
3.797459
{ "github_metadata": { "branch": "main", "commit_count": 799, "repo_created_at": "2023-06-07T17:30: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": "fca64c24b4...
eff82c81-3973-407f-9b96-1e0ebd0d0362
lingxiao7/Cryptology
RC4.cpp
#include <stdio.h> #include <string.h> #define MAX_KEY_LEN 2048 #define MAX_CHAR_LEN 30000 // RC4算法 // 流密码生成器 class RC4 { private: unsigned int keyLen; // 密钥长度 unsigned int msgLen; // 明文长度 unsigned int key[MAX_KEY_LEN]; // 密钥 unsigned int keyStream[MAX_KEY_LEN];// 密钥流 public: /* * RC4初始化 * * @param K[] * ...
ALGO
0.977559
3.808273
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-04-02T05:22: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": "468724ce67...
431c7dbb-0f0d-4180-b5e1-5aab8db77efe
lastarsenal/leetcode
MergeKSortedList.cpp
/** * Definition for singly-linked list. */ #include <vector> #include <algorithm> #include <queue> #include <stdio.h> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; struct cmp { bool operator()(ListNode* a, ListNode* b) { return ...
ALGO
0.999963
5.730602
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2015-03-05T16:27: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": "26656d0d5...
d76a2e74-fe83-4433-864a-70d16bfd3916
Cation-Coder6/DSA-450-Solved
Dynamic Programming/6.Unbounded-Knapsack.cpp
int knapSack(int n, int w, int val[], int wt[]) { int t[n + 1][w + 1]; for (int i = 0; i <= n; i++) { for (int j = 0; j <= w; j++) { if (i == 0 || j == 0) t[i][j] = 0; // if max weight = 0 then no profit is possible and similarly if no element in the array then pr...
ALGO
0.999998
5.034394
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-01-27T15:20: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": "130d91e0a78...
9cc913d8-d7d7-4957-9144-6cf1ecf69f60
gyeongpunch/SSAFY-13th-Embedded-Algorithm-Study
JungMinWoo99/2025_03/week_4/BOJ-격자_게임.cpp
#include <iostream> #define endl '\n' #include <vector> #include <algorithm> using namespace std; #define UNKOWN -1 #define FIRST_WIN 0 #define FIRST_LOSS 1 class GridGame { public: GridGame(int n, int m, int k) : N(n), M(m), K(k), grid(n, vector<char>(m)), DP(n, vector<char>(m, UNKOWN)) { DP[N - 1]...
ALGO
0.999991
4.574972
{ "github_metadata": { "branch": "main", "commit_count": 345, "repo_created_at": "2025-02-01T11:01:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad819c7ed3...
37bffc30-c5e4-403f-aac1-1dc1d6f60ed6
dlurton/anode
src/include/anode/common/string.h
#pragma once #include <string> #include <memory> #include <vector> #include <algorithm> #include <functional> namespace anode { namespace string { template<typename ... Args> std::string format( const std::string& format, Args ... args ) { // TODO: would like to very much to be able to check for...
TOOL
0.927889
7.160903
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2017-07-04T05:49:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 2, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "96f4628b...
cac0015c-2ecb-4a51-a1fb-7ae819b931a6
Acrolyte/PlacementPreparationModule
Week_1/Day-6/palindrome_linkedlist.cpp
#include <bits/stdc++.h> /**************************************************************** Following is the class structure of the LinkedListNode class: template <typename T> class LinkedListNode { public: T data; LinkedListNode<T> *next; LinkedListNode(T data) { ...
ALGO
0.999967
5.046206
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2022-07-05T10:23:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe9ff9172...
9609b379-4f41-44f3-9bee-4f1c9c2ddba9
ishandutta2007/codeforces-j
juve45/normal/1209/E2.cpp
#include <bits/stdc++.h> #define st first #define nd second using namespace std; void debug_out() { cerr << endl; } template<class T> ostream& prnt(ostream& out, T v) { out << v.size() << '\n'; for(auto e : v) out << e << ' '; return out;} template<class T> ostream& operator<<(ostream& out, vector <T> v) { return prn...
ALGO
0.999951
3.474645
{ "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": "afc6783db270...
49c3aa34-6b77-490f-83b1-b3b832fde1a0
Runarok/GeeksForGeeks-solutions
Difficulty: Easy/Balance with respect to an array/balance-with-respect-to-an-array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to find the floor value of x in a sorted array int lowerBound(const vector<int> &arr, int x) { int s = 0; int e = arr.size() - 1; int ans = -1; wh...
ALGO
0.999642
5.878996
{ "github_metadata": { "branch": "main", "commit_count": 6962, "repo_created_at": "2025-01-14T04:19:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6eb2e8697...
f6436728-6dcd-4e8b-9b82-2ee217e3f5a9
Gogiu23/Cpp-course
Semana_6/Tareas/cesar.cpp
#include <iostream> #include <stdlib.h> using namespace std; char code(char c, int n); string code(string str, int nm); char decale(char c, char debut, int decalage); string decode(string str, int num); int main(){ // char c('g'); // c = code(c, -133); // cout << c << endl; // string str("Avez-vous vu mes 3 chats et ...
ALGO
0.999392
3.280728
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-07-01T22:10: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": "75db0e53ce2...
d686460a-4caf-47f7-9b09-100ed2b70a3b
Matheer0/ros2_controllers_solo12
ros2_control_test_nodes/src/Algorithms/reactive_planners/demo_reactive_planners_solo12_step_adjustment.cpp
#include "ros2_control_test_nodes/reactive_planners/demo_reactive_planners_solo12_step_adjustment.hpp" #include <pinocchio/algorithm/frames.hpp> #include <pinocchio/algorithm/centroidal.hpp> #include <pinocchio/algorithm/center-of-mass.hpp> #include <pinocchio/algorithm/crba.hpp> #include <pinocchio/math/rpy.hpp> #incl...
ALGO
0.961542
4.530022
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2022-11-06T23:27:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8de1ca1cec...
d2fefe91-5b4f-4604-99e3-ce941ae5e453
Cccmm002/my_leetcode
870-magic-squares-in-grid/magic-squares-in-grid.cpp
// A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from 1 to 9 such that each row, column, and both diagonals all have the same sum. // // Given an grid of integers, how many 3 x 3 "magic square" subgrids are there?  (Each subgrid is contiguous). // //   // // Example 1: // // // Input: [[4,3,8,4], //...
ALGO
0.999923
6.213788
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2017-05-17T03:50:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fec97fef...
421ddef8-bd13-48b1-874f-54e23f091ed3
Ura3535/SEM4_Algorithmics
geometry/HW/0143.cpp
#include <iostream> struct Point { Point operator + (const Point& other) const { return Point(x + other.x, y + other.y); } Point operator - (const Point& other) const { return Point(x - other.x, y - other.y); } friend std::ostream& operator<<(std::ostream& out, const Point& p) { ...
ALGO
0.999815
4.420526
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-02-22T10:58:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e711807cffd...
0f2d8c3e-e8ec-4a6e-a334-34c6fcde14e0
TanYongF/algorithm
CCPC网络预选赛/1009.cpp
#include <stdio.h> #include <iostream> #include <cstdlib> #include <cmath> #include <cctype> #include <string> #include <cstring> #include <algorithm> #include <unordered_map> #include <stack> #include <queue> #include <set> #include <map> #include <ctime> #include <climits> #include <vector> #include <iostream> #inclu...
ALGO
0.999728
4.071896
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2021-10-25T01:34:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "058e8e9d0...
a20df055-4f96-4b2b-8d94-82259d138fa5
raihansikdar/Competitive_Programming
CodeForces/Contests Code/Codeforces Round #833 (Div. 2)/B. Diverse Substrings.cpp
//#include<bits/stdc++.h> #include<iostream> #include<stdio.h> #include<algorithm> #include<vector> #include<map> #include<cmath> #include<algorithm> #include<cstring> #include<limits> using namespace std; typedef long long ll; #define S(a) scanf("%lld",&a); #define SS(a,b) scanf("%ll...
ALGO
0.999784
3.362186
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2020-09-09T10:51: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": "bc0ea9cc...
f03eedbf-aeb6-46c8-a44e-d5d08063cdce
sakinanaqvi-cmd/hw1
split.cpp
/* CSCI 104: Homework 1 Problem 1 Write a recursive function to split a sorted singly-linked list into two sorted linked lists, where one has the even numbers and the other contains the odd numbers. Students will receive no credit for non-recursive solutions. To test your program write a separate .cpp file and #inc...
ALGO
0.999873
5.949362
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-01-13T22:46: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": "ec30660e4308...
8758da7d-ec20-4b8f-a180-20361a0289b3
DucAnhNg2k2/SourceCode
Codeptit - CTGL & GT/DSA07003_KIỂM TRA BIỂU THỨC SỐ HỌC.cpp
#include <bits/stdc++.h> #define LL long long #define ULL unsigned long long #define FOR(i,a,b) for(int i=a;i<=b;++i) #define FO(i,a,b) for(int i=a;i<b;++i) #define FORD(i,a,b) for(int i=a;i>=b;--i) #define fi first #define se second #define pb push_back #define mp make_pair #define endl '\n' #define debug cout << "YE...
ALGO
0.999771
4.048918
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2022-03-12T17:05:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "801674edf0...
1342e632-b506-4cd5-83d5-a42773c599a4
chemizt/MissileGuidanceExercise
source/Simulation/Auxilary/PIDController.cpp
#include "Simulation/Auxilary/PIDController.hpp" PIDController::PIDController(double dT, double minBoundary, double maxBoundary, double kP, double kI, double kD) : _dT(dT), _minBoundary(minBoundary), _maxBoundary(maxBoundary), _kP(kP), _kI(kI), _kD(kD), _previousDeviation(0), _integral(0) {} double PIDController::cal...
ALGO
0.999375
5.23769
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2021-02-11T19:33:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "cd266e72...
bb69a37e-3eea-45b4-859b-79e3ff6d3f35
arthurherbout/crypto_code_detection
data/crypto-competitions/files/Grostl512.cpp
/////////////////////////////////////////////// // // ************************** // ** ENGLISH - 10/Jul/2017 ** // // Project: libObfuscate v2.00 // // This software is released under: // * LGPL 3.0: "www.gnu.org/licenses/lgpl.html" // // You're free to copy, distribute and make commercial use // of this software under...
ALGO
0.999052
4.495385
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2019-09-20T18:35:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "d631b3a0...
40600a11-368c-4a5b-acf0-03c32c7f66bb
ishandutta2007/codeforces-p
peltorator/normal/1074/B.cpp
#include <iostream> #include <vector> #include <cstdio> #include <map> #include <algorithm> #include <cmath> #include <string> #include <cstring> #include <set> #include <queue> #include <unordered_set> #include <complex> #include <unordered_map> #include <bitset> #include <ctime> #include <cassert> #include <random> ...
ALGO
0.999801
3.812475
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49: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": "703e6e84e465...
cf95e79f-00fa-4bbf-b6c8-2519c6b38638
Sujal261/DSA
LAB1/pairedparen.cpp
#include<iostream> #include<string> #include<algorithm> using namespace std; #define MAX 100 class Stack { private: int top = -1; char array[MAX]; public: void push(char x) { if (top >= MAX - 1) { cout << "Overflow error"; return; } array[++top] = x; } ...
ALGO
0.999826
4.293568
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-06-09T17:01: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": "a9a70471277e...
18771458-4cd8-4396-881f-5f6c961227e5
shubhanshu1911/DSA-Questions
653-two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999997
6.45276
{ "github_metadata": { "branch": "main", "commit_count": 288, "repo_created_at": "2024-01-29T14:56: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": "eae5f18ef4...
1f0059d6-6620-4169-b66c-b10c67001857
Kitware/VTK
Common/DataModel/vtkIncrementalOctreePointLocator.h
// SPDX-FileCopyrightText: Copyright (c) <NAME>, <NAME>, <NAME> // SPDX-License-Identifier: BSD-3-Clause /** * @class vtkIncrementalOctreePointLocator * @brief Incremental octree in support * of both point location and point insertion. * * * As opposed to the uniform bin-based search structure (adopted in c...
ALGO
0.972596
7.291838
{ "github_metadata": { "branch": "master", "commit_count": 94968, "repo_created_at": "2010-04-27T15:12:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2910, "forks": 1246, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1...
94b16d4a-aad4-487f-98c8-70d0b749f766
Chiki1601/Hackerearth-Solutions
Algorithms/Dynamic Programming/2 Dimensional/Scoring stores.cpp
#include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); long long n, a[200005], prfx[200005], sfx[200005], ans; cin >> n; for(long long i = 0; i < n; i++) cin >> a[i]; sfx[n - 1] = 0; stack<long long> stk; for(long long i = n - 2; i >= ...
ALGO
0.99996
3.508271
{ "github_metadata": { "branch": "main", "commit_count": 1808, "repo_created_at": "2022-09-09T09:13:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "b37fd9cf...
eb1286eb-2974-441c-acc6-454102e16a44
khoipn21/linked-list-family-tree
FamilyTreeFunctions.cpp
#include "FamilyTreeFunctions.h" void AgeHandler(FMem parent, FMem &member) { while (member.yearOfBirth < parent.yearOfBirth + 18) { cout << "Enter year of birth must be >= 18 years greater than father (" << parent.yearOfBirth + 18 << "): "; cin >> member.yearOfBirth; } } void AddMember(L...
TOOL
0.92241
3.731964
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-14T11:31: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": "5e21a7217e01...
2622d391-60d0-44f3-9781-c967b94e6b7c
r4pidstart/problems
by_category/disjoint-set/10216.cpp
// https://www.acmicpc.net/problem/ // #include<bits/stdc++.h> using namespace std; class Dsu { private: vector<int> parent; public: Dsu(int size) { parent.assign(size, -1); } int find(int i) { if(parent[i]<0) return i; else re...
ALGO
0.999214
4.529244
{ "github_metadata": { "branch": "master", "commit_count": 1680, "repo_created_at": "2021-02-19T09:57: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": "cb2a02e...
c9ec6ff3-ed3e-4adc-ae3b-5ab034c24f35
stenczelt/libmace
src/neighbour_list.h
// // Created by <NAME> on 29/06/2024. // // Based on the Python/C neighbour list at [1] adapted to C++ and without the Python/Numpy types. // // References: // [1] https://github.com/libAtoms/matscipy-neighbours // #ifndef NEIGHBOURS_H #define NEIGHBOURS_H #include <vector> #include "arrays.h" struct MaceNeighbour...
TOOL
0.934327
6.093932
{ "github_metadata": { "branch": "pre-release", "commit_count": 4, "repo_created_at": "2025-02-19T08:24:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2c1af...
02030609-a4c3-4b67-b1e9-609ff2c5ec67
ummjevel/Algorithm_CPlusPlus
Programmers/nolv/72410.cpp
#include <string> #include <vector> #include <regex> #include <iostream> using namespace std; string solution(string new_id) { string answer = ""; regex re3("[.]+"); regex re2("[^-.\\w]"); cout << new_id << endl; // 1. 대문자 -> 소문자 for (int i = 0; i < new_id.length(); i++) { int curr_val...
ALGO
0.999654
4.746191
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2022-01-30T14:44:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bdaa677d43...
0dddd9ca-8c06-46da-b9cb-12c5dc9596c5
MaskRay/HackerRank
contests/w20/cat-jogging.cc
#include <algorithm> #include <iostream> #include <type_traits> #include <unordered_map> #include <vector> using namespace std; #define ALL(x) (x).begin(), (x).end() #define FOR(i, a, b) for (remove_cv<remove_reference<decltype(b)>::type>::type i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) const long N = 5000...
ALGO
0.999639
3.597053
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-03-10T04:46:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 48, "forks": 45, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "7dfbad85...
33841834-26fc-4f45-bf28-bb9cffdd4404
Luerson/problems-resolutions
code forces/orphan/1474A.cpp
#include <bits/stdc++.h> #define endl '\n' #define pb push_back #define all(x) x.begin(), x.end() #define debug(x) cout << #x << " = " << x << endl; #define debug2(x, y) cout << #x << " = " << x << "; " << #y << " = " << y << endl; #define pii pair<int, int> #define pll pair<ll, ll> typedef long long ll; typedef lo...
ALGO
0.999956
4.208074
{ "github_metadata": { "branch": "main", "commit_count": 100, "repo_created_at": "2021-10-09T14:53:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3c74ea539...
d3d76025-9e55-42c5-8bb8-d9d25f6ce795
Akash535/All-Cpp-Programs
OverloadingAdd.cpp
/* Demonstrate function overloading for addition of two integer and two floating point numbers. */ #include <iostream> using namespace std; int add(int x , int y) { int sum = x + y; return sum; } float add(float x , float y) //function overloading becoz of same function name { float sum = x + y; retu...
TOOL
0.926282
5.518769
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-08-13T06:21:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dafec30b6c38...
b8c59f35-dcc8-448d-8fa5-06b416ddde85
DigitalGlobe/tools
src/Boost/libs/move/test/bench_merge.cpp
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright <NAME> 2015-2016. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/move for do...
ALGO
0.993755
6.00459
{ "github_metadata": { "branch": "master", "commit_count": 231, "repo_created_at": "2016-06-21T16:47:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "599bd530...
e5019529-a3e5-4c90-95eb-e42902d659fb
mel1015/algorithm-study
algorithm-study/week_10/1206_mel1015.cpp
// // Created by sks10 on 2018-07-05. // #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> buildings; int view_point() { vector<int>::iterator index, beforeHigh, nextHigh; index = buildings.begin() + 2; int oneBefore, twoBefore, now, oneNext, twoNext, getView = ...
ALGO
0.999476
5.050283
{ "github_metadata": { "branch": "master", "commit_count": 510, "repo_created_at": "2017-07-07T11:45:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "695be7a4...
c397ccce-49e6-41a2-9549-f12abec6333f
CadQuery/OCP
opencascade/BRepApprox_ResConstraintOfMyGradientbisOfTheComputeLineOfApprox.hxx
// Created on: 1995-06-06 // Created by: <NAME> // Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser ...
ALGO
0.998864
5.55211
{ "github_metadata": { "branch": "master", "commit_count": 222, "repo_created_at": "2019-12-17T20:02:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 122, "forks": 36, "issues": 28, "pull_requests": 2 }, "file_meta": { "content_id": "4a2b6...
6688d861-44bd-4e3a-bc0f-60076e1b3ae0
e5pe0n/algorithm-training
algorithm_introduction/ss27_multithreaded_algorithms/cpp/fib.cpp
#include <chrono> #include <stdio.h> typedef long long ll; using namespace std; ll fib(int n) { if (n < 2) { return 1; } else { return fib(n - 1) + fib(n - 2); } } int main() { for (int i = 1; i <= 5; ++i) { int n = i * 10; auto start = chrono::high_resolution_clock::now(); ll res = fib(...
ALGO
0.998488
5.536041
{ "github_metadata": { "branch": "master", "commit_count": 571, "repo_created_at": "2019-12-09T13:22:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "b030d2a6...
048fb89a-47a7-4f86-a54f-5d7b290e5ead
junkun/srv_core
pca/PCA.cpp
#include <stdlib.h> #include <math.h> #include <iostream> #include <fstream> #include <vector> #include "eigen/Eigen/Core" #include "eigen/Eigen/Eigenvalues" using namespace std; using namespace Eigen; class PCA{ private: MatrixXd matriz; MatrixXd correlaciones; MatrixXd eigenVectores; vector <double> prom...
ALGO
0.999322
3.854451
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2011-04-30T22:52:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "911617c92d...
5a0b23ec-82ee-4e55-b0a4-7867c89687ae
Ramneantu/competitive_programming
TUMJUDGE/CONPRA1617/WEEK6/A/A.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=int(a); i<=int(b); ++i) #define debug 0 #define DBG(code) if(debug == 1) \ do{ \ code \ }while(0); // globals int n; string line; vector<vector<int> > times; vector<vector<int> > nex...
ALGO
0.99966
4.176692
{ "github_metadata": { "branch": "master", "commit_count": 242, "repo_created_at": "2018-03-13T20:49: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": "7d8ca7b5...
5c219bc8-cce6-4919-b851-3c80c16895a7
deSigntheClutch/competitive-programming-code-repository
template/Data Structure/segtree.cpp
#include <bits/stdc++.h> using namespace std; #define mid ((left + right) >> 1) #define lson rt << 1, left, mid #define rson rt << 1 | 1, mid + 1, right const int N = 5E4 + 10; int t[N << 2], lazy[N << 2]; void pushup(int rt) { t[rt] = t[rt << 1] + t[rt << 1 | 1]; } void pushdown(int rt, int l) { if (lazy[rt])...
ALGO
0.999869
3.656569
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-01-01T00:15: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": "84a3fd124d17...
2a3cac39-4e41-4b03-8850-d8f45228ea4e
Liza-srn/Option-Pricing-C
src/util/GreeksCalculator.cpp
#include "util/GreeksCalculator.hpp" #include <iostream> #include <cmath> /** * @brief Calcule la Delta par différences finies centrées. */ template<typename Model> double GreeksCalculator::calculateDelta(const Model& model, const Option& option, double deltaS) { Option optionUp (option.getSpotPrice() + deltaS,...
ALGO
0.998136
7.050344
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-03-27T20:28:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56fe8b836729...
21fdb99c-b4d3-44ed-9c0f-a991940994ca
vladimir-ponomarenko/Sibsutis
OSMS/lab4/lab4_1.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; const int REGISTER_SIZE = 5; //shift x registers void shiftX(int x[REGISTER_SIZE]){ int8_t shiftedElement = (x[3] + x[4]) % 2; for (int i = 0; i < REGISTER_SIZE; i++){ x[REGISTER_SIZE - 1 - i] = x[REGISTER_SIZE - 2 - i]; } x[0...
ALGO
0.998681
4.996728
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2024-03-23T05:18: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": "181d4ec478e...
2f1db067-3ad9-4662-9b60-b444620c3c2d
tokenoni/lab
visualStudio/MyLibrary/MyGsl/MultiscaleMultimin.hpp
#ifndef __MultiscaleMULTIMIN_HPP__ #define __MultiscaleMULTIMIN_HPP__ #include "Multimin.hpp" namespace mygsl{ class MultiscaleMultimin{ public: //--- Constructor --- template<class TyF_ > MultiscaleMultimin ( TyF_& function, std::vector<double>& params, std::vector<size_t>& params_order, double step_ratio =...
TOOL
0.949364
5.060586
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-06-14T08:54:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "043087c1b9...
7f9baf12-9574-47a4-b4cf-2686c932162c
AnasImloul/Leetcode-Solutions
scripts/algorithms/M/Minimum Time to Finish the Race/Minimum Time to Finish the Race.cpp
// Runtime: 2419 ms (Top 5.20%) | Memory: 274.6 MB (Top 9.24%) class Solution { public: int minimumFinishTime(vector<vector<int>>& tires, int changeTime, int numLaps) { int n = tires.size(); // to handle the cases where numLaps is small // without_change[i][j]: the total time to run j laps c...
ALGO
0.999068
5.539012
{ "github_metadata": { "branch": "main", "commit_count": 5405, "repo_created_at": "2022-08-07T11:14:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 382, "forks": 120, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c92b...
6179c4c0-8009-4483-9821-7c1048aa8e0f
dbis-ukon/SPACE
Generate Training Data/sampler-main.cpp
#include "sampler.hpp" #include "trie.hpp" #include <fstream> #include <boost/algorithm/string.hpp> #include <chrono> using namespace std; using std::chrono::high_resolution_clock; using std::chrono::duration_cast; using std::chrono::duration; void print_help() { cerr << "Wrong arguments. Please run the executa...
ALGO
0.918892
6.43195
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-03-20T13:17:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68308e002e59...
32394245-0413-4c92-be60-f44232a6642b
arpangoswami/Competitive-Programming-and-DSA
structurally_identical_trees.cpp
// Given two trees check if they are structurally identically. Structurally identical trees are trees that have same structure. They may or may not have the same data though. // Input Format // Enter the values of all the nodes in the binary tree in pre-order format where true suggest the node exists and false suggest...
ALGO
0.999705
4.887048
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-11-06T07:11:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93bebcb8f1f4...
5014651d-4f74-4ea9-b77c-220f2cda1ef4
fumiyasutakaura/EClay
EClaySDK/math/ECMatrix.cpp
#include "ECMatrix.hpp" #include "ECVector.hpp" #include "ECQuaternion.hpp" #include "../etc/ECUtil.hpp" #include <math.h> using namespace std; ECMatrix::ECMatrix() { for(int i=0; i<16; ++i) { m[i] = 0.0f; } m11 = 1.0f; m22 = 1.0f; m33 = 1.0f; m44 = 1.0f; } ECMatrix::ECMatrix( const float a[16]...
TOOL
0.99219
4.801887
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-04-12T01:05: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": "22537ccd4a...
aefaccdb-4613-437b-b6e9-2ce8ecc56fef
sorrowfeng/spline_library
spline_library/utils/spline_common.h
#pragma once #include <unordered_map> #include <vector> #include <cmath> namespace SplineCommon { //compute the T values for the given points, with the given alpha. //the distance in T between adjacent points is the magitude of the distance, raised to the power alpha template<class InterpolationType, type...
ALGO
0.999621
6.783422
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-03T01:41:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5559fd29efed...
20806335-7c81-4076-bd93-77eb48b7338e
QuantumRevenant/ProgOrientadaObj_I
[2023-0] Clases/23w03dMa.cpp
// TRABAJAMOS SOBRE EL ARCHIVO 23w02dFa.cpp #include <iostream> #include <string> using namespace std; /* CLASE PARA HALLAR SUMA DE 2 NUMEROS */ class CSuma { private: float numero1; float numero2; public: CSuma() { numero1 = 10; numero2 = 20; } CSuma(float numero1, float nu...
TOOL
0.94539
4.1816
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-01-04T00:43:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9c7b682f5b...
010cf2ef-48b7-492f-80de-6c54aa74d843
InfinityDemon2001/DSA_CPP-Love_Babbar-
L69/searchBST.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class BinaryTreeNode { public: T data; BinaryTreeNode<T> *left, *right; BinaryTreeNode() : data(0), left(NULL), right(NULL) {} BinaryTreeNode(T x) : data(x), left(NULL), right(NULL) {} BinaryTreeNode(T x...
ALGO
0.99999
5.114351
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2024-07-18T05:04: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": "f870e7ce7bb...
d016e94d-f340-4db2-9083-c2c183df61e8
Sonins/Algo
BOJ/9613/code.cpp
#include <cstdio> #include <cstring> int main() { int t, n; long long result = 0; int arr[200]; int a, b, r; scanf("%d", &t); for (size_t T = 0; T < t; T++) { scanf("%d", &n); for (size_t j = 0; j < n; j++) scanf("%d", &arr[j]); for (size_t j = 0; j < ...
ALGO
0.999932
3.484662
{ "github_metadata": { "branch": "master", "commit_count": 324, "repo_created_at": "2020-01-19T13: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": "2f8ce865...
f671e121-bd7a-40dc-9c67-f953de4f1f78
Boyuridod/ExerciciosMaratona
GellyfishAndBaby.cpp
// https://codeforces.com/contest/2116/problem/B #include<bits/stdc++.h> using namespace std; typedef long long longo; const long long mod = 998244353; longo somaMod(longo a, longo b) { return (a + b) % mod; } longo multMod(longo a, longo b) { return (a * b) % mod; } longo exponenciacaoRapida(longo base,...
ALGO
0.999967
4.864233
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2025-01-27T23:45:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29c312db050...
66c18901-2ef6-4f8b-8df7-1cbef1fd4e41
strange-tiger/TeckTalk_List
List/List/List.cpp
#include "TechTalk_Linear.h" #include <iostream> // Linear List 선형 리스트 inline LinearList::LinearList(int count) : _container(new int[count]), _size(0), _capacity(count) { for (int i = 0; i < count; ++i) { _container[i] = 0; } } inline LinearList::LinearList(const LinearList& other) : _container(new int[other._...
ALGO
0.987006
4.828308
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-06-24T08:36:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40d6a8fd317f...
a508c49a-6501-4148-948e-dfecb737c4cc
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/12/1225/personal_submission/cf983c_TosakaUCW.cpp
#include <bits/stdc++.h> using i64 = long long; #define int i64 #define pb push_back #define ep emplace #define eb emplace_back using std::cerr; // using namespace std::views; // using namespace std::ranges; using std::max, std::min, std::swap, std::array; using std::cin, std::cout, std::string, std::vector; using std:...
ALGO
0.999934
4.082864
{ "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": "e50a...
72274ffb-02d9-430f-bafd-a3b377b22eb2
katzhang/algorithms-in-cplusplus
8.7.top-down-list-mergesort.cpp
/* author: <NAME> PROG: Top-down list mergesort */ #include <iostream> #include "6.15.linked-list-type-interface.h" using namespace std; nodeLink merge(link a, link b) { node dummy(0); nodeLink head = &dummy; nodeLink c = head; while((a != 0) && (b != 0)) { if (a->item < b->item) { c->next = a; c = a; ...
ALGO
0.999983
4.476022
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2015-10-21T02:48: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": "8b95c01a...
18a2e327-1109-4316-9f1b-5e035243f22c
MogaRiana/NewCode
Preg_Bgdn/Piese1/main.cc
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ft first #define sd second #define sz(x) (i64) x.size() #define col(x) x.begin(), x.end() #define srt(x) sort(x.begin(), x.end()) #define rsrt(x) sort(x.rbegin(), x.rend()) #define rvs(x) reverse(x.begin(), x.end()) #define LSOne(S) ((S) & (-S)) ...
ALGO
0.99998
4.100949
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2023-02-17T14:08:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a9fa3a7...
e27ee7ef-54f9-4d6c-8f7b-a3821dbc0692
isl-org/Open3D
cpp/open3d/pipelines/color_map/ColorMapUtils.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // Copyright (c) 2018-2024 www.open3d.org // SPDX-License-Identifier: MIT // ---...
TOOL
0.935924
7.15664
{ "github_metadata": { "branch": "main", "commit_count": 4194, "repo_created_at": "2016-12-02T16:40:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12555, "forks": 2448, "issues": 1245, "pull_requests": 37 }, "file_meta": { "content_id": ...
404cb806-2fa9-49d3-9707-b66a0c195d58
iramazanli/pytorch
aten/src/ATen/native/cpu/CopyKernel.cpp
#include <ATen/ATen.h> #include <ATen/Dispatch.h> #include <ATen/native/Copy.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cpu/Loops.h> #include <c10/util/TypeCast.h> #include <ATen/native/cpu/zmath.h> namespace at { namespace native { namespace { static void copy_kernel(TensorIterator& iter, bool...
ALGO
0.928021
3.737088
{ "github_metadata": { "branch": "master", "commit_count": 40103, "repo_created_at": "2020-11-06T22:06:49.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "pytorch/pytorch", "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_...
d021dbfd-53fd-46a9-8ffc-6d0208513c24
devinacker/bsnes-plus
common/nall/string/split.hpp
#ifndef NALL_STRING_SPLIT_HPP #define NALL_STRING_SPLIT_HPP namespace nall { template<unsigned Limit> void lstring::split(const char *key, const char *src) { unsigned limit = Limit; reset(); int ssl = strlen(src), ksl = strlen(key); int lp = 0, split_count = 0; for(int i = 0; i <= ssl - ksl;) { if(!me...
TOOL
0.987336
5.42058
{ "github_metadata": { "branch": "master", "commit_count": 715, "repo_created_at": "2014-11-26T23:38:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 342, "forks": 95, "issues": 90, "pull_requests": 6 }, "file_meta": { "content_id": "2d62...
f119b282-7714-4219-b6fc-150cca908056
AniketR10/DSA
Heaps/checkIfBTIsMaxHeapOrNot.cpp
#include<iostream> #include<vector> #include<queue> using namespace std; class Node{ public: int val; Node* left; Node* right; Node(int val){ this->val=val; this->left=NULL; this->right=NULL; } }; int isSize(Node* root){ ...
ALGO
0.99858
3.486121
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2024-06-09T17:18:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3d2ebbd6...
71931f21-ab3e-4370-9205-29fecd4f9e76
yoshinGO/introduction_cplus
chap7/list0711.cpp
//n行3列の2次元配列の全構成要素に同一値を代入 #include <iomanip> #include <iostream> using namespace std; //"intを要素型とする要素数3の配列"を要素型とする要素数nの配列(n行3列の2次元配列)の全構成要素にvを代入 void fill(int (*a)[3], int n, int v)//第三引数vではnoを受け取る { for(int i = 0; i < n; i++) for(int j = 0; j < 3; j++) a[i][j] = v; //i行の要素全てにvの値が格納される } int m...
TOOL
0.983861
3.448694
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2018-09-04T11:49: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": "6fda01af9...