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
d6682b6d-643d-47f6-a6d4-e103e6d3af56
jose03pedro/PROG
P01/pernicious.cpp
#include <iostream> using namespace std; bool isPrime(int x) { if (x < 2) return false; if (x == 2) return true; for (int i = 2; i < x; i++) { if (x % i == 0) { return false; } } return true; } int main() { int a, b; cin >> a >> b; for (int i = a; i <= b; i...
ALGO
0.999812
4.472858
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-02-07T22:48: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": "ce50425087b...
a497e64a-cc67-4276-900c-4e94ca2473e1
Farseensattique/Learning-Data-Structure-H
July29.cpp
#include<iostream> using namespace std; struct Employee { string name; int salary; Employee *next, *prev; }; class EmployeeDetails { public: Employee *first = NULL, *last = NULL; Employee *current, *newEmployee; void employee(string name, int salary) { newEmployee = new Employee; ...
TOOL
0.984766
4.350468
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2023-06-14T09:57: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": "c16643e859e...
f995d0da-9058-4257-88c7-ecc6be11090a
HiromasaNojima/AtCoder_Practice
typical_dp/a.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int n; cin >> n; vector<int> v(n); long long sum = 0; for (int i = 0; i < n ; i++) { cin >> v[i]; sum += v[i]; } vector<vector<bool>> dp(n + 1, vector<bool>(sum + 1, false)); dp[0][...
ALGO
0.999954
3.730014
{ "github_metadata": { "branch": "master", "commit_count": 165, "repo_created_at": "2021-01-10T02:59: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": "5c95128d...
69de5511-3f1e-4485-9b70-4de259f15d65
joker-yt/c-
paiza/C_015_01.cpp
#include <algorithm> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <random> #include <string> #include <vector> using namespace std; int main(int argc, char const *argv[]) { string s; // ifstream ifs{"data.txt"}; // std::getline(ifs, s); std::getline...
ALGO
0.999115
4.311645
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2017-07-03T23:34: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": "1db0cda9b...
e343673f-5a0b-41d1-b6a0-b0040745071b
juvenigi/alma
src/old/mandelscript.cpp
/* really fast and optimized calculation of a mandelbrot set. */ // original code by <NAME> <<EMAIL>> // code optimization inspired by brucedawson // https://randomascii.wordpress.com/2011/08/13/faster-fractals-through-algebra/ [visited at 19.11.2019] // UNI BONN REPRESENT! #include <omp.h> #include <memory> #includ...
ALGO
0.999807
5.576598
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2019-10-15T15:48: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": "4d44e863d...
b46fdd97-2c4b-4dcf-a770-e951802d00bf
steve-cw-chung/codewars_CPP
12.Invert_BinaryTree.cpp
#include <iostream> // Data structure to store a Binary Tree node struct Node{ int data; Node *left, *right; Node(int data){ this->data = data; this->left = this->right = nullptr; } }; //Function to perform preorder traversal of the binary void preorder(Node* root){ if (root == n...
ALGO
0.999997
5.894063
{ "github_metadata": { "branch": "master", "commit_count": 138, "repo_created_at": "2020-07-03T03:37:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c054494...
31ccc564-6390-43d7-9df5-76e43ece73a1
haeun-i/algorithm
SWEA/d2-1959.cpp
#include<iostream> #include <bits/stdc++.h> using namespace std; int main(int argc, char** argv) { int test_case; int T; cin >> T; for (test_case = 1; test_case <= T; ++test_case) { int n, m; cin >> n >> m; vector<int> v1; vector<int> v2; int num; for (int i = 0; i < n; i++) { cin >> num; v1.pu...
ALGO
0.999888
3.818476
{ "github_metadata": { "branch": "main", "commit_count": 168, "repo_created_at": "2021-07-20T13:24: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": "5fa5654433...
c65d1cec-f8dc-4b10-9371-3b717fb5264a
raztor/Tel_102_CPP
Clase/C4/2022/TEL102_C4_Benjamin_Munoz.cpp
#include "fighter.h" // implementar constructores de clases acá fighter::fighter(float hp, float attk) { this->hp = hp; this->attk = attk; } street::street(float hp, float attk) : fighter(hp, attk) { this->style = 0; } marvelo::marvelo(float hp, float attk) : fighter(hp, attk) { this->style = 1; } v...
TOOL
0.928079
3.608019
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2022-08-23T20:53: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": "b055254fc...
c67a3d11-5266-479f-9f01-424051b3f19a
alexandraback/datacollection
solutions_5686313294495744_1/C++/yangff/C.cpp
#include <cstdio> #include <string> #include <map> #include <vector> #include <cstring> using namespace std; int n, m; char buf1[22], buf2[22]; vector<int> G[5555]; int matching[5555]; int check[5555]; bool dfs(int u) { for (vector<int>::iterator i = G[u].begin(); i != G[u].end(); i++) { int v = *i; if (!chec...
ALGO
0.999929
3.883382
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ed95663e...
6a6d0808-464c-4ff3-af12-c269d5e54a0c
enwask/cp
solutions/misc/cses/graphs/road_construction.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define vec vector #define all(x) begin(x), end(x) typedef long long ll; struct dsu { vector<int> par, siz; int comp, maxc; dsu(int n) : par(n, 1), siz(n, 1), comp(n), maxc(1) { iota(par.begin(), par.en...
ALGO
0.999979
4.145318
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2023-07-21T01:51: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": "0aa09eec98...
e2ffed9f-f281-4e8f-b4aa-1d2f2e777388
SZmiycharov/numbers-intersection-sda5
numbers-intersection-SDA5/numbers-intersection-SDA5.cpp
/** * * Solution to homework task * Data Structures Course * Faculty of Mathematics and Informatics of Sofia University * Winter semester 2016/2017 * * @author <NAME> * @idnumber 61883 * @task 5 * @compiler VC * */ #include "HelperFunctions.h" using namespace std; int main(int argc, char* argv[]) { validateCmdParam...
ALGO
0.991669
4.368995
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-02-24T19:15: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": "1c22eeb2a...
a12a70d8-97bd-41e2-a02e-518cb96936e8
Om-Doiphode/AI-Algorithms
1_Vacuum_Cleaner/main.cpp
#include <bits/stdc++.h> using namespace std; class Environment { int N, M; int dirtyCells; vector<vector<int>> floor; public: void generateEnvironment(int n, int m) { this->N = n; this->M = m; floor.resize(this->N, vector<int>(this->M, 0)); generateDirtForEnvironmen...
ALGO
0.999514
5.675048
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-10-25T03:00: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": "d0c2c7e8c415...
bd087e6f-8856-48e8-95b1-908297d8a584
kien-vu-uet/Practise
heap_tree.cpp
#include <bits/stdc++.h> using namespace std; class HeapTree { public: vector<int> MHT = { -1 }; int size = 0; void add(int value) { MHT.push_back(value); size++; shift_up(size); } void shift_up(int pos) { if (pos < 1 || pos > size || pos >> 1 < 1) return; ...
ALGO
0.999584
5.051432
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-11-21T15:02: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": "66cf563399...
7ebf33b4-4b64-438c-bc0c-6d47e7d519fb
tsinghua-15418/assignment1
prog5_saxpy/main.cpp
#include <stdio.h> #include <algorithm> #include "CycleTimer.h" #ifdef min #undef min #endif #ifdef max #undef max #endif extern void saxpySerial(int N, float a, float* X, float* Y, float* result); #ifdef USE_ISPC_OBJ extern "C" { void saxpy_ispc(int N, float a, float* X, float* Y, float* result); void saxpy_ispc...
ALGO
0.997121
4.945024
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-06-19T03:55:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "426b45f27...
db237516-3cf9-4368-a4bc-34950abd26e3
sayantikag98/Current_Data_Structures_and_Algorithms
DSA_codes_in_cpp/Interview_Prep/Course_01_Basic_concepts_of_programming/Lec4_Time_Complexity/palindromic_substring.cpp
#include<bits/stdc++.h> using namespace std; // int coun = 0; int func(string &s){ int count = 0; int n = s.size(); // odd length for(int axis = 0; axis < n; axis++){ for(int orbit = 0; (axis - orbit)>=0 and (axis + orbit)<n; orbit++){ if(s[axis-orbit] != s[axis+orbit]){ break; } else { count+...
ALGO
0.999862
4.24382
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-07-15T12:20: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": "ae343bbb1...
6f3961f1-9c4b-4acc-a70c-76d887a15e88
ferconde87/HackerRank
Data Structures/Arrays/sparseArrays.cpp
#include <bits/stdc++.h> using namespace std; // Complete the matchingStrings function below. vector<int> matchingStrings(vector<string> strings, vector<string> queries) { unordered_map<string, int> map; vector<int> result; for(auto str : strings){ auto it = map.find(str); if(it != map.end...
ALGO
0.999684
4.722883
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2017-07-30T03:00:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4ff64bde...
7fd4c733-0ee1-4758-9894-a52e708d84f1
zhuhaochuan/Leetcode
balanced-binary-tree.cpp
/** *Given a binary tree, determine if it is height-balanced. *For this problem, a height-balanced binary tree is defined as a *binary tree in which the depth of the two subtrees of every node never differ by more than 1. * * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; ...
ALGO
0.999976
5.374726
{ "github_metadata": { "branch": "master", "commit_count": 307, "repo_created_at": "2017-11-19T13:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e3ec470...
4597078a-4c06-4c0f-bffb-48768d8e4d34
hoangviet2/StudyCPlusPlus
array/2.cpp
#include<iostream> #include<conio.h> using namespace std; void tgPascal(int size); int main() { int size; cout << "Nhap kich co cua tam giac Pascal:"; cin >> size; tgPascal(size); return 0; } void tgPascal(int size) { int PascalTr[5][5]; int hang, cot; //gan gia tri 0 cho moi phan tu mang for (hang = 0;...
ALGO
0.999294
3.607938
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-12-31T08:37: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": "02b5369836...
2bdcc827-df4b-4819-a92d-33f460bdf295
kumastry/atcoder
arc/051/051.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <numeric> #include <cmath> #include <iomanip> #include <cstdio> #include <set> #include <map> #include <list> #include <cstdlib> #include <queue> #include <stack> #include <bitset> using namespace std; #define MOD 1000000007 #define...
ALGO
0.999815
3.343557
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2020-12-30T14: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": "74cfcb05660...
ff9ab04c-ca61-4547-8930-7d65d2038923
minmaxmean/Codeforces
contest/478/c.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef map <int, int> mii; typedef pair <int, int> pii; typedef pair <ll, ll> pll; int const maxn = int(1e5 + 12); int const maxb = int(2e6 + 12); int const inf = int(1e9 + 7); ll const linf = ll(1e18 + 12); double ...
ALGO
0.999277
3.391925
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2015-06-28T18:20: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": "1f8912b96...
2adc2008-617d-4f95-bf81-b9d950e829ea
arafat-hasan/problem-solving
UVa/12019-Dooms_Day_Algorithm.cpp
/* * FILE: Dooms_Day_Algorithm-12019.cpp * * @author: <NAME> <arafathasanjenin[at]gmail[dot]com> * * LINK: * * DATE CREATED: 15-07-17 17:28:40 (BST) * LAST MODIFIED: 15-07-17 22:45:06 (BST) * * DESCRIPTION: * * DEVELOPMENT HISTORY: * Date Version Description * ---------------------------------...
ALGO
0.999996
4.077662
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2017-10-16T19:27:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6c35908...
62c3c33e-d30b-4137-af99-eea306aca5e6
NafizEkbal/Codeforces-Solutions
1904_A_Forked.cpp
#include <bits/stdc++.h> using namespace std; long long check(long long Mx,long long My,long long a,long long b,long long Tx,long long Ty){ long long sum=0; if(Mx+a==Tx){ if(My+b==Ty || My-b==Ty){ sum++; } } else if(Mx-a==Tx){ if(My+b...
ALGO
0.999817
5.248361
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2025-02-14T17:56:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3aad70e9d10...
18fffb9c-3fd8-435f-b58d-a1542fbb2559
ningboliuwei/DataStructures
Chapter6_ArrayAndGenerailzeList/OJ/7-2.cpp
// // Created by <NAME> on 2018/10/11. // 问题 B: 【数据结构6-2】稀疏矩阵三元组顺序表非零元素求列和 #include<stdio.h> #include<iostream> using namespace std; #define SMAX 100 typedef struct { int i, j, v; } SPNode; //三元组 typedef struct { int rows, cols, terms; //行数,列数,非0元个数 SPNode data[SMAX]; } sparmatrix; //三元组顺序表 i...
ALGO
0.999632
3.576705
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2018-09-15T07:45: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": "052fe42d...
9dc9caa9-10a5-442d-9fb4-1f804f984df1
cdh981009/Algorithm
codeforces/edu124/C.cpp
#include <bits/stdc++.h> using namespace std; #define INF 1e9 #define fi first #define se second #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FOR_(i, a, b) for (int i = (a); i <= (b); ++i) using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vl = vector<ll>; using vpii = ve...
ALGO
0.999988
4.152727
{ "github_metadata": { "branch": "master", "commit_count": 850, "repo_created_at": "2020-02-16T08:17:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "350fdfef...
6c7118e8-11e2-4af0-bfda-0f5d3965e36e
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1245/Standings4/29605934_64008936.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h> #include <algorithm> #include <set> #include <vector> using namespace std; char s[1111111]; int64_t md = 1000000007; int64_t ss[1111111] = { 1, 2, 3 }; int main() { int n; scanf("%s", s); n = strlen(s); int64_t ans = 1; for (...
ALGO
0.999941
3.622189
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40: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": "854fbcbc0...
d660e3a4-7b4d-4607-8a80-6fbe5e8d1de7
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/10/1008/personal_submission/cf1482d_metal_frog.cpp
void solve() { int n; cin >> n; vector<int> num(n), prev(n), next(n), deleted(n); for (int i = 0; i < n; i++) { cin >> num[i]; prev[i] = (i == 0) ? (n - 1) : (i - 1); next[i] = (i + 1) % n; } queue<int> check; for (int i = 0; i < n; i++) check.push(i); vector<int> ans; while (!check.em...
ALGO
0.99996
3.665171
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "84d3...
b525cbac-5cce-4568-959d-9cf19b037ba9
rdkit/shape-it
src/solutionInfo.cpp
/******************************************************************************* solutionInfo.cpp - Shape-it Copyright 2012-2021 by Silicos-it, a division of Imacosi BVBA, <NAME>, and the Shape-it contributors This file is part of Shape-it. Permission is hereby granted, free of charge, to any person obtaining a copy...
TOOL
0.96432
4.721119
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2021-01-15T05:40:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 42, "forks": 12, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "3b8c917de8...
2f5ba84d-fef4-4e64-9f3e-84387947e8f2
Hamza-28/CP_Templates
code/Geometry/Half Plane Intersection.cpp
/** * Description: Calculates the intersection of halfplanes, assuming every half-plane allows the region to the left of its line. */ struct Halfplane { PT p, pq; ld angle; Halfplane() {} // Two points on line Halfplane(const PT& a, const PT& b) : p(a), pq(b - a) { angle = atan2l(pq.y, pq.x); } ...
ALGO
0.999966
5.407225
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2025-01-27T14:32:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35116aeda94...
a730050d-6654-44fd-a7a8-af415456d06e
facebook/react-native
packages/react-native/ReactCommon/react/renderer/debug/DebugStringConvertible.h
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <climits> #include <memory> #include <optional> #include <string> #include <unordered_set> #include <vecto...
TOOL
0.963472
4.686955
{ "github_metadata": { "branch": "main", "commit_count": 37707, "repo_created_at": "2015-01-09T18:10:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 123068, "forks": 24762, "issues": 639, "pull_requests": 401 }, "file_meta": { "content_id...
c6b956b2-69d7-450c-bc68-6bfffe53b2bc
wojciaas/PJC
cw7/kartkowka/kartkowkaPrzykladowa.cpp
#include "fmt/ranges.h" #include <vector> #include <algorithm> struct Bot{ std::string name; int birthYear; int level; Bot(std::string name, int birthYear, int level) : name(name), birthYear(birthYear), level(level){ } Bot(Bot const &otherBot) : name(otherBot.name), b...
TOOL
0.959213
4.081364
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-08T17:22: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": "7484635fdb4f...
f388513f-c425-450c-b384-4a6c21df056f
Randowlh/Project_ACM
code/competition/cf_round615/4.cpp
#include<bits/stdc++.h> using namespace std; const int inf =0x7FFFFFFF; typedef long long ll; struct node{ int fr; int now; bool operator<(node a){ return fr<a.fr; } }; map<int,int> s; int x; int mix; void fenpei(int tmp){ if((tmp-x)>=0&&(s.count(tmp-x)==0)){ s[tmp-x]=tmp; ...
ALGO
0.999954
3.732721
{ "github_metadata": { "branch": "master", "commit_count": 516, "repo_created_at": "2017-07-20T06:34:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa6542f6...
91100339-2046-41c3-9a63-d14543c04a67
schmiddim/arduino
_7segment/_7segment.ino
/* Example for Charliplexing library <NAME> <<EMAIL>> http://arduinobuch.wordpress.com/ History: 30/Dez/09 - V0.0 wrote the first version at 26C3/Berlin */ #include "Charliplexing.h" struct point { uint8_t xp; // Point Position in X direction (multplied by 16) uint8_t x_speed; /...
TOOL
0.916835
4.374856
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2014-06-28T17:37:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c52c7de5...
4756e206-3bf6-463f-b0e6-0b39a57f21de
ishandutta2007/codeforces-p
pacu/normal/115/C.cpp
#include <cstdio> using namespace std; char A[1000000]; int x[1000000]; int y[1000000]; int N,M; int main() { scanf("%d %d",&N,&M); for(int i=0;i<N;i++) scanf("%s",&A[M*i]); int ways = 1; for(int i=0;i<N*M;i++) { if(A[i]=='1'){x[i]=1;y[i]=1;} else if(A[i]=='2'){x[i]=1;y[i]=0;} else if(A[i]=='3'){x[i]=0;y...
ALGO
0.999956
3.352434
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49: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": "c98480d4ecfd...
5e6dd399-7525-4372-a54e-d237af1a59e6
GoldenStain/Algorithm
leetcode 228. 汇总区间.cpp
class Solution { public: vector<string> summaryRanges(vector<int>& nums) { if (nums.size() == 0) return vector<string>(); std::string res = ""; vector<string> ans; int st = nums[0]; for(int i = 1; i < nums.size(); i++) { ...
ALGO
0.999962
6.356071
{ "github_metadata": { "branch": "main", "commit_count": 455, "repo_created_at": "2023-06-04T09:00:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "518104c307...
1032bfa6-30e6-4e73-b6ca-b1ef59dc71e5
ishandutta2007/codeforces-s
samjia2000/normal/1083/C.cpp
#include<bits/stdc++.h> #define fo(i,a,b) for(int i=a;i<=b;i++) #define fd(i,a,b) for(int i=a;i>=b;i--) using namespace std; typedef long long LL; typedef double db; int get(){ char ch; while(ch=getchar(),(ch<'0'||ch>'9')&&ch!='-'); if (ch=='-'){ int s=0; while(ch=getchar(),ch>='0'&&ch<='9')s=s*10+ch-'0'; ...
ALGO
0.999933
4.130965
{ "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": "731baec87439...
4e1913f1-2846-4618-9219-8a1ef9760225
abhishek07gupta/DSA
Binary_S_trees/1382_balance_bst.cpp
#include<vector> #include<iostream> using namespace std; 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(...
ALGO
0.999993
6.081467
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2024-03-23T12:40: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": "745581a62d6...
fc6a197c-5c1e-41ac-b112-48c70e838875
zetian/ltl_sampling
src/tests/test_multi.cpp
#include <stdio.h> #include <stdlib.h> #include <vector> #include <iostream> #include <algorithm> #include <bitset> #include <iomanip> #include <ctime> #include <cmath> #include <random> #include "trajectory/dubins_steer.h" #include "trans_sys/spot_hoa_interpreter.h" #include "multi_sampling/multi_sampling_simple.h" #...
ALGO
0.999263
5.032871
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2017-08-30T21:38:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "fe2c62ae...
4d6f8d11-5a1a-46d0-a67d-79c7e3ea78c8
hamdiademi/OOP
Labs/Lab_3/task_1.cpp
// Created by Hamdi on 3/28/2023. #include <iostream> #include <cstring> using namespace std; class MobilePhone{ private: char model[20]; int modelnum; int year; public: MobilePhone(){ model[0]='\0'; modelnum=0; year=0; } MobilePhone(const char*model,int modelnum,int y...
TOOL
0.910566
4.993834
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-06-29T20:55: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": "878fbae2a72d...
39da8dda-4a70-48fe-8284-4faf6b625ea8
samarthk18/DSA
BST_deletion.cpp
#include <iostream> using namespace std; class Node { public: int data; Node*left; Node*right; Node(int n) { data=n; } }; class BST { public: Node*root; Node*create_root(int n) { root=new Node(n); root->data=n; root->left=NULL; ...
ALGO
0.999912
4.492221
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-05-12T00:03:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e10b0f3bd42...
539f085a-dbad-43d5-97c0-7efe50618a11
DanaSMor/binaryTree
Tree.cpp
#include <iostream> #include "Tree.hpp" using namespace ariel; Tree& Tree::insert(int i) { //checks if the tree caontains i if(contains(i)) throw std::runtime_error("duplicate numbers"); if(this->r==NULL) { this->r=new Node(i); t...
ALGO
0.98701
3.339337
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-03-24T17:56:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77304111d3...
a3f76d33-4f4c-4c73-ac7d-88d631064ce2
Jerry-Terrasse/Programming
比赛/校内/真题/NOIP2017(360)/treasure.cpp
#include<cstdio> #include<vector> #include "memory.h" #define MAXN 16 #define MAXM 1010 using namespace std; struct edge { int u,v,w; }e[MAXM<<1]; int dep[MAXN],vis[MAXN],n=0,m=0,ans=0x7fffffff,cnt=0; inline void init(); inline void prim(); inline void read(int&); void write(const int&); inline void addedge(const int...
ALGO
0.999968
3.441145
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-12-19T05:32:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "234f3ac44d...
4a36beec-f6b7-47a9-a9e3-b14d2b35c91c
AMlhdSan/code
Luogu_T_510354.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int INF = 1e12; vector<vector<int> > tree; vector<long long> a; // 水杯温度 bool dfs(int node) { long long sum = a[node]; for (int child : tree[node]) { if (!dfs(child)) { return false; } s...
ALGO
0.999752
4.333553
{ "github_metadata": { "branch": "master", "commit_count": 376, "repo_created_at": "2024-09-11T14:06: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": "0a65bb27...
18d89f1c-213a-4d7a-b61a-4fa4d9c1aa34
gky360/contests
atcoder/code-festival-2018-quala/d/Main.cpp
/* [code-festival-2018-quala] D - 通勤 */ #include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typede...
ALGO
0.999958
5.097394
{ "github_metadata": { "branch": "master", "commit_count": 1196, "repo_created_at": "2017-12-10T10:00:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8b064d...
1f3b8495-499a-4d60-be9d-bd2556f8dd3a
nazmulh24/XPSC-code
Week_13/Day_3/1272B.cpp
/*********************************************************************** Name --> B. Snow Walking Robot Link --> https://codeforces.com/problemset/problem/1272/B Example--> ------------------------------------------------------------------------ Author --> <NAME> *****************************************************...
ALGO
0.999974
4.523119
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2024-10-26T07:31: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": "78b6934fcb1...
1a37bc23-a191-4f94-9ef9-21fe99585279
sekkaro/Algorithm-practice
코드포스대회문제풀이/Round858/c.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n; cin >> n; vector<int> a(2 * n); rep(i, 2 * n...
ALGO
0.999768
3.983026
{ "github_metadata": { "branch": "master", "commit_count": 354, "repo_created_at": "2020-10-30T01:08:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d77cf99a...
15a2e2b5-99b7-4b3f-8e07-5fc58420d390
RainPPR/oi-archive
20211004 2019/transfer/transfer.cpp
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<cstdlib> #include<ctime> #include<cstring> #include<string.h> #include<iomanip> using namespace std; struct d { int price = 0; int time = 0; bool canuse = false; } quan[100000]; int main() { int n = 0; int qc = 0; int l = 0; int jia...
ALGO
0.99942
3.365293
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-06-30T12:59:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7171562608...
4bda2fad-964a-4060-9c24-92d64c199c5c
sjsfwch/LeetCode
剑指 Offer II 040. 矩阵中最大的矩形.cpp
#include "headers.h" class Solution { public: int maximalRectangle(vector<string>& matrix) { int res = 0; for (int i = 0; i < matrix.size(); ++i) { vector<int> heights; for (int j = 0; j < matrix[0].size(); ++j) { int k = i; while (k < matr...
ALGO
0.999887
6.09023
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2021-06-16T11:44:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "002555f59...
32513b58-6653-404c-beb8-019c9ce578d6
diegomendez40/CppCodeSnippets
200 Welcome Door Mat/main.cpp
#include <iostream> #include <string> using namespace std; // Función auxiliar para repetir un patrón string repeatPattern(const string& pattern, int count) { string result; for (int i = 0; i < count; ++i) { result.append(pattern); } return result; } // Función auxiliar para cada línea centra...
ALGO
0.999901
4.482285
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-10-25T00:18: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": "bd1604306b9e...
98ad6ac9-24a2-4ff4-bdee-2b81c2f3c872
adarshhhx100/DSA-Standard-Questions
CountGoodNodesInBinaryTree.cpp
Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X. Return the number of good nodes in the binary tree. Example 1: Input: root = [3,1,4,3,null,1,5] Output: 4 Explanation: Nodes in blue are good. Root Node (3) is always a good node. ...
ALGO
0.999926
6.527361
{ "github_metadata": { "branch": "main", "commit_count": 163, "repo_created_at": "2022-03-23T11:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ffb4d2c6f1...
009badb5-9498-40c6-afbf-eb7fa70df999
golchanskiy23/AlgorithmSolutions
Usaco/Bronze/Basic Complete Search/bovine_genomics.cpp
#include <bits/stdc++.h> int main(){ std::ifstream in("cownomics.in"); std::ofstream out("cownomics.out"); int n,m; in >> n >> m; std::vector<std::string> spotted(n), unspotted(n); for (int i = 0; i < n; ++i) in >> spotted[i]; for (int i = 0; i < n; ++i) in >> unspotted[i]; std::vector<std...
ALGO
0.99993
3.849602
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2025-01-06T20:58: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": "73e5fde93...
a85811a6-6212-48a5-83a0-f17689068844
i-am-arvinder-singh/CP
CF-Manthan Codefest 19 - B -Uniqueness.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; using namespace __gnu_pbds;//which means policy based DS #define endl "\n" #define int long long #define ff ...
ALGO
0.999892
3.859481
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2020-05-25T21:25: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": "71a644ba...
904e16c2-4034-46ed-8555-d8e30a0ccb8f
PrashantBhati001/Data-Structures-and-Algorithms
Searching and Sorting/Medium/Triplet_sum_in_array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //Function to find if there exists a triplet in the //array A[] which sums up to X. bool find3Numbers(int A[], int n, int X) { //Your Code Here //Approach-1 O(N^3)-t...
ALGO
0.999836
5.731868
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2024-01-25T17:35: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": "fd106b5537...
94376bf0-bff3-454e-b70e-047bd8cff200
wufan-home/algorithm_problem_set
cpp/0918.cpp
/* Given a circular array C of integers represented by A, find the maximum possible sum of a non-empty subarray of C. Here, a circular array means the end of the array connects to the beginning of the array. (Formally, C[i] = A[i] when 0 <= i < A.length, and C[i+A.length] = C[i] when i >= 0.) Also, a sub...
ALGO
0.999896
5.730611
{ "github_metadata": { "branch": "master", "commit_count": 872, "repo_created_at": "2016-05-14T02:20: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": "5a8aed1e...
6319fe07-2f6f-45e4-a6b3-e75bb0f0f9b3
LeatherWang/leetcode_cpp
8_greedy/621_Task Scheduler/main.cpp
#include <iostream> // std::cout #include <vector> // std::vector #include <algorithm> // std::sort #include <math.h> #include <list> #include <map> #include <unordered_map> #include <unordered_set> #include <memory.h> #include <climits> using namespace std; // 输入: tasks = ["A","A","A","B","B","B"], n = 2 // 输出: ...
ALGO
0.999993
4.912582
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-08-13T14:32:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee65c522dd...
efa5e2bf-7d4c-44a0-9a56-d1577452ad49
xmito/graphlib
algorithms/AStar.h
#ifndef A_STAR_H #define A_STAR_H #include <cstdlib> #include <limits> #include <cmath> #include <algorithm> #include "graph_traits.h" #include "BinaryHeap.h" #include "FibonacciHeap.h" #include "Relax.h" #include "InitializeSingleSource.h" #include "NodeData.h" const double MAGIC = sqrt(2) - 2; namespace graphlib { ...
ALGO
0.999937
6.801596
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2024-02-05T22:28: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": "b89ec229...
bc75b14c-507e-43ba-8bea-8ac7a88a1892
so-jin/Samsung_SW
lecture/backtrack_for_combination.cpp
#include <iostream> using namespace std; //부분집합 : O(n^2) //핵심: 각 원소가 포함되는 경우와 포함되지 않는 경우의 조합 const int N = 5; const int CANDIDATE = 2; int src[] = { 6,2,8,3,4,5,1 }; //원본 데이터 // a[] : 선택집합 - 현재까지 선택된 부분해 // k : 선택집합에 포함된 해의 수, backtrack이 호출된 깊이 //make candidate와 process solution만 수정하면 순열 문제를 풀 수 있다. void process_s...
ALGO
0.999261
4.482406
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2021-03-16T04:45: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": "5afa176be7...
ac407ccf-7801-4318-a592-56493651e4fb
khushboo-goel/competitive-coding
Trees/lowestCommonAncestor.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ int commonAncestor(TreeNode* A, int B, int C) { if (A == NULL) { return -1; } else if (A -> val == B || A -> val == ...
ALGO
0.999998
6.152919
{ "github_metadata": { "branch": "main", "commit_count": 257, "repo_created_at": "2021-04-09T16:56:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "494737df63...
e66eeeb6-719c-44ef-9466-82621ebff71e
andrewholler/cs225_shared
potd/q26.cpp
#include <iostream> using namespace std; struct node{ int val; node * next; }; void printList(node * head){ if(head == NULL){ cout << "Empty list" << endl; return; } node * temp = head; int count = 0; while(temp != NULL){ cout << "Node " << count << ": " << temp ->v...
ALGO
0.999322
4.587863
{ "github_metadata": { "branch": "master", "commit_count": 54993, "repo_created_at": "2017-02-07T05:48: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": "1278d8...
fe880e85-2907-4aaa-bf2c-1c12a5352c2c
aky360/cpp
codecpp/DSA/Recursion/waysToClimbStairs.cpp
#include <iostream> #include <bits/stdc++.h> #define MOD 1000000007 using namespace std; // This is the solution from top of the stairs to down stairs // This counts the number of ways to reach down to the stairs from top of stairs int solveEnd(long long nStairs, int i){ // i is the current stair position and nS...
ALGO
0.999972
4.273905
{ "github_metadata": { "branch": "main", "commit_count": 270, "repo_created_at": "2022-03-26T12:28: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": "596257e124...
a58c23f1-14a2-4ebb-9748-3ad99b9d2131
tmoux/prog-contests
codeforces/1728/D/sys.cpp
//ulimit -s unlimited #include <bits/stdc++.h> using namespace std; #define ll long long #define vl vector<long long> #define vi vector<int> #define vb vector<bool> #define pql priority_queue<long long> #define pqp priority_queue<pair<ll,ll> > #define pqs priority_queue<ll,vl,greater<ll> > #define md ((ll) 1e9+7) stri...
ALGO
0.999972
3.714828
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2018-10-21T03:33:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c93be655...
7dec6474-e1cc-46a5-a980-849a076b556e
PhongLe1602/Algorithm-SamSung
Day_Con_Tang_Dai_Nhat.cpp
#include <bits/stdc++.h> using namespace std; #define ms(s,n) memset(s,n,sizeof(s)) #define all(a) a.begin(),a.end() #define present(t, x) (t.find(x) != t.end()) #define sz(a) int((a).size()) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORd(i, a, b) for (int i = (a) - 1; i >= (b); --i) #define pb push...
ALGO
0.99994
3.986667
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-05-18T11:30:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82931b4de016...
2b66d2b2-4c13-45a0-a845-0047c29f8a1b
alexandraback/datacollection
solutions_5669245564223488_0/C++/pkacprzak/prog.cpp
#include <iostream> #include <cstdio> #include <string> #include <sstream> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <cmath> #include <algorithm> #include <cstring> #include <ctime> using namespace std; #define pb push_back #define mp make_pair #define pii pair<int,int>...
ALGO
0.999937
3.710387
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2c1ff9ff...
811d71fc-a04c-4987-ad44-bb23ca1f334d
imanshu822/5-DSA_Questions_a_Day
DAY-060/1.cpp
// Problem Link: https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/description/ // Problem Name: 109. Convert Sorted List to Binary Search Tree (LeetCode) // Solution: (correct submission) /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ...
ALGO
0.999998
6.381097
{ "github_metadata": { "branch": "master", "commit_count": 1200, "repo_created_at": "2023-01-04T11:57:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed605dc...
b82a418a-8350-42c9-9f17-8dd66d42c288
alanrios2001/Linked_list
linked_list.cpp
#include <iostream> using namespace std; class Lista { typedef struct Node { int dado; struct Node* prox; }Node; Node* l; int n_elems = 0; public: Lista() { l = NULL; } void display(void) { Node* head = l; cout << "["; while (head != NULL...
ALGO
0.984871
4.416489
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-09-21T22:39: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": "054746c6d0b0...
4eabb457-2a43-42ce-9965-29ad6f53f23b
adityamakkar000/CP-Solutions
cses/buildingTeams.cpp
#include <string.h> #include <stdio.h> #include <iostream> #include <iomanip> #include <cstdio> #include <bits/stdc++.h> using namespace std; #define MAXN 202020 #define MOD 1000000007 #define int long long vector<int> colors(100001,2); vector<int> v[100001]; bool bfs(int n){ for(int i = 0; i < n; i++){ if(co...
ALGO
0.999957
4.024559
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-07-25T19:24:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "acab6f02af3...
0fb7d0c5-e6d3-4a51-9e36-8f9930f3bb22
rumdien113/Algorithm
OLP/CP_Class_week_3/So_sieu_nguyen_to.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pf push_front #define db long double #define st first #define nd second #define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr) #define all(x...
ALGO
0.999943
4.586785
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2023-11-01T03: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": "a71222c74...
e3b6ddc0-083b-4112-94f6-be487dae7cd1
hilaryweller0/AtmosFOAM
src/finiteVolume/convectionSchemes/fluxCorrectedTransport/fvcLocalMinMax.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\...
ALGO
0.972862
4.419912
{ "github_metadata": { "branch": "master", "commit_count": 1574, "repo_created_at": "2014-06-12T08:27:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6398a...
b7b29391-d6c9-41bb-bf51-8611acc069d2
tablopart2/DERIV_SHB
SingleOption/ext/j_fd.cpp
#include "j_fd.h" #include <assert.h> #include <stdexcept> #include <algorithm> void trimatrix1d(double *A, double *B, double *C,double *alpha, double *beta,double rfrate,double dt, double *px,double *dpx, int minnode, int maxnode) { for(int i=minnode;i<=maxnode;i++) { A[i] = -2.0 * alpha[i] * px[i] * px[i] /...
ALGO
0.999932
4.19993
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-06-12T05:17: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": "d8d33595c...
59906381-f9b0-4323-9b45-71c11a69897b
VirtualJabberWock/Summer_Practice_Stuff
prac/lab/9/examples/part2/6/main.cpp
#include <iostream> #include <string> using std::cout; // абстрактный класс (т.к. содержит чисто виртуальные методы) // будет использоваться только для наследования class MatrixValue { public: // чисто виртуальные методы без определения virtual void Add (MatrixValue & rhs) = 0; virtual MatrixValue & op...
ALGO
0.987276
4.476488
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2023-05-23T13:25: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": "48ba7bcc7f5...
d4951689-56b2-44cd-9112-22b0124d418f
richikrich/Interviewbit-Cpp-Problems
Sorted Array To Balanced BST.cpp
#include<iostream> #include<vector> #include<cmath> #include<bits/stdc++.h> using namespace std; /*Q: Given an array where elements are sorted in ascending order, convert it to a height balanced BST.*/ /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *righ...
ALGO
0.99998
5.641197
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2019-06-10T11:03: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": "1f86cb7f...
63d6961e-5d72-4f79-a85e-d52d74239138
Code-With-TalhaBhai/Competitive_and_OOP_C-
step08_1_arrays.cpp
#include <iostream> #include <climits> using namespace std; int main(){ int arr[5] = {234,432,4323,53,64}; for (int i = 0; i < 5; i++) { cout << arr[i] << endl; } // Takes input element of array and find maximum between them; int n; cout << "How much element you want to print i...
ALGO
0.995668
3.735616
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2023-01-04T05:22: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": "b1746ed16d5...
418d527f-f5a3-435b-b302-eb46f361330e
suraj-iitb/algorithm-identification
BERT/Data_Dump/Selection/C++14/Code/selection4921230.cpp
#include <iostream> #include <vector> using namespace std; int selectionSort(vector<int> &A); int main() { int n; cin >> n; vector<int> A(n); for (auto &x : A) cin >> x; int count = selectionSort(A); for (int i = 0; i < A.size(); i++) { i ? cout << " " << A[i] : cout << A...
ALGO
0.999987
4.382466
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2020-05-24T06:21:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 10 }, "file_meta": { "content_id": "ceb5bcc01...
2fc7b5f1-7aeb-42c8-ab7c-634143b16598
ExtraExtraterrestrial/MyUsefulRegexes
urlSplit.re
(?<origin>(?<protocol>https?):\/\/(?<hostname>(?<subdomain>[a-z0-9\-\.]*?)\.?(?<sld>[a-z0-9\-]+)\.(?<tld>(?:(?:co|com|org|gov|net|ed|edu)\.[a-z]{2})|xn--[a-z0-9\-]{2,}|[a-z]{2,})))(?=\/|$)(?:(?<pathname>[^\s?]*)(?<search>\?[^\s]*))? (?<key>[a-zA-Z_][\w%]*)=(?<value>[^\s&]*) Regex to parse URL parameters on line 2 Gro...
TOOL
0.964708
4.9465
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-10-18T18:55: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": "9f927ac3d02...
29a12d24-cd54-4fa5-8f68-68070bdd275a
kobotomorrow/helllo_cpp
00000000_APG4b/recursion/grid_tansaku.cpp
// マス目の探索 #include <bits/stdc++.h> using namespace std; bool is_valid_move(vector<vector<char>> &board, vector<vector<bool>> &checked, int x, int y) { int H = board.size(); int W = board.at(0).size(); // マスの外 if (x < 0 || x >= H || y < 0 || y >= W) { return false; } // 壁 if (board.at(x).at(y) == '...
ALGO
0.999896
5.430371
{ "github_metadata": { "branch": "kobo", "commit_count": 96, "repo_created_at": "2023-05-25T13:21: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": "18258dc9964...
633f985b-bd26-4e07-8925-adaab02057e7
Tech-Intellegent/CodeForces-Solution
CodeForces-Contest/1474/C.cpp
#include<bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while (t--) { int n; cin >> n; vector<int> a(2 * n); n *= 2; map<int, int> mp; for (auto &x: a) { cin >> x; mp[x]++; } sort(a.begin(), a.end()); i...
ALGO
0.999884
3.8054
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-01-23T07:10:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "501358ef0fb6...
750ed06d-88c9-486f-9144-3232e9d1a16c
purveshjambhulkar/Strivers-DSA-Sheet
09.Sliding Window & Two Pointer Combined Problems/01.Medium Problems/06.Count Number of Nice Subarrays.cpp
#include <vector> using namespace std; class Solution { public: int numberOfSubarrays(vector<int>& nums, int k) { return atMostK(nums, k) - atMostK(nums, k - 1); } private: // Helper function to count subarrays with at most k odd numbers int atMostK(vector<int>& nums, int k) { int left...
ALGO
0.99994
6.116438
{ "github_metadata": { "branch": "main", "commit_count": 228, "repo_created_at": "2025-01-25T05:49: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": "2ed63bcf13...
701ce2f0-efa7-4f72-abdf-9951e9228330
heaohan/GpuSIAsForTPRPSE
SIAs_c++/GPU_DE/main.cpp
#include "mat_rw.h" #include "g_de.cuh" int main() { //READ data from MAT-file std::vector<float> in_vector; std::vector<float> xmax; std::vector<float> xmin; std::vector<float> zern; matread("for_c.mat", "in_vector", in_vector); //make sure .mat is float data matread("for_c.mat", "xmax", xmax); //make s...
ALGO
0.998914
4.408794
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-10-09T09:47:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7c612304...
1a86167a-f2ee-4b90-9864-d12310ba9de9
Hasv07/Debugging_CPP
Matrix.cpp
#include <iostream> #include <vector> class Matrix { private: std::vector<std::vector<int>> data; int rows; int cols; public: Matrix(int numRows, int numCols) : rows(numRows), cols(numCols) { data.resize(rows, std::vector<int>(cols, 0)); } void setData(const std::vector<std::vector<in...
ALGO
0.999451
6.428182
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-10-10T09:33: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": "5020f379fa2b...
6927547b-cd14-4656-a020-c8b0ac5966bc
chiNmoy09/Striver_SDE_Sheet
ActivitySelection.cpp
#include<bits/stdc++.h> using namespace std; struct meeting{ int start; int end; int pos; }; //comparator bool static comp(meeting m1,meeting m2){ if(m1.end <= m2.end) return true; else if(m1.end > m2.end) return false; else if(m1.pos < m2.pos) return true; return f...
ALGO
0.999999
4.654771
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2022-06-04T04:22: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": "18ed13038eb...
4a24dfce-f8c6-422e-8166-f2cb47174b4c
robinvd995/ProjectJupiter
JupiterEngine/src/Core/Math.cpp
#include "JupiterEngine/Core/Math.h" namespace Jupiter { const float JMath::JptPi = physx::PxPi; Matrix4x4 JMath::calculateViewMatrix(Transform& transform) { Matrix4x4 model = transform.getInverse(); Matrix4x4 view(1.0); view[0][0] = model[0][0]; view[0][1] = model[0][1]; view[0][2] = model[0][2]; view[1]...
ALGO
0.905647
5.961707
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2022-07-05T12:02: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": "ee77be9a3...
e4a38351-8f03-41b9-b78a-88826f3089ce
Ayush7614/Daily-Coding-DS-ALGO-Practice
Gfg/C++/Huffman Encoding.cpp
#include<vector> using namespace std; struct MinHeapNode { char symbol; int freq; MinHeapNode *left, *right; MinHeapNode(char symbol, int freq) { this->left = this->right = nullptr; this->symbol = symbol; this->freq = freq; } }; struct compare { bool operator()(MinH...
ALGO
0.999997
4.524004
{ "github_metadata": { "branch": "main", "commit_count": 2968, "repo_created_at": "2020-12-28T05:34:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 322, "forks": 474, "issues": 335, "pull_requests": 20 }, "file_meta": { "content_id": "ba...
9b0de1b6-b975-44da-8e61-6eebaabd9dd3
georgi571/Software-University-CPP
_1ProgrammingBasicsWithCPP/_2ConditionalStatements/_3MoreExercise/_04TransportPrice.cpp
#include <iomanip> #include <iostream> using namespace std; int main() { const double TAXI_START_MONEY = 0.70; const double TAXI_PER_KM_AT_DAY = 0.79; const double TAXI_PER_KM_AT_NIGHT = 0.90; const double BUS_PER_KM = 0.09; const double TRAIN_PER_KM = 0.06; const int MINIMUM_KM_TO_USE_BUS = 20...
TOOL
0.956051
4.073639
{ "github_metadata": { "branch": "main", "commit_count": 288, "repo_created_at": "2024-09-07T13:13:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "358ba93024...
aa199c17-adb0-4309-a3b8-c96c07a729a0
skullcrusher2104/DSA_Projects
Expression_Compiler/minheap.cpp
/* Do NOT add/remove any includes statements from this header file */ /* unless EXPLICTLY clarified on Piazza. */ #include "minheap.h" // #include<iostream> //Write your code below this line HeapNode* heapify_up(HeapNode* child){ while(child->par){ if(child->val<child->par->val){ int x=child...
ALGO
0.99981
5.021254
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-07-01T05:27: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": "ac60717a144b...
f1f8269a-e738-414c-a806-0f15892f9822
lusongno1/drops
src/levelset/marking_strategy.h
/// \file marking_strategy.h /// \brief /// \author LNM RWTH Aachen: <NAME> /* * This file is part of DROPS. * * DROPS is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the Licen...
ALGO
0.996966
6.692524
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2020-06-04T05: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": "7dc940cef...
5abfcd8d-04f1-4e87-bb23-69eec1b7b201
ztavakolii/Algorithm-Solutions
Leetcode/Cpp/64. Minimum Path Sum.cpp
class Solution { public: /*This code takes more time than it needs to. Because to fill each house in the first row of the dp table, two conditions must be checked, and to fill each house in the first column, it must check three conditions each time. Whereas, if we put a separate for loop to fill the fir...
ALGO
0.999976
5.669357
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-05-07T17:19: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": "4b8aeba3b04...
6fddb9ef-378e-42f1-8f91-8d451decd7ba
LOHSCPlusPlus/structsexplore2-nikita-savin
Explore8.cpp
#include <iostream> using namespace std; struct Point { double x; double y; Point(); Point(double xVal, double yVal); }; struct Line { Point start; Point end; Line(Point s, Point e); }; Point::Point() { x = 0; y = 0; } Point::Point(double xVal, double yVal) { x = xVal; y = yVal; } Line::Lin...
ALGO
0.999558
4.894945
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-02-04T16:36:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b143d36fcca7e...
e1dbbccb-1556-497f-91c5-b2e2f6ab82b5
FBSeletronica/Exemplos-FreeRTOS
05_Exemplo/src/main.cpp
/********************************************************* * Exemplo para verificação do consumo de memória pela tarefa - High Water Mark * * Por: <NAME> *********************************************************/ /*inclusão da Biblioteca Arduino*/ #include <Arduino.h> /*inclusão das Biblioteca do FreeRTOS*/ #include...
TOOL
0.901399
5.584043
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-11-17T20:53:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21e6c230...
5e6ae31c-a172-453d-a620-79bac5b32d62
shyamal2411/DSA-Practice
leetcodePractice/Greedy/452MinNumberofBaloons.cpp
#include<bits/stdc++.h> using namespace std; // https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/ // We just neeed to find the intersection between the intervals and count those intersections // if there is no intersection then count will be incremented. class Solution { public: static bo...
ALGO
0.999939
5.624705
{ "github_metadata": { "branch": "master", "commit_count": 1689, "repo_created_at": "2020-11-28T04:42:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b21be67...
3c75e96a-55b6-42c3-ae1e-0387ff349308
xyyyt/leetcode-cpp
exercises/ConstructBinaryTreeFromPreorderAndInorderTraversal.cpp
#include <vector> #include <unordered_map> #include <iostream> 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) : ...
ALGO
0.999977
6.788404
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-23T22:44: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": "c9c3b4e3a4db...
57b965a6-9b67-4926-98cd-23d7d3589834
amitprat/cppcode
CodeProject/array/FindElementInArray.h
#pragma once #include "../Header.h" /* An array consist of elements whose difference is positive or negative 1. I have to find the given elements without using linear search. Say Int arr[]={1,2,3,4,3,4,5,6,7 To find : 6 */ /* The answer is skipping. If you're starting at 1, and you're looking for 6, then you know th...
ALGO
0.999748
5.510231
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-07-12T03:02: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": "96d196e7c...
98a2fcc6-90e1-4c6f-b3d0-b476c55f0802
Burcu2502/sistemProgramlama
src/version3/main.cpp
#include "../common/password_cracker.h" #include <iostream> #include <thread> #include <vector> #include <mutex> #include <atomic> #include <cstring> #include <immintrin.h> // SIMD komutları için using namespace std; // Global değişkenler atomic<bool> password_found(false); atomic<long long> total_attempts(0); string...
ALGO
0.995382
5.092137
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-06-14T20:19: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": "03082a7b3ae2...
7702d2d5-4c32-4fc7-b120-007a26aa6a67
aishwarya-gowri/Labs
ADA/djkstras.cpp
#include<bits/stdc++.h> using namespace std; #define V 5 int minDistance(int dist[], bool visited[]) { int min = INT_MAX, min_index; for (int v = 0; v < V; v++) if (visited[v] == false && dist[v] <= min) min = dist[v], min_index = v; return min_index; ...
ALGO
0.999928
5.087231
{ "github_metadata": { "branch": "master", "commit_count": 224, "repo_created_at": "2020-03-08T06:35:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e953b1de...
5a476265-3b24-434f-91ec-ee2c42cdc726
barretinjobs/1.1Organizacao
pid.ino
void pid (){ atsensor(); //void atualiza sensores na aba sensores //---------------------------------------------------------------------------------------------------------------------------------------------------------calculos ...
ALGO
0.995888
4.055691
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-05-23T02:20: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": "95bfaafd62...
11559b49-1ce3-4608-a520-63183f2cc89a
abhishekjachak21/CoderAbhishek
Practice/fibonacci.cpp
#include <iostream> using namespace std; // int main() { // int n; // cout << "Enter the number of terms: "; // cin >> n; // int a = 0, b = 1; // cout << "Fibonacci Series: "; // for (int i = 1; i <= n; i++) { // cout << a << " "; // int next = a + b; // a = b; // ...
ALGO
0.999576
3.767506
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-09-11T17:59: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": "cbb4c1a10fd...
c49ce3d2-868d-4ba0-9151-70f33a962bdc
arsmx/ITMO
algorithms and data structures 2nd sem/12/F-sum_of_tree.cpp
#include <fstream> #include <vector> using namespace std; vector<vector<int>> list; //вектор графа vector<vector<int>> length; //вектор расстояний void DepthFirstSearch(int current) { //для текущего элемента for (int i : list[current]) DepthFirstSearch(i); //проходим по всем рекурсивно for (int i : list[cu...
ALGO
0.999738
3.797086
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-07-26T02:25: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": "439fdbf33f76...
1c8e56c9-8820-4cbc-b17b-218b9b7946f7
jatin-ukey21/Strings
Medium-level/PrintAllSentences.cpp
/* Given a list of word lists of size M * N. The task is to return all sentences possible taking one word from a list at a time via recursion. */ #include<bits/stdc++.h> using namespace std; // User function Template for C++ class Solution { public: // Time Complexity: O(M^N) // Where: // N = number o...
ALGO
0.999953
5.639508
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-07-15T19:25:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c679560ff8...
9cc6d5cd-9337-43f8-970f-51a4c0364da0
android/ndk-samples
endless-tunnel/app/src/main/cpp/glm/gtx/closest_point.hpp
/////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentatio...
ALGO
0.97627
6.788213
{ "github_metadata": { "branch": "main", "commit_count": 1618, "repo_created_at": "2015-05-16T10:02:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10324, "forks": 4239, "issues": 19, "pull_requests": 5 }, "file_meta": { "content_id": "d2...
a749af3e-c1fa-4603-9e00-81861f47be49
ttzztztz/leetcodeAlgorithms
Lintcode/277. Word Spacing.cpp
class Solution { public: /** * @param words: the words given. * @param wordA: the first word you need to find. * @param wordB: the second word you need to find. * @return: return the spacing of the closest wordA and wordB. */ int wordSpacing(vector<string> &words, string &wordA, string ...
ALGO
0.999941
5.633121
{ "github_metadata": { "branch": "master", "commit_count": 872, "repo_created_at": "2019-09-03T06:57:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c59ee6...
dd314071-c270-4d33-a581-0bb068046b85
asrafulmolla/CSE-Fundamentals
Semester 2/1 Basic Data Structures/14.Practice Day 02/19. Remove Nth Node From End of List.cpp
// https://leetcode.com/problems/remove-nth-node-from-end-of-list/ class Solution { public: int size(ListNode *head) { int cnt = 0; ListNode *tmp = head; while (tmp != NULL) { cnt++; tmp = tmp->next; } return cnt; } void delete_head...
ALGO
0.999969
6.061509
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2024-04-18T17:38: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": "fbc4e3783f...
42352844-47af-49ad-bfe5-c3d0f017d18a
Ragnar20-03/Logic-Building
program481.cpp
#include<iostream> using namespace std; template <class T> class ArrayX { public: T *Arr; int iSize; ArrayX(int); ~ArrayX(); void Accept(); void Display(); bool LinearSearch(T); bool BidirectinalSearch(T); bool BinarySearch(T); }; template <...
ALGO
0.999817
4.296544
{ "github_metadata": { "branch": "main", "commit_count": 167, "repo_created_at": "2023-04-18T13:27: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": "02e831ae19...