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
16dc5656-492e-4534-8024-ee13f0d0a44e
sadatislam9696/CSES
11043797 - Dice Combinations Recursieve.cpp
/*** <NAME> ***/ #include<bits/stdc++.h> using namespace std; #define nn '\n' #define ss second #define ff first #define sp(d, n) fixed << setprecision(d) << n #define srt(v) sort(v.begin(),v.end()); #define rsrt(v) sort(v.rbegin(),v.rend()); #define ...
ALGO
0.999991
4.143593
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-09-19T10:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f06f5e6f61a...
f08682e7-aefd-49fa-b9c7-0858a09ea99e
juarezpaulino/coderemite
problemsets/Codejam/2011/QUA 2011/PA/PA.cpp
/** * * Author: <NAME>(coderemite) * Email: <EMAIL> * */ #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <climits> #include <string> #include <algorithm> #include <sstream> #include <map> #include <set> #include <queue> #include <numeric> using namespace std; ...
ALGO
0.995504
3.574745
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-12-12T21:51:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9025f9ea4a0...
8ce19823-d7ad-4a7b-b435-ba56842ffba0
FZUxxx/Object-Storage-Algorithm
初赛/score2700w.cpp
#include <cstdio> #include <cassert> #include <cstdlib> #include <stack> #include <queue> #include <vector> #include <climits> #include <unordered_map> using namespace std; #define MAX_DISK_NUM (10 + 1) #define MAX_DISK_SIZE (16384 + 1) #define MAX_REQUEST_NUM (30000000 + 1) #define MAX_OBJECT_NUM (100000 + 1) #define...
ALGO
0.996775
3.65353
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-28T10:00:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2695534d8386...
24b58047-0329-4a92-b2b3-decc6ced0d4b
kkisic/Procon
CPP/AtCoder/other/keyence2019/b.cpp
#include <cmath> #include <iostream> #include <vector> #include <queue> #include <deque> #include <map> #include <set> #include <stack> #include <tuple> #include <bitset> #include <algorithm> #include <functional> #include <utility> #include <iomanip> #define int long long int #define rep(i, n) for(int i = 0; i < (n);...
ALGO
0.999913
3.637377
{ "github_metadata": { "branch": "master", "commit_count": 1105, "repo_created_at": "2017-11-28T11:11:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3546304...
71dc28bf-d4e5-4ab6-990e-8a938e1b8087
CiroGC/Generala-Game-C-
Generala/main.cpp
#include <iostream> #include <cstdlib> #include<cstdio> #include<ctime> using namespace std; #include "rlutil.h" #include "funciones.h" #include "desarrollo.h" int main() { rlutil::setBackgroundColor(rlutil::BLACK); rlutil::setColor(rlutil::GREEN); int opc, puntmax = 0, bandera = 0, maxanterior = 0; ...
ALGO
0.960744
3.316883
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-07-11T03:08: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": "99f730e11e58...
92d68902-375a-4493-b988-b1ec57a89e86
yanshengjia/operation-system
hw1/3.6/fibonacci_linux.cpp
// Operation System 3.6 // created by <NAME> // 2016年3月16日 下午2:51 #include <iostream> #include <unistd.h> #include <stdio.h> #include <sys/types.h> using namespace std; int fibonacci(int number) { if(number < 0) { cerr<<"Input error!"<<endl; return -1; } else if(number == 0) { ...
ALGO
0.999496
3.708529
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-05-04T14:09:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "97c4aa2770...
125aede7-107c-4475-8603-92b506b274fc
deeiqh/tokyoDB
busqueda_binaria_key_registro.cpp
#include "Funciones.h" Entero busqueda_binaria_key_registro(string nombre_archivo, string key, Tam tamCampos, Tam cantCampos, Entero low, Entero high) { fstream arch; arch.open(nombre_archivo + ext, fstream::in); Tam tamBloque = tamCampos*cantCampos+1; Tam m...
TOOL
0.997114
4.086
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-01-02T21:51: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": "8a92e406b...
382dc318-1b8e-4953-b971-10fc6e95e6a0
AllisonLee0507/CPlusPlus_Language_Tutorial
23.deque/23-08.deque_push.cpp
#if 0 #include <iostream> #include <deque> #include <string> #include <algorithm> #include <iterator> using namespace std; int main(void) { // create empty deque of strings deque<string> coll; // insert several elements coll.assign(3, string("string")); coll.push_back("last string"); coll.push_front("first stri...
TOOL
0.913424
5.351921
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-08-22T04:21:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2ba3f487bc4...
3da880e2-b3c7-4334-a3ea-1586fd212cae
kdmkjm/coding_test
test_realize/12_7.cpp
#include <iostream> #include <vector> #include <algorithm> #define INF 1e9 using namespace std; int n, m; vector<pair<int,int> > house; vector<pair<int,int> > chicken; int getSum(vector<pair<int, int> > v) { int result = 0; for (int i = 0; i < house.size(); i++) { int hx = house[i].first; int hy = house[i].sec...
ALGO
0.999724
3.321075
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2024-02-21T13:11: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": "94ab43eb2c4...
c07124cd-b97b-4910-ae5b-25ad6611423c
FedeZara/competitive_programming_solutions
Graphs/Dijkstra/country_roads/country_roads.cpp
// https://lightoj.com/problem/country-roads #include <bits/stdc++.h> #define MAX_N 500 using namespace std; typedef pair<int, int> edge; typedef pair<int, int> node; int main() { int T; cin >> T; for (int t = 0; t < T; t++) { cout << "Case " << t + 1 << ":" << endl; int N, M; ...
ALGO
0.999909
3.925016
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2022-04-10T20:03: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": "9609180b6...
c1ad8646-f375-47df-a512-16f89f43a8d2
mercdoggo01/Coding_problems
CPP/Recursion & backtracking/Combinations/main_combinations.cpp
#include<bits/stdc++.h> #define fastio ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define pi 3.14285714285 #define pb push_back #define ppb pop_back #define mpr make_pair #define ll long long #define ld long double #define pr pair #define endll endl #define ff first #define ss second #define fo(i,a,n) fo...
ALGO
0.999974
3.799747
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2022-01-31T06:55:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98d5c894998...
1e360e91-6498-4f77-a2f5-29dd67c5712e
howardchina/ACM-ICPC-solved-problem
poj/3342/11879610_WA.cpp
#include <stdio.h> #include <string.h> struct Node{ int child[205]; int cnt; } a[205]; int dp[205][2]; bool flag[205][2]; char name[205][2][105]; int dfs(int root, int sta) { if(dp[root][sta]!=-1)return dp[root][sta]; if(sta==1){ int chid; dp[root][1]=1; flag[root][1]=1; ...
ALGO
0.999996
3.499093
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-10-18T09:48:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b07c3b6d84...
8bc25cbc-a69e-4103-9d26-720dbb07f7f0
ben44496/cpp-project-template
src/main.cpp
#include "util.h" #include "parser_header.h" #include "BFS.h" #include "AStarAlgorithm.h" #include "pagerank.h" #include <string> #include <fstream> #include <unordered_set> #include <cmath> using namespace Parser; using util::OptionsParser; using std::cout; using std::endl; using std::string; using std::vector; usin...
ALGO
0.997902
4.393033
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2021-11-09T23:06:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8d6e618b71...
800bba95-c663-4ee5-a756-ff1941ca56c8
JunHaoSu/Algorithm
For_course/Circle_operation.cpp
/************************************************************************* > File Name: Circle_operation.cpp > Author: > Mail: > Created Time: 2018年03月22日 星期四 21时22分14秒 ************************************************************************/ #include<iostream> #include<cmath> #include<algorithm> #include<fstre...
ALGO
0.999784
3.328653
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2017-10-03T14:05:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf00a3fbf...
f4abf940-7e62-4722-93d2-15472db46e66
FayshalU/BounceGame
main.cpp
#include <stdio.h> #include <GL/gl.h> #include <GL/glut.h> #include <math.h> #include <stdlib.h> #include<string> #include<bits/stdc++.h> using namespace std; float transFactor1 = 0.0f; //translation factor for background hill (shortest1) float transFactor2 = 0.0f; //translation factor for background hill (long...
TOOL
0.995134
3.208103
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-02-12T15:22: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": "29dc3a365f...
8d53e130-d29f-4947-a1a8-37b60081fd63
rachit2905/Leetcode-solutions
1008-construct-binary-search-tree-from-preorder-traversal/1008-construct-binary-search-tree-from-preorder-traversal.cpp
/** *Definition for a binary tree node. *struct TreeNode { * int val; * TreeNode * left; * TreeNode * right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(le...
ALGO
0.999993
6.337954
{ "github_metadata": { "branch": "main", "commit_count": 2462, "repo_created_at": "2022-10-22T07:12: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": "df7b21dcb...
d704f841-f947-4f0d-8f44-8f49e7263aa1
medyahya-2000/Cpp-projects-
D&D.cpp
/** * \file main.cpp * \brief Ce fichier contient un programme de calcul d'attaques pour le jeu Donjons et Dragons * \author <NAME> * \author <NAME> * \author <NAME> YAHM1101 * \author <NAME> ELBM1102 * \date 02/09/2022 */ #include "generer.h" // fichier contenant la fonction generer #include <iostream> // Pe...
TOOL
0.932903
3.440524
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-07T20:26: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": "d3b61a7d5425...
2f3888a4-7396-4659-b96d-10e3ff7ce12d
ass-ier/LexicalAnalayzer
LexicalErrorHandling/main.cpp
// // main.cpp // LexicalErrorHandling // // Created by <NAME> on 15/08/2024. // #include <iostream> #include <cctype> #include <string> // Enum to define different token types enum class TokenType { IDENTIFIER, NUMBER, OPERATOR, UNKNOWN, END }; // Class to represent a Token class Token { publ...
TOOL
0.930541
5.827282
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-01T17:23: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": "b4a7d958052e...
7891c289-8537-4f63-81b1-807b3f080e6e
Macw07/Macw07
Algorithm/Simulation/P1202-黑色星期五FridaytheThirteenth.cpp
#include <iostream> using namespace std; int cnt[10]; int days[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int n, yy, mm, dd, current; inline bool isLeap(int year){ return ((year % 4 == 0) && (year % 100 != 0 || year % 400 == 0)); } int main(){ cin >> n; yy = 1900; mm = dd = 1; curre...
ALGO
0.999952
3.118209
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-11-26T07:30:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0c58e866915...
9107f884-5c20-4c86-b85c-7b3ef436f43f
geyinledi/experiment
taskScheduling.cpp
#include <iostream> #include <cstdio> #include <string> #include <vector> using namespace std; const int N = 10001; class queue { private: struct node { string id; double time, len; node *next; }; node *frontNode = NULL, *endNode = frontNode; int sum=0; public: void i...
ALGO
0.999693
3.934513
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-04-06T16:11: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": "d84617cfef...
b726355b-4923-481c-95c0-099c85ad8127
tushparte/Implementations
regex-matching.cpp
#include <bits/stdc++.h> using namespace std; #define present(container, element) (container.find(element) != container.end()) #define cpresent(container, element) (find(all(container), element) != container.end()) #define INF 0x3f3f3f3f #define f1(i, n) for (int i = 0; i < n; ++i) #define f2(i, n) for (int i = 1; i ...
ALGO
0.999928
3.888634
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-05-30T13:24: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": "fd7246c474...
fd9bb1b7-75f6-4412-bacd-a11a24987f77
ishandutta2007/codeforces-r
riadwaw/normal/109/C.cpp
#include <stdio.h> #include <iostream> #include <set> #include <map> #include <string> #include <queue> #include <math.h> #include <sstream> #include <complex> #include <string.h> #include <algorithm> using namespace std; void solve(); #define mp make_pair #define pb push_back typedef int fknmain; typedef long long in...
ALGO
0.99948
3.976847
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58: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": "2b8d1b4b41c5...
26731e42-136e-411a-8d6b-9a50792feb36
cantunderstandpython/1RZck-codebook
data-structure/LiChao.cpp
constexpr i64 INF = 4e18; struct Line { i64 a, b; Line() : a(0), b(INF) {} Line(i64 a, i64 b) : a(a), b(b) {} i64 operator()(i64 x) { return a * x + b; } }; // [, ) !!!!!!!!!!! struct Lichao { int n; vector<int> vals; vector<Line> lines; Lichao() {} void init(const vector<int> &v) { n = v.size(); ...
ALGO
0.99997
5.499677
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2023-04-05T13:01: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": "fd9c3e88f18...
54bedf0e-5f13-4434-9e6a-4b21dc24f0e6
fanfank/leetcode
scramble-string.cpp
/******************************************************************** Solution 1: this code can be compressed to solution 2 这段代码可以进一步简化,变成方法2中的样子,不过方法1的容易懂一点 ********************************************************************/ class Solution { public: int delta(int &num, int delta) { int ret...
ALGO
0.999996
5.451379
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2013-11-02T16:32:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 95, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "149015...
0a86d600-0b2a-48cf-bcfa-4260cdefcac1
gaurav7477/LeetCodeDSA
Find the number of islands - GFG/find-the-number-of-islands.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void bfs(int row,int col,vector<vector<int>> &visited,vector<vector<char>>& grid){ visited[row][col] = 1; queue<pair<int,int>>q; q.push({row,col}); int n = grid.si...
ALGO
0.999754
6.708681
{ "github_metadata": { "branch": "main", "commit_count": 450, "repo_created_at": "2022-09-13T12:19: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": "7a71794a0a...
fc631a46-2219-478b-8600-1ba94996d2d6
turneja123/competitive-programming-library
Problem/String/Count Beautiful Substrings II.cpp
//https://leetcode.com/contest/weekly-contest-373/problems/count-beautiful-substrings-ii/ #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; class Solution { public: struct chash { long long operator()(pair<int, int> x) const { return (long long)x.first* 50005 + x.second; } }; gp_h...
ALGO
0.999884
5.013041
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2024-03-11T08:36:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9f93633c...
8d009a76-08a5-417c-b4d3-783d4d5e159c
sangyomi/camel-raisim-projects-V4
camel-canine/canine_controller/ControlUtils/src/CubicSwingLeg.cpp
// // Created by jaehoon on 23. 4. 14. // #include <ControlUtils/CubicSwingLeg.hpp> extern pSHM sharedMemory; CubicSwingLeg::CubicSwingLeg() : mbIsNewTrajectory{false, false, false, false} , mLiftUpHeight{0.1, 0.1, 0.1, 0.1 } , mTargetHeight{0.0, 0.0, 0.0, 0.0} { } void CubicSwingLeg::SetParameters() { ...
TOOL
0.910676
5.083829
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-06-23T04:25:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e476181b0abe...
578a8696-1970-4eb7-aca6-8442a72b84a0
AlexKastanek/CS302
PA_03/main.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include "FlightMap.v1.h" #include "FlightMap.v2.h" //#include "stack.h" using namespace std; int main() { Map1 firstMap; Map2 secondMap; char* cityFile = new char[20]; char* flightFile = new char[20]; char* requestFile = new char[20]; ...
ALGO
0.914432
3.183954
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-03-30T02:32:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21c21367d3...
d88d97de-fc12-478c-a7ac-d4fc14debf62
drakesargent/Cpp-samples
Programming I/CISS241_DEA_6.1/CISS241_DEA_6.1/DropLowestGrade.cpp
/*<NAME> *Chapter 6 *Assigment 1 *Drop Lowest Grade */ #include<iostream> using namespace std; //Declare Variables int tval1, tval2, tval3, tval4, tval5, tval6; //prototype functions void getScore(int &); void calcAverage(int, int, int, int, int, int); int findLowest(int, int, int, int, int, int); //main funct...
ALGO
0.995946
4.847622
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-07-07T18:09:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de70d83088...
07465e9c-336b-470d-9b71-6f14ce7e43fc
Dipendra-Jawariya/LeetCode
0div-idbig-omega-company-tagsdiv-idbig-omega-topbardiv-classcompanytagscontainer-styleoverflow-x-scroll-flex-wrap-nowrap-div-classcompanytagscontainer-tagno-companies-found-for-this-problem-div-divdiv-classcompanytagscontainer-chevrondivsvg-version11-idicon-xmlnshttp-wwww3org-2000-svg-xmlns-xlinkhttp-wwww3org-1999-xlin...
class Solution { private: void bfs(int sr,int sc,int initialColor,int color,vector<vector<int>>& image, vector<vector<int>>& ans) { queue<pair<int,int>> q; q.push({sr,sc}); int delRow[] = {-1,0,1,0}; int delCol[] = {0,1,0,-1}; int n = image.size...
ALGO
0.999923
6.408296
{ "github_metadata": { "branch": "main", "commit_count": 2136, "repo_created_at": "2022-09-13T11:46:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87c0bf6b2...
1810ce91-0484-48f6-aabd-d71255a1a143
justiny7/competitive-programming
usaco/training-website/Chapter 1 - Getting Started/1.3 Complete Search/palsquare/palsquare.cpp
/* ID: justiny7 LANG: C++ TASK: palsquare */ #include <iostream> #include <fstream> #include <string> #include <cmath> #include <cstring> using namespace std; char reVal(int num) { if (num >= 0 && num <= 9) return (char)(num + '0'); else return (char)(num - 10 + 'A'); } void strev(char* str) { int len = strl...
ALGO
0.998904
3.613195
{ "github_metadata": { "branch": "main", "commit_count": 462, "repo_created_at": "2020-11-07T20:39:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "310f6b5b6...
7a7c7bc7-6258-41d6-a152-58107d505e1c
SToPire/sponge-2021fall
libsponge/stream_reassembler.cc
#include "stream_reassembler.hh" #include <cstddef> #include <cstdio> #include <stdexcept> // Dummy implementation of a stream reassembler. // For Lab 1, please replace with a real implementation that passes the // automated checks run by `make check_lab1`. // You will need to add private members to the class decla...
TOOL
0.940122
6.461795
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2022-10-30T17:13:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "622571fea...
55735666-c01f-4c24-99d6-a5b76d2c7c14
SarthakMoriya/DSA
C++/LinkedLists/insertionll.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = NULL; } }; void insertAtHead(Node *&head, int data) { Node *temp = new Node(data); temp->next = head; head = temp; } void insertAtTail(No...
ALGO
0.999585
5.368479
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-03-26T13:53:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0dd74f40bfd...
101ce7e1-dab5-44bc-9d96-22137398842e
rohitbhardwajj/DSA-Drill-
80- Reverse LinkedList.cpp
#include <iostream> using namespace std; class Node { public: int data; Node* next; Node(int data) { this->data = data; this->next = NULL; } }; // Print the list void printList(Node* head) { Node* temp = head; while (temp != NULL) { cout << temp->data << " "; ...
ALGO
0.999648
4.941586
{ "github_metadata": { "branch": "main", "commit_count": 158, "repo_created_at": "2025-03-18T04:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebda07428f...
85cebac8-9d5b-4fe8-b982-8ab0e18a5e12
bradelement/coding_exercise
zoj/misc/3607.cpp
#include "cstdio" const int MAXN = 1024; const int inf = 0x12345678; int p[MAXN], t[MAXN]; int n; int main(int argc, char const *argv[]) { int T; scanf("%d", &T); while (T--) { scanf("%d", &n); for (int i=1; i<=n; i++) { scanf("%d", &p[i]); } for (int i=1; i<=n;...
ALGO
0.999687
3.321615
{ "github_metadata": { "branch": "master", "commit_count": 214, "repo_created_at": "2014-03-11T14:19: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": "7482a757...
ed5ae93c-d9bd-4eec-baa1-402fe3088f06
THUSAAC/THUPC2023-Pre
day0/D/data/gen.cpp
#include<bits/stdc++.h> #define gc getchar() #define pc putchar #define li long long #define fi first #define se second #define pb push_back #define mp make_pair #define pli pair<li,int> using namespace std; inline li read(){ li x = 0; int y = 0,c = gc; while(c < '0' || c > '9') y = c,c = gc; while(c >= '0' && c <=...
ALGO
0.99994
3.471406
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2023-03-06T09:45:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac4f92fc6c...
77b0cf2f-c861-414a-98b9-2b4182f78234
OpenXRay/xray-15
cs/sdk/include/boost/graph/bandwidth.hpp
// Copyright (c) <NAME> 2001, <NAME> 2002 // // Permission to use, copy, modify, distribute and sell this software // and its documentation for any purpose is hereby granted without fee, // provided that the above copyright notice appears in all copies and // that both that copyright notice and this permission notice a...
ALGO
0.994867
6.473946
{ "github_metadata": { "branch": "xd_dev", "commit_count": 610, "repo_created_at": "2014-08-22T12:09:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 175, "forks": 64, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "8d3e9f...
128d1d2e-0b16-4d6c-8b21-b27b046d83a8
pranjay-poddar/Data-Structures-And-Algorithms
LeetCode/Hard/92. Reverse Linked List II.cpp
/*First make a dummy node assign its value to 0 and its next point to the head of the orignal linked list. make a pointer of type ListNode for traversing the dummy linked list and point it to the head of dummy linked list. then traverse the dummy list upto the left position given in the question. then define a current ...
ALGO
1
5.300066
{ "github_metadata": { "branch": "master", "commit_count": 647, "repo_created_at": "2020-08-22T18:28:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 47, "forks": 107, "issues": 15, "pull_requests": 2 }, "file_meta": { "content_id": "38bb...
1446e8cb-1fc2-4bfa-8002-d97b0c084caa
keim/speedshooter
src/util/Math.cpp
#include "Math.h" //-------------------------------------------------------------------------------- // Log2 //-------------------------------------------------------------------------------- // i 以上で最小の 2^n を計算する int Calc2N(int i) { int n; for (n=1; n<i; n<<=1); return n; } // i >= 2^n を満たす最大の n 求める(ただし,i=...
ALGO
0.998263
4.274394
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-08-22T02:11:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6520fe820b...
3292c532-145b-4c6f-9751-cc510cd44cbf
lpt/scid
src/sortcache.cpp
/* * Copyright (C) 2011 <NAME>, <NAME> * This file is part of Scid (Shane's Chess Information Database). * * Scid 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. * * Scid is distributed in the hope that it w...
ALGO
0.996323
4.165374
{ "github_metadata": { "branch": "master", "commit_count": 824, "repo_created_at": "2015-10-12T22:09:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a6281ae...
3c482fc0-3284-4ff7-aa33-8eb36e0556f1
mangoqwq/competitive-programming
Other/gcc16p1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; struct uwu{ int l, r; bool a; }; bool cmp(uwu a, uwu b){ if (make_pair(a.l,a.r)==make_pair(b.l,b.r)) return a.a<b.a; return make_pair(a.l,a.r)<make_pair(b.l,b.r); } int main(){ //cin.tie(0); cin.sync_with_st...
ALGO
0.998894
3.751555
{ "github_metadata": { "branch": "master", "commit_count": 540, "repo_created_at": "2020-08-28T16:37:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db135f36...
894613d8-5759-42da-8a5b-a2b6d3cf1703
sweeneychris/TheiaSfM
libraries/optimo/optimo/solvers/gradient_descent.h
// Copyright (C) 2014 <NAME> <<EMAIL>> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list...
ALGO
0.999856
7.540216
{ "github_metadata": { "branch": "master", "commit_count": 958, "repo_created_at": "2015-02-11T18:15:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 933, "forks": 280, "issues": 36, "pull_requests": 10 }, "file_meta": { "content_id": "e0...
9dc74288-df61-48cd-b7f8-026fabe2cf6b
Surajgupta001/PROBLEM-PRACTICE
945_Minimum_Increment_Make_Array_Unique.cpp
/* Minimum Increment to Make Array Unique - [Leetcode - 945(Medium)] ================================================================= You are given an integer array nums. In one move, you can pick an index i where 0 <= i < nums.length and increment nums[i] by 1. Return the minimum number of moves to make every value ...
ALGO
0.999884
6.710881
{ "github_metadata": { "branch": "main", "commit_count": 235, "repo_created_at": "2025-01-16T08:54:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f62015c1b...
fa8febb9-1fac-4ef9-85c8-a7d283e9244d
miracl/MIRACL
source/mersenne.cpp
/* * Program to calculate mersenne primes * using Lucas-Lehmer test - Knuth p.391 * * Try this only in a 32-bit (or better) environment * * Requires: big.cpp * */ #include <iostream> #include "big.h" using namespace std; #define LIMIT 100000 Miracl precision=1000; int main() { /* calculate mersenn...
ALGO
0.999609
4.186768
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2012-11-06T01:20:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 683, "forks": 243, "issues": 67, "pull_requests": 12 }, "file_meta": { "content_id": "42bf...
a339d153-a275-467f-893d-a17770b73730
ishandutta2007/codeforces-c
cookiedoth/normal/1389/F.cpp
/* Code for problem F by cookiedoth Generated 31 Jul 2020 at 01.54 PM 10% 30% 50% 70% 100% ~_^ z_z >_< */ #include <iostream> #include <fstream> #include <vector> #include <set> #include <map> #include <bitset> #include <algorithm> #include <iomanip> #include <cmath> #include <ctime> #include <functional> #i...
ALGO
0.999467
4.868194
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01: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": "db2ef6ac9263...
4fff9f5a-76fd-43de-92f7-0c8bff3e129e
nazwaaurellia29/c-_Nazwa-A.A.P
main.cpp
#include <iostream> #include <conio.h> using namespace std; int main() { char nilai; int angka,nilaiakhir; float tugas,uts,uas,nilai_akhir; cout<<" Menghitung Nilai Akhir Mahasiswa"<<endl; cout<<" --------------------------------"<<endl; cout<<" Masukkan Nilai Mahasiswa\n"; cout<<" Nilai Tugas : "; cin...
ALGO
0.99948
3.106423
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-06T02:53: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": "17049f239b05...
2829421c-5e68-4e1d-9f24-07e0668711dd
AnkurRyder/Assignments
Assignment 5 q3.cpp
#include <iostream> #include <queue> using namespace std; typedef struct node //Information and address of next node { int data; struct node* leftad=NULL; struct node* rightad=NULL; }node; node* MakeBinary(node* G,int n); void AllPath(node *G,queue<int> A) { queue<int> Q=A; if(G->leftad!=NULL||G->right...
ALGO
0.99998
4.551463
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-08-31T07:10:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65a0aa3045...
bd3c1517-9d05-414f-9845-93db0c81c763
tylerhm/progteam
codeforces/770d2/a.cpp
#include <iostream> #include <vector> #include <string> #include <tuple> #include <algorithm> #include <list> #include <numeric> #include <random> #include <tuple> #include <map> #include <set> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(...
ALGO
0.999954
3.99146
{ "github_metadata": { "branch": "main", "commit_count": 104, "repo_created_at": "2020-11-01T19:07:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3451a28db7...
9d3dc5c2-b924-404c-bb7a-279d6b3a4610
anatolka18/hOMEWORK_iNFORM
multiplication_matrica.cpp
#include <iostream> #include <cmath> #include <vector> using namespace std; int n; vector<vector<int>> Cin(vector<vector<int>> a) { cout << "Введите матрицу : " << endl; int x; for (int i = 1; i <= n; ++i) { for (int j = 1; j <= n; ++j) { cin >> x; a[i][j] = x; } } cout << endl; return a; } void Cout...
ALGO
0.999973
4.136842
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2022-03-08T20:30:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd820eb17...
05e08a12-08de-4ad2-bca1-304e8390d002
KshitizTyagi1011/Data_Encryption
playfair.cpp
#include <iostream> #include<string> #include<vector> using namespace std; bool linearset(string s, char el, int len) { for(int i=0; i<len; i++) { if(el == s[i]) return false; } return true; } int str_length(string s) { int c = 0; while(s[c]) { c++; } return c; } vect...
ALGO
0.999932
4.092186
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-12-24T11:48: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": "052408c4ff93...
7cd93959-f416-4520-bf47-eff1c8d34ad3
SandyLee-00/ProblemSolving_Baekjoon-Programmers
프로그래머스/1/258712. 가장 많이 받은 선물/가장 많이 받은 선물.cpp
#include <string> #include <vector> #include <bits/stdc++.h> using namespace std; /* 다르면 - 더 많이 준 쪽이 하나 받기 같으면 - 선물지수 큰 사람이 하나 받기 */ int grp[55][55]; vector<string> split(string input, char del){ vector<string> answer; stringstream ss(input); string temp; while(getline(ss, temp, del)){ ...
ALGO
0.999877
4.67094
{ "github_metadata": { "branch": "main", "commit_count": 342, "repo_created_at": "2022-09-02T07:32: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": "60c97407e0...
6c7599a6-cd6e-446f-85bf-274c660448f8
Oushesh/CODING_INTERVIEW
InterviewCake/Python/BinaryTree/Superbalanced_Binary_Tree.cpp
//Rewriting the code in .cpp //Rewriting the code: of Superbalanced.py, Superbalanced.cpp #include <iostream> #include <vector> #include <limits> using namespace std; struct Node { public: int value; Node* left; Node* right; Node(int value) { this->value = value; left = NULL; right = NULL; }...
ALGO
0.999728
4.97131
{ "github_metadata": { "branch": "master", "commit_count": 161, "repo_created_at": "2020-02-14T01:33: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": "cfcb74bd...
4b45bd2b-eecb-4f6c-b6ee-ddaae03dab4d
cow-coding/School-Project
Computer Science/Datastructure/Day 12/P1_H.cpp
#include <iostream> #include <string> #include <vector> using namespace std; #define MAX 353333 #define NOITEM 0; #define ISITEM 1; #define AVAILABLE 2; class cell { public: int key; int value; int flag; cell() { key = -1; value = -1; flag = NOITEM; } ~cell() ...
ALGO
0.999853
3.864509
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2020-03-17T05:32: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": "39d4c08d...
0f7c0930-f603-4a2f-90b0-a224fe1233bd
JINWOO-0715/Data-structure
롤_백과사전_step_3(이중환형연결리스트)/롤_백과사전_step_3(이중환형연결리스트).cpp
#include<stdio.h> #include<stdlib.h> #include <string.h> #define MAX 20 typedef struct _champion { char name[MAX]; int hp; int mp; int speed; int range; int position; struct _champion* next; struct _champion* prev; } champion; typedef struct _List { champion* head; champion* tail; } List; List *q; voi...
TOOL
0.989488
3.048558
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-10-07T03:33: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": "1d7cb23c46...
5d0cf6b0-2430-4549-9355-1bc6c4f4c72e
shahadat191/Data-Structure
xor_array.cpp
#include<bits/stdc++.h> using namespace std; struct demo{ int zo, on; demo* next[3]; demo(){ zo = 0, on = 0; next[0] = NULL; next[1] = NULL; } } *head = NULL; vector<int> store; vector<int> fstore; void againpass(){ demo* curr = head; for(int i = 0; i<store.size(); i++...
ALGO
0.999938
3.808579
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-11-04T18:30:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76c4676b48...
7d56da38-7f5e-43c7-b0da-b0f43ceae988
div-bargali/DSA-problems
0493-reverse-pairs/0493-reverse-pairs.cpp
class Solution { public: void cntPairBeforeMerge(int l, int mid, int h, int &ans, vector<int> &nums) { int right = mid + 1; for (int i = l; i <= mid; i++) { while (right <= h && (long long) nums[i] > 2LL * nums[right]) right++; ans += (right - (mid + 1)); } } ...
ALGO
0.999983
5.255118
{ "github_metadata": { "branch": "master", "commit_count": 672, "repo_created_at": "2022-01-02T16:16:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f74f0f1b...
969e6080-33f1-48c8-8ed8-aeeea6a7311b
jariasf/Online-Judges-Solutions
UVA/Volume 4 (400-499)/474 - Heads Tails Probability.cpp
/***************************************** ***Problema: Heads / Tails Probability ***ID: 474 ***Juez: UVA ***Tipo: Impresion ***Autor: <NAME> ******************************************/ #include <stdio.h> #include <algorithm> #include <cstring> #include <stdlib.h> #include <cctype> #include <cmath> #include <cst...
ALGO
0.998995
3.30496
{ "github_metadata": { "branch": "master", "commit_count": 698, "repo_created_at": "2013-07-08T16:23:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 33, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "7acc72...
d504d608-64f9-46ab-9062-3fc665c65dfe
sagar1024/mycppjourney
CP/Codeforces/13. Random 1600-1800s/6. Wonderful City(accepted).cpp
// C. Wonderful City // time limit per test2 seconds // memory limit per test256 megabytes // You are the proud leader of a city in Ancient Berland. There are n2 buildings arranged in a grid of n rows and n columns. The height of the building in row i and column j is hi,j. The city is beautiful if no two adjacent by ...
ALGO
0.99991
4.52994
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-08-23T11:34: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": "2c39cac7b8d...
fea3bef2-72c9-4e67-b92a-d3b8e8a65a80
PasserbyZzz/Car
RPLidarDriver/obstacle_avoidance/obstacle_avoidance.ino
#include <RPLidar.h> #include "MecanumDriver.h" // 创建激光雷达对象 RPLidar lidar; // 创建麦克纳姆轮驱动器对象 MecanumDriver mecanum(9, 8, 12, 13, 11, 10, 46, 21); // 用于存储激光雷达数据的数组(0到359度共360个值) float distances[360] = { 0 }; void setup() { Serial.begin(115200); // 开启用于调试的串口 lidar.begin(Serial2); // 将激光雷达连接到串口2(19、20引脚) mecanum....
TOOL
0.990413
4.713414
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-10-19T11:21:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9577fb73605...
d90914b5-fb6b-4f60-8ef9-09d97901fc67
AsePlayer/Computer-Graphics
7 - Putting It All Together/ColorCubeFlyby.cpp
// This program is a flyby around the RGB color cube. One intersting note // is that because the cube is a convex polyhedron and it is the only thing // in the scene, we can render it using backface culling only. i.e., there // is no need for a depth buffer. #ifdef __APPLE_CC__ #include <GLUT/glut.h> #else #include <...
ALGO
0.93256
5.744271
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-11-05T02:54: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": "40fcda11af5...
bae9fb46-6778-44ec-8535-670bd303ffff
lemene/PECAT
src/correct/corrector.cpp
#include "corrector.hpp" namespace fsa { void OverlapGrouper::BuildIndex(size_t thread_size, const std::unordered_set<int>& read_ids) { sorted_.assign(ol_store_.Size()*2, nullptr); for (size_t i = 0; i < ol_store_.Size(); ++i) { auto ol = &ol_store_.Get(i); sorted_[i] = ol; sorted_[...
ALGO
0.991244
4.92233
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-02-06T02:20:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 54, "forks": 2, "issues": 26, "pull_requests": 1 }, "file_meta": { "content_id": "01e8f6af7...
d20523e6-47ba-4056-9ca3-a2a7a9c1e752
sanjiv0286/GFG-Practice-Problems
Easy/Panagram Checking/panagram-checking.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { public: string tolow(string s){ for(auto &x:s){ if(x>='A'&&x<='Z'){ x= x+32; } } ...
ALGO
0.999464
5.181885
{ "github_metadata": { "branch": "main", "commit_count": 291, "repo_created_at": "2023-11-01T08:37: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": "b80dd6dd05...
236044eb-3cb5-4b2a-9532-f299a7c4f84f
Alzayady/Algrothims
CSES/dp/Counting Numbers.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define int long long typedef long long ll; typedef long double ld; using namespace std; using namespace __gnu_pbds; mt19937 rng((unsigned long long) c...
ALGO
0.999097
4.252586
{ "github_metadata": { "branch": "master", "commit_count": 199, "repo_created_at": "2020-08-14T05:51: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": "9b7f18e2...
98bfcd6e-5724-420c-a9cc-5d2b4ce0d4d0
ch0588/leetcode
86. Partition List.cpp
// Time Complexity: O(n) // Space Complexity: O(1) /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* partition(ListNode* head, int x) { ListNode *leftRoot = new Li...
ALGO
0.999999
5.625057
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2014-12-30T08:35:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fcf41a41...
36bcc108-00c1-42e1-988d-35d5b7bf8cf9
kunyavskiy/competitive-programming-archive
ProblemArchives/timus/p1088.cpp
#ifndef LOCAL #pragma comment(linker, "/STACK:33554432") #endif #include <iostream> #include <fstream> #include <vector> #include <set> #include <map> #include <string> #include <cmath> #include <cassert> #include <ctime> #include <algorithm> #include <queue> #include <memory.h> #include <stack> #define mp make_pa...
ALGO
0.999885
3.313165
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2022-10-08T20:56: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": "4e31faec8e5...
8afe0113-00d3-44b7-807f-d843c50911d8
enzoyoshio/maratona
codeforces/1704/c.cpp
#include <bits/stdc++.h> using namespace std; // Template (v1.4.2 - 2023-04-22) (codeforces:cebolinha, atcoder:edu) {{{ #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag,tree_order_sta...
ALGO
0.999983
4.381629
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-10-11T03:50:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "315ded2b715...
14ec4b57-fa2f-4006-9945-58754fd7e74c
Al-mizan/Competitive-Programming
cses/Tree_Diameter.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define endl '\n' #define inf 1e18 #define ff first #define ss second #define pb push_back #define mod 1000000007 #define newline cout <<...
ALGO
0.993316
3.894652
{ "github_metadata": { "branch": "main", "commit_count": 92, "repo_created_at": "2024-08-30T04:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ed788c5214...
141ffcdb-aa8d-4e60-a0c4-973c5dc7394e
anmolaman20/DSA_REVISION
TWO_POINTER/2_Trapping Rain Water.cpp
// https://leetcode.com/problems/trapping-rain-water/description/ /* 42. Trapping Rain Water Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. */ #include <bits/stdc++.h> using namespace std; class Solution { public: int...
ALGO
0.999987
6.683776
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-08-28T05:27: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": "1a9e181e43c5...
f687390c-e8e6-430f-98af-b370c1ecbf95
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/13_12326_50.cpp
#include <iostream> #include <vector> #include <fstream> #include <string> using namespace std; static fstream ofile("A1_result",ios::app); static string status[4] = {"X won","O won","Draw","Game has not completed"}; char compute_score(char** chess,int &empty) { char obj; for(int row= 0; row< 4; row++) //row {...
ALGO
0.999754
3.997096
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00: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": "23f9ad72d...
d4a80095-66a9-4244-95b7-f2ecf1453596
WhiZTiM/coliru
Archive2/23/47df7b24315648/main.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; void t1(int argc, char *argv[]) { const std::string kFlashLimintArgName = "-myparam"; char ** search_begin = argv + 1; char ** search_end = argv + (argc - 1); char** flash_limit = std::find(search_begin, search_end, kFlashLimintAr...
TOOL
0.935461
4.070469
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0aaaf7...
196f2590-a70d-4e3b-a30d-0c44842f81f5
NafiAsib/competitive-programming
atcoder(abc)/172C.cpp
#include <bits/stdc++.h> using namespace std; #define watch(x) cerr <<"\e[91m"<<__func__<<": "<< #x << " = " << x <<"\e[39m"<< "\n" typedef long long ll; int main() { #ifndef ONLINE_JUDGE freopen("../io/in.txt", "r", stdin); //freopen("../io/out.txt", "w", stdout); #endif // ONLINE_JUDGE ll n, m, k; ...
ALGO
0.999974
3.535185
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2020-02-15T07:01: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": "babdea0b...
c8608e4a-40c2-42dd-850f-0a95fc72a067
tangjz/acm-icpc
leetcode/1-1000/932-beautiful-array.cpp
class Solution { public: vector<int> beautifulArray(int n) { vector<int> que = {n}; vector<vector<int> > sol(n + 1); for(int i = 0; i < que.size(); ++i) { int u = que[i]; if(u <= 2) continue; int lft = u >> 1, rht = u - lft; if(...
ALGO
0.999984
5.021561
{ "github_metadata": { "branch": "master", "commit_count": 293, "repo_created_at": "2013-10-06T18:57:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 45, "forks": 13, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "241b7f...
08a1aa4b-6a0d-4cbc-a322-39501cea792b
futureCoder/algorithms
LintCode/二叉树的序列化和反序列化.cpp
/** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * this->left = this->right = NULL; * } * } */ class Solution { public: /** * This method will be invoked first, you should design y...
ALGO
0.99964
4.922617
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2016-05-04T13:27: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": "29c0e8c7...
e8e316cd-10c2-41be-83ea-c50f6ef51054
fishac/GameHive
ChessEngine-exe/drivers/src/WeightEvaluationEngine.cpp
#include "WeightEvaluationEngine.h" WeightEvaluationEngine::WeightEvaluationEngine() { internalState = new BoardState(); } WeightEvaluationEngine::~WeightEvaluationEngine() { delete internalState; } void WeightEvaluationEngine::setBaseWeights(std::array<int,7> baseWeights_) { baseWeights = baseWeights_; } void W...
ALGO
0.997784
6.291799
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2024-03-07T03:42: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": "a933f429c...
2adeecf4-4a1d-4e71-8ab3-666031f2adc9
Lazar-Ilic/Lazar
Notes/Computer Science/Algorithms/University Of Texas At Austin Programming Contest/UTPC 2023-03-24 I.cpp
#include <bits/stdc++.h> using namespace std; using B=bool; using C=char; using D=double; using I=int; using L=long long; using LD=long double; using S=string; using U=uint64_t; using PB=pair<B,B>; using PC=pair<C,C>; using PD=pair<D,D>; using P=pair<I,I>; using PL=pair<L,L>; using PLD=pair<LD,LD>; using PS=pair<S,S>; ...
ALGO
0.999529
3.563783
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-03-09T15:18:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc338025e8b...
d854efa4-3977-408a-bd2e-6c6c6e639e38
Pithers/Class-Work
CSCI211/211/p5/old4/sim.cpp
#include "pqueue.h" #include "cust.h" #include <string> #include <iostream> #include <fstream> #include <cstdlib> using namespace std; void run_simulation(Pqueue&, int, int, ostream&); struct Checker { Cust* current_customer = NULL; int money = 100; int break_left = 0; int time_finished = 0; }; int main(int ...
TOOL
0.933691
3.585081
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2016-03-13T22:43: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": "674ca6393...
f347a34c-e3b6-4a70-a907-d3387a60c5f6
RamazanFIT/algorithms
part1/greedy_part2/t2.cpp
#include <bits/stdc++.h> #define ENDL "\n" #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define endd return 0; #define int ll #define goodluck ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL); using ll = long long; using namespace std; signed main(){ goodluck // f...
ALGO
0.999488
3.962413
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-12-29T18:05: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": "866e4b3273f...
57b91ab3-0efa-4a8a-ad77-453495bc784b
KailasMahavarkar/interview-prep
leetcode/find_unique_binary_string_leetcode_1980.cpp
#include <algorithm> #include <climits> #include <cmath> #include <iostream> #include <string> #include <vector> #pragma GCC optimize("O3,unroll-loops") using namespace std; /* Problem Link : https://leetcode.com/problems/find-unique-binary-string Company Tags : google, meta, amazon references : ...
ALGO
0.999931
6.010791
{ "github_metadata": { "branch": "master", "commit_count": 219, "repo_created_at": "2023-02-21T13:25: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": "e9f8e279...
78fc3623-9f7c-4e78-8227-32e731cd92e2
emost22/cpp-boj
bfs/7576_2.cpp
#include <iostream> #include <queue> using namespace std; queue<pair<int, int> > now, nextq; int map[1000][1000], visit[1000][1000]; int x_direct[] = { 0,1,0,-1 }, y_direct[] = { 1,0,-1,0 }; int N, M, cnt, ans; void bfs() { while (!now.empty()) { int x = now.front().first; int y = now.front().second; now.pop()...
ALGO
0.999986
3.915977
{ "github_metadata": { "branch": "main", "commit_count": 3886, "repo_created_at": "2020-10-21T12:31:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b0c69303...
19619102-1040-40eb-bca4-574759327243
Jibtea/CEDT_COMPROG
08/08_Map_23/01.cpp
#include <bits/stdc++.h> using namespace std; int main() { map<string, int> mmap; string s, ss, ct, num; int n, n_sum, count = 0; vector<pair<int, string>> v; while (cin >> s) { cin >> ss >> ct >> num; num += " "; ss = ""; for (int i = 0; i < num.length(); i++) { s = num[i]; if (...
ALGO
0.990384
3.788335
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-12-12T10:45: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": "df12d629294...
d297aedf-7ed9-4b6d-8112-fdd8adfb8457
marinaKollmitz/lattice_planner
include/lattice_planner/state_discretizer.h
/******************************************************************************* * * Software License Agreement (BSD License) * * Copyright (c) 2015 <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following co...
ALGO
0.992809
7.176369
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2015-06-30T15:11:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 232, "forks": 86, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87ac53...
5d909f56-2080-4e60-93c9-0570edc77a6b
ishandutta2007/codeforces-i
i_love_tigersugar/normal/542/E.cpp
#include<bits/stdc++.h> #define MAX 1010 #define FOR(i,a,b) for (int i=(a),_b=(b);i<=_b;i=i+1) #define REP(i,n) for (int i=0,_n=(n);i<_n;i=i+1) #define FORE(i,v) for (__typeof((v).begin()) i=(v).begin();i!=(v).end();i++) using namespace std; vector<int> adj[MAX]; int n,m,nComp; int dist[MAX],compID[MAX],maxDist[MAX];...
ALGO
0.999874
3.655913
{ "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": "5d345fbeabe0...
9c3c3691-2c5f-41a5-9078-8ecd77e1fea1
cdsk8/ETSIcode
FP/Tema2/15.cpp
#include <iostream> #include <cstdlib> using namespace std; int main(){ double a, b, c, d, e, f, x, y; cout << "Introduzca el valor de a: "; cin >> a; cout << "Introduzca el valor de b: "; cin >> b; cout << "Introduzca el valor de c: "; cin >> c; cout << "Introduzca el valor de d: "; cin >> d; cout << "Int...
ALGO
0.999117
3.24498
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2019-04-23T01:44:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e690c00b...
f5b8a37a-8ed7-42ee-8f19-1ff77cbe7f48
abdullaabdullazade/rio-semifinal-submissions-2025
Sayad_Salmanov_Anar oğlu_9.0_16_100BAL_RIO2025_Semifinal_J4.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Merge sort əsasında inversiya sayını hesablayan funksiya long long mergeCount(vector<long long>& arr, int l, int r, vector<long long>& temp) { if(r - l <= 1) return 0; int m = (l + r) / 2; long long inv = mergeCount(arr, l,...
ALGO
0.999989
5.429178
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-24T15:39:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e625f09e6969...
9017ee46-ffeb-4b1f-b32e-5e4e294a2e98
fonstelien/FYS4150
project3/source/planet.cpp
#include "utils.hpp" using namespace arma; using namespace std; /* Constructor */ /* Mass mass relative to sun; initial position and velocity vecs */ Planet::Planet(double mass, vec init_pos, vec init_vel) { m = mass; pos = init_pos; vel = init_vel; acc0 = {0.,0.,0.}; acc = {0.,0.,0.}; } /* Updates plan...
ALGO
0.989888
5.792456
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2020-08-19T18: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": "5f46af0f...
513dfd98-8530-420e-bc48-e03fe2c5b45e
3ein39/LeetCode_Solutions
0576-out-of-boundary-paths/0576-out-of-boundary-paths.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define lp(n) for(ll i = 0; i < (n); ++i) #define lp1(n) for(ll i = 1; i <= (n); ++i) #define tc ll testcase; cin>>testcase; while(testcase--) #define all(v) (v).begin(), (v).end() #define allr(v) (v).rbegin(), ...
ALGO
0.999895
4.387716
{ "github_metadata": { "branch": "main", "commit_count": 892, "repo_created_at": "2022-12-05T19:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c3982ae04...
c054d93d-743c-4d8a-82c6-4c8a284fd866
PhamPhuQuang06/TH_OOP_CPP
Bai02.cpp
//MSSV: 24521478 //Ho ten: <NAME> //Ngay sinh: 06/04/2006 //Lop: IT002.P26.1 #include <bits/stdc++.h> using namespace std; struct Phanso { int tu, mau; void nhap() { cout <<"Nhap phan tu cua phan so: "; cin >> tu; cout <<"Nhap phan mau cua phan so: "; cin >> mau; } ...
ALGO
0.996523
4.457839
{ "github_metadata": { "branch": "Tuan01", "commit_count": 6, "repo_created_at": "2025-03-27T15:40: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": "f632d9fb34...
52b124bf-3c48-4432-aaa0-8eb989dd9024
Alberto-SC/Competitive-Programming-solutions
SPOJ/ADAAPHID.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lli; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); uniform_int_distribution<> dis(numeric_limits<int>::min(), numeric_limits<int>::max()); #define endl '\n'; #define __ ios_base::sync_with_stdio(false),cin.tie(NULL); struct Treap...
ALGO
0.999967
3.997327
{ "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": "de9454f46e08...
b1a083ed-4b94-4bcf-9468-d961e041dbd4
96glory/Algorithm
acmicpc/04963.cpp
#include <iostream> using namespace std; int N, M, answer; bool arr[52][52]; bool v[52][52]; void dfs(int a, int b){ v[a][b] = true; if(arr[a - 1][b] && !v[a - 1][b]) dfs(a - 1, b); if(arr[a + 1][b] && !v[a + 1][b]) dfs(a + 1, b); if(arr[a][b - 1] && !v[a][b - 1]) dfs(a, b - 1); if(arr[a][b + 1] && !v[a][b + 1])...
ALGO
0.999912
4.047455
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2020-02-05T09:03: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": "5cf811827...
6d1f82f4-b4bf-41c0-b0c1-4356eeebe898
Zoeyy1007/Task-Scheduler
EventSearch.cpp
#include "EventSearch.h" #include "EventManager.h" #include "Task.h" #include <vector> #include <string> #include <algorithm> #include <iostream> using namespace std; // Helper function to convert a string to lowercase for case-insensitive comparison string EventSearch::toLowerCase(const string& str) { string low...
TOOL
0.948881
5.840127
{ "github_metadata": { "branch": "Zoeyy1007/debug", "commit_count": 189, "repo_created_at": "2025-03-24T03:51: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": ...
2e43eb4b-b074-4ae6-b9d6-7f2f11b55ffb
dipesh-m/Data-Structures-and-Algorithms
GFG Submissions/Tree/maximum path sum between two leaf nodes.cpp
#include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = right = NULL; } }; // Function to Build Tree Node *buildTree(string str) { // Corner Case if (str.length() == 0 || str[0] == 'N')...
ALGO
0.999566
6.200545
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2020-07-01T14:15:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bac0c8182...
d9e7b288-bb17-4d85-a48b-64bc47c1834f
GalAshkenazi20/Ex1.CPP
Graph.hpp
#ifndef _GRAPH_HPP_ #define _GRAPH_HPP_ #include <iostream> #include "DataStructures.hpp" namespace graph{ struct Node{ int vertex; int weight; Node* next; Node(int v, int w): vertex(v), weight(w), next(nullptr){} // constructor }; class Graph{ private: int n; /...
ALGO
0.927126
4.080773
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2025-03-24T15:11:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc94c1237f6...
09220c00-577e-44b4-b91b-d0848c779ee8
tomonir/practice_cplus
matrix.h
class Matrix { public: void testDotProduct() { int m1,n1, m2,n2; m1= 2; n1 =3; m2= 3; n2 = 2; int** a= new int*[m1]; int** b= new int*[m2]; double** result = new double*[m1]; for (int i=0;i<m1;i++) a[i]= new int[n1]; for (int i=0;i<m2;i++) b[i]= new int[n2]; for (int i=0;i<m1;i++) ...
TEST
0.939879
4.287222
{ "github_metadata": { "branch": "practice_cplus", "commit_count": 9, "repo_created_at": "2020-11-25T09:09: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": "d3...
4dc52a67-3ada-4f43-8473-35f6f713060a
fruxc/DataStructure
Sorting/Quick_Sort_02.cpp
#include<iostream> #define max 25 using namespace std; class QuickSort { int n, A[max], lower, upper, temp, l, u, i; public: QuickSort() { n = 0; temp = 0; l = 0; u = 0; i = 0; } int getdata() { cout<<"Enter the size of the Array"<<endl; cin>>n; A[n]; cout<<"Enter the values ...
ALGO
0.999922
4.671599
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-11-06T17:56: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": "6ad8c74bc9...
99090885-60a3-4196-9735-f82057784bdb
atultechd/everything_cpp
dsa_topic_wise_questions/searching_and_sorting.cpp/magnetic_force_bw_two_balls.cpp
class Solution { public: bool is_possible(vector<int>&position, int m, int mid){ int balls_count = 1; int last_pos = position[0]; for(int i=0; i<position.size(); i++){ if(position[i]-last_pos >= mid){ balls_count ++; if(balls_count == m) re...
ALGO
0.999997
5.456528
{ "github_metadata": { "branch": "main", "commit_count": 199, "repo_created_at": "2022-07-01T14:36: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": "4e024dc886...
02014498-26ca-4ac5-88dc-4b209a9c46c7
Hadopire/adventofcode_2021
d10.cpp
#include <iostream> #include <vector> #include <algorithm> #include "utils.h" int main() { size_t bufSize; const char *buf = mapFile("d10.txt", bufSize); char charmap[128]; charmap[')'] = '('; charmap['('] = ')'; charmap['['] = ']'; charmap[']'] = '['; charmap['{'] = '}'; char...
ALGO
0.999579
3.99532
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2021-12-01T23:14:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97600cd03...
597f390d-fc43-4849-85c2-a10a6178251e
ishandutta2007/codeforces-r
rubikun/normal/1372/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; } #define all(x) (x).begin(),(x).end() #define fi first #define ...
ALGO
0.999891
4.138124
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58: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": "7a7837639b43...
175ac418-a482-4d28-960a-8bfe03ebf95a
kingpassi/DSA
Find First and Last Position of Element in Sorted Array(BinarySearch).cpp
/****************************************************************************** 34. Find First and Last Position of Element in Sorted Array Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1...
ALGO
0.999974
6.2125
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2022-02-01T18:16: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": "2923b1a66e7...
877d4c6c-e9b8-4c92-bba0-e1b7d8f06e58
xjonwang/competitive-programming
usaco-guide/gold/shortest-paths-with-unweighted-edges/IOI-2000-walls/main.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ar array #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_...
ALGO
0.999992
4.160751
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2023-06-12T02:40: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": "253598da3...
c201e591-a36c-434d-b61e-5a6f810cf44e
MariaLuizaCA/PAA---Projeto-e-Analise-de-Algoritmo
UNIDADE 1/mariaandrade_202300027525_quicksort copy.cpp
#include <iostream> // Para std::cout, std::cerr #include <fstream> // Para std::ifstream #include <sstream> // Para std::istringstream #include <string> #include <cmath> #include <stdint.h> using namespace std; int cont = 0; //Lista da velocidade dos vetores e futura organização struct Quick{ string tipo; ...
ALGO
0.999871
4.307309
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2025-01-22T04:54:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1f96c795ec...