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
7d2bdb20-0f28-4d61-bfe3-6d7b68ce51b2
adi-cohen/part2
StackSearcher.h
// // Created by yaron on 11/01/2020. // #ifndef PART2_STACKSEARCHER_H #define PART2_STACKSEARCHER_H #include "Isearcher.h" #include "stack" /* * This class extends the ISearcher interface, and represents an abstract class of an algorithm * which solve a search problem using a stack */ template< typename S,typena...
ALGO
0.996959
3.040952
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2020-01-08T13:14:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "06d17c81a...
875be538-6175-4eb3-83df-30c43b720117
FalendraDewangan/leetcode
382. Linked List Random Node.cpp
// Leetcode problem link // https://leetcode.com/problems/linked-list-random-node/ class Solution { ListNode* head; public: Solution(ListNode* head) { this->head = head; } // Time Complexity O(n) // Space Complexity O(1) int getRandom() { // // Solution 1 // int siz...
ALGO
0.998739
5.604769
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2023-01-21T17:52:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3615bfbdc6c...
bae385a6-65fb-44d7-97de-31da6943c365
GabrielSarturi00/Algoritimo
Soma dos elementos da matriz.cpp
/* Dado o código abaixo: 1) qual a soma dos elementos da matriz gerada? 2) qual a média dos elementos da matriz gerada? 3) qual o maior elemento da matriz gerada? 4) qual a soma dos elementos da diagonal principal da matriz gerada? 5) qual a soma dos elementos da primeira linha da matriz gerada? 6) qual a soma dos elem...
ALGO
0.998581
4.789313
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-08-05T18: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": "12952f485c2f...
13b32efc-4ec3-41c1-815a-15772cf73c21
mmp/pbrt-v3
src/samplers/maxmin.cpp
/* pbrt source code is Copyright(c) 1998-2016 <NAME>, <NAME>, and <NAME>. This file is part of pbrt. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of sou...
ALGO
0.98869
6.138239
{ "github_metadata": { "branch": "master", "commit_count": 737, "repo_created_at": "2015-06-15T18:13:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5017, "forks": 1212, "issues": 53, "pull_requests": 4 }, "file_meta": { "content_id": "f...
51a47ee2-e651-498b-bab5-9b4d11ae151a
ananyo141/CPP
C++ Primer Plus/Chapter 16/vector3.cpp
// Another variation of vector.cpp that uses sort, for_each, random_shuffle #include <iostream> #include <vector> #include <algorithm> #include <cctype> #include "readUtils.hpp" namespace { struct book_t { std::string name; int rating; void show() const { std::cout << rating <<...
ALGO
0.999516
6.048086
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2021-09-07T18:11: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": "d3ff73a53...
bd11886e-11e0-46eb-8cbb-9b9025a7080b
rtbkit/rtbkit
jml/judy/JudyLByCount.cc
// Copyright (C) 2000 - 2002 Hewlett-Packard Company // // This program is free software; you can redistribute it and/or modify it // under the term of the GNU Lesser General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // ...
ALGO
0.998304
6.316651
{ "github_metadata": { "branch": "master", "commit_count": 4430, "repo_created_at": "2013-02-18T23:16:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1084, "forks": 402, "issues": 16, "pull_requests": 12 }, "file_meta": { "content_id": "b...
c09d26a5-909c-4662-b0ba-cc39d7062022
Xarma123/cp-practice
E_Addition_to_Segment.cpp
#include <bits/stdc++.h> #define lol long long using namespace std; class SegmentTree { public: lol size; vector<lol> seg; SegmentTree(lol n) { size = 1; while (size < n) size *= 2; size *= 2; seg.assign(2 * size, 0); } void set(lol i, lol v) { ...
ALGO
0.999893
5.081434
{ "github_metadata": { "branch": "master", "commit_count": 176, "repo_created_at": "2022-09-18T23:21: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": "d9f3a6fb...
f3e6f7dd-a5ba-465e-849d-d10c7bc86953
anveshi/Competitive-Programming
Topcoder/EllysExpression.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999979
4.517026
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-02-12T06:24:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b8805d108...
ea2feb11-f553-46ab-8da3-397af69d4520
antonstakhouski/pathfidner
lab12.cpp
// Include standard headers #include <cstdio> #include <cstdlib> #include <iostream> // cout, endl #include <fstream> // fstream #include <vector> #include <string> #include <algorithm> // copy #include <iterator> // ostream_operator #include <boost/tokenizer.hpp> using namespace boost; using namespa...
ALGO
0.998649
3.870063
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-02-24T12:13: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": "364de533c9...
21465638-8441-4341-a348-1fae66ff5920
MohamedSondo/Algorithm_DataStructure_Code
Algorithm_DataStructure/Linked_List/Linked_List.cpp
#include <iostream> using namespace std; struct node { int data; node *next; } *head = NULL; bool Is_List_Empty() { if(head == NULL) return true; return false; } void Insert_At_Beginning(int value) { node *temp = new node; temp -> data = value; temp -> next = head; head = te...
ALGO
0.999244
4.479305
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-11-21T03:09:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c24f67458...
38cc0bb9-1313-4bde-bffb-d2d206865400
devruso/cpp
uri/1/1061.cpp
#include <iostream> using namespace std; int main() { int D,D1,Dt; int Tt1,H,M,S,H1,M1,S1,Tt2; int Y; string Z; cin >> Z >> D ; cin >> H >> Z >> M>> Z >> S; cin >> Z >> D1 ; cin >> H1 >> Z >> M1 >> Z >> S1; Tt1 = D*60*60*24 + H*60*60 + M*60 + S; Tt2 = D1*60*60*24 + H1*60...
ALGO
0.999617
3.677909
{ "github_metadata": { "branch": "main", "commit_count": 115, "repo_created_at": "2021-09-01T22:54: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": "de4703401a...
4b7ad3d9-f0e0-4cfe-9b3c-5150020b2af5
apzzoe/ZelayaApazaZoe_tp5
ejercicio4,lista.cpp
#include<iostream> using namespace std; typedef struct nodoPila *pnodoPila; typedef struct nodoPila{ int dato; pnodoPila siguiente; }; typedef struct Pila{ pnodoPila tope; }; void iniciarPila(Pila &pila){ pila.tope = NULL; } bool pilaVacia(Pila pila){ return pila.tope == NULL; } void push(Pila &pila, int v...
ALGO
0.994505
3.998362
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2025-06-29T16:44:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1bc6850c0d...
1f5b3ebe-81ea-46ee-853e-55582d6945cf
QuanNM-PTIT/Data_Structures_and_Algorithms_PTIT
Stack/DSA07006 - XÓA DẤU NGOẶC.cpp
// Created by <NAME> #include<bits/stdc++.h> using namespace std; #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define ll long long #define FOR(i, a, b) for(int i = a; i <= b; i++) #define FORD(i, a, b) for(int i = a; i >= b; i--) #define F(i, a, b) for(int i = a; i ...
ALGO
0.999341
4.301136
{ "github_metadata": { "branch": "main", "commit_count": 228, "repo_created_at": "2022-03-09T14:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 93, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86d442a1...
c9fc55fd-4265-4954-8eb7-118c343df0b9
Return0-iiitdwd/Striver-SDE-Sheet
CPP/Arrays Part-II/Repeat-and-Missing-Number.cpp
// Link: - https://www.interviewbit.com/problems/repeat-and-missing-number-array/ #include <iostream> #include <vector> #include <unordered_map> using namespace std; // Ignore this :-) class Solution { public: vector<int> repeatedNumber(const vector<int> &nums); }; // Approach - 1 (Using Extra Space) Time: - O(n...
ALGO
0.999976
5.449095
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-07-06T05:43:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af5d12d248dc...
0c6b226b-8777-4d8e-a175-ac2db4694297
Kang-il/TIL
dynamic programming/dp_ex23.cpp
#include <iostream> int D[1001]; int A[1001]; int main(){ //(11722) //가장 긴 감소하는 부분수열 //수열 A가 주어졌을 때 가장 긴 감소하는 부분수열의 길이를 구하는 프로그램을 작성하시오 //ex> A=[10,30,10,20,20,10] [30,20,10] 이고 길이는 3이다. //첫째 줄에 수열 A의 크기 1 <= N <= 1000 //둘 째 줄에 수열 A를 이루고있는 수가 주어진다 1<= A <= 1000 std::ios_base::sync_with_stdi...
ALGO
0.999846
4.181674
{ "github_metadata": { "branch": "develop", "commit_count": 185, "repo_created_at": "2021-12-15T05:36:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ea9bb8...
b292a8cc-e8a4-41d3-8d65-39ccce36658a
pupaorlupa/lr1_project
include/LR1.h
#include <set> #include <stack> #include <unordered_map> #include <vector> #include "grammar.h" const char kStartNonterm = '@'; const char kLastSymb = '$'; class LR1 { public: LR1(Grammar grammar); bool Predict(std::string word); private: enum ActionTypes { Shift, Reduce, Accept }; struct Act { Act...
ALGO
0.995735
4.994925
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-19T10:12: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": "5db2ee44fa5d...
f22c092b-7df3-430c-92c5-a71ffc46a5ef
GendalfBlack/P21_Lessons
ConsoleApplication22/ConsoleApplication3/ConsoleApplication3.cpp
#include <iostream> using namespace std; // Задача 1. Створити функцію що приймає два показчики на елементи масива // та повертає відстань між цими елементами в масиві // Задача 2. Створити функцію що приймає масив та його розмір та повертає // відстань між найменшим та найбільшим елементами int f1(int* pa, int* pb)...
ALGO
0.997299
4.435532
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2023-04-12T10:44:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a3f7c007...
1813af8e-3621-4aa2-a9f6-cc874a1243f1
ar90n/lab
contest/topcoder/301/InsertionSortCount.cpp
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; class InsertionSortCount { public: int countM...
ALGO
0.999801
5.042116
{ "github_metadata": { "branch": "main", "commit_count": 792, "repo_created_at": "2017-01-03T04:15:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 151 }, "file_meta": { "content_id": "67895bad...
820c8226-a573-4c0e-a1cf-562709bb7e7a
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/03/0318/personal_submission/cf772b_harmonly.cpp
#include <iostream> #include <vector> #include <cmath> #include <iomanip> using namespace std; typedef long double ld; struct P { ld x, y; P(){} P(ld x, ld y) : x(x), y(y) {} void read() { cin >> x >> y; } P operator + (P b) { return P{x + b.x, y + b.y}; } P operator - (P b) { return P{x - b.x, y - b.y}; } P ...
ALGO
0.999804
4.930544
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "6446...
9d85e254-2e56-4015-864c-774db090c652
BekzhanKassenov/olymp
ACM-ICPC/Quarter Finals/Northern 2010/C/Main.cpp
/**************************************** ** Solution by NU #2 ** ****************************************/ #include <bits/stdc++.h> using namespace std; #define F first #define S second #define MP make_pair #define all(x) (x).begin(), (x).end() #define File "commuting" typedef long long ll; typed...
ALGO
0.999996
3.555781
{ "github_metadata": { "branch": "master", "commit_count": 426, "repo_created_at": "2015-07-29T15:25:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37475143...
1518e6af-4cb3-41de-ace6-c8d9511e3f08
yunlongwang1995/helloc
3_study/algorithm/leetcode/099_recoverTree.cc
/** * 给你二叉搜索树的根节点 root ,该树中的 恰好 两个节点的值被错误地交换。 * 请在不改变其结构的情况下,恢复这棵树 。 * * 输入:root = [1,3,null,null,2] * 输出:[3,1,null,null,2] * 解释:3 不能是 1 的左孩子,因为 3 > 1 。交换 1 和 3 使二叉搜索树有效。 * * 输入:root = [3,1,4,null,null,2] * 输出:[2,1,4,null,null,3] * 解释:2 不能在 3 的右子树中,因为 2 < 3 。交换 2 和 3 使二叉搜索树有效。 * * 思路:中序遍历是排序的 */ #include ...
ALGO
0.999987
6.096083
{ "github_metadata": { "branch": "main", "commit_count": 105, "repo_created_at": "2022-04-11T10:38:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e723b0915...
545edb1c-8bcd-4961-b3a8-47b051a43c47
Ethan4582/Codeforces-solution
CODEFORCES/A_set/A_New_Bus_Route.cpp
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define pb push_back #define vi vector<int> #define vll vector<ll> #define pi pair<int,int> #define vs vector<string> #define vpii vector<pair<int, int>> #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define rep(i, a,...
ALGO
0.999943
4.208861
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2024-02-27T18:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd4c1f37...
80f769c9-e9e9-4693-bfe0-d4ca545ef9bb
rohitbukan/DataStructure
circular queue.cpp
/*Circular*/ #include <iostream> #include<ostream> using namespace std; int Q[100],maxsize,rear,front,count; void Createqueue(int size) { maxsize=size; front=0; rear=-1; count=0; } void Enqueue(int e) { rear=rear+1%maxsize; count++; Q[rear]=e; } int Dequeue() { int temp; count--; ...
ALGO
0.991546
3.995399
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2020-10-07T13:44:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40c8d01ee834...
9a941158-f8d5-4cee-b3e9-614e48b592b4
avizyt/learningcpp
stackAndQueue/queue-problems/first-nbinaray-numbers.cpp
/* 📌 Problem: Given a number N, print the first N binary numbers in sequence. 💡 Key Concept: Use a queue to generate binary numbers in level-order, like BFS in a binary tree. 🔍 Example: Input: N = 5 Output: 1 10 11 100 101 */ #include <bits/stdc++.h> using namespace std; void printFirstNBinaryNumbers(int n) { ...
ALGO
0.999986
6.065409
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2024-11-16T18:24:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da12882ad7f...
2ec92af7-2847-4cb9-b3f0-fc6a4f271c25
zieckey/monkeyking
huffman.cpp
// A Huffman tree node struct MinHeapNode { char data; // One of the input characters uint32_t freq; // Frequency of the character MinHeapNode* left, *right; // Left and right child of this node }; // A Min Heap: Collection of min heap (or Hufmman tree) nodes struct MinHeap { uint32_t size; // Current si...
ALGO
0.999996
4.229765
{ "github_metadata": { "branch": "master", "commit_count": 550, "repo_created_at": "2017-04-25T02:25:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb76b29e...
586d2081-0944-44a0-8a68-1cbe9576e950
songhanglucky/Compack3D
benchmarks/Compack3D_benchmark_cuda_api_dim_j.cpp
#include "Compack3D_api.h" #include <stdexcept> #include <mpi.h> #include <chrono> #include <cmath> #define COEF_ALP 0.50 #define COEF_BET 0.05 #define COEF_A ( 17.0 / 12.0 / 2.0) #define COEF_B (101.0 / 150.0 / 4.0) #define COEF_C ( 1.0 / 100.0 / 6.0) #define DOM_LEN 6.283185307179586 #define K_WAVE 2....
ALGO
0.996604
5.762442
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2024-05-07T17:33:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "370146a0ed...
59cbb475-f4df-43f0-acc9-f3c1fd008585
windystrife/UnrealEngine_NVIDIAGameWorks
Engine/Source/ThirdParty/IntelEmbree/Embree2140/src/kernels/geometry/grid_soa_intersector.h
// ======================================================================== // // Copyright 2009-2017 Intel Corporation // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // y...
ALGO
0.988487
3.357564
{ "github_metadata": { "branch": "4.18-GameWorks", "commit_count": 14, "repo_created_at": "2018-03-06T15:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 284, "forks": 176, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id"...
0492bca4-4e6d-4ab2-a14c-5ac9f9139455
win-luck/ChaeAlgorithm
Tree/14950.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; int N, M, t; int result = 0; bool visited[10001]; vector<vector<pair<int, int> > > edges; // 다음 노드, 비용 priority_queue<pair<int, int> > pq; // 비용, 다음 노드 void prim(int pos, int cnt){ // prim 알고리즘 적용 (왜? 간선 기준이 아닌 노드 기준으로 탐색하므로) visited[p...
ALGO
0.999886
4.505471
{ "github_metadata": { "branch": "main", "commit_count": 691, "repo_created_at": "2022-07-09T12:05: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": "c4207aef8a...
45055c11-407d-41eb-ab68-3cf762ddabd1
Mulab11/cntt2016-hw1
TC-SRM-596-div1-1000/xumingkuan.cpp
#include <cstring> #include <cmath> #include <iostream> #include <vector> #include <algorithm> #include <queue> #include <map> #include <set> #include <cctype> #include <cassert> using namespace std; const int MAXN = 1010101, oo = 101010101; class SparseFactorial { private: int temp[MAXN]; vector<int> solve_prime_pow...
ALGO
0.999731
3.88238
{ "github_metadata": { "branch": "master", "commit_count": 4450, "repo_created_at": "2016-09-28T13:04:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 28, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "1d18c...
4c29462f-0062-48c0-9ecd-219952deea64
aminzayer/CPPApps
Algorithms/Function-Sin.cpp
#include <iostream.h> #include <conio.h> int pow(int a, int b); int fact(int a); double sin(int (*p)(int a, int b), int (*q)(int b), int x); void main() { int x; clrscr(); cout << "Please Enter Number : "; cin >> x; cout << fact(x) << endl << pow(x, x); //cout<<sin(pow,fact,x); get...
ALGO
0.998724
4.370121
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2021-12-22T17:18:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef474625c5e...
9b0c7cc5-7d11-4815-af47-a4a2d07fdcd0
Sheila-ops/C-DICTIONARY-
c++.dictionary.cxx
#include <iostream> #include <string> using namespace std; int main() { string a; while (true) { cout << "Enter your word (or type 'EXIT' to quit): "; cin>> a; if (a == "EXIT") { cout << "Exiting the program." << endl; break; } ...
ALGO
0.942962
3.586751
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-03-30T06:28:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc4c90ef232f...
5eb7546d-8a05-4551-8d09-2e867f358283
leadhub-code/hyperloglog
pyhllpp/cpp_src/hll.cpp
#include <cstring> #include <cmath> #include <stdexcept> #include "hll.hpp" #include "hll_magic.hpp" #include "murmur.hpp" namespace hll { // SONGNOTE: only for cython except + _HLL::_HLL() : precision(0), size(1), seed(0) { registers = new register_type[size]; } _HLL::_HLL(uint32_t precision, uint32_t seed) : ...
ALGO
0.988865
5.387727
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-07-17T14:50:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "0892895b57...
b7f8082e-2d34-44c3-9910-e3c760d41e84
mohammaderfani1996/repo759
FinalProject/SequentialCollisionDetector.cpp
#include "defs.hpp" #include <cmath> #include "SequentialCollisionDetector.hpp" #include <stdio.h> #include <set> #include "utils.hpp" void SequentialCollisionDetector::getLikelyCollisions(SphericalSatellite sats[], int nSats, SphericalSatellite possibleColliders[], int nPossibleColliders, double t, double tolerance, ...
ALGO
0.999849
6.109536
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2025-02-04T02:48:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "805f6ea36ff...
99bb338d-f5d8-4a78-b930-519530698918
sftrabbit/CppPatterns-Patterns
common-tasks/algorithms/copy-range-of-elements.cpp
// Copy a range of elements // C++11 #include <vector> #include <algorithm> #include <iterator> std::vector<int> target2(5); std::vector<int> target3; template <typename RangeOfInts> void foo(RangeOfInts source) { std::vector<int> target1{std::begin(source), std::end(source)}; std::co...
TOOL
0.968936
6.527464
{ "github_metadata": { "branch": "master", "commit_count": 267, "repo_created_at": "2015-04-06T10:09:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1440, "forks": 222, "issues": 11, "pull_requests": 7 }, "file_meta": { "content_id": "5a...
3e489aa5-4e5b-4f44-b1c4-deb845ded088
Dzy0726/LeetCode-Practice
Stack&Queue/225.用队列实现栈/implement-stack-using-queues.cpp
/*** * @Author: Dzy0726 * @Date: 2024-01-05 14:59:57 * @LastEditors: Dzy0726 * @LastEditTime: 2024-01-05 15:08:07 * @FilePath: \LeetCode-Practice\Stack&Queue\225.用队列实现栈\implement-stack-using-queues.cpp * @Description: * @ * @Copyright (c) 2024 by <NAME>, All Rights Reserved. */ // My Solution class MyStack ...
ALGO
0.999776
5.907434
{ "github_metadata": { "branch": "main", "commit_count": 288, "repo_created_at": "2023-04-06T15: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": "f1d2c06c19...
147e2b6b-b1ec-41a9-ab18-08ab030e0f8b
diccooo/aoapc2-bac-UVa
8/UVa120.cpp
#include <cstdio> #include <iostream> #include <sstream> #include <algorithm> using namespace std; const int maxn = 30 + 5; int n, a[maxn]; void flip(int p) { for (int i = 0; i < p - i; ++i) swap(a[i], a[p - i]); printf("%d ", n - p); } int main() { string s; while (getline(cin, s)) { ...
ALGO
0.999853
3.365235
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-01-10T17:21: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": "9bc23c650...
85dfc679-e789-4e86-b648-309cbea6bffc
Hong-JinSuk/ProblemSolving_2023
[3-2][방학4주차][골드3]BaekJoon_1644, 소수의 연속합.cpp
#include<iostream> #include<vector> #include<algorithm> #include<cmath> using namespace std; int N; vector<int> Sosu; int main() { cin >> N; vector<bool> Num(N + 1); Num[1] = true; for (int i = 2; i < sqrt(N) + 1; i++) { if (!Num[i]) { for (int j = i + i; j < N + 1; j += i) Num[j] = true; } } // 에라토...
ALGO
0.999924
3.955351
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2023-01-12T08:58:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "ecdfbd5924...
44b481a2-d975-4d81-bdf7-fb824f5a5d42
stalker5217/problem-solving
LEETCODE/542.cpp
#include <vector> #include <queue> using namespace std; class Solution { public: vector<vector<int>> updateMatrix(vector<vector<int>>& mat) { queue<pair<int, int>> q; vector<vector<int>> answer(mat.size(), vector<int>(mat[0].size())); for(int i = 0 ; i < mat.size() ; i++) { ...
ALGO
0.999982
5.796501
{ "github_metadata": { "branch": "master", "commit_count": 934, "repo_created_at": "2019-06-09T06:19:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41cd898e...
b3839796-9544-461e-be79-9f441e82d537
zhangzhex/leetcode
Algorithm/Algorithm/2021/数组/15 三数之和.cpp
// // 15 三数之和.cpp // Algorithm // // Created by 熊章哲 on 2021/3/14. // Copyright © 2021 zack. All rights reserved. // #include <stdio.h> #include <vector> using namespace std; class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> result; if (nums.size() ...
ALGO
0.999394
6.114212
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2020-06-01T15:07: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": "ea22b11b3...
ecfd3e7c-93c1-4bf9-bcab-2edfe5342b39
Yameroom/Sistem-Cerdas
Praktikum 11/tugas2.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; // Fungsi keanggotaan trapezoid float trapmf(float x, float a, float b, float c, float d) { if (x <= a || x >= d) return 0; else if (x >= b && x <= c) return 1; else if (x > a && x < b) return (x - a) / (b - a); else return...
ALGO
0.998999
6.122693
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2025-05-21T03:46: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": "bfc273f91e...
765643de-8fa0-46a8-be92-b033da7c9ecb
Kattis-Everyday/KattisSolutions
Changrui/C++/Kattis_The_Backslash_Problem.cpp
// // main.cpp // Kattis_The Backslash Problem // // Created by mcr on 28/10/2020. // #pragma GCC optimize(3,"Ofast","inline") //#include <bits/stdc++.h> #include<iostream> #include<sstream> #include<iomanip> #include<cmath> # include <string.h> #include<math.h> #include<string> #include<vector> #include<queue> #i...
ALGO
0.998441
3.480438
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-05-19T14:27:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbc1d0837a92...
4408de29-05ff-4a5c-beb9-60929a6c1a35
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p03228/s791830889.cpp
#include <bits/stdc++.h> #include <type_traits> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define ddrep(i, n) for (int i = n; i > 0; --i) #define srep(i, s, t) for (in...
ALGO
0.999987
4.266111
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "00605d33f4...
c9f1faa0-938b-4537-b216-0df238cbd5f3
davidinsuasty/MonitoreoVehicular
MoveConsole/MoveConsole/tracker.cpp
#include "tracker.h" Tracker::Tracker() { } /////////////////////////////////////////////////////////////////////////////////////////////////// Tracker::Tracker(std::vector<cv::Point> _region) { currentRegion = _region; currentBB = cv::boundingRect(currentRegion); cv::Point center; center.x = (2*cur...
ALGO
0.998591
5.125446
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-10-13T18:36: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": "1441462da...
e628af0e-9716-4fa1-bdd1-4d887b093eed
dstbstr/AdventOfCode
AdventOfCode/src/2015/d20_ElfDelivery.cpp
#include "Common.h" SOLUTION(2015, 20) { constexpr u32 CountPresents(u32 houseNumber) { auto divisors = Constexpr::GetDivisors(houseNumber); return std::accumulate(divisors.cbegin(), divisors.cend(), 0) * 10; } constexpr u32 CountLazyPresents(u32 houseNumber) { u32 threshold = hous...
ALGO
0.998716
4.975469
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-10-10T23:08: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": "fc964d35fbf...
01b1a516-af3e-495c-9d55-784c1c36ee39
Divyansh4767/Leet-Code-Problem-Solution
402-remove-k-digits/remove-k-digits.cpp
class Solution { public: string removeKdigits(string num, int k) { //TC & SC - O(N) stack<char> st; //Remove larger digits before smaller ones for(int i=0;i<num.size();i++){ while(!st.empty() && st.top() > num[i] && k > 0){ st.pop(); k--; ...
ALGO
0.999994
6.330919
{ "github_metadata": { "branch": "main", "commit_count": 250, "repo_created_at": "2024-03-05T10:13:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3cf2ea0a66...
c0358824-8e6c-49f1-a966-0cc58b59e2cb
KasarLooper/tsols
7_dp2/k.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long ll; void fastIO() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } void print_matr(vector<vector<int>>& a) { for (int i = 0; i < a.size(); i++) { for (int j = 0; j < a[i].size(); j++) { ...
ALGO
0.999998
3.53807
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2025-01-07T11:06: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": "b53f31b92...
331994c1-f552-4773-bf12-2db6862d2d2e
UnknownPersik/CPP_Homeworks-
28.05.2022/197.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n, m = 1; cin >> n; vector<vector<long long>> massiv(n, vector<long long>(n, 0)); int x = 0, y = 0; massiv[0][0] = 1; while (m < n * n){ if (n == 1) break; if (x < n - 1) x++; ...
ALGO
0.999971
3.482614
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2022-03-21T17:11: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": "d1d057be22...
00dd54a5-a3f8-4554-bbed-8962e4602474
KyuJeong/Algorithm
Algorithm/CodeForces/568_Div. 2/568_D_Extra Element.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair <ll, int> pli; int n; vector <pli> v; vector <ll> dif; int main() { cin.tie(NULL); std::ios::sync_with_stdio(false); cin >> n; v.resize(n); for (int i = 0; i < n; i++) { cin >> v[i].first; v[i].second = i + 1; } if (n <=...
ALGO
0.999919
3.205164
{ "github_metadata": { "branch": "master", "commit_count": 868, "repo_created_at": "2017-12-11T09:47: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": "6b4f1e5e...
c7e53f36-5986-4a83-8c5d-9a3889121221
Gavinotfound/usaco2023
USACO_Section_1/P1201贪婪的送礼者.cpp
#include <iostream> using namespace std; struct Person { string name; int m = 0; } p[15]; int find_name(string name0) { int x = 0; while (x < 14) { if (p[x].name == name0) return x; x++; } return x; } int main() { int n; cin >> n; // 读取姓名 for (...
ALGO
0.999895
3.540718
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2023-12-16T07:08: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": "e6c6ee18d...
c7fc3346-17cd-417c-8700-c2fcb4c89c15
akshaykamath45/dsa-cpp
arrays/easy/largestElement.cpp
// Brute Force // Intuition: // We can sort the array in ascending order, hence the largest element will be at the last index of the array. // Approach: // Sort the array in ascending order. // Print the (size of the array -1)th index. #include <bits/stdc++.h> int largestElement(vector<int> &arr, int n) { sort(a...
ALGO
0.999824
5.478598
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2024-02-01T16:33: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": "f27a672f90...
5f9652a7-2b2d-41de-87fb-7f5a62e7da6a
saharebrahimi/Principles-of-Computer-Programming
SNAKE.CPP
#include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<time.h> #include<string.h> int x,y,l=1; int k=0; int e=0,r; int far * screen =(int far *) 0XB8000000; int sx[100]; int sy[100]; int slen=2; char n=49; char c; char funckey(int &T) { char c=getch(); if(c==0) { T=1; c=getch(); ...
TOOL
0.992202
3.138592
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-11-12T11:14: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": "7218a3362401...
797952b8-3378-4c33-a7a6-bd13a81fccad
ishandutta2007/codeforces-s
smax/normal/1015/B.cpp
#include <bits/stdc++.h> using namespace std; #define f0r(a, b) for (long long a = 0; a < b; a++) #define f1r(a, b, c) for (long long a = b; a < c; a++) #define f0rd(a, b) for (long long a = b; a >= 0; a--) #define f1rd(a, b, c) for (long long a = b; a >= c; a--) #define ms(arr, v) memset(arr, v, sizeof(arr)) #define...
ALGO
0.99997
3.754052
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "d75891371f3e...
c527d6da-000a-4109-a42c-98b760175a8f
Lujialun/CodePractice
leetcode/leetcode540.cpp
/* * @Descripttion: 540. 有序数组中的单一元素 https://leetcode-cn.com/problems/single-element-in-a-sorted-array/ * @version: * @Author: Lucas * @Date: 2020-08-25 14:44:33 * @LastEditors: Lucas * @LastEditTime: 2020-08-25 14:58:35 */ class Solution { public: int singleNonDuplicate(vector<int>& nums) { int res=...
ALGO
0.999796
5.776685
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2020-07-07T13:01:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2454d69b2...
1b51dbdb-8f45-42ea-9a89-e7fcab5516e2
ishandutta2007/codeforces-s
staniewzki/normal/1161/B.cpp
#include<bits/stdc++.h> using namespace std; #define FOR(i, a, b) for(int i = a; i <= b; i++) #define REP(i, a) for(int i = 0; i < a; i++) #define EB emplace_back #define ST first #define ND second using LL = long long; using PII = pair<int, int>; template<class L, class R> ostream& operator<<(ostream &ost, pair<L, R...
ALGO
0.999994
4.238431
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "57142b1a22b6...
d006e48d-1c08-4755-b783-53fa6e0bc8dc
huangallen2008/cppcode
code/競賽/其他/氣球杯11th解答/kth_subarray_average/gen.cpp
#include <bits/stdc++.h> #include "testlib.h" using namespace std; // #define int long long int rd(int l, int r) { return rnd.next(l, r); } int get_total_subarrays(int n) { return n * (n + 1) / 2; } signed main(int argc, char* argv[]) { registerGen(argc, argv, 1); if (argc < 4) { cerr << "U...
ALGO
0.99878
3.489605
{ "github_metadata": { "branch": "main", "commit_count": 21357, "repo_created_at": "2024-06-07T09:21: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": "3e99df27...
dfe0980f-f540-43db-91dc-4010ce52729c
yang48699997/code
cf/2024/List/148D.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; void solve() { int a, b; cin >> b >> a; vector<vector<double>> dp(a + 1, vector<double> (b + 1)); for (int i = 1; i <= b; i++) dp[0][i] = 1; for (int i = 1; i <= a; i++) { for (int j = 1; j <= b; j++) { double...
ALGO
0.999729
4.280015
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2024-04-12T14:28: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": "b880bbe5b...
75862c69-14a4-488b-8ebf-b29a3b80ae47
intfloat/AlgoSolutions
jiuduoj/1537.cpp
// dynamic programming should work #include <vector> #include <list> #include <limits.h> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <io...
ALGO
0.999922
3.520843
{ "github_metadata": { "branch": "master", "commit_count": 527, "repo_created_at": "2013-04-16T14:53:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ce7161...
6bbe47e6-8612-4212-8b63-001364dfd691
hxbloom/armtest
src/arm_cpps/prelu_arm.cpp
#include <arm_neon.h> #include <stdio.h> int main() { int nn = 5; int nn2 = 5; const float slope = 0.01; float c0[20] __attribute__((aligned(16))) = {-5,-4,-3,-2,-1,0,1,2,3,4,4,3,2,1,0,-1,-2,-3,-4,-5}; float d0[20] __attribute__((aligned(16))) = {-5,-4,-3,-2,-1,0,1,2,3,4,4,3,2,1,0,-1,-2,-3,-4,-5}; ...
ALGO
0.99975
4.195158
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-03-02T05:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "884087273a...
2e13c1b7-1364-44b6-8e26-6bf012d4b747
wuzoo/Solving_problem
백준/골드/2239. 스도쿠/2239.cpp
#include <bits/stdc++.h> using namespace std; int arr[10][10]; bool isEnd; vector<pair<int, int>> v; bool check(int x, int y, int k){ for(int i = 1; i <= 9; ++i){ if(arr[x][i] == k && y != i) return false; if(arr[i][y] == k && x != i) return false; int nx = (x - 1) / 3 * 3 ...
ALGO
0.999962
4.695166
{ "github_metadata": { "branch": "main", "commit_count": 541, "repo_created_at": "2023-10-25T08:43: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": "693aaca862...
8655e2e8-2f79-4233-9807-79a30385609d
max423/Vectorization-on-BAN-library-for-ARM-SVE-and-NEC-AURORA
Vectorization on SVE/include/cppban/ban.h
#include <iostream> #include <stdexcept> #include <cmath> #include <fstream> #include <iomanip> #include <cstring> using namespace std; typedef double T; // generates inaccuracies in division proportional to 1e-6 class Ban; typedef Ban ban; #define SIZE 12 #define EVEN_SIZE !(SIZE & 1u) #pragma pack(push, 1) cla...
TOOL
0.936339
3.038491
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-09-19T09:50:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "237a322a4e97...
dd7af7d9-7dc4-47ca-9b22-9f89f7821d4a
mahbubcseju/Programming-Problem-Solutions
Codeforces/contest_id_690/Recover Polygon (easy).cpp
/******************************** *MAHBUBCSEJU * *CSE 22 * *JAHANGIRNAGAR UNIVERSITY * *TIMUS:164273FU * *UVA>>LIGHTOJ>>HUST:mahbubcseju */ #include<bits/stdc++.h> #define ll long long int #define ull unsigned long long int #define I(a) scanf("%d",&a) #de...
ALGO
0.99995
3.274766
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2019-08-01T01:58:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6271b9813...
48bdfd56-1d1b-4abb-90b5-f84318a2e9b1
aberry5621/cplusplus_book_source_code
Reverse.cpp
#include <iostream> using namespace std; // newList is the reversal of list void reverse(const int list[], int newList[], int size) { for (int i = 0, j = size - 1; i < size; i++, j--) { newList[j] = list[i]; } } void printArray(const int list[], int size) { for (int i = 0; i < size; i++) cout << list[...
ALGO
0.959151
5.37258
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-09-26T17:43: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": "4bce45e3aa...
4263714e-2a2d-444d-bdb5-d4a08bbc79d6
AllanHasegawa/rsa_fun
sourcetree/decrypt.cpp
#include <string> #include <iostream> #include <fstream> #include "gmp.h" #include "gmpxx.h" #include "cereal/archives/binary.hpp" #include "cereal/types/vector.hpp" #include "cereal/types/string.hpp" #include "rfutils.hpp" #include "rsafun.hpp" int main(int argc, char* argv[]) { using namespace std; string usage ...
ALGO
0.966676
5.575113
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2013-10-13T00:42: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": "33b8d8cf3...
de1257d0-025c-414f-8ae2-c6ecd6ba68b6
rv-raunak/Cpp-Chronicles
Testers/RoundRobin.cpp
#include <iostream> #include <queue> using namespace std; struct Task { int id; int burstTime; int remainingTime; int waitingTime = 0; int turnaroundTime = 0; }; int main() { int taskCount, quantum; cout << "Enter the total number of tasks: "; cin >> taskCount; cout << "Enter the ...
ALGO
0.999945
4.356205
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-05-22T19:05: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": "2adca626799c...
fd8ea90e-78af-406f-8083-7c83f062b131
timoothy21/SOCS_Binus
D6331-LD75-ASG_11-BDG/C-Stock.cpp
#include <stdio.h> #include <string.h> struct Product{ char product[51]; int item; }; int search(char target[], int totalbarang, Product barang[]) { int hasil = -1; for(int i = 0; i < totalbarang; i++){ if(strcmp(target, barang[i].product) == 0){ hasil = i; return hasil...
ALGO
0.987055
3.471622
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-03-26T09:05: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": "a6c654279b1d...
7633e98b-903a-421a-8406-b196b85159db
AplusB/ACEveryDay
wuyiqi/686C.cpp
#include <bits/stdc++.h> using namespace std; vector<int> Split(int n) { vector<int> ret; if(n == 0) { ret.push_back(0); } for( ; n; n /= 7) ret.push_back(n % 7); reverse(ret.begin(), ret.end()); return ret; } vector<int> a, b; int ans; void dfs(int now, int tot, vector<int> &c) { ...
ALGO
0.999992
3.577608
{ "github_metadata": { "branch": "master", "commit_count": 3924, "repo_created_at": "2016-05-15T06:08:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 19, "forks": 21, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "207f84...
8de43d1d-6961-4df0-be83-43f5a9bc3915
yzygitzh/oj_solutions
usaco/src/heritage.cpp
/* Use the slash-star style comments or the system won't see your identification information */ /* ID: yzylive1 TASK: heritage LANG: C++ */ /* LANG can be C++20 or C++14 for those more recent releases */ #include <iostream> #include <sstream> #include <iomanip> #include <fstream> #include <vector> #include <algorith...
ALGO
0.999969
4.605655
{ "github_metadata": { "branch": "master", "commit_count": 219, "repo_created_at": "2017-01-28T15:31:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "753cbe13...
8a6ee4c5-5644-45e7-9ce0-489b4302d438
fsps60312/old-C-code
C++ code/Croatian Open Competition in Informatics/DIVLJAK(2).cpp
#include<cstdio> #include<cassert> #include<vector> #include<map> #include<queue> #include<algorithm> #include<ctime> using namespace std; struct SegTree { int n; vector<int>sum; void Build(const int id,const int l,const int r) { while(id>=(int)sum.size())sum.push_back(0); sum[id]=0; if(l<r) { const int ...
ALGO
0.999788
4.046121
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-06-03T16:13: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": "b0b1f696e8...
bd1a2276-8f40-4626-806f-0682e32fc529
AaryaTiwari1211/SEM4
Competitive Programming (Lab)/EXP 2/candy.cpp
// Online C++ compiler to run C++ program online #include <iostream> using namespace std; void zig_zag(int n, int data) { bool flag = true; for(int i=1;i<=n;i++) { cout<<i<<" "; } cout<<endl; for(int i=1;i<=n;i++) { cout<<"* "; data--; if(data==0) { ...
ALGO
0.999986
3.480878
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2023-04-12T15:00:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b76cbf9f364...
1786b1ef-5f3c-44ab-a71b-1a79a5f95e8b
HeegeePark/DataStructure
FinalNote/그래프_인접행렬/그래프_인접행렬/graph.cpp
#include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; const int MAX = 10; // 5 6 (정점의 개수, 간선의 개수) // 1 2 1 --- 2 // 1 3 | \ / // 1 4 | \ / // 2 4 3 4 --- 5 // 4 5 ㄴ ------/ // 3 5 // Q1. 정점 X와 Y가 연결이 되어 있는가? (YES/NO) // Q2. 정점 X와 연결이 되어 있는 모든 정점을 출력하라. bool isConnected(int myGra...
ALGO
0.999897
3.865451
{ "github_metadata": { "branch": "master", "commit_count": 402, "repo_created_at": "2019-08-11T05:13: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": "f356bd24...
80b9d40b-68bc-4e28-976e-204b92064a96
FilipRosiak1/VRPTV-Problem
tabu search.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <string> #include <vector> #include <sstream> #include <math.h> #include <chrono> #include <random> using namespace std; class Klient { public: int numer, x, y, zapotrzebowanie, od_kiedy, do_kiedy, czas_obslugi; Klient(int NO, int XCOORD, i...
ALGO
0.997362
3.198951
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-15T00:53:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ade90e9eee56...
0c5adb54-32ad-4b97-a7c5-643c3ab63a41
VMDang/WorkspaceAlgorithms
AppliedAlgorithms_20221/Lab01/Maze_20205063.cpp
#include <bits/stdc++.h> using namespace std; const int maxN = 999; typedef pair<int, int> location; int visited[maxN][maxN], d[maxN][maxN], m, n, r, c; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; queue<location> q; int Try() { q.push(location(r, c)); // Dua diem bat dau vao queue d[r][c] = ...
ALGO
0.999864
3.879696
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-03-12T04:19:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8df425008d...
11d68bc2-a0d3-4fb0-b4dd-7d90387c92a0
dbaumeister/dbcpu
btree/BTree.h
// // Created by dbaumeister on 19.05.15. // #ifndef PROJECT_BTREE_H #define PROJECT_BTREE_H #include <vector> #include <atomic> #include <pthread.h> #include "../slottedpages/segment/TID.h" #include "../slottedpages/segment/SPSegment.h" const uint64_t NO_NEIGHBOR = ~(uint64_t) 0; template<class KeyT, class CompT>...
ALGO
0.996288
4.898534
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2015-04-14T11:24: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": "5fea1a1dc...
84c63d3b-5f21-4751-b17d-1c78d4a30b5b
hyowonii/algorithm-prac
BarkingDog/TwoPointer/BOJ2230.cpp
/* 백준 [수 고르기] https://www.acmicpc.net/problem/2230 투포인터 */ #include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long ll; vector<ll> A; ll result = 10e9; int main(void) { ios::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; for(int i=0; i<n; i++) { ...
ALGO
0.999992
4.016098
{ "github_metadata": { "branch": "main", "commit_count": 266, "repo_created_at": "2022-03-16T16:24:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "f93bbee56f...
b789a0d2-51a9-414e-855a-e99981e4b8bf
Tencent/matrix
matrix/matrix-android/matrix-backtrace/src/main/cpp/external/libunwindstack/deps/liblzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp
// BrowseDialog.cpp #include "StdAfx.h" #include "../../../Common/MyWindows.h" #include <commctrl.h> #ifndef UNDER_CE #include "../../../Windows/CommonDialog.h" #include "../../../Windows/Shell.h" #endif #include "../../../Windows/FileName.h" #include "../../../Windows/FileFind.h" #ifdef UNDER_CE #include <commd...
TOOL
0.905579
6.019873
{ "github_metadata": { "branch": "master", "commit_count": 3303, "repo_created_at": "2018-12-11T07:08:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11861, "forks": 1908, "issues": 366, "pull_requests": 31 }, "file_meta": { "content_id":...
12d620e0-acca-4c89-bdfe-a4b02555bf41
lgarest/42
LI/lab/PROLOG/labos3/entrega/ComprovadorH.cpp
// <NAME> grup: 11 entrega 3 #include <iostream> #include <vector> #include <string> #define DIES 5 #define HORES_DIA 12 using namespace std; struct app { int assig, prof, aul; }; vector<vector<int> > hora; vector<int> nHores; vector<int> profe; vector<int> aula; vector<vector<int> > curs; vector<vector<app> > ve...
ALGO
0.994254
3.64548
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2014-09-15T16:58: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": "15f822f1f...
2756e4ea-f64e-412c-bdf3-b6fab0f9fb7d
whitewolf-debugger/practice
665-non-decreasing-array/665-non-decreasing-array.cpp
class Solution { public: bool checkPossibility(vector<int>& nums) { bool changed = false; for(int i=0;i<nums.size()-1;i++){ if(nums[i]<=nums[i+1]){ continue; } if(changed) return false; if(i==0 || nums[i+1]>=nums[i-1]){ ...
ALGO
0.999997
6.005507
{ "github_metadata": { "branch": "main", "commit_count": 2760, "repo_created_at": "2022-03-13T06:08:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56211246e...
e780d465-8b7d-4571-be90-b1cef2ba7ef5
simonfuhrmann/mve
libs/mve/marching_cubes.h
/* * Copyright (C) 2015, <NAME> * TU Darmstadt - Graphics, Capture and Massively Parallel Computing * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD 3-Clause license. See the LICENSE.txt file for details. */ #ifndef MVE_MARCHINGCUBES_HEADER #define MVE_MARCHI...
ALGO
0.997324
7.02383
{ "github_metadata": { "branch": "master", "commit_count": 1348, "repo_created_at": "2012-04-27T17:42:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1036, "forks": 418, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "cc...
ca0d9fe4-0cbd-42ce-bb56-5d4bf69e9181
nextpyp/ettk
inc/nbfMinimalSurfaceVideo.h
#ifndef FILE_nbfMinimalSurfaceVideo #define FILE_nbfMinimalSurfaceVideo #include <nbfGeodesicPath.h> #include <nbfPolarDomain.h> #include <nbfEdgeFilter.h> #include <vtkPriorityQueue.h> using namespace blitz; template< class Pixel > class nbfMinimalSurfaceVideo { public: // constructor takes weight array as input...
ALGO
0.990049
5.27249
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-21T21:36:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13b5dc4d81a78...
2cadcfeb-408e-4775-a8f2-7bad11b59adb
gale34/AlgospotPractice
Algospot/MORSE/main.cpp
#include <iostream> #include <cstdio> #include <vector> #include <cstring> using namespace std; void sol(int** memory, int n, int m, int& k, string answer_seq); int makeMemory1(int** memory1, int n, int m); int makeMemory2(int** memory2, int n, int m); #define MAX_K 1000000100 int main() { int c; freopen("i...
ALGO
0.999806
3.327938
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2017-07-01T02:21: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": "c08600b4b...
d780ee33-a1d9-4872-894c-6f55be0aef4a
nekosyakolyastudy/O.O.P
lab2/GeneratePrimeNumbersSet/GeneratePrimeNumbersSet/GeneratePrimeNumbersSet.cpp
#include "stdafx.h" #include "prime.h" using namespace std; namespace { const static unsigned MIN_PRIME_NUMBER = 2; const static unsigned MAX_LIMIT = 100000000; } void SieveNumbers(unsigned upperLimitNumbers, vector<bool> &isPrimeNumbers) { isPrimeNumbers[0] = false; if (upperLimitNumbers != 0) { isPrimeNumber...
ALGO
0.999063
4.16893
{ "github_metadata": { "branch": "master", "commit_count": 156, "repo_created_at": "2016-09-11T10:14:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "0076c194...
e5c2ac83-20c9-4210-888c-ebca4877ab39
SAYAN-DEV-NATH/XPSC-Batch-04
Week - 11/Tuesday/C_Poisoned_Dagger.cpp
// Creator: SAYAN-DEV-NATH // Created: 2024-06-04 23:35:24 #include <bits/stdc++.h> // Essential header files lines(3-4) using namespace std; #include <ext/pb_ds/assoc_container.hpp> // Policy Based Data Structure lines(5-9) #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using pb...
ALGO
0.999897
5.51192
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2024-03-16T13:12:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bbb44d876...
26cb7e24-36dc-400b-a071-6b322ac9150a
AdamTempest/Cpp-programming
class works/JumpSearch.cpp
#include <iostream> using namespace std; // jumpsearch void printArray(int *arr,int size); void BubbleSort(int *arr,int size); int jumpSearch(int *arr, int size, int target); int main() { int arr[] = {5,26,7,8,2,1,45,6,312,124}; // unsorted int size = sizeof(arr)/sizeof(arr[0]); int toFind = 2; int result = ...
ALGO
0.999971
5.146263
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-11-27T10:38: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": "8118f956b0e...
75366265-1336-4ee4-8aae-6a242fef628c
Junchi-Liang/AI_assignment1
sequential_a_star.h
#ifndef SEQUENTIAL_A_STAR_H #define SEQUENTIAL_A_STAR_H #include "abstract_solver.h" namespace solver_ns { class sequential_a_star: public abstract_solver { private: int n_heuristic; heuristic_ns::abstract_heuristic **heuristic_list; util_ns::my_heap **fringe_set; util_ns::my_hash **closed_set, *expan...
ALGO
0.999912
5.027227
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2016-09-25T21:55: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": "be308d9e1...
5e66be1e-efe9-4f46-bfbe-ec62474ba1c1
haozzzzzzzz/osgEarthX
environment/build/3rdParty/geos/include/geos/algorithm/locate/IndexedPointInAreaLocator.h
/********************************************************************** * $Id: IndexedPointInAreaLocator.h 2770 2009-12-03 19:27:18Z mloskot $ * * GEOS - Geometry Engine Open Source * http://geos.refractions.net * * Copyright (C) 2006 Refractions Research Inc. * * This is free software; you can redistribute and...
ALGO
0.901102
6.925655
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2015-09-19T06:19:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 75, "forks": 48, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "069499f...
9ff1967f-1747-4f2c-98ad-478260b060cf
lichenk/AlgorithmContest
codeforces/142/A/A.cc
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,tune=native") #include "bits/stdc++.h" #include <assert.h> using namespace std; typedef long long ll; typedef long double ld; #define PB push_back #define MP make_pair const int MOD=1000000007; #define endl "\n" ...
ALGO
0.999897
3.844589
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-07-29T03:21: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": "d5b686f08...
cd4a3919-d11b-43ad-bfb5-aa017b5f828a
Development-Industries/HeroDatabase
HeroesDB.cpp
#include "HeroesDB.h" #include <iostream> #include "Console.h" #include <algorithm> #include <string_view> #include <locale> #include <cctype> #include <Tester.cpp> HeroesDB::HeroesDB() { DeserializeFromFile("heroes.json"); } // Merge Sort void HeroesDB::mergeSort(int left, int right) { } std::vector<Hero> Hero...
TOOL
0.969128
4.656437
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-03T11:56:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "145d293048c1b...
e60414fc-32d9-495c-bddb-ae26137297b6
SahilShiravale/Sem8
hpcpracticals/parallel_bfs_dfs.cpp
#include <iostream> #include <vector> #include <queue> #include <stack> #include <omp.h> #include <chrono> using namespace std; // Class to represent an undirected graph using adjacency list class Graph { int V; // Number of vertices vector<vector<int>> adj; // Adjacency list public: Graph(int vertices) ...
ALGO
0.999735
7.053692
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-05-08T18:16: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": "0b7a60d68d...
72683e32-007e-42e7-8616-881bda382949
rudrajit1729/CodeBucket
CP_Platform_Bucket/HackerRank/Contests/Hackfest 2020/Cyclic_Binary_String.cpp
#include <bits/stdc++.h> using namespace std; /* * Complete the 'maximumPower' function below. * * The function is expected to return an INTEGER. * The function accepts STRING s as parameter. */ int maximumPower(string s) { int a=0, b=0, c=0; int k=0; int n=s.length(); for(int i=0;i<n;i++){ ...
ALGO
0.999719
4.316608
{ "github_metadata": { "branch": "master", "commit_count": 354, "repo_created_at": "2020-10-13T08:16:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 21, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "99282...
fbb4520c-815b-4431-974a-bf9a1d382005
devreeda/cp
hackerearth/hackerearth.cpp
#include <bits/stdc++.h> using namespace std; /* const int MAX_N = 1e5 + 5; const int MAX_L = 20; // ~ Log N const long long MOD = 1e9 + 7; const long long INF = 1e9 + 7;*/ typedef long long ll; typedef vector<int> vi; /* int printIndex(vi v, int l, int r, int num) { if (l-r <= 1) return r + 1; if (v.at((l+r)/...
ALGO
0.999922
4.665304
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-09-10T08:54: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": "207fea652...
9229cfc4-fe48-4144-8218-5564ed8feef4
blazecipher987/Leetcode
4-08-2024/21. Merge Two Sorted Lists/solve.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* mergeTwoLists(ListNode* list1...
ALGO
0.999893
5.506527
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-21T22:29: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": "24bd0289dac6...
8b94eda9-00ee-459d-a28f-085306516668
kamyu104/LeetCode-Solutions
C++/cheapest-flights-within-k-stops.cpp
// Time: O((|E| + |V|) * log|V|) = O(|E| * log|V|) // Space: O(|E| + |V|) = O(|E|) class Solution { public: int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int dst, int K) { using P = pair<int, int>; unordered_map<int, vector<P>> adj; for (const auto& flight : flights) ...
ALGO
0.999909
6.117829
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
a9a6479e-f2a1-4179-bf29-c27760c0c7ec
srikarvoora/Advanced-Algorithms
Array Implementation.cpp
#include <iostream> #include <vector> using namespace std; struct SparseMatrixEntry { int row; int col; int value; }; vector<SparseMatrixEntry> createSparseMatrix(vector<vector<int>> &matrix) { vector<SparseMatrixEntry> sparseMatrix; for (int i = 0; i < matrix.size(); i++) { for (int j = ...
ALGO
0.99996
6.007463
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-01-19T04:33: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": "61319b44a3da...
6e3aec89-819c-4397-aa6b-8a6dbdbe6c55
satyam1a2/DSA_Solved
Graphs/ee.cpp
#include <iostream> #include <vector> #include <queue> #include <climits> using namespace std; // Define a pair to represent the edge and weight typedef pair<int, int> Edge; // Dijkstra's algorithm function void dijkstra(const vector<vector<Edge>>& graph, int start) { int n = graph.size(); vector<int> distan...
ALGO
0.999979
5.801019
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-13T07:53: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": "68825286fe7d...
bd1368d7-85f1-426b-8734-97f339b2b376
cyoung/adsbtest
schifra/schifra_reed_solomon_example08.cpp
/* (**************************************************************************) (* *) (* Schifra *) (* Reed-Solomon Error Correcting Code Library *) (* ...
ALGO
0.961302
5.230942
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2016-02-03T14:08:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ed273bc7...
5fbf4afd-29e7-4f63-8565-294c8f51a38b
beepboop141/progtech
simpledb.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; struct worker { int id; string f_name; string l_name; int year; int salary; }; bool compareby_id(const worker &a, co...
ALGO
0.998179
3.889161
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2023-03-28T12:39: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": "c5f24673abd...
c1677a7d-2ae5-495a-b4b7-fdc21532de65
prodhan2/Data-Structure-and-Algorithm-
Matrix/matrix add , mul, sub.cpp
#include<bits/stdc++.h> using namespace std; #define fast() ios_base :: sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define row 2 #define col 2 void printMatrix(int mm[row][col]) { for(int i = 0; i < row; i++) { for(int j = 0; j < col; j++) { cout << mm[i][j] << " "; ...
ALGO
0.999853
4.767699
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2023-03-17T14:51:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27d37f17e48...
00b31a29-b8b9-4e99-92ad-61a654f49a40
tickscn/leetcode
337.house-robber-iii.cpp
/* * @lc app=leetcode id=337 lang=cpp * * [337] House Robber III */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int rob(TreeNode* root) {...
ALGO
0.999988
6.093251
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2019-05-03T13:13: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": "16e885d4...
4f7b15d8-b533-4f04-95cd-aef498d45ab9
samratalamshanto/LeetCode
103-binary-tree-zigzag-level-order-traversal/103-binary-tree-zigzag-level-order-traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999999
5.989004
{ "github_metadata": { "branch": "main", "commit_count": 492, "repo_created_at": "2021-12-28T05:50: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": "dc88c0b2d1...
08f9c435-9052-41b2-abc9-36ab8232f681
k1101jh/CodingTest
baekjoon/2342.cpp
#include <iostream> using namespace std; int INF = 400001; int dp[2][5][5] = {0}; int costs[5][5] = { {1, 2, 2, 2, 2}, {2, 1, 3, 4, 3}, {2, 3, 1, 3, 4}, {2, 4, 3, 1, 3}, {2, 3, 4, 3, 1} }; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); fill(&dp[0][0...
ALGO
0.999968
3.557959
{ "github_metadata": { "branch": "main", "commit_count": 115, "repo_created_at": "2021-10-05T08:27: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": "97bc3a2156...