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
5b70828a-9450-4a6f-ae3b-03dd7e9c7589
Rahul365/Coding_Practice
techniques/HLD/persistentSegmentTree.cpp
#include<bits/stdc++.h> using namespace std; const int maxn = 1e5+11; using ll = long long int; /*Version of persistent segment tree using Pointer based approach*/ vector<int> a(maxn); int n; /* Supports : 1) Rollback 3) range query 4) Range update using lazy propagations */ struct Node{ Node *lef...
ALGO
0.997393
4.852245
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2020-02-20T18:03:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db2761f48...
73d48e55-5c3a-448f-8b4b-8a45edd550f1
halalboro/fpga-accelerators
kria-vitis-platforms/kv260/overlays/Vitis_Libraries/quantitative_finance/L3/src/models/heston_fd/src/xf_fintech_heston_numpy_like_functions.cpp
/* * Copyright 2019 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
ALGO
0.982674
5.967133
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2023-11-28T16:06:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12223f91754...
c17f5e49-3e76-4e2c-bad9-586b822cfeba
chobaa/cpp-algorithm
icpc/cpp/ICPC 25W/Day7/20040.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int parent[500001]; int find_parent(int a) { if (parent[a] == a) return parent[a]; else return parent[a] = find_parent(parent[a]); } void union_parent(int a, int b) { a = find_parent(a); b = find_parent(b...
ALGO
0.999965
3.782673
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-01-09T04:41: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": "689398915f0...
045282b6-ba40-46d3-81e9-1e5046897b0b
Ashish-118/DSA_Course
DP/minSidewaysJumps1824.cpp
class Solution { public: int solve(vector<int> &obs, int i, int lane, vector<vector<int>> &dp) { if (i == (obs.size() - 1)) return 0; if (dp[lane][i] != -1) return dp[lane][i]; int jumps = INT_MAX; for (int j = 1; j <= 3; j++) { if (j...
ALGO
0.999874
5.266778
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-10-10T17:52: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": "e157b05cf87...
e4a36178-1bd1-479b-b1f9-b49918b08534
ieeefiu/robot2015
SimonSays/simonSays.ino
int colors[100]; int possition = 0; int photo1 = 0; int photo2 = 1; int photo3 = 2; int photo4 = 3; int count = 1; int led1 = 13; int led2 = 12; int led3 = 11; int led4 = 10; boolean run = true; void setup(){ Serial.begin(9600); for(int i = 10; i < 14; i ++){ pinMode(i, OUTPUT); } } void loop(){ while(run...
TOOL
0.907095
3.698521
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2015-01-29T21:11:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "de3f6058b5...
568f5a72-721d-48b4-aeaa-356c1599b096
belall0/competitive-programming
Codeforces/1000-1200/JzzhuandChildren.cpp
/* * url1: https://vjudge.net/solution/59244346/UxZ094YiDGW8VhvQS0nX * url2: https://vjudge.net/solution/59244771/EBPPSNZKZZ1wYgTddmM1 * date: 16 - 03 - 2025 * category: sorting, implementation * complexity: solution2 is O(n) */ #include <bits/stdc++.h> using namespace std; void solution1() { int n{}, m{}; ...
ALGO
0.999996
4.075835
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2025-02-15T05:46: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": "a6c064892eb...
1df5a6c8-395e-4743-a207-e1c41348316b
mativan15/BinMulti
.history/main_20240404111728.cpp
#include <bitset> #include <algorithm> #include <iostream> using namespace std; template <size_t N> class BoothMultiplier { public: // Constructor BoothMultiplier(int64_t x, int64_t y) : x_(x), y_(y) { // Convertir a binario x_bin = bitset<N>(x); y_bin = bitset<N>(y); } // Multiplicación int64_t ...
ALGO
0.999953
5.653357
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-07T23:46: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": "08ce75621b72...
c53efacc-5c6d-48ea-8a7b-155cb69d8d4a
shreyasjoshi1234/c-codes
C++/57_Exchange_of_obj.cpp
#include<iostream> using namespace std; class point { int x,y; public: point(int a,int b) { x=a; y=b; } //Don't expect the function to xch values of ob1 and ob2 //Because the calling object values can be modified //but the object which is passed as parameter is call by ...
ALGO
0.989278
5.267811
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-03-06T16:16:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a319ad4d791c...
5809ce89-d6cb-48da-ae20-1aa90bea63c0
4xx31/algorithms-cpp
codeforces/1200s/B. Worms.cpp
// http://codeforces.com/problemset/problem/474/B // DISCLAIMER: This is NOT production-quality code. #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; int a[n]; a[0] = 0; for (int i = 1; i <= n; i++) { int num; ...
ALGO
0.999985
4.580694
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2020-02-01T13:53: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": "ce8c4aae...
bd44b648-7215-47bb-bf1f-5582fb82aa2d
apnorton/math
cpp/NumberTheory.cpp
#include "NumberTheory.h" #include<iostream> using namespace Math; /** * Uses the Euclidean Algorithm to compute the GCD of two integers */ uint64_t NumberTheory::gcd(uint64_t a, uint64_t b) { if (b > a) { std::swap(a, b); } if (!b) { // gcd(a, 0) = a return a; } int tmp; while (b) { tmp...
ALGO
0.999984
6.916718
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2014-04-27T23:40:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b6d19dfd...
7ffeb258-d2d9-4433-9b94-9e4bcbb36484
aj4941/Algorithm
백준/Silver/16922. 로마 숫자 만들기/로마 숫자 만들기.cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef unsigned long long ull; typedef pair<double, double> pdd; typedef vector<vector<ll>> vll; typedef tuple <ll, ll, ll, ll, ll> tl; typedef tuple<int, int, int> ti; int dx[4] = { -1, 0, 1, 0 };...
ALGO
0.999789
4.257694
{ "github_metadata": { "branch": "main", "commit_count": 998, "repo_created_at": "2023-02-24T03:10:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22ce279710...
af40c3c3-e7a2-43b9-a21e-154674b9374a
farukshin/codeforces
0500-0999/998/b.cpp
// https://codeforces.com/contest/998/problem/B #include <bits/stdc++.h> using namespace std; typedef long long ll; void solve() { int n, sum; cin >> n >> sum; vector<int> v(n); for (auto &d : v) cin >> d; int cnt = (v[0] & 1 ? 1 : -1); vector<int> r; for (int i = 0; i < n - 1; i++)...
ALGO
0.999988
3.911468
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2020-05-09T06:06: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": "c31735416...
8b139a93-404e-4294-a6b3-7ede95d80c89
SaqlainAveiro/Competitive-Programming-Solves
CodeForces/City Day.cpp
/* Author : Md. <NAME> Dept. & Institute : CSE - 41st Batch , Ahsanullah University of Science & Technology Problem Name : */ #include<bits/stdc++.h> using namespace std; long long int i,j,k,l,m,a,b,c,d,t,n,sum,ans,mid,high,low,prv1,prv2; long long int ar[100000]; long long int func(lo...
ALGO
0.999952
4.077862
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2021-06-04T22:13: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": "81730a0a202...
ac6a1292-c1ba-472f-ad77-ebb19e222b0f
swati-bhatt/Practice_cpp
lb/165circularQueue.cpp
#include <iostream> using namespace std; class CircularQueue{ int size; int* arr; int front; int rear; public: //rear is pointing to the last element CircularQueue(int size){ this->size=size; this->rear=-1; this->front=-1; this->arr= new ...
ALGO
0.999005
4.298011
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-12-17T10:54: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": "2de38604528...
bda3f734-d2bb-48a3-8be8-839d49f541c5
akhikolla/InformationHouse
cort/src/projectOnTwoDims.cpp
#include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] Rcpp::List projectOnTwoDims(const NumericMatrix a, const NumericMatrix b, const NumericVector p, const NumericVector f, const NumericVector kern, ...
ALGO
0.990022
5.521295
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-12-30T15:51:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a4b68860...
01aae2e4-6df8-4000-b5e5-c07dfee4e521
Routing-Problems-in-Green-Logistic/2E_EVRPTW
src/BUSCA_LOCAL/LocalSearch.cpp
/* * ./run ../instancias/2e-vrp-tw/Customer_5/C103_C5x.txt 1657747507 */ #include "LocalSearch.h" #include "../mersenne-twister.h" #include <memory> using namespace NS_LocalSearch; using namespace NS_Auxiliary; using namespace NS_Construtivo; using namespace NS_viabRotaEv; #define PRINT_MV_SHIFIT_INTRA FALSE #def...
ALGO
0.999645
5.694084
{ "github_metadata": { "branch": "main", "commit_count": 398, "repo_created_at": "2022-04-30T00:51:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21fbd030a69...
c544a4b0-8fae-465b-a099-f0bb3a370fca
nmakimoto/nmlib
doc/usage_fft.cpp
// Usage of FFT code // - Include "fft.h" and use "nmlib" namespace. No linking is required. // - Features include FFT, inverse FFT and their by-products. #include <iostream> #include <vector> #include <complex> #include "fft.h" using namespace nmlib; int main(void){ size_t n=1024, ncut=20; std::vector<std::com...
ALGO
0.999104
5.228109
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2015-10-25T14:26:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "951e6f04...
be4cd661-b977-4585-a889-7ff9b2611af1
Sammyjroberts/Challenge-217-Easy-Lumberjack-Pile-Problem
[2015-06-01] Challenge #217 [Easy] Lumberjack Pile Problem/main.cpp
/* * File: main.cpp * Author: <NAME> | Github: github.com/kekeoki * * Created on June 6, 2015, 10:24 AM */ #include <cstdlib> #include <iostream> #include "QuickSort.h" #include <vector> #include <fstream> #include "node.h" using namespace std; int main(int argc, char** argv) { int size; //I...
ALGO
0.999239
4.01925
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-06-06T20:41: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": "f7ab5cbe84...
1d95a968-ab62-45a9-8935-da6ff81b08b1
ngthvan1612/Codeforces
295A.cpp
///created: 6/Jul/2019 21:28:05 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; const int modulo = 1e9 + 7; #ifdef LOCAL_DEBUG_NTV1612 template<class __Ty> string to_string(__Ty a) { string res = "[ "; bool f = true; for (auto &p : a) { res += (f ? string("") : stri...
ALGO
0.999988
3.70181
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-02-01T06:14: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": "1ef86524e3...
d69c96f2-f18b-4525-9a22-c6263e83795f
epfl-lasa/robot-toolkit
packages/core/robotlib/include/ForwardDynamics.h
/* * Copyright (C) 2010 Learning Algorithms and Systems Laboratory, EPFL, Switzerland * Author: <NAME> * email: <EMAIL> * website: lasa.epfl.ch * * Permission is granted to copy, distribute, and/or modify this program * under the terms of the GNU General Public License, version 2 or any * later version publis...
ALGO
0.932333
4.041698
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2015-09-09T14:40:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12ec3934...
7396796d-0d2e-4a2b-a2db-88a49a8a275a
fedecastellaro/Hamming-window-for-signal-processing
src/hamming.cpp
#include <stdlib.h> #include <math.h> #include <Arduino.h> #include "hamming.h" #define PI 3.14159265358979323846 Hamming::Hamming(int window_size) { //Save actual windows size. m_window_size = window_size; //Allocate the memory for the constants m_coef = static_cast<float *>(malloc(sizeof(float) * m...
ALGO
0.986194
5.301621
{ "github_metadata": { "branch": "hamming", "commit_count": 13, "repo_created_at": "2021-11-22T19:15:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b584a8b8...
bcf32535-8677-4946-82e3-371402ff74ba
osman-goni-cse/Competitive-Programming
Algorithms/Dynamic-Programming/dp_coin.cpp
#include <bits/stdc++.h> using namespace std; int k, n;// k ta coin , n banate hobe int coin[111]; void banano_jbe_kina() { bool psbl[111];//psbl[i]=1 hbe jodi i banano jai memset(psbl, false, sizeof psbl); psbl[0] = true;// kono ta na niye zero for(int i=1; i<=n; i++){ for(int j=1; j<=k; j++){ if(i>=co...
ALGO
0.999724
3.695407
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2020-08-27T16:51:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c7ba3ea0...
7cb9c082-77d4-41bd-a044-1e96fb3052c3
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/01/0128/personal_submission/cf853b_yawn_sean.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3,Ofast,unroll-loops") // #include "atcoder/convolution" // #include "atcoder/dsu" // #include "atcoder/fenwicktree" // #include "atcoder/lazysegtree" // #include "atcoder/math" // #include "atcoder/maxflow" // #include "atcoder/mincostflow" // #include "atcoder/modint" /...
ALGO
0.999595
3.87679
{ "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": "8873...
d2b4f533-a6b2-4e86-a463-04385f20bd9d
mshong0320/slam_package
src/loop_closure.cpp
#include "loop_closure.h" #include <cuda_runtime.h> #include <cublas_v2.h> /** * @brief CUDA kernel to compute distances between a scan point and map points. * @param d_current_scan Input scan points in device memory. * @param d_map Map points in device memory. * @param d_distances Computed distances between scan ...
ALGO
0.998833
5.71521
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-03T23:51:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13aabf887088...
f369b69c-97a0-420c-ba9d-3a124995fdb1
JunSpring/CBNU-Tensor-2nd-Seminar
problems/Example1.cpp
#include <iostream> #include <string> using namespace std; struct Person { string name; int age; string address; }; void setValueByValue(Person p) { p.age = 30; } void setValueByAddress(Person* p) { p->age = 40; } void printValueByReference(const Person& p) { cout << "Name: " << p.name <...
TOOL
0.918238
5.493377
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-03-14T06:24:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "53c6349a7ee...
fe9e01f3-f103-4e4a-b879-cafcbef2b1ed
shafeenyousafzaii/Data-Strucutes
LAB-TASK-5/Task3/Task3.h
#include <iostream> using namespace std; class node { public: char data; node *next; node(char val) { data = val; next = NULL; } }; class List { node* top; int length; public: List() { top = NULL; length = ...
ALGO
0.995066
3.845671
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-11-29T06:20:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55721ae78382...
93722ffb-078a-4a2c-9972-846cd814d778
sohagcse07/My-competitive-journey
CF-Practices/tast01.cpp
//In the name of ALLAH // Insallah one day success will be your #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int,int> pii; typedef pair<double, double> pdd; typedef pair<ll, ll> pll; typ...
ALGO
0.999509
4.18989
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-03-12T08:47: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": "0bf0ac613874...
972ab877-c85e-4d00-bb74-a3e2b40aac48
sushil34053/Assignment-2-Syntax-Semantics-and-Memory-Management
syntax_errors.cpp
// C++ Code with Syntax Errors // This script calculates the sum of an array but contains syntax errors. #include <iostream> using namespace std; int calculateSum(int arr[], int size) { int total = o; // Syntax Error: 'o' is undeclared as we have typed o instead of 0 for (int i = o; i < size; i++) { // Synt...
ALGO
0.966472
3.032216
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-16T17:03:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a42fdf3fb11e...
10c3d351-3d32-4332-85d1-051487aa1fdf
SkTsKtSkT1/shuabrushsomelc
LinkList/leetcode817.cpp
// // Created by skt on 2022/10/12. // #include "leetcode817.h" #include "algorithm" int leetcode817::numComponents(ListNode *head, vector<int> &nums) { // if n==1 if(head->next== nullptr && nums[0]==head->val) return 1; else if(head->next== nullptr && nums[0]!=head->val){return 0;} int cnt=0; whi...
ALGO
0.999788
5.504146
{ "github_metadata": { "branch": "master", "commit_count": 286, "repo_created_at": "2022-08-25T15:50:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "dec63ddc...
8c34ac8c-55d0-458b-a6e0-43bc51ccebf8
magovansh9/LeetCode-Solutions
moveZeroes.cpp
#include <iostream> #include <vector> using namespace std; // Given: An array with interspersed 0s // To Do: Move the zeros to the end without changing the order of the non-zero elements // My Solution // Get index of first zero, keep count of zeros, replace zeros with non-zero elements using the counter class Soluti...
ALGO
0.999974
6.302922
{ "github_metadata": { "branch": "main", "commit_count": 754, "repo_created_at": "2021-05-12T22:40: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": "e5e0b19447...
9874f93f-9e22-4471-b8fe-e57e253ef174
krishnakumar5399/Leetcode_Solution
54. Spiral Matrix.cpp
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int>ans; int n = matrix.size(); int m = matrix[0].size() ; int left = 0 , right = m-1; int top = 0 , bottom = n-1; while(left <= right && top <= bottom){ // left to right for(int i = left ;...
ALGO
0.999995
6.44092
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2024-02-04T19:33: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": "d3f5e283e17...
9e9baa07-a26c-4f61-a615-7d602f995a4b
joelgrimaldi/Data_Structures
hw1/moire.cpp
#include <iostream> #include <fstream> #include <sstream> #include <cstdlib> #include <vector> #include <string> #include <stdio.h> #include <stdlib.h> #include <ctype.h> using namespace std; int main(int argc, char *argv[]){ if(argc != 5){ //if more or less than 4 args cerr << "Not correct number of parameters,...
TOOL
0.946559
3.935135
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-10-18T19:53: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": "e9cda512ff3b...
aac8c7a0-abee-45c7-b7e0-0bb87b0ea142
BinomialSheep/CompetitiveC--
RasenBook/Rasen15/AllPairsShortestPath.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; // #include <atcoder/all> // g++ --std=c++14 -I "/mnt/c/Program Files (x86)/Microsoft Visual // Studio/2019/Community/VC/Tools/MSVC/14.29.30037/include" code.cpp #define rep(i, n) for (int i = 0; i < (int)(n); i++) static const int MAX = 100; static c...
ALGO
0.999993
5.136366
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2023-12-12T17:45: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": "b927965f4...
55067eee-d66d-448e-b425-1be274e5356f
DineshBS44/Competitive-Programming
CSES/Message_route_cses.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int #define ld long double #define pb push_back #define mp make_pair #define F first #define S second #define all(x) (x).begin(), (x).end() #define pll pair<int,int> #define MOD 1000000007 #define M2 998244353 #define INF 2e18 #define EPS 1e-9 #define...
ALGO
0.999991
4.375931
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-10-04T11:45: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": "ed3d34604...
f38fee28-df20-427f-acfe-10fbbeb11718
AritonV10/Exercises
UVT/Grafuri/ex_1.cpp
/* https://www.pbinfo.ro/?pagina=probleme&id=417 */ #include <iostream> #include <fstream> std::ifstream fin("graf.in"); std::ofstream fout("graf.out"); int amount(int arr[][1000], int length, int _highestGrade){ int _count = 0; for(int i = 0; i < length; i++){ int _x = 0; for(int j = 0; j ...
ALGO
0.999525
3.332756
{ "github_metadata": { "branch": "master", "commit_count": 138, "repo_created_at": "2018-02-20T12:54: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": "517359bd...
68c3394a-8728-4d1f-b01c-331c0d4aaf65
lbwei1016/Competitive-Programming
Finished/ZeroJudge/zj_a451.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll MOD; struct Mat { ll mat[2][2] = { {1, 1}, {1, 0} }; friend Mat operator* (const Mat &l, const Mat &r); friend Mat operator% (Mat l, const ll mod); }; Mat operator* (const Mat &l, const Mat &r) { Mat res; ...
ALGO
0.999995
4.263338
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-03-25T06:23: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": "2aadea6c465...
e52afe91-98a1-41f0-8388-8b7786a290b7
RootMyself/data-structure-study
My_Project/Linked_List/Linked_List/DoubleLinkedList.cpp
#include "pch.h" #include "DoubleLinkedList.h" DoubleLinkedList::DoubleLinkedList() { // tail과 head를 서로 연결해준다. // 비어 있다. m_head.next = &m_tail; m_tail.prev = &m_head; m_head.prev = nullptr; m_tail.next = nullptr; } DoubleLinkedList::~DoubleLinkedList() { Clear(); } void DoubleLinkedList::Add(DATA& data) { ...
TOOL
0.992221
5.027561
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-10-09T14:57:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "159ece956...
39f43f86-cdfe-41d1-ae45-6ef5e830436f
rodea0952/competitive-programming
AOJ-ICPC/2334.cpp
#include <iostream> #include <complex> #include <vector> #include <queue> #include <algorithm> #include <tuple> using namespace std; typedef complex<double> Point, Vector; typedef pair<Point, Point> Segment, Line; typedef pair<double, int> P; #define X real() #define Y imag() #define EPS (1e-10) #define equals(a, b) ...
ALGO
0.999825
4.313088
{ "github_metadata": { "branch": "master", "commit_count": 408, "repo_created_at": "2019-08-15T06:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3f7027c...
8861192a-ef16-450d-b819-7868b7611b0b
snandasena/cpp-advanced-topics
ds/leetcode/arrays/src/matchsticks_to_square.cpp
// // Created by sajith on 7/12/22. // #include "base.h" class Solution { vector<int> sides; bool backtrack(size_t i, int side_sum, const vector<int> &matchsticks) { if (i == matchsticks.size()) return true; for (int j = 0; j < 4; ++j) { if (sides[j] + matchsticks[i] ...
ALGO
0.999549
5.589205
{ "github_metadata": { "branch": "tutorials", "commit_count": 1360, "repo_created_at": "2020-11-21T04:21:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd60...
1ee81603-c447-403b-8dfc-2f6d58ae2710
Jayesh2411/leetcodesolution
37-sudoku-solver/37-sudoku-solver.cpp
class Solution { private: int row[9][60], col[9][60], cube[3][3][60]; bool sudoku(vector<vector<char>> &board, int i, int j, char val) { if(row[i][val]) return false; if(col[j][val]) return false; int rowCube = i/3; int colCube = j/3; if(cube[r...
ALGO
0.999789
6.092392
{ "github_metadata": { "branch": "master", "commit_count": 1803, "repo_created_at": "2022-01-17T14:38:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bc2879...
d43fb7dc-2052-45cf-bd2a-552c8bc9e25d
P76ers/cpp
8.6/1.cpp
#include <iostream> #include <cmath> /* Der Satz des Pythagoras lautet "a² + b² = c²". Erstellen Sie ein Programm zur Berechnung der Seite C nach Eingabe der Werte für a und b. Für die Wurzelberechnung können Sie die Funktion "sqrt()" benutzen. */ using namespace std; int main(int argc, char const *argv[]) { float...
ALGO
0.997689
4.061217
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-05T09:46:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2f69f07fd75...
bf7b476a-2b5c-44d3-8099-324e6bfe9563
micmacIGN/micmac
src/Yann/gnss/Statistics.cpp
#include "Statistics.h" // --------------------------------------------------------------- // Moyenne d'un vecteur // --------------------------------------------------------------- double Statistics::mean(std::vector<double> X){ double m = 0; for (unsigned i=0; i<X.size(); i++) m += X.at(i); return m/X.si...
ALGO
0.932762
4.949046
{ "github_metadata": { "branch": "master", "commit_count": 10879, "repo_created_at": "2016-11-24T22:09:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 785, "forks": 163, "issues": 83, "pull_requests": 30 }, "file_meta": { "content_id": "8...
7f4b24dd-b007-4754-99b6-df05b1dbc10a
nehcoah/algorithm-template
codeforces/1932(div3)/f.cpp
#include "bits/stdc++.h" using namespace std; using ll = long long; void solve() { int n, m; cin >> n >> m; vector<int> f(n + 1, n + 1), d(n + 2); for (int i = 0; i < m; i++) { int l, r; cin >> l >> r; f[r] = min(f[r], l); d[l] += 1; d[r + 1] -= 1; } fo...
ALGO
0.999974
4.373734
{ "github_metadata": { "branch": "main", "commit_count": 591, "repo_created_at": "2023-09-11T02:34: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": "d38c557826...
79e73f38-5550-4e37-8db0-b4e7b9f920a3
edamame8888/edamame-s_ABC
lib_AtCoder/wightUnionFindTree.cpp
template<class Abel> struct UnionFind { vector<int> par; vector<int> rank; vector<Abel> diff_weight; UnionFind(int n = 1, Abel SUM_UNITY = 0) { init(n, SUM_UNITY); } void init(int n = 1, Abel SUM_UNITY = 0) { par.resize(n); rank.resize(n); diff_weight.resize(n); for (in...
ALGO
0.999973
5.20371
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2018-07-26T11:50: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": "e73765da0...
a6800cc4-856f-43d6-9832-ac9d91f9733b
ganeshalamuru/prg
codeforces/cr984/D_I_Love_1543.cpp
#include <bits/stdc++.h> using namespace std; #define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); typedef long long ll;typedef long double ld;typedef pair<int,int> pii; #define F first #define S second #define PB push_back #define MP make_pair const ll mod = 1e9+7, N = 2e6+7, M = 2e6+7, INF = INT_MAX/10; ll po...
ALGO
0.999886
4.875949
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-08-02T10:36: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": "6e2a3e0de976...
659352eb-5bf5-4a66-9fb6-504f406500a8
TusharBhart/DSA
DP/DP-on-Strings/Print-Longest-Common-Subsequence.cpp
#include<bits/stdc++.h> using namespace std; string printLCS(string &s, string &t) { int n = s.size(), m = t.size(); vector<vector<int>> dp(n + 1, vector<int>(m + 1)); for(int i=1; i<=n; i++) { for(int j=1; j<=m; j++) { if(s[i - 1] == t[j - 1]) dp[i][j] = 1 + dp[i - 1][j - 1]; ...
ALGO
0.999984
4.541442
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2023-01-01T17:06:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "213faa8de53...
1ce9acc7-a6d6-4e16-b67a-af0d53b02c38
skrydg/cf
round_187_div_1/d.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <deque> #include <list> #include <iterator> #include <functional> #include <sstream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <c...
ALGO
0.999927
3.658833
{ "github_metadata": { "branch": "master", "commit_count": 161, "repo_created_at": "2017-10-02T12: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": "0befbd35...
4ddbc47e-bd19-46f8-a001-6dd202a81ba7
IlyaMolochko/BSU
PA/1.1.cpp
#include <algorithm> #include <bitset> #include <ctime> #include <iostream> #include <random> using namespace std; void hexToBin(string &hex, string &bin) { for (auto c : hex) { if (c == '0') { bin += "0000"; } else if (c == '1') { bin += "0001"; } else if (c == '2'...
ALGO
0.999466
3.701739
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-03-08T20:00: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": "c63b4f85c...
f1c56942-4bea-45a8-ba66-4a3070280054
wtremml18/DNDStoryGenerator
Linked.h
//easier just to do everything in-line /* <NAME> Linked List 2/23/17 */ //checking #ifndef LIST_H #define LIST_H // libraries #include <iostream> #include <string> using namespace std; /* Linked list structure */ struct list { struct list *prev; //discussion of why char was picked is in the other file. Lots o...
ALGO
0.991004
4.525498
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-02-09T22:16:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cce835c78...
a6abf26b-d71b-4c8c-917a-ee1f22f42221
uryadova1/oop_lab1
BitArray/BitArray.h
// // Created by tyzzko on 19.10.2023. // #ifndef LAB1_BITARRAY_H #define LAB1_BITARRAY_H #endif //LAB1_BITARRAY_H #include <iostream> #include <vector> class BitArray { private: int size; bool *array; public: BitArray(); ~BitArray(); //Конструирует массив, хранящий заданное количество бит. ...
TOOL
0.902596
5.759367
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-09T20:29:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "339c2fa4c255...
1325c348-d867-4924-bc3a-30129edefc19
bombomby/optick
samples/WindowsVulkan/glm/gtc/noise.inl
/// @ref gtc_noise /// @file glm/gtc/noise.inl /// // Based on the work of <NAME> and <NAME> on "webgl-noise": // https://github.com/ashima/webgl-noise // Following <NAME>'s paper "Simplex noise demystified": // http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf namespace glm{ namespace gtc { template<type...
ALGO
0.996942
6.848396
{ "github_metadata": { "branch": "master", "commit_count": 573, "repo_created_at": "2015-01-17T13:37:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3045, "forks": 304, "issues": 62, "pull_requests": 23 }, "file_meta": { "content_id": "0...
e5f433f6-fd37-4d59-bbf5-d3f62f9ea589
Pipi24/OJ
first_time/leetcode/c++/133. Clone Graph.cpp
/* // Definition for a Node. class Node { public: int val; vector<Node*> neighbors; Node() { val = 0; neighbors = vector<Node*>(); } Node(int _val) { val = _val; neighbors = vector<Node*>(); } Node(int _val, vector<Node*> _neighbors) { v...
ALGO
0.999982
6.359783
{ "github_metadata": { "branch": "master", "commit_count": 272, "repo_created_at": "2018-02-01T08:52: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": "684e41e4...
7c4036e0-81fe-404e-952d-c330092c99a7
JaberYan/Basic_Algorithms
WEEK_19/Road_Reparation.cpp
#include<bits/stdc++.h> using namespace std; #define pi pair<int,int> const int N=1e5+5; vector<pi> adj[N]; bool visited[N]; class Edge { public: int u,v,w; Edge(int u,int v,int w) { this->u=u; this->v=v; this->w=w; } }; class cmp { public: ...
ALGO
0.999963
4.377129
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-10-14T17:49: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": "6d1bf8ceb857...
aa6bdd92-0a95-4ef3-8f70-4ed4dc846aae
msrshahrukh100/Iqra
Compiler lab 2/dfa.cpp
#include <iostream> #include <stdio.h> #include <vector> using namespace std; int main() { char ch; FILE *p; p = fopen("dfa.txt","r"); char initialstate = fgetc(p); ch = fgetc(p); char finalstates[10]; int count = 0; while((ch = fgetc(p)) != '\n') { if(ch != ' ') finalstates[count] = ch; else coun...
ALGO
0.999799
3.804537
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-03-06T04:31: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": "2542b3617...
9ca566ab-f5a9-43cb-9a9d-8faf504f6dd8
yubinbai/pcuva-problems
UVa 10673 play with floor and ceil/sol.cpp
#include <cstdio> #include <cmath> void gcd(long long a, long long b, long long &d, long long &x, long long &y) { if (!b) { d = a; x = 1; y = 0; } else { gcd(b, a % b, d, y, x); y -= x * (a / b); } } int main() { int T; scanf("%d", &T); while...
ALGO
0.999821
3.748364
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2013-05-08T15:36:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 50, "forks": 40, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "07f1839...
6628f326-8b89-4623-9efa-78a3630538cc
bgoss206/Creature-In-A-Maze
creature.cpp
/** *@brief implementation the creature to move around the maze * *@author <NAME> * *@date 5/6/2021 */ #include "creature.h" #include <iostream> using namespace std; /** *@pre creature is initalized *@post ostream of creature's current location is returned *@return formatted creature location is returned in (...
ALGO
0.99734
4.916233
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-06-08T03:54: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": "9c6f0335cff1...
09486af4-47e7-4925-a57b-261e698906bd
00anshjain/LeetcodePractice
416-partition-equal-subset-sum/416-partition-equal-subset-sum.cpp
class Solution { public: bool subsetSum(vector<int>& nums, int sum, vector<vector<int>> &dp, int n) { if(sum == 0) return true; if(n == 0) return false; if(dp[n][sum] != -1) return dp[n][sum]; if(nums[n-1] <= sum) return dp[n][sum]...
ALGO
0.999887
5.493723
{ "github_metadata": { "branch": "main", "commit_count": 2235, "repo_created_at": "2022-03-13T04:41: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": "5ccedc9e1...
b3f27965-8f05-4381-b6ec-379b449195dc
hekun123/LeetcodeSolver
49_new/main.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct node{ int primeNum; int flag_i; struct node *left, *right; node():primeNum(0), flag_i(-1), left(NULL), right(NULL){} } TreeNode; TreeNode* treeInsert(TreeNode *node, int primeNum, int flag_i){ if(!node){ node = (Tree...
ALGO
0.999996
4.22479
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2018-12-25T03:35: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": "748808f6f...
63b954f0-5c28-4f79-b4b4-2a32bfda1416
tom-lab/_2014_02_05
Motorfahrt.ino
void MotorFahrt(){ for (int i=1;i<=4;i++){ if (M_Done[i]==true){ if ((Position[i]-PositionSoll[i]) > Schwellwert){ SetMotorRichtung(i, 0); MotorStart(i); } else if ((Position[i]-PositionSoll[i]) < (Schwellwert*-1)){ SetMotorRichtung(i, 1); MotorS...
ALGO
0.976729
3.896455
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-02-06T16:21: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": "d8c3e3ed2b...
86f55185-4d93-4ff3-b24b-02ddd96de474
panderan/PracticesCodingInterview
Chapter2/notes/binary_search.h
#ifndef _SEARCH_H #define _SEARCH_H #include <unistd.h> int compare_int(int a, int b) { return a-b; } template<typename T> int binary_search_ex(T arr[], int length, T target, int (*compare)(T t1, T t2)) { int s_idx = 0, m_idx = 0, e_idx = 0, ret = 0; if (arr == NULL || length < 1) { return -1; ...
ALGO
0.999102
3.92931
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2019-07-15T13:32: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": "5a2ff35f4...
b54bf0e5-0917-4e3e-9a12-0893e1ba835d
mainul3195/All
D_Armchairs.cpp
#include<bits/stdc++.h> using namespace std; int n; vector<int> s, e; vector<vector<int>> dp; long long okdone(int i = 0, int j = 0) { if(i==s.size() && j == e.size()) return 0; if(i==s.size() || j == e.size()) return 2147483647; if(~dp[i][j]) return dp[i][j]; return dp[i][j] = ...
ALGO
0.999948
3.880616
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-06-20T06:23:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a9ab372f...
06ab3a5b-1480-4383-8420-6f26590eaedf
mkltaneja/Interview-Prep-Questions
Dynamic-Programming/Minimum_Palindromic_cuts.cpp
#include<iostream> #include<vector> #include<climits> using namespace std; int main() { string s; cin>>s; int n = s.size(); vector<vector<bool>> ispal(n, vector<bool>(n, 0)); for(int gap = 0; gap < n; gap++) { for(int i = 0, j = gap; j < n; i++, j++) { if(gap == ...
ALGO
0.999972
4.527296
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2020-08-19T19:08:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d2d6730...
d2166232-923c-4f61-933f-a1593fa0a22c
raincross7/code-similarity
codes/train_code/problem187/problem187_148.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; if(m % 2 == 0) { int st = 1; for(int i = m - 1; i > 0; i -= 2) { cout << st << " " << st + i << '\n'; ++st; } st = m + 1; for(int i = m; i > 0; i -= 2) { cout << st << " " << st + i << '\n'; ++st; } } else { ...
ALGO
0.999958
3.126631
{ "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": "41964059d5b5...
9b420e3a-6646-4aef-9c42-ad6de4074f7f
shaswata56/Competetive-Programming
vjudge/F-Twisted-Circuit.cpp
/* _ _ _____ __ | | | | | ____| / / ___| |__ __ _ _____ ____ _| |_ __ _| |__ / /_ / __| '_ \ / _` / __\ \ /\ / / _` | __/ _` |___ \| '...
ALGO
0.99992
4.445258
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2019-01-13T17:13:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3002546e8...
00292bfa-c6e6-4938-b1ab-0a047ebac706
rodea0952/competitive-programming
AOJ/0180.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> #include <cfloat>...
ALGO
0.999904
4.183139
{ "github_metadata": { "branch": "master", "commit_count": 408, "repo_created_at": "2019-08-15T06:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "485301b0...
26690c1c-a0f7-4963-85eb-d10e90a01020
Friox/study-algorithm
boj/3190.cpp
#include <ios> #include <queue> struct Pos { int y, x; }; struct Di { int time; char dir; }; int main() { Pos w[4] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; int N, K, L, m[101][101] = { 0 }, y, x, t, dir = 0, sec = 0; char d; Pos head = {1, 1}; m[1][1] = 2; std::queue<Di> di; std::deque<Pos> pi; ...
ALGO
0.999908
3.956395
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2025-04-24T06:45: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": "760097075c8...
5f2b5879-ad06-452a-b1c0-0a14ffa0de37
magdelkayfe22/Cpp
Lab12/lab12_Elkayfe.cpp
/* <NAME> June 12 2025 Introduction to array */ #include<iostream> #include<cstdlib> #include "lab12_Elkayfe_function.cpp" using namespace std; int main(){ cout<<"\n------- example 1: declaring an array -------\n"; array_declare(); cout<<"\n------- example 2: character array -------\n"; array_char(); ...
ALGO
0.989872
3.94086
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-09T04:07:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd41fe4237ae...
3c874c9f-0555-4d4a-b307-3232c10d501f
gopoma/competitive-programming
tasks/1491D.cpp
//* sometimes pragmas don't work, if so, just comment it! #pragma GCC optimize ("Ofast") //? #pragma GCC target ("avx,avx2") //! #pragma GCC optimize ("trapv") //! #undef _GLIBCXX_DEBUG //? for Stress Testing #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "debug.h" #else #define dbg(.....
ALGO
0.999871
5.47276
{ "github_metadata": { "branch": "main", "commit_count": 821, "repo_created_at": "2023-08-11T20:58: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": "1bc02bca4b...
17fc3e8d-1c47-40fa-b984-5549c05cc27d
yashaswashukla/A-Z
04-Binary Search/4.2-Find Answer by BS/13-Kth-Element.cpp
/* GFG: https://practice.geeksforgeeks.org/problems/k-th-element-of-two-sorted-array1317/1 Leetcode: */ #include <bits/stdc++.h> using namespace std; class Solution { public: int kthElement(int arr1[], int arr2[], int n, int m, int k) { if (n > m) return kthElement(arr2, arr1, m, n, k); ...
ALGO
0.999996
5.465019
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-01-27T08:59: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": "7dfab58fbb7...
54d1c7fc-9f36-4cb3-8892-367720e65d58
jinglim/heaps
shortest_path/shortest_path.h
#ifndef SHORTEST_PATH_SHORTEST_PATH_H_ #define SHORTEST_PATH_SHORTEST_PATH_H_ #include <unordered_map> // Path from a starting index to an ending index, with a total distance. template <typename T> struct Path { Path(T distance) : distance(distance) {} Path(const Path &other) = default; Path(Path &&other) ...
ALGO
0.999657
7.390169
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-06-15T05:10: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": "f586bd40da9...
8208a863-82af-4024-9989-a5b3fdf777ef
ffs97/iitk-courses
sem5/cs345/assignments/special-assign/leda/incl/LEDA/geo/seg_tree.h
/******************************************************************************* + + LEDA 6.3 + + + seg_tree.h + + + Copyright (c) 1995-2010 + by Algorithmic Solutions Software GmbH + All rights reserved. + *******************************************************************************/ #ifndef LEDA_SEGMENT_T...
ALGO
0.985937
4.259282
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2017-09-12T18:48:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 91, "forks": 88, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb4891f...
d4246bc7-3a6f-4993-af41-1e79e433234e
happyflyer/cpp-programming-experiment
shiyan8/task2.cpp
#include <iostream> #include <iomanip> using namespace std; // (1) 编制一个判定某数是否为素数的子函数prime bool is_prime(int x) // 判断一个数字是否为素数 { int flag = true; for (int i = 2; i < x / 2 + 1; i++) { if (x % i == 0) { flag = false; break; } } return flag; } int main(...
ALGO
0.998957
3.916682
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2020-11-10T09:26:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62ab8b97440f...
49ab312d-1bfd-4188-b7bc-2602e3ce2116
SolidSnakesssss/hw5
schedwork.cpp
#ifndef RECCHECK #include <set> #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <algorithm> // add or remove necessary headers as you please #endif #include "schedwork.h" using namespace std; // a constant that can be used to indicate an INVALID // worker ID if th...
ALGO
0.996309
5.203901
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-04-04T19:01: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": "035466c8758...
e789e0e4-a817-4dab-8632-c27e1e490a2f
mynew5/Script-Land
Funserver/ArcEmu/C++/northrend/ulduar/ulduar/boss_algalon.cpp
/* * Copyright (C) 2008 - 2010 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later vers...
TOOL
0.906512
5.461303
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2013-07-18T15:19:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 29, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e59d86f...
0ea74192-0ecb-47c2-949d-5badedaea57c
omarsalem33/problems-of-codeforces
Binary String To Subsequences.cpp
#include<bits/stdc++.h> #define endl "\n" #define ll long long using namespace std; void CodeFast (){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin),freopen("output.txt","w",stdout); #endif } int main(){ CodeFast(); int t; cin >> t; ...
ALGO
0.999989
3.96538
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2021-07-26T11:45: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": "63058d7a6d...
75d949e9-dfb2-42d9-8baf-ffe843c37d3c
lienjenns/Thesis_Matrix_Part
GMP/GMP/Possible_States.h
#pragma once #include "./matrix.h" #include<bitset> #include<set> #include "./Global.h" #include<numeric> #include"./Lower_bounds.h" #include"./Symmetry.h" //This function determines the //in which the rows an columns are traversed in the tree, //This order is absed on the number of nonzeros in a rowcol, no dstin...
ALGO
0.999931
5.589345
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2021-03-15T10:48: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": "10cc0c7a35f...
57c26dfb-55e6-4dff-ba60-cd29114ebf67
ishandutta2007/codeforces-a
ania/normal/1237/E.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i,a,b) for (int i = (a); i <= (b); ++i) #define REPD(i,a,b) for (int i = (a); i >= (b); --i) #define FORI(i,n) REP(i,1,n) #define FOR(i,n) REP(i,0,int(n)-1) #define mp make_pair #define pb push_back #define pii pair<int,int> #define vi vector<int> #define ll lon...
ALGO
0.999894
3.010923
{ "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": "4c92f39d76fd...
cee4f464-06d1-444a-a8ee-e2c43ad73611
Gaurav-Punjabi/multinode-rsa
multinode_files.cpp
#include <iostream> #include <vector> #include <mpi.h> #include <cstring> #include <filesystem> #include <fstream> #include <sstream> #define MASTER_WORLD 0 using namespace std; string read_file(string path) { ifstream file(path); if(!file.is_open()) { std::cerr << "Error: could not open file on path : " << ...
TOOL
0.975747
4.128005
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-11-16T01:52: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": "c40dae47d7c...
d17112d2-d52f-416d-a1ce-477d97dc5320
Xenoszz/univer
CSS 121/test.c++
#include <iostream> #include <cmath> #include <string> #include <limits> using namespace std; struct Person { string personalId; string name; string sex; string type; float mbtiData[8]; // Ne, Ni, Te, Ti, Se, Si, Fe, Fi string nick; }; int main() { // Sample data (replace with actual da...
ALGO
0.999279
5.174377
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-16T08:31: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": "4c3bf7d1fc7a...
6126ab76-8d7e-4a8c-993c-8769b409905c
Ayu1C/CrackYourInternship
0062-unique-paths/0062-unique-paths.cpp
class Solution { public: // int f(int row, int col, vector<vector<int>>& dp) // { // if(row<0 || col<0) return 0; // if(dp[row][col] != -1) return dp[row][col]; // if(row==0 && col==0) return 1; // int left = f(row, col-1, dp); // int u...
ALGO
0.999985
5.694551
{ "github_metadata": { "branch": "main", "commit_count": 1230, "repo_created_at": "2023-07-01T19:18: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": "1061673b0...
51460e78-b170-4472-bc23-47e15dd56dce
Lotuses-robot/Codes
Exercise/HDU/2896/2896.cpp
#include <cstdio> #include <cstring> #include <queue> #include <algorithm> struct Trie_Node { int nxt[130]; int fail, id, fa; char ts; }; std::queue<int> q; #define maxn 100005 struct Trie { Trie_Node tree[maxn]; bool vis [maxn]; const int root = 0; int Len; void initNo...
ALGO
0.999926
3.827447
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2022-11-08T05:50:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "561b4e44ff...
0c16495b-708c-4f80-af4a-12b323f5ab77
gidebus/CSC-120
chapter-11/lab/arrayManipulation.cpp
/* Programmer: <NAME> Program: Array Manipulation Lab Module 11 Description: This program calculates the average on elements in an array. */ #include <iostream> #include <cstdlib> #include <string> #include <iomanip> using namespace std; // Function to return the average of an array. double avg(int arr[], in...
ALGO
0.994326
5.506181
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2023-06-16T21:40:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef127d16806...
54828470-8dc9-469c-9e45-2585396eb78b
ya-ivanashev/code-for-resume
Задача коммивояжёра.cpp
#include <fstream> #include <deque> #include <math.h> #include <vector> using namespace std; int main() { ifstream cin("input.txt"); ofstream cout("output.txt"); int n; cin >> n; vector<pair<double, double>> coordinates; double x, y; for (int i = 0; i < n; ++i) { cin >> x >> y; ...
ALGO
0.999995
4.502261
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2020-12-05T14:44: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": "d38d0606a9e3...
3395907c-6f3f-45c5-b151-fb4e064068a2
taminhquanggg/CSE224_OOP
Thuc Hanh/Th01-b2.cpp
#include<iostream> using namespace std; class thiSinh { private: int SBD; float DToan; float DHoa; float DLy; public: thiSinh() { } ~thiSinh() { } void nhap() { cout<<"\nNhap thong tin thi sinh: \n"; cout<<"- SBD: "; cin>>SBD; cout<<"- Diem toan: "; cin>>DToan; cout<<"- Di...
TOOL
0.939354
3.283334
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-04-21T05:36: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": "41ead54cd7e1...
5434265b-6a84-4947-a76f-417314af5ff0
nerdling/SBSAT
src/solv_smurf/hr_lsgbw/hr_lsgbw.cc
/* =========FOR INTERNAL USE ONLY. NO DISTRIBUTION PLEASE ========== */ /********************************************************************* Copyright 1999-2007, University of Cincinnati. All rights reserved. By using this software the USER indicates that he or she has read, understood and will comply with the f...
ALGO
0.999193
4.834066
{ "github_metadata": { "branch": "master", "commit_count": 1628, "repo_created_at": "2011-04-28T23:55:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "0473f59...
f3937fc9-5a6a-4b6f-8f2b-483d1a7ffb80
RisshabSingla/Data_Structures_Algorithms_CWH
30_StackPop_LinkedList.cpp
#include <iostream> using namespace std; class Stack { public: int data; Stack *next; }; int isFull(Stack *); int isEmpty(Stack *); void transversal(Stack *); Stack* pop(Stack *); int isFull(Stack *ptr) { Stack *n = new Stack(); if (n == NULL) { return 1; } else { retu...
ALGO
0.995589
4.103045
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-09-21T04:46: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": "e0be77f4d9fb...
e75e146d-28e8-45ee-a4f6-f64be8efae52
ArmineSargsyan-219/trie-cpp
trie3.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cctype> const int ALPHABET_SIZE = 26; class TrieNode { public: TrieNode* children[ALPHABET_SIZE]; bool isEndOfWord; TrieNode() { isEndOfWord = false; for (int i = 0; i < ALPHABET_SIZE; ++i) ...
ALGO
0.999848
5.203465
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-05-07T18:09: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": "33fa3ad7ff6a...
704add7a-70d4-40e9-ac7c-f95cf017b232
cs-moushuai/Sort-Algorithm
quick_sort.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; constexpr int kCutOff = 4; void print(vector<int> &vec) { for_each(vec.begin(), vec.end(), [](int i) { cout << i << " "; }); cout << endl; } int Medium(vector<int> &vec, int left, int right) { int center = (l...
ALGO
0.999946
5.466927
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2020-12-26T10:05:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79c86fd0335d...
f3bcc7ef-5fa3-4087-be56-de06a4034c5a
PierreBoyeau/quadtrees
TP2_algo/main.cpp
#include <Imagine/Graphics.h> #include <algorithm> #include <iostream> #include "quadtree.h" #include "tools.h" using namespace Imagine; using namespace std; #ifndef srcPath #define srcPath(s) ("." s) #endif int main(){ // -------------------B&W Image Example------------------------ // Get image file ...
ALGO
0.985671
4.608565
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-11-23T20:08:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9b1e5361...
75ee1b24-bfa4-4161-88eb-aa028a19f810
LuccaGiovane/UEL-BeeCrowd
Resoluções C++/BEE 1179.cpp
#include <iostream> #include <vector> using namespace std; int main() { vector<int> pares; // Vetor para armazenar números pares vector<int> impares; // Vetor para armazenar números ímpares int numero; // Leitura dos 15 números for (int i = 0; i < 15; i++) { cin >> numero; if ...
ALGO
0.995586
5.393416
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2019-09-28T00:51: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": "33cce1e8...
97d79f6d-8526-40dd-b3e9-1fa5d53cebd0
nvtaveras/Codeforces-Solutions
Codeforces Round #278 (Div. 2)/A.cpp
#include <iostream> #include <cmath> #include <string> #include <vector> #include <cstdlib> #include <map> #include <ctime> #include <set> #include <algorithm> #include <cstring> #include <queue> #include <stack> #include <sstream> #include <cstdio> #include <bitset> using namespace std; #define mp make_pair typedef ...
ALGO
0.998854
3.260688
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-06-08T01:18: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": "8bdca477d4...
69304bc1-f81e-408e-820c-153eb2975171
Ayon-SSP/The-SDE-Prep
1]_Data Structures/2]_Linked List/middle_of_the_linked_list.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; }; class NodeOperation { public: void pushNode(class Node **head_ref, int data_val) { class Node *new_node = new Node(); new_node->data = data_val; new_node->next = *head_ref; *head_r...
ALGO
0.998965
5.202695
{ "github_metadata": { "branch": "main", "commit_count": 1190, "repo_created_at": "2022-07-02T16:33:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 174, "forks": 71, "issues": 9, "pull_requests": 2 }, "file_meta": { "content_id": "b41c0e...
b9ab6403-5136-439d-ae01-37f5c5ca85fe
Chanchal2125/Competitive_Programming
Visual C++/CP/WatchingCPL.cpp
#include <iostream> #include <iomanip> #include <string> #include <cmath> #include <climits> #include <vector> #include <set> #include <algorithm> using namespace std; #define ll long long int #define ld long double #define mod 1000000007 #define endl "\n" #define vi ...
ALGO
0.999926
3.849905
{ "github_metadata": { "branch": "main", "commit_count": 333, "repo_created_at": "2020-10-21T13:42: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": "45e8795eac...
db3df903-536a-4a57-be63-5739fdb2499a
ZobaerZihad/Codeforces_sol
B_Kevin_and_Permutation.cpp
#include <bits/stdc++.h> #define f(i, a, n) for (long long i = a; i < n; i++) #define fr(i, n) for (long long i = 1; i <= n; i++) #define py cout << "YES" << endl #define pn cout << "NO" << endl #define D(x) cout << #x " = " << (x) << endl #define nl "\n" #define ff first #define ss second #define pb push_back #include...
ALGO
0.999636
4.139488
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-18T17:17:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "067224d65179...
ae745673-064a-42f5-8b53-355e9fa083dd
rubaiyat22/Assignments
Rubaiyat_Rashid_Assignment4/TestNewInsert.cpp
/** Name: <NAME> Class: CSCI 335 Professor: <NAME> Purpose: Assignment 4 Description: TestNewInsert does everything TestInsertAndDelete except in this case the values are inserted with a new insert function NewInsert(). */ #include <iostream> #include <fstream> #include "PriorityQueue.h" using namespace std; int m...
ALGO
0.986466
4.440269
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-03-11T01:28:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b3e97866...
3f442184-1049-43ed-8a89-c3d1e07a1c31
borkrav/courses
Undergrad/cs488/handin/A5/src/a4.cpp
#include "a4.hpp" #include "image.hpp" #include "ray.hpp" #include <assert.h> #include <utility> using namespace std; int ssfactor; int disfactor; int SSAA; int doffactor; double apeture; double focalLen; extern int threads; pthread_mutex_t lock; vector<int> progress; float pixelSizeX = 0; float pixelSizeY = 0; i...
ALGO
0.964923
4.739549
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-09-29T18:00:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3823bd406...
6da8e481-57dc-4afc-ad36-a7b22d8b63c3
lonelam/SolveSet
zhangziqiangtest.cpp
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int inf = 0x3f3f3f3f; const int maxn = 100000; int bit[maxn]; int dp[maxn][2]; int dfs(int len,int head, bool up) { if (len == 1) { return 1; } int ans = 0; if (up) { for (int ...
ALGO
0.999976
3.63573
{ "github_metadata": { "branch": "master", "commit_count": 276, "repo_created_at": "2016-07-09T12:38:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0c98efb...
c9af6505-617c-4487-a760-b12f541469d3
03stevensmi/uae4arm
src/archivers/lha/huf.cpp
/* ------------------------------------------------------------------------ */ /* LHa for UNIX */ /* huf.c -- new static Huffman */ /* */ /* Modified <NAME> */ /* */ /* Ver. 1.14 Source All chagned 1995.01.14 N.Watazaki */ /* Ver. 1...
ALGO
0.999856
4.872638
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2018-09-22T20:17: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": "853fbb1f6...
501c0742-3b61-4af1-8368-c96d30441d7c
uttom-akash/Problem-Solving-Second-Phase-2020
Codeforces Round #758 (Div.1 + Div. 2)/A.cpp
#include <bits/stdc++.h> #define mx 10000 #define mod 1000007 #define ll long long using namespace std; // fill_n(&a[0][0], ntc * ntc, -100); void optimize() { ios_base::sync_with_stdio(0); cin.tie(0); } void setupFileIO(string fin = "input.txt", string fout = "output.txt") { freopen(fin.c_str(), "r", ...
ALGO
0.999825
4.161653
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2020-10-26T17:27: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": "a340b373eb2...
b33b7344-7c2d-40a4-acc7-ae42f9fabab8
waiwai444/oj
uva/11045 - My T-shirt suits me/11045.cpp
#include <cstdio> #include <cstring> #include <queue> #define INF 0x3f3f3f3f int nn; int cap[38][38]; int flow[38][38]; int prev[38]; int minf[38]; int sz_idx(const char *sz) { switch(sz[0]) { case 'X': switch(sz[1]) { case 'X': // XXL return 1; case 'L': /...
ALGO
0.999904
4.361472
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-03-29T06:14: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": "73f4e0b8d...