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
1dcd6522-1c96-45ec-8cf1-8d9dbea68216
antidepressants/Hotel-Reservation-Project
src/specalgos.cpp
#include "password.h" #include <string> using namespace std; string validateEmail(){ string email; cout<<">>"; cin>>email; bool valid=0; int atpos = email.find("@"); if(atpos!=string::npos && atpos!=0){ string domain=email.substr(atpos+1,email.length()-atpos-1); int dotpos = dom...
TOOL
0.975567
4.088059
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2022-05-19T12:06: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": "922dea4e6...
cae6fd2d-3417-46f2-8b7e-4c5bb50e8de4
ibsson/Program
BKJN/그래프/BFS/20241217_bkjn_12851(숨바꼭질 2).cpp
#include <iostream> #include <queue> using namespace std; int N, K; int Visited[100002]; int first = 1; int result, cnt; void BFS(); int main(void) { cin >> N >> K; BFS(); cout << result << "\n"; cout << cnt << "\n"; return 0; } void BFS() { queue <pair<int, int>> q; q.push({ N, 0 }); Visited[N] = 1; ...
ALGO
0.99945
3.654826
{ "github_metadata": { "branch": "main", "commit_count": 1692, "repo_created_at": "2022-02-17T03:03:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9dc549ce3...
dbcf9618-bdfe-40e3-9912-7b9bccebc29e
robee323/PWR-Racing-recruitment-task
ConvexHull.cpp
#include "ConvexHull.h" #include <algorithm> Point::Point(double x, double y) : x(x), y(y) {} // Comparison of the coordinates of two points bool comparePoints(const Point& p1, const Point& p2) { if (p1.x == p2.x) return p1.y < p2.y; return p1.x < p2.x; } // Checking the position of three points (a, ...
ALGO
0.999931
5.48579
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-10-29T23:00:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d10ecafdfbc...
35734938-4316-4ebf-b71c-3edb890ea587
l0nl1f3/1-l0nl1f3-s-code-repo
AtCoder/AGC018/C.cpp
#include <bits/stdc++.h> #define fir first #define sec second using namespace std; typedef long long LL; template <typename T> inline bool cmin(T & a, const T & b) { return a > b ? a = b, 1 : 0;} template <typename T> inline bool cmax(T & a, const T & b) { return a < b ? a = b, 1 : 0;} int inp() { int x = 0, f = 1;c...
ALGO
0.999935
3.345853
{ "github_metadata": { "branch": "master", "commit_count": 328, "repo_created_at": "2017-02-11T04:20: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": "1e740aea...
73badc36-c591-4c4f-bddd-517c1c17933b
Kiritow/OJ-Problems-Source
HDOJ/3561_autoAC.cpp
#include<iostream> #include<vector> #include<math.h> using namespace std; #define eps 1e-8 const int maxn=105; struct point { double x,y; }; struct circle { point p; double r; }c[maxn]; vector<point>v; double dis(point p1,point p2) { return sqrt((p1.x-p2.x)*(p1.x-p2.x...
ALGO
0.999833
4.151473
{ "github_metadata": { "branch": "master", "commit_count": 939, "repo_created_at": "2016-04-10T01:06:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8155f2c...
3b883e8b-ebd2-4f81-920b-d43ba97ebbbd
ycliuxinwei/My-leetcode-practice
number/addDigits.cpp
#include <iostream> using namespace std; /* Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, return it. Follow up: Could you do it without any loop/recursion in O(1...
ALGO
0.999908
5.626456
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2015-09-07T14:38: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": "10fca22f8...
72c3ef09-8d27-4372-82ad-1f9cf3f77b0b
CodeSiddha/LEETCODE-SOLUTIONS
Majority Element - GFG/majority-element.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: // Function to find majority element in the array // a: input array // size: size of input array int majorityElement(int ...
ALGO
0.999894
5.10386
{ "github_metadata": { "branch": "main", "commit_count": 876, "repo_created_at": "2022-03-10T12:47: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": "ce4798c92a...
6961677e-f450-4388-8080-fe4d5487c94e
shivamyadav028/DSA-ASSIGNMENT
q13.cpp
#include <bits/stdc++.h> using namespace std; class TwoStacks { int *arr; int top1, top2; int size; public: TwoStacks(int n) { size = n; arr = new int[n]; top1 = -1; top2 = size; } void push1(int x) { if (top1 < top2 - 1) { top1++; ...
ALGO
0.99985
4.3235
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-02-20T16:24: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": "74254accc4e...
cde39cd2-7525-4b4c-82be-25f512f6981d
DenisCooper09/game_of_life
source/main.cpp
#include <SFML/Graphics.hpp> #include <iostream> #include <sstream> #include "game_of_life_algorithm.h" #include "resources_loader.h" template<typename T> std::string to_string_with_precision(const T &value, const int &n = 1) { std::ostringstream out; out.precision(n); out << std::fixed << value; retur...
TOOL
0.958543
5.820289
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-05-21T11:04: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": "3c42fbd75e0...
1edac008-9f53-4dbd-a841-53b36bf8db49
rambabuwhy/cpp-problems
collection/max_pairwise_product.cpp
/* * Author: <NAME> * Text: Algorithm Tool Box * Topic: Puzzle * Statement: Maximum Pairwise Product Problem * Description: Your goal in this problem is to find the last digit of 𝑛-th * Fibonacci number. * */ #include <iostream> #include <vector> #include <algorithm> using namespace std; using std::vecto...
ALGO
0.99995
4.692579
{ "github_metadata": { "branch": "master", "commit_count": 904, "repo_created_at": "2017-01-30T11:23:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3ee5cba...
bd4ee585-e687-4024-bb93-2feb98ab3355
edmundmiller/Intro-to-programming-for-Biological-Sciences
HW4/seq_cons_outfile.cpp
#include <cmath> #include <fstream> #include <iostream> #include <sstream> #include <stdio.h> #include <string> using namespace std; int main() { ifstream seqfile; int seqLength = 0; double count = 0, NT_c[4][10] = {{0}, {0}, {0}, {0}}, I[10] = {0}, H[10] = {0}; double sites[10]; string line, filena...
DATA
0.94843
3.543314
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-10-18T15:54:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "132e8732b14...
e0bf8cc2-553d-4d76-9a8c-bf3a66d4b7a4
Arzoo12222145/CPP
sudoku_solver.cpp
#include<iostream> #include<vector> using namespace std; bool isSafe(int row, int col, vector<vector<int>> board, int val) { for(int i = 0; i < board.size(); i++){ //check row if(board[row][i] == val){ return false; } //check col if(board[i][col] == val){ ...
ALGO
0.999955
7.099648
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-08-16T05:49: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": "5c0560fd38d...
f79ad918-7b5d-4811-9efc-e93477b4f4cc
sharababy/labexam2
greedy2.cpp
#include <iostream> #include <algorithm> using namespace std; /* Note: V is the amount in findMin function */ void findMin(int V, int denomination[], int size); void solve(int amount, int denomination[], int size); void solve(int amount, int denomination[], int size) { int i; if(amount==0) return; for( i=siz...
ALGO
0.999946
3.774698
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-03-18T06:43: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": "9deafab38...
037d23f7-7e2e-429f-8613-4319ac4cc8eb
MasterMMMa/leetcodeMaster
leetcodeMaster/day3_203.cpp
//Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head. #include <iostream> #include <vector> using namespace std; //Definition for singly-linked list. class ListNode { public: int val; ListNode* next; ListNode(int x...
ALGO
0.999952
5.320906
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-04-17T02:37: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": "7a40bb7de7...
8cf842c7-ea8b-4982-aa47-23cdec9a0cab
ANA-CNU/ANA-Daily-Algorithm
조서현/2849_탭댄스.cpp
#include <bits/stdc++.h> using namespace std; constexpr int sz = 200001, segSz = 1 << 19; struct node { bool lv, rv; int lmx, rmx, mx, itv; node(bool v){ lv = rv = v; lmx = rmx = mx = 1; itv = 1; } node(){ lv = rv = false; lmx = rmx = mx = 0; itv = ...
ALGO
0.999852
4.730837
{ "github_metadata": { "branch": "main", "commit_count": 3037, "repo_created_at": "2022-03-01T01:05:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d029f1e0...
90cdd380-e2aa-401f-a1d8-47950cb600ba
sfulle14/CSIC2170
Open-Lab-3B-extended-to-noon-Thursday-stevenfuller96/main.cpp
/* PROGRAMMER: <NAME> Assignment: OLA 3B Class: CSIC 2170: Summer 2022 Course Instructor: Dr. <NAME> Due Date: Thursday, 7/14/22 Description: This program reads an ISBN from a data file and tests to see if the ISBN is a valid ISBN. The input is from a .dat file The output should be in the console and will list the ISBN...
TOOL
0.949659
5.232104
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2022-07-18T14:37:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46a09943153...
b8de910e-c575-4b7d-a5c1-6675e6aeae54
Filip-Rak/Cpp_basics
Technical School/zad20plecak/main.cpp
#include <iostream> #include <windows.h> using namespace std; const int limit = 50; float weight[limit], value[limit], amount[limit]; int maxMass, propAmount; int main() { cout<<"Ile wagi moze pomiescic plecak?\n"; cin>>maxMass; cout<<"Ile przdmiotow chcesz wlozyc?\n"; cin>>propAmount; for(int i=0; i<p...
TOOL
0.997027
3.570405
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-03-19T17:28: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": "217b241f6ee...
1122d42f-85ef-447d-bf5b-cc073aa8e6f7
srikantaggarwal/Cache-Coherence
sim/sharers.cpp
#include <assert.h> #include "sharers.h" #include "sim.h" #include "settings.h" extern Sim_settings settings; extern Simulator *Sim; /******************************** * Constructor/destructor. ********************************/ Sharers::Sharers (void) { if (settings.num_nodes > 512) { fatal_error (...
ALGO
0.949644
4.67367
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-12-02T15:44:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd296aecd...
e4795434-40e4-4cb1-a0de-18c1e69f76cb
raincross7/code-similarity
codes/train_code/problem260/problem260_415.cpp
#include<stdio.h> #include<string> void max_heapify(int* A, int i, int H) { int l = 2 * i, r = 2 * i + 1; if(l > H && r > H) return; int maxid = i, x; if(l <= H) maxid = (A[l] > A[maxid] ? l : maxid); if(r <= H) maxid = (A[r] > A[maxid] ? r : maxid); if(maxid == i) return; x = A[maxid]; A[m...
ALGO
0.999859
3.341843
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6686c2368959...
f385eab0-6b2c-46de-9221-5db367530a1a
UestcXiye/Leetcode
121.买卖股票的最佳时机.cpp
/* * @lc app=leetcode.cn id=121 lang=cpp * * [121] 买卖股票的最佳时机 */ // @lc code=start // TLE // class Solution // { // public: // int maxProfit(vector<int> &prices) // { // if (prices.size() <= 1) // return 0; // int n = prices.size(), ans = 0; // for (int i = 0; i < n; i++)...
ALGO
0.999887
5.985135
{ "github_metadata": { "branch": "main", "commit_count": 338, "repo_created_at": "2023-05-04T13:56:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bea768b41...
5a3671a7-9f58-4142-abb7-25b371ba768e
MATF-Software-Verification/VS-materials
06_profiling/03_valgrind_cachegrind/02_matrices/matrix_meduim.cpp
#include <iostream> #define N 1000 using namespace std; float dotProduct(float *A, float *B, int size) { float curr = 0; for (int i = 0; i < size; i++) curr += A[i] * B[i]; return curr; } void multiply(float *A, float *B, float *out, int size) { float *temp = new float[size]; for (int...
ALGO
0.999528
4.067028
{ "github_metadata": { "branch": "main", "commit_count": 122, "repo_created_at": "2022-10-20T21:07:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "8ad0692529b...
2e6b814d-d903-4f56-8110-579b27692664
yhaddad/CALoReco
src/TCluster.cc
/* * DHCAL neigbor clustering * <NAME> * 01/2012 * LLR - Ecole Polytechnique */ #include "TCluster.h" #include <math.h> #include <TMath.h> #include "UTIL/CellIDDecoder.h" #include <string> #include <algorithm> using namespace std; double const LCell = 1.; double const SigmaGap = 0.010421 ; double const sigm...
ALGO
0.993115
4.148396
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2012-11-29T23:19:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d48a86588...
1d31d311-1802-423f-bd25-d815ed0f2896
Sanjeev2487/accepted
Interview/stack reverse recursion.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define FOR(i,a,n) for(int (i) = (a); (i) < (n) ; ++(i)) #define ROF(i,a,n) for(int (i)=(a);(i) >= (n); --(i)) #define SD(x) scanf("%d",&x) #define SL(x) scanf("%lld",&x) #define pb push_back #define mp make_pair #define F first #define S second #...
ALGO
0.998828
3.488121
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2016-10-21T20:23:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6cb6bc7dc...
a81afa04-c0d2-454e-ad12-07da9125035f
Joke-Dk/CodeTrain
Pat_2015.3.14/87_right/main.cpp
#include <string> #include <map> #include <iostream> #include <cstring> using namespace std; const int INF = 2100000000; const int MAX = 205; int n, K; bool vi[MAX]; int dis[MAX]; int cost[MAX][MAX]; int happiness[MAX], final_happiness[MAX]; int pre[MAX]; int pre_city_cnt[MAX]; int road_cnt[MAX]; map<string, int> nam...
ALGO
0.999441
3.846372
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-11-25T11:26:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf54437682...
c4292daf-239d-4872-aea9-9e975fd20acd
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Source/Editor/SequencerCore/Public/MVVM/Extensions/ISortableExtension.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "HAL/Platform.h" #include "Internationalization/Text.h" #include "MVVM/ViewModelTypeID.h" #include "Templates/SharedPointer.h" namespace UE { namespace Sequencer { class FViewModel; struct FViewModelChildren; struct FV...
TOOL
0.972803
6.154644
{ "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": "65bd52727b...
9b9ef36f-9c62-4c8a-8903-e30936152557
Deadrohan19/CP-Solutions
CodeForces/1690B.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; #define F first #define S second #define pb push_back #define INF LLONG_MAX #define MOD 1000000007 #define dbg(x) cout << x << "\n"; #define deadman ios_base::sync_with_stdio(fa...
ALGO
0.999979
4.209284
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2021-09-20T08:09:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4cdd83d8987...
2205cc26-aa23-49fd-b381-c75ddad678ad
utkmert/SE226_LABS
LAB6.5/C++/Q3.cpp
#include <vector> #include <algorithm> #include <iostream> std::vector<int> sieveOfEratosthenes(std::vector<int>& nums) { int max_num = *std::max_element(nums.begin(), nums.end()); std::vector<bool> is_prime(max_num + 1, true); is_prime[0] = false; is_prime[1] = false; for (int i = 2; i * i <= ma...
ALGO
0.99954
5.785531
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2023-04-18T08:16: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": "2a9ce8c8613...
eed430c0-9bd5-4115-9601-7e1c1dc90a66
gy31/Algorithm-BOJ
11404_플로이드.cpp
#define MA 101 #define INF 1000000000 #include<stdio.h> #include<algorithm> using namespace std; int n, m, map[MA][MA]; int main() { scanf("%d%d", &n, &m); for(int i = 1; i <= n; i++) { for(int j = 1; j <= n; j++) { if(i != j) map[i][j] = INF; } } for(int i = 0; i < m; i++)...
ALGO
0.999996
3.509014
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2023-09-26T10:06: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": "c4627c17311...
8116ddd9-b7c6-4cbe-8b49-0f2e2a18120d
shivkaraman/DSA
02_Strivers A-Z DSA sheet/01_Sorting/01_Bubble_Selection_InsertionSort.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <queue> #include <stack> using namespace std; void bubbleSort(vector<int> &arr, int n){ for(int i = 0; i < n; i++){ bool swapped = false; ...
ALGO
0.999972
5.753018
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-11-26T08:50:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "347177336d2c...
da93516b-bb49-4bdc-b340-d333eef5a57f
ravigod22/CompetitiveProgrammingUNI
Atcoder/382/d.cpp
#include <bits/stdc++.h> using namespace std; int n, m; int lim[100]; vector<vector<int>> ans; vector<int> tmp; void back(int pos) { if (pos == n) { for (int j = tmp.back() + 10; j <= m; ++j) { tmp.emplace_back(j); ans.emplace_back(tmp); tmp.pop_back(); } ...
ALGO
0.999197
3.560842
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-10-17T02:27:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ecb28fcec3...
92179807-0e1d-4b6f-a926-4ab8237136e1
yamate11/compprog
arc/arc168/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.999988
3.907992
{ "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": "ea8dd941a9...
4388d108-71eb-4192-9a64-f09294d82cf2
zhangyufeng0123/route-to-acmer
luogu/P3984 高兴的津津(水题,模拟).cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const int maxn = int(2e5 + 5); int num[maxn]; inline void solve() { int n, m; cin >> n >> m; for (int i = 0; i < n; i++) { cin >> num[i]; } int ans = m; for (int i = 0; i < n - 1; i++) ...
ALGO
0.999928
3.66608
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2019-01-17T07:18:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "774ae9638...
fef4be74-dca7-4535-93a1-0964571c87b6
Heisenberg71/cp-training-club
Class 11 [Sorting Problem Solving]/Merge Sort.cpp
#include <bits/stdc++.h> #define ll long long #define LIM 100005 #define nl '\n' using namespace std; int arr[LIM]; void mergeSort(int L, int R) { cout << "Range:\n"; cout << L << " " << R << '\n'; cout << "Unsorted:\n"; for(int i = L; i <= R; i++) cout << arr[i] << " "; cout << nl; i...
ALGO
0.999985
5.412271
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-10-23T13:54:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "982ecf384b1...
5d1a4935-6c10-4cd1-931e-0de34bcd42f1
IyLias/ps-with
baekjoon/sorting/topological-sort/Q1005.cpp
#include <stdio.h> #include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; vector<vector<int>> adj; vector<int> b_time; vector<int> connected; vector<int> ans; queue<int> q; void search(int N){ for(int i=1;i<=N;i++){ if(connected[i] == 0){ q.push(i); ans[i] = b_...
ALGO
0.999963
3.884987
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T14:31:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5fc894627e...
d802aa3d-9b5b-4735-b822-6baebe320e68
Mtaylorr/Competitive-programming-Solutions
DS/Segment Tree/Lazy propagation/Codeforces_833_B.cpp
//https://codeforces.com/contest/833/problem/B #include <bits/stdc++.h> #define pb push_back #define fi first #define se second typedef long long ll; using namespace std; const int N = 35e3 + 5; const int MOD = 1e9 + 7 ; int dp[55][N]; int n,k, a[N]; int freq[N]; int tree[2][4*N+2]; int lazy[2][4*N+2]; int pos[N...
ALGO
0.999987
4.019508
{ "github_metadata": { "branch": "main", "commit_count": 1208, "repo_created_at": "2021-07-28T20:32:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4076843...
2f2ce827-8a3e-419f-bf30-6f8f1f6392f9
sreiswig/CodingCompetitions
Google KickStart 2022/Round C/P1.cpp
#include <iostream> #include <string> int main() { int test_cases; std::cin >> test_cases; for (int test_case = 0; test_case < test_cases; test_case++) { int passwordLen; std::string password; std::cin >> passwordLen >> password; bool oneUpper = false; bool oneLowe...
ALGO
0.983774
4.46988
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-04-30T21:04: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": "f949c31c81e2...
235d903b-eaf5-4ad5-93c6-33864a26a6b3
vinci-grape/Rectifier
output/ChatGPT/codenet/Python/C++/s534639230.cpp
#include <iostream> #include <vector> #include <map> using namespace std; const int mod = 998244353; void solve() { int N; cin >> N; vector<int> D(N); for (int i = 0; i < N; i++) { cin >> D[i]; } if (D[0] != 0) { cout << 0 << endl; return; } map<int, int> cnt;...
ALGO
0.999979
5.079678
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-09T09:23:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac329843d492...
4812dfb5-7faa-48ba-9e90-5857a47ec9c9
jatin837/leetcode_solutions
54-spiral-matrix/54-spiral-matrix.cpp
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { int r1 = 0; int c1 = 0; int r2 = matrix.size()-1; int c2 = matrix[0].size()-1; return solve(r1, c1, r2, c2, matrix); } vector<int>solve(int r1, int c1, int r2, int c2, vector<vector<int>>&matrix){ ...
ALGO
0.999996
6.240033
{ "github_metadata": { "branch": "main", "commit_count": 2536, "repo_created_at": "2022-04-14T07:34:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "27c6c36ec...
b5d71dc8-0d84-47e0-bf60-bd67d4731495
arnab3339/DSA-Codes
Bubble_Sort.cpp
#include <iostream> using namespace std; void bubbleSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { bool swapped = false; for (int j = 0; j < n - i - 1; j++) { if (arr[j] > arr[j + 1]) { swap(arr[j], arr[j + 1]); swapped = true; } ...
ALGO
0.999132
5.015738
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-08-14T05:45: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": "867a8c4b8bb...
46cfe630-8cc5-4223-ae3c-a66285fd7188
MelodyShih/Fastsolver-2DFMM
boxtree.cpp
#include <iostream> #include <cmath> #include <assert.h> #include "boxtree.hpp" #include "utils.hpp" using namespace std; double fact(int n) { // Returns factorial of n double res = 1; for (int i = 2; i <= n; i++) res = res * i; return res; } double nCr(int n, int r) { double result=1.0; ...
ALGO
0.999806
3.437907
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2020-11-22T18:21:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4aef7ff9fcb...
7999a289-b3a2-4277-9e99-854219bc1c8c
kanchanraiii/algorithms
dijkstra.cpp
#include <iostream> #include <climits> using namespace std; #define MAX 10 void dijkstra(int n, int adj[MAX][MAX], int start) { int dist[MAX]; bool visited[MAX]; for (int i = 0; i < n; i++) { dist[i] = INT_MAX; visited[i] = false; } dist[start] = 0; // Dij...
ALGO
0.999963
5.676044
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-19T11:57: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": "998a88aefb0e...
c8c45040-4570-4408-9dd4-a195c4122291
Orion545/OI-Record
Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day2程序包/answers/GD-0064/defense/defense.cpp
#include <iostream> #include <cstdio> #include <cstring> #define repu(i, x, y) for (int i = x; i <= y; ++i) #define goedge(u) for (int ei = head[u]; ei != 0; ei = edge[ei].nxt) #define inf 0x3f3f3f3f using namespace std; const int MAXN = 100011; struct Edge { int u,v,nxt; } edge[2 * MAXN]; int head[MAXN], ecnt; void a...
ALGO
0.999928
3.521627
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-05-26T05:47:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b311de7b22...
2b16764c-d2cc-473e-8077-fec16a2678bc
diazf/indri
clarity/clarity.cpp
/*========================================================================== * Copyright (c) 2010 University of Massachusetts. All Rights Reserved. * * Use of the Lemur Toolkit for Language Modeling and Information Retrieval * is subject to the terms of the software license set forth in the LICENSE * file include...
ALGO
0.956807
7.043651
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2018-04-08T12:28:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7377b1a1...
65b2ce85-ef38-40ec-b081-ce062037a4f4
AlexandriaChemistry/ACT
src/act/coulombintegrals/Slater_2S_2S.cpp
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2014,2015, by the GROMACS development team, led by * <NAME>, <NAME>, <NAME>, and <NAME>, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. * * GROMACS...
ALGO
0.999222
5.813438
{ "github_metadata": { "branch": "main", "commit_count": 21410, "repo_created_at": "2020-04-08T19:04:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 0, "issues": 59, "pull_requests": 0 }, "file_meta": { "content_id": "0979327...
95920273-2190-4aac-91d7-7446e191c75c
alaminmiah4274/Data_Structure
singly_linked_list_operation/error_handle.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int value; Node *next; Node(int value) { this->value = value; this->next = NULL; } }; void insert_at_tail(Node *&head, int val) { Node *newNode = new Node(val); if (head == NULL) { head = newNo...
ALGO
0.99892
4.658097
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-06-23T17:20: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": "b71052ab77f...
be415db3-024a-49b2-a6c5-34c3b3c4d025
Martirosyan-Hayk/study-projects
C++/CPP_projects/exercises/2.27.cpp
#include<iostream> void sequences(int*&, const int&); int main() { srand(time(NULL)); const int size = 15; int* arr = new int[size]; std::cout << "Numbers of array " << std::endl; for (int i = 0; i < size; ++i) { arr[i] = rand() % 100 - 27; std::cout << arr[i] << " "; } ...
ALGO
0.999049
4.087891
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2022-02-21T07: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": "1a37d8f1b...
96082d6a-fc13-4c83-b613-5fe54f6d8d53
ammardab3an/ACM
problems/done/spoj/spoj - LIS_v2.cpp
// Problem: Dãy con tăng dài nhất (bản khó) // Contest: SPOJ - Problems // URL: https://www.spoj.com/problems/LIS/ // Memory Limit: 1536 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) // By AmmarDab3an - Aleppo University #include "bits/stdc++.h" using namespace std; //#define int int...
ALGO
0.999946
5.342336
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-10-06T07:54:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4f8fff6439...
d83668d6-d3e9-45e4-b57e-c77939526dad
HimanshuDotcom/DSA-450
Dynamic Programming/gameStrategy.cpp
// ------------------------ DP Solution ------------------------ long long maximumAmount(int arr[], int n){ // Your code here long long dp[n][n]; for(int g=0;g<n;g++) // iterating over possible gaps { for(int i=0,j=g;j<n;i++,j++) { if(g==0) // only 1 elem...
ALGO
0.999955
5.026726
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2021-01-10T11:31:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "53c43aeea...
9c18de19-cfa8-4eed-a878-c49bb7bf7301
DruidFish/Imagiro
unfolding/src/CovarianceMatrix.cpp
/** @class CovarianceMatrix An attempt to implement an efficient version of D'Agostini's error propagation using sparse matrices @author <NAME> <EMAIL> @date 08-04-2011 */ #include "CovarianceMatrix.h" #include <iostream> #include <cstdlib> #include <cmath> const int PERCENT_PROGRESS_INCREMENT = 10; //Def...
ALGO
0.986645
5.439509
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2011-09-22T13:47:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7abc8f72...
7cd8b916-e167-474d-bc8e-a683767b9bc3
benoxo/ds-in-mooc
6/Practice1.cpp
#include <cstdio> #include <cstdlib> #include <memory.h> #define MAXSIZE 11 int gragh[MAXSIZE][MAXSIZE]; bool visited[MAXSIZE]; void Visit(int); void ListComponents(int, int); void DFS(int, int); void BFS(int, int); int main() { freopen("pinput.txt", "r", stdin); memset(gragh, 0, sizeof(int)*MAXSIZE*MAXSIZE); i...
ALGO
0.999865
4.870695
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-09-21T09:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47ef0f1c6...
64561659-c296-42c7-8abe-a4a0299f6e91
lyrahgames/lecture-computational-physics-machine-learning
exercises/02/main.cc
#include <cmath> #include <iostream> #include <random> #include <vector> #include <Eigen/Eigen> #include <QApplication> #include <QCustomPlot> template <typename Real> Real first_function(Real x) { return 2 * x * x; } template <typename Real> Real second_function(Real x) { return 2 * x - 10 * std::pow(x, 5) + 1...
ALGO
0.999285
5.826893
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-10-18T19:15:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a6319fcd...
535db3d4-af9b-40ab-abec-06a4b33db874
kimtaehyun98/Jandi
2021.9/boj_2961.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; bool num[11]; vector<pii>v; int n, s, b, ans = INT_MAX; int solve() { int s = 1, b = 0; for (int i = 1; i <= n; i++) { if (num[i]) { s *= v[i - 1].first; b += v[i - 1].second; } } return abs(s - b); } void bt(int cnt, int s, int ...
ALGO
0.99998
3.8183
{ "github_metadata": { "branch": "main", "commit_count": 337, "repo_created_at": "2021-07-26T12:19:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78d0b48e14...
459e899e-0e41-48d2-8683-0c15d627f513
ashuvictor/Data-Structures-and-Algorithms
Bit Manipulation/Easy/powerof4.cpp
/* power of 4 https://leetcode.com/problems/power-of-four/ */ The given number n is a power of 4 if it is a power of 2 and its only set bit is present at even position (0, 2, 4, …). (0xAAAAAAAA)16 = (10101010101010101010101010101010)2 class Solution { public: bool isPowerOfFour(int n) { if(n>0 and !(n&(n-1...
ALGO
0.998672
6.33107
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2022-02-16T09:52:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fd9132b3d...
fff422d4-3505-4c82-bafd-d305bf07022d
mohdzaid123/Leetcode
0222-count-complete-tree-nodes/0222-count-complete-tree-nodes.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.999942
6.195984
{ "github_metadata": { "branch": "main", "commit_count": 1480, "repo_created_at": "2023-09-11T10:45:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5842b33c1...
5e5cb82f-5cc9-4e56-8641-c25545797c0d
pranavjawale01/cp.exe
LeetCode/2540-minimum-common-value/2540-minimum-common-value.cpp
class Solution { public: bool binarySearch(vector<int>& nums2, int num) { int low = 0, high = nums2.size() - 1; while (low <= high) { int mid = low + (high - low) / 2; if (nums2[mid] == num) { return true; } else if (nums2[mid] > num) { ...
ALGO
0.999985
5.940107
{ "github_metadata": { "branch": "main", "commit_count": 7302, "repo_created_at": "2023-09-11T17:37:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7783b8831...
a61b8c6e-171a-4be8-b791-b670ae7d6cd0
Project-OSRM/osrm-backend
third_party/libosmium/include/osmium/util/minmax.hpp
#ifndef OSMIUM_UTIL_MINMAX_HPP #define OSMIUM_UTIL_MINMAX_HPP /* This file is part of Osmium (https://osmcode.org/libosmium). Copyright 2013-2023 <NAME> <<EMAIL>> and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organiz...
ALGO
0.945037
7.603751
{ "github_metadata": { "branch": "master", "commit_count": 8731, "repo_created_at": "2011-09-22T10:05:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6955, "forks": 3646, "issues": 421, "pull_requests": 26 }, "file_meta": { "content_id": ...
d4ebdbda-e9ff-4ffe-a865-3240c441dd94
ravigautamcs/DS
6_array_ADT/1_display.cpp
#include <iostream> #include<stdio.h> using namespace std; //here we are just creating an array which will be initialized later on struct Array{ int *A; //a declaration of a pointer array int size; // size of the array which will be taken as input in the program int length; // this is the length of size...
ALGO
0.975408
3.13171
{ "github_metadata": { "branch": "master", "commit_count": 162, "repo_created_at": "2021-04-20T15:41:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71476dec...
acddbe96-d47f-49b9-8f73-90f69cebdbd2
scottScottScott/WeAreTalkingAboutPractice
old/R2D2AndDroidArmy.cpp
#include <iostream> #include <vector> #include <deque> using namespace std; int calculate(vector<deque<int>> &V) { int result = 0; for(int i = 0; i < V.size(); i++) result += (V[i].empty() ? 0 : V[i].front()); return result; } int main() { int n, m, k; cin >> n >> m >> k; int info[n][m]; for(int i = 0; i...
ALGO
0.999998
3.684793
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2015-04-02T05:53: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": "4df5711cd...
7902dba0-462e-4497-a9be-efe9aeaf3a20
hjiang13/LLM4IR
results/Task2_IR_Decompilation/DecompiledResults_Human_x_164_O0/GPT4o_Human_x_164_O0_decompiled/CPP_67.cpp
```cpp #include <string> #include <cstdlib> int fruit_distribution(std::string &input_string, int counter) { int index = 0; int length = 0; std::string temp_string; while (index < input_string.size()) { char current_char = input_string[index]; if (current_char >= '0' && current_char <...
ALGO
0.99585
6.00273
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-05-21T20:32:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f1b7cde06f...
7a7b2f26-b746-47dc-9619-50441c48b72a
JorgeIba/Competitive-Programming-Problems
VJudge/Ranking Árboles/D - Lowest Common Ancestor.cpp
#include <bits/stdc++.h> #define lli long long int #define endl "\n" #define forn(i, in, fin) for(int i = in; i<fin; i++) #define all(v) v.begin(), v.end() #define fastIO(); ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); using namespace std; const lli maxN = 1e5 + 10, logN = 18; vector < vector< lli > > a...
ALGO
0.999967
4.931436
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-04-16T06:16:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73e27c2c4...
1c90326a-1a68-497f-ad0b-c55f766e874b
fulei623/drake
drake/core/Gradient.h
/// @file /// THIS FILE IS DEPRECATED. /// Its contents are moving into drake/math. #pragma once #include <Eigen/Core> #include <Eigen/Dense> #include <unsupported/Eigen/AutoDiff> #include "drake/common/drake_assert.h" namespace Drake { // todo: recursive template to get arbitrary gradient order // note: tried usi...
TOOL
0.96523
6.412383
{ "github_metadata": { "branch": "master", "commit_count": 12597, "repo_created_at": "2016-07-25T16:15:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c536ea...
53e46dc2-c2a3-420c-a141-ca0142413b0f
swastikpratik-bit/Codeforces_practice
Jun2k24/04/D_Buying_Shovels.cpp
// Problem Link -> #include <bits/stdc++.h> using namespace std; #define pb push_back #define ppb pop_back #define ff first #define ss second #define PI 3.141592653589793238462 #define set_bits __builtin_popcountll #define leadingzero __builtin_clzll #define trailingzero __builtin_ctzll #define bitsParity __builtin...
ALGO
0.999956
4.836196
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2024-04-16T17:09: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": "efb340351...
b1017363-ac0d-4f83-94ae-2641d455022d
Noman-Ahmed-Khan/DS-lab-stuff
Some_Stuff/DS LAB 08/code/code/TASK_02.cpp
#include<iostream> #include "Queue.h" using namespace std; template<typename T> class Node{ public: T key; Node<T>* left; Node<T>* right; Node(T val):key(val),left(nullptr),right(nullptr){}; }; template<typename T> class Binary_tree{ private: Node<T>* root; ...
ALGO
0.99822
4.260766
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-12-30T17:48: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": "d2b9552421ec...
c47569a4-2f66-489e-90f6-c8d688334596
harryadav3/dsacp
pepcoding/7.Recursion_Backtracking/printonesequence.cpp
#include <bits/stdc++.h> using namespace std; bool findsubsets(int i, vector<int> &nums, vector<vector<int>> &ans, int n, vector<int> ds, int sum, int target) { if (i == n) { if (target == sum) { ans.push_back(ds); return true; } else return false; ...
ALGO
0.999818
5.104001
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-01-29T18:06: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": "873d2e51015...
36863870-f442-44e4-8f22-d36983013e4d
chuanqixu/Study
computer-science/Stanford-CS106X-Programming-Abstractions-in-CPP-2019-Fall/CodeStepByStep/03 IO streams; Grid/knightCanMove.cpp
#include <string> #include "grid.h" bool knightCanMove(const Grid<std::string> &grid, int r1, int c1, int r2, int c2){ if (grid.inBounds(r1, c1) && grid.inBounds(r2, c2) && grid[r1][c1]=="knight" && grid[r2][c2].empty()) if ((abs(r1-r2) == 1 && abs(c1-c2)==2) || (abs(r1-r2) == 2 && abs(c1-c2)==...
ALGO
0.997411
5.201229
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2020-07-18T15:56:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "775bbda0...
6e102585-cbfb-4b84-9319-b5ce9faf7cc7
chetzer-ncpa/ncpalib-cplusplus
include/NCPA/interpolation/nearest_neighbor_spline_2d.hpp
#pragma once #include "NCPA/arrays.hpp" #include "NCPA/defines.hpp" #include "NCPA/interpolation/abstract_spline_2d.hpp" #include "NCPA/interpolation/defines.hpp" #include "NCPA/interpolation/types.hpp" #include "NCPA/math.hpp" #include "NCPA/types.hpp" #include <array> #include <cmath> #include <complex> #include <c...
ALGO
0.921565
6.706902
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2024-10-21T15:46: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": "72b10afa81c...
ff0813cb-2b07-411b-abb0-37becee85d31
seock04/Uncertainty-Handler
Data Structure and Algorithm/LeetCode/before21April/Roman to Integer.cpp
/// below are very naive solution, but it works.. it's O(N) solution class Solution { public: int romanToInt(string s) { int len = s.size(); int result = 0; for(int i = 0; i < s.size(); i++){ if(s[i] == 'V') result += 5; else if(s[i] == 'L') re...
ALGO
0.999951
6.090375
{ "github_metadata": { "branch": "master", "commit_count": 897, "repo_created_at": "2019-12-19T05:11:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "6c460d0...
8708ba68-7246-4a5e-8a97-3cd975d36007
NguyenKhoiDinh/CompetitiveProgramming
VNOI/cowgirl.cpp
#include <bits/stdc++.h> using namespace std; const int MAX_N = 33; int numTest; long long dp[MAX_N][(1 << 6) + 5]; int n, m; bool check(int mask, int newmask) { for (int b = 0; b < n - 1; b++) { int v1 = ((mask & (1 << b)) > 0); int v2 = ((mask & (1 << (b + 1))) > 0); int v3 = ((newmask & (1 << b)) ...
ALGO
0.999985
4.573111
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2021-03-25T18:48:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c497da24...
4132b2c2-5872-425c-b14a-e285f49668dc
arangodb/arangodb
3rdParty/boost/1.78.0/libs/graph/example/roget_components.cpp
//======================================================================= // Copyright 2001 University of Notre Dame. // Authors: <NAME>, <NAME>, <NAME> // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //======...
ALGO
0.993568
4.119714
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
886e5a1c-ee49-4eae-85ef-749c4c3b4afb
Pasha-006/Leetcode_solutions_cpp
stack/ReverseKgroups.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ //https://leetcode.com/problems/reverse-nodes-in-...
ALGO
0.99996
5.864293
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2023-03-29T12:37: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": "8f486cfdd7d...
14d07ac2-45dd-4c58-9f6a-6644be7f63c6
atalaymudanyali/Comparing-Algorithms
project/undirected_graph.cpp
#include "undirected_graph.h" undirected_graph::undirected_graph() { vertNum = 0; } undirected_graph::undirected_graph(std::unordered_map<int, std::set<int>> adjList) { vertNum = 0; for (auto i = adjList.begin(); i != adjList.end(); i++) { vertices.insert(i->first); if (i->first > vertNum) { vertNum = i->fir...
ALGO
0.996095
4.629755
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-04-06T11:25:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b663e1cad9f...
af6c4063-2c16-4f71-95e1-939c1f18ee06
Dan4Life/Competitive-Programming
Atcoder/Atcoder Yellows(2000-2399)/ARC088E.cpp
/* Solved with help (external help) Solution: https://pitsbuffersolution.com/compro/atcoder/arc088e.php Alternate Solution(Impl is a bit weird tho): https://ykmaku.hatenablog.com/entry/2018/10/21/170709 */ #include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back const int maxn = (int)2e...
ALGO
0.999925
3.55231
{ "github_metadata": { "branch": "main", "commit_count": 245, "repo_created_at": "2023-03-16T15:12:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1af045d0c4...
58f65070-8228-4444-bfb5-bb4587a8314c
shreejitverma/SDE-Interview-Prep
competitive-programming/Blind 75 Must Do Leetcode/Non-overlapping Intervals.cpp
/* https://leetcode.com/problems/non-overlapping-intervals/ 435. Non-overlapping Intervals Medium 2867 79 Add to List Share Given an array of intervals intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. Exam...
ALGO
0.999903
5.851135
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2021-07-03T14:09:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 14, "issues": 0, "pull_requests": 24 }, "file_meta": { "content_id": "bc80523b...
8b3c28ef-137c-4449-9bce-c35feddca5a9
jteulade/Tulip
interactor/PathFinder/PathFinding/PathAlgorithm.h
/** * * This file is part of Tulip (www.tulip-software.org) * * Authors: <NAME> and the Tulip development Team * from LaBRI, University of Bordeaux * * Tulip is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * as published by the Free Software...
ALGO
0.999882
6.873661
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2015-03-16T21:28: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": "edee75f073...
372dc227-3964-4502-867c-493319d922ce
fast-57/1_kurs_KNiIT_materials
Informatica and programmirovanie/Задачи на ряды/programs/primer5.cpp
# include <iostream> # include <math.h> # include <iomanip> using namespace std; int main(){ int N = 100; float x, eps; cout << "x="; cin >> x; cout << "eps="; cin >> eps; float a = x, S = a; cout << left << setw(3) << "i\t" << setw(10) << "a\t"; cout << setw(10) << "S" << endl; cout << ...
ALGO
0.999725
3.393752
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2025-04-07T14:51:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ba11ea772...
b8751690-b995-461f-9a26-d5978fae6a39
Jakub-Karczewski/wolfram_omega
onp.cpp
#include "onp.hpp" using namespace std; int pior(const char &z) { if(z == '(') return 0; if(z == '+' || z == '-') return 1; if(z == '*' || z == '/' || z == '%') return 2; if(z == '^') return 3; if(z == 's' || z == 'c' || z == 'S' || z == 'C' || z == 't' || z == 'T' ...
ALGO
0.999578
3.815752
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-06-02T17:34:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "478273372...
893657fa-2be1-42d4-baeb-f14e28c8c99b
taatzz/taatzz
207.课程表.cpp
/* * @lc app=leetcode.cn id=207 lang=cpp * * [207] 课程表 */ // @lc code=start #include <vector> #include <cstring> using namespace std; class Solution { public: static const int N = 5010; int h[N], e[N], ne[N], d[N], idx = 0; void add(int a, int b) { e[idx] = a; ne[idx] = h[b]; ...
ALGO
0.999917
6.489684
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2021-11-06T01:35:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4b8c065eac3...
f6bb6c39-1a7b-4eb0-8287-5a3743644648
axchen93/CS361-Numerical-Methods
Root Finding/Root_Finding.cpp
#include<iostream> #include<cmath> using namespace std; double func(double x); void func(double x, double &f, double &fprime); int root_bisection(double target, double tol_f, double tol_x, int max_iter, double x_low, double x_high, double & x, int & num_iter); int root_NR(double target, double tol_f, double tol_x, int...
ALGO
0.999987
5.103104
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-10-07T03:01:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95caa276e3...
b6700f9a-73ae-4372-afcc-a5d225fb6a7f
javagovindsharma/leetscode
lcof2/剑指 Offer II 015. 字符串中的所有变位词/Solution2.cpp
class Solution { public: vector<int> findAnagrams(string s, string p) { int m = s.size(), n = p.size(); vector<int> ans; if (m < n) { return ans; } vector<int> cnt(26); for (int i = 0; i < n; ++i) { ++cnt[s[i] - 'a']; --cnt[p[i] - '...
ALGO
0.99998
6.217323
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2025-01-19T10:47: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": "ff3de605c67...
d4d5ce8f-4259-40ed-b1db-490a9ea659f4
dodamce/leetcode
DateStruce/1.顺序表/6.合并有序顺序表.cpp
// 06.将两个有序顺序表合并为一个新的有序顺序表,并由函数返回结果顺序表。 #include <iostream> #define MAX_SIZE 20 typedef int ElemType; typedef struct Array { ElemType data[MAX_SIZE]; int length; } Array; void PrintArray(const Array &array) { if (array.length == 0) { printf("顺序表为空\n"); } else { for (int i = ...
ALGO
0.999891
4.981575
{ "github_metadata": { "branch": "master", "commit_count": 487, "repo_created_at": "2023-03-27T10:41:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96b9662f...
6246ce07-3b11-4b84-afa2-1f2befe9cf9c
aaafwd/Online-Judge
Volume 100 (10000-10099)/10075.cpp
/* @JUDGE_ID: 19899RK 10075 C++ "By Anadan" */ // Airlines // Accepted (0.066 seconds with low memory spent) #include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> struct City{ int i; char name[32]; double x, y, z; }pt[100]; const double Re = 6378.0; const double pi = 3.141592653589793; cons...
ALGO
0.99998
3.993374
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-04-11T10:48: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": "fa4101152cf...
d13d1153-ffca-49e7-9047-2662f56b44c1
olekca00/O-God
Normal distribution/Normal distribution/Source.cpp
/* #include <iostream> #include <boost/random/normal_distribution.hpp> #include <boost/random/mersenne_twister.hpp> #include <boost/random/variate_generator.hpp> #include<boost/math/distributions/normal.hpp> using namespace boost::math; int main(void) { double mean_life = 80.; double life_standard_deviation = 10.; ...
ALGO
0.954897
4.150542
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-05-05T06: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": "6192228b90...
438134bd-8da4-4ea3-ac02-71e5228ccdcb
star-bnl/star-sw
StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BW003_2009.cc
// // <NAME> <<EMAIL>> // Texas A&M University Cyclotron Institute // 7 Jan 2009 // #include "DSM.hh" #include "sumTriggerPatchChannels.hh" #include "DSMAlgo_BW003_2009.hh" void DSMAlgo_BW003_2009::operator()(DSM& dsm) { // INPUT: // 10 12-bit BEMC channels // (5-0) high-tower // (11-6) trigger-patch // ...
ALGO
0.96566
5.006328
{ "github_metadata": { "branch": "main", "commit_count": 38269, "repo_created_at": "2020-11-12T22:30:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 29, "forks": 66, "issues": 9, "pull_requests": 29 }, "file_meta": { "content_id": "8ae24e...
366785bb-8f0c-4568-b655-2d809e2771e9
Guray00/IngegneriaInformatica
SECONDO ANNO/I SEMESTRE/Ricerca Operativa/Codici per Esami/C++ [Daini]/Zaino/main.cpp
#include <iostream> using namespace std; #include"zaino.h" int main() { zaino z; cout << " scegliere le seguenti opzioni:" << endl; cout << "1) zaino intero, soltanto" << endl; cout << "2) Branch And Bound con zaino binario all'inizio" << endl; cout << "3) solo zaino binario" << endl; cout << "4...
ALGO
0.999132
3.320671
{ "github_metadata": { "branch": "master", "commit_count": 2011, "repo_created_at": "2020-01-16T20:31:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 318, "forks": 60, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e764...
179d0bef-1ef4-487d-a0d5-7f5d77b730ec
mtyong55555/Hankerrank-Codes-Record
7. Jim and the Skyscrapers.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <stack> #include <map> using namespace std; int main() { int n; cin >> n; stack<long int> heights; map<long int,int> height_map; long int equal_count = 0; long int count = 0; for(int...
ALGO
0.999749
3.557803
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2016-11-04T21:39:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44f0fa4e6...
a9bb9d18-a7a5-4c30-9806-04ae9d5a5c88
arrayfire/arrayfire
src/backend/oneapi/qr.cpp
/******************************************************* * Copyright (c) 2022, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause **********************************************...
ALGO
0.953228
7.370374
{ "github_metadata": { "branch": "master", "commit_count": 6246, "repo_created_at": "2014-10-28T20:58:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4739, "forks": 546, "issues": 277, "pull_requests": 18 }, "file_meta": { "content_id": "...
e571c912-a730-42f3-8469-dc171d25f1b0
Sean-Lan/leetcode
algorithms/maximumDistanceInArrays/maximumDistanceInArrays.cpp
/** * * Sean * 2017-08-17 * * https://leetcode.com/problems/maximum-distance-in-arrays/description/ * * Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) and calculate the distance. We define the distance between two int...
ALGO
0.999893
5.682757
{ "github_metadata": { "branch": "master", "commit_count": 754, "repo_created_at": "2015-04-08T02:27:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b7603ac...
f9bf578e-9234-42dd-8bd4-45cc32e43593
BhavyaBhalla-27/DSA-Supreme-
Graphs_ClassI_17th June 2023/Depth_First_Search.cpp
#include<iostream> #include<unordered_map> #include<list> #include<queue> using namespace std; template<typename T> class Graph{ public: unordered_map<T,list<T>>adjList; void addEdge(T u,T v,bool direction){ // direction = 0 -> undirected // direction = 1 -> directed ...
ALGO
0.999942
4.888155
{ "github_metadata": { "branch": "main", "commit_count": 513, "repo_created_at": "2023-01-22T10:26:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 370, "forks": 137, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "ec6fe5...
8a52cdc1-3753-401b-9eca-f8bc35a79d0b
03Serch19/exercises-in-C-and-Cplus
Proyecto1G6/COLADIM.cpp
/* COLAS.C */ #include "coladim.h" #include <conio.h> #include <stdio.h> # include <stdlib.h>//se agrego xd void freenode(Ptrnodoq p) { free(p); } Ptrnodoq getnode(void) { Ptrnodoq p; p=(Ptrnodoq)malloc(sizeof(struct Nodoq)); return(p); } void LimpiarCola(TipoCola * pq) { pq->Frente=NULO; pq->Fin...
ALGO
0.944244
4.095388
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-03-10T01:51:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9121842fc44...
02659a83-d6a7-409c-8a66-4d89fdd20463
an0520a/boj
BOJ_11054.cpp
#include <stdio.h> #include <stdbool.h> #include <malloc.h> typedef unsigned int u32; u32 maxLen(u32* arr, u32 len); int main() { u32 N; u32* arr; scanf(" %u", &N); arr = (u32 *)malloc(N * sizeof(u32)); for (u32 i = 0; i < N; i++) { scanf(" %u", arr + i); } printf("%u\n", ...
ALGO
0.999921
4.072518
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2022-08-20T13:53:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed8d656d5...
f334dafd-f5d9-4a47-826a-7e16318ac726
Z3Prover/z3
src/math/lp/implied_bound.h
/*++ Copyright (c) 2017 Microsoft Corporation Module Name: <name> Abstract: <abstract> Author: <NAME> (levnach) Revision History: --*/ #pragma once #include "math/lp/lp_settings.h" #include "math/lp/lar_constraints.h" namespace lp { class implied_bound { public: mpq m_bound; // It is ei...
TOOL
0.900245
4.482776
{ "github_metadata": { "branch": "master", "commit_count": 19811, "repo_created_at": "2015-03-26T18:16:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11200, "forks": 1542, "issues": 160, "pull_requests": 6 }, "file_meta": { "content_id":...
d002d91c-2ab3-4fb0-afd0-38396cfa75de
Apocaly-pse/dsa
c_cpp/Linked_List/test_Double_Linked_List.cpp
#include "Double_Linked_List.hpp" // === test func === ===// void test_ctor() { DoubleLinkedList ll1(12); ll1.print(); DoubleLinkedList ll2(1, {2, 3, 4}); ll2.print(); DoubleLinkedList ll3({1, 2, 3, 4}); ll3.print(); /* ∅ <== 12 ==> ∅ */ /* ∅ <== 1 <=> 2 <=> 3 <=> 4 ==> ∅ */ /* ∅ ...
TEST
0.910599
5.241734
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-08-26T05:21:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a9cfd42990...
44cfa8f7-dfdb-4b24-9b49-86151baafabe
Devendra48D/Single-Server-Queueing-System
simlib/src/opt-hooke.cc
///////////////////////////////////////////////////////////////////////////// //! \file opt-hooke.cc Optimization algorithm - Hooke-Jeves // // Copyright (c) 2000-2004 <NAME> // // This library is licensed under GNU Library GPL. See the file COPYING. // // EXPERIMENTAL // Hooke-Jeves optimization method #include "sim...
ALGO
0.999987
5.348798
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-10-02T17:03:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb86e14d8b...
2f1aa9b3-8549-4125-9ca4-4eae3017e477
blankmata/Cplusplus-Research
ResearchPaper.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <cmath> #include <chrono> #include <unordered_map> using namespace std; using namespace chrono; // Functions required void readNumbers(const string &filename, vector<int> &numbers); void writeResults(const string &filename, int min...
ALGO
0.999171
6.076541
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-01T04:24: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": "b7edbfcb77bc...
1579c82d-4ecd-4e99-818a-6a0da0096bd9
GRTLCollaboration/Chombo
lib/src/EBAMRElliptic/NeumannConductivityEBBC.cpp
#ifdef CH_LANG_CC /* * _______ __ * / ___/ / ___ __ _ / / ___ * / /__/ _ \/ _ \/ V \/ _ \/ _ \ * \___/_//_/\___/_/_/_/_.__/\___/ * Please refer to Copyright.txt, in Chombo's root directory. */ #endif #include "BoxIterator.H" #include "NeumannConductivityEBBC.H" #include "EBSt...
ALGO
0.917222
6.371197
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2018-01-30T14:07:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 12, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c112999dba...
64999d56-1065-4a5a-a6c1-8ca348b6c10e
claurel/cosmographia
thirdparty/noradtle/sgp8.cpp
// ----------------------------------------------------------------------------------------------- // // This file is part of a free package distributed by Dr <NAME>, <EMAIL> in his web site // at http://www.grove.net/~tkelso/ // // This system carries two-line orbital data (*.tle files with the master list being tle.n...
ALGO
0.999423
5.073258
{ "github_metadata": { "branch": "master", "commit_count": 773, "repo_created_at": "2015-01-29T17:32:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 16, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "1eba22...
ae6154bc-fa62-4d87-8033-f56a015444c9
piyush1146115/Competitive-Programming
LeetCode/226. Invert Binary Tree.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.999987
5.762286
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2019-09-30T18:09:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fc96fa4d...
bd5de4b9-ae0a-42c0-9fe1-1f23b6526f03
dizuo/dizuo
dizuo/Simple Model Engine/Model/CLoft.cpp
#include "CLoft.h" CLoft::CLoft(){} CLoft::~CLoft(){} bool CLoft::Setup() { ////////////////////////////////////////////////////////////////////////// // create the model's basic informations if ( !path.GetSize() || !shape.GetSize() || path.GetSize() < 3) { return false; } size_t pathSize = path.GetSize(); ...
TOOL
0.954598
4.470128
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2011-01-14T06:00:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae094115...
d1287bd2-a25b-4865-b3fc-8db7adc522f4
Sahiljawale/CodeChef
C++/maxima.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { long long int i , F_max, S_max, minm, N, temp, result, T; vector<long long int> arr; cin >> T; while(T--) { cin >> N; result = 0; F_max = INT_MIN; S_max = INT_MIN; minm = 0; fo...
ALGO
0.999876
4.749317
{ "github_metadata": { "branch": "main", "commit_count": 401, "repo_created_at": "2022-01-19T05:55:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 70, "issues": 12, "pull_requests": 1 }, "file_meta": { "content_id": "769c128...
32af2ba9-0bb6-43e8-bfa6-68a3aa522557
shivanibhat24/CPP-Programs
Leetcode Programs/reorderroutestomakeallpathsleadtothecityzero.cpp
const auto _ = std::cin.tie(nullptr)->sync_with_stdio(false); #define LC_HACK #ifdef LC_HACK const auto __ = []() { struct ___ { static void _() { std::ofstream("display_runtime.txt") << 0 << '\n'; } }; std::atexit(&___::_); return 0; }(); #endif class Solution { private: vector<vector<int>> g; vector<ve...
ALGO
0.999772
4.738469
{ "github_metadata": { "branch": "main", "commit_count": 1115, "repo_created_at": "2024-10-06T04:35: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": "031aa3ccb...