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
4fd6e62b-d3ce-42d7-b22d-b7791436acab
kemtrinh/linda
DanhBaDienThoai.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <fstream> #include <vector> #include <string> #include <sstream> #include <cstring> #include <algorithm> #include <queue> #include <map> #include <set> #include <cmath> #include <iomanip> #include <cstdlib> using namespace std; #define MAX 1000000000 + 5 //#...
ALGO
0.984243
3.694196
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-20T14:02: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": "029a67002142...
064c1417-60a0-445c-bbf2-4054cbe19f90
ethanh6/LeetCode
src/0876-middle-of-the-linked-list.cpp
/* Given the `head` of a singly linked list, return _the middle node of the linked list_. If there are two middle nodes, return **the second middle** node. **Example 1:** ![](https://assets.leetcode.com/uploads/2021/07/23/lc-midlist1.jpg) **Input:** head = [1,2,3,4,5] **Output:** [3,4,5] **Explanati...
ALGO
0.996657
6.976666
{ "github_metadata": { "branch": "main", "commit_count": 176, "repo_created_at": "2023-03-16T00:32:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa85059978...
eaef53d5-23ef-46d1-8504-894c68d28a34
alibaba/GraphScope
analytical_engine/apps/property/sssp_property.h
/** Copyright 2020 Alibaba Group Holding Limited. * * 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...
ALGO
0.998507
4.896548
{ "github_metadata": { "branch": "main", "commit_count": 2271, "repo_created_at": "2020-10-28T03:19:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3461, "forks": 458, "issues": 418, "pull_requests": 28 }, "file_meta": { "content_id": "95...
c57be615-538e-4552-8499-3c0524ad9835
Locutus18/ELTE-IK-Programozasi-Alapismeretek_Evfolyam_ZHk
utazas/main.cpp
#include <iostream> using namespace std; const int MAXN = 100; typedef struct { int tavolsag; int ar; } ut; void beolvas(int &N, ut utazas[MAXN]) { cin >> N; for (int i = 0; i < N; i++) { cin >> utazas[i].tavolsag; cin >> utazas[i].ar; } } int A_feladat(int &N, ut utazas[MAX...
ALGO
0.999708
3.222033
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-01-02T13:19: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": "e89ec2481a...
3adeac41-d708-4c17-bd76-f0f2a92ce467
catlover018/cpp
vnoi/backtrack_b.cpp
#include <iostream> #include <cstring> using namespace std; long long countTime = 0; bool checkFirst = false; bool checkTrace[40][100][100]; string Trace[40][100][100]; void Move(int n, char source, char target, char temp, string& str) { if (n < 1) return; if (n == 1) { countTime += 1; str =...
ALGO
0.99998
4.010764
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-11-30T02:27: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": "c4cbcfd64ec...
3b29d744-aba8-45dc-85cc-ee23c035ef48
darxsys/TEOGRAF
lab2/chrom.cpp
/** CS Teorija grafova chrom.cpp Svrha: Implementira trazenje kromatskog broja i realizaciju bojanja u jednostavnom grafu. @author <NAME>, 0036455992 @version 1.0 10/05/2014 */ #include <stdio.h> #include <stdlib.h> /** Glavna funkcija u cijelom rjesenju. Rekurzija koja pokusava svaki cv...
ALGO
0.999805
5.085643
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-07-04T11:58:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f093252582...
8e7a23b4-f384-44a1-96a0-f23aed574a92
tonyouyang/leetcode
set_matrx_zeros.cpp
class Solution { public: void setZeroes(vector<vector<int> > &matrix) { // Start typing your C/C++ solution below // DO NOT write int main() function if (matrx.empty()) return; int m = matrx.size(), n = matrx[0].size(), r = -1, c = -1; for (int i = 0; i < m; ++i) ...
ALGO
0.999107
5.737882
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2013-09-06T08:39:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "3e0e8db7...
6c97bb9a-1786-4d0c-8600-4a57fd8615a0
Tawheed-tariq/DAA-Lab
starsn-mat-mul.cpp
#include <iostream> #include <vector> using namespace std; typedef vector<vector<int>> Matrix; Matrix add(const Matrix &A, const Matrix &B) { int n = A.size(); Matrix C(n, vector<int>(n)); for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) C[i][j] = A[i][j] + B[i][j]; return ...
ALGO
0.999987
6.15668
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-10-28T15:17: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": "0cd823c9708e...
93e6b6ee-3cec-45fb-a401-a1b546c8c19b
Hmarius06/graf
graf__.cpp
#include <iostream> #include <fstream> using namespace std; int a[10] [10], n; ifstream fin("fisier.txt"); void citire() { int i,j; fin>>n; for (i = 1; i <=n; i++) { for ( j = 1; j <= n; j++) { fin>>a[i] [j]; } } } int grad (int o) { int i, j, k=0; for ( i...
ALGO
0.996831
4.142819
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-01-16T05:46: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": "839283f0f8d...
38260bc9-9942-4aad-afc9-5a4cd93ff680
skyclouds2001/DataStructureAndAlgorithms
NowCoder/HJ65.cpp
#include <iostream> #include <string> using namespace std; string str_max, str_min; int strlen_max, strlen_min; string dp[300 + 1][300 + 1]; int max_i, max_j; string max_str; int main(int argc, char const *argv[]) { cin >> str_max >> str_min; if (str_max.length() < str_min.length()) { swap(str_max, s...
ALGO
0.999924
4.277532
{ "github_metadata": { "branch": "main", "commit_count": 368, "repo_created_at": "2022-01-27T16:48:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbe822f4db...
9856cd7e-8456-4837-b62b-07e4d8f192b8
rhsehfm33/algorithm-practice
c++/codeforces/1845/a/sol.cpp
#include <bits/stdc++.h> using namespace std; void solve(int _ti) { int n, k, x; cin >> n >> k >> x; if (k == 1 and x == 1) { cout << "NO" << '\n'; return; } if (k == 2 and x == 1 and n % 2) { cout << "NO" << '\n'; return; } vector<int> ans; if (x != 1...
ALGO
0.999911
4.469575
{ "github_metadata": { "branch": "master", "commit_count": 883, "repo_created_at": "2022-11-17T08:09:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56f9a9e1...
61f87cc9-c261-4b2f-a966-6ea8454a5dac
ishandutta2007/codeforces-i
imeimi/normal/1148/C.cpp
#include <iostream> #include <algorithm> #include <vector> #define fs first #define se second using namespace std; typedef long long llong; typedef pair<int, int> pii; int n; int P[300001]; int R[300001]; vector<pii> ans; void change(int i, int j) { ans.emplace_back(i, j); swap(R[P[i]], R[P[j]]); swap(P[...
ALGO
0.999874
3.619556
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "480b193444bf...
b47800be-42df-4eba-8520-1cd2d6789cfa
captainys/public
src/ysbitmaputil/src/ysbitmapcontour.cpp
/* //////////////////////////////////////////////////////////// File Name: ysbitmapcontour.cpp Copyright (c) 2017 <NAME>. All rights reserved. http://www.ysflight.com Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Re...
ALGO
0.984963
4.441133
{ "github_metadata": { "branch": "master", "commit_count": 527, "repo_created_at": "2018-12-18T22:09:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 10, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "bd3c14...
44afe980-f885-48eb-9a02-5906530be697
anuragbansall/DSA-CPP
Day03-Conditional-Statements/02-Else-If.cpp
#include <iostream> using namespace std; int main() { // Income Tax Calculation: cout << "Income Tax Calculation:" << endl; float income, tax; cout << "Enter your income(in lakhs): "; cin >> income; if (income < 5) { tax = income * 0; cout << "Your tax is: 0%" << endl; ...
ALGO
0.999255
3.067034
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2025-01-01T17:39:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd411c6bc7e...
2b005a6f-6f9f-4097-b944-410006721371
WPIRoboticsEngineering/RBE3001_nucleo_firmware
src/drivers/MyPid.cpp
#include "MyPid.h" #include "Clock.h" // Parameterized class constructor PIDimp::PIDimp(Servo * myServo, AS5050 * myEncoder, AnalogIn * myLoadCell ) { servo = myServo; encoder = myEncoder; loadCell = myLoadCell; runningTotalIndex=0; runningTotal=0; for (int i=0;i<SENSOR_SUM;i++) runningValues[i]=0; ...
ALGO
0.911218
5.746923
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2017-06-02T15:30:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 20, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91953117...
93a6ba41-aac2-475a-ad35-69cef2df0a31
dotslash21/450-dsa-solutions
string/min_operations.cpp
/** * @file min_operations.cpp * @author <NAME> (<EMAIL>) * @brief https://www.geeksforgeeks.org/transform-one-string-to-another-using-minimum-number-of-given-operation/ * @version 0.1 * @date 2020-12-14 * * @copyright Copyright (c) 2020 * */ #include <bits/stdc++.h> using namespace std; int minOperations(...
ALGO
0.999993
5.478186
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2020-11-06T08:47: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": "583e26299b...
24afed33-44f4-4622-8663-6dba57ea510f
hmazhar/physbam_public
PhysBAM_Rendering/PhysBAM_Ray_Tracing/Rendering_Shaders/SUBSURFACE_SCATTERING_SAMPLED_IRRADIANCE.cpp
#ifndef COMPILE_WITHOUT_DYADIC_SUPPORT //##################################################################### // Copyright 2004-2006, <NAME>, <NAME>, <NAME>, <NAME>. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //###############...
ALGO
0.963563
6.340829
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2014-04-02T21:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 13, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "c5b1de7...
4f845308-78d6-4fed-a629-0edc9aea8e4d
north-h/Match_code
2023/Codeforces Round 762 (Div. 3)(vp)/E.cpp
/* * ===================================== * Author : north_h * Time : 2023-08-21 10:10:09 * Problem : cf-762-E * ===================================== * _ _ _ * _ __ ___ _ __| |_| |__ | |__ * | '_ \ / _ \| '__| __| '_ \ | '_ \ * | | | | (_) | | | |_| | | | | | | | * ...
ALGO
0.999799
4.194859
{ "github_metadata": { "branch": "main", "commit_count": 555, "repo_created_at": "2023-08-20T03:53:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35f6e3499b...
a2e7a7b3-31cf-47c4-ac3c-d33648603f5d
gagolews/aipp
zrodla/sortowanie_wyszukiwanie/insertion_sort.cpp
#include <iostream> using namespace std; void zamien(int& x, int& y) { int t = x; x = y; y = t; } int main() { // ... int n = 5; int* t[n] = new int[n]; t[0] = 5; t[1] = 3; t[2] = 2; t[3] = 1; t[4] = 4; // ... for (int i=1; i<n; ++i) { // znajdz najwieksze j ze zbioru...
ALGO
0.999978
4.284787
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-10-07T05:39:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "336e9eb75...
096ac193-c8e2-4214-a1e8-37a7c5bd0925
sayed-amin/practice
Code chef/basic graph theory I/more_segment.cpp
#include <bits/stdc++.h> using namespace std; bool cmp(pair<int, int> &a, pair<int, int> &b) { return a.first < b.first; } void solve() { int n; cin >> n; map<int, vector<pair<int, int>>> m; for (int i = 0; i < n; i++) { int l, r, v; cin >> l >> r >> v; m[v].push_back({l...
ALGO
0.999918
4.734445
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2022-06-23T23: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": "37f260b6b...
3ef22c97-97a1-479f-b9fe-427ab3b03ad2
Arkashish/SDE-Sheet
boundaryordertraversal.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class TreeNode { public: T data; TreeNode<T> *left; TreeNode<T> *right; TreeNode(T data) { this->data = data; left = NULL; right = NULL; } ~TreeNode() { if (left) delete left...
ALGO
0.999984
5.253309
{ "github_metadata": { "branch": "master", "commit_count": 190, "repo_created_at": "2023-06-10T14:08: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": "5e98ee6e...
b7540cb9-067a-49a1-85f9-208dba1cf486
k-ye/OpenCourses
MIT/6.837/1/src/main.cpp
#include <cmath> #include <iostream> #include <cstdlib> #include <fstream> #include <vector> #include <vecmath.h> #include "parse.h" #include "curve.h" #include "surf.h" #include "extra.h" #include "camera.h" using namespace std; // If you're really interested in what "namespace" means, see // Stroustup. But basic...
TOOL
0.902177
5.253134
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2017-08-11T04:34:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 10, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8f68c8...
72421066-5772-40df-a4c8-5b9b34dc2090
Goldob/signal-filtration
src/cli.cpp
#define READ_INPUT(var, desc, cond, err) while(true) { \ wcout << desc << ": "; \ cin >> var; \ if (cond) break; \ cout << err << endl; \ } #define EMPTY_STR "" #define DESC_IN_FILENAME "Sciezka pliku wejsciowego" #define DESC_OUT_FILENAME "Sciezka pliku wyjsciowego" #define DESC_FILTER_TYPE "Rodzaj f...
TOOL
0.955198
4.750994
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2017-09-05T12:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb66df37d...
386d89c5-4f50-450a-8b87-a7eaba54f0f4
chamow97/Competitive-Coding
codeforces/minimum number of steps.cpp
//template by chamow #include<bits/stdc++.h> /*-------------------------------------------------------- */ using namespace std; /*-------------------------------------------------------- */ #define rep(i,val,n) for(ll i=val;i<n;i++) #define per(j,val,n) for(ll j=val;j>=n;j--) #define pb push_back #define pi 3.14157 #...
ALGO
0.999841
3.473498
{ "github_metadata": { "branch": "master", "commit_count": 206, "repo_created_at": "2017-01-01T05:20:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "308d13f9...
06d09659-e354-47eb-9337-2ad021e0c371
ASSERT-KTH/Supersonic
predictions/submissions-aizu-cot-gpt4/Codenet/p01720/642618837/response_7.cpp
#include <cstdio> #include <queue> #include <vector> #define INF (1 << 23) using namespace std; int main() { ios_base::sync_with_stdio(false); int N, M, s, t, u, v; scanf("%d %d %d %d", &N, &M, &s, &t); s--; t--; vector<vector<int>> G(N); G.reserve(N); for (int i = 0; i < M; i++) { scanf("%d %d", &u, ...
ALGO
0.999885
3.725799
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-02-03T10:33:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82954d1cab480...
2de3fd83-8259-4d17-ac3e-fd3877cd707d
ishandutta2007/codeforces-h
heart_blue/normal/1119/C.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.999987
4.234946
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "72683eff71ec...
22f761c1-ae52-4da7-8087-734fdb0f7352
mikastiv/ft_containers-terminator
tests/tests/set/lower_bound.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* lower_bound.cpp :+: :+: :+: ...
TEST
0.99001
5.681826
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2022-05-08T23:14:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ec6f167f...
cf7469b8-ea1f-4e46-887b-08254852a7cd
thanhtungpfiev/ClassicalAlgorithm
ClassicalAlgorithm/HashTable/1074. Number Of Submatrices That Sum To Target/main.cpp
/* * File: main.cpp * Project: NumberOfSubmatricesThatSumToTarget * File Created: Monday, 18th July 2022 9:11:37 am * Author: tung.dao (<EMAIL>) * ----- */ #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int numSubmatrixSumTarget(vector<vector<int>> &...
ALGO
0.999984
6.203824
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2022-03-22T10:33:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e52ea5d8e1d...
5cb3fcfd-29cf-44ac-bfdd-65c8afc7cdd9
scil-vital/tractoracle_irt
tractoracle_irt/algorithms/shared/disc_cumsum.cpp
#include <torch/extension.h> #include <iostream> torch::Tensor disc_cumsum(const torch::Tensor& input, double gamma) { // Input is of size (n_trajectories, n_steps) // For each point in a trajectory, we need to compute the discounted sum of the future rewards. // Output should be of size (n_trajectories...
ALGO
0.979181
6.843738
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2025-06-25T20:32:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9bd43a61342a...
b4322805-4993-4a0e-88b1-8a7ba400cab7
CJHMPower/Fetch_Leetcode
data/Submission/406 Queue Reconstruction by Height/Queue Reconstruction by Height_1.cpp
//-*- coding:utf-8 -*- // Generated by the Fetch-Leetcode project on the Github // https://github.com/CJHMPower/Fetch-Leetcode/ // 406 Queue Reconstruction by Height // https://leetcode.com//problems/queue-reconstruction-by-height/description/ // Fetched at 2018-07-24 // Submitted 1 year, 9 months ago // Runtime: 589 ...
ALGO
0.999993
5.858514
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-07-26T14:30:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "660300ea33...
44198949-2396-456e-9843-b861acb2fffd
elsudano/Universidad
02Segundo/Sistemas_Concurrentes_Distribuidos_SCD/Practica_3/src/ProductorConsumidor_1-1.cpp
/* * ProductorConsumidor.cpp * * Created on: 09/01/2014 * Author: <NAME> */ #include <stdlib.h> #include <iostream> #include <math.h> #include <mpi.h> using namespace std; #define Productor 0 #define Buffer 1 #define Consumidor 2 #define ITERS 20 #define TAM 5 void productor() { for (unsigned int i = 0; ...
ALGO
0.969336
4.423583
{ "github_metadata": { "branch": "FACULTAD", "commit_count": 245, "repo_created_at": "2014-01-20T18:10:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba47f2...
6afde56a-691e-4057-9ad6-3d5873eccb06
nicolasSaid/CourseSchedulingDegreeSystem
sch_main.cpp
#include <stdlib.h> #include <iostream> #include <unordered_map> #include "sch_check.cpp" #include <fstream> using namespace std; int main(int argc, char *argv[]){ if(argc != 3){ cout<<"Incorrect number of parameters"<<endl; return 0; } string s(argv[1]); string t(argv[2]); if(setu...
ALGO
0.99775
3.9568
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-10-11T15:26:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21c230393230...
df8e67e4-e9cf-42bc-9175-b0cdbe41a854
Zheg-al/another_100_plus_leetcode_solutions
55. Jump Game(Greedy).cpp
class Solution { public: bool canJump(vector<int>& nums) { int availableMoves = 0; for (int i = 0; i < (int)nums.size() - 1; ++i) { --availableMoves; if (nums[i] > availableMoves) { availableMoves = nums[i]; } if (availableMoves <= 0) {...
ALGO
0.999877
5.43644
{ "github_metadata": { "branch": "master", "commit_count": 138, "repo_created_at": "2020-06-22T18:00: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": "dad81fea...
66e641ba-ffa1-481c-93f9-a0ed3ae461fa
ddj231/algorithmic-solutions
set9/part/test.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int min_max_sum(vector<int> & a, int K) { int n = a.size(); long long high = 0, low = 0, mid = 0; for (int i = 0; i < n; ++i) { high += a[i]; low = max((long long) a[i], low); } while(low...
ALGO
0.999884
4.021321
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-03-20T01:12: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": "324e0e5ff9...
d11d6308-874f-4bba-b352-47a2a54acd9c
zhuli19901106/leetcode-zhuli
algorithms/0001-0500/0316_remove-duplicate-letters_1_AC.cpp
// medium // https://discuss.leetcode.com/topic/74326/c-solution-using-counting-sort-o-n // I feel it's greedy, but I can't write down a clean solution. #include <string> #include <vector> using std::string; using std::vector; class Solution { public: string removeDuplicateLetters(string s) { static const ...
ALGO
0.999959
6.104423
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2016-12-03T04:46:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 557, "forks": 157, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cce9...
5ddbf04e-c56e-42b2-a0d8-5ed8ca08b0d4
twi05/DSA-September
SEARCHING Algo/BinarySearchDSAKunal/BinarySearchQuestions/5_GFG_wrongSolution'.cpp
#include <iostream> using namespace std; int position(int arr[], int target) { static int s = 0; static int e = 1; int mid = (s + e) / 2; while (s <= e) { if (arr[mid] > target) { e = mid - 1; } else if (arr[mid] < target) { s = mid + ...
ALGO
0.999685
4.615244
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-01-16T03:59: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": "ec6e712928...
dfbe65c1-ac60-4bdd-a118-1e93a8d4be80
anmolsahu2k/DSA
Binary Trees/20. construct_from_inorder_preorder.cpp
// { Driver Code Starts // #include<bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; Node(int x){ data = x; left = NULL; right = NULL; } }; void printPostOrder(Node *root) { if(root==NULL) return; printPostOrder(root->left); printPostOrder...
ALGO
0.999998
6.151045
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2022-04-14T07:45:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc888445a...
2859f33f-c745-4fde-8ecf-c72fc4927929
thiagowfx/graph-library-2013
Teoria dos Grafos/relatorio3-cotasuperior.cpp
#include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <utility> #include "Graph.h" #include "InputHandler.h" #include "Utilities.h" #include <boost/progress.hpp> using namespace std; #define GRAFO_ATUAL g_100k_0_mod const char g_10_0[] = "inputs/G_10_0.txt"; const char g...
ALGO
0.994892
3.155359
{ "github_metadata": { "branch": "master", "commit_count": 158, "repo_created_at": "2024-04-12T16:55: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": "add3c005...
fc2fe18c-636f-4072-9872-f8ef7337f3b5
alpha74/iLC
E/Element_Appearing_More_than_25%_in_Sorted_Array.cpp
// Find element appearing more than 25% in sorted array // https://leetcode.com/problems/element-appearing-more-than-25-in-sorted-array/ // <NAME> // Runtime 6ms Beats92.41%of users with C++ // Memory 12.90MB Beats57.06%of users with C++ int findSpecialInteger(vector<int>& arr) { int count = 0 ; int maxCount ...
ALGO
0.999903
5.54687
{ "github_metadata": { "branch": "main", "commit_count": 860, "repo_created_at": "2021-10-24T17:42:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17befdb6b6...
44e82b78-7fd3-484e-b816-8b2b35ea8b15
LavAngel/forexam
main.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, char* argv[]) { string iname, oname; if (argc = 1) { cin >> iname; cin >> oname; } else { iname = argv[1]; oname = argv[2]; } ifstream fin(iname, ifstream::in); ofstream fout(oname, ofstream::out | ofstrea...
ALGO
0.999791
3.258244
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-07-02T09:27: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": "fb44484b37c5...
884ab2eb-baf6-4009-b2d3-0623d9406258
XiaoXiaoLui/CodeForces
Round367/C.cpp
#include <iostream> #include <cstdio> #include <vector> #include <set> #include <map> #include <algorithm> #include <string> #include <cmath> #include <cstring> #include <queue> using namespace std; #define pii pair<int, int> #define mp make_pair<int, int> typedef long long ll; const ll LINF = 1e18; const int N = ...
ALGO
0.999967
3.331204
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-10-13T16:21: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": "c66b44babf...
336e126b-8803-4cce-8067-7bd582bad4ad
ankitdeb11/myDSAjourney100PlusDaysOfCode
CPP practice/Sorting/bubbleSort.cpp
#include<iostream> #include<bits/stdc++.h> #include<vector> using namespace std; void bubbleSort(vector<int> &arr, int n){ for(int i=1; i<n; i++){ //for round 1 to n-1 bool swapped = false; for(int j=0; j < n; j++){ //process elements till n-i th index if(arr[j]...
ALGO
0.999946
5.503165
{ "github_metadata": { "branch": "main", "commit_count": 156, "repo_created_at": "2023-02-10T17:34:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae3a79790f...
586fd05e-d3ec-4be5-8dd5-427fd301da39
Akshaj-Padmakar/Atcoder-Solutions
Topics/AC-DP-contest/D.cpp
#include <bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include "algo/debug.h" #define debug(x...) cerr << "[" << #x << "] = ["; _print(x) #else #define debug(x...) #endif #define int long long /* Notes: *> dp[i][j] = stores the max value gained for this config scanned first i books with exa...
ALGO
0.999985
4.196449
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-05-19T10:30: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": "4743b6a1b25...
6f0cc9fc-e284-4faf-80ae-8b522c8a71b8
raae7742/BOJ-C
Gold/9935.cpp
#include <iostream> #include <string> #include <stack> using namespace std; int n, m; void init() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); } int main() { init(); string input, bomb, answer = ""; cin >> input; cin >> bomb; for (int i = 0; i < input.length(); i++) { ...
ALGO
0.999945
4.199991
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2021-05-07T03:38: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": "572ceec857...
5cab27d1-7d3d-409f-aac6-b02115e87af0
lee-honey/CodingTest-Study
08주차/N으로 표현/kyeongsoo.cpp
//1. DP 및 BFS - 실패 //음수의 결과값을 dp로 저장하지 못함 #include <string> #include <vector> #include <cmath> #include <queue> #include <iostream> const int MAX = 100000000; using namespace std; int solution(int N, int number) { int answer = 0; int dp[MAX]; fill_n(dp, MAX, 9); queue<int> q; int k = N; for(in...
ALGO
0.999939
3.918308
{ "github_metadata": { "branch": "master", "commit_count": 471, "repo_created_at": "2023-05-19T06:10:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8b97d04...
8db376c0-a785-434b-b7f0-2eef72e3f17e
wrf-model/WRF
var/da/da_radiance/da_get_innov_vector_crtmk.inc
subroutine da_get_innov_vector_crtmk ( it, grid, ob, iv ) !--------------------------------------------------------------------------- ! PURPOSE: Calculate innovation vector for radiance data. ! ! METHOD: d = y - H(x) ! 1. interpolate grid%xb to obs location ! 2. call foreward RTM to g...
ALGO
0.998865
3.323077
{ "github_metadata": { "branch": "master", "commit_count": 6746, "repo_created_at": "2016-08-16T20:39:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1417, "forks": 765, "issues": 161, "pull_requests": 21 }, "file_meta": { "content_id": "...
5a43dd54-0c46-4f16-af5a-4ae7545264d6
Deadrohan19/CP-Solutions
CodeForces/1780A.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; #define F first #define S second #define pb push_back #define INF LLONG_MAX #define MOD 1000000007 #define dbg(x) cout << x << "\n"; #define deadman ios_base::sync_with_stdio(fa...
ALGO
0.999871
3.670647
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2021-09-20T08:09:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ede4b465229...
e84cb4f2-4bee-4d4a-a5cf-51bafbd29685
yyggzz/CSCI2270
content/13/code/MaxHeap.hpp
#include <iostream> #include <limits.h> using namespace std; // --------------------------------- <NODE:beg> -------------------------------- class Node { public: string name; int key; }; // bool Node::operator < (Node const &p, Node const &q) { return p.key < q.key; } // bool Node::operator == (Node con...
ALGO
0.9955
4.827284
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-04-24T17:00: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": "6ba373325...
b9b4eedd-3aa3-42a9-9b08-d7fe8148551c
marc-rigter/plan-risk-expected-value
src/models/dirichlet_distribution.cpp
#include <iostream> #include <cmath> #include <string> #include <random> #include <unordered_map> #include <algorithm> #include "state.h" #include "belief.h" #include "utils.h" #include "dirichlet_distribution.h" #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <gsl/gsl_blas.h> DirichletDistribution::Di...
ALGO
0.999568
5.920498
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-05-02T09:01:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbb61ec539eb...
a577b32e-8041-4b8c-9af9-f4f3417abd9f
hitwlh/leetcode
363_Max_Sum_of_Rectangle_No_Larger_Than_K/solution1.cpp
class Solution { public: int maxSumSubmatrix(vector<vector<int>>& matrix, int k) { if(matrix.empty() || matrix[0].empty()) return 0; sum = matrix; for(int i = 0; i < matrix.size(); i++) for(int j = 1; j < matrix[i].size(); j++) sum[i][j] += sum[i][j-1]; fo...
ALGO
0.999953
5.907232
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-03-28T12:27: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": "503408e267...
293b382a-3fd5-4560-99ca-e6b61ff30648
liuzibo1019/Algorithm
LuoGu/动态规划1_动态规划的引入/P2196_挖地雷.cpp
#include <bits/stdc++.h> using namespace std; int bomb[25]; int path[25][25]; long dp[25]; int rever[25]; int output[25]; int main() { int N; cin >> N; for (int i = 1; i <= N; i++) { cin >> bomb[i]; dp[i] = bomb[i]; } for (int i = 1; i <= N; i++) { for (int j = i + ...
ALGO
0.999975
3.371511
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2023-09-23T06:48:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8256a405a68...
16fd8166-59c4-4921-a80f-9e48020923a2
Te-Rex-1/DSA_RPac
Sorting/sorting_que.cpp
#include <iostream> //#include <vector> using namespace std; int first_occur(int arr[], int key, int size) { int start = 0; int end = size - 1; int mid; int store_ans = -1; while (start <= end) { mid = start + (end - start) / 2; if (arr[mid] == key) { store_a...
ALGO
0.999974
4.842685
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-17T17:08: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": "11529118a103...
070c449a-16a2-4498-a08e-83f4352bc459
mikehelmick/teaching
uc/computerScience2/fall2013/liveDemos/week09/test/knights/knights/knights-faster.cpp
/* * knights.cpp * <NAME> * * Solves a knights-tour problem. * * Your program should have better function descriptions, outlining input and output * types and meanings. I ignore them here for readability on the projected screen. * * This faster version prevents revisiting boards that look the same and the kn...
ALGO
0.99949
4.97878
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-03-27T15:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05b732b98...
0e0edba2-7e20-4557-bcc4-50b0152c067b
zplzmzmpl/fisher-bayes_classifier_based_on_images
pattern_recognition/bayes.cpp
//基本步骤: //1、输入类数, 特征数, 待分样本数 //2、输入训练样本数和训练样本集 //3、计算先验概率 //4、计算各类条件概率密度 //5、计算各类的后验概率 //6.1、若按最小错误率原则分类, 则根据后验概率判定 //6.2、若按最小风险原则分类, 则计算各样本属于各类时的风险并判定 #include<iostream> #include<fstream> #include<sstream> #include<cmath> #include<cstdio> #include<opencv2/opencv.hpp> using namespace std; const int MAXN = 100; const d...
DATA
0.970138
4.671822
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-03-08T12:51: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": "a69c41b210c...
22615e92-e4ec-4273-9bb8-4b291de1e360
zalivochkin/leetcode
longest-nice-substring/main.cpp
class Solution { public: inline bool isNice(const string s, const int start, const int end, const int delta) const { unordered_set<char> uppers; unordered_set<char> lowers; for (auto i = start; i <= end; ++i) { auto ch = s[i]; if (ch < 'a') { uppers.i...
ALGO
0.999886
5.859945
{ "github_metadata": { "branch": "main", "commit_count": 307, "repo_created_at": "2024-11-16T14:34: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": "b6265e34cf...
5c64f2fd-85bb-4cc7-9f82-4044611fc07a
destinyson7/All-Codes
AtCoder/ABC052C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define pb push_back #define mp make_pair #define ff first #define ss second #define all(a) a.begin(), a.end() #define sz(a) (ll)(a.size()) #define endl "\n" const ll L = 1e5+5; vector <ll> prime(L); vector <ll> factors(L); void sieve() { ...
ALGO
0.999994
5.187842
{ "github_metadata": { "branch": "master", "commit_count": 213, "repo_created_at": "2019-12-02T11:53: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": "5111feea...
b619ed32-9225-4ac1-bb1e-76281d0a1f89
code-fans/books-source
数据结构/第7章 树状数组/7.13弱对/weak.cpp
#include <bits/stdc++.h> #define pb push_back typedef long long ll; const int N = 2e5 + 7; const ll inf = LONG_MAX; using namespace std; struct edge { int e,nxt; } E[N]; int h[N], cc; void adde(int u,int v) { E[cc].e=v; E[cc].nxt=h[u]; h[u]=cc; ++cc; } int n, rt, in[N]; ll k, a[N]; vector<ll> v; int num; ll B...
ALGO
0.999706
3.132688
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-08-24T10:16:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69a0b0ce9e81e...
e855b02a-3cb6-43b7-b02a-034f1da85502
CS-parth/CodeForces
F/F_Chat_Screenshots.cpp
/*<NAME>*/ /*<NAME>*/ /*Hare krishna hare krishna krishna krishna hare hare hare rama hare rama rama hare hare*/ #include<bits/stdc++.h> using namespace std; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define MOD 1000000007 #define INF 1e18 #define set_bits __builtin_popcountll #de...
ALGO
0.999935
4.556389
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2023-10-14T17:32:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1e5d5192...
9354f8bb-75f5-43c7-8f19-fbdb2a088c35
phitronio/XPSC_Batch_05
Module_9_Binary_Search - 2/Maximum Median.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, k; cin >> n >> k; vector<int> a(n); for (int i = 0;i < n;i++) { cin >> a[i]; } auto ok = [&](int median) { long long cnt = 0; for (int i = (n / 2);i < n;i++) { ...
ALGO
0.999997
4.817023
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-10-26T11:59:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d946f815d74...
ece987df-c034-407f-97eb-7beefc16e233
ishandutta2007/codeforces-u
umqra/normal/120/D.cpp
#include<iostream> #include<string> #include<algorithm> using namespace std; int mas[100][100]; int vert[100], gor[100]; int a, b, c; bool check ( int f, int s, int t ) { if ( f==a ) { if ( (s==b&&t==c)||(s==c&&t==b) ) return true; return false; } if ( s==a ) { i...
ALGO
0.999802
3.527951
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28b89311c139...
fc4cf946-8ad0-4d0a-bcc8-fc7f13065afe
BlackRaven007/TheGenoaStockMarketModel
theGenoaStockMarketModel/mathsFunc.h
#pragma once #ifndef MATHSFUNC_H #define MATHSFUNC_H #include <random> #include <iostream> static bool distSetup = false; static bool setup = false; static bool debug = false; template<typename Type> // Calculates the Standard Deviation of an array double calculateSD(Type* data, double lengthOfArray) { double s...
TOOL
0.954784
5.141876
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-07-30T18:15: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": "ca05434791...
15ec03ac-4a6d-4ac2-94ed-ec3ed0bb59e0
lydrainbowcat/tedukuri
配套光盘/例题/0x00 基本算法/0x06 倍增/Genius ACM/CH0601 Genius ACM.cpp
//Author:XuHt #include <cstdio> #include <iostream> #include <algorithm> #define ll long long using namespace std; const int N = 500006; int n, m, w; ll k, a[N], b[N], c[N]; void gb(int l, int mid, int r) { int i = l, j = mid + 1; for (int k = l; k <= r; k++) if (j > r || (i <= mid && b[i] <= b[j])) c[k] = b[i++];...
ALGO
0.999925
3.616015
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2018-03-18T01:24:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2487, "forks": 607, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "f3...
71cbb789-0865-4b01-b282-6f556621959f
dlnnlsn/codeforces
round_910/a.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; while (t--) { int n, k; cin >> n >> k; string s; cin >> s; int num_b = 0; int last_b = -1; for (int i = 0; i < n; i++) { char c = s[i]; if (c == 'B') { num_b...
ALGO
0.999849
3.41872
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2022-03-25T10:43: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": "c38404b4b66...
43e34643-9635-454b-aa3b-3a470019579a
Aastik-Mehta-22/BinaryTrees_CPP
Traversals/PreorderTraversal.cpp
#include<bits/stdc++.h> using namespace std; 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), left(left), right...
ALGO
0.999999
6.785672
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-12-08T13:07: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": "0c88bf00101...
589af9ae-06a5-4f77-9ef6-7ff90ae2fbe8
Rakwon/Problem.Solving
geeksforgeeks/knapsack_problem.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <vector> #include <iostream> using namespace std; int d[101][101]; int max(int a ,int b){ return a > b ? a : b; } void clear(){ for(int i = 0; i<101; ++i) for(int j = 0; j<101; ++j) d[i][j] = -1; } int Knapsack(int i, int left, vector<int> &wt, v...
ALGO
0.999971
3.633804
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-10-04T11:22: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": "4de248636...
7f8f8324-e877-45b6-aaeb-77c5bee71baa
BinomialSheep/CompetitiveC--
SandBox/MetaHackerCup2022/Rd1/A2_.cpp
#include <bits/stdc++.h> // デバッグ用マクロ:https://naskya.net/post/0002/ #ifdef LOCAL #include <debug_print.hpp> #define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else #define debug(...) (static_cast<void>(0)) #endif using namespace std; using ll = long long; using vi = vector<int>; using vl = vector<lo...
ALGO
0.999932
4.958473
{ "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": "31710fd25...
e82c98da-c599-4b36-b863-adc0f8db32ed
anugoyal998/parteek-narang-cp
GraphTheoryCodeNCode/DiameterTree.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define loop(i,st,n) for(int i=st;i<n;i++) #define nline cout<<endl; #define mod 1000000007 #define maxN 1000001 #define ff first #define ss second #define pb push_back #define vi vector<int> #define vvi vector<vi> #define print_arr(arr) for(auto i:a...
ALGO
0.999179
3.223772
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-01-15T16:32: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": "7c8e25458304...
ca8bf1bf-3568-4ddb-b2cb-987eafabd36a
tjwoinosk/swim_annotator
rtSwimTracker/src/sortTrackerPipelined.cpp
#include "sortTrackerPipelined.h" #include "HungarianAlgorithm.h" sortTrackerPiplelined::sortTrackerPiplelined() { KalmanTracker::kf_count = 0; // tracking id relies on this, so we have to reset it in each seq. m_numberFramesProcessed = 0; } /* This function will take trackers and data for a single frame (frame num...
ALGO
0.998951
4.97205
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2019-05-30T19:23:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "915c9000...
5f6706a1-3dbb-4eec-a5d0-24598f8a84f4
rsamantha/minerva
src/mine_int.cpp
#include <RcppArmadilloExtensions/sample.h> #include <Rcpp.h> #include <limits> #include <map> #include "mine.h" #include "mine_int.h" /* DEFINE CONSTANT MAPS FOR MEASURE AND EST */ //const std::map<std::string, int> MEASURE=create_measure_map(); //({{"mic", 1}, {"mas", 2}, {"mev", 3}, {"mcn", 4}, {"tic", 5}, {"gmic",...
ALGO
0.994212
5.330849
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2013-08-09T08:40:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "9017d6a...
12437672-1367-4a11-949c-46b2ac2b3440
bqi343/cp-notebook
Contests/Other Solutions/UCF HSPT/2017/UCF HSPT 17 - unite.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistic...
ALGO
0.99754
4.817242
{ "github_metadata": { "branch": "master", "commit_count": 1350, "repo_created_at": "2017-07-11T03:52:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2642, "forks": 429, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "3d...
b8bac9bf-11c9-4fa3-b6bf-8e3dad42ca4f
TNishimoto/lazy_attractor
lib/greedy/greedy_attractor.cpp
#include <iostream> #include <string> #include <memory> #include <map> #include <limits> #include <algorithm> #include <queue> #include "stool/include/print.hpp" #include "esaxx/include/minimal_substrings/minimal_substring_iterator.hpp" #include "../include/greedy/position_frequency_set.hpp" //#include <unordered_set...
ALGO
0.99998
5.074833
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2019-02-04T05:43:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cdd938a5f...
3767c9f8-6a7e-4ad2-a650-c51acc2d3118
raincross7/code-similarity
codes/train_code/problem188/problem188_237.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fi first #define se second #define INF (1LL << 55) #define MOD (1000 * 1000 * 1000 + 7) #define maxn 200111 typedef long long ll; typedef long double ld; char str[maxn]; int dp[1 << 26]; int num[maxn]; int pre[maxn]; in...
ALGO
0.999973
3.401045
{ "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": "f9c3873a0d13...
3bd78b75-7505-4f82-9d80-bd2817bee8ec
WiseCow/algorithm
BOJ/페리카 최대 최소.cpp
#include <iostream> using namespace std; int main() { int nCount; /* 문제의 테스트 케이스 */ cin >> nCount; /* 테스트 케이스 입력 */ for (int itr = 0; itr<nCount; itr++) { cout << "#testcase" << (itr + 1) << endl; char arr[2][100000] = { 0, }; char res[4][100000] = { 0, }; cin >> arr[0] >> arr[1]; int a, b; fo...
ALGO
0.999631
3.975631
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-09-21T06:41:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce9deb6833...
b4511f72-c9e7-46f9-8d0a-794b8deecfdc
ishandutta2007/codeforces-s
somuchdrama/normal/736/B.cpp
#include <bits/stdc++.h> using std::cerr; using std::cin; using std::cout; using std::abs; using std::min; using std::max; using std::swap; using std::map; using std::pair; using std::set; using std::string; using std::vector; using ll = long long; using uint = unsigned int; using pii = pair<int, int>; using pll = ...
ALGO
0.999948
3.572285
{ "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": "9b12162339e7...
a0931164-a95c-4823-9448-6c3258c79a71
JazibEqbal/DSA-using-CPP
Tree/IterativeTree.cpp
#include <iostream> using namespace std; struct Node { struct Node *lchild; int data; struct Node *rchild; } *root = NULL; struct Queue { int size; int front, rear; Node **Q; }; struct Stack { int size; int top; struct Node **stack; }; void createStack(struct Stack *st, int size)...
ALGO
0.999958
4.437356
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-06-26T18:48: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": "cf40e2c860...
5da7815b-a272-4612-a6fc-fe313fdd6ef7
Mamba413/bess
python/src/screening.cpp
// #define R_BUILD #ifdef R_BUILD #include <Rcpp.h> #include <RcppEigen.h> using namespace Rcpp; // [[Rcpp::depends(RcppEigen)]] #else #include <Eigen/Eigen> #include "List.h" #endif #include <algorithm> #include <vector> #include <cmath> #include "screening.h" #include "logistic.h" #include "poisson.h" #include "cox...
ALGO
0.998756
5.693768
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2019-08-12T07:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 2, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "36b7352...
2d343d00-9424-4f1b-9dc8-d3f973414d60
andyyhchen/cp-codes
misc/Disjoint Set.cpp
#include <iostream> #define Max 30000 using namespace std; void Initial(int *Group) { int i; for(i = 0; i < Max; i++) Group[i] = i; } void Union(int a, int b, int *Group) { int x = Group[a], y = Group[b]; if(Group[a] == Group[b]) return; for(int i = 0; i < Max; i++) if(Group[i] == y) Group[i] = x; } int Find...
ALGO
0.999933
4.14281
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-07-19T08:21:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b6cf34a17...
76cdb789-6b16-4a03-a081-c3a44ebe5c4b
jijik/hillside
web/cpp.cpp
#include <iterator> #include <iostream> #include <fstream> #include <algorithm> #include <sstream> #include <vector> #include <string> class CSVRow { public: std::string const& operator[](std::size_t index) const { return m_data[index]; } std::size_t size() const { return m_data.size(); } void readNextRow(s...
DATA
0.996389
5.164651
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-11-27T21:17: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": "8da7ea7d3...
44314a43-c453-4720-95ba-254e8833ae4f
vivek-n/hacker-rank-solutions
Algorithms/Implementation/non-divisible-subset.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; //TODO: able to pass 11/15 test case; pass other test cases too int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ long long n, k; cin >> n >> k; vecto...
ALGO
0.999816
3.615913
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2016-11-10T09:03: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": "36f4c19d...
d5c967e9-f9dc-4b23-80b9-9eb41b121c5f
valevaty98/HTTP-server
example/example/main.cpp
#ifdef __linux__ /*Header Files*/ #include <cstdlib> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include<iostream> #include<sstream> #include<fstream> #include<csignal> using namespace std; int sockfd, newsockfd; /*Function for d...
WEB
0.910377
3.677787
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-06-14T08:44: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": "62e5f3fcb7...
ca0bd5bb-5c2a-421f-bb18-27205195d663
SzyJ/CSC3223_Basic_Shaders
Common/Matrix2.h
#pragma once #include "Vector2.h" #include <assert.h> namespace NCL { namespace Maths { class Matrix2 { public: Matrix2(void); Matrix2(float elements[4]); ~Matrix2(void); void ToZero(); void ToIdentity(); void SetRow(unsigned int row, const Vector2 &val) { assert(row < 2); int start =...
TOOL
0.9071
6.439604
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-11-20T10:40:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eaff33960e...
4fb273fe-2cc8-473f-9a72-b2792047ad3a
Brown-LEMS/GRNG
src/SparseMatrix/SparseMatrix/search-sparse-matrix.cpp
/* Copyright 2019, Brown University, Providence, RI. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose other than its incorporation into a commercial product or service is hereby granted without fee, provided that the above co...
ALGO
0.999705
6.236286
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-09T21:12:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3861a991c631...
91d4ab37-d234-4548-a276-8fdffd64a241
luiscanoi/AD_AlgoritmosAvanzados
ActInt2/main.cpp
/* Actividad Integradora 2 Escrito por <NAME> y <NAME> para el curso de Programacion de Estructuras de Datos y Algoritmos Fundamentales Matriculas: A01610324 A00827178 Fecha de creacion: 04/10/2021 Fecha de actualizacion: 14/11/2021 Lenguaje: C++11 main.cpp */ #include <iostream> #include <fstream> #i...
ALGO
0.999692
4.092566
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-01-07T17:49: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": "86d27cc84eb1...
a6fe7c3a-d0dd-4817-bcdf-c0891c909c93
MatTwix/Yandex-Algo
homeworks/3/j/j.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <cstdint> using namespace std; vector<int> marshal(const string& text) { unordered_map<string, int> dict; int dictSize = 256; for (int i = 0; i < 256; ++i) { dict[string(1, char(i))] = i; } string current = ""; v...
ALGO
0.984918
4.388085
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2025-04-09T15:53: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": "ad7fcfef74c...
359046b1-27f7-460a-9137-2a031b38461b
ftiasch/problem-setting-public
2017-sichuan/sum-of-quad/slow.cpp
#include <cstdio> #include <vector> const int MOD = (int)1e9 + 7; int main() { int n; while (scanf("%d", &n) == 1) { std::vector<int> a(n); for (int i = 0; i < n; ++ i) { scanf("%d", &a.at(i)); } int result = 0; for (int i = 0; i < n; ++ i) { for...
ALGO
0.999943
3.714918
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-08-15T12:29:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e467777b...
2dade7ac-e121-40b4-bd5b-d7fac62011d9
kushkumarkashyap7280/DSA
day_078/remove_duplicates_from_unordered_linked_list.cpp
// Remove duplicates from an unsorted linked list // https://www.geeksforgeeks.org/problems/remove-duplicates-from-an-unsorted-linked-list/1 /* Given an unsorted linked list. The task is to remove duplicate elements from this unsorted Linked List. When a value appears in multiple nodes, the node which appeared first ...
ALGO
0.99998
6.584972
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2025-05-01T16:22: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": "6fbfa9f7cc...
75f395f6-5237-464a-8c5d-87ee04fc6c35
Insax/AoC
Day 1/main.cpp
#include <iostream> #include <vector> #include "Module.h" #include "Rocket.h" int main() { std::vector<long> input; input.push_back(54032); input.push_back(64433); input.push_back(71758); input.push_back(133884); input.push_back(76994); input.push_back(99596); input.push_back(90491); ...
ALGO
0.999075
4.503706
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-12-10T18: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": "c21c62e954...
b4a2ff10-c30e-4c87-af3d-fd6381261ab8
yjqiang/pat
A/1134/main_1.cpp
#define _CRT_SECURE_NO_WARNINGS #include <vector> #include <algorithm> #include <cstdio> #include <cstring> #include <string> #include <iostream> #include <map> #include <cmath> #include <climits> #include <queue> #include <set> #include <unordered_set> #include <unordered_map> using namespace std; #define N_MAX 1000...
ALGO
0.999964
4.022087
{ "github_metadata": { "branch": "master", "commit_count": 339, "repo_created_at": "2020-02-23T23:28: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": "fb958167...
cbe707db-7a12-4c7c-a1dd-86d297f0f8cf
icyrhyme/zoj
1992.cpp
#include <iostream> #include <cstdio> #include <cstring> #define MAXN 256 #define MAXE 3000 #define INF 1000000000 using namespace std; class Dinic { int n, m, src, dst, head[MAXN], work[MAXN], d[MAXN]; struct edge { int v, f, c, nxt; edge() {} edge(int v, int f, int c, int nxt): v(v), f(f), c(c), nxt(nxt) {} ...
ALGO
0.999948
3.862426
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2012-11-28T08:02:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c68afa1fa0...
1e6edfae-5ff7-45e0-85f8-803f9e57d6e5
sybila/NewBioDiVinE
tool/ltl2ba/DBA_graph.hh
/* * class for representation of (semi)deterministic Buchi automaton * - implementation of methods * * <NAME> - <EMAIL> * */ #ifndef DIVINE_DBA_GRAPH #define DIVINE_DBA_GRAPH #ifndef DOXYGEN_PROCESSING #include "KS_BA_graph.hh" #inclu...
ALGO
0.997585
4.026198
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2014-08-27T16:32:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aaa4d4a1be...
cb490d0b-d81f-4d0f-8ebd-b0a1261f8776
Rajeevan2002/DSA
Linked List/CopywithRandomNextPointersatLL.cpp
/* // Definition for a Node. class Node { public: int val; Node* next; Node* random; Node(int _val) { val = _val; next = NULL; random = NULL; } }; */ class Solution { public: Node* copyRandomList(Node* head) { Node* iter=head; Node* temp=head; ...
ALGO
0.999624
5.359876
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2022-06-06T06:12:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e64456d2326...
f732a8b0-54af-4184-ab2b-e6a78c2029f4
luucasv/Competitive-Programming
practice/summerschool/contest2/e.cpp
#include <bits/stdc++.h> #define fr(a, b, c) for(int a = b, __ = c; a < __; ++a) using namespace std; typedef long long ll; const int ms = 50*20 + 100, sigma = 2*26 + 10, mod = int(1e6) + 3; struct node{ int adj[26], fail; ll mask; void init(){ memset(adj, -1, sizeof adj); mask = 0; fail = 0; } }; node tr...
ALGO
0.999827
3.956809
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2016-12-31T00:52:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d3d63f70...
b497421a-c7a5-4303-8039-e3326262d5ed
hanyas/trajopt
trajopt/rgps/src/util.cpp
#define ARMA_DONT_PRINT_ERRORS #include <pybind11/pybind11.h> #include <pybind11/numpy.h> #include <armadillo> namespace py = pybind11; using namespace arma; typedef py::array_t<double, py::array::f_style | py::array::forcecast> array_tf; typedef py::array_t<double, py::array::c_style | py::array::forcecast> array...
ALGO
0.947683
6.226894
{ "github_metadata": { "branch": "master", "commit_count": 206, "repo_created_at": "2019-06-17T09:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 16, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "dfc7ab...
347f5e27-d1ba-4c38-b213-6585eced419e
ry3s/atcoder
ICPC/domestic2017/a.cpp
#include <cstdio> #include <climits> #include <cassert> #include <iostream> #include <string> #include <vector> #include <algorithm> #include <queue> #include <deque> #include <stack> #include <map> #include <list> #include <set> #include <bitset> #include <iterator> #define rep(i, n) for(long long i = 0; i < (long lon...
ALGO
0.999926
4.432145
{ "github_metadata": { "branch": "master", "commit_count": 158, "repo_created_at": "2019-05-09T15:41:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05d76e3e...
d01db21c-4aa3-4010-9a5b-0726fcff223a
heesootory/TIL_algorithm
수학(구현)/백준_1614_영식이의 손가락/영식이의 손가락.cpp
#include <iostream> using namespace std; int main() { long long sick_finger, can_count; scanf("%lld", &sick_finger); scanf("%lld", &can_count); long long num_count = 0; if (can_count == 0) { for (int i = 1; i < sick_finger; i++) { num_count++; } } ...
ALGO
0.999926
3.168563
{ "github_metadata": { "branch": "main", "commit_count": 652, "repo_created_at": "2022-04-04T11:46:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d2e91beb6...
c268a5f5-6109-4445-8b57-b229401f302a
graphcore/tensorflow
tensorflow/compiler/tf2xla/kernels/xla_reduce_op.cc
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. 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 a...
TOOL
0.968823
7.796907
{ "github_metadata": { "branch": "r2.6/sdk-release-3.4", "commit_count": 120828, "repo_created_at": "2018-12-21T13:30:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 78, "forks": 13, "issues": 0, "pull_requests": 5 }, "file_meta": { "cont...
47808939-ec23-4cc5-8ad4-91e8f9171e20
organicmaps/organicmaps
routing/leaps_graph.hpp
#pragma once #include "routing/base/astar_graph.hpp" #include "routing/base/astar_vertex_data.hpp" #include "routing/mwm_hierarchy_handler.hpp" #include "routing/route_weight.hpp" #include "routing/segment.hpp" #include "geometry/latlon.hpp" #include <vector> namespace routing { class IndexGraphStarter; class Leap...
ALGO
0.974097
6.218554
{ "github_metadata": { "branch": "master", "commit_count": 42613, "repo_created_at": "2020-12-27T19:02:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11487, "forks": 1128, "issues": 2796, "pull_requests": 182 }, "file_meta": { "content_i...
6baaddc8-31b1-4944-a080-e88fb31724b5
shrinish123/AZ201-
Module3/Graphs/2Topo/Prob/1.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define endl '\n' int n,m; vector<vector<int>> g; vector<int> indeg; vector<int> topo; // fo lexocographical just se priority queue void kahn(){ priority_queue<int> q; for(int i=1;i<=n;i++){ if(indeg[i]== 0){ q.push(-i); ...
ALGO
0.999985
4.559661
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-07-30T08:58: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": "27e9c59dcecc...
b7a5f98c-b371-4a31-b182-9663f146ef89
avnoor-488/Striver-SDE-Sheet
Day-1/Pascal's-Triangle.cpp
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define fi first #define sec second #define forT(t) for(int i=0;i<t;i++) #define forN(n) for(int j=0;j<n;j++) #define MOD 1000000007 #define all(cont) cont.begin(), cont.end() #define vll vector<ll> #define pll pair<ll, ll> typede...
ALGO
0.999979
3.406792
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2022-04-14T17:44: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": "084ffe34cc3...
70846f0b-687e-428d-a9ee-344f5a23ee9e
ealionel/advent-of-code-2022
4/solution.cpp
#include <iostream> #include <string> #include <unordered_map> #include <vector> using namespace std; bool are_range_containing(pair<int, int> range1, pair<int, int> range2) { if (range1.first >= range2.first && range1.second <= range2.second) { return true; } if (range2.first >= range1.first && ...
ALGO
0.999817
4.623696
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-12-04T15:39:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa947cdf66...