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 |
|---|---|---|---|---|---|---|---|
fdc7e372-98b5-4efa-b2da-038617665ab2 | yjs03057/Algorithm-Study | boj/14889 스타트와 링크 - 다경.cpp | #include <iostream>
#include <cmath>
#include <cstring>
using namespace std;
int n, ans=987654321;
int s[20][20];
bool startTeam[20];
int maketeam(int idx, int cnt){
if(cnt == n/2){
//계산
int sTeam=0, lTeam=0;
for(int i=0; i<n; i++){
if(startTeam[i]){
for(int j=i+... | ALGO | 0.999978 | 3.788897 | {
"github_metadata": {
"branch": "master",
"commit_count": 132,
"repo_created_at": "2020-07-29T14:04: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": "cca23dbe... |
72c321d3-9236-40e2-908e-b5a0338de6da | ChangmooMoon/PS | sample/rotateArray.cpp | #include <iostream>
#include <vector>
using namespace std;
// 1. degree 90 clockwise: (i,j) => (j, n-i-1)
// 2. axis x: (i,j) -> (n-i-1, j)
// 3. axis y: (i,j) -> (i, n-j-1)
// 4. point symetry: (i,j) -> (n-i-1, n-j-1)
void manipulate_array(vector<vector<int>> &v) {
int n = v.size();
vector<vector<int>> tmp(n... | ALGO | 0.999989 | 5.4108 | {
"github_metadata": {
"branch": "main",
"commit_count": 269,
"repo_created_at": "2020-10-19T05:36: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": "57cb36fae6... |
7542799e-7eaa-4c7a-902f-f0eeb539e358 | ishandutta2007/codeforces-l | ljc00118/normal/1267/C.cpp | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define per(i, a, b) for (int i = a; i >= b; i--)
using namespace std;
typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef long long ll;
template <typename _T>
inline void read(_T &f) {
f = 0; _T fu = 1; char c = getchar()... | ALGO | 0.999918 | 3.210202 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17: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": "abd1088a1657... |
99129efa-82a6-484b-bcac-09b72fbe6d5b | nebiros88/c-plus-plus-training | Chapter 4/Exercises/Exercise 16/Exercise 16/source.cpp | #include "../../../../std_lib_facilities.h"
int main()
{
vector<int> numbers;
vector<int> times;
int k = 1;
int moda = 0;
cout << "Any numbers.\n";
for (int num; cin >> num;) {
numbers.push_back(num);
}
for (int i = 0; i < numbers.size(); ++i) {
cout << numbers[i] << "\t";
}
cout << "\n";
for (int i = 0;... | ALGO | 0.999955 | 3.542778 | {
"github_metadata": {
"branch": "master",
"commit_count": 103,
"repo_created_at": "2018-02-26T12:00:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c174967... |
074317e5-34ef-4eb7-bfdc-68c78412c04d | davidchai21/makeit | 0227_BasicCalculatorII/BasicCalculatorII.cc | class Solution {
public:
int calculate(string s) {
s.push_back('+');
stack<int> st;
char sign = '+';
int num = 0;
for (char& c : s) {
if (c == ' ') continue;
else if (isdigit(c)) {
num = num*10+(c-'0');
} else {
... | ALGO | 0.999989 | 5.349471 | {
"github_metadata": {
"branch": "main",
"commit_count": 108,
"repo_created_at": "2020-12-01T07:07: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": "e7d4732c70... |
4047740a-ef7d-444c-9484-9b9ca7113c01 | jason-marshall/STLIB | stlib/hj/EikonalAdjDiag1st2.h | // -*- C++ -*-
/*!
\file EikonalAdjDiag1st2.h
\brief Eikonal equation. First-order, adjacent-diagonal scheme.
*/
#if !defined(__hj_EikonalAdjDiag1st2_h__)
#error This file is an implementation detail of the class EikonalAdjDiag1st.
#endif
namespace stlib
{
namespace hj {
//! Eikonal equation. Adjacent-diagona... | ALGO | 0.999882 | 5.672169 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-05-10T18:09:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cea6c6f966... |
b15d04b6-f7a8-4c82-b069-9dafb58e814b | just-buildsystem/justbuild | src/buildtool/execution_engine/dag/dag.hpp | // Copyright 2022 Huawei Cloud Computing Technology Co., Ltd.
//
// 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... | ALGO | 0.976275 | 5.523678 | {
"github_metadata": {
"branch": "master",
"commit_count": 3459,
"repo_created_at": "2022-10-20T08:19:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 86,
"forks": 22,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1cc15b... |
75586d01-821d-4442-9316-eec09dd45a39 | NayemurRahman-Nayem/DSA | Strings/Hashing/Double Hashing CP .cpp | // Bismillah-ir-Rahman-ir-Rahim
#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
typedef long double ld ;
typedef unsigned long long ull ;
typedef vector<int> vi ;
typedef vector<ll> vl ;
typedef vector<vi> vvi ;
typedef vector<vl> vvl ;
typedef pair<int, int> pii ;
typedef pair<float, float... | ALGO | 0.999739 | 4.515269 | {
"github_metadata": {
"branch": "main",
"commit_count": 133,
"repo_created_at": "2020-12-28T10:21: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": "bea4f7d1a8... |
9c331398-0dd1-4407-9ceb-66d4cd9dc6d0 | SaineeNihar/PriorityQueue | HeapifyArray.cpp | #include<bits/stdc++.h>
using namespace std;
class heap{
public:
int *array;
int count,capacity,heap_type;
heap(int cap,int typ){
count=0;
capacity=cap;
array=new int[cap];
heap_type=typ;
}
};
int getTop(heap *h)
{
if(h->count==0)
return 0;
return h->a... | ALGO | 0.999341 | 3.882109 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-08-06T06:42:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5fa777f3c6... |
286d4b11-b79c-4122-9488-6af562f1a6ab | prabhaschinthala1094/LEETCODE | 3361-shift-distance-between-two-strings/3361-shift-distance-between-two-strings.cpp | class Solution {
public:
// using ll = long long int ;
long long shiftDistance(string s, string t, vector<int>& nextCost, vector<int>& previousCost) {
long long res = 0;
for (int i = 0; i < s.length(); ++i) {
int ss = s[i] - 'a';
int tt = t[i] - 'a';
if (ss == tt)... | ALGO | 0.999974 | 5.188422 | {
"github_metadata": {
"branch": "main",
"commit_count": 591,
"repo_created_at": "2024-01-03T10:29: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": "8bc040ba74... |
02010069-0b1c-42e5-8228-4ca78626dc31 | Olaf51/Leetcode-GFG_questions | BFS of graph - GFG/bfs-of-graph.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// Function to return Breadth First Traversal of given graph.
vector<int> bfsOfGraph(int V, vector<int> adj[]) {
// Code here
queue<int>q;
vector<bool>v(V,false);
... | ALGO | 0.999912 | 6.500781 | {
"github_metadata": {
"branch": "main",
"commit_count": 1193,
"repo_created_at": "2023-06-04T05:27: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": "13d496544... |
c6a8a19c-5d62-4e8c-882d-2eb3a34036dc | aragun/OJ | timus_1209.cpp | #include <cstdio>
#include <iostream>
#include <cmath>
using namespace std;
#define ll long long
/*
1 will always be at the position (n*(n+1)/2 + 1), for n = 0, 1, 2 and so on.
n*(n+1)/2 is just the sum of the first n numbers. Since each 10^i contributes i
digits, there will be n*(n+1)/2 digits upto 10^n. Theref... | ALGO | 0.999727 | 3.996499 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-09-20T18:24: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": "1caca98799... |
6171d963-3eb1-4169-affb-fce6f203fc24 | abhineet123/MTF | SM/src/GridTracker.cc | #include "mtf/SM/GridTracker.h"
#include "mtf/SM/PyramidalTracker.h"
#include "mtf/Utilities/miscUtils.h"
#include <vector>
#include <stdexcept>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#ifdef ENABLE_TBB
#include "tbb/tbb.h"
#endif
//! OpenMP scheduler
#ifndef GRID_OMP_SCHD
#def... | ALGO | 0.993594 | 6.372324 | {
"github_metadata": {
"branch": "master",
"commit_count": 973,
"repo_created_at": "2016-11-28T18:22:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 101,
"forks": 24,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1356c... |
b23a404b-5062-4248-b8cf-52992dbcd2a0 | parkhaeseon/boj | [DFS] 10026.cpp | #include <iostream>
#include <queue>
#include <cstdio>
#include <vector>
#include <cstring>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
int N = 0;
char map[101][101];
int cnt[3] = { 0, }; // 0 : R, 1 : G, 2 : B
int dy[4] = { -1, 0, 1, 0 };
int dx[4] = { 0, -1, 0, 1 };
char color[... | ALGO | 0.998477 | 3.565483 | {
"github_metadata": {
"branch": "master",
"commit_count": 297,
"repo_created_at": "2018-06-28T16:46: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": "a1d5dc66... |
056de568-5c97-4609-b1c6-cb5fb94aa95f | Tareqalnaqeeb2024/Programming-Advices | Problems Solving/problem#8level.cpp | #include<iostream>
#include <string>
#include <cmath>
using namespace std;
int ReadPositveNumber(string Message)
{
int Number ;
do
{
cout << Message << endl ;
cin >> Number;
} while ( Number <= 0);
return Number;
}
int GetNumberOfFerquncey(int Digits , int Number)
{
... | ALGO | 0.99433 | 3.721093 | {
"github_metadata": {
"branch": "main",
"commit_count": 51,
"repo_created_at": "2024-11-09T19:16: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": "9447b6fe54d... |
7199f928-fe55-4ba9-999e-5dfc56c85381 | hgoose/leetcode | cat/binarysearch/houserobberIV/main.cc | #include <iostream>
#include <utility>
#include <vector>
#include <string>
#include <unordered_map>
#include <queue>
#include <utility>
#include <cmath>
#include <bitset>
#include <array>
#include <map>
#include <limits>
#include <numeric> // std::accumulate
#include <climits> // INT_MAX, INT_MIN, ...
#include <tuple>
... | ALGO | 0.99997 | 4.484865 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2025-01-24T15:55:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c2110ae18... |
8f74784e-e0a5-4394-9a3d-888caed3f1ef | datdt198213/project-vanet-blockchain | iroha/libs/common/radix_tree.hpp | /**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef IROHA_RADIX_TREE_HPP
#define IROHA_RADIX_TREE_HPP
#include <cstddef>
#include <memory>
#include <optional>
#include <string>
#include <vector>
namespace iroha {
/**
* Determines the permitted symbols
... | ALGO | 0.99794 | 7.570214 | {
"github_metadata": {
"branch": "master",
"commit_count": 270,
"repo_created_at": "2023-09-28T06:48:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e353eafd... |
e6be0c71-09cf-4215-a334-559d84ee6e78 | Xilinx/Vitis_Libraries | data_compression/L2/src/crc32_mm.cpp | /*
* (c) Copyright 2019-2022 Xilinx, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | ALGO | 0.979641 | 5.943384 | {
"github_metadata": {
"branch": "main",
"commit_count": 471,
"repo_created_at": "2019-09-23T19:13:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 988,
"forks": 381,
"issues": 0,
"pull_requests": 12
},
"file_meta": {
"content_id": "7ba27d... |
46c79f7c-a878-49e5-967e-0b42807bf760 | devyetii/Sorting-Algoritms | Sorting/Sorting/main.cpp | #include<iostream>
#include"SortingFunctions.cpp"
#include<string>
using namespace std;
//A user-defined struct to work with
template<typename Tf, typename Ts>
struct Pair {
Tf f;
Ts s;
Pair(Tf f_param, Ts s_param) : f(f_param) : s(s_param) {};
bool operator <(const Pair<Ts, Tf>& other) {
return this->f < other... | ALGO | 0.999307 | 4.514014 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-05-04T08:24:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "93b6cbbe76... |
dc461901-4326-43a1-99ba-05dc306e620a | MortalTrex/CPP--Modules | CPP09/ex01/RPN.cpp | #include "RPN.hpp"
//------ Canonical form -------
RPN::RPN() {}
RPN::RPN(std::string expression) : _expression(expression)
{
if (_expression.empty())
throw std::invalid_argument("Expression cannot be empty");
}
RPN::RPN(const RPN &src){
this->_expression = src._expression;
}
RPN &RPN::operator=(co... | ALGO | 0.986539 | 5.595619 | {
"github_metadata": {
"branch": "main",
"commit_count": 98,
"repo_created_at": "2025-02-07T08:50: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": "a2b819772a3... |
04abdb04-4bcc-48ef-9ec6-25c90454982e | fnavarrov/SGeMS | GsTLAppli/grid/grid_model/grid_topology.h | /**********************************************************************
** Author: <NAME>
** Copyright (C) 2002-2004 The Board of Trustees of the Leland Stanford Junior
** University
** All rights reserved.
**
** This file is part of the "grid" module of the Geostatistical Earth
** Modeling Software (GEMS)
**
** This... | ALGO | 0.934585 | 3.057616 | {
"github_metadata": {
"branch": "master",
"commit_count": 142,
"repo_created_at": "2012-06-21T19:45:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 25,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "46d634... |
f9e18f90-32d9-40f9-8ba1-2de823109b1e | sw1203/BAEKJOON | C++/DFS와 BFS(1260번).cpp | #include <iostream>
#include <vector>
#include <queue>
#include<algorithm>
using namespace std;
int N, M, V; //N:정점의 수, M: 간선의 수, V:탐색을 시작할 정점
vector<vector<int>> graph;
vector<bool> visit;
void bfs(int start) {
queue<int> q;
q.push(start);
visit[start] = false;
while (!q.empty()) { //queue가 비어있지 않으면 실행
start =... | ALGO | 0.999988 | 4.61516 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2020-05-21T11:22: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": "5fd8d4a224... |
0841c9e6-0936-445d-a7fa-b5e35da79a9a | Daniil-Oberlev/sorting | tests/binaryInsertion.sort.test.cpp | #include "../include/binaryInsertion.sort.h"
#include "../libs/catch2/catch.hpp"
#include <vector>
TEST_CASE("Тесты бинарной сортировки вставками и бинарного поиска") {
int N = 5;
SECTION("Массив целых чисел по возрастанию") {
int Array[5] = {9, 7, 5, 3, 1};
binaryInsertionSort(Array, N);
for (int i =... | TEST | 0.9789 | 5.989419 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-17T19:28:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f899ada3d617... |
03658d42-f860-445b-858b-fa2dbdf90a84 | Ashutosh-777/DSA | Graph/ds.cpp | #include <bits/stdc++.h>
using namespace std;
// class DisjointSet{
// vector<int> parent;
// public:
// DisjointSet(int n){
// parent.resize(n+1,-1);
// }
// int findUPar(int u){
// if(parent[u]<0){
// return u;
// }else{
// return findUPar(parent[u])... | ALGO | 0.999956 | 4.182187 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-07-31T06:26:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "44cbc760044... |
5fe5f1cf-9c0d-40f1-b306-77e56d03eb96 | Hrk21/DSA-Flydeck | Recursion/13all_index.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> allIndex(int A[], int n, int key, int idx, int count)
{
if (idx == n)
{
vector<int> base(count);
return base;
}
vector<int> ans;
if (A[idx] == key)
{
ans = allIndex(A, n, key, idx + 1, count + 1);
ans[count... | ALGO | 0.999887 | 4.60539 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-01-07T14:38:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6cd2d70f38... |
1eb5cfcf-9eaa-4ff3-b987-e6290044d84d | vickykr26941/Data-structure-And-algorithm | leetcode-cf-cc/dp-bitmask/Sherlock and Coprime Subset.cpp |
// https://www.hackerearth.com/practice/algorithms/dynamic-programming/bit-masking/practice-problems/algorithm/sherlock-and-coprime-subset/
// solution : dp + bitmask
#include<bits/stdc++.h>
#define int long long
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define rep(i,a,b)... | ALGO | 0.999561 | 4.791953 | {
"github_metadata": {
"branch": "main",
"commit_count": 422,
"repo_created_at": "2021-04-27T13:15:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ee8bfdf9f... |
06f046ef-f5f9-4b52-b918-167370112919 | elibensasson/libSTARK | algebra/algebralib/src/BitExtract.cpp | /** @file
*****************************************************************************
* @author This file is part of libsnark, developed by SCIPR Lab
* and contributors (see AUTHORS).
* @copyright MIT license (see LICENSE file)
*************************************************************************... | ALGO | 0.999556 | 5.431623 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2018-02-28T08:50:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 536,
"forks": 98,
"issues": 14,
"pull_requests": 6
},
"file_meta": {
"content_id": "122c6... |
05786940-cafe-4480-b4ce-1e24b2c45b90 | iistrate/SortingMethods | Heap.cpp | #include "Heap.h"
void Heap::insertPriorityNode(int priority, int data) {
//if empty assign to node
if (m_count == 0) {
m_Root = new Node(priority);
m_Root->setValue(data);
m_count++;
}
//if more than one node
else {
insertNode(priority, m_Root);
}
}
void Heap::insertNode(int data) {
//if empty assign... | ALGO | 0.997397 | 3.91905 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2014-10-03T01:13: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": "b494e222f... |
39e6efc0-456b-429a-a0d2-5f84d695b9c8 | tshev/sgl | include/sgl/sgl.v1.function.parse_program_options.h | #pragma once
namespace sgl {
namespace v1 {
template<typename ForwardIterator, typename OutputIterator0, typename OutputIterator1>
inline
std::pair<OutputIterator0, OutputIterator1> parse_program_options(ForwardIterator first, ForwardIterator last, OutputIterator0 out0, OutputIterator1 out1) {
while (first != last... | TOOL | 0.982946 | 6.611915 | {
"github_metadata": {
"branch": "master",
"commit_count": 291,
"repo_created_at": "2019-06-29T19:12:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "062aa797... |
63edc836-9328-4768-ba3a-d77ab12d3282 | psdhanesh7/Competitive-Coding | sortTheArray.cpp | #include<iostream>
using namespace std;
// void sort(int *ar, int n) {
// int forward = 0;
// int backward = n-1;
// while(forward < backward) {
// if(ar[forward] == 1) {
// int temp = ar[forward];
// ar[forward] = ar[backward];
// ar[backward] = ar[forward];
// backward--;
// }
// else {
// ... | ALGO | 0.999983 | 4.247204 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2020-01-22T13:31:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "91e6f28e0... |
e31cf6e5-3186-42ee-8d3e-245365b65ba1 | bhmzzz/shujujiegou_practice | 数据结构实现/LineList/DynamicArr.cpp | #include "DynamicArr.h"
using namespace std;
int main() {
return 0;
}
MyArray::MyArray()
{
//申请内存
MyArray* myArray = new MyArray;
//初始化
myArray->size = 0;
myArray->capacity = 20;
myArray->pAddr = new int[capacity];
}
MyArray::MyArray(const MyArray& arr)
{
pAddr = new int[arr.capacity];
*pAddr = *arr.pAddr;... | TOOL | 0.913794 | 3.554591 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-05-08T08:48: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": "f579401bb076... |
a9093c82-90e4-491d-b115-e2ec30f4a757 | OpenDigitalTwin-Dev/FENGSim | toolkit/Geometry/gmsh/Plugin/Distance.cpp | // Gmsh - Copyright (C) 1997-2017 <NAME>, <NAME>
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <<EMAIL>>.
#include <stdlib.h>
#include "Gmsh.h"
#include "GmshConfig.h"
#include "GModel.h"
#include "OS.h"
#include "Distance.h"
#include "distanc... | TOOL | 0.932839 | 6.478241 | {
"github_metadata": {
"branch": "main",
"commit_count": 1345,
"repo_created_at": "2021-12-22T12:15:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 54,
"forks": 15,
"issues": 4,
"pull_requests": 2
},
"file_meta": {
"content_id": "9d4e9d7d... |
0d57e8d2-a7d0-41a7-b4bc-7d22a90037a6 | akhilesh029/DAA-all-algorithms | min_heap.cpp | #include <iostream>
#include <vector>
using namespace std;
void heapify(vector<int>& arr, int n, int i) {
int smallest = i; // Initialize smallest as root
int left = 2 * i + 1; // left child
int right = 2 * i + 2; // right child
// If left child is smaller than root
if (left < n && arr[left] < ar... | ALGO | 0.999965 | 5.444933 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-03-28T10:10: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": "170b0f27fb96... |
e4c5fdb1-da57-4b1a-8b74-94fb458d5617 | Will-Z/algorithm-practice | data_structure_prac/Queue.h | //
// Created by Will on 12/8/15.
//
// 设 队头指针指向队头元素,队尾指针指向对为元素的下一个位置;
#ifndef DATA_STRUCTURE_PRAC_QUEUE_H
#define DATA_STRUCTURE_PRAC_QUEUE_H
#include <iostream>
#define MaxSize 50
using namespace std;
//顺序队列
//--------------------------------------------------------------------------------... | TOOL | 0.988816 | 3.483319 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2016-02-18T16:34: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": "6a4802bae2... |
a072875c-906a-4b05-8aa3-c788e518b109 | jaiminocha/LeetCode-Solutions | 0021-merge-two-sorted-lists/0021-merge-two-sorted-lists.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
// ListNode* mergeTwo... | ALGO | 0.999991 | 5.856969 | {
"github_metadata": {
"branch": "main",
"commit_count": 611,
"repo_created_at": "2022-09-01T09:44: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": "e2a0e75000... |
47b0ec2d-3f60-46a5-9255-062500f7f9e7 | HaiLin545/oiwiki | 1_算法基础/3_递归&分治/1_leetcode递归/medium/3_894_所有可能的真二叉树.cpp | #include <iostream>
#include <vector>
#include <map>
using namespace std;
// 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(... | ALGO | 0.999971 | 5.789992 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2023-03-04T16:13: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": "d50de7af32a... |
762dfb94-2690-49c0-af95-0118bec8163d | mdarikrayhan/Competitive-Programming | codeforces/558/E.cpp | #include <bits/stdc++.h>
using i64 = long long;
template<class Info, class Tag>
struct LazySegmentTree {
const int n;
std::vector<Info> info;
std::vector<Tag> tag;
LazySegmentTree(int n) : n(n), info(4 << (int)std::log2(n)), tag(4 << (int)std::log2(n)) {}
LazySegmentTree(std::vector<Info> init) : ... | ALGO | 0.999997 | 4.131858 | {
"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": "cf9a48... |
0668c07d-eaa3-4097-bbc5-ee0435e138d7 | jaredjwang316/LeetCode | Recursion/Binary_Search_Trees/MaxTreeDepth.cpp | #include <iostream>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(righ... | ALGO | 0.999486 | 5.50222 | {
"github_metadata": {
"branch": "main",
"commit_count": 123,
"repo_created_at": "2025-05-15T20: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": "3a3e12bd73... |
d2878205-c76a-4004-bdf6-98d3f672e774 | cpp-review-dune/proyecto_suelos | examples/dairo/Programacion/MatrizGauss.cc | #include <iostream>
int main(){
int i=0;
std::cout.precision(3);
double matriz[3][3] = {{3,7,4},{9,5,2},{6,2,1}};
double matriz2[3][3] = {{3.0,7.0,4.0},{9.0,5.0,2.0},{6.0,2.0,1.0}};
if(matriz2[0][0] != 0){
for(int j=0; j<3; j++){
//3/3 Matriz[0][0]=3
... | ALGO | 0.999508 | 3.599715 | {
"github_metadata": {
"branch": "master",
"commit_count": 198,
"repo_created_at": "2021-05-09T14:50:22.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "07baaac37... |
ba00b872-d96d-44c8-b7ec-1054d9e5b23b | malxg/algorithm_application | ar_part_test/arithmetic_01backpack_DP.cpp | //arithmetic_01backpack_DP
#include <iostream>
#include <stdio.h>
#include <string.h>//包含memset 初始化函数
#define num 4
using namespace std;
//01 背包 动态规划 0222 0235 02357
int value[num] = {2,4,3,7},weight[num] = {2,3,5,5};
void dynamic_programming(int Backpack_Capacity) //参数 背包体积
{
if(Backpack_Capacity <= 0)
{
p... | ALGO | 0.999367 | 3.402904 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2021-10-14T08:47:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dba078b1e... |
bcb2efe5-3711-420b-b522-6ba8ea31fd89 | 0kina/kyopro-lib | lib/segment_tree.hpp | #pragma once
/**
* @file segment_tree.hpp
* @brief セグメント木に関するコード。
* @details
* モノイドの演算に関する処理を以下の時間で行う。
* * 区間計算クエリ:O(lg N)
* * 1点更新クエリ:O(lg N)
* @example segment_tree_example.cpp
*/
#include <functional>
#include <vector>
template <typename DataType>
class SegmentTree {
public:
SegmentTree<DataType>(
in... | ALGO | 0.998795 | 7.642845 | {
"github_metadata": {
"branch": "main",
"commit_count": 119,
"repo_created_at": "2022-02-01T05:42: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": "363494d76a... |
2e6cae58-21cc-44f6-a5d1-71a5cb2d1993 | Sommerfield3/LabCCII | CC II - Lab I ejercicio 3.cpp | /*3. Elabore un programa que solicite ingresar una hora del día (HH:MM en formato de cadena), solicite un tiempo en minutos a agregar, y retorne la hora de finalización (el formato de salida debe de estar en AM o PM según corresponda).*/
/*Apellidos y Nombres: <NAME>, <NAME>*/
#include <iostream>
using namespace std;
... | TOOL | 0.914041 | 3.917272 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-04-27T13: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": "c6a835d5efd8... |
33f2e2df-62d5-4c37-82a5-49e2622c9b20 | wzrain/Online-Judge-Problems | SJTU_OJ/1994.cpp | #include <iostream>
#include <stdio.h>
using namespace std;
int n, m, cnt = 0, mp[505][505], dir[5] = {-1, 0, 1, 0, -1};
void init() {
scanf("%d%d", &n, &m);
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
scanf("%d", &mp[i][j]);
}
}
}
void dfs(int i, int j) {
mp[i][j] = -1;
for ... | ALGO | 0.999884 | 3.761652 | {
"github_metadata": {
"branch": "master",
"commit_count": 437,
"repo_created_at": "2017-02-21T06:58: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": "90efe5ad... |
0d335f7e-2cb0-46fb-8e6a-147253c22a07 | Sarpyildir/WildLifeSimulation | PriorityQueue.cpp | #include "PriorityQueue.h"
#include <cmath>
#include <iostream>
/**
* Author : <NAME>
* id: 22003330
* Section : 1
* Homework : 3
* Description : This is the implementation of the methods that are defined in the header file..
*/
using namespace std;
PriorityQueue::PriorityQueue(int maxNoOfItems){
maxItems = maxNoOf... | ALGO | 0.998834 | 4.365198 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-04-24T16:38: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": "4f4ef287a24d... |
ee94d70e-1c0c-420d-ba5f-fcf04b3dfe0e | adrijshikhar/interviewbit-solutions | Graph/PossibilityOfFinishingCourses.cpp | #include <bits/stdc++.h>
using namespace std;
int path(int A, vector<int> &B, vector<int> &C) {
int n = B.size();
if (1 == A)
return true;
unordered_map<int, vector<int>> mp;
for (int i = 0; i < n; i++)
mp[C[i]].push_back(B[i]);
vector<bool> visited(A + 1, false);
queue<int> q;
visited[A] =... | ALGO | 0.999961 | 4.501029 | {
"github_metadata": {
"branch": "master",
"commit_count": 280,
"repo_created_at": "2020-04-29T05:39:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "46b6f053... |
e64e2146-806c-4a04-a3b2-26a6ca024025 | cmglezpdev/my-code-library | 2_solved-exercises/Codeforces/D_Almost Identity Permutations.cpp | #include<bits/stdc++.h>
using namespace std;
const int maxn = 1010;
typedef unsigned long long ll;
ll Dn[maxn];
ll C[maxn][maxn];
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
Dn[0] = 1, Dn[1] = 0, Dn[2] = 1;
for(int i = 3; i < maxn; i ++){
Dn[i] = (ll)(i - 1);
Dn[i] ... | ALGO | 0.999979 | 3.878905 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2022-04-02T23:19: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": "896e3175be5... |
e3da9218-7630-4aeb-840c-04ab72f334c1 | yashsarda/Scaler-Academy | Heap/N_max_pair_combinations.cpp | struct triplet
{
int i,j;
int value;
};
struct comp
{
bool operator()(triplet const& A,triplet const& B)
{
return A.value < B.value;
}
};
vector<int> Solution::solve(vector<int> &A, vector<int> &B) {
int asize = A.size();
int bsize = B.size();
vector<int> ans;
if(asize == 1){... | ALGO | 0.999998 | 4.478688 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2019-08-29T02:35:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 29,
"forks": 24,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ad693df... |
4d9d00a7-dcd2-4ce5-9902-058d0516c7b5 | leo2105/Codeforces | round383/C.cpp | #include <iostream>
using namespace std;
const int N = 105;
int A[N] ;
int main(){
int n , rpta = N , iter , aux;
cin >> n ;
for ( int i = 1 ; i <= n ; i++ ) cin >> A[i];
for ( int i = 1 ; i <= n ; i++ ){
iter = 0 ;
aux = A[i] ;
while ( iter < N ){
if ( aux == i ) break;
aux = A[aux];
iter ... | ALGO | 0.999938 | 3.389493 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2015-07-23T14:54: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": "0e78aa00c... |
09579c87-5125-457d-9bad-0dd19affa085 | LineageOS-UL/android_device_google_cuttlefish | host/commands/cvd/fetch/fetch_cvd_parser.cc | //
// Copyright (C) 2023 The Android Open Source Project
//
// 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 app... | TOOL | 0.920507 | 6.779761 | {
"github_metadata": {
"branch": "lineage-21.0",
"commit_count": 45414,
"repo_created_at": "2024-04-13T10:12:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3... |
022f240d-23dc-4138-bdff-7d685180e55b | Shauryy03/Cpp-Course | tut65.cpp | #include<iostream>
#include<list>
using namespace std;
void display(list<int> &l){
list<int> :: iterator it;
for (it = l.begin() ; it != l.end(); it++)
{
cout<<*it<<" ";
}
cout<<endl;
}
int main(){
list<int> list1; // lit of zero length
// list<int> list2(7); // empty list of s... | TOOL | 0.946293 | 4.042878 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-10-09T10:28: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": "8159d7b654a3... |
81785db8-d7d6-44a0-ab22-065a54c2a619 | Narcos101/Leetcode-Solutions | Rat in a Maze Problem - I - GFG/rat-in-a-maze-problem-i.cpp | // { Driver Code Starts
// Initial template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function template for C++
class Solution{
public:
void calc(vector<vector<int>> &m, int n,vector<string>&ans,vector<vector<int>>&vis,string s,int row, int col,vector<vector<int>>&... | ALGO | 0.99968 | 6.059076 | {
"github_metadata": {
"branch": "main",
"commit_count": 1508,
"repo_created_at": "2021-08-28T08:52: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": "749b069c5... |
147ff68f-07ce-4712-a118-fda488ce47cf | knothhe/PAT-Solutions | Advanced-Level-Cpp/1068-Find-More-Coins.cpp | /*
* Reference:
* https://www.xzy1996.com/post/a7b8cdfd.html
*
* Just travel and add some limit.
* 1. sort this array
* 2. if tsum + coins[cur] > m, stop this travel.
* 3. sum is the sum of all coins, if sum is less than m, then we don't need to travel.
*
* Dp(0-1 bag) is better solution.
*
*/
#include ... | ALGO | 1 | 3.476404 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-09-02T01:43: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": "5cc32e4024... |
c0854670-0f16-4c65-a517-b393f55859b4 | Kodsport/doris-2023 | doris-1/rationalisering/submissions/partially_accepted/jonathan_60p.cpp | #include <cmath>
#include <iostream>
using namespace std;
using ll = int64_t;
using pll = pair<ll, ll>;
double diff(pll r, double c) {
return abs(static_cast<double>(r.first) / static_cast<double>(r.second) - c);
}
bool close_enough(pll r, double c, double f) {
return diff(r, c) <= f;
}
pll solve(double c... | ALGO | 0.998373 | 3.858778 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-08-13T18:54:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9899c22216b... |
a21185a0-548a-4c3b-bc13-38ee56d6e2d0 | dftfeDevelopers/dftfe | src/atom/AtomCenteredSphericalFunctionGaussian.cc | // ---------------------------------------------------------------------
//
// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
// authors.
//
// This file is part of the DFT-FE code.
//
// The DFT-FE code is free software; you can use it, redistribute
// it, and/or modify it under the terms... | ALGO | 0.987944 | 6.326411 | {
"github_metadata": {
"branch": "publicGithubDevelop",
"commit_count": 6585,
"repo_created_at": "2018-07-04T03:11:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 139,
"forks": 42,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"conten... |
3b502841-7f5a-423d-a350-8ca1967b7838 | ssbb1166/algorithm-problem-solving | lcp/boj3033.cpp | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int t, l, n, len, sa[200001], pos[200001], lcp[200001], tmp[200001];
string s;
void Initialize()
{
n = s.length();
for (int i = 0; i < n; i++) {
sa[i] = i;
pos[i] = s[i];
}
}
bool Compare(int a, int b)
{
... | ALGO | 0.999977 | 4.549842 | {
"github_metadata": {
"branch": "main",
"commit_count": 1476,
"repo_created_at": "2023-04-13T12:45:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 14,
"pull_requests": 0
},
"file_meta": {
"content_id": "ead92897... |
5df17729-9f6e-4e10-a9ad-70faf5005105 | CGAL/cgal | Nef_2/include/CGAL/Nef_2/Polynomial.h | // Copyright (c) 2000 Max-Planck-Institute Saarbruecken (Germany).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : <NAME> <<EMAIL>>
// <NAME> <<EMAIL>>
#ifndef CGAL... | TOOL | 0.972738 | 6.50665 | {
"github_metadata": {
"branch": "master",
"commit_count": 113659,
"repo_created_at": "2014-10-01T12:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5443,
"forks": 1475,
"issues": 511,
"pull_requests": 136
},
"file_meta": {
"content_id... |
e848c299-5d4a-414d-bda0-2ba97cf4c901 | yplusplus/aabbyy | 20130801/1007.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;
const int N = 100010;
const int oo = -1000000000;
struct tree
{
int lt,rt;
int val;
}a[N * 4];
void init(int lt,int rt,int step)
{
a[step].lt = lt;
a[step].rt = rt;
a[step].val = 0;... | ALGO | 0.999903 | 3.693401 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2017-04-24T03:24:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7cb49422... |
cb51088f-5aa4-464b-900a-137fb73be8cd | zerolxf/zero | CQU/0424北林大/c.cpp | /*************************************************************************
> File Name: c.cpp
> Author: Zeroxf
> Mail: <EMAIL>
> Created Time: 2016年04月24日 星期日 15时00分00秒
************************************************************************/
#include<iostream>
#include<cstdio>
#include<cstdlib>
#inc... | ALGO | 0.999451 | 3.326801 | {
"github_metadata": {
"branch": "master",
"commit_count": 108,
"repo_created_at": "2015-12-31T07:38: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": "b5ca1977... |
904cac63-4241-49c1-a7a3-60a30d80fe62 | parambedi1453/ADI | binarySearch/findPivot.cpp | /*
Basics of this problem is the array is circulary sorted that means that half partbof array is always sorted
ques can be how many times array is sorted
// Naive approch find the mininmum and the index of mininmum element would be the pivot
eg
11 12 15 18 2 5 6 8
2 is minimum and the p... | ALGO | 0.999977 | 5.014726 | {
"github_metadata": {
"branch": "master",
"commit_count": 126,
"repo_created_at": "2019-08-11T21:29:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "22066e8b... |
1f41098d-4ad9-4cca-b3e8-3dee57f2ffb2 | ShuhongLL/Leetcode | cpp/binarySearch.cpp | #include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
vector<int> searchRange(vector<int>& nums, int target) {
if (nums.size() == 0) return vector<int>{-1, -1};
int l = 0, r = nums.size()-1;
while (l < r) {
int mid = (l + r) >> 1;
if (nu... | ALGO | 0.999986 | 6.054892 | {
"github_metadata": {
"branch": "master",
"commit_count": 282,
"repo_created_at": "2019-04-18T05:48:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "db40d0f2... |
17017265-5fd6-4bc4-8a26-c6bc99f22fd4 | yueliangyi/TURBID | src/solver_channel_flat.cc | /*******************************************************************************
*------------------------------------------------------------------------------
*------------------------------------------------------------------------------
****************************************************************************... | ALGO | 0.986646 | 5.39759 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-12-08T03:21:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1884b6d39... |
0cfc18d3-804c-4ce1-87b2-5274b0d02631 | hzding621/algorithms | icpc/uva/11995 - I Can Guess the Data Structure!/dt.cpp | #include <iostream>
#include <cstdlib>
#include <stack>
#include <queue>
using namespace std;
int main() {
int n;
while (cin >> n) {
stack<int> s;
queue<int> q;
priority_queue<int> pq;
bool bs = true, bq = true, bpq = true;
for (int i=0; i<n; i++) {
int x, y;
cin >> x >> y;
if (x == 1) {
if ... | ALGO | 0.99992 | 4.275228 | {
"github_metadata": {
"branch": "master",
"commit_count": 234,
"repo_created_at": "2015-01-19T20:17:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a1f824a1... |
35d0d4c8-a38e-44d8-9a99-636c3670d947 | sumansourabh26/Algo-DS-Programming | leetcode/Insert Delete GetRandom O(1).cpp | /*
* Author : <NAME>
* EMAIL ID - <EMAIL>
* Problem : https://leetcode.com/problems/insert-delete-getrandom-o1/
*/
#include <bits/stdc++.h>
using namespace std;
class RandomizedSet {
unordered_map<int,int> position_of_values;
vector<int> array_of_values;
public:
RandomizedSet() {
}
... | ALGO | 0.99354 | 5.940522 | {
"github_metadata": {
"branch": "master",
"commit_count": 327,
"repo_created_at": "2022-12-25T06:29:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1766cd83... |
33b78116-d4c4-4221-8153-c687ebe0b9c6 | Aman-droid/CP_Essentials | CODES/C_New_Year_and_Domino.cpp | #include<bits/stdc++.h>
#define ll long long int
#define endl '\n'
#define vll vector< ll >
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define pii pair<int,int>
#define SZ(x) ((int)x.size())
#define FIO ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#def... | ALGO | 0.999914 | 4.356146 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2021-06-28T19:31: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": "99890fad4d... |
159ae1bd-b5ef-4a23-aadf-88be8188c5df | petergroa/CodingPractice | leetcode/cpp/1980-find_unique_binary_string.cpp | /* 1980. Find Unique Binary String
* Given an array of strings nums containing n unique binary strings each of
* length n, return a binary string of length n that does not appear in nums.
* If there are multiple answers, you may return any of them.
*
*
*
* Example 1:
*
* Input: nums = ["01","10"]
* Outpu... | ALGO | 0.999946 | 5.914373 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2022-05-10T19:33: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": "b3b2cb9da... |
bd710b78-a1e1-4e61-9ab6-33a419ad4e87 | Meenachinmay/Competitive-Programming | Hackerrank_Graph_Theory/Prob5.cpp | #include <bits/stdc++.h>
#include <conio.h>
using namespace std;
const int M = 10e5;
bool visited[M];
vector<int> V[M];
int mindist[M];
void BFS(int s){
list<int> Q;
visited[s] = true;
mindist[s] = 0;
Q.push_back(s);
vector<int> :: iterator it;
while(!Q.empty()){
int v = Q.front();
Q.pop_back();
for(it = V[... | ALGO | 0.999838 | 4.098046 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-02-03T21:00:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1dd436da9... |
70afe68a-eb8d-4dae-8ec8-011607a4968f | ishandutta2007/codeforces-t | thenymphsofdelphi/normal/1615/C.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define endl '\n'
#define fi first
#define se second
#define For(i, l, r) for (int i = l; i < r; i++)
#define ForE(i, l, r) for (int i = l; i <= r; i++)
#define FordE(... | ALGO | 0.999886 | 4.288445 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27: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": "c8f6a8476242... |
efa7bb72-9bfc-45c3-bfcb-68a944264254 | Hunterdii/GeeksforGeeks-POTD | November 2024 GFG SOLUTION/November-01.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// long long int maxSum(int arr[], int n);
// } Driver Code Ends
class Solution {
public:
long long maxSum(vector<int>& arr) {
sort(arr.begin(), arr.end());
long long totalSum = 0;
int n = arr.size();
for (i... | ALGO | 0.998895 | 5.941565 | {
"github_metadata": {
"branch": "main",
"commit_count": 3732,
"repo_created_at": "2024-03-09T09:48:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 202,
"forks": 54,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f36ea4... |
f30a3c30-87a6-4fb7-96c8-1cf38560c805 | DmitriiDronov/Discrete-Math | lab2/main.cpp | #include "../lab1/menuUtils.hpp"
#include <iostream>
#include <list>
#include <climits>
#include <iomanip>
typedef std::vector<std::list<std::pair<int, int>>> AdjList;
typedef std::vector<std::pair<int, int>> ShortestDistances;
std::vector<AdjList>& adjListCollector();
AdjList createAdjList(int vertices, int edges);
... | ALGO | 0.999077 | 4.755987 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2021-02-10T09:04:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "65101e60106... |
baf39a17-4efd-41a3-ba38-a252f63d01fc | jack-Dong/NubtOj | main92.cpp | #include <iostream>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#define Debug 1
using namespace std;
typedef struct Edge
{
int fa;
int ch;
}Edge;
int main()
{
if( Debug )
{
freopen("92in.txt","r",stdin);
}
int caseN;
cin >> caseN;
for( int i = 0; i < ca... | ALGO | 0.999519 | 3.75971 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-03-28T09:53: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": "37dee2642e... |
b39ddd12-e7ef-4df4-88da-8bac79bc0260 | acorg/acmacs-map-draw | cc/figure.hh | #pragma once
#include "acmacs-map-draw/coordinates.hh"
// ----------------------------------------------------------------------
namespace acmacs::mapi::inline v1
{
struct FigureRaw
{
FigureRaw(bool clos = false) : close{clos} {}
FigureRaw(const std::vector<map_elements::v2::Coordinates>& ver... | TOOL | 0.917202 | 6.671144 | {
"github_metadata": {
"branch": "master",
"commit_count": 1711,
"repo_created_at": "2017-02-06T15:50:43.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c9518ce... |
2aee39bc-83b2-46f2-8c5a-839caad2ca06 | pyo8470/Baekjoon | 백준/Platinum/3015. 오아시스 재결합/오아시스 재결합.cc | #include <iostream>
using namespace std;
#include <string>
#include <vector>
#include <stack>
#include <unordered_set>
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
//unordered_set <pair<int, int>> result;
int N; cin >> N;
long long int count = 0;
// 키, 같은 키 개수
... | ALGO | 0.999915 | 3.932902 | {
"github_metadata": {
"branch": "main",
"commit_count": 439,
"repo_created_at": "2022-09-14T08:37: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": "5e3c67311e... |
061b00d1-2b54-48eb-b44f-b02c84c878e5 | lkuwada/CSCI60 | hw6/line.cpp | #include "line.h"
#include <cassert>
#include <utility>
line::line(double init_x,
double init_y,
double init_dx,
double init_dy)
{
x = init_x;
y = init_y;
dx = init_dx;
dy = init_dy;
}
double line::slope() const
{
assert(!is_vertical());
return (dy/dx);
}
... | ALGO | 0.935203 | 5.033581 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-04-07T23:41: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": "32d5a9fa6e... |
afe68cf8-dcbc-4d3d-a226-4d025f64c59a | shashank20-02/Striver-DSA | Trees/inOrderTraversal.cpp | #include <bits\stdc++.h>
using namespace std;
class Node
{
public:
int data;
Node *left;
Node *right;
Node(int data)
{
this->data = data;
this->left = this->right = NULL;
}
};
Node *CreateTree(Node *rootNode)
{
cout << "Enter the data: " << endl;
int data;
cin >> da... | ALGO | 0.99994 | 5.005329 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-02-22T07:26: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": "2ef3c40d8dd... |
83883864-a749-4eaf-8bb8-1e0f7ea10588 | obstinix/DSA-25 | 9.Dictonary_AVL.cpp | #include <iostream>
#include <string>
using namespace std;
class Node {
public:
string keyword;
string meaning;
Node* left;
Node* right;
int height;
Node(string key, string mean) {
keyword = key;
meaning = mean;
left = right = nullptr;
height = 1;
}
};
clas... | ALGO | 0.99977 | 5.668863 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-05-08T23:46: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": "ee403a26713... |
f6f85aaf-509f-43ab-8cc4-a310895675c1 | Catalyst-42/Tetris | tetris.cpp | #include <unordered_map>
#include <unistd.h>
#include <iostream>
#include <string>
#include <thread>
#include <mutex>
using namespace std;
mutex mlock;
int score = 0;
int lines = 0;
int ticks = 0;
const int X = 30 ; // field length
const int Y = 20 + 1; // field heigth
int figure_x = X/2 - 2;
int figure_y = 0;
int... | ALGO | 0.915593 | 3.968089 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-02-11T10:15:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f094354ebe79... |
b2fdd719-786f-49f1-99ea-c99106dc83b3 | drken1215/algorithm | DataStructureSegment/randomized_binary_search_tree.cpp | //
// Randomized Binary Search Tree (merge-split based)
//
// verified:
// yukicoder No.649 ここでちょっと QK
//
#include <iostream>
using namespace std;
// RBST
typedef long long VAL;
const VAL SUM_UNITY = 0;
struct RBST {
unsigned int randInt() {
static unsigned int tx = 123456789, ty = 362436069, tz = 521288629, t... | ALGO | 0.999945 | 4.775105 | {
"github_metadata": {
"branch": "master",
"commit_count": 477,
"repo_created_at": "2018-02-28T05:42:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 260,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af0ed... |
4d8ddf7b-f7a1-4665-8ede-b85d01805bdc | bajpaiayush0128/DSAinCpp | Heap/kClosestElements.cpp | #include <iostream>
#include <queue>
using namespace std;
void printKClosest(int arr[], int n, int k, int x)
{
bool visited[n] = {false};
for (int i = 0; i < k; i++)
{
int min_diff = INT_MAX;
int min_diff_idx;
for (int j = 0; j < n; j++)
{
if (visited[j] == false... | ALGO | 0.999985 | 5.583167 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-02-12T14:17:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0692af48bb7f... |
591f6e00-0bfe-49d9-ba5f-c1751cdf4303 | iknoom/Problem_Solving | BOJ/ICPC/2019 Seoul Regional/I_17976.cpp | #include <iostream>
#include <utility>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
using pi = pair<ll, ll>;
vector<pi> v;
int n;
bool check(ll min_L) {
ll s = v[0].first;
for (int i = 1; i < n; i++) {
s = max(s + min_L, v[i].first);
if (v[i].first + v[i].se... | ALGO | 0.999986 | 5.208601 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2020-07-04T17:17:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f33543... |
c25067a3-f5b1-4e42-a83c-6100b3420fcf | ghostprotocol04/cpp | vectors.cpp | #include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int>v; //declaration of vector
v.push_back(1); // assign values in vector
v.push_back(2);
v.push_back(3);
// to print elemets of vector
//method 1
for(int i =0 ; i < v.size(); i++){
cout<<v[i];
}
... | ALGO | 0.996315 | 3.79858 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-01-21T06:51: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": "03d15f016ed7... |
90a6491c-8af1-43c7-87a1-eb96368c0429 | yzarubin/comp | hacker_rank/weekofcode31/3_zero_one_game.cpp | #include <bits/stdc++.h>
using namespace std;
static const long long bs = 1000000007;
static const int INF = 0x3f3f3f3f;
static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector... | ALGO | 0.999982 | 3.851352 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2017-01-04T03:30: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": "792eab74b... |
d6135de9-b110-4074-96d0-aa5abe804fac | brendanwalker/MikanXR | src/Editor/Components/StaticMeshKdTree.cpp | #include "StaticMeshKdTree.h"
#include "ColliderQuery.h"
#include "Colors.h"
#include "IMkMesh.h"
#include "MikanLineRenderer.h"
#include "MkMaterialInstance.h"
#include "MkMaterial.h"
#include "IMkShader.h"
#include "MathUtility.h"
#include "MathGLM.h"
#include <glm/common.hpp>
#include <glm/gtx/intersect.hpp>
#incl... | ALGO | 0.998624 | 6.755166 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2022-08-24T02:23:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff484a35135... |
61654ca7-b345-4740-b42e-b1c2042466e1 | KizuraAmberfang/rubik | kocsymm/kocsymm.hpp | #ifndef KOCSYMM_HPP
# define KOCSYMM_HPP
# include "../cubepos/cubepos.hpp"
# include <iostream>
// the two-phase algjorythm is based on the subgroup generated by {U, F2, R2, D, B2, L2} = H.
// we have to find an arbitrary cube position and find a subsequence to bring it in the subgroup
// then solve it within the sub... | ALGO | 0.998057 | 5.829992 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2022-02-14T17:22:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "12490bb4cdf... |
c336e3f9-9e7b-45c2-a0cd-efcdf215f81c | michaelkin1/Programmes-in-C-plusplus | Expense_Tracker.cpp | #include <iostream>
#include <string>
#include <sstream>
#include <fstream>
using namespace std;
const int INITIAL_SIZE = 10;
// Class representing a single transaction
class Transaktion {
private:
string datum; // Date of the transaction
string typ; // Type of the trans... | TOOL | 0.951118 | 5.164886 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-08-26T12:48:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55a194ca5df... |
e9e25d42-1bd6-4337-bce2-0076039fc43e | Fortitude42/CompetitiveProgrammingArchive | Codeforces/CF Rounds/Cf#680/A/a.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
//#define int long long
//#pragma GCC optimize("Ofast")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC targe... | ALGO | 0.999929 | 4.366093 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-08T16:52:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d87a6502564c... |
46c2c47c-8e10-436f-b2ef-0da5be8d0bba | yuvrajparihar/DSA_and_coding | DSA/Graph/topoSortDfs.cpp | #include <bits/stdc++.h>
using namespace std;
#define fo(i,z,n) for(int i=z;i<n;i++)
#define ll long long
#define deb(x) cout << #x << "=" << x << endl
#define all(x) x.begin(), x.end()
#define pb push_back
#define mp make_pair
#define gcd(x,y) __gcd(x,y)
typedef vector<int> vi;
typedef vector<ll> vl;
int const mod = ... | ALGO | 0.999972 | 4.620555 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2021-02-11T16:00: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": "a2655afa5e9a... |
7b7d9acd-7b6d-4e6c-9993-cb8299bb182e | ShahjalalShohag/code-library | Strings/String Matching With FFT.cpp | // https://www.informatika.bg/resources/StringMatchingWithFFT.pdf
#include<bits/stdc++.h>
using namespace std;
const int N = 3e5 + 9;
const int mod = 1e9 + 7;
const double PI = acos(-1);
struct base {
double a, b;
base(double a = 0, double b = 0) : a(a), b(b) {}
const base operator + (const base &c) const {
... | ALGO | 0.999979 | 4.772975 | {
"github_metadata": {
"branch": "main",
"commit_count": 952,
"repo_created_at": "2018-11-18T08:49:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3240,
"forks": 840,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "26114... |
e63afe8f-d6d9-4f73-b84d-dfc6199f2fa9 | organicmaps/organicmaps | indexer/city_boundary.hpp | #pragma once
#include "geometry/bounding_box.hpp"
#include "geometry/calipers_box.hpp"
#include "geometry/diamond_box.hpp"
#include "geometry/point2d.hpp"
#include "base/visitor.hpp"
#include <vector>
namespace indexer
{
// Approximates city boundary.
// City points are inside the intersection of boxes.
struct City... | ALGO | 0.93058 | 7.481587 | {
"github_metadata": {
"branch": "master",
"commit_count": 42613,
"repo_created_at": "2020-12-27T19:02:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11487,
"forks": 1128,
"issues": 2796,
"pull_requests": 182
},
"file_meta": {
"content_i... |
cb2c3b2a-10e1-4735-ae8c-2452e93735a4 | CaDe27/Coding | CodeForces/checkPosts.cpp | //need number of scc
//minimum prize in each scc and total of junctions that have that prize
// money = sum of minimums; number f ways = Product of total that have minimum per scc
//https://codeforces.com/problemset/problem/427/C
#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#define loo... | ALGO | 0.999835 | 3.940644 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-02-23T17:53:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5e750e15001... |
01cf48be-014d-4a25-a4c7-6aae626dc967 | ishandutta2007/codeforces-m | monogon/normal/1262/B.cpp |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 1e5 + 5;
int t, n;
int p[N], ans[N];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> t;
while(t--) {
cin >> n;
for(int i = 0; i < n; i++) {
cin >> p[i];
}
set<int... | ALGO | 0.999775 | 4.141045 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03: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": "55e390172161... |
340583fe-92fa-4e90-a043-bb1ed00c48dd | northeastern-datalab/domain_net | networkit/include/networkit/distance/Dijkstra.hpp | /*
* Dijkstra.hpp
*
* Created on: Jul 23, 2013
* Author: Henning, <NAME>
*/
#ifndef NETWORKIT_DISTANCE_DIJKSTRA_HPP_
#define NETWORKIT_DISTANCE_DIJKSTRA_HPP_
#include <tlx/container/d_ary_addressable_int_heap.hpp>
#include <networkit/distance/SSSP.hpp>
namespace NetworKit {
/**
* @ingroup distance
* D... | ALGO | 0.999304 | 7.245358 | {
"github_metadata": {
"branch": "master",
"commit_count": 128,
"repo_created_at": "2021-01-04T19:21:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aab7d9a58... |
2be5c17a-a2d7-4f9d-9227-a5125dca5e3f | liuyubobobo/Play-with-Algorithms | 08-Minimum-Span-Trees/Course Code (C++)/06-Kruskal-Algorithm/IndexMinHeap.h | //
// Created by liuyubobobo on 9/26/16.
//
#ifndef INC_06_KRUSKAL_ALGORITHM_INDEXMINHEAP_H
#define INC_06_KRUSKAL_ALGORITHM_INDEXMINHEAP_H
#include <iostream>
#include <algorithm>
#include <cassert>
using namespace std;
// 最小索引堆
template<typename Item>
class IndexMinHeap{
private:
Item *data; // 最小索引堆中的数据... | ALGO | 0.999827 | 4.714293 | {
"github_metadata": {
"branch": "master",
"commit_count": 311,
"repo_created_at": "2016-07-05T18:16:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3700,
"forks": 1461,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2f... |
23c70e66-9046-46c6-b996-fe3bdbeb95d2 | raincross7/code-similarity | codes/train_code/problem330/problem330_177.cpp | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
using ll = int64_t;
#define rep(i, j, n) for (int i = j; i < (n); ++i)
#define rrep(i, j, n) for (int i = (n)-1; j <= i; ... | ALGO | 0.99954 | 4.407735 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7dd24c3ed7bc... |
689a2825-9892-4245-8cfc-0160eb94131d | rahgirrafi/varsity-cse-course | 2-1/C++/Class/linkedList.cpp | #include <iostream>
//class for linked list
class linkedList{
private:
struct node{
int data;
node* next;
};
node* head;
node* tail;
public:
linkedList(){
head = NULL;
tail = NULL;
}
void addNode(int n){
... | ALGO | 0.999602 | 5.529951 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2023-08-12T08:15: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": "73c69a72b... |
2ddcbeb9-a713-4b27-9f0e-bd4184a0cb08 | adityanjr/code-DS-ALGO | HackerBlocks/String Matching Algo/Rabin Karp ALgo.cpp | #include <bits/stdc++.h>
using namespace std;
int hashFunc(string s){ // hash function return a hash value as the sum of ascii values of string.
int val = 0;
for(int i=0;i<s.length();i++){
val += s[i];
}
return val;
}
bool rabinkarp(string s1, string s2){
bool sucess = true;
... | ALGO | 0.999962 | 4.851494 | {
"github_metadata": {
"branch": "master",
"commit_count": 589,
"repo_created_at": "2019-10-25T15:50:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 32,
"forks": 46,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0cdead... |
6c59cee7-607c-4616-9fad-924f33dca561 | TianpingHsu/drilling | src/algorithms/dp/longest-palindromic-subsequence.cpp | #include "utils.h"
// https://leetcode.cn/problems/longest-palindromic-subsequence/
static int memo[1024][1024];
int longest_palindromic_subsequence(string s) {
for (int i = 0; i < s.size(); i++) {
for (int j = 0; j < s.size(); j++) {
memo[i][j] = 0;
if (i == j) memo[i][j] = 1;
... | ALGO | 0.999024 | 5.822563 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2022-06-20T07:08: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": "e36fbd8c4... |
15c5a83a-2fc9-4716-a79a-5eaa095fc1d4 | solARisOP/Data-Structures-and-Algorithms | sde sheet/168_prims_mst.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#define vp vector<pii>
vector<pair<pair<int, int>, int>> calculatePrimsMST(int n, int m, vector<pair<pair<int, int>, int>> &graph)
{
// Write your code here.
vp adj[n+1];... | ALGO | 0.999983 | 4.439206 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2022-02-28T12:01:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4336104d5... |
a29730a4-6e57-4589-aad6-0863072643a7 | delicm/cses | Graphs/Monsters/main.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, timee = -1;
vector < vector <char> > l;
vector < vector <int> > t;
vector < pair <int, int> > moves = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
queue <pair <int, int>> q;
pair <int, int> start;
pair <int, int> finish;
map <pair <int, int>, pair <int, int>> pair_map;
... | ALGO | 0.999963 | 3.847588 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-01-26T04:47: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": "ea8063583532... |
5d298cf2-503f-4621-9a97-b359fb0d1a68 | achintya12345/C- | DisappearedArray.cpp | /*Given an array nums of n integers where nums[i] is in the range [1, n], return an
array of all the integers in the range [1, n] that do not appear in nums.
Example 1:
Input: nums = [4,3,2,7,8,2,3,1]
Output: [5,6]
Example 2:
Input: nums = [1,1]
Output: [2]*/
#include<iostream>
#include<cmath>
#include<vector>
... | ALGO | 0.999965 | 4.7344 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2025-01-29T09:28: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": "503b1c6ad... |
dc1c5de8-4f83-4a86-bcfc-a8632e4446b9 | open-airlab/VTNMPC-Autonomous-Wind-Turbine-Inspection | WTI_catkin/NMPC_code_generator/ros_acado_bridge/ACADOtoolkit/examples/ocp/discrete_time_rocket_c.cpp | /*
* This file is part of ACADO Toolkit.
*
* ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
* Copyright (C) 2008-2014 by <NAME>, <NAME>,
* <NAME>, <NAME>, <NAME>.
* Developed within the Optimization in Engineering Center (OPTEC)
* under supervision of <NAME>. All rig... | ALGO | 0.999938 | 5.360284 | {
"github_metadata": {
"branch": "main",
"commit_count": 64,
"repo_created_at": "2022-05-10T08:14:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 30,
"forks": 4,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "20656e0bd9d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.