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
9eca7123-fc6c-4c93-9a3b-fe305636d5ef
vix95/cpp_algorithms
slownik_t9/main.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> const int WIELKOSC_ALFABETU = 26; const int ILOSC_ZNAKOW = 100; using namespace std; //lista jednokierunkowa - z wyciagnietymi slowami; potrzebna do sortowania struct lista { lista *kolejny; char znak[ILOSC_ZNAKOW]; int klawisz[ILOSC_ZNAKOW]; } *LShead; //drzew...
ALGO
0.999958
3.959156
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-12-13T09:29: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": "bca5279fa1...
8fef09e2-9a0b-46e0-b8b7-545bddcae722
zmiksis/SciComp
21210_Spring2017/SP2017_SciComp_Sakai_dump/Sample Exam 2 Code/problem_7.cpp
// This file contains two solutions for Problem 7. // The second builds everything into one function, // and the second requires two additional functions that it will call. // // If you want to write additional functions on the exam that your functions can call, // that is fine by me. #include <iostream> #include <...
ALGO
0.999855
5.794065
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-01-20T19:50: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": "0f661a37fb...
1b637cdc-a6b0-4e87-8ef0-7f2942994c7d
Showtim3/Programming
CP/Hackerrank/castleOnHill.cpp
#include <iostream> #include <set> #include <map> #include <queue> #include <vector> #include <algorithm> #include <cmath> #include <numeric> #define li long int #define ll long long #define lli long long int using namespace std; int main(){ int n; cin>>n; int i,j; vector<string> v; for(i=0;i<n;i...
ALGO
0.999821
4.229976
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-10-20T14:41: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": "52adbed0b...
fece494f-00bc-4262-8245-b0b3e7f09e08
locusrobotics/robot_navigation
nav_2d_utils/src/bounds.cpp
/* * Software License Agreement (BSD License) * * Copyright (c) 2020, Locus Robotics * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must re...
ALGO
0.935352
7.497531
{ "github_metadata": { "branch": "noetic", "commit_count": 120, "repo_created_at": "2017-09-19T16:16:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 470, "forks": 147, "issues": 14, "pull_requests": 4 }, "file_meta": { "content_id": "d314...
70f7be4d-7476-4305-a4e0-84f4b1128b2e
Nushwa/Data-Structures
Graphs/Adjacency List.cpp
#include<iostream> using namespace std; class Node { public: int data, weight; Node* next; }; class list { public: Node* listptr; }; class Graph { public: int visited[10]; list *arr; int ver; Graph(int v) { ver = v; //list that will hold all the vertices arr...
ALGO
0.992689
3.665349
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-03-03T12:30: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": "3fa19eda244...
4afc7c83-eb9d-4c48-9c8a-7ab6ebdb28a3
tiqwab/atcoder
abc197/b/main.cpp
#include <algorithm> #include <cassert> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #include <limits.h> using namespace std; typedef long long ll; template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } ...
ALGO
0.99988
3.998642
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2019-10-21T04:57: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": "6e60ac72...
77d5cef2-da59-42c2-ac07-081843cd503d
patrickslcomputerprogramming/CPlusPlus
w4/FR/w4_lab7_athlete_champion_ou_non/evaluer_questions_athletes_reponse_appropriee_vers1.cpp
/* LIRE 2 REPONSES, CALCULER ET ECRIRE UN MESSAGE APPROPRIE EN UTILISANT 1 SEULE INSTRUCTION IF. */ #include <iostream> using namespace std ; int main() { //Déclarer les variables et les constantes et initialiser char reponse_question1, reponse_question2; const string MESSAGE_COMMUN = "MERCI D'AVOIR PARTICIPE A...
TOOL
0.990013
3.623932
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2024-09-04T13:23: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": "aa377432041...
837c736d-656e-4848-be8f-99b58bb64508
tianxia1221/Algorithm
leetcode/126.cpp
class Solution { public: vector<vector<string>> findLadders(string beginWord, string endWord, vector<string>& wordList) { vector<vector<string>> ret; map<string, vector<string>> graph; map<string, int> visited; auto index = std::find(wordList.begin(), wordList.end(), beginWord); if (index == wordList.end()) ...
ALGO
0.999988
5.803296
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2018-04-17T14:14: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": "7dbf766f...
c1da05e4-05d3-4306-bf8a-0a6bdc299747
Puellaquae/Algorithms
Graph/aizu2249.cpp
// Road Construction // Using Dijkstra #include <iostream> #include <vector> #include <queue> struct edge { int To, Distance, Cost; edge(int to, int dist, int cost) : To(to), Distance(dist), Cost(cost) {} }; #ifndef INT_MAX #define INT_MAX 0x7fffffff #endif using namespace std; int main() { int N, M; ...
ALGO
0.99996
4.31342
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2021-04-27T14:17:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7e668449...
126c8d41-a3be-478e-bd86-59e1d741b000
SeongHyunBae/CodingTestPractice
SWEA/8935 스팟마트/main.cpp
#include "pch.h" #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int MAXA = 3001, MAXB = 101; int N, M; int A[MAXA]; int B[MAXB]; int cache[MAXA][MAXB][MAXB][2]; //dp[n_i][m_i][skip][get] //n_i : n봉지의 과자 중 n_i번째를 보고있는 상태(0과 n은 각각 왼쪽 끝, 오른쪽 끝을 ...
ALGO
0.999978
3.546444
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2021-12-26T08:08: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": "10897cfc7...
f26cefd1-b1e4-4918-8fb5-9c30573a29d0
alexandraback/datacollection
solutions_5670465267826688_1/C++/Erop/C.cpp
#define _CRT_SECURE_NO_WARNINGS #include <thread> #include <condition_variable> #include <mutex> #include <memory> #include <vector> #include <queue> #include <cstdio> #include <cmath> #include <set> #include <map> #include <algorithm> #include <string> #include <cstring> #include <iostream> using namespace std; ...
ALGO
0.999782
3.46939
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01300ede0...
46fd26a7-4d3b-4527-89cc-521dbe0605a5
shivammishra92/Striver-SDE-Sheet
Graph-2/BellmanFordAlgorithm.cpp
class Solution { public: /* Function to implement Bellman Ford * edges: vector of vectors which represents the graph * S: source vertex to start traversing graph with * V: number of vertices */ vector<int> bellman_ford(int n, vector<vector<int>>& adj, int src) { vector<int>dist(...
ALGO
0.999736
4.821636
{ "github_metadata": { "branch": "master", "commit_count": 174, "repo_created_at": "2023-06-05T14:32: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": "fbe1366c...
b9521c88-9285-4c98-afe8-cbd7978da949
GagandeepSingh20/DSA-Practice
Leetcode/Greedy/maximum-matching-of-players-with-trainers.cpp
// Leetcode Problem: https://leetcode.com/problems/maximum-matching-of-players-with-trainers/ // Problem no: 2410 // Problem Name: Maximum Matching of Players With Trainers // Level: Medium // Tags: Greedy, Sorting, Two Pointers, Arrays /* 🧠 Problem Summary: You are given two integer arrays: players and trainers. Ea...
ALGO
0.999969
6.52487
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-07-08T16:43: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": "452f4401f74...
e1fd08f8-5e04-41c3-9e0c-6be6574649d5
asolarlez/sketch-frontend
benchmarks/neohookean.cc
#include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include "../../mathlib/mathlib.h" #include "neohookean.h" #include "sk_neohookean.h" // 1 internal variable summit::Neohookean:: Neohookean() : Material("neohookean",1) {} summit::Neohookean:: Neohookean(const std::string& name) : Material(n...
ALGO
0.976212
5.18152
{ "github_metadata": { "branch": "master", "commit_count": 3967, "repo_created_at": "2020-07-13T22:20:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 8, "issues": 4, "pull_requests": 5 }, "file_meta": { "content_id": "400a10...
00d8aee1-82ba-49dd-b365-25d5af1cfefc
sumaticosmos/chaos
Source.cpp
#include "Header.h" int main(int argc, char* argv[]) { //Set random seed rand_gen.seed((unsigned int)time(0)); //Create the window const sf::VideoMode screenSize = sf::VideoMode::getDesktopMode(); window_bits = screenSize.bitsPerPixel; if (fullscreen) { window_w = screenSize.width; window_h = screenSize....
ALGO
0.99634
4.7323
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-03-22T06:46: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": "97164e82dc...
51fa6815-0daf-4ff7-a837-1de9b5bebb2d
baiyancheng20/low-cost-vision
Vision/StereoVisionDepth/include/stereovisiondepth.h
//****************************************************************************** // // Low Cost Vision // //****************************************************************************** // Project: StereoVisionDepth // File: stereovisiondepth.h // Description: Program witch use 2 ca...
ALGO
0.996228
5.651467
{ "github_metadata": { "branch": "master", "commit_count": 383, "repo_created_at": "2016-01-11T08:14:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3c03849e...
d8c78e70-74de-49d2-a9f6-7ea5799f4929
MFors/project-euler
050.cpp
/* Project Euler Problem 50 <NAME> 2014 "Which prime, below one-million, can be written as the sum of the most consecutive primes? */ #include <iostream> #include <vector> #include <map> #include <queue> #include <boost/dynamic_bitset.hpp> using namespace std; vector<int> generatePrimesUpTo(int n) { ...
ALGO
0.999978
5.092133
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2014-07-15T11:21: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": "6e32d33d...
af74e98a-23ca-4512-a9b0-03973ddf2c5d
mmm-da/archive
2019/labs_oop/lab9/rpn.cpp
#include "rpn.hpp" int calc_tokens(vector<Token*> tokens){ stack<int> calc_stack; int a,b; for(int i=0;i<tokens.size();i++){ if(tokens[i]->get_id()==operand_id){ calc_stack.push(tokens[i]->get_value()); else{ a = calc_stack.top(); calc_stack.pop(); ...
ALGO
0.996816
3.958189
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-02-10T13:22:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "3cb054a60...
93289dd7-2df1-4a79-aac1-bdfe246f006a
Zamanof/CPP_FSDA_Oct_24_5_az
CPP 07. Search algorithms/Search algorithms.cpp
#include<iostream> using namespace std; int main() { srand(time(NULL)); // Search algorithms const int length{ 100 }; int arr[length]{}; for (int i = 0; i < length; i++) { /*arr[i] = i + 1;*/ arr[i] = rand() % 1000; } for (int i = 0; i < length; i++) { cout << arr[i] << ' '; } cout << '\n'; cout <...
ALGO
0.99964
4.372564
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2025-01-14T12:57:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0069e9afc...
30928189-b36a-403d-9191-0125006d3f3e
Sourabh2001-dec/cp
DP/Longest Common Subsequence/6_convStrAtoStrB.cpp
// find min number of insertion and deletions required to convert string A to string B #include <bits/stdc++.h> #define vectInt vector<int> #define vectStr vector<string> using namespace std; void minInsertAndDel(vectStr seq1, vectStr seq2, int len1, int len2) { int rows = len1 + 1; int cols = len2 + 1; vector<v...
ALGO
0.999975
4.862875
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2021-12-06T04:38: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": "839d5fe14...
2d5345fe-5137-44e2-9d92-423f3ade17f0
rainwl/GeometryKit
include/igl/predicates/find_self_intersections.cpp
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2024 <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.99336
5.306746
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2024-05-12T10:02:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7cbc85f27...
62d99bd4-cfd3-4f20-ba4e-d6cc9dd30be3
iShubhamRana/CSESproblemset
DP/ArrayDescription.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector <int> vi; typedef pair <int, int> pi; /***************************************************************************************/ //access keywords #define F first #defin...
ALGO
0.999997
4.098964
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2022-07-22T16:54:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7eeb79648f...
2e76d646-5ba5-4f73-9f93-5e55f2df94a2
Gabri3l2301/FP-FuncionesII-PenalozaGabriel
007juego_dados.cpp
#include <iostream> #include <windows.h> #include <cstdlib> #include <ctime> using namespace std; // PROGRAMA QUE SIMULA UN JUEGO DE DADOS POR TURNOS int jugadaJugador1; int jugadaJugador2; void dado1(){ cout << "╔═════════╗" << endl; cout << "║ ║" << endl; cout << "║ ● ║" << endl; cout...
ALGO
0.999414
4.108923
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2025-06-10T19:09: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": "262cc0703ed...
8afb8855-0b48-47dc-aca0-7c5f48871891
shoooooou/atcoder
Python/ARC/ARC149/a2.cpp
/** * created: 02.10.2022 22:04:28 **/ #include <bits/stdc++.h> using namespace std; using lli = long long int; using ull = unsigned long long; using vvi = vector<vector<int> >; using vi = vector<int>; using vvl = vector<vector<lli> >; using vl = vector<lli>; #define rep(i,n) for(int i=0; i<(n); i++) #define rep2(i...
ALGO
0.999755
3.409493
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-03-21T12:53: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": "91736192d5cc...
015f16ff-7a91-448e-ac58-666dcb96b590
sharmaachintya/DSA
BookAllocation.cpp
#include<iostream> #include<vector> using namespace std; bool isPossible(vector<int> &arr, int n, int m, int mid) { int studCount = 1; int pageSum = 0; for (int i=0;i<n;i++) { if (pageSum + arr[i] <= mid) { pageSum = pageSum + arr[i]; } else { ...
ALGO
0.999991
4.291414
{ "github_metadata": { "branch": "main", "commit_count": 554, "repo_created_at": "2022-03-12T16:03:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4dd1783439...
cd8d20c0-55ca-4d6a-a20d-7e0473c2d61c
duzaao/3-Semestre-BCC-IME-USP
ED2/EP1/lixo/EP_EduardoFigueredoPacheco/ABB.h
#pragma once #include "EP.h" using namespace std; struct noABB { string key; noABB * esq; noABB * dir; Item val; noABB(); }; class ABB { public: ABB() : raiz(nullptr) {} ~ABB() { delete(raiz); } noABB * buscaABB(string x) { return buscaABB(raiz, x); } noABB * ...
ALGO
0.999461
3.611802
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-05-08T12:37: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": "8ae25799be...
03df0571-ddd3-4f85-a06b-f0efa5542bc1
rladygks329/c-
25 해밍코드/re/MyHammingCode.cpp
#include "MyHammingCode.h" #include<iostream> using namespace std; // constructors MyHammingCode::MyHammingCode ():value(0) { } MyHammingCode::MyHammingCode (unsigned int val):value(val) { } // utility functions unsigned int MyHammingCode::getEncodedValue () { encodedValue = 0; encodedValue |= copyBits(value, 0...
ALGO
0.99884
3.91864
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2020-11-04T12:36: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": "025830c3bf8...
e2409b87-2f1f-41e1-ba82-9816ed02b0b7
Ponyduelist003/2143-OOP-Forsgren
assignments/AO2/main.cpp
/** * Course: CMPS 2143 - OOP * Assignment: A02 * Purpose: Create 2 lists, add them together, and print various values. * * @author <NAME> * @version 1.1 01/03/17 */ #include <iostream> using namespace std; int A[100]; struct Node { int val_1; Node *next; /** * Initializes an empty Node ...
ALGO
0.9927
5.660935
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2018-08-29T22:10: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": "42015f2a0...
9f3a3b33-a3eb-46ef-8856-12b5ab442edc
HarshCasper/NeoAlgo
C-Plus-Plus/sort/Bead_Sort.cpp
/* Bead sort, also called as gravity sort, is a natural sorting algorithm since this algorithm was inspired from natural phenomenons and was designed keeping in mind objects(or beads) falling under the influence of gravity. The bead sort operation can be compared to the manner in which beads slide on parallel poles, su...
ALGO
0.999974
5.479667
{ "github_metadata": { "branch": "master", "commit_count": 7521, "repo_created_at": "2020-06-24T16:04:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 887, "forks": 1041, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43...
73d0825c-1643-483a-8acc-d7007776db91
SNavleen/Terrian-Generation
DrawMesh.cpp
#include <stdio.h> #include <stdlib.h> #include <vector> #include <math.h> #ifdef __APPLE__ # include <OpenGL/gl.h> # include <OpenGL/glu.h> # include <GLUT/glut.h> #else # include <GL/gl.h> # include <GL/glu.h> # include <GL/freeglut.h> # include <windows.h> #endif #include "DrawMesh.h" #include "Verte...
TOOL
0.949528
4.310796
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-11-12T21:32:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c17618e514...
5a2e2656-d7c3-4787-af2c-e32e4255097e
LGBitencourt/Competitive-Programming
camp/10/d.cpp
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define ff first #define ss second #define what_is(x) cerr << #x << " is " << x << endl; #ifdef ONLINE_JUDGE # define lld I64d # define debug(args...) {} #else # define debug(args...) fprintf(stderr, args) #endif using namespace std; typedef long lo...
ALGO
0.999965
4.303586
{ "github_metadata": { "branch": "master", "commit_count": 290, "repo_created_at": "2015-08-06T01:22: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": "4210b88f...
3990495d-b633-433f-bef8-62d5a7b6465d
ckf42/leetcode-code
sol/815/815.cpp
#include <queue> #include <unordered_set> struct Solution { inline bool hasIntersection(const unordered_set<int> &s1, const unordered_set<int> &s2){ for (const int e : s1){ if (s2.contains(e)){ return true; } } return false; } int numBusesToD...
ALGO
0.999941
5.564825
{ "github_metadata": { "branch": "main", "commit_count": 241, "repo_created_at": "2023-09-18T15:12:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f8180e32e...
eace9fbf-aaa4-446e-a195-66389c6d6f9d
zeyad-barahme/data-structures-implementations
Day4/min_heap.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class MinHeap { vector<int> heap; void heapifyUp(int index) { if (index == 0) return; int parent = (index - 1) / 2; if (heap[parent] > heap[index]) { swap(heap[parent], heap[index]); ...
ALGO
0.999321
5.975601
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-07-14T18:22: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": "d529f52ac069...
c5d9731b-f882-4e06-adfb-ebff847b0f0d
ishandutta2007/codeforces-k
krijgertje/normal/444/D.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <cstring> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <list> #include <cassert> #include <ctime> #include...
ALGO
0.999903
3.761701
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06: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": "3dd472717c4d...
ac8476a3-87ed-46b3-9906-dc63b3c19271
coppermilk/esp32_pixelflow
src/math_pixelflow.cpp
#pragma once #include "math_pixelflow.h" Pixel MathPixelFlow::map(int x, int in_min, int in_max, Pixel &out_min, Pixel &out_max) { // If x is zero, return a black pixel if (!x) { return { 0, 0, 0 }; } else { uint8_t r; uint8_t g; uint8_t b; if (x == 1) { // Clamp the ratio between 0 a...
ALGO
0.946471
6.512316
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2023-03-03T16:53: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": "f3a64be17...
6077a2ee-3dc3-4707-8a3e-adafa2fb88a7
emifervi/Estructuras_de_datos
Tutoring/postfix_ops.cpp
#include <iostream> #include <sstream> #include <stack> #include <queue> #include <vector> using namespace std; int calculator(int y, int x, string operation){ if (operation == "+"){ return y + x; } else if (operation == "-"){ return y - x; } else if (operation == "*"){ return y * x; } else i...
ALGO
0.999368
4.160789
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2018-08-08T00:58: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": "80a51f8f9...
37401c06-d39d-4f4f-a9c0-f11a1f459616
dhuamanilu/programacion
1710/1710ADIV1_CODEFORCES.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<ll> vll; #define FOR(i, a, b) for (int i=a; i<(b); i++) #define mp make_pair #define pb push_back #define f first #define se second #define lb lower_bound #...
ALGO
0.999943
3.868676
{ "github_metadata": { "branch": "main", "commit_count": 560, "repo_created_at": "2023-01-02T13:19:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "64747f25a2...
5d274af5-d867-4c27-a196-cd43d7e7fea5
sha314/Network
src/nets/BA/network_BA_v2.cpp
// // Created by shahnoor on 7/1/19. // #include <iostream> #include <set> #include "network_BA_v2.h" using namespace std; bool NetworkBA_v2::grow(size_t netowk_size) { if(netowk_size <= _N_size){ cout << "cannot grow" << endl; return false; } setMaxNetworkSize(netowk_size); // view(...
ALGO
0.997013
4.206865
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2018-08-09T20:15:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a6879b1...
19baeca2-3dc0-42c0-b895-6741d10ff307
Peru-Riezu/Pong
api/src/c_client_connection_handler_overseer/c_client_connection_handler/c_uint256.hpp
/* ************************************************************************** */ /* */ /* */ /* Filename: c_uint256.hpp ...
TOOL
0.957624
7.431141
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-07-05T02:48: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": "70da8725eea...
74a62371-b77b-42d0-9d04-7a77b00c1103
brupadhyay/Graph-Series-by-Striver
G39 - Minimum Multiplications to reach end/dijkstraOnRange.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int minimumMultiplications(vector<int> &arr, int start, int end) { // Create a queue for storing the numbers as a result of multiplication // of the numbers in the array and the start number. ...
ALGO
0.999978
4.901119
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2023-02-20T12:51:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "133e70a563...
44dd412d-870f-4651-ab74-3e297e86d0a4
khushvantkr12/Striver-A-Z
Recursion and Backtracking.cpp/14.N-Queens.cpp
//https://leetcode.com/problems/n-queens/description/ //TC-O(n!) // The first queen has n choices. // The second queen has at most (n-1) choices. // The third queen has at most (n-2) choices, and so on. //SC-O(n^2)//due to 2D grid class Solution { public: bool check(int x, int y,vector<vector<char>>&grid,vector<vec...
ALGO
0.999942
6.200347
{ "github_metadata": { "branch": "main", "commit_count": 176, "repo_created_at": "2024-06-13T13:30:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6197ce3c69...
fa5852a2-e7fe-46ee-905d-1a80d838b989
biomedia-mira/drop2
mia/include/miaHistogram.h
/* * mia - a lightweight, cross-platform C++ image processing library. * * Copyright 2016 <NAME> <<EMAIL>> * * 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/licens...
ALGO
0.919989
7.191104
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-09-28T10:12:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 37, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e85b73d2...
a690f802-407c-4ed0-91d6-ceebfe3664f5
sailendrachettri/fraz-dsa-solution
arrayANDstring/sum_of_subarray_equals_to_k.cpp
/* // BRUTE FORCE ALGORITHM class Solution { public: int subarraySum(vector<int>& nums, int k) { int size = nums.size(); int count = 0; for(int i = 0; i < size; i++) { int sum = 0; for(int j = i; j < size; j++) { ...
ALGO
0.999951
6.300482
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2022-08-17T15:28: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": "42f36643c0b...
aebdf80a-6c35-453c-9279-b04cbe5308c8
Ashuu21/DSA-with-CPP
06DSA/DSA using C++/07 Queue/Priority Queue.cpp
#include<iostream> #include<stdlib.h> using namespace std; class Node { public: int data; int priority; Node *next; }; class PriorityQueue { Node *front, *rear; public: PriorityQueue() { front = NULL; rear = NULL; } void enqueue() { Node *curre...
ALGO
0.99994
4.893034
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-08-27T21:21: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": "5defa3a2a40...
b0688471-c5e3-48ad-8466-b6ee4f343a29
MortezaKhandan/Codility
Sorting_ CountingSort .cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int Max(int A, int B) { return A>B ? A : B; } int Min(int A, int B) { return A<B ? A : B; } int MaxValueOfArray(int A[] , int len ) { int MaxVal=0; for (int i=0 ; i < len ; ++i) MaxVal= Max(MaxVal, A[i]); return...
ALGO
0.999971
4.785819
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-04-24T17:33: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": "b6ffe51534b6...
1c52dc26-3d2a-4228-b710-82282ca6a0d7
Mr-Tony921/xju-autopilot
pnc/common/math/qp_solver/qp_solver.h
/****************************************************************************** * Copyright 2023 The XJU AutoPilot Authors. All Rights Reserved. *****************************************************************************/ #pragma once #include <vector> #include <limits> #include "Eigen/Core" #include "osqp/osqp....
ALGO
0.984476
6.130755
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-09T06:08:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a94af59383...
fa27b37a-d3e9-4872-81c6-3b843d79cbe3
davidtvs/calibration
lidar_segmentation/include/lidar_segmentation/clustering.h
/************************************************************************************************** Software License Agreement (BSD License) Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt All rights reserved. Redistribution and use in source and binary forms, with o...
ALGO
0.994158
5.484845
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2016-04-16T20:51:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4403d90c...
99f9a2c8-662f-4029-8075-e8b0ad994027
AnkitVarshney01/My-Coding-Playground
Codeforces/A_Reverse.cpp
#include <iostream> #include <string> #include <algorithm> #include <climits> #include <vector> #include <stdlib.h> #include <map> #include <queue> #include <stack> #include <set> #include <functional> #include <random> #include <numeric> #include <iomanip> #include <chrono> #include <cmath> #include <cassert> #include...
ALGO
0.999972
3.976788
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-05-26T09:39: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": "fae5039d93...
1bb2ec02-d036-4537-915a-a1e5b1e0d9c1
ChangeMaker13/algorithmStudy
동적계획법/삼각 배열의 최대 경로 찾기/삼각형_박준하.cpp
/* * 2018114686 <NAME>는 이 소스 코드를 다른 소스 코드를 복사하지 않고 직접 작성하였습니다. */ #define _CRT_SECURE_NO_WARNINGS #include <stdlib.h> #include <stdio.h> #include <string.h> #define MAX 130 int N; int T[MAX][MAX]; //원래 입력 값 int D[MAX][MAX]; //경로의 길이 저장 int P[MAX][MAX]; //경로 탐색용 void Solve() { //아랫층 부터 순서대로 순회 for (int i = N - 2; i...
ALGO
0.999991
4.336617
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2021-04-04T19:27:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "198f84d35...
d3e11a93-c0c4-484a-90f8-d14ce579426b
noobie7/CodeBank
AtCoder/abc138/D.cpp
/* "Won't stop until I'm phenomenal." - <NAME> */ #include<bits/stdc++.h> using namespace std; typedef long long int ll; #define ff first #define Shazam ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define ss second #define all(c) c.begin(),c.end() #define endl "\n" #define test() int t; cin>>t; ...
ALGO
0.999869
4.470018
{ "github_metadata": { "branch": "main", "commit_count": 156, "repo_created_at": "2021-09-12T05:11:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4db04d28c...
0a4b380f-9cc2-4640-be65-ecc06b9039f5
taki-d/ProgrammingChallenges
week05/11838.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int V,E; while(1){ cin >> V >> E; if(V == 0 && E == 0){ return 0; } vector<vector<int>> G(V); vector<vector<int>> rG(V); auto add_edge = [&](int from, int to){ G[from].push_ba...
ALGO
0.999609
4.391483
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-04-27T14:55:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19f2b0189d...
15b14f78-a5eb-44ed-9ba5-85d0e887b23e
grykah/Coursework
CS161/week2/change.cpp
/************************** // Author: <NAME>, ID: 932-952-670 // Date: 10/4/16 // Description: Determine the amount of total for a user provide denomination (provided in cents). ***************************/ #include <iostream> #include <math.h> using namespace std; int main() { //get user input on amount of ch...
TOOL
0.942853
4.167227
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-08-05T21:41: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": "5a50bcb26d...
4bb76eeb-3ac8-4939-9f4e-38230896065d
msmn1729/Algorithm
BOJ/ETC/ETC_01806_부분합.cpp
#include <unordered_map> #include <unordered_set> #include <algorithm> #include <iostream> #include <climits> #include <cstring> #include <iomanip> #include <bitset> #include <string> #include <vector> #include <cmath> #include <queue> #include <stack> #include <list> #include <map> #include <set> #define ll long long...
ALGO
0.999955
3.764095
{ "github_metadata": { "branch": "master", "commit_count": 1104, "repo_created_at": "2020-07-24T13:24: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": "437935c...
0f143123-eb4d-4116-b7de-316785a9eee6
donggoolosori/BOJ_Record
Category/Graph/3055-탈출/1.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; struct position { int y, x; }; int dy[4] = {0, 1, 0, -1}; int dx[4] = {-1, 0, 1, 0}; int r, c; char map[50][50]; // 빈 곳 . , 물 * , 돌 X, 고슴도치 S, 굴 D int visit[50][50]; int w_time[50][50]; queue<position> water_q; queue<position> hog_q; posi...
ALGO
0.999769
4.130296
{ "github_metadata": { "branch": "main", "commit_count": 512, "repo_created_at": "2020-05-25T14:13:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4928edf6e...
6f490c6d-9f50-4bab-aafb-0897033da316
Serenkii/Arduino-Snake
Snake_Game_0.5/Snake.h
enum SnakeDirection { UP, RIGHT, DOWN, LEFT }; #define SNAKE_MAX_LENGTH 32 class Snake { byte size; byte body[SNAKE_MAX_LENGTH][2]; byte direction; public: Snake(byte headPositionX, byte headPositionY, SnakeDirection facing) { setSize(1); setDirection(facing); body[0][0...
TOOL
0.923276
5.392518
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-03-09T07:27: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": "add6eb8aa763...
d6f81e6d-2503-4c5d-bac4-f5afbfa973d8
zzh535897/QPC-TDSE-CPC
include/spherical/utilities/blas2.hpp
#pragma once #ifdef support_avx3 #define use_manual_simd 1 #endif #ifdef support_avx3 //+++++++++++++++++++++++++++++++++// //multiplication of complex numbers //+++++++++++++++++++++++++++++++++// static inline comp_v avx512_zmulz (__m512d x,__m512d y)noexcept//compute x*y { __m512d zmm2 = ...
ALGO
0.994334
4.486887
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-07-11T20:44:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7000feff86a...
59527ef3-8598-45af-8d68-4e3fbc2ad23c
coltonworrell/CodeSamples
Math366.cpp
/****************************************************************************** Math Notes: K choose N C(k-1,n-1) K choose from n with remainders C(n,k)_R = C(n+k-1,k) choose m 0's and n 1's, and assum m >= n => C(m+n,n) - C(m+n,m) number of 0-dominated strin...
ALGO
0.999442
3.058859
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-01-19T05:01: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": "9905c47cdfd0...
a7b4c024-6b75-46b7-9d7d-ec7f32dc6055
ishandutta2007/codeforces-a
alireza_kaviani/normal/140/F.cpp
/* Generated by powerful Codeforces Tool * You can download the binary file in here https://github.com/xalanq/cf-tool (Windows, macOS, Linux) * Author: alireza_kaviani * Time: 2020-04-17 13:36:08 **/ #include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespa...
ALGO
0.999863
4.530066
{ "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": "d4dbbf88acbe...
45891d75-494a-4d1d-a317-1a0097ff19f7
kaue19santos/Controle-de-Hospital
include/escalonador.hpp
#ifndef ESCALONADOR_HPP #define ESCALONADOR_HPP #include "paciente.hpp" class Escalonador { private: //metodos para transformar o escalonador em um MinHeap int GetAncestral(int posicao); int GetSucessorEsq(int posicao); int GetSucessorDir(int posicao); int num_pacientes; int tamanho; Paciente *pacientes...
ALGO
0.929372
4.528848
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-12T18:02: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": "1d8277f971b8...
f681876f-935e-4ab2-bdc2-69b7e2fe2af9
divyagar/SportsQuiz
sports_quiz.cpp
#include <iostream> using namespace std; #include <string> #include <algorithm> #include <bits/stdc++.h> #include <stdio.h> #include <conio.h> #include <thread> #include <chrono> #include <mutex> #include <condition_variable> class countries{ string country; vector<string> sports; int total_sports; pub...
TOOL
0.939505
3.336905
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-07-02T13:25: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": "05bdba0722...
93a56176-8d4d-408c-a0f6-7c2211a096c5
cjr310/leetcode
20_Valid Parentheses.cpp
// Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. // An input string is valid if: // Open brackets must be closed by the same type of brackets. // Open brackets must be closed in the correct order. // Note that an empty string is also co...
ALGO
0.939159
6.709335
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-02-16T02:30: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": "eb298eb0a3...
bd973f95-ae31-4d85-991b-7bf8c65acf43
danieltrt/SBFL
results/MINIMUM_DIFFERENCE_BETWEEN_GROUPS_OF_SIZE_TWO.py.cpp
int calculate ( int a [ ] , int n ) { sort ( a , a + n ) ; int s [ n ] ; int i = 0 ; int j = n - 1 ; while ( ( i < j ) && ( i < j ) ) { s [ i ] = ( a [ i ] + a [ j ] ) ; i ++ ; j -- ; } int mini = min ( s , s ) ; int maxi = max ( s , s ) ; return abs ( maxi - mini ) ; }
ALGO
0.996063
4.18548
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-08-03T19:59: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": "b8fd3588d2c3...
57b47f15-39ac-462d-a0dc-06836502871f
noahrichards/advent-2020
day14/main.cc
#include <execution> #include <fstream> #include <numeric> #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" #include "absl/strings/numbers.h" #include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include "absl/strings/strip.h" #include "absl/strings/substitute.h"...
ALGO
0.997243
6.739598
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-12-02T19:20: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": "7658fb876...
4ebded25-8a77-4ee7-a2e8-7144d3fe31eb
yuika-sama/code-ptit-solutions
SSAA - 2024/Contest 2/Bai16.cpp
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize("O2") #pragma GCC target("avx,avx2,fma") #define faster() {ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);} #define ll long long #define pii pair<int, int> #define vi vector<int> #define vll vector<long long> #define mii map<int, int> #define si s...
ALGO
0.999932
3.558568
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2023-08-02T23:34:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c9177799a8...
c3481849-f6d9-4c9b-b6c6-8de733cf1816
Lee-ho-kyeoung/2023_DataStructure
9주차/9주차 과제 LinkedList/main.cpp
#include <iostream> #include "LinkedList.h" #include "LinkedList.cpp" using namespace std; int main(){ int N = 0, num = 0; int x = 0; cin >> N; //반복 횟수 = case 횟수 Chain<int>* arr = new Chain<int>[N]; //객체 배열 동적할당 for(int i = 0; i < N; i++){ //반복 횟수만큼 반복 ...
ALGO
0.998836
4.288796
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-12-09T12:16: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": "e0211f80ce5e...
7116fb54-9ad6-4bbd-b8ae-45657fe86657
SuperNova74-K/Competitive_Programming_Problem_Solutions
CF_225A_Dice_Tower.cpp
// أبدأ بسم الله مستعينا راض به مُدّبر معينا // و بعد إني باليقين أشهد شهادة الإخلاص أن لا يُعبد // بالحق مألوه سوى الرحمن من جل عن عيب و عن نقصان // و أن خير خلقه محمد من جائنا بالبينات و الهدى // Bismillah Al Rahman Al Rahim // Author : <NAME> // File Created on : 27...
ALGO
0.999986
4.019035
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2022-05-15T17:11:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59587d68d8e...
0821c458-15b7-444e-bcbe-ba714f927add
PoundKey/Algorithms
LeetCode/C++/179-Largest Number.cpp
// Thoughts: for num a and b, if str(a) + str(b) > str(b) + str(a), then a should be placed in front of b // and vice versa. Overrite the comparator, sort and append. Runtime O(nlogn) class Solution { public: string largestNumber(vector<int>& nums) { if (nums.empty()) return 0; string res = ""; ...
ALGO
0.999962
6.289326
{ "github_metadata": { "branch": "master", "commit_count": 346, "repo_created_at": "2014-11-27T07:34:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aac2dad4...
a7ab3bee-3640-4b16-8f9c-15c4d58250b8
xsaiter/isasln
src/olymp/codef/contests/1469/b/sol.cpp
#include <bits/stdc++.h> using namespace std; int max_pref(int n, vector<int> &a) { int res = INT_MIN; int s = 0; for (int i = 0; i < n; ++i) { s += a[i]; res = max(res, s); } return max(res, 0); } int solve(int n, vector<int> &r, int m, vector<int> &b) { int x = max_pref(n, r); int y = max...
ALGO
0.999975
3.936611
{ "github_metadata": { "branch": "master", "commit_count": 649, "repo_created_at": "2017-07-23T03:37: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": "8bcad602...
72f5d3e8-5a73-4279-85fc-68c572661cf2
gsc07/autolabor_simulation
record_path_planner/include/record_path_planner/record_path_planner.h
#ifndef PROJECT_RECORD_PATH_PLANNER_H #define PROJECT_RECORD_PATH_PLANNER_H #include <string> #include <limits> #include <stdlib.h> #include <ros/ros.h> #include <tf/transform_listener.h> #include <tf/transform_datatypes.h> #include <nav_core/base_global_planner.h> #include <geometry_msgs/PoseStamped.h> #include <c...
TOOL
0.968485
5.326378
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2018-04-23T12:39:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 69, "forks": 26, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "a292749...
61cabf6c-6e88-46ee-8d8b-8f8810f126d7
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/08/0831/personal_submission/cf847b_dinghc.cpp
#include <bits/stdc++.h> using namespace std; constexpr int N = 200'000; int a[N]; struct seg_tree { int n; vector<int> t; seg_tree(int n) : n(n) { t.resize(4 * n, -1); build(0, 0, n); } void build(int k, int l, int r) { if (r - l == 1) { t[k] = a[l]; } ...
ALGO
0.999991
4.266303
{ "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": "f650...
e3b06145-c869-4d2c-8a4b-fc0a900d68bf
solbin98/Algorithm
BOJ/14622 소수게임.cpp
//#include<iostream> //#include<cstdio> //#include<queue> // //#define N 5000000 //#define M 100000 // //using namespace std; //int is_prime[N + 1] = { 1,1 }, chk[N + 1]; //priority_queue<int, vector<int>, less<int>> a, b; // //int find(priority_queue<int, vector<int>, less<int>> &queues) //{ // int cnt = 0, pop = 0, i...
ALGO
0.999675
3.760579
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-01-01T15:18: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": "851e15bfa8...
8ee9ddf0-0709-42d2-b5b3-7ec4be4a0c63
kkanggu/Online_Judge
cpp Files/PG_PhoneNumberList.cpp
#include <string> #include <vector> using std :: string ; using std :: vector ; bool solution ( vector < string > phone_book ) { int iLen = phone_book.size () ; int iCurrentSize = 0 ; int iNextSize = 0 ; std :: sort ( phone_book.begin () , phone_book.end () ) ; iNextSize = phone_book [ 0 ].size () ; for ( ...
ALGO
0.999524
4.668044
{ "github_metadata": { "branch": "main", "commit_count": 285, "repo_created_at": "2021-03-07T12:26: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": "fb31482f3a...
0d992a4c-63d0-4398-9a9a-017008595888
serdesize/CrackingCodeInterview
kraken/LargestRectangleHistogram.h
#pragma once #include <string> #include <vector> using namespace std; class LargestRectangleHistogram { public: class Containment { public: int sIdx = -1; int lIdx = -1; int height = 0; int result() { if (sIdx == -1 || lIdx == -1) return -1; return ((lIdx + 1) - sIdx) * height; } }; int fin...
ALGO
0.999918
6.75601
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-10-13T12:29: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": "b2b8b74d63...
1cbbc885-29e8-4264-80d6-7d809e3e4f18
kestop/RemoveTheNet
OpenCVSetup2/medianFilter.cpp
#include <iostream> #include <opencv2\highgui\highgui.hpp> #include <opencv2\core.hpp> #include <opencv2\opencv.hpp> using namespace cv; using namespace std; void showImage(string windowName, Mat m); void myMedianBlur(Mat& src, Mat& dst, int ksize); void insertionSort(int window[]); int compare(const void *a, const v...
ALGO
0.992802
4.649692
{ "github_metadata": { "branch": "FirstApp", "commit_count": 11, "repo_created_at": "2016-07-24T22:58: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": "c4f3388...
66242f14-3969-45db-aade-629ed33cbc7e
EvanWang2015/Hackerrank
CountingSort_count.cpp
/* However, for certain types of input, it is more efficient to use a non-comparison sorting algorithm. This will make it possible to sort lists even in linear time. These challenges will cover Counting Sort, a fast way to sort lists where the elements have a small number of possible values, such as integers within a c...
ALGO
0.999899
5.53348
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-06-25T20:11:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afb0227e5...
02e385cb-813b-4748-9859-502d139346b5
ngja/ps
solution/baekjoon/백준 16948 데스 나이트.cpp
#include <iostream> #include <vector> #include <string> #include <cstdio> #include <algorithm> #include <cmath> #include <tuple> #include <bitset> #include <cstring> #include <stack> #include <queue> #include <deque> #include <set> #include <map> #include <unordered_set> #include <unordered_map> using namespace std; u...
ALGO
0.999972
3.685678
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-01-30T02:21:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e20b9d6c6f6...
ce14cea5-4bf9-48e3-8746-39a3b3b74bbe
shyu61/program-competition
code/typical90/084_05.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) // https://atcoder.jp/contests/abc125/tasks/abc125_c // 🔷初見でどうやったら解けるか // 組合せ最適化問題だが、どの値に変えるのかは無数に選択肢があるので、最適な変更値を考えるところから始める。 // すると、削除する、あるいは他の任意の値に書き換えることが常に最適になることがわかる。 // 変更する値のスキャンはO(n)なので、残りn-1個のgcdをO(logn)以下で求められれば良...
ALGO
0.999938
5.386648
{ "github_metadata": { "branch": "main", "commit_count": 719, "repo_created_at": "2024-08-14T11:39: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": "d021735255...
c3e9d567-7428-4c87-8d7c-b7c88d65c63d
manitgupt14/LeetCode-Daily
0641-design-circular-deque/0641-design-circular-deque.cpp
class Linkedlist{ public: int data; Linkedlist *next; Linkedlist() { this->next=NULL; } Linkedlist(int data) { this->data=data; this->next=NULL; } Linkedlist(int data,Linkedlist* next) { this->data=data; this->next=next; } }; class ...
ALGO
0.999694
5.570878
{ "github_metadata": { "branch": "main", "commit_count": 723, "repo_created_at": "2022-06-25T09:33:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa5abba656...
6c2d6680-fca3-49fc-9d17-b59f80d90a08
hardik302001/leetcode
problems/flatten_binary_tree_to_linked_list/solution.cpp
// O(n) , i guess /* class Solution { public: void flatten(TreeNode* root) { if (!root) return; flatten(root->left); flatten(root->right); TreeNode *tmp = root->right; // head of right side root->right = root->left; // put flattened left on right side ...
ALGO
0.999996
5.99535
{ "github_metadata": { "branch": "main", "commit_count": 3708, "repo_created_at": "2022-03-01T17:28:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8de66717...
8f2a689a-6087-457d-b1e1-3b57ccde975b
networkit/networkit
networkit/cpp/centrality/DynKatzCentrality.cpp
/* * DynKatzCentrality.cpp * * Created on: April 2018 * Author: <NAME> * based on code by <NAME> */ #include <cfloat> #include <cmath> #include <omp.h> #include <networkit/auxiliary/NumericTools.hpp> #include <networkit/auxiliary/Timer.hpp> #include <networkit/centrality/DynKatzCentrality.hpp> #inclu...
ALGO
0.999832
6.091415
{ "github_metadata": { "branch": "master", "commit_count": 9146, "repo_created_at": "2017-02-04T13:04:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 811, "forks": 235, "issues": 23, "pull_requests": 24 }, "file_meta": { "content_id": "31...
83048e05-7183-4bad-941d-c45e66ba3bd8
engus525/BaekJoon
백준/Gold/2638. 치즈/치즈.cc
#include <iostream> #include <vector> #include <queue> #include <memory.h> using namespace std; #define IAMFAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int n,m; int map[101][101]; int cnt[101][101];//[i][j]칸 치즈에 공기가 접촉하는 변의 수 bool visited[101][101]; typedef pair<int,int> pii; vector<pii> melt; pii di...
ALGO
0.999892
3.44744
{ "github_metadata": { "branch": "main", "commit_count": 1282, "repo_created_at": "2023-01-18T09:35: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": "7c58a92db...
8c219708-cc20-4267-9e6e-705ffaeebf34
changsongzhu/leetcode
C++/per_day/07-12-2017/352_h.cpp
/** 352[H]. Data Stream As Disjoint Intervals Given a data stream input of non-negative integers a1, a2, ..., an, ..., summarize the numbers seen so far as a list of disjoint intervals. For example, suppose the integers from the data stream are 1, 3, 7, 2, 6, ..., then the summary will be: [1, 1] [1, 1], [3, 3] [1, 1],...
ALGO
0.999941
6.262094
{ "github_metadata": { "branch": "master", "commit_count": 395, "repo_created_at": "2017-03-15T23:33:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "250b69bc...
8f43ad10-a0c3-4253-93e6-887c0571e8f8
Daliego/Estrutura_de_dados
atividade_de_lista/atividade_cap_10/poliStruct.hpp
#include "listaOrdenada.hpp" #include "iostream" using namespace std; typedef struct poli { float coeficiente; int expoente; struct poli *prox; } *Poli; Poli termo(float c, int e, Poli p) { Poli n = (Poli)(malloc(sizeof(struct poli))); n->coeficiente = c; n->expoente = e; n->prox = p; ...
ALGO
0.990631
4.555225
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2022-09-15T20:42: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": "a8e777c4b38...
dbeaac7f-3890-4ae6-81af-34e618d77434
SheldonNico/Exercises
cpp/002.cpp
#include <bits/stdc++.h> using namespace std; struct ListNode { int val; ListNode* next; ListNode(int x) : val(x), next(nullptr) {}; }; class Solution{ public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { int x=0, y=0, carry=0, sum=0; ListNode* h = nullptr, **t = &h; while (...
ALGO
0.999879
5.967591
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2021-08-24T06:18: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": "948bff6d4...
94bff248-578e-438d-aead-e8a2df92baa7
abhay-nosran/AlgoVault
Code Forces/2064_B.cpp
#include <bits/stdc++.h> using namespace std ; void solve(){ int n ; cin >> n ; vector<int> arr(n+1) ; map<int,int> freq ; for(int i = 1 ; i <= n ; i++){ cin >> arr[i] ; } for(int i = 1 ; i <= n ; i++){ freq[arr[i]]++ ; } int curLen = 0 ; int start , end ; int x , y ; ...
ALGO
0.999903
3.992662
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-29T06:32: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": "cf579e12ced4...
a11865cc-bba3-4f62-b65f-bb6f31c812c0
Satorunakada/Competitive-Programming
UVa/10945.cpp
// UVa Online Judge - 10945 // Author: <NAME> (Satoruu) #include <bits/stdc++.h> using namespace std; int main() { string s; int len, mirror; bool palindrome; while (getline(cin, s), s != "DONE") { len = s.length(); string new_string = ""; for (int i=0; i<len; i++) { if (s[i] >= 'A' && s[i]...
ALGO
0.992705
3.541068
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2019-12-28T22:14: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": "0ff40e779...
3f7e63da-a1d7-47ba-a83c-13eab67ba7cb
thiagoamg/ES-PIM_Cpp
main.cpp
// bibs #include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> #include <stdlib.h> #include "classes.hpp" #include <algorithm> #include <iterator> // general declaration using namespace std; int ind; // begining main int main () { std::string line; std::vector <do...
DATA
0.943636
3.165383
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-03-28T01:39:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5b79168b9...
ef65560f-ffbf-4d51-b7ff-542ed77e3f47
angelleee/OOP-FinalProject-3D-Tetris-SDL2
Example/myalgo.cpp
#include<stdio.h> #include <vector> #include"myalgo.h" using namespace std; void IntInit1D(int* Arr, int Size) { // Initial Idx for (int i = 0; i < Size; i++) { Arr[i] = i; } } void Sort_Idx_Descend(float *DisArr, int *DisIdx, int CbsSize){ IntInit1D(DisIdx, CbsSize); // Descending Sort (Large to small) for ...
ALGO
0.999749
3.718788
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-02-27T01:43: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": "bdc3e57b36f2...
15f510d9-4ae4-4785-913d-2a3ff2ffddbd
Karine-Ennalian/Estrutura-de-Dados_2020.2
Atividade 16 - Contando Char Recursivo/cont_char.cpp
#include <iostream> #include <cstring> using namespace std; // Retorna o números de ocorrências do caractere 'c' na string 's' (com 'n' caracteres). // Algoritmo deve ser recursivo e sem comandos de repetição. int conta_char_rec(char s[], int n, char c, int i, int cont) { if (n < 0) { return cont; ...
ALGO
0.999863
3.985921
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-01-20T19:45: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": "75ab3f969ca1...
d4bfea8e-a2d1-4cd3-a578-45de4c9f07e5
tsukurobo/three_wheel_steer
Arduino/ThreeWheelSteer/ThreeWheelSteer.ino
#include "cubic_arduino_ver2.3.h" #include "PID.h" #include "Cubic.controller.h" #include <ros.h> #include "msgs/ThreeWheelSteerRad.h" #include "msgs/PIDGain.h" #include <std_msgs/Int16MultiArray.h> #define MOTOR_NUM 3 #define FLT_ZERO 1e-5 ros::NodeHandle nh; double AngleLeft, AngleRight, AngleBack; double AngVelL...
TOOL
0.979871
4.859412
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-20T13:28:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "962d29df7a714...
2b30327c-2792-47d2-be10-6157c4baed08
Leixb/jutge_problems
P45484_ca_Quadrat_magic.cc
#include <bits/stdc++.h> using namespace std; bool quadrat_magic(const vector< vector<int> >& t) { int n; bool ok = true; vector <bool> done (t.size(),false); for (size_t i = 0; i < t.size() and ok; ++i) { int sum_a = 0, sum_b = 0; for (size_t j = 0; j < t.size(); ++j) { sum...
ALGO
0.99824
4.608465
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2018-02-18T21:07:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08c85a8c...
ad525062-e1a3-4b9a-8149-7f7831a41cee
haadisaqib/COSC2436
Dlab1_1/twosum/main.cpp
#include <fstream> #include <iostream> #include <unordered_map> using namespace std; int main() { // x = size of arr // n = target sum int x, n; cin >> x >> n; int arr[x] = {}; //declare hashmap unordered_map<int, int> map; //place inputs into array for (int i=0; i<x; ++i) { ...
ALGO
0.999993
4.5296
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-03-27T03:10: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": "b248b0e71e...
b5a4bc10-2162-4f34-a484-8123204d7b3b
north-h/Match_code
2023/Codeforces_-_Codeforces_Round_903_(Div_3)/A_Dont_Try_to_Count.cpp
/* * ================================================================================== * Author: north_h * Time: 2023-10-12 22:37:57 * * Problem: A. Don't Try to Count * Contest: Codeforces - Codeforces Round 903 (Div. 3) * URL: https://codeforces.com/contest/1881/problem/A * MemoryL: 256 MB * TimeL: ...
ALGO
0.99992
4.160903
{ "github_metadata": { "branch": "main", "commit_count": 555, "repo_created_at": "2023-08-20T03:53: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": "45ef14c3d4...
2805d411-9abb-460d-8dfb-ed5466f2330f
ishandutta2007/codeforces-t
teja349/normal/1401/D.cpp
//teja349 #include <bits/stdc++.h> #include <vector> #include <set> #include <map> #include <string> #include <cstdio> #include <cstdlib> #include <climits> #include <utility> #include <algorithm> #include <cmath> #include <queue> #include <stack> #include <iomanip> #include <ext/pb_ds/assoc_container.hpp> #include <ex...
ALGO
0.99978
3.811923
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "db6436e70d57...
ccf36dcc-1257-4c86-b609-f4e745bbbf2a
Jonathan-Uy/CSES-Solutions
Mathematics/Binomial Coefficients.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxA = 1e6; const ll MOD = 1e9+7; int N, a, b; ll fact[maxA+1], inv[maxA+1]; ll inverse(ll x){ ll res = 1; ll expo = MOD-2; while(expo > 0){ if(expo&1) res = (res * x) % MOD; x = (x * x) % MOD; ...
ALGO
0.999958
4.51287
{ "github_metadata": { "branch": "main", "commit_count": 238, "repo_created_at": "2020-11-21T19:50:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 615, "forks": 200, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "43da42...
3b960bbe-e48b-4fa3-86a8-8a5b90192b26
yana87gt/procon
aoj/CGL_2_D.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;++i) typedef complex<double> Point; #define X real() #define Y imag() const double EPS = 1e-9; #define EQ(n,m) (abs((n)-(m)) < EPS) // 内積 dot(a,b) = |a||b|cosθ double dot(Point a, Point b) { return a.X*b.X + a.Y*b.Y; } // 外積 cross(a,b) =...
ALGO
0.999693
4.265946
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2017-05-30T09:53: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": "a64a74c49...
82dce196-57dc-4705-afce-77fd4c2b5961
tonydavid-3/codebase
Algorithms/C++/677_MapSums/677_MapSums.cpp
// 677_MapSums.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <string> #include <tuple> #include <stack> using namespace std; class TrieNode { public: TrieNode* children[26]; bool isWord; int data; TrieNode() { ::memset(children, 0, sizeo...
ALGO
0.999685
5.452401
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-05-21T02:03:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 21 }, "file_meta": { "content_id": "177535d6...
7c00f66d-5414-4e86-973e-d46ba3d21e8a
researchmm/tasn
tasn-mxnet/3rdparty/mkldnn/src/cpu/gemm_x8s8s32x_convolution.cpp
/******************************************************************************* * Copyright 2017-2018 Intel Corporation * * 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.apa...
ALGO
0.966407
5.018391
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-03-29T02:02:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 218, "forks": 39, "issues": 16, "pull_requests": 6 }, "file_meta": { "content_id": "3c41f6...
eaf81365-0f0c-4470-a155-12a9393c867d
AkiLotus/AkikazeCP
Vault/Codeforces Problems/708A.cpp
/********************************************************** * Code written by Akikaze * * <NAME>, #Team4T's Chief Executor * * #Team4T Tertiary Flagship - Oblivion * * * * Written by a rando...
ALGO
0.999961
3.338611
{ "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": "02ae5393d...
e732a9e5-c9bf-4dac-9f67-6f296c5cba44
vbonnici/grafe-sim
analysis/data/p00740/s773875108.cpp
#include <iostream> using namespace std; int main(void){ while(1){ int stone[50]; for(int k = 0 ; k < 50 ; k++){stone[k] = 0;} int bowl; int n, p; // n:候補者人数,p:小石の総数 cin >> n; cin >> p; if(n == 0 && p == 0){return 0;} bowl = p; bool flg = true; int ans; for(int i = 0...
ALGO
0.999883
3.279859
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-07-10T13:21: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": "0258b382565...