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
7a3923ae-9f2c-4050-ade7-0689254d3c8e
Giangattt123/DSA_PTIT
Generation algo/HoanViKeTiep1.cpp
//#include <bits/stdc++.h> //using namespace std; //int n , a[1000]; //void sinh(){ // int i = n - 1; // while(i >= 1 && a[i] > a[i + 1]){ // --i; // } // if(i == 0){ // for(int i = n ; i >= 1 ; i--) // cout << a[i] << " "; // } // else{ // int j = n; // while(a[i] > a[j]) --j; // swap(a[i] , a[j]); // revers...
ALGO
0.99997
4.429584
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2023-02-17T15:47: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": "415d74b6a9...
a4a98349-7f47-4d1d-a6a5-5669242e3425
taqu/BoundingVolumeHierarchy
MedQBVH.h
#ifndef INC_ACCEL_MEDQBVH_H__ #define INC_ACCEL_MEDQBVH_H__ /** @file MedQBVH.h @author t-sakai @date 2018/01/22 create */ #include "accel.h" namespace accel { template<class PrimitiveType, class PrimitivePolicy = PrimitivePolicy<PrimitiveType> > class MedQBVH { public: static constexpr f32 Eps...
ALGO
0.993527
4.428241
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2015-09-13T23:17:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f253d56...
90d39dc3-d811-45ec-88ce-185051199ba1
paesanilab/MBX
src/potential/4b/energy4b.cpp
/****************************************************************************** Copyright 2019 The Regents of the University of California. All Rights Reserved. Permission to copy, modify and distribute any part of this Software for educational, research and non-profit purposes, without fee, and without a written agre...
ALGO
0.996452
3.97587
{ "github_metadata": { "branch": "master", "commit_count": 2662, "repo_created_at": "2016-04-22T23:24:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 41, "forks": 32, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "1ad2b4...
c6b21d27-ac2d-4e11-97d9-a22939a42f64
BCon160/EducationalWork
CS319/Week 9/pageRank/Matrix.cpp
// File: Lab6-Matrix.cpp (version: Week 08) // Description: Methods for the matrix class, including operator overloading(specifically overloading the / operator) // Author: <NAME> // Modified by: <NAME> // ID: 12370346 // Date: 14/03/2015 #include <iostream> #include "Vector.h" #include "Matrix.h" using namespace std...
ALGO
0.988397
4.117978
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-10-14T11:09:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "37cab9922...
58a06e8d-6165-46de-a0e5-1310beb6cd1c
a5batra/LeetCode-Solutions-in-C-plus-plus
shortestDistanceToACharacter.cpp
// // Created by <NAME> on 7/21/21. // /* Given a string s and a character c that occurs in s, return an array of integers answer where answer.length == s. * length and answer[i] is the distance from index i to the closest occurrence of character c in s. * The distance between two indices i and j is abs(i - j), wher...
ALGO
0.999961
6.263571
{ "github_metadata": { "branch": "master", "commit_count": 406, "repo_created_at": "2020-02-29T03:15: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": "e7e44634...
a0c5d6b1-04fe-423e-9113-d1d370339b54
Nemo21/Class-Test-ST-2
StackFinal/FalseFriends.cpp
#include <bits/stdc++.h> #include <vector> #include <stack> #include <stdlib.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define ff first #define ss second #define pii pair<ll, ll> #define vi vector<ll> #define vt(type) vector<type> #define si set<ll> int main() { int tes...
ALGO
0.999967
4.433202
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-26T05:00: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": "1d7cf9a720ca...
93f83c7e-1038-4bdb-832e-35e49e8e1738
deepankarvarma/DSA-Self-Practice--Leetcode--Codechef--DSA-Sheet-
Linked_Lists-GFG/SinglyLL/CLL_Traversal.cpp
// C++ program to illustrate creation // and traversal of Circular LL #include <bits/stdc++.h> using namespace std; // Structure for a node class Node { public: int data; Node* next; }; // Function to insert a node at the // beginning of Circular LL void push(Node** head_ref, int data) { Node* ptr1 = new Node(); ...
ALGO
0.99929
6.294296
{ "github_metadata": { "branch": "master", "commit_count": 306, "repo_created_at": "2022-07-08T08:54: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": "c55b4a6d...
99f53bf2-1faa-4ff4-bdcd-69e6606d50c3
VinhTungg/PTIT_DSA
DSA11001 - CAY BIEU THUC 1.cpp
#include <bits/stdc++.h> #define ll long long #define boost ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define MOD 1000000007 using namespace std; int t = 1; struct Node{ char data; Node *left, *right; }; Node *makeNode(char x){ Node *newNode = new Node(); newNode->data = x; ...
ALGO
0.999977
4.662635
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-04-05T08:06:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33267cd7b3a2...
dbfed495-b656-46a9-9de2-d1226969fe4c
ia7ck/competitive-programming
Codeforces/GR023/c/main.cpp
#include <iostream> #include <algorithm> #include <tuple> #include <vector> #define REP(i, n) for (int i = 0; i < (int)n; i++) using namespace std; void solve(int n, const vector<int> &a) { vector<tuple<int, int>> di; REP(i, n - 1) { di.emplace_back(a[i] - a[i + 1], i); } sort(di.begin(), di.e...
ALGO
0.999969
3.723091
{ "github_metadata": { "branch": "master", "commit_count": 1235, "repo_created_at": "2018-09-24T11:32:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 32, "pull_requests": 0 }, "file_meta": { "content_id": "000042...
b9e19cb6-d850-4eed-ab63-b7073a9e6d3e
AvAkanksh/LeetCode-90-days-Challenge
0107-binary-tree-level-order-traversal-ii/0107-binary-tree-level-order-traversal-ii.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999994
5.85807
{ "github_metadata": { "branch": "main", "commit_count": 1062, "repo_created_at": "2022-10-22T00:48: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": "b945ffe77...
d9675cb6-47aa-4cb5-b1c0-f29f9a23492c
wenbowen123/BundleTrack
src/Thirdparty/igl/copyleft/cgal/subdivide_segments.h
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2016 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2....
ALGO
0.998066
5.585876
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-10-12T02:03:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 659, "forks": 70, "issues": 11, "pull_requests": 1 }, "file_meta": { "content_id": "07fc64...
0f30cf68-088a-49bb-8839-8000fbad8ad5
Teffluvium/projecteuler
src/problem_099/problem_099.cpp
/* * Problem 99 from ProjectEuler.net * Comparing two numbers written in index form like 2^11 and 3^7 is not * difficult, as any calculator would confirm that 211 = 2048 < 37 = 2187. * * However, confirming that 632382^518061 > 519432^525806 would be much more * difficult, as both numbers contain over three mil...
ALGO
0.998882
4.92967
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2015-03-14T05:41:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da03b8b4e...
b5a65cd4-a059-4ac1-a1b4-40843699c7d0
SytnykDima/Lab_works
Lab_6/Lab_6_ex_1.cpp
#include <iostream> #include <string> #include <iomanip> #include <stdlib.h> // Для функцій rand() і srand() #include <cstdlib> // Для функцій rand() і srand() #include <ctime> // Для функцій time() using namespace std; int main() { srand(time(NULL)); const int N = 10; const int M = 10; int n, m;...
ALGO
0.986853
3.409671
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-01-27T17:54:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4d38b3c0c0...
e5bfbb05-b936-4c35-8ae7-31a67490e42d
FeiZhu/RealTimeExampleBasedLBDeformer
src/optpp/include/OptNIPSLike.h
#ifndef OptNIPSLike_h #define OptNIPSLike_h /*---------------------------------------------------------------------- Copyright (c) 2001, Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive license for use of this work by or on behalf of the U.S. Government. <NAME>, Sand...
TOOL
0.986366
6.175192
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2015-08-25T14:37:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93d598e3...
786819f6-81a8-4afa-9a2a-a7a580930fe9
hari9608/LeetCode
Easy/496. Next Greater Element I.cpp
/* 496. Next Greater Element I Easy 6.2K 440 company Amazon company Bloomberg company Microsoft The next greater element of some element x in an array is the first greater element that is to the right of x in the same array. You are given two distinct 0-indexed integer arrays nums1 and nums2, where nums1 is a subset ...
ALGO
0.999812
5.95042
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-02-20T12:42:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2d0cb86f27...
1af944d4-1fbd-4115-bff3-7750a62206e5
limanjun99/chess-bot
src/chess/include/chess/board.h
#pragma once #include <concepts> #include <optional> #include <string_view> #include <vector> #include "bitboard.h" #include "move_container.h" #include "player.h" namespace chess { // clang-format off template <typename T> concept IsRepetitionTracker = requires(T repetition_tracker) { { repetition_tracker.is_rep...
ALGO
0.985022
7.26091
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2024-01-04T11:05: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": "b5fa33f8da3...
d6f8072a-36dc-48e7-873b-aacd1a75ff15
olisheldon/aoc24
cpp/day21.cpp
#include <iostream> #include <fstream> #include <vector> #include <queue> #include <map> #include <set> #include <string> #include <algorithm> #include <tuple> #include <functional> #include <cctype> // For isdigit // Keypad definitions const std::vector<std::vector<std::string>> NUM_KEYPAD = { {"7", "8", "9"}, ...
ALGO
0.999888
6.13735
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2024-11-30T18: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": "541e2c076ef...
f934166f-eb89-4a7f-a09e-1d1611a27e26
KapystaSt/HomeWorkCPP
Symbol search (for + switch)/Symbol search (for + switch).cpp
#include <iostream> #include <string> using namespace std; int main() { string str; char searchChar; cout << "Введіть рядок: "; getline(cin, str); cout << "Введіть символ для пошуку: "; cin >> searchChar; int positions[100]; int count = 0; for (int i = 0; i < s...
ALGO
0.999488
5.719211
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-11-23T22:13: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": "e3bc19f6273...
07c5010b-53fa-481b-9276-dfd532dcc3d8
Luattapcode/Fubonong
Hanh/PRE_MINE.cpp
/*The best way to get something done is to begin*/ #include <bits/stdc++.h> #define ll long long #define int long long #define fr(i,a,b) for(int i=a;i<=b;i++) #define frd(i,a,b) for(int i=a;i>=b;i--) #define pb push_back #define fi first #define se second #define TASK "PRE_MINE" #define openfile if(fopen(TASK".inp","r"...
ALGO
0.999934
3.526428
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-08-06T09:59: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": "169d60a08bb...
a8657f5a-924c-4d9f-a897-45f449d2faed
godotengine/godot
thirdparty/msdfgen/core/edge-segments.h
#pragma once #include "Vector2.hpp" #include "SignedDistance.hpp" #include "EdgeColor.h" namespace msdfgen { // Parameters for iterative search of closest point on a cubic Bezier curve. Increase for higher precision. #define MSDFGEN_CUBIC_SEARCH_STARTS 4 #define MSDFGEN_CUBIC_SEARCH_STEPS 4 /// An abstract edge se...
ALGO
0.997656
5.890975
{ "github_metadata": { "branch": "master", "commit_count": 76043, "repo_created_at": "2014-01-04T16:05:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 98972, "forks": 22820, "issues": 5000, "pull_requests": 3866 }, "file_meta": { "content...
6c805fa3-b28e-4eb2-9a84-07bc9c98ec84
YuvrajKathpalia/sde_sheet
longest_consecutive_sequence.cpp
https://leetcode.com/problems/longest-consecutive-sequence/ //brute... //n square.. #include <bits/stdc++.h> using namespace std; bool linearSearch(vector<int>&a, int num) { int n = a.size(); //size of array for (int i = 0; i < n; i++) { if (a[i] == num) return true; } return...
ALGO
0.999979
5.969993
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-10-16T22:42: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": "536ee9ff67a...
c4c224aa-8c0c-4c72-872c-64fa2e49e513
RanjanBa/Challenges
Kick Start/2020/Round B/d.cpp
#include<bits/stdc++.h> using namespace std; #define ld long double //typedef long double ld // non optimize solution mle error //void solve() { //cout << fixed << setprecision(9); //int w, h, l, u, r, d; //cin >> w >> h >> l >> u >> r >> d; //l--, u--, r--, d--; //vector<vector<ld>> grid(h, vector<ld>(w));...
ALGO
0.98983
3.991979
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-08-25T15:20: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": "149132ebb...
b967a2d7-dc76-43cb-9ad6-2304eb2038f9
junsu1211/Algorithm
백준/Silver/3085. 사탕 게임/사탕 게임.cc
#include <iostream> #include <string> #define MAX_SIZE 50 using namespace std; typedef struct { char c[MAX_SIZE][MAX_SIZE]; }starray; int sum = 0; void searchr(int N, starray* st, int i, int w) { sum++; //하나 획득 if (st->c[i][w] == st->c[i][w + 1] && w+1 < N) { // 우측에 사탕 색이 같으면 searchr(N, st, i, w + 1); } } vo...
ALGO
0.999915
3.914712
{ "github_metadata": { "branch": "main", "commit_count": 141, "repo_created_at": "2024-01-01T16:38:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4fe8f38cf7...
de73e8d5-5b97-43bf-9961-6a6765828c53
lballabio/QuantLib
ql/pricingengines/vanilla/jumpdiffusionengine.hpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2004 <NAME> Copyright (C) 2007 StatPro Italia srl This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free softwar...
ALGO
0.999387
7.443901
{ "github_metadata": { "branch": "master", "commit_count": 17543, "repo_created_at": "2015-12-17T16:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6151, "forks": 1964, "issues": 51, "pull_requests": 11 }, "file_meta": { "content_id":...
3c2abdaf-a350-40ed-9a9e-dfd1e3406c66
baralsamrat/MSCS531_Assignment5
src/part2_DLP_SIMD/simADD.cpp
// Run: g++ -mavx simADD.cpp -o simADD #include <immintrin.h> // For AVX instructions #include <iostream> void simADD(float* a, float* b, float* result, int size) { for (int i = 0; i < size; i += 8) { // Load 8 floats from each array into AVX registers __m256 vec1 = _mm256_loadu_ps(&a[i]); ...
ALGO
0.998189
6.193151
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-11-03T19:05: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": "8632fc3f59f9...
f648b8a9-b07c-41c5-9141-e7eaa004a72d
suganthangnanavelan/Work-Done-In-College
Data Structures/UnorderedSLLWithoutHeader.cpp
//Single Linked List #include<iostream> using namespace std; struct node{ int data; node *link; }; class SLL{ private: node *first; public: SLL(){ first=NULL; } void insertatbegin(int data){ node *t=new node; t->data=data; ...
ALGO
0.999719
4.371518
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-06-30T13:09:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63429a040e83...
324c451b-85fa-4312-b029-feb6c701ef79
ishandutta2007/codeforces-y
yp155136/normal/1466/G.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1000000007; const int ZVALUE_SIZE = 1000006 + 106; const int N = 100006; struct Z_VALUE { string s; int l, r, z[ZVALUE_SIZE]; void solve(string _s) { s = _s; l = 0, r = 0; for (int i = 0; i < s.size(); ++i) { ...
ALGO
0.999924
4.46361
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40: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": "b72c78a158af...
543bbd6b-a08a-46ee-a0cd-3e48c21baf23
risia/CUDA-SPICE-Circuit-Sim
CUDA_SPICE_Circuit_Sim/CUDA_SPICE_Circuit_Sim/helpers.cpp
#include "helpers.h" float** mat2D(int m, int n) { float** mat = (float**)malloc(m * sizeof(float*)); for (int i = 0; i < m; i++) { mat[i] = (float*)malloc(n * sizeof(float)); for (int j = 0; j < n; j++) { mat[i][j] = 0.0f; } } return mat; } float* mat1D(int n) { float* mat = (float*)malloc(n * sizeof(...
TOOL
0.919032
4.729369
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2018-11-09T16:58:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47a04e80...
868ff55f-e0cf-467d-ae34-2086d0b71ccc
Kushendra1/CSCI-335-HWs
Homework5/FindPaths.cc
/* <NAME> CSCI 335 Prof Raja Assignment 5 This file for part 2 of the assignement re uses the openFile function and makeGraph funtion from part 1's CreateGraphAndTest file. Using them to read in a file of edges and making a graph from them, Dijkstra's Algorithm is called on the newly made graph in pathfindDriver where...
ALGO
0.991696
4.521832
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-09-16T03:18: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": "59b3a11b70cf...
2efed095-b39b-4584-8d0e-2094c806329f
fuboki10/CompetitveProgrammingSolutions
CodeForces/B.Effective_Approach.cpp
// Fub0ki #include <bits/stdc++.h> #include <unordered_map> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int, int> ii; typedef vector<ii> vii; typedef set<int> si; typedef map<string, int> msi...
ALGO
0.999904
3.614806
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2019-04-14T00:59:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "554d0e7de...
cae7d33a-da93-46c5-9507-f06c0757f51d
awerty1/basics_C_plus_plus_programming
exam/2 semester/exam3.cpp
/* Данная программа запрашивает у пользователя две строки, сравнивает их и выводит результат сравнения в консоль. Если строки имеют разную длину, программа выводит сообщение "Строки имеют разную длину". Если все символы в двух строках совпадают, программа выводит сообщение "Несовпадающих нет". В противном случае про...
ALGO
0.999264
3.779213
{ "github_metadata": { "branch": "main", "commit_count": 1603, "repo_created_at": "2023-04-05T19:36:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "caf9e1855...
a210b1fd-2c65-4f88-816a-61d74f21c155
Inderdeep01/Coding-Ninjas
bst/bst_to_sorted_ll.cpp
#include <iostream> #include <queue> #include<bits/stdc++.h> template <typename T> class Node { public: T data; Node<T>* next; Node(T data) { this->data = data; this->next = NULL; } }; template <typename T> class BinaryTreeNode { public: T data; BinaryTreeNode<T>* left; ...
ALGO
0.999989
5.252701
{ "github_metadata": { "branch": "main", "commit_count": 194, "repo_created_at": "2023-01-13T18:07:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13cd5a5ab9...
2cacecc5-c81e-42b8-b36f-2a9dd2d27755
Rauf-Kurbanov/homework
semester_1/hw_5/Task5.3/Task5.3/list.cpp
#include "list.h" #include <stdio.h> #include <iostream> using namespace std; struct ListElement { ListElement *next; ElementType value; }; struct List { int count; ListElement *head; ListElement *tail; }; List *createList() { List *rootList = new List; ListElement *guard = new ListElement; rootList->head =...
ALGO
0.977529
4.869895
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2012-03-04T06:39:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3649774c...
6869b9b4-225e-4684-89f6-835cb8dffb94
MINRYUL/algorithm
BruteForce/sw_2.cpp
//#include<bits/stdc++.h> #include <iostream> #include <vector> #include <algorithm> //sort .. #include <queue> #include <string> #include <map> #include <stack> #include <cmath> //pow, sqrt #include <cstring> //memset #include <utility> //pair #define MAX 100000 using namespace std; int p, n, h, x, y, r; vector<int> v...
ALGO
0.999954
3.378095
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2021-01-05T08:13: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": "54925608...
cf057694-cf71-48a6-a2a2-73ac77bfba57
MrityunjayNPandey/vscode
CP/A_Literature_Lesson.cpp
/** * codeforces: _joKer_0 * codechef: joker_0000 * created: 09-05-2022 23:33:21 **/ #include <bits/stdc++.h> using namespace std; #define endl "\n" #ifdef DEBUG #include "algo/debug.h" #else #define debug(...) #define dclear(x) #endif #define free freopen("input.txt","r",stdin);freopen("output.txt","w...
ALGO
0.999838
4.308835
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2022-01-11T10:38: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": "e2115c69...
e334abd2-e2ad-402b-b580-f75928b76de2
Eternity329/algorithms
template/Kruskal.cpp
/* 按边进行合并; e[i]: 存起点,终点,边权 fa[x]:存x的父节点 按边权进行从大到小排序 顺序枚举每一条边 是否在同一集合 在(跳过)否则(合并) 直到选取n-1条边 https://www.luogu.com.cn/problem/P3366 */ #include<bits/stdc++.h> using namespace std; using ll = long long; struct edge { int u, v, w; }; vector<int>fa; int find(int x) { if (fa[x] == x)return x; retu...
ALGO
0.999977
4.065382
{ "github_metadata": { "branch": "main", "commit_count": 257, "repo_created_at": "2024-01-31T08:51:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1f3129a89...
ce898222-3740-4170-bff1-e260fdc1b376
rish2394/data-structures
trees/q30.return_level_of_the_key.cpp
#include<iostream> using std::cout; using std::cin; using std::endl; #include<cstring> #include<climits> #include<queue> using std::queue; /* structure of the tree */ typedef struct node { int data; struct node *left; struct node *right; }node; typedef node *tree; void levelOrderTraversal(tree root) { if(!root) ...
ALGO
0.999959
3.163955
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2017-01-31T02:22: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": "fbbec453...
d000b290-31d6-49ea-9bf0-db6f607af97f
pedrocivita/superComp_pedrotpc
aula17/ex4.cpp
#include <iostream> #include <vector> #include <mpi.h> #include <omp.h> std::vector<int> parallel_search(const std::vector<int>& chunk, int target) { std::vector<int> found_positions; #pragma omp parallel for for (int i = 0; i < chunk.size(); i++) { if (chunk[i] == target) { #pragma omp...
ALGO
0.999978
5.306561
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-08-14T17:49: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": "f024ff1abed...
1cc84192-dc0e-4127-bfb3-4220b70dab31
amit2000123/Leetcode
Minimum Platforms - GFG/minimum-platforms.cpp
//{ Driver Code Starts // Program to find minimum number of platforms // required on a railway station #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //Function to find the minimum number of platforms required at the //railway station such that no train waits. ...
ALGO
0.999956
5.402438
{ "github_metadata": { "branch": "master", "commit_count": 363, "repo_created_at": "2023-03-07T14:50:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7dfc3a...
1d7c18e3-fe7d-4480-ba41-b01828f93b3b
filipeabelha/gym-solutions
cdf/219464d.cpp
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define st first #define nd second #define mp make_pair #define pb push_back #define cl(x, v) memset((x), (v), sizeof(x)) #define db(x) cerr << #x << " == " << x << e...
ALGO
0.998473
4.177998
{ "github_metadata": { "branch": "master", "commit_count": 1023, "repo_created_at": "2017-03-27T00:56: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": "9aa5f65...
cbbc18d9-061a-45ca-9258-2ccfd2ed7906
fxfxxxfxx/CSES-sols
Dynamic_Programming/Counting_Numbers.cpp
#include <bits/stdc++.h> using namespace std; static int64_t count(int64_t bound) { if (bound < 0) return 0; if (bound == 0) return 1; string s = to_string(bound); for (char& c: s) c -= '0'; int same = 1; vector<int64_t> dp(10); for (int i = 1; i < s[0]; i++) dp[i] = 1; for (i...
ALGO
0.998981
4.132525
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-10-04T16:22: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": "a38f77b7143...
0282c111-4971-4226-b073-f8874812672c
prepare/Graphics2DVariants
fog_old/Fog/Src/Fog/Core/Memory/BSwap.h
// [Fog-Core] // // [License] // MIT, See COPYING file in package // [Guard] #ifndef _FOG_CORE_MEMORY_BSWAP_H #define _FOG_CORE_MEMORY_BSWAP_H // [Dependencies] #include <Fog/Core/Global/Global.h> #if defined(FOG_CC_MSC) # pragma intrinsic (_byteswap_ushort) # pragma intrinsic (_byteswap_ulong) # pragma intrinsic (_...
TOOL
0.968355
6.345434
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2014-08-02T01:13:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8211a4b9...
87cc84dd-7116-4311-85b8-553c15b6292c
ishandutta2007/codeforces-l
ludo/normal/758/F.cpp
#include<bits/stdc++.h> using namespace std; int N, L, R, W; #define x first #define y second typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; const int maxsqrtn = 3165; // 3162.2 // returns b^e. // however, if b^e >= R, it returns -1 int pow(int b, int e) { ll _b = b, r = 1; while (e) {...
ALGO
0.999657
4.261316
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17: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": "96c9b0967e28...
398fd98a-e920-4666-9e47-a5928f414082
hakomori64/atcoder
abc/68c.cpp
#include <bits/stdc++.h> #define rep(i, n) for(ll i = 0; i < n; i++) #define repr(i, n) for(ll i = n; i >= 0; i--) #define inf LLONG_MAX #define all(v) v.begin(), v.end() using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vll> vvll; int main() { ll n, m; cin >> n >> m; set<ll> f...
ALGO
0.999959
4.10122
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-12-20T13:41: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": "622e6a97a9...
7cf91a8f-a48d-4790-916f-5d3d0b75473a
mohammedjasam/Technical-Interview-Guide
LintCode/lintcode_word-ladder.cpp
/* * * Tag: BFS * Time: O(26^n) (n is the length of string) * Space: O(26^n) */ class Solution { public: /** * @param start, a string * @param end, a string * @param dict, a set of string * @return an integer */ int ladderLength(string start, string end, unordered_set<string> &dict...
ALGO
0.999969
5.393345
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-04-01T19:15:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 110, "forks": 34, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4f1c38...
91b74241-f193-40ed-a335-ea2227b4c97d
marcelohpf/tep-solutions
uva/369.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; ll fat(int n){ ll k = 1; while( n ){ k *= (n--); } return k; } int main(){ int N, M; while(scanf("%d %d", &N, &M), N || M){ int n[103] = {0} , m[103] = {0} , c[103] = {0}; n[0]=1;m[0]=1;c[0]=1; for (int i = 1; i<= N; i++){ ...
ALGO
0.999941
4.160196
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2015-12-09T14:56: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": "7495491b1...
d610f80b-debb-4ffd-8017-007eab8c4530
15Andrew43/CPP
semestr2/contest/contest3/I/main.cpp
#include <iostream> #include <unordered_map> #include <vector> #include <algorithm> struct Word { std::string name_; int cnt_; }; bool comp(const Word& lhs, const Word& rhs) { if (lhs.cnt_ > rhs.cnt_) { return true; } else if (lhs.cnt_ < rhs.cnt_) { return false; } if (lhs.name...
ALGO
0.999733
4.227417
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-09-11T21:41:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3d5c5eab...
e6e2ae89-a00c-4c3e-ac2e-7d90749d3599
j-goyal/Dynamic_Programming
LCS (and 14 variations)/Longest Common Substring LCSS (len+print).cpp
//find length of longest common substring(continous pattern) // SEE MAINLY BOTTOM UP SOLUTION #include<bits/stdc++.h> #include<iostream> #include<string> using namespace std; int dp[1001][1001]; //global declaration /* int LCS(string a, string b, int n, int m, int count) // recursion { if(n==0 || m==0) r...
ALGO
0.999964
4.592735
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-07T17:45: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": "da940e7834...
730b3749-7e7b-4822-a1fc-3c685002ae29
BabyNoCry/C-
Date类及 各运算符重载/Date类及 各运算符重载/Data.cpp
#include<iostream> #include<windows.h> using namespace std; class Date { public: int Getmonthday(int year, int month) { static int monthday[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 }; if (month == 2 && (year % 400 == 0) || (year % 4 == 0) && (year % 100 != 0)) return 29; return monthday[month]; } Date...
ALGO
0.98297
4.332055
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-01-15T08:46:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1f850296...
722dd43a-18b5-44c9-93ff-005c68a01035
AbhishekDawar/DSA-FAANG
c++/Practice/sortings.cpp
#include<bits/stdc++.h> #include"clrscr.h" using namespace std; int getMaxIndex( int arr[],int start,int end) { int max = start; for(int i=start;i<=end;i++){ if(arr[max]<arr[i]){ max=i; } } return max; } void printArray(int arr[],int count){ for (int i = 0; i ...
ALGO
0.999938
4.956904
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-02-12T16:04: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": "47ff32b7ec...
b6786924-eef2-4504-b653-07d6280d5dfa
NursatSakyshev/ADS
c++/ejuje/lab2/d.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ int val; int cnt; Node * next; Node * prev; Node(int val){ this -> val = val; next = nullptr; prev = nullptr; cnt = 1; } }; class LinkedList{ public: Node * head; Node * tail; LinkedList(){...
ALGO
0.999995
4.226271
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-08-31T08:31: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": "40323e82b93...
da72d6fb-8191-4e31-a8c6-9fb275a39e60
zacard-orc/Zacard
ID3/id3_r_v2.cpp
//C++ ID3 REDUCER V2 #include <iostream> #include <map> #include <stdlib.h> #include <string.h> #include <malloc.h> #include <iomanip> #include <math.h> #include <stdio.h> #include <vector> #include <algorithm> #include <set> #include <stdio.h> using namespace std; #define BUFFER_SIZE 10240 #define DELIM " " #d...
DATA
0.974676
3.97101
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-04-25T04:37:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c32d4ad72...
b89629b1-1453-4f9b-9835-e739cf989f47
avetisminasyan/cpp_repo
o_hom1.cpp
#include <iostream> #include <cstring> //1 bool check_is_digit(std::string str); int main () { int num; std::string num1; int sum=0; while(true) { std::cout<<"Enter number-"; std::cin>>num1; if(check_is_digit(num1)) { num=stoi(num1); bre...
ALGO
0.999632
3.929078
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2023-03-06T19:36: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": "15bae7586...
cf1dc6de-0344-42fc-9056-7dc94f2e746e
rahul17081998/Data-Structure
code_cpp/self pased DSA/Heap/8-Single-Threaded-CPU.cpp
class Solution { public: /* VVI Problem link: https://leetcode.com/problems/single-threaded-cpu/description/ Approach: --> Indexing all the tasks so they dont loose their identity while calculating the answer. --> Sort the tasks. --> Keep pushing tasks into queue while the enqueueing time of ...
ALGO
0.999985
6.154218
{ "github_metadata": { "branch": "main", "commit_count": 132, "repo_created_at": "2022-08-03T12:52: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": "e3ff02da40...
eb0f06a3-209e-4c9d-9667-bef17c242e1a
xulzee/LeetCodeProjectCPP
source/autumn-recruitment/322. Coin Change.cpp
// // Created by liuze.xlz on 2019-08-26. // #include "utils.h" class Solution { public: int coinChange(vector<int> &coins, int amount) { return dynamicProcess(coins, amount); } int process(vector<int> &coins, int target_amount, int cur_amount) { if (cur_amount == 0) { return 0...
ALGO
0.999982
5.480094
{ "github_metadata": { "branch": "master", "commit_count": 257, "repo_created_at": "2019-07-29T13:58:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17f0dade...
890f6b3e-2273-4a7a-8b8f-d051af875355
hllj/Codeforces
481/B.cpp
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false); cin.tie(0); #define all(v) (v).begin(), (v).end() #define fi first #define se second typedef long long ll; typedef pair<int, int> ii; typedef pair<ll, int> li; const int INF = (int) 1e9; const ll LINF =...
ALGO
0.999968
3.718677
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-09-10T13:26: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": "f216a9236e...
4eb1cdd6-63bc-4397-9c25-dfed58ce56b7
taitruong256/Competitive-programming
Codeforces/Codeforces885/A.cpp
/*===================================================================================== Nothing is impossible, only you think it is impossible Try, try, try again until you succeed Pratice, practice, and practice I hated every minu...
ALGO
0.999955
4.161966
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-04-14T06:59: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": "14cc6e3c8fb5...
6fe8a207-44ed-4d05-8d80-0e1c07202a6d
Natto-Ryvin/PF-Assignment-2
day 3.cpp
#include <iostream> using namespace std; int main() { int Apple=10; int Mango=15; int Pomegranate=30; int apple_quantity,mango_quantity,pomegranate_quantity; double total, discount,net_total,shipping_charges; cout<<"Enter the quantity for Apples in kg: "; cin>>apple_quantity; cout<<"E...
TOOL
0.987955
3.921505
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-01-14T19:14: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": "ebb844256610...
17f86f8f-e702-4158-86fe-ffaae89c2f8b
ftiasch/shoka
tri_edge_connected.h
#include "types/graph/adjacent_list_base.h" #include <algorithm> #include <random> #include <vector> class TriEdgeConnected : public AdjacentListBase<int> { void dfs(int u) { circ[u] = 0; for (int iterator = head[u]; ~iterator; iterator = next[iterator]) { auto v = edges[iterator]; if (!used[ite...
ALGO
0.987026
6.556257
{ "github_metadata": { "branch": "master", "commit_count": 441, "repo_created_at": "2013-10-23T08:29:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "840fe1a...
46ce1ea3-cbaa-418b-9c73-be46c9ea107b
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/04/0413/personal_submission/cf1201d_hopeworse.cpp
/link : https://codeforces.com/contest/1201/submission/256442080 void solve() { int n, m, c1, c2; cin >> n >> m >> c1 >> c2; vector<int> fix(m + 1, 0), pre(m + 2, 0), nex(m + 2, 0); vector<int> l(n + 1, 0), r(n + 1, 0); n = 0, m = 0; for (int i = 1; i <= c1; i++) { int x, y; cin ...
ALGO
0.999966
3.815643
{ "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": "fddc...
e6292a92-a339-4f75-b9c2-35f3b7bc2132
gogojjh/M-LOAM
estimator/src/factor/lidar_map_factor.hpp
/******************************************************* * Copyright (C) 2020, RAM-LAB, Hong Kong University of Science and Technology * * This file is part of M-LOAM (https://ram-lab.com/file/jjiao/m-loam). * If you use this code, please cite the respective publications as * listed on the above websites. * * Li...
ALGO
0.99954
5.490211
{ "github_metadata": { "branch": "mloam_gf", "commit_count": 451, "repo_created_at": "2020-10-28T08:29:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 491, "forks": 92, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "ac...
e89638d9-95ce-400c-99c7-55d945b024b0
evan-hossain-zz/competitive-programming
contests/Codeforces Round #279 (Div. 2)/E.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999995
3.405012
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-06-02T09:04:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "041b18777...
b1651c87-47d6-4bb0-93af-3cd56831e6fb
ishandutta2007/codeforces-p
physics0523/normal/1080/C.cpp
#include<bits/stdc++.h> using namespace std; long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long f(long long lu,long long sz){ if(lu%2==0){ return llceil(sz,2); } else{ return (sz/2); } } using pl=pair<long long,long long>; using rect=pair<pl,pl>; bool inside...
ALGO
0.997586
3.800801
{ "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": "63e1395bfaee...
df9834ff-a5da-4f1b-ad66-4c94881dc7bc
sherwyndd/cses-solutions
Dynamic Programming/Coin Combinations I.cpp
/* <NAME> **/ #include <bits/stdc++.h> using namespace std; #define int long long #define IOS ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL); #define pb push_back #define F first #define S second #define nl "\n" #define ve vector<int> #define rt return typedef pair<int,int>p; bool MULTITEST = 0; const int N=2...
ALGO
0.999949
4.346909
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2024-06-24T13:56:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba9d656e2f...
b49627a3-899e-45ca-b877-b9fb896f2c94
Coslate/LeetCode
P371_Sum_Of_Two_Integers/CPlusCPlus/my_imp/main.cpp
#include <iostream> #include <cstdlib> #include <climits> #include <vector> #include <solution.h> #include <cstring> #include <string> void printArray(const std::vector<int> &in, const std::string name); std::ostream & operator << (std::ostream &out, const std::vector<int> &in); int main(){ Solution sol; OptS...
ALGO
0.999322
4.18127
{ "github_metadata": { "branch": "master", "commit_count": 157, "repo_created_at": "2019-07-29T10:12: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": "df50d9e2...
29567eb0-3115-4851-a051-7287fb730e74
keshavgupta1304/DSA-QUESTIONS
123-best-time-to-buy-and-sell-stock-iii/best-time-to-buy-and-sell-stock-iii.cpp
class Solution { public: // int recur(int index, int canBuy, int maxTransactions, // const vector<int>& prices, vector<vector<vector<int>>>& dp) { // if ((maxTransactions == 0 && canBuy == 1) || (index == // prices.size())) // return 0; // int profit = 0; // ...
ALGO
0.999987
5.834168
{ "github_metadata": { "branch": "main", "commit_count": 1333, "repo_created_at": "2024-06-14T10:54: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": "8c4395142...
edd6ccb8-e5ef-408f-a023-fcc0cf63bbdb
binxxx/cartographer
cartographer/mapping/eskf.cc
#include "cartographer/mapping/eskf.h" namespace cartographer { namespace mapping { Eigen::Matrix3d skew(Eigen::Vector3d w) { Eigen::Matrix3d W; W << 0.0, -w.z(), w.y(), w.z(), 0.0, -w.x(), -w.y(), w.x(), 0.0; return W; } Eigen::Matrix3d angle_axis_to_rotation_matrix(Eigen:...
ALGO
0.946705
7.215135
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-28T18:28: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": "d2d5c9b170...
83d31bc5-9c3e-4e9d-a0fa-a9c7bd99a009
Dialpuri/nautilus
include/clipper/core/resol_targetfn.h
/*! \file lib/resol_targetfn.h Header file for resolution function generator */ //C Copyright (C) 2000-2006 <NAME> and University of York //L //L This library is free software and is distributed under the terms //L and conditions of version 2.1 of the GNU Lesser General Public //L Licence (LGPL) with the followi...
TOOL
0.949555
5.18012
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2023-09-13T14:45: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": "dff1ae69f...
d51a365e-005a-4646-b887-21d3a1b39c70
anonymousz97/SPOJ_PTIT
P146SUMC-src.cpp
#include <iostream> #include <cmath> #define ll long long #define x first #define y second #define oo 1e9 using namespace std; typedef pair <int, int> record; record p[200]; ll n, d, c[200][200], a[200] = {0}; main() { cin >> n >> d; for (int i = 2; i < n; i++) cin >> a[i]; for (int i = 1; i <= n; i++) cin >> p[i].x...
ALGO
0.999871
3.23534
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-05-25T11:13:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a34ea02da...
ea91ca85-ba03-40de-8263-a22bf43bf432
OpenACCUserGroup/openacc_concept_strategies_book
Code_Examples/Chapter_08/cuda/src/cg_solve.hpp
#ifndef _cg_solve_hpp_ #define _cg_solve_hpp_ //@HEADER // ************************************************************************ // // MiniFE: Simple Finite Element Assembly and Solve // Copyright (2006-2013) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for...
ALGO
0.999452
5.267978
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2017-05-16T20:40:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 34, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28d2b5a5...
133cb792-61d9-4f8d-af3d-00e9c140b243
Adhamet/Problem-Solving
codeforces/Problems/727E Games on a CD/727E.cpp
#include <bits/stdc++.h> using namespace std; #define i64 int64_t #define el '\n' i64 binexp(i64 b, i64 e, i64 m) { i64 r = 1; b %= m; while (e) { if (e & 1) r = (r * b) % m; b = (b * b) % m; e >>= 1; } return r; } int32_t main() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); const i64 P1 = 37...
ALGO
0.999965
4.328734
{ "github_metadata": { "branch": "main", "commit_count": 798, "repo_created_at": "2022-01-29T00:47:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9abfd990e7...
ab7f3dd1-6997-46ba-baa6-abfd3f6eb266
riteme/test
icpc/2023-1-15-cf844/E.cpp
#include <cstdio> #include <cstring> #include <set> #include <vector> #include <iterator> #include <algorithm> using namespace std; constexpr int NMAX = 200000; constexpr int XMAX = 1000000000; struct ran { mutable int i, l, r; bool contain(const ran &z) const { return l <= z.l && z.r <= r; } ...
ALGO
0.999762
3.511398
{ "github_metadata": { "branch": "master", "commit_count": 550, "repo_created_at": "2015-04-26T07:16:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "6c4cdf9d...
28b44f8c-e30b-4b35-bd98-fd48b1fc79f9
tanvermax/c_project
cpp/old/string/upperstring.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string ss = "mpodavmpjtivamvafv"; for (int i = 0; i < ss.size(); i++) { if (ss[i] >= 'a' && ss[i] <= 'z') { ss[i] =ss[i]- 32; } } cout << ss << endl; for (int i = 0...
ALGO
0.998903
3.927165
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-21T06:13: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": "238115e89327...
516d1208-5e6b-437b-92cc-3e0b2a366294
Sue217/PracticeCodeFolder
Codejam/2022/QualRound/d_.cpp
/** * author: subobo * created: 02.04.2022 08:47:56 **/ #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__) #else #define debug(...) 42 #endif int main() { ios::sync_with_stdio(false); cin.tie(0); int tt; cin >> tt;...
ALGO
0.999971
4.035847
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2022-01-01T11:39:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f710d567...
7469a151-f4af-40cd-b1c3-1453c5feaed9
leozog/ColorfulStringArtGenerator
include/annealing_optimizer.h
#pragma once #include "logger.h" #include "thread_rng.h" #include <functional> #include <unordered_map> template<typename Solution, class SolutionHash = std::hash<Solution>> class AnnealingOptimizer { public: using NeighborFunc = std::function<Solution(const Solution&)>; using EnergyFunc = std::function<doubl...
ALGO
0.999965
5.719818
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2023-11-28T22:11: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": "33414b977d8...
9762211a-4ea6-4a32-8c09-6f749840353f
stanleyhon/grind
print-numbers-in-columns/pn.cpp
// easy mode. // input n c // output for 13 4 // 1 5 9 13 // 2 6 10 // 3 7 11 // 4 8 12 #include <iostream> #include <cmath> using namespace std; int main (void) { double n = 0; double c = 0; cin >> n; cin >> c; cout << n << " " << c << endl; // this is how many things per column do...
ALGO
0.999785
3.338849
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2014-05-03T10:07:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "730b823ae...
2d10be2e-037e-49b4-855a-218e06e4dcab
tthungjun/Baekjoon
백준/Silver/2167. 2차원 배열의 합/2차원 배열의 합.cc
#include <iostream> #include <vector> using namespace std; int main() { int row, col; cin >> row >> col; vector<vector<int>> v(row, vector<int> (col)); vector<int> answer; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { int num; cin >> num; v[i][j] = num; } } int k; cin >> k; f...
ALGO
0.999586
4.377179
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2023-11-18T08:02: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": "fc8eb44e53...
a72cb779-39eb-4765-b205-57d5730ed84b
CopaCote/linkedlist
이것이코딩테스트다/기출문제/q11.cpp
// 뱀 /* 이동을 할때의 두 판정 1. 사과가 있다 -> 머리에 새로운 위치 삽입 2. 사과가 없다 -> 머리에 새로운 위치 삽입 및 꼬리 제거 */ #include <iostream> #include <list> #include <utility> #include <vector> #include <algorithm> enum Direction{ RIGHT = 0, DOWN = 1, LEFT = 2, UP = 3 }; int dx[4] = {0,1,0,-1}; int dy[4] = {1,0,-1,0}; using namespace...
ALGO
0.999979
4.157417
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2021-03-13T04:40:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd927985a872...
e5611ee1-de58-4a0d-93ae-61885145bfa6
xiayto/leetcode
offer/6.旋转数组的最小数字.cpp
class Solution { public: int minNumberInRotateArray(vector<int> rotateArray) { //用二分查找非方法 //注意两个边界情况,一个是没有旋转,旋转数量是0,一个是begin==end==mid只能用顺序查找 int length = rotateArray.size(); if(length == 0) return NULL; int begin = 0, end = length - 1, mid; if (rotateArray[begin] < r...
ALGO
0.999971
5.682252
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2017-10-01T18:20: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": "6ff7746d...
69093d86-eb86-499f-a8d2-f8b598d6c65f
upglay/week12
week12/week12/Source.cpp
#include <iostream> #include <ostream> #define MAX2(a, b) ((a) > (b) ? (a) : (b)) #define MAX3(a, b, c) (MAX2(MAX2(a, b), (c))) #define MAX4(a, b, c, d) (MAX2(MAX3(a, b, c), (d))) class CellData { public: double q_[4] = { 0.0, 0.0, 0.0, 0.0 }; //up, down, left, right double reward_ = 0.0; CellData() {} ...
ALGO
0.999609
4.393232
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-11-21T08:42:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37c583416b...
f84e5726-b79a-49fb-8d3c-e6f170ae2b84
Factoriall/Algorithm-2021
Divide-And-Conquer/1725_histogram_dac.cpp
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <algorithm> using namespace std; int histogram[100000]; int dac(int lo, int hi); int getMaxIncludeMid(int lo, int hi, int mid); int main() { int N; scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d", &histogram[i]); } printf("%d", dac(0, N)); ...
ALGO
0.999746
4.327047
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2020-09-23T06:06: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": "cd2b70426...
9bbb0a7c-d266-4e18-a957-b046d20a4cd5
NVlabs/Parsimony-CGO23
compiler/tests/packed_shuffle.cpp
/* * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this softwar...
ALGO
0.997285
3.935051
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-10T17:21:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b61963b3bebc...
edd707ac-e930-4cff-ae26-b3ae0342288b
shaklan2001/LeetCode-Questions
2-add-two-numbers/2-add-two-numbers.cpp
class Solution { private: ListNode* reverse(ListNode* head){ ListNode* prev = NULL; ListNode* curr = head; ListNode* forward = NULL; while( curr != NULL){ forward = curr -> next; curr -> next = prev; prev = curr; curr = forward; ...
ALGO
0.99999
6.554438
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2022-05-28T11:45: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": "8874b47ea4...
b4a0b975-da32-463b-842b-4d1863a28c9f
flexible-collision-library/fcl
include/fcl/narrowphase/detail/traversal/octree/distance/shape_octree_distance_traversal_node.h
/* * Software License Agreement (BSD License) * * Copyright (c) 2011-2014, <NAME>, Inc. * Copyright (c) 2014-2016, Open Source Robotics Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditio...
ALGO
0.919911
7.420821
{ "github_metadata": { "branch": "master", "commit_count": 863, "repo_created_at": "2012-09-19T16:50:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1572, "forks": 437, "issues": 205, "pull_requests": 36 }, "file_meta": { "content_id": "3...
bffea1e8-2db4-431b-aa25-4cbadd77f57f
maromaro0013/logic001
actions/astrology/timingFortune012.hpp
// 2015-01-06 y_ohta /*----------------------------------------------------------------------------- * 時期運 * 30日間でネータル水星+トランジット月が120度アスペクトする日 * * 必要なパラメータ * bymd1:生年月日(yyyymmdd形式) * bhms1:生時分秒(hhmmss形式) * bpref1:出生地(都道府県コード) * ymd:トランジット年月日(yyyymmdd形式) *-------------------------------------------------------...
TOOL
0.988836
5.819715
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-03-09T04:42: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": "8bb9b5404d...
fcb14cfb-77f5-4fed-994f-754054e55bf9
Laanith/CP
CodeForces/800/1409A_YetAnotherTwoIntegersProblem_CF.cpp
#include <bits/stdc++.h> #define ll long long #include <algorithm> #define vi vector<int> #define vpi vector<pair<int, int>> #define PYES cout << "YES" << endl #define PNO cout << "NO" << endl #define vs vector<string> #define qi queue<int> #define si stack<int> #define pi pair<int, int> #define ima INT_MAX #define imi...
ALGO
0.999837
4.216494
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2023-12-07T13:27: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": "9578f6176c6...
8943ca91-9e49-49cf-bf26-23f677863e14
Noodle96/contestProgramming
CDFC/1100/interestingDrink.cpp
#include <bits/stdc++.h> #define all(x) x.begin(),x.end() #define msg(str,str2) cout << str << str2<< endl using namespace std; using ll = long long; using ld = long double; using uint = unsigned int; using ull = unsigned long long; template<typename T> using pair2 = pair<T, T>; using pii = pair<int, int>; using pli =...
ALGO
0.999934
4.27187
{ "github_metadata": { "branch": "main", "commit_count": 787, "repo_created_at": "2022-02-23T23:20:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "161c5b30ed...
f8e1d42c-2d32-4df1-9a85-006340c56b17
sonakhachatryann/LeetCodeProblems
141.LinkedListCycle.cpp
/* 141. Linked List Cycle Given head, the head of a linked list, determine if the linked list has a cycle in it. */ 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) {} }...
ALGO
0.999751
5.437465
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2023-03-15T11:40:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "362112a6a4b...
15d24dab-92d2-4346-8e6e-63b5fe4733d0
troyhe/Leetcode_2021
0339_Nested List Weight Sum.cpp
/** * // This is the interface that allows for creating nested lists. * // You should not implement it, or speculate about its implementation * class NestedInteger { * public: * // Constructor initializes an empty nested list. * NestedInteger(); * * // Constructor initializes a single integer. * ...
ALGO
0.999843
5.987771
{ "github_metadata": { "branch": "main", "commit_count": 302, "repo_created_at": "2020-12-26T01:08: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": "93c13da118...
76f61b71-20b5-4a62-bd93-551d7639e857
Vihaanaszx/prajects
tic-tac-toe.cpp
#include <iostream> #include <array> #include <string> static char convert(unsigned int play) { if (play == 0)return ' '; else if (play == 1)return 'O'; else if (play == 2)return 'X'; else return '~'; } static std::array<int,2> check_winD(const std::array<std::array<unsigned int, 3>, 3>& game) { for (int i = 0; ...
ALGO
0.997668
5.012962
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-12-25T06:54: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": "e322cfb7a848...
fcbdd9fe-8a85-4ba4-b530-95a796f76cad
Salman-Jewel/XPSC-problem-solving
week19/Day5/B_Jellyfish_and_Game.cpp
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ll long long #define nl '\n' #define all(a) (a).begin(),(a).end() template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statist...
ALGO
0.999984
4.028617
{ "github_metadata": { "branch": "main", "commit_count": 157, "repo_created_at": "2024-10-26T16:47: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": "6375cfff55...
c8368dbe-e2c2-4731-b57e-8524cc252b4e
BUAAZYF/POJ
2402/2402.cpp
#include <cstdio> #include <cstring> using namespace std; const int MAX = 30; int n, m; long long cnt[MAX], cnt_sum[MAX]; int nums[MAX]; int main() { // freopen("in.txt", "r", stdin); cnt[1] = cnt[2] = cnt_sum[1] = 9; cnt_sum[2] = 18; for (int i = 2; 2 * i < MAX; ++i) { cnt[i * 2] = cnt[i * ...
ALGO
0.999965
3.554304
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2020-05-29T13:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc3e1650c...
5e978cfe-ac27-46f6-bd52-59f176646eb8
tienv/GraphMM
src/MCMCOneStep1.cpp
#include "MCMCOneStep1.h" void MCMCOneStep1(int NEdChange, double n_tree_change_ratio, const arma::umat & G, int NVer, int NEd, double a, Rand* rand_item, int PriorType, vector<int> & TreeOld, vector<int> & EdValueOld, vector<int> & Label_old, vector<int> & Bl...
ALGO
0.999927
5.543389
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2019-01-03T18:20:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7cab98bec...
3106aa59-a326-4c4c-bc6f-3b68d19939c2
creatale/node-dv
deps/opencv/modules/core/src/convert.cpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
TOOL
0.969964
3.101353
{ "github_metadata": { "branch": "master", "commit_count": 291, "repo_created_at": "2012-09-14T08:38:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 341, "forks": 72, "issues": 10, "pull_requests": 6 }, "file_meta": { "content_id": "9a857...
b04839ea-9b29-430d-ad7e-cf3ea946c470
nishantprajapati123/May-LeetCoding-challenge
Week 2/ImplementTrie(PrefixTree).cpp
class Trie { private: bool leaf; vector<Trie*>child; public: /** Initialize your data structure here. */ Trie() { leaf = false; child.resize(26, NULL); } /** Inserts a word into the trie. */ void insert(string word) { Trie* root = this; ...
ALGO
0.999789
5.819841
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2020-05-03T20:21: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": "7e5129f4d...
71055677-3d69-42a3-8922-aec91cb689e7
IAlexstrazaI/Praktika
Praktika2.cpp
#include <iostream> #include <locale> #include <fstream> #include <iomanip> #include <stdio.h> using namespace std; //Заполнение массива [n][n] int zapolnenie(int **matr, int &n) { cout << "\n"; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cout << " " << i + 1 << " строка"; cout << " " << ...
ALGO
0.995924
3.389193
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-06-26T08:57: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": "4a9d659c7a...
1a1f49e7-4651-4de2-b1a2-c179c4c1172e
xinhui1111/leetcodeDoit
leetcodeDoit/49字母异位词分组.cpp
/* * hash-map实现,如果不是默认的数据类型,那么就需要重新定义数据类型 这里主要学到了lamda表达式 STL累加的算法 */ #include<iostream> #include<vector> #include<numeric> #include<algorithm> #include<string> #include<unordered_map> using namespace std; /* 将一个字符串的很多组合写出来 首先进行排序,然后相同的就是一样的,不同的就不一样 */ vector<vector<string>> groupAnagrams(vector<string>& strs) { u...
ALGO
0.999576
5.729733
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-08-21T14:58:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a71c26990...
94d55f3a-18f9-4af5-8f82-713bfe1f13ca
HPI-Artificial-Intelligence-Teaching/25-pt2
unit9/bfs.cpp
/****************************************************************************** * * A breadth first search on an undirected graph that runs in O(E + V) time. * * Based on the source code from <NAME> and <NAME> at https://algs4.cs.princeton.edu/ * *******************************************************************...
ALGO
0.999721
6.329604
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-04-06T10:21:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5845ad3f43...
4578edc3-9591-4891-921c-1387ea8613d9
lw2533315/ACM
2015/2015classyProblem/main.cpp
/* * File: main.cpp * Author: Administrator * * Created on 2015年11月19日, 上午12:00 */ #include <cstdlib> #include<vector> #include<fstream> #include<iostream> //#include<iomanip> using namespace std; void quickSort(vector<pair<string, string> >&v, int l, int r) { if (l < r) { int i = l; int ...
ALGO
0.998996
3.258566
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-09-03T22: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": "70893542a...
03a2c84e-dc3c-41dc-9edb-b95a2413225a
mh-qanbari/TicTacToe
MinimaxAlgorithm.cpp
#include "MinimaxAlgorithm.h" #include "GameUtils.h" #include "Board.h" #include <iostream> struct MinimaxAlgorithm::Impl { std::shared_ptr<Board> board { nullptr }; uint step { 0 }; const char __padding__[4] { 0 }; //!< for padding }; MinimaxAlgorithm::MinimaxAlgorithm(const uint depth) : m_impl( ...
ALGO
0.998538
6.407842
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-07-29T17:08:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c685cd61fe4...