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
549322aa-fbeb-47c9-8662-e1cfb4eccde8
OlegKaryagin/Pipe_And_Station
Pipe/Lab2/CGasNet.cpp
#include "CGasNet.h" #include <stack> #include "CStation.h" #include "Utils.h" #include <numeric> #include <set> #include "CPipe.h" CGasNet::CGasNet() { } vector<int> FindByDiametr(const unordered_map<int, CPipe>& pipe, int param) { vector <int> selected_pipes; selected_pipes.reserve(pipe.size()); for (const auto...
TOOL
0.93392
3.431244
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2020-10-14T11:44:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0168551745a...
110908fc-eda2-4fdb-a7a5-87122de99c70
huy-tran-22/PTIT_CPP
DSA02005.cpp
#include <bits/stdc++.h> using namespace std; int ok = 0; string s; void Swap(){ int i = s.size() - 1; while (s[i] < s[i-1] && i > 0){ i--; } i--; if (i < 0) { ok = 1; } else { int j = s.size()-1; while (s[i] > s[j]) j--; swap(s[i],s[j]); int ...
ALGO
0.999995
4.283941
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-21T09:28: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": "afa78fa1f399...
04d93cd9-0fa0-4cca-a43f-71cab73b32b3
Musfiqshohan/Competitive-Programming
topics wise codes/Combinatorics/inclusion exclusion/1117 - Helping Cicada.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; ll ara[20],b[20], a[40100]; ll gcd(ll a, ll b) { if(b==0) return a; return gcd(b,a%b); } ll lcm(ll a, ll b) { return (a/gcd(a,b) ) * b; } int main() { ll i; for(i=1; i<=40000; i++) a[i]=i; int t,test; scanf("%d",&test); ...
ALGO
0.99988
3.139755
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-01-04T10:50: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": "02c3e62145...
217b07ef-ce44-454f-9082-5b1895d68857
mbo57/atcoder
abc_323/C/main.cpp
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; (i) < (int)(n); ++ (i)) #define REP3(i, m, n) for (int i = (m); (i) < (int)(n); ++ (i)) #define REP_R(i, n) for (int i = (int)(n) - 1; (i) >= 0; -- (i)) #define REP3R(i, m, n) for (int i = (int)(n) - 1; (i) >= (int)(m); -- (i)) #define ALL(x) ::std::begin(x), :...
ALGO
0.99995
4.042725
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-24T08:28: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": "53a0b1f5575b...
d30cf54a-fb4d-4b4c-9d6b-d36e6b3d2fc4
Haemin-Park/Algorithm_Study
Haemin-Park/Divide_and_Conquer/2630.cpp
#include <iostream> #include <vector> using namespace std; int paper[128][128]; int w = 0, b = 0; void findColor(int n, int x, int y) { int wc = 0, bc = 0; if (n == 1) { if (paper[y][x] == 0) w++; else b++; } else { for (int i = y; i < y + n; i++) { for (int j = x; j < x + n; j++) { if (pap...
ALGO
0.999791
4.331105
{ "github_metadata": { "branch": "master", "commit_count": 305, "repo_created_at": "2020-08-10T15:27:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc7f2ced...
10a2d9bd-a81c-42ad-afdb-415759c3c42d
tintinsu/Leetcode
Binary Search Tree Iterator.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class BSTIterator { private: TreeNode *curr; stack<TreeNode *>sta; public: BSTIterator(TreeNode *root) { cu...
ALGO
0.999995
6.018622
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2014-09-28T01:02: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": "943ef651...
a89c1b63-3d9e-49bf-9cdb-0cb9c1ebeb68
Vito-Esposito/CPP_Programming_Windows
C++_exerc/Albero/main.cpp
#include <iostream> using namespace std; class node3tree { private: int data; node3tree* left; node3tree* mid; node3tree* right; public: // Costruttore node3tree(int val) : data(val), left(nullptr), mid(nullptr), right(nullptr) {} // Setters void setLeft(node3tree* l) { left = l; } ...
ALGO
0.999935
6.233296
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-06-10T18:10: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": "3242ef475ca1...
b4b8b9f5-bfc4-4bc3-9b77-744a0c5807d3
rqh656418510/c-cplusplus-study
c++-study-1/day09/demo06/main.cpp
/* * 1. 类模板中的 static 关键字 */ #include <iostream> using namespace std; const double pi = 3.14; template <typename T> class Circle { public: Circle(T radius = 0) { this->m_radius = radius; this->m_total++; } void setRadius(T radius) { this->m_radius = radius; } T getRadius() { return this->m_radius; ...
TOOL
0.926424
5.358183
{ "github_metadata": { "branch": "main", "commit_count": 880, "repo_created_at": "2021-10-16T12:07: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": "89840ab2c6...
b10c8a9e-bc54-439f-bb31-84a7d82bf9e7
Abbassadri786/C-Cpp-program
Linked List/Linked List Questions/Starting Point of Loop.cpp
//{ Driver Code Starts // driver code #include <bits/stdc++.h> using namespace std; struct Node { int data; Node* next; Node(int val) { data = val; next = NULL; } }; class Solution { public: //Function to remove a loop in the linked list. bool detectLoop(Node* he...
ALGO
0.999932
4.410057
{ "github_metadata": { "branch": "Basics-of-C", "commit_count": 246, "repo_created_at": "2021-09-09T10:00:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99f...
e94417f2-c946-4837-ad03-2a08336708f0
Nawrin14/FirstFit-BestFit-WorstFit
FirstFit-Best Fit-WorstFit.cpp
#include<bits/stdc++.h> using namespace std; int hole_numbers, request_numbers,x, y, flag, cnt, fragmentation, min_index, max_index; vector<int> memory_holes, memory_requests, temp_holes; vector< pair<int, int> > temp; void FirstFit(vector<vector<int>> firstFit) { cout<<"\nFirst Fit: \n\n"; cnt = 0; for(...
ALGO
0.999667
3.247022
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-11-12T06:46:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "124afd7d14...
e302165f-9c60-4e6a-a4fd-4eface57bef8
satanic0258/Cpp_snippet
src/graph/Dinic.cpp
// Description: Dinic法を用いてsからtへの最大流を計算する。O(EV^2) (実際にはより高速)。 // Dinic法 class Dinic { private: struct Edge { int to, cap, rev; Edge(int t, int c, int r) :to(t), cap(c), rev(r) {} }; int V; std::vector<std::vector<Edge>> graph; std::vector<int> level, iter; public: Dinic(int v) : V(v) { graph.resize(v); l...
ALGO
0.997031
4.812971
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2016-08-16T06:36:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b98c3c9d...
f17154a1-22d8-471e-925c-68cd5c179942
ishandutta2007/codeforces-f
flowerletter/normal/1556/E.cpp
/*mjytxdy!*/ #include <bits/stdc++.h> #define rep(i, a, b) for(int i = (a); i <= int(b); i ++) #define per(i, a, b) for(int i = (a); i >= int(b); i --) #define fi first #define se second #define all(s) s.begin(),s.end() #define trv(i, u, v) for(int i = head[u], v = e[i].to; i; v = e[i = e[i].next].to) #define sz(s) (in...
ALGO
0.999967
3.674082
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "993fb831a8e6...
74524c27-9e02-46fb-96b6-21c13e6efc82
alexandraback/datacollection
solutions_5753053697277952_0/C++/PGoerlach/a.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, char *argv[]) { //Eingabe des Dateinamens über Konsole oder Übergabe als Eingabeparameter char* filename; if(argc > 1) { filename = argv[1]; } else { char buffer[256]; cout << "Input...
ALGO
0.999842
3.438395
{ "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": "5459e15be...
f71070d6-1c01-452b-9107-c379643a52ec
Muhamed4/LeetCode
design-circular-queue/design-circular-queue.cpp
class MyCircularQueue { vector<int>a; int first, last, size; public: MyCircularQueue(int k) { size = k; a = vector<int>(size); first = last = -1; } bool enQueue(int value) { if(isFull())return false; if(first == -1){ first = 0; } ...
ALGO
0.999349
5.697995
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2023-02-25T20:47:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1eacf4d7...
9b36345e-744e-4ded-add3-d74efd98bcf6
Scary-Spark/myLearning
c++/dsaByApnaCollege/_7_bitwiseOperator_and_DataTypeModifier/_7_1_bitwiseOperator.cpp
#include <iostream> using namespace std; int main() { /* TODO: Bitwise operators: i. bitwise and operator (&) ii. bitwise or operator (|) iii. bitwise x-or operator (^) iv. bitwise left-shift (<<) v. bitwis...
ALGO
0.996078
4.580821
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2025-03-09T14:28: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": "ef1d44650c6...
a5897a49-72e1-414b-9725-b6af481b93fa
pochangl/cpp
main.cpp
#include <bits/stdc++.h> using namespace std; // Define the structs Workshops and Available_Workshops. // Implement the functions initialize and CalculateMaxWorkshops struct Workshop { int start_time; int end_time; int duration; Workshop(int _start_time, int _duration) { start_time = _st...
ALGO
0.999995
4.775173
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-03-06T04:55: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": "c38676fe7649...
5a2d3c3d-a83b-4278-bd9e-4628f3f8b57d
PratikshaSh/My-DSA-Codes
greedy/nMeetingsInOneRoom.cpp
//O(nlogn) TC and O(n) SC //sooner the end time..much time we will have for other meets. #include<bits/stdc++.h> using namespace std; struct meeting{ int start; int end; int pos; }; bool comparator(struct meeting m1, meeting m2){ if(m1.end<m2.end) return true; else if(m1.end>m2.end) return false; ...
ALGO
0.999965
4.430656
{ "github_metadata": { "branch": "master", "commit_count": 142, "repo_created_at": "2021-01-16T17:30: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": "e41cb8f6...
ae066ae1-3068-45a3-a201-d306d7800f49
axeltidemann/load_forecasting
sg/models/lib_atlas/BsplineAnalyticSmoother.cpp
/* * BsplineAnalyticSmoother.cpp * * Created on: Dec 25, 2012 * Last Modified on: Feb 11, 2013 * Feature: parallel BLAS and LAPACK * Author: Hasib */ #include "BsplineAnalyticSmoother.h" using namespace std; BsplineAnalyticSmoother::BsplineAnalyticSmoother(double *dataset, unsigned int n_data, double ...
ALGO
0.998351
4.667039
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2014-01-08T18:39:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 10, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2d0caf7d...
80a3ed4e-c50c-41ff-8b62-42920ddc55b9
kevbronowicki/RobotNavigation
RobotNavigation/DFSearch.cpp
#include "DFSearch.h" using namespace std; DFSearch::DFSearch() { } Node* DFSearch::search(Map aMap, Node* aInitialNode) { Node* lNode; if (aMap.getStatus(aInitialNode->getState()) == Goal) return aInitialNode; fFrontier.push_back(aInitialNode); fNumOfNodes++; while (!fFrontier.empty()) ...
ALGO
0.999958
4.094254
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-04-01T05:40: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": "0eafdb731...
f20c31df-f3f5-4394-852d-947954c127a5
champ88044/dsa-solved-question
DSA-LeetCode/Arrays/1395.Count-Number-of-Teams.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int numTeams(vector<int> &rating) { int n = rating.size(); int team = 0; for (int j = 1; j < n - 1; j++) { int countsmallleft = 0; int countlargerright = 0; int countlargerl...
ALGO
0.999945
5.187214
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2024-05-05T06:31: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": "9921f76d0a...
11b30321-e6a5-4b7a-9d06-ba4e663c893b
K1M-MinW00/CodingTest
백준/Gold/6087. 레이저 통신/레이저 통신.cc
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <string> #include <cstring> #include <cmath> #include <climits> #include <unordered_map> #include <bitset> using namespace std; #define N 100 int n, m; char graph[N][N]; vector<pair<int,...
ALGO
0.999933
3.944093
{ "github_metadata": { "branch": "main", "commit_count": 594, "repo_created_at": "2024-03-23T09:59: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": "6f5b156495...
870a34d4-15f6-4eb2-bff2-3b9297192794
phlndrwd/EATSM2
src/Model/EncounterAlgorithm.cpp
/****************************************************************************** * Evolutionary Adaptive Trophic Structure Model 2 (EATSM2) * * * * (C) Copyright 2024, <NAME>. All rights reserved. * * ...
ALGO
0.999461
6.509346
{ "github_metadata": { "branch": "develop", "commit_count": 93, "repo_created_at": "2024-03-29T15:01: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": "87c8944d...
be44771c-8d5e-40db-b3f9-d22abe80b0a2
ivanmarkov97/point_modified_method
galya.cc
// ConsoleApplication2.cpp: îïðåäåëÿåò òî÷êó âõîäà äëÿ êîíñîëüíîãî ïðèëîæåíèÿ. // //#include "stdafx.h" #include<vector> #include<stdlib.h> #include<iostream> #include<math.h> #include <fstream> #include<string> //#include "stdafx.h" using namespace std; double tp = 0; double dtp = 1e-5; double t = 0.0; int ti =...
ALGO
0.995237
3.37231
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-12-20T19:52:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18dfee5c51...
5b341067-dc63-45ee-b01d-8aab4b055ce1
YukiMurakami/gokunuri
submit/gokunuri.cpp
/* TODO */ #include "players.hpp" #include <list> #include <utility> #include <vector> #include <map> #include <fstream> double territoryMerits = 1.; double selfTerritoryMerits = 0.3; double hurtingMerits = 0.1; double hidingMerits = 0.1; int cand = 1; list<int> bestPlay; list<int> currentPlay; double bestMerit...
TOOL
0.945468
3.709366
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2016-02-11T04:47: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": "ae67dab2d...
e881e974-d785-4bb3-9c4e-a94a96557bcd
StepanKhymera/Study
Algorithms and data structures/Lab 8/Project/linesearch.cpp
#include "linesearch.h" LineSearch::LineSearch(QString* str) { res = str; } QString LineSearch::search(const std::vector<int> &vec){ std::ostringstream out; int max_indx = 0, iter = 1, num, max; *res = ""; for(unsigned long long j = 0; j < vec.size(); ++j){ if(vec[max_indx] < vec[j]){ ...
ALGO
0.957529
4.105599
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-10-29T19:24: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": "965bbe1fa...
ae4e32f6-4c40-4977-a1e9-3c146c3027d4
DesaiYash009/cppfile_24ce027
6.3.cpp
#include <iostream> using namespace std; int main() { int m, n; cout << "Enter the size of the first sorted array: "; cin >> m; cout << "Enter the size of the second sorted array: "; cin >> n; int* arr1 = new int[m]; int* arr2 = new int[n]; cout << "Enter " << m << " sorted element...
ALGO
0.999726
4.980558
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-05-11T18:48:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "546bb5c9fe66...
1270f755-fb47-4b56-8aeb-e04a4862ed80
AbhiKangane/DSA_in_CPP
Linked_list/Clone_LL_with_2_Pointers.cpp
// GFG Hard Problem: // In this each node in LL has 2 pointers // one pointer -> next node & other -> random any node #include <iostream> #include <unordered_map> using namespace std; struct node { int data; struct node *next; struct node *random; }; // solution1 of problem: using unordered map : Time &...
ALGO
0.99985
4.125515
{ "github_metadata": { "branch": "main", "commit_count": 190, "repo_created_at": "2023-08-12T10:42:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2278186a4...
e65c78af-b6cc-4aa4-9e8e-8fbcca5a8e16
OctopusLian/leetcode-solutions
Algorithms/148.sort-list/sort-list3.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* sortList(ListNode* head) { int len_list = 0; ListNode *p=head; while(p){ p = p->next; ...
ALGO
0.999997
5.487497
{ "github_metadata": { "branch": "master", "commit_count": 337, "repo_created_at": "2019-09-02T12:56:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ceebdfc2...
379645b8-d4e9-4335-a545-49eb8468b991
tymoneq/competive_programing
OI_III_LO/Grupa_C/15.10.2022/kubeczki/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n = 0; cin >> n; for (int i = 0; i < n; i++) { int a, b, c, x, y, wynik = 0; bool a_dif_b = true, a_dif_c = true, c_dif_b = true; cin >> a >> b >> c...
ALGO
0.999926
3.872931
{ "github_metadata": { "branch": "main", "commit_count": 456, "repo_created_at": "2022-09-20T19:22:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64c38ccb87...
334786c1-419c-4bc5-8365-7df9c6a44ad8
1005-AsadUllah/DSA-Phitron
Assignment 2/p.cpp
// #include <bits/stdc++.h> // using namespace std; // int check(stack<int> st, queue<int> q) // { // while (true) // { // if (st.empty()) // { // return 1; // } // else // { // if (st.top() != q.front()) // { // return...
ALGO
0.999532
4.874273
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-01-10T05:37:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d90e247b51bf...
0472a6b0-f9d1-4da9-b265-a153a340f253
ammarGamal123/Codeforces-Solutions
CodeForces/GNU C++20 (64)/922B | Magic Forest/221016454.cpp
#include <bits/stdc++.h> using namespace std; using int64 = int64_t; #define all(x) (x).begin(), (x).end() #define ll long long #define rall(x) (x).rbegin(), (x).rend() #define output_vector(a) for (auto i : a) cout << i << " "; #define int long long #define no return void (cout << "NO" << endl) #define yes return v...
ALGO
0.999927
4.013295
{ "github_metadata": { "branch": "main", "commit_count": 702, "repo_created_at": "2023-09-10T09:44:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e3efe6b8e...
63071232-bd16-4448-aaf4-33bc7be209c2
izhang05/Competitive-Programming
cf/contest/1622/a/a.cpp
/* Author: izhang05 * Time: 12-27-2021 09:35:02 **/ #include <bits/stdc++.h> using namespace std; //#define DEBUG void setIO(const string &name) { ios_base::sync_with_stdio(false); cin.tie(nullptr); cin.exceptions(istream::failbit); #ifdef LOCAL freopen(("in" + name + ".txt").c_str(), "r", stdin); ...
ALGO
0.99994
4.771171
{ "github_metadata": { "branch": "master", "commit_count": 691, "repo_created_at": "2021-01-21T17:58:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee115416...
31d27988-0815-4a95-8e96-fdc45f1b8397
domejiraphon/algorithm
practice/1074_numSubmatrixSumTarget.cpp
/* 1074. Number of Submatrices That Sum to Target Given a matrix and a target, return the number of non-empty submatrices that sum to target. A submatrix x1, y1, x2, y2 is the set of all cells matrix[x][y] with x1 <= x <= x2 and y1 <= y <= y2. Two submatrices (x1, y1, x2, y2) and (x1', y1', x2', y2') are different if...
ALGO
0.999934
6.354077
{ "github_metadata": { "branch": "main", "commit_count": 191, "repo_created_at": "2022-09-02T14:28: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": "1a1051769f...
52f70ed3-58ed-40e6-82a2-8d0368bb20c9
denishadaslani/DSA
array/Extra/24.cpp
#include <iostream> using namespace std; int main() { int size, i; cout << "Enter Size:-"; cin >> size; int a[size]; cout << "Input of Array:-" << endl; for (i = 0; i < size; i++) { cout << "Enter the value [" << i << "]:-"; cin >> a[i]; } cout << "Output of Array:-" << ...
ALGO
0.999557
5.227602
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2025-04-25T06:11: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": "6efb99a3c...
8314d628-198e-46c5-8dc5-d451892b32cb
UePG-21/cpp_learn
Baruch C++/HW/Level 8/Section 5.1/Exercise 4/main.cpp
/* * @Objective: * * @Author: <NAME> * * @Version: 1.0 * @Date: 10/29/21 */ #include <iostream> #include <ctime> #include <map> #include <boost/random.hpp> #include <boost/random/detail/const_mod.hpp> using namespace std; int main() { // Throwing dice // Mersenne Twister boost::random::mt19937 myR...
ALGO
0.979221
4.900784
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-01-13T05:40: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": "51cf9dcf6a6...
63952c04-51f0-471f-b0f2-df5442305c46
hoya-1004/Test
C_C++/문제2.cpp
#include<iostream> #include<conio.h> using namespace std; class ggbin { private: char cstring[30]; int input; public: void list_input(); friend void cntachar(ggbin A,int x); }; void ggbin::list_input()//문자입력 { cout << " 문자열 길이 : " ; cin >> input; cout<<"문자 입력 :"; for(int i=0; i<input; i++) { cin>>cstring[i...
ALGO
0.999565
3.154693
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-07-09T09:57:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69c382d9d...
0126c1ea-9247-4040-8643-a6adeaf2ae2a
Menaxerius/ninjav3.1-master
objects/Block.cpp
#include "Block.hpp" #include "Nonce.hpp" #include "Share.hpp" #include "Reward.hpp" #include "mining_info.hpp" #include "config.hpp" #include "DORM/sql/sqlLt.hpp" #include "DORM/sql/sqlGt.hpp" #include "DORM/sql/sqlIsNotNull.hpp" #include "BurstCoin.hpp" #include "ftime.hpp" extern "C" { #include "shabal.h" }; ...
ALGO
0.975833
6.562556
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-07-09T11:28:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa9a99d3d...
b5dbcaac-16f1-49b5-9891-0c4535bfba51
EVEnMoregachi/Code
Learning/23.9.12 opencv/23.9.12 opencv/源.cpp
//#include <opencv2/opencv.hpp> //#include <opencv2/highgui.hpp> //#include <iostream> // //using namespace std; //using namespace cv; // //int main() //{ // Mat img = imread("F:/Code/Learning/pictures/lena.jpg"); // namedWindow("before", WINDOW_AUTOSIZE); // imshow("before", img); // Mat gray(img.rows, img...
ALGO
0.931995
3.763924
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2024-10-11T11:47: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": "cb3f64b3d8...
432efc8b-e28a-491f-9d5d-dd3c977aed86
bird1015/Algorithm-Learning
Nqueen.cc
#include<iostream> #include<cmath> using namespace std ; class queen { public : queen (){}; //queen(int row = -1, int col = -1) : m_row(row), m_col(col) {} void setRow( int row) { m_row = row ; } void setCol( int col) { m_col = col ; } ...
ALGO
0.999932
4.202766
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2014-03-08T03:16:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cea009591...
e599074a-d491-4531-a6c8-cbac90d7aab2
CompOpt4Apps/Artifact-DataDepSimplify
IEGenLib/src/set_relation/complexityForPartialParallel.cc
/*! * \file complexityForPartialParallel.cc * * \brief Implementations of the complexityForPartialParallel. * * \date Started: 2/05/18 * * \authors <NAME>, and <NAME> * * Copyright (c) 2015-2018, University of Arizona <br> * All rights reserved. <br> * See ../../COPYING for details. <br> */ #include "set_...
ALGO
0.999303
4.021451
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2018-10-24T17:20:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c274c7cb8...
096f2a08-54b9-4872-8e87-430bbb6af7e1
Saleh7127/CPP-solution-by-Fellow_junior
UVA Judge/uva10229.cpp
/*** created: 2022-02-21-11.40.15 ***/ #include <bits/stdc++.h> using namespace std; #define ll long long #define test int tt; cin>>tt; for(int cs=1;cs<=tt;cs++) #define get_lost_idiot return 0 #define nl '\n' #define row vector<ll> #define matrix vector<vector<ll>> ll mod; matrix operator*(const matrix& a, const ma...
ALGO
0.999993
4.413738
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-04-11T21:39: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": "ee521489b536...
e3644ee2-2f6f-4659-8b56-78344c74672c
ishandutta2007/codeforces-q
qoo2p5/normal/757/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int INF = (int) 1e9 + 123; const ll LINF = (ll) 1e18 + 123; const int MOD = (ll) 1e9 + 7; const int N = 76; const int M = 20; int n; string s; int dp[N][1 << M]; void add(int &x, int y) { x += y; if (x >= MOD...
ALGO
0.999952
4.058567
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:56: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": "77129bcb281a...
65a1a37d-bc40-4af9-ae31-967e9bad2940
MustagheesButt/Uni-shit
OOP/Lab10 - Student class.cpp
#include <iostream> #include <vector> using namespace std; class Student { int roll_num; double cgpa; public: Student(int roll_number, double cgpa) { this->roll_num = roll_number; this->cgpa = cgpa; } bool operator>(Student student) { return (this->cgpa > student.cgpa) || (this->cgpa == student.cgpa &&...
ALGO
0.992756
4.582168
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-07-07T16:59:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3b0870f9e...
69a2865c-314d-4759-8e2c-955321763b71
a-y-u-s-h/competitive
codechef/SNAPCHAT.cpp
#include <bits/stdc++.h> int main(int argc, char const *argv[]) { int T; std::cin >> T; for (int t = 0 ; t < T; t += 1) { int N; std::cin >> N; std::vector<int> A; std::vector<int> B; for (int n = 0; n < N; n++) { int Ai; std::cin >> Ai; A.push_back(Ai); } for (int n = 0; n < N; n++) { in...
ALGO
0.999967
4.695225
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-06-26T23:29:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c442eb719a...
b6163ede-3b7e-4868-aa22-ad6feb3d4e2e
showrab09/C-plus-plus-for-Data-structure
Final Exam/Sort_It_Again.cpp
#include <bits/stdc++.h> using namespace std; class Student { public: string nm; int cl; char sec; int id; int math; int eng; }; int main() { int n; cin >> n; Student arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i].nm >> arr[i].cl >> arr[i].sec >> arr[i].id >> ar...
ALGO
0.9999
4.254218
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-05-19T15:06: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": "035b16c6ce3...
7a70f93e-c879-4dc9-a7bb-90dfc6d54d33
Shubhamsk1/cp
codeforces/DFS(1200-1600)/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("error.txt", "w", stderr); freopen("output.txt", "w", stdout); #endif int t; cin >> t; while (t--) { int n, m; cin >> n >> m; int a[n]={0}; for (int i = 0; i < n; ++i) { cin >...
ALGO
0.999988
3.977189
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-05-29T18:08: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": "f5410cc31767...
07c88e4f-5c65-4fc9-94ff-f779e95902f1
anhtuanhsgs/Coursera-Courses
Discrete Optimization/2W/knapsack/knapsack.cpp
#include <bits/stdc++.h> using namespace std; int n, k; #define maxn 1000111 int v[maxn], w[maxn]; bool ans[maxn]; void readData (){ freopen ("tmp.data", "r", stdin); cin >> n >> k; for (int i = 0; i < n; i++){ cin >> v[i] >> w[i]; } } void printAns (int ret, int opt){ // freopen ("tmp.out", "w", stdout); ...
ALGO
0.999991
3.307657
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-07-13T06:34:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee691388e...
5e786565-2b51-46df-8693-2defda348b22
Harshita0201/DSA
BST_3_preOrder_predecessor.cpp
#include <iostream> #include<queue> using namespace std; class Node { public: int data; Node *left; Node *right; Node (int data) { //constructor this->data = data; this->left = NULL; this->right = NULL; } }; Node *insertIntoBST (Node * root, int data) { //base case if (root == NULL...
ALGO
0.99999
3.721004
{ "github_metadata": { "branch": "main", "commit_count": 231, "repo_created_at": "2022-01-11T10:35:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5be4ece9c...
cc042205-5330-4140-a790-ee4b5370ca89
gajewskies/Portfolio
c++/binarySearchTree.cpp
/********************************************************************* Implementation of a binary search tree Date: 3/29/2015 Author: <NAME> <EMAIL> **********************************************************************/ #include <iostream> //Input and output #include <cstdlib> //Include the standa...
ALGO
0.99999
4.485733
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-06-15T00:48:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d8b21c982...
aa950907-4a2e-4f99-993e-429f39c631a1
Giordan0/URIOJ
Iniciante/2826.cpp
#include <iostream> using namespace std; int main() { string a, b; bool f = false; cin >> a >> b; if(a[0] < b[0]) { cout << a << endl; cout << b << endl; } else if(a[0] > b[0]) { cout << b << endl; cout << a << endl; } else { int temp = ...
ALGO
0.999983
3.21794
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-03-16T00:25: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": "e3f42a333c7...
fbe76567-1bc1-4de3-bcdb-3dcf3338ce2b
tnv1154/DSA-PTIT
ThucHanh1/B1_HoanViCoSoFibo.cpp
/* Hãy liệt kê các hoán vị của N số nguyên dương đầu tiên và có thứ tự là một số trong dãy Fibonacci. Input Chỉ có 1 dòng ghi số N (2 < N < 10). Output Ghi ra các hoán vị có thứ tự là các số trong dãy Fibonacci. Xem ví dụ để hiểu rõ hơn cách ghi kết quả. Ví dụ Input 4 Output 1: 1 2 3 4 2: 1 2 4 3 3: 1 3 2 4 5...
ALGO
0.999938
4.48806
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2025-07-07T03:28:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad44ed1b8...
a3617f34-278e-4d90-a169-48a9244589c9
mw08081/baekJoon
backJoonCpp/2750.cpp
#include <iostream> using namespace std; //O(n^2) : bubble, selection, insertion, quick sort int n, arr[1000]; void Swap(int * n1, int * n2) { int tmp = *n1; *n1 = *n2; *n2 = tmp; } void Print() { for (int i = 0; i < n; i++) cout << arr[i] << " "; cout << endl; } #pragma region othe...
ALGO
0.999983
5.657385
{ "github_metadata": { "branch": "main", "commit_count": 199, "repo_created_at": "2022-12-06T14:30:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "57267a16f8...
ee683a88-6a47-4e93-bd6d-1e43f57e9d16
aayushdewangan11/DSA-Practice
Codeforces/colourblindness.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef pair<ll, ll> pll; typedef vector<string> vstr; typedef vector<pll> vpl; typedef set<ll> sll; #define loop(i,Start,End,Inc) for(ll i=Start;i<=End;i+=Inc) #define loopR(i,Start,End,Dec) for(ll i=Start;i>=End;i-=Dec) #...
ALGO
0.999959
4.085082
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2023-06-13T08:08: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": "ee173ed6c...
38f28590-21e0-4b4b-80dc-e281f3baf757
jyakaranda/autoware_ros
Autoware/ros/src/computing/planning/mission/packages/freespace_planner/nodes/astar_navi/astar_search.cpp
#include "astar_search.h" AstarSearch::AstarSearch() : node_initialized_(false) { ros::NodeHandle private_nh_("~"); private_nh_.param<bool>("use_2dnav_goal", use_2dnav_goal_, true); private_nh_.param<std::string>("path_frame", path_frame_, "map"); private_nh_.param<int>("angle_size", angle_size_, 40); priv...
ALGO
0.999872
5.421271
{ "github_metadata": { "branch": "dev_zh", "commit_count": 10, "repo_created_at": "2019-04-15T13:15:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 28, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "35cc0a9...
a10698fa-1adf-428f-80c1-1a14db190914
root-project/root
roofit/roostats/inc/RooStats/MetropolisHastings.h
// @(#)root/roostats:$Id$ // Authors: <NAME> 17/06/2009 // Authors: <NAME> 17/06/2009 /************************************************************************* * Copyright (C) 1995-2008, <NAME> and <NAME>. * * All rights reserved. * * ...
ALGO
0.992285
6.843276
{ "github_metadata": { "branch": "master", "commit_count": 93033, "repo_created_at": "2013-06-27T10:46:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2899, "forks": 1363, "issues": 467, "pull_requests": 269 }, "file_meta": { "content_id"...
708e6421-5a5d-4b4b-a532-bd2c5a4534c7
Trojanking123/pat
a1056.cpp
/* 11 3 0 1 2 3 4 5 6 7 8 9 10 25 18 0 46 37 3 19 22 57 56 10 1 1 1 2d 1 1 1 2b 2a 2c 1 3b 3a 4a 6 0 8 7 10 5 9 1 4 2 3 5 5 5 2 5 5 5 3 1 3 5 5 5 5 2 5 5 5 3 1 3 5 */ #include<iostream> #include<queue> #include<vector> using namespace std; str...
ALGO
0.999998
3.285575
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-01-10T08:18:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "086bc2a8e...
18bc06f6-20b0-45bf-ad47-0bd7d6ada69f
akash19jain/COMPETITIVE-PROGRAMMING
CODECHEF/CGSC2018/CGAAST.CPP
https://www.codechef.com/CGSC2018/problems/CGAAST/ #include <bits/stdc++.h> using namespace std; const int MAX = 26; bool targetstring(string str1, string str2) { int l1 = str1.length(); int l2 = str2.length(); // if length is not same print no if (l1 != l2) return false; int map[MAX]...
ALGO
0.999987
4.872622
{ "github_metadata": { "branch": "master", "commit_count": 441, "repo_created_at": "2019-03-01T16:29:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00321628...
e6a2de52-874b-41da-8daa-5634fd516cb1
Hoang2006-creater/Session3.C
Session3-Lesson7.cpp
#include<stdio.h> int main(){ // Khai bao bien int number, digit1, digit2, digit3, digit4, sum; // Nhap so printf(" Moi ban nhap so co 4 chu so: "); scanf("%d", &number); // Kiem tra co phai 4 chu so khong if (number < 1000 || number > 9999) { printf("Loi: So ban nhap khong phai la so co 4 chu so....
ALGO
0.998418
4.054291
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-11-21T11:59: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": "6734a66b4166...
753f5065-babe-459f-bb50-be04db7c3a95
hsj4436/Algorithm
백준/Gold/20303. 할로윈의 양아치/할로윈의 양아치.cc
#include <iostream> #include <vector> #define PII std::pair<int, int> int N, M, K; int candies[30001]; int parent[30001]; int dp[3001]; int find_parent(int x) { if (parent[x] < 0) { return x; } else { return parent[x] = find_parent(parent[x]); } } int main() { std::cin >> N >> M >> K...
ALGO
0.999997
4.360244
{ "github_metadata": { "branch": "master", "commit_count": 623, "repo_created_at": "2023-12-12T13:04: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": "5f76053c...
8969481e-f73e-462b-8792-a2f421dfaa1e
manofmountain/LeetCode
123_BestTimeToBuyAndSellStock_III.cpp
class Solution { public: int maxProfit(vector<int>& prices) { if(prices.size() <= 1) return 0; int maxFirst(0), maxSecond(0); int curr(0), currMax(0); for(int i = 1; i < prices.size(); ++i){ curr = max(0, curr + prices[i] - prices[i - 1]); currMax = max(currMax, curr); if(curr == 0 || i == p...
ALGO
0.999974
5.522077
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2017-01-07T01:51:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "462b8e466...
9b2972b2-325a-4fc6-b7ee-b31938704ea0
CJSBinder-User/CJSBinder
experiment/correctness_efficiency/ChatGPT/tasks/FREQUENT_ELEMENT_ARRAY_1/FREQUENT_ELEMENT_ARRAY_1_GLUECODE.cpp
#include <iostream> #include <string> #include <vector> #include <math.h> #include "include/libplatform/libplatform.h" #include "include/v8.h" #include "CQuesHeader.h" using namespace v8; // V8 related functions for handling JavaScript void Print(const FunctionCallbackInfo<Value>& args){ v8::Isolate* isolate = ar...
TOOL
0.977597
6.768671
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-04-15T02:32: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": "60d418fa5ce...
658ae078-6b18-4f66-9287-2962bbaf6551
zjukk/LeetCode-is-my-son
57-InsertInterval.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Interval { int start; int end; Interval() : start(0), end(0) {} Interval(int s, int e) : start(s), end(e) {} }; static bool cmp(const Interval& a, const Interval& b) { return a.start < b.start; } cl...
ALGO
0.999967
5.444905
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-09-06T07:11: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": "8eddc34fe...
c8b26d85-78df-41da-bea5-f9dcdcf519b6
ShiKe-And-His-Friends/ComputerVisionDraft
202204/PCL_CODES/Learning/11_surface_bspline_fitting.cxx
/*** Surface bsoline fitting 修建的B样条曲线拟合到无序点云 **/ #include <iostream> #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include <pcl/surface/on_nurbs/fitting_surface_tdm.h> #include <pcl/surface/on_nurbs/fitting_curve_2d_asdm.h> #include <pcl/surface/on_nurbs/triangulation.h> #i...
ALGO
0.99498
5.37929
{ "github_metadata": { "branch": "master", "commit_count": 1266, "repo_created_at": "2020-08-03T13:30:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28f99819...
702b3fe5-738b-485e-b6ab-ef4c7fd79cbb
orlandoaceto/UVaOnlineJudge
10759.cpp
//Problem at UVa Online Judge //Solution by <NAME> - contact: <EMAIL> //Feel free to use this code if you wish #include <bits/stdc++.h> using namespace std; #define fr(a, n) for(a = 0; a < n; a++) #define sc(a) scanf("%d", &a) #define pr(a) printf("%d\n", a) typedef pair<int, int> ii; typedef pair<double, double> dd...
ALGO
0.999506
4.523195
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2016-05-16T14:55:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01cb86dde...
0d695a7a-be43-466a-9712-570c37672321
phuongpham145/codecpp
Vector_Set_Map/Set.cpp
#include <bits/stdc++.h> using namespace std; int main() { set<int> s; // Them phan tu s.insert(100); s.insert(200); s.insert(300); s.insert(100); s.insert(200); cout << s.size() << endl; // Tim kiem for (int i = 0; i < 10; i++) { s.insert(i); } if (s.count(5)...
ALGO
0.942639
3.431109
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-15T14:30: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": "b5f9ff7f19a1...
10409784-c134-4720-94a2-cb657b3bd65a
Floweryu/DataStructuresAlgorithms
OJ——work/work_three/线性表的字符操作(BigBang).cpp
#include<stdio.h> #include<stdlib.h> #include<string.h> #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define OVERFLOW -2 #define maxnum 100 #define LISTINCREMENT 10 typedef int Status; typedef struct { char name[100]; }ElemType; /*线性表结构体的定义*/ typedef struct { ElemType*elem; ...
ALGO
0.999265
3.338222
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-03-04T11:59:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26509513fe...
1762b1ef-0913-48af-86d8-b4b7ab1f275a
hash-brow/Competitive-Programming
IOITC/AlmostShortestPaths.cpp
#include <bits/stdc++.h> using namespace std; const int mod = 1'000'000'007; const int INF = 1'000'000'000; const int MXN = 500'000; vector<int> g[MXN], levs[MXN], par[MXN], same[MXN]; array<int, 2> dp[MXN]; int32_t main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int n, m; cin >> n >> m; for(int ...
ALGO
0.999943
4.576888
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2021-03-15T19:17:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40b6fe6d72a...
ba8e15c8-ce08-4c36-8aca-6e8fd3fb747f
ishandutta2007/codeforces-a
amoo_safar/normal/437/D.cpp
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define F first #define S second #define all(x) x.begin(), x.end() #define debug(x) cerr << #x << " = " << x << endl using namespace std; typedef long long ll; typedef long double ld; typedef string str; typedef pair<ll, ll> pll; const ld PI = 3.141...
ALGO
0.999346
3.903741
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "863018ba88ef...
7cfd0987-6cb7-495e-92da-e1affd01fa35
soomrack/MR2020
barymova/16.11/list/main.cpp
#include <iostream> #define EX -2147483648 class Node { public: int value; Node *next; public: Node(); Node(const int value); Node(int value, Node *next); ~Node(); }; class List; class Iterator { private: Node *current; Node *prev; List *list; public: Iterator next(); int...
ALGO
0.949883
4.062933
{ "github_metadata": { "branch": "master", "commit_count": 784, "repo_created_at": "2020-09-06T09:50: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": "034867e4...
51754e55-1e89-48f0-a5b6-2ee09e954f9d
kai04/Programming
Tree/ImplementTrie2.cpp
#include <bits/stdc++.h> using namespace std; class TrieNode{ public: vector<TrieNode*> m_children; bool m_is_word; int m_prefix_cnt; int m_word_cnt; TrieNode() : m_children(26,nullptr),m_is_word(false), m_prefix_cnt(0), m_word_cnt(0){} }; class Trie{ public: TrieNode* root; Trie():...
ALGO
0.999684
5.150131
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2018-01-18T18:46: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": "35e3779a8...
e3cc6d36-cfb0-461c-90cb-2d135ee3f5c4
eeberhard/Bezier
bezier.h
// // bezier.h // // // Created by <NAME> on 01/06/2018. // // // A class for creating and using bezier curves // // #ifndef bezier_h #define bezier_h #include "math.h" /*-----------------------------------------------------------------*/ /* Point Class */ /*---...
ALGO
0.998713
5.057771
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-01-26T23:59: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": "4f063c4dd0...
e433ab5d-4cc2-425b-b790-22d4057fa66f
Aur1anna/randomLeetcode100
main.cpp
#include <iostream> #include <cstdlib> // 用于rand()和srand() #include <ctime> // 用于time() #include "question_database.h" #include "utils.h" int main() { // 初始化随机数种子 srand(static_cast<unsigned>(time(0))); // 初始化题库并加载状态 std::vector<Question> questionDatabase = initializeAndLoadQuestionDatabase("question...
TOOL
0.934652
4.097824
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-02-14T12:59: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": "fdd445baa7...
cd567250-8eaa-4853-92e1-fdb8afeb5ab1
SS961214/BoundsOnEigenstateThermalization
StatMech/HilbertSpace/OpSpace/mBodyOpSpace_Boson_GramMat.hpp
#pragma once #include "mBodyOpSpace_Boson.hpp" template<typename Scalar_> __host__ std::vector<std::vector<std::vector<Index>>> blocksInGramMat( mBodyOpSpace<ManyBodyBosonSpace, Scalar_> const& opSpace) { int const m = opSpace.m(); std::vector< std::vector<std::vector<Index>> > blocks(1); Eigen::ArrayX<bool> ...
ALGO
0.989974
6.16259
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-01-20T08: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": "623ccd0014df...
0c397a59-3eac-45f0-b94a-04d6a3997a58
Uuuuuuho/algorithm_study
algorihm/dir_C++/12865_knapsack.cpp
#include <iostream> #include <utility> #include <string.h> #define MAX(x, y) ((x) > (y)) ? (x) : (y) int main() { int N = 0, K = 0; std::cin >> N >> K; /* pair first: weight & second: value */ std::pair<int,int> knapsack[N+1]; int i = 0, j = 0; for(i = 1; i <= N; i++) { std::cin >> knapsa...
ALGO
0.999982
3.767501
{ "github_metadata": { "branch": "main", "commit_count": 295, "repo_created_at": "2025-07-15T15:56: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": "683951de0a...
c0d6f83d-e428-4ef1-a8d4-341a060da858
shugo256/atcoder
others/square869120-4/d.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <string> #include <iomanip> using ll = long long; using namespace std; #include <functional> template <typename data_t> class RerootingTree { struct edge { int to; // dest node int rev; // index of rev...
ALGO
0.999915
4.444917
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2019-04-12T01:15: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": "cab71ba79...
d8a9efd6-8ad8-4662-9238-0f163976ebea
ishandutta2007/codeforces-n
noam527/normal/653/D.cpp
#include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> #define endl '\n' #define fast ios::sync_with_stdio(0), cin.tie(0) #define debug cout << "ok" << endl #define finish(x) return cout << x << endl, 0 typedef long long ll; typedef long double ldb; const int md = 998244353, inf = 1e9 + 7; const ll ...
ALGO
0.999846
4.545521
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35: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": "5a9deb0c9892...
262fc772-0daf-429f-9c39-b99bfb24cd76
Sahib61003/DSA_Leetcode
May_questions/design_hashset.cpp
//Problem: Design Hashset //Link: https://leetcode.com/problems/design-hashset/ //Code: class MyHashSet { private: int size; std::vector<std::list<int>> buckets; public: MyHashSet() { size = 1000; buckets = std::vector<std::list<int>>(size); } void add(int key) { int inde...
ALGO
0.99904
6.027116
{ "github_metadata": { "branch": "main", "commit_count": 268, "repo_created_at": "2023-01-02T11:48: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": "5b23a8ee63...
dd5c136d-f05f-41f5-9eab-dc847b13edde
Eguelin/cpp09
ex02/class/PmergeMe.hpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* PmergeMe.hpp :+: :+: :+: ...
ALGO
0.983236
5.563289
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2023-12-11T14:43: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": "5f2826556...
eb31337a-2a6f-4b50-a759-b73bb658ed47
any1ok/algorithm_programmers
추가/구현.cpp
#include<cstdio> #include<climits> #include<cmath> #include<cstdlib> #include<cstring> #include<cassert> #include<vector> #include<iostream> #include<fstream> #include<sstream> #include<queue> #include<stack> #include<set> #include<map> #include<unordered_map> #include<unordered_set> #include<deque> #include<list> #inc...
ALGO
0.999862
3.319711
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-09-30T14:31:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a43f83c4b05...
0e21d3e9-bc95-4500-bf92-3150f3d54b3a
tarekrahamn/CodeChef-Problem-solve
Chef_and_Asteroids.cpp
#include <bits/stdc++.h> using namespace std; const int mod = 1000000007; int add(int a, int b) { return (a + b >= mod) ? a + b - mod : a + b; } int sub(int a, int b) { return (a - b < 0) ? a - b + mod : a - b; } int mul(int a, int b) { return (long long)a * b % mod; } int power(int a, int b) { int...
ALGO
0.999793
4.496706
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-07-07T07:19:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1642ad806ee...
9b142ea8-da47-4d81-b3ce-14d48f72f37d
Viing3107/Source-Code
M22.cpp
#include <bits/stdc++.h> #define int long long #define task "test" #define forUp(i, l, r, step) for (int i = l; i <= r; i += step) #define forDown(i, l, r, step) for (int i = l; i >= r; i += step) using namespace std; const int N = 2e5 + 5; int mark[...
ALGO
0.999753
3.579887
{ "github_metadata": { "branch": "main", "commit_count": 450, "repo_created_at": "2024-04-27T09:52: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": "45e3b9b192...
6818a5ae-069d-4cb6-b6a1-c4b439d5fbfd
Untolders/Paths-from-root-with-a-specified-sum-Solution
Paths-from-root-with-a-specified-sum-Solution.cpp
###################################################################################### Question ################################################################################################### Given a Binary tree and a sum S, print all the paths, starting from root, that sums upto the given sum. Path may not end ...
ALGO
0.999941
5.30158
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-22T07:19: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": "c8342d7c103e...
31cee768-f004-40a5-b7e1-002160f8253d
Austin-X/DMOJ
IOI/IOI '14 Practice Task 1 - Square.cpp
#include <bits/stdc++.h> #include <unistd.h> using namespace std; typedef long long ll; const int MX_N = 1e3; static int psa[MX_N + 1][MX_N + 1]; int compute(int n, int size) { int cnt = 0; for (int i = 1; i <= n - size + 1; i ++) { for (int j = 1; j <= n - size + 1; j ++) { if (psa[i + ...
ALGO
0.999966
3.975249
{ "github_metadata": { "branch": "master", "commit_count": 766, "repo_created_at": "2019-05-12T11:56:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6436daa...
da9e85f5-07b1-411f-9ad2-057a9bd5b451
Oxygonalrs/competitive-programming-oxygonal
Competitive Programming/39. Graph Traversals/2. SSSP.cpp
#include<iostream> #include<list> #include<map> #include<queue> #include<unordered_map> using namespace std; template<typename T> class Graph{ map<T, list<T>> neighbours; public: void addEdge(T x, T y) { neighbours[x].push_back(y); neighbours[y].push_back(x); } void bfs(T start)...
ALGO
0.999825
4.245629
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-07-27T01:50: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": "a7ec092b49...
f9f0d9e5-fc74-44df-9763-8acef717f4dc
patpro28/maketest
custom/2darr004b/sol/correct.cpp
/* Author: <NAME> Date: 2024/12/26 - 17:29 */ #include <bits/stdc++.h> #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif using namespace std; pair<int, int> pos[2000000 + 10]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); int n, m, q; cin >> n >> ...
ALGO
0.999943
4.253209
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-19T07:22: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": "ac5984a1924f...
af3a0427-802e-4e94-9cfa-74a4ad1ba851
MADUKO1/SDA_QUIZ2
linear_list.cpp
#include "Linear_List.h" void createNode(Node** p, int nilai) { *p = (Node*)malloc(sizeof(Node)); if (*p != NULL) { (*p)->info = nilai; (*p)->next = NULL; } } void insertFirst(LinkedList* list, int nilai) { Node* newNode; createNode(&newNode, nilai); if (newNode != NULL) { ...
ALGO
0.996526
4.082416
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-14T04:30: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": "06d644b78762...
794e84f8-f377-4975-8411-16c5b309c199
royelee/leetcode
XProject/Level13.cpp
// // Level12.cpp // XProject // // Created by <NAME> on 3/30/16. // Copyright (c) 2016 <NAME>. All rights reserved. // #include <stdio.h> #include "Level.h" #include "Utils.h" #include <algorithm> #include <iostream> #include <sstream> #include <vector> #include <map> #include <numeric> #include <set> #include <...
ALGO
0.997198
3.460279
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2015-10-19T05:10: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": "33f6ef83...
b6ad84d9-31dd-4502-aded-488225d6c0b8
JustArunn/DSA
Data Stracture And Algo/Recursion Algo/find-subsets.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; /* THIS IS COMPLETE DATA STRACTURE CODE FILE MADE BY - <NAME> E-mail : <EMAIL> instagram : just.arunn GitHub : justArunn */ void solve(int i, string input, vector<string> &ans, string output) { if (i >= input.size()) { ...
ALGO
0.998717
5.072329
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-04-02T07:36: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": "183f4d2d3b4c...
500ff552-6f66-4b53-97ab-d9c1593e9a72
KeerthanaPravallika/Strivers-A2Z-DSA-Course
LinkedList/SingleLinkedList/Delete-Node.cpp
/* Given a singly linked list and an integer x.Delete xth node from the singly linked list. Example 1: Input: 1 -> 3 -> 4 x = 3 Output: 1 -> 3 Explanation: After deleting the node at 3rd position (1-base indexing), the linked list is as 1 -> 3. */ //{ Driver Code Starts // C program to find n'th Node in lin...
ALGO
0.999976
5.070349
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-06-07T09:00: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": "a5567949714...
d204f4cd-777c-4562-a00b-333ae17e072e
az7792/Competitive-Programming-Code
Codeforces/CF10_23/B_Infected_Tree.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define all(x) (x).begin(), (x).end() #define eb emplace_back const ll MAX = 2e5 + 10; const ll MOD = 1e9 + 7; typedef pair<int, int> pii; typedef pair<ll, ll> pll; vector<vector<int>> G; vector<int> dp; vector<int> num; void DFS(int p...
ALGO
0.99973
4.943287
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2024-03-09T13:46: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": "ce47cb997...
c84e88a0-30a5-4869-b938-b64e495e6b44
subhamchawda01/SubhamTwoRoads
MIDTERM/dvctrade/ExecLogic/directional_aggressive_trading.hpp
/** \file ExecLogic/directional_agrressive_trading.hpp \author: (c) Copyright Two Roads Technological Solutions Pvt Ltd 2011 Address: Suite No 353, Evoma, #14, Bhattarhalli, Old Madras Road, Near Garden City College, KR Puram, Bangalore 560049, India +91 80 4190 3551 *...
ALGO
0.941991
6.594351
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-08-05T14:58: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": "91c5f21bc...
dfa5f886-2d61-4bc4-a02b-703556f12b62
chatz06/Quadratic-equation
Quadratic_equation.cpp
#include <iostream> #include <cmath> using namespace std; double Diak (double a,double b,double c); void Check (double d,double a,double b); int main () { double a,b,c; cout << "Give a = "; cin >> a; cout << "Give b = "; cin >> b; cout << "Give c = "; cin >> c; double d = Diak...
ALGO
0.999792
3.816677
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-19T11:43:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e921b4d4bd15...
01c586ec-1791-400e-8c60-a6a7b9a0151e
sasaurabh11/DSA
DSA CONCEPTS/Graph/05_sortest_path.cpp
#include <bits/stdc++.h> using namespace std; class graph { public: int numVertex; unordered_map<int, vector<pair<int, int>>> g; graph(int vertexSize) { numVertex = vertexSize; } void addEdge(int src, int dest, int weight, bool direction) { g[src].push_back({dest, weight});...
ALGO
0.999981
5.345457
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-11-21T19:14:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56e96b497e4...
d95a604e-b708-4a5b-8933-4156fc708877
Crestfell351/SnakeProjectC-
snake_agent.cpp
#include <iostream> #include <vector> #include <string> #include <sstream> #include <cstdlib> #include <ctime> using namespace std; // Function to split a string by spaces vector<string> splitString(const string &str) { vector<string> result; stringstream ss(str); string token; while (ss >> token) { ...
ALGO
0.999321
4.31666
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-10-21T23:03: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": "2f6268b4b497...
713b840a-2991-4923-9167-198de35d092a
tfarnecim/Codigos
Knights of a Polygonal Table.cpp
#include <bits/stdc++.h> using namespace std; //biblioteca #define INF 1000000000 #define INFL 1000000000000000000 #define pb push_back #define mp make_pair #define alfa "abcdefghijklmnopqrstuvwxyz" typedef long long ll; typedef vector <ll> vi; typedef pair <ll,ll> pii; ll MAX(ll a,ll b){ if(a>b)return a; return ...
ALGO
0.999994
3.498532
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2018-10-15T10:57:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c6d519d7...
d8771fe4-abc3-4d6a-8fa6-83ae21aacb77
rutvik1503/DSA_ALONG_CPP
RUTVIK_PROJECTS/RUTVIK_SORT_ARRAY/Sorting.cpp
#include <iostream> using namespace std; void enter_element(int a[], int size) { cout << endl << "ENTER ELEMENTS IN ARRAY..." << endl << endl; for (int i = 0; i < size; i++) { cout << "A[" << i << "] : "; cin >> a[i]; } cout << endl; } void print_arr(int a[], in...
ALGO
0.999699
4.195078
{ "github_metadata": { "branch": "Rutvik_Bhatti", "commit_count": 62, "repo_created_at": "2025-01-10T11:28: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": "45...
769e361b-e750-4e3c-85eb-661a5299eb50
wisdompeak/LeetCode
Dynamic_Programming/1494.Parallel-Courses-II/1494.Parallel-Courses-II_v2.cpp
class Solution { public: int minNumberOfSemesters(int n, vector<vector<int>>& dependencies, int k) { vector<int>dp(1<<n, INT_MAX/2); vector<int>prevState(1<<n, 0); vector<int>prevCourse(n,0); for (auto x: dependencies) prevCourse[x[1]-1] |= 1<<(x[0]-1); ...
ALGO
0.999918
5.532528
{ "github_metadata": { "branch": "master", "commit_count": 8912, "repo_created_at": "2017-03-01T10:30:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6018, "forks": 1314, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "0...
d24e2dfb-cc35-456c-9d44-15adf725878e
side-projects-all/works
Leetcodes/backtracking/q_22.cpp
/* Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Example 1: Input: n = 3 Output: ["((()))","(()())","(())()","()(())","()()()"] Example 2: Input: n = 1 Output: ["()"] Constraints: 1 <= n <= 8 */ class Solution { private: void backtracking(...
ALGO
0.999779
6.282683
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2025-01-03T05:24: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": "8676b9b2630...
99ee2482-7ea4-484a-85de-b2d214619ce3
Khanhnvtb/Data-structures-and-algorithms-PTIT-2021
CPP/DSA09026.cpp
// // Created by khanh on 5/18/2021. // #include <bits/stdc++.h> using namespace std; int v, e, first, last, vs[1005], previos[1005]; queue <int> q; vector <int> a[1005]; void BFS(int u) { q.push(u); vs[u] = 1; while (! q.empty()) { u = q.front(); q.pop(); for (int i = 0; i < a[u].si...
ALGO
0.999954
4.331096
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-05-16T10:07: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": "31ea6aff2c76...
4aff83d2-3765-4a2f-b921-d91e285978d3
alexandraback/datacollection
solutions_5631572862566400_0/C++/xrq/C.cpp
#include<iostream> #include<stdio.h> #include<string.h> #include<math.h> #include<algorithm> #include<stdlib.h> #include<queue> #include<stack> #include<map> #include<vector> #define mem(a) memset(a,0,sizeof(a)) #define INF 0x7fffffff //INT_MAX #define inf 0x3f3f3f3f // const double PI = acos(-1.0); const double e ...
ALGO
0.999958
4.135469
{ "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": "41a7407fa...