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
c647a6c1-789a-453e-88d7-cb6607128b2c
ahanavish/LeetCode
847-shortest-path-visiting-all-nodes/847-shortest-path-visiting-all-nodes.cpp
class Solution { public: class tuple{ public: int node; int mask; int cost; tuple(int node, int mask, int cost){ this->node = node; this->mask = mask; this->cost = cost; } }; int shortestPathLength(vector<vecto...
ALGO
0.999835
5.264366
{ "github_metadata": { "branch": "main", "commit_count": 1597, "repo_created_at": "2022-01-20T18:34:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc1cbb076...
eaecd525-e51d-4b43-8b70-9532393b5e9d
jaxonwang/my_leetcode
problems/lt132.cc
#include <iostream> #include <limits> #include <unordered_map> #include <vector> using namespace std; class Solution { public: int get_p_num(int start, int s_size, vector<vector<bool>>&tb, unordered_map<int, int> &m){ if(start == s_size - 1) return 1; if (m.count(start)>0) return m[...
ALGO
0.999935
4.67237
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-07-02T12:28:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f09eb9bc4...
5c2e7706-a316-4610-81d5-12ea36518021
yaoguokk/C-Cpp-Practice
HW7/hw7/code.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; void strins(int g, int m,int k, string b,int len, ofstream &file1); int findmax(int k, int len, string a); int main(){ string num; int k; cout<<" Give S2: "<<endl; cin>>num; cout<<" Give k: "<<endl; cin>>k; int len=num.length(); ...
ALGO
0.956771
3.117142
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-02-11T19:59: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": "7e5c709fb...
73a045f5-21e8-4a10-adc7-d96ba1a3378e
govardhan-06/DSA
DAA/string_matching/arthimetic_text.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; // Arithmetic text algorithm // shifts are in arthimetic progression vector<int> computeLPS(string &P) { int m = P.length(); vector<int> lps(m, 0); int k = 0; for (int q = 1; q < m; q++) { whi...
ALGO
0.999956
5.862197
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2024-07-18T04:39: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": "26c42483165...
3716c076-6042-42e0-9bb4-6e94e1c0c3eb
JiyeonCoco/Algorithm_Samsung
14888.cpp
#include <iostream> #include <limits.h> using namespace std; int N = 0; int A[11] = { 0 }; int operNum[4] = { 0 }; int maxVal = -1 * INT_MAX, minVal = INT_MAX; void getNum(int pos, int result, int plus, int minus, int mult, int div) { if(pos == N) { maxVal = max(maxVal, result); minVal = min(...
ALGO
0.999926
3.825876
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-09-01T13: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": "a0d5fe076...
a065a3f5-6fbd-487b-8cac-9f5fb75825f2
AIFM-sys/AIFM
shenango/apps/parsec/pkgs/apps/facesim/src/Public_Library/Math_Tools/hash_function.h
//##################################################################### // Copyright 2003-2005, <NAME>, <NAME>. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##################################################################### ...
ALGO
0.995605
5.679709
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-10-12T02:03:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 122, "forks": 37, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "8283724...
4f3ae896-b056-484c-b457-92ae12bb12d6
Hell0Kitty/pku-online-judge
3722.cc
#include <iostream> #include <cstdlib> #include <cstring> #include <algorithm> #include <stdio.h> #include <cmath> #include <map> using namespace std; struct soldier { double x; int d; bool operator<(const soldier &temp) const { if (x == temp.x) return d < temp.d; return x < temp.x; } }; soldier a[111],...
ALGO
0.999923
4.056797
{ "github_metadata": { "branch": "master", "commit_count": 4334, "repo_created_at": "2017-03-03T05:44:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b70bd9...
9cc6ef16-2941-42b8-8dbe-958509327740
seanzli/leetcode
code1971/solution.hpp
#include <iostream> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; class Solution { unordered_map<int, unordered_set<int>> hash; public: bool validPath(int n, vector<vector<int>>& edges, int source, int destination) { vector<int> visited(n, 0); // 0 : not vis...
ALGO
0.999988
5.882784
{ "github_metadata": { "branch": "master", "commit_count": 824, "repo_created_at": "2020-12-29T09:17:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1672451...
6b2201d3-ffd1-4ab4-92e6-da8df09a6111
smmehrab/problem-solving
codes/interview_prep/broken_calculator.cpp
#include <iostream> #include <vector> #include <algorithm> #include <unordered_map> #include <climits> using namespace std; int ans = INT_MAX; void getMinSteps(int target, unordered_map<int, int>& output, int cur_level, vector<int>& workingNumber, int o, int signs[]) { if (workingNumber.empty())...
ALGO
0.999877
4.911635
{ "github_metadata": { "branch": "master", "commit_count": 691, "repo_created_at": "2020-08-17T10:10: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": "1918b6c1...
94cbdfa9-e104-4724-8d30-fe9ccc89fb8a
asu-cactus/netsdb
src/sharedLibraries/headers/LASillyTransposeMultiply1Join.h
#ifndef SILLY_LA_TRANSPOSE_MULTIPLY1_JOIN_H #define SILLY_LA_TRANSPOSE_MULTIPLY1_JOIN_H // by Binhang, May 2017 #include "Lambda.h" #include "LambdaCreationFunctions.h" #include "JoinComp.h" //#include "BuiltInMatrixBlock.h" #include "MatrixBlock.h" // LA libraries: #include <eigen3/Eigen/Dense> using namespace pdb...
ALGO
0.950393
5.177063
{ "github_metadata": { "branch": "master", "commit_count": 1151, "repo_created_at": "2021-03-29T06:46:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 17, "forks": 6, "issues": 1, "pull_requests": 6 }, "file_meta": { "content_id": "a2ed7d2...
915262a8-5858-4d69-94f6-58efb97f7f13
BIT-zhaoyang/competitive_programming
uva00524.cpp
#include <iostream> #include <vector> #include <cstring> #include <string> #include <algorithm> #include <map> #include <climits> #include <cmath> #include <set> #include <bitset> #include <sstream> #include <iomanip> #define _ ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0), cout.precision(15); using namespace...
ALGO
0.999788
4.333666
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2016-02-07T23:17:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "651deb39...
0447d97a-24e3-4434-af28-967ac3925fe0
Laceprndpm/ACM
src/abc/abc376/E.cpp
#include <algorithm> #include <deque> #include <iostream> #include <queue> #include <utility> #include <vector> using namespace std; using i64 = long long; using PII = pair<int, int>; constexpr int INF = 1e9; void solve() { { int n, k; cin >> n >> k; vector<pair<int, int>> a...
ALGO
0.999925
4.35536
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2025-01-27T06:41:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da475105963...
d6d6b254-722f-481c-88ab-a6d0251cc183
cme212/peercode
hw2/Graph_2935.hpp
#ifndef CME212_GRAPH_HPP #define CME212_GRAPH_HPP /** @file Graph.hpp * @brief An undirected graph type */ #include <algorithm> #include <vector> #include <cassert> #include <algorithm> #include "CME212/Util.hpp" #include "CME212/Point.hpp" /** @class Graph * @brief A template for 3D undirected graphs. * * Us...
ALGO
0.951834
6.970198
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-01-04T00:24:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b560fa797f1...
abf4c009-912b-4cbd-8349-83cc869b8a3a
Frost345/Laboratory
LR7-8/ConsoleApplication1/ConsoleApplication1/array.h
#pragma once #include"stdafx.h" template <class t> class Array { //private: public: t *ptr; int size; public: Array(); Array(int,t); Array(const Array &tmp); t operator[](int); int getSize(); void Get(); void Set(t); friend void sortik(t*); }; template<class t> Array<t>::Array() { ptr = NULL; size ...
TOOL
0.986593
3.948381
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-12-24T10:02: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": "0c1b34c09e...
9b4c00ed-7937-4c30-b7fb-a7954be05a49
juanKuganda/semester-2
UTS.cpp
#include <iostream> using namespace std; #define MAX_SIZE 9 class sistem { public: int top; int data[MAX_SIZE]; sistem() { top = -1; } bool isEmpty() { return(top==-1); } bool isFull() { return(top==MAX_SIZE-1) ; } void push(int value) { if(isfull());...
ALGO
0.999204
4.274229
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-01T01:30: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": "58fe20619dcb...
23676729-6913-4022-9657-1171fee7c44d
PerfectPan/Algorithm-Competition
Codeforces/1690E.cpp
// 每个数对 k 作向下的除法一定是会在答案里的,然后考虑余数的部分,我们必须选尽可能多的数对让 k <= a_i + a_j,才能得分 // 把余数部分排序后双向双指针 // 如果 a_i + a_j < k,说明 a_i 加上任何小于 a_j 的数都是小于 k 的,所以 a_i 不能和其余数加在一起得分了,右移 i // 否则可以得一分,i++ j--,假设 a_i 不和 a_j 匹配,那么 a_i 很可能跟后面的数无法匹配,答案不会更优 #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace st...
ALGO
0.99996
3.860036
{ "github_metadata": { "branch": "master", "commit_count": 316, "repo_created_at": "2018-03-01T15:32:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14c57f36...
b9f21176-e45f-4bd2-9efe-03d627057c64
hugo-juarez/dsa-learn
hashing/hashing/chaining/chaining.cpp
// // chaining.cpp // hashing // // Created by <NAME> on 4/16/25. // #include "chaining.hpp" #include "../node/node.hpp" Chain::Chain(int A[], size_t sz){ //Using hash function h(x) = x%10; table = std::make_unique<std::shared_ptr<Node>[]>(10); for(size_t j=0; j<sz; j++){ insert(A[j]); ...
ALGO
0.997855
3.888823
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2025-03-18T23:55:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4eeaa3fd2c8...
d8b78825-2854-4028-83e7-760dd87a7fda
ishandutta2007/codeforces-h
hir180/normal/1246/B.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define repn(i,n) for(int i=1;i<=n;i++) #define pb push_back #define mp make_pair typedef long long ll; typedef pair<int,int> P; #define fi first #define sc second int cnt[100005],n,a[100005],k,T[100005]; int main(){ cin >> n >> k; re...
ALGO
0.999927
3.755793
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "4f2efbe0ebe6...
329d717e-47d5-4251-94e0-970d8c81b42d
ymd45921/HUST-ACM-training
codeforces/gym - 102361/I.cc
/** * */ #include <iostream> #include <cstdio> #include <cctype> #include <algorithm> #include <cstring> #include <array> #include <unordered_map> #define VAR(var) ""#var" = " << var using namespace std; using longs = long long; using uint = unsigned; inline int nextInt() { int x = 0, f = 0, ch = getchar(); ...
ALGO
0.999882
3.22289
{ "github_metadata": { "branch": "master", "commit_count": 423, "repo_created_at": "2020-12-02T04:26: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": "c945f39a...
49045ad3-a79b-4e70-8c35-9a2836d9a07e
ammardab3an/ACM
problems/done/codeforces/C. Petya and Exam.cpp
// Problem: C. Petya and Exam // Contest: Codeforces - Codeforces Round 610 (Div. 2) // URL: https://codeforces.com/problemset/problem/1282/C // Memory Limit: 256 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org) // By AmmarDab3an #include "bits/stdc++.h" using namespace std; #define in...
ALGO
0.999846
3.877268
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-10-06T07:54:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b725275155...
094c56c2-bd18-4315-b9d1-fea4bf20ba9f
schoonod/165-Intro-to-CS
Project_2a_Schoonover/Project_2a_Schoonover/numGuess.cpp
// Project 2a, 165/400 /********************************************************************************** ** Author: <NAME> ** Date: 4/6/2015 ** Description: PROJECT 2a requires a player to guess a number input by the user. The program will guide the guesses to the right answer with prompts of higher/lower. ...
ALGO
0.929401
3.846062
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-02-02T21:18: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": "700e69f48d...
05815864-3554-4bd6-b6bf-bd7c1c63b522
google/depth_fusion
src/marching_cubes.h
// Copyright 2016 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http ://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
ALGO
0.991973
6.56203
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2016-09-15T17:35:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 18, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06657d230...
72f7c46e-b51c-47bb-94ac-df929821dab6
EthanWright/collegeC
csi5.cpp
#include <iostream> #include <string> using namespace std; void advance(int* j) { (*j)++; } void backtrack(int filler[], int* j) { filler[*j]++; while (filler[*j]>5) { filler[*j]=0; (*j)--; filler[*j]++; } } int test(int j, int filler[], string words[]) { for (int coun...
ALGO
0.999732
3.343281
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-06-08T01:22: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": "3a7433df0e...
a9ad61a2-ee77-4b0c-bda4-7818cc80974d
Benji19967/comp322
a2.cpp
#include <iostream> #include <stdlib.h> using namespace std; struct ticket { unsigned int numbers[6]; ticket* next; }; class SuperDraw { public: SuperDraw(); // Constructor SuperDraw(int n); // Constructor SuperDraw(const SuperDraw ...
ALGO
0.920403
4.865975
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-02-08T23:13: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": "397b514e91...
abe213b9-c14a-4054-a180-8cf8510a6150
mhkmcp/Data-Structure
BinarySearchTree.cpp
#include <iostream> #include <queue> using namespace std; struct BST { int data; BST *left, *right; }; BST * getNewNode(int data) { BST *newNode = new BST(); newNode->data = data; newNode->left = newNode->right = NULL; return newNode; } BST * insertData(BST *root, int data){ if(root == N...
ALGO
0.999933
3.885449
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-10-13T17:26: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": "516965ff3b...
f0f9c56c-2719-4296-8b9e-b5d6512b78e5
hermabr/FYS4150-Project-5
src/schrodinger_simulation.cpp
#include <iostream> #include <iomanip> #include <assert.h> #include <armadillo> #include "project5/config.hpp" #include "project5/schrodinger_simulation.hpp" using namespace std; using namespace std::complex_literals; // IMPORTANT NOTE: Documentation is found in the header file. SchrodingerSimulation::SchrodingerSi...
ALGO
0.999781
5.421369
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2021-11-26T12:28: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": "8f2c5201b5c...
998e3f84-591f-4831-99a1-d0d66afec82e
souravmondaldev/Leetcode
906-walking-robot-simulation/walking-robot-simulation.cpp
class Solution { public: int robotSim(vector<int>& commands, vector<vector<int>>& obstacles) { vector<vector<int>> directions = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; int x = 0, y = 0; set<pair<int, int>> obs; for(auto obstacle : obstacles){ obs.insert({obstacle[0], obstacle...
ALGO
0.999988
5.307857
{ "github_metadata": { "branch": "main", "commit_count": 969, "repo_created_at": "2023-12-18T08:51:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89efb00abb...
07377c17-cc3c-4848-9c57-96585162753a
synthetik-technologies/blastfoam
src/numerics/objectMotion/motionSolvers/Newmark/NewmarkObjectMotionSolver.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation \\...
ALGO
0.932352
6.627931
{ "github_metadata": { "branch": "master", "commit_count": 1752, "repo_created_at": "2019-10-22T01:38:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 261, "forks": 104, "issues": 26, "pull_requests": 1 }, "file_meta": { "content_id": "7db...
2487d8a3-2267-40a7-8076-5c560b19c052
compass-stc/StructuralGT
RandomBoundaryBetweennessCast.cpp
// Copyright (c) 2023-2024 The Regents of the University of Michigan. // This file is from the StructuralGT project, released under the BSD 3-Clause // License. #include "RandomBoundaryBetweennessCast.h" #include "Util.h" #include <Eigen/Dense> #include <igraph.h> #include <stdio.h> #include <stdlib.h> #include <iost...
ALGO
0.998569
5.49751
{ "github_metadata": { "branch": "main", "commit_count": 556, "repo_created_at": "2021-07-01T20:45:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3ff89c41db...
12a51c4e-e8dc-4dab-a260-9e928ed3d017
biyotte/Code_of_gunwookim
Atcoder/ABC188/E.cpp
#include <bits/stdc++.h> #define x first #define y second #define pb push_back #define all(v) v.begin(),v.end() #pragma gcc optimize("O3") #pragma gcc optimize("Ofast") #pragma gcc optimize("unroll-loops") using namespace std; const int INF = 1e9; const int TMX = 1 << 18; const long long llINF = 2e18; const long long ...
ALGO
0.999973
3.67892
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2021-01-27T11:17:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba867f245f4...
b8370c51-8a75-40b2-bd24-ee1a83f0a0e8
LucasBaun/TND012
lab5/code/uppgift1.cpp
/* * TND012, Lab5 * Author: Lucba332, lihen669 * */ /*Test data 1 country X: 50 50 100 250 100 50 100 85 100 180 10 100 -1 Sweden: 70 78 170 250 105 90 120 96 160 250 18 150 -1 */ /*Test data 2 country X: 50 50 100 250 100 50 100 85 100 180 10 100 50 50 120 120 50 77 -1 Sweden: 70 78 170 250 105 90 120 96 1...
TOOL
0.974269
4.320643
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-10-10T14:19: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": "6796964ac700...
cc6a5b5f-836c-4c7c-9138-c7e6898f976b
vibraphone/cgma
geom/TDSplitSurface.cpp
//-Class: TDSplitSurface.cpp #include "TDSplitSurface.hpp" #include "RefFace.hpp" #include "RefEdge.hpp" #include "RefVertex.hpp" #include "CoEdge.hpp" #include "Loop.hpp" #include "GMem.hpp" TDSplitSurface::TDSplitSurface( int vertex_type ) { vertexType = vertex_type; sideA = NULL; sideB = NULL; sideC = NULL...
ALGO
0.935464
6.02591
{ "github_metadata": { "branch": "master", "commit_count": 1073, "repo_created_at": "2014-01-20T14:55:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9668fd0...
51c44a23-4fe1-4c46-8d4b-8634c3f984ec
Piechota/Metody-numeryczne
zad4Numerki/zad4Numerki/zad4Numerki.cpp
// zad4Numerki.cpp : main project file. #include "stdafx.h" #include <iostream> #include <cstdlib> #include "Zad4.h" using namespace std; int main() { char wyb; int wezly; cout << "Podaj dokladnosc:\n"; cin >> epsilon; cout << "\nPodaj ilosc wezlow (min 5):\n"; cin >> wezly; wezly = (wezly < 5) ? 5 : wezly;...
ALGO
0.999754
4.265208
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2014-03-05T12:11: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": "a4572bc56...
86101444-9f4a-4173-b017-050ec1227e19
alaneos777/club
project euler/492.cpp
#include <bits/stdc++.h> using namespace std; using lli = long long int; __int128_t powerMod(__int128_t a, __int128_t b, __int128_t m){ __int128_t ans = 1; while(b){ if(b & 1) ans = ans * a % m; b >>= 1; a = a * a % m; } return ans; } lli rec(const vector<lli> & P, const vector<lli> & init, lli n, lli mod){...
ALGO
0.999903
5.002794
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2018-08-06T04:13:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ea48fed8...
642a625e-d977-4e26-bee2-0d355b4f9c4f
kunyavskiy/competitive-programming-archive
opencup/18-19/181118/p3.cpp
#include <iostream> #include <fstream> #include <vector> #include <set> #include <map> #include <cstring> #include <string> #include <cmath> #include <cassert> #include <ctime> #include <algorithm> #include <sstream> #include <list> #include <queue> #include <deque> #include <stack> #include <cstdlib> #include <cstdio>...
ALGO
0.999741
3.377512
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2022-10-08T20:56:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec918c94fde...
b7ef932e-e7e0-42dd-91f5-645510f981e2
gzhu-team-509/GZHU-OJ
10/1043MS.cpp
#include <iostream> #include <cmath> using namespace std; int main() { double x1, x2, x3, y1, y2, y3, a, b, c, s, p , r, k1, k2; while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3) { a = (x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1); a = sqrt(a); b = (x3 - x1)*(x3 - x1) + (y3 - y1)*(y3 - y1); b = sqrt(b); c =...
ALGO
0.999785
3.5003
{ "github_metadata": { "branch": "master", "commit_count": 205, "repo_created_at": "2017-09-20T05:03:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9a092949...
bc45a9b7-04a9-4559-aa49-ad5186fe3c8e
cbg-ethz/SCITE
treelist.cpp
/* * treelist.cpp * * Created on: Mar 27, 2015 * Author: jahnka */ #include <stdbool.h> #include <vector> #include <stdlib.h> #include <stdio.h> #include <string> #include <iostream> #include <sstream> #include <math.h> #include <queue> #include "matrices.h" #include "treelist.h" #include "rand.h" using n...
ALGO
0.969413
4.042338
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-04-04T09:37:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23, "forks": 15, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "61d942d...
8fdbf020-bb04-4cfa-bb76-04e4abff8ee0
jpessoa/UFMS-2021-2-prog2
1125-LA/la-q02.cpp
/* >>>>> OK <<<<< */ #include <stdio.h> #include <stdlib.h> struct celula{ int valor; struct celula *prox; }; void inserir_fim(int n, celula* &lst); int soma(celula *L); void desalocar(celula* &L); int main() { celula *lista = NULL; /*lista sem cabeca vazia*/ int num, resp; //printf("Di...
ALGO
0.999694
3.808953
{ "github_metadata": { "branch": "main", "commit_count": 183, "repo_created_at": "2021-08-19T16:32:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33572fae82...
148aaf7b-f29c-41c8-8db4-1aa638c7ec11
obsolescenceL/obsolescenceL
training/bc_16_3_12/HDU5641.cpp
/************************************************************************* File Name: B.cpp ID: obsoles1 PROG: LANG: C++ Mail: <EMAIL> Created Time: 六 3/12 19:20:42 2016 ************************************************************************/ #include<cstdio> #include<cstring> #inclu...
ALGO
0.998704
3.36988
{ "github_metadata": { "branch": "master", "commit_count": 751, "repo_created_at": "2014-12-29T07:41:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "568c4790...
59b92230-56bf-4838-90e5-d94a29313880
TheOBPGuy/CPP-Projectss
HR-Week3/MockTest3.cpp
#include <iostream> #include <vector> #include <string> #include <unordered_map> using namespace std; bool checkA(vector<int> a, int val); bool checkB(vector<int> b, int val); int getTotalX(vector<int> a, vector<int> b) { // first get the last element of b; if (a.empty() && b.empty()) { return 0...
ALGO
0.999019
4.892782
{ "github_metadata": { "branch": "main", "commit_count": 121, "repo_created_at": "2021-10-01T01:21: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": "88dc716662...
c63965fd-bd74-4706-b954-e3b4d40ddc02
Fduzjrqlw/Leetcode
algorithm/698. 划分为k个相等的子集.cpp
class Solution { public: bool res ; void dfs(int pos , vector<int>& nums , int k , vector<int>& temp_sum , int& target) { if (res) { return ; } if (pos == nums.size()) { for (int i = 0 ; i < k ; ++i) { if (temp_sum[i] != target) { ...
ALGO
0.999987
5.978764
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-01-29T10:04: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": "426d0a657...
e3051230-7315-44f6-b3ce-5e1739a60ddb
arpit353/DSA-Codes
String/13. Find all possible combinations by replacing given digits with characters of the corresponding list.cpp
#include <bits/stdc++.h> using namespace std; // Top-down Recursive function to find all possible combinations by // replacing key's digits with characters of the corresponding list void find(auto list, auto keys, string res, int index, auto map) { // if we have processed every digit of key, print result if (index =...
ALGO
0.999582
4.163645
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-01-01T04:30:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d18f4ac9fe...
0aa3dcf1-ee42-4efa-bd68-9dcc7b1b01fd
mkltaneja/DS-ALGO
DP_Revision/GFG_Count_number_of_ways_to_partition_a_set_into_k_subsets.cpp
#include <iostream> #include <vector> #include <cmath> #define vi vector<int> #define vii vector<vi> using namespace std; int count_ways(int n, int k, vii &dp) { if (n == k || k == 1) return dp[k][n] = 1; if (dp[k][n] != 0) return dp[k][n]; int new_g = count_ways(n - 1, k - 1, dp); in...
ALGO
0.999778
4.472011
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-05-18T18:54: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": "46ca75960...
c6599593-a836-4da2-bad9-4e834b561002
Arkavidia-CP/arkavidia-cp-problemset
2020/arkavidia-2020-final-ordered-segment/spec.cpp
#include <tcframe/spec.hpp> using namespace tcframe; using namespace std; typedef long long LL; const int MAX_N = 100000; const int MAX_B = 100000; const int MAX_Q = 100000; class ProblemSpec : public BaseProblemSpec{ protected: //list of variables int N, Q; vector<int> arr; vec...
ALGO
0.999876
3.999604
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-08-31T15:04:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "435a3bbc1a...
3eca31aa-d479-43b9-bbe2-2f671382955b
ML-UCV/ML-CodeBert-DistinctSolutions
Raw Dataset/cmap/divide_conquer/test/ec5b1942-31a7-46f0-97b1-ed25b52b9882.cpp
#include <fstream> #include <algorithm> #include <iomanip> #include <vector> #include <cmath> using namespace std; ifstream f("cmap.in"); ofstream g("cmap.out"); const long long INF = 4e18; struct point { int x, y; }; int n; vector < point > p; bool cmp(point a, point b) { if (a.x...
ALGO
0.999867
4.283215
{ "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": "80cf9a3f78851...
2ffdc1df-7a75-4a43-848d-68d572d0c5b2
parallelcodefoundry/ParEval
drivers/cpp/benchmarks/geometry/11_geometry_convex_hull_perimeter/cpu.cc
// Driver for 11_geometry_convex_hull_perimeter for Serial, OpenMP, MPI, and MPI+OpenMP // struct Point { // double x, y; // }; // // double distance(Point const& p1, Point const& p2) { // return std::sqrt(std::pow(p2.x-p1.x, 2) + std::pow(p2.y-p1.y, 2)); // } // // /* Return the perimeter of the smallest conve...
ALGO
0.995214
5.769512
{ "github_metadata": { "branch": "develop", "commit_count": 41, "repo_created_at": "2023-10-06T17:25:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35, "forks": 10, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "9d202a2...
0d2e2017-bfe8-4abb-9774-a95a9acfa75e
Alua-Buyesh/ADS2024
ADS3/ADS3k.cpp
#include <iostream> #include <vector> #include <climits> using namespace std; int main() { int n, k; cin >> n >> k; vector<int> arr(n); for (int i = 0; i < n; ++i) { cin >> arr[i]; } int minLength = INT_MAX; // To store the minimum length of subarray int currentSum = 0; // ...
ALGO
0.999993
5.604619
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-09-09T20:49: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": "f53cb5e67e05...
ea9e96ef-5640-41e5-a572-aa8c6164602b
bhaveshlohana/HacktoberFest2020-Contributions
Algorithms/Hierholzer-Algorithm/hierholzeralgo.cpp
#include <bits/stdc++.h> using namespace std; void printCircuit(vector< vector<int> > adj) { unordered_map<int,int> edge_count; for (int i=0; i<adj.size(); i++) { edge_count[i] = adj[i].size(); } if (!adj.size()) return; //empty graph stack<int> curr_path; vector<int> circuit; curr_path.p...
ALGO
0.999971
4.964074
{ "github_metadata": { "branch": "master", "commit_count": 2347, "repo_created_at": "2020-09-30T11:42:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 190, "forks": 988, "issues": 11, "pull_requests": 546 }, "file_meta": { "content_id": "...
0b86c33f-70cb-44b4-8ffa-f067f8d3b8c4
georgerapeanu/c-sources
agm/final/day1/G.cpp
#include <bits/stdc++.h> using namespace std; const int NMAX = 1e3; vector<pair<int,int> > graph[NMAX + 5]; bool inQ[NMAX + 5]; int cnt[NMAX + 5]; long long dist[NMAX + 5]; bool ok; int t; int n,m; bool bellman(){ queue<int> q; for(int nod = 1;nod <= n;nod++){ cnt[nod] = 0; dist[nod] = 0; inQ[nod] ...
ALGO
0.999539
3.626466
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2018-08-15T14:37:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee976bcc...
18f3bc32-6bb2-49b9-9d66-3e543402b3f1
Terpodia/Competitive-Programming
Notebook/Miscellaneous/Kadane-2D.cpp
#include <algorithm> #include <cstdio> #include <cstring> using namespace std; int aux; typedef long long ll; const ll INF = 1e18; int main() { int n, m; aux = scanf("%d%d", &n, &m); ll a[n][m]; for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) aux = scanf("%lld", a[i] + j); ll pref[n + 1][m + 1...
ALGO
0.999913
3.157129
{ "github_metadata": { "branch": "main", "commit_count": 170, "repo_created_at": "2021-12-10T22:43: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": "8437159290...
d9944018-24d8-4711-aa2e-2bcccc410316
ppitu/ZaawansowanyCpp
Lek3/zad1.cpp
#include <iostream> #include <random> #include <cstring> template <typename T> T max(T a, T b) { return (a > b) ? a : b; } template <typename T> T* max(T *a, T *b) { return ((*a) > (*b)) ? a : b; } template <typename T> T max(T *data, size_t n) { T _max = data[0]; for(size_t i = 0; i < n; i++) if(data[i] > _m...
ALGO
0.998039
4.119344
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-04-13T07:13: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": "02370828941f...
6a59f29a-21f2-4295-a91e-8a54a4d2dfd5
RussTedrake/drake
systems/controllers/linear_quadratic_regulator.cc
#include "drake/systems/controllers/linear_quadratic_regulator.h" #include "drake/common/drake_assert.h" #include "drake/common/is_approx_equal_abstol.h" #include "drake/math/continuous_algebraic_riccati_equation.h" #include "drake/math/discrete_algebraic_riccati_equation.h" #include "drake/systems/primitives/linear_s...
ALGO
0.998244
7.693118
{ "github_metadata": { "branch": "master", "commit_count": 27854, "repo_created_at": "2014-02-23T19:55:24.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "RobotLocomotion/drake", "stars": 48, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "c...
325c0c90-47a7-438d-9ea3-74f89b687415
PiusLim373/leetcode_and_hackerrank
hackerrank/cpp_preparation/Attending Workshops.cpp
#include<bits/stdc++.h> using namespace std; //Define the structs Workshops and Available_Workshops. //Implement the functions initialize and CalculateMaxWorkshops struct Workshops { int start_time, duration, end_time; }; struct Available_Workshops { vector<Workshops> vect; }; Available_Workshops* initializ...
ALGO
0.999987
4.481915
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-01-29T02:58: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": "785231343a5c...
3e2fd02f-e9eb-430c-bde0-551073c942d1
therealdmitch/Algorithms-and-Data-Structures
Project4/dijkstra.cpp
#include<iostream> #include<cstdlib> #include<istream> #include<fstream> #include<string> #include<cstdlib> #include<climits> #include<sstream> #include<vector> #include<algorithm> using namespace std; #include"graph.h" #include"queue.h" #include"dsexceptions.h" typedef struct Vertex { string name; string lV; ...
ALGO
0.997853
3.126384
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-23T18:55: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": "62c17f9a5253...
da7f0431-54e8-48f2-aba8-f166161347d2
Sharknevercries/Online-Judge
CodeForce/448B Suffix Structures.cpp
/* 7127692 2014-07-17 18:18:40 Shark 448B - Suffix Structures GNU C++ Accepted 30 ms 0 KB */ /* Template By Shark */ // C++ #include<iostream> #include<vector> #include<queue> #include<map> #include<set> #include<bitset> #include<algorithm> #include<functional> #include<deque> // C #include<cstdio> #include<cstr...
ALGO
0.999698
3.522678
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-08-03T15:45:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a6adc9...
2eb4fe88-3aff-4049-bc92-4a73db697671
Kumarmilan02/2105208_OOP_PROGRAM
LAB-14-November-29-22-CSE-17-seassonal/208-L14-SET3-A.cpp
/*Write a C++ program to create a template function to find the smallest of three numbers. Pls do not create copies of the arguments while passing them as parameters and neither modify them inside the function.*/ //2105208-<NAME> #include <iostream> using namespace std; template <class T> T findmin(const T &x1, const...
ALGO
0.999706
5.565482
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-12-22T05:25: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": "0c8d89f5d329...
bcdb1d01-18e9-4a3a-b2b6-253328df9131
StonyBrookDB/SLICE
src/geometry/TriDist.cpp
/*************************************************************************\ Copyright 1999 The University of North Carolina at Chapel Hill. All Rights Reserved. Permission to use, copy, modify and distribute this software and its documentation for educational, research and non-profit purposes, without fee, ...
ALGO
0.998995
5.936336
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2020-07-13T16:55:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1d636f521...
9dac3352-e0fa-400b-99d8-63debab8362f
JoschkaKoen/Gruppe
old/Source1.cpp
#include "opencv2/core/core_c.h" #include "opencv2/core/core.hpp" #include "opencv2/flann/miniflann.hpp" #include "opencv2/imgproc/imgproc_c.h" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/video/video.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/objdetect/objdetect.hpp" #include "open...
ALGO
0.959059
4.278415
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2019-12-01T21: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": "06b49999f...
d9e9846e-0895-433b-98f6-24980c8369f8
acavelan/m2vip
watermark/fft_utils.cpp
#include <math.h> #include "fft_utils.h" void fft(const float* in, float* reOut, float* imOut, unsigned int width, unsigned int height) { fftw_complex* spatial_repr; fftw_complex* frequency_repr; unsigned int i; unsigned int j; fftw_plan plan; int x,y; spatial_repr= (fftw_complex*)fftw_malloc(sizeof(fftw_comp...
ALGO
0.999011
5.200859
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2013-11-29T12:11: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": "7322918d3...
e9e09e98-7c34-4df5-bfaa-3c18e1cf9ba7
KJ1113/Algorithm_2021
이론 : 정렬/실패율.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; bool cmp(pair<int, float> A, pair<int, float> B) { if (A.second == B.second) { return A.first < B.first; } else { return A.second > B.second; } } vector<int> solution(int N, vector<int> stages) { vector<int...
ALGO
0.99998
4.524945
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2021-04-28T07:27:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca5ee69de39...
7cba11a4-7e45-4a7d-977f-a29b52801704
opencv/opencv_contrib
modules/cudastereo/src/disparity_bilateral_filter.cpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
TOOL
0.913893
7.17335
{ "github_metadata": { "branch": "4.x", "commit_count": 4557, "repo_created_at": "2013-09-11T13:28:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9757, "forks": 5828, "issues": 553, "pull_requests": 88 }, "file_meta": { "content_id": "4e...
9f01821e-eeee-4b88-ae2b-fe213f77db97
YouyangShen/DTU-course-CPP-02393
week 8/ex4/ex04-library.cpp
#include "ex04-library.h" #include <iostream> using namespace std; //Do not modify template<class T> void Node<T>::printNode(){ cout << "Name: " << name << ", value: " << value ; cout << ", children: " << children.size() << endl; } //Exercise 4 (a) Check and correct if necessary template<class T> Node<T>::Node(str...
ALGO
0.986347
4.570757
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2020-11-09T18:01: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": "e6bfff17a072...
315cd57b-6837-46a0-9078-cd6342b64884
florianmgedeon/FordJohnsonSortingAlgorithm
ex02/PmergeMe.cpp
#include "PmergeMe.hpp" long gCompareCount = 0; PmergeMe::PmergeMe(char **av) { int pairIndex = 1; for (int i = 1; av[i]; i++) { std::istringstream iss(av[i]); long num; if (!(iss >> num) || num < 0 || num > INT_MAX || !(iss.eof())) throw Error(); _v.push_back(s...
TOOL
0.967483
4.621586
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-07-14T10:52:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb546316c5a1...
c08209b0-b684-4513-a61d-e3b4ab6026dd
ausendzhikova/uni-data-structure-and-algorithms
Tree_specific_print.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <queue> using namespace std; struct Node{ Node *left; Node *right; int value; Node(int value){ this->value = value; this->left = NULL; this->right = NULL; } }; class BST...
ALGO
0.999697
3.648873
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-08-08T12:49: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": "b86e2ff877e...
a1793a7a-fec0-4d1a-8a7f-9071633be529
sofiatqsevskaa/AOC2024
day4/masx.cpp
#include <iostream> #include <vector> #include <string> #include <fstream> using namespace std; int main() { vector<vector<char>> a; string line; ifstream inputFile("day4/input_day4.txt"); if (!inputFile) { cerr << "Error" << endl; return 1; } while (getline(inputFile, line)) ...
ALGO
0.998982
5.55305
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-12-01T08:16: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": "2d606d5b5b...
7a10b27a-3555-4386-b5ae-8061522b3697
vgmtool/vgm2pre
nall/matrix.hpp
#ifndef NALL_MATRIX_HPP #define NALL_MATRIX_HPP namespace nall { namespace Matrix { template<typename T> inline void Multiply(T* output, const T* xdata, unsigned xrows, unsigned xcols, const T* ydata, unsigned yrows, unsigned ycols) { if(xcols != yrows) return; for(unsigned y = 0; y < xrows; y++) { for(unsi...
ALGO
0.970889
5.770619
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2013-02-13T16:52:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 31, "forks": 6, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "068dce0e9c...
7cf2c808-c9fa-438e-aa18-fe6b300c83fb
zippon/video_collage
video_collage/make_collage.h
// // make_collage.h // video_collage // // Created by <NAME> on 11/12/12. // Copyright (c) 2012 <NAME>. All rights reserved. // #ifndef __video_collage__make_collage__ #define __video_collage__make_collage__ #include "shot_detection.h" #include <iostream> #include <opencv2/opencv.hpp> #include <string> #include ...
TOOL
0.944263
5.146995
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2012-11-14T07:15:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae80e200e0...
6df84d90-1b43-4b92-b94e-2d1816b0d951
whiledoing/Out_Of_Core_Module
Library/stxxl/include/stxxl/bits/algo/async_schedule.h
/*************************************************************************** * include/stxxl/bits/algo/async_schedule.h * * Part of the STXXL. See http://stxxl.sourceforge.net * * Copyright (C) 2002 <NAME> <<EMAIL>> * Copyright (C) 2009 <NAME> <<EMAIL>> * * Distributed under the Boost Software License, Ver...
ALGO
0.966585
6.505172
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2012-07-25T02:36:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a54c447...
860a3a85-5021-436d-ab79-6739a5a393b1
bobbyshashin/Exciting-Robotics
code/Linux/lib/cgal/Kinetic_framework/examples/Kinetic_framework/adding_a_certificate.cpp
#define CGAL_CHECK_EXPENSIVE #define CGAL_CHECK_EXACTNESS #include <CGAL/Kinetic/basic.h> #include <CGAL/Polynomial/Sturm_root_stack_traits.h> #include <CGAL/Polynomial/Sturm_root_stack.h> #include <CGAL/Kinetic/Active_objects_vector.h> #include <CGAL/Kinetic/Default_instantaneous_kernel.h> #include <CGAL/Kinetic/Car...
ALGO
0.975237
4.295174
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2016-08-17T04:44:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a74c5e016...
b05569f9-1a6a-4418-8012-ef20d447007c
ViniR-RB/ifpi-ads-algoritmos2021-Vinicius-Roosevelt
c++/lista 1/Atividade 4/q1.cpp
using namespace std; #include <iostream> template <class T> class ArvoreNo { private: T valor; ArvoreNo<T> *esquerda, *direita; bool successor; public: ArvoreNo() { this->esquerda = NULL; this->direita = NULL; this->successor = false; } ArvoreNo(T v, ArvoreNo<T> *l = NULL, ArvoreNo<T> *r =...
ALGO
0.999899
5.224154
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2021-05-19T16:00:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d67b2a5db4...
26b48b79-e689-45ba-8177-1d2baf284e25
Mindjolt2406/Competitive-Programming
Google Kickstart/2019/Round 2019/try.cpp
/* <NAME> IIIT Bangalore */ #include<bits/stdc++.h> #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define ll long long int #define ld long double #define vi vector<int> #define vll vector<long long int> #define fi first #define se second #define pr(v) { f...
ALGO
0.999901
4.06182
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2018-11-15T05:50:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e023ad04f...
812af795-f483-42fd-8474-d786ff00617a
sidgvpta/BankDatabase
main.cpp
#include "Bank.h" #include "Customer.h" #include "Account.h" #include <iostream> #include <fstream> #include <string> using namespace std; int main() { Bank bank1; //this bank uses linked lists for its customers and accounts. cout << "--BANK DATABASE IMPLEMENTED USING LINKED LISTS--" << endl << endl; ...
TOOL
0.972133
3.900192
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-11-29T14:22:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50d9e86025...
b7d85b79-3f48-4d36-a22a-092d4dd32355
ektagarg786/Coding-Ninjas-CP
Dynamic_Programming_2/Subset_Sum.cpp
/*Given a set of n integers, find if a subset of sum k can be formed from the given set. Print Yes or No. Input Format First line contains a single integer n (1<=n<=1000) Second line contains n space separated integers (1<=a[i]<=1000) Last line contains a single positive integer k (1<=k<=1000) Output Format Output Yes...
ALGO
0.99999
4.168734
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2020-03-17T13:54:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "52ecf688...
0c0008ee-32d8-4357-9fcc-cea0e4b0d604
kalpak92/DataStructures_Algorithms
Arrays/CPP/LargestNumberFromGivenNumbers.cpp
/* Arrange given numbers to form the biggest number. Given an array of numbers, arrange them in a way that yields the largest value. For example, if the given numbers are {54, 546, 548, 60}, the arrangement 6054854654 gives the largest value. And if the given numbers are {1, 34, 3, 98, 9, 76, 45, 4...
ALGO
0.999803
5.453839
{ "github_metadata": { "branch": "master", "commit_count": 695, "repo_created_at": "2017-05-14T21:03:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b03edc...
80c65e14-9803-4efd-ab5c-26d096c3a419
rediska0123/msa-heuristic-search
src/progressive_alignment.cpp
#include "progressive_alignment.h" #include "utils.h" #include <utility> #include <vector> #include <algorithm> #include <iostream> struct SequenceWithIndex { Sequence seq; int index; SequenceWithIndex(Sequence seq = {}, int index = 0) : seq(std::move(seq)), index(index) {} }; typedef std::ve...
ALGO
0.99975
5.770068
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2021-05-03T18:38: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": "e629d4f9cf0...
df9172c9-09a6-40d5-9200-c538e4b66e2d
radio-astro/casa
code/bnmin1/src/prior_sampler.hxx
/** \file prior_sampler.hxx <NAME> <<EMAIL>>, <<EMAIL>> Sampler of the prior distribution */ #ifndef _BNMIN1_PRIOR_SAMPLER_HXX__ #define _BNMIN1_PRIOR_SAMPLER_HXX__ #include <vector> #include <set> #include <boost/scoped_ptr.hpp> #include "minim.hxx" #include "mcpoint.hxx" namespace Minim { // Forward...
ALGO
0.999621
5.997288
{ "github_metadata": { "branch": "master", "commit_count": 18139, "repo_created_at": "2015-08-20T09:27:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6df2dd...
ca805a0a-7136-4b3f-9f3d-0258952001a4
careercup/CtCI-6th-Edition-cpp
Ch 1.Arrays And Strings/8.Zero_matrix/8.zero_matrix.cpp
/** * Cracking the coding interview 1.8 * Write a space efficient algorithm, such that if an element in MxN is 0, the entire row and column containing it are 0. * * Approach: * We can use a boolean matrix of MxN or a bit vector to mark row and columns to be nullified in first iteration, but it wont be space effici...
ALGO
0.999693
6.568113
{ "github_metadata": { "branch": "master", "commit_count": 145, "repo_created_at": "2016-02-12T04:53:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1450, "forks": 508, "issues": 9, "pull_requests": 25 }, "file_meta": { "content_id": "c7b...
d0eeca1a-d34c-4c53-b367-14c40fad6091
StandNotAlone/ACM
王子超的codeforce/2020.6.25Educational Codeforces Round 90C(思维).cpp
#include<map> #include<set> #include<cmath> #include<queue> #include<stack> #include<cstdio> #include<vector> #include<bitset> #include<string> #include<cstdlib> #include<cstring> #include<fstream> #include<sstream> #include<iomanip> #include<iostream> #include<algorithm> #include<functional> #include<bits/stdc++.h> #d...
ALGO
0.999574
3.468092
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2020-05-10T08:35:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2117d887...
7b7f5e97-8dfe-4a4f-8c23-4f4438aad73f
SAKTHISPARROW/Placement-Preparation
DSA/Trees/sprial.cpp
#include <iostream> #include <stack> using namespace std; struct Node { int data; Node *left; Node *right; Node(int x) { data = x; left = right = NULL; } }; void spy(Node *root) { if (root == NULL) return; stack<Node *> s; s.push(root); stack<Node *> t; ...
ALGO
0.999985
4.728128
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-10-01T14:58: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": "2c9a49c78d7...
56db0d5b-7a35-4241-aecd-14e992c982fa
JamesQian1999/NSYSU_Advanced-Programming
1644_Prime_Gap.cpp
#include <iostream> #include <cmath> using namespace std; int prim(long int p) { long int end = (long int)sqrt(p), i; if (!end) return 0; for (i = 2; i <= end; i++) if (p % i == 0) return 0; return 1; } int main() { while (1) { long int input, up, down; ...
ALGO
0.999949
3.812119
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2021-02-28T11:55:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0da28e216a9...
3097d03e-3a92-4d7e-8751-2f67bed7e150
MicDaniel/FacultyFAI
FAI 6/FAI6/Source.cpp
#include<stdio.h> #include<conio.h> void adunare(int n); void inmultire(int n); void elemInvers(int n); void elemNilpotent(int n); void divizoriZero(int n); int main() { int n; scanf_s("%d", &n); adunare(n); inmultire(n); elemInvers(n); elemNilpotent(n); divizoriZero(n); _getch(); return 0; } void adunare(...
ALGO
0.998465
3.41695
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-11-13T14:32: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": "1a110012be...
27d9e2a0-905b-4f47-a2e7-63b685777047
AneeshAhuja31/DSA_Concepts
Linked_List/LLCreationByInsetingAtLast.cpp
#include<iostream> using namespace std; struct Node{ int data; Node*next; }*head=NULL; void Create(int A[],int n){ Node*t,*last; head = new Node; head->data = A[0]; head->next=NULL; last = head; for(int i=1;i<n;i++){ t = new Node; t->data=A[i]; t->next=...
ALGO
0.999675
4.366353
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-16T17:56:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13b71b264a50...
45cdada5-d007-4d46-abce-5f6d179e4d99
david-why/learn-cpp
some-coding-club/20211204/hw/socks.cpp
// https://codeforces.com/problemset/problem/731/C // Accepted; #138039785, 218 ms, 20296 KB #include <bits/stdc++.h> using namespace std; const int maxn = 2e5 + 1; int par[maxn], cols[maxn], siz[maxn], tmp[maxn]; unordered_map<int, pair<int, map<int, int>>> mcol; int root(int i) { return par[i] == i ? i : (par[...
ALGO
0.999958
3.947858
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2021-02-25T11:01:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5adc0d2c2c...
7aa65e65-c32e-4152-b4f7-ba39b0388cb1
AikenH/Aikens_programming_notes
CODE_Leetcode/752.打开转盘锁.cpp
/* * @lc app=leetcode.cn id=752 lang=cpp * * [752] 打开转盘锁 */ // @lc code=start class Solution { public: int openLock(vector<string>& deadends, string target) { // 使用回溯法遍历所有的可能性,同时做出特殊的终结判断 // 同时维护一个最小值,然后最终返回. // 正确理解题目的意思(每次只能转动单个转盘,而且只能移动一格) // 为什么使用BFS,最短路径,找到了就提前终止,同时是路径问题 ...
ALGO
0.999881
6.073113
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2020-08-31T13:07:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d6bbd2ee...
c9a40347-5a2d-45bd-95d3-85ee9cc36d53
friend001002/quicksort
quicksort/quicksort.cpp
#include <iostream> #include <vector> using namespace std; class Quick_sort_ex : public runtime_error { public: explicit Quick_sort_ex(const char *msg) : runtime_error(msg) { } explicit Quick_sort_ex(string& msg) : runtime_error(msg) { } virtual ~Quick_sort_ex() noexcept { } virtual const ch...
ALGO
0.999317
5.473672
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-06-07T08:00:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "5d14db5d19...
c68f3d50-2d6a-4978-b6d9-8d19c8ea3800
NASD-Bulgaria/egt-training
Vasil Sakalev/HomeWork - STL/26.2LongestSubscription/src/26.2LongestSubscription.cpp
//2. Write a method that finds the longest subsequence //of equal numbers in given array. Use linked list. #include <iostream> #include <algorithm> #include <iterator> #include <list> using namespace std; int main() { int size = 9; int arr[size] = { 1, 2, 2, 2, 5, 6, 3, 1, 4 }; list<int> integers; integers.inse...
ALGO
0.999749
3.087193
{ "github_metadata": { "branch": "master", "commit_count": 230, "repo_created_at": "2014-09-04T12:47:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1014ccd2...
f7148f72-4ee2-446d-ae72-aee0cb7f871b
Kalp22/Competitive-coding
leetcode/pascalTriangle.cpp
// 118. Pascal's Triangle #include <bits/stdc++.h> using namespace std; class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector<int>> pTri; vector<int> preRow; for (int i = 0; i < numRows; i++) { vector<int> oneRow; for (int j ...
ALGO
0.999994
5.056599
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-12-02T06:15:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34efb67fbef...
c64f8ce7-899b-4b9e-be4a-878dd765661f
zhvirus/zhangtina
former_work/BMC/Interframe/inc/VTL/vtl_numeric.h
#ifndef __VTL_NUMERIC_HPP__ #define __VTL_NUMERIC_HPP__ /*************************************************************************\ Microsoft Research Asia Copyright (c) 2001 Microsoft Corporation Module Name: Numeric function, matrix related Abstract: Functions adapted from Numerical Recipes, including 1...
ALGO
0.999499
6.326745
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2013-12-06T03:35: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": "613c46cb...
c742c3b7-7cc7-40c0-8d80-82251e759623
mikilauda95/cppEx
secondAss/Graph.cpp
#include <sstream> #include <fstream> #include <iterator> #include <algorithm> #include <stdlib.h> #include <time.h> #include <iostream> #include <string.h> #include <vector> #include "Graph.h" using namespace std; typedef vector<vector<unsigned int> > matrix; // Void Constructor // Graph implemented as an edge matr...
ALGO
0.954244
3.183279
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-06-26T15:48: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": "d187c1e4d...
43404bfc-4707-49f2-95d1-d3ebbc0187f0
rhks7410dyd/PSstoringplace
Dynamic_Programming/algospot_ZIMBABWE.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cstring> #include <bitset> #define MOD 1000000007 using namespace std; int dp[1<<14][20][2]; string e,digit; int m,cnt,esize; int can_be_price(int index,int Set,int mod,int is_low); int main(){ cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_...
ALGO
0.999872
4.563457
{ "github_metadata": { "branch": "master", "commit_count": 441, "repo_created_at": "2022-11-12T10:44: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": "cbedaa40...
596d969e-f4e5-46c3-91e8-f38c4dead87c
chinmayhaval/CPP
cpp/11_minimum_cost_to_make_string_valid.cpp
/* You are given a string 'STR' containing either '{' or '}'. 'STR' is called valid if all the brackets are balanced. Formally for each opening bracket, there must be a closing bracket right to it. You want to make 'STR' valid by performing some operations on it. In one operation, he can convert '{' into ...
ALGO
0.999708
4.559488
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-07-12T14:01: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": "5560133a2d09...
63c24731-6f60-4137-90e7-fbc901eb519b
IoanaGabor/competitive-programming-problems
infoarena/namlei.cpp
#include <bits/stdc++.h> #define NMAX 30001 #define KMAX 10 #define MOD 997 using namespace std; ifstream fi("namlei.in"); ofstream fo("namlei.out"); int n,K,X,Y; struct matrice{ int m[KMAX][KMAX]; } aint[4*NMAX],sol; int cnt,ind,j,k,x,y; int nj,nk; matrice inmultire(matrice a,matrice b){ matrice ret; ...
ALGO
0.999204
4.362254
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-02-18T18:06:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6f75fc88759...
79362cda-0fda-4616-9207-48fe3ef32bcd
Gaeunyee/zandi
백준/Platinum/13504. XOR 합/XOR 합.cc
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int BITS = 31; class Node { public: Node* next[2]; int size[2]; Node() { next[0] = next[1] = nullptr; size[0] = size[1] = -1; } }; class Trie { public: Node* top; Trie() { top =...
ALGO
0.999963
5.60211
{ "github_metadata": { "branch": "main", "commit_count": 427, "repo_created_at": "2024-11-11T12:30: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": "b1b667fd3f...
59b4261b-72a3-4c28-930a-5f812305cf23
iamarpitnamdeo/QuickDataStructures
LInkedLIst/Singly Linked List/07.Linked_List_searching.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; Node(int val) { data = val; next = NULL; } }; Node *insertEnd(Node *head, int item) { Node *temp = new Node(item); if (head == NULL) { head = temp; return head; } N...
ALGO
0.999875
4.914043
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-05-21T19:38: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": "5674101e618b...
3ac89956-bf8e-4565-b58d-7fb2597031a5
Ronnoc/Training
Codeforces/Round #253/_B.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <bitset> #include <cctype> #include <cstdio> #include <string> #include <vector> #include <cstdlib> #include <cstring> #include <iomanip> #include <sstream> #include <iostream> #in...
ALGO
0.999946
3.796327
{ "github_metadata": { "branch": "master", "commit_count": 445, "repo_created_at": "2013-10-11T04:01:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "468decb...
df2f0926-76c8-48fd-b4ab-d8697de0f219
ShivPatel031/DSA
Hash/Kth_Distinct_String_in_an_Array.cpp
// Kth Distinct String in an Array leetcode 2053 // A distinct string is a string that is present only once in an array. // Given an array of strings arr, and an integer k, return the kth distinct string present in arr. If there are fewer than k distinct strings, return an empty string "". // Note that the strings are...
ALGO
0.999925
6.673777
{ "github_metadata": { "branch": "main", "commit_count": 400, "repo_created_at": "2024-06-17T09:52: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": "a58d225359...
fe459d87-645c-4b9e-8e05-a24edf090530
kuhaku-space/atcoder-submissions
code/abc/abc249/abc249_d.cpp
#line 1 "a.cpp" #define PROBLEM "" #line 2 "/home/kuhaku/atcoder/github/atcoder-lib/lib/template/template.hpp" #pragma GCC target("avx2,bmi2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; template <class T, class U> bool chmax(T &a, const U &b) { retu...
ALGO
0.999951
5.335584
{ "github_metadata": { "branch": "main", "commit_count": 446, "repo_created_at": "2022-05-21T07:48:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e52eef39b...
a23ba087-dd53-45b7-91a4-65373d1f70cf
AyanPahari/Must-Do-Coding-Questions-for-Top-Product-Based-Companies
Linked List/12. remove loop in linked list.cpp
// { Driver Code Starts // driver code #include <iostream> using namespace std; struct Node { int data; Node *next; Node(int val) { data = val; next = NULL; } }; void loopHere(Node *head, Node *tail, int position) { if (position == 0) return; Node *walk = head; ...
ALGO
0.999969
4.40146
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2021-12-28T11:51:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b183da83a...
129da5a6-8915-41b0-ba6d-c8c3d78ec1b9
nakatamaho/mplapack
examples/mplapack/03_SymmetricEigenproblems/generic/Rsyevd_DingDong_generic.cpp
//https://math.nist.gov/MatrixMarket/deli/DingDong/ //<NAME>, Compact Numerical Methods for Computers: Linear Algebra and Function Minimisation, second edition, <NAME>, Bristol, 1990 (Appendix 1). void DingDong(INTEGER n) { INTEGER lwork, liwork, info, m; REAL *a = new REAL[n * n]; REAL *w = new REAL[n]; ...
ALGO
0.999813
3.723557
{ "github_metadata": { "branch": "master", "commit_count": 2597, "repo_created_at": "2017-03-29T02:30:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 95, "forks": 13, "issues": 22, "pull_requests": 0 }, "file_meta": { "content_id": "22af...
06bdb0c3-7434-4593-8e74-680048db3fad
JayjeetAtGithub/Algorithms
binary-tree-problems/bst3.cpp
// C++ program to demonstrate searching operation // in binary search tree without recursion #include<bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left, *right; }; bool iterativeSearch(struct Node *root , int data){ while(root != NULL){ if(data > root->data){ ...
ALGO
0.999987
3.367931
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-07-31T04:41:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4e74483b5...