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
005ee1e3-83ee-4458-ab58-8974b4c8e0eb
oxydated/Exporter
MathUtility/matrixUtility.cpp
#include <complex> #include "dualQuaternionFunctions.h" #include "matrixUtility.h" #include "debugLog.h" namespace oxyde { namespace math { float getDualQuaternionParametersFromMatrix(double m[], double & cosTheta, double & sinTheta, double & nx, double & ny, double & nz, double & slide, double & mx, double & my, d...
ALGO
0.974064
3.44891
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-01-10T23:07: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": "9d4be3e76...
5585211c-2f83-4c0c-a886-d082a443abf0
manojmkhanna/cpp-notes
src/StandardTemplateLibrary/Container/ListOperation.cpp
/* * @Author: <NAME> */ #include <cstdio> #include <list> using namespace std; void print(list<int> l) { for (list<int>::iterator i = l.begin(); i != l.end(); ++i) { printf("%d ", *i); } printf("\n"); } bool remove_if_pred(int i) { return i == 20; } bool unique_pred(int i, int j) { return i == j; } int ...
TOOL
0.955197
4.519777
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-03-13T22:13: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": "fedd3da307...
c1206df6-8dc9-42d9-8239-1293f3971a18
alexandraback/datacollection
solutions_5662291475300352_0/C++/ruippeixotog/c.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; for(int tc = 1; tc <= t; tc++) { int n; cin >> n; int d1, m1, d2, m2; for(int i = 0; i < n; i++) { int d, h, m; cin >> d >> h >> m; if(h == 2) { d1 = d2 = d; m1 = m; m2 = m + 1; } else if(i == 0) { d1 = d; m1 = ...
ALGO
0.999547
3.367476
{ "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": "0573e9b38...
c62a95fd-ecc2-4dd6-9916-917a7f36dd5c
waritsriyadi/IoT-Samples
ESP32/esp32-guitarStringDetection-fuzzy/guitarDetection.ino
#include "arduinoFFT.h" #include <Stepper.h> // Define the number of steps per revolution const int stepsPerRevolution = 256; // Define the motor control pins const int motorPin1 = 12; const int motorPin2 = 13; const int motorPin3 = 14; const int motorPin4 = 27; // Initialize the stepper library on the motor control...
ALGO
0.993294
5.834271
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2023-12-20T19:28:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bb18e7fb5a...
f22f3906-2bdc-4143-93e7-620db11966b0
omerhalid/cpp_data_structures
delete_node_binary_search_tree.cpp
// //Delete a node from a BST //Here will be explained how to delete a node from a BST. There are three cases: //1. Node to be deleted is a leaf node //2. Node to be deleted has only one child //3. Node to be deleted has two children //The trick for two children case is to find the minimum value in the right subtree...
ALGO
0.999938
3.172591
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-09-24T10:24:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "210cf1abfec...
5b6ac94c-3067-417d-9dd4-371802382cd4
yuliapuga/laba_4_virtual_function
laba_4_virtualfunction.cpp
/* Створити клас TNumber з віртуальними методами для знаходження суми цифр та знаходження першої/останньої цифри. На основі цього класу створити класи-нащадки TIntNumber та TRealNumber, у яких реалізовано перевизначені віртуальні методи. Створити m об’єктів цілих чисел та n об’єктів дійсних чисел (дані згенерувати випа...
ALGO
0.997933
3.906296
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-31T06:31: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": "641ef0318cd5...
3f892906-4fb9-43bc-bc7d-dc5edfd90752
avinashw50w/ds_algo
Leetcode/225. Implement Stack using Queues.cpp
/*Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() -- Get the top element. empty() -- Return whether the stack is empty.*/ class MyStack { queue<int> q1, q2; public: /** Initialize your data structure here....
ALGO
0.999319
5.894708
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2019-06-23T03:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99418a0d0...
a65b2b96-e425-463d-af2d-af0f80a010d6
yash-bhootda/Coding-DSA
Data Structures/Array/medium/repeat_missing.cpp
#define pb push_back #define vi vector<int> #define si stack<int> #define vl vector<long long int> #define pi pair<int, int> #define pl pair<ll, ll> #define ll long long int #define fo(a, b) for (auto i = a; i < b; ++i) #define nfo(a, b) for (auto i = a; i < b; i--) #define jfo(a, b) for (auto j = a; i < b; j++) #defin...
ALGO
0.99996
3.712122
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2022-09-12T07:12: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": "9ede80004c7...
8f877f3b-9582-4011-8647-063052ebad8e
abhishek18124/LVCPPMay2021
July/23rdJulyLecture24/006Queues.cpp
/* Implementation of the queue data structure using the linked list data structure. */ #include<iostream> using namespace std; template <typename T> class node { public: T data; node<T>* next; node(T data) { this->data = data; this->next = NULL; } }; template <typename T> class forward_list { node<T>* ...
ALGO
0.999354
5.123926
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2021-06-14T12:27:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8af90cc8f78...
b599a00b-e44b-4997-91b5-5a68e0ae9219
kidaa/pyimager
CEP/Calibration/BBSKernel/include/BBSKernel/Expr/MatrixMul2.h
//# MatrixMul2.h: Compute A * B, where A and B are JonesMatrices. //# //# Copyright (C) 2009 //# ASTRON (Netherlands Foundation for Research in Astronomy) //# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, <EMAIL> //# //# This program is free software; you can redistribute it and/or modify //# it under the terms of the...
ALGO
0.971459
6.631459
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-12-27T15:49:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d57d932688...
f434304e-df0d-45f8-a9de-bbe695dfa258
iamjatin08/FINAL450
Search And Sorting/ProductArrayPuzzle.cpp
#include<bits/stdc++.h> using namespace std; vector<long long int> productExceptSelf(vector<long long int>& arr, int n) { long long *left = new long long[n]; long long *right = new long long[n]; left[0] = 1; // cout<<"LEFT PRODUCT : "<<left[0]; for(int i = 1 ; i<n ; i++){ left[i] = left[i-1] * a...
ALGO
0.999969
4.494849
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-08-07T21:21: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": "ba6277230699...
03df71bb-4e3a-43f6-94b6-525c210d880e
dataelement/bisheng-rt
src/server/src/main.cc
// Copyright 2018-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this...
WEB
0.951101
5.50944
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2023-08-04T09:40:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30, "forks": 14, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "a95d4d40d...
01b8247a-d780-4869-b8cf-27a8480b8446
y-aut/AtCoder
lib/graph/search/dijkstra.cpp
// !hidden #include "template.hpp" // !endhidden class Dijkstra { const vvpll &wedges; const ll start; vll dist; vll prev; // 直前の頂点を記録する配列 void set_dist() { // (現時点での最短距離, 頂点) priority_queue<pll, vector<pll>, greater<pll>> q; q.emplace(dist[start] = 0, start); whil...
ALGO
0.999963
5.090507
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2023-04-11T13:24:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aeb9ffdc8...
09aed995-a493-4dc6-8962-e08367b3b09b
mushkul/Vanderbilt-CP
solutions/gpt-4o/2112.cpp
#include <iostream> #include <vector> #include <string> int main() { std::string s; std::cin >> s; int n = s.size(); std::vector<int> ones; for (int i = 0; i < n; ++i) { if (s[i] == '1') { ones.push_back(i); } } std::vector<int> result(n - 1, 0); ...
ALGO
0.999994
4.359887
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-09-18T17:07: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": "694563afd7f...
6275a6d2-3697-47f6-850f-bfefd1bb4934
OmkarOP-07/Bit-Manipulation
Smallest prime factor/Optimal.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int N = pow(10, 5); int spf[N]; vector<int> queries = {2,3,4,6,9}; vector<vector<int>> ans; ans.resize(queries.size()); for(int i = 0; i<N; i++){ spf[i] = i; } for(int i = 2; i*i<N ; i++){ i...
ALGO
0.999861
3.89014
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2025-04-13T16:16: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": "6017263b191...
acc573b4-5470-40b2-8f75-096a8dde30f9
pranjalyadav451/CP
Before/Practice/2021/Junior_Sheet/May/19_May_2021/248_2_B_Kuriyama_Mirai_Stones.cpp
#include <bits/stdc++.h> using namespace std; int fastio() { ios_base::sync_with_stdio(false); cout << fixed << setprecision(10); cin.tie(nullptr); return 0; } int __fastio = fastio(); template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p); template<typename A> ostream& operator<<(ostrea...
ALGO
0.99995
4.812533
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2022-07-22T11:45: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": "3039af43c...
a0623b3c-62da-4998-9524-86ac24d7eb69
Synesthesias/PLATEAU-SDK-for-Unreal
Source/PLATEAURuntime/Private/RoadAdjust/RoadMarking/LineSmoother.cpp
// Copyright © 2023 Ministry of Land, Infrastructure and Transport #include "RoadAdjust/RoadMarking/LineSmoother.h" #include "Components/SplineComponent.h" #include "GameFramework/Actor.h" #include "Math/UnrealMathUtility.h" #include "RoadNetwork/Structure/RnModel.h" #include "RoadNetwork/Structure/RnRoad.h" #include...
ALGO
0.997235
5.805465
{ "github_metadata": { "branch": "dev/v4", "commit_count": 388, "repo_created_at": "2022-05-10T16:51:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 65, "forks": 13, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "218672e...
d01b54c0-34c1-4f62-82ba-884aaff93280
tymefighter/CompetitiveProg
uva/10139_Factovisors.cpp
#include<iostream> #include<cmath> #include<bitset> #include<vector> using namespace std; const int N = 46341; int n, m; bitset<N> bs; vector<int> primes; void sieve() { primes.clear(); bs.set(); bs[0] = bs[1] = false; for(long long int i = 2;i <= N;i++) { if(!bs[i]) continue...
ALGO
0.999895
4.423366
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2019-05-11T04:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29824503d...
e1949c9a-b36a-4674-a8a1-6325150a2d2d
cshung/Competition
Competition/LEET_COIN_CHANGE.cpp
#include "stdafx.h" // https://leetcode.com/problems/coin-change/ #include "LEET_COIN_CHANGE.h" #include <algorithm> #include <iostream> #include <sstream> #include <vector> #include <string> using namespace std; namespace _LEET_COIN_CHANGE { class Solution { public: int coinChange(vector<int>& ...
ALGO
0.999985
5.784301
{ "github_metadata": { "branch": "main", "commit_count": 1275, "repo_created_at": "2014-09-06T20:52:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8ac5c1ee5...
1b3f07a5-9be7-467e-926c-3bbf5a965fc8
varun1271/CSA0329-varun-192424230
bubble.cpp
#include <stdio.h> void bubbleSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { // Last i elements are already in place for (int j = 0; j < n - i - 1; j++) { if (arr[j] > arr[j + 1]) { // swap int temp = arr[j]; arr[j] = arr[j + 1...
ALGO
0.999972
5.296813
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-07-04T08:17: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": "7b72e8ea8d61...
740508c2-52c8-49d9-8354-77f426299f9e
jordiparislopez/Phd-Thesis
DSE-BSE/CompDSE.hpp
/* Necessary functions for complex DSE */ // Executes complex DSE routine void comp_prop(vcdouble P2,vcdouble JAC) { vcdouble APpre(ncp); vcdouble BPpre(ncp); // Read real data to use as initial contidion for the complex plane std::ifstream Asr("Data/RealDSE/A.txt"); std::ifstream Bsr("Data/Rea...
ALGO
0.935934
3.816832
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2019-01-15T18:54: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": "2f6399a10...
0de6696d-e08e-479b-a9f1-b18a361fe5b4
centuryhopper/practice_interview_problems
C_C++/leetcode_questions/find_first_and_last_position_in_sorted_array.cpp
#include "../templates/template.h" class Solution { private: vector<int> lst; void bin_search(vector<int> nums, int target, int lo, int hi) { if (lo > hi) { vector<int> v{-1, -1}; lst.reserve(2); lst.insert(lst.end(), v.begin(), v.end()); ret...
ALGO
0.999985
6.26945
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2020-10-08T18:25: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": "4934a258fe...
968fcd1e-93e6-4af3-8e8d-e8d67fcfb817
davidafl/PipeMaster
include/graph/Graph.h
#pragma once #include <vector> #include <list> #include <queue> #include "Edge.h" #include "Vertex.h" template <class T> class Graph { std::vector<Vertex<T>*> vertices; void dfs(Vertex<T>* v, std::vector<T>& res) const; public: bool addVertex(const T& in, bool start); bool addEdge(const T& source, const T& de...
ALGO
0.998969
5.146945
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-12-18T22: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": "dde1d32b1fb8...
36a8e3bc-a283-4e24-9d46-1a0b9d1aa7df
ishandutta2007/codeforces-x
xellos/normal/1013/B.cpp
#include <bits/stdc++.h> // iostream is too mainstream #include <cstdio> // bitch please #include <iostream> #include <algorithm> #include <cstdlib> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <list> #include <cmath> #include <iomanip> #include <time.h> #define dibs reserv...
ALGO
0.999921
3.314459
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:38: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": "71c3163c0226...
7da84dde-4194-4c08-9097-e1c44d78eb5b
griverat/prog2022-I
S03/T03/prob05.cpp
/* * Created on Mon Jul 11 23:39:41 2022 * @author: <NAME> * @handle: DangoMelon */ #include <iostream> int main() { int daysToMonth[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; int day, month, year, dayNumber; std::string zodiac; std::cout << "Ingrese el dia: "; std::cin >...
ALGO
0.953916
4.041999
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2022-06-28T22:12: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": "61cbf6a3a...
2fa55f7f-bc45-4935-968b-84d6707d36e5
martin-velas/SLAM_plus_plus
src/slam_app/SolveSpheronImpl.cpp
/* +-----------------------------------+ | | | *** Spherical BA solver *** | | | | Copyright (c) -t<NAME>- 2013 | | | | SolveSpheronImpl.cpp ...
TOOL
0.954561
4.644765
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-09-25T11:16:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ac60dae...
bb4e9f37-0797-48bf-9dfc-45526f3744a7
ishandutta2007/codeforces-m
maksim1744/normal/1466/C.cpp
/* author: Maksim1744 created: 30.12.2020 17:40:37 */ #include "bits/stdc++.h" using namespace std; #define ll long long #define ld long double #define mp make_pair #define pb push_back #define eb emplace_back #define sum(a) ( accumulate ((a).begin(), (a).end(), 0ll)) #define mine(a) (*mi...
ALGO
0.999898
4.247531
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a06a577547e...
7f0633db-50de-452f-9388-707d0f990557
Livinfly/AlgorithmPromble_Code
AtCoder/2023/abc292/c.cpp
#pragma GCC optimize(2) #include <bits/stdc++.h> #define fi first #define se second #define mkp(x, y) make_pair((x), (y)) #define all(x) (x).begin(), (x).end() using namespace std; typedef long long LL; typedef pair<int, int> PII; void solve() { int n; cin >> n; vector<int> f(n+1); for(int i = 1; i...
ALGO
0.999847
4.645388
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-08-24T10:17: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": "6a9ba461fb6...
2e2f627c-d7c7-42e6-9d94-93541705c8a3
elissandro13/ed-praticas
pa06/src/main.cpp
#include "../include/graph.hpp" #include <iostream> using namespace std; /*** -d quantidade de vertices quantidade arrestas grau minimo grau máximo -n todos vizinho dos vértizes -k retornar 1 para grafo complerto e 0 para a negativa Entrada N (número de vertices) M número de (arestas) Ki até Km as conexões das a...
ALGO
0.994471
3.78396
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-10-08T14:16: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": "e4c21b6f84a3...
3ab612db-6898-4ffa-a78e-e3af2dd4bc78
NNU-GISA/non-rigid-recon
main.cpp
#include "TSDF.h" #include "opencv2\highgui.hpp" #include "opencv2\opencv.hpp" #include <iostream> #include <pcl\point_cloud.h> #include <pcl\point_types.h> #include <pcl\io\ply_io.h> #include "MarchingCubes.h" #include <vector> #include <pcl/kdtree/kdtree_flann.h> #include "DenseICP.hpp" #include <stdio.h> #include <i...
DATA
0.929144
3.836426
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-04-17T18:02:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "622c9661d7...
7cc79203-b7eb-44e5-b2f7-f270976c73e5
Boleka3/BigRealNotation
A2_S24_20220087/A2_S24_20220087_10.cpp
// File: A2_S24_20220087_10.cpp // Purpose: reproduces the sentence . // Author: <NAME> // Section: 24 // ID: 20220087 // TA: <NAME> // Date: 5 Nov 2023 #include <iostream> #include <fstream> #include <string> #include <map> #include <algorithm> using namespace std; int main() { wifstream fin("Input file.txt");/...
ALGO
0.999598
4.17164
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2023-10-27T11:56: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": "7279cbd87df...
b74f1aff-99a3-422a-a76a-d008d89bdd24
mohit701473/cpp
Lecture 69-73 Binary Search Tree/L 72 Merge Two BST/Que3_mergeTwoSortedLL.cpp
Node* mergeLL(Node* head1, Node* head2){ Node* head = NULL ; Node* tail = NULL ; while(head1 != NULL && head2 != NULL){ if(head1 -> data < head2 -> data){ if(head == NULL){ head = head1 ; tail = head1 ; head1 = head1 -> right ...
ALGO
0.999938
4.199205
{ "github_metadata": { "branch": "main", "commit_count": 226, "repo_created_at": "2023-02-16T18:42:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7f278191d...
edc51bd3-76bc-4b65-963d-14d178d554be
raincross7/code-similarity
codes/train_code/problem203/problem203_427.cpp
#include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <set> #include <deque> #include <string> #include <cstring> #include <iomanip> #include <fstream> #include <map> #include <unordered_map> #include <bitset> #define _crt_secure_no_war...
ALGO
0.999888
3.593865
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5408d6b8c617...
3cbb45cc-4667-486a-b58a-e989be45a51c
yccyenchicheng/SDFusion
preprocess/isosurface/tbb/pstl2018_20180822oss/examples/dot_product/dot_product.cpp
/* Copyright (c) 2017-2018 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable la...
ALGO
0.999197
6.508555
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2022-11-19T09:13:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 437, "forks": 35, "issues": 35, "pull_requests": 0 }, "file_meta": { "content_id": "3f51e...
c139796a-41dc-492c-a08b-10111689f420
K14KHaNaSa/bojPractice
contest1144_2.cpp
#include <iostream> using namespace std; long long int n, k, c, r, l; long long int b[100001]; long long int s[100001]; long long int p[100001]; long long int skill[100001]; int main(void) { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n >> k >> c >> r; for (int i = 1; i <= k...
ALGO
0.999657
3.765767
{ "github_metadata": { "branch": "master", "commit_count": 728, "repo_created_at": "2021-10-26T18:18: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": "7569b681...
0fd25d89-c34e-4159-b2b2-c7614517a5a8
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/09/0914/personal_submission/cf682c_lengnian.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; using i128 = __int128; using ull = unsigned long long; #define pll pair<ll, ll> #define pii pair<int, int> #define vi vector<int> #define fir(i, a, b) for (int i = a; i <= b; i++) #define pqi priority_queue<int> // 优先队列 #define all(x) x.begin(), x....
ALGO
0.99948
3.950315
{ "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": "0900...
d11f42e6-820f-40a6-b95b-ecfeb5ab12c5
Disha-Gaikwad/CPP
RootsOfQuadratic.cpp
#include <cmath> #include <iostream> float root1(int a, int b, int c) { float discriminant = b * b - 4 * a * c; if (discriminant < 0) { std::cout << "No real roots" << std::endl; return -1; } float root1 = (-b + sqrt(discriminant)) / (2 * a); return root1; } float root2(int ...
ALGO
0.999398
4.639984
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2025-01-11T13:52:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3450c6e6445...
b1d20bfe-75ce-4e80-aa2c-d1af620e6713
udit-panchal/DSA-CPP
Linked List/06_find_middle_of_linked_list.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = NULL; } ~Node() { int value = this->data; // Memory deallocation if (this->next != NULL) { ...
ALGO
0.999848
5.471617
{ "github_metadata": { "branch": "main", "commit_count": 216, "repo_created_at": "2024-01-10T05:05: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": "acbcbb8008...
cc8863b4-72d6-4379-ad18-46712f0f46e9
CodeCamper-Sub/Problem_Solving
atCoder/Regular/123/A_Arithmetic_Sequence.cpp
#include <bits/stdc++.h> #define INF (__LONG_LONG_MAX__ / 3) typedef long long ll; using namespace std; ll a, b, c; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin >> a >> b >> c; ll answer = INF; if(2 * b < a + c) { if((a + c - 2 * b) % 2 == 0) { answer = (a + c - 2 * b) / 2; ...
ALGO
0.999923
3.833607
{ "github_metadata": { "branch": "main", "commit_count": 256, "repo_created_at": "2022-10-20T10:57: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": "047336e374...
feeebd4b-d426-4a79-afa0-e9918306bb87
MinbinGong/cplusplus-projects
leetcode-solutions/leetcode-52.cpp
/* N Queens In this approach , Whenever a queen is placed, at first it is checked if it satisfies the conditions given that it is not under attack. validMove function. First it check there are no other queen in row the queen is filled. As we are putting queen column wise so no need to check for column. Then there are...
ALGO
0.999996
6.264541
{ "github_metadata": { "branch": "master", "commit_count": 321, "repo_created_at": "2019-09-05T02:56: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": "9e317d24...
fc9fe6b5-9bba-427c-8168-da7cae253f14
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p03361/s396459987.cpp
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int,int>; int main() { int h, w; cin >> h >> w; vector<vector<char>> s(h, vector<char>(w)); rep(i, h) rep(j, w) cin >> s[i][j]; bool able = true; int di[] = {1, 0, -1, 0}; in...
ALGO
0.999882
4.491735
{ "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": "e858e8bf27...
913ebaaf-ba3b-45ae-96fe-94b815f95cc2
Kenzo-Sugai/Beecrowd-Codes
Graph/1835.cpp
#include <iostream> #include <queue> #include <vector> #include <set> #include <stdlib.h> using namespace std; int main() { int T, M, N, X, Y, t = 1, count = 0; string v1, v2; //cout << "Números de casos: " << endl; cin >> T; while(T--){ vector < vector <int> > G; //cout << "Digite o número de vért...
ALGO
0.999793
3.546244
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2022-02-03T01:45: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": "3c59e8a4449...
d81e7b64-a4f6-40c4-a693-9b04c1d8db55
aklk1ng/code
cpp/cf/contest/1985/d.cpp
#include <bits/stdc++.h> using ll = long long; const int mod = 998244353; void solve() { int n, m; std::cin >> n >> m; std::vector<std::string> g(n); for (int i = 0; i < n; i++) { std::cin >> g[i]; } std::pair<int, int> top = {INT_MAX, INT_MAX}, bot = {INT_MIN, INT_MIN}; for (int i...
ALGO
0.999984
4.525623
{ "github_metadata": { "branch": "main", "commit_count": 495, "repo_created_at": "2022-02-09T13:42: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": "398d7c8e9b...
a42a9f8e-c4a2-4d64-8330-8d381c852535
jjbillings/Network_Load
main.cpp
/* * File: main.cpp * Author: jjbillings * * Created on October 16, 2016, 9:09 PM */ #include<cstdlib> #include<stdio.h> #include<queue> #include<stack> #include<iostream> #include<fstream> #include<ctime> #include"nets.h" using namespace std; #define NUM_CONNECTIONS 500 #define MAX_CHANNELS 30 #define SAMPL...
ALGO
0.994471
3.544976
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2017-01-02T02:43:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7a20ee0...
a52fcfe7-2a55-456d-b1fe-9652ea5bb709
hnfong/algo
hkoi/oijudge/2047.cpp
#include <iostream> using namespace std; int max(int a, int b) { return (a > b ? a : b ); }; int min(int a, int b) { return (a < b ? a : b ); }; int main() { int n1,n2,k1,k2,c; int a1[1000],b1[1000]; int a2[1000],b2[1000]; cin >> n1; for (int i = 0;i < n1;i++ ){ cin >> a1[i] >> b1[i]; }; cin >> n2; f...
ALGO
0.999868
3.400996
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2016-06-22T18:20: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": "a8da40492...
e9a51d06-f51e-484d-af85-453241a93be2
ishandutta2007/codeforces-s
skip2004/normal/1081/F.cpp
#include<bits/stdc++.h> int n, t; using std::cin; using std::cout; const int maxn = 100100; std::mt19937 rd(time(0)); class yhx { int a[maxn], t; public : inline void init() { cin >> n >> t; :: t = t; return ; n = (rd() % 20 | 1); for(int i = 1;i <= n;++i) { t += a[i] = rd() % 2; std::cout << a[i]; ...
ALGO
0.999727
3.038843
{ "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": "1f6d1c4a833c...
4c9f7ec7-5eb3-4f7d-95fc-a23908134797
GermainSe/matrix_multiplication
Project3/Project3/Quelle1.cpp
#include <iostream> #include <intrin.h> #include <stdio.h> int const size = 512; float A[size][size]; float B[size][size]; float C[size][size]; float D[size][size]; float randomFloat() { return (float)(rand()) / (float)(rand()); } void create_random_matrix() { //float** A = (float**)malloc(500 * 500 * sizeof(fl...
ALGO
0.99797
3.855646
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-01-01T09:53:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bfaa23a9a41a...
0519cb44-4525-481e-b309-0232d52d522e
Hinski2/CP
wyszukiwanieBinarne/dzialka/cpp243v2.cpp
#include <bits/stdc++.h> using namespace std; const int mak = 2005; int n; int pole[mak][mak]; pair<int, int> odl[mak][mak]; void wczytaj(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n; for(int i = 1; i <= n; i++) for(int j = 1; j <= n; j++){ bool x; cin >> x; if(x) pole[i][j] = 0...
ALGO
0.999971
3.807595
{ "github_metadata": { "branch": "main", "commit_count": 799, "repo_created_at": "2023-06-07T17:30:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9809c0da74...
ca0c9d41-df67-4aa6-ada2-2a0877684286
childmodel/child
Child/Releases/r081211/Code/tMesh/heapsort.h
//-*-c++-*- /***************************************************************************/ /** ** @file ** @brief a simple heap sort */ /***************************************************************************/ template<class TYPE> void shunt(int ,int ,TYPE const& ,TYPE *); template<class TYPE> void heapsort(int...
ALGO
0.999576
5.366775
{ "github_metadata": { "branch": "master", "commit_count": 1825, "repo_created_at": "2014-10-13T20:10:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 10, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "bf1f9e...
da914c13-0bc0-4325-8fab-4abc9dabe67b
charleyzhuyi/leetcode
BalancedBinaryTree.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNod...
ALGO
0.999893
5.638379
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2012-12-08T22:46: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": "30c68d21...
9d687838-7a4d-48a4-b18a-027976d8bfaf
lingxiaoli94/interactive-hex-meshing
geomlib/geomlib/hausdorff_distance.cpp
#include "hausdorff_distance.h" #include "TriangularMeshSampler.h" #include "generalized_projection.h" namespace geomlib { std::tuple<float, float> ComputeHausdorffDistance( torch::Tensor vertices0, torch::Tensor faces0, torch::Tensor vertices1, torch::Tensor faces1, int batch_size, int repeat_times) { asse...
ALGO
0.997452
6.769502
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-09-07T15:39:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 180, "forks": 22, "issues": 6, "pull_requests": 1 }, "file_meta": { "content_id": "d8771363...
219c2c22-c6a0-4ec9-9ca8-50281bdffda9
kate-burbridge/pf2
Sorting I/n2sorting.cpp
#include <cstdlib> #include <ctime> #include <iostream> using namespace std; void print(const int* numbers, const int SIZE) { for (int i = 0; i < SIZE; i++) cout << numbers[i] << " "; cout << endl; } void myCopy(const int* src, int* dest, const int SIZE) { for(int i = 0; i < SIZE; i++) des...
ALGO
0.998044
5.02276
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2018-05-23T20:43:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "09e79d9f5...
e9de10cc-5e51-4492-ab6f-fc9e865ffbd1
amitverma2/programming-2020
lc/l84-largest-rectangle-in-histogram_hard/largest-rectangle-in-histogram.cpp
#include<iostream> #include<vector> using namespace std; class Solution { public: // brute force int largestRectangleArea(vector<int>& heights) { vector<int> sortedHeights = heights; sort(sortedHeights.begin(), sortedHeights.end()); int max = 0; for (vector<int>::const_iterator...
ALGO
0.999962
6.194094
{ "github_metadata": { "branch": "main", "commit_count": 122, "repo_created_at": "2020-10-03T19:57:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da0ecd0a89...
bdf7d3dc-1231-4ca7-9069-9077d731e310
skavy359/Algorithmic-Huddle
CodeForces-Problems/They Have Fooled.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; if (n == 0 || n == 1) { cout << "10" << endl; } else if (n == 3 || n == 10) { cout << "9" << endl; } else if (n == 12 || n == 4 || n == 2) { cout << "8" << endl; } else if (n ...
ALGO
0.999775
3.5323
{ "github_metadata": { "branch": "main", "commit_count": 1061, "repo_created_at": "2025-05-16T12:29:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49411340a...
4435f29d-c159-49d1-b679-901f5e479457
VACUUMMS/VACUUMMS
include/vacuumms/variational/quaternion.hh
#include <vacuumms/types.h> #include <cmath> void rotate_vector(vacuumms_float v_x, vacuumms_float v_y, vacuumms_float v_z, vacuumms_float theta, vacuumms_float u_x, vacuumms_float u_y, vacuumms_float u_z, vacuumms_float *vout_x, vacuumms_float *vout_y, vacuumms_float *vout_z); /* rotate a v...
ALGO
0.996231
4.00344
{ "github_metadata": { "branch": "develop", "commit_count": 477, "repo_created_at": "2023-07-10T19:21:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "04b95f48...
c1b7db99-18c3-4c8e-a18f-6633741db5f8
TTuk-TTak/Coding-Test
프로그래머스/고득점Kit/스택&큐/[Lv.1] 같은 숫자는 싫어/[Lv.1] 같은 숫자는 싫어_stack.cpp
/* 벡터에서 연속중복값 삭제하는 문제 <유의점> 1. 스택, 큐 둘다 clear 함수를 지원하지 않음 *** while(~)과 pop()을 함께 사용해 하나씩 비워야 함 2. 스택, 큐 둘다 pop 함수의 return 값 없음. 삭제만 함 3, 스택, 큐 둘다 push, pop 이 삽입,삭제 스택은 맨 윗값이 st.top() 큐는 첫 값이 q.front()*/ #include <vector> #include <stack> using namespace std; vector<int> solution(vector<int> arr) ...
ALGO
0.999965
5.316518
{ "github_metadata": { "branch": "main", "commit_count": 115, "repo_created_at": "2022-06-30T05:15:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dddf7d5d87...
b23f86e7-a69b-4ccf-bd7e-3239f7bf301a
Curtisx1/CS303
Assignment_3/functions.cpp
#include "header.h" #include <vector> #include <iostream> using namespace std; void insertion_sort(vector<int>& num) { int i, j, key; bool insertionNeeded = false; for (j = 1; j < num.size(); j++) { key = num[j]; insertionNeeded = false; for (i = j - 1; i >= 0; i--) { if...
ALGO
0.999719
4.688196
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2024-02-09T03:11: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": "5b126e098...
a276d4d5-281c-486d-8588-2566c94d2bb4
ms9876/Baekjun
백준/Bronze/26711. A+B/A+B.cc
#include <iostream> #include <string> #include <math.h> using namespace std; int main() { string n, m, ans = { }; int temp, carry = 0; cin >> n >> m; while (n.length() != m.length()) { if (n.length() > m.length()) m.insert(0, "0"); else n.insert(0, "0"); ...
ALGO
0.999965
4.084091
{ "github_metadata": { "branch": "main", "commit_count": 415, "repo_created_at": "2023-03-21T14:54: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": "bf34f5e93b...
8c198b53-14aa-4549-b5d4-c63c78b20d92
aimuch/iAI
src/tensorrt/tensorrt-4.0.1.6/samples-cpp/sampleMovieLens/sampleMovieLens.cpp
#include <cassert> #include <cmath> #include <ctime> #include <cstring> #include <fstream> #include <iostream> #include <map> #include <sstream> #include <sys/stat.h> #include <vector> #include <algorithm> #include <iomanip> #include <cuda_runtime_api.h> #include <cuda_profiler_api.h> // set USE_MPS=1 to compile with ...
DATA
0.959831
6.669491
{ "github_metadata": { "branch": "main", "commit_count": 617, "repo_created_at": "2018-08-08T16:30:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 689, "forks": 90, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "5849541...
cd87a060-0580-4a52-907d-39cd3003d4a0
kamyu104/LeetCode-Solutions
C++/count-pairs-with-xor-in-a-range.cpp
// Time: O(n) // Space: O(n) // dp solution class Solution { public: int countPairs(vector<int>& nums, int low, int high) { return count(nums, high + 1) - count(nums, low); } private: int count(const vector<int>& nums, int x) { unordered_map<int, int> dp; for (const auto& x : nums...
ALGO
0.999969
6.265502
{ "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": ...
8335210e-bc34-408d-adfd-d88d39aca080
Darrus/SP4
Framework/Common/Source/Mtx44.h
/******************************************************************************/ /*! \file Mtx44.h \author <NAME> \par email: <EMAIL> \brief Matrix 4 by 4 use for affine transformation */ /******************************************************************************/ #ifndef MTX_44_H #define MTX_44_H #include "MyMath...
ALGO
0.994781
5.526145
{ "github_metadata": { "branch": "master", "commit_count": 217, "repo_created_at": "2017-02-14T02:44:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b06d0398...
57d51a76-8ba2-4fbb-b3e1-4f749ffa739a
ishandutta2007/codeforces-a
ashishgup/normal/893/E.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define int long long template<typename T> T pow(T a,T b, long long m){T ans=1; while(b>0){ if(b%2==1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return ans%m; } const int N=1e6+100; const int MOD=1e9...
ALGO
0.999843
4.895351
{ "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": "b50bccaa9dab...
4c852ec1-ddb5-491a-b191-4db25f887fe8
TETEURYAN/GraphTeory
bellman/bellman.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; struct edge { int u; int v; int weight; bool equals(struct edge b) { if (this->u == b.u && this->v == b.v && this->weight==b.weight) return true; return false; } }; struct Graph { private: //Nº de vértices e...
ALGO
0.999931
4.81495
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2023-09-25T23:10:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4f9749b137...
efa11b98-e747-4fd8-9c7f-416fccdfb199
LTzycLT/code
acm/hdu/bs62/B.cpp
#include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> #include<math.h> #include<map> #include<vector> #include<string> #include<set> #include<queue> #define MP(x,y) make_pair(x,y) #define clr(x,y) memset(x,y,sizeof(x)) #define forn(i,n) for(int i=0;i<n;i++) #define sqr(x) ((x)*(x)) #define MAX(a,b...
ALGO
0.999827
4.042876
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-05-25T05:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be6fc4937...
91a730aa-31e0-4462-8d44-b4e0a722ec21
daniellaah/Data-Structure-and-Algorithms
leetcode/code/c++/0138_Copy_List_with_Random_Pointer.cpp
/** * Definition for singly-linked list with a random pointer. * struct RandomListNode { * int label; * RandomListNode *next, *random; * RandomListNode(int x) : label(x), next(NULL), random(NULL) {} * }; */ // solution 1, hash, O(n) O(n) class Solution { public: RandomListNode *copyRandomList(Ran...
ALGO
0.998367
4.842473
{ "github_metadata": { "branch": "master", "commit_count": 233, "repo_created_at": "2017-02-03T10:51: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": "86f373c7...
b81bbaa1-017e-4d51-9532-a87112653066
Karethoth/Below
src/smooth.hh
#pragma once #define GLM_FORCE_RADIANS #include <iostream> #include <chrono> #include <mutex> #include <glm/glm.hpp> #include <glm/gtc/quaternion.hpp> // Helpers namespace smoothHelpers { // For differences between quaternions. struct AngleAxis { float angle; glm::vec3 axis; AngleAxis( float _angle=0...
ALGO
0.919457
7.263106
{ "github_metadata": { "branch": "master", "commit_count": 138, "repo_created_at": "2014-03-31T12:19: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": "c0799f4a...
ceb949a9-0e76-4606-a35e-1e319aecbc27
riceroll/MylarFilmSimulator
Model.cpp
// // Created by 莱洛 on 2/15/21. // #include "Model.h" // reload model from the same obj file void loadModel(igl::opengl::glfw::Viewer& viewer, Eigen::MatrixXd& V, Eigen::MatrixXi& F, Eigen::MatrixXd& NF, Model* model, vector<int> ivs_fixed, ...
ALGO
0.961608
3.92174
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2021-02-22T02:12:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3175b5b60b4...
9f6af86a-8b64-4a74-9039-a23cb505877f
yyppsk/Recursion
Before October 22/tempCodeRunnerFile.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void print(int arr[], int size, int index) { // Base case if (index == size) return; // operation cout << arr[index] << " "; // recursion print(arr, size, index + 1); } void array_reverse(int arr[], int size...
ALGO
0.999579
5.034724
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-10-11T18:49:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d175b5dd87...
303a240a-ed64-4318-a02b-cdcc66b58e06
krishna146/DSASheetAndSolution
5.Array/Class/13MinmSwapBringKelement.cpp
//Problem Link - /* By <NAME> */ #include<iostream> using namespace std; int min(int a, int b){ return (a < b) ? a : b; } int countLessThanK(int arr[], int n, int k){ int count = 0; for(int i = 0 ; i < n ; i++){ if(arr[i] <= k){ count++; } } return count; } int minSwap(...
ALGO
0.999985
4.859199
{ "github_metadata": { "branch": "master", "commit_count": 277, "repo_created_at": "2022-06-21T09:41: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": "220c1a36...
055b03c7-6f94-42be-b908-5122d52aa1f7
groutwo/ENDL
Árboles/p3 ej3.cpp
/* Se define el desequilibrio de un árbol general como la máxima diferencia entre las alturas de los subárboles más bajo y más alto de cada nivel. Implementa un subprograma que calcule el grado de desequilibrio de un árbol general. */ #include "04 agen.hpp" #include "04 agen_E-S.hpp" #include <iostream> templat...
ALGO
0.999422
4.181607
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-10-07T09:38: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": "454f9ad06fe8...
dc9120fe-12ee-4413-a41e-693473f44963
lighthouse97/algorithm
BaekJoon/13907.cpp
// 13907.cpp // 세금(tax) // University > 서강대학교 > 제12회 총장배 서강대학교 프로그래밍 대회 Champion H번 // University > 서강대학교 > 제12회 총장배 서강대학교 프로그래밍 대회 Master H번 // dijkstra or bellman-ford 둘 다 풀 수 있지만 dijkstra로 풀어보기로 한다. // 세금에 따라 경로의 비용을 다르게 하고 각각 모두 dijkstra를 돌려보면 TLE가 발생한다. // --- 틀린 방법!!! ---------------------------------------------...
ALGO
0.99992
4.042334
{ "github_metadata": { "branch": "main", "commit_count": 226, "repo_created_at": "2020-10-15T05:53: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": "2ec5163aff...
82f51f82-b949-4a4d-839c-d08bac5799b6
evandrofr/Super-Computacao
pacote-prova-PI/parte2/tarefa2.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; struct item{ int valor; int idx; int dono; }; int calcula_mms(vector<item> itens, int num_pessoas){ vector<int> totais; for(int i = 0; i < num_pessoas; i++){ totais.push_back(0); } for(int i = 0; i < (...
ALGO
0.999559
4.052973
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2021-02-26T12:58: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": "058dad90f1a...
07f527e9-67a8-49ce-b5c7-60ef1e0c5ed9
MarbleHE/HECO
evaluation/comparison/porcupine/RobertsCross.cpp
/// Output is squared to elide square root /// Ciphertext roberts_cross(Ciphertext c0, int h, int w) /// Ciphertext c1 = rotate(c0, w) /// Ciphertext c2 = rotate(c0, 1) /// Ciphertext c3 = sub(c1, c2) /// Ciphertext c4 = square(c4) /// c4 = relinearize(c4) /// Ciphertext c5 = rotate(c0, w + 1) /...
ALGO
0.997487
4.724798
{ "github_metadata": { "branch": "main", "commit_count": 1710, "repo_created_at": "2019-12-05T15:17:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 76, "forks": 18, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de2532b5...
28b7c02a-8c09-4e72-87c1-79a5e6b370ba
nimmala1997/Code-Samples
new_examples_0/ex74.cpp
#include<iostream> using namespace std; int minimumSum(int num) { int b = INT_MAX; int a = INT_MAX; int num1 = num; int rem; int c,d; for(int i = 0; i < 4; i++){ rem = num%10; num = num/10; if(rem < a && rem < b){ //c = b; ...
ALGO
0.99989
4.162908
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-05-30T04:00: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": "8b62a5cc686...
87afd097-b2af-4567-b4cf-f194045cea09
Sookmyung-Algos/2021algos
algos_assignment/2nd_grade/김지현_ttplove2/11월 1주차/1074.cpp
#include <iostream> #include <cmath> using namespace std; int N, r, c; int result = 0; void solve(int y, int x, int n) { if (y == r && x == c) { cout << result; return; } if (y <= r && r < (y + n) && x <= c && c < (x + n)) { int newN = n / 2; solve(y, x, newN); solv...
ALGO
0.998336
3.675781
{ "github_metadata": { "branch": "master", "commit_count": 5558, "repo_created_at": "2021-02-22T06:32:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce2a1af...
6fec8d5a-f7a4-44ac-a548-b7a3b0f73b95
enricotomasi/LeetCode_problems
Easy/501. Find Mode in Binary Search Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode * { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x)...
ALGO
0.999935
5.911582
{ "github_metadata": { "branch": "main", "commit_count": 799, "repo_created_at": "2024-07-06T08:57: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": "8a6bca7581...
cf9e1685-c126-486e-8e0c-6b5d87cbbbd8
asirjoosingh/renorm_gamess
libcchem/rysq/src/cuda/kernel/kernel.hpp
#ifndef RYSQ_CUDA_KERNEL_KERNEL_HPP #define RYSQ_CUDA_KERNEL_KERNEL_HPP #include "cuda/detail.hpp" #include "cuda/kernel/quartet.hpp" #include <boost/preprocessor/seq/for_each_product.hpp> #include <boost/preprocessor/seq/elem.hpp> #include <boost/preprocessor/seq/enum.hpp> namespace rysq { namespace cuda { namespa...
TOOL
0.970052
6.594017
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2013-12-19T00:18:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "865d8b008e...
83cf23c9-063d-47a7-8752-42b2068a31d0
FYHSSGSS/ITAClab1-tarz
tarz/lz78_code.h
// // Created by FYHSSGSS on 2021/4/25. // #ifndef TARZ_LZ78_CODE_H #define TARZ_LZ78_CODE_H #include <bits/stdc++.h> #include "lz78_tree.h" typedef unsigned char UC; using namespace std; class lz78_code { private: public: static bool encode(FILE *fin, FILE *fout, int block) { lz78_tree T; boo...
TOOL
0.974051
4.098994
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-05-18T01:15:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c49be6518368...
cee6c448-2902-4316-9ebf-c0d16dc31582
a62mds/project-euler
libs/libmath/NaturalNumbers.cpp
#include "NaturalNumbers.h" #include <algorithm> namespace math { bool is_divisible_by(numbers::natural numerator, numbers::natural denominator) { return numerator % denominator == 0; } bool is_palindrome(numbers::natural number) { numbers::natural original_number = number; numbers::natural reversed_nu...
ALGO
0.968837
5.034536
{ "github_metadata": { "branch": "master", "commit_count": 154, "repo_created_at": "2016-06-26T01:56: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": "657394ef...
c3d1ec90-43c1-48ef-95af-8dd467493c1a
ryuyal/Algorithms
DMSXL/Array/lc26.cpp
// // Created by Liu on 2023/7/1. // Description: // #include <iostream> #include <vector> using namespace std; int removeDuplicates(vector<int> &nums) { if (nums.size() == 0) { return 0; } int pos = 0; nums[pos++] = nums[0]; for (int i = 1; i < nums.size(); ++i) { if (num...
ALGO
0.999918
5.370118
{ "github_metadata": { "branch": "main", "commit_count": 358, "repo_created_at": "2023-04-19T02:46: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": "c7b47e523d...
c851e8ba-0510-47a7-b1fc-701df0d07cd3
Enzzo/courcera
02/w1/find_max_region_count/find_max_region_count/main.cpp
#include <string> #include <vector> #include <map> #include <tuple> #include <iostream> enum class Lang { DE, FR, IT }; struct Region { std::string std_name; std::string parent_std_name; std::map<Lang, std::string> names; int64_t population; }; std::tuple<std::string, std::string, std::map<Lang, std::string>,...
ALGO
0.990093
4.480861
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2020-07-21T06:27: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": "f60f273d...
680165ad-19fc-4ec6-8986-1dd453181fef
constmoon/Algorithm-Study
Sorting/QuickSort.cpp
#include <cstdio> #include <cstdlib> void Swap(int& a, int& b) { int tmp; tmp = a; a = b; b = tmp; } int FindPivot(int arr[], int left, int right) { // partitioning int pivot = left; // 맨 왼쪽 요소를 pivot으로 선정 int low = left + 1; int high = right; while (low <= high) { // 오른...
ALGO
0.999881
5.044996
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-01-09T02:32: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": "99e4a6764...
22142a7f-1614-4824-8355-669523b89f0e
luam0oliveira/competitive_programming
topicos-especiais/lista-03/H.cpp
// https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1891 // Backtracking puro (deve-se tomar cuidado para ordenar da forma correta os codigos encontrados) #include <bits/stdc++.h> using namespace std; vector<string> geradas; vector<pair<string,string>> codes; void solve(st...
ALGO
0.999328
3.921101
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2023-11-14T15:01:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe4ffc10fb...
0b13bfc2-3fab-4107-b057-a502effc9813
isha0612/DAA_lab_assignments
Week 9/Ques1/Ques1.cpp
#include<bits/stdc++.h> using namespace std; const int N = 6; int dist[N][N]; void floyd() { for(int k = 1; k < N; k++) { for(int i = 1; i < N; i++) { for(int j = 1; j < N; j++) { int val = (dist[i][k] == INT_MAX || dist[k][j] == INT_MAX) ? INT_MAX : dist[i][k] + dist[k][j]; ...
ALGO
0.999945
4.141069
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2022-03-04T03:50:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fe8224a5...
7a88deed-a87c-4960-8505-acaf6605737f
mongodb/mongo
src/third_party/boost/libs/sort/include/boost/sort/spreadsort/float_sort.hpp
//Templated Spreadsort-based implementation of float_sort and float_mem_cast // Copyright <NAME> 2001 - 2014. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/lib...
ALGO
0.993606
6.120995
{ "github_metadata": { "branch": "master", "commit_count": 90314, "repo_created_at": "2009-01-15T16:15:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27329, "forks": 5655, "issues": 0, "pull_requests": 82 }, "file_meta": { "content_id": ...
8be3bb35-5c34-46d0-bc5a-2d0ed5aa14e8
Yuehua00/UVa
828 - Deciphering Messages .cpp
#include <iostream> #include <vector> #include <algorithm> #include <string.h> using namespace std; int place[26+5]; int main() { //freopen("in.txt", "r", stdin); //freopen("out.txt", "w", stdout); string code, encode; vector<char> ans; int shift = 0, casee = 0, n = 0; bool line = false; ...
ALGO
0.99988
3.679892
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2023-12-08T03:29: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": "55ad510f140...
b8d1558c-7522-4ded-a5e9-f46df0262438
NUbots/NUcontroller
NUSense/Core/Src/utility/math/CircularMean.hpp
#ifndef UTILITY_MATH_CIRCULARMEAN_HPP #define UTILITY_MATH_CIRCULARMEAN_HPP #include <cmath> namespace utility::math { /** * @brief a handler that calculates the circular mean of a frame of samples. */ class CircularMean { public: /** * @brief Constructs the handler. ...
ALGO
0.994166
7.56829
{ "github_metadata": { "branch": "main", "commit_count": 207, "repo_created_at": "2022-12-12T02:23:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "2847d854f86...
7bc582f7-4ce5-4464-8a5f-8e790b8b2bdc
OshanJayawardana/Autonomous-Mobile-Robot-Webots-Simulator
Box picking/New folder/webots_temp/controllers/final_base/final_base.cpp
#include <webots/Robot.hpp> #include <webots/Motor.hpp> #include <webots/Brake.hpp> #include <webots/DistanceSensor.hpp> #include <webots/PositionSensor.hpp> #include <tuple> #include <iostream> #include <cstdlib> #include <vector> #include<string> #define TIME_STEP 64 #define MAX_SPEED 6.28 using namespace webots; ...
ALGO
0.999588
4.351158
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2021-06-01T06:04:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06b07caa40...
f9d574d5-c2f7-48a5-91e2-759830e5615b
ShivakantDwivedi/ShivakantDwivedi-Competative-Programming
LOVE BABBAR LEETCODE QUESTION/Square_root_using_binary_search.cpp
#include <iostream> using namespace std; long long int square(int x) // long long es liye liye bhi ki value int ki range se bahar ho to error na aaye { int start=0; int end=x; int mid = start + (end - start) /2; int ans =-1; while(start <= end) { long long int square = mid * mid; ...
ALGO
0.9996
3.758874
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2022-09-01T06:47: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": "f2c7a5fc...
edcc6fd6-6423-428e-bb4d-c1c50f8a2000
NVIDIA/thrust
thrust/system/tbb/detail/extrema.h
/* * Copyright 2008-2013 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
ALGO
0.998612
7.64285
{ "github_metadata": { "branch": "main", "commit_count": 4758, "repo_created_at": "2012-03-06T01:01:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4980, "forks": 764, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "4cc4b...
7d8b765f-769b-486f-9b56-6ab747db20c2
kmsbusch/CSCI-1300-Projects
Entire C9 Workspace/Hmwk3/convertSeconds.cpp
// CS1300 Spring 2019 // Author: <NAME> // Recitation: 301 – <NAME> // Cloud9 Workspace Editor Link: https://ide.c9.io/kevinbusch/csci1300 // Homework 3 - Problem #7 #include <iostream> #include <math.h> using namespace std; /* Algorithm: convert seconds to count of hours, minutes, and seconds. Done by dividing from in...
ALGO
0.98559
4.582198
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-08-12T18:45: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": "3d0c1520c1...
b485c5c4-1fcb-4dbf-a818-2e7daf891986
hwanseoc/star-wars
src/main.cpp
#include <iostream> #include <memory> #include <cmath> #include <numbers> #include <chrono> #include <iomanip> #include <fstream> #include <iostream> #include <sstream> #include <lodepng.h> #include <glm/glm.hpp> #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/transform.hpp> #include <ray.h> #include <camera.h> ...
TOOL
0.928331
4.623826
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-05-23T07:10:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02914b61e65...
072c8eb7-653b-4436-92e5-9dc879fa80f8
PX4/PX4-Autopilot
src/modules/fw_mode_manager/figure_eight/FigureEight.hpp
/**************************************************************************** * * Copyright (c) 2025 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistri...
ALGO
0.978867
6.912784
{ "github_metadata": { "branch": "main", "commit_count": 47555, "repo_created_at": "2012-08-04T21:19:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9767, "forks": 14212, "issues": 1547, "pull_requests": 574 }, "file_meta": { "content_id"...
4c1a3e9e-a397-4934-9594-556a97bfd832
Mohammed-Shoaib/Coding-Problems
LeetCode/Solutions/LC1568.cpp
/* Problem Statement: https://leetcode.com/problems/minimum-number-of-days-to-disconnect-island/ Time: O((m • n)²) Space: O(m • n) Author: <NAME>, github.com/Mohammed-Shoaib */ class Solution { private: int m, n; // traverse directions easily vector<int> xdir = {-1, 0, 1, 0}; vector<int> ydir = {0, -1, 0, 1}; ...
ALGO
0.99997
6.0927
{ "github_metadata": { "branch": "master", "commit_count": 1853, "repo_created_at": "2018-08-18T14:31:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 85, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f48b2...
94a5cb98-435d-4018-944e-91616be0d756
ValveSoftware/source-sdk-2013
src/game/server/tf/bot/behavior/engineer/mvm_engineer/tf_bot_mvm_engineer_idle.cpp
//========= Copyright Valve Corporation, All rights reserved. ============// // <NAME>, September 2012 #include "cbase.h" #include "nav_mesh/tf_nav_mesh.h" #include "tf_player.h" #include "tf_gamerules.h" #include "tf_obj_sentrygun.h" #include "tf_obj_teleporter.h" #include "bot/tf_bot.h" #include "bot/map_entities/tf...
ALGO
0.992933
5.927837
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2013-06-26T22:21:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9165, "forks": 2667, "issues": 352, "pull_requests": 507 }, "file_meta": { "content_id": ...
c384e30d-7f49-43a7-b476-0eeed63d6f06
sam1231ui/Coding
Recursion2.cpp
#include<bits/stdc++.h> using namespace std; //RECURSION with Char arrays void pairStar(char input[]) { static int i=0; if(input[i] == '\0' || input[i+1] == '\0'){ return; } if(input[i] == input[i+1]){ for(int j = strlen(input); j>=i+1; j--){ ...
ALGO
0.99986
3.426907
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-06-13T13: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": "d15e32d0a79d...
a1b1700c-c10c-4279-b35e-f2d626ceb7b7
VGalaxies/code-repository
freshman/P3366 【模板】最小生成树_Prim.cpp
#include<iostream> #include<climits> #include<cstring> #include<vector> #include<queue> using namespace std; int n, m; int arr[5010][5010]; int dist[5010]; int vis[5010]; int total; vector<int> q; int FindMinDist() { int tmp = INT_MAX; int mem = 0; for (int i = 1; i <= n; ++i) { if (dist[i] < tmp && dist[i] > 0 &&...
ALGO
0.999964
3.272827
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2022-03-19T08:39: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": "b3429fba7...
be6a9545-55ba-4636-9ed6-24a4a98c1a24
ou3slati/competitive-programming
Implementations/Codes (post IOI_21)/BOI 2022/Day 1/Art/C.cpp
#include "art.h" #include <bits/stdc++.h> using namespace std; typedef vector<int>vi; #define pb push_back #define all(x) begin(x), end(x) #define sz(x) (int)x.size() #define FOR(i,a,b) for(int i=a; i<b; i++) mt19937 rng(chrono::system_clock::now().time_since_epoch().count()); //mt19937_64 rng(chrono::system_clock...
ALGO
0.999997
4.031811
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2025-06-30T20:23:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d467bbd1e05...
e37a454c-a1ea-4be1-af18-0705abcee134
GuilhermeTafelli/URI
B.cpp
#include<bits/stdc++.h> using namespace std; int main(){ bitset<51> s; long long int a, x, m = 0, cont = 0; bool flag = false; string c; cin >> a; for(int i = 0;i<a;i++){ flag = false, m = 0, cont = 0; cin >> x; s = x; c = s.to_string(); for(int j = 0;j<...
ALGO
0.999974
4.301097
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-05-29T00:27: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": "1cfe87cdde...
27d2c40f-ed59-49cf-8550-4b3aded6b606
srshoruv/stacks
nextGreater.cpp
#include <iostream> #include <stack> #include <vector> using namespace std; void nextGreater(vector<int> arr) { stack<int> s; int n = arr.size(); vector<int> ans(n); int idx = arr.size() - 1; ans[idx] = -1; s.push(arr[idx]); for (idx = idx-1; idx>=0; idx--) { int currNum= arr[idx];...
ALGO
0.999994
5.887723
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-09-09T21:23: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": "3d4d118a1ab...