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
46e7f697-5101-45fb-829a-72f6f1bc9015
sikakoluchaitanya/leetcode_questions_solved
1535-build-array-where-you-can-find-the-maximum-exactly-k-comparisons/1535-build-array-where-you-can-find-the-maximum-exactly-k-comparisons.cpp
class Solution { public: int numOfArrays(int n, int m, int k) { const int MOD = 1000000007; // Initialize two 2D arrays dp and prevDp vector<vector<int>> dp(m + 1, vector<int>(k + 1, 0)); vector<vector<int>> prevDp(m + 1, vector<int>(k + 1, 0)); // Set the ba...
ALGO
0.999985
5.636271
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2023-08-21T14:21:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20edae67d08...
c2fdd38f-6bff-4d7a-b1b6-7216c81bb43a
fifi2323/optymalizacjakombinatoryczna
knapsack.cpp
#pragma once #include "item.cpp" #include <vector> #include <algorithm> #include <cmath> #include <bitset> #include <chrono> #include <fstream> bool CompareByMassRatio(const Item& a, const Item& b) { // Calculate the ratio value / mass for both objects a and b double ratio_a = a.getValue() / a.getMass(); do...
ALGO
0.998379
4.710957
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-10T11:39: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": "65a413f65e98...
82053ad2-7541-423c-8031-87471c73cae4
esanchez1/Project_3
hangman.cpp
//hangman.cpp #include "hangman.h" #include <string> #include <cstdlib> #include <time.h> #include <ctime> string hangman::randomlyGenerateWord(){ std::string arr[10]; for (int i=0; i<10; i++) { if (i==0) {arr[i]="computer";} else if (i==1) {arr[i]="software";} else if (i==2) {arr[i]="boo...
TOOL
0.932929
3.353076
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2021-10-28T22:20:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aed81df3b...
3efc6ba0-6fb0-4169-97fa-87e2fa870f24
navinkrnirala76/POTD-GFG
Sum of upper and lower triangles.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to return sum of upper and lower triangles of a matrix. vector<int> sumTriangles(const vector<vector<int> >& matrix, int n) { // code here int upsum = 0,...
ALGO
0.999972
5.633407
{ "github_metadata": { "branch": "main", "commit_count": 200, "repo_created_at": "2023-07-24T06:51: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": "1c48722275...
d34bbd46-e1ce-4561-aea9-c89f1882d981
Ayuuuushh/DS-A
Recursion/insertionSort.cpp
#include <bits/stdc++.h> using namespace std; void insertionSort(int *arr, int end) { if (1 >= end) return; insertionSort(arr, end - 1); int last = arr[end - 1]; int j = end - 2; while (j > 0 && arr[j] > last) { swap(arr[j + 1], arr[j]); j--; } arr[j + 1...
ALGO
0.999808
5.752393
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-08-14T16:31:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e8d3812ede...
e8501cac-dcbc-4653-be04-3a790842f3de
Mooliecool/windows
shared source/vb/language/compiler/parser/parsetreevisitor.cpp
//------------------------------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // Implementation of ParseTreeVisitor // //------------------------------------------------------------------------------------------------- #include...
TOOL
0.942409
3.098481
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-01-06T16:45:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 34, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d84cbde...
f271a589-8274-4dab-9171-56f0b74593e5
vayer2005/acm
round1019/C.cpp
#include <bits/stdc++.h> #define mp make_pair using namespace std; typedef long long ll; void solve() { int n; ll k; cin >> n >> k; ll arr[n]; for (int i = 0; i < n;i++) { cin >> arr[i]; } for (int i = 0; i < n; i++) { if (arr[i] <= k) { arr[i] = 1; } else...
ALGO
0.999738
4.126211
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2025-01-17T21:42: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": "6ebd7708e...
9b6f2a65-3531-4942-b497-b8250f6ed31d
DepinSundaram/leetcode
Sliding_Window/LC992/main.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; /* Given an array nums of positive integers, call a (contiguous, not necessarily distinct) subarray of nums good if the number of different integers in that subarray is exactly k. (For example, [1,2,3,1,2] has 3 different integers: 1, 2, ...
ALGO
0.99993
5.618452
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-05-07T18:19: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": "24b0042bfeb6...
9f232180-9638-4383-92fa-52b5d4fe17ff
m0vefaster/Programs
SPOJ/SHOP3.cpp
#include<iostream> #include<stdio.h> #include <algorithm> #include<math.h> #include<string.h> #include<vector> #include<map> #include <utility> #include <time.h> #include<limits> #include<queue> #include<stack> #include<cstdio> #include<list> using namespace std; #define gc getchar void scanint( long long int &x) { ...
ALGO
0.999959
3.559727
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-01-03T00:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ef45f1330...
06c63acd-2389-4b12-b8e0-246ffd526c3d
jvcleave/PCL_1-3-0_Libraries_for_OF
pcl_1-3-0/search/include/pcl/search/organized.h
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2011, <NAME>, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
ALGO
0.992939
6.7664
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2011-11-06T18:52:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86df1d8f6a...
a59db058-a9eb-46f9-92d6-a6050eb34d09
ItsMayar/ReportCardSystem
LinkedList.h
#pragma once template <class LinkedListItem> class LinkedList { private: // A single node in the linked list struct LinkedListNode { // Holds the item of the node LinkedListItem item; // Points to the next node in the list LinkedListNode *next; }; // The head of t...
TOOL
0.996265
6.516188
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-08-20T21:57: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": "2a4066bb204...
8fa0346d-ce4f-4e2b-8edb-64f335b9d516
DoubleAid/Notebook
4_算法汇总/Leetcode/0001-0100/13.roman-to-integer.cpp
/* * @lc app=leetcode id=13 lang=cpp * * [13] Roman to Integer */ #include <unordered_map> #include <string> using namespace std; // @lc code=start class Solution { public: int romanToInt(string s) { int res = 0; int p = 0; unordered_map<char, int> hash_map = { {'M', 1000}, ...
ALGO
0.999746
6.578255
{ "github_metadata": { "branch": "main", "commit_count": 340, "repo_created_at": "2021-12-06T02:15:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "41338ffa55...
9a4c1bdf-735a-4d99-9615-22a539c025c8
rovanemoura/MultiAgentPlannerComparison
planners/marc/seq-sat-ibacop/src/randward/ff_heuristic.cc
/********************************************************************* * Author: <NAME> (<EMAIL>) * (C) Copyright 2003-2004 <NAME> * Modified by: <NAME> (<EMAIL>), * <NAME> (<EMAIL>) * (C) Copyright 2008 NICTA and <NAME> * * This file is part of LAMA. * * LAMA is free software; you ca...
ALGO
0.999534
6.702896
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-06-09T15:16:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b5dd9e30...
c6eb5463-f205-4620-bad6-d26967d67337
zakaria-kabir/CSE203-Data-Structure-Codes
QUEUE & STACK/checkBalance.cpp
#include <iostream> #include <stack> using namespace std; //function to check matching brackets void removeSpaces(string &str) { int count = 0; for (int i = 0; i<str.length(); i++) if (str[i] != ' ') str[count++] = str[i]; str[count] = '\0'; ...
ALGO
0.998092
4.073671
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-01-03T10:58: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": "a35f729f7937...
b6d8c292-75ad-422a-9570-92e3f000bab1
zephyr0p/Study
Midpoint-Circle.cpp
#include<iostream.h> #include <dos.h> #include<graphics.h> #include<math.h> int main() { int gd = DETECT, gm; initgraph( & gd, & gm, "C:\\TC\\BGI"); float x, y, x1 = 100, y1 = 200, p, r = 80; /* cout<<"\nEnter the centre of the circle:"; cin>>x1>>y1; cout<<"Enter the radius of the circle:"; cin>>r; ...
ALGO
0.981058
4.069118
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-06-06T09:39:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "287be6ca2c7...
078b7a53-0513-4b6f-8ce4-7ae5cb0ca748
jensimaniya/CPP
2-D Array/Exam/pro3.cpp
#include <iostream> #include <vector> using namespace std; void ReverceN(vector<vector<int>> array, int m, int n) { for (int i = 0; i < m; i++) { cout << array[i][m - 1] << " " << endl; } for (int i = m - 1; i > 0; i--) { { for (int j = n - 2; j > 0; j--) { if (i == j) { cout << ...
ALGO
0.999721
4.202095
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2024-12-10T11:54:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c18f98a55...
8d3c7583-67e0-4342-add3-24103d4224bd
rishisankar/icpc
practices2023/swerc2016/bfC.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define pb push_back #define F first #define S second #define mp make_pair #define INP(v, n) for (int i=0; i<n; ++i) { cin >> v[i]; } #define ceil(x) (ll)ceil(x...
ALGO
0.999955
4.03618
{ "github_metadata": { "branch": "main", "commit_count": 324, "repo_created_at": "2021-01-08T15:36: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": "2514719d8a...
2efab620-e8d6-42e7-b69e-f8aa3c101e1d
rathorehukam/DSA-
Unit 5/L - 33/Mythili is currently studying different sorting algorithms in her computer science class. She recently learned about Heap Sort, a popular sorting technique that leverages the properties of max and min heaps. Mythili decided to implement both Max Heap Sort and Min Heap Sort to compare their performance.cpp
#include <iostream> using namespace std; void MaxHeapify(int arr[], int N, int i) { int largest = i; int l = 2 * i + 1; int r = 2 * i + 2; if (l < N && arr[l] > arr[largest]) largest = l; if (r < N && arr[r] > arr[largest]) largest = r; if (largest != i) { sw...
ALGO
0.999977
4.286597
{ "github_metadata": { "branch": "main", "commit_count": 123, "repo_created_at": "2023-10-23T06:35:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35101b09e3...
61840fc9-5cc0-41aa-ad3e-f3dacca9baaa
RaplesWojtyla/My-Competitive-Programming-Archive
Compfest/C14/m.cpp
/* $$\ $$\ $$\ $$\ $$ | $\ $$ | $$ | $$ | $$ |$$$\ $$ | $$$$$$\ $$\ $$$$$$\ $$\ $$\ $$ | $$$$$$\ $$ $$ $$\$$ |$$ __$$\ \__|\_$$ _| $$ | $$ |$$ | \____$$\ $$$$ _$$$$ |$$ / $$ |$$\ $$ | $$ | $$ |$$ | $$$$$$$ | $$$ /...
ALGO
0.999967
4.23401
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-10T22:10: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": "428bfced5085...
642157dd-3c5d-4850-870c-28787dc66137
zhaomokeji/Firemail_Mozilla_dom
plugins/base/PluginFinder.h
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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/. */ #ifndef PluginFinder_h_ #define Pl...
TOOL
0.910075
7.691183
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-08-04T09:50: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": "3c25811c0b...
59a85c82-fbf7-48c1-b764-5213e566b57e
AudioProcessingFramework/apf
apf/biquad.h
/****************************************************************************** Copyright (c) 2012-2016 Institut für Nachrichtentechnik, Universität Rostock Copyright (c) 2006-2012 Quality & Usability Lab Deutsche Telekom Laboratories, TU Berlin Permission is hereby granted, free of charge,...
ALGO
0.995439
7.14519
{ "github_metadata": { "branch": "master", "commit_count": 173, "repo_created_at": "2013-07-03T12:29:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35, "forks": 8, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "305c4d47...
2c0b713f-308a-4330-a69a-5ffafcecb9f4
Dhruv-0-Arora/Competition-Prep
USACO_prep1/2022_December/Bronze/CowCollege.cpp
#include <bits/stdc++.h> using namespace std; void checkIndex(int &index, vector<int> &cows) { for (int i = cows.size() - index; i < cows.size(); i++) { if (cows[i] == 0) { index = i; break; } } } int main() { int n; cin >> n; vector<int> cows; while(n) { ...
ALGO
0.999969
4.032441
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2023-04-12T23:55: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": "0e8e6a571...
9c3d80ed-5c3a-4259-afaf-400baaf289e7
ikr/algo-practice
atcoder/2021/Play_Train/solution.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using pii = pair<int, int>; using vll = vector<ll>; using vvll = vector<vll>; template <typename T> constexpr int inof(const T x) { return static_cast<int>(x); } template <typename T> constexpr ll l...
ALGO
0.999898
4.858351
{ "github_metadata": { "branch": "master", "commit_count": 5422, "repo_created_at": "2016-06-23T07:28:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7f9876...
c9a40d3c-b40e-4801-95f5-85d64bb7245f
shuchitgandhi/stacks_and_queues
question 3-d.cpp
#include<iostream> using namespace std; class Node{ int data; Node* next; public: Node(int); int getData(); Node* getNext(); void setNext(Node*); }; class Queue{ Node* head; Node* tail; Node* createNewNode(int); public: Queue(); void enqueue(int); int dequeue(); bool isEmpty(); }; void re...
ALGO
0.999244
4.261131
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-02-25T14:24: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": "5364b85792...
c2cfaf0e-237f-44b0-b488-53d5cbfb0efb
mtsdurica/ims-exam-codes
numerical_methods/rk/rk2.cpp
#include <cmath> #include "rk2.h" #define N 2 void Dynamic(double t, double *st, double *der) { der[0] = st[1]; // der[1] = (cos(st[1]) - 7 * st[0]) / (double)5.0; der[1] = 5 + -2 * st[0]; } void Step(double t, double *st, double step) { double k1[N] = {}; double k2[N] = {}; double start[N] ...
ALGO
0.999942
3.867991
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2025-01-06T17:00: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": "9e94105880...
29f3bfe8-1c99-40ef-8c31-114504bb8b8c
NickFyodorov/ExtremumSearch
ExtremumSearch/optimization_method.h
#pragma once #include <vector> #include <string> #include "vpoint.h" #include "area.h" #include "function.h" #include "terminal_condition.h" /*! \section DESCRIPTION The OptResult structure represents the result of optimization process for a function in given area */ struct OptResult { std::shared_ptr<Function> Fu...
ALGO
0.971137
4.095458
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2017-10-03T20:26: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": "505b5ea1a...
7e53b60f-df48-4ca5-8f87-f720e31df998
richard-johansson/algorithmic-problem-solving
labs/1-lab/1.3-longest_increasing_subsequence.cc
/** * @file c-longest_increasing_subsequence.cc * @author <NAME> (<EMAIL>) * @brief */ #include <iostream> #include <vector> #include <algorithm> using namespace std; int lis (vector<long int> const& a) { long int n = a.size(); const long int infinity = 1e9; vector<long int> d(n+1, infinity), p(n, -1...
ALGO
0.999836
5.39607
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-09-29T18:13: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": "85dda135fd...
f04196b2-25fc-4f3d-9e02-c826fddbf768
cms-sw/cmssw
RecoJets/JetAlgorithms/src/SubjetFilterAlgorithm.cc
//////////////////////////////////////////////////////////////////////////////// // // SubjetFilterAlgorithm // --------------------- // // This algorithm implements the Subjet/Filter jet reconstruction // which was first proposed here: http://arXiv.org/abs/0802.2470 // // The implementation is largely based on fastjet...
ALGO
0.976691
6.393115
{ "github_metadata": { "branch": "master", "commit_count": 251237, "repo_created_at": "2013-06-26T14:09:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1144, "forks": 4480, "issues": 947, "pull_requests": 108 }, "file_meta": { "content_id...
f01aa6a9-36b2-43a4-9e81-37310693436e
Ramin412/Data-Structure-learn
Moudle_17/postorder_travarsal.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *left; Node *right; Node(int val) { this->val = val; this->left = NULL; this->right = NULL; } }; void postorder_travarsal(Node *root) { if (root == NULL) return; postorder_tra...
ALGO
0.999941
4.095552
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-02-10T02:31: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": "cd077798c8...
b394ca93-418c-4c80-8532-6c2792cad22a
luanaamorim04/competitive_programming
obi/equipeS.cpp
#include <iostream> #include <queue> #include <string> #include <algorithm> #include <vector> #include <cmath> #include <iomanip> #include <map> #include <cstring> #include <set> #include <stack> #include <bitset> #define ll long long #define INF (1e9) #define MAX (int) (2e5 + 5) #define MOD 1000000007 #define par pair...
ALGO
0.999656
3.662506
{ "github_metadata": { "branch": "master", "commit_count": 471, "repo_created_at": "2020-09-20T23:27:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2a87729...
607851e6-3de1-49a9-9edd-84c601925486
dfguan/deSPI
src/bwt.hpp
// ===================================================================================== // // Filename: bwt.hpp // // Description: header file of bwt // // Version: 1.0 // Created: 11/03/2015 03:42:23 PM // Revision: none // Compiler: g++ // // Author: <NAME>, <<EMAIL>...
ALGO
0.994882
3.009466
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2016-08-01T08:57:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 5, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "ad7e997f...
b7799a86-a96a-46eb-a9e1-14e17a6794ed
Uranium-Deng/LeetCode
7.graph/2.最短路径/2.Dijkstra.cpp
/************************************************************************* > File Name: 2.Dijkstra.cpp > Author: DRZ > Mail: <EMAIL> > Created Time: 2020年07月26日 星期日 10时11分58秒 ************************************************************************/ #include <iostream> #include <cstdio> #include <cstdlib> #includ...
ALGO
0.999961
3.541196
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-02-28T04:49: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": "2005f7fb8...
6adcdd25-5f1a-405d-a484-055361af0c4d
SanskarGithub07/Leetcode
684_Redundant_Connection.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: void makeSet(vector<int> &rank, vector<int> &parent, int n){ for(int i = 1 ; i <= n ; i++){ rank[i] = 0; parent[i] = i; } } int findParent(vector<int> &parent, int node){ if(parent[node] ...
ALGO
0.999989
5.238171
{ "github_metadata": { "branch": "main", "commit_count": 257, "repo_created_at": "2023-11-16T17:39: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": "b1b58fab1d...
5e00b9c0-5169-4b95-9c56-7c88f5542a20
orgTestCodacy11KRepos110MB/repo-5511-havenask
aios/indexlib/indexlib/index/normal/inverted_index/builtin_index/range/range_index_segment_reader.cpp
#include "indexlib/index/normal/inverted_index/builtin_index/range/range_index_segment_reader.h" #include "indexlib/index/normal/inverted_index/builtin_index/range/range_info.h" #include "indexlib/common/field_format/range/range_field_encoder.h" #include "indexlib/config/range_index_config.h" using namespace std; IE_N...
TOOL
0.934274
5.011109
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2023-01-30T22:21:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3686bab7a4b8...
2ae8b17e-77aa-45ff-a28d-6621727d8550
Veeeranji11/CSA5175-CRYPTOGRAPY-FOR-NETWORK-SECURITY
10.PLAY FAIR.cpp
#include <stdio.h> #include <string.h> #include <ctype.h> #define SIZE 5 // Playfair matrix char matrix[SIZE][SIZE] = { {'M', 'F', 'H', 'I', 'K'}, {'U', 'N', 'O', 'P', 'Q'}, {'Z', 'V', 'W', 'X', 'Y'}, {'E', 'L', 'A', 'R', 'G'}, {'D', 'S', 'T', 'B', 'C'} }; // Function to find the position of a le...
ALGO
0.999887
5.627525
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-11-19T06:48: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": "b223af28f838...
65fca390-790c-4e9d-994a-4c75676ea6e8
celinezou/Data-Structure
787.cpp
#include <stdlib.h> #include <string> #include <cstdlib> #include <algorithm> #include <iostream> #include <stdio.h> using namespace std; const int maxn = 50005; //Tkey为输入主键与辅键的结构体 //key表示主键,aux表示辅键,index表示是输入的第几个结点 struct Tkey { string label; int pri, index; } keys[maxn]; //Tnode是BST结点的结构体,key表示主键,aux表示辅键 //father表...
ALGO
0.999462
3.468357
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-03-08T11:40:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a86d148575...
5fff20eb-e2fc-429d-b0a8-25735e09b756
SiddhantAttavar/Competitive-Programming
Atcoder-Contests/ARC174/A - A Multiply.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template<typename T> inline void input(T& inVar) {cin >> inVar;} template<typename T, typename... S> inline void input(T& inVar, S&... args) {cin >> inVar; input(arg...
ALGO
0.999957
4.119693
{ "github_metadata": { "branch": "main", "commit_count": 607, "repo_created_at": "2021-09-16T08:14:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c1f4e25b...
d406248b-46e0-4329-ab4d-b9f87f36066b
CLCK0622/C-programs
2023.1-Silver/C/main.cpp
#include <iostream> using namespace std; int n, sum; int a[100005]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; } int ncnt = 0; bool nowL = false; int npos = 0; while (ncnt < sum) { if (a[npos] >= 2) { cout << 'R'; ...
ALGO
0.999974
3.065378
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-12-08T12:12:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab61dbea105...
b0a288ab-016d-4142-85bd-4e9d50072651
DollarAkshay/Competitive-Coding
CodeChef/CodeChef_Chef_and_Sets.cpp
/*~~~~~~~~~~~~~~~~~~* * * * $<NAME>$ * * * *~~~~~~~~~~~~~~~~~~*/ //http://www.codechef.com/LTIME25/problems/CHEFDTRE #include <assert.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include <time.h> #include <math.h> #include <algorithm> #includ...
ALGO
0.999871
4.257726
{ "github_metadata": { "branch": "master", "commit_count": 570, "repo_created_at": "2018-01-31T16:03:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ecaa6682...
2f0911b4-a442-48ce-9153-4bd0f711d990
MariaSimon-AI/Pulse-Painter
motor_2.cpp
A, [29/11/2023 15.52] #include <Stepper.h> #include <Wire.h> #include "MAX30105.h" #include "heartRate.h" #define steps_per_rev 200 #define IN1 14 #define IN2 27 #define IN3 26 #define IN4 25 #define SWITCH 33 bool switchState = HIGH; bool lastSwitchState = HIGH; unsigned long lastDebounceTime = 0; unsigned long d...
TOOL
0.935142
5.678524
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-12-12T19:57: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": "9d5758e18713...
fb5b581c-b1c8-4df0-97f9-6c181a67518e
snishal/coding-practice
leetcode/primitive/reverse bits/sol1.cpp
#define R2(n) n, n + 2*64, n + 1*64, n + 3*64 #define R4(n) R2(n), R2(n + 2*16), R2(n + 1*16), R2(n + 3*16) #define R6(n) R4(n), R4(n + 2*4 ), R4(n + 1*4 ), R4(n + 3*4 ) class Solution { private: unsigned int lookuptable[256] = { R6(0), R6(2), R6(1), R6(3) }; public: uint32_t reverseBits(ui...
ALGO
0.999773
5.48569
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2020-04-04T16:49:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2b2abe96...
16d40732-cd90-4afe-ac1b-d7324908c86c
luucasv/Competitive-Programming
contests/codeforces/1010/a.cpp
#include <bits/stdc++.h> using namespace std; const int ms = 1e5; int a[ms], b[ms]; int n, m; bool can(long double f) { for (int i = 0; i < n; i++) { int nx = (i + 1) % n; f -= (m + f) / a[i]; if (f < -1e-15) return false; f -= (m + f) / b[nx]; if (f < -1e-15) return false; } return true;...
ALGO
0.999964
3.126944
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2016-12-31T00:52:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51f634020...
d6b21d56-9106-4320-b49c-51c0f421d73e
tusharmaurya267/Coding-Ninja-C-
DATA STRUCTURES IN C++/lecture 4 Recursion 2/9_return_keypad_code.cpp
#include <iostream> #include <string> #include <bits/stdc++.h> using namespace std; string sel(int num) { if ( num == 2) return "abc"; if ( num == 3) return "def"; if ( num == 4) return "ghi"; if ( num == 5) return "jkl"; if ( num == 6) return "mno"; if...
ALGO
0.999874
4.660115
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2022-02-03T07:44:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac50c02d928...
fd7d564c-5d21-49bd-800a-837930a83eb1
andy-rash/MATH3316
Project4/MATH3316-Project4/src/part1/numerical_integrator.cpp
// // numerical_integrator.cpp // Project4-Part1 // // Created by andy on 11/28/17. // Copyright © 2017 andy. All rights reserved. // #include "numerical_integrator.hpp" NumericalIntegrator::NumericalIntegrator() { } NumericalIntegrator::NumericalIntegrator(const NumericalIntegrator& copy) { } NumericalIntegrat...
ALGO
0.987919
6.332166
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2017-09-20T16:37: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": "b90cb5210...
c0047625-1d5e-4bef-8041-cdb32a103126
Kallaf/Network-Security
Assignment1/main.cpp
#include<iostream> #define m 1 using namespace std; char start(char c) { return c < 'A'?'0':'A'-10; } string c[] = {"AEDE0273C4C0DA3477F919018A05DA71A2530F5A0020E4E0ACA80FF2DE", "<KEY>", "A9D30426D3C7CB202EB8050E9717C734A5484A13126CE0FDABA212FBDF", "B49B166FDAC58E2A25F90...
ALGO
0.999699
3.324443
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-02-27T23:39:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac3ab22f04...
fefc83ff-0993-4d1c-9554-2e2a811a4440
chirag05-coder/Competitive_Coding
isomorphic_strings_gfg_.cpp
Link for Ques: https://practice.geeksforgeeks.org/problems/isomorphic-strings-1587115620/1# // C++ program to check if two strings are isomorphic #include<iostream> #include<string.h> using namespace std; #define MAX_CHARS 256 // } Driver Code Ends #include<bits/stdc++.h> class Solution{ public: // This fun...
ALGO
0.999819
5.466498
{ "github_metadata": { "branch": "main", "commit_count": 575, "repo_created_at": "2021-03-27T07:19:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22a828ccc2...
87fd1440-153f-4ba1-8285-db6ed35c049c
AlexeyLiniov/ITLab-2018-QuantumAlgorithms
01.PrimeFactors/bezaev_roman/Main.cpp
#include <iostream> #include <random> #include <cmath> #include <vector> #include <ctime> #include <algorithm> #include <fstream> #include "BigIntegerLibrary.hh" using namespace std; // Modulo methods template <class T> T Sum(T &a, T &b, T &mod); template <class T> T Sub(T &a, T &b, T &mod); template <class T> T Mul(T...
ALGO
0.999777
3.7826
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2018-10-15T12:13:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "752bd8259...
9a149219-2fcc-43fd-9f54-c909f56790fd
TomasB8/my_work
C_C++/Algorithms/uloha_3a.cpp
#include <iostream> using namespace std; #define N 3 /* Funkcia, ktora najde v matici najvacsi prvok. */ int findMax(int table[][N]){ int max = 0; for(int i=0; i<N; i++){ for(int j=0; j<N; j++){ if(table[i][j] > max){ max = table[i][j]; } } } return max; } /* Funkcia, ktora najde v matici dalsi naj...
ALGO
0.999961
5.05911
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-01-24T19:16: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": "f6cbd9389a77...
58600ea0-fda4-45a4-9593-bec20e4740ba
Tamimkhan7/CP-Course
Phase 1/Class Six/contest/Array Division.cpp
#include <bits/stdc++.h> using namespace std; #define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> #define MTK \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); typedef long long int ll; #define all(x) x.begin(...
ALGO
0.999992
4.848595
{ "github_metadata": { "branch": "main", "commit_count": 224, "repo_created_at": "2023-09-14T18:50: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": "3009947ee0...
35d5a322-30df-4175-93cf-e6cb3197038b
ishandutta2007/codeforces-c
cephian/normal/617/E.cpp
#include <bits/stdc++.h> #define print(x) cerr << #x << " = " << x << "\n"; using namespace std; typedef pair<int, int> pii; typedef long long ll; const int N = 1e5+5; int a[N] = {}; int n, m, k; int lft = 0, rgt = n; const int S = 3e6+5; ll cnt[S] = {}; ll ans = 0; inline void add(int i) { ans += cnt[a[i] ^ k]; +...
ALGO
0.999946
4.477853
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17: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": "01723a4bc270...
481d9750-5285-42cc-b121-9930260f04be
y-kamiya/contest
atcoder/typical90/026/Main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define REPR(i,n) for(int i=n;i>=0;i--) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define FORR(i,a,b) for(int i=(a);i>=(b);--i) #define ALL(x) (x).begin(),(x).end() #define UNIQUE(v) v.eras...
ALGO
0.999982
4.249656
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2014-03-14T11:06: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": "dd4225fb...
4f399d96-e31e-4583-aa80-79fe69f953d2
KSI7/CodeChef
JULY20B/PTMSSNG.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define w(x) int x; cin>>x; while(x--) #define ll long long int #define fo(i,k,n,type) for(type i = k ; k < n ? i < n : i > n ; k < n ? i++ : i--) #define deb(x) ...
ALGO
0.999935
3.065136
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-06-24T13:39: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": "6b37070cb...
e02a4e09-7d8b-4056-b14d-8dfce15b9911
bvquoc/CP-Trainning-2021
0 - Contest 2020/VNOI Online 2021/z-Contestants/GL-12 Nguyen Phuc Tan/DECOR.cpp
#include<bits/stdc++.h> using namespace std; #define f(a, b, c) for(int a = (b), _c = (c); a <= _c; ++a) #define fr(a, b, c) for(int a = (b), _c = (c); a >= _c; --a) #define ff first #define ss second #define ld long double #define ll long long #define vt vector // \|/ (__) #define pb ...
ALGO
0.999901
3.810807
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2020-06-03T07:47:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2524700...
922ca2e6-1231-423a-bfe1-89c67f007ffb
arpituppal/competitive-programming-codes
spoj/MAX_NUM.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <queue> #include <algorithm> #include <vector> #include <cstring> #include <stack> #include <cctype> #include <utility> #include <map> #include <string> #include <climits> #include <set> #include <sstream> #include <utility> #include <ct...
ALGO
0.999775
3.362405
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2017-09-24T13:53: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": "575fdbe9e...
0ef6cffe-ff5f-4dae-8913-8d64e3104695
hafikarhankamac/seminar_multicore
abalone/abalone_tournament/search-ab-sorted.cpp
/** * Very simple example strategy: * Search all possible positions reachable via one move, * and return the move leading to best position * * (c) 2006, <NAME> */ #include <stdio.h> #include "search.h" #include "board.h" #include "eval.h" #include <vector> #include <algorithm> #include <tuple> #include <iostream>...
ALGO
0.999861
6.0701
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2022-12-15T07: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": "308a3f4ca...
89b054f0-2469-4e67-8026-614a9036d8d0
egekabas/Competitive-Programming-Solutions
codeforces/egekabas/normal/1467/E.cpp
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define ff first #define ss second #define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair<ll, ll> pll; typedef pair<ull, ull> pull; typedef pair<int, int> pii...
ALGO
0.998736
3.999383
{ "github_metadata": { "branch": "main", "commit_count": 204, "repo_created_at": "2023-06-19T10:43: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": "3d934319e6...
eb5ed6d4-e60a-4e65-850e-6a29ea015bd7
ywoo121/1D1A
백준/Silver/11403. 경로 찾기/경로 찾기.cc
#include <iostream> using namespace std; int adj[101][101]; int n; // 플로이드 워셜 알고리즘 void floyd_warshall() { for (int k = 0; k < n; k++) for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) if (adj[i][k] == true && adj[k][j] == true) adj[i][j] = true; } int main() { ios::...
ALGO
0.999988
4.911399
{ "github_metadata": { "branch": "main", "commit_count": 203, "repo_created_at": "2025-01-21T00:13: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": "450fdab722...
10c6a7b7-0a20-43fa-adfa-cc6cd12c0d20
rohitkotha10/CC
codeforces/1794C.cpp
/* author: rohitkotha10 created: 05.03.2023 00:10:12 */ #include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0) #define int long long const int MAX = 2e5 + 5; const int MOD = 1e9 + 7; int binSearch(vector<int>& arr, int val, int start, int end) { ...
ALGO
0.999967
4.796995
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-12-23T23:59: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": "eae6ea2b14a...
02343199-cea3-4a01-8649-d48652643f06
m1ha1lrusu/ads_praktikum_4
Graphsearch.h
#pragma once #include "EdgeWeightedDigraph.h" #include "EdgeWeightedGraph.h" #include <iostream> namespace Graphsearch { /** * Fuehrt eine rekursive Tiefensuche im Graphen G, * ab dem Knoten v aus und markiert alle besuchten * Knoten in marked. * Alle besuchten Knoten werden ausgege...
ALGO
0.997728
5.564126
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-24T21:42: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": "7a04326c6d24...
cdada8ba-d317-456a-a63a-2b8e3cd24f89
IgnAMS/ICPC
Ejercicios/Codeforces/979 div2/C.cpp
#pragma GCC optimize("Ofast") #include<bits/stdc++.h> using namespace std; #define repx(i,a,b) for(int i=a; i<b; i++) #define rep(i,n) repx(i,0,n) typedef long long ll; typedef pair<ll, ll> pll; typedef double db; typedef vector<ll> vl; #define ff first #define ss second #define pb push_back // g++ -std=c++11 A.cpp -o ...
ALGO
0.999843
3.986224
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2021-05-19T20:12:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c88465ac...
33b6922f-36fd-42a7-8ce0-633f02df7f5f
MervinLuoLuo/Programming-Competition
CodeForces/Codeforces Round 943 (Div. 3)/A.cpp
#include<bits/stdc++.h> #define endl '\n' #define int long long using namespace std; const int INF = 1e17; const int maxn = 1e7; int gcd(int a, int b){ if(a < b)swap(a, b); if(b == 0) return a; return gcd(b, a % b); } signed main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); int t;cin >> t; ...
ALGO
0.999956
4.044971
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2025-05-30T06:02: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": "8092b6bf4...
b46144ac-48b7-432d-b1c2-ace07faa51b6
Julian-Reguera/MARP1
Ej_19/Ej_19.cpp
//<NAME> #include <iostream> #include <vector> #include <fstream> #include "ConjuntosDisjuntos.h" using namespace std; const int direcciones[8][2] = { {1,-1},{1,0},{1,1},{0,-1},{0,1},{-1,-1},{-1,0},{-1,1} }; void conexiones(int ancho, int alto, const vector<vector<char>>& tablero, ConjuntosDisjuntos& cd,int x, int...
ALGO
0.999686
4.469173
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-06-10T07:27: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": "88eae08a3d81...
4d46e551-b340-470d-809a-b42c2c4fda8b
gbuenoandrade/Manual-da-Sarrada
drazy/lazyseg.cpp
#include <bits/stdc++.h> using namespace std; #define DEBUG_ON 1 #define INF 0x3f3f3f3f #define NSYNC ios::sync_with_stdio(false) #define FOR(i,a,b) for(int i=(a); i<(b); ++i) #define FOR0(i,b) for(int i=0; i<(b); ++i) #define TRAV(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define RTRAV(it,...
ALGO
0.999836
4.074774
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2016-11-04T18:29: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": "143828a7c...
44559ea4-85d8-4356-b2e1-a6f529da74e3
anonymousz97/SPOJ_PTIT
P165PROF-src.cpp
#include <bits/stdc++.h> #define ll long long #define FOR(i, a, b) for (ll i = a; i <= b; i++) #define FORD(i, a, b) for (ll i = a; i >= b; i--) #define FILEIN freopen("in.txt", "r", stdin) using namespace std; const ll MAX = 1e6 + 10; ll f[MAX], a[MAX], ia[MAX], res, n; void Process(){ memset(f, 0, sizeof(f)); so...
ALGO
0.999973
3.215511
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-05-25T11:13:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0f536417...
31881755-0712-4046-8251-8f5614bab5d9
lnishan/Competitive-Programming_Solutions
Codeforces/570C.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <set> #include <map> using namespace std; map<int, int> s; char t[300005]; inline int get_cnt(int n) { return n ? n - 1 : 0; } int main() { int i, j, n, q; int cnt = 0; int pos; char ch; int...
ALGO
0.999484
3.610909
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2015-03-20T05:48:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "521f45cb...
ab3c5724-90d1-4362-ba44-26e542a00335
Arpit-AD/CrackYourPlacement
Day_33/partition_into_k_subsets.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /*You are required to complete this method */ class Solution{ public: bool recursion(int a[], int n, int k, int i, int sum, int target, int ele){ if(ele == n && k == 0) return true; bool pos...
ALGO
0.999597
5.845113
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-07-15T15:57: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": "7e7b42fdfa0...
66a7aaa9-bad4-4adb-b980-a93c0133858d
dhruvkumaragrawal85/advent_of_code_2024
day_19/main.cpp
#include <iostream> #include <string> #include <fstream> #include <bits/stdc++.h> using namespace std; typedef long long ll; void get_chunks(set<string> &chunks, string line) { stringstream ss(line); while (ss.good()) { string substr; getline(ss, substr, ','); reverse(substr.begin(),...
ALGO
0.999923
4.09682
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-12-06T06:40:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2faa2be4d253...
f4e74f4f-63ba-4c08-a8b4-ef80aee246b9
karlsolomon/interviewPrep
sources/transform/replace.cpp
std::vector<int> numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; // Using std::replace to replace all occurrences of 5 with 50 std::replace(numbers.begin(), numbers.end(), 5, 50); // Result: numbers = {1, 2, 3, 4, 50, 6, 7, 8, 9, 10} // Using std::replace_if to replace all even numbers with 0 std::replace_if(numbers.begin...
ALGO
0.991828
6.498415
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-02T21:03: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": "d2c855548a5b...
234b8403-833e-4321-838f-5ab1a90be600
suhaneeAhirwar/abc
assi8.cpp
#include <iostream> #include <cstring> using namespace std; class Node { public: char name[50]; Node* next; Node(const char* friendName) { strcpy(name, friendName); next = nullptr; } }; class FriendList { Node* head; public: FriendList() { head = nullptr; } /...
TOOL
0.907395
5.873714
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-09-13T09:50: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": "0a04bc35d833...
54bff143-984f-4d6b-b19b-f5b6d1eed064
nevikw39/oj
CSES/2417_counting_coprime_pairs.cpp
/** _ _ _____ ___ * _ __ _____ _(_) | ____ _|___ // _ \ * | '_ \ / _ \ \ / / | |/ /\ \ /\ / / |_ \ (_) | * | | | | __/\ V /| | < \ V V / ___) \__, | * |_| |_|\___| \_/ |_|_|\_\ \_/\_/ |____/ /_/ **/ #include <bits/extc++.h> #ifndef nevikw39 #define nevikw39 cin.tie(nu...
ALGO
0.999948
4.527206
{ "github_metadata": { "branch": "master", "commit_count": 2018, "repo_created_at": "2020-02-22T14:59:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a0609...
2ff6bf4e-8206-4f7e-91e5-54ae54867954
Jared-Senerchia/C_Projects2
Node.cpp
// <NAME>, <NAME>, <NAME> #include"Node.h" #include<iostream> using namespace std; Node::Node() { nextPtr = NULL; headptr = NULL; } int Node::getData() const { return data; } void Node::setData(int d) { data = d; } Node* Node::getNodePtr() const { return nextPtr; } void Node::setNodePtr(Node* n) { nextPtr = n; }...
ALGO
0.994981
3.824722
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-08T20:13: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": "fff4727229...
efc0c2b7-49b1-494d-9d09-2a4191ce2a7c
ASSERT-KTH/Supersonic
predictions/submissions-aizu-coop-gpt4/Codenet/p01725/332351906/response_8.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; string S; int p; map<char, int> ch; vector<ll> nums; ll bnf(); ll res; ll getNum() { ll res = 0; while (isdigit(S[p])) { res = res * 10 + S[p++] - '0'; } nums.push_back(res); return nums.back(); } ll get(ll &a, ll b, char c) { if (c ...
ALGO
0.999989
4.050474
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-02-03T10:33:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5251da2fc8f7...
6e0e1856-c5ae-4298-b583-2494de904046
gitrider/wxsj2
EngineSDK/ThirdParty/VSInclude/cgal/CGAL/Regular_grid_2.h
// Copyright (c) 2005 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under // the terms of the Q Public License version 1.0. // See the file LICENSE.QPL distributed with CGAL. // // Licensees holding a valid commercial license may use th...
ALGO
0.957692
6.156379
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-08-26T14:38:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27276450b...
d204a964-b619-466b-b450-01e4760b91a6
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/12/64/1.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #...
ALGO
0.999981
4.491664
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1dcb01d9...
2dec8ed7-cf49-49c3-847e-dae2e898131b
kcgenesis/dsa-projects
graph-algorithm/heap.cpp
#include "heap.h" #include "hash.h" #include <math.h> #include <cstring> #include <cstdlib> #include <climits> using namespace std; /* <NAME> Binary Heap 12.2.15 This is a binary heap data structure which uses a hash table to implement quick node lookup for editing and removal. */ heap::heap(int capacity) { ...
ALGO
0.991213
4.641562
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-03-18T01:03:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00c9c690b4...
25ac5991-d5b2-4a61-84d6-d576a630946c
danielkstefanov/FMI-Data-structures-and-algorithms
final_exam_preparation/final_exam_preparation/searching_algorithms.cpp
#include <iostream> #include <vector> #include <utility> #include <algorithm> #include <unordered_set> #include <unordered_map> // Searching algorithms // // Linear seacrh - O(n) check every element // // Binary search - work with sorted data. Check in the middle. If the element you are searching // for is smaller ...
ALGO
0.999956
5.313218
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-10-11T06:50: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": "84801531589...
75b053d2-702d-4c3a-b905-8d3fbf934128
Miguel235711/Competitive-Programming-3-Solutions-by-Miguel-Mu-oz-
Section 1.4/Real Life Easier/10528 - Major Scales/C++/main.cpp
#include<bits/stdc++.h> using namespace std; vector<string>chromatics={"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A","A#", "B"}; vector<int>increments={0,2,2,1,2,2,2,1}; vector<pair<string,set<string> > > scales; void generateScales(){ for(size_t i = 0 ; i < chromatics.size();i++){ auto scaleKey =...
ALGO
0.998694
4.201281
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-07-15T04:44: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": "0e9ae38ae3...
430c7248-6a8a-4283-b3b7-73d4c8e83953
zhaoxx/code
linked_list/102.cpp
#include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: bool hasCycle(ListNode *head) { // 空list无环 if (!head) { return false; } // 只有一个...
ALGO
0.999684
5.041626
{ "github_metadata": { "branch": "master", "commit_count": 142, "repo_created_at": "2017-11-17T12:41: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": "0b821f8e...
52bf83b2-cd1f-48c5-ba33-e542c4c20d0f
Tolgino/Air-Traffic-Control-Simulation
air_traffic_control.cpp
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <sys/time.h> #include <string> #include <iostream> #include <thread> #include <condition_variable> #include <mutex> #include <fstream> #include <sstream> #include <deque> #include <random> int s; int t; float p; int a; int n; std::mutex randomMutex; ...
ALGO
0.92699
4.527471
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-01-25T19:14: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": "b67945798ced...
e8628bee-d244-476f-b651-67d66b1eef2a
Harsaka/procon-library
antbook/hanten.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define REPR(i, n) for(int i = n - 1; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i <= n; i++) #define FORR(i, m, n) for(int i = m; i >= n; i--) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); u...
ALGO
0.999966
4.022573
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-04-13T09:38: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": "20f629ecd8...
fc17a723-58fe-4671-84ea-4ecd7ae5e994
georgyguryev/MARIE_2.0
src_assembly/+src_operator/src_PWX/singular/WS_EA/PSI_limits_ws_ea.cpp
#include "constants.h" #include "QUADRIC_WS_EA.h" using namespace Quadrilateral_EA; namespace Quadrilateral_EA { void PSI_limits_ws_ea ( int argument, double theta, double *psi_A, double *psi_B ) { double Psi_cos = atan( cos(theta) ); double Psi_sin = atan ( sin (theta) ); switch(argument) { ...
TOOL
0.980405
5.454623
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2021-07-08T21:25:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "607bb638c0...
c93ed156-7559-4192-8876-0a7b0d8dd7df
ishandutta2007/codeforces-m
marcin_smu/normal/1044/F.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; // gp_hash_table<int, int> mapka; using namespace std; #define PB push_back #define MP make_pair #define LL long long #define int LL #define FOR(i,a,b) for(int i = (a); i <= (b); i++) #define ...
ALGO
0.999577
3.720055
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72fc4a87ce87...
519071b3-e3f7-4938-b8c0-396a94334a84
Chiki1601/Hackerearth-Solutions
Codemonk/Level-1/Arrays & Strings/The Unlucky 13.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: void multiply(long long int a[][2], long long int b[][2]) { long long int c[2][2] = {{0}}; for(int i = 0; i < 2; i++) { for(int j = 0; j < 2; j++) { ...
ALGO
0.999972
4.570885
{ "github_metadata": { "branch": "main", "commit_count": 1808, "repo_created_at": "2022-09-09T09:13:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "32ecd4ff...
cd86bdd9-7311-4cbf-95d1-89389b0f6cf1
KeertanaGupta/dsa
Arrays/insertAtStart.cpp
// #include<iostream> // using namespace std; // int main(){ // int arr[5],pos,num; // cin>>pos>>num; // for(int i=0;i<pos;i++){ // cin>>arr[i]; // arr[i+1] = arr[i]; // } // arr[pos] = num; // for(int i=0;i<pos;i++){ // cout<<arr[i]<<" "; // } // return 0; // } #...
ALGO
0.999928
5.224254
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2024-11-20T10:24: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": "7c3068e7635...
6d1b9145-cfae-45d6-baaa-4e6a47a76d4f
AlexLee1999/Leetcode-Practice
algorithm/C++/2007-Find_Original_Array_From_Doubled_Array.cpp
class Solution { public: vector<int> findOriginalArray(vector<int>& changed) { unordered_map<int, int> myMap; for (int i=0; i<changed.size(); ++i) { myMap[changed[i]] ++; } int target = changed.size() / 2; if (changed.size() % 2 == 1) { return {}; ...
ALGO
0.999984
5.275912
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2021-01-21T02:44:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97ef9cd735...
d15b4a24-63be-4ae4-ad7b-a9066b0f8d59
hoaghiepp/SPOJ_PTIT
BCMATHP.cpp
#include <bits/stdc++.h> using namespace std;   int value(int a) { switch (a) { case 0: case 4: case 7: return 1; case 1: case 8: return 2; case 5: return 3; case 2: return 4; case 9: return...
ALGO
0.999746
3.631438
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-01-10T10:35: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": "bf6fed6601a5...
51565cba-1952-4d25-8290-c09218c51d87
finger563/unreal-space-program
Plugins/JSBSimFlightDynamicsModel/Source/ThirdParty/JSBSim/Include/initialization/FGSimplexTrim.h
/* * FGSimplexTrim.h * Copyright (C) <NAME> 2010 <<EMAIL>> * * FGSimplexTrim.h 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 Foundation, either version 2 of the License, or * (at your option) any later ver...
ALGO
0.997198
6.133747
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-08-02T15:27:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13add7ea8a...
f4ed18c4-60c5-4530-94bf-06f55cb23eda
ndina/acm
acm/acmp.ru/125.cpp
#include <bits/stdc++.h> using namespace std; #define se second #define sz size() #define mp make_pair #define pb push_back #define int long #define endl '\n' #define faster ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) const double PI = acos(-1.0); const int inf = int(1e9) + 7; int binpow(int a, int n){ i...
ALGO
0.999931
3.747533
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-10-02T19:38:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71235a7d...
94883bb5-3b9e-42b2-af1d-faeb6e756ba9
vaibhavangi3/gitcode
ll.cpp
#include<iostream> using namespace std; struct node{ int data; node* next; }*head; void createlist(int n); void printlist(int n); int main() { int n; cout<<"Enter the no. of nodes"<<endl; cin>>n; createlist(n); cout<<"Created list is"<<endl; printlist(n); } void createlist(int n) { i...
ALGO
0.995659
3.528263
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-04-28T16:25:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74dafcc7fa...
fe16eda3-7877-47e9-94aa-a9a82d0c67bd
tzupengwang/PECaveros
contest/WorldFinals/2009/k.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; typedef long long LL; const int RR = 111; const int N = 222; const int L = 22; const LL INF = 1e16; int NR, tot; string S, T, X[RR], Y[RR]; vector<string> ss[L]; void adds(string s) { for (int i = 0; i < s.size(); ++i) { int tl = s.size...
ALGO
0.999908
4.000515
{ "github_metadata": { "branch": "master", "commit_count": 448, "repo_created_at": "2014-08-20T16:02:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 51, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5b9b20...
8672ea36-f41d-4355-8af2-768da1b3ef0a
labellerue/Algorithm-Study
mergeSort.cpp
#include <stdio.h> int number = 8; int sorted[8]; //정렬 배열은 반드시 전역 변수로 선언 void merge(int a[], int m, int middle, int n){ //m:시작 middle:중간(비교군그룹 사이) n:끝 int i=m; int j=middle+1; int k=m; //작은 순서대로 배열에 삽입 while(i <= middle && j <= n){ if(a[i] <= a[j]){ sorted[k] = a[i]; i++; }else{ sorted[k] = a[j]...
ALGO
0.999997
4.845828
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2019-12-10T05:39:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08032b203...
9f4881e0-9afb-42e2-824e-f82b2f7a1fd8
HEltim7/cpcode
CF/Round/872/B_1_LuoTianyi_and_the_Floating_Islands_Easy_Version.cpp
#include <algorithm> #include <array> #include <cassert> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; // #define ONLINE_JUDGE #ifndef ONLINE_JUDGE #include <heltim7/debug> #else #define debug(...) 7 #endif #define endl '\...
ALGO
0.999845
4.62672
{ "github_metadata": { "branch": "master", "commit_count": 249, "repo_created_at": "2022-06-06T13:55: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": "1376db5b...
0129c3b4-8f4d-42f7-b9c3-0e7f480a3ae5
henviso/contests
CODECHEF/Short/SET15/c.cpp
#include <iostream> #include <cstdio> #include <string> #include <cstring> #include <cstdlib> #include <stack> #include <algorithm> #include <cctype> #include <vector> #include <queue> #include <tr1/unordered_map> #include <cmath> #include <map> #include <bitset> #include <set> #include <iomanip> #include <utility> ...
ALGO
0.999899
3.176615
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-05-11T23:38: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": "fae973d6a0...
409105b6-9d95-458b-9f36-e538911a3f94
MahmoudGoda2003/problem-solving
codeforces/1851/C.cpp
#include <iostream> #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> #define ll long long #define ull unsigned long l...
ALGO
0.99999
4.421175
{ "github_metadata": { "branch": "master", "commit_count": 450, "repo_created_at": "2023-09-12T20:01:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05ff660a...
17c3a239-da58-4e0f-b57f-2a6eff13dfc6
adityagupta1089/Codeforces-Solutions
solved/P631B.cpp
#ifndef ONLINE_JUDGE #define DEBUG 1 #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #else #define DEBUG 0 #include <bits/stdc++.h> #endif using namespace std; typedef int64_t ll; typedef pair<int, int> pii; ...
ALGO
0.99999
3.602091
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2016-07-03T11:49:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "159efdac...
561e72f8-9021-4649-85b1-911f6a6c42f9
JonnathanVituriano/trabalhoWallace
thiago-c.cpp
#include <stdio.h> #include <locale.h> int obterQuantidadeJogadores() { setlocale(LC_ALL, "Portuguese"); int quantidadeJogadores; do { printf("Digite a quantidade de jogadores (entre 1 e 4): "); scanf("%d", &quantidadeJogadores); if (quantidadeJogadores < 1 || quantidadeJogadores ...
ALGO
0.910782
4.653618
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-11-16T00:23: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": "98ac1c570c7...
8d458657-32ee-4b9c-9edf-cadb0c63aee6
ExamCodes/ADS
binomial_heap.cpp
#include <iostream> #include <climits> using namespace std; struct BinomialHeapNode { int key; int degree; BinomialHeapNode* parent; BinomialHeapNode* child; BinomialHeapNode* sibling; }; BinomialHeapNode* createNode(int key) { BinomialHeapNode* node = new BinomialH...
ALGO
0.999977
5.34322
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-11-12T17:30: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": "a41ef4a76c0d...
fac1d8b6-bfc4-4b14-8c0f-db3dd9e5c696
Jafrin-khan/Practice
0109-convert-sorted-list-to-binary-search-tree/0109-convert-sorted-list-to-binary-search-tree.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) {} * }; */ /** * Definition for a binary tree node. * struc...
ALGO
0.999998
6.516901
{ "github_metadata": { "branch": "main", "commit_count": 4337, "repo_created_at": "2022-06-22T15:25: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": "29ed7628c...
74b965e9-100b-414d-a3b8-b8dc1e02e97a
jesperkristiansson/aoc2024
25/one.cc
#include <iostream> #include <string> #include <sstream> #include <climits> #include <algorithm> #include <vector> #include <set> #include <map> #include <limits> #include <utility> #include <cctype> #include <cstring> #include "readInput.hpp" using namespace std; constexpr int WIDTH = 5; constexpr int height = 7; u...
ALGO
0.998857
4.639195
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-12-15T13:09: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": "b808c09d602...
4cb5768a-3a56-4484-ae35-57638799fb66
kamyu104/LeetCode-Solutions
C++/read-n-characters-given-read4-ii-call-multiple-times.cpp
// Time: O(n) // Space: O(1) // Forward declaration of the read4 API. int read4(char *buf); // shorter version of Solution2 class Solution { public: /** * @param buf Destination buffer * @param n Maximum number of characters to read * @return The number of characters read */ int read...
ALGO
0.991792
6.179966
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...