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
12149378-d9b7-494a-bede-11b7168bc1a8
MichValwin/AOC-2024
day0/main.cpp
#include <fstream> #include <string> #include <raylib.h> #include <virtualResWindow.hpp> #include <engineDefinitions.hpp> #include <utils.hpp> using namespace std; static const char* INPUT_FILE = "./day0/input.txt"; static const char* DEMO_FILE = "./day0/demo.txt"; static const bool USE_REAL_DATA = false; u32 getS...
ALGO
0.95651
4.5306
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2024-11-30T11:56: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": "6e0a889aca7...
5c070442-73bd-4e81-80e2-552e84f92fc7
Rakibul1411/Data_Structrures_and_Algorithms
Sorting-Searching/Counting-Sort-Negative-Number/main.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void countingSortWithNegatives(vector<int>& arr) { if (arr.empty()) return; int maxValue = *max_element(arr.begin(), arr.end()); int minValue = *min_element(arr.begin(), arr.end()); int range = maxValue - minValue + 1; ...
ALGO
0.999996
5.469073
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-04-12T01:33:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a436e15fff5...
2390207d-b20f-416f-865b-32ddaa5fbb2f
DIAG-Robotics-Lab/joint_level_ismpc
cpp-utils/include/cpp-utils/math.h
#pragma once #include <Eigen/Geometry> #include <Eigen/Core> #include <Eigen/Dense> #include <iostream> #include <fstream> #include <vector> namespace utils { inline bool isEven(int n) { return not (n % 2); } inline bool isOdd(int n) { return (n % 2); } inline double wrapToPi(double angle){ dou...
ALGO
0.998868
3.975083
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-22T07:52:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11159f6555840...
6582b133-4931-4a77-b054-fe8a0f85a8ee
scrrpfv/QuestoesCIN
AED/Gustavo/Provas/Prova5/q1.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" typedef struct graph { vector<vector<int>> adj; vector<int> mark; vector<int> pred; } graph; graph* create_graph(int size) { graph* g = new graph; g->adj.resize(size); g->mark.resize(size); g->pred.resize(size); return g...
ALGO
0.999868
4.513626
{ "github_metadata": { "branch": "main", "commit_count": 118, "repo_created_at": "2023-10-25T18:41: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": "15c9e34986...
4bfeff74-e5a4-41b6-87af-4e9535410957
BBN-E/serif
src/PredFinder/coref/ElfIndividualCoreference.cpp
/** * Engine class for clustering coreferent individuals. * * @file ElfIndividualCoreference.cpp * @author <EMAIL> * @date 2010.08.23 **/ #include "Generic/common/leak_detection.h" #include "ElfIndividualCoreference.h" #include "boost/foreach.hpp" #include "boost/make_shared.hpp" /** * Adds a new member to the...
ALGO
0.997848
3.165118
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-01-07T21:29:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0dc3337af53...
8bde80fc-0a40-4dd0-8d5e-4825002b50a1
dle8/Competitive-Programming
KATHTHI.cpp
/* Author: <NAME> University of Rochester */ /* Tested: https://www.spoj.com/problems/KATHTHI/ */ #include <bits/stdc++.h> #define FOR(i, l, r) for (int i = l; i <= r; i++) #define fi first #define se second using namespace std; #define maxn 1000 + 10 long test_cases, r, c, dist[maxn][maxn]; char gmap[maxn][maxn]; b...
ALGO
0.999899
4.118158
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2018-12-14T04:26:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "097e1d67b...
54445718-84ba-4f17-8355-715d2fa425e1
tyam-vm/CodePractice
adventOfCode/2024/aoc2024day2.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <algorithm> using namespace std; bool safevec(vector <int> values){ bool safe = true; bool dec= false, inc = false; for(int i =0; i < values.size()-1; i++){ int temp = values[i] - values[i+1...
ALGO
0.999923
5.105882
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-08-07T12:08:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb2cd8f1139...
727ad174-0f9a-416a-86e6-2cc2ed18843d
polarlight1994/Shang
lib/HLS/Scheduling/CFGParallelizer.cpp
//===- CFGParallelizer.cpp - Parallelize Basic Blocks in CFG ----*- C++ -*-===// // // The VAST HLS frameowrk // // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------...
ALGO
0.997057
7.06578
{ "github_metadata": { "branch": "master", "commit_count": 6670, "repo_created_at": "2015-03-17T10:12:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98a8fde...
b961b44c-ede5-4918-9422-a7fbaf61cd2e
VarunPrajapatii/C_CPP_Saurabh-Shukla
MySirG - C++ - DSA/Assignments/11QueueusingArray.cpp
/* DSA through C++ Assignment-11: Queue using arrays 1. Define a class Queue with capacity, front, rear and ptr pointer as member variables. Implement queue using array. 2. In question 1, define a parameterzied constructor to initialise member variables. 3. In question 1, define a method to insert a new element at ...
ALGO
0.991146
5.043146
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-11-20T17:52:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "53a6cfef55f...
305f7f74-5286-4956-a452-0536990442ae
hikaru-nakayama/AtCorder
typical90/001.cpp
// 二分探索 #include <iostream> #include <vector> using namespace std; int N, K, L; vector<int> A; void input() { cin >> N >> L; cin >> K; A.resize(N+1); for (int i = 0; i < N; i ++ ) { cin >> A[i]; } } bool check(int x) { int l = 0; int count = 0; for ( int i = 0; i < N; i ++ ) { if ( i == 0 ) { l = A[...
ALGO
0.999961
3.636897
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2025-04-05T04:21: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": "7f69e01c70d...
de8c39b4-8d82-4b35-9b81-fedacde92d81
ArafatMridul/DSA-CPP
Divide and Conquer/QuickSort.cpp
// Time complexity(avg) -> O(nlogn) // Worst case T.C -> O(n2) -> when array is already sorted (when the smallest/highest element // is constantly selected as pivot : smallest when sorted in decending order & highest when // sorted in ascending order) // Space complexity -> O(1) -> constant space // If the question st...
ALGO
0.99998
6.151635
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-02-05T20:37:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "341d1e691ddf...
a1b212c8-db70-408b-b5b9-43e9ef854b0b
DamnTD/localization-web
src/FIRA_Sim/ParticleFilter/ParticleFilter.hpp
/******** 0. 0.1.設定地圖 ParticleFilter::setMap(int height,int width,bool* map); 0.2.設定粒子數 ParticleFilter::setParticleNum(int inNum) 0.3.灑粒子 ParticleFilter::initParticle() 0.4.設定地圖 ParticleFilter::runLikeliHoodGrade() 1.move 2.move exceed 30cm 3.更新粒子位置 ParticleFilter::u...
ALGO
0.967769
4.135591
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-04-12T05:54: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": "b6e504a581...
2f4730db-19b6-485f-8365-b05013642603
torbjorn-sorman/TQDT33_THESIS
Code/BenchmarkFFT/benchmarkfft/Platforms/OpenMP/omp_fast_index.cpp
#include "omp_fast_index.h" // // Testing // int openmp_fast_index_validate(const int n) { cpx *in = get_seq(n, 1); cpx *out = get_seq(n); cpx *ref = get_seq(n, in); openmp_fast_index(FFT_FORWARD, &in, &out, n); openmp_fast_index(FFT_INVERSE, &out, &in, n); double diff = diff_seq(in, ref, n); ...
ALGO
0.999117
6.618839
{ "github_metadata": { "branch": "master", "commit_count": 267, "repo_created_at": "2015-08-25T07:31:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d4f69fb...
4efc157b-7f39-41fd-9fd3-065514a1e567
zeyugao/oi
Sources/Noip 2012 开车旅行.cpp
//倍增大法 //set默认递增序列 /* 升序排列的容器: lower_bound返回一个迭代器,指向键值>= key的第一个元素。 upper_bound返回一个迭代器,指向键值<=key的最后一个元素的后一个元素。 降序排列的容器: lower_bound 返回一个迭代器,指向键值<= key的第一个元素。 upper_bound返回一个迭代器,指向键值>=key的最后一个元素的后一个元素。 */ /*先预处理出每个城市的最近与次近,可以用C++STL的set。 然后令g[i][j]为从i点走2^j个轮回(注意是轮回,不是步)后的位置,f[i][j][0]为从i点走2^j个轮回后A走过的距离,f[i][j][1]为从i点走2...
ALGO
0.999989
3.610498
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2016-07-28T05:59:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5a7005c...
d08e9803-41fa-4966-9cf9-7938a6e92753
kkcookies99/UAST
Dataset/Leetcode/test/12/34.cpp
class Solution { public: string XXX(int num) { string snum = to_string(num), ans = ""; int n = snum.size(); for (int i = 0; i < n; i++) { int dig = n - i, ndig = snum[i] - '0'; string one = "", five = "", nine = ""; switch (dig) { case 1: ...
ALGO
0.999577
5.280746
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-03-29T14:30:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b6ba57a5bd2...
82658881-8c00-430d-9760-15d94c38c3e1
seiichi1101/c-leetcode
117/main.cpp
#include "../util.hpp" #include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <iostream> #include <numeric> #include <optional> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; cla...
ALGO
0.999955
5.13293
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2025-03-05T09:44:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "102caa549d...
e33945d4-8be0-4b34-b161-8afe5bdc4e51
tereshinvs/ACM
Codeforces/307 - 2 UNRATED/B.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; void put_letters(string &a, int *la) { int n = a.size(); for (int i = 0; i < n; i++) la[a[i] - 'a']++; } int main() { string a, b, c; cin >> a >> b >> c; int la[26] = {0}, lb[26] = {0}, lc[26] = {0}; put_letters(a, la); put_lett...
ALGO
0.999994
3.638787
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-11-13T09:45:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "318a7774e9...
575bfbec-5fdf-4c08-82a0-b4fd438a5783
ShortTailLab/ph-open
Classes/boost/geometry/algorithms/simplify.hpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 <NAME>, Amsterdam, the Netherlands. // Copyright (c) 2008-2012 <NAME>, Paris, France. // Copyright (c) 2009-2012 <NAME>, London, UK. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c...
ALGO
0.997164
7.584682
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2014-08-20T03:23:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 518, "forks": 332, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "a535e8...
b4bb79b3-8625-4de3-a5ab-e4bff645304b
duddn14758/Algorithm-Solving-Strategy
BaekJoon/BFS/BFS/16234.cpp
#include <stdio.h> #define MAX 2500 template <typename T> class Queue { private: T queue[MAX+1]; int head = 0, tail = 0; public: bool empty() { return head == tail; } void push(T a) { queue[(tail++)%MAX] = a; } T pop() { return queue[(head++)%MAX]; } }; struct pos { int x, y; }; int N, L, R; int map[5...
ALGO
0.999435
3.488099
{ "github_metadata": { "branch": "master", "commit_count": 273, "repo_created_at": "2018-10-04T06:50: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": "5dc0d03d...
36ae6bd2-913d-4c02-90ef-f83fc9f1cd9a
xoyojank/nebula3
code/extlibs/OGDF/ogdf/augmentation/PlanarAugmentation.h
/* * $Revision: 2583 $ * * last checkin: * $Author: gutwenger $ * $Date: 2012-07-12 01:02:21 +0200 (Do, 12. Jul 2012) $ ***************************************************************/ /** \file * \brief planar biconnected augmentation approximation algorithm * * \author <NAME> * * \par License: * This...
ALGO
0.986032
6.209336
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2012-11-23T19:29:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 62, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "edcd5622...
ff96f577-3d76-42d2-83f9-5e4684ae3cbd
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p02363/s993429413.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cctype> #include <climits> #include <iostream> #include <string> #include <bitset> #include <vector> #include <map> #include <list> #include <stack> #include <queue> #include <algorithm> using namespace std; #define ALL(g) (g).begin(),...
ALGO
0.99997
4.230422
{ "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": "0bc4300439...
bdf8a42b-377a-4e3f-9f2e-edceabc73026
teeseng/toybox
leetcode/medium/majority3.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; vector<int> majority_three(vector<int>&); //o(n) space vector<int> majority_linear(vector<int>&); // o(1) space void print_vector(vector<int>&); int main() { vector<int> test1 = {1,2,2,2,3,3,3,3,2}; vector<int> ans1 = majority...
ALGO
0.999983
5.569391
{ "github_metadata": { "branch": "master", "commit_count": 161, "repo_created_at": "2016-04-02T01:48: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": "5685a78e...
a7dba11e-73d8-49da-80f1-1b0160aa7853
NkOffiCiAL07/data_structure_and_algorithms
Trie/trie_insert_and_search.cpp
#include<bits/stdc++.h> using namespace std; const int Size = 26; struct node { bool endofwords; node *ar[Size]; }; node *getNode() { node *n = new node(); n->endofwords = false; for(int i=0; i<Size; i++) n->ar[i] = NULL; return n; } void insert(node *root, string s) { node *tempRoot = root; for(int i=0...
ALGO
0.996706
3.792972
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-10-04T11:27: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": "a25f0de2d71...
1248437f-4cc8-4fde-b988-4abcfafa863e
alariq/multithreaded-renderer
pbd/pbd_particles_collision.cpp
#include "pbd_particles_collision.h" #include "engine/utils/vec.h" #include "engine/utils/sdf.h" #include "engine/utils/adt.h" #include <vector> #include <algorithm> #include <stdint.h> #include <cassert> // this could be a common interface so that different world type could exist struct CollisionWorld { // do we...
ALGO
0.995195
5.85118
{ "github_metadata": { "branch": "master", "commit_count": 336, "repo_created_at": "2019-05-16T22:19:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c088354...
483e6046-1db2-4362-8a00-2f0682cdc924
LyviaVilela/lista-de-estrutura
ternary.cpp
#include <stdio.h> int buscaTernaria(int arr[], int baixo, int alto, int chave) { if (alto >= baixo) { int meio1 = baixo + (alto - baixo) / 3; int meio2 = alto - (alto - baixo) / 3; if (arr[meio1] == chave) { return meio1; } if (arr[meio2] == c...
ALGO
0.999955
5.69324
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2024-11-30T21:46: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": "6e77599ff...
0b441ab7-df08-4dd5-a179-2a2d5859e4e5
Viniciolas/MN-Calc
c++/MNCalc_Code.cpp
#include <iostream> #include <string> int main() { int numero1; std::string operador; int numero2; std::cout << "Primeiro Numero : "; std::cin >> numero1; std::cout << "Operador : "; std::cin >> operador; std::cout << "Segundo Numero : "; std::cin >> numero2; if (operador == "+"...
TOOL
0.943289
3.640638
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-24T05:36: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": "a4962bef1dc6...
a00319be-7718-4433-92be-9c7a5418b92c
elsamuko/string_search
src/ssestr.hpp
#pragma once // https://mischasan.wordpress.com/2011/07/16/convergence-sse2-and-strstr/ // Copyright (C) 2009-2013 <NAME> <<EMAIL>> // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License Version 2 as // published by the Free Software Foundatio...
ALGO
0.95702
4.770375
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-05-24T13:11: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": "2b2fa22f9...
304463af-08bf-4510-83cf-766afb8d4aa2
8uraj/Practical
ADSL12_SURAJ.cpp
#include <iostream> #define MAX 20 #include <vector> using namespace std; class HeapTree { public: void heapify (int heap[], int curr, int size) { int largest = curr; int l = 2 * curr + 1; int r = 2 * curr + 2; if (l < size && heap[l] > heap[largest]) { largest = l; } ...
ALGO
0.999835
4.519151
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-01-16T04:35:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d50acdd8914...
bdfde359-5bc0-4d01-96a7-d0d019d3cb2c
Mateusz-Birembaut/HAI801-Algorithmes-d-exploration-et-mouvement
TicTacToe.cpp
#include "TicTacToe.h" #include <random> TicTacToeN::TicTacToeN(int n) : m_n(n) { m_separator = ""; for (int k = 0; k < m_n; k++) { m_separator += "----"; } m_separator += "\n"; } State TicTacToeN::getInitialState() const { State s; s.board.resize(m_n * m_n, -1); // toutes les cases v...
ALGO
0.99852
4.782604
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-02-04T15: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": "cf31d9dcdca7...
a7dbbb94-6015-4d65-ab96-4b76bf030125
jobtalle/LGen
src/simulation/densityMap.cpp
#include "densityMap.h" #include <cmath> #include <algorithm> using namespace LGen; const float DensityMap::GRID_SIZE = 0.1f; DensityMap::DensityMap(const float width, const float height) : xCells(std::ceil(width / GRID_SIZE)), yCells(std::ceil(height / GRID_SIZE)) { grid.resize(xCells * yCells); std::fill(gri...
ALGO
0.973534
6.542343
{ "github_metadata": { "branch": "master", "commit_count": 271, "repo_created_at": "2019-02-08T19:38:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 3, "issues": 16, "pull_requests": 0 }, "file_meta": { "content_id": "f6dd5c...
249205bd-2f66-419b-8caf-6c97deb34d1f
mirabl/j
distribute-candies.cpp
class Solution { public: int distributeCandies(vector<int>& candies) { unordered_set<int> S; for (int c: candies) { S.insert(c); } return min(S.size(), candies.size() / 2); } }; class Solution { public: int distributeCandies(vector<int>& candies) { if (ca...
ALGO
0.999993
5.840933
{ "github_metadata": { "branch": "master", "commit_count": 904, "repo_created_at": "2016-12-26T13:22: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": "5a26dc83...
da8fece2-236d-4a3a-bd86-b82f79fa5a41
web3devdex/ktlt
LAB5main.cpp
#include<stdio.h> #include<math.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int getData(int *N){ printf("\n Nhap so phan tu mang: "); scanf("%d", N); } int main(int argc, char** argv) { int N; float x; float y; getData(&N); printf(" Mang co %d ph...
ALGO
0.998918
3.443974
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-05-23T00:38: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": "e79bb1a365...
9d45db71-0459-431e-be5d-2239a7abc8ff
yuurs-web/practical
CG/2.Cohen Southerland line clipping algorithm - Copy (2).cpp
#include<iostream> #include<graphics.h> #include<cmath> #include<string> // For std::string #include<dos.h> // For delay, might not work with modern compilers. using namespace std; typedef struct coordinate { int x, y; string code; // Use string instead of const char* coordinate() : x(0), y(0), code("0...
ALGO
0.999482
3.885887
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-12-10T14:13: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": "0e38aadbd27...
c7f750bb-7d24-4d8d-8af5-abe590472144
qpwoeirut/competitive-programming
Codeforces/Contest/Educational/1342/1342d/1342d.cpp
/* * 1342d.cpp * * Created on: Apr 26, 2020 * Author: Stanley */ #include <iostream> #include <algorithm> #include <cassert> #include <queue> #include <set> #include <string> #include <vector> #include <map> #include <deque> #include <cctype> #include <climits> #include <cmath> #include <cstdlib> #include ...
ALGO
0.999976
3.746217
{ "github_metadata": { "branch": "master", "commit_count": 348, "repo_created_at": "2020-09-17T05:10:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "335fddd...
9759c130-195a-49db-8444-b74e969e5858
psastras/vocabtree
modules/utils/vision.hpp
#pragma once #include "config.hpp" #include <opencv2/opencv.hpp> #include <opencv2/stitching.hpp> #include <memory> /// Provides useful wrappers around many OpenCV functions as well /// as some simple vision - based routines. namespace vision { typedef std::set<std::pair<int,int> > MatchesSet; /// Describes SIFT...
ALGO
0.984792
6.655378
{ "github_metadata": { "branch": "master", "commit_count": 148, "repo_created_at": "2013-10-24T19:20:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "24fb896...
eac1571a-852b-4a1b-89f1-441368881c66
Mohit-D12/Final450
Matrix/2.cpp
// Search a 2D Matrix // https://leetcode.com/problems/search-a-2d-matrix/ #include<bits/stdc++.h> using namespace std; class Solution { auto get_element(vector<vector<int>>& matrix, int index) { int i = index / matrix[0].size(); int j = index % matrix[0].size(); return matri...
ALGO
0.99995
6.299194
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2022-01-11T09: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": "5d6ff7bb8f0...
df874b04-eb70-4d7c-a244-d70daff3bc91
Altanbagana2003/STACK-C-
c++queue.cpp
#include <iostream> using namespace std; template<class T> struct queue { struct node { T data; node *next; }; node *head; node *tail; int len; queue() { head = NULL; tail = NULL; len = 0; } void push (T data) { node *p = new node; ...
TOOL
0.940443
3.610094
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-11-05T00:32: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": "221454329639...
b265ad5e-5eed-4e4c-b0bd-18f04e5b1bf8
BoydOrg/BoydEngine
src/Modules/Loader.hh
#pragma once #include "../Core/Platform.hh" #include "Dll.hh" #include <filesystem> #include <string> #include <vector> namespace boyd { using std::string; using std::filesystem::path; void InsertionSortLast(); #ifdef BOYD_HOT_RELOADING extern std::vector<Dll> modules; /// /// Avoid calling this directly! Use /// ...
TOOL
0.903901
6.267677
{ "github_metadata": { "branch": "master", "commit_count": 226, "repo_created_at": "2020-01-24T16:38:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9cfe0030...
a638abe5-fe77-48fb-8796-08fbb7c4e046
yizhizhede/MOEATSD
problem/uf.cpp
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include "uf.h" #include "dtlz.h" #include "lsmop.h" #include "matrix.h" #include "shape.h" #define PI 3.14159265358979323846264338327950288419716939937510 #define pi 3.14159265358979323846264338327950288419716939937510 #define NUM_SAMPLE 1....
ALGO
0.999487
3.560389
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-07-02T12:18:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0dbfe9831...
5f293f93-f985-4b21-b258-bd42a46ac287
ishandutta2007/codeforces-b
baba/normal/700/C.cpp
//<NAME> #include<bits/stdc++.h> using namespace std; typedef pair<int,int> II; typedef vector< II > VII; typedef vector<int> VI; typedef vector< VI > VVI; typedef long long int LL; #define PB push_back #define MP make_pair #define F first #define S second #define SZ(a) (int)(a.size()) #define ALL(a) a....
ALGO
0.999949
3.542897
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05: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": "5d62f9dc5687...
9d85d63f-19f8-4e06-a5a4-79637ac08f52
giriraj1995/CompetitiveCoding
DS & Algorithms/Season 2/Arrays/Flip/Flip/main.cpp
// // main.cpp // Flip // // Created by <NAME> on 25/01/21. // Copyright © 2021 <NAME>. All rights reserved. // #include <iostream> #include <cmath> #include <vector> #include <map> #include <unordered_map> #include <stack> #include <queue> #include <set> using namespace std; vector<int> flip(string A) { ...
ALGO
0.999966
5.055386
{ "github_metadata": { "branch": "master", "commit_count": 791, "repo_created_at": "2020-08-04T11:52: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": "1e15272d...
8392ee66-e98e-448c-900d-580eb10b2f5b
RiccardoCiviero/Kinetic_cpp
Kinetic/kinetic_model.cpp
#pragma once #include "kinetic_model.h" double constexpr schmidt = 0.4082482905; // 1/sqrt(6) see Fitzgerald Dislocations... 1991 double constexpr sinsin = 0.5; // sin(alpha)sin(phi) see Ayers Heteroepitaxy... 1991 double constexpr kb = 8.617333262e-5; // eV/K using Eigen::ArrayXd; void kinetic_calculation(Profile...
ALGO
0.999056
4.737258
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-10-20T15:16: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": "1f9702e8c846...
c736f358-17c2-4a0a-aed1-8de9f07dd4a8
Bhawna751/LeetCode-Solutions
2914-find-the-safest-path-in-a-grid/find-the-safest-path-in-a-grid.cpp
class Solution { public: vector<vector<int>> dir = {{0,1},{0,-1},{1,0},{-1,0}}; bool isValidCell(vector<vector<int>>& grid,int row, int col){ int n = grid.size(); return row<n && col<n && row>=0 && col>=0; } bool isSafe(vector<vector<int>>& grid, int mini){ int n=grid.size(); ...
ALGO
0.99999
6.162498
{ "github_metadata": { "branch": "main", "commit_count": 3331, "repo_created_at": "2023-08-26T02:31:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e09f8b4c...
0c7da9e9-9865-4f9e-b2bf-e9fd76e6bd58
cerenarkac21/CS300-Data-Structures-Sabanci-University-Assignments
hw2/AVLtree.h
// <NAME> ,28269, CS 300, HW2 #ifndef _AVL_H #define _AVL_H #pragma comment(linker, "/STACK:2000000") template <class Comparable> class AVL; template <class Comparable> class AvlNode { Comparable element; AvlNode *left; AvlNode *right; int height; AvlNode(const Comparable & theEleme...
ALGO
0.989825
4.894604
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-07-21T20:50: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": "1db525f8791...
c3c9acfa-d894-4c7b-a07f-70aedd046b08
TheHackerOne/Competitive_programming
Graphs & Trees/Trees/min-max_tree.cpp
#include <iostream> using namespace std; struct bstNode { int data; bstNode *left; bstNode *right; }; bstNode *createNode(int data) { bstNode *newNode = new bstNode(); newNode->data = data; newNode->left = NULL; newNode->right = NULL; return newNode; } bstNode *insertNode(bstNode *roo...
ALGO
0.999751
4.3163
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-03-09T16:20:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "764b68d84...
ac7138ca-09d2-4379-9926-79eae5cd1ac9
martisalcedo7/maze
src/c/solver.cpp
#include "utils.hpp" #include <chrono> // External libs int main(int argc, char *argv[]) { // Process input args const std::string map_path = argv[1]; const std::string result_path = argv[2]; const int32_t origin_r = std::stoi(argv[3]); const int32_t origin_c = std::stoi(argv[4]); const int32_t target_r...
ALGO
0.994188
5.401869
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-11-17T13:16: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": "c2a30551c8e...
b8ac7ca8-2fbe-4040-a654-c91708fc8022
priyanshu-upadhyay/Leetcode-Problems
Even and Odd - GFG/even-and-odd.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: void reArrange(int arr[], int N) { int i = 0, j = 1; while(i<N && j < N){ while(i < N && arr[i]%2 == 0) i = i+2; while(j...
ALGO
0.99952
4.807419
{ "github_metadata": { "branch": "main", "commit_count": 924, "repo_created_at": "2022-03-28T17:25: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": "a6e8287d83...
c1bda775-42c2-4390-8d93-7646f9690559
cslarsen/project-euler
e033/eul33.cpp
#include <stdio.h> #include <string.h> #include <vector> int main() { std::vector nums, denums; for ( int a=1; a<10; ++a ) for ( int b=1; b<10; ++b ) for ( int c=1; c<10; ++c ) for ( int d=1; d<10; ++d ) { int n=a*10+b, de=c*10+d; if ( n==0 || de==0 || n==de ) continue; float v = (float)n/(float)de; if...
ALGO
0.956347
3.880394
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2012-10-28T18:35:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d42734d1...
c1bd3f6c-c59c-42ef-a87a-acc81d12629c
Jose-JohnEm/Bomberman
Game/AI/ArtificialIntelligence.cpp
/* ** EPITECH PROJECT, 2021 ** B-YEP-400-LYN-4-1-indiestudio-lucas.guichard ** File description: ** ArtificialIntelligence */ #include "ArtificialIntelligence.hpp" Game::ArtificialIntelligence::ArtificialIntelligence(std::function<void (const size_t pos, const std::string action)> playerActionsFunc, const std::vector...
ALGO
0.995408
4.751051
{ "github_metadata": { "branch": "master", "commit_count": 1074, "repo_created_at": "2021-08-11T07:57:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2aac773...
88ea2e54-5fd6-46e7-9290-9e4398c7ac58
kuzudb/kuzu
src/include/processor/operator/order_by/order_by_key_encoder.h
#pragma once #include <functional> #include <vector> #include "common/vector/value_vector.h" #include "order_by_data_info.h" #include "processor/result/factorized_table.h" namespace kuzu { namespace processor { #define BSWAP64(x) \ ...
ALGO
0.933375
7.768855
{ "github_metadata": { "branch": "master", "commit_count": 5113, "repo_created_at": "2020-09-26T07:43:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2852, "forks": 179, "issues": 267, "pull_requests": 19 }, "file_meta": { "content_id": "...
a062b5df-0fd5-47c0-b452-8110ed1cdf7a
TivalM/OS_Labs
Lab2/Lab2/main.cpp
#include <stdio.h> #include <string.h> #include <fstream> #include <iostream> #include <string> #include <vector> #include <map> #include <algorithm> #include <climits> #include <iomanip> #include <queue> #include "BaseObjects.h" #ifdef _WIN32 #include "getopt.h" #else #include <unistd.h> #include <getopt.h> #endif usi...
TOOL
0.997551
3.599903
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2021-02-15T08:15: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": "aaf87deb92a...
a10338cd-05f9-41c6-a2e6-f50884a5645b
cran/bigergm
src/simulate_between_network.cpp
#ifdef _OPENMP #include <omp.h> #else #define omp_get_max_threads() 0 #endif #include <RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::plugins(openmp)]] inline void set_seed(int seed) { Rcpp::Environment base_env("package:base"); Rcpp::Function set_seed_r = base_env["set.seed"]; set_seed_r(seed);...
ALGO
0.998247
4.902726
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-02-17T02:28:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d31da2887ff...
2e34286e-2445-4f75-aa4f-975b5e933207
lizihan00787/Mine
Luogu/DP/DP优化/决策单调性(四边形不等式)DP/P5574 [CmdOI2019] 任务分配问题.cpp
#include<bits/stdc++.h> #define endl '\n' #define int long long #define ull unsigned long long #define PII pair<int,int> #define mk(a,b) make_pair(a,b) using namespace std; template<typename P> inline void read(P &x){ P res=0,f=1; char ch=getchar(); while(ch<'0' || ch>'9'){ if(ch=='-') f=-1; ...
ALGO
0.999938
3.714437
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2025-03-15T06:09: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": "ff37ecf54d7...
4d80a919-e448-4676-8363-e0de72fac955
yyh888/practice
动态规划训练2/动态规划训练2/practice.cpp
// 礼物的最大价值 //class Solution { //public: // int maxValue(vector<vector<int>>& grid) { // int n = grid.size(), m = grid[0].size(); // for (int i = 1; i < n; i++) // { // grid[i][0] += grid[i - 1][0]; // } // for (int j = 1; j < m; j++) // { // grid[0][j] ...
ALGO
0.99993
4.919271
{ "github_metadata": { "branch": "master", "commit_count": 626, "repo_created_at": "2022-04-01T14:31: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": "5c00e7da...
ee5cf2bf-7e0e-4439-a7ac-35c1506078bd
aidamwais/Advent-Of-Code-2024
Day 15/day 15.cpp
#include<iostream> #include<fstream> #include<sstream> #include<string> #include<vector> #include<assert.h> #include<algorithm> #include<math.h> #include<iterator> #include<regex> #include<map> #include<set> #include<windows.h> using namespace std; int current_i, current_j; void get_parameters(ifstream* file, vec...
ALGO
0.999543
4.047038
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-01-05T14:13: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": "3731c8da4e9...
064aff76-dd90-41fa-b309-618414d7e1f8
ac101m/mpicga
src/ga/gene.cpp
// Standard headers #include <iostream> #include <vector> using namespace std; // Project headers #include "utils.hpp" #include "mpicga.hpp" // Constructor, initialises everything to zero gene::gene(void) { this->bufValid = false; this->function = GENE_FN_NOP; this->aIndex = 0; this->bIndex = 0; this->bu...
ALGO
0.99848
5.586296
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2018-05-31T17:24:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b29a3180f...
68802599-acfc-4900-b113-e55d59ea06d6
love2d/love
src/libraries/box2d/dynamics/b2_circle_contact.cpp
// MIT License // Copyright (c) 2019 <NAME> // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, p...
ALGO
0.982881
7.27785
{ "github_metadata": { "branch": "main", "commit_count": 5566, "repo_created_at": "2019-05-25T18:43:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6881, "forks": 486, "issues": 88, "pull_requests": 6 }, "file_meta": { "content_id": "4a52...
34510b65-a34a-47f2-9e06-e924dff40bfc
bizkut/warz-client
External/PhysX/Source/GeomUtils/src/GuGJKPenetration.h
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
ALGO
0.999798
4.781526
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-12-20T14:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 17, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "157c5b64...
ea6baff2-ecd0-4548-84a3-c655c3d13c46
alephchang/vo_practice
src/Map.cpp
/* * <one line to give the program's name and a brief idea of what it does.> * Copyright (C) 2016 <copyright holder> <email> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either versi...
ALGO
0.988141
6.057213
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-04-17T07:58: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": "8aef6330f...
bf23a4e5-e0b6-44aa-8d44-57f528b2289a
martishin/algorithms
course/algorithms_on_graphs/week_2/acyclicity.cpp
#include <iostream> #include <vector> #include <unordered_set> using namespace std; enum States { NOT_VISITED, VISITING, VISITED }; bool dfs(int v, vector<vector<int> > &graph, vector<States> &used) { bool cycle = false; used[v] = VISITING; for (size_t i =0; i < graph[v].size(); ++i) ...
ALGO
0.999926
4.408441
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2018-06-17T15:29:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d584d8837...
ea33c48b-33cb-462b-939c-5262da236b6c
DrLoon/RayTracing
RayTracing/Triangle.hpp
#pragma once #include <limits> #include "vec3d.hpp" #include "Ray.hpp" #include "utils.hpp" class Plane { public: Plane(const vec3d<double>& _Point1, const vec3d<double>& _Point2, const vec3d<double>& _Point3) : Point1(_Point1), Point2(_Point2), Point3(_Point3) { A = (Point2.y - Point1.y) * (Point3.z - Point1...
ALGO
0.94432
5.743676
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-04-06T13:16: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": "fd22fc57210...
a47f4cb1-d511-4057-a6f8-91e18845acf0
NamW00/BaekJoon
DFS(Depth_First_Search)/3_10552.DOM.cpp
/* 1092번 - 배 https://www.acmicpc.net/problem/1092 [ 문제 정리 ] 지민이는 항구에서 일한다. 그리고 화물을 배에 실어야 한다. 모든 화물은 박스에 안에 넣어져 있다. 항구에는 크레인이 N대 있고, 1분에 박스를 하나씩 배에 실을 수 있다. 모든 크레인은 동시에 움직인다. 각 크레인은 무게 제한이 있다. 이 무게 제한보다 무거운 박스는 크레인으로 움직일 수 없다. 모든 박스를 배로 옮기는데 드는 시간의 최솟값을 구하는 프로그램을 작성하시오. [ 해...
ALGO
0.999463
4.05341
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-06-24T08:55: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": "20eab8fa9053...
a5e32af7-4b29-4025-a209-93824c248d84
Wasima230Sultana/Codeforces-Code
Print-pretty.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { int t; cin >> t; while (t--) { double A, B, C; cin >> A >> B >> C; cout << "0x" << hex << nouppercase << (long long)A << endl; /* hex — switch to hexadecimal base. ...
ALGO
0.977974
3.84187
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2025-06-16T01:52:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30e42100737...
1b44ec7c-3391-46cb-af6d-012032a77db9
satyakumarch/DSA-CSE205
linkedlist/6-Delete-At-Head-OR-Tail-OR-Index.cpp
#include<iostream> using namespace std; class Node{ //User defined data type public: int val; Node* next; Node(int val){ this->val=val; this->next=NULL; } }; class LinkedList{ //user defined data structure public: Node* head; Node* tail; int size; LinkedLis...
ALGO
0.998205
4.498042
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-01-29T07:44:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1f24caa3fcf...
0929bd2e-23c9-44ac-9855-95f54f1f5777
live-clones/gmsh
contrib/ALGLIB/solvers.cpp
/************************************************************************* Copyright (c) <NAME> (ALGLIB project). >>> SOURCE LICENSE >>> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (www.fsf.org); ...
ALGO
0.999471
5.104748
{ "github_metadata": { "branch": "master", "commit_count": 21787, "repo_created_at": "2017-03-24T07:32:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 107, "forks": 44, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e469...
2c233b30-79a3-4571-9cdb-05163f249683
davidsjohnson/MATOS
src/Behaviors/PdStateBehavior.cpp
// // Created by <NAME> on 4/26/17. // #include <Belief.h> #include "PdStateBehavior.h" extern int g_agentID; PdStateBehavior::PdStateBehavior(Goal g) : goal(g) {} void PdStateBehavior::init(Beliefs beliefs, shared_ptr<AgentMonitor> oscMonitor) { m_beliefs = beliefs; // Initialize with OSC Input Functio...
ALGO
0.959886
5.65382
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2017-04-24T21:09: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": "b578673b9...
5eb17f58-780c-4103-be9c-8ede741c9326
parvez-ahammed/online-judge-solves
vjudge/ykh/3_1_contest/C_Kuriyama_Mirai_s_Stones.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" #define rep(start, x) for (int i = start; i < x; i++) int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n, q, type, l, r; cin >> n; int v[n]; vector<ll> pref(n), prefD(n); cin >> v[0...
ALGO
0.999686
4.961829
{ "github_metadata": { "branch": "master", "commit_count": 508, "repo_created_at": "2022-07-12T22:20: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": "2f5bade6...
edf365d3-2701-4d8d-8650-a420029a40d5
GiovanniCornejo/LeetCodePractice
easy/0485_max_consecutive_ones/main.cpp
#include <iostream> #include <vector> #include "Solution.h" struct Test { std::vector<int> input; int expected; }; int main() { // Create an instance of the Solution class Solution solution; // Define test cases std::vector<Test> tests = { {{1, 1, 0, 1, 1, 1}, 3}, {{1, 0, 1, 1...
TEST
0.999
6.613878
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-02-29T04:55: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": "b1ca944b902...
31f8ddd7-6bc6-46ce-9782-7e3f005d521b
hossainemruz/My-Codes
TopCoder/old code/IsItASquare.cpp
/************************************************************** * <NAME> * * MD: <NAME> * * CUET-CSE-12 * *****************************************...
TEST
0.999357
3.408146
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-12-17T08: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": "381f580db...
68802e25-e0b7-4e9c-8a85-353e25af3291
liuhj86/VHDMap-SE
src/lib/navigation_node.cc
#include <geometry_msgs/PoseArray.h> #include <nav_msgs/Odometry.h> #include <nav_msgs/Path.h> #include <navigation_node.h> #include <navigation_system.h> #include <ros/ros.h> #include <sensor_msgs/PointCloud.h> #include <visualization_msgs/MarkerArray.h> #include <iomanip> #include <opencv2/opencv.hpp> #include "com...
TOOL
0.95673
3.268632
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-09-21T11:25:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eaad934c83d7...
8f4c6ead-7f73-4725-962d-610b4509662f
Andreuca/SDD
SDD/Seminare/Seminar3.cpp
#include<stdio.h> #include<stdlib.h> #include<string.h> struct angajat { int cod; char* nume; float salariu; }; struct nod { angajat info; nod* next; }; angajat citire_angajat_tastatura() { angajat a; printf("\nCitire angajat:\n"); printf("\nCod: "); scanf_s("%d", &a.cod); printf("\nNume: "); getchar(); c...
ALGO
0.999523
3.886759
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-06-22T09:26:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd6f70df018f...
546ed0e1-291e-4e40-86ef-fe47dbcac20a
h123a456rr789y/Algorithm-
homework6.1 Collecting 2.cpp
#include<iostream> using namespace std; int main(){ int ans; int n; cin >>n; int map[n][n]; int map2[n][n]; int map5[n][n]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin >>map[i][j]; } } int count; for(int i=0;i<n;i++){ for(int j=0;j<n;j++...
ALGO
0.999987
4.051639
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-11-24T05:33: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": "1d68b086c9...
a84d03d2-c67c-4868-9325-30ffa62e7374
Navoren/LeetCode_Solutions
0816-design-hashset/0816-design-hashset.cpp
class MyHashSet { private: int n = 10000; vector<vector<int>> arr; public: MyHashSet() { arr.resize(n); } void add(int key) { int ind = key%n; for(int x : arr[ind]){ if(x == key) return; } arr[ind].push_back(key); } void remov...
ALGO
0.999556
5.711225
{ "github_metadata": { "branch": "main", "commit_count": 1201, "repo_created_at": "2023-08-02T06:49: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": "29cda920f...
40d5830c-1e7f-4271-926b-683fd59fd98d
Longtanguyen34/CTDL-GT-20241
Week9_BT2.cpp
#include <iostream> #include <string> #include <unordered_map> #include <sstream> struct WordNode { std::string word; WordNode* next; }; class WordList { private: WordNode* head; WordNode* tail; public: WordList() : head(nullptr), tail(nullptr) {} // Them tu vao cuoi danh sach void addW...
ALGO
0.99931
5.224918
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2024-10-12T02:15: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": "60a9c3ef7...
ebe4c04e-2ce5-4097-84c1-a55b8a5a97c2
ajaysaraswat/DSA-QUESTIONS
merge.c++
// //C++ program for Merge Sort Algorithm // #include <iostream> // #define max 10 // //navigate through all items // //int a[11] ; // int b[10]={0}; // //merge sorting // void merging(int a[],int low, int mid, int high) { // int l1, l2, i; // for(l1 = low, l2 = mid + 1, i = low; l1 <= mid && l2 <= high; i++) ...
ALGO
0.999995
5.297344
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-01T13:40:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8eef11581c18...
6167726e-7623-4e45-b426-22fba5be37a0
Tudor67/Competitive-Programming
LeetCode/Problems/Algorithms/#2503_MaximumNumberOfPointsFromGridQueries_sol6_dijkstra_and_binary_search_O(RClog(RC)+Qlog(RC))_time_O(RC)_extra_space_222ms_81MB.cpp
class Solution { public: vector<int> maxPoints(vector<vector<int>>& grid, vector<int>& queries) { const int ROWS = grid.size(); const int COLS = grid[0].size(); const int Q = queries.size(); // Step 1: run Dijkstra's algorithm from (0, 0) // minCost[row][col] is the ...
ALGO
0.999897
6.272679
{ "github_metadata": { "branch": "master", "commit_count": 615, "repo_created_at": "2020-02-27T19:56:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c68fbd3c...
926d56e4-4ed4-443c-8f68-fe631ea2fa71
wuliwuge/Learning_Notes
CMU_15213/Base_02.cpp
// 浮点数、类型转换 // 这大哥讲的我头疼,可以在有点基础之上,直接去看 csapp #include <iostream> #include <stdlib.h> #include <stdio.h> #include <bits/stdc++.h> #include <stdint.h> void test01() { /* 10进制下 浮点的表示 123.12 -> 1.2312 * 10^2(科学计数法) 1*10^2 + 2*10^1 + 3*10^0 + 1*10^-1 + 2*10^-2 2进制同理 1010.0101 -...
TOOL
0.917087
3.557731
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2022-10-22T05:27: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": "7b53d011a06...
c8286d6f-b518-42c5-b3ad-c9548480744f
FrancisDShanks/CodingPractice
LeetCode/144. Binary Tree Preorder Traversal/binary_tree_preorder_traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<int> preorderTraversal(TreeNode* root) { vector<int> res; stack<TreeNode...
ALGO
0.999998
6.043584
{ "github_metadata": { "branch": "master", "commit_count": 329, "repo_created_at": "2014-01-29T21:52: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": "ff05406d...
7c6a3c39-b1d2-4104-aa85-3158250c28dd
ishandutta2007/codeforces-k
kirill22/normal/1385/G.cpp
#include<bits/stdc++.h> using namespace std; template <typename A, typename B> string to_string(pair<A, B> p); template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p); template <typename A, typename B, typename C, typename D> string to_string(tuple<A, B, C, D> p); string to_string(const st...
ALGO
0.999943
3.465859
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06: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": "16dd8f6107e4...
21b782b6-c95a-4db5-ac54-377c161be9a2
JoshSample/josephus-problem
JosephusProblem/JosephusProblem.cpp
// <NAME> // Josephus Problem calculator (non-general case i.e. k=2) /* The Josephus Problem is a counting game in which people are in a circle waiting to be executed. Counting begins at a specified point in the circle and the first person kills the person to their left. The procedure is repeated until one pers...
ALGO
0.999921
4.537201
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-03-21T04:41: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": "ef214e87cc...
26ef7a3d-1b50-4674-8d7f-1c78ff9b4591
JSmol/competitive-programming
codeforces/1117D.cc
#include <bits/stdc++.h> using namespace std; #define debug(a) cerr << #a << " = " << (a) << endl; #define get(t, i) get<(i)>((t)) #define fst first #define snd second template<typename T> ostream& operator<<(ostream& o, const vector<T>& v) { int b = 0; for (const auto& a : v) o << (b++ ? " " : "") << a; return o; ...
ALGO
0.999991
3.94626
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-02-08T17:32: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": "8aa7cb4c85b4...
edd021e6-72b9-4e94-94ce-834e33b20c21
aseemrb/competitive
c++/558c.cpp
/* Author: aseemraj Problem: Codeforces 558 C */ #include <bits/stdc++.h> #define loop(i, a, b) for(int i=a; i<b; i++) #define rloop(i, a, b) for(int i=b-1; i>=a; i--) #define V(x) vector< x > #define P(x, y) pair< x, y > #define PI P(int, int) #define PLL P(ll, ll) #define VI V(int) #define VLL V(ll) #define VP V(PI)...
ALGO
0.999995
3.641253
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2014-12-13T11:05: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": "56638a2c6...
252a5380-a747-4f3f-b040-339a2ef1974c
Salil03/Competitive-Programmming
Programs/empty/single/Cow_Art/sol.cpp
// OPTIMIZATIONS //#pragma GCC optimize("O3") //(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS) //#pragma comment(linker, "/stack:200000000") //(UNCOMMENT WHEN NEEDED) //#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native") // OPTI...
ALGO
0.999839
4.119409
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2018-07-29T13:53:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "604012aa...
54fa4c91-3578-426f-946b-04aeb8e0fb72
furkanusta/Competitive-Programming
Codeforces/490D.cpp
/**** URL: http://codeforces.com/contest/490/problem/D Tag: math, greedy Difficulty: Easy Complexity: O(N??) Description: make their 2 and 3 multipliers equal ****/ #include <cstdio> #include <cstdlib> long long int count2, count3; long long int a, b, c, d, tmp, ans, tmp2; int main() { ...
ALGO
0.999926
3.456885
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2015-06-15T18:43: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": "acf69a6de...
3e8f4a27-55ad-4f8d-9275-5cbb6fd0f35f
Edwinadity/aitumega
Kelengkapan AINO/Program AINO/AINO 1.1/AINO/AINO.ino
/* AITUMEGA Maze Solving Author: <NAME> AIOS AINO Rev 1.1 Source code sepenuhnya milik AITUMEGA Tidak diperuntukan untuk resfrensi pemrograman, Tidak mengambil sebagian atau seluruhnya dan Tidak memperjual belikan source code ini. */ #include "Aitumega.h" #include <Wire.h> // Mode garis const byte w...
ALGO
0.941474
5.479853
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-08-19T13:12: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": "e58164aa5bb1...
e4b1d52f-3f63-4ba2-a21f-f41263fe6aad
SRV332003/TestCase-Generator
solutions/network.cpp
#include"bits/stdc++.h" // #include <ext/pb_ds/detail/standard_policies.hpp> // #include <ext/pb_ds/assoc_container.hpp> // Common file // #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update // using namespace __gnu_pbds; using namespace std; using namespace std :: chrono; double PI =...
ALGO
0.999895
3.736955
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-18T14:55:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14e25e5f88f9...
2560c44e-9edb-44f5-8cd2-e3540b68d8a9
ishandutta2007/codeforces-i
irkstepanov/normal/754/C.cpp
#include <bits/stdc++.h> #define all(a) (a).begin(), (a).end() #define sz(a) (int)(a).size() #define pb push_back using namespace std; typedef pair<int, int> pii; typedef long long ll; typedef long double ld; const int inf = 1e9; int main() { //ifstream cin("input.txt"); //ofstream cout("triangles.out"); ...
ALGO
0.998963
3.50874
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "a0e64dead6ea...
6be29739-bfde-48e2-a53b-75edfcdc2001
dampers/algorithm
5430.cpp
#include <bits/stdc++.h> using namespace std; #define swap(a,b) (a)^=(b)^=(a)^=(b) #define endl '\n' #define int long long using pii = pair<int, int>; const double EPS = 1e-9; const int dx[] = {1, -1, 0, 0}; const int dy[] = {0, 0, 1, -1}; int32_t main() { cin.sync_with_stdio(NULL); cin.tie(NULL); cout.tie(NULL...
ALGO
0.999319
5.34024
{ "github_metadata": { "branch": "master", "commit_count": 518, "repo_created_at": "2018-10-16T12:05:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9e068edd...
356623cd-4294-4ebe-be8c-c3cd72ce07ea
AakashDabas/SkyPP
A2OJ/B_Div2/Q40_Coins.cpp
#include<iostream> #include<vector> using namespace std; struct node{ int cnt = 0; int val = 0; node *ptr = NULL; }; node* find(int n){ int i = n / 2; node *fin = new node; fin->cnt = 1; fin->val = 1; if(n == 1) return fin; while(i > 0){ if(n % i == 0){ ...
ALGO
0.999983
3.752867
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-12-10T19:00: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": "2d54dc6e65...
bbd3f491-a2e6-4e5c-bd94-2ab1b5bccd75
lordcj/Interview-Bit
BSTIterator.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ TreeNode *node; stack<TreeNode *> st; BSTIterator::BSTIterator(TreeNode *root) { node = root; } /** @return whether we have a ...
ALGO
0.999988
5.31356
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-05-08T07:50: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": "a619b730d...
1741ff76-9931-4bf6-b7d1-da08c3d7f748
georgynemirovsky/gosha-programming-practice-2sem
classwork9/A.cpp
#include <iostream> using namespace std; struct Lesson{ int x; int y; Lesson () { x = 0; y = 0; } Lesson (int start, int end) { x = start; y = end; } }; int part(Lesson* A, int lo, int hi) { Lesson pivot = A[(hi + lo) / 2]; int i = lo; int j = h...
ALGO
0.999982
4.146912
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2022-02-06T13:26:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78fac6f8021...
0e251d27-378e-4f1d-86de-2970f8198b88
Alex-LXF/CodeBase
MD5/MD5.h
#pragma once #include <string> #include <Windows.h> #define N 64 class MD5 { public: MD5(); std::string getFileMD5(const char* filename); std::string getStringMD5(const std::string& str); char* ConvertLPWSTRToLPSTR(LPWSTR lpwszStrIn); char* openFile(); private: void init(); // 初始化 void calculateMD5(size_t* chu...
TOOL
0.950285
4.558021
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-04-06T09:46: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": "3fd9a56ba...
92d25a61-c53b-4836-9724-0564b06f48f7
GangsterAnt/BaekJoon
SW 역량 테스트 준비/15989 123 더하기4 dp ★ .cpp
//https://www.acmicpc.net/problem/15989 //https://code.plus/lecture/349 #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> v(10001, 0); int main() { int T; cin >> T; int n; int num[] = { 1,2,3 }; v[0] = 1; for (int i = 0; i < 3; ++i) { for (int j = 1; j <= 10000; +...
ALGO
0.999678
3.895866
{ "github_metadata": { "branch": "master", "commit_count": 249, "repo_created_at": "2020-01-06T10:35: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": "0b9595ba...
4676925d-7798-4bc9-a245-500df136c499
abhi-gowdaa/leetcode
0020-valid-parentheses/0020-valid-parentheses.cpp
class Solution { public: bool isValid(string s) { stack<char> stk; for(int i=0;i<s.size();i++) { if (s[i] == '(' || s[i] == '{' || s[i] == '[') { stk.push(s[i]); } else if (s[i] == ')' || s[i] == '}' || s[i] == ']') { if (stk.empty()) { ...
ALGO
0.998555
5.966649
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2024-02-28T06:02:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4e67142e9...
7aa17611-c017-48ce-add2-9d4f4cca0b70
lLab-sy/algorithm-design
a61_q1_thanos.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <queue> #include <stack> #include <deque> using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, int> pli; typedef pa...
ALGO
0.999707
4.26456
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-01-15T08:01: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": "6aaf878c8c9...
5a13457a-48a9-423b-8aa3-b0ac4eb870fc
comprehensive9/vendor_qcom_proprietary
camx/src/hwl/iqinterpolation/demosaic36interpolation.cpp
// NOWHINE NC009 <- Shared file with system team so uses non-CamX file naming //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2017-2019 Qualcomm Technologies, Inc. // All Rights Reserved. // Confidential and Proprietary - ...
ALGO
0.933671
5.898309
{ "github_metadata": { "branch": "11se", "commit_count": 7, "repo_created_at": "2023-11-10T16:56:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ca9db077e...
7bfd61e1-7cbb-4a7c-ad8a-22511aae7b83
IT1050-2022-Feb/tutorial-01-IT22602596
lab_02.cpp
//Q1 /* #include<iostream> using namespace std; int searchKey(int arr[],int key); int findMax(int arr[]); int main(void) { int i; int numbers[10]; int key,newsearchKey,max; cout << "Enter valuse for array"<<endl; for(i=0;i<10;i++) { cin >> numbers[i]; } cout << "Enter the key...
ALGO
0.996877
3.494362
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-02-24T07:06:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ab5ca4820ced...
c05bd330-a460-46d8-a217-258d2c0924ef
icl-utk-edu/slate
src/internal/internal_geqrf.cc
// Copyright (c) 2017-2023, University of Tennessee. All rights reserved. // SPDX-License-Identifier: BSD-3-Clause // This program is free software: you can redistribute it and/or modify it under // the terms of the BSD 3-Clause license. See the accompanying LICENSE file. #include "slate/Matrix.hh" #include "slate/Her...
ALGO
0.980312
7.596978
{ "github_metadata": { "branch": "master", "commit_count": 4407, "repo_created_at": "2022-06-08T20:25:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 124, "forks": 25, "issues": 18, "pull_requests": 10 }, "file_meta": { "content_id": "cae...
d15e8d52-b175-4db3-9acf-5e85e946fe55
ArvinCS/competitive-programming
Contest/Pelatnas3/Latihan/P7-C.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const int maxN = 2 * (2e5 + 5); const int logN = log2(maxN)+1; struct SegTree { int tree[4*maxN], lazy[4*maxN]; void reset(){ fill(tree, tree+4*maxN, 1e9); fill(lazy, lazy+4*maxN, 1e9); } void push(int v){ if(lazy[v] == 1e9) return; ...
ALGO
0.999937
4.522128
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-07-22T02:02: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": "cfea6fa54024...
f690726b-dc94-4266-be34-94314ba3f3bc
owlHJ/Algorithm
백준/Gold/14500. 테트로미노/테트로미노.cc
//테트로미노: 14500 //난이도 : 골드 #include <iostream> #include <cmath> #include <vector> using namespace std; int n, m; int dx[4] = { 0,1,0,-1 }; int dy[4] = { 1,0,-1,0 }; int board[501][501]; bool visited[501][501]; int answer = 0; void Simulate(); void Input() { cin >> n >> m; for (int i = 0; i < n; ++i) for (int j = 0;...
ALGO
0.999944
4.268776
{ "github_metadata": { "branch": "main", "commit_count": 117, "repo_created_at": "2024-10-03T16:20: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": "87db966d94...