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
1980169a-985c-4bee-889c-89a7f0c72ee8
ZYLZhuPP/OI
YYOJ/2478.cpp
#include<bits/stdc++.h> using namespace std; #define pb push_back #define For(i, l, r) for (int i = (l); i <= (r); ++i) const int N = 105, M = 1e4 + 5; struct IO { char c; int f; #define gc() getchar() template<class C> inline IO& operator >> (C &x) { x = 0; f = 1; while (!isdigit(c = gc()...
ALGO
0.999726
3.252589
{ "github_metadata": { "branch": "ZYLZPP", "commit_count": 115, "repo_created_at": "2024-09-18T03:26:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35abcb76...
cfd6eb02-24e2-448b-8540-cb7b17d54594
TobyJChappell/CPSC_390
Assignment01/Simulator.cpp
#include <iostream> #include <fstream> #include "Simulator.h" using namespace std; /** Creates a board from an input file and checks if board is valid @param b The name of a valid input file */ Simulator::Simulator(string b) { filename = b; Board board(filename); } /** Destructor */ Simulator::~Simulator() { dele...
ALGO
0.999631
3.938578
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-01-15T19:26: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": "db79552ec...
6166199a-6188-4267-9381-77b1440d383a
adarshtadimari/vision
eye_blink/pupilDetect/try1/a2v5.cpp
#include"cv.h" #include"highgui.h" #include<iostream> using namespace cv; int THRESHOLD1=20; int THRESHOLD2=3*20; float GRADTHRESHOLD=2000; Mat src,srcInv,srcBlur,xDerivative,yDerivative; vector<vector<Point> > contours; vector<Vec4i> hierarchy; void MyFilledCircle( Mat img, Point center ) { int thickness = -1; int ...
ALGO
0.998839
4.064435
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-05-29T16:36: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": "1c9e3cc6e1...
292347d4-7a89-4c13-bb75-4d6e393cb076
avyactjain/avyacts_C_odebox
binarysearch.cpp
#include<stdio.h> #include<iostream> #include<stdlib.h> int binarySearch(int arr[], int l, int r, int x) { while (l <= r) { int m = l + (r-l)/2; // Check if x is present at mid if (arr[m] == x) return m; // If x greater, ignore left half if (arr[m] < x)...
ALGO
0.999947
3.89239
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-09-03T14:16: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": "32b5df680c...
4afa553f-f1b7-4438-91ce-2fa313c8f389
delphi001/DelphiPka
src/delphiPKa/energy.h
// // energy.h // DelPhiPKA // // Created by <NAME> on 10/22/14. // Copyright (c) 2014 Lin. All rights reserved. // /* This class is used to do energy calculations. * DelPhi is implemented in this class, and use MPI to do parallelization */ #ifndef ENERGY_H_ #define ENERGY_H_ #include <iostream> #include "p...
ALGO
0.976204
4.63111
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-06-05T19:43:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8cced57c0...
013539a3-b92b-4582-8630-7770554eccdf
maliabramovitch/AdvanceOOPLabs-CPP
lab03/main.cpp
#include<iostream> #include<vector> #include<algorithm> #include<iterator> #include<cstdlib> #include<ostream> #include<fstream> #include<array> #include<map> using namespace std; //QU01 int QU01() { const int SIZE = 64; const double eps = 1e-2; vector<double> V; srand(time(NULL)); for (int i = 0...
TOOL
0.994982
3.789759
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-03-09T10:06: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": "a03136ae116...
2a642814-f45d-4677-8e25-ff9caf21e764
zuozhuanz/BPSK-AWGN
Hamming.cpp
#include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include "Hamming.h" // create a random code a void RandCode(int* a) { for (int i = 0; i < K; ++i) a[i] = rand() & 1; } // encode src into des, des = src * G void Encode(const int* src, int* des) { memset(des, 0, N*sizeof(int)...
ALGO
0.999913
3.568356
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-10-25T16:53: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": "ac76bf4ad6...
da8bfb77-fff6-4dd5-b7d6-b9a1eebd1dbd
FlyingYu-Z/FlyLanguage
src/runtime/MethodExecutor.cpp
// // Created by flying on 2023/1/8. // #include "MethodExecutor.h" #include "ClassRuntime.h" #include "SystemMethod.h" #include "BoolValueCalc.h" #include "bits.h" #include "AllValueComprator.h" MethodExecutor::MethodExecutor(ClassRuntime *classRuntime, IrMethod *irMethod) : classRuntime(classRuntime), ...
TOOL
0.926703
5.616319
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2023-01-07T05:02: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": "d654d1255...
5d52f599-a663-4cfc-a5a0-e80f4cd29235
ASSERT-KTH/Supersonic
predictions/submissions-aizu-gpt35/Codenet/p00494/388338924/response_5.cpp
#include <algorithm> #include <cstdio> #include <cstring> #include <string> using namespace std; char x[1000005]; int a = 0, b = 0, c = 0, d = 0, e, f, i, j, k, maxi = 0; int main() { fill(x, x + 1000005, 'A'); scanf("%s", x); int leng = strlen(x); for (int a = 0; a < leng;) { if (x[a] != 'J') { a++; ...
ALGO
0.998694
3.16489
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-02-03T10:33:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47b7bf9ad0aba...
690262bd-725d-4467-b355-9dd7333ed028
wfgu-git/ACMtemplate
codes/tool/HeavyLight.cpp
// with Segtree or splay... void dfs(int u, int p, int d) { sz[u] = 1; fa[u] = p; deep[u] = d; for (int i = head[u]; i != -1; i = edge[i].next) { int v = edge[i].v; if (v == p) continue; dfs(v, u, d + 1); sz[u] += sz[v]; if (son[u] == -1 || sz[v] > sz[son[u]]) son[u] = v; } } void link(in...
ALGO
0.999934
4.23046
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-10-23T11:30: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": "04699ab9b2...
e4c935cb-1c02-4273-b309-4a582d858789
anime454/Sport_connect
connect/connect.ino
#define BaudRate 9600 int main_servodegree = 0; int servodegree1 = 0; int servodegree2 = 0; int servodegree3 = 0; int servodegree4 = 0; int servodegree5 = 0; int servodegree6 = 0; int input_data = 0; int i = 0; #include <Servo.h> Servo servo1, servo2, servo3, servo4, servo5, servo6; int main_command = 0; // error voi...
TOOL
0.98801
5.126906
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2021-02-14T15:10: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": "553f4b285...
6f28b6e9-02eb-4f52-a821-0af537727b16
sharc-lab/FPGA_ECE8893
2023_Spring/Lab3/PartB/conv_7x7.cpp
/////////////////////////////////////////////////////////////////////////////// // Course: ECE8893 - Parallel Programming for FPGAs // Filename: conv_7x7.cpp // Description: Reference implementation of 7x7 convolution for a // single tile block. ////////////////////////////////////////////////////...
ALGO
0.999175
4.837365
{ "github_metadata": { "branch": "main", "commit_count": 218, "repo_created_at": "2022-01-25T19:25:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36, "forks": 37, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02c7f5760...
96b2c20f-6e41-4db8-8043-29f526d1915b
matthewsamuel95/ACM-ICPC-Algorithms
DP/game_of_sum/10891.cpp
#include <iostream> #include <string.h> using namespace std; #define inf 999999 #define max(a,b) a > b ? a : b int n ; int dp[105][105]; int a[105],sum[105]; int get_sum(int i , int j){ return sum[j]-sum[i-1]; } int solve(int l, int r) { if(l > r) return 0; if(l == r) return a[l]; int &ret = dp[l][r]; ...
ALGO
0.99927
3.607035
{ "github_metadata": { "branch": "master", "commit_count": 1421, "repo_created_at": "2017-10-21T21:46:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2203, "forks": 1277, "issues": 4, "pull_requests": 48 }, "file_meta": { "content_id": "...
7e1ece0d-8803-4ff0-b337-986dec38e879
mortal123/code-jam
Online Judge/BZOJ/3169/code.cpp
#include <cstdio> #include <cstdlib> #include <algorithm> #include <iostream> #include <cassert> using namespace std; const int MAXN = 110000, MAXM = 1100000; int n, m, type[MAXN], dgr[MAXN]; struct eglist { int other[MAXM], succ[MAXM], last[MAXM], sum; void AddEdge(int a, int b) { other[++sum] = b, succ[sum] = ...
ALGO
0.999831
3.694263
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-11-28T09:12: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": "126079aa33...
c03c5e1d-a0a5-4c0a-af3c-9acefd2db2ea
splucs/Competitive-Programming
Codeforces/Rounds/984/B.cpp
#include <bits/stdc++.h> #define DEBUG false #define debugf if (DEBUG) printf #define MAXN 109 #define MAXM 300009 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFLL 0x3f3f3f3f3f3f3f3f #define EPS 1e-9 #define PI 3.141592653589793238462643383279502884L #define FOR(x,n) for(int x=0; (x)<int(n); (x)++) #define F...
ALGO
0.999975
3.755974
{ "github_metadata": { "branch": "master", "commit_count": 406, "repo_created_at": "2017-03-16T20:42:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 136, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "603ae...
ccb21a37-f774-4289-9bd1-c22d4f83ef6b
envyaims/Programming-Contests
traverse cs/2022/h.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; main() { ll N, M; cin >> N >> M; vector<string> v(N); for(string & s : v) cin >> s; vector<vector<ll>> dist(N, vector<ll>(M, -1)); vector<pair<ll,ll>> bfs; for(ll i = 0; i < N; i++) for(ll j = 0; j < M; j++) { if(v[i][j]=='0') { dist[i][j] = ...
ALGO
0.999993
3.554633
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2022-05-07T23:58: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": "ec1fc3ee59...
dbb3003d-56e8-4152-978c-d0ee165d255a
ringgaard/sling
sling/nlp/web/text-extractor.cc
#include "sling/nlp/web/text-extractor.h" #include <iostream> #include <string> #include "sling/string/ctype.h" #include "sling/string/strcat.h" #include "sling/web/html-parser.h" namespace sling { namespace nlp { // Compare two tags. static bool TagEqual(const char *t1, const char *t2) { return strcasecmp(t1, t2...
TOOL
0.916812
6.961895
{ "github_metadata": { "branch": "master", "commit_count": 3081, "repo_created_at": "2017-10-12T20:34:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 164, "forks": 11, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "b22d...
e4938608-7d16-4699-9dc5-c09f42e3b71b
intel/llvm
pstl/include/pstl/internal/glue_algorithm_impl.h
// -*- C++ -*- //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===------------...
ALGO
0.992291
7.126813
{ "github_metadata": { "branch": "sycl", "commit_count": 568881, "repo_created_at": "2019-01-16T09:05:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1355, "forks": 794, "issues": 640, "pull_requests": 241 }, "file_meta": { "content_id": ...
01727376-c2b1-474f-98f6-da04d1a467fd
Venkad000/Competitive-Programming
difference.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int>> findDifference(vector<int>& nums1, vector<int>& nums2) { unordered_map<int, pair<int,int>>umap; for (auto x: nums1){ umap[x] = pair<int,int>(1,0); } for (auto x: nums2) { if (umap.find(x) == umap.end()) umap[x] = pair<in...
ALGO
0.999964
4.934847
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-02-06T13:24: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": "3ff03d0d1ded...
90a19651-ad39-4a02-9cdf-9da0ac30821e
ivanzjj/Leetcode
081_Search in Rotated Sorted Array II.cpp
/* binary search the solution is almost the same with "Search in Rotated Sorted Array" the only difference is now the array may have duplicated element. "Search in Rotated Sorted Array"'s solution won't work, because: when we check whether the mid index located in left side of target if nums[mid] = nums[low] = nums[h...
ALGO
0.999988
6.389128
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2015-05-25T14:23: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": "fa9429c9d...
603b1952-3604-4c44-b3e7-bb9e1875371a
fortneus/SMART-SUDUKO-SOLVER
SudukoSolverAlgo.cpp
// DEVELOPING THEE SMART SUDUKO SOLVER ALGORITHM USING RECURSION BACKTRACKING #include <iostream> #include <math.h> using namespace std; void PrintSuduko(int board[][9], int n) { for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cout << board[i][j] << " "; } ...
ALGO
0.999892
6.282528
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-22T17:44:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "200849f0a4f5...
55414b59-6efe-41d8-acdf-268b58e4958e
niuxu18/logSurvey
data/crawl/tar/new_hunk_484.cpp
/* Diff files from a tar archive. Copyright (C) 1988, 92, 93, 94, 96, 97 Free Software Foundation, Inc. Written by <NAME>, on 1987-04-30. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation...
TOOL
0.907936
6.497414
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-02-25T03:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94ceff72f...
6d10f671-58e0-470e-af5b-17fe18b4d7d1
NirobSUST/LeetCode
542-01 Matrix.cpp
class Solution { public: vector<vector<int>> updateMatrix(vector<vector<int>>& mat) { int row = mat.size(); int col = mat[0].size(); vector<vector<int>> result (row, vector<int>(col, INT_MAX - 1)); // top-left to bottom-right for (int i = 0; i < row; i++) { ...
ALGO
0.999982
6.648649
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2023-04-05T21:19: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": "08e0547d390...
892e4f87-e639-4195-b8f9-d2fc1ed0b09d
dnanhkhoa/CodingChallenge
Hackerrank.com/String/SherlockAndAnagrams.cpp
/* Link: https://www.hackerrank.com/challenges/sherlock-and-anagrams/problem Problem: Sherlock and Anagrams Level: Medium Given a string S, find the number of "unordered anagrammatic pairs" of substrings. In other words, find the number of unordered pairs of substrings of S that are anagrams of each other. Two string...
ALGO
0.999979
4.617415
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2017-12-02T20:36:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98fac5aa4...
36509db0-4493-41a8-afcb-9b774a6e950a
guanlunlu/astar_navigation
include/astar.h
/** * @file * @author Louis (<EMAIL>) * @brief a cpp astar for eurobot * @version 0.1 * @date 2021-12-20 * * @copyright Copyright (c) 2021 * */ #ifndef __astar_H #define __astar_H #include "bits/stdc++.h" #include "math.h" #include <ros/ros.h> #include <geometry_msgs/Twist.h> #include <geometry_msgs/PoseSta...
ALGO
0.987976
3.687117
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2021-12-17T08:03: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": "48e253bea...
cd565180-662b-4350-87f6-b8b80fd21b2e
NguyenBui256/PTIT
DSA/DSA08021 - DI CHUYỂN TRONG MA TRẬN.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define FOR(i,a,b) for(int i = a; i < b; i++) #define FORD(i,a,b) for(int i = a; i > b; i--) #define fi first #define se second #define pb push_back #define TEST cin >> t; while(t--) // int n, k, s, final = 0; int a[1003][1003]; // int X[100]; int ans ...
ALGO
0.999989
3.225901
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-02-27T03:30:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6a6a3f8059...
0f2ed7ea-1368-446e-95a2-b4fffc65e238
Leemyunglyul/Baekjoon
백준/Gold/11779. 최소비용 구하기 2/최소비용 구하기 2.cc
#include <iostream> #include <vector> #include <queue> #include <stack> #include <algorithm> using namespace std; vector<pair<int, int>> edge[1010]; priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>> > pq; int dp[1010]; int pre[1010]; int big = 98764321; int main() { ios_base::sync_with_...
ALGO
0.999998
4.051757
{ "github_metadata": { "branch": "main", "commit_count": 835, "repo_created_at": "2023-08-24T15:59:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95482298d1...
7415bd3e-672f-4281-8fa6-0c45dee9c467
ishandutta2007/codeforces-k
kriii/normal/54/B.cpp
#include <stdio.h> int A,B,F; char P[22][22]; bool chk(int a, int b, int c, int d, int p, int q, int r, int s) { int i,j,f; f = 0; for (i=a;i<=b;i++){ for (j=c;j<=d;j++){ if (P[i][j] != P[i-a+p][j-c+r]){f = 1; break;} } if(f) break; } if (f==0) return true; f = 0; for (i=a;i<=b;i++){ for (j=c;j<=d;j...
ALGO
0.999817
3.287021
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1143a6a97e82...
27dad8c4-6720-4a1f-870d-e763bd677da0
WhiZTiM/coliru
Archive2/fe/c38cd532e13018/main.cpp
#include <string> #include <cstring> #include <iostream> #include <typeinfo> using namespace std; class Var { class Data; class NData; class SData; // from here below line numbers are the same as in the exam Var(Data* _pdata): pdata (_pdata) {} mutable const char* mytype = NULL; // C++11, legit const char* calc...
ALGO
0.941361
4.497064
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "124405...
dc4d1f32-e04b-4a54-b551-ea7ea2211e5a
prajwal-huggi/codehelp
lecture20/reverse1.cpp
// #include<iostream> // #include<algorithm> // using namespace std; // int main() // { // int a; // cin>>a; // int arr[a]; // for(int i=0; i<a; i++) // { // cin>>arr[i]; // } // //execution of code // int s=0; int e=a-1; // while(s<=e) // { // if(arr[e]<arr[s]){...
ALGO
0.99995
4.546015
{ "github_metadata": { "branch": "codehelp", "commit_count": 10, "repo_created_at": "2022-08-26T06:32: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": "1e203dd...
7db8eabc-7a4b-4eab-842e-008a0a0fc23a
coding-minutes/data-structures-algorithms-level-up-bootcamp
09 Binary Tree/node_at_kth_distance.cpp
#include<iostream> #include<queue> using namespace std; class node{ public: int data; node*left; node*right; node(int d){ data = d; left = NULL; right = NULL; } }; //Input : 1 2 4 -1 -1 5 7 -1 -1 -1 3 -1 6 -1 -1 node* buildTree(){ int d; cin>>d; if(d==-1){ return NULL; } node* n = new node(d);...
ALGO
0.999995
4.369438
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-05-17T17:13:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 620, "forks": 429, "issues": 3, "pull_requests": 6 }, "file_meta": { "content_id": "510fe83...
6cc3c2df-f3bb-41b1-97f9-193d293a6118
FangGet/BundleFusion_Ubuntu_Pangolin
include/FreeImage/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h
// Copyright (c) 2009 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // You can redistribute it and/or modify it under the terms of the GNU // General Public License as published by the Free Software Foundation, // either version 3 of the License, or (at your op...
TOOL
0.922719
5.583124
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-06-29T03:53:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 132, "forks": 34, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "30c2f8b...
14edfa58-5efc-408a-990b-8612ea325381
AbrarAli-SE/DSA-Lab
Lab_3/task_8.cpp
#include <iostream> using namespace std; int main() { int matrix[4][4]; int value; cout << "Enter 16 integers for the 4x4 matrix: " << endl; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { cin >> matrix[i][j]; } } cout << "Enter the value to search for:...
ALGO
0.998976
5.479319
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-09-04T03:22:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6be61bb3ac...
bd45611c-7f33-4919-b4b0-7accebfec8e4
HarshRaj2717/Programming-Problems
Strivers_A2Z_DSA_sheet/next permutation.cpp
// Problem : https://leetcode.com/problems/next-permutation/ #include<bits/stdc++.h> using namespace std; void nextPermutation(vector<int>& nums) { int i, j, check=0; for(i=nums.size()-1; i > 0; i--){ if(nums[i] > nums[i-1]){ i--; check = 1; break; } } ...
ALGO
0.999995
5.617071
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2022-01-16T12:17: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": "850318d0...
53330155-4a02-41c7-bfff-af26f853af67
samiksjsu/CLionProjects
Trees/creatingABinaryTree.h
// // Created by <NAME> on 05-10-2019. // #ifndef TREES_CREATINGABINARYTREE_H #define TREES_CREATINGABINARYTREE_H #include <iostream> #include <queue> #include "Node.h" using namespace std; class Tree{ private: Node *root; public: Tree():root{nullptr}{} void createTree(); void createTreeFromArray...
ALGO
0.99943
5.381971
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-01-15T03:43:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "318e34889a...
9b7dd20e-1971-4c2c-a088-d0b4a74bb05a
abdelkarimanouer/Problem-Solving
Programming Advices/course 7 - Algorithm livel 3/prob 50 - Delete Client From File.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <iomanip> using namespace std; const string ClientsFileName = "Clients.txt"; struct sClient { string AccountNumber; string PinCode; string Name; string Phone; double AccountBalance; bool MarkForDelete = false;...
TOOL
0.957563
4.505675
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2025-03-04T05:54: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": "ceea92706...
dc353e14-a45b-44ae-bb04-b0837dd5b1e2
vk-429/DSA-By-Prateek-Sir
Deque.cpp
#include<iostream> using namespace std; class Deque { private: int front; int rear; int capacity; int *arr; public: Deque(int cap) { front = -1; rear = -1; capacity = cap; arr = new int[capacity]; } ...
ALGO
0.999143
4.345055
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-07-21T17:54:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93a3c144e359...
bcc091f1-6ec5-465a-8c8d-0e7b303303bc
NamikoToriyama/AtCoder
150/5/c.cpp
#include <stdio.h> #include <iostream> #include <math.h> #include <string> #include <vector> #include <algorithm> #include <iomanip> //#include <tuple> //#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (int)n; i++) #define ll long long #define pb push_back int main() { int N; c...
ALGO
0.999995
3.226748
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2019-05-30T02:04:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5b8d60e...
e6d30ec1-edb2-4cc9-a651-c4c5b07bad84
sinhrks/CompetitiveProgramming
09_other/ddcc2017d.cpp
#include <assert.h> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <numeric> #include <functional> #include <iostream> #include <string> #include <array> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <complex> #include ...
ALGO
0.999819
4.04994
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-09-15T12:55:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9faab297...
ceff0d70-2e1f-454d-8258-6ebe67bc9769
deepak212001/DSA
Step 13 Binary Trees/Lec 2 Medium Problems/6-Zig-Zag-Traversal.cpp
/* Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level and alternate between). Example 1: Input: root = [3,9,20,null,null,15,7] Output: [[3],[20,9],[15,7]] Example 2: Input: root = [1] Output: [[1]] Exampl...
ALGO
0.999999
6.990713
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-11-13T16:53: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": "8b0a12aa3a00...
4aa8cc56-3c8a-40f8-a888-0126d94b7e83
przemek29/C_plus_plus
Chapter 7 - Arrays/7_4.cpp
#include <iostream> using namespace std; enum etapy { nic, scenopis, proba_czytania, proba_kamerowa, nagranie = 6, montaz, postsynchron }; void stan_realizacji(etapy t[], int ile, int dzien_zdjeciowy); int main() { const int liczba_scen = 10; etapy scena[liczba_scen] = {scenopis, proba_czytania, proba_kame...
TOOL
0.931539
4.032251
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2015-09-05T21:38: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": "710b9b94a...
afe25703-18c8-47cf-adb6-5fe3ea40f509
badal-pundir/CPP
learningCPP/stack/stackImplementArray.cpp
// Implemneting stack using array #include<bits/stdc++.h> using namespace std; #define MAX 1000 class Stack{ private: int top; public: int a[MAX]; Stack(): top(-1){}; Stack(int val_param): top(val_param){}; bool push(int val_param); int pop(); int peek();...
ALGO
0.999048
4.462079
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-08-05T19:05: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": "2b8e6b08cba...
955a18ec-57ad-4290-9377-b09bb71f146b
gauravcse/Codes
Interview/Others/MMPROD.cpp
#include<iostream> #define llu long long int #define MAX 1000000007 using namespace std; int main(void) { int t; cin>>t; while(t--) { llu n,k; cin>>n>>k; llu arr[n+1]; for(int i = 0; i < n;i++) { llu num; cin>>num; if(num >= 0) arr[i] = num; else arr[i] = MAX + num; } //cout<<(-8%MA...
ALGO
0.999857
3.348391
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-04-17T07: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": "34e0ef3c5...
a3e16709-fdda-47d5-b9e3-5e99a5c082eb
burakbayramli/books
Game_Physics_Eberly/WildMagic2/Source/Math/WmlMath.h
// Magic Software, Inc. // http://www.magic-software.com // http://www.wild-magic.com // Copyright (c) 2003. All Rights Reserved // // The Wild Magic Library (WML) source code is supplied under the terms of // the license agreement http://www.magic-software.com/License/WildMagic.pdf // and may not be copied or disclos...
TOOL
0.983128
3.917004
{ "github_metadata": { "branch": "master", "commit_count": 652, "repo_created_at": "2016-10-31T17:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 325, "forks": 201, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8603...
5b7daa64-a2e5-4f31-8f9a-ac738431e4bb
BGboy-bit/vscode
c++/codeforces/contest/2072/B.cpp
#include<bits/stdc++.h> using namespace std; typedef __int128 i128; typedef long long ll; typedef double db; const db PI = acos(-1); typedef array<ll, 2> PII; // vector<PII> a(n + 1); const ll inf = 2e18 + 10; const int mod = 998244353; const int maxn = 2e5 + 10; bool multi = 1; void Solve() { ll n; cin >> n; ...
ALGO
0.999854
3.935478
{ "github_metadata": { "branch": "main", "commit_count": 132, "repo_created_at": "2024-03-12T15:07: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": "846a56b253...
f5fe1820-b56c-4a51-bd18-9da922a3722f
cnewmiller/Simacogo
Simacogo/Simacogo/main.cpp
// // main.cpp // Simacogo // // Created by <NAME> on 1/25/17. // Copyright © 2017 <NAME>. All rights reserved. // #include <iostream> #include "sim_board.hpp" #include "adversary.hpp" #include "min_max_node.hpp" int main(int argc, const char * argv[]) { SimBoard s= SimBoard(); Adversary player2(&s); // ...
ALGO
0.979659
3.861631
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-02-14T05:38:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34fd798250...
23da2994-f3e3-4c61-a5e3-0e94f33e7194
Suikaba/procon-solved
Codeforces/Round300-349/Round312/D-Guess_Your_Way_Out!_II.cpp
// http://codeforces.com/contest/558/problem/D #include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int h, q; cin >> h >> q; const ll lb = 1LL << (h - 1), ub = (1LL << h) - 1; vector<ll> xs = {lb, ub}; vector<ll> l(q), r(q), ans(q); for(int i = 0; i < q; ++i) { ...
ALGO
0.999875
3.647273
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2018-04-18T08:29: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": "48df25a26...
b34725e8-d262-4adc-9cb3-9e1de866d2dc
hamzahsubhani/CPlusPlus
Quadratic Formula/assignment 3/main.cpp
/******************************************* // CSCI 240 Program 3 Spring 2024 // Programmer: <NAME> // Section: 2 // TA: <NAME> // Due date: 2/9/24 // Z-ID: 2010017 // Purpose: to display the x and y coordinates (vertex) using the quadratic formula. This analyzer also uses the entered values to determine the d...
ALGO
0.997635
5.265513
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-11-09T18:56:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95493a4a749...
9411ec3e-7e43-4562-84aa-c766f7c649e8
CarlosDaniel111/competitive-programming
Codeforces/Div/Codeforces Round 936 (Div. 2)/D.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pi = pair<int, int>; using vi = vector<int>; #define pb push_back #define SZ(x) ((int)(x).size()) #define ALL(x) begin(x), end(x) #define FOR(i, a, b) for (int i = (int)a; i < (int)b; ++i) #define ROF(i, a, b) for (int i = (int)a - 1; i >= (int...
ALGO
0.999952
4.876988
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2023-08-03T01:39:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26a7cf094...
1bf67d99-c803-421a-9d2b-691b0b6470c9
donbasta/leetcode-submissions
Medium/16.cpp
class Solution { public: int threeSumClosest(vector<int>& nums, int target) { int n = nums.size(); int mn = INT_MAX; int lmao = INT_MAX; sort(nums.begin(), nums.end()); for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { int cur = nums[...
ALGO
0.999999
6.068409
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-05T03:05: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": "2ee09eaa2e23...
8453ccb0-66a8-4c8b-ad03-5ce3cbdfca63
glennlum/PASS-DSA-CPP
session-5/practice/STLMap_example/STLMap_example.cpp
// STLMap_example.cpp #include <iostream> #include <iomanip> #include <string> #include <map> #include "Person.h" #include "Address.h" using namespace std; int main(void) { //Map - A map uses key-value pairs to organise data //A map will sort its key from smallest to largest //A key ca...
TEST
0.987067
4.63097
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-04-17T14:42: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": "04cb6822d9b...
f757d15a-47aa-4462-b832-9deecf8bd0e9
arnab-bhattacharjee/my_code_repo
c++/problem5.cpp
#include <iostream> #include <algorithm> #include <string> using namespace std; int g; int* sa; int* rank; int len; string s; int substrCmp(string str1,string str2){ int l1=str1.length(); int l2=str2.length(); int i; for(i=0;i<l1 && str2[i];i++){ if(str1[i]==str2[i])continue; ...
ALGO
0.999927
3.898162
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-02-22T22:26: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": "5d82162fa5...
903baeb1-e013-4c9e-8c18-2d42c602a8ac
joannewolf/code_problems
leetcode/Linked_List/0146_LRU_Cache.cpp
// get O(1), put O(1), use hash map and double linked-list class Node { public: int key; int value; Node *left, *right; Node (int key, int value) { this -> key = key; this -> value = value; left = NULL; right = NULL; } }; class LRUCache { private: int capacity; unordered_map<int, Node*> nodes; Node *hea...
ALGO
0.999929
5.740967
{ "github_metadata": { "branch": "master", "commit_count": 239, "repo_created_at": "2017-06-23T08:23:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "653c0360...
742ec5d0-b8a5-492f-a7b0-3003fac646f7
kingamajcher/AISD
lista1/CDLL/LinkedList.cpp
#include "LinkedList.h" #include <iostream> #include <ctime> #include <cstdlib> #include <random> using namespace std; LinkedList::LinkedList() : head(nullptr), size(0) {} LinkedList::~LinkedList() { clear(); } void LinkedList::insert(int i) { Node* newNode = new Node(i); if (head == nullptr) { head...
TOOL
0.999264
4.038428
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-05-23T17:56:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "691f52ace08...
804c24f3-5006-4cef-8a76-089fdd7764a1
burannah/TwitchXX
TwitchXX/Video.cpp
// // Created by buran on 14/03/18. // #include <Video.h> #include <VideoOptions.h> #include <Api.h> #include <TwitchException.h> #include <JsonWrapper.h> #include <Utility.h> #include "UtilsInternal.h" namespace TwitchXX { namespace { web::uri getVideosUri(const std::vector<uint64_t>& ids, ...
TOOL
0.929984
7.361681
{ "github_metadata": { "branch": "master", "commit_count": 226, "repo_created_at": "2016-05-05T01:50:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b64fe2e...
d6e10233-248d-4691-9273-7f9c91b99c0f
mbed92/advent-of-code
scripts-2023/day04/main.cpp
#include "../common.hpp" #include <set> #include <sstream> #include <iterator> #include <map> #include <numeric> uint64_t cardValue(const uint64_t matches) { if (matches <= 1) return matches; return cardValue(matches - 1) * 2; } inline static bool isColon(const char &c) { return c == ':'; } inline stati...
ALGO
0.998594
5.371971
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-11-27T09:34: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": "af29bf3affb...
c50735af-99f9-42a0-a707-a73a333b062a
halcyoona/data-structures-cs-201
11-week-lec/cbt.cpp
#include <iostream> using namespace std; struct Node { int data; Node *left,*right; }; class cbt { private: Node *temp; int localHeight; int countNode; Node *searchTemp; Node *delTemp; public: int height; Node *root; int number; int flag; cbt(); ~cbt(); void delAll(Node *temp); void...
ALGO
0.999939
3.327232
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2018-09-09T18:28:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "063237437...
5b89d792-8ae9-4028-9fc1-b95d0681a02f
chr1shr/voro
examples/no_release/r_pts_interface.cc
// Voronoi calculation example code // // Author : <NAME> (Harvard University / LBL) // Email : <EMAIL> // Date : August 30th 2011 #include "voro++.hh" using namespace voro; // Set up constants for the container geometry const double x_min=-1,x_max=1; const double y_min=-1,y_max=1; const double z_min=-1,z_ma...
ALGO
0.993236
6.060351
{ "github_metadata": { "branch": "master", "commit_count": 445, "repo_created_at": "2019-09-28T18:04:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 186, "forks": 51, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "94a9...
22a44d14-beb8-4dc6-9bd2-1d2fd8997da1
SanRF/EDene-May
Tarea3/Ejer_1/Tarea3Eje1/main.cpp
// // main.cpp // Tarea3Eje1 // // Created by <NAME> on 13/04/15. // Copyright (c) 2015 <NAME>. All rights reserved. // #include <iostream> #include <string> #include "LinkedList.h" using namespace vcn; int main() { LinkedList<int> * inip = new LinkedList<int>(); LinkedList<int> * ultip = new LinkedList<...
ALGO
0.998921
3.248332
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2015-01-15T20:08:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "f17fea37d...
d1f59de8-105b-48df-9635-888c3d622676
google/wiberg-minimization
l1/linear_system/linear_system_l1_derivatives.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.999821
7.21962
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2013-09-10T01:33:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 17, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36b32419b...
bf220143-ceae-499a-81ab-31531b005375
rhindottire/lecture-projects
Data-Structure/coursework/Modul 5/BinaryTree/Binary.cpp
#include <Binary.h> Node* createNode(int id, char* data) { Node* temp = new Node; temp->id = id; temp->data= data; temp->parent=NULL; temp->left = NULL; temp->right = NULL; return temp; } BinaryTree::BinaryTree(){ this->root=NULL; } void BinaryTree::insertNode(Node* node){ if(thi...
ALGO
0.999802
4.181936
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-01-01T16:20:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbe34e81af6a...
8703bb1d-a751-4072-98c9-879b7fd339fe
Luggatariff/Generic-Games
src/Games/Draughts/Draughts.cpp
/*! * \file Draughts.cpp * \brief Draughts code * \author <NAME> */ #include <Draughts/Draughts.hpp> #include <algorithm> Draughts::Draughts(Player * player_one, Player * player_two){ Coordinates board_size(2); board_size[0] = DRAUGHTS_HEIGHT; board_size[1] = DRAUGHTS_WIDTH; this->t_board = new Board<Draughts...
ALGO
0.978616
3.983647
{ "github_metadata": { "branch": "eclipse_windows", "commit_count": 129, "repo_created_at": "2014-10-06T08:18: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": ...
49f0be4f-9dcd-4794-a678-e665a4c0066b
SuperChenSSS/Algorithm-Training
Trainning/区域模拟赛/1.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <string> #include <vector> #include <stack> #include <cstdlib> #include <cmath> #include <map> #include <queue> using namespace std; typedef long long ll; const double PI = acos(-1.0); const double eps = 1...
ALGO
0.99955
3.179998
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-07-26T14:06:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 73, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "727a55a5...
9553b97c-dae8-4f96-b94a-7adbb7f7bc06
AWM1303/3811-CW2
vmlib/mat44.hpp
#ifndef MAT44_HPP_E7187A26_469E_48AD_A3D2_63150F05A4CA #define MAT44_HPP_E7187A26_469E_48AD_A3D2_63150F05A4CA #include <cmath> #include <cassert> #include <cstdlib> #include "vec3.hpp" #include "vec4.hpp" /** Mat44f: 4x4 matrix with floats * * See vec2f.hpp for discussion. Similar to the implementation, the Mat44f...
ALGO
0.931114
4.117363
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-12-15T01:59: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": "dd60f5228243...
c19c09f4-0e57-4a35-b0ce-75667cfbe80a
windcry1/My-ACM-ICPC
VJudge/356109 J.cpp
/************************************************************************* >>> Author: WindCry1 >>> Mail: <EMAIL> >>> Website: https://windcry1.com >>> Date: 12/30/2019 11:03:37 PM *************************************************************************/ //#pragma GCC optimize(3) //#pragma GCC diagnostic error "-std=c...
ALGO
0.9999
3.810819
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2020-01-03T16:13:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed5aee8c...
ac127f22-cc6c-46ff-b774-b199a6949163
rashidtvmr/DSA__CPP
bitmasking.cpp
#include <iostream> #include <vector> using namespace std; void printBinary(int num) { cout << "Binary of " << num << " is :"; for (int i = 10; i >= 0; i--) cout << ((num >> i) & 1); cout << endl; }; int countSetBit(int n) { int c = 0; while (n) { n = n & (n - 1); c++; ...
ALGO
0.999915
3.929766
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-06-04T18:15:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43b3d5578d...
80daf681-bcff-4c1d-99c3-e79bb17ab18c
dobrichev/PrimorialSoup
BitMask.h
#ifndef BITMASK768_H_INCLUDED #define BITMASK768_H_INCLUDED #include <stdlib.h> #include <limits.h> #include <assert.h> #include <immintrin.h> #include <cmath> #include <new> #include <algorithm> #include <cstring> //#define NO_AVX typedef union alignas(32) { #ifndef NO_AVX __m256i b256; #endif __m128i b128[2]; ...
TOOL
0.939042
3.066475
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-12-23T12:05:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01f2833b90...
4a311707-0538-4681-99b6-ae95ce78b1b1
imvskalhans/DSA-Codes
LeetCode34FirstAndLastPositionOfSortedArray.cpp
/* 34. Find First and Last Position of Element in Sorted Array Medium Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. You must write an algorithm with O(log n) runtime complexity. */ ...
ALGO
0.999911
5.784656
{ "github_metadata": { "branch": "DSA-Practice", "commit_count": 990, "repo_created_at": "2022-11-17T19:00:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46...
53a27f31-f167-4502-a6a3-09be2ded5620
AyushKumar123456789/DSA
Femwick Tree/InversionCount.cpp
#include <bits/stdc++.h> using namespace std; int sum(int idx, vector<int> &BIT) { int sum = 0; while (idx > 0) { sum += BIT[idx]; idx = idx - (idx & -idx); } return sum; } void update(int idx, int val, vector<int> &BIT) { int n = BIT.size(); while (idx < n) { B...
ALGO
0.999967
4.685054
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2024-05-12T14:23:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd17395d0...
6176fe3b-36aa-4008-a9d7-127864ec2b7a
1394441084/Universal-meritocracy
万能择优器/模板-泛型编程/模板.cpp
#pragma once //#include "类.h" //使用类模板文件分开,会找不到类函数的定义(因为编译器会对类模板进行两次编译),所以需要: //#include "类模板的写法(特殊情况-友元函数).cpp" //.h和.cpp文件是一块的了.这样main函数就能找到了 #include "类模板的写法(特殊情况-友元函数).hpp" //行业将类模板具体实现一般定为.hpp(统一区分) #include "数组类模板(vector).hpp" #include <stdlib.h> using namespace std; //简单的初测容器 void Measured_at_the_beginning...
TOOL
0.946455
4.896691
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-02-24T02:27:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18825b8904...
0f87040f-7714-442b-9026-5669bb77188f
karp48ul3/RabinKarpMatcher
RKMatcher.cpp
#include <iostream> #include <climits> #include <iomanip> auto RabinKarpMatcher(char T[], char P[], int d, int q) { int n = strlen(T); // length of text int m = strlen(P); // length of pattern int h = 1; // calculating h = d^(m-1) mod q for (int i = 0; i < m - 1; ++i) { h = (h * d) % q; ...
ALGO
0.999887
5.774138
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-11-28T16:24: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": "8a897ce2a379...
5ca558b8-c13b-41a8-8d11-984f8808090c
EdoardoCarlesi/cmbeasy
analyze/wmap7/WMAP_7yr_gibbs.cc
/**************************************************************** * This file is part of the C++ port of the Fortran likelihood * code for the WMAP 7yr release provided by the WMAP team * at http://lambda.gsfc.nasa.gov/ . * * The code was ported by <NAME> for easier * interfacing with cmbeasy (http://ww...
ALGO
0.979828
5.469775
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2013-04-13T10:55:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef37144cb4...
23b5a39e-b61e-4584-a422-4928b8838696
aaronbloomfield/pdr
labs/lab01/svutil.cpp
// utility functions for vectors of strings #include "svutil.h" // prints the strings in the vector void svOutput ( const vector<string> &vect ) { for (int i=0; i < vect.size(); ++i) { cout << vect.at(i) << " "; } cout << endl; } // finds a string in a vector and returns its index int svFind ( c...
TOOL
0.978824
5.389338
{ "github_metadata": { "branch": "master", "commit_count": 2942, "repo_created_at": "2013-12-28T14:02:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 116, "forks": 484, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8e...
ab152a01-8956-42b0-abb8-65596fa93082
cl3403/Shortest-Path-
shortestPath.cc
#include <limits> #include "BinaryHeap.h" #include <vector> #include <thread> using namespace std; void dijkstra(const double* const * adjMatrix, int numVertices, int source, double*& dist, int*& prev) { dist = new double[numVertices]; prev = new int[numVertices]; bool* added = new bool[numVertices]; for (int...
ALGO
0.99999
5.008971
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2016-10-19T18:07: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": "a54a98850c...
c45da38c-2bac-4449-a1d9-9273ea71426e
PixelPartisan01/DirectXLearn
DirectXLearn/DirectXLearn.cpp
#include <iostream> #include <DirectXMath.h> #include <DirectXPackedVector.h> #include <wrl.h> std::ostream& XM_CALLCONV operator<<(std::ostream& os, DirectX::FXMVECTOR v) { //DirectX::XMFLOAT3 dest; //DirectX::XMStoreFloat3(&dest, v); //os << "(" << dest.x << ", " << dest.y << ", " << dest.z << ")"; os << "(" <<...
ALGO
0.960552
5.875154
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2025-02-11T13:32: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": "28f5091eed...
70e8fb61-6f36-48f9-ae65-77be22f52693
Gohitha6Nadikota/Practice
Arrays/Medium/Next Permutation.cpp
/* A permutation of an array of integers is an arrangement of its members into a sequence or linear order. For example, for arr = [1,2,3], the following are all the permutations of arr: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]. The next permutation of an array of integers is the next lexicographically gr...
ALGO
0.999998
6.389616
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-06-05T11:04: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": "cd86c9b4657c...
1eaefec5-6e64-4fd6-83ea-0492c1885bba
Beck049/data-structure-algorithm
02.Sort/radix_sort.cpp
#include "array_func.h" // g++ radix_sort.cpp -o sort void radixSort(int*); int main(void) { int data[10] = {73, 22, 93, 43, 55, 14, 28, 65, 39, 81}; printf("\nBefore sort: "); int len = 8; int* data = init_array(data, len); printf("Radix sort\nOrigin data:"); print_array(data, len); //p...
ALGO
0.999954
4.702796
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2021-07-19T20:31: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": "6081c962b7b...
1cad7d84-9f1a-4792-a967-ea40fe53e4e6
muman613/dev-sandbox
cpp/sorts/sort1/main.cpp
/** * @module main.cpp * @project Sort1 * @author <NAME> * @date January 17, 2018 */ //#define DUMP_TREE 1 // enable to dump tree to console... //#define DISPLAY_UNSORTED 1 // Display the unsorted list... //#define GET_NODEVEC 1 #include <iostre...
TOOL
0.994743
4.836842
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2020-04-11T18:33:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 16 }, "file_meta": { "content_id": "d10229b...
bb120fb6-e2a8-4179-bbb4-3c67de4e5dba
hal-uw/rocBLAS
library/src/blas3/rocblas_trmm.cpp
/* ************************************************************************ * Copyright 2016 Advanced Micro Devices, Inc. * ************************************************************************ */ #include <hip/hip_runtime.h> #include "rocblas.h" #include "definitions.h" #include "logging.h" #include "utility.h" ...
ALGO
0.978844
4.882209
{ "github_metadata": { "branch": "master", "commit_count": 527, "repo_created_at": "2019-09-18T17:45:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29efcb385...
fa2afe9e-77f6-48b9-a46a-f4105f275414
lmartim4/ENSTA-OS02
projet/Etape_1/code_backup/model.cpp
#include <stdexcept> #include <cmath> #include <iostream> #include "model.hpp" #include <omp.h> #include <algorithm> namespace { double pseudo_random(std::size_t index, std::size_t time_step) { // Multiply index*((time_step+1) + 10000) removes std::uint_fast32_t xi = std::uint_fast32_t(index * ...
ALGO
0.999317
6.342682
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2025-02-04T09:03: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": "9bb1bd75f63...
00b18e72-cacc-4b41-99c0-853b9df9fb54
dchular/dchular-CP
done/BROWN/02-B. A^B^C.cpp
#include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <iomanip> #include <cmath> #include <cassert> #include <numeric> //#include <bits/stdc++.h> //#define rep(i,a,n) for (int i=a;i<n;i++) #define overload4(_1, _2, _3, _4, name, ...) name #define rep1(n) for(ll i = 0; i < (n); ++i) #defi...
ALGO
0.999924
3.420131
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-04-10T01:43: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": "49a935563a86...
4251f9cd-1521-4384-bcad-569e89741509
acidentally/cplusplus
Linh tinh/tleoj_contestD.cpp
/*Good luck for those who are trying your best May the most glorious victory come*/ #include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define vi vector<int> #define vvi vector< vector<int> > #define endl '\n' typedef pair<int, int> pi; int n, l, r, cnt = 0; int a[1...
ALGO
0.99978
3.525794
{ "github_metadata": { "branch": "Main-Suffer", "commit_count": 95, "repo_created_at": "2023-08-03T12:29: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": "c867...
90f2171a-3f93-42e2-ad93-3c9ec9dfa983
Tony-M2/Funciones_Cadena
Separar_nombre_2.c++
#include <iostream> // Para entrada/salida estándar #include <string>// Para el uso de strings using namespace std; int main() { // Solicitar el nombre completo al usuario cout << "Ingrese el nombre completo: "; string nombre_compl; getline(cin, nombre_compl); // Encontrar los índices de los espacios en blanco...
ALGO
0.979403
4.645104
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-01-26T23:59: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": "d1e0cd4364fd...
88060393-dece-431d-83ce-26f788db05b8
yuejiangw/data-structures
Tree/AVL/AVL.cpp
#include <iostream> #include <cmath> using namespace std; // 结点定义 struct Node { int key; // 关键字(键值,用来排序的) int height; // 高度 Node* lchild; // 左孩子 Node* rchild; // 右孩子 Node() { key = INT_MAX; height = 0; lchild = nullptr; rchild = nullptr; } }; cla...
ALGO
0.999929
4.812188
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2019-06-13T10:59:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "272b338c...
8fc58528-298b-4fe8-aeb4-28dc758ba1bd
kwdx/LeetCode-Practise
Cpp/1668.最大重复子字符串.cpp
/* * @lc app=leetcode.cn id=1668 lang=cpp * * [1668] 最大重复子字符串 */ #include <iostream> #include <string> using namespace std; // @lc code=start class Solution { public: int maxRepeating(string sequence, string word) { int ans = 0; string sub = word; while (sequence.find(sub) != sequence...
ALGO
0.999956
5.894892
{ "github_metadata": { "branch": "master", "commit_count": 379, "repo_created_at": "2019-11-29T10:20:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50f0e380...
7f9e38c4-250d-46b4-9de8-efb4cf04fe26
alexandraback/datacollection
solutions_1673486_1/C++/srh/p1.cc
#include <iostream> #include <iomanip> #include <vector> #include <stdio.h> int main() { int numcases; std::cin >> numcases; for (int casenum = 1; casenum <= numcases; ++casenum) { int a, b; std::cin >> a >> b; std::vector<double> v; for (int i = 0; i < a; ++i) { double x; std::cin >> x; ...
ALGO
0.997976
3.451144
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7cc69d3e...
2e2dbeda-25cc-4893-908e-97a348a17e22
SeungMinSong2929/BINARY
BINARY_code/denovo.cpp
#include "denovo.h" #include "DNA_set.h" void denovo() { struct SHORT *First; // 1. 모든 short read 정보 load cout << "1. 모든 short read 정보 load" << endl; getSR(AllSR); // 2. 연결 관계 및 처음 파악 cout << "2. 연결 관계 및 처음 파악" << endl; First = findConnect(AllSR); // 3. 복원 cout << "3. 복원" << endl; DE_NOVO(First); } voi...
DATA
0.991289
3.168393
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-06-03T03:53: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": "1c4641bc2...
79c6d35c-ca31-4a26-99b5-9d3be91460bf
knopjesmuseum/resilient-network
resilient_network/resilient_network.ino
// resilient network #include <SoftwareSerial.h> #include "Arduino.h" #include "timers.h" #define leds1pin 11 #define leds2pin 3 #define debugLedPin 9 // unused + / S footprint / 4th led #define button1pin 2 // isSource jumper #define button2pin 4 // alert button #define SERIAL_DEBUG true #define DROPPING_CONNECTOR ...
TOOL
0.955211
4.294628
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2015-12-28T19:55:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "538eaddec7...
c1fcffa0-05e5-41ad-9905-6166aba42728
vaibhavb1996/602
ass3/polyops.cpp
// Copyright 2018 <NAME> <EMAIL> // Copyright 2018 <NAME> <EMAIL> // Copyright 2018 <NAME> <EMAIL> typedef vector<double> Poly; // Add two polynomials Poly add_poly(const Poly& a, const Poly& b) { int length; if (a.size() > b.size()) length = a.size(); else length = b.size(); Poly c; ...
ALGO
0.99587
4.452171
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-10-16T15:56: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": "c45541d4b7...
96f418f9-c157-4d4f-aa96-a5a90272c206
lisansulistiani/UVA
C++/1644.cpp
#include<iostream> using namespace std; bool isPrime(int n) { if (n <= 1) return false; if (n == 2) return true; if (n % 2 == 0) return false; for (int i = 3; i * i <= n; i += 2) { if (n % i == 0) return false; } return true; } int prime(int k, bool upDown) { if (k <= 2) return 2; ...
ALGO
0.999876
3.983611
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2025-05-07T11:09: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": "63f45482f8...
8d087f4b-0757-46aa-b551-f213a25cccfc
Theorist-Git/matOpsPy
include/matOps.hpp
#include <iostream> #include <vector> #include<cmath> #pragma once /** * @class Matrix * @brief A simple linear algebra library for matrix operations. * * This class provides basic matrix operations such as addition, subtraction, * multiplication, transposition, determinant calculation, inversion, and row/column ...
TOOL
0.974368
6.093216
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2025-02-17T17:33: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": "baef9bc5e...
df496173-78e8-41f9-a140-5cbee79a017c
devangchopra/DSA-Codes
Solutions/Binary Trees/border view of a binary tree.cpp
class Solution { private: public: void left(Node* root , vector<int> &ans) { if(root==NULL) return; if(root->left!=NULL) { ans.push_back(root->data); left(root->left,ans); } else if(root->right!=NULL) { ans.push_back(root->data); left(root->right,ans)...
ALGO
0.999947
4.888792
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2020-10-09T12:28: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": "0df3a6d1312...
d64aaa58-0af7-44d4-8c69-2e0fadc4a56a
tutss/problems
dzy.cpp
#include <bits/stdc++.h> using namespace std; void __print(int x) {cerr << x;} void __print(long x) {cerr << x;} void __print(long long x) {cerr << x;} void __print(unsigned x) {cerr << x;} void __print(unsigned long x) {cerr << x;} void __print(unsigned long long x) {cerr << x;} void __print(float x) {cerr << x;} vo...
ALGO
0.999931
4.355275
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2019-02-15T00:47: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": "18c626523...
c461588d-c055-48a0-afc1-c26c45188bbf
hoangvanthien/codeForest
UVa/10440 - Ferry Loading II.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i,x,y) for(int i = (x); i<=(y); ++i) #define DFOR(i,x,y) for(int i = (x); i>=(y); --i) #define db(x) cout<<#x<<" = "<<x<<endl; #define forit(it, var) for(__typeof(var.begin()) it = var.begin(); it!=var.end(); ++it) #define forrit(it, var) for(__typeof(var.rbegi...
ALGO
0.999948
3.146
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-11-05T09:09:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "25720ac25d...
e4298d38-047e-4f76-94d0-2ee33c5967b7
LostInArgand/CSES_Problem_Set
String_Algorithms/Finding_Periods.cpp
#include <bits/stdc++.h> #include <iostream> #include <cstdio> #include <climits> #include <unordered_map> #include <cmath> #include <vector> #include <unordered_set> #include <queue> #define MOD 1000000007 typedef long long int ll; using namespace std; int max(int x, int y){ if (x > y){ return x; ...
ALGO
0.999921
3.90582
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2021-06-05T09:35: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": "36e3d3d06c...
0ac13dae-d7bc-4920-8d23-c304c56ffb71
wykim111/algorithm
그래프/16948 데스나이트.cpp
/* 전형적인 BFS 문제 시작위치의 횟수는 0이며 주변에 이동할 수 있는 경로에 현재 지점+1로 업데이트 */ #include<cstdio> #include<queue> #include<vector> #include<algorithm> using namespace std; int N; int map[201][201]; int visit[201][201]; int r1, c1, r2, c2; int dy[] = { -2,-2,0,0,2,2 };//6개 방향 int dx[] = { -1,1,-2,2,-1,1 }; queue<pair<int, int>> Q...
ALGO
0.999948
3.448844
{ "github_metadata": { "branch": "master", "commit_count": 343, "repo_created_at": "2019-10-27T11:39:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19380404...
6a793792-2e1c-4f93-bb68-4fc45069a208
Nasir-Uddin25/Basic-Data-Structure
Assignment-4/sum_without_leaf.cpp
#include <bits/stdc++.h> using namespace std; class B_Node { public: int val; B_Node *left; B_Node *right; B_Node(int val) { this->val = val; this->left = NULL; this->right = NULL; } }; B_Node *input_tree() { int val; cin >> val; // Corner Case handle B...
ALGO
0.99947
4.472424
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-12-09T15:44: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": "041273b2142...
194c0cca-0235-4b80-8673-94899f94e69b
mvrm-dev/Beecrowd
C++/problema_de_josephus_prime.cpp
#include <stdio.h> #include <stdbool.h> int is_prime(int num_primo){ for (int i = 2; i*i <= num_primo; i++){ if (num_primo % i == 0){ return false; } } return true; } int main(){ while (true){ int tamanho_lista; scanf("%d",&tamanho_lista); ...
ALGO
0.99997
4.042017
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-04-25T15:37: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": "3d1f18c3bbb2...
48dcce1b-40b0-4a89-a5c5-8310da248c1e
dmkz/competitive-programming
mirea/cources/beginner/2023-2024/constructives/G.cpp
#include <bits/stdc++.h> #define all(x) (x).begin(),(x).end() using namespace std; main() { // когда баланс становится отрицательным, надо менять текущую закрываюшую скобку на // самую-самую правую открывающую string s; cin >> s; const int n = (int)s.size(); int balance = 0, rightOpen = n-1, answ{};...
ALGO
0.99984
4.075838
{ "github_metadata": { "branch": "master", "commit_count": 2019, "repo_created_at": "2018-04-25T11:54:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 41, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6bdb7c...
cfb3cb71-acc0-487f-b390-80289e9d95ac
gael-rs/software-engineer-code-upc
Algorithms-and-Data-Structures/Examen-Final/Ejercicio 2/Programa.cpp
#include <iostream> #include "MiArbolBinario.h" using namespace std; void menu() { MiArbolBinario arbol; int opcion, numero; do { cout << "=====================================================================================" << endl; cout << " M E N U D E O P ...
ALGO
0.999327
4.517627
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-02-26T22:38:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b8f44c1172...