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
e15856fe-ee6a-4845-8315-d118401a8054
priyanshsingh/Cpp-learning
STL/6_iterators_short.cpp
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> v = {1,2,3,4,5,6,7}; cout << "Print the vector using for loop(simple way) : \n"; for (int i = 0; i < v.size(); i++) { cout << v[i] << endl; } cout << "Print the vector using iterators: \n"; vector<int> ::i...
TOOL
0.900057
4.41322
{ "github_metadata": { "branch": "master", "commit_count": 651, "repo_created_at": "2020-09-30T07:36:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a654714...
9f850941-2be8-4649-b97a-9602ef1398c7
huangguojun/mycpp
data-structure/leet_code_problems/remove_duplicates.cpp
/* * Given a sorted array, remove duplicates in place and return the new length. * It doesn't matter what is in array beyond the unique elements size. * Expected O(1) space and O(n) time complexity. * Input : {1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 6, 7, 7} * Output: {1, 2, 3, 4, 5, 6, 7} */ #include <iostream> #include ...
ALGO
0.999736
6.388794
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2015-07-10T01:23:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0c0cd21c...
8e5fa755-8874-48aa-9455-0c4ee99ce5f1
mcygorek/ACE
include/Simulation_OD.hpp
#ifndef SIMULATION_OD_DEFINED_H #define SIMULATION_OD_DEFINED_H #include <memory> #include "IF_from_Parameters.hpp" #include "Propagator.hpp" #include "Simulation_Results.hpp" //#include "Simulation.h" #include "InitialState.hpp" #include "FT_Output.hpp" #include "Which_Env_Ops.hpp" //#include "Cavityfy.h" #include "...
ALGO
0.951946
5.963415
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2021-01-07T22:13:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9f2991e...
e3728976-50e8-4c95-852b-e70ebf3e54fc
Abhi-wolf/DSA_Questions
Linked-List/Doubly_Linked_List_1.cpp
#include <iostream> using namespace std; class Node { public: Node *prev; int data; Node *next; }; class DoublyLL { private: Node *first; public: DoublyLL() { first=NULL; } void Create(int A[],int n); void Display(); ...
ALGO
0.999888
4.65866
{ "github_metadata": { "branch": "main", "commit_count": 109, "repo_created_at": "2023-07-04T04:45:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e5464b822...
87fd3e4a-0092-4526-a08e-23bf975d047a
humazed/UriOnlineJudge-1
1162/1162.cpp
#include <iostream> using namespace std; int main(){ int i, j, x, n, l, swap; bool swapped; cin >> n; while (n--){ cin >> l; swap = 0; int train[l]; for (i = 0; i < l; i++){ cin >> train[i]; } for (i = l - 1; i >= 0; i--){ swa...
ALGO
0.999939
4.059472
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-06-24T11:49:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e9f5b4b0b...
9be94aa4-a0c9-459c-a54d-57de16520726
thenakulgupta/DSA-Practice
Graphs/25. Detect Cycle Using Union Find.cpp
/* Problem: Detect Cycle Using Union Find. */ #include <iostream> #include <list> using namespace std; class Edge { public: int src; int dest; int wt; Edge(int s, int d, int w) { src = s; dest = d; wt = w; } }; const int n = 5; int par[n], rank1[n]; int find_function(...
ALGO
0.999919
5.674843
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2023-06-11T12:38: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": "965ee1388...
6c36af5b-4cb0-4a98-bf6a-15000523ff3c
taut0logy/Arduino_
_vscode.ino.hex/sketch/A_Increasing_and_Decreasing.cpp
#line 1 "C:\\Users\\LENOVO\\OneDrive\\Documents\\C\\_VScode\\A_Increasing_and_Decreasing.cpp" #include <bits/stdc++.h> using namespace std; #define pb push_back #define pf push_front #define pp pop_back() #define ppf pop_front() #define rev(v) reverse(v.begin(), v.end()) #define all(v) v.begin(), v.end() #define sz(v) ...
ALGO
0.999875
4.326974
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-05-18T18: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": "208d72358af5...
43ea3ef6-bb62-4c1b-bf34-67f03e0d5e2d
shoujiaxin/leetcode-solutions-cpp
[953] Verifying an Alien Dictionary/solution1.cpp
/* * @lc app=leetcode id=953 lang=cpp * * [953] Verifying an Alien Dictionary * * https://leetcode.com/problems/verifying-an-alien-dictionary/description/ * * algorithms * Easy (52.53%) * Likes: 2797 * Dislikes: 929 * Total Accepted: 349.2K * Total Submissions: 664.8K * Testcase Example: '["hello","...
ALGO
0.999813
6.666183
{ "github_metadata": { "branch": "master", "commit_count": 448, "repo_created_at": "2019-10-21T02:04:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b357e4a...
738085e6-863f-4e79-a5c2-693f9694d92d
mieszkowskiff/BFS-CUDA
bfs0.cpp
#include <iostream> #include <vector> #include <queue> #include <limits> #include "helper.h" #include <chrono> std::vector<unsigned long long int> BFS0( const std::vector<std::vector<unsigned long long int>> edges, const std::vector<std::vector<unsigned long long int>> weights ) { size_t n = edges.size()...
ALGO
0.999848
5.394569
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-01-25T15:35:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7a46669fc6f...
337e3f52-c9aa-48d7-bc4b-a4971b20215a
master-oooogway/Ketan_Treasure
C++Programs/0UdemyC++/src/46SectionChallengeFunctions/main.cpp
#include<iostream> #include<vector> #include<string> using namespace std; //Prototypes. void display_options(); char handle_choice(char &c); void display(const vector<int>list); void add_num_to(vector <int> &list); void mean_of(const vector<int>list); void smallest_num_in(const vector<int>list); void largest_num_in(con...
TOOL
0.983785
4.292195
{ "github_metadata": { "branch": "master", "commit_count": 199, "repo_created_at": "2025-01-11T05:13:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c28cabd9...
434dd9f3-643b-4609-ba0d-0265dd672e7a
Chaste/Chaste
cell_based/src/population/division_rules/ShovingCaBasedDivisionRule.cpp
/* Copyright (c) 2005-2025, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
ALGO
0.997819
6.021159
{ "github_metadata": { "branch": "develop", "commit_count": 7342, "repo_created_at": "2016-07-08T13:37:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 138, "forks": 64, "issues": 56, "pull_requests": 7 }, "file_meta": { "content_id": "de7...
d0546daf-f99d-4da1-8459-877afdff081d
ladamalina/leetcode-2022-cpp
65. Valid Number (hard)/main.cpp
//#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std::literals; using ll = long long; using ld = long double; using ull = unsigned long long; using ii [[maybe_unused]] = std::pair<int, int>; using pll [[maybe_unused]] = std::pair<ll, ll>; using vi [[maybe_u...
ALGO
0.967057
4.989189
{ "github_metadata": { "branch": "master", "commit_count": 837, "repo_created_at": "2022-07-23T05:09:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56c63dab...
dfee54c5-d9c1-4d4d-9758-18ab565250b5
lixiaobai09/xgnn
samgraph/common/cuda/cuda_loops.cc
/* * Copyright 2022 Institute of Parallel and Distributed Systems, Shanghai Jiao Tong University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
ALGO
0.969652
6.068113
{ "github_metadata": { "branch": "dist_graph", "commit_count": 1245, "repo_created_at": "2023-08-01T06:52:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4a1...
a1fe70af-626b-4e34-9c0d-b0c4536e58a5
kleberjr/competitive-programming
classes/exercises/list_2/atendimento.cc
#include <bits/stdc++.h> #define t3i tuple<int, int, int> #define pqmin priority_queue<t3i, vector<t3i>, cmp> using namespace std; class cmp { public: bool operator()(t3i a, t3i b) { if (get<2>(a) < get<2>(b)) { return false; } if (get<2>(a) == get<2>(b)) { if (get<0>(a) < ge...
ALGO
0.999917
3.995326
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-03-20T10:25: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": "bdf07afc0b6...
325e4e5a-8151-4103-9bdc-40ce7ebc90ba
BoxLib-Codes/BoxLib
Tutorials/PIC_C/single_level.cpp
#include <iostream> #include <BoxLib.H> #include <MultiFab.H> #include <MultiFabUtil.H> #include <BLFort.H> #include <MacBndry.H> #include <MGT_Solver.H> #include <mg_cpp_f.h> #include <stencil_types.H> #include <MultiFabUtil.H> #include "Particles.H" // declare routines below void solve_for_accel(PArray<MultiFab>& ...
ALGO
0.99987
4.550957
{ "github_metadata": { "branch": "master", "commit_count": 12061, "repo_created_at": "2015-08-03T17:11:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 79, "forks": 41, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "37076...
22367093-c66b-49ec-aa3e-a7abd2f7fa35
samyragiovana/ListaVetorMatrizIAP
1/main.cpp
#include <iostream> using namespace std; /*1. Faça um programa que possua um vetor denominado A que armazene 6 números inteiros. O programa deve executar os seguintes passos: (a) Atribua os seguintes valores a esse vetor: 1, 0, 5, -2, -5, 7. (b) Armazene em uma variável inteira (simples) a soma entre os valores das pos...
ALGO
0.983519
3.154578
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-06-09T15:29:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38f5e4c434...
17a0729d-73b9-45cf-a35d-247071bcddee
huangxf14/graduation-project
module/gr-PHY/lib/wave_to_float_single_cpp_impl.cc
/* -*- c++ -*- */ /* * Copyright 2018 <+YOU OR YOUR COMPANY+>. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This software i...
ALGO
0.974067
5.309442
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2018-02-26T01:21:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8a47f363...
cdedbcbf-dba4-460f-ab56-ba0825a01629
Swizop/Algorithms
Graph Algorithms/Havel Hakimi/main.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> using namespace std; ifstream f("havel.in"); int main() { int i, x, n, j; f >> n; vector<int> degrees; for(i = 1; i <= n; i++) { f >> x; degrees.push_back(x); } while(true) { sort(de...
ALGO
0.999981
3.824303
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-08-23T12:04:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "421d978fbf5...
c9a063f9-f484-4d83-b2c7-a3899d3ad495
Arya-Gupta/dynamic-programming
knapsack type/2. subset sum/memoization.cpp
#include <bits/stdc++.h> using namespace std; bool solve(vector<int> arr, int sum, int n, vector<vector<int>> &dp) { if (sum == 0) return true; if (n == 0) return false; if (dp[sum][n] != -1) { return dp[sum][n]; } if (arr[n - 1] > sum) { return dp[sum][n] =...
ALGO
0.999995
4.198004
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-02-01T22:39: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": "fddfd0449d7a...
b21ad186-5574-4f17-9ef8-aa13e6efc078
alexandraback/datacollection
solutions_1673486_1/C++/Nevermore/CodeJam.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <cmath> #include <cctype> #include <vector> #include <cstdlib> #include <stack> #include <map> #include <queue> #include <list> #include <algorithm> #include <ctime> using namespace std; #define min(a,b) ((a)<(b) ? (a) :(b)) #define N ...
ALGO
0.999113
3.056425
{ "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": "dfab23ae6...
bc99fa65-473f-44ed-b426-bf822d008801
TaRun1369/CP---forces-and-cses
C_Messenger_in_MAC.cpp
// #include <iostream> // #include <bits/stdc++.h> // using namespace std; // bool check(long long m,vector<pair<long long,long long>> &v,long long l){ // long long count = 1; // long long st = 0; // while(st < v.size()){ // long long tc = 1; // long long k = v[st].first; // for(lon...
ALGO
0.999973
5.354626
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-23T14:56:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bfabddba33b...
2c4de52f-baad-47e2-bd46-051e9af38c10
tum-db/user-defined-operators
create_regression_points.cpp
#include <atomic> #include <random> //--------------------------------------------------------------------------- #include <udo/UDOperator.hpp> //--------------------------------------------------------------------------- using namespace std; //---------------------------------------------------------------------------...
ALGO
0.918726
6.104002
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-01-14T16:47:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 24, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4a409a1a2c...
98c09627-db65-42bc-b80b-22cbd9ecc768
Mcdonoughd/CS2303
PA4/main.cpp
/* * main.cpp * * Created on: October 11, 2017 * Author: <NAME> & <NAME>. */ #include "Common.h" #include <iostream> #include <vector> #include <algorithm> #include <cstdlib> #include <time.h> #include <string> #include "World.h" #include "Organism.h" #include "Ant.h" #include "Doodlebug.h" using namespace s...
ALGO
0.98086
4.264994
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2017-09-30T15:54:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1ceebed9...
c3862d6b-c8ae-42d9-abc9-346b8d03b116
MariaNosareva/Metaprogramming-MIPT
TypeList/main.cpp
#include <iostream> #include <typeinfo> /* --------------------------------------------------- TYPELIST -----------------------------------------------------*/ class NullClass {}; template <typename T = NullClass, typename ... U> struct TypeList { using head = T; using tail = TypeList<U ...>; }; template <typen...
TOOL
0.951001
5.052045
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-10-23T09:48:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6e046320...
729e7301-f86d-4673-a34f-65eb66787435
shravani-05/Calculator-App
main.cpp
#include<bits/stdc++.h> using namespace std; void addition(); void substract(); void multiply(); void divide(); void square(); void taketwonumber(int &x,int &y); void takesinglenumber(int &z); int main(){ cout<<"________________________________________________________________\n"; cout<<endl; cout<<"\t\t**...
TOOL
0.962115
3.306109
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-08T21:15: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": "dda6a4d610ef...
65027bb4-c26b-4cce-bc3a-53ccd430c113
Heyya-x/CFPG
ECR120D2/B.cpp
/** * author: Heyya * created: 01.01.2022 21:17 **/ #include <bits/stdc++.h> #define ll long long using namespace std; void solve() { int n; cin >> n; vector<pair<int, pair<int, int>>> q(n + 1); vector<int> a(n + 1); for (int i = 1; i <= n; i++) { int temp; cin >> temp; q[i].second.first = temp; q[i]....
ALGO
0.99996
4.689971
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-05-11T00:27: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": "5c72ff80ca...
49c33330-4969-4d94-9bcf-d7ad2736d976
kanishk123agarwal/DSA
Pattern/easy_pattern.cpp
#include<iostream> using namespace std; // FOR SOLVING THE PATTERN QUESTION WE HAVE TO TWO RULE // 1) FIND THE NO OF ROW // LIKE NO OF ROWS = 4 // 2) TO FIND THE PATTERN BY SOME LOGICAL THING AUR SIMPLE ARITHMETIC OPERATION // LIKE R0->1 STAR // R1->2 STAR // R3->3STAR // R4->4 STAR // SO PRINT SQUARE PATTERN int m...
ALGO
0.999359
3.268313
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2022-06-28T16:43: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": "702dcc61...
18ce5a9e-588c-42b0-b677-e8a68836e3f5
wlghsp/cpp_ps
cpp_study/code_tree/novice_mid/BruteForce/part2/17.cpp
#include <iostream> #include <algorithm> #include <climits> #include <vector> #include <tuple> #define MAX_N 1000 #define MAX_BPS 1000 using namespace std; /* 스승의 은혜 3 내 풀이 */ int N, B; // 학생 수 N, 예산 B vector<tuple<int, int, int>> v; void Input() { cin >> N >> B; for (int i = 0; i < N; i++) { int p, s; //...
ALGO
0.999408
4.194593
{ "github_metadata": { "branch": "master", "commit_count": 223, "repo_created_at": "2022-09-01T13:49: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": "7b7bb2ab...
ca4803e3-5d79-4778-8363-f14a41e5685f
9DemonFox/LinuxCPP
InternetProgramDesign/unit_3/conditiaon_variable/main.cpp
#include<stdio.h> #include<unistd.h> #include<stdlib.h> #include<pthread.h> #include<iostream> using namespace std; pthread_mutex_t lock=PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cond=PTHREAD_COND_INITIALIZER; typedef struct node { int _data; struct node *_next; }node_t,*node_p,**node_pp; node_p head=NULL; n...
ALGO
0.990862
4.041588
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-06-19T17:23: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": "9539b4355081...
d6c06dc3-bde1-49c1-9334-0771735f22db
mohitmallick17/LeetCodeSolutions
725-split-linked-list-in-parts/725-split-linked-list-in-parts.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { int getListLen(ListNode* head...
ALGO
0.999758
5.658038
{ "github_metadata": { "branch": "main", "commit_count": 2317, "repo_created_at": "2022-02-26T14:24: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": "7d1b3f5fb...
76ee9b68-590c-41c6-9fc8-df7ef892629b
3dfxdev/EDGE
epi/math_bbox.cc
//------------------------------------------------------------------------ // EPI Bounding Boxes //------------------------------------------------------------------------ // // Copyright (c) 2003-2008 The EDGE Team. // // This program is free software; you can redistribute it and/or // modify it under the terms...
ALGO
0.998722
6.355941
{ "github_metadata": { "branch": "master", "commit_count": 8457, "repo_created_at": "2015-01-19T02:45:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 76, "forks": 10, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "7f4249...
fa4db0ff-0a1e-4c80-a483-5b6354c914ea
luoyongjun999/code
ch10/poj3352.cpp
//ECUST luoyongjun #include<cstring> #include<vector> #include<stdio.h> using namespace std; const int N = 1005; int n, m, low[N], dfn; vector<int> G[N]; //存图 void dfs(int u,int fa){ //计算每个点的low值 low[u]= ++dfn; for(int i=0;i<G[u].size();i++){ int v = G[u][i]; if(v == fa) continue;...
ALGO
0.999959
3.802408
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2018-11-10T12:40:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 189, "forks": 81, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "761e80...
79c5e86d-ecfe-42e5-bb68-46c4638b3e2a
Smallflyfly/opencv-basic
moments.cpp
// // Created by smallflyfly on 2021/6/22. // #include "opencv2/opencv.hpp" #include <iostream> using namespace std; using namespace cv; int main() { Mat im = imread("rice.jfif"); Mat gray; cvtColor(im, gray, CV_BGR2GRAY); Mat imBin; threshold(gray, imBin, 150, 255, THRESH_BINARY); vector<v...
ALGO
0.967224
5.226125
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-06-08T02:18: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": "471661bd66a6...
ee9e5f6e-c1d5-44d1-b89e-9b3f90445174
Bophin/ncpc_practice
ncpc2013/timebomb/data/secret/codegen.cc
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #define FOR(i,a,b) for(int i=(a);i<(b);i++) using namespace std; char matrix[5][401]; void put_digit(int pos, int digit) { char mask[15]; switch(digit) { case 0: mask = {'*','*','*', '*',' ','*', '...
ALGO
0.996652
3.65333
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2013-12-11T18:45:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8887110296...
a0b1e6d1-f764-464a-a7a5-acfdf9cce542
shray-jayn/Data-Structures-and-Algorithms
Dynamic Programming/935. Knight Dialer.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; long solve(int x, int y, int n, long hash[][4][3]) { // checking whether the postion is a valid postion or not if (x < 0 || y < 0 || x >= 4 || y >= 3 || (x == 3 && y == 0) || (x == 3 && y == 2)) { return 0; } if (n == 1...
ALGO
0.99999
4.276237
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2022-08-30T17:57: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": "37453625f...
e187f266-8be7-42bf-9860-afc8fdf5f918
Megarekrut65/Cluster-Calculations-2023
Lab2/Lab2/mpi_mm.cpp
#include "mpi_mm.h" void init_data(int*& matrix1_block, int*& block1, int*& block2, int*& block_result, int block_size) { int size = block_size * block_size; matrix1_block = new int[size]; block1 = new int[size]; block2 = new int[size]; block_result = new int[size] {}; } void free_data(int* matrix1_block, int*...
ALGO
0.999827
4.762504
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-10-03T17:37: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": "3a68d074f56...
7e96e4e9-9a8a-417d-86c3-9266ad66c063
vars7899/cpluspluslesson
Pointer/pointerInFunction.cpp
#include <bits/stdc++.h> using namespace std; void print(int *p){ cout<<*p<<endl; } void update(int *p){ *p = 800; } int getSum(int *arr, int n){ // @ we can write arr[] or *arr is same int res = 0; int index = 0; while(index < n){ res += *(arr + index++); } return res; } // ? we ca...
ALGO
0.959746
3.282585
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2022-01-18T02:39:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd391f580...
f58e81f4-a00b-4438-888d-f06e6c2faa85
jobream/500-Interview-Questions-CPP
Arrays/9. Longest Subarray with sum k(Important).cpp
/* Name : <NAME> Date: 03-07-20 Question : Longest Subarray with sum k Problem Link : https://practice.geeksforgeeks.org/problems/longest-sub-array-with-sum-k/0 Initialize sum = 0 and maxLen = 0. Create a hash table having (sum, index) tuples. For i = 0 to n-1, perform the following steps: Accumulate arr[i] to ...
ALGO
0.999937
4.985415
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2020-07-08T13:00:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec831f8c...
ac9e3ae1-c43c-4655-b3f0-96295e45c92b
Aman149/LeetCode-Questions
median-of-two-sorted-arrays/median-of-two-sorted-arrays.cpp
class Solution { typedef decltype(vector<int>().cbegin()) random_it; int kth(random_it it_a, int size_a, random_it it_b, int size_b, int offset) { // offset is 1-based if (size_a < size_b) { // size_a always >= size_b return kth(it_b, size_b, it_a, size_a, offset); ...
ALGO
0.999992
6.098137
{ "github_metadata": { "branch": "main", "commit_count": 1043, "repo_created_at": "2021-12-24T14:30:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0eb7bbb5...
17fecf97-817c-417d-ae53-966de7e752a5
thenintendodude/public-euler
lib/common/inc/primality/sieveTotientSum.h
#pragma once #include <cstdint> #include <cmath> #include <ranges> #include <type_traits> #include <unordered_map> #include <vector> #include <algorithm> #include "primality/sieveTotient.h" namespace primality { template<typename ValueT, bool bNaive = false> requires(std::is_unsigned_v<ValueT>) clas...
ALGO
0.998071
6.174667
{ "github_metadata": { "branch": "main", "commit_count": 334, "repo_created_at": "2025-01-28T01:29: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": "6846b367e6...
e9bec1de-a10e-4b46-be33-aab87d452fc7
shumin215/problem-solv
algorithm/dijkstra/basic0/src/main.cpp
/* 18_최단경로2 */ #include <cstdio> #include <iostream> #include <vector> #include <climits> #include <queue> using namespace std; constexpr int MAX = 100000 + 1; constexpr int INF = INT_MAX; struct Edge { int dst, dist; bool operator> (const Edge rhs) const { return dist > rhs.dist; } }; int N, M; v...
ALGO
0.999928
4.310349
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-01-04T01:30:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b438056377c...
752d0413-062c-4644-bc22-ae5d1b67b44c
zrporz/THU-CG-2023
Code/include/curve.hpp
#ifndef CURVE_HPP #define CURVE_HPP #include "object3d.hpp" #include <utility> #include <vecmath.h> #include <vector> #include <algorithm> const float INF= 0x3f3f3f3f; // TODO (PA2): Implement Bernstein class to compute spline basis function. // You may refer to the python-script for implementation. // The Cur...
ALGO
0.982385
7.140319
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-01T13:18:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9715e63abb63...
db20a739-adc5-4023-bcaa-59927eb22c49
MicrosoftDocs/cpp-docs
docs/parallel/concrt/codesnippet/CPP/how-to-use-combinable-to-improve-performance_4.cpp
// parallel-sum-of-primes.cpp // compile with: /EHsc #include <windows.h> #include <ppl.h> #include <array> #include <numeric> #include <iostream> using namespace concurrency; using namespace std; // Calls the provided work function and returns the number of milliseconds // that it takes to call that function. templ...
ALGO
0.999942
6.413934
{ "github_metadata": { "branch": "main", "commit_count": 20472, "repo_created_at": "2016-11-14T19:38:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1539, "forks": 968, "issues": 0, "pull_requests": 50 }, "file_meta": { "content_id": "91e...
ba9443cc-61fe-43bb-8394-f2446bcbe964
justHusam/Competitive-Programming
UVa/10870 - Recurrences.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<vector<int> > mat; const int N = 15; int d, n, m, A[N], F[N]; mat mul(mat &a, mat &b) { mat res(d, vector<int>(d, 0)); for (int i = 0; i < d; ++i) for (int j = 0; j < d; ++j) for (int k = 0; k < d; ++k) res[i][j] = (res[i][...
ALGO
0.99995
4.048187
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-06-06T18:25:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c75945702...
bc310ce0-21ae-4d53-9aa1-6d4a09780c6c
ArdxWe/leetcode
medium/220-Contains-Duplicate-III.cpp
/* Given an integer array nums and two integers k and t, return true if there * are two distinct indices i and j in the array such that abs(nums[i] - * nums[j]) <= t and abs(i - j) <= k. */ #include <algorithm> #include <climits> #include <set> #include <vector> namespace { using std::max; using std::min; using st...
ALGO
0.999939
6.921656
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2021-08-21T06:25:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50e7bb93...
2358b0c7-0543-4a0f-a0fc-7ca3b2e196fa
AdamPI314/Algorithm
src/103_word_search/solution.cpp
#include <iostream> #include <utility> #include <vector> #include <list> #include <set> #include <unordered_set> #include <unordered_map> #include <map> #include <queue> #include <stack> #include <forward_list> #include <algorithm> #include <climits> #include <string> #include <cstring> #include <cstdlib> #include <num...
ALGO
0.999481
5.809309
{ "github_metadata": { "branch": "master", "commit_count": 167, "repo_created_at": "2017-07-10T05:26: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": "71c0b87c...
7bad5084-a97f-4e64-a95a-56ec1f2b337d
nachob97/Ray-Tracer
main.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <cmath> #include <limits> #include <stdlib.h> #include <stdio.h> #include "Vect.h" #include "Ray.h" #include "Camera.h" #include "Color.h" #include "Light.h" #include "Object.h" #include "Sphere.h" #include "Plane.h...
ALGO
0.929338
3.390929
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-07-18T22:42: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": "35f0e98ad...
5c8c0890-2fa1-4b76-8aaa-899d10d67410
web3Riyad/Data-structure
practice stack queue/stack usign link list.cpp
#include<bits/stdc++.h> using namespace std; class node { public: int val; node* next; node* prev; node(int val) { this->val=val; this->next=NULL; this->prev=NULL; } }; class mylist { public: node* head=NULL; node* tail=NULL; int sz=0; void push(int val) ...
ALGO
0.999521
4.095517
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-06T09:02: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": "f48c34cae8cf...
1816b9a2-2709-4dd4-9981-b847650ba58a
mohit701473/cpp
Binary Search Tree/V 76-79 BST Question/basciBST.cpp
#include<iostream> #include<queue> using namespace std ; class Node { public: int data ; Node* left ; Node* right ; Node (int d) { this -> data = d ; this -> left = NULL ; this -> right = NULL ; } }; void levelOrderTraversal(Node* root) { if(root == NULL) { ...
ALGO
0.999949
4.196674
{ "github_metadata": { "branch": "main", "commit_count": 226, "repo_created_at": "2023-02-16T18:42: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": "4a821f3f16...
422d1b0f-2412-434d-a167-58f63e296b29
ShinWonjung/baekjoon
Chess/Chess/Chess.cpp
#include <iostream> using namespace std; int main() { int n, m; cin >> n >> m; char** arr = new char*[n]; for (int i = 0; i < n; i++) arr[i] = new char[m]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j+=1) cin >> arr[i][j]; } int min = 64; for (int t = 0; t < 2; t++) { for (int rsize = 0; rsize <=...
ALGO
0.999663
3.682674
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2021-07-29T12:50: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": "13f8163a7...
02481bd4-60d5-47e0-932a-b2a42595f890
minseojo/problem-solving
백준/Gold/11000. 강의실 배정/강의실 배정.cc
#include <bits/stdc++.h> using namespace std; struct Class { int s; int t; }; vector<Class> v; bool comp(const Class& a, const Class& b) { if (a.s == b.s) return a.t < b.t; return a.s < b.s; } priority_queue<int, vector<int>, greater<int>> pq; int main() { int n; cin >> n; for (int i = 0...
ALGO
0.999931
4.131386
{ "github_metadata": { "branch": "main", "commit_count": 1182, "repo_created_at": "2022-08-02T12:51:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_id": "830977fd...
88191eb3-f763-46c1-9221-1b17274d10ac
hgyuhyeon/Algorithm-old
Leetcode/225_Implement_Stack_using_Queues.cpp
class MyStack { private: queue<int> q; int back; public: MyStack() { q = queue<int>(); } void push(int x) { q.push(x); back = x; } int pop() { if (empty()) return NULL; int n = q.size() - 1; while (n-- > 0) { q.push(q.fron...
ALGO
0.993049
5.362459
{ "github_metadata": { "branch": "master", "commit_count": 681, "repo_created_at": "2020-06-13T13:54: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": "eeb27fb6...
12dd30c0-a81b-421a-9d79-705be4fba7be
dipu-bd/OJ-Codes
LightOJ/1160 - Discovering Paths in Grid.cpp
/*============================ /\u7h0r : 5ud!p70 ch@ndr@ d@5 =============================*/ //#include <bits/stdc++.h> //C headers #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #include <ctype.h> #include <assert.h> //#include <time.h> //cpp headers #include <iostre...
ALGO
0.999976
3.793707
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-02-18T17:34:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf5251c76d...
39ae480a-4b78-4bb5-a4f6-e3efdf4e9403
jeha0714/Algorithm
Algorithm/큐, 덱/20230929_1966/solution.cpp
#include <iostream> #include <algorithm> // sort #include <list> // list #include <vector> // vector /* Sort descending order function! */ static bool compare (int x, int y) { return (x > y); } /* Main function */ int main(void) { std::ios_base::sync_with_stdio(false); std::cout.tie(NULL); std::cin.tie(NULL); i...
ALGO
0.999946
3.771231
{ "github_metadata": { "branch": "main", "commit_count": 427, "repo_created_at": "2021-06-27T13:14:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "677c98f6ff...
52975e4b-461d-453b-a9bd-a0309abb7492
DrSwad/CP
Submissions/ICPC/GCPC/22/problemH.cpp
#include <bits/stdc++.h> using namespace std; const int B = 5; const int C = 26; vector<int> query(int mask) { string s; for (int c = 0; c < C; c++) { if ((c & mask) == mask) { s += 'a' + c; } } cout << "? " << s << endl; int sz; cin >> sz; vector<int> res(sz); for (int &i : res) cin >>...
ALGO
0.999569
3.210117
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2019-10-12T13:53:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 5, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ee994f5a...
f66a9b5b-e975-47ac-9c7a-8a3c9bcb7fc5
ishandutta2007/codeforces-s
serg3000/normal/1091/C.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cmath> #include <string> #include <set> #include <queue> #include <deque> #include <unordered_set> #include <map> #include<unordered_map> #include <bitset> #include <random> #include <ctime> using namespace std; #define int long long signed main() { ...
ALGO
0.99968
4.326304
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c555636e10ef...
e4d437da-d72e-4cf6-8823-81b434da34a1
IgnorantCoder/ALDS
ALDS1_2_C/Source.cpp
#include <algorithm> #include <cassert> #include <map> #include <cstring> #include <string> #include <iostream> #include <memory> #include <ostream> class Trump { friend std::ostream& operator<<(std::ostream& os, const Trump& trump); public: enum class Mark { None = 0, Heart, Diamond, ...
ALGO
0.999903
5.532366
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-08-28T09:56: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": "73bc014a5d...
b345024f-3000-47e8-b898-7b7db7005ba6
harsh6754/DSA-Problems
lovebabbar/Tree/Binary-Search-Tree/MinMaxValueInBST.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int d) { this->data = d; this->left = NULL; this->right = NULL; } }; Node *insertIntoBST(Node *root, int d) { if (root == NULL) { root = new Node(...
ALGO
0.999938
4.168861
{ "github_metadata": { "branch": "master", "commit_count": 500, "repo_created_at": "2023-09-17T03:03:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20ad786d...
b9a2e98d-6e0c-4d38-821c-b23e6ba30167
rahulshah83/Leetcode
Solutions/1372. Longest ZigZag Path in a Binary Tree.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.999955
4.955949
{ "github_metadata": { "branch": "main", "commit_count": 510, "repo_created_at": "2023-02-20T19:00: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": "c99939b7bc...
8ce636f8-88e7-460d-adad-8e6d0ceeb802
ibudiselic/contest-problem-solutions
tc 160+/ThreeTeleports.cpp
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; long long my_abs(long long x) { return x<0 ? -x : x; } long long dist(long long a, long long b, long long...
ALGO
0.999814
4.053042
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2011-08-14T11:43:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81945319f...
2b330a08-e89c-4c0d-889e-dfe944e8bd49
valentint/pcaPP
src/hess.cpp
#include "R_package.h" #include "math.h" void Hess_Sub (int p, double *pdX_i, double *pdMu, double *pdHess, double *pdTempP) { int l, k ; double dNorm = 0 ; for (l = p - 1; l != -1; l--) { double &dCur = pdTempP [l] = pdX_i[l] - pdMu[l] ; dNorm += dCur * dCur ; } dNorm = 1 / sqrt (dNorm) ; double dNorm3 =...
ALGO
0.999132
4.147457
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-07-08T21:43:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f4bdb26cfa...
2b89b6e6-1824-4a85-83ce-5d1ebfa3f66f
wjdansrl7/Coding-Test
백준/단기간성장/3584_1.cpp
#include <iostream> #include <vector> #include <cstdio> #include <cmath> #define swap(a, b) \ { \ int t = a; \ a = b; \ b = a; \ } #define MAX_NODE 100001; using namespace std; int depth[MAX_NODE]; int ac[MAX_NODE][20]; typedef pair<int, int> pii; vector<int> grap...
ALGO
0.999999
4.743646
{ "github_metadata": { "branch": "master", "commit_count": 489, "repo_created_at": "2023-03-07T14:20:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89f37882...
e84c45c1-6c92-4907-b635-b707745d9a74
HannoFlohr/leetcode
BuildAMatrixWithConditions.h
class Solution { private: //check for cycle bool dfs_cycle(vector<vector<int>>& graph, int i, vector<int>& color) { color[i] = 1; for(int j : graph[i]) { if(color[j] == 0) { if(dfs_cycle(graph, j, color)) { return true; } } ...
ALGO
0.999855
6.020812
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2022-09-08T17:52: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": "9426a595e15...
f756d98b-5057-4f54-9494-27a8d34a8b5f
Snigdha-Sharma/Leetcode
Medium/RandomPickWithWeight.cpp
class Solution { public: vector<int> sum; Solution(vector<int>& w) { for (int i=1;i<w.size();i++) { w[i]+=w[i-1]; } sum=w; srand(time(NULL)); } int findCeil(vector<int> arr,int r,int l,int h) { int mid; ...
ALGO
0.999954
5.195407
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-03-15T19:40: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": "f4537236d...
22fa0138-f360-42e5-8c6c-07f73e7f1296
leodmgs/Algorithms
CodingInterview/compression.cpp
#include <cstdio> #include <vector> #include <string> #include <sstream> using namespace std; // Solution: O(n + k^2) // string compress(string str) // { // string strc = ""; // char ch = str[0]; // int ct = 1, i = 1, n = str.size(); // while (i <= n) // { // if (str[i] == ch) // ++ct; // else // { // ...
ALGO
0.999997
4.856024
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-07-03T15:21: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": "db88e4a2d...
0c335ce1-b626-48ae-8f01-cccdeee3fc57
ravitandon90/ThreeHundredDaysOfCode-BE
proddata/data/remove-invalid-parentheses/C++/Solution.hpp
#include <vector> #include <set> #include <unordered_map> #include <string> #include <algorithm> using namespace std; #define vec vector #define uset unordered_set #define umap unordered_map #define all(x) x.begin(), x.end() class Solution { umap<string, uset<string>> dp; uset<string> &solve(string s) { if...
ALGO
0.999217
5.064575
{ "github_metadata": { "branch": "main", "commit_count": 402, "repo_created_at": "2022-08-15T17:58:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 11, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "56b86fcb0...
9c341328-3bec-4670-b39a-33916f65ccb1
larrylai19/CppPractice
UVa/10171.cpp
#include <bits/stdc++.h> using namespace std; static auto __ = [] { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); return 0; }(); const int INF = (int)1e9; int m; int G1[26][26]; int G2[26][26]; void init() { for (int i = 0; i < 26; ++i) { for (int j = 0; j < 26; ++j) G1[i][...
ALGO
0.999942
3.573013
{ "github_metadata": { "branch": "master", "commit_count": 274, "repo_created_at": "2020-06-26T07:56: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": "cb99a3b5...
6fdc00f3-ac34-414f-a82f-2c3a76fa1a60
bayesiancook/coevol
sources/SubMatrix.cpp
#include "linalg.h" #include "SubMatrix.h" #include <cmath> #include <cstdlib> #include <iostream> #include <fstream> using namespace std; int SubMatrix::nuni = 0; int SubMatrix::nunimax = 0; double SubMatrix::nz = 0; double SubMatrix::meanz = 0; double SubMatrix::maxz = 0; // --------------------------------------...
ALGO
0.995926
4.171471
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2016-08-01T09:45:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "5240ac1b...
230e8e74-8245-4cd3-88c9-784959da67fd
shivam04/codes
GeeksForGeeks/dp/count-palindrome-sub-strings-of-a-string.cpp
#include<bits/stdc++.h> using namespace std; int dp[1001][1001]; // 2D matrix bool isPal(string s, int i, int j) { if (i > j) return 1; if (dp[i][j] != -1) return dp[i][j]; if (s[i] != s[j]) return dp[i][j] = 0; return dp[i][j] = isPal(s, i + 1, j - 1); } int countSubstrings...
ALGO
0.99952
4.557065
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2016-12-05T11:36:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "045b3db2...
e9579e84-9dbd-4dd8-bf20-0a82c9e5fa6b
raincross7/code-similarity
codes/train_code/problem225/problem225_81.cpp
#include <algorithm> #include <iostream> #include <iomanip> #include <cstring> #include <string> #include <vector> #include <queue> #include <cmath> #include <stack> #include <set> #include <map> using namespace std; typedef long long ll; int main(){ int N; cin >> N; ll a[N]; for(int i = 0; i < N; i++)...
ALGO
0.99995
3.442037
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62b6e56cc368...
eaeaade7-ee11-4c55-825d-0856cd4cacff
onewordstudios/sweetspace
cugl/include/cugl/math/dsp/CUTwoPoleIIR.h
// // CUTwoPoleIIR.h // Cornell University Game Library (CUGL) // // This class is represents a two-pole IIR filter. For second-degree filters, // it is significantly more performant than IIRFilter. // // This class supports vector optimizations for SSE and Neon 64. In timed // simulations, these optimizations p...
ALGO
0.96123
6.763605
{ "github_metadata": { "branch": "master", "commit_count": 2160, "repo_created_at": "2020-02-18T18:00:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 1, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "21e242e6...
75c4eda5-6505-4969-9559-120e33a2a555
seongjaelee/techinterview
problems/str_remove_chars.cpp
// <NAME> (2012-11-14). Programming Interviews Exposed: Secrets to Landing Your Next Job (Kindle Location 2583). Wiley. Kindle Edition. // Remove Specified Characters // PROBLEM Write an efficient function that deletes characters from an ASCII string. #include <iostream> using namespace std; void remove_chars(char *...
TOOL
0.98205
5.73137
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-01-07T17:42: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": "2e2b3c2bad...
579f35f5-1756-43bb-b98d-164690cc0d75
kodsnack/advent_of_code_2018
f00ale-cpp/src/p19.cpp
#include <iostream> #include <vector> #include <array> enum class ops { addr, addi, mulr, muli, banr, bani, borr, bori, setr, seti, gtir, gtri, gtrr, eqir, eqri, eqrr }; struct step { ops op; int a0, a1, a2; step(ops _o, int _a0, int _a1, int _a2) : op{_o}, a0{_a0}, a1{_a1}, a2{_a2} {} }; int main() ...
ALGO
0.997848
3.813942
{ "github_metadata": { "branch": "master", "commit_count": 1772, "repo_created_at": "2018-11-28T17:59:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 63, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be53e0...
187e01e8-b878-4cdf-83a6-e945b2c11ab6
edisonhello/competitive_programming
Codeforces/AC/846D.cpp
// #pragma GCC optimize("no-stack-protector") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") // #pragma GCC diagnostic ignored "-W" #include<cassert> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<ctime> #include<algorithm> #include<iostream> #include<io...
ALGO
0.999978
3.606765
{ "github_metadata": { "branch": "master", "commit_count": 843, "repo_created_at": "2016-03-15T14:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "052f4b5c...
290b8153-e8ed-4c3c-bee6-96d0b67bba1d
Satish-Raut/DSA-in-C-
code_73_BinarySearch.cpp
//KOKO eating banana's: // -> Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours. // -> Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of bananas and eats k bananas from that pile. If ...
ALGO
0.999965
4.620776
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-01-30T10:05: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": "dadd585b5f7a...
94e9a3b6-ba3e-401f-b2e8-cd8c408765a8
RodrigoAntunez/Programacion-I-UTN
Guia 6/Ejercicio3.cpp
#include <iostream> using namespace std; int main(){ int nVector [10]; int numero, maximo, posicion; // Ingreso de datos, acumulo el primer numero para comparar maximo. for (int i = 0; i < 10; i++) { cout << "Ingrese un numero: "; cin >> numero; nVector[i] = numero; ...
ALGO
0.99703
3.732758
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-05-07T17:19: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": "2b9b93a0e0f...
3849ad2b-fec7-4c2f-8a4e-f0519ca4abb9
skfo763/Problem_Solving
backjoon/dp/2579.cpp
#include <stdio.h> #include <algorithm> #include <stdlib.h> #include <string.h> using namespace std; int dp[10000]; int get_max_score(int* st, int x) { int a=-1; int b=-1; if(x == 0) return 0; if(x == 1) return st[1]; if(x == 2) return st[1]+st[2]; if(dp[x-2] != 0) { a = dp[x-2]; } else { a = get_max_...
ALGO
0.999313
3.600117
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2019-08-31T13:15:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9878a92f...
9956a99f-6233-4906-93e8-332589220c02
Bechir-karmeni/CodeForces
1695D1. Tree Queries (Easy Version).cpp
#include<bits/stdc++.h> using namespace std; template<typename T1, typename T2> istream& operator>>(istream& ins, pair<T1, T2>& v) { ins >> v.first >> v.second; return ins; } template<typename T, size_t N> istream& operator>>(istream& ins, array<T, N>& v) { for (int i = 0; i < int(N); i++) cin >> v[i]; ret...
ALGO
0.999675
4.078001
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-12-19T22:14:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b870d7406e60...
2a3735fc-a0f6-4c9e-8a18-186b95ed533e
Akiko0210/Competitive-programming
codeforces/contest/Round 145/D.cpp
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define ss second #define ff first #define pb push_back #define pii pair<int, int> #define INF INT64_MAX using namespace std; void debug_out() { cerr << endl; } template<typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr...
ALGO
0.999711
4.272539
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-01-11T06:51: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": "368455c59ad7...
02646376-d453-4349-8694-b9a997573da0
lbwei1016/Codes
Algorithm/Math/Karatsuba_naive.cpp
/* ***Math / Divide and Conquer*** Description: 和一般直式算法的複雜度其實一樣。 O(n^2) */ #include <bits/stdc++.h> using namespace std; const int N = 1<<22; int n; int F[N], G[N]; vector<int> dac(int f[], int g[], int k) { if(k == 2) { vector<int> mul(n); mul[2] += f[1]*g[1]; mul[1] += f[0...
ALGO
0.999996
3.780554
{ "github_metadata": { "branch": "master", "commit_count": 158, "repo_created_at": "2021-07-20T04:11:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bca330f7...
eda9a959-1137-4009-a2df-6fa335f767e5
keymanky/estructura_datos
PROGRAMAS/15.-RAIZ 2DO GRADO.cpp
/****************RETORNA LAS RAICES DE UNA ECUACION DE 2DO GRADO****************************/ #include<stdio.h> #include<stdlib.h> #include<math.h> int verifica_raiz(float,float,float);//funcion que verifica que tipo de raices tiene si son complejas retorna cero sino retorna 1 float raiz_real2do(float,float,float,in...
ALGO
0.988416
3.32076
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-07-18T22:49: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": "d00578a211...
0543e7be-f4ab-4e15-82a7-0322e97ff116
edisonhello/waynedisonitau123
Contest/Europe/NEERC/SubRegional/Moscow2015/C.cpp
#include <bits/stdc++.h> using namespace std; int main() { int xl = 0, xr = 1000000000; while (xr > xl) { int xm = (xl + xr) >> 1; cout << xm << " " << 0 << endl << flush; int ans1; cin >> ans1; cout << xm + 1 << " " << 0 << endl << flush; int ans2; cin >> ans2; if (ans2) xl = xm + 1; else xr = xm; }...
ALGO
0.999543
3.047437
{ "github_metadata": { "branch": "master", "commit_count": 411, "repo_created_at": "2017-08-26T10:17:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 33, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7333de...
eda417b6-6db5-4ccd-96e0-d960efa554eb
wasda-exe/hackerrank-DSA-solved
Data-Structures/19--InsertingaNodeIntoaSortedDoublyLinkedList.cpp
#include <bits/stdc++.h> using namespace std; class DoublyLinkedListNode { public: int data; DoublyLinkedListNode *next; DoublyLinkedListNode *prev; DoublyLinkedListNode(int node_data) { this->data = node_data; this->next = nullptr; this->prev =...
ALGO
0.999983
5.326705
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-09-28T06:16: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": "77a28cd0af3...
600efe9d-f169-437c-a3dc-d09ab493ff20
choihjin/PS-withoutLeetCode
백준/Bronze/5585. 거스름돈/거스름돈.cc
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; int count = 0; cin >> n; n = 1000 - n; while(n > 0) { if(n >= 500) { count += n/500; n %= 500; } else if(n >= 100) { count += n/100; n %= 100; } else if(n >= 50) ...
ALGO
0.999628
3.959802
{ "github_metadata": { "branch": "main", "commit_count": 509, "repo_created_at": "2023-01-10T14:01: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": "0d310d9d3d...
705e1119-005b-409a-8493-94faafc886d4
NPU-RCIR/pp_plan
pp_plan/pass_point_plan/src/pass_point_node.cpp
#include <pass_point_node.h> #define sign(x) ( ((x) <0 )? -1 : (((x)> 0) ? 1 : 0 )) int main(int argc, char** argv) { ros::init(argc, argv, "pass_point_node"); ros::NodeHandle nh("~"); odom_sub_ = nh.subscribe("/odom_world", 1, &odometryCallback); cmd_pub_ = nh.advertise<swarmtal_msgs::drone_onboard_c...
ALGO
0.998343
3.693607
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-04-20T01:53:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a227d6ed4bb...
3d2939fa-3f17-4b72-b79c-625fc8eef4fc
leonwind/asof-join
src/algorithms/right_partitioning_filter_min.cc
#include "asof_join.hpp" #include "timer.hpp" #include "log.hpp" #include "parallel_multi_map.hpp" #include "searches.hpp" #include <fmt/core.h> #include <algorithm> #include <unordered_map> #include <mutex> #include "tbb/parallel_for.h" #include "tbb/parallel_for_each.h" #include "tbb/parallel_sort.h" // Morsel size...
ALGO
0.996499
5.742705
{ "github_metadata": { "branch": "main", "commit_count": 140, "repo_created_at": "2024-10-12T12:33:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06846b35ae...
717934b8-ba5d-47fc-b952-67ab21283eaf
jannatul-akhi/beecrowd-problems
2758.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { double num1, num2; double num3, num4; cin >> fixed >> setprecision(1) >> num1; cin >> fixed >> setprecision(2) >> num2; cin >> fixed >> setprecision(3) >> num3; cin >> fixed >> setprecision(4) >> num4; int integral1 = ...
ALGO
0.942812
3.459313
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2023-03-17T17:32: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": "6458de7cfd4...
11fe507d-2cc4-4352-9301-e3edeb2c5aeb
niloy097/Phitron_Data_Structure
module 3/Y_Range_sum_query.cpp
#include<bits/stdc++.h> using namespace std; int main() { //worst solution of this problem /*int n, q; cin >> n >> q; int arr[n]; for(int i = 0; i < n; i++) //TC - O(n) = 10^5 { cin >> arr[i]; } while(q--) // TC - O(q) = 10^5 { int l, r; cin >> l >> r; ...
ALGO
0.999946
4.996002
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-06-11T06:44: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": "91c593dea84...
9e0e0e9e-6154-41f7-a377-6a68a4c37f06
SomnathSengupta/Programming-Basic-Questions
QuickSort.cpp
#include<bits/stdc++.h> using namespace std; int partition(int *arr, int start, int end) { //Selcting the 1st element as pivort element: int pivot = arr[start]; //Calculating the pivot index and doing the operation int count = 0; for (int i = start + 1; i <= end; i++) { if (arr[i] <= pi...
ALGO
0.999998
6.039882
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2024-06-22T09:13:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f16bc708038...
c4c329b3-6c1b-45db-9784-9939159a7482
SrjAdhikari/DSA-With-CPP
03_Array/Array_Level-2/Codes/printSumOfAllPairs.cpp
#include <iostream> using namespace std; int printTotalSum(int arr[], int size){ int sum = 0; for(int i = 0; i < size; i++){ for(int j = 0; j < size; j++){ sum += arr[i] + arr[j]; } } return sum; } int main(){ int arr[100]; int size; cout << "Enter the numb...
ALGO
0.999613
5.874344
{ "github_metadata": { "branch": "main", "commit_count": 504, "repo_created_at": "2024-05-14T10:53:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d86b836f2...
a15412e9-50c6-449f-b765-dbfee3ed9bef
mit0071/Pierwsza-gra-Space-Inviders
SpaceInviders/SpaceInviders/Inviders.cpp
#include "Inviders.h" #include "Zasoby.h" #include <time.h> using namespace std; Dane dane; /*void Inviders::RuchInvider(char Map[][COL]) { WDol = 0; for (int y = 0; y < ROWS - 1; y++) { if (Przesuniecie - MaxPrzesuniecie == 0) { kierunek = 0; WDol = 1; } if (Przesuniecie + MaxPrzesuniecie...
TOOL
0.927039
3.497132
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-13T12:23: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": "ba1ebd463b6b...
b776f47b-b1d2-4ded-a51a-1e46dfef165b
wisdompeak/LeetCode
Stack/2104.Sum-of-Subarray-Ranges/2104.Sum-of-Subarray-Ranges.cpp
using LL = long long; class Solution { public: long long subArrayRanges(vector<int>& nums) { int n = nums.size(); stack<int>Stack; vector<int>nextSmaller(n,n); for (int i=0; i<n; i++) { while (!Stack.empty() && nums[Stack.top()]>nums[i]) ...
ALGO
0.999973
4.851964
{ "github_metadata": { "branch": "master", "commit_count": 8912, "repo_created_at": "2017-03-01T10:30:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6018, "forks": 1314, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "1...
bc504088-af86-478f-831b-7e94830bc983
Emilyyyyyyyyyyyyyy-prog/fluid_sim
src/Fluid.cpp
#include "Fluid.h" #include <iostream> Fluid::Fluid() {} //constructor Fluid::Fluid(int f_xSize, int f_ySize, float f_diff, float f_visc, float f_dt, int f_solverIterations) { this->xSize = f_xSize; this->ySize = f_ySize; this->diffusion = f_diff; this->viscosity = f_visc; this->dt = f_dt; this->solverIterati...
ALGO
0.959049
5.080926
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2024-04-06T10:48:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6cd7a0064c3...
5767bc80-dbfd-4352-b86d-4cb0243490e1
vaneela/30-days-of-code_CP
Day_1/Version_control_system.cpp
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here int t; cin >> t; while (t--) { int n, k, m; cin >> n >> m >> k; set<int> ms; std::vector<int> v1, v2; for (int i = 0; i < m; i++) { int x; cin >...
ALGO
0.999973
3.848727
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-05-23T09:46: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": "00a98db7bbb5...
79889e3e-de8e-4f5a-8a96-14ce5915b068
Rashik004/Coded-algorithms
MST cruchkal/908- re-connecting the computers.cpp
#include<iostream> #include<cstdio> #include<cmath> #include<sstream> #include<ctime> #include<cstring> #include<cstdlib> #include<string> #include<vector> #include<stack> #include<queue> #include<algorithm> #include<map> #include<set> #define mp make_pair #define pb push_back //This MST class was verified in 10600 //A...
ALGO
0.999535
3.396984
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-06-13T08:28: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": "433869d2d...
e557904b-4013-4739-8cfc-d8196a3c4ebd
scottmcguire/libra-code
src/mmath/symmetry/Space_Groups.cpp
/********************************************************************************* * Copyright (C) 2015 <NAME> * * This file is distributed under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 2 of * the License, or (at your option) any later version. * See th...
ALGO
0.999101
5.020489
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2016-11-17T19:10: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": "fd9500ef...
7ba1c292-dc71-475e-a258-a0bf458967d6
Francois0405/UAB-GEI
Fonaments-Informatica/4/4.28-Moviment_punt.cpp
#include <iostream> #include "funcio.h" using namespace std; int main() { int x, y; int x_min, x_max, y_min, y_max; int direccio; cout << "Introdueixi els limits del mapa: (xmin, xmax, ymin, ymax)" << endl; cin >> x_min >> x_max >> y_min >> y_max; while ((x_min >= x_max) || (y_min >= y_max)) { cout << "Err...
TOOL
0.970139
3.58128
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-17T15:04: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": "81f7c0f2d44f...
1422d482-e1c5-4838-b028-e1c085eb259d
ornelas15/mc_ppo
classes/session3/lab3/l9.cpp
/* Lab 3 - 12-June-2024 <NAME> Ex.9: Write a function which calculates the greatest common divisor between two integer positive numbers using the Euclidean algorithm, given by the following definition: gdc(a,b) = a if b = 0; gdc(r,b) if b > 0, where r is the remainder of the division of a by b. Use it in a progr...
ALGO
0.999928
6.528356
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2024-06-04T16:10: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": "2a542f0b3...
44171779-3272-47cb-bc6c-f2450d6196bb
anishmo99/CPP
countNegativeNumbersInASortedMatrix.cpp
class Solution { public: int countNegatives(vector<vector<int>>& grid) { // O(NlogM) int res = 0, n = grid.size(), m = grid[0].size(); for(int i=0;i<n;i++){ // the first number which is greater than -1 in the reverse array grid[i] res += upper_bound(grid[i].rbegin(), gri...
ALGO
0.999992
6.007734
{ "github_metadata": { "branch": "master", "commit_count": 327, "repo_created_at": "2020-05-20T04:24:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad6cfb82...
cedbc9e0-bcaa-4bdd-9405-5b1790e4e145
Avilad0/LeetCode
1367_LinkedListInBinaryTree.cpp
#include<bits/stdc++.h> using namespace std; /** * Definition for singly-linked list. */ struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; /** * Definition for a ...
ALGO
0.999962
5.806728
{ "github_metadata": { "branch": "main", "commit_count": 561, "repo_created_at": "2024-12-18T03:04: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": "69ae5f5bf4...