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
4c5545ad-cb50-4015-abcc-62f77afc9dd6
HectorTa1989/LeetCode-Cpp
Array/Remove Duplicates from Sorted Array II.cpp
//https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/discuss/347871/6-lines-C%2B%2B-clean-solution. // Method 1 int removeDuplicates(vector<int>& nums) { int n = nums.size(), count = 0; for (int i = 2; i < n; i++) if (nums[i] == nums[i - 2 - count]) count++; else nums[i - coun...
ALGO
0.999862
6.149254
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-04-30T12:14: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": "98b96cde25...
b5e253cd-2cc1-4111-a2a5-51f9801950ee
NifleySnifley/SciOly2023
src/utils.h
#ifndef UTILS_H #define UTILS_H #include <bit> #include <limits> #include <cstdint> #include <cmath> const int GRID_W = 4; const int GRID_H = 4; const float GRID_SIZE_MM = 2000.f; const float GRIDSQUARE_SIZE_MM = GRID_SIZE_MM / GRID_W; #ifdef PICO_FLASH_SIZE_BYTES #include "pico/time.h" #include "pindefs.h" #endif ...
TOOL
0.954026
6.854812
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-11-21T05:03:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30fb0f86c14...
dbd67681-5b9e-409b-b9d0-8cc2a08b06df
SiddhantAttavar/Competitive-Programming
Codeforces Contests/CF-Round-898/F. Money Trees.cpp
#include <bits/stdc++.h> using namespace std; template<typename T> inline void input(T& inVar) {cin >> inVar;} template<typename T, typename... S> inline void input(T& inVar, S&... args) {cin >> inVar; input(args ...);} template<typename T> inline void print(T outVar) {cout << outVar << '\n';} template<typename T, type...
ALGO
0.999911
3.357795
{ "github_metadata": { "branch": "main", "commit_count": 607, "repo_created_at": "2021-09-16T08:14:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce13cc579...
d6f8b36a-c57b-4332-a3df-af9362089f3c
akachocobo7/comp_template
ModInt.cpp
template<int MOD_> class ModInt { private: public: long long val; constexpr ModInt(long long v = 0) noexcept : val(v % MOD_) { if (val < 0) val += MOD_; } constexpr int getmod() { return MOD_; } constexpr ModInt operator - () const noexcept { return val ? MOD_ - val : 0; } co...
ALGO
0.998128
5.467382
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2018-01-03T08:42:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6172cb673...
1ca81507-b840-4c20-956e-c4d02e4ad14b
GizemTuran/Binary-Linear-Search
Kaynak.cpp
#include <iostream> using namespace std; int counter = 0; void bubbleSort(int arr[], int size) { counter = 0; //Incrementing the counter by one for (int i = 0; i < size; i++) { //Forming our "bubble" with index of n and n+1, for (int j = i+1; j < size; j++) { //and moving them forward counter++; //Inc...
ALGO
0.999228
4.889429
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-14T13:02: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": "7e3b99df4d12...
7a98dbc0-4c18-419a-b554-86fd5b4099e7
andreimargeloiu/Competitive-programming-problems
jstc.cpp
# include <bits/stdc++.h> # define mil 10000005 using namespace std; ifstream f("jstc.in"); ofstream g("jstc.out"); bitset <mil> ap; int i,j,n,m,top,VV,ant,Q; int st[mil/10], nxt[mil/10]; long long A, B, sol; char s[mil]; int main () { f>>A>>B; f.get(); f.getline (s+1, mil); n=strlen(s+1); for (i=1; i<=n; +...
ALGO
0.999914
3.411797
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-09-17T16:24:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 67, "forks": 59, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "90fdab05...
b467a7e2-6fa8-49d8-b8b9-29b77cb08ee4
TarunPalekar/DSA
tree.cpp
#include<iostream> #include<queue> using namespace std; class Node{ public: int data; Node* left; Node* right; Node(int val){ this->data=val; this->left=NULL; this->right=NULL; } }; Node* createTree(){ cout<<"Enter the value"; int data; cin>>data; if(da...
ALGO
0.999786
4.486573
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-04-23T13:01: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": "dd3e0823a2...
97c2825d-0c12-4a16-9b1b-db1759dad328
Kessident/GTC-cpp-II
Lab_8/main.cpp
//<NAME> //CIST 2362 CRN 63228 //Lab 8 Text File Analysis #include <iostream> #include <fstream> #include <set> #include <vector> using namespace std; int doContinue = 0; ifstream attemptToOpen(string); set<string> readFileToSet(string); int main() { do { cout << "This program will perform various analy...
TOOL
0.934972
3.871861
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2019-06-11T19:47: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": "d81fcc8de...
11016a5a-f029-4100-aeb2-2a2f611107fe
nadvamir/advent-of-code-2017
12/pipes.cpp
#include <iostream> #include <sstream> #include <string> #include <vector> #include <algorithm> #include <numeric> #include <iterator> #include <regex> #include <unordered_map> #include <unordered_set> #include <cassert> using Graph = std::unordered_map<int, std::unordered_set<int>>; void addNode(Graph& g, const std:...
ALGO
0.998921
5.331272
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2017-12-02T16:56: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": "f746d680f...
e8515d89-eaef-42e5-8d5b-e63461a546b2
sanjaix21/dsa
cpp/linked_list/merge_two_sorted_lists_leetcode_21.cpp
/* initial #include <iostream> 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* mergeTwoLists(ListNode* l1, ListNode* l2) { ListNode...
ALGO
0.999958
5.612508
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2025-01-07T10:00: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": "03f7e1f8d...
f692588a-7780-45f7-838b-ec5951f08a40
kugelblitz84/prgms
class1_priority_with_brust.cpp
#include <stdio.h> #include <stdlib.h> typedef struct process{ char process_name; int arrival_time; int priority; int cpu1,io,cpu2; int completion_time = -1; bool qued = false; } process; process *process_q[100]; int q_iterator = -1; void init(){ for(int i = 0;i<100;i++){ process_...
ALGO
0.999606
3.362044
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-25T05:45: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": "811c9e7b0851...
ce727722-3920-4b79-956b-5d8225e7c55e
ani2fun/c-cpp
playground/src/main/headers/StringOps.h
#ifndef C_CPP_STRINGOPS_H #define C_CPP_STRINGOPS_H #include <iostream> #include <string.h> using namespace std; void permSwap(char s[], int l, int h); void swap(char *x, char *y); int validate(char *name) { for (int i = 0; name[i] != '\0'; i++) { if ( !(name[i] >= 65 && name[i] <= 90) ...
ALGO
0.962648
4.161521
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-04-29T18:25:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64dd0b518b43...
2815c81a-4571-4382-ae6d-b54843bf1d09
chaosRobe/Projekt_UAR
Symulator.h
#pragma once #include "ARX.h" #include "PID.h" #include "Generator.h" #include <fstream> #include <sstream> #include <string> class Plik; enum class typ_generatora { gen_Skok, gen_Sin, gen_Syg }; class Symulator { model_ARX arx; PID_controller pid; Generator gen; double arx_val = 0; double pid_val = 0; doubl...
TOOL
0.903428
4.303306
{ "github_metadata": { "branch": "main", "commit_count": 139, "repo_created_at": "2024-11-16T16:40: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": "5333b2dbce...
7f22bd1b-b02e-4603-afe2-8956f5e7c611
erjiaqing/my_solutions
cf_gym/100341C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,l,r) for (i=l;i<=r;i++) #define drep(i,l,r) for (i=l;i>=r;i--) const int maxn = (1 << 17); const int P = 786433, t = 6, g = 10; ll a1[maxn], a2[maxn], Y[maxn], Y2[maxn], Yl[maxn], yl[maxn], y2[maxn], A1[maxn], A2[maxn], A[maxn]; ll i,j,k,...
ALGO
0.999931
3.831294
{ "github_metadata": { "branch": "master", "commit_count": 341, "repo_created_at": "2014-05-27T06:30:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fd8821d...
ab4572c3-f7a7-4818-a039-0ad364c75b0c
LLostInDarkness/DSA
assignments/as06/disjointSet.cpp
/* Assignment 6: Disjoint Maze disjointSet.cpp */ #include "disjointSetFuncs.h" // Public Functions disjointset::disjointset(int size) : SIZE(size){ p = new int[size]; r = new int[size]; sets = size; for(int i = 0; i < SIZE; ++i) { p[i] = i; r[i] = 0; } } disjointset::~disjointset() { delet...
ALGO
0.991556
4.681479
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2025-05-02T06:05:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cd0f015653...
e6aca9de-5051-45c4-ac5e-c63cc85e3311
LunchOn13/PbSolve
week5/tmp.cpp
#include<iostream> #include<algorithm> using namespace std; int N, M; int house[1000001]; bool binary_search(int idx) { int temp = 1; int prev = house[0]; for (int i = 1;i < N;i++) { if (house[i] - prev >= idx) { prev = house[i]; temp++; } } if (temp >= M) { return t...
ALGO
0.999997
4.216518
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-12-16T15:23: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": "0d630d0562...
2b784ab6-e9bb-4c08-9070-52ae8c066764
mirror/vbox
src/VBox/Runtime/common/math/fmaf.cpp
/* $Id$ */ /** @file * IPRT - No-CRT - fmaf(). */ /* * Copyright (C) 2022-2024 Oracle and/or its affiliates. * * This file is part of VirtualBox base platform packages, as * available from https://www.virtualbox.org. * * This program is free software; you can redistribute it and/or * modify it under the terms...
ALGO
0.996851
7.249589
{ "github_metadata": { "branch": "master", "commit_count": 106059, "repo_created_at": "2013-12-20T23:33:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 240, "forks": 81, "issues": 8, "pull_requests": 1 }, "file_meta": { "content_id": "620...
360b82d8-b709-4162-9661-809a4f5f24db
ArushNo1/Competitive-Programming
CF/1334A.cpp
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set; typedef vector<int> vi; typedef vect...
ALGO
0.999963
4.085613
{ "github_metadata": { "branch": "main", "commit_count": 98, "repo_created_at": "2024-08-22T13:11:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51b191a0e07...
3ddaab4e-8fd3-4486-91b4-dea1f2426860
OmkarS25/DSA-Practice
1605-minimum-number-of-days-to-make-m-bouquets/1605-minimum-number-of-days-to-make-m-bouquets.cpp
class Solution { public: int minDays(vector<int>& bloomDay, int m, int k) { ios::sync_with_stdio(0); cin.tie(0); long long max = *max_element(bloomDay.begin(), bloomDay.end()); long long low = 0; int answer = -1; while (low <= max) { long long day = low + ...
ALGO
0.999997
5.960934
{ "github_metadata": { "branch": "main", "commit_count": 1981, "repo_created_at": "2024-04-19T02:21: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": "bc818ae30...
d87485a2-6274-4149-a0c3-eced540c038f
satoshikumano/CarND-Kidnapped-Vehicle-Submission
src/particle_filter.cpp
/* * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: <NAME> */ #include <random> #include <algorithm> #include <iostream> #include <numeric> #include <math.h> #include <iostream> #include <sstream> #include <string> #include <iterator> #include "particle_filter.h" using namespace std; /* * Co...
ALGO
0.976802
5.938747
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2017-12-25T14:29: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": "670b8f849...
b04b8577-7321-4045-b944-95f211bff4cc
gitrider/wxsj2
EngineSDK/ThirdParty/VSInclude/cgal/OpenNL/bicgstab.h
/* * author: <NAME>, INRIA, project ALICE * website: http://www.loria.fr/~levy/software * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * * This library is distrib...
ALGO
0.999225
6.550996
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-08-26T14:38:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94e741c8d...
20001fa2-93e8-4de1-b156-d9f5171095e0
SummerZheng/LeetCode
P32_Longest_Valid_Parentheses.cpp
#include<iostream> #include<string> #include<stack> using namespace std; int longestValidParentheses(string s) { cout<<"string is "<<endl; cout<<s<<endl; // We use myStack to store the idx of '(' stack<int> myStack; // minStart is the valid min start ix for the current paren chain int maxL = 0, minStart = 0...
ALGO
0.998527
4.720002
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-01-12T21:03: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": "dbaaaee75...
923c81c7-ac2a-4eb7-930d-3e0e76165e1d
neneee0181/cpp_tuk_2
윈도우 프로그래밍/워밍업6번/main.cpp
#include <iostream> #include <string> #include <sstream> #include <stack> #include <cctype> #include <ctime> // 추가: 시간 관련 라이브러리 using namespace std; // 주어진 함수들 그대로 유지 void generateNumbersAndOperators(int& num1, int& num2, int& num3, int& num4, int& num5, char& op1, char& op2, char& op3, char& op4) { // Seed ...
ALGO
0.999161
5.425081
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2024-03-05T04:58: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": "87e3f2fedd...
252957e2-b7d0-48bd-ab3b-ea91ad94f7e8
void-virtual/AvlTree
main.cpp
#include <iostream> #include <fstream> #include <cstring> #include "AVLTree.h" #include "Vector.h" TVector<unsigned char> strToVec(const char* str) { TVector<unsigned char> result; for (int i = 0; str[i] != '\0'; ++i) { result.PushBack(std::tolower(str[i])); } return result; } std::ostream& o...
ALGO
0.998578
4.32503
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-27T12:40: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": "666e487ca7...
88a23199-eef5-4adf-bf72-a7063275fbac
anhkhoa91280/C-Primer-Plus-Programming-Exercises-Solutions
Chapter5/combination_assignment.cpp
/* * Name: <NAME> * Date: 20190906 * Desc: This program shows Combination assignment operator * Reference: C++ Primer Plus - 6th Edition * */ #include <iostream> int main() { int k = 5; k += 3; std::cout << "k = " << k << std::endl; int *pa = new int[10]; pa[4] = 12; pa[4] += 6; // ok, pa[4] set to 18 s...
TOOL
0.904951
4.70717
{ "github_metadata": { "branch": "master", "commit_count": 286, "repo_created_at": "2019-07-13T08:20: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": "1bdadc2c...
9bacd98c-b007-4ffb-98d0-5c3483db7770
ShobhitBehl/Competitive-Programming
Codeforces Solutions/289B.cpp
#include <iostream> #include <string> #include <queue> #include <vector> #include <fstream> #include <cmath> #include <sstream> #include <bits/stdc++.h> #include <climits> using namespace std; int bs(vector <long long int> arr,long long int s) { long long int l = 1,r = arr.size()-1; long long int ans = -1; while(l<...
ALGO
0.999611
3.64392
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-01-17T18:22: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": "c89803c48d...
0562aec0-8729-4702-b3ce-36c59706a860
AIFM-sys/AIFM
shenango/apps/parsec/pkgs/apps/facesim/src/Public_Library/Matrices_And_Vectors/VECTOR_ND_PARALLEL.h
//##################################################################### // Copyright 2002-2005, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //######################################...
ALGO
0.989988
4.364632
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-10-12T02:03:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 122, "forks": 37, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "3cb0708...
27aaf790-fac5-4164-8de3-66354e519c06
DHEERAJHARODE/Hacktoberfest2024-Open-source-
C++/Pigeonhole Sort.cpp
#include <bits/stdc++.h> using namespace std; void PigSort(int arr[], int n) { int min = arr[0], max = arr[0]; for (int i = 1; i < n; i++) { if (arr[i] < min) min = arr[i]; if (arr[i] > max) max = arr[i]; } int range = max - min + 1; vector<int> holes[ran...
ALGO
0.999919
5.152496
{ "github_metadata": { "branch": "main", "commit_count": 945, "repo_created_at": "2020-10-03T04:58:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 473, "forks": 3840, "issues": 177, "pull_requests": 1367 }, "file_meta": { "content_id": "...
645153b9-b168-4fc8-9506-ab88c653ae72
piyushkumarhcu/RCTTUNED
algo_top_v1.cpp
#include "algo_top.h" #include "algo_top_parameters.h" #include "bitonicSort16.h" void processInputLinks(ap_uint<576> link_in[N_INPUT_LINKS], crystal ECALRegion3x4_1[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI], crystal ECALRegion3x4_2[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI],crystal ECALRegion3x4_3[CRYSTAL_IN_ETA][CRYSTAL_IN_PHI]){ ...
ALGO
0.999804
4.230874
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-07-18T10:04: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": "71e0d31c346...
3b0ebd58-34d0-43eb-a6d3-1229443ebba7
ZYLZhuPP/OI
Luogu/Competition/LGR-198-Div.3/B.cpp
#include<bits/stdc++.h> using namespace std; #define For(i, l, r) for (int i = (l); i <= (r); ++i) const int N = 2e3 + 5; struct IO { char c; int f; #define gc() (getchar()) template<class C> inline IO& operator >> (C &x) { x = 0; f = 1; while (!isdigit(c = gc()) && ~c) f |= -!(c ^ 45); whi...
ALGO
0.999543
3.181079
{ "github_metadata": { "branch": "ZYLZPP", "commit_count": 115, "repo_created_at": "2024-09-18T03:26:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "767a7b06...
212a2e09-b842-4733-babe-513f58a476c0
ftiasch/dreadnought-code-library
improve/LiuZhu.cpp
const int MAXN,INF;// INF >= sum( W_ij ) int from[MAXN + 10][MAXN * 2 + 10],n,m,edge[MAXN + 10][MAXN * 2 + 10]; int sel[MAXN * 2 + 10],fa[MAXN * 2 + 10],vis[MAXN * 2 + 10]; int getfa(int x){if(x == fa[x]) return x; return fa[x] = getfa(fa[x]);} void liuzhu(){ // 1-base: root is 1, answer = (sel[i], i) for i in [2..n] ...
ALGO
0.999949
3.445907
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2019-02-02T10:12:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 47, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "102099d4...
b8ddc892-3d67-4b70-8c98-e9251436e74d
Tetsu-is/neet-code
stack/generate_parenthesis.cpp
#include <vector> #include <string> #include <iostream> #include <set> using namespace std; class Solution { public: vector<string> generateParenthesis(int n) { if (n == 0) { return vector<string>{""}; } vector<string> result = generateParenthesis(n - 1); set...
ALGO
0.999559
6.090193
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2025-03-05T13:17: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": "228d60ae684...
d11abaec-1676-4f55-9899-061cfb3a0ec1
DarkRader/University
2.Semestr/1.Programming and algorithmic 2(BI-PA2.21)/1.Progtest/3.Semestral work/src/CParsData.cpp
/** * @author <NAME> <<EMAIL>> * @date 26.05.2021 */ #include "CParsData.h" bool CParsData::parsingDate(const std::string & operation) { std::string newOper = operation; clWhiteSpace(newOper); if(newOper == "quit") { std::cout << "End of work, thanks for using my calculator" << std::endl; ...
TOOL
0.951688
4.264377
{ "github_metadata": { "branch": "main", "commit_count": 391, "repo_created_at": "2021-12-15T21:33: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": "0922809509...
6f7fd84e-f20f-43d8-92e4-36e928f366d2
burakbayramli/books
Nodal_Discontinuous_Galerkin_Methods_Hesthaven/nudg++/trunk/Src/Examples2D/CurvedEuler2D/IsentropicVortexBC2D.cpp
// IsentropicVortexBC2D.m // function [Q] = IsentropicVortexBC2D(Q); // 2007/06/30 //--------------------------------------------------------- #include "NDGLib_headers.h" #include "CurvedEuler2D.h" //--------------------------------------------------------- void CurvedEuler2D::IsentropicVortexBC2D ( const DVec& xi,...
ALGO
0.992292
3.222606
{ "github_metadata": { "branch": "master", "commit_count": 652, "repo_created_at": "2016-10-31T17:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 325, "forks": 201, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5488...
891b52df-c3a7-413f-bd9d-fd3a902b7672
yjhmelody/DS-and-Algo
PAT/1004.cpp
#include <iostream> #include <cstdio> #include <string> #include <vector> using namespace std; struct node { string id; vector<node*> children; }; void traverse(node* tree, int depth, vector<int>& counts) { if (depth >= counts.size()) { counts.push_back(0); } if(tree->children.siz...
ALGO
0.999839
3.618137
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2018-03-07T08: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": "a91a64050...
3050338e-ae7b-44e8-b65b-7fced447b131
talshilo/colmap
src/base/feature_matching.h
// COLMAP - Structure-from-Motion and Multi-View Stereo. // Copyright (C) 2016 <NAME> <jsch at inf.ethz.ch> // // This program 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...
TOOL
0.974988
7.691649
{ "github_metadata": { "branch": "master", "commit_count": 468, "repo_created_at": "2017-03-30T07:49:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5161bb16...
12b409d2-4c74-4f2a-bafa-3de85645c34c
alexandraback/datacollection
solutions_2463486_0/C++/Agentchuck/main.cpp
#include <string.h> #include <stdint.h> #include <cstdio> #include <cstdlib> #include <ctype.h> #include <cmath> #include <string> #include <vector> #include <list> #include <iostream> #include <map> #include <set> #include <algorithm> #include <queue> #include <sstream> #include <fstream> using namespace std; typedef ...
ALGO
0.99963
3.110031
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9356f733...
11d7bf6b-0487-48b0-9e73-0e4b550d236b
aadityamp01/GFG-30-Days-of-Code
Day23/day23.cpp
//Problem Statement: Lucy lives in house number X. She has a list of N house numbers in the society. //Please refer day23 text file for full problem statement //Initial Template for C++ #include <bits/stdc++.h> using namespace std; //User function Template for C++ class Solution{ public: vector<int> Kclos...
ALGO
0.999982
5.293332
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2021-01-28T18:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5973a630edb...
0703f490-bae2-415f-b163-331dd3f4864e
Kuldeep9870/Leetcode-Solutions
Permutations of a given string - GFG/permutations-of-a-given-string.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void solve(string S,int index,vector<string> &ans ) { //base case if(index>=S.length()) { ans.push_back(S); return; } ...
ALGO
0.999919
6.442226
{ "github_metadata": { "branch": "main", "commit_count": 910, "repo_created_at": "2022-11-09T16:00: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": "53b478ee0f...
699ed167-2007-4bbd-8108-f9ca35b29f9c
llvm/llvm-project
libc/src/__support/math/expf16.h
//===-- Implementation header for expf16 ------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
ALGO
0.954018
7.314075
{ "github_metadata": { "branch": "main", "commit_count": 545188, "repo_created_at": "2016-12-07T09:39:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 33545, "forks": 14484, "issues": 5000, "pull_requests": 5000 }, "file_meta": { "content_...
fc72f802-1c4e-46be-a6ce-bad11fc5361b
Diusrex/UVA-Solutions
11463 Commandos.cpp
#include <iostream> #include <vector> #include <queue> #include <utility> #include <cmath> using namespace std; void DoDfs(vector<int>& dist, const vector<vector<bool> >& connected, int startPoint, int N) { queue<pair<int, int> > q; q.push(make_pair(startPoint, 0)); dist[startPoint] = 0;...
ALGO
0.999957
4.456783
{ "github_metadata": { "branch": "master", "commit_count": 188, "repo_created_at": "2013-12-15T19:00:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 96, "forks": 66, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b020fe...
c0157551-a494-4b88-9646-6e0342713d1e
ArthurDetant/projet
code/MildewModel/Cohorte.cpp
// // Created by Corentin on 19/06/2018. // #include "Cohorte.h" Cohorte::Cohorte(int id, double InocPrim, double P1, double P2, double P3, double P4, double P5, double P6, double P7, double P8, double P9, double P10, double P11, double P12, double P13, double P14, double d0, double d1, doub...
TOOL
0.919692
5.367591
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-05-14T11:08: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": "5383dc7a88...
bcd3ce5b-94fd-4859-97e7-0c58e729ac05
MHarbi/algorithm-design
Assignment4/mergesort4_contiguousArray.cpp
#include <stdio.h> #include <stdlib.h> struct node { int key; int link; }; // void mergesort4(int low, int high, int mergedlist) // { // int mid, list1, list2; // if(low == high) // { // mergedlist = low; // // S[mergedlist].link = 0; // } // else // { // // mid = Math.floor((low + high)/...
ALGO
0.999957
3.957231
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2016-12-30T23:37: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": "df8c0ac67...
4317b5ce-6c1f-461b-bdd1-8b3f31ef2650
Xinafoato/FIB
EDA_FIB/Exhaustive_search/P16415.cc
#include <iostream> #include <vector> using namespace std; int n; int ld_d1 (int l, int j) { return l+j; } int ld_d2 (int l, int j) { return l-j+(n-1); } int reina_movs(vector<int> & t, vector<bool>& col, vector<bool>& d1, vector<bool>& d2, int idx) { if (idx == n) return 1; else { int total...
ALGO
0.999948
3.893164
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-05-02T08:47:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b9552e9a5...
02f1ec63-3478-494e-9628-b434a3ed8ef5
mcdj001/sfy_forklift_gazebo_ws_250618
src/homing_local_planner-noetic-devel/include/homing_local_planner/one_euro_filter.h
/********************************************************************* * * Software License Agreement (BSD License) * * Copyright (c) 2022, * TU Dortmund - Institute of Control Theory and Systems Engineering. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * m...
ALGO
0.911722
6.745425
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-06-18T11:06:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad5f8099250a...
1e7aef92-b0b0-41e9-9766-dd71ebdf7a63
ajitesh22/Coding-Problems
cousins-in-binary-tree.cpp
//https://leetcode.com/problems/cousins-in-binary-tree/ /** * 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) {} * Tre...
ALGO
0.999977
5.886024
{ "github_metadata": { "branch": "master", "commit_count": 222, "repo_created_at": "2020-05-15T13:44:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "676a7911...
b1286a64-b7e2-458f-98c8-d9fa54e8659f
ishandutta2007/codeforces-c
cmz/normal/803/F.cpp
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7, m = 100000; inline int power(int a, int b) { long long res = a, ans = 1; for(; b; b >>= 1, res = res * res % mod) if(b & 1) ans = ans * res % mod; return ans; } int a[100010], n, dsy[100010], prime[100010], np[100010], mu[100010], cnt; int main()...
ALGO
0.999892
4.703999
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17: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": "40873299a91e...
56430e1d-024e-4b0c-956d-5ca5bf7c6080
BackupTheBerlios/amanith-svn
trunk/src/2d/ghermitecurve2d.cpp
/**************************************************************************** ** $file: amanith/src/2d/ghermitecurve2d.cpp 0.3.0.0 edited Jan, 30 2006 ** ** 2D Hermite curve segment implementation. ** ** ** Copyright (C) 2004-2006 Mazatech Inc. All rights reserved. ** ** This file is part of Amanith Framework. ** *...
ALGO
0.998417
5.95451
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2015-08-12T13:01: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": "a97410d5f...
c35c6d7c-d3e5-49c6-a3ee-4bd962163681
chenzeyuczy/Sicily
1343.cpp
#include <stdio.h> bool end(const char* str, int s, int t, int w) { for (int i = 0; i < w; i++) { if (str[i] < t - w + i + 'a') return false; } return true; } bool valid(const char* str, int s, int t, int w) { for (int i = 0; i < w; i++) { if (str[i] < 'a' + s + i - 1 || str[i] > 'a' + t - w + i) return ...
ALGO
0.999989
3.372459
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-10-25T08:48: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": "31bd6d6b25...
b13cccb5-8ca9-445b-8839-035d1e38f199
gshanemiller/kvbench
benchmark/thirdparty/radix/src/radix.cpp
#include <radix.h> #include <radix_memmanager.h> #include <radix_enums.h> namespace Radix { static Node256 *RadixLeafNode = reinterpret_cast<Node256*>(k_IS_LEAF_NODE); const u_int64_t RadixTermMask = Radix::k_IS_TERMINAL_NODE; const u_int64_t RadixTagClear = 0xFFFFFFFFFFFFFFFDUL; const u_int64_t RadixNoTag ...
ALGO
0.995347
5.671788
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2022-05-08T18:00:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d181ee448...
11aba9d4-44c5-4909-a8f8-371b4d8de333
Nipunnyka/compicode
CodeForces/NumberGame.cpp
//prob: https://codeforces.com/contest/1370/problem/C #include <iostream> #include<bits/stdc++.h> #define fi first #define se second #define pi pair<int, int> #define pb push_back #define mp make_pair #define ptr (*it) #define ll long long #include <chrono> using namespace std::chrono; using namespace std; bool oddD...
ALGO
0.999872
3.815288
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2019-12-12T02:14:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4df193d76...
c0bcd663-d259-4f00-9e44-54a3d24ff727
infstka/BAP-1c1s
LR6/dops/6.3/Source.cpp
#include<iostream> void main() { using namespace std; int i, a, b, c, d, sum; for (i = 1000; i <= 9998; i += 1) { if (i % 2 == 0 and i % 7 == 0 and i % 11 == 0) { a = i / 1000; b = (i / 100) % 10; c = (i / 10) % 10; d = i % 10; sum = a + b + c + d; if (sum == 30) { if ((a == b and c =...
ALGO
0.999
3.300677
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-09-25T12:55: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": "e9475fd28c7b...
5f2bf079-66d3-4d1d-bc09-a1bbc13346f5
jaimeguzman/algorithm
pacman-dfs.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <cstdio> #include <deque> #include <queue> #include <stack> #include <bitset> #include <string> #include <cstdio> #include <limits> #include <vector> #include <cstdlib> #include <numeric> #include <sstream> #include <iostream> #in...
ALGO
0.99962
3.459018
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-03-09T01:37:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf398e55b8...
2aef7a2a-168e-49f7-bc00-3223283e2b8a
abdel198/Sortides_entrades_digitals
Cru_lla_de_sem_fors/Cru_lla_de_sem_fors.ino
/**************************************************************** ** titulo : ** ** Cruïlla de semàfors ** ...
TOOL
0.93772
4.231669
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-03-06T13:40: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": "4f75a72bc4...
2bc98a56-c453-479d-8f4f-5ffb1bc03fbc
Pixako-Unrealistia/KMITL-object-oriented-programming
lab10/ex01/calc_expr.cpp
#include "nse/ptr.hpp" #include <variant> #include <string> using Expr = std::variant< nse::Ptr<class Val_expr>, nse::Ptr<class Bin_expr>>; class Expression { public: std::string repr() const; explicit Expression(double v); Expression(char bin_op, const Expression& l, const Expression& r); private: ...
TOOL
0.919445
7.106695
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-01-20T07:50:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "203dd86881b...
13648dde-8ecb-41f8-b9ae-1e5404cfbecb
kkh0920/study-algorithm
백준/Gold/1238. 파티/파티.cc
#include <iostream> #include <queue> #include <vector> #define INF 100000000 using namespace std; vector< pair<int, int> > graph[2][1001]; priority_queue< pair<int, int>, vector< pair<int, int> >, greater< pair<int, int> > > pq; int weight[1001], result[1001], N, M, X, s, e, t; void dijkstra(int revNum, int start){ ...
ALGO
0.999965
4.579377
{ "github_metadata": { "branch": "main", "commit_count": 505, "repo_created_at": "2023-03-31T01:04: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": "5e844f399c...
d1020c62-6599-46ed-a428-3c684c96be9f
JunBinLiang/cpp-algorithm
algorithm/codeforce/37D.cpp
#include <iostream> #include <vector> #include <string> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <algorithm> #include <cmath> #include <cstring> #include <queue> #include <list> using namespace std; using ll = long long; #define pb push_back #define ve vector #define FOR...
ALGO
0.999968
4.334253
{ "github_metadata": { "branch": "main", "commit_count": 574, "repo_created_at": "2022-02-08T21:38:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "effe30f089...
8a13e677-6961-47da-bf41-f81c7484644e
HARSHAVARDHA007/Algorithms
Graphs/problems/Max_area_of_island.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int dx[4] = {0, 0, -1, 1}; int dy[4] = {-1, 1, 0, 0}; int n, m; int count = 0; void floodFill(vector<vector<int>>& grid, int x, int y) { grid[x][y] = 0; for (int i = 0; i < 4; i++) { int n...
ALGO
0.999456
5.530169
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2023-09-28T10:46: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": "d099c8d29...
8a306457-99e4-4ee0-9738-f32c29d89650
bksel/PAMSI_projekt3
src/checkers_logic/heuristics/heuristic_analyser/HeuristicAnalyser.h
// // Created by ksel on 19/06/24. // #ifndef MINIPROJEKT3_WARCABY_SRC_CHECKERS_LOGIC_HEURISTICS_HEURISTICANALYSER_H_ #define MINIPROJEKT3_WARCABY_SRC_CHECKERS_LOGIC_HEURISTICS_HEURISTICANALYSER_H_ #include "../../board/Board.h" namespace checkers { /* * Positive values indicate that white is winning, negative val...
ALGO
0.984064
5.300924
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-06-17T17:17: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": "301df525674...
9816c4f8-7666-4dcb-ac14-2d128ac5e017
Shehbaz456/Cpp_with_me
CWH_C++_OK/09_inline_fun.cpp
// #include<iostream> // using namespace std; // // inline int product(int a,int b){ // // return a*b; // // } // inline int product(int a,int b){ // // not recommended to use below lines with inline function // static int c=0; //This executes only once // c = c+1; //next time this function is run, th...
ALGO
0.939875
4.707898
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-12-24T15:42: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": "033b1597024e...
28e3d65e-5c93-4a8f-b77b-85fd13369668
Griffinboy24/GriffinAntialiasing
griffinwave4/InterpFlt.hpp
/***************************************************************************** Merge of: - InterpFltPhase.h & InterpFltPhase.hpp - InterpFlt.h & InterpFlt.hpp This header contains both the phase?optimized FIR subfilter (InterpFltPhase) and the primary FIR interpolator (InterpFlt), fully inlined and header?only. *T...
ALGO
0.928808
6.639829
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-04-17T18:24: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": "4c92da8591bb...
3f256835-05c9-4857-8962-f693bbbfd259
trilinos/Trilinos
packages/rol/adapters/minitensor/src/sol/ROL_MiniTensor_MiniSolver.hpp
// @HEADER // ***************************************************************************** // Rapid Optimization Library (ROL) Package // // Copyright 2014 NTESS and the ROL contributors. // SPDX-License-Identifier: BSD-3-Clause // *************************************************************************...
ALGO
0.998308
6.577792
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
912bd72d-4194-474d-aaae-34b79eb5c49f
kad-ecoli/hhsuite2
src/hhhitlist.h
// hhhitlist.h ///////////////////////////////////////////////////////////////////////////////////// // HitList is a list of hits of type Hit which can be operated upon by several anaylsis methods ///////////////////////////////////////////////////////////////////////////////////// class HitList : public List<Hit> { ...
ALGO
0.982907
5.64584
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-12-31T21:35:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb3acc12...
d4a74809-31e5-4b33-a3ce-2932f3332b13
LeftySolara/Library
C++/Linked Lists/LinkedList.h
/* Simple Non-circular Singly Linked List */ #include <iostream> using std::cout; using std::endl; template <typename T> struct Node { T data; Node* next = nullptr; }; #ifndef LINKEDLIST_H #define LINKEDLIST_H template <typename T> class LinkedList { public: LinkedList(); ~LinkedList(); void a...
ALGO
0.998046
5.307205
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-01-06T03:32: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": "cb09b78c82...
f765bc80-e634-4c3e-8df4-60f37ab1e829
ricachii/Lab2
Lab2/main.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <chrono> #include <filesystem> #include <numeric> #include <cassert> #include <stack> using namespace std; using namespace std::chrono; // ----------- ALGORITMOS DE ORDENAMIENTO ----------- void insertionSort(vector<int32_t>& arr)...
ALGO
0.999849
5.628381
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-06-02T06:03:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8f094a1fa6d...
7422d901-2c62-43a8-9075-691d894e2d3d
ishandutta2007/codeforces-j
jiangly/normal/1240/D.cpp
#include <bits/stdc++.h> using namespace std; using LL = int64_t; using Uint = uint32_t; constexpr int INF = 1e9; constexpr LL INFLL = 1e18; constexpr int MAX_N = 300000; constexpr int MAX_NODES = 10000000; struct Node { int val; Node *lc, *rc; }; int cnt; Node nodes[MAX_NODES]; void init() { } Node *newNo...
ALGO
0.999834
4.740309
{ "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": "e24864748daa...
293391f0-c323-4252-932f-4ded01a2e713
raincross7/code-similarity
codes/train_code/problem286/problem286_482.cpp
#include<iostream> using namespace std; #include<string> class dice { int U, S, E, W, N, L; public: dice(int, int, int, int, int, int); void roll_1(int); void roll_2(int); int east(); }; dice::dice(int u, int s, int e, int w, int n, int l) : U(u), S(s), E(e), W(w), N(n), L(l){} void dice::roll_...
ALGO
0.999925
4.484432
{ "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": "91bc067c95bd...
92364302-90cc-46dd-82e0-e69457ff068a
xjs-js/leetcode
2867.Count.Valid.Paths.in.a.Tree/sol.cpp
class Solution { private: vector<int> _isPrime; vector<bool> _isVisited; vector<vector<int>> _adj; set<pair<int, int>> _reltSet; int _relt; private: // 素数筛 void buildPrimes(int n) { _isPrime.resize(n + 1, true); _isPrime[0] = _isPrime[1] = false; for (int i = 2; i <= ...
ALGO
0.999783
4.65658
{ "github_metadata": { "branch": "master", "commit_count": 494, "repo_created_at": "2017-04-23T12:31: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": "dd7c75aa...
4a0e7d57-d0a6-4698-a044-d0033dccaa3e
svalenti52/Alive_10_Years
squash.cpp
/** * \file squash.cpp * \date 25-May-2017 * * \brief Probability of server winning a game of squash. */ #include <iostream> #include <Eigen/Dense> using namespace Eigen; const int dimension = 10; double ps_probability(Matrix<double, dimension, dimension>& ps, Matrix<double, dimension, dimension>& qs,...
ALGO
0.9996
4.263489
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2017-06-12T21:19:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e84294d9c...
4690d7c2-1e4e-4724-bcd6-ead43f47e56d
zwliew/competitive-programming
solutions/codeforces/edu/segment-tree/part-2/step-2/b.cc
/* ID: zhaowei10 TASK: LANG: C++14 */ #include "bits/stdc++.h" using namespace std; #ifdef LOCAL #include "../../_library/cc/debug.h" #define FILE "test" #else #define debug(...) 0 #define FILE "" #endif const int mod = 1e9 + 7; struct SegmentTree { int n; vector<int> sums, lazy; SegmentTree(int _n) : n(_n) ...
ALGO
0.999916
5.410371
{ "github_metadata": { "branch": "master", "commit_count": 230, "repo_created_at": "2019-01-26T15:14:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "c5ef09f1...
473d8086-6f1d-482b-8eac-85f9ee121d33
Shubham28/TopCoder
testprograms/XorBoardDivTwo.cpp
#include <algorithm> #include <iostream> #include <cmath> #include <cstdlib> #include <vector> #include <numeric> #define FOR(A,B,C) for(int A=B;A<C;A++) #define EFOR(A,B,C) for(int A=B;A<=C;A++) #define RFOR(A,B,C) for(int A=B;A>=C;A--) #define MEM(A,B) memset(A,B,sizeof(A)) #define SZ(A) int(A.size()) #define ALL(A)...
ALGO
0.999874
5.369508
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-05-23T12:52: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": "e7549dc216...
57b11e64-31ff-4091-af55-5fa38677f417
dohyun3493/2024Algorithms
KMP.cpp
#include<iostream> #include<string> using namespace std; int cnt = 0; int check = false; int pp[1001]; void preprocessing(string& P){ int j = 1; int k = 0; int m = P.size() - 1; pp[1] = 0; while(j <= m){ if(k == 0 || P[j] == P[k]){ j++; k++; pp[j] = k; ...
ALGO
0.999842
3.935278
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-12-11T05:28: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": "2ed112fa8f...
71317591-780a-4cd6-95dd-b251194a3967
rsln-s/aggregative-coarsening-for-multilevel-hypergraph-partitioning
packages/globipack/src/GlobiPack_Brents1DMinimization_def.hpp
/* // @HEADER // *********************************************************************** // // GlobiPack: Collection of Scalar 1D globalizaton utilities // Copyright (2009) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by ...
ALGO
0.999751
7.014304
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-04T20:05:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50ba2cf0d7...
dac59626-cca0-4995-b575-6267afff7b42
Hridoy51/Operating_System-LAB-3-2-
worstfit.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, x; string s; cin >> n; vector<pair<int, int>> v; for (int i = 1; i <= n; i++) { cin >> x; cin >> s; v.push_back({x, i}); } sort(v.rbegin(), v.rend()); int new_task; cin >> new_task >> s; for (auto a : v) { if (a.first ...
ALGO
0.999007
3.709598
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-02-13T03:22: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": "43e30b4c1b1...
3c2dad14-dc34-421d-bb1d-e0f0e272d36e
aastha-0711/DSA
653-two-sum-iv-input-is-a-bst/two-sum-iv-input-is-a-bst.cpp
class Solution { stack<TreeNode*> st; // for next (in-order) stack<TreeNode*> st2; // for prev (reverse in-order) // In-order: smallest to largest void pushLeft(TreeNode* node) { while (node) { st.push(node); node = node->left; } } // Reverse in-order...
ALGO
0.999998
6.525094
{ "github_metadata": { "branch": "main", "commit_count": 1598, "repo_created_at": "2024-02-18T07:06:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fc7c61a1...
08741480-d92e-4ead-ab57-8190a1125ecc
sourab-jadav/DSA-IN-CPP
1arrays/addingnumbers/usingreverse.cpp
#include <bits/stdc++.h> using namespace std; 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 *head = nullptr; int temp = ...
ALGO
0.999974
5.591302
{ "github_metadata": { "branch": "main", "commit_count": 206, "repo_created_at": "2023-11-16T13:31: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": "e58bb5deeb...
242139d2-b933-4d19-b16c-54eb3cc3d4bc
HeeChan-K97/cplusplus_udemy
condition_variable/new_thread_management.cpp
<What is multi-preocessing and Multi-threading> Multi-processing: Two or more process communicates using interprocess communication system Multi-threading: Where one process contains two or more threads and all the thread communicates each other through shared memory <Pros and Cons for Multi-threading> Pro: Fast to st...
TOOL
0.990611
7.104642
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2022-03-22T15:12: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": "bf548f7543c...
0e05d77f-342a-47ef-a267-bf4bd98842d9
kafkasl/Randomized-Binary-Search-Trees
rbst.cpp
/************************************* AUTORES: <NAME> <NAME> ***************************************/ #include <stdio.h> /* printf, scanf, puts, NULL */ #include <stdlib.h> /* srand, rand */ #include <time.h> #include <string> #include <vector> #include <iostream> #include <map> using namespace...
ALGO
0.999766
3.492
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2013-06-10T13:06: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": "0db8ad21b...
c5b62808-8d2f-4975-b080-5abfd5853f0a
reesekneeland/Rescue-Drone-Search-Simulation
project/src/graph.cc
#include "graph.h" using namespace std; Graph::Graph(string node){ //JSON PARSING FOR NODES.JSON ifstream nodes("nodes.json"); stringstream buf; buf << nodes.rdbuf(); string json = buf.str(); picojson::value v; string err = picojson::parse(v, json); if (!err.empty()) { std:cerr...
ALGO
0.975144
3.794011
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-06-21T02:15: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": "be23beb81d55...
b61a2838-ab65-4254-a999-a105d4a302d5
GarageGames/Torque3D
Engine/lib/opcode/OPC_LSSCollider.h
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* * OPCODE - Optimized Collision Detection * Copyright (C) 2001 <NAME> * Homepage: http://www.codercorner.com/Opcode...
ALGO
0.993602
6.43001
{ "github_metadata": { "branch": "development", "commit_count": 3540, "repo_created_at": "2012-09-18T20:33:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3358, "forks": 1193, "issues": 309, "pull_requests": 64 }, "file_meta": { "content_...
c039ff3a-e079-4427-9715-e0475cfb712c
astikraj2207/LN-Simulator
graph_network.cpp
#include <bits/stdc++.h> using namespace std; void dfs_col(int node_id,vector<vector<int>>& adj, vector<int>& vis,int col,vector<pair<int,int>> all_nodes,network* new_network){ vis[node_id]=col; auto& node_id_map = new_network->nodes; auto itr = node_id_map.find(node_id); if(itr!=node_id_map.end()){ ...
ALGO
0.999225
5.204579
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-04-24T06:58:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1da98bb6a7...
d3a9d543-3dbb-4682-bf3a-9ec356141622
eJosR-Coding/SuperMercadoTest
Supermercado/HashTabla.hpp
#pragma once #ifndef HASHTABLA_HPP #define HASHTABLA_HPP #include <iostream> #include <vector> #include "HashEntidad.hpp" using namespace std; class HashTabla { private: vector<HashEntidad*> tabla; int numElementos; int TABLE_SIZE; int hashFunction(const string& key) const { int hash = 0; ...
ALGO
0.911001
5.81042
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-06-08T16:54: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": "c80d326dac...
8226bb40-eb65-4a54-91fc-d7cc3deb094e
vukanoa/Coding_Problems
Orderless_Problems/530_Minimum_Absolute_Difference_In_BST/minimum_absolute_difference_in_bst.cpp
#include <iostream> #include <vector> /* ============ === EASY === ============ ======================================= 530) Minimum Absolute Difference in BST ======================================= ============ Description: ============ Given the root of a Binary Search Tre...
ALGO
0.999904
6.877699
{ "github_metadata": { "branch": "main", "commit_count": 2647, "repo_created_at": "2022-10-27T12:00: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": "bff4ba9b0...
aaeffb79-83d4-4cd0-b0f6-ccbaa03cd412
rsavaliya/HW6
main.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; int extraction (int s); // returns the hash location using the extraction method (in this case 3, 5, 7, 8 digits) int quadProbe (int hashtable[], int s, int max, int quadkey); // function to probe and if collision occurs do quadratic void w...
ALGO
0.997075
3.589431
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-04-24T23:11: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": "5c89e23cac...
056b5dc7-d552-4b91-8045-cb17306dab5f
komal11998/DSA_Practice
CommanElement.cpp
#include <iostream> #include <climits> using namespace std; int main() { int n, m, o; cin >> n >> m >> o; int a[n], b[m], c[o]; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int j = 0; j < m; j++) { cin >> b[j]; } for (int k = 0; k < o; k++) { cin >> c[k]; } int i = 0, j = 0...
ALGO
0.999918
3.612399
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2021-05-25T15:15: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": "a6b17ef850d...
f9978178-ead0-4955-a796-fad53a3f4c2c
HarshitPan/HackerRank_CP
Algorithm/Implementation/counting_valleys.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'countingValleys' function below. * * The function is expected to return an INTEGER. * The function accepts following parameters: * 1. INTEGER steps * 2. STRING path */ int countingVa...
ALGO
0.999987
4.941612
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2022-10-20T13:51: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": "9fd5df6e3...
0184b333-ddf4-488c-8b88-853a34552889
nxp-imx-support/surround-view-imx
App/Source/Calibration/src/src_contours.cpp
//M*////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ALGO
0.99874
5.213753
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-03-17T05:19:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fccad2d69e352...
dc8dbed7-937e-444c-b3b9-588105c69061
tasipasin/cpp-study
03-strings/main.cpp
#include <cstring> // C-style string library #include <iostream> #include <string> // C++ string library using namespace std; int main() { // C-style Strings section char first_name_ts[]{ "Tasi" }; char last_name_ts[]{ "Pasin" }; char whole_name[50]{}; size_t first_name_length = strlen(first_name_...
TOOL
0.965762
4.233641
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-05-05T21:57: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": "03b9b425971...
e31d8d5d-8004-4379-937f-dd638be8413e
shermnonic/wmute
source/e7/examples/HelloNoise/hellonoise.allinone_2010-08-07.cpp
// Compare improved Noise shader vs. software implementation // <NAME>, August 03, 2010 // // Remarks: // - Looks now pretty the same for apertures greater than 15.0, but there // are still differences visible for smaller apertures like 5.0. // // TODO: // - Optimize by using precomputed lookup tables (see GPUGems2) ...
TOOL
0.958286
6.109238
{ "github_metadata": { "branch": "master", "commit_count": 316, "repo_created_at": "2020-09-25T19: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": "d5566f09...
546e665e-3afd-4076-abcf-46bfcb376c6b
inquaid/Numerical_Methods
Sajib sir/Lab class 1/input.cpp
#include <iostream> #include <regex> #include <string> #include <map> using namespace std; int main() { int n; cout << "Degree: "; cin >> n; cin.ignore(); // Ignore newline left by cin string equation; cout << "Equation: "; getline(cin, equation); map<int, int> coefficients; // Re...
ALGO
0.997799
4.58848
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-05-06T05:11: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": "d532a53c9089...
39f844c1-0d65-4296-9a1c-7816edf69f69
chubillkelvin/leetcode
solutions/c++/weekly-contest/278/All Divisions With the Highest Score of a Binary Array.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> maxScoreIndices(vector<int> &nums) { int n = nums.size(); vector<int> zeros(n, 0); vector<int> ones(n, 0); for (int i = 0; i < n; i++) { int num = nums[i]; int add = num == 0 ...
ALGO
0.999971
5.223605
{ "github_metadata": { "branch": "master", "commit_count": 454, "repo_created_at": "2021-02-20T12:11:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e961bb2...
112c2055-2674-49f3-89d6-fc40e4095a79
tomer00/DSA
twosum.cpp
#include <iostream> using namespace std; pair<int, int> findPair(int* arr, int n, int target) { int h = n - 1; int l = 0; while (l < h) { int t=arr[l]+arr[h]; if(t==target) return make_pair(arr[l],arr[h]); if(t<target) l++; else h--; } return make_pair(-1,-1); } int ...
ALGO
0.999968
5.00702
{ "github_metadata": { "branch": "master", "commit_count": 117, "repo_created_at": "2023-05-17T17:49: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": "0a4cf7c5...
51b125db-a5ad-408c-9f15-46799f157653
VladiMarinov/avs-sim
src/dc_simulator.h
#pragma once #include "circuit.h" #include "Eigen/Core" #include "Eigen/LU" #include "Eigen/Dense" #include <vector> #include <memory> /// Solves for the DC Steady-state solution of a given circuit (Transients are ignored!). /// @note For the notational conventions used for naming the vectors and matrices, check <htt...
ALGO
0.994039
6.013842
{ "github_metadata": { "branch": "master", "commit_count": 198, "repo_created_at": "2021-05-10T12:06: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": "33f0f523...
27feae8c-76fc-4a7b-ba10-5a619d41b3d4
beagle-dev/beagle-lib
examples/standalone/hellobeagle/src/hello.cpp
/** * An example hello world program for libhmsbeagle * @author <NAME> */ #include <config.h> #include <libhmsbeagle/beagle.h> #include <iostream> #include <string> #include <vector> using namespace std; /** * DNA of three imaginary organisms from exotic locales */ string mars = "CCGAG-AGCAGCAATGGAT-GAGGCATG...
ALGO
0.9948
3.020455
{ "github_metadata": { "branch": "master", "commit_count": 1720, "repo_created_at": "2015-04-15T11:24:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 134, "forks": 60, "issues": 61, "pull_requests": 0 }, "file_meta": { "content_id": "0e1c...
e710c9eb-6043-4c63-8f26-1e6ca99ffe86
Fast-and-Steady/MoGakCo
junhapar/BOJ/20230320_9625/solution.cpp
#include <iostream> int main() { // Input K int K; std::cin >> K; // Make a two-dimensional array that save num of A and B appreance unsigned long long **num_AB = new unsigned long long *[K + 1]; for (int i = 1; i <= K; i++) num_AB[i] = new unsigned long long[2]; // Initial value of A and B when K == 1 num_A...
ALGO
0.999929
4.184529
{ "github_metadata": { "branch": "main", "commit_count": 542, "repo_created_at": "2023-02-10T21:36:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 14, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5b5bd37d28...
5198976a-322d-4438-8811-94a5a70abbe0
ishandutta2007/codeforces-h
heart_blue/normal/849/B.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.999989
3.425169
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6f0776d77be...
9e5fcb4b-41f3-412d-9492-0abdbbd155b3
vvvsgit/deitel_fifth_exercises
chapter_06/ex_06.18/ex_06.18.cpp
#include <iostream> int integerPower(int, int); int main() { std::cout << "\nEnter integer and power: "; int integer, power; std::cin >> integer >> power; std::cout << integerPower(integer, power) << " = " << integer << '^' << power << std::endl; std::cout << std::endl; return 0; } int intege...
ALGO
0.997518
6.216319
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-08-21T17:15: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": "3548047b762b...
4cb768d0-d615-44a4-872a-1fed4ad43603
Readiz/ProblemSolving
boj_unrated/from20230606/1725.cpp
#include <bits/stdc++.h> using namespace std; #ifdef ONLINE_JUDGE #define _D(...) #else #define _D(...) printf(__VA_ARGS__) #endif typedef long long ll; ll h[100010]; int N; int s[100010]; // 현재 스택에 들어있는 index는 w의 index int sp; int main() { scanf("%d", &N); for (int i = 1; i <= N; ++i) { scanf("%d", &...
ALGO
0.999973
4.075347
{ "github_metadata": { "branch": "master", "commit_count": 250, "repo_created_at": "2020-04-18T09:52: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": "88557a16...
57675ee3-37ab-482a-ba5d-7bc5711eeb43
wi-seong-cheol/Algorithm
Backjoon/Sort/2910.cpp
// // 2910.cpp // main // // Created by wi_seong on 2022/03/04. // #include <iostream> #include <algorithm> #include <vector> using namespace std; #define X first #define Y second int n, m; bool cmp(const pair<int, int>& a, const pair<int, int>& b) { return a.X > b.X; } int main() { ios::sync_with_stdio(...
ALGO
0.999995
3.935472
{ "github_metadata": { "branch": "main", "commit_count": 350, "repo_created_at": "2021-12-21T09:20: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": "aaf9589103...
740e2bea-67ba-4d71-a3ce-5cb6ea2dfbe5
Fortitude42/CompetitiveProgrammingArchive
Other Contests/VKOSHP XXII/G/a.cpp
//template by paradox & gege & parasat #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(li...
ALGO
0.999887
3.137487
{ "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": "61d7bbfd9bca...