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
55ef9fd0-7dcc-44d5-b54c-c1ee262ce684
ssatendra790/CP
Chef_and_Asteroids.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long typedef unsigned long long ull; #define pii pair<int, int> #define pll pair<long long, long long> #define vi vector<int> #define vl vector<long long> #define mpl map<long long, long long> #define sl set<long long> #define sc set<char> #define printv(a) ...
ALGO
0.99989
4.46181
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-21T19:21: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": "26789153e253...
a8d8d594-8ce3-4df6-9fed-daecc678198c
kisuk010203/PS
C++/Greedy/2109.cpp
#include <bits/stdc++.h> using namespace std; typedef struct talk { int due; int weight; } talk; bool comp(const talk& a, const talk& b) { return a.due > b.due; } struct comp_pq { bool operator()(const talk& a, const talk& b) { return a.weight < b.weight; } }; int main() { cin.tie(0); ...
ALGO
0.999916
4.147909
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2023-08-16T13:07:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f669e157...
3ebf2b48-0c35-4c16-9a8f-4e7eb8fa8693
ricardo0129/KattisSolutions
datastructures/dsu/heatingup.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define pii pair<int,int> #define pll pair<ll,ll> #define vll vector<ll> #define FOR(i,n) for(int i=0;i<n;i++) #define pb push_back #define f first #define s second const int MOD = (int)1e9+7; vll A; int n; struct interval{ i...
ALGO
0.99999
4.325397
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-04-05T17:33:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c306380b609...
b85874e2-e4cb-4ac0-8224-826fc0ca9706
binsearch/code
spoj/courier.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <c...
ALGO
0.999946
4.116686
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2013-07-30T13:19:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7977caaa...
c9870605-f1e2-42d7-92bf-a3addbaccbe3
atul411/codeforces
cf1553B.cpp
#include <bits/stdc++.h> using namespace std; bool solve(string &s, string &t, int index1, int index2, bool forward) { if (index2 == t.size() - 1) return true; bool a = false, b = false; if (index1 + 1 < s.size() and s[index1 + 1] == t[index2 + 1] and forward) { a = solve(s, t, index1 + 1, index2 +...
ALGO
0.999979
5.154653
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2021-07-19T11:49: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": "509d2c7d...
d6e799ed-9ce3-483c-9beb-0ede90e7117a
gabriel88766/C-CPP-AlgorithmsAndContests
Codeforces/1512/F.cpp
#include <bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; const ll INF_LL = 0x3f3f3f3f3f3f3f3f, MOD = 998244353; //1e9+7 const int INF_INT = 0x3f3f3f3f; const long double PI = acosl(-1.), EPS = 1e-9; using namespace std; //cout << fixed << setprecision(6) int main(){ ios_base::sync_wi...
ALGO
0.999944
3.771808
{ "github_metadata": { "branch": "master", "commit_count": 436, "repo_created_at": "2020-08-21T00:21:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01374690...
487e6c0d-eafb-474b-b336-880cc1cedbc2
MingshanJia/DataFlowAnalysis
CloneBen/google_code/38/2/apiapiapiad_1_0.cpp
#include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <map> #include <set> #include <cassert> using namespace std; #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) #define pb push_back #define mp make_pair #define all(...
ALGO
0.999961
3.862771
{ "github_metadata": { "branch": "master", "commit_count": 802, "repo_created_at": "2019-10-14T10:49: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": "442609db...
fafbd4cb-9baf-4910-b614-784532f2607c
IsabelRivadero/ingencompu-informatica
Soluciones_Guia_6/Guia6E5.cpp
#include <iostream> using namespace std; // SOLUCIONARIO DE EJERCICIOS // // // <NAME> 6 N5 int main() { int M , N , i , j; double nota , prom = 0 , promgeneral = 0; cout << "Cantidad de parciales de cada estudiante? "; cin >> M; cout << "Cantidad de estudiantes? "; cin >> N; ...
ALGO
0.996383
3.586398
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-06-27T22:47: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": "794d515bfcbf...
549000da-4e95-463a-9c71-f11ef95f2c5a
iamkingalvarado/Problems
uva/10192.cpp
/* UVA Online Judge * Problema: 10192 - Vacation * Categoria: Taller de Programacion - Programacion Dinamica * * <NAME> - 24-12-2011 */ #include <vector> #include <cstdio> #include <cstring> using namespace std; /* El problema se puede modelar como un algoritmo conocido: Longest * Common Subsequence, el cual bu...
ALGO
0.999806
3.667572
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2013-09-30T03:47:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3658a8d5d...
415d9cb7-f9ed-48ad-b664-a174fbd82b12
offamitkumar/SPOJ
Classical/PT07Z.cpp
#include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <cstdio> #include <iostream> #include <string> #include <algorithm> #include <utility> #include <queue> #include <stack> #include <string> #include <cstring> #include <cmath> #include <map> #include <vector> #include <array> #include...
ALGO
0.99933
3.661833
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2020-01-27T12:03:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3891ad2...
d85e6dd2-bff1-4aed-bb89-b642015d3d3e
abhinav27s/Data-Structures-Algorithms
Stack&Queues/ValidParanthesis.cpp
/* Problem : Valid Parentheses Link : https://leetcode.com/problems/valid-parentheses/ */ class Solution { public: bool isValid(string s) { stack<int> st; for (int i = 0; i < s.length(); i++) { if (s[i] == '(' || s[i] == '{' || s[i] == '[') st.push(s[i]); else...
ALGO
0.998366
6.332613
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2021-04-09T13:51:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d48982ef417...
312bb316-2b45-4db2-af98-2163f6f2f5bc
AkVaya/CP_Solutions
Codeforces/799B.cpp
#include<iostream> #include<math.h> #include<algorithm> #include<stdlib.h> #include<stack> #include<set> #include<string.h> #include<map> #include<unordered_map> #include<vector> #include<bitset> #include<iomanip> #include<queue> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define en...
ALGO
0.999979
3.946254
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2020-01-09T10:12: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": "60418a95a...
d29a0b1a-d0df-4e35-9fd7-1b8ea7a8c093
sheroxsyer/Data-Structures-Lab
NEW LABS/LAB 7/Question2.cpp
#include<iostream> using namespace std; class Queue{ private: int *arr; int size; int *rear; int * front; // Index int noOfElemets; public: Queue(int size){ this->size= size; arr= new int[size]; *rear= -1, front=rear,noOfElemets=0 ; } ~Queue(){ ...
ALGO
0.999188
4.271122
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-10-28T14:13: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": "682fa97761c...
ab4562d8-9493-4465-b109-b142aa565880
ZoranPandovski/al-go-rithms
dp/longest_common_subsequence/cpp/lcs.cpp
#include <iostream> #include <string.h> #include <algorithm> void LCS(char A[], char B[]) { int m = strlen(A); int n = strlen(B); int D[m + 1][n + 1]; /* Following steps build D[m+1][n+1] in bottom up fashion. Note that D[i][j] contains length of LCS of A[0..i-1] and B[0..j-1] */ for (int i = 0; i <= m; +...
ALGO
0.999848
4.352334
{ "github_metadata": { "branch": "master", "commit_count": 7457, "repo_created_at": "2017-06-05T19:20:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1359, "forks": 1929, "issues": 20, "pull_requests": 44 }, "file_meta": { "content_id": ...
c4a916d0-4d0e-4434-bae4-b16f606f0952
inte2000/code_for_algo_book
second_edition/code04/max_match/max_match.cpp
// max_match.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <locale> #include <iostream> #include <string> #include <algorithm> #include <map> #include <vector> typedef struct { int max_len; std::map<int, std::vector<std::wstring>> words; }WORD_DICT; void InitDict(...
ALGO
0.99761
4.396698
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-11-28T14:24:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 134, "forks": 46, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "621f45b...
3bde7717-7c05-4cd0-9ba2-f1816de888f6
ochsnerd/numpde
series0_handout/2d-poissonlFEM/dirichlet_boundary.hpp
#pragma once #include <Eigen/Core> #include <igl/boundary_facets.h> #include <igl/unique.h> #include <igl/setdiff.h> #include <igl/colon.h> //! Finds the boundary and interior vertices, and evaluates //! the function g on the boundary vertices. //! //! @param[out] u should be of size <number of vertices>. At the end...
ALGO
0.999106
6.408894
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2019-09-19T07:04:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c910af09...
95194c58-547b-4eae-90ae-c1a46b52e9d7
visheshgargavi/mission_faang
Daily_Coding_problems/41.cpp
/* This problem was asked by Amazon. Run-length encoding is a fast and simple method of encoding strings. The basic idea is to represent repeated successive characters as a single count and character. For example, the string "AAAABBBCCDAA" would be encoded as "4A3B2C1D2A". Implement run-length encoding and decoding...
ALGO
0.999961
5.311276
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2022-03-15T16:41:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1806638d9...
969f6196-de8e-4bad-b668-da30ce0f053b
ET-Luo/DSAA
Lab_9/Project1/F_handle.cpp
#include<iostream> #include<cstdio> #include<algorithm> #include<vector> #include<queue> using namespace std; typedef long long int ll; vector<Edge>edge[(int)5e4 + 10]; int query[(int)5e4 + 10]; ll ans[(int)5e4 + 10]; priority_queue<Road>pr_queue; #define MAX_VERTEX 60 typedef char DataType; typedef struct { int...
ALGO
0.999955
3.720519
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-02-24T11:37:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3fd57d4bb8...
ef4aca8c-8f36-4b65-8316-943709c512b8
maywzh/leetcode_solutions
1261.在受污染的二叉树中查找元素.cpp
/* * @lc app=leetcode.cn id=1261 lang=cpp * @lcpr version=20002 * * [1261] 在受污染的二叉树中查找元素 */ // @lcpr-template-start using namespace std; #include <algorithm> #include <array> #include <bitset> #include <climits> #include <deque> #include <functional> #include <iostream> #include <list> #include <queue> #include <...
ALGO
0.999716
6.675288
{ "github_metadata": { "branch": "master", "commit_count": 1362, "repo_created_at": "2020-06-14T15: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": "af28a8d...
29828408-b73f-4ed0-a0c1-685594404d03
nerds-coding/CPP_DSandAlgo_and_CP
CodeChefMedium/Stacks.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <map> #include <unordered_map> #include <set> #include <...
ALGO
0.999942
3.393138
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2020-12-30T05:08: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": "79d699f9c...
11be577d-0871-4f52-a105-c6d6b2bea279
Astrodynamic/Ant-colony-optimization-algorithm-in-Qt-CPP
aco/aco.cc
#include "aco.h" std::random_device AntNet::rd; std::default_random_engine AntNet::generator(rd()); std::uniform_real_distribution<double> AntNet::distribution(min_random_value, max_random_value); AntNet::AntNet(Graph &distance, const double init_pheromon_va...
ALGO
0.999914
5.701379
{ "github_metadata": { "branch": "develop", "commit_count": 9, "repo_created_at": "2023-02-12T03:14:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f39a3d51...
3e9778e8-9369-495e-bfa8-9e73fd78d904
usedtobesaint/CSSW
source/errors.cpp
#include "parser.h" #include <regex> #include <string> #include <vector> #include <stack> #include <iostream> #include <cctype> #include "../imgui/imgui.h" #include "../imgui/imgui_impl_dx9.h" #include "../imgui/imgui_impl_win32.h" using namespace prsr; // List of available functions const std::vector<std::string> fun...
TOOL
0.928258
5.604109
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2024-10-24T22:18:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76079b5aa2...
eff47554-4f58-41e5-93a7-e97e126e8222
ghaee/2020
Coding/inflearn/Section1/Q20.cpp
#include <iostream> #include <string> #include <fstream> #include <time.h> using namespace std; int main(int argc, char** argv){ for(int j = 1; j <= 5; ++j){ string result,answer; int n,max,cnt=0,tmp; int a[101],b[101]; ifstream fin; fin.open(argv[j]); if(!fin.is_open()){ cout << "cannot open input f...
ALGO
0.997227
3.231859
{ "github_metadata": { "branch": "master", "commit_count": 318, "repo_created_at": "2020-01-22T05: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": "ad7fb0cf...
d32ee3ac-1d7a-4eb5-958d-5301c1990dc8
Heavenston/CppBrim
vm/compiler.cpp
#include <string> #include <array> #include <map> #include "compiler.h" #include "chunk.h" #include "vec.h" #include "opcode.h" using namespace brim; using namespace std; bool token_is(const Token *token, TokenType type) { if (token == nullptr) return false; return token->type == type; } struct State { ...
TOOL
0.935893
5.496755
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2020-07-07T12:00: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": "14f5411dc...
05124655-2f9b-4843-80e7-082e322e4a6d
zcPasser/leetcode_cpp
SolutionSP29.h
#pragma once #include<vector> using namespace std; class SolutionSP29 { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { int m = matrix.size(); if (m == 0) { return {}; } int n = matrix[0].size(); vector<int> ans(m * n); int min_ = min(m, n...
ALGO
0.999997
6.559003
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-06-04T12:50: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": "08b7269f840f...
ef06fd95-9d2b-419f-a62d-97e7aacdc8b6
LLNL/RAJA
include/RAJA/pattern/detail/reduce.hpp
/*! ****************************************************************************** * * \file * * \brief Base types used in common for RAJA reducer objects. * ****************************************************************************** */ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
TOOL
0.931211
6.339961
{ "github_metadata": { "branch": "develop", "commit_count": 11688, "repo_created_at": "2016-04-28T23:46:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 527, "forks": 105, "issues": 202, "pull_requests": 31 }, "file_meta": { "content_id": ...
89ebd68a-95d7-4f2b-aec4-e9e76c4c9f64
binneyox/VS
orbit_lyapunov.cpp
#include "orbit_lyapunov.h" #include "potential_utils.h" #include <cassert> #include <cmath> #include <algorithm> namespace orbit{ namespace{ /// initialize the deviation vector always with the same sequence (not sure if it's optimal); /// the choice below produces comparable and incommensurable values of components,...
ALGO
0.999078
6.144926
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2023-06-22T13:36: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": "4e110108a...
82d76704-bd69-4007-908b-9b4648d02244
pydxflwb/LeetCodePractice
#normal/reverseList.cpp
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){} }; // 递归全翻转 ListNode* reverseRecurrence(ListNode* head){ // 边界处理 if (head==nullptr) return nullptr; // base case ...
ALGO
0.999984
5.301332
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2020-11-25T07:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78fbf814c073...
876384b0-fb1a-4a74-a952-811243014f6e
Durjoy001/Data-Structure-and-Algorithms
Recursion and Backtracking/Backtracking/N Queens ii.cpp
//https://leetcode.com/problems/n-queens-ii/ class Solution { public: void solve(int col,int &ans,vector<string>&board, vector<int>&leftRow,vector<int>&upperDiagonal,vector<int>&lowerDiagonal,int n){ if(col == n){ ans++; return; } /*for upper left ...
ALGO
0.999946
6.003848
{ "github_metadata": { "branch": "master", "commit_count": 818, "repo_created_at": "2020-08-04T19:20:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a7767a3...
271c519a-ce43-4dcf-aebe-28c3d871ea50
plenilune3/problem_solving_cpp
beakjoon/BaaaaaaaarkingDog/Recursion/1662_압축.cpp
#include <iostream> #include <stack> using namespace std; const int MAX = 51; string str; string answer; int bracket[MAX]; int decompress(int left, int right); int main(int argc, char const *argv[]) { cin >> str; int length = (int) str.size(); stack<int> s; for (int i = 0; i < length; i+...
ALGO
0.999646
4.125243
{ "github_metadata": { "branch": "master", "commit_count": 710, "repo_created_at": "2020-04-06T05:39: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": "40cee161...
64fe5832-5e76-427b-b27a-77047d7fa923
pavelsimo/ProgrammingContest
topcoder/PastContest/MagicStonesStore.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <list> #include <bitset> #include <deque> #include <numeric> #include <iterator> #include <cstdio> #include <cstdlib> #include <cstring> #include <ccty...
ALGO
0.999748
4.886208
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2014-10-16T15:16:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c99740e7a8...
25c7c56c-3b21-4bfe-97f1-2e422a27f256
suraj-iitb/algorithm-identification
BERT/Data_Dump/Merge/C++/Code/merge4941032.cpp
#include <iostream> using namespace std; int cnt = 0; const int INF = 2e9; void merge(int *A, int left, int mid, int right) { int n1 = mid - left; int n2 = right - mid; int L[n1],R[n2]; for (int i = 0; i < n1; i++) L[i] = A[left + i]; for (int i = 0; i < n2; i++) R[i] = A[mid + i];...
ALGO
0.999967
3.861302
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2020-05-24T06:21:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 10 }, "file_meta": { "content_id": "ef2477749...
ba0af1f5-9018-4977-bf80-5375e99ad52e
danwyk/exercise_easy_cplusplus
6_find_closest_value_bst_V1.cpp
#include <cmath> #include <float.h> using namespace std; class BST { public: int value; BST *left; BST *right; BST(int val); BST &insert(int val); }; int Helper(BST *tree, int target, int closet); int findClosestValueInBst(BST *tree, int target); int findClosestValueInBs...
ALGO
0.999995
5.21937
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2022-07-21T22:52: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": "bc6634b7b72...
8a66eb0b-48a6-42c9-bc99-040e9b3c2980
EmmanuelEmu/DSA_-_leetcode
0392-is-subsequence/0392-is-subsequence.cpp
class Solution { public: bool solve(string& s, string& t, int i, int ind, int n, vector<vector<int>>& dp) { if (i == s.size()) { return true; } if (ind == n) { return false; } if (dp[i][ind] != -1) { return dp[i][ind]; ...
ALGO
0.999967
6.460539
{ "github_metadata": { "branch": "master", "commit_count": 1070, "repo_created_at": "2024-07-12T20:20: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": "b20ddfd...
02bdf02f-63a6-4954-bcd5-8a98410aa2cd
Infra17/Problem-Solving-for-Codes
Easy Implement for Beginners Practice/Encoding Function.cpp
#include <bits/stdc++.h> using namespace std; string encode (string s, int k) { for(int i=0; i<s.length(); i++) { if(isalpha(s[i])) { if(s[i]<91) { s[i]+=k;if(s[i]>90) s[i]-=26; } else {s[i]+=k;if(s[i]>122) s[i]-=26;} } } ...
ALGO
0.999764
4.109922
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2020-07-15T07:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c74471fb...
3bf0d01a-96f8-4606-9a1b-f62e989866c9
yuejiangw/leetcode-1
tree/top-down/104.maximum-depth-of-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int maxDepth(TreeNode* root) { topdown(root, 0); return maxDept...
ALGO
0.999915
5.425739
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2022-01-13T18:06: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": "e01007078...
22763231-bfdb-44e2-8120-301605fbaf2c
reverse-engineering789/B_DSA
Lecture_061_Queue_Faang_Interview_Questions/061_01_Queue_Reversal.cpp
// Queue Reversal // BasicAccuracy: 77.98% // Submissions: 55054 // Points: 1 // Given a Queue Q containing N elements. The task is to // reverse the Queue. Your task is to complete the function // rev(), that reverses the N elements of the queue. // Example 1: // Input: // 6 // 4 3 1 10 2 6 // Output: // 6 2 10...
ALGO
0.999588
4.902129
{ "github_metadata": { "branch": "main", "commit_count": 716, "repo_created_at": "2022-01-28T17:57: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": "195d430dcc...
bd64ca9a-e45a-4e5b-b23f-25b1c9c04877
vladyushchenko/optimization-algorithms-project
optimizationproblem.cpp
#include "optimizationproblem.h" OptimizationProblem::OptimizationProblem() { } OptimizationProblem::OptimizationProblem(unsigned int rectangleCount, unsigned int boxLength, unsigned int minSideLength, unsigned int maxSideLength) { _rectangleCount = rectangleCount; _boxLength = boxLength; _minSideLength =...
ALGO
0.999917
5.062951
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-03-05T08:25: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": "53a7fff56e...
ded4a839-4ea9-45d8-9a92-62c3de389095
chosanglyul/PS
ICPC-Internet/2023/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define fi first #define se second const int MAX_N = 50000 + 1; vector<int> adj[MAX_N]; vector<int> gbadj[MAX_N]; int gb[MAX_N]; void dfs(int here, int par, vector<int>& nodes) { nodes.push_back(here); for (int th...
ALGO
0.999993
4.373664
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2021-02-15T09:25: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": "f652dc13e67...
128994c7-c890-48c9-a490-b259cb2c3619
ngyngcphu/Data-Structures-and-Algorithms
Sorting/Array_Sort.h
#ifndef ARRAY_SORT_ #define ARRAY_SORT #include "main.h" template<class T> class Sorting { private: static void printArray(T* start, T* end) { int size = end - start; for (int i = 0; i < size - 1; ++i) { cout << start[i] << ", "; } cout << start[size - 1]; ...
ALGO
0.999713
5.253165
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-12-10T03:49:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba3c0a99e79d...
55044785-c278-4367-9abb-f92b1887c597
2018331109/CodeForces
1957C.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define yes cout << "Yes" << endl; #define no cout << "No" << endl; #define neg cout << -1 << endl; #define pb push_back #define ss second #define ff first const int INF = 1e18; const int md = 998244353; const int mod = 1e9 + 7; const int N=3e5+5; vec...
ALGO
0.999744
4.723492
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2023-09-01T01:29: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": "16b47f4da8...
907d1b61-c295-431f-8e91-3d26a1cc0129
WangLaban/LeetCode
37_SudokuSolver.h
/* Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: Each of the digits 1-9 must occur exactly once in each row. Each of the digits 1-9 must occur exactly once in each column. Each of the the digits 1-9 must occur exactly once in each of the ...
ALGO
0.999702
6.907187
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2018-08-27T06:16: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": "2c522dca...
6512e465-245e-4936-a96c-08029fabca9c
Xilinx/Vitis-In-Depth-Tutorial
Runtime_and_System_Optimization/Feature_Tutorials/02-using-multiple-cu/reference-files/solution/src/host/filter2d.cpp
#include "filter2d.h" #include "window2d.h" void Filter2D( const short coeffs[FILTER2D_KERNEL_V_SIZE][FILTER2D_KERNEL_H_SIZE], unsigned char *srcImg, unsigned int width, unsigned int height, unsigned int stride, unsigned char *dstImg ) { Window2D<FILTER2D_KERNEL_H_SIZE, FILTER2D_KERNEL_V_...
ALGO
0.997479
5.753294
{ "github_metadata": { "branch": "master", "commit_count": 1381, "repo_created_at": "2020-07-31T17:47:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 118, "forks": 70, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "7fe56...
c68d2e74-cebb-4a8e-b0e0-3e7fa56a3825
hungphamphu99/hungphamphu
Algorithms and Data Structures/PhamPhuHung-BA12-081-Lab2/ex1.cpp
#include <iostream> #include <vector> class UnboundedInteger { private: int sign; std::vector<int> digits; public: UnboundedInteger() { sign = 1; } void addDigit(int digit) { digits.insert(digits.begin(), digit); } void removeDigit(int position) { if (position >=...
ALGO
0.994092
6.745553
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-10-10T15:39: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": "531fa0b8961...
c0d026b8-e2e1-4796-a57f-a35b6cbe1275
ruslannm/stepic-course-41234
main_2_3_1.cpp
#include <stdio.h> #define MAXN 100005 //Построение кучи int main() { int i; int j; int n; int tmp; int l; int r; int i_max; int i_result; int result[MAXN][2]; int a[MAXN]; // scanf("%d", &n); n = 100000; i = -1; while (++i < n) { a[i] = n - i; //scanf("%d", &a[i]); } ///7 6 5 4 3 2 /* a[0] = 7...
ALGO
0.999841
3.132697
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-05-13T15: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": "e6bcd3c94...
23a5315c-b696-41f5-adcf-8097089ad9c5
Swarnadeep08/Round-Robin
main.cpp
#include <iostream> #include <cstdio> using namespace std; struct PCB { int pid, arrival, burst, rem_burst, turnaround, waiting; }p[10], temp; void pline(int x){ for(int i=0; i<x; i++){ cout<<"-"; } cout<<"\n"; } int main() { int i, j, num, count, quantum, qt, ex=0, total_tat=0, total_wt=...
ALGO
0.999918
3.756905
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-01-12T17:31:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aca623372a22...
ce4c3644-8a52-4c1c-b208-d1eaccb3a339
yashyc7/GFG-Question-Solving-Series
Easy/Left most and right most index/left-most-and-right-most-index.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: long FirstOccurence(vector<long long>arr,long long key) { int s=0; int e=arr.size()-1; int mid=s+(e-s)/2; int ans=-1; while(s<=e) { ...
ALGO
0.999237
5.835993
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2023-03-06T03:30: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": "e079e22cfc7...
17483805-bcb6-4f21-a4b8-ecccc5d81b21
jonatas57/maratona
cf/contest/1371/e1/e1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<bool> vb; typedef map<int, int> mii; typedef pair<int, int> ii; #define INF 0x3f3f3f3f #define INFLL 0x3f3f3f3f3f3f3f3f...
ALGO
0.99999
3.434686
{ "github_metadata": { "branch": "master", "commit_count": 225, "repo_created_at": "2019-02-13T13:09:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "debaac22...
a352a7fa-f53b-4f91-afe5-7cf608b9d19c
shu-bha-m-patil/DSA
DataStructures/15_Stack/Stack_LinkedList.cpp
#include <iostream> struct LinkedList { int _data; LinkedList* _next; LinkedList(int iVal) { _data = iVal; _next = nullptr; } }; struct Stack { LinkedList* _head; Stack() { _head = nullptr; } void Push(int iVal) { LinkedList* newNode =...
ALGO
0.998177
4.655433
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-01-24T09:29: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": "4b6c68e64d97...
d974f7bf-b3e9-4dab-a0a7-dad6c20b1b4c
nhrt/Genetic-Algorithms
TSP/src/genetic_algorithms/selection.cpp
// // Created by <NAME> on 21.12.2020. // #include <iostream> #include "selection.h" Population selection_sotf(Population &p_old, Population &p_new) { if (p_old.size() != p_new.size()) { std::cerr << "Populations have different sizes" << std::endl; exit(1); } int size = (int) p_old.size();...
ALGO
0.999584
4.889839
{ "github_metadata": { "branch": "main", "commit_count": 236, "repo_created_at": "2020-11-17T12:04:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "330036bc53...
6c83cee4-1215-4322-9c55-357b4a6d3ed8
Alyaska53/textAI-release
plagiarism.cpp
#include <iostream> #include <string> #include <stdio.h> #include <stdlib.h> #include <cmath> using namespace std; double antiPlagiarism(string text, string fragment); int getLength(string text); bool isSeparator(char c); bool isNumber(char c); bool isSmallWord(string word); bool isWrongWord(string word); void cutSep...
ALGO
0.994251
3.679457
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-06-14T10:20:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac4f3253a1d...
13d40f9e-03a3-4047-a0fe-57814016063d
dreamiond/LeetCode
leetcode_1074.cpp
//leetcode1074:Number of Submatrices That Sum to Target /* Given a matrix, and a target, return the number of non-empty submatrices that sum to target. A submatrix x1, y1, x2, y2 is the set of all cells matrix[x][y] with x1 <= x <= x2 and y1 <= y <= y2. Two submatrices (x1, y1, x2, y2) and (x1', y1', x2', y2') are di...
ALGO
0.999962
6.07718
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-08-28T02:10: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": "ae344e2f9...
accfa1d5-3d32-4f05-ab22-79437444d101
Imperi13/Competitive-programming
lib/RBST.cpp
#include <cassert> #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #inc...
ALGO
0.999752
5.604643
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2019-08-19T19:08: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": "317e09158...
4c760320-252d-482d-bc2d-2b521249acb7
DHEERAJHARODE/Hacktoberfest2024-Open-source-
Height_Of_Tree.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node* left; struct Node* right; Node(int x) { data = x; left = right = NULL; } }; /* 3 STEPS FOR RECURSION 1)DESIGN STEP 2)INDUCTION STEP 3)BASE STEP */ int height(Node* root) { if(root == NULL) //Base Step return 0; int le...
ALGO
0.999942
4.772983
{ "github_metadata": { "branch": "main", "commit_count": 945, "repo_created_at": "2020-10-03T04:58:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 473, "forks": 3840, "issues": 177, "pull_requests": 1367 }, "file_meta": { "content_id": "...
506ca143-1ae1-4555-8ba9-9b533eb13bb0
kumar-karan/Supreme-Code
Stacks2/Stack4/nextSmallerElement.cpp
#include<iostream> #include<vector> #include<stack> using namespace std; vector<int> nextSmallerElement(vector <int> &input) { stack<int> s; s.push(-1); vector<int> ans(input.size()); for(int i= input.size()-1; i>=0; i--) { int curr = input[i]; while(s.top() >= curr) { ...
ALGO
0.999995
5.067568
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-19T14:33: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": "eee3f9eb8da4...
bfdb9f60-279f-4dde-ace0-d26b555d0e98
hey2022/competitive-programming
usaco/712.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using db = long double; using str = string; using pi = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<db, db>; using pb = pair<bool, bool>; using pc = pair<char, char>; using ps = pair<str, str>; template <typename T, int Size> using arr =...
ALGO
0.999902
3.61044
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-04-10T19:25:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b30e7ee67f...
00c7d7d6-36f7-4212-8b44-5e36da7d2631
gs22006/Baekjoon
백준/Platinum/7574. 개구리/개구리.cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; struct sq1 { ll x, y; ll num; bool operator < (const sq1 &xx) const { return x < xx.x; } }; struct sq2 { ll x, y; ll num; bool operator < (const sq2 &xx) const { return y < xx.y; } }; ll n, ...
ALGO
0.999822
3.423126
{ "github_metadata": { "branch": "main", "commit_count": 810, "repo_created_at": "2022-09-22T00:45:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa6653cb92...
a43a2706-1cf6-467b-a793-a2182c28e51e
AnushkaPhogat16/DSA_trees
733-flood-fill/flood-fill.cpp
class Solution { public: void dfs(vector<vector<int>>& image, int x, int y, int orgColor, int newColor, int n, int m) { // Base condition if (x < 0 || y < 0 || x >= n || y >= m || image[x][y] != orgColor) return; image[x][y] = newColor; // 4 directions: up, right, down,...
ALGO
0.999475
6.775095
{ "github_metadata": { "branch": "main", "commit_count": 646, "repo_created_at": "2025-03-27T13:43: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": "d55333ba62...
738884dd-cb27-4165-a00b-a211e6f6e91e
ashwin1104/Data-Structures-Implementations
lab_trees/binarytree.cpp
/** * @file binarytree.cpp * Definitions of the binary tree functions you'll be writing for this lab. * You'll need to modify this file. */ #include "TreeTraversals/InorderTraversal.h" #include <iostream> /** * @return The height of the binary tree. Recall that the height of a binary * tree is just the length o...
ALGO
0.999804
5.872282
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2020-09-18T08:46:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2818fce5...
aec0067c-5272-4a1c-baa6-7d4e312a73f3
rohan3004/GeeksforGeeks-Solution
Difficulty: Medium/nCr/n-cr.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int nCr(int n, int r) { // If r is more than n, no valid combinations if (r > n) return 0; // Take advantage of symmetry: C(n, r) == C(n, n-r) if (r > n -...
ALGO
0.999898
6.470128
{ "github_metadata": { "branch": "main", "commit_count": 269, "repo_created_at": "2025-03-10T10:00: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": "559125daa8...
7f48bed5-a967-4194-a482-2f5671ed9d90
Wyss/mauve-py
mauve/src/mauveAligner/src/projectAndStrip.cpp
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include <string> #include <fstream> #include <vector> #include <algorithm> #include <iostream> #include <sstream> #include "libGenome/gnFilter.h" #include "libMems/IntervalList.h" #include "libMems/MatchList.h" #include "libMems/GappedAlignment.h" #include "libMems/Matr...
DATA
0.956983
4.584918
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2014-07-23T20:58:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac29652d33...
60bda18e-145d-42a0-9a60-4e292900a2e0
claraiglesias/Vector3D
Vector3D.cc
#include "Vector3D.h" #include <iostream> #include <cmath> //defino como van a ser os novos operadores e as funcións using namespace std; Vector3D::Vector3D() { x1_=0.; x2_=0.; x3_=0.; } Vector3D::Vector3D(double x1_, double x2_, double x3_) { x1_=x1; x2_=x2; x3_=x3; } //operators //interactio...
TOOL
0.90701
4.974831
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-11-15T19:24: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": "cd632c1fb813...
65037ad4-6698-468a-af89-1a8ef3040f5f
swe-ta-gup-ta/DSAandCP
DSA/BINARYSEARCH/BSonAnswers/MinDaysTomakeBouquets/bf.cpp
// TC = O((maxEle(arr)) * (n)) // SC = O(1) #include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <climits> using namespace std; bool possible(vector<int> &arr, int day, int m, int k) { int n = arr.size(); //size of the array int cnt = 0; int noOfB = 0; for (int i = 0;...
ALGO
0.999998
5.053014
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2025-04-24T08:32:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c14616b5cd0...
6b1297db-d9eb-41a4-9b1e-3fb8a6a213fc
fengrenchang86/PKU
3067/3948396_WA.cpp
#include<iostream> #include<stdlib.h> using namespace std; struct ac { int x, y; }a[1020000]; struct TREE { int val, cover; }tree[600000]; int N, M, K; int tmax; int cmp(const void*a, const void*b) { struct ac*c = (ac*)a; struct ac*d = (ac*)b; if(c->x != d->x) return c->x - d->x; else return c->y - d->y; } vo...
ALGO
0.999894
4.031843
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-03-07T13:40: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": "3e58a5d699...
279c551d-902d-4595-ba1b-76024da2afa2
OpenModelica/OpenModelica
OMCompiler/SimulationRuntime/OMSICpp/runtime/include/Solver/CVode/CVode.h
/** @defgroup solverCvode Solver.CVode * CVode class wrapper from sundials package * @{ */ #pragma once #include "FactoryExport.h" #include <Core/Solver/SolverDefaultImplementation.h> #include <cvode/cvode.h> #include <nvector/nvector_serial.h> #include <sunlinsol/sunlinsol_dense.h> /* Default dense linea...
ALGO
0.994941
6.542727
{ "github_metadata": { "branch": "master", "commit_count": 37531, "repo_created_at": "2015-05-03T16:59:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1002, "forks": 322, "issues": 2061, "pull_requests": 46 }, "file_meta": { "content_id":...
610c9b4b-3ac8-46f1-ba9f-001bd7e55a3f
MDB5643/EECS-560
graphs-lab-11/src/main.cpp
#include <iostream> #include <fstream> #include <string> #include <sstream> #include "util/util.hpp" #include "graph.hpp" #include "lib/doubly-linked-list/list.hpp" //////////////////////////////////////// // You may not change this main file. // // You can create a new main file for // // your debugging purposes ...
ALGO
0.925915
4.42668
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-05-29T22:09:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f123987c18...
13d7935c-6f6e-471b-bd0c-feb7b6610c6a
vologue/os_lab
Replacement_Algorithm/lru.cpp
#include<iostream> #include<algorithm> using namespace std; struct page{ int time; int num; }; bool checkin(page *ar,int n,int num,int m){ //Returns 1 if the page already is in the memory for(int i=0;i<n;i++){ if(num==ar[i].num){ ar[i].time=m+1; return 1; } ...
ALGO
0.999973
3.505147
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-04-08T16:13: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": "a8b33f6c63...
d1463865-be0f-4637-9726-5c2a0e7cec31
Tatsu-Archive/Data-Structure-Lab
Cycle-1/qn7.cpp
#include<iostream> using namespace std; void read_array(int arr[], int size){ cout<<"Enter the Elements of the array : "; for( int i =0 ;i<size; i++){ cin>> arr[i]; } } void print_array(int arr[], int size){ cout<<"\nThe Elements of the array are : "; for( int i =0 ;i<size; i++){ co...
ALGO
0.999537
3.888565
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-06-29T15:30:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32a70c5a3870...
d7541ca3-4d19-4aee-a5bc-700231671e82
imashen/zerotier-aio
generator/node/C25519.cpp
/* <NAME> Public domain. Derived from public domain code by <NAME>. */ // Modified very slightly for ZeroTier One by <NAME> // This code remains in the public domain. #include <stdint.h> #include <stdlib.h> #include <string.h> #include "Constants.hpp" #include "C25519.hpp" #include "SHA512.hpp" #include "Buffer.hpp"...
ALGO
0.999656
3.296564
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2024-06-22T07:32:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a06c9b7a...
a9fba2fd-f827-4f79-a3eb-5280cdf37327
AdityaBhutani/programs
find_all_numbers_disappeared_in_an_array.cpp
// https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array #include <iostream> #include <vector> using namespace std; // using another array to maintain which array element is not avaiable in given array nums vector<int> findDisappearedNumbers_using_another_array(vector<int>& nums) { vector<int> nums_c...
ALGO
0.999593
5.454689
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-02-13T08:51: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": "0bd60770a...
42b34975-65ed-457b-b390-0e0b9447e056
trgreen731/OddsBooster
ProjectFiles/App_Samples/blackjackstrategy.cpp
#include <iostream> #define HIT 0 #define STAND 1 #define DOUBLE 2 #define SPLIT 3 /* NOTE: The strategy implemented in this program is a modified version of the "Super-Easy" Blackjack strategy accessed from http://blackjackcalculation.com/. The getRecommendedPlayerAction function follows these guidelines: * [...
ALGO
0.98574
6.418569
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2022-02-02T20:46:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d87dcdf1...
3a0aabfd-2f63-4665-b7f0-ebc7e941560e
bwbwbwbw/USACO-solutions
Section 1.2/Transformations/transform.cpp
/* ID: vistasw2 PROG: transform LANG: C++11 */ #include <string> #include <iostream> #include <fstream> using namespace std; int n; string rotate90(string map) { char *ret = new char[map.size() + 1]; ret[map.size()] = '\0'; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { ...
ALGO
0.999992
3.650118
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2014-07-21T13:08:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7282bc3c5...
4305a5d9-a951-491e-95d4-bf650bd13528
rads560/advent-of-code-cpp
Day1/main.cpp
#include <iostream> #include <fstream> #include <vector> std::vector<int> parseInput(std::string filename) { std::string line; std::ifstream input; std::vector<int> depths; int32_t depth; input.open(filename); while (std::getline(input, line)) { depth = atoi(line.c_str()); dept...
ALGO
0.999763
5.963346
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-05-30T02:55:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06fda79ddd51...
af1d603f-e5a8-48bd-967f-acdc598f3960
Charleo85/uvaicpc
code/2004/merging_maps.cpp
#include <stdio.h> #include <string.h> #include <algorithm> using std::max; using std::min; // information about a map: its numbers of rows and columns, and its features struct MAPS { int n, m; char feature[100][100]; }; // info about merging two maps, including its scores and the offset in the // horizontal...
ALGO
0.999473
3.599896
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2017-01-20T19:32:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b63a10082...
8e099ec4-744a-4260-ab82-f7f1fee44c46
Eisenwave/advent-of-code-2021
day13-2.cpp
#include <vector> #include <string> #include <sstream> #include <iostream> using namespace std; using ull = unsigned long long; void foldv(vector<vector<int>> &paper, ull &w, ull &h, ull at) { for (ull y = 0; y < h; ++y) { for (ull i = 0; i < w - at; ++i) { paper[y][at-i] |= paper[y][at+i]; ...
ALGO
0.999846
4.37956
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-12-03T11:47:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8eb9ba7cbc5...
e4073ce3-ec5c-4925-a6c4-676022845820
cubercsl/The-road-to-ACMer
Spring2019/Week06/K.cpp
#include <bits/stdc++.h> using ll = long long; const int MAXS = 2000010; int t; char a[MAXS], b[MAXS]; namespace CSL { const int N = 2000005; char s[N], str[N << 1]; int p[N << 1]; void Manacher(char s[], int& n) { str[0] = '$', str[1] = '#'; for (int i = 0; i < n; i++) str[(i << 1) + 2] = s[i], str[(i << 1...
ALGO
0.999918
4.146068
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2017-04-28T00:42:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 54, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6de2923...
bf069c2b-66ef-4368-b45b-997c3103e69e
gabsizinio/CP
C2_Ladders/800/Make_Even.cpp
#include <iostream> #include <string> using namespace std; int main() { int T; cin >> T; while (T--) { string pal; cin >> pal; int val = stoi(pal); if (val % 2 == 0) { cout << 0 << "\n"; continue; } string aux = ""; ...
ALGO
0.999687
3.95997
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-01-02T12:26: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": "6c4fc6a7b8f2...
e1e1ac52-5783-4a72-9d15-eb4e39e17b94
Ho-hoho/baekjoon
2021_fall/9252.cpp
#include <iostream> #include <algorithm> #include <string.h> using namespace std; string s1, s2; int dp[1002][1002] = { 0 }; int find(int n1,int n2) { if (dp[n1][n2] == 0) { return 0; } if (s1[n1 - 1] == s2[n2 - 1]) { find(n1 - 1, n2 - 1); cout << s1[n1 - 1]; } else { dp[n1 - 1][n2] > dp[n1][n2 - 1] ? fin...
ALGO
0.99999
3.819227
{ "github_metadata": { "branch": "main", "commit_count": 266, "repo_created_at": "2022-07-05T08:54: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": "c732b8629a...
d0d3396f-b3dc-4c50-8046-40a77e1f18fa
landon-boone2001/Portfolio
previousClassProjects/CS202/hashTable/src/hash_202.cpp
/* hash_202.cpp <NAME> This program will take a command line argument for a table size, function type, and a collision resolution type. Then, it will take in various arguments in order to Add to the hash table, find the total probes, find a value in the hash table, print the hash table, quit, and print commands. Redon...
ALGO
0.990514
5.508881
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-09-19T18:42:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a957746afd...
73d681c9-12e0-476c-9d8b-88076864ab2c
TurakhiaLab/panman
src/subnet.cpp
#include "panmanUtils.hpp" void panmanUtils::Tree::compressTreeParallel(panmanUtils::Node* node, size_t level, const std::set< std::string >& nodeIdsToDefinitelyInclude) { node->level = level; while(node->children.size() == 1) { if(nodeIdsToDefinitelyInclude.find(node->identifier) != nodeIdsToDefinite...
ALGO
0.987817
5.149908
{ "github_metadata": { "branch": "main", "commit_count": 551, "repo_created_at": "2022-05-04T21:26:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 6, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "82cd6be3e6...
4a06b7da-1016-4cc8-b578-7b18654ca321
ttzztztz/CampusHire-CodeSolutions
腾讯2018春招技术类编程题汇总/6.cpp
#include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; int N, M, answer = 0; vector<vector<char>> map; bool pointValid(int i, int j) { return i >= 0 && j >= 0 && i < N && j < M; } void change_a(int i, int j) { answer++; int x = i, y = j; while (point...
ALGO
0.999882
3.632704
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-04-07T13:53:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "452519a51...
81c4f150-d50a-4db3-9d7c-08d04326c53c
KimDongHae1/Algorithm
삼성 SW 기출 문제/연구소3.cpp
// 연구소3(BFS+시뮬레이션) // 모든 경우의 수를 다보고 최소 시간을 찾아야하는 문제. // check해줘야 하는 부분이 많다. #include <iostream> #include <memory.h> #include <vector> #include <queue> #define MAX 51 using namespace std; int map[MAX][MAX]; int temp[MAX][MAX]; bool check[MAX][MAX]; int N; int M; int dx[4] = { 1,0,-1,0 }; int dy[4] = { 0,1,0,-1 }; in...
ALGO
0.999984
3.917392
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-01-14T16:12: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": "770c4679f1...
9c607a33-7afb-4c98-a9d2-8cc7b47806bb
Shahidul-Islam-Jony/OLD_CPP_Code
Data Structure & C & Cpp PS/M(25-5) Infix to prefix conversion.cpp
#include<bits/stdc++.h> #include"myStackPractise.h" using namespace std; int precisionCalc(char c){ if(c=='^'){ return 3; } else if(c=='/' || c=='*'){ return 2; } else if(c=='+' || c=='-'){ return 1; } else{ return -1; } } string infixToPrefix(string chk...
ALGO
0.999856
4.286139
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-15T07:59: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": "23af55760a64...
e86a94c8-a7bb-4f02-8669-df3e58a6715d
ZHBHFUT/EasyFsi
libEasyFsi/DistributedBoundary.cpp
/*------------------------------------------------------------------------- This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose...
ALGO
0.995932
6.033402
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2023-06-08T09:24:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "885e27463...
d6cbdcc3-257c-41e9-97c4-d68c570f0108
Sakib62/Problem-Solving
Codeforces/1200 Rated/1352C_KthNotDivisibleByN.cpp
/** * Author : Sakib62 * File : C_K_th_Not_Divisible_by_n.cpp **/ //<NAME>-<NAME> #include <bits/stdc++.h> using namespace std; #define debug(x) cout << ">" << #x << ": " << x << "\n"; #define all(c) c.begin(), c.end() #define revall(c) c.rbegin(), c.rend() #define F first #define S second typede...
ALGO
0.999958
3.726839
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2022-10-11T21:06:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e35af46547e...
86483b25-57b9-470e-80be-60a489e69797
playwhyyza/cpp-oop-archive
57-9-10/HW08.cpp
#include <iostream> #include <string.h> using namespace std; class Rectangle { float wide; float length; char name[80]; public: Rectangle() { wide = 1; length = 1; strcpy(name,"noname"); cout<<name<<" Object is born"<<endl; } Rectangle(float x, float y,char* z) { wide = x; length = y; ...
ALGO
0.990682
3.696152
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-06-12T15:29: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": "b6faa7993202...
77955d0f-ecdc-4430-8846-3d651a7ff5da
abhakta-47/CompetitiveCodingMyPractices
hackathon amazon 2021/a.cpp
#include<bits/stdc++.h> using namespace std; class Order{ public: int id,prepTime,recieveTime; Order(int id, int prepTime, int recieveTime){ this->id=id; this->prepTime=prepTime; this->recieveTime=recieveTime; } void operator=(const Order &operand){ id=operand....
ALGO
0.999884
3.636923
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2020-04-29T05:45: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": "ab2ac0c2120...
24d129fc-66cd-4086-bbf8-71c99381363b
MdShah-alam/Leetcode_Problems
88. Merge Sorted Array.cpp
#include<bits/stdc++.h> using namespace std; void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int i = m - 1; int j = n - 1; int k = m + n - 1; while (i >= 0 && j >= 0) { if (nums1[i] > nums2[j]) { nums1[k] = nums1[i]; i--; } else { ...
ALGO
0.999971
3.510007
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2023-08-15T11:15: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": "e1960b575a6...
8d85435d-82f2-4be5-a3dd-2c08758c6c65
tiankonguse/ACM
shoka/source/suffix-automaton.cpp
struct State { int length; State *parent; State* go[C]; State(int length) : length(length), parent(NULL) { memset(go, NULL, sizeof(go)); states.push_back(this); } State* extend(State* start, int token) { State *p = this; State *np = new State(length + 1); ...
ALGO
0.974014
3.986547
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2013-03-25T04:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 69, "forks": 40, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ccd0e...
e0323292-313c-4a30-b9c0-bb9bcb5644b9
andreshungbz/CMPS1232
practice/arrays/array/main.cpp
#include <iomanip> #include <iostream> #include <array> template <typename T, std::size_t N> void populate(std::array<T, N>& arr); template <typename T, std::size_t N> double getAverage(const std::array<T, N>& arr); int main() { const int count{10}; std::array<int, count> numbers{}; populate(numbers); ...
TOOL
0.99545
6.338982
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-06-14T15:50:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f91f293b596...
dd4e16bb-8fb3-4a2a-8a16-d78f871b94a8
zalanborsos/coresets
src/weighted_kmeans.cpp
#include "weighted_kmeans.h" #include <algorithm> #include <string> #include <vector> #include <iostream> #include <pybind11/pybind11.h> #include <cmath> namespace py = pybind11; using namespace std; namespace { const char* assignment_inertia_doc = R"(assignment_inertia_doc)"; const char* update_centers_doc = R"(upd...
ALGO
0.999857
6.587098
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-08-17T05:12:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 11, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "80ec005...
a1913453-b475-4304-94fe-c33492c79a52
seo-bo/ProblemSolving
백준/Gold/2011. 암호코드/암호코드.cpp
#include <bits/stdc++.h> #include <unordered_set> #define MOD 1000000 using namespace std; typedef long long ll; typedef long double lb; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const char* yes = "Yes"; const char* no = "No"; int main(void) { cin.tie(0)->ios::sync_with_stdio(0); string str; cin >> str;...
ALGO
0.999985
4.165818
{ "github_metadata": { "branch": "main", "commit_count": 2731, "repo_created_at": "2025-01-09T04:45:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06b116cfd...
2b219a50-5888-43e8-84ff-fa78094e23b1
ThiagoFBastos/programacao-competitiva
atcoder/E - Rem of Sum is Num.cpp
#include "bits/stdc++.h" #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; using i64 = long long; using u64 = unsigned long long; using i32 = int; using u32 = unsigned; using i16 = short; using u16 = unsigned short; using ld = long double;...
ALGO
0.999962
4.21959
{ "github_metadata": { "branch": "main", "commit_count": 850, "repo_created_at": "2023-12-14T19:47:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1580fd181...
7c058bb3-025b-4298-9d94-e421698c563d
Mojang/SFAT-Data-Explorer
SplitFAT/src/SplitFAT/utils/BitSet.cpp
/******************************************************** * (c) Mojang. All rights reserved. * * (c) Microsoft. All rights reserved. * *********************************************************/ #include "SplitFAT/utils/BitSet.h" #include "SplitFAT/utils/SFATAssert.h" #include <al...
ALGO
0.992899
7.260905
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-02-14T23:53:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c04dc0e4a6...
3a93ce17-573f-45c4-a09f-5239c0b591ec
dyanii/SecuritySW_
exe.cpp
//타원곡선(ecdh) mpz_class로 구현하기(nyc code) #include <iostream> #include <gmpxx.h> using namespace std; struct EC{ mpz_class a; mpz_class b; mpz_class p; }; struct Point{ mpz_class x; mpz_class y; }; mpz_class mod_inv(mpz_class x, mpz_class mod); int cmp(mpz_class x, mpz_class y); mpz_class mod(mpz_class n, m...
ALGO
0.9997
5.520059
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-26T07:30:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d76283e2fcc0...
cc2b7e0f-b0dd-4359-bfbd-d7bf084dce1c
snehel4510/Cpp_STL
heap.cpp
// C++ code to demonstrate the working of make_heap(), front() #include <bits/stdc++.h> using namespace std; int main() { vector<int> v1 = {20, 30, 40, 25, 15}; // Converting vector into a heap using make_heap() -> by default it will be a max heap make_heap(v1.begin(), v1.end()); // O(n) cout << v1.fron...
ALGO
0.996684
4.530351
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-08-01T07:49:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac9763f64...
d016972b-59cd-4864-b780-3d1e3fac0252
Akreson/compression_tests
src/ac_models/ppm_see.cpp
struct see_context { u16 Sum; u8 Shift; u8 Count; }; struct see_bin_context { u16 Scale; }; class SEEState { public: see_context* LastUsed; u8 PrevSuccess; u8 NToIndex[256]; u8 DiffToIndex[256]; see_context Context[44][8]; see_bin_context BinContext[128][16]; public: ~SEEState() {} SEEState() { LastU...
ALGO
0.992334
4.532885
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2022-09-17T14:26: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": "50c5b1c760...
08d9e249-b150-4517-a5b4-af04788e7fc1
surajchips/Quantum_Computer
quantumAlgorithms.cpp
#include <iostream> #include <stdio.h> #include <math.h> #include <vector> #include <algorithm> #include <set> #include <complex> #include <assert.h> #include <numbers> #include <cmath> #include <limits> #include <random> #include "QuantumState.cpp" using namespace std; typedef long double ld; typedef long long ll; t...
ALGO
0.999938
4.21586
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-10-23T02:10: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": "0becdfbccb8...
1834f9b3-04ba-413a-a570-e9ec103e887d
Sunha-i/GoldClub_study
sun/DP/24416/main.cpp
// // main.cpp // 24416 // // Created by Sun on 2023/07/12. // #include <iostream> int f[40] = {0,}; int count = 0; int fib(int n); int fibonacci(int n); int main(int argc, const char * argv[]) { int n; std::cin >> n; fib(n); std::cout << count << " " << fibonacci(n); return 0;...
ALGO
0.999785
4.612652
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2023-07-08T15:12:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57451935bde...
9f0ed193-f1fa-4df2-9c56-37b7599f4c9c
hieupm123/templateCP
MyCSES/fenwicktree_2D.CPP
#include<bits/stdc++.h> using namespace std; #define int long long const int M = 1001; int n, q; vector<vector<int>> adj(M,vector<int>(M)), tree(M,vector<int>(M)); void up(int x, int y, int a){ for(int i = x; i <= n; i += (i & (-i))){ for(int j = y; j <= n; j += (j & (-j))){ tree[i][j] += a; } } } int query(in...
ALGO
0.999893
4.465451
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-12T17:42: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": "47e6a4aaaa6d...