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
4a3ccc2f-603d-424f-bb79-f0605dc6dea3
wnstjd9288/PS
ESS/RandomDefense_3/Gold/[C] 22026. 카드 뒤집기 게임.cpp
#include <vector> #include <string> using namespace std; bool reversal(int N, int M, vector<string> P) { for (int i = 0; i < N; i++) for (int j = 0; j < M; j++) if (P[i][j] == 'X') for (int k = j; k < N; k += M) P[i][k] = 'X' + 'O' - P[i][k]; for (int i = 0; i < M; i++) for (int j = M; j < N; j++) ...
ALGO
0.999728
3.920934
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2025-03-11T07:04: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": "f0172a2b3f2...
d186001e-c619-45d5-9288-d004d5c09310
rakesh-chinta/Big4_Interview_Preparation
c++/find_difference.cpp
/* * Find the difference between two string. * String t is generated by random shuffling string s and then add * one more letter at a random position. * Determine the character which is different in t. * * Approach: Since only one letter is different between s and t, * we could try XOR approach. * XOR of a...
ALGO
0.999738
5.98756
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-06-25T18:07:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb34ac0e3d...
cd9502cb-c6bb-4592-b2c5-b7e71d4ea504
vowchick/3D_graph
main.cpp
#include <stdio.h> #include <stdlib.h> #include <memory> #include "system_builder.h" #include "system_solver.h" #include "helper_functions.h" #include "io.h" struct thread_info { system_solver *solver; system_builder *builder; int n; int p; int idx; std::function<double (double, double)> f; double eps; ...
ALGO
0.999057
4.132084
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2020-05-17T15:12:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a3288a2c...
54733baf-5176-4bf3-ab51-86454b2a2fbe
abdulwarisgurkhoo/OPERATIONS_ON_ARRAY
set_operations_on_array.cpp
/****************************SET OPERATION (UNION,intersection) BETWEEN 2 ARRAYS***************/ #include <iostream> using namespace std; void display(int arr[], int count) { for (int i = 0; i < count; i++) { cout << arr[i] << " "; } } int ispresent(int arr[], int count, int num) { for (int i ...
ALGO
0.998616
5.363713
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-01-04T06:20:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a6e114a22b...
aaa5aa57-ab31-4514-8402-196bb558e46a
kaldi-asr/kaldi
src/featbin/multiply-vectors.cc
// featbin/multiply-vectors.cc // Copyright 2020 <NAME> (STC-innovations Ltd) // See ../../COPYING for clarification regarding multiple authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the Lic...
DATA
0.971372
6.741089
{ "github_metadata": { "branch": "master", "commit_count": 9405, "repo_created_at": "2015-04-20T17:23:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14986, "forks": 5368, "issues": 189, "pull_requests": 63 }, "file_meta": { "content_id":...
2385c1ee-c969-4f9e-a71d-379fdb2b079d
wangx1996/Multi-Object-Tracking
track_ws/src/mot_tracking/src/cal_iou.h
#ifndef CAL_IOU_H #define CAL_IOU_H #include "tracker.h" //https://blog.csdn.net/zjn295771349/article/details/112989543 // 第一步找到最左边的点 static int find_leftmost_point(std::vector<cv::Point2f>& intersectingRegion) { int index = 0; float tmp = intersectingRegion[0].x; for(int i=1; i<intersectingRegion.size();...
ALGO
0.99851
5.720089
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-06-14T15:49:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 175, "forks": 60, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "d04e576c...
bf038757-9c32-4b3a-8987-8ee83a69662f
Tusharrastogi9897/cpp-files-and-repos
linked-list/doubly-linked-list.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node * next; Node * prev; void traverseLinkedList(){ Node* ptr; ptr = this; cout<<"\n"; while(ptr){ cout << ptr -> data << " - > "; ...
ALGO
0.999623
4.657755
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-06-16T10:30: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": "4577c54c6...
40244f12-db01-4850-a0ad-88dc15a12032
maze1377/my_course_notes
حل تمرین آموزش اصولی برنامه نویسی/00-99/answers/09_01.cpp
#include <stdio.h> int strlen(char* str){ int i; for(i=0;str[i];i++); return i; } void emptystr(char* str, int n){ for(int i=0;i<n;i++){ str[i]=0; } } int strappend(char* str, int n, char c){ int len = strlen(str); if(len>=n-1) return 0; str[len] = c; str[len+1] = '\0'; ...
ALGO
0.999777
3.039636
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2020-10-15T06:43:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c98329a1cba...
7c1edbe9-bd79-4f61-a3d2-bd5146cfe783
jefftrull/EDASkel
analysis/parasitics/rlc_eigen_odeint.cpp
// Test of odeint+Eigen(MNA) using an RLC tank circuit // <NAME> 2013-05-17 #include <vector> using namespace std; #include <boost/numeric/odeint.hpp> using namespace boost::numeric; #include <Eigen/Dense> using namespace Eigen; // Functions for implementing MNA with an Eigen matrix // general stamp for conductance t...
ALGO
0.999051
5.422215
{ "github_metadata": { "branch": "master", "commit_count": 244, "repo_created_at": "2011-10-07T17:22:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 39, "forks": 20, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b37398...
2d905808-df82-449d-94f7-d540f2a3268b
ishandutta2007/codeforces-w
wxhtzdy/normal/1661/A.cpp
#include <stdio.h> #define N 25 long long abs_(long long x) { return x < 0 ? -x : x; } long long min(long long a, long long b) { return a < b ? a : b; } int main() { int t; scanf("%d", &t); while (t--) { int n, i, j, x, aa[N], bb[N]; long long dp[N][2]; scanf("%d", &n); for (i = 0; i < n; i++) scan...
ALGO
0.999913
3.384868
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34: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": "f021ac8d1f79...
e9243b1d-b86a-422c-8190-f22a4b6bcd92
zheng-yan-group/aqc-tutorial
aqc-tutorial/main.cpp
/* ================================================ * AQC for 2-SAT problem * Author: <NAME>, Westlake Univ * Last updated: Jan.9, 2024 * ================================================*/ #include <iostream> #include "QuEST.h" #define a 0 // label of the ancilla using namespace std; int main (){ int pa...
ALGO
0.999964
3.747398
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-01-09T12:00: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": "0a3c32074175...
2c9b871f-9d8e-458c-91f1-e3d2878528a7
SeongmoAhn/ProblemSolving
17396.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; #define PS_INPUT cout.tie(NULL); cin.tie(NULL); ios_base::sync_with_stdio(false) #define endl '\n' #define INF 1e10 #define pii pair<int, int> #define ll long long #define SIZE 100001 int n, m; vector<pii> graph[SIZE]; bool sight[SIZE]; bool v...
ALGO
0.999902
3.744406
{ "github_metadata": { "branch": "main", "commit_count": 437, "repo_created_at": "2023-05-17T03:04: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": "e8dcf67e47...
44ec5130-1666-44da-a075-86c246ef0636
Aky9821/Cpp
LongestSubstring.cpp
#include <bits/stdc++.h> #define lli long long int #define ull unsigned long long int #define mod 1000000007 #define pq priority_queue #define pb push_back #define ld long double #define REP(x, n) for (int x = 0; x < n; x++) using namespace std; class Solution { public: int lengthOfLongestSubstring(string s) ...
ALGO
0.999831
5.384902
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2022-03-03T20:08:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6fbdc4ac1...
d1f6a483-12c0-4026-8afe-b02d70de2298
root-project/root
math/mathcore/src/BrentMethods.cxx
// @(#)root/mathcore:$Id$ // Authors: <NAME> 01/2008 /********************************************************************** * * * Copyright (c) 2006 , LCG ROOT MathLib Team * * ...
ALGO
0.999956
6.000082
{ "github_metadata": { "branch": "master", "commit_count": 93033, "repo_created_at": "2013-06-27T10:46:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2899, "forks": 1363, "issues": 467, "pull_requests": 269 }, "file_meta": { "content_id"...
5944c657-d570-47f0-99e0-88676a0bed2f
tuffery/Frog2
frowns/extensions/pysssr/sssr.cxx
// sssr source code and helpers #include "sssr.h" #include <queue> #include "assert.h" //#define DEBUG // Courtesy functions for debugging void dumpAtoms(AtomList &x) { AtomList::iterator ix=x.begin(); for(; ix != x.end(); ix++) { (*ix)->dump(); } } void dumpAtoms(AtomVector &x) { AtomVector::iterator ix=x.beg...
ALGO
0.996146
4.306209
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2011-08-03T08:49:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 16, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9c33ced...
9a50478a-c7c2-449d-9dcc-0f53e3f675da
ShavarshSimonyan/standart-cell-placement-tool-using-Simulated-annealing-agorithm-C-
floorplaning.h
#ifndef __FLOORPLANING__ #define __FLOORPLANING__ #include <utility> #include "Integrated_Circuit.h" class floorplaning { public: floorplaning(integrated_circuit &ob, const std::string &outputName_, bool whole_circuit_bbox_ = true, const bool do_initial_palcement_ = true); double simulated_annealing(); private: v...
ALGO
0.994665
4.155134
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-03-10T18:43:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ef1ea8f71...
a454f246-3f38-4adf-b1de-1c1b62ad0153
ishandutta2007/codeforces-x
xellos/normal/1491/F.cpp
// iostream is too mainstream #include <cstdio> // bitch please #include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <list> #include <chrono> #include <random> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include ...
ALGO
0.999355
3.088076
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:38: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": "2543e5f93c4d...
47b26c70-ba32-4c6b-bc00-254b9cff1a59
Ranu2211/Data-structure
Good or Bad string - GFG/good-or-bad-string.cpp
// { Driver Code Starts // Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: int isGoodorBad(string S) { int vowel = 0 ; int cons = 0 ; for( int i = 0 ; i < S.length() ; i++ ) { ...
ALGO
0.99922
4.688415
{ "github_metadata": { "branch": "main", "commit_count": 1284, "repo_created_at": "2021-12-05T18:07: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": "ad2a97fbc...
ad7d319f-93ad-435f-98ba-048d29b40085
xuankunyang/cpp_learning
data_structre/3.14.1.cpp
#include <iostream> #include <cstring> using namespace std; template<class elemtype> class myqueue; template<class elemtype> class mystack1; template <class elemtype> class node { friend class myqueue<elemtype>; friend class mystack1<elemtype>; private: elemtype data; node* next; public: node() { next = nullp...
ALGO
0.999897
3.388253
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-06-26T11:34: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": "3a18104fbe1...
0ef4d6d8-c435-410c-919f-fb1deff4325c
Rocky-6/atcoder_cpp
abc312/c.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> a(n), b(m); for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < m; i++) { cin >> b[i]; } sort(a.begin(), a.end()); sort(b.begin(), b.end()); int ng = 0;...
ALGO
0.999994
3.915641
{ "github_metadata": { "branch": "main", "commit_count": 305, "repo_created_at": "2023-04-11T09:17:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f826dd87d3...
eab54a4f-b812-4b7b-a2c8-46e4fcc7cfeb
chilldave/Learning_C-
Exercise/Condition IF/if/even-odd/main.cpp
#include <iostream> using namespace std; int main(){ int number, digit1,digit2,digit3; /* cout<<"Enter a number: "; cin>>number; if((number%2) == 0) { cout<<"The number is an even number : "<<number<<endl; }else{ cout<<"The number is an odd number : "<<number<<endl; } */ ...
ALGO
0.999303
3.197644
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-04-15T22:53: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": "59a9d88c0c...
31126642-408a-4fda-807e-fac2fe3dc832
sumitdhyani/DataStructures
Trees/BinaryTrees/BinarySearchTrees/RankBST.h
#if !defined(_RANK_BST_H_) #define _RANK_BST_H_ #include "BSTBase.h" namespace trees { template <class T, class comp=std::less<T>, class Base = BST<T,comp> > class RankBST : public Base { protected: typedef typename Base::BSTNode BSTNode; virtual BSTNode* getBSTNode(T info) { return new BSTNode(info); ...
ALGO
0.999488
4.088265
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2017-04-06T04: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": "6e6f55f0f...
ac2e714c-e3ad-438a-913e-c5186505e803
BNandor/MatOpt
NMHH/libs/include/nomad/Math/MatrixUtils.hpp
/*---------------------------------------------------------------------------------*/ /* NOMAD - Nonlinear Optimization by Mesh Adaptive Direct Search - */ /* */ /* NOMAD - Version 4 has been created by ...
TOOL
0.999736
5.736673
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-05-22T06:44: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": "4cbb92a708a...
91bec979-8872-4597-a58c-a414429bcb81
littlebearsama/3D-ObjectDetection-and-Pose-Estimation
8.其他/机器人抓取/重构/NCC/squirrel_perception_backup-hydro_dev/v4r/v4r/ORFramework/voxel_based_correspondence_estimation.hpp
#ifndef FAAT_PCL_REGISTRATION_VOXELBASED_CORRESPONDENCE_ESTIMATION_HPP_ #define FAAT_PCL_REGISTRATION_VOXELBASED_CORRESPONDENCE_ESTIMATION_HPP_ #include "voxel_based_correspondence_estimation.h" template <typename PointSource, typename PointTarget, typename Scalar> void faat_pcl::rec_3d_framework::VoxelBasedCorrespon...
ALGO
0.95069
6.305815
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-05-06T08:03:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 290, "forks": 77, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "77a21c...
1ab79709-cf9d-46d2-80f4-3cfe2af52845
agl-alexglopez/dancing-links-and-planning-pokemon
src/type_encoding.cc
/// /// MIT License /// /// Copyright (c) 2023 <NAME> /// /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentation files (the "Software"), to /// deal in the Software without restriction, including without limitation the /// rights to use, copy, ...
TOOL
0.937677
7.080034
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2023-01-04T02:33: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": "2e7843ba05...
6cf87cf1-ce4d-4848-8ea0-f1eb1ee8492b
coldEr66/online-judge
CF/CF 544B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double lf; typedef pair<ll,ll> ii; #define REP(i,n) for(int i=0;i<n;i++) #define REP1(i,n) for(ll i=1;i<=n;i++) #define RST(i,n) memset(i,n,sizeof i) #define SZ(a) (int)a.size() #define ALL(a) a.begin(),a.end() #define F first #define S second ...
ALGO
0.999963
3.428495
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2018-04-07T03:54: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": "372eb3f9a...
c0430c53-b6de-4573-a43f-28e9b9dc405b
Rajkumarsahu-xyz/Data-Structures-and-Algorithms-Leetcode
Shortest path in Undirected Graph having unit distance - GFG/shortest-path-in-undirected-graph-having-unit-distance.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: void dfs(int start, int V, vector<pair<int, int>> adj[], stack<int>& stk, vector<int>& visited) { visited[start] = 1; for(a...
ALGO
0.999962
5.711934
{ "github_metadata": { "branch": "master", "commit_count": 2997, "repo_created_at": "2022-09-23T14:55:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51116da...
90c0bf60-1294-4bc4-bba6-ee5c834503c8
ishandutta2007/codeforces-l
liti/normal/474/D.cpp
/* In the name of Allah */ #include <bits/stdc++.h> using namespace std; const int maxN = 1000*100 + 10 ; const int mod = 1e9 + 7; int fen[maxN]; void add( int x , int val ) { x++; for( ; x < maxN ; x += x & (-x) ) fen[x] = ( fen[x] +val ) % mod; } int get( int x ) { x++; int ret = 0; for( ; x > 0 ; x ...
ALGO
0.999895
4.26194
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17: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": "c846f4d9ce82...
d06651fe-73f9-46fb-a888-c9cf7ef4578f
Organic-Code/TX-eye-tracking
include/eye_finder.hpp
#pragma once #include <opencv2/core/types.hpp> #include <cv.hpp> #include <string_view> #include <set> #include "matrix.hpp" #include "twin_matrixes.hpp" #include "config.hpp" #include "utils.hpp" struct eye { cv::Rect eye_region; cv::Point eye_position; private: cv::Point position_in_local; mutable unsigned i...
ALGO
0.984254
6.937761
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-03-13T19: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": "07ba74a696...
b9af9ecc-5251-480d-a2eb-171a41de2386
paradaa4/unique-words
src/main.cpp
#include "FileReader.h" #include "StringSplitter.h" #include "ThreadPool.h" #include <format> #include <iostream> #include <ranges> constexpr size_t MAX_CHUNK_SIZE = 1024 * 1024 * 128; int main(int argc, char *argv[]) { const auto args = std::vector<std::string_view>(argv + 1, argv + argc); if (args.size() !=...
TOOL
0.910522
5.944046
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-10-22T11: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": "32c6a32b65b...
9e973940-b4d2-412b-a004-3a88d0c4fbbc
NaCl-1374/perceptive_legged_control
OCS2_ws/src/hpp-fcl/src/collision.cpp
/* * Software License Agreement (BSD License) * * Copyright (c) 2011-2014, <NAME>, Inc. * Copyright (c) 2014-2015, Open Source Robotics Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditio...
ALGO
0.998132
7.014678
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2024-10-13T10:56:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "cf5a47a83...
bfb2e1ba-1eaf-4a01-8c9f-543befef5134
Tanvish-IITG/DATA_STRUCTURE
LAB7.cpp
#include<bits/stdc++.h> using namespace std; bool compare(string,string); void insertion_sort(string a[],int low,int high) { for(int i=low+1;i<=high;i++) { int j = i-1; string temp = a[i]; while(j>=0&&compare(a[j],temp)) { a[j+1] = a[j]; ...
ALGO
0.999855
4.425561
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2019-07-29T13:07: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": "e754a7100...
9e76c187-0ed4-460b-84ed-20be3b608bed
davxis/3-4-tasks-2sem
PlaneFigureLib/Angle.cpp
#include "Angle.h" #include <cmath> #include <climits> #include "helpers.h" /* * @brief Конструктор, инициализирующий угол заданными тремя точками. * @param a Первая точка (A) угла. * @param b Вторая точка (B) угла (вершина). * @param c Третья точка (C) угла. */ Angle::Angle(const Point& a, const Point& b, cons...
TOOL
0.904472
4.618738
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2025-05-05T17:09:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "225593a59...
209cb681-613b-4c76-9787-41458f3ec3ba
noko206/AtCoder
abc/201-250/225/c.cpp
#include <bits/stdc++.h> using namespace std; #define _overload3(_1,_2,_3,name,...) name #define _REP(i,n) REPI(i,0,n) #define REPI(i,a,b) for(int i=int(a);i<int(b);++i) #define REP(...) _overload3(__VA_ARGS__,REPI,_REP,)(__VA_ARGS__) #define ALL(a) (a).begin(),(a).end() #define ALLR(a) (a).rbegin(),(a).rend() typedef...
ALGO
0.999994
4.257513
{ "github_metadata": { "branch": "main", "commit_count": 244, "repo_created_at": "2023-05-21T12:02: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": "55f8888038...
f9f0c134-afde-46fa-b236-356cbc359db5
zhaowk/leetcode_cpp
10xx/1042.h
#pragma once #include <vector> using std::vector; class Solution { public: static vector<int> gardenNoAdj(int n, vector<vector<int>>& paths) { vector<vector<int>> maps(n+1); for (auto path : paths) { maps[path[0]].push_back(path[1]); maps[path[1]].push_back(path[0]); ...
ALGO
0.999957
5.485855
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-04-11T07:14: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": "6f0b5ed67bf3...
1933fb61-6df1-4718-a548-0065397047b1
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Plugins/Runtime/ZoneGraph/Source/ZoneGraph/Private/ZoneGraphAStar.cpp
// Copyright Epic Games, Inc. All Rights Reserved. #include "ZoneGraphAStar.h" #include "ZoneGraphTypes.h" #include "ZoneGraphQuery.h" int32 FZoneGraphAStarWrapper::GetNeighbourCountV2(const FZoneGraphAStarNode& Node) const { // @todo: Make a special case to allow picking side neighbours when starting in an intersec...
ALGO
0.965674
6.390018
{ "github_metadata": { "branch": "5.4", "commit_count": 164, "repo_created_at": "2023-03-14T06:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "78c5a521c5...
0c190814-232d-4377-8bf7-802d8d8467c7
pattrickx/estrutura-de-dados
minha_lista_dinamica/main.cpp
#include <iostream> #include <stdlib.h> using namespace std; struct RES{ int quantidade; int resistencia; RES *proximo; }; struct LISTA{ int topo; RES *inicio; }; LISTA *construtor(){ LISTA *temp = (LISTA*)malloc(sizeof(LISTA)); temp->topo=0; temp->inicio=NULL; return temp; } void setfim(RES *temp, int r, int q){ ...
ALGO
0.949411
3.394455
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-08-31T16:48: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": "774487659...
caf35d89-3399-4e3d-b8ff-f2f00b2f79af
chaurasia28/Code_Book
CPP/PracticeQuestion/IdenticalTree.cpp
#include<iostream> #include<queue> using namespace std; class Node { public: int data; Node* left; Node* right; Node(int data) { this->data=data; this->left=NULL; this->right=NULL; } }; void build...
ALGO
0.999974
4.495285
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-12-22T08:19: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": "b2dd5fe39d2...
06883fe3-793a-4391-af42-96717fc90a0a
st116409/programming-c-2024-autumn
2025.03.07-Homework-8/Task/main.cpp
#include <iostream> class ArrayList { int len; int* data; void init(int len = 10) { this->len = len; data = (int*)malloc(sizeof(int) * len); } bool indexValid(int index) { return 0 <= index && index < this->len; } void expand(bool front = false) { ++len; int* p = (int*)malloc(sizeof(int) * len);...
TOOL
0.997453
4.193064
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2024-09-17T17:48: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": "6d6bb277b...
bf46f08c-486d-4193-ad72-507671de64a6
Anubhav-Raj/QuestionOfCPP
Array/trappingRainWater.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: long long trappingWater(int arr[], int n) { long long res = 0; int lmax[n], rmax[n]; lmax[0] = arr[0]; // left max for (int j = 1; j < n; j++) { lmax[j] = max(lmax[j - 1...
ALGO
0.999939
6.093602
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-11-20T04:40: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": "8cbd81e0f05...
5c923563-b566-4f32-b93a-2bbe4f0f08d9
maheshjainckd/Hacktoberfest2022-for-everyone
CPP/Graph-patterns/minimum-spanning-tree/kruskals-algo.cpp
// UNION FIND IMPLEMENTATION // UF -> HELPS IN DETECTING CYCLES VERY FAST // Greedy take edges of min size, if edge forms cycle, ignore it otherwise add to sum class Solution { int find(int a, int p[]) { return p[a] == a ? a : p[a] = find(p[a], p); } bool unite(int a, int b, int parent[], int...
ALGO
0.999989
5.606783
{ "github_metadata": { "branch": "main", "commit_count": 1700, "repo_created_at": "2021-10-22T16:00:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 147, "forks": 719, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "9c37b...
721d0783-4382-4d2a-8423-c8e386569529
yogesh584/Leetcode
1402-reducing-dishes/1402-reducing-dishes.cpp
class Solution { public: int solve(vector<int>& sati,int index,int time,vector<vector<int>>& dp){ if(index >= sati.size()){ return 0; } if(dp[index][time] != -1) return dp[index][time]; // pick int ans1 = time*sati[index] + solve(sati,index+1,time+1,d...
ALGO
0.999959
5.25873
{ "github_metadata": { "branch": "main", "commit_count": 179, "repo_created_at": "2023-02-21T04:20: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": "12340337f3...
b7493e75-b69e-4810-b53f-8ddd9a6041b1
farm-ng/farm-ng-core
cpp/thirdparty/farm_pp/include/farm_pp/preprocessor/seq/transform.hpp
# /* ************************************************************************** # * * # * (C) Copyright <NAME> 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy ...
ALGO
0.998696
7.241652
{ "github_metadata": { "branch": "main", "commit_count": 213, "repo_created_at": "2022-07-01T04:32:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 39, "forks": 8, "issues": 10, "pull_requests": 11 }, "file_meta": { "content_id": "64cd5ae8...
1f65c398-54c3-4443-bfaa-84bc39d8939e
ishandutta2007/codeforces-d
dreamoon_love_aa/normal/394/E.cpp
#include<stdio.h> #include<string> #include<math.h> #include<stdlib.h> #include<set> #include<bitset> #include<map> #include<vector> #include<string.h> #include<algorithm> #include<iostream> #include<queue> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ...
ALGO
0.999868
3.562857
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47cb36c581bf...
1b00ab12-80c1-4393-bc14-2e712e875fcb
paoluncangshu/freefem
src/Algo/NRJ.hpp
/****************************************************************************/ /* This file is part of FreeFEM. */ /* */ /* FreeFEM is free software: you can redistribute it and/or modify */ /* i...
TOOL
0.965819
4.320028
{ "github_metadata": { "branch": "master", "commit_count": 5837, "repo_created_at": "2019-11-14T05:02: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": "e3efad6...
06976c01-3089-4fe3-8881-1c61b3b295e1
HariAakash646/CompetitiveProgramming
USACOSilverPractice/cow_dance_show.cpp
#include <bits/stdc++.h> #include <iostream> using namespace std; #define scd(t) scanf("%d", &t) #define scld(t) scanf("%ld", &t) #define sclld(t) scanf("%lld", &t) #define scc(t) scanf("%c", &t) #define scs(t) scanf("%s", t) #define scf(t) scanf("%f", &t) #define sclf(t) scanf("%lf", &t) #define forr(i, j, k) for (i...
ALGO
0.999982
3.977939
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2022-09-08T07:58:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a2b18c108...
ff54b483-21a3-424a-815a-b6841862cad0
lilelr/RoundD_APAC_Test_2017
B2.cpp
//#include <cstdio> // //int n, m, ans; // //int main() { // freopen("/Users/yuxiao/ClionProjects/RoundD_APAC_Test_2017/in", // "r", stdin); // freopen("/Users/yuxiao/ClionProjects/RoundD_APAC_Test_2017/out", // "w", stdout); // int t, tt; // scanf("%d", &t); // for (int tt = 1; tt <= t; tt++) { ...
ALGO
0.999884
3.699439
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-10-25T14:10: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": "9fab92a830...
73255df7-8f49-48af-8853-340e53f845ce
aravindkrishnaswamy/RISE
src/Library/Sampling/NRooksSampling2D.h
////////////////////////////////////////////////////////////////////// // // NRooksSampling2D.h - Type of Latin Hypercubes sampling // // // Author: <NAME> // Date of Birth: October 30, 2001 // Tabs: 4 // Comments: // // License Information: Please see the attached LICENSE.TXT file // ////////////...
ALGO
0.985597
5.925324
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-12-20T17:27:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c469502e86...
850cba30-be18-4769-b0cc-bdc93b367e09
mefthag/PPMMF
RegArchGitEtudiants/RegArchLib/Headers/cMa.h
#pragma once #ifndef _CMA_H_ #define _CMA_H_ #include "cAbstCondMean.h" #include "cRegArchValue.h" /*! \file cMa.h \brief header for class cMa. \author <NAME>, <NAME> \date dec-18-2006 - Last change feb-18-2011 */ namespace RegArchLib { /*! * \class cMa * \brief Class to implement an MA model */ class ...
TOOL
0.917497
5.754983
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2018-11-19T08:57: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": "afe9454e0...
58023e8c-5722-4c98-a6f6-7c3488357723
obfuscated-end-user/CPP
Projects/LearnCPP/07/7_05/calc.cpp
// https://www.learncpp.com/cpp-tutorial/switch-fallthrough-and-scoping /* Write a function called calculate() that takes two integers and a char representing one of the following mathematical operations: +, -, *, /, or % (modulus). Use a switch statement to perform the appropriate mathematical operation on the intege...
TOOL
0.932474
6.377063
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2022-08-26T01:00:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "31b97db6da...
32f05caf-f83c-4282-921f-9ec9b970de7e
libfive/libfive
libfive/src/render/brep/dc/marching.cpp
/* libfive: a CAD kernel for modeling with implicit functions Copyright (C) 2017 <NAME> This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <iostream> #include <Eig...
ALGO
0.996675
5.455525
{ "github_metadata": { "branch": "master", "commit_count": 2425, "repo_created_at": "2015-12-12T00:57:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1521, "forks": 164, "issues": 104, "pull_requests": 11 }, "file_meta": { "content_id": "...
1abfe9a5-ee09-402a-960c-48333680a095
dyljqq/Person-detect
PedestrianDetect/PedestrianDetect/Otsu.cpp
#include"Otsu.h" int cvOtsu(IplImage *src) { int thresholdValue=1; int thresholdValue_deltaT=0; int deltaT = 0; //光照调节参数 uchar grayflag =1; IplImage* gray = NULL; if(src->nChannels != 1) //检查源图像是否为灰度图像 { gray = cvCreateImage(cvGetSize(src), 8, 1); cvCvtColor(src, gray, CV_BGR2GRAY); grayflag = 0; ...
ALGO
0.991863
4.58033
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-06-04T02:44:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f8492b89f...
cffa282d-c031-4313-aeb3-6d7ab9e3477b
IgorShishi20/Labs_PSTU-22-23
Labs/Lab1/8Queens.cpp
#include <iostream> using namespace std; int board[8][8]; bool isPossible(int n, int row, int col){ //check vertical for(int i=row;i>=1;i--){ if(board[i-1][col]==1){ return false; } } //check secondary diagonal for(int i=row,j=col;i >= 1 && j >= 1;i--,j--){ if(bo...
ALGO
0.999871
4.3151
{ "github_metadata": { "branch": "main", "commit_count": 373, "repo_created_at": "2022-10-14T10:57:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5806483827...
bd90258c-4ef5-4836-8da5-732269aec0ca
Bharatbardiya/my-leetcode-solutions
2717-collect-coins-in-a-tree/2717-collect-coins-in-a-tree.cpp
class Solution { public: int collectTheCoins(vector<int>& coins, vector<vector<int>>& edges) { int n = edges.size()+1; if(n<=5) return 0; vector<vector<int>>Tree(n); vector<int>degree(n); for(auto edge : edges){ int u = edge[0], v = edge[1]; T...
ALGO
0.999922
4.951964
{ "github_metadata": { "branch": "main", "commit_count": 1138, "repo_created_at": "2024-12-05T05:20:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59b6bc47b...
45b13b7d-3350-4f4e-ae3e-68efedb2e1ed
loopclub2022/MonthLongChallenge
Prachee_19GCEBCS102/Day1/Solution.cpp
Approach- 1. create two temporary strings 2. For string s, iterate over it and check when it encounters hash, if temp1 is empty, copy hash into temp1, and increment count if temp1 is not empty, erase last character fro temp1, and decrement count. 3. Repeat step 2 with string t and...
ALGO
0.999949
5.609453
{ "github_metadata": { "branch": "main", "commit_count": 463, "repo_created_at": "2022-04-29T10:14:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 33, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "8508a50b2c...
4e9c3616-23cf-4ac2-80b4-1efcc7ce3f8c
dhruvbhardwaj14/InterviewPrep
BinarySearch/BsonAnswers/shipwithinDays.cpp
#include "bits/stdc++.h" using namespace std; //Problem Statement /* A conveyor belt has packages that must be shipped from one port to another within days days. The ith package on the conveyor belt has a weight of weights[i]. Each day, we load the ship with packages on the conveyor belt (in the order given by weights...
ALGO
0.999996
4.365227
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2025-04-07T18:39: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": "06f26c6b2...
0005ee7e-d183-4749-82da-26fef51c50f4
didw/coding
algospot/algosrc/problems/polyominoes/polyominoes.cpp
// polyominoes reference solution by JM #include <iostream> #include <cstdio> #include <cstring> using namespace std; const int MOD = 10*1000*1000; int cache[101][101]; // n개의 정사각형으로 이루어졌고, 맨 위 가로줄에 first 개의 // 정사각형을 포함하는 폴리오미노의 수를 반환한다 int poly(int n, int first) { // 기저 사례: n == first if(n == first) return 1; //...
ALGO
0.999974
4.099668
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2015-12-01T04:53:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c97a62759...
48a93611-7033-485f-966b-4e0267f9d1f7
NPyzhyanov/solution
solution/main.cpp
#include <iostream> #include <string> #include <stdexcept> #include <array> #include <vector> #include <map> #include <memory> #include <typeinfo> #include <algorithm> #include "consts.h" #include "data_types.h" #include "curve_types.h" #include "curve.h" #include "circle.h" #include "ellipse.h" #include "helix.h" #in...
ALGO
0.999048
5.415326
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-02-03T04:34: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": "0947e2f103f2...
fe88e6d0-3ee0-426c-9244-bc52e55c092c
Nemo21/Class-Test-ST-2
CodeForces Questions/CodeForces First 100/EverythingEverywhereAllButOne.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define ff first #define ss second #define pii pair<ll,ll> #define vi vector<ll> #define vt(type) vector<type>...
ALGO
0.999303
3.572259
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-26T05:00: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": "a8eef71b0011...
9311efc3-3b18-461b-8196-75e727cd4c3c
Kabilio/Arq2
Trab Arq2/Exercício2/index.cpp
// Comunicações ponto a ponto, exercício 1 #include <iostream> #include <mpi.h> #include <cstdlib> int main(int argc, char **argv) { MPI_Init(&argc, &argv); int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); // Read the local value of the process // local_value will hold a specific int for process 0, and ano...
ALGO
0.999531
5.433419
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-11-20T03:02: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": "0458e99df252...
f312a9a5-ddf8-44b7-a1c3-f3cbee653180
shashank73744/Competitive_Coding
Whole_word_2/Whole_word_2/main.cpp
// C++ implementation of search and insert // operations on Trie #include <stdio.h> #include <iostream> using namespace std; const int ALPHABET_SIZE = 26; struct Trienode { struct Trienode *children[ALPHABET_SIZE]; bool Endofword; int count; }; struct Trienode* getNode(void){ struct Trienode *node =...
ALGO
0.999956
3.425246
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-04-03T23:42: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": "7d9ce85ff8...
cf0c5e08-9d51-4584-b757-0031e7e850a2
waywooKwong/Algorithm
QuickSort.cpp
#include <iostream> using namespace std; void swap(int& a, int& b) { int tmp = a; a = b; b = tmp; } int partition(int* a, int l, int r) { int pivot = a[r]; int index = l - 1; for (int j = l; j < r; j++) { if (a[j] <= pivot) { index++; swap(a[index], ...
ALGO
0.999972
5.354381
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-29T12:10:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7cf76084d34...
caa2fe1a-4d8a-4ac5-a01d-8ab556ff5d62
fengvyi/LeetCode
C++/257. Binary Tree Paths.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ // DFS class Solution { public: vector<string> binaryTreePaths(TreeNode* root) { vector<string>res; if(...
ALGO
0.999969
6.080394
{ "github_metadata": { "branch": "master", "commit_count": 1188, "repo_created_at": "2017-08-06T09:52:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 144, "forks": 39, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6bec...
f64cbc64-dd55-48e8-b1c4-700fc055e17d
Toru52/uva
CPE(Collegiate Programming Examination)/level2/353 - Pesky Palindromes.cpp
353 - Pesky Palindromes #include <iostream> #include <string> #include <map> #include<algorithm> using namespace std; bool PorN(const string &s) { string r_s(s); reverse(r_s.begin(), r_s.end()); return s == r_s; } int main() { string s; while (cin >> s) { map<string, int> V; int c = 0; for (size_t i = ...
ALGO
0.999875
5.155885
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-07-22T14:22: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": "e75cd86d6184...
050b4942-d1eb-4f37-9180-569f22964b6c
huangchuanhong/algorithms
chapter18/B_tree/B_tree/B_tree.cpp
#include <iostream> #include <queue> using namespace std; const int t = 2; struct Node { int n; bool leaf; char key[2*t-1]; Node* c[2*t]; }; void init_node(Node *node) { node->n = 0; node->leaf = 1; } void disk_read(Node *node){} void disk_write(Node *node){} class BTree { public: BTree(){root=new No...
ALGO
0.999933
3.726728
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-11-19T14:24: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": "8385a53f8...
70197266-ba49-4c81-9b00-07e926d34a05
2261819266/code_old
NOIP2022/answers/FJ-257/barrack/barrack.cpp
#include<bits/stdc++.h> using namespace std; const int N=5e5,M=1e6; int n,m; bool a[N+1]; bool b[M+1]; struct S{ int x,y; }; S SS[M+1]; int fa[N+1]; inline F(int x){ if(fa[x]==x)return fa[x]; fa[x]=F(fa[x]); return fa[x]; } inline bool check(){ int i,j; int fx,fy;int fff,sum; for(i=1;i<=m;i+...
ALGO
0.999909
3.520428
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-01-29T12:39: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": "84c89285dd...
f567beee-f5c1-4a02-ac05-dd1f35fff9d4
duroi/Past-Project-Collections
COP 4530 - Data Structures/Project1/Project1FinishedSourceFiles/InstructionList.cpp
//COP 4530 //<NAME> (DRIVER) //<NAME> (NAVIGATOR) #include "instruction_list.h" using namespace std; ostream& operator<< (ostream& out, const InstructionList& list) { //curr is a node to hold the current node to print InstructionList::node* curr = list.head; //while loop to loop though the list while (curr != n...
ALGO
0.951942
4.467003
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-11-29T19:48:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7dda517b...
7d48553b-0324-44eb-b365-9c46331ee877
1592063346/Codes
Codeforces/CF#522 Div.1/3.cpp
#include<bits/stdc++.h> using namespace std; #define rg register const int N = 3e5 + 10, mod = 998244353; inline void add(int& x, int y) { x += y; if (x >= mod) { x -= mod; } } inline void mul(int& x, int y) { x = 1ll * x * y % mod; } inline int qpow(int v, int p) { int res = 1; for (; p; p >>= 1,...
ALGO
0.999724
4.549757
{ "github_metadata": { "branch": "master", "commit_count": 436, "repo_created_at": "2018-12-27T22:56: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": "a254edc8...
a25d47b5-491c-43ab-9e52-c4db0a3e8bd9
alps-jbnu/23ALPStudy
2023-1/Exercise/ohanthony/8_week/5.9 Exercise B/14716_S(1)_Recursive.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long // -2^63 ~ 2^63-1 #define pii pair<int, int> #define X first #define Y second #define Z third int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; int dy[] = {0, -1, 0, 1, 1, -1, 1, -1}; int M, N; int result; int board[255][255]; bool vis[255][255]; void dfs(int...
ALGO
0.999847
4.686597
{ "github_metadata": { "branch": "main", "commit_count": 2930, "repo_created_at": "2023-02-03T06:11:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 59, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "122d4eb5...
689d3f93-3c7a-471a-bb9c-8ef969e930c9
Chenjq-99/algorithm-learning
leetcode/图/并查集/_1319_连通网络的操作次数.cpp
#include<iostream> #include<vector> #include<numeric> #include<unordered_map> using namespace std; // https://leetcode.cn/problems/number-of-operations-to-make-network-connected/ // 并查集模板 class UnionFind { public: vector<int> parent; vector<int> size; int n; int setCount; // 当前连通分量数目 public: U...
ALGO
0.999309
5.614428
{ "github_metadata": { "branch": "master", "commit_count": 315, "repo_created_at": "2022-12-23T08:25: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": "222915b7...
4e53042a-915f-4802-87de-361899da9435
dcode2004/TLE_CP-31_Sheet
B_Comparison_String.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define f(i,s,e) for(int i = s; i < e; i++) #define fi(i,s,e) for(int i = s; i <= e; i++) #define pii pair<int, int> #define vi vector<int> #define vpii vector<pair<int,int>> #define mii map<int,int> #define umii unordered_map<int,int> #define si set<...
ALGO
0.999925
3.548898
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-13T10:03: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": "d14c5beb7f5a...
e5a44249-99ba-497a-9b59-b0472a538df4
edoBaldini/watermarking
map_ff.cpp
#include <iostream> #include <vector> #include <ff/pipeline.hpp> #include <ff/farm.hpp> #include <string> #include "CImg.h" #include <fstream> #include <atomic> #include <ctime> #include <algorithm> #include "util.cpp" #include <map> /* This implementation takes as input: - the directory path of the input images, ...
TOOL
0.989175
5.657147
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-01-27T16:15: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": "b8706ddb94...
96fde1b8-bef9-4cd7-ae4b-beb1971be1e1
PabloG03/AyEDA
Ordenacion/src/main_functions.h
/* Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Asignatura: Algoritmos y Estructuras de Datos Avanzadas * Curso: 2º * Práctica 3 * Autor: <NAME> * Correo: <EMAIL> * Fecha: 07/03/2024 * source Autómata celular general */ #include<iostream> #include<vector> #...
ALGO
0.999536
4.643723
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-04-15T12:52: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": "15dcf1bd32db...
844e660e-8ce2-434b-a691-e33f376fd48b
acarteas/2019-fall-cs211
lectures/2019-11-14 MSTs and M6 help/benchmarks/SortingBenchmark.h
#pragma once #ifndef SORTING_BENCHMARK_H #define SORTING_BENCHMARK_H #include <chrono> #include "../sorting/IndexedSort.h" #include "../ADTs/RandomNumberGenerator.h" using namespace std; using namespace std; using namespace std::chrono; class SortingBenchmark { public: long long emptyBenchmark(IndexedSort<int> *so...
TEST
0.932243
6.261381
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2019-08-19T02:44:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 24, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "f4de3258...
4ef388ed-9cc6-4160-9403-4a1c1e4cd684
Devansh968/LEET-CODE-SOLUTIONS
Isomorphic Strings - GFG/isomorphic-strings.cpp
// { Driver Code Starts // C++ program to check if two strings are isomorphic #include<bits/stdc++.h> using namespace std; #define MAX_CHARS 256 // } Driver Code Ends class Solution { public: //Function to check if two strings are isomorphic. bool areIsomorphic(string s1, string s2) { ...
ALGO
0.999892
5.483311
{ "github_metadata": { "branch": "main", "commit_count": 1083, "repo_created_at": "2022-04-10T15:44:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "019ab064b...
7735090b-56d4-422d-a3cf-6f9713c5f886
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/05/0501/personal_submission/cf631c_Arrogant_sword.cpp
#include<bits/stdc++.h> #define int long long #define all(a) a.begin(), a.end() #define endl '\n' #define pb push_back #define PII pair<int,int> #define x first #define y second #define SZ(a) ((int)a.size()) using namespace std; void print(vector<int> vi) { for (auto t : vi) cout << t << ' '; cout << endl; } /...
ALGO
0.999983
3.56877
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "7a11...
8a40e377-47f7-4819-8963-a2f552d47dd3
dam-crtl/dam-crtl
two_sat.cpp
#include<bits/stdc++.h> #include<atcoder/all> using namespace std; using namespace atcoder; using namespace internal; using mint = modint1000000007; using mint2 = modint998244353; template <class T> using maxpq = priority_queue<T>; template <class T> using minpq = priority_queue<T, vector<T>, greater<> >; template <cla...
ALGO
0.999998
4.018668
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-08-19T13:39: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": "65c7c531afae...
b74afac1-e243-4e1c-a14d-9da8bcd62068
Francesco98m/Hopfield-NN
HNN.cpp
#include "HNN.h" HNN::HNN (int n_neurons) { Neurons.resize(n_neurons); W.resize(n_neurons); for(int i=0; i<n_neurons; i++) { W[i].resize(n_neurons); int r=rand()%100; if(r<49) Neurons[i].output =-1; else Neurons[i].output=1; for(int j=0; j<W[i].size(); j++) {...
ALGO
0.999777
3.791048
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-11-27T23:34:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbcdc79e85...
b285adf6-bf8d-44b4-91ba-3c0396425134
djadjaa/AISP22
7/ispredmanjiveci.cpp
//ovde koristimo deque -> red koji ima dva kraja //zbog svojstva niza (tekst zadatka) dovoljno je proveriti samo za jedan broj da li je manji ili veci od njega jer svi elementi ispred njega su ili veci ili manji #include <iostream> #include <deque> #include <algorithm> using namespace std; int main(){ int64_t n; ...
ALGO
0.99995
5.160333
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-09-03T10:54: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": "4cc7072a2262...
e6701ffa-c73b-4561-bdab-6f6c53e2b96b
AhmedAbdelshakour1/competitive-programming
LeetCode/Permutation in String.cpp
// https://leetcode.com/problems/permutation-in-string/description/ // Sliding Window bool checkInclusion(string s1, string s2) { int n = s2.size(), m = s1.size(); if(m > n) return false; vector<int> freqN(26), freqM(26); for (int i = 0; i < m; ++i) freqM[s1[i] - 'a']++, freqN[s2[i] - 'a']++; if(fr...
ALGO
0.999063
6.546556
{ "github_metadata": { "branch": "main", "commit_count": 354, "repo_created_at": "2021-09-25T01:25:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b2e52471b...
cb121ebc-e81c-4c88-81a8-fb70c761a27e
moeedrajpoot1/CPP-questions
test.cpp
#include <iostream> using namespace std; // // int main(){ // // char a; // // cout<<"Please Enter"<<endl; // // cin>>a; // // if(isdigit(a)){ // // cout<<"The Number us Digit"<<endl;} // // else if(isalpha(a)){ // // if(isupper(a)){ // // cout<<"The Input is in Upper Case"<<end...
ALGO
0.998379
3.111799
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-06-19T08:58:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0e5d32de17...
f1bdbda8-6cef-435d-bf09-8d11e3ccbf06
sumitvajarinkar/dsaCpp
Searching Algorithm/3firstOccurrence(2).cpp
/*Index of First occurrence Approach 2 O(log n) O(1) - Here iterative Binary search we used Data must be sorted i/p : arr[] :{1,10,10,10,20,20,40} x=20 o/p : 4 (20 is at index 4 which is first occur in given array */ #include<bits/stdc++.h> using namespace std; firstOccur(int arr[],int n,int x) { int low=0,high...
ALGO
0.999803
5.312922
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2021-01-11T16:45: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": "0b243bd05f...
2599e0b0-635c-4957-85d0-3c5b4e795a7f
HuyWibu/Source_Code_C_plus_plus
code_PTIT/khoang_cach_bang_x.cpp
#include <bits/stdc++.h> using namespace std; int Binary_Search(int a[], int low, int high, int x) { if (low <= high) { int mid = (low + high) / 2; if (a[mid] == x) return mid; if (x < a[mid]) return Binary_Search(a, low, mid - 1, x); return Binary_Search(...
ALGO
0.999982
4.031672
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2021-09-07T11:53: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": "27b86a2ce...
f1482d62-616e-4216-8215-b0f7a327a9ab
project-fractal/WP4T41-01-Data-Compression-for-Low-Power
Compression/source/LZWCompression.cpp
#include "Utility.h" using namespace std; #define DICTIONARY_LENGTH 4096 #define CODE_WORD_LENGTH 128 #define MIN_CHAR_INSERT 2 class LZWCompression : public Utility { /*--------------------------Variables Declarations-----------------------------------*/ private: long bytesWritten; int byteFillCount; long co...
ALGO
0.997906
3.874255
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-09-08T09:22:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ad55f94b323e...
392e9394-76fc-4459-883e-9ea73d7dc3c7
Clouder0/AlgorithmPractice
Codeforces/contest/1740/D.cpp
#include <cstdio> #include <algorithm> #include <ctype.h> const int bufSize = 1e6; inline char nc() { #ifdef DEBUG return getchar(); #endif static char buf[bufSize], *p1 = buf, *p2 = buf; return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, bufSize, stdin), p1 == p2) ? EOF : *p1++; } inline void read...
ALGO
0.999373
3.440856
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2022-10-23T12:45: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": "67c7cee0de8...
8f6c22f9-d531-4310-8020-da51b56389b7
i20/raytracer
optimize rotation/optimize.cpp
#include <string> #include <iostream> using namespace std; void set_identity(string * m) { for(size_t i = 0; i < 4; i++){ size_t idx = i * 4; for(size_t j = 0; j < 4; j++) m[idx + j] = i == j ? "1" : "0"; } } void multiply(string * m, const string * m1, const string * m2) { ...
ALGO
0.999247
4.225432
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2018-02-02T20:44: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": "48ce82a7c...
99971a42-74a3-46f7-a791-7b921bef7c86
vxl/vxl
contrib/mul/vimt/vimt_sample_profile_bilin.h
#ifndef vimt_sample_profile_bilin_h_ #define vimt_sample_profile_bilin_h_ //: // \file // \brief Profile sampling functions for 2D images // \author <NAME> #include <vimt/vimt_image_2d_of.h> #include <vnl/vnl_fwd.h> #include <vgl/vgl_fwd.h> //: Sample along profile, using bilinear interpolation // Profile points ...
ALGO
0.990499
6.84771
{ "github_metadata": { "branch": "master", "commit_count": 42154, "repo_created_at": "2013-05-02T18:32:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 250, "forks": 157, "issues": 49, "pull_requests": 0 }, "file_meta": { "content_id": "f4...
b605b197-ade1-4ee9-a5be-bd075ab23984
ankit-tiwari-dev/DSA-Problem-Set-II
Sort_0s_1s_2s_in_array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void sort012(vector<int>& a) { int n = a.size(); int low = 0; int mid = 0; int high = n - 1; while(mid <= high) { if(a[mid] == 0) ...
ALGO
0.99977
5.915713
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-11-22T07:10: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": "8174ecaafdea...
832eba2a-e3fa-4b85-b976-68dbc5fe9218
yamate11/compprog
abc/abc302/d/cans.cc
#include <bits/stdc++.h> #include <cassert> using namespace std; using ll = long long int; using pll = pair<ll, ll>; // #include <atcoder/all> // using namespace atcoder; #define REP(i, a, b) for (ll i = (a); i < (b); i++) #define REPrev(i, a, b) for (ll i = (a); i >= (b); i--) #define ALL(coll) (coll).begin(), (coll)....
ALGO
0.999991
4.682508
{ "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": "72809b9ae6...
077e5f01-9253-48d0-8689-bad5818494e8
jensooY/25parr
hw_3/kmeans.h
#ifndef KMEANS_H // 包含守卫,防止重复包含 #define KMEANS_H #include <vector> #include <cstdint> #include <limits> / #include "simd_distance.h" / #include <algorithm> #include <cmath> // 标准库:数学函数 #include <random> // 标准库:随机数 #include <iostream> // 标准库:输入输出 #include <fstream> // 【新增】标准库:文件流,用于写入文件 #include <st...
ALGO
0.987105
6.824058
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2025-03-28T09:42: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": "42d6da57827...
13529ca7-9265-4750-9e06-8c455dadfef8
rcortes-b/Webserver
srcs/ServerLocation.cpp
#include "../includes/ServerLocation.hpp" ServerLocation::ServerLocation(void) { _route = ""; _redirect = ""; _root = ""; _autoindex = NONE; _index = ""; _isDefMethods = false; _isDefRedirect = false; _isDefRoot = false; _isDefAutoIndex = false; _isDefIndex = false; _isDefCgi = false; } ServerLocation::S...
WEB
0.946721
4.11139
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2024-06-28T14:03: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": "4590f8ecda7...
711aca9f-964e-4877-a4a3-b528f6536cfd
Gautam-Jangir8/LeetCode-Questions
0129-sum-root-to-leaf-numbers/0129-sum-root-to-leaf-numbers.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.999857
5.804334
{ "github_metadata": { "branch": "main", "commit_count": 1045, "repo_created_at": "2024-06-23T04:57: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": "736bda8fe...
2c712bc4-999b-439e-9e1a-4d5b94ca8254
SSAHARIA7/DSA
Linked Lists/q8.cpp
#include <iostream> class Node { public: int data; Node *next; Node() { this->data = 0; next = NULL; } Node(int data) { this->data = data; this->next = NULL; } Node(int data, Node* next) ...
ALGO
0.999919
5.418412
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-07T08:38: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": "e0b9a21cd131...
d9c89692-0b01-4371-8631-440da1833812
danielzkng/codeforces
0700/727C.cpp
#include <iostream> #include <stdio.h> #include <vector> using namespace std; int main(){ int n; cin >> n; vector<int> arr; int a, b, c; // 1 2, 2 3, 3 1 cout << "? 1 2\n"; fflush(stdout); cin >> a; cout << "? 2 3\n"; fflush(stdout); cin >> b; cout << "? 3 1\n"; fflush(...
ALGO
0.999967
3.00928
{ "github_metadata": { "branch": "main", "commit_count": 287, "repo_created_at": "2021-10-15T13:51: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": "041bd2f646...
13a6aae7-570e-4158-ace3-80467031edb4
apple-love/BatchGEMM
ROCm/data/sort.cpp
#include<cstdlib> #include<cstdio> #include<cmath> #include<fstream> #include<vector> #include<algorithm> #include<utility> struct mytuple { int m; int n; int k; }; using namespace std; //#define random(x) (rand()%(x)) bool is64x64(int a, int b) { return (a % 64 == 0 && b % 64 == 0); } bool is32x32(int a...
ALGO
0.997875
3.227446
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2024-06-01T07:57:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ee1ff9cc5...
55959b19-fcf4-4455-98b7-c80b6836913f
farouqadepetu/First-Game-Engine
Physics Engine/Source Files/BoundingSphere.cpp
#include "BoundingSphere.h" namespace PhysicsEngine { void InitalizeSphere(Sphere& sphere, const vec3& center, float radius) { sphere.center = center; sphere.radius = (radius <= 0.0) ? 1.0f : radius; } void ComputeSphere(Sphere& sphere, const std::vector<ShapesEngine::Vertex>& vertices) { vec3 minP(vertice...
ALGO
0.942799
5.952803
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2023-03-07T19:09: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": "3ed34ab898...
1fa35974-539b-4415-aaa0-bf141850dbc2
tyedwards37/LeetCode
Daily-Challenge/daily_118.cpp
/* Daily Question: 1669. Merge In Between Linked Lists * by <NAME> | March 19th, 2024 * Code Credit: Righley (from here on out I am going to comment along my understanding of each step of the solution) * You are given two linked lists: list1 and list2 of sizes n and m respectively. * Remove list1's nodes from the ...
ALGO
0.99979
5.303975
{ "github_metadata": { "branch": "main", "commit_count": 1086, "repo_created_at": "2023-10-25T05:06: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": "aade8fb30...
a6f7ddb0-1607-4176-9166-5f57d61eb32c
jacqswu/wuj643_dtOF_2017
w09_h01_milkyway3D/src/Attractor.cpp
// // Attractor.cpp // Attractors // // Created by Tyler on 10/6/17. // Modified by Jacqueline on 10/12/17. // #include "Attractor.hpp" Attractor::Attractor() { pos.x = ofGetWidth()*0.5; pos.y = ofGetHeight()*0.75; mass = ofRandom(30.); } Attractor::Attractor(ofVec3f _pos, float _mass) { pos = _pos; ...
ALGO
0.997762
5.046341
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-09-07T23:12: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": "f03ca5423...
f22c933e-b887-45dd-a7af-93bcaa7348c5
hsilv/shuntingYard
src/automata.cpp
#include "automata.h" #include <cwchar> wstring getAlphabet(Stack<shuntingToken> *postfix) { wstring alphabet = L""; for (int i = 0; i < postfix->getSize(); i++) { shuntingToken token = postfix->getTop()[-i]; if (token.type == shuntingToken::OPERAND) { if (!wcschr(alpha...
ALGO
0.949739
4.831284
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2024-02-04T19:32: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": "c50f35e1774...
7668408a-df7f-4275-a207-7140bee0ca95
Zerg009/PS1K
Robot_Urmarire/Robot_Urmarire.ino
#include <Pixy2.h> #define DELTA 25 #define MIN_SPEED_VAL 60 #define K 1 #define min_width 70 #define normal_width 90 #define max_width 110 #define min_width_working_spectrum 10 #define max_width_working_spectrum 316 // ? #define min_x 150 #define normal_x 165 #define max_x 190 #define min_x_working_spectrum 20 //...
ALGO
0.999009
4.998768
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-11-18T11:05:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "954c5a7d17e...