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
5ed76356-55ab-429e-ae88-960e18f4dfb5
AAugustoBS/Porto-Transports-line
graph.cpp
#include "graph.h" #include <climits> #include <iostream> #include "AuxFunctions.h" #include "MinHeap.h" #include <map> #include <algorithm> // Constructor: nr nodes and direction (default: undirected) Graph::Graph(int num, bool dir) : n(num), hasDir(dir), nodes(num+1) { } // Add edge from source to destination with a...
ALGO
0.996228
3.549081
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2022-01-18T17:56: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": "d1f696085...
301e10a5-7282-40e6-9d13-3d475a9e80c1
jungseokyoung-cloud/Algorithm
C++/Gold 2/BaekJoon_1525(퍼즐).cpp
#include <bits/stdc++.h> using namespace std; #define FAST ios::sync_with_stdio(0),cin.tie(0),cout.tie(0) #define endl '\n' string st; set<string> vis; int ans = -1; int dis_x[] = {-1,0,1,0}; int dis_y[] = {0,1,0,-1}; void Input(){ int num; for(int i = 0; i<3; i++){ for(int j = 0; j<3; j++){ ...
ALGO
0.999947
4.03444
{ "github_metadata": { "branch": "main", "commit_count": 264, "repo_created_at": "2021-03-26T04:53: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": "599ac7e2bb...
f7c05a7a-8cef-46c6-9b5d-a251e10ea724
Asadbek525/cses.fi
1623.cpp
// Problem: Apple Division // Contest: CSES - CSES Problem Set // URL: https://cses.fi/problemset/task/1623 // Memory Limit: 512 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) #include <bits/stdc++.h> using namespace std; #define int long long int #define fast ios::sync_with_stdio(0),cin....
ALGO
0.999758
4.655331
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-05-29T09:15:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2831663a6...
2d447a3c-3a47-4571-88fe-504a1f4cfa03
0x5eba/CSES-solutions
GraphAlgorithms/CountingRooms/m.cpp
#include<bits/stdc++.h> using namespace std; // const int MAXN = 1005; // int n, m, ans; // char board[MAXN][MAXN]; // bool visited[MAXN][MAXN]; // int dRow[4] = {1, -1, 0, 0}; // int dCols[4] = {0, 0, 1, -1}; // inline bool valid(int row, int cols){ // return (row >= 0 && row < n && cols >= 0 && cols < m); // } ...
ALGO
0.999848
4.945932
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-08-06T22:46:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 6, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d950f6654...
ab4ad0c2-3508-4a20-a555-6eec7a94ce0b
NeMaXonz/algorithm_practice
백준/Silver/1012. 유기농 배추/유기농 배추.cc
#include <iostream> #include <cstring> #include <queue> int dx[4]{ 0, 0, -1, 1 }; int dy[4]{ 1, -1, 0, 0 }; int T, M, N, K; bool map[55][55]{ 0 }; void DFS(int x, int y) { for (int dir = 0; dir < 4; ++dir) { int X = dy[dir] + x; int Y = dx[dir] + y; if (Y >= 0 && Y < M && X >= 0 && X < N && map[X][Y])...
ALGO
0.999898
4.37063
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2024-06-15T05:29: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": "c9bd7b8c86d...
b3e8e495-2815-48dd-bc5f-546cfe3d6c37
sagpant/QuantLib
ql/processes/coxingersollrossprocess.hpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2020 <NAME> This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modif...
ALGO
0.964566
7.794061
{ "github_metadata": { "branch": "master", "commit_count": 13393, "repo_created_at": "2020-06-18T07:54:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "131643...
25a4d5ff-e4a0-48b7-9aab-efd547c61c98
ecarquin/Fis205
files2/find.cc
#include <iostream> #include <string> #include <algorithm> using namespace std; int main () { string str("C++ is best language"); int pos1, pos2; // size_t or size_type // work not correct // search for first string "best" inside of str // default position is 0 pos1 = str.fin...
ALGO
0.957201
4.859687
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2020-10-02T02:14: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": "e75cf9d6eb2...
00da3b3a-7dd6-425c-a9c2-56311e5b9bc0
arnav-mehra/l-system-inference
cpp-code/enumeration.hpp
#include "util.hpp" template<class ResultType> struct Enumerator { int depth; int alphabet_size; Symbols target; vector<ResultType> results; int last_deviated_idx; int checks = 0; Enumerator(int alphabet_size, int depth, Symbols target) : alphabet_size(alphabet_size), depth(depth...
ALGO
0.998627
6.869502
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-10-19T06:19: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": "e9258eae8c0...
3c5dea6f-ad81-4073-9a9f-1f40a661f95f
SirSour/LETU-5-semester-OS
OS_5/OS_5_3.cpp
#include "stdafx.h" #include <iostream> #include "windows.h" #include <iomanip> #pragma comment (lib, "Winmm.lib") // для тайма using namespace std; const long double studNumber = 530717; const long double N = 100000000; const long double sizeOfBlock = 10 * studNumber; DWORD WINAPI Formula(LPVOID); _declspec(thre...
ALGO
0.998741
3.579266
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-02-01T14:08: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": "cfcc38f40a...
2f65a4cb-2d63-4555-be19-16c0a103700c
DancingOnAir/LeetCode
Leetcode/Array/162_FindPeakElement.cpp
//#include <iostream> //#include <vector> // //using namespace std; // //int findPeakElement(vector<int>& nums) //{ // for (int i = 1; i < nums.size(); ++i) // { // if (nums[i] < nums[i - 1]) // return i - 1; // } // // // return nums.size() - 1; //} // //int helper(const vector<int>& nums...
ALGO
0.999678
4.958958
{ "github_metadata": { "branch": "master", "commit_count": 1198, "repo_created_at": "2017-06-03T03:52:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca9c9c5...
416a651a-dc89-4151-b22d-687123abc931
monta0315/atcoder_begin
204/a.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define fore(i,a) for(auto &a:a) #define e(v) sort(v.begin(), v.end()) #define rev(v) reverse(v.begin(), v.end()) #define out(s) cout << s << endl #define decimal10(s) cout << fixed << setprecision(10) << s << endl #define two...
ALGO
0.999962
3.467825
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-04-10T14:44: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": "d7f7c7ebb...
c0679b3f-c64c-494e-bcba-e7acb6dcc960
Hopson97/MineCraft-One-Week-Challenge
Source/Maths/NoiseGenerator.cpp
#include "NoiseGenerator.h" #include "../World/WorldConstants.h" #include <cmath> NoiseGenerator::NoiseGenerator(int seed) : m_seed(seed) { m_noiseParameters.octaves = 7; m_noiseParameters.amplitude = 70; m_noiseParameters.smoothness = 235; m_noiseParameters.heightOffset = -5; m_noiseParamete...
TOOL
0.938788
5.290792
{ "github_metadata": { "branch": "master", "commit_count": 507, "repo_created_at": "2017-07-27T17:07:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2695, "forks": 377, "issues": 13, "pull_requests": 1 }, "file_meta": { "content_id": "3a...
cd47d8e5-3fa0-4dca-a1fd-5f968f5aed9f
Re-bro/Algorithm-PS
USACO/USACO 2017 February Contest/[BOJ 14464] 소가 길을 건너간 이유 4.cpp
/* [BOJ 14464] 소가 길을 건너간 이유 4 Algorithm : Greedy / Sorting */ #include<bits/stdc++.h> #define all(v) v.begin(), v.end() #define pb push_back using namespace std; using pii = pair<int, int>; int t[20202]; int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int c, n; cin >> c >> n; fo...
ALGO
0.999994
3.77219
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2020-11-19T02:06:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee8975ad55...
6e99645e-1b60-4fb2-b6e2-b5a0553e516b
lama-imr/lama_polygon_matcher
place_matcher_fourier/src/angle_shift.cpp
#include <iostream> #include <gsl/gsl_errno.h> #include <gsl/gsl_fft_real.h> #include <gsl/gsl_fft_halfcomplex.h> #include <gsl/gsl_fft_complex.h> #include "pm_fourier/angle_shift.h" using std::vector; vector<double> fft2(const vector<double> &data); int getAngleShiftFFT(const vector<double> &fft1, const vector<do...
ALGO
0.957532
4.654487
{ "github_metadata": { "branch": "indigo-devel", "commit_count": 271, "repo_created_at": "2014-12-17T13:08:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fde...
de31ffb9-1a93-4be1-8151-69477c6a6975
DbHridoy/Leetcode
9_palindrome_number.cpp
#include <bits/stdc++.h> #define int long long #define endl '\n' #define vec vector<long long> #define moc map<char, long long> #define moi map<long long, long long> #define faster \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) using namespace std; void s...
ALGO
0.999432
4.371047
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-28T18:18: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": "7218aa883607...
0959eaf6-4c44-44e8-b80f-d233f16784e9
zfoteff/CPSC121
HW6 problems/HW6Prb1.cpp
#include <iostream> using namespace std; double getSales(double name){ int sales = 0; cout<<"Enter in the division's quarterly sales: "; cin>> sales; while(sales < 0){ cout<<"Dont use a negative number. Enter in the division's quarterly sales: "; cin>> sales; } return sales; } void findHighest(double a, dou...
ALGO
0.996548
3.827284
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-01-18T01:27: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": "fa10e8ca23...
1eb0cfb7-2b0c-4dbf-9523-605858d90406
Shperb/hog2-DVCBS
environments/RubiksCubeEdges.h
// // RubikEdge.h // hog2 glut // // Created by <NAME> on 1/4/13. // Copyright (c) 2013 University of Denver. All rights reserved. // #ifndef __hog2_glut__RubikEdge__ #define __hog2_glut__RubikEdge__ #include <iostream> #include <stdint.h> #include <vector> #include "SearchEnvironment.h" class RubikEdgeState { p...
ALGO
0.979407
5.140624
{ "github_metadata": { "branch": "master", "commit_count": 963, "repo_created_at": "2020-05-06T07:34:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a072b12...
a5ad1f1e-9be0-4fef-93e7-975c65564387
Tora416/MultiCodeEmbed
dataset/dataset_raw/gcj_cpp/FedePousa/8294486_5654117850546176_FedePousa.cpp
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; int main() { int...
ALGO
0.999319
3.963646
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2025-07-10T08:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1eb2f677d...
b165c73a-93bb-4769-8566-cb0da56a9909
DesertFalcon35/Hmody
algorithmes level 1/home work( function from algorthmes )/home work ( #16 ).cpp
#include <iostream> #include <string> #include <cmath> using namespace std; void readInputs(int &input1,int &input2) { cout << " please enter ( A , B ) to calculating rectangle area through diagonal and side area of rectangle.\n"; cout << " A : "; cin >> input1; cout << " B : "; cin >> input2; }; float rec...
ALGO
0.995322
4.453237
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-24T23:01: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": "dc8dc0f63586...
db4f4e45-7f65-4d3f-beba-465c48427aa3
WorldOfWheat/CodeDepositary
C_C++/TCIRC-OJ/d068 P-6-3. 最小監控鄰居的成本.cpp
#include <bits/stdc++.h> #define int long long #define V vector<int> #define VP vector<pii> #define vv vector<vector<int>> #define pii pair<int, int> #define F first #define S second #define rep(x, y ,z) for(int x = y; x < z; x++) #define rep2(x, y ,z) for(int x = y; x <= z; x++) #define rrep(x, y ,z) for(int x = y; x ...
ALGO
0.999987
3.761792
{ "github_metadata": { "branch": "main", "commit_count": 540, "repo_created_at": "2022-07-25T08:13:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0db7f7cdb...
9e2944d1-aa24-4a6a-895e-3a604001100f
jkt10125/ds
c++/Manacher Algorithm.cpp
#include <bits/stdc++.h> std::vector<int> manacher(const std::string &s) { std::string t = "#"; int n = (s.size() << 1 | 1); for (auto c : s) { t += (std::string(1, c) + "#"); } std::vector<int> r(n); for (int i = 0, j = 0; i < n; i++) { if ((j << 1) - i >= 0 && j + r[j] > i)...
ALGO
0.999902
4.540987
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-09-14T14:15: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": "768555a24da...
83f028bb-cbb8-4a73-ae53-281b4f507b23
WilliamWashburn/TilePuzzleAlgorithm
c++/FIFO.cpp
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <cstdlib> #include <math.h> #include <chrono> #include <sstream> #include <map> using namespace std; using std::chrono::high_resolution_clock; using std::chrono::duration_cast; using std::chrono::duration; using std::chrono::milliseconds; const int m...
ALGO
0.999988
3.948444
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2023-01-01T13:18:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bee58a720e...
d7997700-f757-4d10-ad05-ac9d0df8ea3b
NimishToshniwal/Codeforces-Solved
1500-1999/1651C.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++) #define rep1(i, n) for (ll i = 1; i <= n; i++) int main() { ios::sync_with_stdio(false); int t; cin >> t; while (t--) { int n; cin >> n; int a[n], b[n], al = 1e9...
ALGO
0.999987
3.904101
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-17T16:53: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": "da9b247a1076...
5c2690a0-de1b-41cb-8510-65b95982b101
zihaochen/USACO
fence.cpp
/* ID: zihaoch1 PROG: fence LANG: C++ */ #include<iostream> #include<fstream> using namespace std; int n, minIndex = 100000, maxIndex, num; int rec[10000]; int a[600][600]; int d[600]; void euler(int index) { for (int i = minIndex; i <= maxIndex; i++) if (a[i][index] > 0) { a[i][index]--; a[index][i]--; ...
ALGO
0.999986
3.933004
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-08-17T06:35: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": "b7a896cc3c...
c41f379d-7ad4-4ace-a1f1-97227981445f
Himanshu2500/Codechef
Long Challenge/May 2020/SORTVS.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<(b);i++) #define trav(a,x) for(auto & a :x) #define all(x) begin(x),end(x) typedef long long ll; typedef vector<int> vi; const int M=1e9+7; vector<int> concom[10]; int k; class Graph { int V; // No. of vertices // Pointer ...
ALGO
0.999964
4.409411
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-07-19T05:32: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": "f58728e94b...
456802ea-99b8-4a82-bc4b-5bdb3216a5bb
Ashokav008/LeetCode
search-in-rotated-sorted-array/search-in-rotated-sorted-array.cpp
class Solution { public: int pivot(vector<int>array,int size){ int left = 0; int right = size - 1; while(left < right) { if(array[left] < array[right]) // case 1 return left; int mid = left + (right-left)/2; if(array[mid] > array[right]) lef...
ALGO
0.999996
5.8946
{ "github_metadata": { "branch": "main", "commit_count": 1718, "repo_created_at": "2022-03-02T10:39: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": "6a211973a...
9b8e680b-ac2e-4079-a60d-41d13b35aa32
AhmedMostafa79/problem-solving
Problem-Solving/Codeforces/Phase 3-2/Divide and Conquer/Round 218 C -Hamburgers .cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define all(v) ((v).begin()),((v).end()) #define rall(v) ((v).rbegin()),((v).rend()) #define Fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define close(n) return cout<<n,0; const int dx[] = { -1,0,1,0,1,-1,1,-1 }; const int dy[] = { 0,1,...
ALGO
0.999507
3.789292
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2023-10-26T13:40: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": "73b9986f7e6...
b2559bed-57d6-4fe8-bd2a-aae08232ae28
Dup4/Leetcode
leetcode/problems/130.surrounded-regions/solution1.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define endl "\n" #define fi first #define se second #define all(x) begin(x), end(x) #define rall rbegin(a), rend(a) #define bitcnt(x) (__builtin_popcountll(x)) #define complete_unique(a) a.erase(unique(begin(a), end...
ALGO
0.999967
5.518921
{ "github_metadata": { "branch": "main", "commit_count": 529, "repo_created_at": "2020-09-28T07:35: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": "7c83f7a694...
9744e71f-aba8-4cfd-9fa3-4f59bdd22932
ashesh808/DSA
tree.cpp
// Including the required headers #include <iostream> using namespace std; // This class represents the node of a tree class Node { public: // Data memebers of a node are: // 1. Key : which is used for finding and updating each node will have a unique key // 2. Data : which is the actual value contained ...
ALGO
0.999948
4.92379
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2022-06-26T12:44: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": "a3bf74c0a8e...
24d00ef4-1f49-4003-99f5-9570777e9369
hun9997/swt
src/FindWords.cpp
#include <iostream> #include <string> #include <utility> #include <cstdio> #include <sstream> #include "FindWords.hpp" using namespace std; using namespace cv; #define FC_PIXEL_DENSITY 0.1 #define FC_REFINE_WORD_ANGLE // #define FC_SAVE_IMAGES // #define FC_DISPLAY_IMAGES #define FC_IMAGE_DIR "./Images/" // #define ...
ALGO
0.992653
5.824103
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-11-04T04:10:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fab7d7e073...
3b462f74-5c3b-450c-bb4d-4dec364ea7bd
Himanshu07-debug/Data-Structures-and-Algorithms
DP Striver/03 - DP on Grids/02 Fixed Starting pt & fixed ending pt/04_Min_Path_sum.cpp
// We are given an “N*M” grid of integers. We need to find a path from the top-left corner to the bottom-right corner of the grid, such // that there is a minimum cost past that we select. // At every cell, we can move in only two directions: right and bottom. The cost of a path is given as the sum of values of cells ...
ALGO
0.999973
5.920466
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2024-01-11T03:58: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": "57620d6b03e...
43e9f5c7-ff8b-4739-a86d-cb14ecb80afd
prabodhw96/Programs
2/6. Hashing.cpp
#include <iostream> #include <cstdlib> using namespace std; #define SIZE 5 typedef long long int ll; int currSize = 0; class DataItem { public: string name; ll data; }; DataItem HT[SIZE]; int hashCode(ll key) { return key % SIZE; } void Display() { for(int i=0; i<SIZE; i++) cout<<HT[i].name<<"->"<<HT[i].data<<end...
ALGO
0.999214
3.912811
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-04-21T06:41:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b8f66cd10...
f5f56108-f293-4e42-b3de-d06cb2158e51
Kiids/OJ_Practice
数组中数字出现的次数.cpp
/* 一个整型数组 nums 里除两个数字之外,其他数字都出现了两次。请写程序找出这两个只出现一次的数字。要求时间复杂度是O(n),空间复杂度是O(1)。 示例 1: 输入:nums = [4,1,4,6] 输出:[1,6] 或 [6,1] 示例 2: 输入:nums = [1,2,10,4,1,4,3,3] 输出:[2,10] 或 [10,2] 限制: 2 <= nums <= 10000 */ class Solution { public: vector<int> singleNumbers(vector<int>& nums) { int a = nums[0]; int b = 0...
ALGO
0.999979
5.160842
{ "github_metadata": { "branch": "master", "commit_count": 1531, "repo_created_at": "2019-10-23T13:47: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": "a93e708...
8b06d574-9e11-4666-859d-9f0727ca0287
StuBoo3i/CPP_Enhanced_Programming
main.cpp
#include <iostream> #include <vector> #include <algorithm> #include "Template_Class.h" //1.3.7 //#include "person.cpp" #include "person.hpp" #include "vector.h" using namespace std; //1.2.1 void swapInt(int &a,int &b){ int temp = a; a = b; b = temp; } void swapDouble(double &a,double &b){ double temp =...
TOOL
0.983891
4.392829
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-01-06T15:58:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9bc16c1bd...
d3dff831-6efe-40a8-b254-108aeb87ea09
SongJiUk/Algorithm
이것이 코딩테스트다/그래프 이론/여행계획/code.cpp
#include <iostream> #include <queue> #include <set> using namespace std; //union_find int parent[501]; vector<pair<int,int> > vec; set<int> s; int find_parent(int x) { if(parent[x] == x) return x; return parent[x] = find_parent(parent[x]); } void union_parent(int a, int b) { a = find_parent(a); b =...
ALGO
0.999998
5.024742
{ "github_metadata": { "branch": "main", "commit_count": 395, "repo_created_at": "2024-01-29T10:34: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": "fd2e041a97...
e604245c-7e08-4683-979c-24a0a73e770d
patidar622/gfg_amazon_questions
NQueens(interview bit).cpp
/* The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. N Queens: Example 1 Given an integer n, return all distinct solutions to the n-queens puzzle. Each solution contains a distinct board configuration of the n-queens’ placement, where 'Q' and '.' b...
ALGO
0.99978
5.489044
{ "github_metadata": { "branch": "master", "commit_count": 165, "repo_created_at": "2020-05-07T17:16: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": "914a7107...
d258a16b-87bf-48bb-bbbc-6ada97c34b3c
backspacer303/WeilerAthertonPolygonClipping
algoritmi_sa_vezbi/ga07_datastructures.h
#ifndef GA07_DATASTRUCTURES_H #define GA07_DATASTRUCTURES_H #include "ga06_dcel.h" #include "pomocnefunkcije.h" /// /// \brief The EventQueueComp struct /// Brisuca prava se krece od jedne ka drugoj EventTacki /// struct EventQueueCompTriangulation { bool operator()(const Vertex* levi, const Vertex* desni) const ...
ALGO
0.928318
4.781392
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2022-02-16T18:13: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": "2617c61ca...
cfa241d8-b822-412a-bc15-23e0d5ea0dd0
ATRI17Z/adventofcode18
Day19/Day19.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <list> #include <array> #include <regex> #include <bitset> typedef long long int ll; typedef std::array<ll, 6> register_t; std::list<std::string> getInputPerLines(std::string); // Part One std::array<ll, 6> addr(ll A, ll B, ll C, std...
ALGO
0.998982
3.405055
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2018-12-03T19:04:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "590171cfd...
89d3c08a-e776-43e3-8151-4249c383dcad
Siddeshwar002/DSA-again
Z_Contests/CodeForces/Round 919 - Div 2/2.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n, a, x; cin >> n >> a >> x; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } sort((arr), arr + n); int a2 = n - x - 1; int Sum1 = 0, Sum2 = 0; for (int i = 0; i < n; i++) { if (i ...
ALGO
0.999892
4.941467
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-01-25T14:42: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": "b9cd92d5347...
4097ce26-180b-44ce-93ca-e8cbe254a013
jhnaldo/problem-solving
acmicpc/cpp/14002.cc
#include <stdio.h> #include <stack> using namespace std; int n; int arr[1000]; int pr[1000]; int len[1000]; int max_len = 0; int cur = -1; int main() { scanf("%d", &n); for (int i = 0; i < n; i++) { int l = 0; int p = -1; scanf("%d", &arr[i]); for (int j = 0; j < i; j++) { if (arr[j] < arr[...
ALGO
0.999999
3.756225
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2018-02-25T16: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": "1412cea51...
cf867f70-a4dc-4ab1-a5d8-8698120e9858
JayjeetAtGithub/Algorithms
linked-list-problems/reverse-linked-list.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; Node(int data); }; Node :: Node(int data){ this->data = data; } Node * reversell(Node *root){ Node *current = root; Node *prev = NULL; Node *nxt = NULL; while(current != NULL){ nxt ...
ALGO
0.999951
5.321535
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-07-31T04:41:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "3fa16159e...
346ea7b7-af4a-4b15-b520-d30dcc42709f
errorcodexero/newarch
sim2/wpilib/cpp/kinematics/MecanumDriveKinematics.cpp
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of...
TOOL
0.987554
6.11596
{ "github_metadata": { "branch": "master", "commit_count": 1648, "repo_created_at": "2018-07-04T16:54:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 1, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "f0df9fb8...
101da15a-626b-409b-820e-2886f9842f7c
mohammedsaid254/UVA
711-Dividing up.cpp
#include <bits/stdc++.h> using namespace std; const int N = 7; const int M = static_cast<const int>(2e5); int arr[N], val[N]; int vis[N][M][2], visid; bool dp[N][M][2]; bool solve(int idx = 1, int a = 0, int b = 0) { if (idx == N)return a == b; int diff = a - b, flag = 0; if (diff < 0)diff = abs(diff), f...
ALGO
0.998921
3.417847
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2017-03-21T02:00: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": "1ac44565a...
b9ca7696-87ca-44fc-b3c4-05de786ee188
Jatin-Shihora/LeetCode-Solutions
473-matchsticks-to-square/473-matchsticks-to-square.cpp
class Solution { public: bool makesquare(vector<int>& M) { sort(M.begin(), M.end(), greater<int>()); int total = accumulate(M.begin(), M.end(), 0); side = total / 4; if ((float)total / 4 > side || M[0] > side) return false; return btrack(0, side, 0, M); } priv...
ALGO
0.999957
5.129923
{ "github_metadata": { "branch": "main", "commit_count": 3066, "repo_created_at": "2021-12-14T12:46:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 97, "forks": 26, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4317f43...
0ae52ccb-0801-4b84-89bd-a1492a7fd485
alps-jbnu/23ALPStudy
2023-1/Basic/ksu206631/Recursion/boj17478.cpp
#include <iostream> using namespace std; int n; void recu(int d){ for(int i=0; i<d; i++) cout << "____"; cout << "\"재귀함수가 뭔가요?\"\n"; if(d==n){ for(int i= 0; i<d; i++) cout << "____"; cout << "\"재귀함수는 자기 자신을 호출하는 함수라네\"\n"; for(int i= 0; i<d; i++) cout << "____"; cout <...
ALGO
0.991239
3.607895
{ "github_metadata": { "branch": "main", "commit_count": 2930, "repo_created_at": "2023-02-03T06:11:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 59, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b4b9ac2...
db3d39b6-c2bd-4051-8095-305d1ec12ed9
hk-gitshub/practiceCN
milestone3/tree/treeAssignment.cpp
#include<bits/stdc++.h> using namespace std; #include "treeNode.h" treeNode<int> * takeInputLevelWise(){ int rootData; cout<<"Enter the data:"<<endl; cin>>rootData; treeNode <int>* root=new treeNode<int>(rootData); //we use queue for level wise made tree queue<treeNode<int>*> pendingNode; ...
ALGO
0.999853
3.67522
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-04-23T20:23:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "888ea94d44c...
4f485645-91f4-44f0-abe0-fd6336438828
knockcat/AtCoder
AtCoder Beginner Contest 300/a.cpp
// KNOCKCAT #include <bits/stdc++.h> using namespace std; #define fast \ std::ios::sync_with_stdio(false); \ cin.tie(nullptr); #define int long long int #define endl "\n" typedef unsigned long long ull; typedef long long ll; typedef long double ld; const ll mod = 1e9 + 7; const ll e...
ALGO
0.99997
4.116634
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2023-01-15T11:56:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "caea15513f4...
654d419d-6376-4f23-8b12-0d6c222fef18
fsq/leetcode
1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree.cpp
class Solution { public: vector<int> fa; int n; int find(int x) { return fa[x]==x ? x : fa[x]=find(fa[x]); } int krus(vector<vector<int>>& e, int ban, int force) { int ans = 0; fa = vector<int>(n); iota(fa.begin(), fa.end(), 0); int cc = n; if (fo...
ALGO
0.999775
5.022345
{ "github_metadata": { "branch": "master", "commit_count": 1935, "repo_created_at": "2018-01-18T01:31:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "fe47581...
29ff2af0-e305-4c6e-b40c-36275f39d31a
ishandutta2007/codeforces-d
dreamoon_love_aa/normal/178/B1.cpp
#include<stdio.h> #include<string> #include<math.h> #include<stdlib.h> #include<set> #include<bitset> #include<map> #include<vector> #include<string.h> #include<algorithm> #include<iostream> #define pb push_back using namespace std; #define SIZE 100010 int d[SIZE]; struct EDGE{ }; vector<int>e[SIZE],new_e[SIZE]; int or...
ALGO
0.999956
3.95422
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "d626861b1683...
f3d56a5a-4b0a-4e38-ad9b-b05a22d8432c
HarshdeepSingh2609/ANALYSIS-AND-DESIGN-OF-ALGOS
LAB3/10_mergesort.cpp
#include<iostream> #include<fstream> #include<cstdlib> #include<ctime> #include<cmath> using namespace std; void WriteDataToFile(int i, double avgTime) { ofstream fout("merge_sort_data.txt", ios::app); if(fout.is_open()) { fout << i << "," << avgTime << endl; fout.close(); } else { ...
ALGO
0.999733
5.529966
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-01-25T15:28: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": "48541d43999...
a03f8337-cb77-4e31-9455-b755bdd9e3b6
MMG2210/DSA-Solved
114-flatten-binary-tree-to-linked-list/114-flatten-binary-tree-to-linked-list.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999964
5.588762
{ "github_metadata": { "branch": "main", "commit_count": 1826, "repo_created_at": "2022-03-19T10:49: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": "0fcf5ca39...
1b20a1ea-c05f-423a-890c-6a1ceebe0728
tarunsinghdev/DSA-CRACKER
Stacks&Queues/14_ReverseAStackUsingRecursion.cpp
/* Approach : In this stack is reversed using insertBottom function. When at first reverse function is called it empties the stack and hold value in the call stack. Now when we push elements back into the stack we call insertBottom function so that elements gets pushed at the bottom and we ...
ALGO
0.999985
5.220633
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2020-10-16T12:13:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 110, "forks": 65, "issues": 9, "pull_requests": 19 }, "file_meta": { "content_id": "0a0527...
f805108b-7b6b-4557-9fb4-72b9716b47dc
abadams/ImageStack
src/LAHBPCG.cpp
#include "main.h" #include "LAHBPCG.h" #include "File.h" #include "Calculus.h" #include "Arithmetic.h" #include "Convolve.h" #include "Statistics.h" #include "Geometry.h" #include "Reduction.h" #include <list> namespace ImageStack { // This is an implementation of "Locally Adaptive Hierachical Basis // Preconditioning...
ALGO
0.99936
3.460726
{ "github_metadata": { "branch": "master", "commit_count": 262, "repo_created_at": "2015-03-04T16:39:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 88, "forks": 35, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "48010e...
2fb5deba-6400-4fba-abc5-21c0ca03a894
sampritipanda/IOI_Repository
Codeforces/Educational_1/hacks/correct_E.cpp
#include<bits/stdc++.h> using namespace std; #define dbg(x) (cout<<#x<<" = "<<(x)<<'\n') typedef long long int lld; const int INF = (1LL << 10) - 1; const lld LINF = (1LL << 62) - 1; int T; int DP[50][50][60]; int compute(int n, int m, int k) { if (n <= 0 || m <= 0 || k <= 0) return 0; if (n * m == k) ...
ALGO
0.999964
4.828731
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2014-12-27T14:42:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd52ce9...
b6a0b18f-2c8b-458b-8eba-e3dd29308c7c
KaizynX/Code
HDU/hdu1429_2.cpp
#include <bits/stdc++.h> using namespace std; const int N = 21; const int K = 10; const int d[] = {0, -1, 0, 1, 0}; int n, m, t, head, tail; char a[N][N]; bool vis[N][N][1<<K]; struct Node { int x, y, k, t; } q[500000]; int main() { while (scanf("%d %d %d", &n, &m, &t)) { head = tail = 0; m...
ALGO
0.999715
3.498746
{ "github_metadata": { "branch": "master", "commit_count": 351, "repo_created_at": "2018-02-19T10:48:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2b35dbe...
6254f501-92a3-4be2-92c2-b8c3236b6bc3
ishandutta2007/codeforces-f
fataleagle/normal/652/F.cpp
#include <bits/stdc++.h> using namespace std; struct ball { long long x, d, i; bool operator< (const ball& other) const { return x<other.x; } } A[300000]; long long N, M; long long T; pair<long long, long long> pos[300000]; int order[300000]; int main() { scanf("%lld%lld%lld", &N, &M, &T...
ALGO
0.999871
3.140938
{ "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": "06bddbab2a10...
f0173400-6972-47e7-80a3-c3014cc799d0
gashe-soo/Algorithm
Baekjoon/11660_구간-합-구하기-5.cpp
// 백준 11660번 구간-합-구하기-5 #include <iostream> using namespace std; int n, m, num, a, b, c, d, sum[1025][1025]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n >> m; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { cin >> num; ...
ALGO
0.999891
4.6912
{ "github_metadata": { "branch": "master", "commit_count": 263, "repo_created_at": "2020-05-12T06:23:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b413171f...
9dcbf6ad-ed2d-45d4-9e58-ccf008750700
xin-lover/leetcode-explore
main330.cpp
//330. 按要求补齐数组 #include <cstdio> #include <vector> #include <unordered_map> using namespace std; int minPatches(vector<int>& nums, int n) { //思路:假设combine(nums)表示nums中的组合数,新加一个数字,会新加combine(nums)+1中可能,暴力求解将是指数级的 //考虑二进制表示,所以整数最多31个数字就可以了,1,2,4,8,16,32…… //其它的数字会有影响吗?比如3会影响4的选用吗?1和3可以代替4,但如果另一个数字同时还使用到1和3...
ALGO
0.999973
5.184486
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2019-07-17T03:13: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": "4ed72bd82...
599278d6-2c60-4a7f-aa03-2de144ad83c7
GradientExplode/Ginkgo
processing/src/library/gkg-processing-numericalanalysis/ExtendedKalmanFilter.cxx
#include <gkg-processing-numericalanalysis/ExtendedKalmanFilter.h> #include <gkg-core-exception/Exception.h> gkg::ExtendedKalmanFilter::ExtendedKalmanFilter( gkg::RCPointer< gkg::KFFunction > K ) : gkg::Kalman( K ) { } void gkg::ExtendedKalma...
ALGO
0.955439
6.707187
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-12-04T02:39:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57248090c10e...
baa49ef2-744b-479a-b1f5-5aa3a1d6d4c0
studouglas/GEANT4-GPU
geant4.10.02/source/processes/hadronic/models/rpg/src/G4RPGOmegaMinusInelastic.cc
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
ALGO
0.977845
5.234913
{ "github_metadata": { "branch": "master", "commit_count": 518, "repo_created_at": "2015-09-13T23:36:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 18, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "385d15...
d915f800-e326-4e5f-9f5c-c84227f16fbb
liujiboy/PSO
pso.cpp
// // pso.cpp // pso // // Created by 刘骥 on 16/1/30. // Copyright © 2016年 刘骥. All rights reserved. // #include "pso.hpp" //静态成员变量必须按照以下方式初始化 Mat PSO::gBest; double PSO::gBestCost=0; Energy* PSO::energy=NULL; PSO::PSO(int id,int min_v,int max_v,int min_p,int max_p) { this->id=id; this->min_v=min_v; ...
ALGO
0.999307
4.327976
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-01-30T15:40: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": "137c3ae9be...
08e478db-cab8-4cca-83be-e357e42eac5e
stephanieizquierdo/FIUBA-TallerDeProgramacionI
Finales Resueltos/2019-1Cuatrimestre/2Fecha/Ej-4.cpp
/* Escribir un programa C que procese el archivo “numeros.txt” sobre sí mismo (sin crear archivos intermedios y sin subir el archivo a memoria). El procesamiento consiste en leer nros hexadecimales de 4 símbolos y reemplazarlos por su valor decimal (en texto). */ //HAY QUE HACER FIXES #include <stdio.h> #include <std...
TOOL
0.911597
3.111862
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2021-07-21T16:41:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1955ce145...
2dd1c659-dd78-4c7a-9808-b444db6e0920
ishandutta2007/codeforces-s
s2speed/normal/1566/D2.cpp
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize ("Ofast") #define all(x) x.begin() , x.end() #define sze(x) (ll)(x.size()) #define mp(x , y) make_pair(x , y) #define wall cerr<<"--------------------------------------"<<endl typedef long long int ll; typedef pair<ll , ll> pll; typedef pair<int , int...
ALGO
0.999917
3.863847
{ "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": "b29222e9c06b...
d90c7da7-959c-41e8-866b-e4e148e83ffd
PengJi/Algorithms
backtrace/lc_93_restore-ip-addresses.cpp
/** * 93. 复原 IP 地址 * https://leetcode.cn/problems/restore-ip-addresses/ */ class Solution { public: vector<string> ans; vector<int> path; // https://www.acwing.com/solution/content/175/ vector<string> restoreIpAddresses(string s) { backtrack(0, 0, s); return ans; } // idx表示...
ALGO
0.999606
5.791913
{ "github_metadata": { "branch": "master", "commit_count": 1239, "repo_created_at": "2020-02-29T08:58: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": "6632389...
13b5648b-a5ec-46d0-8ce6-74fc0cbe3dd6
yogurt-shadow/ARP_CG
SabreCG_multipara/SabreCG/Schedule.cpp
#include "Schedule.h" Schedule::Schedule(vector<Station* > stationList, vector<Aircraft* > aircraftList, vector<Leg* > legList) :_stationList(stationList), _aircraftList(aircraftList), _legList(legList) { for(int i = 0; i < legList.size(); i++) { if (legList[i]->isMaint()) { _maintList.push_back(legList[i]);...
ALGO
0.900702
3.897988
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2023-12-06T07:04:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5423169a2...
87324ee9-322a-4756-9172-239427d11147
dtrad/seismic_unix
clibrary/radonlogbar.cpp
#include "radonlogbar.h" /* Frequency loop for calling logbarrier_method in each frequency. Call logbarrier_interface <NAME> - UBC March - 2001 */ void radonlogbar(float *pos, int nh, float **data, float *t, int nt, float dt,float **model, float *q, int nq, float dq, float fmax, float *Wd, int rtmethod, flo...
ALGO
0.956759
3.980874
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2020-06-25T02:56:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3889550a6...
96af54d0-f0ba-4d89-9e69-1c26211b1d05
whuang08/ROPTLIB
Others/BlasLapackCppWrapper.h
/* Some blas and lapack functions are not easy to use. This class defines wrapper functions which can be used to solve some problems or decomposition, e.g., SVD decomposition, Sylevster equation. More functions will be added in this class. -----WH */ #pragma once #ifndef BLASLAPACKCPPWRAPPER_H #define BLASLAPACKCP...
CONFIG
0.992033
3.908305
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2016-12-26T14:53:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 74, "forks": 26, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9b6ed60...
c1b32cf7-9ad5-481a-bc26-72f55f4de074
u-wyh/luogu-code
P3656.cpp
#include<bits/stdc++.h> using namespace std; #define int long long const int MAXN = 1e5+5; int n; int vis[MAXN]; int arr[MAXN]; int ans; int f[MAXN]; int tree1[MAXN]; int tree[MAXN<<2]; int lazy[MAXN<<2]; int len[MAXN<<2]; int lowbit(int x){ return x&(-x); } int sum(int x){ int ans=0; while(x){ ...
ALGO
0.999891
3.573828
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2025-05-09T09:40: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": "d478bae3be6...
e7977f1b-9449-4f9b-8040-fa6cf34ebb4f
Bearox/Red-Black-Tree
main.cpp
#include <iostream> #include "redBlackTree.h" using namespace std; int main() { redBlackTree tree; int n; cout << "Please enter the number of the tree nodes: "; cin >> n; cout << "Please enter the tree nodes' value: " << endl; for (int i = 0; i < n; ++i) { int x; cin >> x; tree.add(x); } tree.print(); ...
ALGO
0.997189
4.542612
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-08-24T09:39: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": "be74dd4b7e...
275b6696-37d9-4b8e-982e-423732f0e5e9
PX4/PX4-Autopilot
src/lib/mathlib/math/Functions.hpp
/**************************************************************************** * * Copyright (c) 2017-2022 PX4 Development Team. 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. Red...
ALGO
0.991508
7.19544
{ "github_metadata": { "branch": "main", "commit_count": 47555, "repo_created_at": "2012-08-04T21:19:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9767, "forks": 14212, "issues": 1547, "pull_requests": 574 }, "file_meta": { "content_id"...
6e6e20c0-4a3a-4335-b81f-aa62ea8deff7
hardik44ss/100-Days-of-Code
Day 04/01_STL-Array.cpp
#include <iostream> #include <array> #include <algorithm> #include <numeric> // for accumulate using namespace std; int main() { // 1. Initialization array<int, 5> arr = {1, 2, 3, 4, 5}; // 2. Accessing elements cout << "First element: " << arr[0] << endl; cout << "Second element using at(): " <<...
TOOL
0.986713
6.027802
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2024-08-19T06:30:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d73920f1ca...
51199619-158a-43e6-9012-146a0045c91c
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/04/0402/personal_submission/cf739b_hopeworse.cpp
// link https://codeforces.com/contest/739/submission/254682023 void solve() { int n; cin >> n; vector<int> arr(n + 1); vector<pair<int, int>> fa(n + 1), top(n + 1); vector<vector<pair<int, int>>> mp(n + 1); vector<int> cf(n + 1); for (int i = 1; i <= n; i++)cin >> arr[i]; for (int i = ...
ALGO
0.999917
4.014685
{ "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": "128e...
866b023e-eace-4dff-830f-d17806c4f14f
aCoderChild/INT2210_Data-Structure-and-Algorithm
INT2210/Graph/Connected_components.cpp
/* -- pseudocode -- ConnectedComponent() { cnt = 0 for (int i = 1; i <= n; i++) { if (!visited[i]) { ++cnt; dfs(i) } } } */ #include <bits/stdc++.h> using namespace std; #define c 10000 int n, m; vector<int> adj[c]; bool visited[c]; void Input() { cin >> n >> m; for (int i = 0; i < m; i++) { int x, ...
ALGO
0.999827
4.20985
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-07-02T14:35: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": "76bfc37d57b...
78204796-80d3-4387-9c85-56d796dfa4c0
trilinos/Trilinos
cmake/tribits/examples/TribitsExampleProject/packages/mixed_lang/src/Ray_Tracer.cc
//---------------------------------------------------------------------------// // Ray_Tracer.cc //---------------------------------------------------------------------------// #include <cmath> #include <algorithm> #include <numeric> #include "MixedLang_config.h" #include "Ray_Tracer.hh" //--------------------------...
ALGO
0.990706
5.431304
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
605a3e8c-53c1-45ef-b888-b85b52253f40
hassan689/Data_structures
Question1_L230800.cpp
//#include <iostream> //#include <algorithm> //using namespace std; // //// Define a structure for a Node in the AVL Tree //struct Node { // int data; // int height; // Height of the node // Node* left; // Node* right; // // Node(int data) : data(data), height(1), left(nullptr), right(nullptr) {} //}; //...
ALGO
0.999653
4.97466
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-25T04:40: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": "3ceb3d528c0f...
08dc19c3-0b0c-412d-9243-d9f26e7fe65a
ujjawalgupta29/Coding-Stuff
LeetCode/get-qual-substr-budget.cpp
class Solution { public: int equalSubstring(string s, string t, int maxCost) { int len = s.size(); vector<int> cost_i(len, 0); for(int i = 0; i < len; i++) { cost_i[i] = abs(s[i] - t[i]);;; } // for(int x : cost_i) // ...
ALGO
0.999986
5.688432
{ "github_metadata": { "branch": "master", "commit_count": 302, "repo_created_at": "2020-03-28T20: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": "3ad64b4d...
ba1f9098-c160-4cd3-99e5-967c7ab0c061
liuyubobobo/Play-with-Algorithms
03-Sorting-Advance/Course Code (C++)/Chapter-03-Completed-Code/MergeSort.h
// // Created by liuyubobobo on 4/25/17. // #ifndef CHAPTER_03_COMPLETED_CODE_MERGESORT_H #define CHAPTER_03_COMPLETED_CODE_MERGESORT_H #include <iostream> #include <algorithm> using namespace std; // 将arr[l...mid]和arr[mid+1...r]两部分进行归并 template<typename T> void __merge(T arr[], int l, int mid, int r){ //* VS...
ALGO
0.999958
5.393443
{ "github_metadata": { "branch": "master", "commit_count": 311, "repo_created_at": "2016-07-05T18:16:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3700, "forks": 1461, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b...
e00d9221-7cb4-43f4-8785-7059080f204b
TanRai/Online_Judge_Solves
Codeforce/1027_div_3/D.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; using u64 = unsigned long long; using u32 = unsigned; using u128 = unsigned __int128; using i128 = __int128; void solve() { int n; cin>>n; vector<pair<i64,int>> x(n); vector<pair<i64,int>> y(n); for(int i=0;i<n;i++) { cin>>x[i]....
ALGO
0.999687
4.80221
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2025-03-18T15:42:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b1eca9f2c3...
d5758a36-a689-4535-996b-0bde4125f571
chromium/pdfium
core/fxge/dib/cfx_imagetransformer.cpp
// Copyright 2017 The PDFium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxge/dib/cfx_imagetransformer.h" #include <math.h> #include <array> #include <i...
ALGO
0.96411
7.524134
{ "github_metadata": { "branch": "main", "commit_count": 17478, "repo_created_at": "2019-11-11T18:46:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 425, "forks": 94, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "716c19...
c42fc5e3-1873-4588-91b1-e74e5212cd4e
parsa/blaze
blazemark/src/main/DMatTrans.cpp
//================================================================================================= /*! // \file src/main/DMatTrans.cpp // \brief Source file for the dense matrix transpose benchmark // // Copyright (C) 2012-2020 <NAME> - All Rights Reserved // // This file is part of the Blaze library. You can redi...
TEST
0.990002
6.203197
{ "github_metadata": { "branch": "master", "commit_count": 11254, "repo_created_at": "2017-10-05T17:13:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 64, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3dade...
599ca440-195b-4873-87af-5c58f726ff5f
ishandutta2007/codeforces-d
dragonslayerintraining/normal/976/F.cpp
#include <cstdio> #include <algorithm> #include <vector> int res[4002][4002]; int SRC,SNK; int flow=0; std::vector<std::pair<int,int> > elist; std::vector<int> edges[4002]; int deg1[2000]; int deg2[2000]; bool vis[4002]; bool dfs(int node){ if(node==SNK) return true; if(vis[node]) return false; vis[node]=tru...
ALGO
0.999969
3.764216
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "c75fdad6ac8a...
a61c9302-2b82-4a73-aad3-625291bea5aa
maksuranuha/Numerical-Lab
Least Squares Method.cpp
#include <iostream> #include <vector> #include <iomanip> #define nl '\n' #define ll long long using namespace std; void leastSquares(const vector<ll>& x, const vector<ll>& y, double& a, double& b) { int n = x.size(); ll sum_x = 0, sum_y = 0, sum_x2 = 0, sum_xy = 0; cout << "\nX\tY\tX^2\tXY\n"; for (in...
ALGO
0.999066
4.628983
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-09-09T07:54:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69fc264cc22...
72614447-9662-4491-b9a6-089fbc599595
justinmathew2/Data_Structures_Lab_Code
Exp 6/main.cpp
/* Linked list implementation of stack and queue*/ #include <iostream> using namespace std; struct node { int info; node*link; }; node*FRONT=NULL; node*REAR=NULL; node*top=NULL; node*temp; //Stack operations void push(int data) { temp=new node; temp->info=data; temp->link=to...
ALGO
0.999026
4.716278
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-10-08T13:25:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1114e7cb420...
055a3869-2368-4c8b-90f6-ca7dddca7eea
leedongyull/Baekjoon
BaekJoon/1755 숫자놀이/1755 숫자놀이/소스.cpp
#include <iostream> #include <cstring> #include <algorithm> using namespace std; string one = "one"; string two = "two"; string three = "three"; string four = "four"; string five = "five"; string six = "six"; string seven = "seven"; string eight = "eight"; string nine = "nine"; string zero = "zero"; string num[100] ...
ALGO
0.999945
3.990095
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2022-07-20T01:45: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": "0ac102a79ea...
d4e17c9e-0679-4a7e-b3cd-06bdda9d20e6
sandialabs/platoanalyze
src/stabilized/PressureGradientProjectionResidual_decl.hpp
#pragma once #include "ApplyWeighting.hpp" #include "stabilized/AbstractVectorFunction.hpp" namespace Plato { namespace Stabilized { /******************************************************************************//** * \brief Evaluate pressure gradient projection residual (reference Chiumenti et al. (2004)) * * ...
ALGO
0.997737
6.315434
{ "github_metadata": { "branch": "develop", "commit_count": 4014, "repo_created_at": "2024-01-09T21:15:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9674544...
332ec1c2-1ac3-4d86-9aee-7c9a7de20a1a
ishandutta2007/codeforces-d
dxqwq/normal/1285/F.cpp
// Problem: F. Classical? // Contest: Codeforces - Codeforces Round #613 (Div. 2) // URL: https://codeforces.com/problemset/problem/1285/F // Memory Limit: 256 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) //And in that light,I find deliverance. #include<bits/stdc++.h> #pragma GCC optimi...
ALGO
0.999589
4.692229
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "e0a31de87b67...
78c30d4f-13b5-461c-9d17-8d1200163685
Slava/competitiveProgramming
timus/timus_1287.cpp
#include <cstdio> #include <cstdlib> #define max(a,b) (a>b?a:b) #define dbg(X) for(int z = 0; z < n; z++)printf("%d ", X[k][z]); int a[2][1500], dg[2][1500], gd[2][1500], v[2][1500], p[2], h[1500], n, k; char m[1500]; int main (){ scanf("%d%s", &n, m); for (int i = 0; i < n; i++) a[0][i] = m[i] == 'S'; p[a[0][0]...
ALGO
0.999998
3.181302
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2013-04-19T18:39:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "554fc2fdc0...
20b19646-b10b-49b9-b84c-a67b02ecf9fa
Uber-Career-Prep-2023/Uber-Career-Prep-Homework-Garv-Shah
Assignment3/minHeap.cpp
#include <iostream> #include <vector> #include <cassert> using namespace std; class Heap { private: int size; int max; int *arr; // the underlying array public: Heap(int max){ size = 0; this -> max = max; arr = new int[max]; // creates an array with size = max for(int ...
ALGO
0.998561
4.635133
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-03-14T01:47:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72d19d8d94...
bb0be48d-11bf-419b-a812-4775c66cefeb
Kaminyou/MyLeetcode
cpp_solutions/684.cpp
class DisjointSet { private: vector<int> parent; vector<int> rank; public: DisjointSet(int size) { parent.resize(size, 0); rank.resize(size, 0); for (int i = 0; i < size; i++) parent[i] = i; } int find(int x) { if (parent[x] != x) { parent[x] = find(parent...
ALGO
0.999978
5.654543
{ "github_metadata": { "branch": "main", "commit_count": 1983, "repo_created_at": "2022-04-30T05:11:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "afd70b5e...
d26552d6-fe12-4bc2-b398-c6b42070f599
sshige/test
ompl/CircleObjectManipulation/CircleObjectPath.cpp
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2010, Rice University * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions...
ALGO
0.965955
6.654634
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2019-05-31T04:56: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": "d1344901...
d532f609-2b5d-4893-9d55-df2db24e92ec
LiangYuHai/-offer
WYtest1.cpp
// // Created by Administrator on 2020/4/11 0011. // #include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <cmath> using namespace std; vector<vector<int>> dirs = {{1,0},{-1,0},{0,1},{0,-1},{1,1},{-1,-1},{1,-1},{-1,1}}; double distance(int i, int j, int start_i, int sta...
ALGO
0.99992
5.162032
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-11-29T03:30: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": "01fbb02d9...
fcb4e1d2-9de1-4080-8d4b-d8690ef65ad2
IEIAuto/AutoDRRT
src/autodrrt.application/control/pure_pursuit/include/pure_pursuit/pure_pursuit_node.hpp
// Copyright 2020 <NAME>, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
TOOL
0.949301
7.563609
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-08-11T02:20:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 14, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "7e3131c56...
6984a15b-6c35-4cc7-a104-502cf7e77969
gbakkk5951/OriginalProblems
ProblemSolvingOJ/2st_term/week6/复杂二分/finder.cpp
#include <bits/stdc++.h> using namespace std; typedef long long lld; const int maxn = 1.8e7 + 10; lld A, B, C, MOD; lld OA; lld L; int n, m; lld get_random() { return A = C + (A * B) % MOD; } int a[maxn]; int end1, end2; int mxlen; bool confirm() { int need_loop = 100000, min_into = 5000; map<int, int> mp; for (int...
ALGO
0.990505
3.009545
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-12-27T14:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1cb5dc395f...
e4e636cc-8a2d-4842-999a-12e33120d6fe
squaresLab/BatFix
results/transcoder/translations/java/NUMBER_WAYS_INSERT_CHARACTER_INCREASE_LCS_ONE.cpp
int numberofways ( string A , string B , int N , int M ) { vector < vector < int >> pos ; for ( int i = 0 ; i < MAX ; i ++ ) { pos . push_back ( vector < int > ( ) ) ; } for ( int i = 0 ; i < M ; i ++ ) { pos [ B [ i ] ] . push_back ( i + 1 ) ; } vector < vector < int >> dpl ( N + 2 , vector...
ALGO
0.999977
3.826314
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-05-21T15:21:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "052a37113075...
7d79db91-fa2c-4b84-ab87-bd8616b62ae6
jdw1042710/AlgorithmStudy
1019.cpp
#include <iostream> #include <vector> using namespace std; long long N = 1000; // vector<long long> digits; long long digits[10] = {0}; void Solution(); void CountDigitsBetween(int A, int B, int adder); void CountDigit(int n, int adder) { while (n > 0) { digits[n % 10] += adder; n /= 10; } } int main() { io...
ALGO
0.999511
3.922567
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-07-12T08:12: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": "35cd42641...
70d628b0-d780-49e9-b125-78af2117fe63
google-research/google-research
scann/scann/utils/gmm_utils.h
// Copyright 2025 The Google Research Authors. // // 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.996213
7.46237
{ "github_metadata": { "branch": "master", "commit_count": 4832, "repo_created_at": "2018-10-04T18:42:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36026, "forks": 8143, "issues": 1061, "pull_requests": 576 }, "file_meta": { "content_id...
90cd39a9-ab37-4d22-b339-a7f0b212d197
Waqar-107/Codeforces
C-set/1051C.Vasya and Multiset.cpp
/***from dust i have come, dust i will be***/ #include<bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define dbg printf("in\n") #define nl printf("\n"); #define N 1100 #define inf 10000000000000000 #define sf(n) scanf("%d", &n) #define sff(n,m) scanf("%d%d",&n,&m) #define sfl(n) scanf...
ALGO
0.99999
3.059744
{ "github_metadata": { "branch": "master", "commit_count": 1441, "repo_created_at": "2017-02-23T10:29:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 208, "forks": 91, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "5efa...
6dac2996-d5ea-4635-b683-5085cb9c2f66
AlexGliesch/competitive-programming
competitions/4a Maratona UFFS/F - A Ordem da Fenix.cpp
#include <string> #include <algorithm> #include <vector> #include <iostream> #include <ciso646> #include <cstring> #define MAXN 100010 using namespace std; struct SuffixArray { public: /* * build a suffix array * */ void build(const string& T) { construct_sa(T); compute_lcp(); } /* * returns the longest...
ALGO
0.999992
3.644774
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-05-01T04:18: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": "f14968c132b...
a38befcd-700c-40cd-8d6f-52ecb324697b
nxhhoang/MarisaOJ-roadmap-solution
Roadmap/Level 3/Dynamic Programming/Introduction to Dynamic Programming (Part two)/Palindrome/code_v2.cpp
// nxhhoang - the dreamer #include <bits/stdc++.h> #define FOR(i, a, b) for (int i = a; i < (int)b; i++) #define endl '\n' #define ub upper_bound // find target < min(value) #define lb lower_bound // find target <= min(value) #define all(a) (a).begin(), (a).end() #define pii pair<int, int> #define pll pair<ll, ll> #de...
ALGO
0.999935
3.588123
{ "github_metadata": { "branch": "main", "commit_count": 627, "repo_created_at": "2024-12-31T10:12:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5fc9bea358...
8eb826d8-400e-4a97-b4db-b3b661133149
qilip/ACMStudy
baekjoon/7569/source.cpp
#include <bits/stdc++.h> using namespace std; const int DIM = 3; const int MAXN = 1e6 + 10; int nm[DIM]; int psnm[DIM+1] = {1, }; int n = 1; int box[MAXN]; int cnt_zro; int main(void){ for(int i=0;i<DIM;i++){ cin >> nm[i]; n *= nm[i]; psnm[i+1] = psnm[i] * nm[i]; } for(int i=0;i<n;i++){ cin >> box[i]; cnt_zro += ...
ALGO
0.999962
3.415775
{ "github_metadata": { "branch": "master", "commit_count": 292, "repo_created_at": "2018-03-07T07:09:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "43da797b...