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
c5b95486-8e81-48ee-8983-966966def944
denefee/Differenciator
reader.cpp
#include "reader.hpp" #include "utilities.hpp" #include <assert.h> #include <malloc.h> #include <math.h> #include <stdio.h> #include <string.h> const int op_number = 12; const char *valid_operators[op_number] = {"sin", "cos", "+", "-", "*", "/", "^", "(", ")", "ln", "l...
TOOL
0.93741
3.677868
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-12-11T21:23: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": "15d654f23ab...
f4d330cf-df25-40a7-a057-e4c32a02b962
K-Grachev-2106756/data_structures
prj.lab/Tree_vector/Tree_v.cpp
#include<Tree_vector/Tree_v.h> Tree_v::Tree_v(Tree_v& copy_) { for (size_t i = 0; i < copy_.tree_.size(); i++) { this->tree_.push_back(copy_.tree_[i]); } } Status Tree_v::find_key(int val_) const { if (this->tree_.empty()) return no; int cur_ = 0; while(true) { if (this->tree_[cur_] == val_) return yes; e...
ALGO
0.999275
3.683029
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-04-19T15:25: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": "b914e6890d4...
a9841416-a875-4fb9-be2c-a24769028956
iIyaPopov/algorithms
задача о степени числа (ДП)/main.cpp
#include <iostream> #include <stdio.h> using namespace std; void degree(int n, int* op){ int i, j, tmp; int d1, d2, d3, d4; int min; op[0] = 0; op[1] = 0; for(i = 2; i <= n; i++){ cout << i << ": "; op[i] = op[i-1] + 1; d1 = i - 1; min = 1; for(j = 2; j < i; j++){ tmp = op[j] + op[i-j] + 1; if(op[...
ALGO
0.999878
3.960901
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2020-01-19T15:51: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": "b33be3764...
cabaa97c-ad09-4dda-b568-d2d6ea8a9bfd
milmillin/comp-prog
GoogleCodeJam/2022_Rnd1A/equal.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <map> #include <cassert> using namespace std; void f() { int n; scanf("%d", &n); assert(n != -1); vector<int> reserve; long long sum = 0; for (int i = 0; i < 30; i++) { int cur = 1 << i; printf("%d ", cur); sum += cur; } ...
ALGO
0.998488
3.231529
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-02-28T08:15: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": "ec6a0f2b64c...
6f555737-80cd-41e9-969d-ca0439103f24
harverywxu/algorithm
binaryTree/691_BSTSwappedNodes.cpp
class Solution { public: /* * @param : the given tree * @return: the tree after swapping */ //swap can hapen betweent any two nodes TreeNode * bstSwappedNode(TreeNode * root) { // write your code here TreeNode * first = NULL; TreeNode * middle = NULL; TreeNode ...
ALGO
0.999998
6.185607
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2017-07-18T13:04: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": "a72b21593...
84c0a656-7ffe-4002-94a3-36a92d355b15
Tech-Intellegent/CodeForces-Solution
CodeForces-Contest/1497/C1.cpp
#include<bits/stdc++.h> using namespace std; array<int, 3> f(int n) { if (n & 1) return {n / 2, n / 2, 1}; if (n % 4 == 0) return {n / 4, n / 4, n / 2}; return {2, (n - 2) / 2, (n - 2) / 2}; } int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while (t--) { int n, k; cin >> n...
ALGO
0.99993
4.531866
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-01-23T07:10:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "995672f185e1...
adf4cf1e-0cd1-4b04-9694-8f14f16108c6
Aishwarya1357/My_leetcode_solutions
GREEDY/44-wildcard-matching/wildcard-matching.cpp
class Solution { public: bool isMatch(string s, string p) { int m = s.length(), n = p.length(); vector<bool> prev(n + 1, false), curr(n + 1, false); // Base case: empty string and empty pattern match prev[0] = true; // Fill for the case where s is empty but p is not ...
ALGO
0.999913
5.96386
{ "github_metadata": { "branch": "main", "commit_count": 194, "repo_created_at": "2024-09-23T16:49:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1298bde88a...
15ce452b-0f5c-48d6-90a4-7c4b8c04d3a1
byzhang/blaze
blazemark/src/blas/TDVecDMatMult.cpp
//================================================================================================= /*! // \file src/blas/TDVecDMatMult.cpp // \brief Source file for the BLAS transpose dense vector/dense matrix multiplication kernel // // Copyright (C) 2013 <NAME> - All Rights Reserved // // This file is part of th...
ALGO
0.996816
6.525995
{ "github_metadata": { "branch": "master", "commit_count": 4837, "repo_created_at": "2015-10-07T22:31:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "7912039...
722ec3bb-4b3a-40de-bba3-58d7fb07df33
CallMeQan/Training-for-HSG-HCM-vietnam-2024
cplusplus/seggg/h.cpp
/* author: Qan */ #include <bits/stdc++.h> #include <vector> #define N 100006 #define fi first #define se second #define pb push_back #define int long long #define array vector #define PI 3.1459 #define endl "\n" using namespace std; using ull = unsigned int; using ld = long double; bool loopInput = false; int n;...
ALGO
0.999434
3.791801
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-07-05T11:13: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": "1192ad58b49...
65a5ffdf-2150-4fb4-a412-5acc1f767d1c
fcnoronha/competitive-programming
treinos_solo/Desafios de programação avançados/lista 10 (dualidade e bt)/Four Points.cpp
#include "bits/stdc++.h" using namespace std; #define f first #define s second #define pb push_back #define fr(i, n) for(int i = 0; i < n; i++) #define frr(i, n) for(int i = 1; i <= n; i++) #define dbg(x) cout << #x << " = " << x << endl #define dbgpt(x) cout << #x << " = " << x.f << " " << x.s << endl #define all(x) ...
ALGO
0.999885
4.0653
{ "github_metadata": { "branch": "master", "commit_count": 289, "repo_created_at": "2018-07-05T22:15:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52b82e46...
13192383-4a15-4c01-a962-d3c6ba39799e
NCAR/micm
include/micm/solver/backward_euler.hpp
// Copyright (C) 2023-2025 University Corporation for Atmospheric Research // SPDX-License-Identifier: Apache-2.0 #pragma once #include <micm/profiler/instrumentation.hpp> #include <micm/solver/backward_euler_solver_parameters.hpp> #include <micm/solver/backward_euler_temporary_variables.hpp> #include <micm/solver/lin...
ALGO
0.957423
7.805583
{ "github_metadata": { "branch": "main", "commit_count": 1526, "repo_created_at": "2020-09-10T18:37:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 7, "issues": 14, "pull_requests": 2 }, "file_meta": { "content_id": "f5640cfd4...
c7e15bea-a813-4da6-926d-15ffa8c23182
facebookresearch/projectaria_tools
core/calibration/camera_projections/KannalaBrandtK3.h
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
ALGO
0.976769
6.516954
{ "github_metadata": { "branch": "main", "commit_count": 800, "repo_created_at": "2023-06-15T06:06:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 663, "forks": 100, "issues": 17, "pull_requests": 4 }, "file_meta": { "content_id": "6adba3...
e70cecb7-2ccc-4f50-b1a8-14c99f0a7a23
ABHINAB-CHHETRI/DataStructure-Cpp
OOPS/classes.cpp
#include <iostream> #include <cstdlib> #include <string> using namespace std; class Students { public: string name; int age; float gpa; void print() { cout<<name<< " "<<age<<" "<< gpa<<endl; } }; void print(Students s)// this is pass by value so any kind of manupulation will not affect ...
TOOL
0.912865
4.086198
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-14T14:08: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": "a5517655ef6e...
6187fd22-5b5f-4226-9a0e-67a887b3dcf2
clEsperanto/CLIc
clic/src/tier1/mean_filter.cpp
#include "tier0.hpp" #include "tier1.hpp" #include "utils.hpp" #include "cle_mean_separable.h" #include "cle_mean_sphere.h" #include "cle_mean_x_projection.h" #include "cle_mean_y_projection.h" #include "cle_mean_z_projection.h" namespace cle::tier1 { auto mean_filter_func(const Device::Pointer & device, ...
ALGO
0.966633
6.906711
{ "github_metadata": { "branch": "master", "commit_count": 3032, "repo_created_at": "2020-07-29T15:07:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 15, "issues": 6, "pull_requests": 2 }, "file_meta": { "content_id": "38ef83...
b6515c29-b1b4-4614-8cac-e70f78b12fd7
ishandutta2007/codeforces-r
ronnie007/normal/929/A.cpp
#include<iostream> #include<stdio.h> #include<vector> #include<cmath> #include<algorithm> #include<map> #include<queue> using namespace std ; #define MAXN 100007 int n , k ; int a[ MAXN ] ; void input ( ) { scanf ( "%d%d" , &n , &k ) ; int i ; for ( i = 1 ; i <= n ; i ++ ) { scanf ( "%d" , &a[ i...
ALGO
0.999872
3.445236
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43415f95ac0c...
ce72be34-2bf7-4288-82c4-617d8eedd517
Gigunasu/openframeworks-addons
ofxIO/libs/ofxIO/src/DirectoryUtils.cpp
// ============================================================================= // // Copyright (c) 2009-2013 <NAME> <http://christopherbaker.net> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in th...
TOOL
0.953277
6.581344
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-09-13T02:49: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": "72b66a00dc...
838fecc6-6645-44c5-9eb6-d82359cd8001
Maydaytyh/OOP-Experiment
第二次上机/T1.cpp
/* * @Author: CucumicsMelon * @Date: 2019-03-18 10:16:23 * @Last Modified by: CucumicsMelon * @Last Modified time: 2019-03-18 15:16:41 */ #include <bits/stdc++.h> using namespace std; #define maxn 100000 #define rep(i, m, n) for (int i = m; i <= n; ++i) #define ll long long #define mem(a, b) memset(a, b, sizeof(...
ALGO
0.99991
4.31316
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-04-02T01:28: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": "c4fbb18c01...
e89c93b4-e181-4731-bb9a-59ba48a097bf
sp2gps/Tablice
Tablice.cpp
#include <ctime> //////////////////////////////// #include <iostream> // PODSTAWY PROGRAMOWANIA // #include <iomanip> // wykonał: <NAME>. // #include <cstdlib> //////////////////////////////// using namespace std; void pokaz(int n, int *tab1, int *tab2, int *tab3) { cout<<setw(6); cout<<"tab1...
ALGO
0.933611
4.144507
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-02-01T11:22: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": "6d06cb0790...
c873cd17-283a-4995-a6d1-09f721d81cc3
ML-UCV/ML-CodeBert-DistinctSolutions
Raw Dataset/cmap/divide_conquer/train/58572aea-fafb-4ba0-82f7-a6f974d28265.cpp
#include <fstream> #include <algorithm> #include <math.h> #include <iomanip> using namespace std; ifstream fin("cmap.in"); ofstream fout("cmap.out"); int n; pair<long long, long long> v[100010], aux[100010], verifica[100010]; long long DistantaLaPatrat(pair<long long, long long>a, pair<long long, long ...
ALGO
0.999721
3.885478
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-06T17:44:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0b5141de2e5f...
41f53060-5d6d-4535-af0c-33eec5d4a497
planaria/nanikanizer
include/nanikanizer/matrix_product_expression.hpp
#pragma once #include "expression.hpp" #include "expression_node.hpp" namespace nnk { template <class T> class matrix_product_expression_node : public expression_node<T> { private: typedef expression_node<T> base_type; public: typedef typename base_type::scalar_type scalar_type; typedef typename base_ty...
ALGO
0.964577
6.795728
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2016-01-22T12:42:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6f2e13...
ee91e27c-9586-4604-928c-4943e9855bcc
Oriburger/problem_solving_1w3solve
Programmers/NoRuins.cpp
#include <string> #include <vector> using namespace std; struct Pos { int y; int x; }; int presum[1001][1001]; int solution(vector<vector<int>> board, vector<vector<int>> skill) { int answer = 0; for(vector<int>& s : skill) { int type = s[0], degree = s[5]; Pos p[2] = { {s[1], s[2]}, ...
ALGO
0.999649
5.35945
{ "github_metadata": { "branch": "master", "commit_count": 1652, "repo_created_at": "2020-06-20T13:15: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": "6ca60e0...
2cca8f76-32b2-4a54-b4f9-15928eb635b2
YiChiChao/CS135600
Hw/week12/vector2.cpp
#include <iostream> #include <set> #include <vector> #include <string> #include <utility> using namespace std; set<pair<int, int>> myset; vector<int> v; int main(){ int x; int num; int index = 0; string buffer; cin >> x; for(int i = 0; i < x ; ++i){ cin >> buffer; if(buffer == "p...
ALGO
0.998537
4.231612
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2021-09-23T06:19: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": "b162ee275b0...
c8c81b08-8e2c-45b8-9af1-08993e26d8d4
junw59/CODEexercise
hot/347.cpp
#include <iostream> #include <stdio.h> #include <unordered_map> #include <vector> #include <queue> using namespace std; class Solution { public: // bool operator > ( const pair<int,int> &d1, const pair<int,int> &d2){ static bool cmp (pair<int,int> &d1, pair<int,int> &d2){ return d1.second > d2.second...
ALGO
0.999988
5.233007
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2021-10-02T01:38:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "765d731dc24...
aa31f2a8-f508-41e2-ac1c-ac402ec9e7dd
cK0nrad/krypto
src/hashMethod/HAVAL/HAVAL-4.cc
//https://web.archive.org/web/20140411060613if_/http://labs.calyptix.com:80/files/haval-paper.pdf #include <string> #include <iostream> #include <cstring> #include <iomanip> #include <sstream> #include <vector> #include "HAVAL.hpp" #include <napi.h> #include "../../check.hpp" std::string HAVAL4_MAIN(uint32_t *message,...
ALGO
0.990872
4.680115
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2020-11-09T23:01:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f78387c0d5b...
94b71731-5b9e-4d46-9e57-2892e0024a5e
dhruv7294/DataStructure
DFS/LinkedList/Cpp programs LinkedList/DOUB_LIN.CPP
#include<stdio.h> #include<conio.h> #include<alloc.h> #define size 5 struct node { int no; struct node *prev; struct node *next; }; struct node* createlist(struct node* head) { struct node *ptr; int i,value; for(i=0;i<size;i++) { printf("\n enter value:"); scanf("%d",&value); if(i==0) { ...
ALGO
0.9995
3.670408
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-01-11T07:30:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9a39faad0...
e5db1568-0fb5-42de-9922-5ed9f00920e9
farbrausch/fr_public
altona_wz4/wz4/wz4frlib/wz4_audio.cpp
/*+**************************************************************************/ /*** ***/ /*** This file is distributed under a BSD license. ***/ /*** See LICENSE.txt for details. ***/ /***...
ALGO
0.982347
5.830029
{ "github_metadata": { "branch": "master", "commit_count": 376, "repo_created_at": "2012-04-11T05:28:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3526, "forks": 357, "issues": 21, "pull_requests": 2 }, "file_meta": { "content_id": "678...
a70f8a19-fa62-4392-a8e4-893943cbef11
morris821028/UVa
volume130/13036 - Birthday Gift to SJ - 2.cpp
#include <bits/stdc++.h> using namespace std; // Algorithm: Meet in Middle const int MAXN = 85; const long long MAXV = 1e+18; long long F[100] = {2, 3}; vector<long long> S1, S2; void bfs(int begin, int end, vector<long long> &S) { S.push_back(1); for (int i = begin; i < end; i++) { long long x = F[i]; vector<lon...
ALGO
0.999959
4.08161
{ "github_metadata": { "branch": "master", "commit_count": 1197, "repo_created_at": "2013-06-14T12:34:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 571, "forks": 269, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "103...
8cd1950e-ed71-46bb-8274-e8798d3681c4
iskang5532/PS
Programmers/2018 KAKAO BLIND RECRUITMENT/[1차] 프렌즈4블록.cpp
// [1차] 프렌즈4블록 (코딩테스트 연습 > 2018 KAKAO BLIND RECRUITMENT > [1차] 프렌즈4블록) // https://programmers.co.kr/learn/courses/30/lessons/17679 /* 구현 시간 복잡도: O(5n^2) 풀이) - 2중 for문으로 (n-1, m-1)까지 탐색하며 2x2블록이 형성되느지를 확인. 이때 주의할 점은, (n, m)까지 탐색하게 된다면 2x2블록인지를 확인하기 위해 (n+1, m+1)를 탐색하게 되는데, 이 경우 OOB이다. - 2x2블록을 찾은...
ALGO
0.999919
5.020889
{ "github_metadata": { "branch": "master", "commit_count": 330, "repo_created_at": "2021-07-29T10:17:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb048d2c...
cec1f765-900f-4a42-b9c3-ecd98e6d4162
mgastner/breadth-first-cpp
src/parse_arguments.cpp
#include "parse_arguments.hpp" #include <iostream> argparse::ArgumentParser parsed_arguments( const int argc, const char *argv[], std::string &adj_list_json_file, std::string &source_vertex, std::string &target_vertex) { // Create parser for arguments using argparse. // From https://github.com/p-ranav/ar...
TOOL
0.932475
5.672959
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-08-04T10:53: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": "94c4706ba2d...
3a0dda91-0c67-498d-9ca9-40c41b88b778
CBNU-NestNet-Study/2025_1_study
leejuho/week 8/boj_24444.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; const int MAX = 100001; vector<int> graph[MAX]; // 인접 리스트 int visited[MAX]; // 방문 순서 저장 int order = 1; // 방문 순서 카운터 void bfs(int start) { queue<int> q; q.push(start); visited[start] = order+...
ALGO
0.999998
5.332581
{ "github_metadata": { "branch": "main", "commit_count": 150, "repo_created_at": "2025-04-17T06:30:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 11, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "75619e1a32...
1a8bea76-3a69-4b3d-afc6-b65afa527786
noor-hossain13/codeforce-solution
381-A.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n; // Number of cards cin >> n; vector<int> cards(n); // Cards in a row for (int i = 0; i < n; ++i) { cin >> cards[i]; } int sereja_points = 0, dima_points = 0; // Initialize scores int left = 0, right = n...
ALGO
0.999999
4.97033
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2024-07-13T09:47:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0711be4b60...
64151ad6-498d-47e3-b8f7-548c80a360ab
daniko10/ML-in-CPP
MultiLayerNet/main.cpp
#include <iostream> #include <cassert> #include <vector> #include <algorithm> #include <ctime> #include <optional> #include <cmath> double act_fun(const double& x) { return 1. / (1 + 1. / pow(M_E, x)); } class Neuron; template <typename T> class MLP { public: MLP( const std::vector<int> &layers, ...
DATA
0.996149
4.447764
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-04-04T15:45: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": "a3814d774dbe...
74cbc87e-02a0-4d32-b3e9-903d2ee6adc9
s-rifat/Competitve-Programming
UVA/455 Periodic Strings.cpp
#include<bits/stdc++.h> using namespace std; vector<int> z_function(string s) { int n = (int) s.length(); vector<int> z(n); z[0] = n; for (int i = 1, l = 0, r = 0; i < n; ++i) { if (i <= r) z[i] = min (r - i + 1, z[i - l]); while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ...
ALGO
0.999928
3.978936
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2020-06-17T06:42:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2979a51b2...
554bef29-bb25-4b0a-9fb3-ec3ba866fcb6
prashant601/Leetcode-Practice
994-rotting-oranges/994-rotting-oranges.cpp
class Solution { public: int orangesRotting(vector<vector<int>>& grid) { if(grid.empty()) return 0; int m= grid.size(), n=grid[0].size(), tot=0, cnt=0, time=0; //tot stores total oranges(0,2) , cnt is used to return -1, queue<pair<int,int>> rottenQ; // bfs is used here ...
ALGO
0.999944
5.91074
{ "github_metadata": { "branch": "main", "commit_count": 1015, "repo_created_at": "2022-02-28T12:09: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": "3fc47f668...
c35503d2-d6f3-4e0e-be37-cee2a3a6cd9c
stephengold/jolt-jni
src/main/native/glue/co/ConvexHullShapeSettings.cpp
/* Copyright (c) 2024-2025 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub...
TOOL
0.951795
6.847107
{ "github_metadata": { "branch": "master", "commit_count": 2948, "repo_created_at": "2024-06-26T02:01:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "fbc724...
929bf99b-f868-429f-be66-b5162fbcc610
yixinchen2005/CompoundEyes
src/Nest/nest.cpp
/* * nest.cpp * * Created on: 2014-09-30 * Author: yixin */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <sys/time.h> #include "lsh.h" #include "cuckoo.h" #include "nest.h" NestBuilder::NestBuilder(const char* config_file) { skip_counter = 0; lsh_builder_ptr = n...
ALGO
0.976387
4.026883
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2015-02-02T15:10:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da0c2ef12...
0406c548-a30a-427c-ae5a-1f1024de0113
nathanshankar/selfdrivencars-lanecentre
lanedetection.cpp
//Done by <NAME> #include <opencv2/opencv.hpp> #include "opencv2/imgproc/imgproc.hpp" #include <stdio.h> #include <cmath> #include <stdlib.h> #include "opencv2/core/core.hpp" #include "opencv2/highgui.hpp" #include <string.h> #include <opencv2/ml/ml.hpp> #include <raspicam_cv.h> #include <iostream> #include <chrono> #i...
ALGO
0.994294
3.535067
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2020-12-15T11:29: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": "e073d46dc6ff...
08d17708-5c8b-471b-92b5-6689af5dc944
atatomir/work
_Codeforces/Round 381/E_super_fast_2_smen/main.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <cmath> using namespace std; #define mp make_pair #define pb push_back #define ll long long const int maxN = 2018; int n, a, b, i; double p[maxN], u[maxN]; pair<double, pair<int, int> > dp[maxN]; double last_mid...
ALGO
0.999243
3.980048
{ "github_metadata": { "branch": "master", "commit_count": 302, "repo_created_at": "2015-03-29T18:54: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": "c9c8b99a...
d20b4667-a7f1-47e1-b8a0-7beccba700f1
mdarikrayhan/Competitive-Programming
codeforces/1307/C.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 2e5 + 10; string s; long long n, cnt[MAXN][26]; void input() { cin >> s; n = s.size(); for (int i = 1; i <= n; i++) for (int j = 0; j < 26; j++) cnt[i][j] = cnt[i - 1][j] + ((s[i - 1] - 'a') == j); } long long findAns() { long long res = 0; fo...
ALGO
0.999975
3.664074
{ "github_metadata": { "branch": "master", "commit_count": 8052, "repo_created_at": "2022-05-15T11:22:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95b576...
6d80ffaa-e5e2-4fdb-a430-6b73ac5410cc
harshxtanwar/dsa-rev-AZ
graphs/5_topological-or-kahn/smallest-permutation.cpp
/* Smallest Permutation Description Among the sequences P that are permutations of (1, 2,... , N) and satisfy the condition below, find the lexicographically smallest sequence. • For each i = 1, ..., M, Ai appears earlier than Bi in P. If there is no such P, print -1. Input Format Input is given from Standard Input i...
ALGO
0.999997
4.226161
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-09-14T11:45: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": "1f0952880680...
cf5916c6-10ae-4027-8b76-37c6cc3272c4
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1245/all/29603712_64006666.cpp
#include<bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<double> vd; typedef long long int ll; typedef pair<int,int> pi; typedef unsigned long long int ull; ll lsone(ll p){return(p & -p);} int gcd(int a, int b) { // Everything divides 0 if (a == 0) return b; if (b == 0) ...
ALGO
0.999757
4.124328
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c1568438...
ec76e88c-3ed6-4ee3-84d8-6a7b4d47e0a0
Phoenix600/Tree_C_Code
04_build_tree_From_inorder_preorder.cpp
#include <bits/stdc++.h> /*THE FOLOOWING CODE IS INCOMPLETE */ // Build the tree from the Preorder and Postorder /* PreOrder 1 2 3 Inorder 2 1 3 Algorithm : 1. Pick elements from preorder & create a node 2. Increment preorder index 3. Search for picked element's position in inorder 4. Call to build left subtree from in...
ALGO
0.999917
5.170799
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-04-10T03:48: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": "90d34ac69c9...
5b06bd29-3b0a-4b81-ace3-a3544794735c
LiNone-76/get
cbc/src/CglProbing.cpp
// Copyright (C) 2002, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). #include <cstdlib> #include <cstdio> #include <cmath> #include <cfloat> #include <cassert> #include <iostream> #define PROBING100 0 //#de...
ALGO
0.997216
3.418566
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-11-29T02:21: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": "4e5bf5f7f6...
52535bd1-323d-41bc-aea6-6b15b5bc81c0
MikeForMH/my_cpp_practice
data_structure_practice/binary_tree/complete_binary_tree_practice_1/main.cpp
// // main.cpp // complete_binary_tree_practice_1 // // Created by <NAME> on 3/12/2018. // Copyright © 2018 <NAME>. All rights reserved. // # include <iostream> # include <cmath> using std::cin; using std::cout; using std::endl; template <typename Type> class Stack{ private: Type *_data; int _max_size, _t...
ALGO
0.999468
4.994525
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2018-11-04T12:29: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": "bedb6f3e...
b03de982-b302-4d81-aff4-391e178a42b8
naemazam/Data-Structures-and-Algorithms-GFG
Tree and BST/SumTree.cpp
/* Tree node struct Node { int data; Node* left, * right; }; */ // Should return true if tree is Sum Tree, else false int sum(Node* node) { if (node == NULL) return 0; return sum(node->left) + node->data + sum(node->right); } /* returns 1 if sum property holds for the given node a...
ALGO
0.999793
4.089781
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-08-01T04:16:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c20efcc4df1...
7bedb9a0-1a9d-4259-ae97-ea255b478e69
joeaaron/LearningC-
PCL/ccSliceAxis/sliceAxis.cpp
// CloudCompare #include <CCCoreLib/PointCloudTpl.h> #include <CCCoreLib/GenericIndexedCloudPersist.h> #include <CCCoreLib/CCGeom.h> #include <CCCoreLib/GeometricalAnalysisTools.h> #include <CCCoreLib/Polyline.h> #include <CCCoreLib/PointProjectionTools.h> #include <CCCoreLib/CCTypes.h> #ifdef CC_CORE_LIB_USES_TBB #i...
ALGO
0.990097
4.693473
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2019-06-03T11:58: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": "86c2525f...
2b5083b4-76a7-42f7-91f9-921054eb6e7e
YannianNiu/Project-Code
CM_Sketch.h
#include <iostream> #include <sstream> #include <cstring> #include <algorithm> #include <cstdint> #include "Arrays.h" #include "BOBHash32.h" using namespace std; template<int key_len, int depth, int memory_in_bytes> class CMSketch { private: int width = memory_in_bytes / 4 / depth; BOBHash32* hash[dept...
TOOL
0.950178
3.554758
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-01-10T00:43: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": "ef7cf79080cb...
38c2d84f-4c45-4609-a80b-2196b253f09a
aditya-123450/DSA-WITH-CPP
singledimensionarrayandarrayinascendingorder.cpp
#include <iostream> using namespace std; int main() { int array[10], t; // Input for (int x = 0; x < 10; x++) // Fix condition, declare x as int { cout << "Enter Integer No. " << x + 1 << ":" << endl; cin >> array[x]; } // Sorting for (int x = 0; x < 10; x++) // Fix condit...
ALGO
0.999584
4.696594
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2024-04-01T15:48:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a98aa31444...
15937f36-0aa2-434e-bb02-0beae1af012c
Krutarth90/CODEFORCES
SOLVED/1600/2059C - Customer Service.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define flp(k,n) for(ll i=(ll)k;i<(ll)n;i++) #define flm(k,n) for(ll j=(ll)n-1;j>=(ll)k;j--) #define YES cout<<"YES\n" #define NO cou...
ALGO
0.99999
4.665663
{ "github_metadata": { "branch": "main", "commit_count": 421, "repo_created_at": "2024-02-18T08:36:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b39e4595d...
5d160d23-df44-4e27-abd4-9da512d0dcce
Gauravvnegi/Training_tasks
day-4 Tasks/question_5.cpp
// 5. You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). // You have to rotate the image in place, which means you have to modify the input 2D matrix directly. // DO NOT allocate another 2D matrix and do the rotation. // Example 1: // Input: matrix = [[1,2,3],[4,5,6],[7,...
ALGO
0.999763
6.413414
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-03-20T06:02: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": "767cef4b884...
c607806f-556a-41d5-a765-ffbfab90deba
viplix3/DSA
Hashing/DistinctElementsInWindow.cpp
#include<bits/stdc++.h> using namespace std; vector<int> findDistinctWindowElements(vector<int> &arr, int window_size) { vector<int> distinct_elements; unordered_map<int, int> frequency_map; for(int i=0; i<window_size; i++) frequency_map[arr[i]] += 1; distinct_elements.push_back(frequency_map...
ALGO
0.999815
6.217835
{ "github_metadata": { "branch": "main", "commit_count": 775, "repo_created_at": "2020-11-02T01:41:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba2552cb16...
6a825841-0de4-452c-b9ee-c4348a7e693e
trietgaming/personal-CP-trainning-memories
VOI/17/game.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<ll, ll>; using pres = pii; const string FNAME = "game"; const ll INF = 1e18; const int MAXMN = 5005; struct Edge { ll from, to, w, id; Edge(ll f = 0, ll t = 0, ll weight = 0, ll i = -1): from(f), to(t), id(i), w(weight) { as...
ALGO
0.999956
4.124704
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-31T06:44: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": "ffe24c21c9a3...
5229c211-175f-4fa3-967d-f703f0517812
Azure/azure-ai-cli
ideas/azd-imposter/azd.cpp
#include <iostream> #include <fstream> #include <cstdlib> #include <cstring> #include <sys/stat.h> #include <sys/types.h> #include <vector> #include <algorithm> #include <istream> #include <string> #include <windows.h> using namespace std; constexpr char* pathSeparator = ";"; constexpr char* dirSeparator = "\\"; cons...
TOOL
0.909397
5.627028
{ "github_metadata": { "branch": "main", "commit_count": 473, "repo_created_at": "2023-07-27T17:31:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 54, "forks": 16, "issues": 14, "pull_requests": 13 }, "file_meta": { "content_id": "6bc8863...
c6f11f24-a70f-4cb5-ad18-3a1c224aabc3
prabhaKaranpy/Practice_Interview_Level_Problems
FaceBookFriends_BFS.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ string name; int age; Node(){ this->name = ""; this->age = 0; } Node(string name, int age){ this->name = name; this->age = age; } vector<Node*> friends; }; void bfs(Node* &profile, string &targ...
ALGO
0.999957
4.334161
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-12-21T16:12: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": "9997bac2d87e...
7eda2802-70cb-49af-a3e3-39eb11539ee2
alberto-santini/cvrp-decomposition
src/alns/PALNS-CVRP/SeqInsertionCache.cpp
#include "SeqInsertionCache.h" #include "CVRPInstance.h" #include "CVRPSolution.h" SeqInsertionCache::SeqInsertionCache(const CVRPInstance& instance, CVRPSolution& sol, const vector<vector<int>>& vecUnassignedSeqs) : m_instance(instance) { initCache(sol, vecUnassignedSeqs); } void SeqInsertionCache::initCache(CVR...
ALGO
0.985411
5.946108
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2022-02-15T23:13:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "932e0d1c...
2b616f81-d086-4ca4-b16f-fc1d4810ce79
y42sora/soraAOJ
Volume0/AOJ0018.cpp
/* * AOJ 0018 * Sorting Five Numbers * * Created on: 2011/12/31 * Author: y42sora * * ソートするだけ */ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <s...
ALGO
0.999944
3.410455
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2011-08-01T04:31:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "989914be8...
94e150f1-4571-4914-bc39-df558636edd9
sbsuth/reefunits
LightFixture1/tcalc/light_sim.cpp
#include <math.h> #include <time.h> #include <stdio.h> typedef unsigned char byte; #if 0 //float latitude = 47.612; float latitude = 0; float longitude = -122.104; int TimeZone = -7; #else //float latitude = -19.770621; // + to N Defualt - (-19.770621) Heart Reef, Great Barrier Reef, QLD, Australia //float lon...
ALGO
0.961367
3.634181
{ "github_metadata": { "branch": "master", "commit_count": 206, "repo_created_at": "2016-12-04T01:42: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": "dd62a20f...
33af47ce-0713-4be8-ba78-3298edc57a75
Viveknegi5832/Data_Structures
16. Sorting/Sorting.cpp
#include<iostream> using namespace std; template<class T> class Sorting { public: void Insertion_sort(int n[] , int a); void Selection_sort(int n[] , int a); void Bubble_sort(int n[] , int a); void display(int n[], int a); }; template<class T> void Sorting<T> :: Bubble_sort(int ...
ALGO
0.999838
3.705312
{ "github_metadata": { "branch": "master", "commit_count": 209, "repo_created_at": "2020-08-12T10:44:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2aadeeb8...
10466e52-d967-4233-b1cc-80400ffaeeee
phUR99/TEST
백준/Gold/2660. 회장뽑기/회장뽑기.cc
#include <bits/stdc++.h> using namespace std; #define ll long long #define X first #define Y second //idea : n이 작으니 가능한 n에 대해서 완전탐색을 시도한다. //bfs를 모든 n에 시도하면서 dist 배열을 전달한다. //dist 배열의 값이 -1이 아니면 방문한 배열이므로 방문 X //bfs가 끝날 때 최댓갓을 체크해서 ans배열에 전달해준다. vector<int> adj[55]; int ans[55]; int n; int bfs(int idx) { int dist...
ALGO
0.999826
4.015562
{ "github_metadata": { "branch": "main", "commit_count": 1693, "repo_created_at": "2023-08-27T13:55:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a791264ad...
33211f7d-260d-4486-b4a8-0517612d17f9
manojinukolunu/programming_challenges
jolly_jumpers.cpp
/* * ===================================================================================== * * Filename: jolly_jumpers.cpp * * Description: * * Version: 1.0 * Created: 08/18/2012 09:17:48 PM * Revision: none * Compiler: gcc * * Author: YOUR NAME (), * O...
ALGO
0.999843
3.349156
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2012-08-15T19:53: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": "fa8a65442...
312593e1-8145-445a-81ec-3db9e3ef6797
devanshikapla/Heap
Sum of k1th and k2th elements of array.cpp
class Solution{ public: long long kthsmallest(long long arr[] , long long k , long long n){ priority_queue<long long> q; for(long long i = 0 ; i < n ; i++){ q.push(arr[i]); if(q.size() > k ){ q.pop(); } } return q.top(); } ...
ALGO
0.999986
6.081979
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-06-06T16:45: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": "67baf468643...
42134718-740f-40e3-af97-a3c8ed3a1f74
nikolapesic2802/Programming-Practice
Sails IOI 2007/main.cpp
/* -Sort the masts by height from lowest to highest, now do the following greedy algorithm: Keep track of how many sails we have placed for every height, and for every mast place the k sails on the heights where we have placed the lowest amount of sails placed before. -When doing this, we can keep the a...
ALGO
0.999938
3.899637
{ "github_metadata": { "branch": "master", "commit_count": 371, "repo_created_at": "2018-11-05T15:11:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6ee273d...
4336e60f-38aa-49ac-aac4-1f8440048c66
visheshgargavi/mission_faang
Array/Amazon_SDE1/8_Team_Component_and_Tenure.cpp
// #include<bits/stdc++.h> // using namespace std; // struct ComponentNode // { // ComponentNode* x; // }; // int countNodes(ComponentNode* x) { // if (x->components.size() == 0) { // return 1; // } // int sum = 0; // for (auto y: x->components) { // sum += countNodes(y); // }...
ALGO
0.999328
5.072168
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2022-03-15T16:41:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f79280bf0...
e0cdd904-87ee-4aca-846e-2475d94b1bf2
ishandutta2007/codeforces-p
pointy/normal/1365/B.cpp
// Author: Little09 // Problem: B. Trouble Sort // Contest: Codeforces Round #648 (Div. 2) // URL: https://codeforces.com/contest/1365/problem/B // Memory Limit: 256 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) #include <bits/stdc++.h> using namespace std; #define ll long long #define m...
ALGO
0.999901
3.818669
{ "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": "20efeca91c45...
d653c8e6-b00a-4688-a7c3-48962d6aa784
DiamondJack/CCPC2018QHD
day1/recursion/data/std.cpp
#include <bits/stdc++.h> #define rep(i, x, y) for (int i = (x), _ = (y); i < _; ++i) #define down(i, x, y) for (int i = (x) - 1, _ = (y); i >= _; --i) #define fi first #define se second #define mp(x, y) make_pair(x, y) #define pb(x) push_back(x) #define bin(x) (1 << (x)) #define SZ(x) int((x).size()) //#define LX_JUDG...
ALGO
0.999742
3.62179
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2018-09-05T17:22:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "23df864b1...
e2a9d40e-0ffa-46c1-a168-5867777f121b
wyllmein2000/AssignLP
main_cgpj.cpp
#include <iostream> #include <stdlib.h> #include <time.h> #include "inout.h" #include "wyarray.h" #include "readpara.h" #include "kktmatrix.h" #include "cgpj.h" using namespace std; int main (int argc, char **argv) { double start = time(NULL); srand((unsigned)time(NULL)); int n = 3; int m = 2; ...
ALGO
0.999817
4.397748
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-03-18T11:40:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc6dd091db...
30c14ab4-0db9-4940-9d3d-689978ade426
Mohamed-hanfy/Algorithm
Binary_search.cpp
#include <bits/stdc++.h> #include<iostream> #include<utility> #include "ext/pb_ds/assoc_container.hpp" #include "ext/pb_ds/tree_policy.hpp" #define ll long long #define ld long double #define ull unsigned long long #define uld unsigned long double #define all(X) (X).begin(), (X).end() #define rall(X) (X).rbegin(), (X)....
ALGO
0.999971
5.152209
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-03-01T21:11: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": "99ab85fd8aee...
edc8ddac-bb40-4c6c-bcff-4688f6a92a48
SemyonBaklitskiy/Differentiator
src/output_tree.cpp
#include <stdio.h> #include "math_functions.h" #include "functions.h" #include "error.h" #include "output_tree.h" #define isInt (int)num(node) == num(node) #define type(node) node->type #define op(node) node->op #define num(node) node->number #define var(node) node->var #define Left node->left #define Right node->ri...
TOOL
0.966992
5.067913
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-02-01T20:53: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": "4d943bc2e10...
02ca8d69-41a8-4acb-91b4-d9caf52effa5
tnw012/College-Workspace
Discrete Structures/Exam7 (prime fibonacci)/Main.cpp
#include <iostream> long long int RecursiveFibonacci(long long int fibonacciNumber) { bool baseCase = (fibonacciNumber == 0) || (fibonacciNumber == 1); if (baseCase) { return fibonacciNumber; } else { return RecursiveFibonacci(fibonacciNumber - 1) + RecursiveFibonacci(fibonacciNumber - 2); } } bool Che...
ALGO
0.999715
4.619106
{ "github_metadata": { "branch": "master", "commit_count": 187, "repo_created_at": "2022-06-16T19:40: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": "f0da2ce0...
b62e87c4-cf05-4ddb-b01b-e1ba6c3bb555
tungtsdev96/algorithm
Chap05/Maxsubseq.cpp
#include<bits/stdc++.h> using namespace std; int n, L1, L2; int *a; int **F; int main() { cin >> n >> L1 >> L2; a = new int[n]; F = new int*[n + 1]; for (int j = 0; j <= n ; j++) { F[j] = new int[n + 1]; } for (int i = 1; i <= n; i++) { cin >> a[i]; //a[i] = i; F[i - 1][0] = 0; } int max = ...
ALGO
0.999844
3.090563
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-09-14T09:10: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": "cad4e8d29...
488ee78f-6a55-47c6-891f-bac3604071e6
arkchimy/_Algorithm
BackJoon/구현/11723번_집합/소스.cpp
#include <iostream> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; int num = 0; while (n--) { string instruct; int data; cin >> instruct; if (instruct.compare("all"...
ALGO
0.999032
5.134177
{ "github_metadata": { "branch": "main", "commit_count": 183, "repo_created_at": "2023-10-05T12:04: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": "89cb0947ed...
2131df24-6e30-45f4-ab99-2c67dcaa2581
wuRDmemory/hihocoder_train
leet-08/main.cpp
#include <iostream> using namespace std; class Solution { public: int myAtoi(string str) { int sign_idx = -1; int start = -1, end = str.length(); for (int i=0; i<str.length(); i++) { if (start == -1) { if (str[i]=='-' || str[i] == '+') { if (...
ALGO
0.999686
4.808321
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-05-05T03:39: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": "3c3375298...
1f731888-4ca8-4764-9615-7ef182d317b7
Smeltier/competitive-programming
CODES/NEPS/neps309.cpp
// Gincana - Neps 309 (by Smeltier) // https://neps.academy/br/exercise/309 #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define F first #define S second #define all(x) x.begin(),x.end() #define srt(x) sort(all(x)) #define endl "\n" typedef long long ll; vector<vecto...
ALGO
0.999612
3.60096
{ "github_metadata": { "branch": "main", "commit_count": 240, "repo_created_at": "2025-02-03T21:29:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d041bb1876...
7505b4fc-f50b-466a-9f8b-231440fc7340
ForhanShahriarFahim/Competitive-Programming
bfs_algorithm_cp_term.cpp
#include <bits/stdc++.h> using namespace std; //************************************************************************************************************************************************************************** typedef long long ll; typedef long double ld; typedef unsigned long long ull; //********************...
ALGO
0.99992
4.092132
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-07-09T17:41: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": "bc096e4893...
6cae4663-f59a-467f-8e00-8d9db92161da
edoc14/edoc22-2
09월28일/초중급/1971039_7348.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; int countDP(vector<pair<int, int>> &arr) { vector<int> dp(200, 0); //복도 for (int i = 0; i < arr.size(); i++) { // (1,2), (3,4) ,(5,6) 이런식으로 복도를 공유 for (int j = (arr[i].first - 1) / 2; j <= (arr[i].second - 1) / 2; ...
ALGO
0.999949
4.650864
{ "github_metadata": { "branch": "main", "commit_count": 287, "repo_created_at": "2022-08-30T14:24:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 65 }, "file_meta": { "content_id": "a5a2fea036...
5c46f67f-697a-47b8-8633-d1c2e4733c00
SSAFY6-SEOUL13-RUNAWAY/AlogrithmStudy
Binary Search/백준 10816 숫자 카드 2/김우찬.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int n; vector<int> b; vector<pair<int, int>> cnt; int calu(int num){ int st = 0; int fin = cnt.size() - 1; while(fin - st > 1){ int min = (st + fin) / 2; if(cnt[min].first == num) return cnt[min].second; else if...
ALGO
0.999991
4.312546
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2021-09-28T14:48:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7bd37873d1...
0ecdbdaf-f051-491f-b866-4e53865ae427
GauthamBanasandra/CompetitiveCoding
UVa/Graph/Single source shortest paths/10557/Xyzzy.cpp
// WIP #include <algorithm> #include <iostream> #include <limits> #include <tuple> #include <vector> using Node = size_t; using Cost = int; const auto unvisited = -1; const auto infinity = std::numeric_limits<Cost>::max(); class Traversal { public: Traversal(size_t num_nodes, const std::vector<std::pa...
ALGO
0.999747
4.843629
{ "github_metadata": { "branch": "master", "commit_count": 1007, "repo_created_at": "2015-06-13T18:11:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d19046...
1deadc01-130a-4eed-86ee-b3a33c132626
MultivacX/leetcode2020
algorithms/medium/2641. Cousins in Binary Tree II.h
/** * 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.999983
5.912049
{ "github_metadata": { "branch": "master", "commit_count": 1856, "repo_created_at": "2019-12-31T13:19:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f4e600...
4ef79df2-7356-406f-b7d1-9765a1d8b8ae
Eshrak20/DS_Exam
Binary Tree/univalued.cpp
#include <stdio.h> #include <bits/stdc++.h> using namespace std; class Group { public: int value; Group *left; Group *right; Group(int value) { this->value = value; this->left = NULL; this->right = NULL; } }; int m; Group *input() { int val; cin >> val; Group ...
ALGO
0.999996
3.666713
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-01-18T03:17:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a00140e01d03...
3856b669-1399-467f-87a0-1082078d9977
zimpha/competitive-programming
codeforces/Codeforces Beta Round #5/C.cc
#include <bits/stdc++.h> using namespace std; const int MAXN = 1000000 + 10; char s[MAXN]; int N, top, L[MAXN]; int ret, cnt; void update(int i) { if (ret < L[i]) ret = L[i], cnt = 1; else if (ret == L[i]) ++ cnt; } int main() { scanf("%s", s); N = strlen(s); top = 0; ret = 0; cnt = 1; for (...
ALGO
0.999631
3.853252
{ "github_metadata": { "branch": "master", "commit_count": 352, "repo_created_at": "2016-08-17T16:37:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 36, "forks": 16, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ad837...
aded6528-ac73-43ec-9233-0eb5af8b0982
DhavalMavani/DSA_Leetcode
1387-find-elements-in-a-contaminated-binary-tree/1387-find-elements-in-a-contaminated-binary-tree.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.999786
6.041779
{ "github_metadata": { "branch": "master", "commit_count": 2588, "repo_created_at": "2023-06-15T15:05:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a65c6da...
3594814c-c845-4df3-98c0-61d9cc211200
tawhidkuet04/LeetCode-Solve
103-binary-tree-zigzag-level-order-traversal/103-binary-tree-zigzag-level-order-traversal.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.999998
5.921473
{ "github_metadata": { "branch": "main", "commit_count": 1344, "repo_created_at": "2021-12-25T09:19: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": "873dfdef7...
cb7f6df7-e430-4639-bf25-d26ab22e5fa3
snap-stanford/snap
glib-adv/mkcca.h
#ifndef MKCCA_H #define MKCCA_H #include "mine.h" class TMKCCASemSpace: TSemSpace { private: static bool IsReg; static bool MkReg(){return TSemSpace::Reg(TTypeNm<TMKCCASemSpace>(), &Load);} private: // calculating static void ConjugGrad(const TMatrix& Matrix, const TFltV& b, TFltV& x, const TFltVV& Ve...
ALGO
0.991692
5.286717
{ "github_metadata": { "branch": "master", "commit_count": 1991, "repo_created_at": "2012-05-10T18:43:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2233, "forks": 803, "issues": 83, "pull_requests": 11 }, "file_meta": { "content_id": "7...
e0f1544b-b2bb-4c2f-ab5e-3a7253f8c641
stonne-simulator/stonne
pytorch-frontend/caffe2/quantization/server/norm_minimization.cc
#include "caffe2/core/logging.h" #include "caffe2/utils/cpuid.h" #include "l2_minimization.h" #include <cassert> #include <cmath> #include <limits> #include <immintrin.h> using namespace std; namespace dnnlowp { #undef NDEBUG static float GetNorm(float begin, float end, float density, NormMinimization::Kind kind)...
ALGO
0.999414
6.401533
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2020-12-01T17:24:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 134, "forks": 30, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e11c1...
153114ac-e53e-4df4-84bf-03666da21d8b
sayantan1413/DSA450
DynamicProgramming/LongestCommonSubsequence/lcs.cpp
/* Code by <NAME> Time Complexity: O(n^2) Space Complexity: O(n^2) */ #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin.tie(NULL); int t; cin >> t; while (t--) { string s1, s2; cin >> s1 >> s2; in...
ALGO
0.999983
5.050905
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2021-02-18T07:11:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a883426aa9...
abbd7048-78ce-4a03-923b-bff71ae5b767
Bsandeep7/30-days-ds-challange
C day 3/contruct_tree_from_in_pre.cpp
// { Driver Code Starts // #include<bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; Node(int x){ data = x; left = NULL; right = NULL; } }; void printPostOrder(Node *root) { if(root==NULL) return; printPostOrder(root->left); printPostOrder...
ALGO
0.999997
6.201258
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2022-06-23T00:18:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a7718cb96...
1e40a395-512f-406d-951e-aa840526b90a
parthlathiya12/Codeforces-Submissions
misc/204_A.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(ll i=a;i<b;i++) #define re(i,b) for(ll i=0;i<b;i++) #define repr(i,n) for(ll i=n-1;i>=0;i--) #define ll long long #define ld long double #define llu long long unsigned #define vll std::vector<ll> #define m...
ALGO
0.998812
4.32014
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-03-25T08:13:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "caed1e6d1c...
95d9fea0-0fab-4b02-8c74-659ee72add6a
sofiahuppertz/CPP02
ex03/main.cpp
#include "dec/Bsp.hpp" #include <climits> int main(void) { std::cout << "Welcome to triangle_point!" << std::endl; std::cout << "This program checks whether a point P is inside" << std::endl; std::cout << "a triangle ABC or not." << std::endl; while (true) { Point points[4]; char po...
ALGO
0.998048
4.208395
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-26T07:59:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b26bb41e6676...
9c607a51-a862-4622-9fbb-dcc4a92a5b28
HarshMD/CPP
38_banking.cpp
#include <iostream> using namespace std; const int SIZE = 10; string name[SIZE]; int accountNumber[SIZE]; float amount[SIZE]; int total = 0; // Create accounts void createAccounts() { cout << "Enter number of accounts to create: "; cin >> total; for (int i = 0; i < total; i++) { cout << "\nEnter ...
TOOL
0.996128
4.814833
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-06-26T05:24: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": "b81a0321a19...
719bf41a-d2be-410d-a5c1-b83ece1c7427
ishandutta2007/codeforces-i
i_love_dasha_karpenko/normal/1487/F.cpp
#include <bits/stdc++.h> using namespace std; typedef short ll; typedef long double ld; #define x1 gdsfdsf #define y1 fgdfgdfg #define endl '\n' #define exp fgfdgd const ll DIM = 257; const ll M = 120; const ll base = 57; const ll INF = 32000; const ll MAXN = 250; ll dp[M][DIM][DIM],olddp[M][DIM][DIM]; ll gi(char ch){...
ALGO
0.999867
3.6552
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "07d9b5300615...
06064b48-4bca-46c0-8b6e-aa70c1f5da8a
benkev/experimental
combinations/bankers_subsets.cpp
/* * bankers_subsets.cpp * * * <NAME>, <NAME>, and <NAME>, \ * “Efficiently Enumerating the Subsets of a Set.” * * Compile & build: * * $ g++ -g bankers_subsets.cpp -o bankers_subsets * or * $ gcc -g bankers_subsets.cpp -lstdc++ -o bankers_subsets * * * */ #include <iostream> #include <stdio.h> #i...
ALGO
0.999218
4.603057
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2020-06-04T19:37: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": "1135e3769...
15111fe0-258d-41a2-86e9-a70c512cb205
jcazevedo/leetcode
src/3433-count-mentions-per-user.cpp
// 3433. Count Mentions Per User // https://leetcode.com/problems/count-mentions-per-user/ #include <queue> #include <sstream> #include <string> #include <tuple> #include <vector> using namespace std; #define ONLINE 0 #define OFFLINE 1 #define MESSAGE 2 class Solution { private: int toInt(const string& s) { ...
ALGO
0.943226
5.484914
{ "github_metadata": { "branch": "master", "commit_count": 709, "repo_created_at": "2022-03-05T00:26: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": "24bc73a1...
99aea6e0-b5d7-4fcc-9bae-71129ef03ff9
ymahajan456/Expedited-QFS
Codes/Sparse/analyze_sparse.cpp
// Author : <NAME> // Roll No: 14D070021 // Sparsity Analysis of a Matrix #include <iostream> #include <fstream> using namespace std; #define NUM_BLOCKS 7 #define BLOCK_SIZE 32 int main(){ //Reading matrix from serially written file (Row-Major Format) ifstream matrix("permuted_matrix"); ofstream ofile("out.csv"...
DATA
0.998404
3.978449
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-08-11T16:52: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": "64481f9a69...
99585848-7b0d-4835-b7d7-383de3ff6a0d
yasirnabil534/Shakil-Vaia-Code-Temporary
All Code/binary index tree 2D 1266.cpp
//<NAME> #include<cstdio> #include<cstring> #include<cmath> #include<cctype> #include<cassert> #include<cstdlib> #include<iostream> #include<iomanip> #include<string> #include<sstream> #include<algorithm> #include<vector> #include<stack> #include<list> #include<queue> #include<set> #include<map> #include<utility> #incl...
ALGO
0.996881
3.678207
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-10-23T13:13:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "435b3fda44...
24a923e7-60bf-43f5-a323-4b9182b7bdb9
ginkgo-project/ginkgo
dpcpp/components/diagonal_block_manipulation.dp.hpp
// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors // // SPDX-License-Identifier: BSD-3-Clause #ifndef GKO_DPCPP_COMPONENTS_DIAGONAL_BLOCK_MANIPULATION_DP_HPP_ #define GKO_DPCPP_COMPONENTS_DIAGONAL_BLOCK_MANIPULATION_DP_HPP_ #include <type_traits> #include <sycl/sycl.hpp> #include "dpcpp/base/config.hpp" #i...
ALGO
0.958461
7.793099
{ "github_metadata": { "branch": "develop", "commit_count": 8778, "repo_created_at": "2018-01-11T16:14:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 483, "forks": 97, "issues": 113, "pull_requests": 49 }, "file_meta": { "content_id": "f...
c90f56da-3833-4dfd-a245-f966de5faf09
WuyangPeng/ProgrammingBooksCode
C++/初级/C++ 核心思想/ch5/approx.cpp
#include <iostream> #include <algorithm> using namespace std; /** Tests whether two floating-point numbers are approximately equal. @param x a floating-point number @param y another floating-point number @return true if x and y are approximately equal */ bool approx_equal(double x, double y) { co...
ALGO
0.976471
5.174905
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-08-02T03:48:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "646f897c68d...
8e5f0582-3aca-4b4f-bdf9-447f6e14f928
hamza-sanaullah/DSA-LABS
Lab 03/Solution/Abstarct_Data_Type_Array.cpp
#include <iostream> using namespace std; struct MyArray { int Total_size; int used_size; int *ptr; int count = 0; }; void CreateArray(struct MyArray *Arr) { cout << "Enter the Total size of the array you want to create\n"; cin >> Arr->Total_size; cout << "Enter Number of Elements You want o...
ALGO
0.984733
3.415173
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-18T14:12: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": "d27ad6ae946f...
abf67e57-2595-4cc7-bf94-98cb5d752c21
kt117/ProCom
atcoder/abc/101-200/191-200/200/c.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; const ll MOD = 1e9+7; const ll INF = 1e18; #define rep(i,m,n) for(ll i = (m); i <= (n); i++) #define zep(i,m,n) for(ll i = (m); i < (n); i++) #define rrep(i,m,n) for(ll i = (m); i >= (n); i--) #define print(x) cout << (x) << end...
ALGO
0.999661
3.798707
{ "github_metadata": { "branch": "master", "commit_count": 280, "repo_created_at": "2020-04-09T05:59:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "8c823e8...
e3c8d7fe-59ac-4d7e-a4fc-9dfc3b88d54e
sanjayakoju/Parallel-programming
c_lab/matrix_multiplication/matrix_multiplication/matrix_multiplication.cpp
// matrix_multiplication.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #define n 1000 int a[n][n]; int b[n][n]; int c[n][n]; int i, j, k; clock_t t; int main() { std::cout << "<NAME>\n"; t = clock(); for (i = 0;i < n;i++) { for (j ...
ALGO
0.999169
3.630769
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-10-29T16:36: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": "e36a256fee...
cdb88c13-c113-4a04-9fcf-86f5740bfe8c
SumeetShelar/striver-trees
Traversal.cpp
#include <iostream> using namespace std; #include "tree.h" #include <vector> #include <queue> #include <stack> #include <utility> // for Pair DS #include <map> #include <set> //#include "preorderTraversal.h" //#include "inorderTraversal.h" //#include "postorderTraversal.h" //#include "levelorderTraversal.h" //#include...
ALGO
0.999963
4.632341
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2021-10-06T08:29: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": "6570ea9de...