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
72079faf-d8f8-4bba-962f-5276a531d007
professorlineu/APREM2-2019-2
Atividades/João Vitor Morais/ex01.2.cpp
/********************************************************** - Autor: <NAME> - Descrição: Faça um programa que receba quatro notas de um aluno, calcule e mostre a média aritmética das notas e a mensagem de aprovado ou reprovado, considerando para aprovação média 7. ***************************************************...
ALGO
0.994528
4.743263
{ "github_metadata": { "branch": "master", "commit_count": 1366, "repo_created_at": "2019-07-30T14:22:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 4, "issues": 94, "pull_requests": 0 }, "file_meta": { "content_id": "f4390c...
bf62e9b4-e994-4072-81c4-3877591026a1
Dr-SeanXD/test1
2024.9.5.cpp
#include <iostream> using namespace std; int main() { cin.sync_with_stdio(0); cin.tie(0); string str, name; cout << "Please input name: "; cin >> name; cout << "Please enter the equation (type " << '"' << "stop" << '"' << " to stop): "; cin.ignore(); while (getline(cin, str) && str != "...
ALGO
0.998324
3.816643
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-05T20:49: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": "2247b96a69f1...
547e76c1-6404-44d5-a990-85be093bde88
niksat3/General-Purpose-GA-and-WOA-Library-using-CUDA
Examples/GA/tryTSPGA/tryTSPGA/userClass.cpp
#include "userClass.h" #include <string> #include <sstream> #include <fstream> userClass::userClass() : GA_Lib((long)100, 38, 100, 0.15, 0.35, CrossoverType::PMXCrossover, MutationType::InversionMutation, SelectionType::TournamentSelection) { cudaMallocManaged(&coord, sizeof(float) * 2 * getSize()); run(); short* ...
ALGO
0.936046
3.818645
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2018-10-24T05:26: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": "0f649fa99...
47963ecf-6352-403d-97a5-b8f075b5aba9
liuyubobobo/Play-Leetcode
1001-1500/1015-Smallest-Integer-Divisible-by-K/cpp-1015/main.cpp
/// Source : https://leetcode.com/problems/two-sum/description/ /// Author : liuyubobobo /// Time : 2019-03-23 #include <iostream> #include <vector> #include <unordered_set> using namespace std; /// Multiplication Simulation /// Time Complexity: O(K) /// Space Complexity: O(K) class Solution { public: int sma...
ALGO
0.99976
4.978459
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "36...
33ce3ea9-db04-4d3a-8d77-e271ac9604ee
gvegayon/adv-prog-fall2024
match.cpp
#include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] List match_it( const NumericVector & X, const IntegerVector & group, const NumericVector & Y ) { // Identifying the ids of the groups std::vector< int > treated; std::vector< int > control; for (size_t i = 0; i < group.size(); ...
ALGO
0.982809
4.714402
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-10-15T17:42:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "0775b083476e...
0ddaded9-2b63-4a1b-a447-93a5b2c93504
bluedawnstar/algorithm_study
library/integer/primeNumberEratosthenes.cpp
#include <cmath> #include <vector> #include <string> #include <algorithm> using namespace std; #include "primeNumberEratosthenes.h" /////////// For Testing /////////////////////////////////////////////////////// #include <time.h> #include <cassert> #include <string> #include <iostream> #include "../common/iostreamh...
ALGO
0.998847
4.011686
{ "github_metadata": { "branch": "master", "commit_count": 1274, "repo_created_at": "2016-12-10T02:41:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 58, "forks": 8, "issues": 58, "pull_requests": 0 }, "file_meta": { "content_id": "ccb23...
a6d4ffc7-1614-4a36-8081-4b68f9a01914
JayantGoel001/LeetCode
0909-snakes-and-ladders/0909-snakes-and-ladders.cpp
#define pii pair<int,int> class Solution { public: int snakesAndLadders(vector<vector<int>>& board) { int n = board.size(); vector<pii> v(n * n + 1); bool forward = true; int pos = 1; for(int i = n - 1;i >= 0; i--){ for(int j = 0; j < n;j++){ ...
ALGO
0.999939
5.659711
{ "github_metadata": { "branch": "master", "commit_count": 7444, "repo_created_at": "2021-10-01T11:35:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4603f1...
f2f9deca-94bd-4fbe-b259-b9bc79adeae0
vancegroup-mirrors/sofa-framework
Sofa/framework/sofa/core/behavior/ConstraintCorrection.inl
/****************************************************************************** * SOFA, Simulation Open-Framework Architecture, version 1.0 RC 1 * * (c) 2006-2011 INRIA, USTL, UJF, CNRS, MGH * * * ...
ALGO
0.978474
7.190122
{ "github_metadata": { "branch": "master", "commit_count": 2616, "repo_created_at": "2013-03-26T20:22:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b2294de...
6c542ccb-66f1-4df2-ac0a-d40178d61c46
santosh627/Programs
SnakeAndLadderProblem/main.cpp
#include <iostream> #include <queue> using namespace std; struct queueEntry { int vertex; int distance; }; int getMinDiceThrows(int board[], int N) { struct queueEntry q; int i, vertex; queue<queueEntry> qe; bool * visited = new bool[N]; for (i =0; i<N; i++) visited[i] = false; ...
ALGO
0.999947
4.277735
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-07-09T20:42:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "168d35111...
320b1bb9-f156-4a92-b59f-fe482f4f7113
johnbodhi/project-euler
Project_Euler_Problem_125/Project Euler Problem 125/Project Euler Problem 125/Project Euler Problem 125.cpp
#include <iostream> #include <vector> #include <chrono> using namespace std::chrono; using namespace std; auto start = high_resolution_clock::now(); int main() { const int K = 10e8, W = 10; int D[W], E[W]; int M = 0, R = 0, ii = 0, jj = 0; long long int S = 0, SS = 0; for (long long int i = 1; i < K; i++...
ALGO
0.997206
4.19565
{ "github_metadata": { "branch": "main", "commit_count": 203, "repo_created_at": "2022-05-22T11:05: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": "c24b968955...
9b9b098f-cf7c-4af7-a0f3-f020792cfdcc
DEVECLOVER/LeetCodeFighting_CPP
LeetCode900---Inf/983.最低票价.cpp
/* * @lc app=leetcode.cn id=983 lang=cpp * * [983] 最低票价 */ // @lc code=start class Solution { public: int DPCore(vector<int>& days,vector<int>& costs) { int last = days.back(); vector<int> dp(last+1, 0); int idx = 0; for (int i = 1; i <= last; i++) { ...
ALGO
0.999483
5.360561
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-07-20T14:28:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30e9a31826...
86d4229b-1381-4857-90de-55930db83f5f
wsamuelsson/proj-accProg
proj/src/matrix.h
#ifndef __matrix__ #define __matrix__ #include<vector> #include<stdexcept> #include<cassert> #include<iostream> #include<cmath> #include"cblas.h" template<class Number> class Matrix{ public: //Constructors Matrix(int i, int j); Matrix(int i, int j, std::vector<Number> entries); ...
ALGO
0.910236
5.568616
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-10-17T07:02:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7ce5b052fad...
8d4e0f5d-7116-480d-b901-77e9896c0dbd
moxcodes/spectre
src/Domain/Structure/OrientationMapHelpers.cpp
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Domain/Structure/OrientationMapHelpers.hpp" #include <algorithm> #include <array> #include <numeric> #include "DataStructures/Index.hpp" #include "Domain/Structure/Direction.hpp" #include "Domain/Structure/OrientationMap.hpp" #include "D...
ALGO
0.978642
7.508916
{ "github_metadata": { "branch": "develop", "commit_count": 8541, "repo_created_at": "2018-09-07T20:39:07.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "sxs-collaboration/spectre", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { ...
8df02bca-ef59-46ea-8a82-42b921771e13
spin-scenario/spin-scenario
src/kernel/seq/serial_block.cpp
/* Copyright 2019 The Spin-Scenario Authors. 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 by applicable law or a...
ALGO
0.990748
6.468297
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2019-02-27T01:05:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 4, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "288a7ac...
7ad2f95a-4ce4-4694-9f04-42d12771e1c7
ayushigarg1405/May-Leetcoding-challenge
Day_10_Find_the_town_judge.cpp
/* Question: In a town, there are N people labelled from 1 to N. There is a rumor that one of these people is secretly the town judge. If the town judge exists, then: The town judge trusts nobody. Everybody (except for the town judge) trusts the town judge. There is exactly one person that satisfies properties 1 and...
ALGO
0.999981
5.144897
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2020-05-01T10:44: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": "71d79832a...
c0422430-2675-4ea5-ba64-58a741c84ec9
Sonaticspink/ChittapanLab6
lab6_2.cpp
#include <bits/stdc++.h> using namespace std; double deg2rad(double x){ return x*(M_PI/180); } double rad2deg(double x){ return x*(180/M_PI); } double findXComponent(double l1,double l2,double a1,double a2){ return (l1*cos(a1))+(l2*cos(a2)); } double findYComponent(double l1,double l2,double a1,double a2){...
ALGO
0.999284
4.312188
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-12-01T06:14:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7ed53bcc15...
93ccccab-e493-44da-a4eb-1faa09c5f5b5
sing-dance-rap-basketball/leetcode
zxq/cpp/61-rotate-list.cpp
/** * Description: * 61. Rotate List * Given a linked list, rotate the list to the right by k places, where k is non-negative. */ /** * Submissions: * Runtime: 4 ms, faster than 99.10% of C++ online submissions for Rotate List. * Memory Usage: 9.1 MB, less than 5.19% of C++ online submissions for Rotate List...
ALGO
0.999819
5.963215
{ "github_metadata": { "branch": "master", "commit_count": 353, "repo_created_at": "2019-06-30T09:35:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4fc26553...
51d480fa-cc15-4d64-9d8d-53a997c75c67
aman-kumar-2002/LeetCode
Q2596.cpp
/*There is a knight on an n x n chessboard. In a valid configuration, the knight starts at the top-left cell of the board and visits every cell on the board exactly once. You are given an n x n integer matrix grid consisting of distinct integers from the range [0, n * n - 1] where grid[row][col] indicates that the cel...
ALGO
0.999821
6.678735
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2025-02-10T17:18: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": "d359d5dd34f...
42e869c0-5fb0-43e9-8dbc-fcbe27153b8b
cqiyi/kaoshi
01_数据结构/exam001/test03/test03.cpp
#define MAXLEN 10 #include <stdio.h> #define FALSE 0 #define TRUE 1 #define Error printf #define QueueSize 30 typedef struct { char vexs[MAXLEN]; int edges[MAXLEN][MAXLEN]; int n,e; } MGraph; int visited[10]; void CreateMGraph(MGraph *G); void DFSTraverseM(MGraph *G); void BFSTraverseM(MGraph *G); void DFSM(MGraph ...
ALGO
0.99933
3.091499
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2013-01-02T05:00:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c40fc6dc...
3d44f9c5-07a9-48a7-9590-c7f0dad8f2bc
hhyc2/Baekjoon
1389.cpp
#include<iostream> #include<vector> #include<algorithm> #include<queue> using namespace std; int N, M; int MIN = 1e9; int MIN_NUM; bool visit[101]; struct list { int point; int cnt = 1; }; vector<int> vec[101]; queue <list> que; void reset() { for (int i = 1; i <= N; i++) visit[i] = false; } void find_route(int st...
ALGO
0.999968
3.206501
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2019-11-21T07:52:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a45b466d...
9136ecd7-1c6e-437a-bca0-44c84f9c8abc
Kagari22/MyCode
SegmentTree/P2572.cpp
#include <bits/stdc++.h> // https://www.luogu.com.cn/problem/P2572 /* 0 l r:将区间 [l, r] 内的所有数值设为 0。 1 l r:将区间 [l, r] 内的所有数值设为 1。 2 l r:将区间 [l, r] 内的所有数值取反,即将所有的 0 变成 1,所有的 1 变成 0。 3 l r:查询区间 [l, r] 内有多少个 1。 4 l r:查询区间 [l, r] 内最多有多少个连续的 1。 */ // from: cpp.json #define int long long using namespace std; const int MAXN =...
ALGO
0.999957
5.220468
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-05-08T02:47: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": "8ece753cb2b...
e894af65-2666-4b00-ab55-567c3cc61d1a
alsmd/mold
Includes/Classes/BST.hpp
#ifndef BST_HPP #define BST_HPP #include <fstream> #include <vector> #include <iostream> #include <ctime> #include <cstdlib> #include <fstream> #include <sstream> #include <SFML/System.hpp> #include <SFML/Window.hpp> #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include <SFML/Network.hpp> #include "../../.....
TOOL
0.91137
3.305635
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-05-13T12:58:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b601a470dc...
c8dac8c5-e1c7-45aa-bbe1-5dc0209a3b05
techno-gamerz/DSA-prac
ExpressionTreePostOrder.cpp
// Construct an Expression Tree from postfix and prefix expression. Perform recursive and non- recursive post-order traversals. #include <iostream> using namespace std; // Node structure for the expression tree struct Node { char data; Node* left; Node* right; }; // Stack node structure for the linked l...
ALGO
0.999946
6.974583
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-12T16:28: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": "6eb25002c7ca...
29f3e2ab-f17d-4423-8c3f-ceb668244f34
debanjan-2002/DSA-Progress
Tree/MEDIUM/Add_One_Row_To_Tree.cpp
/* Given the root of a binary tree and two integers val and depth, add a row of nodes with value val at the given depth depth. Note that the root node is at depth 1. The adding rule is: Given the integer depth, for each not null tree node cur at the depth depth - 1, create two tree nodes with value val as cur's left...
ALGO
0.999992
6.238946
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-09-20T13:18: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": "f299f058579a...
b64e1451-f13d-4876-aa6f-6061ea15306b
ourarash/cpp_tour
src/dynamic_programming/lscs_memo_main.cc
#include <iostream> #include <map> #include <string> #include <vector> #include "src/lib/utility.h" // Given an integer array nums, find the contiguous subarray (containing at // least one number) which has the largest sum and return its sum. // Example: // Input: [-2,1,-3,4,-1,2,1,-5,4], // Output: 6 // Explanation...
ALGO
0.999498
5.991454
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2020-01-22T03:00:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 55, "forks": 25, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b07cbc3...
770a3977-7d90-4783-9c4e-394807d6971d
fkrafi/UVa
10397.cpp
#include<stdio.h> #include<algorithm> #include<vector> #include<math.h> using namespace std; #define SZ 755 #define INF 999999999 typedef pair<double, double> pdd; typedef pair<int, int> pii; int nB, nC, nE; pdd bPos[SZ]; int p[SZ], rank[SZ]; vector<pii> A; struct graph{ int u, v; double c; }edges[SZ*SZ+5]; void ...
ALGO
0.999173
3.368261
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2012-12-09T07:30:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "224a944f6b...
bd9bacd4-60de-4463-891d-7d899f46f02f
tanyagupta0201/DSA
Number Theory/Large_Prime_Check.cpp
// Space Optimised Sieve using Bitset // Check if a Large number is a prime number or not ~ 10 ^ 12 // Sieve Limitation upto - 10 ^ 7 #include <iostream> #include <vector> #include <bitset> using namespace std; const int n = 10000000; bitset<10000005> b; vector<int> primes; void Sieve() { // Set all bits b.s...
ALGO
0.999424
4.714531
{ "github_metadata": { "branch": "main", "commit_count": 266, "repo_created_at": "2021-06-19T06:34:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 11, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "9de12206...
d2a74cfd-efaa-48e6-9c66-f388f42f14b3
CarlStevenson/schoolwork
cs328/projects/assign1.cpp
// assign1.cpp // <NAME> // 8/7/14 // Divide and Conquer // Assignment 1 // Problem being solved: // This program divides a list of numbers into two sublists of size n/2 where // the difference of the sums of the two lists are maximized. #include <iostream> #include <cassert> using namespace std; void kpartition(in...
ALGO
0.998307
4.705971
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-07-08T21:24:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9483ab3fd...
ab1feeff-bfd7-4332-8ad8-64e6a4b0cd9e
Miikuli/code_review3
2/calctree.h
/* В текстовом файле с именем filename дано арифметическое выражение в префиксной форме. Операндами в выражении являются целые числа из промежутка от 0 до 9. Используемые операции: сложение(+), вычитание(-), умножение(*), деление нацело(/), целочисленный остаток от деления(%) и возведение в степень(^). Постройте дерево...
ALGO
0.997003
5.218047
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2025-04-24T16:03: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": "a1ac7f3ded4...
501e2bf7-1b3b-463b-8128-e73c614176bc
kavya-naik-21/code-library
dp/basic_dp.cpp
#include<bits/stdc++.h> using namespace std; #define fastIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define int long long int #define fi first #define se second #define pub push_back #define pi pair<int,int> #define all(v) (v).begin(), (v).end() #define rep(i, l, r) for(int i=(int)(l);i<(int)(r);...
ALGO
0.999926
4.433753
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-04-06T17:48:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71a09dd8496d...
1ad5072f-6d68-477e-a4db-320a39d5f8fe
mitali-12-3/Programs-Arrays
sort0s&1s.cpp
#include<iostream> #include<algorithm> using namespace std; void printing(int arr[],int n){ for(int i=0;i<n;i++){ cout<<i<<"-->"<< arr[i]<<" "<<endl; } } void sort1and0M1(int arr[],int n){ //Counting process int zeroCount=0, oneCount=0; for(int i=0;i<n;i++){ if(arr[i]==0) ...
ALGO
0.99982
4.097478
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-10-19T07:04: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": "ac85a793a0d...
177bd63c-87b3-4f75-8cf6-0a681e0a79f0
Rickard90/AoC23
day16/day16.cc
#include <iostream> #include <vector> #include <queue> #include <string> #include <algorithm> enum direction { north, east, south, west }; struct Tile { char c {}; bool energized {}; std::vector<direction> dir {}; }; struct Pos { size_t x {}; size_t y {}; }; int sim_beams(std::vector<std::...
ALGO
0.999907
5.161537
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2023-12-01T08:22: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": "8a961493454...
d628e242-9041-42ff-ab04-5db3af4375d5
shuaijiang/FFT
fft.h
#include<iostream> #include<math.h> #define PI 3.145 using namespace std; class FFT{ public: FFT(); FFT(int _n); void make_window(); void dofft(double *x, double *y); void printRealImaginary(double *x, double *y); private: int n,m; double *cos_w; double *sin_w; double *window; }; FF...
ALGO
0.999486
3.812032
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-05-20T12:40: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": "746602bdc...
4a54f87c-ab61-4cc2-abe4-b3e8d3aee454
confitarlaburra/gromos_plus_plus
programs/eds_update_1.cc
/** * @file eds_update_1.cc * calculates the parameters s and EiR iteratively for multiple EDS states */ /** * @page programs Program Documentation * * @anchor eds_update_1 * @section eds_update_1 calculates the parameters s and EiR iteratively for multiple EDS states * @author @ref sr * @date 27. 01. 10 * ...
ALGO
0.998887
3.728971
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-09-07T18:16:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3265bdeee7...
1bf39d4e-6446-4fa8-9070-4ce40357a77d
kkorona/BOJ_Rche
1197_20170824/main.cpp
#include <cstdio> #include <vector> #include <algorithm> using namespace std; class Edge { public : int dep,dest,cost; Edge () {} Edge(int pu,int pv,int pcost) { dep=pu; dest=pv; cost=pcost; } bool operator ==(const Edge &E) const { if(cost == E.cost...
ALGO
0.999941
4.453986
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2017-04-04T02:16: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": "c284d4506...
18bad9e9-a03b-4de2-a780-02347a0df0e5
gsanta/cpp-stuff
src/problems/animal_transport.cpp
#include "animal_transport.h" unsigned int maxAggregate(unsigned int leftVal, unsigned int rightVal) { return leftVal > rightVal ? leftVal : rightVal; } AnimalTransport::AnimalTransport(int zooNum, int animalsToTransport, std::vector<char> animal, std::vector<int> source, std::vector<int> dest): m_ZooCount(zooNum...
ALGO
0.999315
5.42404
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-12-19T13:45: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": "d78519a10d...
2ea14d97-c46d-4ef1-bab7-a9c04f74140b
Ayushi-Kosta/Leetcode-Questions
1631-path-with-minimum-effort/1631-path-with-minimum-effort.cpp
class Solution { vector<vector<int>> dirs = { {-1,0}, {0,-1}, {0,1}, {1, 0} }; public: int minimumEffortPath(vector<vector<int>>& heights) { using pipii = pair<int,pair<int,int>>; priority_queue<pipii, vector<pipii>, greater<pipii>> pq; ...
ALGO
0.999985
6.039578
{ "github_metadata": { "branch": "main", "commit_count": 1205, "repo_created_at": "2021-12-30T15:20:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd1bb1bca...
10e4ed28-813e-4dfd-9589-a5feb50d04bf
KrSahil/Projects
DSA Level Up Prateek Narang/Dynamic Programming (2D)/CountingSubsequences.cpp
#include<iostream> using namespace std; //Top Down int countSub(string a,string b,int m,int n){ //base case //if all the letter have been mathced or all the letters have been finished //Or 2nd case all the string of B has mathced with A if((m==-1 && n==-1) || n==-1){ return 1; } if(m==...
ALGO
0.999963
4.575068
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-01-10T15:23: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": "6a61bf63ebd...
e6a1891e-7a5d-44fd-8195-e5440cc3e9f9
ThunderSmotch/ThunderLib
Games/src/Fractal/Fractal.cppm
module; #include "glm/glm.hpp" export module Game.Fractal; import std; import ThunderEngine.Base; import ThunderEngine.Shader; import ThunderEngine.App; import ThunderEngine.VertexArray; import ThunderEngine.KeyInput; import ThunderEngine.RendererAPI; import ThunderEngine.KeyCode; ThunderEngine::Ref<ThunderEngine::V...
TOOL
0.943257
5.46622
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2022-12-22T23:15: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": "73a815ae1...
a83163d4-ce67-46e0-87eb-1b7c8d6a4b62
micmacIGN/micmac
src/operator/func_opbinmix_tpl.cpp
/*Header-MicMac-eLiSe-25/06/2007 MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation eLiSe : ELements of an Image Software Environnement www.micmac.ign.fr Copyright : Institut Geographique National Author : <NAME> Contributors : <NAME>, <NAME>. [1] <NAME>, <NAM...
ALGO
0.965721
4.522648
{ "github_metadata": { "branch": "master", "commit_count": 10879, "repo_created_at": "2016-11-24T22:09:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 785, "forks": 163, "issues": 83, "pull_requests": 30 }, "file_meta": { "content_id": "2...
29b07008-915c-4823-a19a-1d8240f24a1e
changing-the-world/feihao_leetcode_playground
leetcode850.h
// // Created by Feihao on 2019/3/28. // leet code 850 题,给定一些边水平于x,y坐标轴的矩形的坐标,求这些覆盖的面积,耗时击败66% 选手,内存占用击败100%选手, 有优化空间。 // #ifndef CPPS_LEETCODE850_H #define CPPS_LEETCODE850_H bool cmp1(pair<int,int>a,pair<int,int>b) { return a.first < b.first; } class Solution { public: int rectangleArea(vector<vector<int>>...
ALGO
0.999892
5.948472
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-03-28T14:33:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a3218493b3...
a3b8e315-561b-48ba-ba25-e68855cb72ec
shishir94/CompetitveProgramming
codechef/maximumsubarrayII.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); long long n, a, b; cin >> n >> a >> b; vector<long long> pre(n + 1, 0); for (int i = 1; i <= n; i++) { cin >> pre[i]; pre[i] += pre[i - 1]; } multiset<long...
ALGO
0.999922
3.781765
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2022-12-19T10:33: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": "64100744e7...
1d49afc2-b806-45a7-b359-4d63a72b6d1c
NelleV/ROVAR
TP1/src/vlfeat/sift/vl_sift.cpp
/** ** @author <NAME> ** @author <NAME> (Python wrapping) ** @brief Scale Invariant Feature Transform (SIFT) - Python wrapper **/ #include "../py_vlfeat.h" extern "C" { #include <vl/mathop.h> #include <vl/sift.h> } #include <math.h> #include <assert.h> #include <iostream> /** ---------------------------...
TOOL
0.934275
6.115142
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2011-10-06T05:18:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56f13b723...
c1645aa2-04d1-4bef-9dae-43f90c9e1728
acidentally/cplusplus
Linh tinh/dsu_experience_CF.cpp
/*Good luck for those who are trying your best May the most glorious victory come*/ #include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define vi vector<int> #define vvi vector< vector<int> > #define endl '\n' //https://codeforces.com/edu/course/2/lesson/7/1/pract...
ALGO
0.999816
4.651597
{ "github_metadata": { "branch": "Main-Suffer", "commit_count": 95, "repo_created_at": "2023-08-03T12:29:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4a1...
3f678a4f-4b0e-4822-ac4c-8274a7ec75ae
JamesMolson/MERLIN
Merlin/RingDynamics/LatticeFunctions.cpp
///////////////////////////////////////////////////////////////////////// // // Merlin C++ Class Library for Charged Particle Accelerator Simulations // // Class library version 3 (2004) // // Copyright: see Merlin/copyright.txt // // Last CVS revision: // $Date: 2006/08/17 08:21:59 $ // $Revision: 1.7 $ // ///////////...
ALGO
0.997613
4.907027
{ "github_metadata": { "branch": "master", "commit_count": 512, "repo_created_at": "2015-12-01T13:32:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c176715d...
352181b8-3235-428f-bb90-77e7eed7c60a
yeonheey/algorithms
baekjoon/gold/baekjoon_11062.cpp
#include <memory.h> #include <algorithm> #include <iostream> using namespace std; const int SIZE = 1001; int T, N; int cards[SIZE]; int dp[SIZE][SIZE][2]; //left index, right index, turn void input() { memset(dp, -1, sizeof(dp)); cin >> N; for(int i = 0; i < N; i++) cin >> cards[i]; } int chec...
ALGO
0.999945
4.420979
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2021-04-05T05:29: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": "cf05d11434...
3d284fba-9cc4-4037-a409-5963ceafa9f7
MrWen33/tablet-VS-Projects
RBTree/main.cpp
#include <iostream> #include<cstdio> using namespace std; struct RBNode; typedef RBNode* RBTree; struct RBNode { bool color;//True represent red,False represent black RBTree L,R,P; int val; RBNode():color(true),L(NULL),R(NULL),P(NULL),val(0){} }; void printTree(RBTree T) { if(T==NULL)return; pr...
ALGO
0.999968
4.239256
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-11-17T07:08: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": "a0f226908a...
cfddd02c-0756-4a41-a6e8-230d503b6a6d
RodrigoPombo1/Programacao-Pratico
P06 20_03 Strings, vectors, template functions/string-split.cpp
#include "print_string.h" void split(const string& s, vector<string>& v) { long unsigned int pos = 0; while (true) { long unsigned int pos_of_next_space = s.find(' ', pos); // se já não houver mais nenhum espaço a seguir a isto if (pos_of_next_space == string::npos) { // se ...
TOOL
0.981245
3.617916
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2023-02-11T19:48: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": "766be2a3654...
b586aaa8-32a7-4aa8-86df-cfd68dc61495
fiemcasals/languages
temas/paradigmasProgramacion/cPlusPlus/logico.c++
/*Paradigma Lógico en C++ Aunque C++ no es un lenguaje lógico como Prolog, se aplican ciertos enfoques lógicos utilizando estructuras como la programación declarativa con condiciones y reglas. Sin embargo, no es tan natural como en un lenguaje como Prolog. C++ no está orientado a la lógica programación de forma explíc...
ALGO
0.991966
4.472519
{ "github_metadata": { "branch": "insertarOrdenado", "commit_count": 19, "repo_created_at": "2025-03-30T14:38:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": ...
a4bd871b-6b7e-413f-80e4-02ff8a160a37
Grant6899/LeetCode
Problem207_CourseSchedule/test.cpp
/************************************************************************* > File Name: test.cpp > Author: <NAME> > Mail: <EMAIL> > Created Time: Thu Dec 28 19:04:14 2017 ************************************************************************/ #include<iostream> #include<vector> #include<unordered_set> using nam...
ALGO
0.99848
5.860698
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2017-08-24T03:48: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": "af05f21f...
4440117e-669d-484b-9799-fb2a045734cb
cloudayc/leetcode
LTcode/LTcode/Count_and_Say.cpp
// // Count_and_Say.cpp // LTcode // // Created by wyq on 14/11/25. // Copyright (c) 2014年 cloudayc. All rights reserved. // /* Description: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" o...
ALGO
0.999612
4.923491
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2014-11-24T10:49:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "936d3a7c6...
760b16d8-1c36-4e51-9251-349f85078039
rakib54/Algorithm-and-problem-solving
Linked_list/Remove Nth Node From End of List.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long 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 *removeNthFromEnd(List...
ALGO
0.999979
5.460396
{ "github_metadata": { "branch": "main", "commit_count": 571, "repo_created_at": "2022-12-29T18:48: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": "6804937a79...
a03c9eb3-de5d-4927-8060-aef4994ccec3
DPChanny/ps
Baekjoon/11438.cpp
#include<iostream> #include<vector> constexpr int MAX_ST(20); using namespace std; int n, m, ba, bb, st[MAX_ST][100'000], ds[100'000]; vector<int> es[100'000]; void gst(const int& _n, const int& _p, const int& _d) { ds[_n] = _d; st[0][_n] = _p; for (int _e(0); _e < es[_n].size(); _e++) if (st[0][_n] != es[_n][_...
ALGO
0.999992
5.069226
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-04-26T17:33: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": "5c5c6ae53a...
47eaa60b-978c-45ad-af6e-6ed4c99bc8ea
Awei2468/DataStructure-Algorithm
codeforces/918_B.cpp
#include<bits/stdc++.h> #include<iostream> using namespace std; typedef unsigned long long ULL; typedef pair<int,char> pr; void solve() { char tbl[3][3]; for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { cin>>tbl[i][j]; } } bool e[3] = {false}; for (int i = 0...
ALGO
0.99997
3.733535
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2023-02-08T17:43: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": "6eb3bfef9...
9c5f28ed-04ef-418b-9dfd-69c0ab31dc84
stolidpig/repos
Adder/Source.cpp
#include "../../std_lib_facilities.h" int main() { cout << "How many values do you want to sum?\n"; int n = 0; if (!(cin >> n)) { cout << "invalid input for n!\n"; } vector<double> values = {}; vector<double> differences = {}; cout << "Please enter some integers with a `|` to stop.\n"; for (double vtemp = ...
ALGO
0.989522
4.639976
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2021-04-25T19:19: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": "855d566fd...
0b7627e8-1977-4c43-9fc6-6d5431946499
WesleyLaura/LISTA-DOBLEMENTE-ENLAZADA
LSITAS DOBLEMENTE ENLAZADAS.cpp
#include <iostream> using namespace std; struct Nodo{ int info; Nodo *sig; Nodo *ant; }; void recorreDesdeInicio(Nodo *p){ Nodo *q=p; cout<<"\nRECORRIDO DE INICIO A FIN: \n"; while(q!=NULL){ cout<<q->info<< " "; q=q->sig; } cout<<endl; } void recorreDesdeFinal(Nodo *f){ Nodo *q=f; cout<<"\nRECORRIDO...
ALGO
0.999646
4.413641
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-05-15T07:04: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": "dc608f4f67ea...
7a6d5860-60d3-42a0-a05f-bbb09317668d
thecodingwizard/competitive-programming
alphastar/alphastar-turing-2021/museum.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define ii pair<int, int> #define f first #define s second #define pb push_back #define mp make_pair #define all(x) x.begin(), x.end() #define F0R(i, n) for (int i = 0; i < n; i++) #define FOR(i, a, b) for (int i = a; i < b; i++) #define inf 10000000...
ALGO
0.999994
4.517393
{ "github_metadata": { "branch": "master", "commit_count": 946, "repo_created_at": "2018-11-29T17:03:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 83, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b5579...
47f600c2-8480-4ae0-9f23-4b4820ea6ed2
a-s-tarantoga/DelDec
subspan.cpp
/* * (c) 30.07.2014 <NAME> * * This file is part of DelDec. * * DelDec is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version...
ALGO
0.964482
6.079916
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-07-31T09:29: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": "0ce9969a65...
d5f45633-2ce0-4238-af09-85ceb540cbcc
sourav-bhattacharya-github/DSA
DSA/GFG/Matrix/Rotate_Square_Matrix_by_90_Degrees_Counterclockwise.cpp
// Link: https://www.geeksforgeeks.org/rotate-square-matrix-by-90-degrees-counterclockwise/ // C++ Program to rotate a square matrix by 90 degrees counterclockwise #include <iostream> #include <vector> #include <algorithm> using namespace std; void rotateMatrix(vector<vector<int>> &mat){ int n = mat.size(); ...
ALGO
0.999922
6.350117
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2024-09-15T16:50:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d07c623d66...
5f8e2ddb-555e-49cf-9ed0-8ed33bddf9b6
Ape-God/LeeCode
minSubArrayLen.cpp
#include <vector> #include <iostream> #include <algorithm> class Solution { public: int minSubArrayLen(int s, std::vector<int>& nums) { int n = nums.size(); int minLen = n + 1; // 初始化最小长度为一个大于数组长度的值 int left = 0; int sum = 0; for (int right = 0; right < n; ++right) { ...
ALGO
0.999895
5.942374
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-07-02T02:43: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": "166a305f2f...
d7b74254-a0a5-4a9a-bc37-7caa6033ba2e
BITcsy/path_smooth
qp_smooth.cpp
#include <iostream> #include "matplotlibcpp.h" #include "qp_smooth.h" #include "scenarios.h" #define PI 3.1415926 namespace plt = matplotlibcpp; using namespace std; void QpSmooth::SetMatSize(unit knotNum, unit segNum) { knotNum_ = knotNum; segNum_ = segNum; // 5th polynominal between knots numOfVar_...
ALGO
0.999453
4.676744
{ "github_metadata": { "branch": "dev", "commit_count": 12, "repo_created_at": "2022-02-05T13:00:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a28a3e77de1e...
0720af29-8ee1-47a7-90e1-8ab107606269
yuxng/3DVP
3rd_party/vrippack-0.31/src/march/slices.cc
/* Name: slices.cc Coded: <NAME> Modified by: <NAME> Computer Graphics Laboratory Stanford University Comment: Processes all selected slices. Copyright (1997) The Board of Trustees of the Leland Stanford Junior University. Except for commercial resale, lease, licens...
ALGO
0.94707
3.8964
{ "github_metadata": { "branch": "master", "commit_count": 358, "repo_created_at": "2014-06-03T01:18:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 17, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "c13c93...
e7b3c407-3c7b-4b60-ad89-9ff5f2785b5d
sushanth870/Solved_problems
trees/BSTToDLL.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int data; node *left; node *right; node() { data = 0; left = NULL; right = NULL; } node(int dt) { data = dt; left = NULL; right = NULL; } node *insert(node *nd, in...
ALGO
0.999995
4.508976
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-08-31T13:58: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": "d68e80343102...
a58865cc-177d-4a1c-a7e6-3bde20b334ce
PSxUchiha/code
theedeck.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vll vector<long long> #define pb push_back #define mp make_pair #define fi first #define se second #define all(x) x.begin(), x.end() #define rep(i, a, b) for(int i = a; i < b; i++) void solve() { int a,b,c; cin >> a >>...
ALGO
0.999891
5.05897
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-07-14T19:10: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": "cf00ce159c3f...
eb025fb7-7c87-4769-87ba-050ca3cb50fd
wesinalves/CPE
codigos/07-String/buscastr.cpp
//Procura um elemento em uma cadeia de caracteres - busca linear. #include <iostream> #include <string> using namespace std; int main() { string str; char c; int i; bool achou = false; cout << "Digite uma cadeia de caracteres: "; cin >> str; cout << "Digite um caractere: "; cin >> c; //laco de busc...
ALGO
0.993991
4.613012
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2024-03-04T15:23:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 13, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "cc09b359d...
7891b268-6832-41cb-b9d3-e5b4c5dfcbe2
Pranay36/leetcode-problems
Partitions with Given Difference - GFG/partitions-with-given-difference.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { int mod =(int)1e9+7; public: int f(vector<int>&arr,int i,int sum, vector<vector<int>>&dp){ if(i==0){ if(sum==0&&arr[0]==0){ return 2; } else if(sum==0 || arr...
ALGO
0.999818
5.923959
{ "github_metadata": { "branch": "main", "commit_count": 1408, "repo_created_at": "2023-01-11T07:28:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a90dc9ae3...
634f206c-4202-4d72-b5ad-f71824516d24
SOFTK2765/PS
BOJ/3878.cpp
#include <bits/stdc++.h> using namespace std; class Point { public: long long x, y, rx = 1, ry = 0; bool operator <(const Point &p1) const { if(rx*p1.ry != p1.rx*ry) return p1.rx*ry<rx*p1.ry; if(y!=p1.y) return y<p1.y; return x<p1.x; } bool operator >(const Point &p1) const...
ALGO
0.999983
3.818155
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2018-10-11T01:19:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d9b55268...
421dff72-c4e0-458b-8030-b776883e56b2
ishandutta2007/codeforces-m
mnaeraxr/normal/512/B.cpp
#include <iostream> #include <cmath> #include <vector> #include <set> #include <map> #include <algorithm> #include <queue> #include <cstring> #include <string.h> #include <cstdio> #define wait system("pause") #define MP make_pair using namespace std; const int MAXN = (int)1e5 + 10; typedef long long int64; typedef ...
ALGO
0.999932
3.265478
{ "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": "1776f883fe76...
229aac3f-36cc-438a-affa-95542c9d6e17
seed93/reconstruction
include/armadillo/armadillo_bits/spop_max_meat.hpp
// Copyright (C) 2012 <NAME> // Copyright (C) 2012 <NAME> // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup spop_max //! @{ template<typename T...
ALGO
0.998032
6.714252
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2014-11-14T06:55:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 25, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "22f908f...
fa170e4d-ed98-4b07-a406-a26b94a2ff2b
Allure-lover/C-study
chapter9.cpp
#include<iostream> #include<cmath> #include<cstring> using namespace std; /* 模板和异常处理:用于表达相同逻辑结构,但具体数据元素类型不同的数据对象通用行为 函数模板:格式:template <typename T> template<typename T1, typename T2> void fun(T a){} typename = class void fun(T1 a, T2 b){} 调用:函数名(实参列表) ...
TOOL
0.987806
3.255851
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2023-10-08T14:03:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3fdf4f9e...
fe095654-4a06-4e96-bcdc-6a4caabd5c57
AbdeltwabMF/oj-solutions
CodeForces/d.zero-quantity-maximization.cpp
// https://codeforces.com/contest/1133/problem/D #pragma GCC optimize ("Ofast") #include <bits/stdc++.h> #define endl '\n' using namespace std; typedef int64_t ll; typedef __int128 i128; void Fast() { cin.sync_with_stdio(0); cin.tie(0);cout.tie(0); } void File() { freopen("input.in", "r", ...
ALGO
0.99997
3.94022
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-09-27T02:41: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": "216a913e159...
f80ab1d3-976a-45c3-b45e-b1bbbfb3635c
philomath2723/XPSC_PS
Wk 07/Day 2/C_Paprika_and_Permutation.cpp
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> using namespace std; void solve() { ll n; cin >> n; ll a[n], ops = 0; map<ll, ll> mp; for (ll i = 0; i < n; i++) { cin >> a[i]; if (a[i] <= n) mp[a[i]]++; } sort(a, a + n); vector<ll...
ALGO
0.999658
3.775845
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2024-03-16T21:29: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": "865ec6d1400...
ce6414e0-b99d-4549-ba88-a567f94b831e
Hongyan0627/Interview_questions
BinarySearchTree.cpp
#include <iostream> using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int v):val(v), left(NULL), right(NULL) {} }; class Solution { public: TreeNode* buildTree(vector<int>& nums) { if(nums.empty()) return NULL; TreeNode* root = new TreeNode(nums[0]); for(int i = 1;...
ALGO
0.999998
5.501856
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-11-29T21:24:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8836edc11...
eaae95f0-afe7-47e8-b0a6-295e2145f90f
jrintala/fmi-data
himan-lib/source/lambert_conformal_grid.cpp
#include "lambert_conformal_grid.h" #include "info.h" #include <ogr_spatialref.h> using namespace himan; using namespace std; #ifdef HAVE_CUDA #include "simple_packed.h" // The following two functions are used for convenience in GPU specific code: // in grid rotation we need the standard parallels and orientation, b...
TOOL
0.949024
6.957446
{ "github_metadata": { "branch": "master", "commit_count": 3264, "repo_created_at": "2017-09-01T10:36:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e91dfd...
5977a9bf-ce72-471b-9d61-818f207dde4b
ishandutta2007/codeforces-j
jovanb/normal/1530/B.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; int res[50][50]; int di[] = {-1, -1, -1, 0, 0, 0, 1, 1, 1}; int dj[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1}; void solve(){ int n, m; cin >> n >> m; for(int i=0; i<=n+2; i++){ for(int j=0; j<=m+2; j++){ ...
ALGO
0.99952
4.125288
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:42:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c53c7ddaccbe...
3dd25583-67e4-4f74-8b42-0423ab0f5003
NewYaroslav/xtechnical_analysis
include/xtechnical_regression_analysis.hpp
#ifndef XTECHNICAL_REGRESSION_ANALYSIS_HPP_INCLUDED #define XTECHNICAL_REGRESSION_ANALYSIS_HPP_INCLUDED namespace xtechnical_regression_analysis { enum LeastSquaresMethodType { LSM_LINE = 0, /**< Y = A1*X + A0 */ LSM_PARABOLA = 1, /**< Y = A2*X^2 + A1*X + A0 */ }; ...
ALGO
0.993524
5.974719
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2019-09-01T21:53:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 12, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "aeef082...
b8e083a5-9353-4e96-bc21-94e8fc9ca0ca
thefed/cpp
splitStr2.cpp
// G, phone // split string by spaces, if string contains double quotes, treat the content inside as one word // "this is an \"example string\" test" #include <iostream> #include <string> #include <vector> #include <cassert> using namespace std; vector<string> split(string &s) { vector<string> res; if (s.empty...
TOOL
0.911156
4.521131
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-06-06T07:27: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": "26d2f86524...
4b4f2437-9454-4704-a370-42c33e66e3dd
min99819/boj
백준/Gold/7662. 이중 우선순위 큐/이중 우선순위 큐.cc
#include <iostream> #include <string> #include <queue> #include <map> using namespace std; int main() { cin.tie(NULL); ios::sync_with_stdio(false); int t; cin >> t; for (int i = 0; i < t; i++) { int k; cin >> k; int cnt = 0; bool flag = true; priority_queue<int> pq_max; priority_queue<int, vector<int>,...
ALGO
0.999791
4.045568
{ "github_metadata": { "branch": "main", "commit_count": 211, "repo_created_at": "2022-11-14T13:28:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc5ffe2008...
eff9aa97-7da6-4ca1-92cc-a471555b4352
Drenmax7/Advent-of-code-2024
Advent of code 2024/j1.cpp
#include "j1.hpp" void Jour1::solution(vector<string>& reponse) { cout << "Jour 1 :" << endl; auto start1 = chrono::high_resolution_clock::now(); string result1 = part1(); auto end1 = chrono::high_resolution_clock::now(); auto duration1 = chrono::duration_cast<chrono::milliseconds>(end1 - start1).count(); ...
ALGO
0.999787
4.315521
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2024-12-21T22:25: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": "25143c9ba...
01c92183-d11e-4c40-969e-8da1a79f0aed
rishirv/competitive-programming
USACO Training/4/4.2/stall4.cpp
/* ID: verma.r1 PROG: stall4 LANG: C++11 */ #include <fstream> #include <algorithm> #include <cstring> using namespace std; const int infinity=2147483647; int main(){ ifstream cin ("stall4.in"); ofstream cout ("stall4.out"); int n, m, x, y, maxflow, maxloc, pathcapacity=0, totalflow=0, curnode, nextnode; cin>...
ALGO
0.999745
3.686963
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-03-23T19:58: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": "9f4a7aeb59...
e485f63f-0ec3-4f56-8d56-e3f0a4e481bb
bdcbqa314159/leetCodeWork
0958-check-completeness-of-a-binary-tree/0958-check-completeness-of-a-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.994045
6.230882
{ "github_metadata": { "branch": "main", "commit_count": 6654, "repo_created_at": "2022-01-11T13:37:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08f83f280...
a4cacebc-be83-45ce-a9a9-21fd3eaa6e46
Caturra000/myICPCSolution
HYSBZ/1176/15012296_AC_5184ms_128244kB.cpp
#include<bits/stdc++.h> #define rep(i,j,k) for(int i=j;i<=k;i++) #define rrep(i,j,k) for(int i=j;i>=k;i--) #define erep(i,u) for(int i=head[u];~i;i=nxt[i]) #define print(a) printf("%lld",(ll)(a)) #define printbk(a) printf("%lld ",(ll)(a)) #define println(a) printf("%lld\n",(ll)(a)) using namespace std; const int MAXN =...
ALGO
0.999833
3.536651
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-03-03T13:41:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61d580ae20...
d3721a23-46ff-4915-b735-107a944e159c
narang-madhur/CPP
12th/c++ file MADHUR 12/remaining/39.cpp
//PROGRAM FOR IMPLEMENTATION OF BINARY DATA FILE //WRITE,READ,SEARCh,SORT,DELETE,ADD(EVEN IN SORTED MANNER) //AND EDIT RECORDS #include<stdio.h> #include<fstream.h> #include<stdio.h> int bon=0; class student { int roll; char name[25]; char dob[10]; float per; public: void in() { cout<<"ENTER ROLL NUMBER\t"; cin>>roll; ...
TOOL
0.989215
3.222046
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2021-10-22T14:57: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": "cd6bbed1...
921b1bfe-cfbf-42cf-b109-650e73c764f8
biancama/hackerRank_CPlus
algorithms/implementation/extraLongFactorial/src/main.cpp
// // Created by <NAME> on 23/09/16. // #include <iostream> #include <vector> #include <string> using namespace std; string long_fact(int n); void extra_long_factorial_solution() { int n; cin >> n; string result = long_fact(n); cout << result; } string long_fact(int n) { vector<int> decimal_repre...
ALGO
0.999971
5.501711
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2016-09-23T15:30: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": "bcccea452...
3d7eff0a-3d80-4c4b-b4b5-b5eca760d7b2
GHeier/FFirefly
src/hamiltonian/band_structure.cpp
#include <fstream> #include <math.h> #include "../config/load/c_config.h" #include "../config/load/cpp_config.hpp" #include "../objects/surfaces.hpp" #include "../objects/vec.hpp" #include "band_structure.hpp" using namespace std; // Energy band functions float epsilon(int n, Vec k) { n--; if (n < 0) { ...
ALGO
0.914279
3.556351
{ "github_metadata": { "branch": "main", "commit_count": 309, "repo_created_at": "2023-10-03T23:10: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": "2508580892...
ce61f52f-a218-4ecb-ba97-cd491c4c5a42
madhavnagpal/data_structures_algos_cp
Array/socialDistancing.cpp
// I am Nothing , You Are Nothing // <NAME> #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 int n, c; bool check(set<int> &s, int first, int k) { int curr = first; for (int i = 1; i < c; i++ ...
ALGO
0.999967
3.734038
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2020-06-24T07:22: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": "4ccde8a7a...
095bf3c3-b250-4ead-9edf-8ebf4054f519
francis-maes/lbcpp
projects/MOO/HoeffdingTreeLearner.cpp
//============================================================================ // Name : HoeffdingTreeLearner.cpp // Author : <NAME> // Description : //============================================================================ #include <iostream> #include "precompiled.h" #include "HoeffdingTreeLearner.h...
ALGO
0.987707
5.203428
{ "github_metadata": { "branch": "master", "commit_count": 3495, "repo_created_at": "2015-03-21T09:43:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea94050...
859d3a43-c0a3-4f37-a133-1a3c0458f38c
hansususu/boj_algorithm
10026.cpp
#include <iostream> using namespace std; int n; string map[101]; int visit[101][101]; int dy[] = {1, -1, 0, 0}; int dx[] = {0, 0, 1, -1}; void dfs(int x, int y) { for (int i = 0; i < 4; i++) { int nx = x + dx[i]; int ny = y + dy[i]; if (nx < 0 || nx >= n || ny < 0 || ny >= n) continue; ...
ALGO
0.999694
3.575525
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-04T16:00: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": "60a8ce50b5f0...
f58b6538-dda9-4fd6-a58b-7f16de75bd04
hopark123/algorithm
4.program/dfs/old)경주로건설.cpp
#include <string> #include <vector> #include <iostream> #include <stack> #include <algorithm> #include <math.h> #include <queue> #include <set> using namespace std; int res; int N; int dy[4] = {1, -1, 0, 0}; int dx[4] = {0, 0, 1, -1}; vector<vector<int> > visited1; vector<vector<int> > visited2; bool ft_wall(vector<...
ALGO
0.998585
3.947814
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-01-15T04:54:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "264aba6f59...
ff43e83d-084b-4fed-af75-bf388bc451a5
joaoamorim99/Graphic_Computing
CG_G31__4_Fase/engine/Curvas.cpp
#include "Curvas.h" #include <vector> #include <iostream> float catmullMatrix[4][4] = { { -0.5f, 1.5f, -1.5f, 0.5f }, { 1.0f, -2.5f, 2.0f, -0.5f }, { -0.5f, 0.0f, 0.5f, 0.0f }, { 0.0f, 1.0f, 0.0f, 0.0f } }; float bezierMatrix[4][4] = { { -1.0f, 3.0f, -3.0f, 1.0f }, { 3.0f, ...
ALGO
0.972082
4.494704
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-07-23T22:23: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": "189b617097bf...
e13c6799-09df-4820-acf1-377e448a8758
rt1301/interview_prep
DP/longest_palindromic_subseq.cpp
/**** * Given a sequence, find the length of the longest palindromic subsequence in it. ****/ #include<bits/stdc++.h> using namespace std; int lcs(string x, string y, int m, int n){ int dp[m+1][n+1]; for(int i=0;i<=m;i++){ for(int j=0;j<=n;j++){ if(i==0 || j==0){ dp[i][j] =...
ALGO
0.999991
4.661339
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2021-05-21T15:11:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d88d546fac...
12004d39-b319-4cb6-9203-e152e7291df3
asar689/dsal
trees_final.cpp
#include <iostream> #include <queue> #include <stack> using namespace std; // Node class for Binary Tree & BST class Node { public: int data; Node* left; Node* right; Node(int d) { this->data = d; this->left = nullptr; this->right = nullptr; } }; // **********************...
ALGO
0.999925
5.358475
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-20T17: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": "b7a63a7bdd96...
81e4f826-6b8d-411c-a4c4-01ef3128d52f
Strork/CathanCode
Template/tarjan割点.cpp
#include<bits/stdc++.h> #define ll long long using std::endl; using std::cout; struct qaq { int y, nt; }e[1000100]; int lin[20100]; int len = 0; int low[20100]; int dfn[20100]; int n; int tail = 0; int tim = 0; int ans[20100]; inline void insert(int x, int y) { e[++len].nt = lin[x]; lin[x] = len; e[le...
ALGO
0.999977
3.949198
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-03-26T10:23: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": "c2040b2d50c...
626e74a4-e8e3-41f2-81d1-f1fea10d34e7
WireCell/wire-cell-toolkit
patrec/inc/WireCellPatRec/paal/data_structures/metric/basic_metrics.hpp
//======================================================================= // Copyright (c) 2013 <NAME> // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //========================================================...
TOOL
0.963142
6.489045
{ "github_metadata": { "branch": "master", "commit_count": 3515, "repo_created_at": "2019-08-23T18:59:20.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "brettviren/wire-cell-toolkit", "stars": 9, "forks": 24, "issues": 118, "pull_requests": 4 }, "file_meta": {...
47397f2f-2be7-4216-b191-c54cd47b9cda
freshmea/ubntplusC
study30/rationalNumber/main.cpp
#include <iostream> #include "rationN.h" int main() { RationN r1(2, 3); // (0.0, 0.0i) RationN r2 = 3; // 7번 라인과 같음. RationN r3(3, 4); // (3/4) RationN r4(r1); r4 = r2; if(r1 == r4){ std::cout << " r1 and r4 are equal." << std::endl; } else { std::cout << "r1 and r4 are not equal." << std::endl; } ...
ALGO
0.974347
4.444661
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2022-07-06T06:12:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e04894a...
736d0e0a-4dcb-444b-a1d7-13f32517e0c6
OpenWaterAnalytics/epanet-dev
src/Elements/pumpcurve.cpp
/* EPANET 3 * * Copyright (c) 2016 Open Water Analytics * Licensed under the terms of the MIT License (see the LICENSE file for details). * */ #include "pumpcurve.h" #include "curve.h" #include "Core/network.h" #include "Core/error.h" #include <cmath> #include <algorithm> using namespace std; //----------------...
ALGO
0.941577
5.60586
{ "github_metadata": { "branch": "develop", "commit_count": 77, "repo_created_at": "2016-07-08T18:18:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 72, "forks": 56, "issues": 23, "pull_requests": 4 }, "file_meta": { "content_id": "345123...
c857b091-f6e7-4151-8579-4ac03c33afc2
velazqua/competitive-programming
online-judges/UVa/10000/10000.cpp
/* <NAME> * Start: Tue Jul 3 18:17:39 EDT 2012 * End : */ #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #in...
ALGO
0.997823
4.00572
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2013-09-10T14:41:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae3749eb1...
5c1ba84f-d7f9-4c2d-b18d-7a30e6de7cdb
DikshantBadawadagi/DSA
moneySum.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; bool f(int ind,int t,vector<int>&nums,int n, vector<vector<bool>>&dp) { if(t == 0)return true; if(ind == n-1)return nums[n-1] == t; if(dp[ind][t] != -1) return bool(dp[ind][t]); int notPick = f(ind+1, t, nums, n,dp); int pick = fa...
ALGO
0.999992
4.278459
{ "github_metadata": { "branch": "main", "commit_count": 413, "repo_created_at": "2024-09-15T05:31:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c66e6350a0...
500cf793-3581-49f0-9707-5d313b3d68f0
bpfm/rdsolver
rd/source2D.cpp
/* * This file was written by <NAME> (<EMAIL>) and <NAME> (<EMAIL>). */ #include <vector> #include "constants.h" #include "vertex2D.h" #ifdef ANALYTIC_GRAVITY void plummer_gravity(std::vector<VERTEX> &MY_POINTS, double DT, int N_POINTS){ // Fixed Plummer potential at (XC,YC) int i; double X...
ALGO
0.999621
3.835401
{ "github_metadata": { "branch": "master", "commit_count": 341, "repo_created_at": "2017-05-03T12:49:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a21c75d7...
9d2f07c1-eeea-4af9-a496-e4550e98b13d
singlarohan/leetcode_sol
0718-maximum-length-of-repeated-subarray/2022-09-20 10.59.35 - Accepted - runtime 685ms - memory 109.1MB.cpp
class Solution { public: vector<vector<int>> dp; int solve(int i, int j, vector<int> &num1, vector<int> &num2){ if(i >= num1.size() || j >= num2.size()) return 0; int a = 0; if(dp[i][j] != -1) return dp[i][j]; if(num1[i] != num2[j]) return...
ALGO
0.99998
5.861058
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-08-05T02:14: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": "c9fe1d208d2c...