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
ab8d181d-762e-4e50-a257-1451c441be2e
MohamadAshrafSalama/User-Stories-generation
Code_Snippets/121-130/s096451794.cpp
#include <iostream> #include <iomanip> #include <algorithm> #include <numeric> #include <cmath> #include <vector> #include <list> #include <stack> #include <queue> #include <deque> #include <set> #include <map> #include <tuple> #include <cstring> #include <functional> using namespace std; typedef long long ll; typedef ...
ALGO
0.999842
3.770587
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-06-04T17:01: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": "9b82c20e68ef...
f4c51b78-af88-46c8-ab05-f4346cd6c8a7
nibblerenush/Courses
Stepik/Программирование на языке C++/5.2 - Правила переопределения операторов/Задача 5/main.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; struct String { struct Helper { Helper(const char...
TOOL
0.988733
3.216439
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-04-10T11:34:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7963787cda5...
2687ba1e-dbb9-4f9c-9013-59b30049978f
qowlz/codetree-TILs
231205/선두를 지켜라/keep-the-lead.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; const int MAX = 1000 * 1000 + 1; int totalTime = 0; vector<int> a(MAX, 0); for (int i = 0; i < n; i++) { int v, t; cin >> v >> t; for (int j = 0; j < t; j++) {...
ALGO
0.999954
3.464263
{ "github_metadata": { "branch": "main", "commit_count": 549, "repo_created_at": "2023-11-28T13:21: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": "2d5d011297...
e1f3ab06-39c4-41c7-8e93-db1906126f41
jianglab/motioncorr
src/SP++3/include/huffmancode.h
/* * Copyright (c) 2008-2011 <NAME> (<NAME>), <EMAIL> * * 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 or any later version. * * Redistribution and use in source and bin...
ALGO
0.982082
4.838479
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2015-07-24T20:50:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "077d734ba...
0b6fc544-c2e7-4fce-85a2-1b8d260cc9b6
TH-takahirohara/atcoder_solve
seisen100/077_joi_2010_honsen_1_tabibito.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define rep(i,a,b) for(int i=a;i<b;i++) #define fore(i,a) for(auto &i:a) const int MAX = 1000000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1]...
ALGO
0.999974
4.05231
{ "github_metadata": { "branch": "main", "commit_count": 671, "repo_created_at": "2022-02-26T13:48: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": "c46e043e1a...
5a91ac15-9076-409e-b4d0-435891335534
error-loading/Competitive-Programming
Dmoj/CCO '12/P2 - The Hungary Games.cpp
// https://dmoj.ca/problem/cco12p2 // CCO '12 P2 - The Hungary Games /******** All Required Header Files ********/ #include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <queue> #include <deque> #include <bitset> #include <iterator> #include <list> #include <stack> #...
ALGO
0.999933
3.984646
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2022-12-29T21:07: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": "3922696fce3...
2bba9409-5831-42bd-be02-c9e77268adb4
gbernstein/gbdes
src/subs/PhotoMatch.cpp
// Photometric matching and fitting classes. #include "PhotoMatch.h" #include <list> using std::list; #include <set> using std::set; #include "StringStuff.h" #include <fstream> #include "AstronomicalConstants.h" #include <algorithm> #include "Stopwatch.h" #ifdef _OPENMP #include <omp.h> #endif // #define DEBUG #incl...
ALGO
0.942628
5.946287
{ "github_metadata": { "branch": "master", "commit_count": 400, "repo_created_at": "2016-05-19T21:21:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db5c475f...
b4e030a0-2e1d-4123-a358-291b64eeff87
hungryjayy/algorithm
BOJ/Union Find/boj10775.cpp
#include <iostream> using namespace std; /* union find 알고리즘. 자기 자신을 가리키면 root임. 핵심은 재귀를 통해 부모의 부모(가장 첫 root)를 가리키도록 갱신한다. 처음에 갱신하는 부분이 이해가 잘 안됐었는데 생각보다 간단한거같다? 재귀부분을 다시 한번 살펴봐야 할 듯하다. */ #define MAX 100001 int g, p; int parent[MAX]; int getParent(int x) { if (parent[x] == x) return x; return parent[x] = getP...
ALGO
0.999801
3.8454
{ "github_metadata": { "branch": "master", "commit_count": 117, "repo_created_at": "2019-04-12T08:18: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": "65043fe6...
f39b4bf6-e5d1-4a29-8f1d-c046ee419927
Mtaylorr/Competitive-programming-Solutions
Bitsmasking/Codeforces_1215_E.cpp
//https://codeforces.com/contest/1215/problem/E #include <bits/stdc++.h> #define pb push_back #define fi first #define se second typedef long long ll; using namespace std; const int N = (1<<20) +5; const int MOD = 998244353 ; int n,a[N]; ll b[22][22]; int f[22]; ll cnt[22]; ll dp[N]; int msk = (1<<20) -1 ; int po...
ALGO
0.999685
3.75045
{ "github_metadata": { "branch": "main", "commit_count": 1208, "repo_created_at": "2021-07-28T20:32:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afe2129f...
600e8038-b29a-4759-89b6-57c38d355b29
spaghetti-source/algorithm
numeric/ODE_dormand_prince.cc
// // Dormand-Prince ODE solver // // Description: // It numerically solves an ordinary differential equation // dx/dt = f(t, x) // // Algorithm: // Dormand and Prince's adaptive step-size Runge-Kutta, // which is used in Matlab as "ode45" function. // This performs 4th and 5th-order Runge-Kutta methods //...
ALGO
0.999976
5.372026
{ "github_metadata": { "branch": "master", "commit_count": 448, "repo_created_at": "2013-01-15T08:18:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 792, "forks": 160, "issues": 2, "pull_requests": 16 }, "file_meta": { "content_id": "fc9...
06ee6311-dbfc-4a1d-8bff-981df6044680
SHY-Corp/LeetCode-Solutions
C++/146. LRUCache.cpp
/* Problem : Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class: LRUCache(int capacity) Initialize the LRU cache with positive size capacity. int get(int key) Return the value of the key if the key exists, otherwise return -1. void put(i...
ALGO
0.999314
6.732921
{ "github_metadata": { "branch": "master", "commit_count": 1745, "repo_created_at": "2020-09-21T15:16:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 245, "forks": 536, "issues": 21, "pull_requests": 2 }, "file_meta": { "content_id": "7e5...
010a9a53-b8e6-43aa-980a-a0fb6faa55da
amndan/ohm_pf
lib_ohm_pf/obsolete/LaserProbMapMethod.h
/* * LaserProbMapMethod.h * * Created on: 11.03.2016 * Author: amndan */ #ifndef SRC_LASERPROBMAPMETHOD_H_ #define SRC_LASERPROBMAPMETHOD_H_ #include "ILaserQuantifier.h" #include "IMap.h" #include "ILaserMeasurement.h" #include "Filter.h" #include "UtilitiesOhmPf.h" #include "Eigen/Dense" namespace ohmPf...
ALGO
0.980067
6.262345
{ "github_metadata": { "branch": "master", "commit_count": 205, "repo_created_at": "2015-11-11T07:22:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ec2fe1d...
96c79800-9319-42ee-8bc1-75af4a7c79c3
AdnanGhannam2001/LeetCode75
problems/bit-manipulation/minimum-flips-to-make-a-or-b-equal-to-c.cpp
/** * Problem: * LeetCode 75 -> Bit Manipulation * 1318. Minimum Flips to Make a OR b Equal to c (Medium) * https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equal-to-c/description/?envType=study-plan-v2&envId=leetcode-75 * * Solution: * https://leetcode.com/problems/minimum-flips-to-make-a-or-b-equ...
ALGO
0.999792
6.11917
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-18T18:59: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": "40ed9c344cf0...
f9722948-342a-4861-a9f6-993a27451794
willstudy/Job
nowcoder/Offer/quick_sort.cpp
int partition(int data[], int length, int start, int end) { if (data == NULL || length <= 0 || start < 0 || end < 0) { throw new Exception("Invaild Parameters"); } int index = RandomInRange(start, end); Swap(&data[index], &data[end]); int small = start - 1; for (index = start; index < ...
ALGO
0.999906
4.739833
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-07-10T05:37:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb9b797ed5...
d93d2df8-f0c7-4d50-b932-73504ff6ca4d
Ficcol/Code-Design-Data-Structures
DataStructures/include/DataStructures/HashTable.hpp
/* * * AIE Code Design & Data Structures * Data Structures * Lewis Comstive (s210314) * * See the LICENSE file in the root directory of project for copyright information. * */ #pragma once #include <vector> #include <iostream> #include <functional> namespace LCDS // Lewis Comstive's Data Structures { // Key-V...
TOOL
0.922765
6.241283
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-05-28T10:38: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": "3b5552ef7f4...
d135f446-d1b8-4d1a-a60c-54317541e34e
ns-vasilev/challenges
LeetCode/153. Find Minimum in Rotated Sorted Array/solution.cpp
/* 153. Find Minimum in Rotated Sorted Array Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might become: [4,5,6,7,0,1,2] if it was rotated 4 times. [0,1,2,4,5,6,7] if it was rotated 7 times. Notice that rotating an array [a[0], ...
ALGO
0.999998
6.374443
{ "github_metadata": { "branch": "master", "commit_count": 865, "repo_created_at": "2018-07-30T11:30:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6196f358...
cfb93212-41af-48ad-959d-56d3b87185a0
jschueths/Project_Euler
src/problem49/problem49.cpp
// Author: jschueths // Description: Problem 49 of the Euler Project (projecteuler.net/problems) #include <iostream> #include <string> #include <algorithm> #include "./libraries/timer.h" #include "./libraries/algorithms.h" using namespace std; unsigned long long int my_atoi(string x); int main() { Timer my_t...
ALGO
0.999652
5.031414
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2012-02-03T18:59:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d059323d...
9fd63ca1-dd7a-4b55-b5e3-179b6f69be0c
Sekakou/OIsrc
algorithm/bisection/1314quality_supervisor.cpp
#include <bits/stdc++.h> #define int long long using namespace std; const int N = 2e5 + 10; int n, m, w[N], v[N]; int nsum[N], vsum[N], l[N], r[N]; int check(int W) { memset(nsum, 0, sizeof(nsum)), memset(vsum, 0, sizeof(vsum)); for (int i = 1; i <= n; i++) nsum[i] = nsum[i - 1] + (w[i] >= W), vsum[i]...
ALGO
0.99985
4.968989
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2023-01-17T01:23:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9e61722...
01a85884-e60f-41da-88e0-8070c18df8bc
eduardorasgado/CppZerotoAdvance2018
intermediate/vectoresyMatrices/matricesTranspuesta.cpp
#include <iostream> using namespace std; int main(){ // calculo de transpuesta int filas, columnas; cout << "Las filas de tu matriz: " << endl, cin >> filas; cout << "Las columnas de tu matriz: " << endl, cin >> columnas; int matriz[filas][columnas]; int matrizTranspuesta[columnas][filas]; // pidiendo los va...
ALGO
0.998265
4.870322
{ "github_metadata": { "branch": "master", "commit_count": 365, "repo_created_at": "2018-09-02T20:40:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f5fc9e8...
fa855379-65fd-4803-af64-552bfd116b9e
SanskarKansal/Code
CP/B_Numbers_Box.cpp
#include<bits/stdc++.h> using namespace std; #define fastIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); // Modular Exponentiation (a^b % mod) long long modPow(long long base, long long exp, long long mod) { long long result = 1; while (exp > 0) { if (exp % 2 == 1) result = (result * base) % mod;...
ALGO
0.999975
4.378913
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-12-18T07:24: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": "10c875c1518...
610b7d8b-82d3-4909-8ea1-3c01c3a1f41b
raincross7/code-similarity
codes/train_code/problem222/problem222_16.cpp
#include<iostream> using namespace std; int main() { int n,t[4][3][10],b,f,r,v; for (int a = 0;a < 4;a++){ for (int b = 0; b < 3; b++){ for (int c = 0; c < 10; c++){ t[a][b][c] = 0; } } } cin >> n; for (int i = 0; i < n; i++) { cin >> b >> f >> r >> v; int x, y, z; x = b - 1; y = f - 1; z...
ALGO
0.998059
3.276765
{ "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": "3836300ec3d0...
b5dc6864-16d7-4c3a-81dc-4d057b2791c1
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/03/0328/personal_submission/cf891a_WanderOvO.cpp
int n, a[N], st[N][13], lg[N]; int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); } int query(int l, int r) { int k = lg[r - l + 1]; return gcd(st[l][k], st[r - (1 << k) + 1][k]); } void solve1() { cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; st[i][0] = a[i]; ...
ALGO
0.999872
3.534125
{ "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": "7354...
24430bdc-3898-4d4d-bcef-0940e5899ff9
tauprojects/final
src/main.cpp
#define DEFAULT_FILE "spcbir.config" #include "SPImageProc.h" #include <cstdlib> #include <cstdio> #include <cstring> extern "C" { #include "main_aux.h" #include "SPBPriorityQueue.h" #include "SPLogger.h" #include "SPPoint.h" #include "SPListElement.h" #include "KDTree.h" } using namespace sp; int main(int argc, ch...
TOOL
0.953791
4.189314
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2016-07-23T07:16:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "278f5a2e4...
06f9b2a3-0a72-41bc-bfdd-1330bfb05f46
DaEunKim/111Coding
5622다이얼/5622다이얼/main.cpp
// // main.cpp // 5622다이얼 // // Created by 김다은 on 2017. 4. 21.. // Copyright © 2017년 김다은. All rights reserved. // #include <iostream> #include <string> using namespace std; int main(void){ string s; cin >> s; char c[15]={0, }; for(int i = 0;i<s.size();i++){ c[i] = s.at(i); } i...
ALGO
0.988903
3.409989
{ "github_metadata": { "branch": "master", "commit_count": 203, "repo_created_at": "2017-01-12T03:37: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": "28b5c0ab...
9d9c269b-72b6-44dc-aed4-0d0481733baf
Jogirajuvvsl/RSAImplementation_CPP
RSA_Implementation.cpp
#include <iostream> //we used string functions so we need to add string library #include<string> // stdlib has the random function so we added it #include<stdlib.h> //created prime function to verify if the random generated numbers are prime or not int prime(int x); using namespace std; //inpowerexponenet is to find va...
ALGO
0.999838
3.817428
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-09-20T03:15:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd20ac4b92...
e91dc680-9fc2-4103-893e-bc62c8f79b02
phanthaiduong22/problems
caeserciper/caeserciper.cpp
#include <iostream> #include <string> using namespace std; int main() { freopen("caeserciper.inp", "r", stdin); freopen("caeserciper.out", "w", stdout); int n, k; string s; cin >> n >> s >> k; k = k % 26; for (int i = 0; i < n; i++) { if (s[i] >= 'a' && s[i] <= 'z') { ...
ALGO
0.999855
3.950992
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-07-09T13:58: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": "2f3307542...
5edb44e7-2fd2-4ca9-8d1b-985c46ab610b
peshe/FMI-SDP-2024
Практикум/Компютърни науки/A група/Week 5/solutions/task6.cpp
#include <iostream> #include <vector> #include <queue> using std::vector; #define boolMatrix vector<vector<bool>> struct Coordinate { size_t x, y; bool operator==(Coordinate other) { return x == other.x && y == other.y; }; }; struct Direction { int x, y; } directions[4]{{1, 0}, {-1, 0}, {0, 1}, {0, -1}};...
ALGO
0.999371
4.657462
{ "github_metadata": { "branch": "main", "commit_count": 292, "repo_created_at": "2024-10-01T11:40:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e557e350...
17a8453f-c73a-4eff-96cb-46e62d905072
matiego1/sio2
Mały preOI (23-24)/sze.cpp
#include <iostream> #include <vector> #include <map> using namespace std; typedef long long ll; const ll MAX_A = 10ll * 1000 * 1000 * 1000; const int sqrt_MAX_A = 100 * 1000; const int MAX = 2153; //ile x, ze 1 <= x ** 3 <= 10 ** 10 map<ll, int> mapa; bool sito[MAX + 1]; vector<int> pierwsze; vector<int> pierwsze2; v...
ALGO
0.9999
4.16325
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2024-02-18T09:50:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee6c4a62d0...
8942f58f-696b-4768-835c-b37c7485d5e6
Kitware/VTK
Filters/Geometry/vtkProjectSphereFilter.h
// SPDX-FileCopyrightText: Copyright (c) <NAME>, <NAME>, <NAME> // SPDX-License-Identifier: BSD-3-Clause /** * @class vtkProjectSphereFilter * @brief A filter to 'unroll' a sphere. The * unroll longitude is -180. * * */ #ifndef vtkProjectSphereFilter_h #define vtkProjectSphereFilter_h #include "vtkFiltersG...
TOOL
0.908103
7.404263
{ "github_metadata": { "branch": "master", "commit_count": 94968, "repo_created_at": "2010-04-27T15:12:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2910, "forks": 1246, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f...
15acb3e3-8666-4cd6-b558-c2fd96b6509a
LisM65/Tutoriales-C-
main.cpp
#include <iostream> #include <conio.h> #include <stdlib.h> using namespace std; struct Nodo{ int dato; Nodo *der; Nodo *izq; }; /*********PROTOTIPOS*********/ void menu(); Nodo *crearNodo(int); void insertarNodo(Nodo *&,int); void mostrarArbol(Nodo *,int); //bool busqueda(Nodo *, int); Nodo *arbol = NULL...
ALGO
0.999798
3.790646
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-21T23: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": "e2b5851ac89e...
148beb02-bf1a-4d0d-a4df-2e0b4ca10280
corwinnn/Algorithms-DataStructures
Graphs/Dinic/main.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; bool bfs(vector<vector<int>> &g, vector<int> &vertices) { vertices.resize(0); int n = g.size(); int v = 0, w; queue<int> q; vector<bool> used(n, false); vector<int> parents(n, -1); q.push(v); ...
ALGO
0.999956
4.547671
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-12-12T19:15: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": "6554ba0ecd...
9ae12396-0273-4cf6-a205-3f0288e65bca
eusuntoly/BSc
Algorithms and Data Structures/Tema 5/7/main.cpp
#include <cstdio> using namespace std; struct nod{ int x; nod *next; } *first[100], *last[100]; int n, k; bool empty(nod *Q){ return Q == NULL ? true : false; } void push(int a, int t){ if(empty(first[t])){ first[t] = new nod; first[t]->x = a; first[t]->next = NULL; last[...
ALGO
0.999985
3.129445
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2018-04-12T20:09:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "fc24c4e12...
1973bb6b-ba7a-48c3-a833-7bd2958e297f
xiami2019/LeetCode
总题库/10_RegularExpressionMatching.cpp
/* 正则表达式匹配: 方法1:回溯 想法:如果没有星号(正则表达式中的*),问题会很简单——我们只需要从左到右检查匹配串s是否能匹配模式串p的每一个字符 当模式串中有星号时,我们需要检查匹配串s中的不同后缀,以判断它们是否能匹配模式串剩余的部分。一个直观的解法就是用 回溯的方法来体现这种关系。 */ class Solution { public: bool isMatch(string s, string p) { int index_s = 0; //s的索引; int index_p = 0; //p的索引; while (index_s < s.length()){...
ALGO
0.999553
4.459235
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2020-02-11T04:29:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04acbb79b...
0a20b5f1-ef51-40e0-8948-77d63956665e
kaibader/CaSSiS
src/lib/minipt/findex.cpp
/*! * MiniPT Search Index Library * * This is a functionally reduced version of the ARB PT-Server. * It was specially adapted for CaSSiS. (faster; less memory consumption) * * Modified by <NAME> <<EMAIL>> * * Original source: PT_findEx.cxx * Institute of Microbiology (Technical University Munich) * http://www...
ALGO
0.972653
5.822941
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2015-04-10T11:55: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": "378e94f9...
2fee2783-4469-4107-b72f-d45ab3d5d7c8
usdot-jpo-codehub/MMITSS_AZ_FIELD
RSE/MMITSS_MRP_PedRequestServer/src/ReqEntryListHandle.cpp
#include <ReqEntryListHandle.h> //----- ReqListUpdateFlag=1: ADD a new request //----- ReqListUpdateFlag=2: UPDATED request (changing the speed, joining the queue, leaving the queue) //----- ReqListUpdateFlag=3: DELETE an obsolete request //----- ReqListUpdateFlag=4: CANCEL a request due to leaving interse...
ALGO
0.935922
4.37113
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2015-07-21T14:45:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33b7de48acd...
807d4793-99a3-4e91-ae53-a60d92452556
xKarnSinghx/ProblemSetSolution
ATC/Doubled.cpp
/*\ Time Limit: 2 sec / Memory Limit: 1024 MB Score : 300 points Problem Statement Given is an integer N . How many integers x between 1 and N (inclusive) satisfy the following condition? The decimal representation (without leading zeros) of x has an even number of digits, and its first and second halves ...
ALGO
0.999783
4.448233
{ "github_metadata": { "branch": "master", "commit_count": 1218, "repo_created_at": "2019-11-11T14:42:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f22ff7...
6c4f9025-af81-4789-bb8e-c098fb6a512c
ishandutta2007/codeforces-e
egor.lifar/normal/1439/A1.cpp
#include <iostream> #include <complex> #include <vector> #include <string> #include <algorithm> #include <cstdio> #include <numeric> #include <cstring> #include <ctime> #include <cstdlib> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <list> #include <cmath> #include <bitset> #...
ALGO
0.999977
3.141058
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "836b0b3c4da9...
61af2c87-4363-4a04-a93c-7ffeeb6d2a24
ishandutta2007/codeforces-f
fallac/normal/1593/D1.cpp
/* */ #include <bits/stdc++.h> #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") using namespace std; typedef long long ll; #define omode T=1 #define tmode cin>>T #define cmode(c) T=c #define bb ' ' #define ln '\n' #define Ln '\n' #define MAX 101010 #define MOD 10000000...
ALGO
0.999941
4.383846
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "6b1989b27ed9...
21015df6-84a0-4154-9c3f-9b111e968563
srferran/SC_2016
Practica2/main.cpp
#include <iostream> #include "CImg.h" #include <math.h> #include <time.h> #define BLOCK_SIZE 32 using namespace std; using namespace cimg_library; clock_t start; clock_t end; clock_t total; CImg<float> pattern_matching(CImg<unsigned char> &img, CImg<unsigned char> &pat); CImg<float> search(CImg<unsigned char> &ima...
ALGO
0.998641
4.207798
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2016-03-30T09:33: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": "7d92b68ce...
40944d6b-3707-4541-93ae-10f2cd2b3cdc
2019Shun/AtCoder
ABC/101_120/119/d_sample.cpp
#include <iostream> #include <vector> #include <queue> #include <cmath> #include <bitset> #include <algorithm> #include <set> #include <string> #include <queue> using namespace std; #define rep(i, n) for(int (i) = 0; (i) < (n); (i) ++) #define MAXINF 1e18L #define MININF -1e18L typedef long long ll; vector<pair<l...
ALGO
0.999926
4.129354
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-06-08T02:15: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": "8a9f8c132d...
33d258d9-85e0-48e9-8852-37cff9ee04ff
cvora23/CrackingCodingInterview
RecursionAndDynamicProgramming/RecursiveMultiply.cpp
/* * RecursiveMultiply.cpp * * Created on: Sep 12, 2017 * Author: chivora */ #include <iostream> #include <algorithm> // std::fill #include <map> using namespace std; /* * Recursive Multiply: Write a recursive function to multiply two positive integers without using the * multiply (*) operator (or / ...
ALGO
0.999975
5.993409
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2017-07-07T22:29: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": "fcc29922f...
917c70d2-d130-46a8-b37f-f203ccf89736
IvanIsCoding/CompetitiveProgramming
DMOJ/coci07c3p6.cpp
// <NAME> // Solution to https://dmoj.ca/problem/coci07c3p6 #include <cstdio> #include <vector> #define MAXN 250020 using namespace std; int arvore[3 * MAXN][10]; int lazy[3 * MAXN], vetor[MAXN], n, m; void build(int pos, int left, int right) { if (left == right) { arvore[pos][vetor[left]]++; return...
ALGO
0.999965
4.189297
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2018-04-30T13:58:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 85, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "759191...
e192e389-9e13-41e4-b36b-932fd3611ea4
wexaris/uni
algo2/gg/use.cpp
/******************************************* <NAME>, rv20039 GG – STL list un saistītais saraksts ar izņēmumsituāciju apstrādi un vienībtestēšanu**. * atrisināt uzdevumu G divos veidos: a) izmantojot dinamiskas datu struktūras (saistīto sarakstu vtml.), b) izmantojot STL::list konteineru. ** tas pats uzdevums, k...
TOOL
0.964416
6.30489
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-09-24T13:55: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": "843b65fc6...
254c079d-2dad-4df1-b2cd-e7a7e9844525
Rainy1502/Algoritma-Pemrograman
Task 4/FactorialNumber.cpp
/* namaTugas : Tugas ke 4 namaProgrammer : <NAME> / 23343037 kasus program : Menghitung nilai Faktorial dari bilangan n */ #include <stdio.h> int main() { char ulangi; int angka; do { int hasil = 1; printf("Menghitung nilai Faktorial\n"); printf("------------------------...
ALGO
0.9992
4.345038
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-12-09T14:18: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": "212a69bc37e...
29224abc-53fd-4cef-8a3e-8e0bd2c04c03
ChetanThorat18/LeetCode
Leetcode_Problems/0055-jump-game/0055-jump-game.cpp
class Solution { public: bool canJump(vector<int>& nums) { // Approach: Bottom-Up Dynamic Programming (Tabulation) // Initialize the size of the input array int n = nums.size(); // Create a DP table to store whether it's possible to reach each index vector<bool> dp(n , false...
ALGO
0.999994
6.656546
{ "github_metadata": { "branch": "main", "commit_count": 1404, "repo_created_at": "2024-01-25T16:43: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": "d5ce0c438...
73c1509e-181b-46e2-8fcb-bb24ab89e069
mpalesi/qcomm
communication.cpp
// ============================================================================= // Project: qcomm - Quantum Communication Simulator // File: communication.cpp // Description: Implementation of communication structures and related functions // Author: <NAME> <<EMAIL>> // License: Apache-2.0 license (see LICENSE file fo...
TOOL
0.942017
6.217449
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-01-12T13:57: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": "fe52abdc87c...
a2fcf5ae-8dc5-43a5-b89d-c0d1013d2413
takoyaki65/kyopro-code
atcoder/abc259/e.cpp
#include <algorithm> #include <cassert> #include <cstdio> #include <map> #include <utility> #include <vector> using namespace std; int main() { int n; scanf("%d", &n); vector<vector<pair<int, int>>> pes(n); for (int i = 0; i < n; ++i) { int m; scanf("%d", &m); for (int j = 0; j < m; ++j) { int...
ALGO
0.999237
3.570488
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2020-08-16T07:54: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": "a8439ab4...
ca7382de-8cbc-407e-be4c-8a3a30e34f49
lailaniii/Object-Oriented-Programming-C-Plus-Plus-.
lab9/search.cpp
#include <iostream> #include <vector> #include <fstream> #include <ctime> using namespace std; /** * @brief returns the first index of elem if it exists, otherwise returns -1 * iterativeSearch starts at the first index and iterates sequentially to the next until it either * finds the element or until it reaches th...
ALGO
0.998823
5.163431
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-02-05T04:28: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": "2a010689fea...
f0574646-e1c6-4783-a31e-5b087689df90
raincross7/code-similarity
codes/train_code/problem086/problem086_87.cpp
#include <bits/stdc++.h> #define REP(i,n) for (int i = 0; i < (n); ++i) template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;} template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;} using namespace std; using ll = long long; using P = pair<in...
ALGO
0.999995
3.45564
{ "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": "87a393ce219a...
525ffbaa-aed3-4879-b0a9-1f17ba566469
janumiko/Modern-CPP
traits_and_policies/vector_operators.hpp
#ifndef VECTOR_OPERATORS_HPP #define VECTOR_OPERATORS_HPP #include <iostream> template <int N> class Vector { int data[N]; public: Vector() { std::cout << " Default constr" << std::endl; } Vector(std::initializer_list<int> list) { std::cout << " Init list constr" << std::en...
TOOL
0.955941
6.529397
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2023-03-23T18:32: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": "6d7c1618760...
c76f7578-4f6d-46e6-82de-6a039ca1b97a
nagyistoce/fvision2010
modules/langutils/src/math_utils.cpp
#include <langutils/math_utils.h> #include <cmath> #include <cassert> #include <algorithm> using namespace std; namespace fvision { extern double PI = 3.1415926; double degreesToRadian(double degrees) { return degrees * PI / 180; } double radianToDegrees(double radian) { return radian * 180 / PI; } dou...
ALGO
0.973397
5.913964
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2015-04-13T21:29:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d29a55cd60...
cfa256fc-ef1e-4560-b62c-5849cbcfe8d4
Abhi-32/Competitive_Coding
Graph Theory/test.cpp
#include <bits/stdc++.h> using namespace std; struct tree { long long data; struct tree *left, *right; }; long long diameter; struct tree * Insert(struct tree * top, long long data) { if(top == NULL){ top = (struct tree *)malloc(sizeof(struct tree)); top->data = data; // top->left...
ALGO
0.999624
3.695252
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-04-01T19:14:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b691d0fef...
9cb6c4bf-34cd-4ea6-b26d-af00a58c007e
meghana-ganesh/Coding-Practice
LinkedList/DeleteKthNodeFromEnd.cc
/* Following is the class structure of the Node class: class Node { public: int data; Node *next; Node() { this->data = 0; next = NULL; } Node(int data) { this->data = data; this->next = NULL; } Node(int data, Node* next) { this->data = d...
ALGO
0.999905
4.903646
{ "github_metadata": { "branch": "main", "commit_count": 259, "repo_created_at": "2023-07-27T05:16:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65f4a04c8a...
b8d5c4c3-3f04-4be1-a812-f728e31e24f9
KYovchevski/Kartoshka-Engine
Kartoshka-Engine/VkHelpers.cpp
#include "VkHelpers.h" #include <fstream> #include <algorithm> void krt::ThrowIfFailed(enum VkResult a_Result) { a_Result; // Don't want these checks running in release, because they shouldn't be needed #ifdef _DEBUG if (a_Result != VK_SUCCESS) { printf("Vulkan error: %d", a_Result); ...
TOOL
0.912777
6.613459
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-05-30T12:10: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": "03deeebb6...
653b147e-430d-454e-a600-db56fcd2f3e5
liujiapeng678/AlgorithmPracticing
快速幂求组合数/9.14.cpp
// P是一个大于m和n的大质数 时间复杂度 O(nlogP) #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 100010, P = 1e9 + 7; LL q,f[N], g[N]; LL qmi(int a, int k) { LL res = 1; while (k) { if (k & 1)res = (LL)res * a % P; k >>= 1; a = (LL)a * a % P; } return res; } void init() { f[0] = g[0...
ALGO
0.999994
4.319239
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2024-06-11T14:55:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ffc7ae00...
8e75d9dd-034d-4ecb-8b1b-7e4bb23e6c15
81Vm3/codeforces
luogu/P1226.cpp
#include <bits/stdc++.h> using namespace std; #define mod (100001) #define ll long long #define x first #define y second typedef pair<int, int> P; long long binpow(long long a, long long b, long long p) { if (b == 0) return 1; long long res = binpow(a, b / 2, p); res = (res * res) % p; if (b % 2) { ...
ALGO
0.999891
5.026021
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2024-01-29T05:53:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1ec67bb7...
00d7280f-d836-4aea-81e7-021221518cad
campbio/celda
src/DecontX.cpp
#include <RcppEigen.h> #include <Rcpp.h> // [[Rcpp::depends(RcppEigen)]] using namespace Rcpp; // [[Rcpp::export]] Rcpp::List decontXEM(const Eigen::MappedSparseMatrix<double> &counts, const NumericVector &counts_colsums, const NumericVector &theta, const ...
ALGO
0.99148
5.443011
{ "github_metadata": { "branch": "master", "commit_count": 3898, "repo_created_at": "2018-11-21T22:01:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 149, "forks": 27, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "9ba6b...
2e9d472b-d4be-4f8b-8ff2-cf634dc33a02
merrymeerkat/ShortProblems
kattis/princess_peach.cpp
#include <iostream> #include <vector> using namespace std; int main(){ int N; int Y; // Read in total number of obstacles and number of obstacles Mario saw cin >> N >> Y; // Make list of obstacles vector<int> obstacles; obstacles.assign(N, 1); // Mark obstacles Mario saw int seen; ...
ALGO
0.999973
3.292545
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2020-03-29T00:49: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": "97930778...
38a0865d-edc3-4f25-82ab-53d2b3c2baaf
Esimseitm/ADS_2022
labs/lab2/b.cpp
#include <iostream> using namespace std; struct ListNode { string s; ListNode *next; ListNode *prev; ListNode(string s) { this->s = s; this->next = nullptr; this->prev = nullptr; } }; struct LinkedList { int size; ListNode *head; ListNode *tail; LinkedList() { this->size = 0; this->head = nullp...
ALGO
0.999902
4.018766
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-24T09:24: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": "d5c70dd1d588...
f361e177-246b-42a8-a757-4271d2ca23e1
InsightSoftwareConsortium/ITKApps
VolviewPlugIns/vvITKWatershedModule.cxx
/* This module encapsulates the full preprocessing required for applying the Watershed image filter for segmenting the volume. It requires seed points and the original image as inputs. */ #include "vvITKWatershedModule.txx" template <class InputPixelType> class WatershedModuleRunner { public: type...
TOOL
0.901541
4.365077
{ "github_metadata": { "branch": "master", "commit_count": 3586, "repo_created_at": "2013-09-20T14:07:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 24, "forks": 11, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "eff2ac...
1f75e479-f52f-4ea4-ab8e-38188a7df8a9
nitinkedia7/competitive-coding
codeforces/problemset/1237C2_1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1000000007; #define all(x) (x).begin(), (x).end() vector<tuple<int,int,int,int>> v; vector<int> gone; void handleXY(int l, int r) { int i = l; while (i < r) { int j = i; while (j < r && get<1> (v[i]) == get<1>...
ALGO
0.999985
4.30081
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-01-03T04:55: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": "d1b996c20...
1e4dcf62-f928-4ff4-970d-8b4589c36915
a136522541/-Offer
53_01_NumberOfk.cpp
#include<stdio.h> #include<iostream> int FindLeftEdge(int Array[], int First, int Last, int Num){ if(Array[First]==Num&&Array[Last]==Num){//如果First到Last都是Num,返回首或尾的下标即可 return First; } int Mid;// = (First + Last)/2; while(First <= Last){ Mid = (First + Last)/2; if(Array[Mid] >= Num) Last = Mid -...
ALGO
0.999797
4.163283
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-12-27T04:16: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": "d584f1eb46...
7971607c-eb54-4ce4-b39f-0e2b8dcce2f9
HUST-Smart/Alkaid-SDVRP
include/alkaidsd/solution.h
#pragma once #include <alkaidsd/instance.h> #include <ostream> #include <vector> namespace alkaidsd { /** * @brief The solution representation to a problem instance. */ class Solution { public: /** * @brief Calculate the objective value of the solution. * * @param instance The problem ...
ALGO
0.998184
6.606425
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-05-12T02:30:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f4b8680e8e6...
2384bdb2-37a0-42a6-b5ba-5a3c42b3a687
wolfis21/Biblioteca_Cpp
C++ Variado/examen ejercicio 2.cxx
// Se necesita tener una ventana muy ancha para ver el cuadro completo // Cuadro construido de manera Horizontalmente #include <iostream> #include <time.h> #include <stdlib.h> #include <iomanip> using namespace std; int main() { system("color 09"); srand(time(NULL)); int n=1+rand() % (21-1); int m=n; ...
ALGO
0.941849
3.23912
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-07-18T23:39: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": "553e4aae7a4e...
bc820329-417c-4b38-b9bd-93aa7a92055c
wycers/Codelib
ACM Training/2018-08-15 HDU多校第八场/1010.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> #include <cstring> #include <stack> #include <cctype> #include <queue> #include <string> #define lson rt << 1, l, mid #define rson rt << 1 | 1, mid + 1, r #define mst(x, y) memset(x, y, sizeof(x)) #define mcp(x, y) memcpy(x, ...
ALGO
0.99997
4.831524
{ "github_metadata": { "branch": "master", "commit_count": 570, "repo_created_at": "2018-08-05T01:44:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 1, "issues": 0, "pull_requests": 47 }, "file_meta": { "content_id": "aac538...
2d1369eb-5388-4eba-92e7-9bba43097e52
sachajoy/CompetitiveProgramming
Questions/CSES/Static_Range_Sum_Queries.cpp
#include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define ll long long #define int ll int n, q; vector<ll> arr, tree; void build(int start, int end, int idx) { if (start == end) { tree[idx] = arr[start]; return; } int mid = start + (end - start) / 2; build(start, m...
ALGO
0.999977
5.270963
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-09-18T01:59: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": "2e3fabf583...
d0491210-0dd7-4a58-b0b4-6de2a099873e
mxkopy/nfa-simulator
NFA.hh
#include <iostream> #include <vector> #include <map> #include <stack> #include <set> #include <algorithm> using namespace std; template <typename T> struct State { multimap<T, State*> transitions = {}; auto operator[](T c){ return transitions.equal_range(c); } void set_transition(T input, S...
ALGO
0.99985
4.405795
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-04-01T01:20:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8ad605152e8...
efb11b97-9e58-434b-a56c-7faf36ff2abd
Gabrielmc15/ED1
ListaListas/lista.cpp
#include <iostream> #include <stdlib.h> #include "lista.h" using namespace std; No *criarNo(int n){ No *ret = new No; ret->dado = n; ret->prox = NULL; return ret; } Lista *criar(){ Lista *ret = new Lista; ret->cab = NULL; ret->ult = ret->cab; ret->qtd = 0; return ret; } int add(Li...
ALGO
0.925046
4.698424
{ "github_metadata": { "branch": "ED1", "commit_count": 6, "repo_created_at": "2018-11-15T00:31: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": "5e7758e04a067...
5da301c7-5935-4124-be04-370a4f00c630
Pierpaolo-QuijadaGomez/Informatica
2020-2021/Compiti/Compito_03.cpp
#include <stdio.h> #include <stdlib.h> #include <conio.h> int main() { float num1; float num2; float num3; char choice; float Nmin; float Nmedio; float Nmax; printf ("Inserire il primo numero\n"); scanf ("%f", &num1); printf ("Inserie il seconod numero\n"); scanf ("%f", &...
ALGO
0.999913
3.232168
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-11-08T20:59:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5679d96155...
afecbaf5-8ca7-4894-96ce-6fc27bc5c134
Apress/modern-parallel-programming-cpp-assembly
Chapter12/Ch12_08/Ch12_08.cpp
//------------------------------------------------ // Ch12_08.cpp //------------------------------------------------ #include <iostream> #include <iomanip> #include "Ch12_08.h" static void CalcConeAreaVol(void); int main() { CalcConeAreaVol(); return 0; } static void CalcConeAreaVol(void) { ...
ALGO
0.927856
5.504127
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-12-07T14:08:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 65, "forks": 28, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "f32fe9e653...
6a614d4f-c2f0-4d2a-83b6-c872abe63ac2
shashank2232/DSA-PHASE-1
ARRAYS/Triplets.cpp
// TRIPLETS (Find all triplets equal to the given sum/target) #include<iostream> #include<vector> #include<algorithm> using namespace std; vector<vector<int> > triplets(vector<int> arr,int targetSum){ //Logic int n = arr.size(); sort(arr.begin(),arr.end()); vector<vector<int> > result; // to store all ...
ALGO
0.999786
5.19513
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-07-16T09:27: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": "65e46134365c...
b1402fdd-8b9f-4032-be2a-79c9507d3209
ut2310/codeforces
.vscode/TJ_IOI/B.cpp
using namespace std; #include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <map> #include <set> #include <queue> #include <string> #include <math.h> long long int maxSubArraySum(vector<long long int> a) { long long int max_so_far = a[0]; long long int curr_max = a[0]; for (in...
ALGO
0.999975
3.99596
{ "github_metadata": { "branch": "Utkarsh-Codeforces-Problems", "commit_count": 4, "repo_created_at": "2023-08-30T04:46:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "con...
a10842b6-ddb8-40c5-bc36-fe35ce980517
KUNAL1612/LeetCode-Solutions
0498-diagonal-traverse/0498-diagonal-traverse.cpp
// class Solution { // public: // vector<int> findDiagonalOrder(vector<vector<int>>& mat) { // } // }; // 1 2 3 // 4 5 6 // 7 8 9 // // all items on the same diagonal have the same x,y coordinate sums // // alternate diagonals have even/odd sums class Solution { p...
ALGO
0.999984
6.768548
{ "github_metadata": { "branch": "main", "commit_count": 1349, "repo_created_at": "2022-11-26T22:30: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": "6ee718c8c...
c4520b22-ed8e-42f7-bada-a70a0498b234
ifsmirnov/olymp
camps/ptz_winter14/day2/f/f.cpp
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <set> #include <map> #include <functional> #include <numeric> #include <set> #include <map> #include <cassert> #include <ctime> #include <cstdlib> using namespace std; #define forn(i, n) for (int i = 0; i < (int)(n); ++i) #define fore...
ALGO
0.999731
3.245709
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-11-06T00:13:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5612ffe3d...
02591e89-950b-45b8-ab2a-36af8b4b378d
wdndev/personal
leetcode/03_algo_note/04_dp/4.2_linear_dp/300.最长递增子序列.cpp
/* * @lc app=leetcode.cn id=300 lang=cpp * * [300] 最长递增子序列 * * https://leetcode.cn/problems/longest-increasing-subsequence/description/ * * algorithms * Medium (55.22%) * Likes: 3486 * Dislikes: 0 * Total Accepted: 832.3K * Total Submissions: 1.5M * Testcase Example: '[10,9,2,5,3,7,101,18]' * * 给你...
ALGO
0.999941
6.043707
{ "github_metadata": { "branch": "main", "commit_count": 265, "repo_created_at": "2023-05-17T07:32:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "680306fc6...
2f1c620e-8b60-4383-8a63-57de5eebdbda
hys2rang/WHrkTLQKF
Advanced Brute-Force-Backtracking/division.cpp
/* 문제 임의의 자연수는 그보다 작은 자연수들의 합으로 표현될 수 있다. 예를 들어 4의 경우, 4 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1 위와 같은 방법으로 표현 될 수 있다. 이 때 , 숫자의 구성이 같으면서 그 순서만이 다른 경우는 같은 경우로 생각하는데, 예를 들어 다음 세 가지 경우는 모두 같은 경우이다. 2 + 1 + 1, 1 + 2 + 1 , 1 + 1 + 2 자연수 n을 입력 받아 이를 n보다 작은 자연수들의 합으로 나타내는 방법을 모두 출력하는 프로그램을 재귀 호출을 사용하여 작성하시오. 입력 첫 줄에 2 이...
ALGO
0.999965
4.48356
{ "github_metadata": { "branch": "master", "commit_count": 228, "repo_created_at": "2018-08-23T12:44: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": "bd5b2eb0...
30e05327-bb06-40a5-8147-38f202e62d97
EmanuelSOL/ESTRUCTURADA_2023_1
actividad3/ejer8.cpp
//numero de enmedio_SOE_ACT1_8 //<NAME> 00369154 //22-08-23 #include <stdlib.h> #include <stdio.h> #include <math.h> int main() { int num1, num2, num3; system("CLS"); printf("Dame el primer numero: \n"); scanf("%d", &num1); printf("Dame el segundo numero: \n"); scanf("%d", &num2); print...
ALGO
0.999733
3.906813
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-09-11T04:14: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": "11e4a7fa3db9...
9c79498b-4162-442e-a00f-cea248db0762
pranjalyadav451/place
Contests/805_Div3/G2__Passable_Paths__hard_version_.cpp
/* name: G2. Passable Paths (hard version) group: Codeforces - Codeforces Round #805 (Div. 3) url: https://codeforces.com/contest/1702/problem/G2 interactive: false memoryLimit: 256 timeLimit: 3000 Started At: 5:01:30 AM */ #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include...
ALGO
0.999951
5.231731
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2022-06-05T08:50: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": "f520f9852...
f93eb328-e574-4c48-903e-b0ce18d48d71
shishirRsiam/CSE-Fundamentals-With-Phitron
5. XPSC - Problem Solving Club/Week 3/Day 3/D_Apple_Tree.cpp
#include<bits/stdc++.h> #define str string #define ll long long #define pi pair<ll,ll> #define vec vector<ll> #define py cout<<"YES\n" #define pn cout<<"NO\n" #define pb(x) push_back(x) #define bee(x) x.begin(), x.end() #define loop(s,i,n) for(ll i=s;i<n;i++) using namespace std; const ll N = 2e5+5; vector<ll> adj[N]...
ALGO
0.9999
4.138688
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2024-03-16T11:05:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38313dcc88...
f1dc2b77-e8e9-46b7-8abd-8e459d465a66
hornet-gt/hornet
xlib/include/Graph/BellmanFord.hpp
/** * @author <NAME> <br> * Univerity of Verona, Dept. of Computer Science <br> * <EMAIL> * @date April, 2017 * @version v1.3 * * @copyright Copyright © 2017 XLib. All rights reserved. * * @license{<blockquote> * Redistribution...
ALGO
0.999748
7.050803
{ "github_metadata": { "branch": "master", "commit_count": 797, "repo_created_at": "2017-10-09T01:09:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 86, "forks": 31, "issues": 11, "pull_requests": 2 }, "file_meta": { "content_id": "26d18...
d6d87b95-8d03-4635-983d-9c686a45094b
ApolloAuto/apollo
modules/prediction/evaluator/pedestrian/pedestrian_interaction_evaluator.cc
/****************************************************************************** * Copyright 2019 The Apollo 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 ...
ALGO
0.909447
6.925468
{ "github_metadata": { "branch": "master", "commit_count": 19341, "repo_created_at": "2017-07-04T19:03:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25847, "forks": 9793, "issues": 895, "pull_requests": 104 }, "file_meta": { "content_id...
8d77e1e2-e39f-432c-a058-b2ea4ece1a89
abarret/AdvDiffSolvers
tests/sb_data_manager/main.cpp
// Config files #include <IBAMR_config.h> #include <IBTK_config.h> #include <SAMRAI_config.h> // Headers for basic PETSc functions #include <petscsys.h> // Headers for basic SAMRAI objects #include "tbox/Pointer.h" #include <BergerRigoutsos.h> #include <CartesianGridGeometry.h> #include <LoadBalancer.h> #include <St...
ALGO
0.998396
5.956127
{ "github_metadata": { "branch": "master", "commit_count": 403, "repo_created_at": "2020-04-14T17:43:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "5f5fba40...
caed0e55-bde4-4b80-9f2d-1c39b4d4ee55
JJavier98/EC
1er año/Practica3/3a/suma_09.cc
//------------------------------------------------------------------------------ // suma_09_v2.cc //------------------------------------------------------------------------------ #include <algorithm> // max_element min_element #include <chrono> // duration_cast high_resolution_clock microseconds #include <iomanip> ...
ALGO
0.998161
5.287605
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-01-12T18:20: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": "a795ddc98e...
0c4451d6-8a1f-4593-a6bb-69883b0814c7
PYChih/CppPrimer
ch12_Dynamic_memory/exercise_12_32.h
#ifndef CH12_DYNAMIC_MEMORY_EXERCISE_12_32_H_ #define CH12_DYNAMIC_MEMORY_EXERCISE_12_32_H_ #include <string> #include <vector> #include <set> #include <map> #include <iostream> #include <fstream> #include <sstream> #include <memory> #include <initializer_list> #include <exception> using std::initializer_list; using st...
TOOL
0.913976
5.016966
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2020-12-18T18:37: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": "875e29d8029...
007dfd1e-daf6-4ca4-93f3-5162dfb9f286
markuspf/maf
gpgeowa.cpp
/* Copyright 2008,2009,2010 <NAME> This file is part of MAF. MAF is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. MAF is distri...
TOOL
0.939911
5.200147
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-08-23T13:52:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0f96b7b50...
7a12b9db-2fd9-408c-a5a0-5ab7f9b44a94
muzizhi/one-year-date
动态规划/最长重复子数组.cpp
718、最长重复子数组:a和b中公共的最长子数组,返回长度,ab有重复元素 思路:用hash存b,不对b可以重复;动态规划设定dp[i][j]代表以A[i]与B[j]结尾的公共字串的长度,dp[i][j]={dp[i-1][j-1]+1,ifa[i]=b[j]} 但是不好表示i/j ,so a[i-1]=b[j-1] 含义替换 /*class Solution { public: int findLength(vector<int>& A, vector<int>& B) { int n = A.size(), m = B.size(); vector<vector<int>> dp(n...
ALGO
0.998919
4.333696
{ "github_metadata": { "branch": "master", "commit_count": 161, "repo_created_at": "2019-10-18T11:18: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": "7b4aeeef...
d7cf015e-163e-46bf-b106-c69a6aab94a6
chaubey12/code_practice
educative_cpp/code_pattern/custom_data_structures/13_lfu_cache.cpp
#include <iostream> #include <unordered_map> #include <map> #include <set> using namespace std; class LFUCache{ private: int capacity, minFreq; unordered_map<int, pair<int, int>> keyToValueFreq; map<int, set<int>> freqToKeys; public: LFUCache(int capacity): capacity(capacity), minFreq(0) {} int ge...
ALGO
0.999534
5.541218
{ "github_metadata": { "branch": "main", "commit_count": 518, "repo_created_at": "2023-05-05T17:30: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": "cb97491fd8...
1b32c03e-daa4-42b4-87dd-cdb520afe782
uclaacm/advanced-interview-prep20
Solutions/Dynamic-Programming/Problem_10_Regular_Expression_Matching.cpp
class Solution { public: bool isMatch(string s, string p) { int s_len = s.size(); int p_len = p.size(); vector<vector<bool>> dp(s_len+1, vector<bool>(p_len+1, false)); dp[0][0] = true; // when we don't con...
ALGO
0.999724
5.421055
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2020-04-01T02:57:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b401fe26...
db009780-188e-4cb5-a378-b8761607d93a
michael-lehn/FLENS
flens/lapack/impl/hseqr.h
/* * Copyright (c) 2011, <NAME> * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1) Redistributions of source code must retain the above copyright * notice, this ...
ALGO
0.992264
7.155673
{ "github_metadata": { "branch": "public", "commit_count": 475, "repo_created_at": "2011-12-14T18:21:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 127, "forks": 32, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "206d8...
d2029ee6-5638-45f2-a283-7f814e3f1354
cachedpotato/neetcode-cpp
11_graphs/valid_tree.cpp
#include <iostream> #include <vector> #include <queue> #include <unordered_map> #include <unordered_set> using namespace std; bool validTree(int n, vector<vector<int>>& edges); bool dfs(unordered_map<int, vector<int>>& connections, unordered_set<int>& visited, unordered_set<int>& cycle, int curr, int prev); int mai...
ALGO
0.999758
5.778612
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-06-21T17:05:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbec5975182...
1301e681-0679-44e3-9275-cadc8cd684b5
ilyamoskalev/Algorithms
3/main.cpp
#include <iostream> #include <cassert> using namespace std; int BinarySearch( int* arr, int count, int element, int start) { int first = start; int last = count; while( first < last ) { int mid = ( first + last ) / 2; if( element <= arr[mid] ) last = mid; else ...
ALGO
0.999981
3.919614
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-03-01T21:05: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": "bd28134614...
85c7634f-2001-4120-9d45-d015e39f83a8
JeongYeonUk/Problem
BOJ/9019.cpp
#include <iostream> #include <cstring> #include <string> #include <queue> using namespace std; typedef long long ll; const int INF = 987654321; const int MAX = 10000; struct s { int num; string cur; }; int start, dest; bool visit[MAX]; int N; string bfs() { queue<s> q; q.push({ start,"" }); visit[start] ...
ALGO
0.999963
5.351993
{ "github_metadata": { "branch": "master", "commit_count": 220, "repo_created_at": "2019-05-25T03:18:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "beac6f2c...
6b0f99e2-c85e-42b9-968e-514a853d7232
BronsonLau/Practice_-_Study
leetcode/leetcodecpp/practice241108.cpp
// 3235. 判断矩形的两个角落是否可达 // 已解答 // 困难 // 相关标签 // 相关企业 // 提示 // 给你两个正整数 xCorner 和 yCorner 和一个二维整数数组 circles ,其中 circles[i] = [xi, yi, ri] 表示一个圆心在 (xi, yi) 半径为 ri 的圆。 // 坐标平面内有一个左下角在原点,右上角在 (xCorner, yCorner) 的矩形。你需要判断是否存在一条从左下角到右上角的路径满足:路径 完全 在矩形内部,不会 触碰或者经过 任何 圆的内部和边界,同时 只 在起点和终点接触到矩形。 // 如果存在这样的路径,请你返回 true ,否则返回 fals...
ALGO
0.999755
5.193333
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2024-10-09T05:51: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": "fb7b67a795...
6a2d06ec-2631-447a-9290-a95c26785109
fearlessghoul/Competitive-Programming
DATA STRUCTURES/Linked List/Circular_Linked_List.cpp
#include <iostream> using namespace std; struct Node { int data; Node* next; }; class CircularLinkedList { private: Node* head; public: CircularLinkedList() : head(nullptr) {} // Insert at the beginning void insertAtBeginning(int value) { Node* newNode = new Node(); newNod...
ALGO
0.999573
6.284022
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-11-18T04:46:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a613804e7d5...
85e72afc-1b37-4073-95d0-f377d487290c
Arin0402/Data-structures-and-Algorithms
3_Arrays/A078_Maximum of all subarrays of size K.cpp
#include <bits/stdc++.h> using namespace std; // https://practice.geeksforgeeks.org/problems/deee0e8cf9910e7219f663c18d6d640ea0b87f87/1?utm_source=gfg&utm_medium=article&utm_campaign=bottom_sticky_on_article // 1 // try all the subarrays // O(N*k) // 2 // using deque class Solution { public: vector<int> max_o...
ALGO
0.999904
5.75699
{ "github_metadata": { "branch": "main", "commit_count": 224, "repo_created_at": "2022-12-08T07:13:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38b6e2ac9b...
a1f3139a-83fb-459f-be49-02d0106deeff
atpk/CP
leetcode/3sum.cpp
class Solution { public: void twoSum(vector<vector<int> >& resf, vector<int>& nums, int target, int a, int b, int t2) { int t; while(a<b){ t = nums[a]+nums[b]; if(t==target){ vector<int> res; res.push_back(nums[a]); res.push_ba...
ALGO
0.999939
5.438409
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2021-11-26T17:12: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": "9a532d34303...
a8d95deb-76cb-4086-8eba-8e8e9d197e4b
arnav2236/newreact
binary_iterative.cpp
#include <bits/stdc++.h> using namespace std; int bS(int arr[], int l, int r, int x) { while (l <= r) { int mid = l + (r - l) / 2; if (arr[mid] == x){return mid; } if (arr[mid] < x) { l = mid + 1; } else {r = mid - 1;} } ...
ALGO
0.999683
4.768768
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-07-30T21:05:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 20 }, "file_meta": { "content_id": "8fae27428...
eb8eae03-8dcf-438b-b74d-c8cfdf510f34
tanishajn12/DSA_CPP_Apr2023
Trees/modify_tree.cpp
#include<iostream> using namespace std; class node { public: int data; node* left; node* right; node(int data) { this->data=data; this->left=this->right=NULL; } }; node* buildBST(string& preorder, int& index, int minValue, int maxValue) { if (index >= preorder.length()) { ...
ALGO
0.999983
4.321458
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-09-08T05:36: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": "3a162d729f96...
5339ada0-d5ab-4c91-a0e8-931530d417b3
bwhite/impoint
impoint/_surf/SurfMatch.cpp
#include <float.h> #include "SurfMatch.h" #include <cstdio> #include <cmath> //#include "common_macros.h" SurfMatch::SurfMatch() { #ifdef STATS dimQuit = new int[64]; for (int i = 0; i < 64; i++) { dimQuit[i] = 0; } #endif } SurfMatch::~SurfMatch() { #ifdef STATS int total=0; for (int i = 0; i < 64; i++) { i...
ALGO
0.97883
4.500344
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2011-06-11T19:06:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d4db9a3ec...
02ee794e-d7f2-41d8-bf31-c922bbb23563
tienthanh214/Competitive-Programming
Contest/Codetour/2024/Round1/a.cpp
/** * Solution: Thật ra bài này chỉ cần tính căn bậc 3 của C, vì K >= 3 và p_i >= 10^6, trong khi X <= 10^6, do đó N lớn hơn C => C % N = C */ #include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; vector<i...
ALGO
0.999982
4.00774
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2020-04-16T13:50:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9a1c073...