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
4caf55a2-fa84-483d-a809-057abf3d7d1e
Kunalsabadra/Striver-SDE-Sheet
04-Recursion.cpp/57-SodokuSolve.cpp
//Using Recursion and Backtracking // Time Complexity: O(9(n ^ 2)), in the worst case, for each cell in the n2 board, we have 9 possible numbers. // Space Complexity: O(1), since we are refilling the given board itself, there is no extra space required, so constant space complexity. bool isValid(int matrix[9][9] , ...
ALGO
0.999623
5.854545
{ "github_metadata": { "branch": "main", "commit_count": 216, "repo_created_at": "2023-06-04T10:26: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": "e70fef9dcf...
02c2b9a1-3f54-498b-b187-0ded950064a8
ishandutta2007/codeforces-p
piyushsethia1999/normal/1229/B.cpp
#include <bits/stdc++.h> #define pb push_back #define fi first #define se second #define int long long #ifndef print #define print(...) #endif using namespace std; mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count()); int rng(int l) { uniform_int_distribution<int> uid(0, l - 1); return uid(r...
ALGO
0.999889
4.30502
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49: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": "e5373475dbc7...
bd647430-8e9d-4d74-bf38-641a37172dd7
EganChin/PAT-Advanced-Level
Math/1023 Have Fun with Numbers (20).cpp
/* 1023 Have Fun with Numbers (20 分) Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number consisting exactly the numbers from 1 to 9, only in a different permutation. Check to ...
ALGO
0.999963
4.516649
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2018-07-15T13:33:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09cb79a42...
e9fc4a54-bc97-4b49-a3d5-1777efb3465c
Saurav-Paul/Strivers-sde-sheet
(Day-7)Trapping rainwater.cpp
//https://leetcode.com/problems/trapping-rain-water/ class Solution { public: int trap(vector<int>& height) { int n = height.size() ; vector<int> bounderies(n, 0) ; int temp = 0 ; for(int i = 0; i < n ; i++){ if(height[i] > temp) { temp = height[i...
ALGO
0.999994
6.654895
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2022-07-26T19:52: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": "dc7e744b25...
2c397bcb-a320-4d62-a8dd-264765a32238
cat538/SDU-2022-CryptoProject
merkle-tree/merkle-impl/merkle-tree-impl-cpp/src/merkle_tree.cpp
#include "merkle_tree.h" merkle_leaf::merkle_leaf(uint32_t in) : value(in) { temp_stmp = std::chrono::system_clock::now(); uint32_t out_size = 32; EVP_Digest(&value, 4, hash_value.data(), &out_size, EVP_sha256(), NULL); } // merkle_leaf::merkle_leaf(merkle_leaf &in){ // hash_value = in.get_hash_value...
ALGO
0.984989
4.989484
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2022-05-13T11:55:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0008ee10a4...
98332a4f-d39b-4b10-a296-50d57981fe1d
CuriousGu/data_structures
trees/binary_tree/binary_tree.cpp
#include <iostream> using namespace std; class BinaryTree{ class Node{ public: int value; Node* left; Node* right; Node(int value): value(value), left(nullptr), right(nullptr) {} }; private: Node* root; unsigned int _size = 0; pub...
ALGO
0.999518
4.542414
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-05-10T00:13:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8c349a0f5af...
2e425190-e386-4653-b9b1-ab370527b2e6
123MRaahimRizwan/Complete-DSA-Placement-Course
Linked_Representation_Of_Binary_Tree.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int data) : data(data) {}; Node() {}; }; Node *createNode(int data) { Node *newNode = new Node(data); // Creating a new node and initializing the data newNode->left = NULL; // I...
ALGO
0.999653
5.917603
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2024-09-25T15:37: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": "e336ce213...
d6338fbc-da1d-40ba-9eb6-420728732d0e
matteotex91/CutPic
gradient_weight_voronoi/new/cpp_lib_test_3/voronoi.cpp
#include <cmath> // Per std::pow e std::sqrt #include <cstddef> // Per size_t #include <vector> // Per std::vector // compile command : // g++ -shared -o voronoi.so -fPIC voronoi.cpp // this method calculates the voronoi map given a certain number of vectors in the RGB space extern "C" void voronoi(const int* R,co...
ALGO
0.999512
5.263786
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-08-01T10:25: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": "9c49831ec2d...
2ba3566b-4c4a-4479-9d07-532130c978b7
Seann0425/LeetCode
finished/2511. Maximum Enemy Forts That Can Be Captured.cpp
#include <bits/stdc++.h> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) { } ListNode(int x) : val(x), next(nullptr) { } ListNode(int x, ListNode *next) : val(x), next(next) { } }; struct TreeNode { int val; TreeNode *left; ...
ALGO
0.999576
4.918921
{ "github_metadata": { "branch": "main", "commit_count": 659, "repo_created_at": "2024-05-02T09:26: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": "56a47d22c7...
071b26fe-2ad6-4708-9be3-928e496d0ac8
heliolinx/heliolinx-aux
src/MCMC_arctrace01b.cpp
// February 24, 2025: MCMC_arctrace01b.cpp: Use an MCMC to fit // an orbit to input data in hldet format. Output RA, Dec, and // angular velocities rather than state vectors. // // Uses fitting based on arctrace01_6Dh.cpp, which is // like arctrace01_6D.cpp, but takes its input file in heliolinc hldet // format, and re...
ALGO
0.990529
4.040576
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-03-25T22:51:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3575e4112bf8...
435f1cea-bfbb-42f2-8212-bdecd8f6e3cb
harasees-singh/Competitive_Programming
cpp_is_lob/revising_syntax.cpp
#include<iostream> using namespace std; int ans_arr[int(1e5)]; void square(int* arr, int n) { int i = 0; while(n--) { arr[i] = arr[i]+arr[i]; i++; } } int homie(int* arr, int n) { int j = 0, previous_number = 0; int next_number; int i = 0; int current = 0; ...
ALGO
0.99995
3.620247
{ "github_metadata": { "branch": "main", "commit_count": 326, "repo_created_at": "2021-02-07T16:25:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d605f11d1...
1f9c68cb-89be-4245-b825-d09f039f37e2
mquang279/DSA
03. Lower_bound Upper_bound/demsocap.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll a[1000001]; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL); int n, k; cin >> n >> k; for (int i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); ll cnt = 0; for (int i = 0; i < n; i++){ ...
ALGO
0.999968
4.53892
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2024-07-10T08:36: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": "35b01b8c3...
9b8aff00-f5df-4bd0-a0a4-eda4e44a3885
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/ai_code/train/0_0_8346.cpp
#include <iostream> #include <vector> using namespace std; vector<int> sieve(int n) { vector<int> is_prime(n + 1, true); is_prime[0] = is_prime[1] = false; for (int i = 2; i * i <= n; i++) { if (is_prime[i]) { for (int j = i * i; j <= n; j += i) { is_prime[j] = false; ...
ALGO
0.999869
5.00137
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-04-28T03:59: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": "fd0efa7f625...
29a40437-9473-4c09-b599-ea2820235ec9
hatopoppoK3/AtCoder-Practice
Hitachi/2020/B.cpp
#include <bits/stdc++.h> using ll = long long int; using namespace std; int main() { int a, b, M, minA = 100000000, minB = 100000000; cin >> a >> b >> M; vector<int> A(a, 0), B(b, 0); for (int i = 0; i < a; i++) { cin >> A[i]; minA = min(minA, A[i]); } for (int i = 0; i < b;...
ALGO
0.999991
3.948898
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2019-05-01T13:52: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": "9ad18449...
3874fe16-a2e7-474b-acdb-bc55c4c7615c
trilinos/Trilinos
packages/rol/src/algorithm/TypeE/ROL_TypeE_CompositeStepAlgorithm_Def.hpp
// @HEADER // ***************************************************************************** // Rapid Optimization Library (ROL) Package // // Copyright 2014 NTESS and the ROL contributors. // SPDX-License-Identifier: BSD-3-Clause // *************************************************************************...
ALGO
0.99972
5.754661
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
28955cf4-fdd8-48b5-ae0a-7b73ea5a789c
ahao214/Algorithm
Ahao.LeetCodeCPP/10. 正则表达式匹配.cpp
using namespace std; #include<string> #include<vector> class Solution { /* 10. 正则表达式匹配 给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。 '.' 匹配任意单个字符 '*' 匹配零个或多个前面的那一个元素 所谓匹配,是要涵盖整个字符串s的,而不是部分字符串。 */ public: bool isMatch(string s, string p) { int n = s.length(), m = p.length(); s = ' ' + s, p = ' ' + p; ...
ALGO
0.99885
4.27378
{ "github_metadata": { "branch": "master", "commit_count": 4359, "repo_created_at": "2020-09-14T10:24: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": "6ccaa4a...
f48fc075-7777-4255-b1c0-2ff168b8cb66
myunbin/PS
BOJ/13711.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast") #pragma GCC target("fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") #pragma GCC optimize("unroll-loops") #define fileio() freopen("input.txt","r",stdin); freopen("output.txt","w",stdout) #define fio() ios_base::sync_with_std...
ALGO
0.999959
3.677759
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2022-05-06T06:26:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54976c13c...
8ea4e6fe-0c3c-4bf0-b4c2-e49e7d639edf
AbhilashaBansal/problemSolving_cpp
Graphs/monsters_cses.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pii pair<int,int> #define piii pair <int, pair<int,int>> int dx[] = {0, 0, 1, -1}; int dy[] = {1, -1, 0, 0}; bool isBoundary(int x, int y, int n, int m){ if(x==0 || x==n-1 || y==0 || y==m-1) return true; return false; } string ...
ALGO
0.999877
3.958158
{ "github_metadata": { "branch": "main", "commit_count": 107, "repo_created_at": "2020-12-23T16:19:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04d8bd5ef9...
ae873d0b-7a1b-4f69-b7da-2d919edc38c4
iamAbhi1992/SCALER_JULY_2024
15 DSA: Maths: Prime Numbers/Pairs with given sum II.cpp
// https://www.scaler.com/academy/mentee-dashboard/class/297921/assignment/problems/5097?navref=cl_tt_nv // Problem Description // Given a sorted array of integers (not necessarily distinct) A and an integer B, find and return how many pair of integers ( A[i], A[j] ) such that i != j have sum equal to B. // Since th...
ALGO
0.999882
5.266333
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-12-30T09:13: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": "40d12909652d...
a55d4127-9866-4411-a8bb-a467cf2fe61c
zhsl/OJSolutions
POJ/1981/11789808_AC_750MS_212K.cpp
#include <functional> #include <algorithm> #include <iostream> //#include <ext/rope> #include <fstream> #include <sstream> #include <iomanip> #include <numeric> #include <cstring> #include <cassert> #include <cstdio> #include <string> #include <vector> #include <bitset> #include <queue> #include <stack> #include <cmath...
ALGO
0.999799
3.957868
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2016-12-11T11:00: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": "025d7652b...
1f12241a-a912-47e9-ba31-0cf3b3587f2f
zkxshg/Test_of_LeetCode
1000-2000/1255_Maximum_Score_Words_Formed_by_Letters.cpp
// https://leetcode.com/problems/maximum-score-words-formed-by-letters/?envType=daily-question&envId=2024-05-24 // Bit mask class Solution { public: int maxScoreWords(vector<string>& words, vector<char>& letters, vector<int>& score) { int n = words.size(); vector<int> letterFreq(26, 0); // 储存lette...
ALGO
0.999702
6.234426
{ "github_metadata": { "branch": "master", "commit_count": 275, "repo_created_at": "2019-12-27T05:36:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d17f7e0...
3e199f35-f2a8-48b1-b04b-cb46783469c2
JosephNalkara/data-structure
practice/Lab Cycle:1/LabCycle1-5CLL.cpp
#include "LabCycle1-5CLL.h" template<typename T> CircularLinkedList<T>::CircularLinkedList() : head(nullptr) {} template<typename T> CircularLinkedList<T>::~CircularLinkedList() { if (head != nullptr) { Node* temp = head->q; while (temp != head) { Node* q = temp->q; delete ...
ALGO
0.995882
4.891047
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2024-01-25T10:14:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d49c476f9a...
ea86c515-72ac-4ea2-8171-6e34dc33e702
brianrtaylor/cvos
mex/pd_wrapper.cpp
#include <math.h> #include <matrix.h> #include <mex.h> #include <cstdlib> #include <cstdio> #include <cstring> #include <cmath> #include <vector> #include "../cpp/solver_primaldual.h" #include "../cpp/bcv_diff_ops.h" #include "../cpp/sparse_op.h" #include "../cpp/utils.h" #define throw_error(x) mexPrintf("'%s' does no...
ALGO
0.994137
5.269447
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2015-08-20T23:35:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 6, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "d3d6a8e62...
fd542ce5-87e6-4dad-9194-0508916e136b
akarshjoice/Competitive-Coding
Hashing/Print Non-Repeated Elements.cpp
// Question: /* Hashing is very useful to keep track of the frequency of the elements in a list. You are given an array of integers. You need to print the non-repeated elements as they appear in the array. Example 1: Input: n = 10 arr[] = {1,1,2,2,3,3,4,5,6,7} Output: 4 5 6 7 Explanation: 4, 5, 6 and 7 are the only ...
ALGO
0.999672
5.736423
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-01-18T23:10: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": "c21fccf553e...
6fd4db8b-9a91-4d97-ab25-5b7dbb2565f6
rjenez/W266-final-project
data/programming-homework-dataset-plagiarism-detection/src/B2016/Z1/Z2/student8599.cpp
//B 2016/2017, Zadaća 1, Zadatak 2 #include <iostream> #include <vector> #include <iomanip> #include <stdexcept> typedef std::vector<std::vector<double>> Matrica; void IspisiMatricu(Matrica m) { for(int i=0; i<m.size(); i++){ for(int j=0; j<m[i].size(); j++) std::cout << std::setw(4) << m[i][j]; std::cout <...
ALGO
0.992603
5.037123
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T00:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "53d1a87abf...
31b2d561-f4cc-43ee-a38e-a70524f4b25e
ankit-pn/CSES
Sum_of_Three_Values.cpp
#include <bits/stdc++.h> using namespace std; #define fastio() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define MOD 1000000007 #define MOD1 998244353 #define INF 1e18 #define nline "\n" #define pb push_back #define ppb pop_back #define m...
ALGO
0.999995
4.107893
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2022-01-28T07:25: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": "3e9986c1bd...
bfab699c-df91-42c5-8baa-eb54160e165c
berkeley-abc/abc
src/sat/cadical/cadical_deduplicate.cpp
#include "global.h" #include "internal.hpp" ABC_NAMESPACE_IMPL_START namespace CaDiCaL { // Equivalent literal substitution in 'decompose' and shrinking in 'subsume' // or 'vivify' might produce duplicated binary clauses. They can not be // found in 'subsume' nor 'vivify' since we explicitly do not consider // bin...
ALGO
0.998956
7.089725
{ "github_metadata": { "branch": "master", "commit_count": 5857, "repo_created_at": "2018-03-11T11:33:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1016, "forks": 642, "issues": 162, "pull_requests": 31 }, "file_meta": { "content_id": "...
d2c012ee-9255-4ca7-872d-0062417e30fc
NekoPii/Csource
1017RESCUE/1017RESCUE/源.cpp
#include<cstdio> #include<iostream> #include<stdlib.h> #include<queue> void BFS(); using namespace std; int n; double a[1001][1001] = { 0 }; struct Node { int x; int y; double time; }start; int dir[4][2] = { { -1, 0 }, { 1, 0 }, { 0, 1 }, { 0, -1 } };//上下左右 //广度优先搜索 int main() { while (1) { memset(a, 0, size...
ALGO
0.99953
3.401652
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-03T11:19:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5eecd26642...
90cb7150-9461-41e1-a7d9-c31e55284906
rikuTanide/atcoder_endeavor
joi2011yo/joi2011yo_e.cpp
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> //namespace mp = boost::multiprecision; //#include "atcoder/all" using namespace std; const double PI = 3.14159265358979323846; typedef long long ll; const double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef pair<ll, ll> P; ...
ALGO
0.999718
3.937827
{ "github_metadata": { "branch": "master", "commit_count": 4423, "repo_created_at": "2020-12-05T04:36: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": "d83831a...
75ab4f54-69e2-4710-8010-317b3f93b9ed
nicholaslocascio/6865
pset08/asst/homography.cpp
#include "homography.h" #include "matrix.h" using namespace std; // PS06: apply homography void applyhomography(const Image &source, Image &out, Matrix &H, bool bilinear) { int width = out.width(); int height = out.height(); applyhomographyGeneral(source, out, H, bilinear, 0, width, 0, height); } // PS06: 6....
ALGO
0.998378
5.902804
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2015-02-05T18:23:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8e3cd2bd...
9c197e5d-d2f7-4f18-9d9a-5ade33d6168b
vsspasova13/DSA-FMI
dom5/Source.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <tuple> using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullp...
ALGO
0.999904
3.99663
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-12T13:49: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": "62517276b8e0...
d7aa1fcd-46b6-4342-9c47-eab3aba0363a
vineetsharma36/LeetCode
1261-find-elements-in-a-contaminated-binary-tree/1261-find-elements-in-a-contaminated-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.998793
6.12228
{ "github_metadata": { "branch": "main", "commit_count": 692, "repo_created_at": "2021-12-24T13:10:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3502f6dd80...
610d0888-9bba-442d-ac2c-6d550d39e92d
Atulp48/DSA_with_CPP
14_dynamic_programing/maximum are.cpp
class Solution { private: vector<int> fun1(int n, vector<int> arr) { stack<int> store; store.push(-1); vector<int> data(n); for (int j = n - 1; j >= 0; j--) { int flag = arr[j]; while (store.top() != -1 && arr[store.top()] >= flag) { ...
ALGO
0.999951
5.846241
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-10T12:46:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd9ed218dd4c...
5c4a7c61-8b62-4b19-b0f7-90ca8ee94d36
kgw4073/Problem-Solving
BOJ_17822_원판돌리기.cpp
#include <iostream> #include <cstring> #include <vector> using namespace std; //16 28 vector<int> graph[2551]; int value[2551]; bool visited[2551]; int n, m, t; void dfs(int cur, int target, int& cnt) { for (int next : graph[cur]) { if (!visited[next] && value[next] == target && value[next] != 0) { visited[ne...
ALGO
0.999941
3.726206
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2020-01-01T09:34: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": "7e697294d...
2bf55fd7-379c-4ffc-a35c-cbbd04287d29
simran1901/Problem-Solving
1714A-Everyone-Loves-to-Sleep.cpp
// Codeforces // Author: simranmakhijani55 // https://codeforces.com/contest/1714/problem/A #include <bits/stdc++.h> #define ll long long int #define repn(i, m, n) for (int i = m; i < n; i++) #define rep(i, n) repn(i, 0, n) using namespace std; void solve() { int n, h, m; cin >> n >> h >> m; int time = I...
ALGO
0.999782
4.13472
{ "github_metadata": { "branch": "main", "commit_count": 238, "repo_created_at": "2022-03-30T10:17: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": "d09389c0c6...
319cf3cc-350d-4e6a-b11d-81ba362b2f76
kutkarsh-2002/Daily-Coding-DS-Algo-Practice
98-validate-binary-search-tree/98-validate-binary-search-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.999939
5.922164
{ "github_metadata": { "branch": "main", "commit_count": 2594, "repo_created_at": "2021-05-11T07:39:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c7870e65...
f2a3d463-615b-4f54-acc3-7ff8c7d007c4
F-0728/atcoder
ABC/F/389F.cpp
#include <atcoder/all> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <set> #include <chrono> #include <bitset> using namespace std; using namespace atcoder; // using mint = modint1000000007; using mint = modint998244353; using ll = long long; using ld = long double; const ll inf = 1 <...
ALGO
0.999865
5.910469
{ "github_metadata": { "branch": "main", "commit_count": 708, "repo_created_at": "2024-04-09T10:20: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": "7c294fd16b...
b944ac54-100b-47d2-a6f3-218b336990fc
minseo08/problem_solving
searching(sorting)/2630.cpp
#include <iostream> using namespace std; int arr[130][130]; int b = 0; int w = 0; void func(int x, int y, int num){ int color = arr[x][y]; bool cut = false; for(int i = x; i < x + num; i++){ for(int j = y; j < y + num; j++){ if(arr[i][j] != color){ cut = true; ...
ALGO
0.999919
3.939758
{ "github_metadata": { "branch": "main", "commit_count": 192, "repo_created_at": "2024-07-14T05:41:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "473a227f3f...
5ffe4dd9-c1ae-4fb5-989d-e4dbb8d985f7
sandoval-i/competitive_programming
UVa/10394.cpp
#include <bits/stdc++.h> using namespace std; typedef vector < int > vi; typedef pair < int , int > ii; typedef pair < int , ii > iii; typedef vector < ii > vii; typedef long long ll; #define foi( i , k , n ) for( int i = k ; i < n ; i++ ) #define size size() #define pb push_back #define impar( i ) i & 1 #define par(...
ALGO
0.998837
3.399993
{ "github_metadata": { "branch": "master", "commit_count": 368, "repo_created_at": "2016-06-07T21:44:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5c5cc1fc...
84eec279-134f-4be5-b75e-65bf9b536ee6
greenEggLy/ChFS
src/include/rsm/raft/node.h
#pragma once #include <stdarg.h> #include <unistd.h> #include <algorithm> #include <atomic> #include <chrono> #include <ctime> #include <filesystem> #include <memory> #include <mutex> #include <thread> #include "block/manager.h" #include "librpc/client.h" #include "librpc/server.h" #include "rsm/raft/log.h" #include...
TOOL
0.929441
6.348754
{ "github_metadata": { "branch": "lab4", "commit_count": 48, "repo_created_at": "2023-10-26T06:56: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": "31bbf8fe97d...
a3979427-415d-409b-8d0c-83c842dc34ea
Albert-Hu/leetcode
solutions/201-250/207/solution.cpp
#include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; class Solution { public: bool canFinish(int numCourses, vector<vector<int>> &prerequisites) { map<int, set<int>> graph; set<int> visited; set<int> courses; function<bool(int)> hasCircle = [&](in...
ALGO
0.999969
5.965233
{ "github_metadata": { "branch": "master", "commit_count": 245, "repo_created_at": "2020-03-11T15:11: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": "1cb8f59e...
cdfa7efd-dc08-4683-bba9-d33cefe8613e
MATH-INFOGRAPHY-MH-AR/FIRST-TP
ConsoleApplication1/ConsoleApplication1/Polygon.cpp
/* Fichier : Polygon Date de création : 06/11/2014 Date de dernière modification : 04/02/2015 Auteur: <NAME> / <NAME> */ #include "include/Polygon.h" Polygon::Polygon() { mColor = new float[3]; mColor[0] = 1.0f; mColor[1] = 1.0f; mColor[2] = 1.0f; } Polygon::Polygon(const std::vector<Vector2> po...
ALGO
0.962215
4.211815
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2014-11-06T11:39:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2246609885...
77729f59-b839-4b1e-a898-170283142779
sandeepchitalkar/Data-Structres-and-Algorithms
ExpressionTree.cpp
#include <iostream> using namespace std; // Tree Node Definition class node { public: char val; node *left, *right; node() { this->left = NULL; this->right = NULL; } // Constructor Method node(char val) { this->val = val; this->left = NULL; this->r...
ALGO
0.999987
5.418865
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2022-11-04T09:22:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb767bd3f16...
9b212519-8c67-4bc0-b801-ce76dda543dc
art32fil/AandSD
Makhalichev_Nikita_lb1/Sources/Recursion.cpp
#include "../Headers/Recursion.h" Recursion::Recursion(){} bool Recursion::Run(string line, int position, int depth, bool showDepth){ isBrackets = false; if (showDepth) cout << string(depth,' ') << "Depth " << depth << " - joining" << endl; switch(line[position]){ case 'A': if (line.le...
ALGO
0.969706
4.09609
{ "github_metadata": { "branch": "master", "commit_count": 291, "repo_created_at": "2020-09-17T08:37:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 17, "issues": 0, "pull_requests": 15 }, "file_meta": { "content_id": "fd468b...
8961501a-cd53-4070-bdf8-abe47f782c67
Rennelovessleeping/LeetCode_Adventure
Design/341-FlattenNestedListIterator.cpp
/************************************************************************** * File Name : 341-FlattenNestedListIterator.cpp * * Purpose : * * Creation Date : 12-02-2017 * * Last Modified : Sun Feb 12 22:13:27 2017 * * Created By : <NAME> ************************************************************************...
ALGO
0.998708
6.169335
{ "github_metadata": { "branch": "master", "commit_count": 248, "repo_created_at": "2016-12-21T20:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1d2620f...
7aacd961-2f44-44e4-94e1-a7701960533c
JakeGraham/GRAHAM_DISSERTATION
JLib/Misc.h
#ifndef Misc_h #define Misc_h #include<vector> #include<iostream> #include<chrono> #include<stdint.h> #include<sstream> #include<istream> #include<cmath> #include<cstring> #include<algorithm> #include<iterator> #include<fstream> #include<iomanip> // reads txt file into vector<double> std::vector<double> ReadTxt(std...
TOOL
0.988831
4.8679
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-06-15T21:10: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": "aaf0ea516e...
a685ec44-91af-419f-97a7-0851a11bfa97
polybar/polybar
src/utils/string.cpp
#include "utils/string.hpp" #include <algorithm> #include <cassert> #include <iomanip> #include <sstream> #include <utility> POLYBAR_NS namespace string_util { /** * Prefixes for the leading byte in a UTF8 codepoint */ static constexpr uint8_t UTF8_LEADING1_PREFIX = 0b00000000; static constexpr uint8_t UTF8_LEADI...
TOOL
0.931828
6.409346
{ "github_metadata": { "branch": "master", "commit_count": 2327, "repo_created_at": "2016-05-19T14:16:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14767, "forks": 714, "issues": 150, "pull_requests": 71 }, "file_meta": { "content_id": ...
58a39a6b-d508-4b8c-8006-452f20e25403
tu-darmstadt-ros-pkg/sdf_contact_estimation
sdf_contact_estimation/src/sdf_contact_estimation.cpp
#include <sdf_contact_estimation/sdf_contact_estimation.h> #include <sdf_contact_estimation/util/timing.h> #include <sdf_contact_estimation/util/utils.h> #include <sdf_contact_estimation/visualisation.h> #include <sdf_contact_estimation/optimization/pose_optimizer.h> #include <ctime> #include <boost/filesystem.hpp> #i...
ALGO
0.998152
6.89023
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-08-25T13:04:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "760b072b18f...
eb3bd2ff-b232-4d1a-b47e-5d798ad02cfa
drfrag666/ZDoom-CL
src/colormatcher.cpp
/* ** colormatcher.cpp ** My attempt at a fast color matching system ** **--------------------------------------------------------------------------- ** Copyright 1998-2006 <NAME> ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided tha...
ALGO
0.998501
5.988888
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2017-03-21T10:42:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "58f995c49...
e9fb52d9-8d61-41aa-9101-1855a3e5b4ff
191884/DSA
Mastering Array/Largest subarray with equal number of 0s and 1s.cpp
#include<bits/stdc++.h> using namespace std; void findSubArray(int arr[], int n){ unordered_map<int, int> hM; int sum =0; int max_len= 0, ending_index = -1; for(int i =0; i< n; i++){ arr[i] = (arr[i] == 0)? -1: 1; } for(int i = 0; i< n; i++){ sum += arr[i]; if(sum == ...
ALGO
0.999899
4.240151
{ "github_metadata": { "branch": "main", "commit_count": 235, "repo_created_at": "2022-04-02T06:16:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4092e74452...
edf1bae6-ff2a-4431-bd98-cd249f0545ee
yyckdy/Vscode
letecode/191.位-1-的个数.cpp
/* * @lc app=leetcode.cn id=191 lang=cpp * * [191] 位1的个数 * * https://leetcode-cn.com/problems/number-of-1-bits/description/ * * algorithms * Easy (75.67%) * Likes: 466 * Dislikes: 0 * Total Accepted: 248.8K * Total Submissions: 328.4K * Testcase Example: '00000000000000000000000000001011' * * 编写一个...
ALGO
0.999287
6.17477
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2022-04-06T06:57:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe210d248e4...
425c9199-3616-4318-8566-78906d7a95ca
FoxSinOfGreed07/CP
Contests/Codechef/Contest/Starters 43 Div 2/Distinct Palindrome.cpp
#include <bits/stdc++.h> using namespace std; // A True Sin Is Something // You Can Never Atone For. #define FoxSinOfGreed ios::sync_with_stdio(false);cin.tie(NULL); #define int long long int #define endl "\n" void solve() { int n, k, temp = 0; cin>>n>>k; if(n&1){ if(k > (n+1)/2){ cout<<-1<<end...
ALGO
0.999868
4.374102
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-07-31T21:49: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": "9948a32832...
1b57f837-83c0-4f60-9f71-53bfff7b6750
njunhao/GKRRL
RL/mbrrl/external/examples/MDP/tiger_antelope.cpp
/* This file contains the code that is presented in the Tutorial.md * file in the main folder of this project. The tutorial can also * be viewed in the main page of the doxygen documentation. * * This code implements a problem where a tiger needs to plan * in order to catch an antelope in a NxN toroidal grid world...
ALGO
0.999984
5.234068
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-02-27T11:09:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd745fdc6...
254d4100-3fc8-4369-9b44-3edaf8e91295
yashuhl/LeetCodeProblems
basicCalculator.cpp
/* 227. Basic Calculator II Given a string s which represents an expression, evaluate this expression and return its value. The integer division should truncate toward zero. You may assume that the given expression is always valid. All intermediate results will be in the range of [-231, 231 - 1]. Note: You are not...
ALGO
0.999943
4.605335
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-07-03T01:59: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": "76c6c99a062...
c2526d82-0d76-48a1-9fdc-368d49dc5953
kuruwa2/DSnP
fraig/b05901020_fraig/src/cir/cirFraig.cpp
/**************************************************************************** FileName [ cirFraig.cpp ] PackageName [ cir ] Synopsis [ Define cir FRAIG functions ] Author [ Chung-Yang (<NAME> ] Copyright [ Copyleft(c) 2012-present LaDs(III), GIEE, NTU, Taiwan ] ******************************...
ALGO
0.997368
4.989084
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-05-17T03:38: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": "29ddb67f16...
0c825d19-3937-4f8f-8adb-d59a93df7934
koba-e964/contest
codeforces/400/e.cpp
#include <iostream> #include <map> #include <vector> #define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++) using namespace std; typedef long long int ll; const ll mod = 1e9 + 7; void factorize(long long v, std::map<long long, int> &result) { long long p = 2; while (v > 1 && p * p <= v) { int cnt = 0; wh...
ALGO
0.99998
4.802653
{ "github_metadata": { "branch": "master", "commit_count": 2836, "repo_created_at": "2013-09-13T04:48:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 5, "issues": 20, "pull_requests": 0 }, "file_meta": { "content_id": "5a111...
a1826927-bdf0-4ce9-a8ec-deee3bcb2f9f
rathi062/codes
codejam/Infinite-House-of-Pancakes.cpp
#include<iostream> #include <stdlib.h> #include<list> #include<string> #include<cstring> #include<sstream> #include<cctype> #include<string.h> #include<algorithm> #include<cmath> #include<stack> #include<fstream> #include<cstdlib> #include<vector> #include<map> #include<set> #include<utility> #include<iomanip> #include...
ALGO
0.999956
3.284821
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-07-18T20: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": "eb5ead6dd2...
1f331e04-03d0-4a73-b5ab-6b52e582ef69
mpfeifer1/Kattis
acm2.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { int n, p; cin >> n >> p; vector<int> v; for(int i = 0; i < n; i++) { int temp; cin >> temp; v.push_back(temp); } int currentTime = 0; int timeTaken = 0; if(v[p] >= 3...
ALGO
0.999955
3.839039
{ "github_metadata": { "branch": "master", "commit_count": 881, "repo_created_at": "2017-11-27T05:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 175, "forks": 79, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "eaab5...
a2643c49-5e49-49ff-a6f9-827f398f9b86
artembozh/labParallelMPI
parallelMPI.cpp
#include <iostream> #include "mpi.h"; #include <fstream> #include <cstdlib> #include <ctime> using namespace std; int SIZE = 1; int currentProcId = 0; long long binpow(long long a, long long e, long long m) { long long res = 1; while (e != 0) { if (e % 2 == 1) res = (res * a) % m; e = e / 2; ...
ALGO
0.999633
3.843354
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-05-28T12:04: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": "9f241402a7bd...
f8a73e0b-6c64-4208-83cc-b34dbbc2ae8b
noahyzhang/2018-
question_1203.cpp
#define _CRT_SECURE_NO_WARNINGS 1 //有M个小孩到公园玩,门票是1元。其中N个小孩带的钱为1元,K个小孩带的钱为2元。售票员没有零钱, //问这些小孩共有多少种排队方法,使得售票员总能找得开零钱。注意:两个拿一元零钱的小孩, //他们的位置互换,也算是一种新的排法。(M<=10) //1203 //利用cantlan数 //#include<iostream> //#include<cmath> //using namespace std; //int main() //{ // int m, n, k, i, s = 1, t = 1, q = 1, t1 = 1, q1 = 1; // ci...
ALGO
0.999962
3.707065
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-04-06T08:28: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": "9ad815a31b...
4d9ffb72-e255-432f-b613-592e87619e7d
FujimotoMinori/ncbAnalysis
calcasym.cxx
#include "TMath.h" using namespace std; void calcasym() { float a,c = 0.; float zasym = -5.0; float orga = 648; float orgc = 480; float goala = 650; float goalc = 500; int n = 50; float da = (goala-orga)/n; float dc = (goalc-orgc)/n; vector<Double_t> x,y; for(int i =0;i<...
ALGO
0.963987
3.710894
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-03-05T06:15:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dafcf1dc1...
e3fab5be-0d4a-4b71-a8dc-ecd9f06baccf
saipavan2702/cp-sublime
E_Sending_a_Sequence_Over_the_Network.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; int a[n + 1]; for (int i = 1; i <= n; i++) cin >> a[i]; int dp[n + 1] = {0}; dp[0] = 1; for (int i = 1; i <= n; i++) { ...
ALGO
0.999945
4.306735
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-05-25T09:49:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d5643cf58b2...
e5eccf4b-7cb2-4f52-81ae-5d5fd8ad31ce
GauravAhuja7/Flight-route-optimization
full_model.cpp
#include <iostream> #include <vector> #include <map> #include <string> #include <queue> #include <limits> #include <cmath> #include <fstream> #include <sstream> #include <algorithm> using namespace std; // Struct to hold flight data struct FlightData { string source; string destination; double distance; ...
ALGO
0.996717
7.049196
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-07-04T10:33: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": "d6019aa365d...
e8f395a7-d7d2-4d49-a943-e3dbf201c0ea
MA8405/Advanced-Programming
practice.c++
#include <iostream> using namespace std; class Ratio { friend Ratio operator*(const Ratio &x, const Ratio &y); public: Ratio(int a = 0, int b = 1) : num(a), den(b) {}; ~Ratio() {}; void assign(int a, int b) { num = a; den = b; } void Print() { cout << num << "...
ALGO
0.998191
5.42322
{ "github_metadata": { "branch": "main", "commit_count": 115, "repo_created_at": "2024-06-25T19:55:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31a56b74b4...
6ff934ae-459d-4be8-8920-047b77d56490
fantom787/My_Code_Base
New folder (2)/linked_list/doubly_linked_list_all_operations.cpp
#include <iostream> using namespace std; class node { public: int data; node *prev; node *next; node(int data) { this->data = data; this->next = NULL; this->prev = NULL; } }; void traversal(node *head) { if (head == NULL) { printf("\nList is empty\n"); ...
ALGO
0.99968
4.736563
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2021-09-29T20:47:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e7eaed51...
a1a82fbe-9b17-45f8-b49e-e1091c0099a8
liuyubobobo/Play-Leetcode
1501-2000/1649-Create-Sorted-Array-through-Instructions/cpp-1649/main2.cpp
/// Source : https://leetcode.com/problems/create-sorted-array-through-instructions/ /// Author : liuyubobobo /// Time : 2020-11-17 #include <iostream> #include <set> #include <vector> using namespace std; /// AVL Tree /// Time Complexity: O(nlogn) /// Space Complexity: O(n) class AVLTree{ private: class Nod...
ALGO
0.999993
6.123302
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "53...
24f9751c-37e2-4f23-8cfe-f81882afc7eb
qn06142/coding-python
7_C_SNTLN_Số_nguyên_tố_lớn_nhất_2020_HSG_9_HANOI_B_3.cpp
#include <bits/stdc++.h> using namespace std; long long binpow(long long a, long long b, long long m) { a %= m; long long res = 1; while (b > 0) { if (b & 1) res = res * a % m; a = a * a % m; b >>= 1; } return res; } mt19937 rng(chrono::steady_clock::now().time_...
ALGO
0.999929
4.55643
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2024-04-18T01:40:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4aa39acefbc...
60a64f53-b736-4cb8-87ba-94cef66c6eb5
msaitow/Scribbles
lct_LHS_Before_sed_20200106/sedded/lct_LHS_V0_Vp1.cpp
// Copyright (C) 2005-2014 by <NAME> (<EMAIL>) // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version // // This program ...
ALGO
0.986192
3.4847
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2016-01-01T16:04: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": "51b315bba...
0ee98053-c3a5-4061-b015-46346cdbe19d
tarunsinghdev/DSA-CRACKER
Stacks&Queues/8_DesignAStackThatSupportsgetMinInO1TimeAndO1ExtraSpace.cpp
/*Approach 1 : This solution uses an auxiliary stack named mindata. Now we have two stacks with us, one stack 's'(already given in the template) which will be our main stack and other 'mindata' which will hold the current minimum value while we push elements to the main stack. Fi...
ALGO
0.999954
5.685184
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2020-10-16T12:13:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 110, "forks": 65, "issues": 9, "pull_requests": 19 }, "file_meta": { "content_id": "7b199c...
6ff5d45a-b9e1-4f3f-b44d-5cddfa3e4a22
gtkn/atcoder
ABC_232_F.cpp
//title #include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define rep1(i,n) for (ll i = 1; i <= (n); ++i) #define repr(i,n) for (ll i = (n)-1; i >= 0; --i) #define rep1r(i,n) for (ll i = (n); i > 0; --i) #define bit(n,k) ((n>>k)&1...
ALGO
0.999676
4.006114
{ "github_metadata": { "branch": "main", "commit_count": 421, "repo_created_at": "2022-03-15T05:19: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": "7542c24ef1...
5230343a-ff36-415f-a843-3affbfccd729
gtmartem/scrolls-of-enchant
cpp/MPI/speedTracker/speedTracker.cpp
/* Speed tracker. 4st programm on the way to understanding MPI. Author: gtmartem (https://github.com/gtmartem) */ #include <mpi.h> #include <stdlib.h> #include <stdio.h> #define MB(L) (L * sizeof(int) * 8) int main(int argc, char* argv[]) { int rank, size; double start, end; MPI_Status st; int L ...
ALGO
0.977959
4.456803
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2020-03-15T22:11:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "bdc18f00c...
c8028a77-c5cb-4b18-81f1-c11ba1e7a0af
zhaozhengcoder/Algorithm
背包问题2/backPackII.cpp
class Solution { public: /** * @param m: An integer m denotes the size of a backpack * @param A & V: Given n items with size A[i] and value V[i] * @return: The maximum value */ int backPackII(int m, vector<int> A, vector<int> V) { // write your code here //创建一个二维数组 dp[n][m] int n = A.size(); int ** dp ...
ALGO
0.999993
4.872524
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2017-02-14T07:14:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 48, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "807d67...
d4077f45-c67a-4e94-aa90-7dd0231be922
opencog/ure
opencog/ure/backwardchainer/BIT.cc
/* * BIT.cc * * Copyright (C) 2016-2017 OpenCog Foundation * Author: <NAME> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License v3 as * published by the Free Software Foundation and including the exceptions * at http://opencog.o...
ALGO
0.999734
3.802303
{ "github_metadata": { "branch": "master", "commit_count": 18079, "repo_created_at": "2019-07-08T14:48:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 55, "forks": 30, "issues": 20, "pull_requests": 0 }, "file_meta": { "content_id": "adb3...
a93bebc8-3fe7-43ff-869c-aed758c05d7d
ishandutta2007/codeforces-h
heno239/normal/1165/F2.cpp
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<bitset> #include<stack> #include<unordered_map> #include<utility> #include<cassert> usi...
ALGO
0.999979
3.968854
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "346c5e264768...
589dba0f-c557-4b36-9bf3-d95a8db94dc5
ishandutta2007/codeforces-m
mnbvmar/normal/1349/F1.cpp
//~ while (clock()<=69*CLOCKS_PER_SEC) //~ #pragma comment(linker, "/stack:200000000") #ifndef LOCAL #pragma GCC optimize("O3") #endif #include "bits/stdc++.h" //~ #pragma GCC optimize("Ofast") //~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //~ #pragma GCC optimize("unroll-loops") #d...
ALGO
0.999978
4.403326
{ "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": "a139da9be20b...
4d6b30c2-cbe1-4ec9-9687-b308fce89d91
zensakkour/ICPC_1
Tokio Marine & Nichido Fire Insurance Programming Contest 2025 (AtCoder Beginner Contest 402)/G_Sum_of_Prod_of_Mod_of_Linear.cpp
#pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("avx2,bmi2") #include <bits/stdc++.h> using namespace std; using ll= long long; using i128= __int128_t; static inline ll S1(ll n) { return n*(n-1)/2; } static inline ll S2(ll n) { return n*(n-1)*(2*n-1)/6; } int main(){ int T; if (scanf("%d",&T)!...
ALGO
0.999169
4.184248
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-02-21T15:09:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97247e865...
425f2b64-cc73-4ea7-a7fa-6bebd1cd62e0
alexeyche/vespa
streamingvisitors/src/vespa/searchvisitor/rankprocessor.h
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/searchlib/fef/matchdata.h> #include <vespa/searchlib/fef/matchdatalayout.h> #include <vespa/searchlib/fef/properties.h> #include <vespa/searchlib/fef/rank_program.h> #include <vespa/se...
TOOL
0.915191
7.304488
{ "github_metadata": { "branch": "master", "commit_count": 62084, "repo_created_at": "2022-03-07T09:53:39.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "vespa-engine/vespa", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "conte...
56a1b8a8-7549-4c41-9702-aa8174a0313d
mhslr/swerc2018
templates/bit.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1<<18; // 2.6e5 const int K = 18; int T[2*N]; int dp[1<<K],cost[K]; int quer(int l,int r) { // inclusive l, exclusive r l += N; r += N; int res = 0; while (l<r) { if (l&1) res += T[l++]; if (r&1) res += T[--r]; l/=2; ...
ALGO
0.999867
3.407284
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2018-11-15T14:37: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": "de0520759...
a7435acf-3d29-4b11-aca6-8008aa6130a4
jea0716/Algorithm
BAEKJOON/1620.cpp
#include <iostream> #include <map> #include <string> #include <vector> #include <algorithm> using namespace std; vector<pair<string, int> > sorted_dogam; int binary(int min, int max, string name){ while(min <= max){ int mid = (min + max) / 2; if(sorted_dogam[mid].first == name) return sorted_doga...
ALGO
0.999884
4.214385
{ "github_metadata": { "branch": "main", "commit_count": 605, "repo_created_at": "2022-07-27T04:31:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3497c2f95...
7634cc81-5f04-4b85-84d6-91e6e6430c01
Kassandras29/Labworks
Алгоритмы STL, xrange, zip/lib/Algorithms_stl.h
#pragma once namespace algorithms_stl { const int kONLY_ONE_ELEM = 1; template<typename Input_it, typename Function> bool all_of(Input_it start, Input_it end, Function predicate) { for (Input_it i = start; i != end; ++i) { if (!predicate(*i)) return false; } return t...
ALGO
0.956918
6.990165
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-10-07T09:52: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": "3e9b2fcfbb42...
4e075cc0-acd5-4373-bd5f-e309b7789ff0
yashica-patodia/CODE_FORCES1
961C.CPP
#include<bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; #define IOS ios_base::sync_with_stdio(false);cin.tie(NULL); #define ff first #define ss second #define eb emplace_back #define M...
ALGO
0.999992
3.733442
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-12-19T14:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "e19d9d65f...
20b07a42-c1cb-4cf1-8d6b-55355bc2a058
ishaanjav/Codeforces-Solutions
1352F_BinaryStringReconstruction.cpp
/* * Created by ishaanjav * github.com/ishaanjav * Codeforces Solutions: https://github.com/ishaanjav/Codeforces-Solutions */ #include <iostream> using namespace std; #include <string> int main() { ios_base::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while (t--) { int a, b,...
ALGO
0.99988
4.489463
{ "github_metadata": { "branch": "main", "commit_count": 122, "repo_created_at": "2020-11-01T15:41:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d16818bbc...
5b42cb2e-94a0-422b-a758-6e12546ca2ba
YunjiaXi/map
map_red_black_tree/map.h
/** * implement a container like std::map */ #ifndef SJTU_MAP_HPP #define SJTU_MAP_HPP // only for std::less<T> #include <functional> #include <cstddef> #include "utility.h" #include "exceptions.h" namespace sjtu { //map,红黑树实现 template<class Key,class T,class Compare = std::less<Key>> class ma...
ALGO
0.958495
4.07953
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-03-05T11:17: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": "bac747afa9...
cc171a1c-15a2-4f0d-a8b8-9c283d2c04db
aajjbb/contest-files
Bayan/ExtraterrestrialRotation.cpp
#include <bits/stdc++.h> template<typename T> T gcd(T a, T b) { if(!b) return a; return gcd(b, a % b); } template<typename T> T lcm(T a, T b) { return a * b / gcd(a, b); } template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; } template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; ...
ALGO
0.999768
4.285301
{ "github_metadata": { "branch": "master", "commit_count": 892, "repo_created_at": "2016-03-02T13:05:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55f3dd91...
e58b360b-3e6b-4c8c-a857-9903bee5912b
didw/coding
algospot/algosrc/problems/josephus/josephus.cpp
#include<list> #include<iostream> #include<string> #include<vector> #include<queue> using namespace std; void josephusQueue(int n, int k) { // 큐를 준비한다 queue<int> survivors; for(int i = 1; i <= n; i++) survivors.push(i); // queue.size() 는 O(1) 이기 때문에 while(survivors.size() > 2) { // 한명을 꺼내서 버린다 survivors.pop(...
ALGO
0.999964
4.265828
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2015-12-01T04:53:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e895519fd...
8658cae2-3f89-4a04-88bc-fb5f2df7a331
skAeglund/Assignments_Cpp
Assignments_C++/numbers.cpp
#include <iostream> #include <string> #include <tuple> using namespace std; string EvenOrOdd(long number) { return to_string(number) + " is an " + (string)(number % 2 == 0 ? "even" : "odd") + " number"; } int LastDigit(int number) { string nrString = to_string(number); return nrString[nrString.length()-1] - '0'; ...
TOOL
0.986847
4.503069
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-03-04T14:48: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": "7175f7b14530...
cf3935fd-3155-4a55-8cb8-7b43e49c5c90
tpk73/CPP
DIM.cpp
#include <iostream> using namespace std; int main( ) { int days, month, year; //User Input cout << "Month: "; cin >> month; cout << "Year: "; cin >> year; //Leap Year/Normal Feburary if(month == 2){ if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)){ days = 29; cout << '\n' << month << ...
ALGO
0.996126
3.416908
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-01-28T19:28: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": "f075cd9a3a0b...
21d78956-0d22-461b-908c-0e3732cc1e7f
Blanquette0315/CodingTest
Solo Study/가장 큰 수.cpp
#include <string> #include <algorithm> #include <vector> using namespace std; // 그냥 단순히 A와 B의 앞자리 부터 비교하는 로직을 제일 먼저 떠올렸고, // 이전에는 다르게 풀었으니 한번 이 로직으로 풀어보자 생각함. (30분 뻘짓..) // // 9, 999 일 때, // 54, 5455 일 때, 등등.. 고려할 사항이 너무 많았음. // // 심지어 string -> 비교할 자릿수를 index로 접근해 다시 int로 변경하는게 너무 번잡해보였다. // 사실 어짜피 한자리 수이기 때문에 -48...
ALGO
0.999978
5.823179
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2024-04-23T12:31: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": "a34d501b5...
b5f1a04d-7c60-4294-a303-b9405227c607
shwapneel/Data-Structures-and-Algorithms-Implementations
with_templates/Linked_List_Simple_Sentinels/LinkedListSimpleSentinel.h
#include<iostream> using namespace std; template<typename T> class Node { public: T data; Node<T>* next; }; template<typename T> class List { private: Node<T>* head; public: List (); void insertion ( T new_data); void display (); void deletion ( T delete...
ALGO
0.92575
4.588924
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-04-27T04:17: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": "4b46ecb7af...
510ecfb4-e068-4b75-af2e-416e70618b07
gygigies/2110328_Data_Structures_And_Algorithms
Hiatus.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n , m , year , month , a , b ; cin >> n >> m; vector < pair < int , int> > input; while ( n-- ) { cin >> year >> month ; input.push_back(make_pair(year , month )); } vector < pair < int , int> > input2 = input; so...
ALGO
0.999971
3.773449
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-05T18:27:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96c5cfcde617...
d790b7ba-48c3-4a2e-9f25-848313ea5a1a
KavishNama/Data-Structures-and-Algorithms
08. Tree/02. Binary Tree ADT using Queue (LL)/Binary Tree ADT using Queue (LL).cpp
#include <iostream> using namespace std; template <class T> class treeNode { public: treeNode<T>* lchild; T data; treeNode<T>* rchild; }; template <class T> class queueNode { public: treeNode<T>* data; queueNode<T>* next; }; template <class T> class stackNode { public: treeNode<T>* data; ...
ALGO
0.999909
5.024428
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2022-02-17T15:34:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7b4cffeb3c...
82e089ae-0f65-4f16-942f-d3b72d96833e
florinsirbu99as/Object-Orientierte-Systeme-HS
Labor2/L.Aufgabe3/L.3Aufgabe.cpp
#define _USE_MATH_DEFINES // enthält die Konstante M_PI. #include <cmath> #include <iostream> using namespace std; // hier die Methode trapezFlaeche implementieren double trapezFlaeche(double a = 0, double b = 0, double gamma = 0, double c = 0); double trapezFlaeche(double a, double b, double gamma, double c) { if...
ALGO
0.992911
3.839778
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-06-23T13:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a420c581564d...
b59209ba-2952-4c6e-9c7e-692440985070
Lglockner99/glock-repo
inverter.cc
//<NAME> and <NAME> //Assignment0 //ECE 570 // Written in C++ #include <iostream> #include<map> #include <set> #include<vector> #include <string> #include <fstream> #include <utility> #include <stdlib.h> #include <stdio.h> #include <cstring> #include <iterator> #include <sstream> #include <algorithm> using namesp...
TOOL
0.904511
4.239386
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-02-17T20:51:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56026878243d...
0d06785c-d27d-4bc4-b51c-9bf77a29de2e
kk-source/DSA-Practice-Repo
My DSA Practice/Searching/temp.cpp
#include<bits/stdc++.h> using namespace std; const int MAX = 100; int median(vector<vector<int>> &matrix, int r, int c) { int min = INT_MAX, max = INT_MIN; for (int i = 0; i < r; i++) { if (matrix[i][0] < min) min = matrix[i][0]; if (matrix[i...
ALGO
0.999985
4.015183
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2021-06-01T13:52:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b323cb476...
fa5fae2a-9d39-4570-97d5-25ead5584d9e
charityrymbai/CS_102_slide_questions
Structures/3_Q1_ES_ClassQuestions.cpp
// Create a structure named book to store book details like title, author and price. // Write a C Program to input for N books, find the most expensive and least expensive // books and display their information #include<stdio.h> typedef struct { char title[30]; char author[30]; float price; } book; void...
ALGO
0.998448
4.178294
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2024-04-24T17:12:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee441cb6f...
41f35c13-bbce-4410-8a03-0c1c70b92c14
hsinyv/Algorithm_Exercise
1044 Shopping in Mars (2).cpp
/*********************************************** * Program Ability Test Advanced Level Practice * No.1044 Shopping in Mars * Date: 2021/03/07 ***********************************************/ /*********************************************** * version 2 solve 2 test case which are time out for version 1 and 1 test cas...
ALGO
0.999991
3.93492
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-02-02T13:20: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": "d604cfc46f2...
7704329d-52a5-48c1-919c-072b3e7e715a
ishandutta2007/codeforces-b
bluediamond/normal/886/F.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cassert> #include <algorithm> #include <set> #include <iomanip> #include <queue> #include <deque> #include <unordered_set> #include <unordered_map> #include <functional> #include <cmath> #include <map> #include <random>...
ALGO
0.999556
4.101885
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "944fbe07f52d...
32c3a085-fa8d-49e9-b158-e4d3050d181d
Fr0sTnUb/CipherSchools
Assignments/Week7Day31/d31w7q1.cpp
#include <iostream> #include <vector> #include <stack> using namespace std; vector<int> findNearestSmallerElements(const vector<int>& A) { int n = A.size(); vector<int> G(n, -1); stack<int> s; for (int i = 0; i < n; i++) { while (!s.empty() && s.top() >= A[i]) { s.pop(); }...
ALGO
0.999996
5.752061
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-08-26T13:43:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e433d207d0...
05194025-e4b8-4864-a9dc-cae391421a2a
svspirivm/cpp_development_fundamentals
coursera_white_belt_cpp/week5/final/final.cpp
#include<iostream> #include<map> #include<set> #include<string> #include<sstream> #include<iomanip> #include<stdexcept> using namespace std; class Date { public: int GetYear() const { return year; } int GetMonth() const { return month; } int GetDay() const { return day; } friend Date ParseDate(const stri...
TOOL
0.969287
5.017322
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-12-09T19:29: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": "d8e0c55b53ef...
f75ffcc3-4232-4037-a1af-66888e56055d
shreya0204/daily-striver-sde-sheet
Arrays-3/1.cpp
// Search in a 2d matrix /* bool search(vector<int> &row, int target){ int low = 0; int high = row.size(); while(low<=high){ int mid = (low + high)/2; if(target == row[mid]) return true; if(target < row[mid]) high = mid-1; else low = mid+1; ...
ALGO
0.999878
6.186779
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-12-23T11: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": "686ffc35c...