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
39798bc8-9e1f-4959-8f03-5dca7d2dcd4e
Faizullah9181/LeetCode-Practice
641-design-circular-deque/641-design-circular-deque.cpp
class MyCircularDeque { public: int *arr; int n; int front; int end; MyCircularDeque(int k) { arr = new int[k]; n = k; front = -1; end = -1; } bool insertFront(int x) { if (isFull()) return false; if (isEmpty()) { ...
ALGO
0.999208
5.639034
{ "github_metadata": { "branch": "main", "commit_count": 1192, "repo_created_at": "2022-02-11T17:26: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": "e16112a79...
9c27aa63-3a3e-4292-bdaa-4fa7d9d0f43e
ncbi/ncbi-cxx-toolkit-public
src/algo/phy_tree/tree_to_dist_mat.cpp
/* $Id$ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyrig...
ALGO
0.997639
6.469364
{ "github_metadata": { "branch": "main", "commit_count": 103944, "repo_created_at": "2021-07-26T19:41:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 73, "forks": 35, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e0464f...
143e347c-8bdc-44f4-8ccb-385a36fc7b16
blondiebytes/30-Days-of-Code
HackerRank Challenge Solutions/Day 27/Solution.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main(){ cout<<"5"<<endl; cout<<"4 3"<<endl; cout<<"-1 0 4 2"<<endl; cout<<"5 3"<<endl; cout<<"0 1 -2 -6 9"<<endl; cout<<"6 4"<<endl; cout<<"1 0 -3 4 5 7"<<endl...
ALGO
0.999937
3.660785
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2015-12-16T21:26:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 187, "forks": 141, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "67f10...
8722fc8c-8393-432e-9125-52fc77bed880
erlonL/EstruturaDeDados
Prova1ED.cpp
#include <iostream> #include <string> #include <sstream> #include <cstring> using std::stringstream; using namespace std; class PilhaSeq{ int* dados; int topo; int tamMax; public: PilhaSeq(){ tamMax = 10; dados = new int[tamMax]; topo = -1; } // gets, sets, etc bo...
ALGO
0.998656
4.550247
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-08-08T23:15:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca4eca8a798...
2bc0314e-2a15-4a25-a40d-b7470941cfba
KyrillosAwad/CompetitiveProgramming
Solutions/UVA/10043.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define mk make_pair #define pb push_back #define REP(i, a, b) for (int i = int(a); i < int(b); ++i) #define rREP(i, a, b) for (int i = in...
ALGO
0.999897
3.886611
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-03-17T16:56: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": "0c8d0b26a...
bdf18e89-1eb6-40f1-9ab2-f7d86cb798a5
eglantine-shell/adventofcode
2022/cpp/day4.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <algorithm> using namespace std; int main() { ifstream infile; infile.open("input/day4.txt", ios::in); string cur; int count = 0, count2 = 0; while (getline(infile, cur)) { int a[4] = {0}; int x = ...
ALGO
0.999629
4.370564
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-12-30T15:39: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": "201382267611...
e04f8676-ba7c-4baa-84d4-b01b3cbb45e5
YoungCIoud/PracticeOfFishAcmer
Luogu/Graph/P1640.cpp
#include<bits/stdc++.h> #ifdef LOCAL_MACHINE #define debug(...) printf(__VA_ARGS__) #define sp() system("pause") #define IOS #else #define debug(...) #define sp() #define IOS std::ios::sync_with_stdio(false), \ std::cin.tie(0), \ std::cout.tie(0) #endif using i64...
ALGO
0.999954
4.807483
{ "github_metadata": { "branch": "main", "commit_count": 277, "repo_created_at": "2024-05-14T13:12: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": "054608db1d...
ee65a9f1-24e7-4a2a-a92c-490c7d3c55c9
Niceno/PSI-BOIL
Src/Body/body_nonmember.cpp
#include "body.h" /******************************************************************************/ real area(const real x0, const real y0, const real x1, const real y1, const real x2, const real y2) { return 0.5 * ( ( y0 + y1 ) * ( x0 - x1 ) + ( y1 + y2 ) * ( x1 - x2 ) + ...
ALGO
0.999146
4.527843
{ "github_metadata": { "branch": "main", "commit_count": 575, "repo_created_at": "2023-01-26T11:23:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "fcce25a02...
b08a3263-405c-4bb8-bcb4-4657f1aee985
Peng-Rao/NLA_challenge
src/exam202309.cpp
#include "jacobi.hpp" #include <Eigen/SparseCore> #include <unsupported/Eigen/SparseExtra> #include <iostream> int main(int argc, char *argv[]) { int n = 100; Eigen::SparseMatrix<double> A(n, n); A.reserve(298); for (int i = 0; i < n; i++) { A.coeffRef(i, i) = 2.0; if (i > 0) ...
ALGO
0.999832
4.988359
{ "github_metadata": { "branch": "release", "commit_count": 29, "repo_created_at": "2024-09-23T21:25: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": "1a63cdf1...
3ac57624-b406-4322-88ee-97af013ad326
AndreyTokmakov/Algorithms
Strings/algorithms/Longest_Substring_With_Maximum_K_Unique_Characters.cpp
/**============================================================================ Name : Longest_Substring_With_Maximum_K_Unique_Characters.cpp Created on : 24.02.2025 Author : <NAME> Version : 1.0 Copyright : Your copyright notice Description : =========================================================...
ALGO
0.990733
6.568086
{ "github_metadata": { "branch": "main", "commit_count": 180, "repo_created_at": "2025-02-09T03:33:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45360d7c8b...
62da1c63-134c-410d-a556-93efd268c6e8
dkhungme/pramod
test/Compact.cc
/* * Sorter.cc * * Created on: 4 Apr, 2015 * Author: dinhtta */ /** * Testing sorting of encrypted file */ #include <iostream> #include <gflags/gflags.h> #include <glog/logging.h> #include <sort/Sorter.h> #include <mixer/Mixnet.h> #include <utils/DataGen_Compact.h> #include <utils/GlobalParams.h> #include...
ALGO
0.974922
4.612482
{ "github_metadata": { "branch": "develop", "commit_count": 108, "repo_created_at": "2015-09-30T02:26:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dea328d...
3389ad35-b158-4a74-9252-6af14a7fc937
heroming/algorithm
codejam/Distributed_Round1_2016/E_winning_move.cpp
/* * Author:heroming * File:distributed.cpp * Time:2016/7/25 20:06:22 */ #include <vector> #include <list> #include <set> #include <map> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <fstream> #include <...
ALGO
0.999945
3.603913
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2016-07-09T14:21:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c3480ddf...
099d0f9b-bb95-43d7-8c11-63af90eace4a
sauravjaiswa/Coding-Problems
6th sem Technical Training/Mock Placement Practice/Practice1_Q5.cpp
/*Write a program to find the longest paths of 1s available in a square matrix, which consists of 0s and 1s only, and the only possible movements are right and down. Example : For a given input matrix is 0 0 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 1 0 0 1 1 1 1 1 A possible longest path is as follows: 1th -- [ 1, 0] 2th --...
ALGO
0.999885
3.88404
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-11-01T11:56: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": "462b25b3c...
4eb1a467-0889-4991-89cf-1ff2b672fc05
ansocket/avl_tree
Tree/AVL_Tree.hpp
#pragma once #include <cstdint> #include <stack> class Node { private: int key; unsigned int height; Node* left; Node* right; void* data; public: Node(int key){ this->key = key; this->left = nullptr; this->right = nullptr; this->height = 1; } int ...
ALGO
0.994247
4.478289
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2025-02-23T10:26: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": "35b11c81f2...
20463232-b00c-4ee2-8a4f-38e14999d359
oomph-lib/oomph-lib
demo_drivers/linear_solvers/HypreSolver_test.cc
//LIC// ==================================================================== //LIC// This file forms part of oomph-lib, the object-oriented, //LIC// multi-physics finite-element library, available //LIC// at http://www.oomph-lib.org. //LIC// //LIC// Copyright (C) 2006-2024 <NAME> and <NAME> //LIC// //LIC// This lib...
ALGO
0.999583
5.376423
{ "github_metadata": { "branch": "main", "commit_count": 1885, "repo_created_at": "2021-03-29T15:44:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 46, "forks": 28, "issues": 11, "pull_requests": 4 }, "file_meta": { "content_id": "abbec8e...
b38b44ad-fba2-42f3-8e39-845a5e96c15d
Ryansmg/CodingPractice
Koistudy/Old/1-1/Week8/p211.cpp
#include <bits/stdc++.h> using namespace std; int solve(vector<int> n, int cnt, int ii) { for(int i=0; i<ii; i++) { if(n[i]) cnt--; else cnt++; n[i] ^= 1; } int ans = 0; if(ii) ans++; if(cnt==0) return ans; for(int i=0; i<19; i++) { if(n[i]==0) continue; ans++; ...
ALGO
0.999922
3.803921
{ "github_metadata": { "branch": "master", "commit_count": 152, "repo_created_at": "2023-11-14T17:03:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f93bf6b...
ce4f962d-e9ce-47f4-8992-bf15382e7f0f
AkiLotus/AkikazeCP
Vault/ReferencesMaterials/itlazy.cpp
#include <bits/stdc++.h> #define LL long long using namespace std; int const nMax = 100005; struct NODE{ LL value, lazy ; }; int n,m; NODE T[nMax*4]; void down(int id, int l, int r){ int m = (l+r)/2; T[id*2].value += T[id].lazy*(m-l+1); T[id*2+1].value+= T[id].lazy*(r-m); T[id*2].lazy += T[id]...
ALGO
0.999909
4.279517
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2018-07-18T04:56:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb318401b...
dcf5d2a1-7c8f-4f8c-afc5-4b375270543f
muhammadhasan01/cp
Online Judge/Codeforces/Gym/2019-2020 ICPC Southwestern European Regional Programming Contest (SWERC 2019-20)/F.cpp
// author : donbasta #include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define point pair<ll, ll> #define x first #define y second int n; ll dobelLuas(const vector<point>& p) { int sz = (int)p.size(); ll ret = 0; for (int i = 0; i < sz; i++) { int ii = (i...
ALGO
0.999689
4.546657
{ "github_metadata": { "branch": "master", "commit_count": 1187, "repo_created_at": "2019-07-13T15:49:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3850211...
8fb7667d-3da1-45e9-aedf-508f1fcea119
YessineJallouli/Competitive-Programming
Codeforces Submissions/rounds/1706/D2.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int F(int a, int b) { int k1 = a/(b+1)+1; return k1; } int main() { ios_base::sync_with_stdio(false), cin.tie(nullptr); int T; cin >> T; while (T--) { int n,k; cin >> n >> k; vector<int> a(n); for (int i = 0...
ALGO
0.999974
4.140457
{ "github_metadata": { "branch": "main", "commit_count": 107, "repo_created_at": "2021-05-13T16:32:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "efb1173af6...
31295856-8c07-4bc8-9702-e6005cd84aaf
dudongtak/study
백준/Gold/12893. 적의 적/적의 적.cc
#include<iostream> #include<vector> #include<queue> using namespace std; int N, M, a, b; vector<int> r(1000001, 0); vector<vector<int>> p(2001); bool bfs(int s) { r[s] = 1; queue<int> q; q.push(s); while (!q.empty()) { int cur = q.front(); q.pop(); for (int i = 0; i < p[cur].size(); i++) { int next = p...
ALGO
0.999941
3.66127
{ "github_metadata": { "branch": "main", "commit_count": 242, "repo_created_at": "2024-03-19T04:34: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": "8863c158d0...
8611e7e0-eca0-4595-8715-e27d01fbcdd4
TAUSEEF-01/Programming_Contest_All_Codes
C_Make_Equal_Again.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; #define ll long long #define ull unsigned long long #define pb pus...
ALGO
0.999862
4.296153
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-10-18T08:12: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": "9f073cf6ca4...
1138bf17-9ca2-4f4b-9a12-ca53be11ca67
bansal-samarth/Data-Structure
Train_Hashmap/Prototype-1.cpp
#include <iostream> using namespace std; class Node { public: int data; Node** next; Node(int val): data(val), next(new Node*[10]{}) {} ~Node() { delete[] next; } }; // I am trying to make Search Hashing technique class Prototype { public: Node **digits; Prototype(...
ALGO
0.999773
5.355226
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-02-03T14:33: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": "425577aaab43...
9e6ec186-4e94-4514-a12a-fe0408da60be
gurneetkaur2/GO-singleLevelAlgorithm
programs/scripts/countVertices.cpp
#include<iostream> #include<fstream> #include <sstream> #include<map> #include<vector> #include<cassert> using namespace std; int main(int argc, char** argv) { int sum = 0; if (argc != 3) { cout << "Usage: " << argv[0] << " <fileName> <graph-type> " << std::endl; return 0; } std::string fileName = ...
ALGO
0.968599
4.305502
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2025-05-17T23:27: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": "f2c57322376...
af9c1ec4-7d73-4716-8183-2918b82649d4
yaksplat/Storm
StormPieces/Storm/Storm.h
#ifndef STORM_H #define STORM_H #include <math.h> //const float PI = 3.1415926; class Storm { private: unsigned long StartTime; unsigned long CurrentTime; public: float Diameter; float MovementSpeed; float DistanceX; float DistanceY; float CurrentX; float CurrentY; bool d...
TOOL
0.96375
4.811557
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-02-13T00:17: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": "6b98df4c02c...
872af843-a85a-4b9c-b2d2-4fe5d411c9a5
aryannnn17/LeetCode_Problems
SpiralMarixIV.cpp
// #include <bits/stdc++.h> // using namespace std; // struct ListNode // { // int val; // ListNode *next; // ListNode() : val(0), next(nullptr) {} // ListNode(int x) : val(x), next(nullptr) {} // ListNode(int x, ListNode *next) : val(x), next(next) {} // }; // void makeSpiral(ListNode *head, int m...
ALGO
0.999977
5.710683
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2024-10-17T17:00:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "840a467d4f7...
3db5e25a-8cd0-45c9-a196-426e30c51cb8
shubhampalia/cp-solutions
Codeforces/B_Game_on_Ranges.cpp
#include <bits/stdc++.h> using namespace std; #define vi vector<int> #define vvi vector<vi> #define fo(i,n) for(int i=0; i<n; i++) #define all(x) x.begin(), x.end() #define ll unsigned long long #define LD long double #define pb push_back #define sortall(x) sort(all(x)) #define deb(x) cout<<#x<<" = "<<x<<endl #define ...
ALGO
0.999824
3.566829
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-02-07T06:01: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": "6d249795ae2e...
d4dbce4b-75c0-4db5-ab24-265d0518b481
yashica-patodia/CODE_FORCES1
985d.cpp
#include<bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; #define IOS ios_base::sync_with_stdio(false);cin.tie(NULL); #define ff first #define ss second #define eb emplace_back #define M...
ALGO
0.999945
3.267282
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-12-19T14:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "c568b73f2...
6f64b5f7-5fad-4aee-88bd-9eb56336c2b4
utwente-fmt/sigrefmc-sttt16
tool/src/systems.hpp
/* * Copyright 2015 Formal Methods and Tools, University of Twente * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
TOOL
0.96067
5.899575
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-09-23T13:39:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f015e523f6...
4847f37c-f8f5-46b9-8eb7-ab1e6a6b2576
algoboy101/LeetCodeCrowdsource
backup/source/cpp/[1290]二进制链表转整数.cpp
//给你一个单链表的引用结点 head。链表中每个结点的值不是 0 就是 1。已知此链表是一个整数数字的二进制表示形式。 // // 请你返回该链表所表示数字的 十进制值 。 // // // // 示例 1: // // // // 输入:head = [1,0,1] //输出:5 //解释:二进制数 (101) 转化为十进制数 (5) // // // 示例 2: // // 输入:head = [0] //输出:0 // // // 示例 3: // // 输入:head = [1] //输出:1 // // // 示例 4: // // 输入:head = [1,0,0,1,0,0,1,1,1,0,0,...
ALGO
0.999987
5.486292
{ "github_metadata": { "branch": "master", "commit_count": 194, "repo_created_at": "2020-03-06T03:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a38e43cc...
7de740f3-e29e-4c00-b373-20a2793ca2d3
Lerent/BT-l-y-i-m
bai1 kt lay diem.cpp
#include <stdio.h> #include <ctype.h> #include <string.h> void chuanHoaXau(char s[]) { int n = strlen(s); // Loai bo khoang trong thua o dau va cuoi xau int i = 0, j = n - 1; while (isspace(s[i])) i++; while (isspace(s[j])) j--; s[j + 1] = '\0'; // Chuan hoa cac tu trong xa...
ALGO
0.998486
3.43241
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-21T12:06: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": "10ff41f7cd34...
fb7a2f6b-04b0-4373-81b8-c0efbeb88650
CodeByTarek/Data-Structures
PriorityQueue.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int* key; Node* next; int* priority; Node(){next = NULL;} Node(int value1, int value2){ priority = new int (value1); key = new int (value2); next = NULL; } ~N...
ALGO
0.999842
4.344777
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-02-17T00:40: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": "b8de8bd0e0d...
d1ed616b-8c09-4902-ac60-424bf552a033
aeuna/solving_problem
baekjoon/2493.cpp
#include<bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); vector<int> v; vector<int> save; stack<int> stk; int max=0, mid=0,index1, index2; int n; cin >> n; for(int i=0;i<n;i++){ int a; cin >> a; v.push_back(a); } for(int i...
ALGO
0.999993
4.334811
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-07-22T06:00: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": "9c40b00b34...
44f129e0-1c63-40f7-aa4d-b1aaf851c789
c4lnn/CP-Code
ZOJ/1586.cpp
#include<bits/stdc++.h> #define SZ(x) (int)(x).size() #define ALL(x) (x).begin(),(x).end() #define PB push_back #define MP make_pair #define FI first #define SE second using namespace std; typedef double DB; typedef long long LL; typedef unsigned long long ULL; typedef pair<int,int> PII; typedef vector<int> VI; typedef...
ALGO
0.99997
3.36609
{ "github_metadata": { "branch": "master", "commit_count": 239, "repo_created_at": "2021-03-30T03:01: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": "afbe2947...
04281746-6a2c-4d78-b43c-1198a5fc0735
donbasta/competitive-programming
submissions/online-judges/cf/884Div12/B.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const int INF = 2e9; void solve() { int n; cin >> n; if (n <= 2) { for (int i = 1; i <= n; i++) { cout << i << ' '; } cout << '\n'; return; } vector<int> ve(n); ...
ALGO
0.999916
4.871314
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2018-10-17T04:26:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ddeaf80a...
47d95d8d-9449-4045-9979-709cf2916ab3
zouyuelin/cdpr_simulation
visp/modules/imgproc/include/visp3/imgproc/vpContours.h
/* * ViSP, open source Visual Servoing Platform software. * Copyright (C) 2005 - 2023 by Inria. All rights reserved. * * This software is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of ...
ALGO
0.983522
5.966641
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-11-29T06:22: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": "3e82f5f4a5...
39fbe2f6-1061-4fdf-9427-9d82fb4dc083
loskyertt/cpp
算法策略/动态规划/05完全背包问题/src/knapsack.cpp
#include "knapsack.hpp" #include <algorithm> #include <vector> int unboundedKnapsackDP(vector<int>& wgt, vector<int>& val, int cap) { int n = wgt.size(); // 初始化 dp 表 vector<vector<int>> dp(n + 1, vector<int>(cap + 1, 0)); // 状态转移 for (int i = 1; i <= n; i++) { for (int c = 1; c <= cap; c++)...
ALGO
0.999959
5.153132
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2024-11-11T04:44: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": "d9b857f0a...
7cf5c5e0-2a5e-4ce9-96b4-48865d621951
cdhd32/ProgrammersStudy
NumberWord.cpp
#include <string> #include <vector> using namespace std; const int radix = 10; string numberStrings[] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; /// <summary> /// 프로그래머스 레벨 1 "숫자 문자열과 영단어" 문제 풀이 /// https://thispointer.com/find-and-re...
ALGO
0.99816
4.809443
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2023-04-25T12:11: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": "fa92ae6cd...
49fd3792-050f-4f4c-a620-8cd3bc0faaa1
parb220/dsmh_npsol_package
src/dsmh_mpi/DispatchSimulation.cpp
#include <vector> #include <sstream> #include <mpi.h> #include <fstream> #include <cmath> #include <cstdlib> #include <iostream> #include <iomanip> #include "dw_math.h" #include "CSampleIDWeight.hpp" #include "CEquiEnergyModel.hpp" #include "CEESParameter.hpp" #include "CStorageHead.hpp" #include "storage_constant.hpp...
ALGO
0.999137
4.167818
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-04-11T18:45:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "142ad9de4...
4e7b4426-8aab-470d-b9c3-1faa7c024232
LarIsCoding/competitive-programming
study/MC521/aula-5/C.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef pair<char, int> ci; typedef vector<ci> vci; int main() { // Otimização de input ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; vci states; states.reserve(s.size()); for(int i = 0; ...
ALGO
0.999932
4.06276
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2022-10-18T23:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cfeaf5e5a8...
6005c1db-96ed-4609-abb2-349a7fabd54f
abdulrehman9090/ConsoleApplication1
postfix_evaluation.cpp
//#include<iostream> //#include<string> //#include<ctype.h> //#include<math.h> //using namespace std; // // //class Node { //private: // int data; // Node* next; //public: // Node(int d); // Node* getNext(); // void setNext(Node* ptr); // int getData(); // void setData(int d); // void showData(); //}; // // //Node::Nod...
ALGO
0.999914
5.009565
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2023-09-12T16:30: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": "3469eb5ab...
8ba67c5c-1d51-4f03-b619-c7a4493dccf6
sodiumts/adventofcode2024
day3/part2.cpp
#include <fstream> #include <string> #include <vector> #include <stdexcept> #include <chrono> #include <cmath> #include <cctype> #include <utility> #include <print> bool isNum(const std::string &num) { for (char c: num) { if (!std::isdigit(c)) { return false; } } return true; } ...
ALGO
0.995367
5.427719
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-12-01T11:19: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": "2ce48e9576d...
a0fba8db-ea62-48e0-808a-63078951f6f4
AhmadDerieh1/c-project
ProjectOS2/ProjectOS2.cpp
#include "ProjectOS2.h" #include <iostream> #include <algorithm> #include <vector> using namespace std; extern "C" { PROJECTOS2_API void customSort(int* a, const int size) { sort(a, a + size); } PROJECTOS2_API void readInfo(int* a, const int size) { cout << "enter " << size << " numbers:"; ...
ALGO
0.99555
4.378139
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-08-17T19:57: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": "6154c48794a8...
a5a9ef7b-f1f4-4cec-bdee-1e0c2afa5013
akash4-sys/DSA
Leetcode/Medium/64.cpp
#include "../../headers.h" class Solution { public: int minPathSum(vector<vector<int>> &grid) { int m = grid.size(), n = grid[0].size(); vector<int> dp(m, grid[0][0]); for (int i = 1; i < m; i++) dp[i] = dp[i - 1] + grid[i][0]; for (int j = 1; j < n; j++) { ...
ALGO
0.999985
5.744254
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2022-07-17T09:39: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": "96d5f21e7c...
dc1207f9-dd4c-4c16-bdfb-b33a650ab7af
FraAlle/Coding
C++/3/Sorting_memory.cpp
#include <iostream> using namespace std; int main() { //take value cout<<"How much numbers u want to sort?"<<endl; int n_sort; cin>>n_sort; //check value if(n_sort<=0 || n_sort>=100){ cout<<"Not valuable number"<<endl; return 1; } //create memory int *tabptr = new int[...
ALGO
0.999377
3.973201
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-09-27T07:43: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": "2952097542f...
48b51c5d-38b0-4c33-a125-ad8fdcdc7ed4
xwlee9/cpp
leetcode/leetcode030_哈希.cpp
class Solution { public: vector<int> findSubstring(string s, vector<string>& words) { vector<int> res; if (s.empty() || words.empty()) return res; int n = words.size(); int m = words[0].size(); // 长度相同 int l = s.length() - (m * n); if (l < 0) return res; ...
ALGO
0.999907
5.794175
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2019-04-08T14:49: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": "317f183ce...
ded8df51-bbe9-4fef-930e-5e764955cf52
jczh98/ACM-Template
math/lagrange.cpp
const int N = 10005; LL inv[N], buf[N]; inline void init(int d) { inv[1] = 1; for (int i = 2; i < d; ++i) inv[i] = 1LL * (MOD - MOD / i) * inv[MOD % i] % MOD; } inline LL lagrange(LL *vals, LL d, LL x) { // d for deg + 1, x for required value if(x < d) return vals[x]; LL tmp = 1, ret = 0; for (int i...
ALGO
0.999951
3.973745
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-11-04T11:22: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": "d40cd633d1...
4ef54059-bc31-491e-9915-6bfa6cd4cdac
SWAGATSWAROOP/DSACN
Print2Darray.cpp
/* Print 2D Array Send Feedback Given a 2D integer array with n rows and m columns. Print the 0th row from input n times, 1st row n-1 times…..(n-1)th row will be printed 1 time. Input format : Line 1 : No of rows (n) and no of columns (m) (separated by single space) Line 2 : Row 1 elements (separated by space) Line 3 :...
ALGO
0.999966
4.299034
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2022-12-07T12:42: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": "cbedaba3b87...
aefce832-cfda-458a-b516-890236325410
Shintaro0105/Competitive-programming
atcoder/abc/259/d.cpp
#include <iostream> #include <vector> #include <set> #include <array> #include <cmath> #include <string> #include <algorithm> #include <functional> #include <map> #include <tuple> #include <queue> #include <stack> #include <bitset> #include <deque> #include <iomanip> #define rep(i,n) for(int i = 0;i < (n);i++) using na...
ALGO
0.99995
3.972159
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2024-01-17T08:06: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": "5b693c0955...
08c08bfe-cf32-44c4-bfdb-a903e84463dc
bizkut/warz-client
External/PhysX/Source/PhysXVehicle/src/VehicleUtilControl.cpp
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
TOOL
0.937988
6.229525
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-12-20T14:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 17, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ebacb407...
36817acb-0611-4d79-b04d-a03d115294af
lowkvel/leetcode
coding_interview_questions_cpp/q42.cpp
/* 连续子数组的最大和 输入一个整型数组,数组中的一个或连续多个整数组成一个子数组。求所有子数组的和的最大值。 要求时间复杂度为O(n)。 示例1: 输入: nums = [-2,1,-3,4,-1,2,1,-5,4] 输出: 6 解释: 连续子数组 [4,-1,2,1] 的和最大,为 6。 提示: 1 <= arr.length <= 10^5 -100 <= arr[i] <= 100 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/pro...
ALGO
0.999775
5.341762
{ "github_metadata": { "branch": "master", "commit_count": 268, "repo_created_at": "2020-10-22T09: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": "0014ba30...
4739627f-3eea-4acd-88cb-fc108c8d278e
HimanshuSingour/DSA---Full-Dynamic-Programming-
DP on String matching/Recursive/Edit_distance.cpp
#include<bits/stdc++.h> using namespace std; int solve(string s1 , string s2 , int i , int j){ // base case if(i < 0) return j + 1; if(j < 0) return i + 1; // Movement // if they match if(s1[i] == s2[j]){ return solve(s1 , s2 , i - 1 , j - 1); } // not match insert , delet , repl...
ALGO
0.999906
4.577785
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-31T10:29:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15705ee37f99...
1431e37b-95da-4ea5-958b-8a563fa9f15e
zakil-02/INF280-CompetitiveProgramming
week1/ExtremeTemperature/main.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> using namespace std; int main() { int N; cin >> N; // this is to read the number of days in the input cin.ignore(); // Ignore the newline character after N int min_temp = 51, max_temp = -51; // Initialize ...
ALGO
0.999866
4.931388
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-24T14:53: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": "8966f6f908ee...
4eb1d60e-ade5-4b79-ac2e-ccde395417ca
ONGOING-Z/Learn-Algorithm-and-DataStructure
OJ/LeetCode/leetcode/problems/257.cpp
#include <stdio.h> #include <vector> using namespace std; /* Leetcode */ /* 题目信息 */ /* * 257. Binary Tree Paths * Given a binary tree, return all root-to-leaf paths. * * Note: A leaf is a node with no children. * * Example: * * Input: * * 1 * / \ * 2 3 * \ * 5 * * Ou...
ALGO
0.999786
5.695467
{ "github_metadata": { "branch": "dev", "commit_count": 713, "repo_created_at": "2019-06-03T06:46:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3f11f1bea7e...
88e6c010-631a-48cc-9164-eaeef48951bf
kunna67/Practice-DSA
0019-remove-nth-node-from-end-of-list/0019-remove-nth-node-from-end-of-list.cpp
class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) { ListNode* newHead = reverse(head); // Whether the node to be removed is the last node or not if (n == 1) { return reverse(newHead->next); } ListNode* curr = newHead; ...
ALGO
0.99999
6.590494
{ "github_metadata": { "branch": "main", "commit_count": 1672, "repo_created_at": "2022-07-04T07:01:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c4bd4f6fe...
9d79da43-2104-436c-bc6d-bbcff1d4b1fb
ginkgo-project/ginkgo
reference/preconditioner/batch_scalar_jacobi.hpp
// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors // // SPDX-License-Identifier: BSD-3-Clause #ifndef GKO_REFERENCE_PRECONDITIONER_BATCH_SCALAR_JACOBI_HPP_ #define GKO_REFERENCE_PRECONDITIONER_BATCH_SCALAR_JACOBI_HPP_ #include "core/base/batch_struct.hpp" #include "core/matrix/batch_struct.hpp" namespace g...
ALGO
0.978026
7.092948
{ "github_metadata": { "branch": "develop", "commit_count": 8778, "repo_created_at": "2018-01-11T16:14:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 483, "forks": 97, "issues": 113, "pull_requests": 49 }, "file_meta": { "content_id": "3...
019bd4e3-61fd-4a37-9c30-2e2e359a7d45
HamidFsian/RPPG
DemoOpencv44/fft.cpp
bool FFT(int dir, int m, double *x, double *y) { long nn, i, i1, j, k, i2, l, l1, l2; double c1, c2, tx, ty, t1, t2, u1, u2, z; /* Calculate the number of points */ nn = 1 << m; /* Do the bit reversal */ i2 = nn >> 1; j = 0; for (i = 0; i < nn - 1; i++) { if (i < j) { tx = x[i]; ty = y[i]; x[i] = ...
ALGO
0.999792
5.076947
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-02-22T08:07:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "967f2b9beda...
155d8611-f479-40f9-8f19-f862eaee09d7
ishandutta2007/codeforces-a
amshz/normal/978/A.cpp
# include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair <int, int> pii; typedef pair < pair <int, int> , int> ppi; typedef pair < pair <int, int> , ll> ppll; typedef pair <ll, ll> pll; typedef string str; # define endl '\n' # define sep ' ' # defin...
ALGO
0.999985
3.877271
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c44f36d1a17a...
6d82f474-2330-4b0f-a868-a2d2233b91b4
huangkatherine7/wildfire-VIP
cs3451-computer-graphics-starter-code/assignments/a2/LoopSubdivision.h
#pragma once #ifndef __LoopSubdivision_h__ #define __LoopSubdivision_h__ #include <unordered_map> /* C++ std map */ #include <vector> /* C++ std vector */ #include "Mesh.h" /* mesh data structure */ #define Edge Vector2i /* data structure for an edge: Vector2 with each component as an integer */ #define Vertex ...
ALGO
0.998872
4.58167
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-09-17T19:39:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d85a58c971...
bfb611f8-64fa-4e3c-a166-5d558dfd31f2
szefany/acm-icpc
leetcode/word-break-ii.cpp
class Solution { #define foreach(i, v) for (__typeof((v).begin()) i = (v).begin(); i != (v).end(); ++ i) public: void solve(string& s, int n, unordered_set<string>& dict, vector<string>& answer, bool *available) { if (n < 0) { return; } string buffer = ""; for (int i = n...
ALGO
0.99984
5.002783
{ "github_metadata": { "branch": "master", "commit_count": 489, "repo_created_at": "2013-01-17T12:49: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": "a5da0f95...
df82e1fe-d03b-4bc6-b158-0f9c1436d6c6
Nima76/soteria
acc-aio/enc/main.cpp
//HOMOMORPHIC EVALUATION OF BINARY DECISION TREE FROM OPENFHE : SERVER SIDE #include "openfhe.h" #include <iostream> #include <filesystem> #include <string> #include <cmath> #include <chrono> #include <fstream> #include <iomanip> #include <ctime> // header files needed for serialization #include "ciphertext-ser.h" #...
DATA
0.974625
6.361681
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-06-09T09:39: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": "6256eeacc2b...
a9bb2218-4ca5-4a9e-9fde-2fe3f30a99b1
InternLM/lmdeploy
src/turbomind/kernels/gemm/thread_group_map.h
// Copyright (c) OpenMMLab. All rights reserved. #pragma once #include "src/turbomind/kernels/core/common.h" #include "src/turbomind/kernels/core/math.h" #include "src/turbomind/kernels/core/meta.h" #include "src/turbomind/kernels/gemm/thread_map.h" #include <iostream> namespace turbomind::gemm { template<int M_, ...
TOOL
0.961523
6.581876
{ "github_metadata": { "branch": "main", "commit_count": 1400, "repo_created_at": "2023-06-15T12:38:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6739, "forks": 578, "issues": 460, "pull_requests": 41 }, "file_meta": { "content_id": "07...
020704ff-3c8a-4d37-8c00-e4dd7d16cbff
Yohsi/advent_of_code
2021/14/main.cc
#include "aoclib.hpp" #include <ranges> struct Day14 : public Aoc { string s_input; umap<string, char> rules; explicit Day14(ifstream &f) : Aoc{f} { s_input = readLine(f); readLine(f); for (auto &&r: readLines(f)) { if (r.empty()) break; auto split = splitLine(r, " -> "); rules.emplace(split[0], sp...
ALGO
0.999871
5.640993
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-08-04T14:25: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": "ab0f21e7be42...
6b1184f6-4639-4d51-8790-7d6ef7d629f7
ShivamD27/CodeForces
CF_SportsMafia.cpp
// #include <bits/stdc++.h> // using namespace std; // #define ll long long // int main(){ // float n,k; // cin>>n>>k; // int sum=INT_MIN; // int cnt=0; // if(n==1 && k==1){ // cout<<0<<endl; // } // else if(k==0){ // cout<<ceil(n/2); // } // else{ // for(int i=1...
ALGO
0.999992
4.874506
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-05-06T14:16: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": "d9d220a8638...
49f96c4b-c598-4deb-8927-854a22a0a82d
drapz13/scripts-and-cmptprog
Competitive Coding/Misery of Jar Jar Binks.cpp
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define _ ios_base::sync_with_stdio(false);cin.tie(0); #define __ int t;cin>>t;while(t--) #define endl '\n' #define ispow2(n) (n&&(!(n&(n-1)))) ///check if its perfect power of 2 using namespace std; template <typename T> T modpow(T base, T exp) { ...
ALGO
0.999619
3.820214
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2015-11-30T16:47: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": "88443d3529...
2d87be16-0192-4734-b8df-d841d30607fb
Atik203/C_and_CPP
DSA/Algorithms/Stack/stack_uisng_queue.cpp
#include <bits/stdc++.h> using namespace std; class Stack { queue<int> q1; queue<int> q2; int n; public: Stack() { n = 0; } void push(int val) { q2.push(val); n++; while (!q1.empty()) { q2.push(q1.front()); q1.pop(); ...
ALGO
0.999117
4.739661
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2023-04-04T13:32: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": "04b19ff5...
fc34a6fd-1a07-4223-9d33-c56be383b802
PauloMiranda98/Competitive-Programming-Algorithm
Online Judge/Gym/2020, XIII Samara Regional Intercollegiate Programming Contest/B.cpp
#include <bits/stdc++.h> #define F first #define S second #define EB emplace_back #define INF 0x3f3f3f3f #define INFLL 0x3f3f3f3f3f3f3f3fLL #define all(x) x.begin(),x.end() #define endl '\n' #define W(x) cerr << "\033[31m"<< #x << " = " << x << "\033[0m" << endl; using namespace std; typedef long long ll; typedef p...
ALGO
0.999985
3.892543
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-12-27T20:06:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a72b1923...
9e3b790e-ee37-48d2-93f9-6785525ef6ae
tejastg007/problems
sort/bubbleSort.cpp
// bubble sort // passes- n-1 // compare every element with next and swap by order. // this way, the largest element will be placed at the end by each pass. // time comp- o(n^2); #include <bits/stdc++.h> using namespace std; int printA(int a[], int n) { for (int i = 0; i < n; i++) { cout << a[i] << "...
ALGO
0.999707
4.742882
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-04-13T18:24: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": "4a449d0bb4fe...
032d53cc-23e3-49ba-8432-24d9fe255bec
reo0105/atcoder
contest/2022_10_29_beginer/E.cpp
#include <iostream> #include <vector> using namespace std; typedef long long ll; #define MOD 998244353 ll gcd(ll a, ll b) { if (a % b == 0) { return b; } else { return gcd(b, a%b); } } ll modpow(ll a, ll n, ll mod) // a^n modを求める { ll res = 1; while (n > 0) { if (n & 1) res =...
ALGO
0.99999
4.426867
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2023-02-12T12:34: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": "2456cbaf1e4...
c041f959-3d22-4566-b930-66774797540d
arthurvtrr/AA-Problems-Solved
To Define/foxanddinner.cpp
#include <bits/stdc++.h> using namespace std; #define INF 2000000000 int nodes = 220, ini, fim; int dist[220], q[220], work[220]; bool visited[220]; int nums[220]; struct Edge { int to, rev, flowe, cap; }; vector < Edge > graph[220]; void addEdge(int from, int to, int cap) { Edge a = {to, graph[to].size()...
ALGO
0.999867
3.404832
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2015-09-18T11:53:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a92085ff...
384a7e82-a371-4925-9d4e-4d5680b18f34
aufanam/Competitive-Programming
B_Difference_of_GCDs.cpp
#include <bits/stdc++.h> #define int long long #define fi first #define se second #define all(x) (x).begin(), (x).end() using namespace std; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int n, l, r; ...
ALGO
0.999772
3.329044
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-10-03T09:13: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": "96993c9734...
56a1fd68-33a3-456b-bd9d-d5ec96389780
hyb148/onlyVanet
src/veins/modules/analogueModel/JakesFading.cc
// // This program 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 License, or // (at your option) any later version. // // This program is distributed in the hope that it will...
ALGO
0.997502
5.503141
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-11-27T09:39:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8a54d6e19...
89029016-f2aa-4a31-ab54-3f3142352a02
nickYDQ/DataStructure
USF/ufsmain.cpp
// From the software distribution accompanying the textbook // "A Practical Introduction to Data Structures and Algorithm Analysis, // Third Edition (C++)" by <NAME>. // Source code Copyright (C) 2007-2011 by <NAME>. // Implementation and test driver for UNION/FIND implemented with a // parent-pointer tree. This versi...
ALGO
0.995814
5.186376
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-12-18T15:26: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": "2e47b9dfe0...
6351a696-819a-4dbc-97b6-89f185221d5a
ishandutta2007/codeforces-w
wifiiii/normal/1481/C.cpp
#include<bits/stdc++.h> typedef long long ll; using namespace std; int main() { ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); int t; cin>>t; while(t--) { int n,m; cin>>n>>m; vector<int> a(n),b(n),c(m),ans(m); for(int i=0;i<n;++i) cin>>a[i]; for(int i=0;i<n;++i...
ALGO
0.999982
3.571079
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34: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": "cab3868576e5...
cd1e5cab-ab7d-481f-8ed5-49673626ebc1
carmenazorinm/DGIIM
Quinto/Metahueristicas/Practica 1/software/src/src/localsearch.cpp
#include "lsall.h" #include "blsmall.h" #include <cassert> #include <iostream> #include <util.h> #include <snimp_problem.h> #include <algorithm> #include <random> using namespace std; // devuelve un vector con todos los vecinos posibles de la solución actual vector<pair<int, int>> generarVecinosAleatorios(const tSolu...
ALGO
0.999954
5.284318
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2023-02-25T20:05: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": "850dee8f28...
d517f168-9cbf-4f70-927d-6e33dde7ce42
alu0101469317/ALGORITMOS-Y-ESTRUCTURAS-DE-DATOS-AVANZADAS
p2/bigint.h
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <map> #include <cmath> #include <fstream> #include <sstream> #include <stack> #include <bitset> // Base = 8 // N1 = 07563245624 // N2 = 3247125454 // N3 = 254565775 // E1 = N1 N2 * // E2 = E1 N3 - // E3 = E1 E2 N1 + * // E4 = N2 N1 ...
ALGO
0.998841
3.642124
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-07-30T09:24:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00580c8f7e8d...
4e5975cd-e677-4da3-87b9-cb84fd48a593
322492/MIA22
MIA22 - 14/A - Wilbur and Swimming Pool.cpp
#include <bits/stdc++.h> using namespace std; #define x first #define y second const int MAX = 10000; pair<int, int> p[5] = {{MAX, MAX}}, ld, lu, rl, ru; int Mx = -MAX, mx = MAX, My = -MAX, my = MAX; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; for (...
ALGO
0.999924
4.141696
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-02-13T09: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": "b4dc360d8f...
5b1eaa86-0813-4c43-a587-0289853b3243
kacper-ziemecki/Competitive-Programming
Codeforces Problems/1795A.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define ll long long #define ld long double #define ull unsigned long long void dbg_out() { cout << endl; } template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cout << ' ' << H; dbg_out(T...); } #define dbg(...) cout << "(" << #__VA...
ALGO
0.999984
4.261915
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-01-15T13:22: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": "d36cd37ee107...
73673ec8-2c7c-4780-9862-b0efba014889
tridibsamanta/LeetCode_Solutions
MinimumNumberofRemovalstoMakeMountainArray_1671.cpp
/* ~ Author : https://leetcode.com/tridib_2003/ ~ Problem : 1671. Minimum Number of Removals to Make Mountain Array ~ Link : https://leetcode.com/problems/minimum-number-of-removals-to-make-mountain-array/ */ // The result is = total number of elements in the given array - the longest bitonic subsequence len...
ALGO
0.999934
5.948296
{ "github_metadata": { "branch": "master", "commit_count": 408, "repo_created_at": "2020-03-06T13:29:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54ca23fd...
eda412e5-6331-4917-8e86-872729cc10a3
newtorob/CS161
Week4/smallSort.cpp
/********************************************************************* ** Author: <NAME> ** Date: 07/07/2016 ** Description: smallSort.cpp- This program takes 3 integers from the user then sorts them in ascending order. We are using a void function and calling that function in the main function. ***********************...
ALGO
0.999059
4.775998
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-09-21T04:46: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": "3faf4fee3b...
b3932b45-22e3-44cc-94f0-e0c8a301379a
skyline-nju/KM
activeKM2_MPI/integrate2D.h
#pragma once #include <cmath> #include "particle2D.h" #include "node.h" class MotileOscillatorEM { public: MotileOscillatorEM(double h, double D_theta, double D_psi, double v0) : h_(h), D_theta_(std::sqrt(24 * D_theta * h)), D_psi_(std::sqrt(24 * D_psi * h)), v0_(v0) {} template <class TPar, class TDomain, c...
ALGO
0.998194
5.429521
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2025-04-27T07:42: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": "03620367d5a...
8dc606ee-15fa-4004-a4aa-da46b16e9887
wkqkel/ps_2024
백준/Gold/5430. AC/AC.cc
#include <iostream> #include <deque> using namespace std; const int MX = 100002; int arr[MX]; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int T, n; cin >> T; for(int t = 0; t < T; t++){ string cmd; cin >> cmd >> n; deque<int> dq; ...
ALGO
0.999375
4.811369
{ "github_metadata": { "branch": "master", "commit_count": 587, "repo_created_at": "2024-01-02T14:50: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": "78cfabe0...
8e834565-00b7-42da-b74d-d79d64ca0491
streptoeoz/ThreadMill
src/threadmill/digital_filter.cpp
#include <digital_filter.h> #include <iostream> DigitalFilt::DigitalFilt():A_dg(5,0), B_dg(5, 0), input(5, 0), output(5, 0) { A_dg = {1.000000000000000e+00, -2.424652148014002e+00, 2.158880722275586e+00, -8.40791461848115e-01, 1.21259541582703e-01}; B_dg = {1.1712603903505594e+01, -2.1610718269080696e+01, -1.5...
ALGO
0.995911
4.770076
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-03-18T10:00: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": "f41ba5128...
22496bde-2e7e-4cff-9e9f-fb370459f681
dl8sd11/online-judge
tioj/1998.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i,n) for(int i=0;i<n;++i) #define REP1(i,n) for(int i=1;i<=n;++i) #define SZ(i) int(i.size()) #ifdef tmd #define IOS() #define debug(...) fprintf(stderr,"#%d: %s = ",__LINE__,#__VA_ARGS__),_do(__VA_ARGS__); template<typename T> void _do(T &...
ALGO
0.995027
4.273871
{ "github_metadata": { "branch": "master", "commit_count": 332, "repo_created_at": "2017-11-19T05:47:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d30b562...
b58c39e8-7a76-4167-8b4a-17ab6a584882
thu-pacman/GraphPi
src/performance_compare_test.cpp
#include <../include/graph.h> #include <../include/dataloader.h> #include "../include/pattern.h" #include "../include/schedule.h" #include "../include/common.h" #include "../include/motif_generator.h" #include <assert.h> #include <iostream> #include <string> #include <algorithm> void test_pattern(Graph* g, Pattern &p...
ALGO
0.990668
4.521875
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2020-09-01T10:08:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 40, "forks": 13, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "713095f...
ae6acf15-bb7f-42b4-b081-ec4f0510ad8c
narenmanoj/USACOTP
Chapter 2/prefix/prefix.cpp
/* TASK: prefix LANG: C++11 */ #include <iostream> #include <unordered_set> #include <fstream> #include <vector> using namespace std; unordered_set<string> primitives; string target = ""; ifstream infile("prefix.in"); ofstream outfile("prefix.out"); void readInput() { string x; infile >> x; while(x != ".") { ...
ALGO
0.999417
3.770262
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2015-03-19T20:33:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f504b736...
e810e059-ca6f-4240-9028-c106e4cdd72d
Infinite-Loop-KJSIEIT/Advanced-Data-Structures
Map/Caesar.cpp
#include<iostream> #include<map> #include<string> using namespace std; std::map<char, int> C; char *A; void fetch(std::string&, int&); int main() { int I = 0; A = new char[26]; for(char c = 'a'; c <= 'z'; c++) // Lower case words only. { A[I] = c; C[c] = I++; } do { std::string S; int o; ...
ALGO
0.999289
3.890766
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-12-09T19:23:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0ac8b5352...
efea4548-85ef-4a17-ad40-929b180d2c6d
ishandutta2007/codeforces-f
frame233/normal/1353/D.cpp
// Author -- Frame #include<bits/stdc++.h> #define lowbit(x) ((x)&(-x)) #define Finline __inline__ __attribute__ ((always_inline)) #define DEBUG fprintf(stderr,"Running on Line %d in Function %s\n",__LINE__,__FUNCTION__) #define SZ(x) ((int)x.size()) #define mkpr std::make_pair #define pb push_back typedef long long...
ALGO
0.999898
3.826769
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "07e9a0508c08...
c7250ec4-4794-4222-adcd-9dbf4901daa5
dhrubo326/randomcollection
getBSpivot.cpp
#include <bits/stdc++.h> using namespace std; // loop implementation int getPivot(vector<int>arr){ int n = arr.size(); int start = 0; int end = n-1; while(start<end){ int mid = start+(end-start)/2; if(mid > 0 && arr[mid] < arr[mid-1]) return mid; if(mid < n-1 && arr[mid] > arr[mid+1]) return mid+1; // ch...
ALGO
0.999989
5.29246
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-12T22: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": "7cfae2976a44...
89acda2d-3ba0-4895-b39a-7d714c650f30
yashita-jain/60DaysofDsa
tree/Binary Search Tree/BinarySearchUse.cpp
#include <bits/stdc++.h> #include "BinarySearchNode.h" using namespace std; BinarySearchNode<int> *takeInputLevelWise() { cout << "Enter the data of root" << endl; int rootData; cin >> rootData; BinarySearchNode<int> *root = new BinarySearchNode<int>(rootData); queue<BinarySearchNode<int> *> pendi...
ALGO
0.999969
3.609621
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2021-09-14T16:31: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": "7514db49e...
c5695217-4426-4558-b42d-973559bc457d
saadam1n/CompCodeSolutions
USACO/Unorganized/Bronze/DaisyChains/Solution.cpp
#include <iostream> #include <vector> int main() { int n; std::cin >> n; std::vector<int> Petals(n); for(int& x : Petals) { std::cin >> x; } int Answer = 0; for(int i = 0; i < n; i++) { for(int j = i; j < n; j++) { int Sum = 0; for(int k = i; k <= ...
ALGO
0.999986
4.826895
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2022-12-25T07:19: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": "2614125f3...
95a16be7-f2db-4e9f-83bd-f571d1eb8b91
SightVanish/MyLeetcode
task1711.cpp
/* * @Description: meduim * @Author: LiWuchen * @Github: https://github.com/SightVanish * @Date: 2021-07-07 11:30:05 * @LastEditors: LiWuchen * @LastEditTime: 2021-07-15 18:40:48 * @FilePath: /Leetcode/task1711.cpp */ // A good meal is a meal that contains exactly two different food items with a sum of delicio...
ALGO
0.999954
5.638394
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2022-04-14T04:16: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": "399159de57...
59a15642-abca-40f3-93f1-fffe42e421ca
keithbugeja/illuminaPRT
Core/Shape/KDTreeMesh.cpp
//---------------------------------------------------------------------------------------------- // Filename: KDTreeMesh.cpp // Author: <NAME> // Date: 27/02/2010 //---------------------------------------------------------------------------------------------- //--------------------------------------------------------...
ALGO
0.996964
5.882924
{ "github_metadata": { "branch": "master", "commit_count": 409, "repo_created_at": "2017-04-04T15:48: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": "c30ce240...
7c42aeb3-947e-4e4c-8f91-c88f088f287b
ironman1990Tony/leetCodeFirstEdition
Binary Tree Level Order Traversal/Binary Tree Level Order Traversal/Binary Tree Level Order Traversal.cpp
// Binary Tree Level Order Traversal.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <vector> #include <queue> #include <iostream> using namespace std; //Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; //TreeNod...
ALGO
0.999949
4.90044
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-02T06: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": "bf455436d1...
e373b910-794c-49a6-9981-8ef7c3d046ec
Songeziwe/CSC3022H-PCA
pca.cpp
#include <string> #include <sstream> #include <iostream> #include <fstream> #include <armadillo> #include "pca.h" namespace SBSSON002 { using namespace std; using namespace arma; // Default constructor Pca::Pca(void){ init_array(); } // destructor Pca::~Pca(void){ if(...
DATA
0.959876
5.803859
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-08-03T19:28:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7027cd5a14...
62facfcb-799c-49c6-9085-242c1b350f33
frank-shema/cpp-exercises
43rd.cpp
#include <iostream> #include <vector> int isAllPossibilities(int arr[], int len) { std::vector<int> possibilities(len, 0); for (int i = 0; i < len; i++) { if (arr[i] < 0 || arr[i] >= len) { return 0; } possibilities[arr[i]] = 1; } for (int i = 0; i < len; i++) { ...
ALGO
0.993521
5.583045
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-10-24T14:50: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": "943b5fbe7921...
2c43a4f9-5b89-4f52-acf1-940a09ea7d8f
anuprajput974/Coding_leetcode
0725-split-linked-list-in-parts/0725-split-linked-list-in-parts.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: vector<ListNode*> spl...
ALGO
0.999743
6.436941
{ "github_metadata": { "branch": "main", "commit_count": 321, "repo_created_at": "2025-02-18T13:35:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b84b4d883...
0607b14c-a0ac-45d8-a9a2-ddf6a23ea68f
Samirjethva734/Sam
BOOP4-4.cpp
#include <iostream> using namespace std; int max(int a, int b, int c) { if (a > b && a > c) { return a; } else if (b > c && b > a) { return b; } else if (c > a && c > b) { return c; } } string max(string p, string q, string r) { int lp = p.length(); int lq = q.length()...
ALGO
0.999278
3.44646
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-04T13:54: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": "6801f03f2c1f...
200ace6e-092c-4730-a2f0-e688486ea834
sanchit-sinha/CP
Random-Submissions/Random-Problems/Codeforces - Codeforces Round #672 (Div. 2)/C2. Pokémon Army (hard version)/sol.cpp
/** * author: <NAME> * created: 26.09.2020 12:56:19 **/ #include "bits/stdc++.h" using namespace std; #define ll long long inline ll gcd(ll a,ll b) {if(b==0)return a;a%=b;return gcd(b,a);} inline ll max(ll a,ll b) {return((a>b)?a:b);} inline ll min(ll a,ll b) {return((a>b)?b:a);} ll powermod(ll x,ll e...
ALGO
0.999957
4.615043
{ "github_metadata": { "branch": "master", "commit_count": 383, "repo_created_at": "2020-07-18T07:42:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2596da04...
0a50df05-a58d-4502-a9f3-7f98cf689d0d
nathansttt/hog2
environments/MotionCaptureMovement.cpp
// // MotionCaptureMovement.cpp // hog2 glut // // Created by <NAME> on 11/9/13. // Copyright (c) 2013 University of Denver. All rights reserved. // #include "MotionCaptureMovement.h" const double worldSize = 20; const double goalTolerance = 0.5; struct mcData { float turnSpeed; float xOffset, yOffset, zOffset...
ALGO
0.941911
3.641288
{ "github_metadata": { "branch": "PDB-refactor", "commit_count": 2251, "repo_created_at": "2015-08-19T21:02:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 117, "forks": 62, "issues": 9, "pull_requests": 1 }, "file_meta": { "content_id":...
21a387e8-5853-4d7c-abb6-19d75911f56e
Sasyami/compGraphicsMephiDz
lab4/firstlab.hpp
#ifndef HEADER_HPP41 #define HEADER_HPP41 #include <iostream> #include <cmath> #include<vector> #include "opencv2/opencv.hpp" #include "opencv2/core.hpp" #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include "../lab3/firstlab.hpp" double line(double p0, double p1, double t) { retu...
ALGO
0.969553
4.254074
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-10-09T15:44: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": "994cb9f2216...