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
dc3d168e-9ed4-4fe5-86d1-1a47c8ac3e0e
razvanra2/laboratoare_pa
lab5/cpp/task-2/main.cpp
#include <fstream> #include <vector> #include <algorithm> #include <unordered_set> using namespace std; class Task { public: void solve() { read_input(); print_output(get_result()); } private: int n; void read_input() { ifstream fin("in"); fin >> n; fin.close(); } vector<vector<int> > get_result(...
ALGO
0.99983
3.639378
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-06-01T06:03: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": "9d4c900fed...
79efc81d-5ae7-428c-830f-ef76033a24c9
BurningFalls/algorithm-study
Baekjoon_All/(23000~23999)/(23027) 1번부터 문제의 상태가….cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define FASTIO cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); #define MEMSET(arr, num) memset(arr, num, sizeof(arr)); #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define ROF(i,a,b) for(int i=(a);i>=(b);i--) #define pii pair<int, int> #def...
ALGO
0.999975
3.855237
{ "github_metadata": { "branch": "main", "commit_count": 3832, "repo_created_at": "2020-08-04T06:46:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f21d68487...
ea04bdd2-a1de-4877-9b57-391dfc200683
JunBinLiang/Road-To-1900
Codeforce/1100/2036C.cpp
#include <string> #include <sstream> #include <iostream> #include <vector> #include <queue> #include <algorithm> #include <set> #include <string.h> using namespace std; void solve() { string s; cin >> s; int n = s.size(); set<int> st; for(int i = 0; i < n; i++) { if(i + 3 >= n) continue...
ALGO
0.999925
4.44177
{ "github_metadata": { "branch": "main", "commit_count": 924, "repo_created_at": "2024-09-25T02:23: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": "f6de79048c...
2e1f8d74-4380-4ed0-ba72-7d4488c7581e
kissmate3/Prog1
5.csomag/mandelnagyíto/frakszal.cpp
// frakszal.cpp // // <NAME> #include "frakszal.h" FrakSzal::FrakSzal(double a, double b, double c, double d, int szelesseg, int magassag, int iteraciosHatar, FrakAblak *frakAblak) { this->a = a; this->b = b; this->c = c; this->d = d; this->szelesseg = szelesseg; this->iter...
ALGO
0.912176
4.306977
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-03-14T08:29:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7914da0f6...
5b4b78b2-cc2f-4b57-aa1c-0202c966f4f1
celinaark/modele-epidemiologique-multi-agent
C++/main.cpp
// main.cpp #include "Simulation.hpp" // Inclut Simulation.hpp, qui inclut Agent.hpp et Grille.hpp #include <iostream> // Pour std::cout, std::endl #include <string> // Pour std::string, std::to_string #include <vector> // Bien que non directement utilisé ici, souvent utile dans les main #include <ch...
ALGO
0.99786
6.524757
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-16T21:54:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21eb4552440b...
ede49f4b-25f5-4150-88bd-f3638796c3cb
ishandutta2007/codeforces-s
sserxhs/normal/1707/C.cpp
//114514min //ACM #include "bits/stdc++.h" using namespace std; template<typename typC,typename typD> istream & operator>>(istream &cin,pair<typC,typD> &a) {return cin>>a.first>>a.second;} template<typename typC> istream & operator>>(istream &cin,vector<typC> &a){for (auto &x:a) cin>>x;return cin;} template<typename t...
ALGO
0.999986
3.820824
{ "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": "b3560b9da64b...
2427b52a-20d6-41ab-8589-271b6a41f034
potyosh/BasicSortComparison
insertionSort.cpp
#include<stdio.h> #include <stdlib.h> #include <time.h> void trace(int A[], int N){ int i; for( i = 0; i < N; i++){ printf("%d\n", A[i]); } printf("\n"); } void insertionSort(int A[], int N){ int j, i, v; for( i = 1; i < N; i++ ){ v = A[i]; j = i - 1; while( j >= 0 && A[j] > v ){ A[j...
ALGO
0.989993
3.56665
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-08-08T11: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": "4434981de6...
f2df57da-78e2-4dda-91f7-46ea8234930b
kael-pam-pam/Algorithms
3.18/main.cpp
/* условия задачи: Задача 3.18 Реализовать алгоритм поиска кратчайших путей Дейкстры и проиллюстрировать по шагам этапы его выполнения (10) */ // Среда разработки: VS Code. C/C++ // Compiler: mingw64 g++ #include <iostream> #include <fstream> #include <string> #include <regex> #include "constants.h" #inc...
ALGO
0.998582
3.588174
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2021-01-03T08:55: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": "429a1e851...
ecbf5091-1055-441e-89b7-587be32e7e32
kht9544/2024.5.30Unreal_kht
Algorithm/Algorithm/Graph.cpp
#include <iostream> #include <vector> #include <algorithm> #include <unordered_map> #include <stack> #include <queue> using namespace std; vector<vector<int>> adjacent_list; void CreateGraph_Adjacent() { adjacent_list = vector<vector<int>>(7, vector<int>()); adjacent_list[0].push_back(1); adjacent_list[0].push_b...
ALGO
0.999083
3.136861
{ "github_metadata": { "branch": "main", "commit_count": 160, "repo_created_at": "2024-06-21T01:08:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93beb87297...
cefd4c58-7ba3-4ae3-a63e-7ee8e019a26b
suyeon123/algorithm_study
part2/chap6/binary_search.cpp
#include <cstdio> #include <cstring> #include <stdlib.h> #include<stdio.h> #include "Score.h" Score *binarySearch(Score scoreList[], int size, double target); int compareScore(const void *elem1, const void *elem2); Score *binarySearch(Score scoreList[], int size, double target) { int left, right, mid; left = 0; ...
ALGO
0.999376
3.440457
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-10-24T04:17:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "072ce4220d1...
90bb4ef1-5e1b-42fd-8dc7-4e0479aa30c0
HackerTrackerBlood/CPP_PTIT
CPP0156.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define foru(i, a, b) for (int i = a; i <= b; ++i) #define ford(i, b, a) for (int i = b; i >= a; --i) #define fill(a, b) memset(a, b, sizeof(a)) #define all(v) v.begin(), v.end() #define ii pair<int, int> const int mod = 1e9 + 7; int main() { ios_...
ALGO
0.999665
4.328022
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-09-15T13:42: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": "304003bf11f8...
1385273d-0a1b-49b1-8d6e-51dd9ca0482b
GRTLCollaboration/Chombo
lib/src/EBAMRTools/EBFluxRegister.cpp
#ifdef CH_LANG_CC /* * _______ __ * / ___/ / ___ __ _ / / ___ * / /__/ _ \/ _ \/ V \/ _ \/ _ \ * \___/_//_/\___/_/_/_/_.__/\___/ * Please refer to Copyright.txt, in Chombo's root directory. */ #endif #include <iostream> using std::cout; using std::cin; using std::cerr; using s...
ALGO
0.940736
5.174041
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2018-01-30T14:07:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 12, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "47f7197841...
93b6080d-e8fd-4bde-96a8-b9e7f0747ef2
euidong/BOJ
1865/main2.cpp
#include <iostream> #include <vector> #include <climits> using namespace std; string solution(const int N, const int M, const int W, const vector<vector<int>>& edges) { auto dists = vector<int>(N, 0); for (int cnt = 0; cnt <= N; ++cnt) { for (const auto & edge : edges) { const i...
ALGO
0.999834
5.646143
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-04-15T07:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a4a0c7848d...
28beffd5-9651-4079-a5e0-69f6e712ae88
vishalrathod20/LeetCode150
146. LRU Cache.cpp
#include <unordered_map> #include <list> #include <utility> // For std::pair class LRUCache { private: int capacity; unordered_map<int,list<pair<int, int>>::iterator> map; list<pair<int, int>> cache; public: LRUCache(int cap) : capacity(cap) {} int get(int key) { if (map.find(key) == map....
ALGO
0.998484
6.919846
{ "github_metadata": { "branch": "main", "commit_count": 150, "repo_created_at": "2024-08-16T05:20:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e34da8a94...
7b60db9d-83ab-4592-b851-4710bc0de518
meginthevalley/MyCPlusCode
SetsHackerRank.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <set> #include <algorithm> using namespace std; int main() { //declare the query int int Q; //set Q cin>>Q; //create the set to store elements in set<int> elements; for(int i=0;i<=Q-1;i++){ ...
ALGO
0.999169
4.982437
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-29T19:09: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": "5a03683d5c5a...
0c70312f-c3ac-4046-848c-d91cfe6b0e09
Ernest-Matvijcuk/C
LR/LR16.cpp
#include <iostream> #include <ctime> #include <cmath> using namespace std; struct Date { int year; int month; int day; }; Date today() { time_t t = time(NULL); tm tl = *localtime(&t); Date currentDate; currentDate.year = tl.tm_year + 1900; currentDate.month = tl.tm_mon + 1; curren...
ALGO
0.991413
3.836183
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2025-03-04T12:58: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": "a493845c029...
fac81a88-b285-4b84-89cd-3c51830a3392
ftsmm/DATA-STURCTURE-AGOTRITHMS
5-Array ADT/12- Let's Convert C program for Array To C++/12-Let's Convert C Program for Array To C++.h
#include <iostream> using namespace std; class Array { private: int* A; int* C; int boyut; int uzunluk; int uzunluk2; void Swap(int* x, int* y); void Swap1(int* x, int* y); public: Array() { boyut = 10; uzunluk = 0; uzunluk2 = 0; A = new int[boyut]; ...
ALGO
0.999557
3.953079
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-08-03T00: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": "aa16bfd19...
4bc61304-e4fc-4382-a494-22132d69fcbb
epezent/implot_demos
demos/mandel.cpp
// Demo: mandel.cpp // Author: <NAME> (<EMAIL>) // Date: 7/25/2021 #include "App.h" #include "ThreadPool.h" #include <imgui_internal.h> #include <immintrin.h> // Mandelbrot algorithms obtained from: // https://nullprogram.com/blog/2015/07/10/ struct spec { /* Image Specification */ int width; int he...
ALGO
0.946465
5.660284
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2021-03-26T14:44:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 219, "forks": 49, "issues": 8, "pull_requests": 7 }, "file_meta": { "content_id": "a7c3f8...
11e573bc-0437-4b85-a448-b4f7e74b57dc
yufengzhe1/Collision-Avoidance-with-DRL
ORCA/orca/orca.h
/** * File : orca.h * Author: <NAME> * * Class definition of the ORCA system. */ // Include guard #ifndef _ORCA_H_ #define _ORCA_H_ // Inclusions #include <algorithm> #include <cmath> #include <vector> #include "../geom/point.h" #include "../utilities/exceptions.h" #include "../utilities/utilities.h" #inclu...
TOOL
0.967025
7.264573
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-03-11T10:52:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 85, "forks": 15, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "2c04146...
47d605d5-366c-42a1-bf81-126b640de511
preethinarayan/cgraytracer
hw4-predhru/submission_files/hw4-predhru1/SceneObjs.h
#include "nv/nv_math.h" #include "nv/nv_algebra.h" #include <math.h> #include "Light.h" #include <vector> #define vector std::vector #define maxVerts 100 #define maxLight 7 class Ray { public: vec3 begin; vec3 end; Ray(); }; class RayHomo { public: vec4 begin; vec4 end; RayHomo(); }; class Scene; class Came...
ALGO
0.985429
4.173893
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2015-03-15T06:18: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": "8b196437e...
f12bd79d-267e-4c4f-82a3-9440eb83213b
Alberto-SC/Competitive-Programming-solutions
Codeforces/Educational 97/d.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' typedef long long int lli; #define __ ios_base::sync_with_stdio(false);cin.tie(NULL); int deepth = 0; const int maxn = 200007; vector<int> graph[maxn]; int main(){__ int t = 1,n; cin>>t; while(t--){ cin>>n; vector<int> nums(n);...
ALGO
0.999908
4.126541
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-07-20T03:18:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5806002e24f3...
a6d8d161-b12d-4583-b3db-0d6fb44af349
Srgi00i/Squid-Game
Floor/v3/floor-1/squid-game-floor-1-col-A-v3/squid-game-floor-1-col-A-v3.ino
#include <Adafruit_NeoPixel.h> #define NUM_DIODS 140 // number of LEDs in the strip #define NUM_TILES 12 // number of tiles #define MAX_BRIGHT 30 // max brightness for the LEDs (DO NOT TOUCH) #define STEP_ANIMATION 10 // size of the step for dimming in animations const bool debug = false; ...
TOOL
0.930188
6.157613
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-11-18T14:18: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": "b051346559...
42d444ff-c70d-44c0-b04f-e60ebe92f405
PranavSitaraman/Competitive-Programming
ACSL/Contest/2020-2021/ACSL Multiple Arrays/ACSL Multiple Arrays.cpp
#include "ACSL Multiple Arrays.h" using namespace std; int sumOfLargest(string a1, string a2, string a3) { int sizea1 = count(a1.begin(), a1.end(), ' ') + 1; int sizea2 = count(a2.begin(), a2.end(), ' ') + 1; int sizea3 = count(a3.begin(), a3.end(), ' ') + 1; int size = max(sizea1, max(sizea2, sizea3)); int sum = ...
ALGO
0.999795
4.076718
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-04-21T20:28:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af1fc850cd2...
e82203ee-e35e-430e-9709-ec4b1dcb40b1
usgs/pestpp
src/libs/pestpp_common/DifferentialEvolution.h
#ifndef DIFFERENTIALEVOLUTION_H_ #define DIFFERENTIALEVOLUTION_H_ #include <unordered_map> #include <random> #include "FileManager.h" #include "ObjectiveFunc.h" #include "OutputFileWriter.h" #include "PerformanceLog.h" #include "RunStorage.h" class Pest; class RunManagerAbstract; class RestartController; class Diffe...
ALGO
0.999104
5.528767
{ "github_metadata": { "branch": "master", "commit_count": 2599, "repo_created_at": "2019-03-07T22:16:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 153, "forks": 82, "issues": 33, "pull_requests": 0 }, "file_meta": { "content_id": "09a1...
2902797f-814f-4d66-98b0-39435ea1a63d
svn2github/bullet
tags/bullet-1.5f/Bullet/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cpp
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 <NAME> http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is ...
ALGO
0.999108
6.000325
{ "github_metadata": { "branch": "master", "commit_count": 2728, "repo_created_at": "2012-11-04T17:05:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9c0a2e6...
81e1a835-a855-44a4-8652-2643c7467503
ishandutta2007/codeforces-q
qoo2p5/normal/708/B.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int a00, a01, a10, a11; void solve(int a, int b) { if (a * 1LL * b - a01 != a10) { return; } if (a == 0) { for (int i = 0; i < b; i++) { printf("1"); } printf("\n"); exit(0); }...
ALGO
0.999372
3.180989
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:56:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30341d071c12...
ad4041c1-a342-4d0d-a6c6-5cb23ea136b4
SandersJack/OrbitSim
simulation/Planets/Earth/src/Moon.cc
#include "Moon.hh" #include "Earth.hh" #include "Vector3D.hh" #include <iostream> ClassImp(Moon) Moon::Moon() { Init(); } Moon::~Moon(){ } void Moon::Init(){ MoonParameters *EParam = MoonParameters::GetInstance(); fMass = EParam->GetMass(); fPosition = Vector3D(EParam->GetStartPos()); fVelocity...
ALGO
0.929138
3.855454
{ "github_metadata": { "branch": "develop", "commit_count": 88, "repo_created_at": "2024-03-05T12:30:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "fbc0e623...
9474b3cc-87db-4265-b4dd-21fa537dfcb6
lickelon/Baekjoon
백준/Gold/27570. Chocolate Chip Fabrication/Chocolate Chip Fabrication.cc
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define INF 0x7FFFFFFF using namespace std; using ll = long long; using ld = long double; using pii = pair<int,int>; using pll = pair<ll, ll>; bool _visit[1002][1002]; bool board[1002][1002]; int main() { ios::sync_with_stdio(0); cin.tie(0); c...
ALGO
0.999938
3.990874
{ "github_metadata": { "branch": "main", "commit_count": 470, "repo_created_at": "2024-06-29T11:26: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": "ebf85997f8...
9251f531-1ea1-41b4-a542-dc44bd128582
denotevn/C-plus-plus-tutorial
Algorithm-years2-Itmo/1162.cpp
#include<bits/stdc++.h> using namespace std; struct Edges{ int a,b; double r,c; // Exchange rates and commissions }; int N;// N-the number of currencies int M; // the number of exchange points int S; // S - the number of currency Nick has double V; // V - the quantity of currency units he has vector<Edges>...
ALGO
0.999767
4.205114
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-05-12T14:32:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad2b679e05c2...
1755d1ee-be9b-4b9b-a347-ae77361b696e
motumotu/CompeProg
AtCoder/ARC/ARC033/ARC033_B.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <climits> #include <algorithm> #include <cmath> #include <cstdlib> #include <stack> #include <queue> #include <string> #include <map> #include <set> #include <sstream> #include <functional> #include <ctime> #include <cctype> using names...
ALGO
0.999561
3.431826
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2015-10-11T06:09: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": "97b449ba9...
60c89ff7-006c-4c57-a4ff-86d26c4cc754
YJ243/codetree-TILs
240116/겹쳐지지 않는 두 직사각형/non-overlapping-two-rectangles.cpp
#include <iostream> #include <climits> #define MAX_NM 5 using namespace std; int n, m; int grid[MAX_NM][MAX_NM]; int ans = INT_MIN; int getSum(int x, int y, int w, int h){ int curr = 0; for(int i=x; i<=x+h; i++){ for(int j=y; j<=y+w; j++) curr += grid[i][j]; } return curr; } int ...
ALGO
0.999875
3.663706
{ "github_metadata": { "branch": "main", "commit_count": 1619, "repo_created_at": "2023-11-08T11:19:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25d325209...
ecb1a73e-2676-4962-8010-0c67cdd2c569
ishandutta2007/codeforces-b
brovko/normal/1515/C.cpp
#include <bits/stdc++.h> #define int long long #define x first #define y second #define pii pair <int, int> using namespace std; int t, n, m, x, a[100005], b[100005], c[100005]; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> t; while(t--) { cin >> n >...
ALGO
0.99988
3.341765
{ "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": "598ab946d2fa...
f1d81ccf-d861-4a01-9301-7ce52efa0dbc
dengyufan2008/code
Contests/20230912-20231116 NOIP/DengYufan20230921/zh/zh.cpp
#include <fstream> #include <vector> #define LL long long using namespace std; ifstream cin("zh.in"); ofstream cout("zh.out"); const LL kMaxN = 1e6 + 1; struct V { LL l, *s, *p; vector<LL> e; } v[kMaxN]; LL n, ans, *t, h[kMaxN * 5]; void S(LL f, LL x) { for (LL &i : v[x].e) { if (i != f) { S(x, i); ...
ALGO
0.999792
3.754336
{ "github_metadata": { "branch": "master", "commit_count": 1775, "repo_created_at": "2021-09-21T09:26:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4181d88...
9a86b9e4-1bce-4f50-acc0-660edd2b74c6
ProCode67/leetcode_solutions_cpp
Strings/min_time_diff.cpp
#include<iostream> #include<algorithm> #include<limits.h> #include<vector> using namespace std; /**********************Minimum Time Difference [LeetCode : https://leetcode.com/problems/minimum-time-difference/description/]***************************************************/ int findMinDifference(vector<string>& timeP...
ALGO
0.999462
5.797076
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-10-19T11:14:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51168de948c...
8559c029-cf06-4d4b-9aca-2ed2cf500313
strategist614/ACM-Code
刷题比赛/CF/CodeForces812/C.cpp
/* 独立思考 一个题不会做,收获5%,写了代码10%,提交对了30%,总结吃透了这个题才是100%. */ #include<bits/stdc++.h> using namespace std; template <typename T> void read(T &x) { x = 0; char c = getchar(); int sgn = 1; while(c<'0'||c>'9'){if(c=='-')sgn=-1;c=getchar();} while(c>='0'&&c<='9')x=x*10+c-'0',c=getchar(); x*=sgn; } template <typename T> ...
ALGO
0.999989
3.143594
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-01-24T07:35: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": "2dd3ada848...
ec293f0e-89a3-4361-8a00-a0460d6e4f74
CoderVicky23/Problems
leetcode/130.cpp
#include <bits/stdc++.h> using namespace std; void solve(vector<vector<string>>& board) { int n = board.size(); int m = board[0].size(); vector<vector<bool>> visited (n, vector<bool> (m, 0)); queue <pair<int, int>> q; for (int i=0; i<n; i++) { for (int j=0; j<m; j++) { if (i == ...
ALGO
0.999886
5.066343
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2024-06-02T17:08: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": "75ee3534f...
6ae745b1-7f51-4437-bc90-c93021bf0f20
mhaoli/ACM-Source-Code
Problems/WOJ/learn/1143.cpp
/* * Author: <NAME> * Created Time: 2015/2/17 23:21:16 * File Name: 1143.cpp */ #include <iostream> #include <cstdio> #include <cstring> #include <string> #include <cmath> #include <algorithm> using namespace std; #define posin(x,y) (0 <= (x) && (x) < n && 0 <= (y) && (y) < m) #define rep(i, a, b) for(int i = (a)...
ALGO
0.998468
3.485309
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2015-04-15T04:55:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ee85c65...
3d3593aa-ba78-4583-b5f4-21d99759e0aa
TriptSudhakar/CPP-course
26. Hashmaps/longest_consecutive_subsequence.cpp
#include<iostream> #include<unordered_map> #include<unordered_set> using namespace std; //using unordered map int longestconssubseq(int arr[],int n) { unordered_map<int,int> m; for(int i=0;i<n;i++) { int no = arr[i]; if(!m.count(no-1) && !m.count(no+1)) { m[no] = 1; ...
ALGO
0.999927
4.599371
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-08-26T09:38: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": "9d8d7080321...
4c2a64e7-e079-4c96-8413-180ab57761b6
nawngs/CompetitiveProgramming
gshn/day1/palincut.cpp
#pragma GCC optimize ("O2") #include <bits/stdc++.h> #define ll long long #define ld long double #define fi first #define se second #define pll pair < ll, ll > #define pii pair < int, int > #define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); using namespace std; const string NAME = ""; const string NAME2 =...
ALGO
0.999878
3.975692
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2021-06-19T07:51: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": "307c5fd5a98...
dd8a0de1-caf5-4690-9e3d-5a11bd81a31f
SmilexGamer/cso-master-server
thirdparty/mysql/server/private/item_vectorfunc.h
#ifndef ITEM_VECTORFUNC_INCLUDED #define ITEM_VECTORFUNC_INCLUDED /* Copyright (C) 2023, MariaDB 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; version 2 of the License. This program i...
TOOL
0.940194
7.199268
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2022-06-14T17:05:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e07583f...
55e4900f-45c0-4419-a9b6-c67a5e76aa83
YegorF2010/Data-Structures
3_Doubly_linear_linked_list/3_Doubly_linear_linked_list.cpp
// 3_Doubly_linear_linked_list.cpp: определяет точку входа для консольного приложения. // #include "stdafx.h" #include <iostream> using namespace std; struct Link { Link* next,*prev; int data; }; class LL_doubly_linear { Link* first; int cnt; public: LL_doubly_linear() :first(NULL), cnt(0) {} ~LL_doubly_linear...
ALGO
0.996929
3.816379
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-01-31T10:22: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": "d87724ba90...
3a1ce59c-6048-4d39-8119-b92a4c1e2498
Kacper2901/Studia
Semestr2/Algorytmika/Lista2/wspolczynnik_roznorodnosci.cpp
#include <iostream> #include <vector> int find(long long v, std::vector<long long> &parents) { if (v == parents[v]) { return v; } return parents[v] = find(parents[v], parents); } long long find_union(long long a, long long b, std::vector<long long> &parents, std::vector<std::vector<long long>>...
ALGO
0.999966
4.435536
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2025-02-26T11:50: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": "ce6eb66ff31...
7e86dbb1-cc69-4491-a025-02294baa1671
Mansterteddy/Cracking-the-Coding-Interview
language/c++/data structure/Tree/Binary_Tree/Huffman_Tree.cpp
/** Implementation of Huffman_Tree class */ #include <cctype> #include "Huffman_Tree.h" //#ifdef USEKW //#include "priority_queue.h" //using KW::priority_queue; //#else #include <queue> using std::priority_queue; //#endif using std::ostream; using std::string; using std::toupper; using std::tolower; void Huffman_Tree:...
ALGO
0.99928
4.127426
{ "github_metadata": { "branch": "master", "commit_count": 335, "repo_created_at": "2016-08-08T08:35:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8903a7db...
d795a9b0-1f07-4548-8c2c-4385889036ee
lemonilemon/algo
prob/TIOJ/1205.cpp
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #define local #ifdef local using std::cerr; #define debug(arg) deone(#arg, arg) #define orange(l, r) derange(#l ", " #r, l, r) #define safe() std::cerr << "\033[1;32m" << __PRETTY_FUNCTION__ << " is safe\033[0m\n" template <typename T> void deone(const char *s, T ...
ALGO
0.999256
4.275714
{ "github_metadata": { "branch": "main", "commit_count": 233, "repo_created_at": "2022-10-24T11:06: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": "cb815a4141...
5740762b-3ebd-40ec-b826-ab787eb65ab2
sqwlly/ACM-solved-problem
Codeforces/gym/2018 ACM-ICPC, Syrian Collegiate Programming Contest/C.cc
/************************************************************************* > File Name: C.cc > Author: sqwlly > Mail: <EMAIL> > Created Time: 2019年09月10日 星期二 10时30分37秒 ************************************************************************/ #include<bits/stdc++.h> using namespace std; #ifndef ONLINE...
ALGO
0.999722
3.690174
{ "github_metadata": { "branch": "master", "commit_count": 226, "repo_created_at": "2018-09-01T15:52: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": "2c46f7ec...
a0bb0341-6c8c-4054-89c9-2e3e37331320
thepranay01/DSA-CPP-Practice
Recursion/GeekforGeek/PalindromeCheck.cpp
#include <bits/stdc++.h> using namespace std; // Tail recursive - Tc : O(n^2), SC: O(n^2) bool Pa(string s, string k = "", int i = 0) { // cout << i << endl; // cout << s << endl; // cout << k << endl; if (s.length() == k.length()) { return s == k; } return Pa(s, s[i] + k, i + 1); ...
ALGO
0.999877
5.115209
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-07-07T18:18: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": "2d5df7e6e9c7...
125288b1-4703-477b-b6cf-1bc4fab0a551
harshaithireddy/GeeksForGeeks-Codes
Difficulty: Medium/Decode the string/decode-the-string.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: string decodedString(string &s) { // code here stack<string> st; string res = ""; string temp = ""; int num = 0; ...
ALGO
0.993684
6.347126
{ "github_metadata": { "branch": "main", "commit_count": 750, "repo_created_at": "2024-01-20T18:28: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": "9ca5bb524a...
a0568553-71df-45fe-85f0-be8ecee641d2
sp2005-im/Line-Follower-Group-Project
code-version-2.ino
#include <Arduino.h> #include <SparkFun_TB6612.h> // Pin definitions int d1 = A0; int d2 = A1; int d3 = A2; int d4 = A3; int d5 = A4; int d6 = A5; #define AIN1 9 #define BIN1 10 #define AIN2 8 #define BIN2 11 #define PWMA 3 #define PWMB 5 #define STBY 2 const int offsetA = -1; const int offsetB = 1; Motor motorr = ...
ALGO
0.99167
5.767492
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-04-29T23:47: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": "2cac1d9fe50...
a352cb4d-2437-4afa-a20e-509e71d1c0e9
tlsgkdns/study
BfsAndDfs/1240_distanceBetweenNode.cpp
#include <iostream> #include <vector> #include <cstring> using namespace std; vector<pair<int, int>> adj[1001]; int N, M, A, B, C, D[1001], v[1001]; bool f = false; void dfs(int here, long long s, int dst) { if (f) return; if (dst == here) { f = true; cout << s << '\n'; } for (int i = 0; i < adj[here].size()...
ALGO
0.999931
4.136956
{ "github_metadata": { "branch": "master", "commit_count": 2028, "repo_created_at": "2021-02-18T10:49: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": "af58dd2...
36b8326f-1f3f-48e8-b01f-35492fe73f40
suravijha/DSA
Day15/search-insert-position.cpp
// LeetCode 35 /* Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You must write an algorithm with O(log n) runtime complexity. */ class Solution { public: int searchInsert(vector<int>& ...
ALGO
0.999993
6.269458
{ "github_metadata": { "branch": "main", "commit_count": 233, "repo_created_at": "2025-05-25T09:44: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": "781a430ef1...
0647a3d3-9740-47c5-9525-f1336a56b859
makifay/Problem-Solutions-using-CPP
Dynamic_Programming_/Matrix_Chain_Multiplication_Min_Cost_.cpp
// Most Optimized Matrix Order for Matrix-Chain Multiplication // Algorithm ref: http://www.cs.bilkent.edu.tr/~atat/473/lecture10.pdf // Time Complexity: O(n^3), 3 nested loops // Auxiliary Space: O(n^2) #include <bits/stdc++.h> using namespace std; // Matrix Ai has dimension p[i-1] x p[i] // for i = 1..n int Matri...
ALGO
0.999972
5.399254
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2021-06-22T17:38:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35c0dc7a28f...
0b9abf64-ce56-4029-8e1f-71a367498583
rutujak24/SPPU_SE_ADSL_Assignments
ADSL1.cpp
//============================================================================ // Name : Assignment1.cpp // Author : <NAME> // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ /...
ALGO
0.999761
5.955722
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-01-11T05:53: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": "ebfa207c1...
f2f451bc-088b-499f-a9b7-570926224489
knightelessar/leetcode
20200601/InvertBinaryTree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999983
6.538921
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2020-05-26T08:24:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ef753a8a8...
220e4045-5f54-4265-918f-20fe6cfb7c31
znxuz/leetcode
cpp/setMatrixZeros/solution.cpp
// https://leetcode.com/problems/set-matrix-zeroes/ #include <unordered_set> #include <iostream> #include <vector> #include "helper.h" using namespace std; class Solution { public: void setZeroes(vector<vector<int>>& matrix) { optimal(matrix); } private: // use first row and col as markers for clearin...
ALGO
0.999282
6.942192
{ "github_metadata": { "branch": "main", "commit_count": 861, "repo_created_at": "2021-12-01T14:20: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": "22d02f64af...
6c3d3b7b-7e72-41ff-8cde-392401526b07
bbb1293/baekjoon
백준/Platinum/25500. 무자비한 최단 경로/무자비한 최단 경로.cc
#include <bits/stdc++.h> using namespace std; struct City { int idx, x, y, z; }; const int MAXN = 2e5; int n, k; City c[MAXN]; long long dist[MAXN * 2]; vector<pair<int, int> > edges[MAXN * 2]; int main() { // freopen("input.txt", "r", stdin); scanf("%d %d", &n, &k); for (int i = 0; i < n; i++) { ...
ALGO
0.999947
3.797766
{ "github_metadata": { "branch": "main", "commit_count": 498, "repo_created_at": "2022-02-01T14:25:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8105b8cf4...
f733ff77-503c-4c25-b18c-89239c89af3d
GodRishUniverse/dsa-practice
contest/dinner_time.cpp
#include <iostream> #include <vector> #include <string> using namespace std; #define ll long long int main(){ int n, p, q, m; int tests; cin >> tests; vector<string> answers; for (size_t t = 0; t <tests; ++t){ cin >> n >> m >> p>> q; // n = length // m = sum // p...
ALGO
0.999835
4.331723
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-11-30T02:50:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14b9ac576e3...
acb09145-32fd-4b23-8fab-603b26335274
cmjscott/Numot
Homework_3/Homework_3/mainn.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cmath> // used for pow function #include <conio.h> //include for getch function #include <iomanip> //include for setprecision command #include <cctype> // for istype functions void bubble(std::vector<int>* v, bool ascending); int man() { std::vec...
TOOL
0.994805
4.372457
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2014-11-14T16:22: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": "37eee1239...
575a68ea-abdd-4af0-8735-0fc518c6a7c4
mzareeb99/234901-Workshop-in-Competitive-Programming
week 8/uva_11420.cpp
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #include <numeric> #include <iomanip> using names...
ALGO
0.99978
3.993577
{ "github_metadata": { "branch": "main", "commit_count": 154, "repo_created_at": "2022-03-22T20:55:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd2a75df01...
5b8b3af0-8432-4a30-a1e0-cfa7ece73deb
codebynessa/lab-de-prog
vanessafreitas802.679/ex01.cpp
/*Desenvolva um programa em C++ para auxiliar em cálculos de desconto em compras. Utilize funções e faça uso da passagem de parâmetros por referência para realizar as operações necessárias. A seguir, são apresentadas as especificações do programa:*/ #include <iostream> using namespace std; // funcao para calcular o ...
ALGO
0.930671
4.737115
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-02-14T03:34: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": "aec9e1f9a98d...
0af2571a-2eeb-4524-8207-175fc4ef85bd
jcarlosmhmx/metodos_numericos
5-14.cpp
#include <iostream> #include <cmath> using namespace std; double M(double x) { return -185 * x + 1650; } double bisection(double a, double b, double epsilon) { double c; int iterations = 0; while ((b - a) >= epsilon) { c = (a + b) / 2; if (M(c) == 0.0) { break; }...
ALGO
0.999984
4.835284
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-09-14T23:46: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": "a8a118b732d...
9e5919ea-f683-490e-9d2a-0493c1abf7c7
NIKKU-29/Leetcode_stats
0386-lexicographical-numbers/0386-lexicographical-numbers.cpp
class Solution { public: void solver(int curr , int limit, vector<int>&ans) { ans.push_back(curr); for(int i = 0 ; i <= 9 ; i++) { int next = curr * 10 + i; if(next > limit) continue; solver(next,limit,ans); } } vector<int>...
ALGO
0.999633
6.183736
{ "github_metadata": { "branch": "main", "commit_count": 2756, "repo_created_at": "2024-09-02T11:26:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8f7a4259...
b9d7106e-fe30-47cf-afbc-207df6e1be34
xyzyzl/compprog
probs/cses/high score/main.cpp
/** ID: albert.28 LANG: C++14 PROB: poetry **/ /// Time: #include <bits/stdc++.h> /** Mod operations in O(lg n) Source: <NAME>, https://github.com/bqi343/USACO/blob/master/Implementations/11%20-20(4)/Operators/modOp.cpp?fbclid=IwAR0m2afS-1xVg9kgeF8q8EJIeP9TP3Lct8dYb_hPJuI5gqHP1Utp5EkiOQ8 **/ using namespace std; #...
ALGO
0.999921
4.136382
{ "github_metadata": { "branch": "master", "commit_count": 364, "repo_created_at": "2019-06-11T03:19:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "284d33ac...
2fc3c2b0-eaea-4bb1-ac7c-6afb275f4980
omerhalid/Real-Time-Market-Data-Feed-Handler-and-Order-Matching-Engine
src/order_matching/OrderBook.cpp
#include "../include/order_matching/OrderBook.hpp" template<typename Compare> void OrderBook::removeFromHeap(std::priority_queue<OrderDouble, std::vector<OrderDouble>, Compare> &heap, int id) { std::vector<OrderDouble> temp; while (!heap.empty()) { OrderDouble top = heap.top(); heap.pop();...
ALGO
0.987672
5.269006
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-09-26T21:58:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "181de3dd510...
cf581781-8b55-4fc0-8de7-c41dbbc1128d
bulletphysics/bullet3
src/Bullet3Dynamics/b3CpuRigidBodyPipeline.cpp
#include "b3CpuRigidBodyPipeline.h" #include "Bullet3Dynamics/shared/b3IntegrateTransforms.h" #include "Bullet3Collision/NarrowPhaseCollision/shared/b3RigidBodyData.h" #include "Bullet3Collision/BroadPhaseCollision/b3DynamicBvhBroadphase.h" #include "Bullet3Collision/NarrowPhaseCollision/b3Config.h" #include "Bullet3C...
ALGO
0.98074
5.807901
{ "github_metadata": { "branch": "master", "commit_count": 9404, "repo_created_at": "2011-04-12T18:45:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13557, "forks": 2973, "issues": 238, "pull_requests": 141 }, "file_meta": { "content_id"...
c18ed783-0c3e-4cb2-8edd-817c679fb019
whai362/AcmCode
contest/2015_7_18/i.cpp
#include <iostream> #include <cstdio> #include <queue> #include <memory.h> using namespace std; #define nNode 100005 #define nEdge 400005 struct node { int id; int color; int next; }edge[nEdge]; struct state { int id; int color; }; int map[nNode]; int n,m,len; int level[nNode],path[nNode],mmin[nN...
ALGO
0.999976
3.830186
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2015-03-23T08:28:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d82a4691...
59e09fac-8c30-4074-ac1b-395037aee0d6
piyushpp07/LeetCode-Solutions
Generate IP Addresses - GFG/generate-ip-addresses.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /*You are required to complete this method*/ class Solution{ public: vector<string>ans; void solve(string &s,int idx,int cnt,string &p) { if(cnt == 4) { if(idx == s.size() ){ ...
ALGO
0.994573
5.750377
{ "github_metadata": { "branch": "main", "commit_count": 1935, "repo_created_at": "2021-01-11T04:19:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f00cbf7df...
6fa80875-3e4e-48f9-bde6-e87b05134414
Shashwatsingh22/Practice_Le
DSA_Complete/Tree/BinaryTreee/maximum_width_of_bt.cpp
//LeetCode--> Here We Are taking those elements also which arr NULL which are at the same level class Solution { public: int widthOfBinaryTree(TreeNode* root) { if(!root) return 0; long long width=0; queue<pair<long long, TreeNode*>> q; q.push({0,root}); while(!q.emp...
ALGO
0.999926
6.196676
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2020-12-16T04:16:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fc3000f64...
2f09eb42-0d8b-41e0-8a7f-40c5b774d469
seoykwon/Data-Structures
lab_heaps/heap.cpp
/** * @file heap.cpp * Implementation of a heap class. */ template <class T, class Compare> size_t heap<T, Compare>::root() const { /// @todo Update to return the index you are choosing to be your root. return 1; //return 0; } template <class T, class Compare> size_t heap<T, Compare>::leftChild(size_t...
ALGO
0.991995
6.153446
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-08-21T07:10: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": "2b031f78cb63...
33d8bc2e-8ab5-4979-a4c8-14ef13061ff0
manu05X/ProgramFiles
InterviewBit/Backtracking/CombinationSum.cpp
//https://leetcode.com/problems/combination-sum/ // 38 Combination Sum class Solution { public: vector<vector<int>> combinationSum(vector<int>& candidates, int target) { sort(candidates.begin(), candidates.end()); vector<vector<int> > res; vector<int> combination; combinationS...
ALGO
0.999954
6.353912
{ "github_metadata": { "branch": "master", "commit_count": 178, "repo_created_at": "2019-10-04T05:46: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": "002d22cc...
df05f853-1a70-49e0-ac5b-e816a8e87918
shefben/world-opponent-network
world-opponent-network/wonapi/WONGUI/TextBox.cpp
#include "TextBox.h" #include "Clipboard.h" #include "ColorScheme.h" #include <algorithm> using namespace WONAPI; /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// TextSegmentBase::TextSegmentBase() { mLine ...
TOOL
0.924815
5.926754
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-07-28T22:52:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9ee78ac7f...
a14dd8f8-7e4c-451c-a056-d54e1902fa12
tibi-p/steam-roll
codechef/challenge/dec13/decorate/decorate.cpp
#include <algorithm> #include <vector> #include <cstdio> #include <cctype> #include <cstring> #define BUFFER_SIZE 10 #define MAX_M 100000 #define MAX_NUM_BITS 18 #define MAX_PRIME 24 using namespace std; const unsigned long long uint_limit = 1000000000; struct merge_entry { pair<int, int> values; int position; ...
ALGO
0.999957
3.355746
{ "github_metadata": { "branch": "master", "commit_count": 241, "repo_created_at": "2012-10-21T17:41: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": "319b27c9...
d90b1a83-33fc-4347-89f0-936bf8154f4e
ccutjiangxiong/MY-learningcode
luogu/7_8/P_8619_蓝桥杯_2014_国_B_殖民地.cpp
#include <bits/extc++.h> #define rep(i, a, b) for (int i = (a); i <= (b); i++) #define rem(i, a, b) for (int i = (a); i >= (b); i--) #define ran(l, r) uniform_int_distribution<decltype(l)>(l, r)(rng) #define ranf(l, r) uniform_real_distribution<decltype(l)>(l, r)(rng) #define lbt(a) __builtin_ctz(a) #define cnt1(a) __b...
ALGO
0.999866
4.289644
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2025-03-07T10:48: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": "3a3302760cc...
8e96db01-2e6c-497a-89a4-a01210ea6d15
Maryemmath/Programming-abstractions
UniversalHealthCoverage.cpp
#include <iostream> #include <string> #include <fstream> #include "set.h" #include "map.h" #include "console.h" #include "simpio.h" #include "strlib.h" using namespace std; using namespace std; /* Function: canOfferUniversalCoverage(Set<string>& cities, * Vector< Set<string> >& l...
ALGO
0.912376
4.93285
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-04-30T17:38: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": "4f75f97006d1...
31fc89c8-01ac-42ed-94b4-638ad96bb4f9
jwhitehill/MultiEnrollmentProjectWithDustin
quantify.cpp
#include "quantify.hpp" #include <stdlib.h> #include <map> int comparator (const void *el1, const void *el2) { float *f1 = (float *) el1; float *f2 = (float *) el2; if (*f1 < *f2) { return -1; } else if (*f1 == *f2) { return 0; } else { return 1; } } int quantify (const int nRows, const int nCols, float *...
ALGO
0.99882
4.372606
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2015-11-10T19:56:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9670f3a2...
0e33796a-8028-4493-ae3d-d413741cb0b9
AlaricHunot/hai719
HAI719I_TP1 (2)/tp.cpp
// ------------------------------------------- // gMini : a minimal OpenGL/GLUT application // for 3D graphics. // Copyright (C) 2006-2008 <NAME> // All rights reserved. // ------------------------------------------- // ------------------------------------------- // Disclaimer: this code is dirty in the // meaning tha...
TOOL
0.960666
5.161242
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-22T10:50:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45fce0e6b7a3...
1179ba2d-514a-432e-891a-26c07eb76d54
samiulalimsaad/Phitron
1st Semester/3rd Part/MID/1.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node* next; Node(int value) { data = value; next = NULL; } }; void insert_tail(Node*& head, Node*& tail, int val) { Node* newNode = new Node(val); if (tail == NULL) { head = newNode; ta...
ALGO
0.999941
4.55877
{ "github_metadata": { "branch": "main", "commit_count": 118, "repo_created_at": "2023-03-31T21:49: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": "1278fd1185...
f9ba85ec-98de-4afe-a0a1-4dea131f4e42
JamiuAfolabi/cpp
511491/model_a_2_ideal.cpp
# include <iostream> # include <unordered_map> # include <deque> template<typename K, typename V> class Cache { public: Cache(size_t maxSize) : maxSize(maxSize) {} void put(const K& key, const V& value) { if (cacheMap.find(key) != cacheMap.end()) { // Update the value of the existing entry...
ALGO
0.999148
7.225025
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2024-12-29T20:09: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": "98c386b0f8b...
8c3dd600-0125-4155-9240-f5eea9f0c686
lezdzh/Talisman
full/others/dancing-links.cpp
struct Node { Node *l, *r, *u, *d, *col; int size, line_no; Node() { size = 0; line_no = -1; l = r = u = d = col = NULL; } } *root; void cover(Node *c) { c->l->r = c->r; c->r->l = c->l; for (Node *u = c->d; u != c; u = u->d) for (Node *v = u->r; v != u; v = v->r) { v->d->u = v->u; v->u->d = v->d; ...
ALGO
0.999389
3.339743
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2018-08-15T11:53:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "341e111b1...
cb16cd0a-9eb9-4584-956c-b53e598f0fa3
AryanChauhan25/CodingBlocks-AlgoCourse-Solutions
Arrays/RainWaterHarvesting.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int a[n]; for(int i = 0; i < n; i++) cin>>a[i]; int l[n], r[n]; for(int i = 0; i < n; i++) { if(i == 0) l[i] = a[i]; else { if(a[i] > l[i - 1]) l[i] = a[i]; else l[i] = l[i - 1]; ...
ALGO
0.999971
4.222369
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-09-15T14:27:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f14544bd9...
56edb9dc-8d31-434d-a2e8-21397f7604d3
Sinchiguano/Algorithmic-Toolbox
STL/pairwise.cpp
/* * pairwise.cpp * Copyright (C) 2018 <NAME> <<EMAIL>> * * Distributed under terms of the BSD license. */ #include <iostream> #include <algorithm> #include <vector> #include <array> //g++ -std=c++14 -o temp sort.cpp using namespace std; int max_pair_wise(const std::vector<int>& v); bool compare_function(int...
ALGO
0.999677
5.70956
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2018-09-03T18:34: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": "6564d4f71...
0a050b96-6189-4cdf-8143-cf1f24fb5174
Krishna-Kumar-18/DSA-Question
leetcode/2415_reverse_odd_levels_of_binary_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), l...
ALGO
0.99999
5.904771
{ "github_metadata": { "branch": "main", "commit_count": 274, "repo_created_at": "2024-07-15T11:00:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "486b15e9a4...
c3a71d11-10f5-4c2e-af9d-c8788e376d06
TheH0bbit/AutoPas_DEM
src/autopas/containers/verletClusterLists/traversals/VCLSlicedC02Traversal.h
/** * @file VCLSlicedC02Traversal.h * @author fischerv * @date 11 Aug 2020 */ #pragma once #include "autopas/containers/cellPairTraversals/SlicedC02BasedTraversal.h" #include "autopas/containers/verletClusterLists/VerletClusterLists.h" #include "autopas/containers/verletClusterLists/traversals/VCLClusterFunctor.h...
ALGO
0.994097
6.409123
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-09-19T11:40: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": "5a91cae5548a...
6e8e8abe-c3c6-4d71-8273-f89df316c813
dragons6641/BOJ
implementation/BOJ20061.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #define MAX_N 10000 #define MAX_T 3 #define BOARD_H 6 #define BOARD_W 4 #define SPECIAL_H 2 #define SPECIAL_W 4 struct BlockNode { // 블록의 종류 int t; // 기준 블록의 위치 int r; int c; }; // 핵심 아이디어 : 파란색 보드를 90도 회전시켜서 초록색 보드와 똑같은 원리로 사용!!! // 블록을 놓은 횟수 int N; // 블록을 모...
ALGO
0.999607
3.641227
{ "github_metadata": { "branch": "main", "commit_count": 567, "repo_created_at": "2021-05-21T07:02: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": "d829d1e0f7...
6416095e-fc37-4eb1-9073-90509b77b19e
NguyenTHChau/Chau.NTH
Chapter 6/challenge23.cpp
#include <iostream> #include <fstream> #include <cmath> using namespace std; // Function to check if a number is prime bool isPrime(int num) { if (num <= 1) { return false; } // Check for divisibility from 2 to the square root of the number for (int i = 2; i <= sqrt(num); ++i) { if (n...
ALGO
0.987136
4.603804
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-11-24T16:28: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": "adb849946c...
657282ab-c8b2-4f6c-9ac7-844912364cf8
besteekmen/CG-RayTracer
rt/solids/quadric.cpp
#include <rt/solids/quadric.h> namespace rt { Quadric::Quadric(float na, float nb, float nc, float nd, float ne, float nf, float ng, float nh, float ni, float nj, CoordMapper* texMapper, Material* material) : a(na), b(nb), c(nc) , d(nd), e(ne), f(nf) , g(ng), h(nh), i(ni) , j(nj), material(material)...
ALGO
0.983326
5.633775
{ "github_metadata": { "branch": "master", "commit_count": 291, "repo_created_at": "2022-03-04T18:00:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "02f43362...
cb93a361-aadc-4532-807b-fc6099c1fc23
Hafiz-Sakib/Data-Structure-Algorithms
Algorithms/Euler’s Totient function.cpp
/*#include <bits/stdc++.h> using namespace std; int phi(int n) { float result = n; for(int p = 2; p * p <= n; ++p) { if (n % p == 0) { while (n % p == 0) n /= p; result *= (1.0 - (1.0 / (float)p)); } } if (n > 1) result *= (1.0 ...
ALGO
0.999044
5.402796
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2022-08-14T16:37:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "529a5f32f6b...
72aaf9de-b84f-406d-be04-32cc71883d53
tks3210/Atcoder
kentyon/kentyon_n.cpp
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rep1(i, n) for(int i = 1; i <= (int)(n); i++) #define show(x) {for(auto i: x){cout << i << " ";} cout<<endl;} #define showm(m) {for(auto i: m){cout << m.x << " ";} cout<<endl;} typedef long l...
ALGO
0.999989
3.815415
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2018-08-27T12:21:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c58a4758c...
c1edd5f7-452c-42e8-8466-f52cf099e81b
alps-jbnu/23ALPStudy
2023-2/Intermediate/dameun2224/BinarySearch/1920.cpp
#include <iostream> #include <stdlib.h> #include <vector> #include <queue> #include <stack> #include <algorithm> #include <math.h> #include <cstring> #include <list> #include <tuple> #include <set> using namespace std; #define X first #define Y second int n, m, t; int a[100005]; int bs(int target) { int st = 0; ...
ALGO
0.99997
4.741373
{ "github_metadata": { "branch": "main", "commit_count": 2930, "repo_created_at": "2023-02-03T06:11:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 59, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b04a703f...
13729fc6-2854-45a0-85f7-2dacb37c9e88
algorowara/grownet
ngraph/nsphere.cpp
#include "nsphere.h" #include <cstring> #include <ctime> #include <cmath> #include <cstdlib> #include <cfloat> #include <string> #include <sstream> #include <algorithm> #include <iterator> #include <fstream> #include <iostream> using namespace std; NSphere::NSphere(long int n, long int m, int d, float r, float baseGa...
ALGO
0.999596
4.841293
{ "github_metadata": { "branch": "master", "commit_count": 209, "repo_created_at": "2013-06-07T01:09: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": "c44af5af...
b3beecd2-5ca0-4494-9909-189e7503cc0f
rajgupta2/LeetCode-2025-POTD
January 2025/16 January 2025.cpp
/* Bitwise XOR of All Pairings You are given two 0-indexed arrays, nums1 and nums2, consisting of non-negative integers. There exists another array, nums3, which contains the bitwise XOR of all pairings of integers between nums1 and nums2 (every integer in nums1 is paired with every integer in nums2 exactly once). Retu...
ALGO
0.99998
6.003443
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2025-01-02T10:22: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": "1a667d8d39...
4976c4d5-f519-4e97-842d-4e6975739a29
VenusHui/VenusHui
ACM-ICPC/AcWing/P846.cpp
/** * @platform: AcWing * @problem: P846 * @version: Contest Version * @author: VenusHui * @date: 2025-01-15 */ #include <bits/stdc++.h> typedef long long ll; using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; vector<int> disjoint...
ALGO
0.999684
4.675947
{ "github_metadata": { "branch": "main", "commit_count": 368, "repo_created_at": "2021-08-18T02:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ab163cf98...
c35b45ca-8899-4854-b610-648c03dbef8a
MarcellMissura/SpaceTaxi
lib/util/Statistics.cpp
#include "Statistics.h" #include <QTime> #include <algorithm> Statistics statistics; uint Statistics::seed; Statistics::Statistics() { setSeed(0); } // Initializes the random number generator. // Warning! The RNG is not thread safe! If you are using the Statistics package // in a different thread from the main, y...
ALGO
0.979379
4.470627
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-07-21T11:21:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f516a60c5...
ffe9a8fd-7165-47ec-9ce6-05bb0f6def0d
raincross7/code-similarity
codes/train_code/problem112/problem112_102.cpp
#include <bits/stdc++.h> using namespace std; int main() { list<int> list1; int n, tmp; string string1; cin >> n; while (n--) { cin >> string1; if (string1 == "insert") { cin >> tmp; list1.push_front(tmp); } else if (string1 == "delete") { ...
ALGO
0.999652
4.68017
{ "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": "c6e6103a4fd9...
bd373475-0b16-4791-864d-6f16f83f7303
Ravikumarjj/LeetCode
Equal Sum.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: string equilibrium(int *arr, int n) { // code here if(n==0)return "NO"; int leftSum=0, rightSum=0; for(int i=0;i<n;i++){ ...
ALGO
0.999743
5.884882
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2022-11-08T18:08:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aead99e567...
903ff81d-6e29-403c-87ea-d8c3f4b44730
LineageOS/android_system_bt
btif/src/btif_config_cache.cc
/* * Copyright 2020 The Android Open Source Project * * 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 appli...
TOOL
0.944748
7.457942
{ "github_metadata": { "branch": "lineage-19.1", "commit_count": 48391, "repo_created_at": "2016-12-05T14:59:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 122, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id":...
04879a58-a4a9-4a32-8522-c40e08fd826d
cup2of2tea/CodeVsZombie
main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; class Coord { public: int x; int y; Coord() {} Coord(int _x, int _y):x(_x),y(_y) {} }; int dist(Coord &c, Coord &c2) { return (c.x-c2.x)*(c.x-c2.x)+(c.y-c2.y)*(c.y-c2.y); } Coord moveTo(Coord &fr...
ALGO
0.999745
3.56319
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-05-08T17:23:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59531f41ef...
c933c381-4b26-417c-a81c-a94f988a4cba
deepak05kr18/Strivers-sheet
Array/Easy/Move Zeroes/code.cpp
#include <vector> #include <queue> using namespace std; class Solution { public: void moveZeroes2(vector<int>& nums) { std:: queue<int> q1,q2, q3; for(int i=0; i<nums.size(); i++){ q1.push(nums[i]); } while(!q1.empty()){ if(q1.front()==0){ in...
ALGO
0.999947
6.946091
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2024-01-23T18:13: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": "2cb5d9870...
82f610f8-e5c2-433f-9fce-b110648f235f
abhi2666/Coding-OA-2024-
taskScheduler(621).cpp
// /* // To do this we can use a pq and an queue to perform the operations.. // Pq to get the task with most freq..so that it can be performed first and queue to put processes that are on cooldown period.. // */ class Solution { public: int leastInterval(vector<char>& tasks, int n) { priority_queue<int, vec...
ALGO
0.999971
6.098049
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2024-03-14T13:23:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b916d1008...
7bd34213-dd9b-426e-bda6-56cf8c6040f5
mozihe/Planner
src/RRTPlanner.cpp
// // Created by mozihe on 25-2-14. // #include "RRTPlanner.h" std::vector<cv::Point> RRTPlanner::plan() { if (!isValid(start_) || !isValid(goal_)) { return {}; } std::map<cv::Point, cv::Point, cmpPoints> tree; tree[start_] = start_; for (int i = 0; i < max_iter_; ++i) { cv::Po...
ALGO
0.998865
5.178412
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-02-10T08:30: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": "d5a6e80f52c...
38302d46-4d20-4aac-b6cc-1cff2aa45f52
ay2306/Competitive-Programming
codeforces/practice/little_girls_and_game.cpp
#include <bits/stdc++.h> #define MOD 1000000007 #define test int t; cin>>t; while(t--) #define init(arr,val) memset(arr,val,sizeof(arr)) #define loop(i,a,b) for(int i=a;i<b;i++) #define loopr(i,a,b) for(int i=a;i>=b;i--) #define loops(i,a,b,step) for(int i=a;i<b;i+=step) #define looprs(i,a,b,step) for(int i=a;i>=b;i-=s...
ALGO
0.999968
3.189498
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-08-29T14:45:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9a48587b...