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
a3d79a3b-1081-4520-86f3-6d80c652739a
aBBassam/CP-Solutions
CodeForces/GNU C++20 (64)/859E | Desk Disorder/152280059.cpp
#include <bits/stdc++.h> #define ll long long #define all(x) x.begin(),x.end() #define answer(x) cout << (x ? "YES\n" : "NO\n") #define test ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int T; cin >> T; while(T--) #define go ios::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define F first #define S second using na...
ALGO
0.999748
4.30446
{ "github_metadata": { "branch": "main", "commit_count": 543, "repo_created_at": "2022-08-19T12:03:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c86dfb4116...
32a5030b-3db1-422f-bc53-befb89f047e3
Ankii07/DSA-Stack
Sliding_Window_Maximum.cpp
class Solution { public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { int n = nums.size(); //kyuki hume front aur back dono se operation ke saath deal krna hai to hum use krenge deque.. deque<int> dq; // for storing the result vector<int> result; ...
ALGO
0.999935
6.367282
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-30T15:42:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9bab9767b0f...
0ed90d87-2df5-4b35-b6e9-0ac4eb52acfd
diantaowang/cocoding
912_sort_array.cc
#include <cstdlib> #include <pthread.h> #include <type_traits> #include <vector> #include <algorithm> #include <string> #include <map> #include <set> #include <iostream> #include <tuple> #include <queue> #include <stack> using namespace::std; class Solution { public: int partition(vector<int>& nums, int l, int r,...
ALGO
0.999704
5.821037
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-01-23T02:46: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": "91f304a283...
c601e1a5-c5b0-41a5-9598-f4aa66b8bac9
timyang2010/cuda_orb
Examples/Orb_Experiments/main.cpp
#include <opencv2/opencv.hpp> #include "Orb.h" #include <vector> using namespace cv; using namespace std; #define _USE_MATH_DEFINES #include <math.h> vector<Orb::Feature> TrackKeypoints(Mat& frame, Orb& orb, int max_keypoints = 2000) { Mat grey; cvtColor(frame, grey, CV_BGR2GRAY); vector<ty::Keypoint> corners = o...
ALGO
0.997908
5.044375
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2017-08-17T06:30:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "501eec059...
9d6422e6-a3d8-4085-9dc5-e26d1469c3ac
st9540808/UVa
hw12/UVA-675.cpp
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <algorithm> struct point { int x, y; bool operator<(const point& p) const { return this->x < p.x || (this->x == p.x && this->y < p.y); } bool operator==(const point& p) const { return this->x == p.x && th...
ALGO
0.999984
4.469829
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-10-07T05:59: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": "80e5aa068...
e6df16d9-d0a3-49a5-9693-4c393dc1fe3e
ICPCMansoura/Level-1-2024-2025-Contests-solutions-
Phase 1 - Level 1 - Contest 5/F.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <class T> using Ordered_Set = tree< T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <class T> using Ordered_Multiset = tree< T, n...
ALGO
0.999992
4.940643
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-10-07T16:21:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ae67b47bf7f...
5731f269-e653-4e0d-843a-decb796fcb31
navaljangir/DSA_A2Z
Dynamic Programming/Partition DP/booleanParenthesization(EvaluateExpressToTrue).cpp
//Memoization #define ll long long class Solution{ int mod = 1003; public: int solve(int &n , int i , int j , int isTrue , string &s , vector<vector<vector<ll>>>&dp){ if(i>j){ return 0; } if(i==j){ if(isTrue){ return s[i]=='T'; }else{ ...
ALGO
0.999996
5.184269
{ "github_metadata": { "branch": "main", "commit_count": 224, "repo_created_at": "2023-09-23T15:00: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": "0c5b3a6add...
210f4fd3-41b9-4959-94f2-c03f38a18d69
roblee89968/MachineLearning
hmm.h
#include <iostream> #include <vector> #include <algorithm> #include <functional> #include <cassert> #include <iterator> template<typename T = double> class HMM{ private: int states_num; int observables_num; /* t_probs: | S1 | S2 ----------------------- S1 |S1->S1 | S2->S1 ----...
ALGO
0.999942
5.720943
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-10-07T00:36: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": "3fd83de390...
4aff7c45-f59f-430a-b848-61e93d377991
MaoQiankun97/leetcode_notes
leetcode/codes/cpp/126.cpp
#include <iostream> #include <algorithm> #include <unordered_map> #include <unordered_set> #include <vector> #include <queue> #include <sys/time.h> //添加头文件 using namespace std; int64_t getCurrentTime() //直接调用这个函数就行了,返回值最好是int64_t,long long应该也可以 { struct timeval tv; gettimeofday(&tv,NULL); //该函数在sy...
ALGO
0.999992
4.73981
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-04-23T09:31: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": "c106a828d72...
1d94bf2e-faa2-4e40-876a-93965021d765
Nlict-RC/course_agv_slam_task
src/icp_lm.cpp
#include "ros/ros.h" #include "ros/console.h" #include <stdio.h> #include <numeric> #include <vector> #include <Eigen/Eigen> #include "ros/publisher.h" #include "ros/subscriber.h" #include "nav_msgs/Odometry.h" #include <tf/transform_broadcaster.h> #include <sensor_msgs/LaserScan.h> #include <visualization_msgs/Marke...
ALGO
0.902132
5.795321
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-03-30T02:26:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d330113a107...
fb8b322e-f87c-4704-8e07-cdc6be6db89e
Tingwei-Jen/YOLOv8_TensorRT_CUDA_DeepSort
object_tracking/lib/sort/include/track.h
// track.hpp #ifndef TRACK_HPP #define TRACK_HPP #include <iostream> #include <Eigen/Dense> #include <vector> #include "detection_sort.h" #include "kalman_filter.h" enum class TrackState { Tentative, Confirmed, Deleted }; /** * @brief Class representing a track. * A single target track with ...
TOOL
0.91191
7.48181
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-07-19T02:35:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "730108949ba...
5d6b9b38-7cd9-4fb9-a6fb-6d6daa3b8292
nmhienbn/Competitive-Programming
Mr.Minh/10.1.2022/cubics/cubics.cpp
#include <bits/stdc++.h> #define fi(i, a, b) for(int i = (a), _b = (b); i <= _b; i++) #define fid(i, a, b) for(int i = (a), _b = (b); i >= _b; i--) #define gb(x, i) (((x) >> (i)) & 1) #define pii pair<long long,int> #define pb push_back #define ll long long #define Irelia "cubics" const int maxn = 1e5 + 5; using namesp...
ALGO
0.999987
3.325847
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-02-11T14:40:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d9ebf148bf...
aecfd3b5-f761-462a-a439-5a5c92f1fcb2
ldcm3/Tech-Interview-Studies
algorithms/sorting/mergeSort.cc
/* O(nLogn) in all 3 cases (worst, average and best) O(n) extra space */ #include<iostream> #include<vector> using namespace std; void merge(vector<int>& arr,int l,int m,int r) { vector<int> left (arr.begin() + l, begin(arr) + m + 1); vector<int> right (arr.begin() + m + 1, arr.begin() + r + 1)...
ALGO
0.999995
6.005755
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2016-12-22T09:28:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db0f150c4...
28126d7f-00cd-4763-9ad0-ce95f14ff543
reachanihere/Data-Structures-and-Algorithms
Graphs/IsConnected.cpp
/* Given an undirected graph G(V,E), check if the graph G is connected graph or not. V is the number of vertices present in graph G and vertices are numbered from 0 to V-1. E is the number of edges present in graph G. Input Format : Line 1: Two Integers V and E (separated by space) Next 'E' lines, each have two space-...
ALGO
0.999983
5.561513
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2019-10-05T17:27:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 146, "forks": 113, "issues": 2, "pull_requests": 11 }, "file_meta": { "content_id": "7e76...
729098df-0600-4b49-b10e-1ce75c9e1af4
trilinos/Trilinos
packages/ml/examples/MLAPI/EpetraInterface.cpp
/* ******************************************************************** */ /* See the file COPYRIGHT for a complete copyright notice, contact */ /* person and disclaimer. */ /* ******************************************************************** */ #include "ml_common...
ALGO
0.997065
5.261586
{ "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":...
c349eee7-98d3-497f-80f1-79fa3af24555
tomka/copo
dependencies/include/cgv/math/linalg/sub.h
#pragma once #include <cgv/math/linalg/col_vec.h> #include <cgv/math/linalg/row_vec.h> #include <cgv/math/linalg/mat.h> #include <cgv/math/linalg/diag_mat.h> #include <cgv/math/linalg/scl_mult.h> namespace cgv { namespace math { namespace linalg { template <class T> row_vec<T> operator-=(row_vec<T>& v1,const ro...
TOOL
0.964973
5.711884
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2010-08-26T17:06:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "0e16c1bd4b...
9d22ea76-17b9-49e2-b4f5-b18a8b8d4578
jandonov/comp-prog-codeforces
Codeforces Round #578 (Div. 2)/D.cc
#include <iostream> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <string> #include <algorithm> #include <sstream> #include <climits> #include <fstream> #include <cmath> using namespace std; /// ********* debug template by ...
ALGO
0.999718
3.679242
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-10-30T10:58:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6baa7f85cd...
4b09a190-50d9-46af-8812-75a97750d234
SaladJack/ragdoll_simulator
Source/PhysXCharacterKinematic/src/CctUtils.h
/* * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this so...
TOOL
0.957587
6.144879
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-11T07:25:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "670869b5c...
c374a936-9088-4884-aa13-17d7cb2ba1de
henrypoon/GDWG
Graph.h
#ifndef ASSN3_GRAPH_H #define ASSN3_GRAPH_H #include <memory> #include <vector> #include <algorithm> #include <iostream> #include <iterator> #include <cassert> #include <stdexcept> #include <list> namespace gdwg { template <typename N, typename E> class Graph { class Edge; class Node; public: Graph() {}; ...
ALGO
0.966263
5.083542
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2017-09-14T08:42: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": "e7162f516...
abd16286-6cc6-495e-af07-975fd4c7e85e
pertus123/Algorithm
baekjoon/1706.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int R, C; vector<string> sArr; char board[21][21]; void input() { scanf("%d %d", &R, &C); for (int i = 0; i < R; i++) for (int j = 0; j < C; j++) scanf(" %c", &board[i][j]); } void hori() { for (int i = 0; i < ...
ALGO
0.999813
4.121731
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-01-09T11:09: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": "42ece57cd26...
04bd6138-445d-4afb-9ac1-3bda79534f85
ardasaritas/ctis152
LG11/AQ1.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 50 void menu(int *choice); int readFromFile(FILE *in, char names[][MAX]); void display(char names[][MAX], int size); void swap(char str1[], char str2[]); void bubbleSort(char names[][MAX], int size); int binar...
TOOL
0.991284
3.536012
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-15T21:07: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": "6e7fe4668346...
b987dd17-3b73-46c0-818d-51383be69b72
devwithshahzaib/Learn_DSA
Basics/sumOfAllEvenNo.cpp
#include <iostream> using namespace std; int main() { int number; int sum = 0; cout<<"Enter no. "; cin>>number; for (int i = 1; i <= number; i++) { if (i % 2 == 0) { sum = sum + i; } } cout << "Sum of EVEN No\'s in " << number << " is " << sum << endl...
ALGO
0.999835
4.590692
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2022-12-11T14:54: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": "2ef8d2578...
58768169-8815-4edb-aaa4-aaa4ac7a0e92
Savio-Carlos/Maratona
Contests/ContestInterno3/C.cpp
#include <bits/stdc++.h> using namespace std; #define winton ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(NULL) #define endl '\n' #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define int long long #define ld long double const int MOD = 1e9+7; vector<int> prime; void factor (int n...
ALGO
0.999965
4.133369
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2025-05-16T17:28:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dae928434a3...
981b45bb-b644-4794-9bed-e2eab15286b3
LarIsCoding/competitive-programming
study/planilha-obi/kruskal/resgate-em-queda-livre.cpp
#include <iostream> #include <vector> #include <math.h> #include <iomanip> using namespace std; typedef pair<int,int> ii; typedef vector<int> vi; typedef long long int ll; #define mp(i, j) make_pair(i, j) const int inf = (int)1e9; const ll mod = (ll)1e9 + 7; const ll linf = (ll)1e17; class UnionFind { private...
ALGO
0.999247
4.790154
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2022-10-18T23:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db5c3858d4...
eff8998a-5dbd-46d1-8321-c9683f854496
arielsilveira/PAA
BruteForce/ConvexHull/convexHull.cpp
#include "exec_4_6.hpp" double state_signal = 0; double value = 0; int cnt = 0; bool checkSignal(){ if(value >= 0 && state_signal >= 0){ return true; } else if(value < 0 && state_signal < 0){ return true; } return false; } bool colinearity(pair<int, int> p1, pair<int, int> p2, vector<...
ALGO
0.998744
4.019527
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2021-03-23T00: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": "6fcb2ad4885...
e07a170f-b051-4c86-a25e-ca67f57203bf
ia-toki/osn-2024
osn-2024-batik/solution-6.cpp
#include <bits/stdc++.h> using namespace std; const int MXN = 500, MXM = 500; const int INF = 1e9; struct val { int mn[2] = {INF, INF}, mx[2] = {-INF, -INF}; }; inline val mrg(val v1, val v2) { val tmp; for(int ii = 0; ii < 2; ii++) { tmp.mn[ii] = min(v1.mn[ii], v2.mn[ii]); tmp.mx[ii] = max(v1.mx[ii], v2.mx...
ALGO
0.999979
4.375184
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-08-29T14:22:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13b6195b13e65...
f2946b21-ba30-481f-bd1f-d58201021878
chenhaiwu/leetcode
2cpp/hot100_17/hot100_17.cpp
#include <iostream> #include <string> #include <vector> #include <queue> #include <map> using namespace std; /* 优化代码前 */ // map<int, string> myKeyStr = { // {2, "abc"}, // {3, "def"}, // {4, "ghi"}, // {5, "jkl"}, // {6, "mno"}, // {7, "pqrs"}, // {8, "tuv"}, // {9, "wxyz"}}; // class...
ALGO
0.999777
5.551362
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-05-16T12:45:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d815dee3...
03214b9b-aef6-4575-9e0f-ce1c18be4fdd
ishandutta2007/codeforces-f
falldream/normal/936/D.cpp
#include<algorithm> #include<iostream> #include<cstring> #include<cstdio> #define MN 4000000 using namespace std; inline int read() { int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } pair<int,int> Ans[M...
ALGO
0.999985
3.057308
{ "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": "6dae5b1769f1...
a6f86c03-f687-4437-8f29-7783dff000c1
tnagler/kde1d
inst/include/kde1d/stats.hpp
#pragma once #define BOOST_MATH_PROMOTE_DOUBLE_POLICY false #include "tools.hpp" #include <Eigen/Dense> #include <algorithm> #include <boost/math/distributions.hpp> #include <boost/math/special_functions/hermite.hpp> #include <random> #include <vector> namespace kde1d { //! statistical functions namespace stats { /...
ALGO
0.999285
5.899616
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2018-03-19T22:57:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "045ce4d9ca...
95d010b3-761c-47e8-aeb5-7b31bf89f366
yyhaos/Data-Structures-and-Algorithms
kuangbin/[kuangbin带你飞]专题一 简单搜索/D Fliptile .cpp
#include<stdio.h> #include <string.h> #include<iostream> #include<queue> using namespace std; // O()=2^15*15*15=7372800 int dp[1<<15+5]; int f[20][20]; int maze[20][20]; void c(int x,int y) { maze[x][y]=1-maze[x][y]; } int n,m,cnt; int ans[20][20]; int tem[20][20]; int ff[20][20]; void flip(int x,int y) { ...
ALGO
0.99996
3.659028
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2018-03-25T14:21:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38289952d...
b45fe102-9e4c-4499-a461-b9861d44e4ec
klishtshashank/Programming-Problems
2256-minimum-average-difference/2256-minimum-average-difference.cpp
class Solution { public: int minimumAverageDifference(vector<int>& nums) { // int n= nums.size(); // vector<int> presum(n); // presum[0]=nums[0]; // for(int i=1;i<nums.size();i++) // { // presum[i]= presum[i-1]+nums[i]; // } // vector<int>post(...
ALGO
0.999933
6.313851
{ "github_metadata": { "branch": "main", "commit_count": 1240, "repo_created_at": "2022-03-03T14: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": "f652643dc...
a1f575c1-0ac0-43c3-b70c-8b29eb56b510
MimPe9/Bioinformatics_course
3.2 Median String Problem/3.2 Median String Problem/Source.cpp
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <string> using namespace std; vector<string> Combinations(int k) { vector<string> bases = { "A", "C", "G", "T" }; vector<string> dna = { "A", "C", "G", "T" }; for (int n = 1; n < k; n++) { vector<string> dnaNew...
ALGO
0.999968
5.066259
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-04-05T19:13: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": "217dbfb837...
f553871a-03f8-442d-9f27-834b54df556b
DebugMind/Algorithm
Algorithm/edu_4.c++
# include <iostream> using namespace std; # define ll long long # define MAX 300000 # define INF 987654321 ll c[MAX], d[MAX], h[MAX], D[MAX]; ll H[MAX]; int cal(ll d, ll h, ll D, ll H) { int ret = 1; while (h*d <= D*H) { ret++; d += d; } return ret; } int main() { int n,m,C; cin >...
ALGO
0.999959
3.502806
{ "github_metadata": { "branch": "main", "commit_count": 319, "repo_created_at": "2021-12-07T03:04:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66c8f50141...
5fd3fd7c-7c6e-4438-8db5-cde4b952941a
saqibalijavaid/70daysOfCode
Day_56_countSubarrays(2962_LC).cpp
class Solution { public: long long countSubarrays(vector<int> &nums, int k) { int max = INT_MIN; int n = nums.size(); for (int i = 0; i < n; i++) { if (nums[i] > max) max = nums[i]; } int left = 0, right = 0, count = 0; long lo...
ALGO
0.999978
6.366973
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2024-02-03T17:09: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": "f371f14f9b0...
f0da8aca-1db1-4493-9dda-c78e8db87ba2
ChengHao1110/Leetcode
Leetcode_61_Rotate List/leetcode61.cpp
#include<iostream> #include<vector> #include<fstream> #include<string> #include<sstream> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; cla...
ALGO
0.999308
5.084523
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-10-30T03:45: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": "c94cd7552c1f...
35c0edbc-0a92-40d9-9b13-8be3ca686f50
yamate11/compprog
zCodeForces/er088/d/cans.cc
#include <bits/stdc++.h> #include <cassert> typedef long long int ll; using namespace std; // @@ !! LIM(f:updMaxMin debug) // --> f:updMaxMin f:<< debug // ---- inserted function updMaxMin from util.cc template<typename T> bool updMax(T& tmax, const T& x) { if (x > tmax) { tmax = x; return true; } else {...
ALGO
0.999976
3.835633
{ "github_metadata": { "branch": "main", "commit_count": 219, "repo_created_at": "2021-03-11T06:12: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": "e75ecb6491...
ad2da549-be54-4273-82d5-fdcce06752dc
ChuanqiTan/introduction-to-algorithms-notes
Introduction to Algorithms Projects/Intorduction to Algorithms/neatly_print.cpp
////////////////////////////////////////////////////////////////////////// /// @file neatly_print.cpp /// @brief 整齐打印问题 /// @details COPYRIGHT NOTICE /// Copyright (c) 2011 /// All rights reserved.\n /// /// /// @author 谭川奇 chuanqi.tan(at)gmail.com /// @date 2011/06/17 /// @version 1.0 /////////////////...
ALGO
0.993337
4.387814
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2015-06-22T13:53:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2810ca3a7...
c03195dc-323e-45fa-8e19-e6edaa025f22
AbdelruhmanSamy/competitive-programming
CF/Light Switches_193C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define pii pair<int , int> #define lp(i, j, n) for (int i = j; i <= n; i++) #define vi vector<int> #define popcnt(a) __builtin_popcount(a) #define vvi vector<vector<int>> #define vll vector<ll> #define vch vector<char> #define vvll vector<vector<ll>>...
ALGO
0.999842
3.736651
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2023-07-11T12:25:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea6f1fd3ae6...
5ff6cbd3-1117-418e-8116-710ea024e86f
RobotLocomotion/drake
geometry/optimization/cspace_free_box.cc
#include "drake/geometry/optimization/cspace_free_box.h" #include <array> #include <limits> #include <map> #include <memory> #include <unordered_set> #include <utility> #include "drake/common/fmt_eigen.h" #include "drake/geometry/optimization/cspace_free_internal.h" namespace drake { namespace geometry { namespace o...
ALGO
0.99901
6.493563
{ "github_metadata": { "branch": "master", "commit_count": 33726, "repo_created_at": "2014-01-26T16:11:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3630, "forks": 1305, "issues": 690, "pull_requests": 46 }, "file_meta": { "content_id":...
28ba2567-4cdf-44b2-a4c4-8b509fa1054d
applied-numerical-algorithms-group-lbnl/proto
examples/_archived/forallKernel/exec/forallKernel.cpp
#include <cstdio> #include <cstring> #include <cassert> #include <cmath> #include <vector> #include <memory> #include <iostream> #include <fstream> #include <sstream> #include "Proto.H" #include "Proto_DebugHooks.H" #include "Proto_WriteBoxData.H" #include "Proto_Timer.H" #include "Proto_DisjointBoxLayout.H" #include...
ALGO
0.999271
4.402315
{ "github_metadata": { "branch": "master", "commit_count": 2289, "repo_created_at": "2021-11-18T00:07:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "45b77a4e...
f9bbcdea-b308-438b-87e5-f212ccb396d1
NickLennonLiu/cpp
oop/lecturenotes/code/async_prime.cpp
#include <iostream> #include <cmath> #include <vector> #include <thread> #include <future> #include <random> using namespace std; int total = 0; bool check_num(int num){ if(num==1) return 0; for(int i=sqrt(num);i>1;i--){ if(!(num%i)){ return false; } } return true; } defau...
ALGO
0.998792
4.634235
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2020-07-15T14:23:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9be5e7cab...
cadce38e-7c6d-4bc0-a9a7-824e86646a95
juhuayu/algorithm
use_cplus/wisdom/array_island.cpp
/* 岛问题 一个矩阵中只有0和1两种值,每个位置都可以和自己的上、下、左、右 四个位置相连, 如果有一片1连在一起,这个部分叫做一个岛,求一个矩阵中有多少个岛? 001010 111010 100100 000000 这个矩阵有三个岛 并行算法(多核CPU解决思路): 例: 将矩阵从中间分成2半, cpu1处理左边并记录矩阵右边界信息(记录右边界岛的感染来源), cpu2处理右边并记录矩阵左边边界信息(记录左边界岛的感染来源), 处理完之后,将cpu1右和cpu2左边界上的信息做并查集,以来源做区分检查岛是否碰撞(碰撞了则合并) A2222A C22222 200000 000002 20B22B C22222 202000...
ALGO
0.999923
4.930795
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2022-11-16T01:43:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1a13f7cb76...
5155b9fe-b50d-40b4-97b0-9df3019039db
Hardik2972/2K22-CO-189_hardik_garg_DS
Exp54_bst_creation_deletion/code.cpp
#include <iostream> class Node { public: int data; Node* left; Node* right; Node(int value) : data(value), left(nullptr), right(nullptr) {} }; class BinarySearchTree { public: BinarySearchTree() : root(nullptr) {} // Function to insert a value into the BST void insert(int value) { ...
ALGO
0.999979
6.874851
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-10-25T16:39:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7155b4e76f...
0c980bfc-4005-4271-8e5d-4224ed9dbfce
jeontigger/CodingTest
백준/Silver/1003. 피보나치 함수/피보나치 함수.cc
#include <vector> #include <iostream> #include <string> #include <algorithm> #include <queue> #include <cmath> #include <stack> #include <unordered_map> #include <set> #include <sstream> using namespace std; #define INF 1e9 template<typename T> void PrintVec(const vector<T>& v) { for (T i : v) { cout << i << " ";...
ALGO
0.999968
4.035103
{ "github_metadata": { "branch": "main", "commit_count": 743, "repo_created_at": "2023-10-10T07:18: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": "81b8993f63...
e5b087f9-b64f-4e2f-8371-e4d5e260feb0
Mun-Seong/Algorithm_Cpp
Base_algorythm/moving_pipe.cpp
#include <iostream> using namespace std; int n; int board[17][17]; int xx[3] = {0, 1, 1}; int yy[3] = {1, 1, 0}; int count; bool ok(int x, int y, int dir) { if (dir == 0) { for (int i = 0;i < 1;i++) { int nx = x + xx[i]; int ny = y + yy[i]; if (!(nx > 0 && nx <= n && ny > 0 && ny <= n && board[nx][...
ALGO
0.999946
4.038711
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2022-02-22T08:46: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": "26c4a8e33...
a76b5e7c-3eb7-4c35-8995-970394a52259
raincross7/code-similarity
codes/train_code/problem377/problem377_114.cpp
#pragma GCC optimize ("Ofast") #include <cmath> #include <functional> #include <fstream> #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <map> #include <list> #include <time.h> #include <math.h> #include <random> #include <deque> #include <queue> #include <cassert> #...
ALGO
0.999938
4.043596
{ "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": "0828d7438148...
ecb80cb3-97f3-4917-83cc-2e2784d4340e
HuzaifaIlyas02/DSA-CONCEPTS
stack.cpp
//------------------- Stack ------------------------ #include <iostream> //Including Libraries #include <stdlib.h> #include <cstring> #include <conio.h> using namespace std; template <typename ItemType> // using Templates for user flexiblity class Stack { // Stack Class public: // Public data members Of class s...
ALGO
0.997951
4.724886
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-07-31T15:10:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d34b797896b4...
c412a08f-8944-40af-974e-bebfc7fbf5a2
ammarGamal123/Codeforces-Solutions
CodeForces/GNU C++20 (64)/1793A | Yet Another Promotion/209681282.cpp
#include <bits/stdc++.h> using namespace std; using int64 = int64_t; #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define int long long #define lll __int128 #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> #define Ceil(n, m) (((n) / (...
ALGO
0.999671
3.716197
{ "github_metadata": { "branch": "main", "commit_count": 702, "repo_created_at": "2023-09-10T09:44:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "366d63dd71...
3caaf9e8-39bb-4687-bf74-6b4141721afd
ra2003/Plagiarism
dataset/test/modification/1602_rename/34/transformation_1.cpp
#include<bits/stdc++.h> using namespace std; //----------------------DEBUGGER---------------------// void v_o(int o) {cerr << o;} void rjr(long z) {cerr << z;} void s_udi(long long tdx_v) {cerr << tdx_v;} void pi_d(unsigned mav_iz) {cerr << mav_iz;} void z(unsigned long lo_ym) {cerr << lo_ym;} void j(unsigned long ...
ALGO
0.999954
4.20626
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-08-06T10:23:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d3f276e79c...
a82c3259-202a-4cd3-b025-9d67405d50ce
yeonheey/algorithms
baekjoon/silver/baekjoon_18291.cpp
#include <iostream> using namespace std; const int MOD = 1000000007; int t; long long N; long long calculate(int digit, int n) { if(n == 0) return 1; long long result = calculate(digit, n / 2); result = (result * result) % MOD; if(n % 2 == 0) return result; return (result * digit) % M...
ALGO
0.99997
4.594765
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2021-04-05T05:29: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": "f9ae688a39...
8e188ef2-1030-4de1-94d0-4e3dc5ade213
ishandutta2007/codeforces-a
aid/normal/698/B.cpp
#include <iostream> #include <vector> using namespace std; const int MAXN = 200 * 1000 + 5; int p[MAXN]; char used[MAXN]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; for(int i = 0; i < n; i++) { cin >> p[i]; p[i]--; } int root = -1; for(...
ALGO
0.999994
4.502966
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c0a3154051e...
8296401d-b422-44bb-a787-dfe6c726c21a
hackcpp/cplusplus
algo/232.用栈实现队列.cpp
/* * @lc app=leetcode.cn id=232 lang=cpp * * [232] 用栈实现队列 */ // @lc code=start class MyQueue { private: stack<int> in; stack<int> out; public: MyQueue() { } void push(int x) { in.push(x); } int pop() { int res = peek(); out.pop(); ...
ALGO
0.999414
6.05511
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-07-12T03:03: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": "e09d6fbf00c...
5ba7baf7-75d1-4b7d-8253-a4ab3d22c24f
MrCarZ/cses-solutions
rangeQueries/PizzeriaQueries/PizzeriaQueries.cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1e+9 +5; const int MAXN = 2e+5; struct Vertex{ int sum = 0; int diff = 0; int possum = 0; int posdiff = 0; Vertex(){}; Vertex(int _a, int _pos): sum(_a + _pos), diff(_a-_pos), possum(_pos), posdiff(_pos){}; }; Vertex combine( Vert...
ALGO
0.999846
4.720619
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2021-07-06T16:40: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": "cbe966661f0...
7d2ba4aa-e257-4cb4-a8c9-c7f429e5b388
edisonhello/waynedisonitau123
Contest/AsiaEast/CCPC-Final2021/K.cpp
#include <bits/stdc++.h> using namespace std; #define int int64_t const int mod = 998244353; int pw(int b, int n) { int a = 1; while (n) { if (n & 1) a = a * b % mod; b = b * b % mod; n >>= 1; } return a; } int inv(int x) { return pw(x, mod - 2); } int C(int n, int m) { int a = 1; for (int i...
ALGO
0.999941
5.617307
{ "github_metadata": { "branch": "master", "commit_count": 411, "repo_created_at": "2017-08-26T10:17:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 33, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36afd39...
57993bfa-587d-44f2-92e2-83db4093a865
Inifio/collin-college-cosc
COSC.1436 Programming Fundamentals I (C++)/Lab 12/Source.cpp
// <NAME> // COSC-1436.S03 // Lab Twelve // November 2016 #include <iostream> using namespace std; #include "readString.h" #include "binarySearch.h" void main() { const int maxNames(20); char * names[maxNames]; char * pString; char * temp; char * search = "a"; bool endInput = false; bool sorted = false; ...
ALGO
0.999608
3.44683
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-03-12T19:57:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb0698d2b...
494d305d-e04a-4722-a98b-26f548ba05a9
kuangdai/AxiSEM3D
SOLVER/src/core/element/grad/Gradient.h
// Gradient.h // created by Kuangdai on 19-May-2017 // elemental gradient #pragma once #include "eigenc.h" #include "eigenp.h" class Gradient { public: Gradient(const RDMatPP &dsdxii, const RDMatPP &dsdeta, const RDMatPP &dzdxii, const RDMatPP &dzdeta, const RDMatPP &inv_s, bool axi...
ALGO
0.971922
5.776156
{ "github_metadata": { "branch": "master", "commit_count": 561, "repo_created_at": "2016-10-30T16:46:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 6, "pull_requests": 1 }, "file_meta": { "content_id": "75b75aa7...
cef55875-0f74-472a-8d14-b77457cc600c
ZhipengCai/Demo---Practical-optimal-registration-of-terrestrial-LiDAR-scan-pairs
include/globReg4D/include/reg_rtree.h
///////////////////////////////////////////////////////////////////////////// // // R O T A T I O N S E A R C H // // This package contains the source code which implements the // BnB rotation search algorithm and the nested 6 DoF registration // algorithm proposed in // // <NAME>, <NAME>, <NAME>, <NAME>...
ALGO
0.99826
5.953791
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2018-11-29T10:11:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 71, "forks": 18, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "361c833...
6b8fc363-bc94-45e7-9175-09d613d7c2ab
KR9SIS/AoC24
D2_Red-Nosed_Reports/Part1.cpp
#include <fstream> #include <iostream> #include <ostream> #include <sstream> #include <string> #include <vector> void printVector(std::vector<int> v) { for (int i = 0; i < v.size() - 1; i++) { std::cout << v[i] << ", "; } std::cout << v[v.size() - 1] << std::endl; } bool is_safe(std::vector<int> report, boo...
ALGO
0.998615
5.119888
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-12-02T19:50:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22916f37d14...
070564bc-0e02-4c41-a5a4-edfa45a7db97
tusharjaiswal123/leetcode
Wiggle Subsequence.cpp
PROBLEM: Given an integer array nums, return the length of the longest wiggle sequence. A wiggle sequence is a sequence where the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may be either positive or negative. A sequence with fewer than ...
ALGO
0.999994
5.695039
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2020-05-20T15:41: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": "2f46b239f...
11435df5-b0d0-45f0-9efc-03a6216aa75c
Tudor67/Competitive-Programming
Codeforces/#GlobalRound#9/E/E.cpp
#include <algorithm> #include <climits> #include <cmath> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; #ifdef ONLINE_JUDGE #include <iostream> #else #include <fstream> #endif int main(int argc, cha...
ALGO
0.999759
3.56095
{ "github_metadata": { "branch": "master", "commit_count": 615, "repo_created_at": "2020-02-27T19:56:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b27af88...
8a535831-95e1-449e-a224-c00ef44d25af
Chetan-KK/DSA
practice/searchInsert.cpp
#include <iostream> #include <vector> using namespace std; int SearchInsert(vector<int> nums, int target) { int start = 0; int end = nums.size() - 1; int mid = ((end - start) / 2) + start; while (start <= end) { cout << start << " " << mid << " " << end << " " << endl; if (nums[mid...
ALGO
0.999644
5.524996
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2024-01-22T17:09: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": "e036a86e2...
d7e539e2-452e-44f6-a5e5-9dac33575294
cvc5/cvc5
src/theory/arith/arith_proof_utilities.cpp
/****************************************************************************** * Top contributors (to current version): * <NAME>, <NAME>, <NAME> * * This file is part of the cvc5 project. * * Copyright (c) 2009-2025 by the authors listed in the file AUTHORS * in the top-level source directory and their instit...
ALGO
0.947572
6.919875
{ "github_metadata": { "branch": "main", "commit_count": 13437, "repo_created_at": "2012-12-06T18:45:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1150, "forks": 259, "issues": 116, "pull_requests": 56 }, "file_meta": { "content_id": "a...
add89eff-3a01-43b0-ac6e-7fadfae74bbb
anchit11/Cpp_DSA
arrays/classarray.cpp
#include <iostream> using namespace std; template<class T> class Array{ private: T *A; int size; int length; public: Array(){ size=10; length = 0; A= new T[size]; } Array(int sz){ size = sz; A = new T [size]; length = 0; } ~Array()...
ALGO
0.998627
4.75908
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-01-02T06:22: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": "9f63f1ff23b3...
2de7c7b5-0523-4e15-a37a-968a41b79972
ADVTrial/DSA-Course
DLL name list.cpp
/*Doubly Linked List */ #include<iostream> using namespace std; struct Node { string name; int id; float avg; Node *prev; Node *next; }; Node *head=NULL; void insertAtBeginning() { string name; int id; float avg; cin>>name>>id>>avg; Node *newNode = new Node(); newNode->name =...
ALGO
0.995855
3.798513
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-02-29T09:22:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97ce6680770...
0825c681-9e4e-48f7-893e-26ac5da82e06
adrian-purser/game-asset-packer
src/utility/program_options.h
//============================================================================= // FILE: program_options.h // SYSTEM: // DESCRIPTION: //----------------------------------------------------------------------------- // COPYRIGHT: (C)Copyright 2017 <NAME>. All Rights Reserved. // LICENCE: ...
TOOL
0.937529
5.490105
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2024-04-18T14:25: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": "c28c6fb9d3...
9c7e9f1e-b63e-46bf-8236-e97193f18fc0
gowufang/calculator
complex number calculator..cpp
#include<iostream> #include<cmath> #include<cstdlib> #include<cstring> #include<fstream> #include<ctime> #define EPS 1e-5 //定义精度常数 using namespace std; //使用标准空间命名std namespace NameCCom //定义命名空间NameCCom { class CCom //定义一个CCom类 { public: double ...
TOOL
0.978162
3.320193
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-06-27T14:28:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d35ee2a10b...
b9740b2d-2470-43f4-87f7-7f9e9890c64e
KhongDucQuang/Project_I
Week3/queueSimulation.cpp
// Description // Perform a sequence of operations over a queue, each element is an integer: // PUSH v: push a value v into the queue // POP: remove an element out of the queue and print this element to stdout (print NULL if the queue is empty) // Input // Each line contains a command (operration) of type // PUSH v //...
ALGO
0.986779
4.254751
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-12-03T16:28: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": "9abb4c420532...
62ba224f-01b4-4573-b42f-57d2d6b3c1dd
vectormars/CPP
Data Structure/Linked List/Single Linked List/01 Identical Linked Lists.cpp
//https://practice.geeksforgeeks.org/problems/identical-linked-lists/1 #include <iostream> using namespace std; struct ListNode{ int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; void printList(ListNode *n){ while (n != nullptr) { cout<<n->val<<' '; n = n->next; } } boo...
ALGO
0.99964
5.19359
{ "github_metadata": { "branch": "master", "commit_count": 1335, "repo_created_at": "2017-10-13T14:24:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8db034d...
2ddd4877-0205-43e2-ba7c-f235dafca958
VNthcong520712/Arduino_practice
Arduino_code/7_segment_display/7_segment_display.ino
/* Displaying Digits 0–9 on a Single 7-Segment LED via 74HC595 Shift Register Overview: - The 74HC595 is used to control a common-anode 7-segment LED. - The segments behave like 8 individual LEDs. - A segment lights up when the corresponding bit is LOW (0). - Unused segment (DP or dot) is typically not con...
ALGO
0.921191
6.396239
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-06-24T10:10:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d05f8e0a122...
29e5fe8d-ba15-4ba3-9255-969fcd1dfb3c
Suffer-qw/Eshcere
onemorelist.cpp
// ConsoleApplication3.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> using namespace std; template <typename T> class LinkedList { public: class Node { public: T data; Node* next; Node() { this->data = 0; this->next = nul...
TOOL
0.986731
3.752515
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2024-10-29T02:33:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52a7232c42b...
d1dc7595-f730-4ec2-b63d-991882526a90
mu-zero-HYPERLOOP/guidance-board
src/util/heap.h
#pragma once #include <array> #include <cassert> #include <cstddef> #include <iterator> #include <optional> #include <tuple> template <typename Key, typename Value, size_t CAP> struct MinHeap { private: struct Entry { Key m_key; Value m_value; }; public: struct Iterator; void decrease_key(size_t pos...
ALGO
0.993949
6.534382
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2024-04-12T12:07:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6756ebdaa0d1...
7de42861-87f4-4808-8b45-e0cfd8e5699d
lch-98/algorithm_study
c++ algorithm/백준/실버/이분탐색/수 찾기.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // binary_search 함수 직접 구현 bool binary_search(const vector<int>& A, int target) { int left = 0; int right = A.size() - 1; while (left <= right) { int mid = left + (right - left) / 2; // 중간 인덱스 계산 // (left + right) / 2도 맞는 표현 if (A...
ALGO
0.999996
5.414377
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2025-03-16T12:39: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": "ecefddab736...
9b607497-72eb-4bb7-a8a3-0ceae1a32eae
Koyama-Tsubasa/VLSI_Physical_Design_Automation
Final Project: Routing with Cell Movement Advanced/submit/src/lib/cell_move_router/Mover/Mover.cpp
#include "cell_move_router/Mover/Mover.hpp" #include "cell_move_router/Router/GraphApproxRouter.hpp" #include "Third/Flute3-Cpp-Wrapper/Flute3Wrapper.hpp" #include <unordered_map> #include <algorithm> #include <climits> #include <iostream> namespace cell_move_router { namespace Mover { void Mover::initalFreqMovedCell...
ALGO
0.998441
6.179103
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2022-01-18T02:10:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d5da0ba6ae...
e6cb6cff-d2b9-419e-9798-8a271bc28f14
kine1606/cpp
cpp/DSA/TaskDSA/TuMaY.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> struct ToaDo { int x; int y; int uoc; bool operator>(const ToaDo& xx) { if(xx.uoc == this->uoc) { if(xx.x == this->x) return xx.y < this->y; return xx.x<this->x; } ret...
ALGO
0.999949
4.051627
{ "github_metadata": { "branch": "main", "commit_count": 209, "repo_created_at": "2023-08-12T12:50: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": "291390b00e...
031c3389-755e-40f9-9246-7feead510d05
singlarohan/leetcode_sol
0508-most-frequent-subtree-sum/2023-07-04 15.02.11 - Accepted - runtime 20ms - memory 24.5MB.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.999981
6.186633
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-08-05T02:14: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": "3e05163d3f06...
40bcf4f3-deb8-4286-b88c-c2444a6b836e
pranjal300799/cpp-javamarkus
november/udemy/vectorsprog2.cpp
#include<iostream> #include<vector> using namespace std; int main() { vector<int> vector1; vector <int> vector2; cout<<"enter the 1st element of vector 1 and the 2nd"<<endl; int score1,score2; cin>>score1>>score2; vector1.push_back(score1); vector1.push_back(score2); cout<<vector1.at(0)<...
ALGO
0.997325
3.218615
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-08-17T19:52: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": "e02696c528b...
e4511aed-554c-4661-9c8b-1f6cccc09d76
ShusilDangi/Deformetrica
deformetrica/src/algo/integrators/BackwardGradientPropagatorUniversal.h
/*************************************************************************************** * * * Deformetrica * * ...
ALGO
0.988007
6.562356
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2017-03-30T15:38:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb019c985...
cdd25e76-83e4-4089-910e-ffe037e8e6f7
CondeReggi/C--Programacion-2
src/grafo.cpp
/* 50004090 */ #include "../include/cadena.h" #include "../include/info.h" #include "../include/utils.h" #include "../include/usoTads.h" #include "../include/iterador.h" #include "../include/binario.h" #include "../include/avl.h" #include "../include/colaDePrioridad.h" #include "../include/mapping.h" #include "../incl...
ALGO
0.99976
3.179744
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-07-31T21:58: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": "954a54467edb...
5d40e5b4-23f2-4151-9018-50692422cac3
apple/turicreate
src/external/boost/boost_1_68_0/libs/signals/test/random_signal_system.cpp
// Boost.Signals library // Copyright <NAME> 2001-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #include <boost/signal.h...
ALGO
0.979579
6.247672
{ "github_metadata": { "branch": "main", "commit_count": 1571, "repo_created_at": "2017-12-01T00:42:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11198, "forks": 1137, "issues": 502, "pull_requests": 21 }, "file_meta": { "content_id": "...
34ddecc3-856f-4014-8c1a-8e825f9bec3b
yangh9596/Algo-Leetcode
Algorithms/rod_cutting/Rod_Cutting/Rod cutting.cpp
// // main.cpp // Rod_Cutting // // Created by Lois on 10/9/17. // Copyright © 2017 <NAME>. All rights reserved. // Dynamic programming: rod cutting problem // Dynamic programming thus uses additional memory to save computation time #include <iostream> #include <vector> #include <map> using namespace std; //Rec...
ALGO
0.999192
4.485218
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2017-05-16T01:43: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": "f747a58d...
5f3fe1cf-5337-40ef-a002-6460d18ab107
gefeng/cp
atcoder/abc391/C.cpp
#include <iostream> #include <utility> #include <cassert> #include <algorithm> #include <cmath> #include <array> #include <string> #include <vector> #include <numeric> void run_case() { int N, Q; std::cin >> N >> Q; std::vector<int> pos(N, 0); std::vector<int> cnt(N, 1); std::iota(pos.begin...
ALGO
0.999358
4.055888
{ "github_metadata": { "branch": "main", "commit_count": 980, "repo_created_at": "2022-07-19T19:38: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": "95538e3e27...
5ef0b7ee-fd65-4830-ba43-4789d8ff3f4e
CodeTrans-Research/RefuTra
result/translate/starchat/java2cpp/c++/FIND_LARGEST_D_IN_ARRAY_SUCH_THAT_A_B_C_D_1.cpp
int f_gold ( int arr [ ] [ ] , int n ) { unordered_map < int, pair < int, int > > um; for ( int i = 0; i < n - 1; i++ ) { for ( int j = i + 1; j < n; j++ ) { um[arr[i][j]] = {i, j}; } } int ans = INT_MIN; for ( int i = 0; i < n; i++ ) { for ( int j = i + 1; j < n;...
ALGO
0.999811
4.569762
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-06-07T09:13:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2904f90c474...
3cd25d8b-a0b9-46f7-8ec5-f8a6a9d072a0
projectchrono/chrono
src/chrono_multicore/solver/ChSolverMulticoreBB.cpp
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2016 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
ALGO
0.999794
4.653217
{ "github_metadata": { "branch": "main", "commit_count": 18253, "repo_created_at": "2013-09-03T15:34:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2460, "forks": 515, "issues": 101, "pull_requests": 4 }, "file_meta": { "content_id": "4a...
eb7d428d-290c-4b23-a3ad-733b2eb78066
milodky/algorithm
dynamic_programming/optimal_strategy/os.cpp
#include <vector> #include <assert.h> #include <cstddef> #include <cstdlib> #include <ctime> #include <iostream> using namespace std; void output(vector<vector<int> > &Matrix) { int Size = Matrix.size(); for (int i = 0; i < Size; i++) { for (int j = 0; j < Size; j++) { cout << Matrix[i][j] << " "; } cout ...
ALGO
0.999534
4.086357
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2013-09-13T03:55: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": "3ad848b73...
65fe3abc-f352-476f-9339-8db2a0d2d4b9
Jerry-Terrasse/Programming
比赛/雅礼集训/20190113/DAY8/data/traffic/traffic.cpp
#include <bits/stdc++.h> using namespace std; const int N = 100000; const int oo = 0x3f3f3f3f; template <typename T> inline bool chkmin(T& a, T b) { return a > b ? a = b, 1 : 0; } template <typename T> inline bool chkmax(T& a, T b) { return a < b ? a = b, 1 : 0; } struct info { int mx, smx, mn, id; ...
ALGO
0.999986
3.999528
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-12-19T05:32:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5088e71a5f...
c1e95479-f538-4861-a6ea-ed3a9d3e5501
Sai-Venky/TraversalWithC
challenges/tree/queue-reconstruction-by-height.cpp
// https://leetcode.com/problems/queue-reconstruction-by-height/ // Note the use of compare and then segment tree approach /* class Solution { public: static bool compare(vector<int> &s1, vector<int> &s2) { if(s1[1] == s2[1]) return s1[0]>s2[0]; return s1[1]<s2[1]; } vect...
ALGO
0.999995
6.074698
{ "github_metadata": { "branch": "master", "commit_count": 530, "repo_created_at": "2020-05-03T14:48:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "848198df...
873a0273-f751-4603-abc2-e61f1118d9d2
crazyboycjr/knn
main.cc
#include <cassert> #include <iostream> #include "bruteforce.h" #include "kdtree.h" #include "knn.h" #include "ndpoint.h" typedef double Val; const double eps = 1e-8; const int maxn = 1000; int n, D, q; Val vec[maxn]; void PrintResult(auto rets) { if (rets.size() > 100) return; std::cout << "[" << rets[0]; for...
ALGO
0.999926
5.146298
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-05-07T16:59: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": "79e0545dde...
9f41535b-9b33-4b43-80ee-3cb14467e737
zhzh2001/Learning-public
c++实用代码/others/Suffix Tree_REPEATS.cpp
#include<cstdio> #include<cstring> #define MAXN 51000 #define C(Now,i) c[Now][Str[i+d[Now]]] int t, c[2*MAXN][3], d[2*MAXN], f[2*MAXN], Link[2*MAXN], Str[MAXN], Case, n, N, Ans, F[2*MAXN], bl[2*MAXN], Pos[2*MAXN], Fac[2*MAXN], Beg[2*MAXN], End[2*MAXN], Pre[2*MAXN], Suc[2*MAXN], _x[4*MAXN], _y[4*MAXN], _f[2*MAXN], _T,...
ALGO
0.999751
3.67682
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-09-23T04:45: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": "6134e0b41d...
aa6067d0-4431-4301-81b2-6116d697ac2b
durgesh0187/Data-Structure
Hash-Table/subarray_whose_sum_is_0-or-not.cpp
#include <bits/stdc++.h> //For ordered_set #define MOD 1000000007 #define test int t; cin>>t; while(t--) #define init(arr,val) memset(arr,val,sizeof(arr)) #define loop(i,a,b) for(int i=a;i<b;i++) #define loopr(i,a,b) for(int i=a;i>=b;i--) #define loops(i,a,b,step) for(int i=a;i<b;i+=step) #define looprs(i,a,b,step) for...
ALGO
0.999823
3.910476
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-08-12T13:43: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": "933e07deb8...
d22315ec-1efd-43a5-89c8-6a28d9c14383
sherlock-gyk/MPIARM
mpiarmSIMD.cpp
#include<stdio.h> #include <iostream> #include <mpi.h> #include <sys/time.h> #include <stdlib.h> #include <pmmintrin.h> #include <omp.h> #include<arm_neon.h> using namespace std; float** A; float** B; float** C; float** D; float** E; float* recv_arr; int n = 1000; const int N = 1000; const int thread_count = 4; float m...
ALGO
0.999737
4.186922
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-06-23T12:54: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": "e232c9b17d...
4a83d1cf-2185-43c2-b72a-f9416bf6236d
singlarohan/leetcode_sol
0753-open-the-lock/2023-07-04 23.07.01 - Accepted - runtime 150ms - memory 30.7MB.cpp
class Solution { public: int openLock(vector<string>& deadends, string target) { if(target == "0000") return 0; unordered_set<string> st; for(auto &s:deadends) st.insert(s); if(st.find("0000") != st.end()) return -1; queue<string> q; q.push("0000"); ...
ALGO
0.999952
5.465376
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-08-05T02:14: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": "2876511dea2a...
31ff7395-5326-4c76-8e1b-6ed5a48043b1
WU-SUNFLOWER/My-LeetCode-Solutions
src/matrix/game-of-life.cc
class Solution { public: void gameOfLife(vector<vector<int>>& board) { std::vector<std::pair<int, int>> to_die_pos; std::vector<std::pair<int, int>> to_relive_pos; int height = board.size(); if (height <= 0) return; int width = board[0].size(); for (int ...
ALGO
0.999549
6.258759
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-09-16T05:41: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": "1661fab163f...
199cf854-f1b1-4ce2-9db1-9c4d4d2df309
jayjunlee/Circuit-Simulator
src/phasor/matrix.cpp
#include "matrix.hpp" using namespace std; using namespace arma; circuitmat circtocircmat(circuit cir){ circuitmat circmat; circmat.numnode = cir.node_list.size(); circmat.gmat.zeros(circmat.numnode-1,circmat.numnode-1); circmat.imat.zeros(circmat.numnode-1,1); circmat.vmat.zeros(circmat.numnode-1,1); ...
ALGO
0.99688
4.072746
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-06-23T03:24: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": "5fe94cd6fa...
9748fde5-a7e7-49a1-b7f2-6667b987d272
usask-arg/sasktran
src/core/base/nxbase/module/math/nxlinearinterpolate.cxx
#include "nxbase_math.h" /*----------------------------------------------------------------------------- * nxLinearInterpolate::fromTwoPoints 2005-7-28*/ /** Linearly interpolates within a square. * * \param x * The x coordinate where a value is required. Best results occur if x is between x0 and x1. *...
ALGO
0.99477
5.856385
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-06-29T19:09:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 0, "issues": 14, "pull_requests": 2 }, "file_meta": { "content_id": "491ec2c6e4c...
76ab3b17-fe44-4695-a772-78883028a339
arangodb/arangodb
3rdParty/s2geometry/master/src/s2/s2shapeutil_build_polygon_boundaries.h
// Copyright 2013 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
ALGO
0.994183
7.395566
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
36de2ba6-05e8-4cb6-95b8-3f98e1d8c5dd
Metalicana/Problems_from_lightOJ
LightOJ 1266.cpp
#include <bits/stdc++.h> using namespace std; #define pii pair<int,int> #define pll pair<long long, long long > #define ll long long #define lcm(a,b) (a)/__gcd((a),(b))*(b) #define pb push_back #define sz size() #define mp make_pair #define rep(i,n) for(i=0;i<(n);i++) #define x first #define y second #define maxn 10000...
ALGO
0.999726
4.359427
{ "github_metadata": { "branch": "master", "commit_count": 156, "repo_created_at": "2019-07-31T10:11: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": "baa0e233...
2fd0b06d-9f95-462b-a1d3-1f6b2581cc4b
oyaay/leetcode
5/5/5/main.cpp
#include <iostream> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <istream> #include <sstream> #include <assert.h> using namespace std; class Solution { public: string longestPalindrome(string s) { vector<string> vecPal; int index = 0; string checkStr; bool isPal = true;...
ALGO
0.999711
3.832041
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-02-07T04:49:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "53b490a8b2...
e66b49c5-ff0d-4c0b-821f-fe492ae768f4
sx-aurora-dev/vednn
src/C/vconv.removed/include/gen-dnn/vgemm/gemm_utils.hpp
/******************************************************************************* * Copyright 2018 Intel Corporation * MODIFICATIONS Copyright 2019 NEC Labs America * * 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 co...
ALGO
0.993294
6.47298
{ "github_metadata": { "branch": "develop", "commit_count": 267, "repo_created_at": "2019-06-05T00:13:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "2c11b391...
a6d84ed5-96fb-4b76-9fa1-16ba4c220082
AxonDragonScale/Algorithms
Graphs/Capture Regions on Board.cpp
// https://www.interviewbit.com/problems/capture-regions-on-board/ // https://www.geeksforgeeks.org/given-matrix-o-x-replace-o-x-surrounded-x/ // https://www.geeksforgeeks.org/flood-fill-algorithm-implement-fill-paint/ -> concept kinda taken from here // The main concept is that any O that is connect to the boundar...
ALGO
0.999624
5.371582
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2018-08-23T14:08:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da9c6ae07...
c59e967e-a8f7-4433-a991-ac2e6db0c295
kapil2570/leetcode-problems
1765-merge-in-between-linked-lists/merge-in-between-linked-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* mergeInBetw...
ALGO
0.999925
4.945008
{ "github_metadata": { "branch": "main", "commit_count": 916, "repo_created_at": "2023-09-05T19:34: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": "cb2f40eb48...