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
be3c004e-988c-44a6-9f59-85ec00e64a3b
DimaKuprikhin/educational
pipo/task1/useless.cpp
#include <algorithm> #include <fstream> #include <iostream> #include <sstream> #include <unordered_set> #include <vector> #include <fcntl.h> #include <stdlib.h> #include <string.h> #include <unistd.h> namespace logging_details { bool enabled = true; } class Log { public: template<typename T> Log& operator<<(cons...
TOOL
0.930351
5.432438
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-10-26T05:07: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": "9fd7fa6383...
622f63df-b100-4829-9327-67303a19c860
TnhatY/Demo
main.cpp
#include <iostream> #include "doublylinkedlist.h" #include "node.h" using namespace std; int main() { doublylinkedlist listA; listA.add(3); listA.add(2); listA.add(6); listA.add(4); listA.add(4); cout << "Danh sach ban dau\n"; listA.print(); listA.insertHead(100);//thêm 100 vào đầu listA.insert(10, 3);// t...
ALGO
0.950981
4.243115
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-10-23T07:04: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": "043ed4217...
f61742ee-965f-4487-a0b8-bf77943bafcb
ethz-asl/wavemap
library/cpp/src/core/utils/sdf/full_euclidean_sdf_generator.cc
#include "wavemap/core/utils/sdf/full_euclidean_sdf_generator.h" #include <wavemap/core/utils/profile/profiler_interface.h> #include "wavemap/core/utils/iterate/grid_iterator.h" #include "wavemap/core/utils/query/query_accelerator.h" namespace wavemap { HashedBlocks FullEuclideanSDFGenerator::generate( const Has...
ALGO
0.999329
5.816015
{ "github_metadata": { "branch": "main", "commit_count": 1315, "repo_created_at": "2021-10-27T17:07:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 512, "forks": 48, "issues": 7, "pull_requests": 3 }, "file_meta": { "content_id": "0c39d2e...
8562482d-9177-41fa-b855-7b04285bad6b
xenowits/cp
codeforces/586div12/C.cpp
#include<bits/stdc++.h> using namespace std; #define fori(i,a,b) for (long int i = a; i <= b ; ++i) #define ford(i,a,b) for(long int i = a;i >= b ; --i) #define mk make_pair #define mod 1000000007 #define pb push_back #define vec vector<long long int> #define ll long long #define rnd mt19937_64 rng(chrono::high_resolu...
ALGO
0.999967
3.249294
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2019-03-22T02:16:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88983909c...
c4a56181-ecb1-45d8-a386-3a2c13932273
bitcoin-sv/bitcoin-sv
src/rpc/miner_info.cpp
// Copyright (c) 2022 Bitcoin Association // Distributed under the Open BSV software license, see the accompanying file LICENSE. #include "amount.h" #include "base58.h" #include "config.h" #include "dstencode.h" #include "keystore.h" #include "miner_id/dataref_index.h" #include "miner_id/miner_id_db.h" #include "miner...
TOOL
0.932244
6.804098
{ "github_metadata": { "branch": "master", "commit_count": 18949, "repo_created_at": "2018-08-29T16:02:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 672, "forks": 307, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id": "245...
c16d6327-3b3e-4dd8-b52f-5989f6b5ac0a
imalinowski/HP-DC
task_3/omp3.cpp
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include <ctime> int f(int x) { return 1 * x^2 + 2 * x + 3; } void calcIntergralParallel(int threads) { omp_set_num_threads(threads); // Init params int N = 1000000; float a = -100; float b = 100; float h = (b - a) / N; float sum = 0; do...
ALGO
0.998418
4.623177
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-12-01T20:22: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": "bc80e9429cc...
6743e20c-3804-4c87-b8d2-9d643d4afaf5
jossergio/LeetCode
d2024_04_14_Problema_00404/modelo2.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.999697
5.715238
{ "github_metadata": { "branch": "main", "commit_count": 992, "repo_created_at": "2021-07-17T20:20: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": "964612c2ed...
cca6331d-8347-49dc-be39-91f423f3e705
kayovsm/estruturaDados2
atv05/q04.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> struct dadosAluno { char nome[49]; int numMatricula; float notas[3]; }; struct dadosAluno dAln[5]; int main(void) { struct dadosAluno dAln[5]; int maiorNota1, maiorMediaAln, menorMediaAln; float maiorNota = 0, maiorMed...
TOOL
0.963618
3.426648
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-09-23T23:26: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": "bfb76c48fbf7...
d3a687df-2e6d-4c05-ace0-9183c2e8d7d9
hjwdzh/VectorGraphRenderer
src/split_data.cc
#include "split_data.h" SplitData::SplitData() {} /* SplitData::SplitData(Arrangement_2::Halfedge_handle _e, K dis1, K dis2) { e = _e; K ratio1 = dis2 / (dis2 - dis1); K ratio2 = -dis1 / (dis2 - dis1); split_point = Point_2(e->source()->point().x() * ratio1 + e->target()->point().x() * ratio2, e->source()->po...
ALGO
0.992305
5.11285
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-02-12T05:49:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b823cf3...
43a9a65a-eb86-4e76-bbe7-0df6fa2ffe9c
JelluSandro/olympic-code-cpp
inopolis/BrigesVershini8/6.cpp
#include <bits/stdc++.h> #define int long long using namespace std; int n, m; vector <vector<int>> g; vector<int> c; vector<int> ot; vector<int> used; vector<int> tin; vector<int> fup; int timer = 0; void dfs(int v, int p = -1) { used[v] = true; timer++; tin[v] = timer; fup[v] = timer; int childre...
ALGO
0.999987
4.074043
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-08-06T09:41: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": "5ea23f535e7c...
c09d3b5d-1a2a-4d33-82da-f6e40156d1bc
ajmat6/DSA
CS_Tree_Traversals.cpp
void dfs(TreeNode* root, vector<vector<int>>& ans) { if(root == nullptr) return; ans[1].push_back(root -> data); dfs(root -> left, ans); ans[0].push_back(root -> data); dfs(root -> right, ans); ans[2].push_back(root -> data); return; } vector<vector<int>> getTreeTraversal(TreeNode *root){ ...
ALGO
0.999956
6.206954
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2023-08-25T16:34:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa996ef9...
49279392-8be8-4c6d-beaa-680489efd7fa
ishandutta2007/codeforces-a
andr0901/normal/1467/B.cpp
//#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; //vector string deque break continue #define forn(i, s, f) for (int i = (int)s; i < (int)f; i++) #define ll long long #define ull unsigned long long #define ld long double #define pii pair <int, int> #define fs first #define sc second #defi...
ALGO
0.999834
4.843023
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "77ba702887d2...
ad08f1c1-a5dc-4e33-be06-e86b368cf781
derdrdirk/interviewPreparation
top_interview_questions_easy/rotateImage.cpp
#include <iostream> #include <vector> class Solution { public: void rotate(std::vector<std::vector<int>> &matrix) { // transpose for (int i = 0; i < matrix.size(); i++) { for (int j = 0; j < matrix[i].size(); j++) { if (i == j) break; std::swap(matrix[i][j], matrix[j][i]); ...
ALGO
0.999661
6.245236
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2019-10-01T12:21: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": "98587253f...
96f36994-fbbe-4df6-b98c-5a20aae1b53c
jvcleave/PCL_1-3-0_Libraries_for_OF
3rdPartyLibs/vtk_5-8/include/Common/vtkMatrix3x3.cxx
/*========================================================================= Program: Visualization Toolkit Module: vtkMatrix3x3.cxx Copyright (c) <NAME>, <NAME>, <NAME> All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT...
TOOL
0.919831
6.892892
{ "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": "856cdfa7b9...
1c7907ad-5ec2-458d-bf73-cffa027e7a49
DandyAkira/LeetCode-With-C
438.找到字符串中所有字母异位词.cpp
/* * @lc app=leetcode.cn id=438 lang=cpp * * [438] 找到字符串中所有字母异位词 */ // @lc code=start #include<iostream> #include<vector> #include<string> #include<set> using namespace std; class Solution { public: // ! 用 multiset 超时 vector<int> findAnagrams_multiset(string s, string p) { multiset<char> s_set; ...
ALGO
0.99997
6.386637
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-31T13:44: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": "d97fd2fa80dc...
56b3eebd-75b0-412e-9e9e-ba8f7023e515
mohammedjasam/Technical-Interview-Guide
LeetCode/leetcode_maximum-vacation-days.cpp
/* * * Tag: DP * Time: O(kn^2) * Space: O(n) */ class Solution { public: int maxVacationDays(vector<vector<int>>& flights, vector<vector<int>>& days) { int ans = 0; if(days.size() == 0 || flights.size() == 0){ return ans; } int n = flights.size(), k = days[0].siz...
ALGO
0.999953
5.476708
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-04-01T19:15:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 110, "forks": 34, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "360287...
4a44b9c5-c5cc-4241-b383-48364bb1b5b2
ishandutta2007/codeforces-m
marckess/normal/685/D.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define fi first #define se second #define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k)) #define forn(i,n) for (int i = 0; i < n; i++) #define forr(i,a,b) for (int i = a; i <= b; i++) #define all(v) v.begin(), v.end() #define pb(x) push_back(x) typedef long l...
ALGO
0.999852
3.590187
{ "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": "99e2844bc364...
b69d1891-cf71-4fcf-b305-9beb4de39c44
Yichen-Si/bluebear
src/binary_variant_compress.cpp
#include "binary_variant_compress.h" int32_t binary_intersect_mix(const BinaryVariant& lhs, const BinaryVariant& rhs) { if (!(lhs.isSparse && !rhs.isSparse)) { return -1; } int32_t count = 0; for (auto const& idx : lhs.indices) { count += (rhs.bitArray[idx >> 3] & (uint8_t) 1 << (7 - id...
DATA
0.916292
5.877642
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2019-08-02T04:02: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": "57ce0039b...
a9a9ae20-491e-4b7f-a63b-8628d33b25a1
Jeija/spheretest
src/imagefilters.cpp
/* Copyright (C) 2015 <NAME> <<EMAIL>> This program 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.1 of the License, or (at your option) any later version. This program is distributed in...
TOOL
0.911246
6.92633
{ "github_metadata": { "branch": "master", "commit_count": 5905, "repo_created_at": "2016-10-06T17:05:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 169, "forks": 20, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "fddc...
d80eb1ec-a5d1-4936-a66d-4973c74a51e9
vivekn/tsp-heuristics
santa-anneal.cpp
// Heuristics for the Travelling Salesman Problem // Author: <NAME> // Date: 28th December 2012 #include <stdio.h> #include <assert.h> #include <math.h> #include <vector> #include <algorithm> #include <bitset> using namespace std; struct node { int id; int x; int y; node(int a=0, int b=0, int c=0) : id(a), x(b), ...
ALGO
0.999986
4.18436
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2012-12-30T09:55:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83c91de172...
e8460c30-f7a9-4f06-b1cf-2d8b719b6ae9
columnspace/courses
PKU Introduction to Algorithms/讲义例题/2.1熄灯问题.cpp
/* http://bailian.openjudge.cn/practice/2811/ */ #include <iostream> #include <vector> using namespace std; vector<vector<int>> add_border(const vector<vector<int>>& mat) { int m = mat.size(), n = mat[0].size(); vector<vector<int>> res(m + 1, vector<int>(n + 2, 0)); for (int i = 1; i <= m; i++) { fo...
ALGO
0.999973
3.86022
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2021-07-17T09:09:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f2db63b1e4...
a442ee64-9183-4b30-a998-d8986a5c5b0d
AkshatRauthan/Decode-DSA-2.0-With-Cpp
48. Binary Search Treea 2/Leetcode450_DeletingNodesFromBST.cpp
#include "iostream" #include "binaryTree" // Deleting Nodes From A BST :- // Case 1 : A Leaf Node. // Case 2 : Having Only One Child Node. // Case 3 : Having Both Left And Right Child Node. // Solution :- // In Case 1 : We Can Directly Replace The Node With A Null Pointer. // In Case 2 : We Can Directly Replace The n...
ALGO
0.999956
4.469254
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-01-04T16:33:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51ceb4c171d...
9af65943-552f-4517-921e-aaa7d5fa1519
chaitanya100100/Data-Structures-and-Algorithms
coursera/algo_2/1_1/bag.cpp
#include<iostream> #include<stdio.h> #include<stdlib.h> using namespace std; template<class T> struct node { T val; node* next; }; template<class T> class Bag { private: int size; int iter,iter2; node<T> * root; public: Bag() { iter=iter2=0; ...
ALGO
0.999332
3.579316
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-05-08T12:28:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "514540ef8...
860578f7-f1eb-49e9-986c-c7cd3f9b3d9b
miracl/MIRACL
source/curve/pairing/ake6fsta.cpp
/* Scott's AKE Client/Server testbed See http://eprint.iacr.org/2002/164 Compile as cl /O2 /GX /DZZNS=16 ake6fsta.cpp zzn6a.cpp zzn2.cpp big.cpp zzn.cpp ecn.cpp miracl.lib using COMBA build Freeman-Scott-Teske curve - Ate pairing This version uses the sextic twist and the Ate pairing No el...
ALGO
0.995056
4.748805
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2012-11-06T01:20:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 683, "forks": 243, "issues": 67, "pull_requests": 12 }, "file_meta": { "content_id": "adf0...
a7a69ac0-bf2f-4c7d-b96a-3520d13d5ce3
xyyyt/leetcode-cpp
exercises/Permutations.cpp
#include <vector> #include <iostream> class Solution { public : std::vector<std::vector<int>> permute(std::vector<int> nums) { if (nums.empty()) { return {}; } std::vector<std::vector<int>> permutations; permute(nums, 0, permutations); return permu...
ALGO
0.999892
7.035187
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-23T22:44: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": "70ac0aa268bd...
5071543f-fb8a-40d6-aef5-f8a23c014169
Sardonyx001/my-project-euler-solutions
p026/p026.cpp
#include <iostream> #include <chrono> /* I used the method described in this answer. * https://math.stackexchange.com/questions/46864/best-way-of-computing-the-decimal-representation-of-a-fraction-with-an-arbitrary * */ // Function to solve the Project Euler problem // Modify this function based on the specific pr...
ALGO
0.99959
5.787858
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-08-05T12:00: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": "e94d3cbf58cf...
7f78faba-58d1-4108-82ac-54fdf908d89f
mukulgpt17/CP
CodeForces/1355B.cpp
#include "bits/stdc++.h" using namespace std; #define max(a, b) (a < b? b : a) #define min(a, b) ((a>b)?b:a) #define mod 1e9+7 #define FOR(a,c) for ( int (a)=0; (a)<(c); (a)++) #define FORL(a,b,c) for ( int (a)=(b); (a)<=(c); (a)++) #define FORR(a,b,c) for ( int (a)=(b); (a)>=(c); (a)--) #define INF 10000000000000...
ALGO
0.999724
3.662636
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-09-11T15:11: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": "9ae6b2d83e1a...
9a16e4e0-3cb3-4535-9deb-f6b05db4541c
alexandraback/datacollection
solutions_5658571765186560_0/C++/centipede80/d2.cpp
#include <vector> #include <string> #include <iostream> using namespace std; bool doit(int X, int R, int C) { if(R>C) swap(R,C); if(R*C%X!=0) return 1; if(X==1) return 0; if(X==2) return 0; if(X==3) { if(R==1&&C==3) return 1; if(R==3&&C==1) return 1; if(R==2&&C==3) return 0; if(R==3&&C==2) re...
ALGO
0.999449
3.841869
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9f382b6f...
98477f88-a6a5-4ef4-a079-38760cea591a
yulonglong/UVa-Solutions
12397.cpp
//<NAME> - UVa 12397 Roman Numerals #include <cstdio> #include <iostream> #include <cstdlib> #include <ctype.h> #include <map> #include <string> using namespace std; int getNumSticks(string input){ int counter=0; for(int i=0;i<(int)input.length();i++){ if(input[i]=='I'){ counter+=1; } else if(input[i]=='V'...
ALGO
0.999933
4.243053
{ "github_metadata": { "branch": "master", "commit_count": 284, "repo_created_at": "2014-08-07T06:42:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06f8cbdd...
5f0c9ab6-10d6-42f5-85cc-32aa170ab15c
acDante/algolab
week8/london/london.cpp
/** Algorithm: max flow (supply-demand problem) * Each position of the newspaper can provide a supply of the letter on its front or back side, * The note needs a certain demand for each letter, * Check whether the maxflow equals to the note size */ // STL includes #include <iostream> #include <vector> #include <...
ALGO
0.999985
4.419782
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-09-25T13:57:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c881901a...
5e03573b-ec8d-44fa-8540-8a76c7578ef4
run916/Algorithms
动态规划/轮廓线DP/守护太空城.cpp
#include<bits/stdc++.h> #include "c:\Users\windows\Desktop\Algorithm\Algorithms\std\input.h" using namespace std; class Solution { public: int defendSpaceCity(vector < int > & time, vector < int > & position) { int n = time.size(); // vise数组用来记录一个位置被使用的情况 bool vise[6][...
ALGO
0.999897
4.073497
{ "github_metadata": { "branch": "main", "commit_count": 248, "repo_created_at": "2021-05-08T13:45:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "389e759a03...
071e14ff-91c9-42c1-b48c-197bc8a65d63
montreal91/workshop
ap/codeforces/contest1082a.cc
// // Problem: https://codeforces.com/contest/1082/problem/A // Author: montreal91 // Date: 28.11.2018 // Type: contest // Time: 00:50 // Failed attempts: 0 // #include <algorithm> #include <chrono> #include <cmath> #include <cstdint> #include <iostream> #include <fstream> #include <limits> #include <map> #include <s...
ALGO
0.999745
5.022653
{ "github_metadata": { "branch": "master", "commit_count": 844, "repo_created_at": "2015-08-06T03:53:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 6, "pull_requests": 9 }, "file_meta": { "content_id": "c3f1c3d0...
c47ce49b-208b-4c35-a069-4b67bf34b697
bumchik2/Annealing
src/problem.cpp
#include "problem.h" #include "utils.h" #include <iostream> #include <cassert> #include <unordered_set> #include <vector> using std::vector; using std::unordered_set; using std::cout; using std::endl; vector<int> make_answer_from_part(const DistanceMatrix& distance_matrix, unordered_set<int>& part) { int v = *pa...
ALGO
0.999586
5.159873
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-12-26T13:43: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": "3cf1ef852b8...
14dd7ffe-93de-4610-b96c-f0797ea8ecbc
google-deepmind/open_spiel
open_spiel/algorithms/outcome_sampling_mccfr.cc
// Copyright 2021 DeepMind Technologies Limited // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
ALGO
0.999637
7.36274
{ "github_metadata": { "branch": "master", "commit_count": 4660, "repo_created_at": "2019-07-22T13:50:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4631, "forks": 1006, "issues": 17, "pull_requests": 6 }, "file_meta": { "content_id": "b...
c76493c4-c267-4f0e-b5ee-38bb844507a8
SadiqVali786/DSA
13.BackTracking/07.combinationSum.cpp
#include<iostream> #include<chrono> #include<vector> using namespace std; void find_all_possi_combina_sums(vector<int> &nums, int target, vector<vector<int>> &ans, vector<int> &vec, int index) { if (target == 0) { ans.push_back(vec); return; } for (int i=index; i<nums.size(); i++) { ...
ALGO
0.999573
5.98947
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-08-31T03:53: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": "5cedf204c68...
23469943-25f6-4f72-ab83-4a2c4fd55407
HuyWibu/Source_Code_C_plus_plus
code_PTIT/LCM_va_GCD_bai_7.cpp
// Tim so nho nhat co N chu so // Chia het cho x, y, z. #include <bits/stdc++.h> using namespace std; typedef long long ll; ll GCD(ll x, ll y) { //tim USCLN cua X va Y while(y!=0) { ll r = x%y; x=y; y=r; } return x; } ll LCM(int x, int y, int z) { //Tim BSCNH cua X, Y, Z ll p = GCD(x,y); ll k = (x*y)/p; ll ...
ALGO
0.999863
3.568583
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2021-09-07T11:53:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d35d57652...
4af2c49f-d286-4229-a520-ccfee1df5f2a
fanwangwang/fww_study
test/sum.cpp
#include <iostream> #include <cmath> int sum1(int n1); int sum2(int n2); double sum3(int n3); using namespace std; int main() { int s1,s2; double s3,s; sum1(100); sum2(50); sum3(10); s = s1 + s2 +s3; cout << "s1 + s2 + s3 = " << s << endl; return 0; } int sum1(int n1) { int s1 = 0;...
ALGO
0.966373
3.32141
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2016-09-23T00:39: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": "0f8fd84b1...
682f9b22-68e0-4305-94aa-2a8705431086
geshtng/competitive-programming
Codeforces/Contests/Codeforces Round 937/C_Clock_Conversion.cpp
#ifndef LOCAL #pragma GCC optimize ("Ofast") #pragma GCC optimize ("unroll-loops") #endif #include <bits/stdc++.h> using namespace std; typedef long long LL; #define FOR(i, a, b) for(int i = int(a); i < int(b); i++) #define REP(i, b) FOR(i, 0, b) #define ROF(i, a, b) for(int i = int(b)-1; i >= int(a); i--) ...
ALGO
0.997939
3.914347
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2020-05-11T03:45: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": "8d193cf43...
6ee05ce9-0f27-4dc7-9111-8e4d629930b1
xjsXjtu/leetcode
0_leetcode_others/0_leetcode_others/PathSumII.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cassert> #include "shared_functions.h" #include "ConstructBinaryTreeFromPreorderInorderTraverse.h" using namespace std; class Solution { public: vector<vector<int>> pathSum(TreeNode* root, int sum) { vector<vector<int>>...
ALGO
0.999988
5.943583
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2014-06-15T08:42: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": "9fd0cc8e2...
94a818ea-ab31-44c7-9652-efec33f268a2
mamawpsg16/cpp-practices
multi-threading.cpp
#include <iostream> #include <thread> #include <chrono> #include <future> #include <mutex> #include <condition_variable> // Function for processing data // void processData(int id) { // for (int i = 1; i <= 5; ++i) { // std::cout << "Processing data in thread " << id << ": step " << i << "\n"; // s...
TOOL
0.991257
7.323895
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2024-11-22T07:41: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": "f05072a64...
d9364804-8a51-47ab-bd2f-c332b91655ba
Jakelyny/Estrutura_de_Dados_I
Estrutura_de_Dados_I/Trabalho etapa 1/01_fila_pessoas.hpp
#include <iomanip> #ifndef _HPP_FilaPessoa #define _HPP_FilaPessoa using namespace std; #include "01_estruturas.hpp" typedef Pessoa DadoNoFilaPessoa; struct NoFilaPessoa{ DadoNoFilaPessoa dado; NoFilaPessoa *prox; }; struct FilaPessoa{ NoFilaPessoa *inicio; NoFilaPessoa *fim; FilaPessoa(){ ...
TOOL
0.965491
4.395366
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2021-08-24T11:52:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08bc6ee4a77...
f371f31a-61cd-4acd-b6b8-092d97ce27c5
d-hacks/DataStructureAndAlgorithm
chapter9/binary_search_tree.cpp
// // Created by yusuke on 2019-04-28. // #include <iostream> #include <string> #include "binary_search_tree.h" using namespace std; struct Node{ int key; Node *parent, *left, *right; }; Node *NIL, *root; void insert(int key){ Node *y = NIL; Node *x = root; Node *z; z = new Node; z->key...
ALGO
0.999951
4.889746
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-05-01T05:03:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21, "forks": 6, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "0616d6383...
bdcb5ebe-c579-4bff-85b8-d1fe25d3b795
lifespank/baekjoon_cpp
11505.cpp
#include <iostream> #include <vector> #include <cmath> #define PRIME 1000000007 using namespace std; long long initTree(vector<long long> &arr, vector<long long> &tree, int start, int end, int node) { if (start == end) { return tree[node] = arr[start]; } int mid = start + (end - start) / 2; re...
ALGO
0.999992
5.465014
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2022-03-12T12:58: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": "a6d2351d133...
68a268e9-6d20-4e10-a619-69b16f984700
svrc-jan/meta_opt
src/specific/tsp.cpp
#include "tsp.hpp" TSP_instance::TSP_instance(const std::string& name, const std::vector<std::vector<uint>>& dist_mtx) : name(name), dist_mtx(dist_mtx) { this->node_cnt = dist_mtx.size(); for (auto v : dist_mtx) { assert(v.size() == this->node_cnt); } this->setup_bounds(); } TSP_instance::TSP_instance(const...
ALGO
0.91105
5.271585
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-09-30T21:47: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": "9f6992ef351...
77c38793-6788-492c-a1ba-d8a286342b49
nguyenhongduc2411/Nostalgia
OOP/2024-2025-TN/Cau3.cpp
#include <iostream> #include <vector> template<class T> class Filter { public: virtual void prepare(const std::vector<T>&) {} virtual bool check(const T& element, int idx) = 0; virtual ~Filter() = default; }; class DivisibleFilter : public Filter<int> { private: int N; public: DivisibleFilter(int ...
TOOL
0.989343
5.503764
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2023-08-06T03:05:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6eb845de10...
f7fa9a6a-c177-4bea-94cd-8b696332a6db
GoolberthUCSP/comp_molecular
exercises/lab_star_msa/star_msa.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include "../lib/pairwise_alignment.h" using namespace std; const string out_file = "data\\star_msa.txt"; void star_msa(vector<string> &strings); string fill(string s, int n, char c = '-'); int main(int argc, char *argv[]){ if (argc < 4)...
ALGO
0.998828
4.236408
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2024-08-28T23:59: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": "9e344dd04...
609a4462-f193-4520-bcf2-237b4ad19ebe
MtchellG/Spatially-Extended-SIR-model
SIRv2.cpp
#include <iostream> #include <cmath> #include <cstdlib> #include <ctime> #include <fstream> #include <string> using namespace std; const int Nx = 128; const int Ny = 128; //lattice dimensions/size double N[Nx][Ny], S[Nx][Ny], I[Nx][Ny], R[Nx][Ny]; int ss = 100; //step size double g = 0.01; //recovery rate double ...
ALGO
0.999855
4.656056
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-13T17:14: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": "c99e623e25f6...
270fda3a-7749-4d5e-a475-75d65deb33a7
kaus98/Coding-Practice
Leetcode/Strings/Permutation in String 567.cpp
class Solution { public: bool checkInclusion(string s1, string s2) { // Beats 99.8% of Solution int m[26] = {0}; int n[26] = {0}; int len1 = s1.length(); int len2 = s2.length(); if (len2 < len1) return false; for(int i=0; i < len1; i++){ m...
ALGO
0.999774
6.25462
{ "github_metadata": { "branch": "master", "commit_count": 188, "repo_created_at": "2022-06-11T18:10:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d98df5aa...
3e44ceea-f80c-4007-bb37-a0e8eabe1974
ishandutta2007/codeforces-r
rxdoi/normal/773/C.cpp
#include<set> #include<map> #include<cmath> #include<queue> #include<bitset> #include<string> #include<cstdio> #include<cctype> #include<cassert> #include<cstdlib> #include<cstring> #include<sstream> #include<iostream> #include<algorithm> #define For(i,x,y) for (int i=x;i<y;i++) #define pb push_back #define mp make_pa...
ALGO
0.999709
3.07496
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58: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": "990ec84e367e...
5241c789-cc31-4bb1-9321-660b2d65b867
ishandutta2007/codeforces-n
nealchen/normal/933/A.cpp
#include <stdio.h> #define cmax(x, y) ((y) > x ? x = (y) : x) const int N = 2005; int n, a[N], pre[N], suf[N]; int main() { register int i, j, ans = 0, cnt, now, tot; scanf("%d", &n); for(i = 1; i <= n; ++i) scanf("%d", &a[i]); for(i = 1; i <= n; ++i) pre[i] = pre[i-1] + (a[i]==1); for(i = n; i >= 1; --i) suf[i] =...
ALGO
0.999981
3.292057
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35: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": "fd7543582ff8...
b1c1de02-7c19-4a82-bcb8-d347b2f83480
hyelie/Algorithm-Log
programmers/math/divisor/lv2 carpet.cpp
// 카펫 #include <string> #include <vector> #include <cmath> #include <iostream> using namespace std; typedef pair<int, int> pii; vector<int> solution(int brown, int yellow) { vector<pii> divisors; vector<int> answer; for(int i = 1; i <= sqrt(yellow); i++){ if(yellow % i == 0){ di...
ALGO
0.999667
4.817477
{ "github_metadata": { "branch": "master", "commit_count": 748, "repo_created_at": "2021-10-05T13:29:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec516b4a...
82439f01-4cc1-4c8d-8e9d-d888ccfa3f26
jshashwat/retina_pointer
streaming_global/src/krnl_stream_arb.cpp
#include "data.h" typedef ap_axiu<32,0,0,0> pkt; extern "C" { void krnl_stream_arb(data *in, int *out, hls::stream<pkt> &r_add_in, hls::stream<pkt> &r_add_out, hls::stream<pkt> &r_sub_in, hls::stream<pkt> &r_sub_out, hls::stream<pkt> &r_mul_in, hls::stream<pkt> &r_mul_out ) { #pragma HLS INTER...
ALGO
0.994727
4.516779
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-03-22T16:26: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": "2b6bf9bab4...
ba1f69e1-f14a-42f0-8633-2ed94f6c5cef
AHMEDMOM1/MathGame
mathGame.cpp
enum QuestionDifficulty { Easy = 1, Medium, Hard, Mixed }; enum OperationType { Addition = 1, Subtraction, Division, Multiplication, MixedOperations }; struct RoundDetails { short roundNumber{}; short firstOperand{}; short secondOperand{}; char operationSymbol{}; short correctResult{}; short us...
TOOL
0.948348
3.590085
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-03-16T07:48: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": "121b2053364d...
5bd3c0d2-e99c-412d-96fd-abac07f5635b
jonghwan83/StudyAlgo1
swExpert/SheetMusic/main.cpp
#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #include <stdio.h> #include <time.h> #define MAXN 8000 extern void compose(int N, int mTone[MAXN][2][4], int mBeat[MAXN][2][4], int mAns[MAXN]); ///////////////////////////////////////////////////////////////////////// //////////////////////////...
ALGO
0.996616
3.396699
{ "github_metadata": { "branch": "main", "commit_count": 431, "repo_created_at": "2022-01-08T03:36:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40a44a6f31...
4bae92a8-a1a4-477f-b6f9-6e353d7314b3
SAIMON-25/NUMBER_theory-Excercise-
SOD.cpp
#include <bits/stdc++.h> using namespace std; const int mx = 1e8+123; bitset<mx>isPrime;///similar to bool isPrime[mx];all bit are 000000000000 vector<int>Primes; //complexity nearly O(n); void sieve(int n){ for(int i = 3;i<=n;i+=2){/// All odd marked as prime; isPrime[i] = 1; } int sq = sqrt(n);...
ALGO
0.99997
4.63623
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-02-25T04:42: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": "17d2b86cad94...
d0ec15d0-2507-4737-a025-0bed5ec469ee
pranavsindura/CompetitiveProgramming
codeforces/D/808d.cpp
#include<bits/stdc++.h> #define ll long long int #define ld long double #define pi pair<int,int> #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define sz(x) ((int)x.size()) #define ln(x) ((int)x.length()) #define mp make_pair #define pb push_back #define ff first #define ss second #define endl ...
ALGO
0.999967
3.801564
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2021-01-26T05:15: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": "2521a8db6...
3501d835-8490-40d5-b85d-9d6aa509d922
Cirromulus/tuning-fork-clock
src/estimator.hpp
#pragma once #include <stddef.h> #include <cmath> #include <optional> template <size_t PolyCount> class PolynomCalc { public: static constexpr size_t numberOfPolynoms = PolyCount; constexpr PolynomCalc(const std::array<double, PolyCount>& polynoms) : mPolynoms{polynoms} {} constexpr doub...
ALGO
0.966487
6.364138
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2022-12-27T13: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": "3622d6cdae...
621e18af-8cce-4919-b0bc-9e359b12ed3f
shuaitq/CppPrimer
ch01/1.17.cpp
#include <iostream> int main() { int currVal = 0, val = 0; if(std::cin >> currVal) { int cnt = 1; while(std::cin >> val) { if(val == currVal) { ++ cnt; } else { std::cout << currVal << " occ...
ALGO
0.99964
3.735329
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-05-11T10:27: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": "27ec6639a...
05a2c8d4-1d63-4f09-882b-64004fb511da
ishandutta2007/codeforces-p
psaily/normal/1736/C2.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,n) for (int i=(a);i<(n);i++) #define per(i,n,a) for (int i=(n)-1;i>=(a);i--) #define pb push_back #define mp make_pair #define fi first #define se second #define all(x) x.begin(),x.end() #define SZ(x) ((int)x.size()) #define make_unique(x) { sort(all(x)); x...
ALGO
0.999229
4.067235
{ "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": "35b70ecd9664...
a1880a9d-3a89-42e1-b5a3-a914092a8cbe
glannuzel/projet_ti
mahalanobis_model_init.cpp
#include <iostream> #include <cstdlib> #include <fstream> #include <string> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; void process(const char* imsname) { //Time calculation init clock_t start; double duration; start = clock(); // Read source image and initialize dimensions M...
ALGO
0.963692
4.693404
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2018-12-11T07:38: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": "0968c9f1e...
1f9d966e-b18d-4cd1-872a-4fa2bf876f45
jenniferjang/dbscanpp
k_centers.h
#include <iterator> #include <algorithm> using namespace std; double sq_euclidean_distance(int d, int i, int j, double * X) { /* Return the squared distance between points i and j in X Parameters ---------- d: dimensions of dataset X i: index of first point in X j...
ALGO
0.999534
5.519451
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2018-04-01T17:29:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "cfeec69d...
4274b303-fcd7-4270-aa8f-a6ed4a42fa8a
xuzhezhaozhao/TopCoder
588/D22/GUMIAndSongsDiv2.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <stack> #include <deque> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <cstring> using namespace std; // BEGIN CUT HERE #define A...
ALGO
0.99957
5.314996
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2013-05-31T05:38:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77b325f70...
ef08d5bc-d37d-4545-9327-d733c8ce5198
IvanTicona/Algoritmica-I
problemas/enfoque de soluciones/D.cpp
#include<bits/stdc++.h> using namespace std; int collatz(int n) { int ops = 1; while(n != 1) { if(n % 2 == 0){ n = n / 2; } else { n = n * 3 + 1; } ops++; } return ops; } int main () { int a, b; while(cin>>a>>b) { int mayorPrev = 0; // if(a>b) { // int temp =...
ALGO
0.999911
4.343184
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-03-26T20:22:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7122149207d...
3a1477ee-b3e9-4595-8d7b-e0ee983b4b66
cat-on-laptop/study
프로그래머스/lv3/92344. 파괴되지 않은 건물/파괴되지 않은 건물.cpp
#include <string> #include <vector> #include <iostream> using namespace std; int imos[1005][1005]; int solution(vector<vector<int>> board, vector<vector<int>> skill) { int answer = 0; for(const vector<int> &x : skill) { if(x[0] == 1) { // type1 attack imos[x[1]][x[2]] -= x[5]; ...
ALGO
0.999899
4.98546
{ "github_metadata": { "branch": "main", "commit_count": 379, "repo_created_at": "2022-05-30T07:42: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": "4f97696bac...
b5d9765e-02f4-4eee-bd51-1b0df630f214
encacap/cplusplus_course
object-oriented-programing/polynomial/polynomial.cpp
#include "polynomial.h" Polynomial::Polynomial(int degree) { this->degree = degree; coef = new double[degree]; for (int i = 0; i < degree; i++) coef[i] = 0; } void Polynomial::setCoef(int k, double value) { this->coef[k] = value; } Polynomial::~Polynomial() { delete this->coef; } Polynom...
ALGO
0.998169
4.19036
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-05-01T05:52:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b6478c8a...
fcddd160-b284-4389-8d24-e5b9555e5bd1
GSGFs7/algorithm
template/A+B.cpp
#include <iostream> #include <string> /// 加个string头文件就过了??? using namespace std; int main() { string a, b; while (cin >> a >> b) { long long n1 = 0; for (char i : a) { if (i != '-' && i != ',') n1 = n1*10 + (i - '0'); // 加入新的数时将所有数往左移一位 else continue; }...
ALGO
0.999666
3.833143
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-08-28T14:53: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": "3e0e65a0f72...
80804ec4-03f4-4f83-b6f1-e51bdf96e9d2
smjh950315/NknuHwM11275721
NknuHW/nknuse/ai/component/neuron_pool.hpp
#pragma once #include "neuron.hpp" namespace nknuse::ai::component { class NeuronPool { using This = NeuronPool; static constexpr void _Functor_AdjustWeight(nfloat& _weight, const nfloat _input, nfloat _errRate) { _weight += (nfloat)_input * _errRate; } static void _Log_Weight_Difference(nfloat pre, nfloat...
TOOL
0.921312
4.209564
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-10-16T01:06: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": "87be74b5ebe6...
0aa701cb-ba80-4283-ab7c-e27f4a9d4eab
harsh-panchal-804/CodeForces-Solutions
B_Friends_and_Presents.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double lld; const long long mod = 1e9 + 7; #define INF (1LL << 60) #define inf (1 << 30) #define all(x) (x).begin(), (x).end() #ifndef ONLINE_JUDGE #define debug(x) cerr << #x << " "; _print(x); cerr << en...
ALGO
0.999927
3.92652
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-04T18:01:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bcf826a329af...
4478b732-e0a8-4e8b-a7f9-75855b53c5bd
Vii-shal/DSA
04_Linked List C++/C++ _01 Single Linked List/pr_07.cpp
// tell cycle is present in linkedList or not #include<iostream> using namespace std; class node{ public: int val; node* next=NULL; node(int value){ val = value; next = NULL; } }; class linkedList{ public : node * head; linkedList(){ head = NULL; } vo...
ALGO
0.999887
5.365002
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-25T08:58: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": "325acef02bff...
6134b690-9137-48ed-8081-8bd465324b34
TheRakibJoy/Algorithms
Backtracking/HackerEarth - A Tryst With Chess with backtrack.cpp
#include<bits/stdc++.h> using namespace std; const int sz = 11; const int fx[] = {-2 , -2 , -1 , -1 , +2 , +2 , +1 , +1}; const int fy[] = {+1 , -1 , +2 , -2 , +1 , -1 , +2 , -2}; int n; int FuN(int grid[sz][sz] , int movbaki , int x , int y) { if(movbaki == 0){ if(grid[x][y] == 0){ grid[x][y]...
ALGO
0.999739
4.139878
{ "github_metadata": { "branch": "master", "commit_count": 880, "repo_created_at": "2021-12-21T07:08:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e983f4b...
f545fd1e-4226-48fc-9849-139ebffacc59
ROCm/rocSOLVER
library/src/specialized/roclapack_getri_specialized_kernels.hpp
/************************************************************************ * Derived from the BSD3-licensed * LAPACK routine (version 3.7.0) -- * Univ. of Tennessee, Univ. of California Berkeley, * Univ. of Colorado Denver and NAG Ltd.. * December 2016 * Copyright (C) 2019-2025 Advanced Micro Devices, ...
TOOL
0.980294
6.214949
{ "github_metadata": { "branch": "develop", "commit_count": 816, "repo_created_at": "2018-05-22T22:37:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 108, "forks": 64, "issues": 4, "pull_requests": 23 }, "file_meta": { "content_id": "8857...
c20893bb-6df7-435f-b950-0f5c651eebe7
eval-exec/Algorithm
LeetCode/combinationSum/main.cxx
class Solution { public: vector<vector<int>> combinationSum(vector<int>& candidates, int target) { vector<vector<int>> rets; return combinationSum(candidates,candidates.size()-1,target); } private: map<pair<int,int>,vector<vector<int>>> mm; vector<vector<int>> combinationSum(vec...
ALGO
0.99996
6.143739
{ "github_metadata": { "branch": "master", "commit_count": 643, "repo_created_at": "2020-12-27T13:17:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "7e69d51c...
04ce0535-a4e4-4cdd-ad86-ef7b331bd395
shivam04/codes
leetcode-questions/iterator-for-combination.cpp
void getAllCombinations(string characters, int r, int idx, string data, int i, vector<string> &combinations) { if (idx == r) { combinations.push_back(data); return; } if (i >= characters.length()) return; data[idx] = characters[i]; getAllCombinations(characters, r, idx+1, data,...
ALGO
0.999855
5.724025
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2016-12-05T11:36:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5800bf67...
198c190a-4db2-4626-9690-b4eeffee4802
pvarna/UP
Seminars/Week09-MultidimensionalArrays2/zad10.cpp
#include <iostream> const int MAX_ROWS_SIZE = 10; const int MAX_COLUMNS_SIZE = 20; void read2DArray(int array[][MAX_COLUMNS_SIZE], size_t n, size_t m); void print2DArray(int array[][MAX_COLUMNS_SIZE], size_t n, size_t m); void removeGivenColumnFrom2DArray(int array[][MAX_COLUMNS_SIZE], size_t n, size_t m, int k); ...
ALGO
0.997655
4.176059
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2020-12-06T15:47:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e32e6f0db7...
9372537c-2180-4a84-a9cc-27102d52d5eb
InstituteforDiseaseModeling/EMOD-Typhoid
Eradication/VectorPopulationIndividual.cpp
/*************************************************************************************************** Copyright (c) 2016 Intellectual Ventures Property Holdings, LLC (IVPH) All rights reserved. EMOD is licensed under the Creative Commons Attribution-Noncommercial-ShareAlike 4.0 License. To view a copy of this license,...
ALGO
0.924152
5.470878
{ "github_metadata": { "branch": "master", "commit_count": 1750, "repo_created_at": "2016-11-15T19:09:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "11beddb0...
33ce90c9-2604-4e19-aa88-8f4a46d679e7
Ayesh-Sandeepa/IA32_Decoder
mov_immediate.h
#include <stdio.h> #include <string> #include <queue> #include <map> #include <list> #include "common.h" using namespace std; class Mov_immediate { private: bool opSize; string regs_8[8]; string regs_16[8]; string regs_32[8]; public: Common common; queue<short> &instruction; map<string, ...
ALGO
0.95487
4.175705
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2021-08-14T05:10: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": "1bfbde1cd2...
fbc2e763-faaa-44c8-8a05-faab9e2578a6
dengbohhxx/vscode
leetcode/二叉搜索树中第K小的元素.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.999997
6.043155
{ "github_metadata": { "branch": "master", "commit_count": 725, "repo_created_at": "2020-09-25T03:35: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": "f7d89788...
e95a47e2-4422-4ada-8b49-351c9debe86b
touir1/ProblemSolving_Stuff
A2OJ - 222. Oil Skimming (cpp)/main.cpp
#include <bits/stdc++.h> #define f first #define s second #define endl '\n' #define init(M,x) memset(M,x,sizeof M) #define BE(x) x.begin(),x.end() using namespace std; const int oo=1e9; const int MAX=1010; const int UNVISITED=-1; typedef pair<int,int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef vector<v...
ALGO
0.999983
4.227657
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-08-19T00:17:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ce9173c27...
84efd3f2-4497-4496-8d3d-8c8a7ae1625f
ishandutta2007/codeforces-u
unstoppablechillmachine/normal/1637/D.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; #define F first #define S secondond #define pb push_back #define all(x) (x).begin(), (x).end() #define SZ(x) (int)(x).size() #define int ll const int N = 110; const int SM = 10010; int dp[N][SM], pref[N]; signed main() { i...
ALGO
0.999943
4.0856
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "8a259e8aa2dc...
90d424e6-5b8e-46f4-b116-b95980336043
claytonjwong/leetcode
contest090/contest090/main.cpp
/* Rank Name Score Finish Time Q1 (4) Q2 (5) Q3 (6) Q4 (9) 1009 / 4410 claytonjwong 9 1:26:03 0:15:02 1:16:03 2 Q1: https://leetcode.com/problems/buddy-strings/description/ A1: https://leetcode.com/problems/buddy-strings/discuss/141769/Straightfor...
ALGO
0.998868
4.998917
{ "github_metadata": { "branch": "master", "commit_count": 892, "repo_created_at": "2018-12-28T22:57:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "032d5c65...
758f12f0-8ab9-4f80-9eba-b255a6251593
erikbeebe/adventofcode2023
day3/solve.cpp
#include <bits/stdc++.h> #define S 140 class Solver { private: struct hasherizer { template <class T1, class T2> std::size_t operator() (const std::pair<T1, T2> &pair) const { return std::hash<T1>()(pair.first) ^ std::hash<T2>()(pair.second); } }; std::unique_ptr<std::...
ALGO
0.999834
5.365052
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-12-02T15:38: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": "8b707e6df462...
6753a0ce-7071-46bf-8043-ab9cfaae04ab
zhwj184/zhwj184-zoj
2727AC.cpp
#include <iostream> #include <string> #include <cctype> #include <cstdlib> using namespace std; typedef struct node{ char name[81]; int year; int price; }word; word words[101]; int n; int i,j; string test; int flag=0; char w[81]; int y,p; void sort() { if(flag==0) { for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) { ...
ALGO
0.997845
3.641902
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-03-14T15:00:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2382fb1d92...
74f26c7e-0230-4f23-bbf8-52c684c5ec81
BekzhanKassenov/olymp
acmp.ru/601...700/673/673.cpp
#include <iostream> #include <cstdio> using namespace std; int n, arr[30], mindig[30]; long long ans; bool cmp() { for (int i = 0; i < n; i++) { if (arr[i] != mindig[i]) return arr[i] < mindig[i]; } return false; } void update() { if (cmp()) memcpy(mindig, arr, sizeof ar...
ALGO
0.999773
3.491981
{ "github_metadata": { "branch": "master", "commit_count": 426, "repo_created_at": "2015-07-29T15:25:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2258f342...
330a9bac-062a-422b-a086-0364cfece2f7
alhussain-shaikh/AI
Uninformed Search/N-Queens/Nquens-dfs.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; bool isSafe(vector<int>& board, int row, int col) { for (int i = 0; i < row; ++i) { if (board[i] == col || abs(i - row) == abs(board[i] - col)) { return false; } } return true; } bool solveNQueensDFS(v...
ALGO
0.999974
6.051247
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-05-24T05:55: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": "7cf9d70dead7...
87536d52-764f-48a4-96df-0005216d7672
Satyam-Bhalla/CPP-Practice
Day-6-7/02-Complex_number.cpp
#include <bits/stdc++.h> using namespace std; class Complex{ int real; int img; public: Complex(){ real = 0; img = 0; } Complex(int r,int i){ real = r; img = i; } // Setters/ Set Values void setReal(const int...
ALGO
0.986838
5.32502
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-01-20T02:37:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ed08bdb63...
fb1794b3-1746-4787-8061-86436c26ffee
SterbenDa/NYOJ-Linda
大数/A-B problem/Untitled1.cpp
/*还是一道模拟题。 和上次的A+B四类似,先记录每个数字的符号,然后把符号去掉,处理每个数字的前缀0和后缀0,然后比较。 需要注意的是: 1、删前缀0的时候,整数必须保留一位。 2、只有小数才删后缀0。 3、注意+0 == -0。 [cpp] view plaincopy*/ #include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> const int M=100000; void back(char* c,int &l) { if(strchr(c,'.') == NULL) ...
ALGO
0.999823
3.837626
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-11-01T02:01: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": "ce9f4fe50e...
403832db-f0bd-4347-b5f2-2d8546114841
Aditya-devp/DSA-GeekforGeeks
POTD{GFG}/Word search.cpp
class Solution { public: int m, n; vector<vector<bool>> vis; bool isSafe(int x, int y){ return x>=0 && x<m && y>=0 && y<n; } bool dfs(int index, int x, int y, string target, vector<vector<char>>& board){ if(index == target.length()-1 ){ return true; } vis[x][y] = true; int dx[4] = { 1 ,...
ALGO
0.999796
6.112725
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2023-02-13T05:32:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99f1be7c336...
1ec77a21-101c-41cb-9e84-a830716e29bd
shineyr/LeetCode
40_Combination Sum II/main.cpp
#include <iostream> #include <cstdlib> #include <vector> #include <algorithm> using namespace std; class Solution { public: vector<vector<int>> combinationSum2(vector<int>& candidates, int target) { if (candidates.empty()) return vector<vector<int> >(); sort(candidates.begin(), candidates.end()); ret.clea...
ALGO
0.999989
5.432589
{ "github_metadata": { "branch": "master", "commit_count": 425, "repo_created_at": "2015-07-02T00:22:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5a8a5...
3d2114a3-19d1-4d34-a312-3762a1de7aaa
burakbayramli/books
Introduction_to_numerical_programming_using_Python_and_CPP_Beu/Ch13/C/P13-Poisson0.cpp
// Solves the 2D Poisson equation in a rectangular domain #include "memalloc.h" #include "pde.h" #include "graphlib.h" #define pi 3.141592653589793 double Func(double x, double y) // RHS function for Poisson0 { return cos(x+y) - cos(x-y); } int main(int argc, wchar_t** argv) { double **u, *x, *...
ALGO
0.999278
5.284068
{ "github_metadata": { "branch": "master", "commit_count": 652, "repo_created_at": "2016-10-31T17:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 325, "forks": 201, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0da...
dd445b7c-e56a-45a0-a567-731c720fad3b
bytedance/byteps
byteps/common/compressor/impl/randomk.h
// Copyright 2019 Amazon Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless req...
ALGO
0.9805
6.886448
{ "github_metadata": { "branch": "master", "commit_count": 432, "repo_created_at": "2019-06-25T07:00:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3686, "forks": 492, "issues": 106, "pull_requests": 7 }, "file_meta": { "content_id": "cc...
d6232f3b-074b-410e-9314-b6ef771c6b12
AMR-KELEG/competitive-programming
ICPC-Archive/6760.cpp
/* AC ACPC 2013 Generate patterns */ #include "bits/stdc++.h" using namespace std; int solve(int remS, int cur_player, int m, int last_rem =-1) { int prev_player = (cur_player-1) == 0 ? m: cur_player-1; if (remS<=0) return prev_player; if (remS==1) return cur_player; int next_player = (cur_player == m) ...
ALGO
0.999975
4.456432
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2017-09-15T12:36:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 2, "pull_requests": 3 }, "file_meta": { "content_id": "f3cc3a316...
845d3d83-16e3-4100-8292-db150ee34994
dmakger/MGOTY
18.05/5.cpp
/* 1. Программа начинает с функции `main()`. 2. Пользователю предлагается ввести строку с помощью сообщения "Введите строку: ". 3. Функция `std::getline(std::cin, input)` используется для чтения всей строки, которую ввел пользователь, и сохраняет ее в переменной `input`. 4. Затем вызывается функция `DigitCount(input)`,...
ALGO
0.999391
6.788273
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-05-18T09:58:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eccb3350b40...
eebee0d1-5821-42f2-863e-7e6547bd77f4
rhesus1/Finance
OptionPricing/Black_Scholes_FD_simd.cpp
#include "Black_Scholes_FD_simd.h" #include <cmath> #include <algorithm> #include <omp.h> #include <vector> #include <immintrin.h> using namespace std; // Constructor initializes finite difference grid with SIMD support Black_Scholes_FD_simd::Black_Scholes_FD_simd(double S0, double K, double T, double r, double sigma...
ALGO
0.999983
6.780257
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2025-05-23T22:54: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": "f9b34fbc764...
acf4c9a2-ddbd-4367-980d-083fa21f852c
PintaRam/c-coding
staff_menu.cpp
#include<iostream> #include<string> #include <algorithm> using namespace std; class staff{ public: string name ; float salary; int staff_id; public: void accept_data() { cout<<"Enter the name of a staff :"; cin>>name; cout<<endl<<"En...
TOOL
0.964435
3.363662
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-09-30T06:34: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": "96f33e263331...
56d97c53-3760-407e-8597-1e4ee767edba
Shubhadasalunkhe/ProbemSolving-
Factorials of large numbers - GFG/factorials-of-large-numbers.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { public: void multiply(vector<int>&arr,int &size,int multiplier) { int carry=0; for(int i=0;i<size;i++) { ...
ALGO
0.999928
5.846497
{ "github_metadata": { "branch": "main", "commit_count": 195, "repo_created_at": "2023-09-13T05:01: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": "b5f12e9b1e...
3dc13532-5ab1-4a1a-ac7b-19d49e522e8e
ishandutta2007/codeforces-a
anta.baka/normal/723/D.cpp
#include <bits/stdc++.h> #define all(a) (a).begin(),(a).end() #define sz(a) (int)(a).size() #define pb push_back #define mp make_pair #define ff first #define ss second using namespace std; typedef long long ll; typedef pair<int,int> pii; pii go[4] = {{0,1}, {0,-1}, {1,0}, {-1,0}}; vector<vector<pii>> oz; int main...
ALGO
0.999959
3.386286
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "a189a5f893f8...
6d3a954b-e789-43f9-a2cf-3353545a7b96
JayantGoel001/LeetCode
2246-maximum-employees-to-be-invited-to-a-meeting/2246-maximum-employees-to-be-invited-to-a-meeting.cpp
class Solution { public: int maximumInvitations(vector<int>& favorite) { int n = favorite.size(); vector<int> inDegree(n, 0); // Calculate in-degree for each node for (int person = 0; person < n; ++person) { inDegree[favorite[person]]++; } // Topological...
ALGO
0.999953
6.096342
{ "github_metadata": { "branch": "master", "commit_count": 7444, "repo_created_at": "2021-10-01T11:35:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5e0f1...
d7df9c47-592b-44e0-8352-9b12dc421c11
VijayNegi/LeetCodeProblems
solutions/902. Numbers At Most N Given Digit Set.cpp
class Solution { public:    int atMostNGivenDigitSet(vector<string>& digits, int n) {                int t = n;        vector<int> num;        while(t>0)       {            num.push_back(t%10);            t/=10;       }            int p = num.size();        int d = digits.size();        vector<int> di(d,...
ALGO
0.999892
6.792206
{ "github_metadata": { "branch": "main", "commit_count": 2443, "repo_created_at": "2021-08-14T18:40: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": "840c13cf7...
2902ffeb-83d5-4fc6-8485-5e4dba60db28
perlakay/Advanced-data-structres-practice
friendfunctions.cpp
#include <iostream> using namespace std; //Friend Functions //These functions has acess tp private and protected members of a class because of the friendship relationship class equalateralTriangle{ //these members are private, bec members of a class are private by default float a; //length of the side float...
TOOL
0.963998
5.986686
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-31T19:17: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": "e4db6bfe6855...
e24590f6-5274-4eed-9395-f3a5e83c5bab
maxsdrv/curious-eublefar
temp/main.cpp
#include <iostream> #include <algorithm> #include <iterator> #include <memory> #include <vector> #include <memory> #include <forward_list> #include <list> #include <cassert> #include <random> #include <map> #include "LinkedList.h" #include "MyArray.h" #include "BinarySearch.h" #include "profile.h" #include "StringSet...
ALGO
0.999346
3.341623
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-01-30T05:24: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": "7a4e0ed8509...