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
0e3ef9ac-a48d-4579-aa1a-51ef8887ae3d
willziwang/REncoder
src/REncoder.h
// #include "sBF.h" using namespace std; // Use the stack to store the prefixes in verification stage. stack<pair<uint64_t, uint64_t>> prefixes; // Record last inserted prefix to avoid duplicate insertion. uint64_t last_p = 0; bool first_insert = true; class RENCODER { public: static const int MAX_KEY_L...
ALGO
0.989123
4.011078
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-12-01T11:40:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a66be518e18...
5e3b41a6-b2a5-4357-b0ac-5eaedffba7d7
MHarbacheuski/boris
C-line/C-line/Ring.h
#pragma once #include<iostream> #include"NodeRing.h" template <class T> class Iterator { NodeRing<T>* cur; public: Iterator(); Iterator(NodeRing<T>* el); ~Iterator(); Iterator<T>& operator++ (); Iterator<T>& operator++ (int n); Iterator<T>& operator-- (); Iterator<T>& operator-- (int n); bool operator== (It...
TOOL
0.926523
3.754598
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-12-23T09:55:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2a03c054de...
4b9dd13a-a825-454c-b276-f1bedef759cc
uibcdf/PyPharmer
Pharmit_code/src/QueryTripletFingerprint.h
/* Pharmit Copyright (c) <NAME>, University of Pittsburgh and contributors. All rights reserved. Pharmit is licensed under both the BSD 3-clause license and the GNU Public License version 2. Any use of the code that retains its reliance on the GPL-licensed OpenBabel library is subject to the terms of the GPL2. Use of...
TOOL
0.940013
5.56033
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2018-05-07T17:19:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 6, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "1b757112d...
4e1513e8-2907-4b56-9094-827865ba7c46
claytonjwong/leetcode
300_longest_increasing_subsequence/main.cpp
/* * 300. Longest Increasing Subsequence * * Q: https://leetcode.com/problems/longest-increasing-subsequence/ * A: https://leetcode.com/problems/longest-increasing-subsequence/discuss/385203/C%2B%2B-and-Javascript-solutions */ /* A = 10 9 2 5 3 4 0 1 2 3 4 5 6 j => 1 i j => 1...
ALGO
0.999971
5.895
{ "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": "bf4a0950...
35b04514-4fdb-49fd-ba06-e6da0eb856f2
ishandutta2007/codeforces-r
reyna/normal/908/D.cpp
// In the name of God #include <iostream> #include <algorithm> #include <fstream> #include <vector> #include <deque> #include <assert.h> #include <queue> #include <stack> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <utility> #include <math.h> #include <bitset> #include <iomanip> #incl...
ALGO
0.999644
4.113248
{ "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": "927c59024502...
35be68d7-3bcb-43cd-9302-e12d14a2624c
hritik1330/GUVI
pro/set-2/11.cpp
#include<bits/stdc++.h> using namespace std; string diff(string str11, string str22){ string str = ""; int n1 = str11.length(), n2 = str22.length(); reverse(str11.begin(), str11.end()); reverse(str22.begin(), str22.end()); int car = 0; for (int i=0; i<n2; i++){ int sub = ((str11[i]-'0...
ALGO
0.99994
4.138901
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2018-10-13T06:27:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c27870f9b...
119fcd66-42d1-4aa6-9ebf-48284a9ba462
HW-Lee/ImageCodec
libs/HuffmanTable.h
// // HuffmanTable.h // VSP_FINAL_PROJ: IMAGE CODING CONTEST // // Created by <NAME> on 4/13/15. // Copyright (c) 2015 <NAME>. All rights reserved. // #ifndef HUFFMANTABLE #define HUFFMANTABLE #include <iostream> #include <math.h> #include <iomanip> #include "Symbol.h" using namespace std; template <class T> cl...
ALGO
0.989227
4.4615
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2015-06-15T11:13: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": "aa81ee5c4...
9aec21cd-b1a1-4ccb-a9e9-82592a5f191b
stevealbertwong/coursework
c_c++/**alignment-bitmanuplation-typecast/test.cc
/* g++ -std=c++14 test.cc -o test */ #include <stdio.h> /* printf */ #include <string.h> /* strcat */ #include <stdlib.h> /* strtol */ #include <math.h> /* pow */ #include <iostream> #include <stack> using namespace std; template<class T> void byte_to_binary(T x) { size_t s = sizeof(T); // sizeo...
TOOL
0.908251
3.600516
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-02-11T09:12: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": "eec470bdf...
c0ca67fa-9b26-4865-8070-87dedfe833de
ayu0616/atcoder-workspace-cpp
archives/abc/abc348/B/main.cpp
#include <cmath> #ifdef ONLINE_JUDGE #define NDEBUG #endif #include "../../lib.hpp" // constexpr int MOD = 998244353; // constexpr int MOD = 1000000007; // constexpr int MOD = 1000000009; // using mint = static_modint<MOD>; int main() { cout << fixed << setprecision(18); int N; cin >> N; vi X(N), Y(...
ALGO
0.999989
5.265048
{ "github_metadata": { "branch": "main", "commit_count": 378, "repo_created_at": "2023-07-21T05:41: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": "b994761cfd...
b4bd8013-1ae8-4f90-9e98-2268f732f31e
prakharjadaun/Feature-Extraction-for-Spam-Email-Detection
03 - TotalWords.cpp
#include<iostream> #include "02 - Preprocessing.cpp" #include<fstream> #include<vector> #include<sstream> //for stringstream class #include<map> int main() { //definning an object of class Preprocessing Preprocessing obj; //definning a pair having both the values as string std::pair<std::string,st...
DATA
0.936325
3.856418
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2022-10-16T17:37:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "422fd03e1b1...
0aad6ba3-fe68-4c77-8b38-dfdd3535f4b3
M-Hasaam/Leetcode-Solutions
82-remove-duplicates-from-sorted-list-ii/remove-duplicates-from-sorted-list-ii.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* deleteDupli...
ALGO
0.999987
5.547193
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2025-06-25T10:08: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": "db97b659f6...
de16406b-c20d-4c56-a830-152c3d28227c
NAGAVENIGOWDA/My_Placement_prep_DSA
Striver's Sheet/recursion-combinational-sum-2.cpp
//unique subsets //{ Driver Code Starts //Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { public: //Function to return a list of indexes denoting the required //combinations whose sum is equal to given numbe...
ALGO
0.999775
5.815229
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-05-30T07:37: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": "2750f2364bf...
2311af8f-f0cd-4bc9-a5ee-35af1fcbc74d
karimali03/Competitive-programming
solutions/hashing/Ada_and_Spring_Cleaning.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; #define ln "\n" #define ll long long #define ld long double #define vec vector #define vi vector<int> #define vii vector<vector<int>> #define f(i, a, b) for(int i=a;i<b;i++) #define fr(n) for(int i=0;i<n;i++) #define all(x) x.begin(),x.end() #define r...
ALGO
0.999689
5.148411
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2023-08-22T13:41: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": "d81822845cf...
53a0dfe2-c919-4a38-8fd5-092a3b37aead
bhartik021/Data-Structure-Algorithm
String/String comparison.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; int stringComparsion(string s1, string s2); int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int t; cin >> t; while(t--) { string s1, s2; cin >> s1 >> s2; cout << st...
ALGO
0.999845
5.648833
{ "github_metadata": { "branch": "main", "commit_count": 497, "repo_created_at": "2022-06-04T21:47:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bab4f9d9...
b50a5802-151d-4751-a48a-6d21bb02cc80
hiliuyin/CrackingCodingInterview
002-005-2.链表A+B进阶.cpp
/* 假设数位是正序排放的。 */ /* method1:翻转2个链表,然后用002-005-001的方法 method2:用递归从后向前加每一个数位 */ int ListLen(ListNode* pHead){ if(pHead == nullptr){ return 0; } int result = 0; while(pHead != nullptr) { ++result; pHead = pHead->next; } return result; } ListNode* AddZeroToList(L...
ALGO
0.999838
4.701812
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2017-07-24T09:41: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": "e2e3eb6c1...
be4c2ed7-bc3b-4c67-a1d7-aac1b2916c7d
Tigran-teq-Tadevosyan/sudoku-ai
source/AI/UniqueGenerator/chain.cpp
#include "chain.h" #include <QDebug> #include <iostream> using namespace std; Chain::Chain(std::vector<Cell *> &cellSet, Cell *startingCell, short value) { values[0] = startingCell->value; values[1] = value; this->cellSet = cellSet; chainBeginning = startingCell; chainElements.push_back(startingCell); co...
ALGO
0.997923
3.960838
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-11-17T00:49: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": "de92d73e0b...
d8e39966-3c7f-4fe8-afe4-d67df6efd795
jowseDev/cpp-exercicios
Exemplo5-funcao/main.cpp
#include <iostream> using namespace std; int qu(int n){ return n * n; } int main() { int s1, s2, s3; cout << "Entre com 3 numeros inteiros: " << endl; cin >> s1 >> s2 >> s3; if(s1 > 0 && s2 > 0 && s3 > 0 && (qu(s1) + qu(s2)+ qu(s3)|| qu(s2) + qu(s3)+ qu(s2)|| q...
ALGO
0.99966
4.2417
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-05-07T14:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29aad67017b...
196e86ba-d881-4bb3-8cd2-ec8bed862840
fzh3g/Runge-Kutta-Fehlberg
src/central_config.cpp
/* * central_config.cpp * * Created on: Mon Mar 28 2016 * Author: zhengfaxiang */ #include <cmath> #include <iostream> #include <fstream> #include <iomanip> #include "../include/rkf78.hpp" using namespace std; long double cent_con_phi0 = 1.0; long double cent_con_phidot0 = 1.0; long double cent_con_lamb...
ALGO
0.994249
4.390282
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2016-03-22T20:08:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "485039ae...
e28650fe-3f96-45cd-b2ad-46a0c4fa6cf1
sampritipanda/IOI_Repository
Codechef/MARCH15/RNG.cpp
// Random Number Generator #include <iostream> #include <vector> using namespace std; #define MOD 104857601ULL typedef vector<vector<unsigned long long> > matrix; int k; unsigned long long N; matrix mul(matrix A, matrix B){ matrix C(k + 1, vector<unsigned long long>(k + 1)); for(int i = 1; i <= k; i++){ f...
ALGO
0.999989
4.074482
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2014-12-27T14:42:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e4d6ae...
9e6a3596-b794-4ae0-a922-4375ff5126ce
nur-alam/Problem-Solving
geeksforgeeks/Medium/Sum of digits in factorial of a number--easy/Sum of digits in factorial of a number.cpp
#include<bits/stdc++.h> using namespace std; //void multiply(vector<int> &v, int n) void multiply(vector<long long int> &v, long long int n) { for(int i=1; i<=n; ++i) { int carry = 0, prod; for(int j=0; j<v.size(); ++j) { prod = (v.at(j) * i) + carry; v.at(j) = p...
ALGO
0.999821
5.044506
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2016-12-26T07:04:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7c540b65...
bd88bb72-717c-4361-9557-5c72fc9d50bb
tcew/nekRS
src/elliptic/amgSolver/parAlmond/matrix.hpp
/* The MIT License (MIT) Copyright (c) 2017 <NAME>, <NAME>, <NAME>, <NAME>, <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to...
ALGO
0.944161
5.310116
{ "github_metadata": { "branch": "next", "commit_count": 2797, "repo_created_at": "2022-03-25T10:44:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afdaeeb97...
eb690359-778d-44b7-94b7-eb98620fe8f4
Rohit31125/dsa_folder
Questions/countDearrangements.cpp
#define MOD 1000000007 #include<vector> // top to down approach // long long int solve(int n ,vector<long long int> &dp){ // if(n==1){ // return 0; // } // if(n==2){ // return 1; // } // if(dp[n]!=-1){ // return dp[n]; // } // dp[n] = (((n-1)%MOD) * ((solve(n-1,dp)%M...
ALGO
0.999955
4.608378
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-06-03T11:01: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": "15cfa57effc4...
0325394a-7312-48e4-83f7-85c328b82cf3
samuel21119/Cpp
CodeForces/contest/1350/d.cpp
/************************************************************************* > File Name: d.cpp > Author: Samuel > Mail: <EMAIL> > Created Time: Mon May 18 13:12:03 2020 *************************************************************************/ #include <bits/stdc++.h> using namespace std; int n; bool in[100010...
ALGO
0.99972
4.365786
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-01-31T08:50: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": "18a25ed2e...
16bf5e55-912f-44ef-acb7-1a607a1d714d
Trgtuan10/Project_1
Week 3/FamilyTree.cpp
#include<bits/stdc++.h> using namespace std; struct Node { string name; vector<Node*> children; }; set<Node*> name_exist; Node* make_Node(string x) { Node* new_node = new Node; new_node->name = x; name_exist.insert(new_node); return new_node; } Node* search_Node(string x) { for (Node* n...
ALGO
0.999582
4.362653
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-09-28T13:36:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0214291d066...
954b7c64-d8a2-4ab7-87a2-4c1fa37daaee
semiexp/csugar
include/icsp/icsp.h
#pragma once #include <vector> #include <map> #include <string> #include "csp/csp.h" #include "icsp/clause.h" #include "icsp/var.h" #include "common/domain.h" namespace csugar { class ICSP { public: ICSP() : auxiliary_id_(0), unsatisfiable_(false), encoded_clauses_(0), encoded_bool_vars_(0), encoded_int_vars_(0...
TOOL
0.905973
6.580072
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2020-05-04T02:04:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 2, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "acc8e46ce...
c67c94af-512c-4ccb-bc87-37671b9a0959
checkoutb/atmf
cf/ge1800/CF1883_C_1000_2024-06-03_Raspberries.cpp
//#include <time.h> //#include <windows.h> //#include <sstream> //#include <climits> //#include <fstream> //#include <cstdio> //#include <cstring> #include <algorithm> #include <iostream> #include <string> #include <vector> //#include <cstdlib> //#include <cmath> //#include <limits.h> // INT_MAX //#include <stack>...
ALGO
0.999826
4.168984
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-08-31T13:21:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac8131cf9f7...
e5fefd7e-e99a-48b7-8cc7-92969fb0f5b2
StormFireFox1/Probleme-Info-11G
Clasa_11/sclm/main.cpp
#include <iostream> #include <fstream> using namespace std; ifstream fin("sclm.in"); ofstream fout("sclm.out"); int n, m, i, j, v[3001], mx, c, x, z[3001], p[3001], a[3001]; int main() { int n; fin >> n; for (i = 1; i <= n; i++) { fin >> v[i]; a[i] = 1; } for (i = 1; i <= n; i++) {...
ALGO
0.999998
3.771634
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2017-09-18T08:57:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82ae1756...
914ae506-920e-4ad5-b219-5daac467e0ba
dcode2004/TLE_CP-31_Sheet
G_1_Teleporters_Easy_Version.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define f(i,s,e) for(int i = s; i < e; i++) #define fi(i,s,e) for(int i = s; i <= e; i++) #define pii pair<int, int> #define vi vector<int> #define vpii vector<pair<int,int>> #define mii map<int,int> #define umii unordered_map<int,int> #define si set<...
ALGO
0.999902
4.530545
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-13T10:03: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": "947801394d3e...
fa296512-0eb1-42de-88b4-0a331c1318cc
yaadhav/Competitive-Programming
CF/ER#155/A/a.cpp
// Q : https://codeforces.com/contest/1879/problem/A #include<bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll t; cin >> t; while(t--) { ll n; cin >> n; vector< pair<int,int> > a(n); ll s, e, t1, t2; cin >> s >> e; ...
ALGO
0.999843
3.796184
{ "github_metadata": { "branch": "main", "commit_count": 223, "repo_created_at": "2022-12-30T14:14:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d0588e6ec...
e29041a4-3148-4dd3-b66b-4eb4a5979d69
Gui0r/loopsEarraysCpp
loopsEarraysCpp/ex13.cpp
#include <iostream> #include <locale.h> #include <algorithm> using namespace std; int main() { setlocale(LC_ALL, "pt_BR.UTF-8"); float array[5]; float array2[5]; int soma; int peso; int mediaP; for(int i = 0; i < 5; i++){ cout << "Digite suas notas: "; cin >> array[i]; ...
ALGO
0.994331
3.592339
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-26T23:11: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": "c752a77acdf2...
2d125902-725c-46e0-82b1-35d7f57028d6
Danny-Y25/Boletin3-VC
Practica3-2/LBPDescriptor.hpp
#include <iostream> #include <cstdlib> #include <vector> #include <iostream> #include <cstdlib> #include <math.h> #include <stdlib.h> #include <vector> #include <string> #include <filesystem> #include <map> #include <iostream> #include <cstdlib> #include <filesystem> #include <iostream> #include <fstream> #includ...
TOOL
0.982161
3.486432
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-06-25T19:35: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": "746ce4f4e86e...
0e5ef361-9fb8-452e-9365-48aa1184dbae
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Private/Solvers/Internal/PowerMethodSolver.cpp
// Copyright Epic Games, Inc. All Rights Reserved. #include "PowerMethodSolver.h" #include "DenseMatrix.h" #include "Math/NumericLimits.h" using namespace UE::Geometry; FPowerMethod::ESolveStatus FPowerMethod::Solve(ScalarType& OutEigenValue, RealVectorType& OutEigenVector, bool bComputeLargest) { if (VerifyUser...
ALGO
0.999859
7.034343
{ "github_metadata": { "branch": "5.4", "commit_count": 164, "repo_created_at": "2023-03-14T06:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "71e502724d...
11173999-972f-4278-965d-b165450362ca
Tushar1805/coding_roadmap
DSA/Recursion/Medium/3.cpp
// Printing any one subsequences whose sum is k #include<bits/stdc++.h> using namespace std; bool printSubK(int i, vector<int>&arr, int sum, int k, vector<int>sub, vector<vector<int>> &ans) { if (i == arr.size()) { if (sum == k) { ans.push_back(sub); return true; } return false; } sub.push_back(arr[i]...
ALGO
0.999654
5.419155
{ "github_metadata": { "branch": "main", "commit_count": 328, "repo_created_at": "2023-03-07T12:55: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": "1fd2a712a7...
8ee79dbe-b8b5-431d-a9fc-579c12bf0584
ivanovrl6/OP_RK2
tasks_rk2.cpp
#include "tasks_rk2.h" #include <iostream> int Node::countNodes=0; Node::Node(){ listChilds.Head= nullptr; name=countNodes; ishere=false; } Node:: ~Node(){ parent= nullptr; countNodes=0; ishere=false; } Graph::Graph() { head=new Node; head->parent= nullptr; } Node *Graph::BFS_1(Node *fir...
ALGO
0.999014
3.634783
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2023-04-30T19:38: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": "596c565af2...
3ba422e3-4dec-4f0d-9e14-7c654dc3d983
LiewJY/Tutor-Management-System
Tutor Management System/Tutor - Doubly Linked List.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include <chrono> #include <iostream> #include <string> #include <regex> #include <iomanip> #include "Validation.h" using namespace std; using namespace std::chrono; int sizeofLinkedList = 0; // initialize size of linked list to 0 // structure of tutor struct Tutor { int tutorID =...
TOOL
0.941484
4.291599
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2022-04-02T05:17: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": "516b04f7a...
43b6ba3f-2713-4c73-a70c-a9b7912e12b3
jonatas57/maratona
uva/00427-FlatLandPianoMovers.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 0x3f3f3f3f3f3f3f3...
ALGO
0.999561
3.453709
{ "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": "e75fe0dc...
93b9f3d8-d69e-402b-8af7-721175251730
Congee/leetcode
src/18.4sum.cpp
#ifdef __LOCAL__ #include <leetcode.h> #endif class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { int n = nums.size(); std::sort(nums.begin(), nums.end()); // [-2,-1,0,0,1,2] std::vector<std::vector<int>> vec; for (int i = 0; i < n; ++i) { if (i > 0 && nu...
ALGO
0.999552
6.139611
{ "github_metadata": { "branch": "master", "commit_count": 275, "repo_created_at": "2020-02-13T18:05: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": "5da81e6b...
d37299f4-cc95-4eb4-b9e4-00845bce9988
TicVic-don/Endsem
cp1Endsem/a.cpp
#include <bits/stdc++.h> #include <string> using namespace std; string minint(string a) { vector<int> e; vector<int> o; for (char digitChar : a) { int digit = digitChar - '0'; if (digit % 2 == 0) { e.push_back(digit); } else { o.push_back(digit); } ...
ALGO
0.999934
5.56241
{ "github_metadata": { "branch": "Main", "commit_count": 7, "repo_created_at": "2024-07-24T06:34:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7166e56f90e6...
144d355f-31cd-4eae-be2d-be9ff6654592
hypre-space/hypre
src/FEI_mv/femli/mli_matrix_mult.cxx
/****************************************************************************** * Copyright (c) 1998 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) ***************************************...
ALGO
0.999004
3.606247
{ "github_metadata": { "branch": "master", "commit_count": 12337, "repo_created_at": "2018-11-19T20:42:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 763, "forks": 210, "issues": 132, "pull_requests": 33 }, "file_meta": { "content_id": "...
20bd2354-3227-410c-81d2-81703370163a
knshnb/competitive_library
test/yosupo/unionfind_dynamic.test.cpp
#define PROBLEM "https://judge.yosupo.jp/problem/unionfind" #include <bits/stdc++.h> // clang-format off using Int = long long; #define REP_(i, a_, b_, a, b, ...) for (Int i = (a), lim##i = (b); i < lim##i; i++) #define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) struct SetupIO { SetupIO() { std::ci...
ALGO
0.999623
5.890013
{ "github_metadata": { "branch": "master", "commit_count": 313, "repo_created_at": "2018-09-26T09:42:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "161838f6...
a506f082-0204-4995-9818-9310af7a603a
ammoniacrow/pvz-Simple-version-C-
main.cpp
//如果代码出现了BUG,请检查: //1.是否把双等号写成了单等号,或者反过来 //2.是否把k写成i,j或者反过来 //3.是否写了函数但是没有调用 //4.是否是visual studio自己的问题,它有可能欠重装了 //5.是否把int类型的变量写成了bool //6.实在不行就在你认为错误的地方打几个断点,求求了,打断点没有那么难的。 //已解决问题: //1.点击卡牌栏拖动植物的过程中,如果鼠标移动轨迹刚好经过阳光,会同时触发点击阳光的效果,而原版并不是这样的。(可解决,但我没有,每次检测点击的时候用break隔断即可) //2.现在会有两只僵尸吃同一个植物,植物被吃完之后只有一个僵尸恢复行走,另一只仍然维持正在吃的状态...
TOOL
0.981693
3.401584
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-06-11T07:47:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "788c222632...
5c0b1546-b8d1-4733-9fab-245a593c696c
Poornakgps/CP_
Models/graphs/second_mst.cpp
#include <iostream> #include <vector> #include <algorithm> #include <utility> using namespace std; const int N = 2e5 + 5; const int INF = 1e9; const long long INF_LL = 1e18; struct Edge { int s, e, w, id; bool operator<(const Edge& other) const { return w < other.w; } }; class UnionFind { public...
ALGO
0.999977
4.842916
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-01-19T16:32: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": "33a56b863f7...
c845446a-3808-43b8-8476-6b899d1e0f73
monkstrife/StudentCheker
project/lab6_plug/lab6_plug/Source.cpp
#include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <fstream> #include "Country.h" int main() { setlocale(LC_ALL, "Russian"); std::vector<Country> countries; while (true) { std::cout << "1. Добавить страну\n" "2. Удалить страну\n" "3. Пок...
TOOL
0.942197
5.369594
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2025-04-10T16:39: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": "dbd10d6a1b...
174a3b90-8d4b-42aa-ad18-3594619c8880
dayuyuhai/ProjectEuler
42.c的字符读入法.cpp
/************************************************************************* > File Name: 42.c的字符读入法.cpp > Author: 北海望谷堆 > Mail: <EMAIL> > Created Time: Sun 17 May 2020 04:31:27 PM CST ************************************************************************/ #include<iostream> #include"word.for42" using namespace...
ALGO
0.998053
3.391633
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-05-05T11:31:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00c5eadde...
1fb250dc-05cc-4ba9-adb3-f2a7a853f460
Itaxo01/Competitive-Programming
vjudge/topicos1/4/e.cpp
#include <bits/stdc++.h> #define int long long using namespace std; int gcd(int a, int b){ while(b>0){ a %= b; if(a == 0) return b; b %= a; } return a; } struct frac{ int num, denum; frac(int n, int d): num(n), denum(d) {} bool operator < (const frac &b) const{ return (num * b.denum) < (b.num * denum);...
ALGO
0.999975
4.288305
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2024-08-23T15:51:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "317dfa34a91...
b89b7cf8-3d0f-4ea3-98ca-a24a261a88b3
syple000/compile
ir/instr.h
#include <vector> #include <list> #include <unordered_map> #include <iostream> #include "../io/io.h" #include "../io/format_conversion.h" #include "../string_util/string_util.h" #ifndef IR_INSTR #define IR_INSTR 1 #ifndef DEBUG_CODE #define DEBUG_CODE 1 #endif struct Instruction { std::vector<std::string> _comp...
TOOL
0.961804
4.65519
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2020-01-04T07:07: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": "046fc3df...
beee21c7-2a15-49a7-8d49-a7256452fd9d
unjambonakap/prog_contest
acm/petr/10/e.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <algorithm> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <cstdlib> #include <string> #include <cstring> #include <cstdio> #include <cmath> #include <cstdli...
ALGO
0.999655
3.082598
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-08-16T18:21:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b66bc12d9...
f72ecb5b-667f-4411-b6e2-f788bb912ee0
oouoz442/OOP-Patterns
Iterator/Iterator.cpp
#include <iostream> #include <vector> #include <string> // Класс-агрегат для двух списков слов class WordPairsAggregate { std::vector<std::string> englishWords; std::vector<std::string> ukrainianWords; public: WordPairsAggregate(const std::vector<std::string>& en, const std::vector<std::string>& ua) ...
TOOL
0.968667
5.893037
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2025-05-16T19:58: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": "04c2d8a8acb...
76a9fdf4-b9c6-401c-b3cc-a6c8754de1e9
m2508-o/Sortowania
Sortowania/Sortowania.cpp
#include <iostream> #include <cstdlib> #include <time.h> void Sortowanie_Babelkowe(int* tab, int n, int a, int b, int tryb) { // Alokacja + wypisanie tablicy tab = new int [n]; for ( int i = 0 ; i < n ; i ++ ) { tab[i] = rand()%(a-b+1)+a; std::cout<<"TAB[" << i << "]= " << tab[i] << "...
ALGO
0.998781
3.89894
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-09T22:11: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": "6487b2ae33cd...
d008a3f0-007d-4271-83e0-881213be0ed1
DayAlgorithm/park_je_young
2_WEN/14728_벼락치기.cpp
/* Problem_Solving_Time AM 12:35 - 2:10 */ #include<iostream> #include<vector> #include<algorithm> using namespace std; typedef pair<int, int> PR; int main(void) { int n, t; // 과목 , 공부 가능 시간 // 먼저 과목 점수 먼저, 그다음 공부시간 순으로 소트 cin >> n >> t; vector<PR>temp(n); for (auto& iter : temp) { cin >> iter.first >> ...
ALGO
0.999961
4.013051
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2025-05-31T05:29:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93784aad4e18...
1d474fc9-e3db-43ee-b548-ee41ad5dabf3
fmi-lab/up-kn-2020-group-4
Seminar/Week09 - Multidimensional Arrays (cont.)/solutions/task10.cpp
#include <iostream> using namespace std; const size_t MAX_ARR_SIZE = 100; void insertElementsInSquartArray(int arr[MAX_ARR_SIZE][MAX_ARR_SIZE], size_t size, size_t size2) { cout << "Insert Elements: " << endl; for (int i = 0; i < size; i++) { for (int j = 0; j < size2; j++) { cin >> arr[i][j]; } } cout << ...
ALGO
0.951504
3.890049
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2020-10-01T13:39:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a416b57f86...
f2b926b5-7351-4a86-9f0e-85c43d469892
dharmiki/Assorment_CPP
4.cpp
#include <iostream> using namespace std; int main(){ int rows, cols; cout << "Enter the array's row size: "; cin >> rows; cout << "Enter the array's column size: "; cin >> cols; int array[rows][cols]; cout << "Enter the array's elements:"<<endl; for (int i = 0; i < rows; ...
ALGO
0.993434
4.671506
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-04-01T10:14: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": "a6a72ac7a6be...
2b8429b5-2b35-470d-9edd-2027d099ebbb
IsrakAhmed/LightOJ_Solutions
1116 - Ekka Dokka.cpp
/* Name : <NAME> E-Mail : <EMAIL> Institution : University of Rajshahi */ #include<bits/stdc++.h> using namespace std; #define ll long long #define asort (v).begin(),(v).end() // Ascending Order Sort #define dsort (v).rbegin(),(v).rend() // Descending Order Sort #define p...
ALGO
0.999795
3.508608
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-03-15T12:53: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": "799de8ac8762...
fbb18e1d-3cbe-417f-bf7c-c2b8f7ac97a5
andremirt/v_cond
gamess/libqc/rysq/src/fock-impl.hpp
#ifndef _RYSQ_FOCK_IMPL_HPP_ #define _RYSQ_FOCK_IMPL_HPP_ #include <boost/mpl/int.hpp> #include <boost/mpl/if.hpp> #include <boost/utility/enable_if.hpp> #include "externals/cxx/namespace.hpp" #include <rysq/fock.hpp> #include "fock-matrix.hpp" #include "quartet.hpp" #include "eri-impl.hpp" #include "meta.hpp" #in...
ALGO
0.979975
5.374084
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-06-18T13:11: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": "a0b85b878e...
0675437c-e3e9-4d8f-9e8b-8dada1317cf4
Social-Actions/Social-Actions
features/conversation_trust.cc
#include <cmath> #include <cstdlib> #include <cstdio> #include <stdint.h> #include <algorithm> #include <iostream> #include <fstream> #include <list> #include <map> #include <numeric> #include <stdexcept> #include <utility> #include <vector> #include <set> #include <errno.h> #include <getopt.h> typedef long user_id;...
ALGO
0.953409
4.70098
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2012-04-18T16:09:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9653747554...
c699596f-3c9a-42ba-ab49-e3373bcc00d5
a4org/A4
LeetCode/DynamicProgramming/ClimbingStairs.cpp
/* * LeetCode 70 Climbing Stairs * Easy * <NAME> * 2021.10.5 */ #include<iostream> #include<vector> using namespace std; /* * Solution: Dp * Each time we can climb one step or two step, so there is two cases when climb to nth stair: from 'n - 1' stair or from 'n - 2' stair. * consider of these cases, if w...
ALGO
0.999992
5.540732
{ "github_metadata": { "branch": "main", "commit_count": 492, "repo_created_at": "2021-05-11T18:19:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f645f59339a...
5e0c7d1f-0279-49d1-a6ec-dfb0167eda72
amandeepsingh9999/cpp
10_arrays.cpp
#include <algorithm> #include <iostream> #include <utility> #include <vector> using namespace std; void printArray(int arr[], int n) { for (int i = 0; i < n; i++) { cout << arr[i] << " "; } cout << endl; } void swapAlternate(int arr[], int n) { for (int i = 0; i < n; i += 2) { if (i + 1 < n) { s...
ALGO
0.999714
5.008375
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-03T16:33:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a7b9dd5d35e...
2e046359-fe55-44a5-b251-c13ce1b02498
ishandutta2007/codeforces-p
panole233/normal/713/D.cpp
#include<bits/stdc++.h> using namespace std; int oN,o[21],f[1010][1010],g[1010][1010][10][10],fh[1010][1010][10],fl[1010][1010][10],lo[1010],xl,xr,yl,yr,n,m,a[1010][1010],q,ans,cnt,l,r,mid; int getmax(int a,int b) {return a>b?a:b;} int getmin(int a,int b) {return a<b?a:b;} int getans(int xl,int yl,int xr,int yr) { ...
ALGO
0.999483
3.954762
{ "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": "633a1b727639...
809f84e9-0594-435c-9735-2bbcccf6288a
XYXBlAcG/cppcode_backup
防御_1.cpp
#include <bits/stdc++.h> using namespace std; #define ris(i, a, b) for (int i = a; i <= b; ++i) const int N = 100011, Lg = 27; int n, m; vector<int> e[N]; int dfn[N], pdfn, low[N], vis[N]; stack<int> st; int pscc = 1, scc[N], f[N][Lg], pre[N], d[N], cnt[N]; vector<int> e2[N]; queue<int> que; int dep[N], siz[N]; vec...
ALGO
0.999897
4.536023
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2023-07-22T12:36: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": "8f68b8e5888...
38b1e1c3-ea18-403f-98bb-703ca4c3481a
hiroshi-maybe/topcoder
solutions/Powerit/Powerit.cpp
#include <fstream> // for greed plugin #include <iostream> #include <algorithm> // max,min #include <vector> #include <string> #include <sstream> #include <set> #include <map> #include <iostream> #include <utility> #include <cctype> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath>...
ALGO
0.999964
4.915457
{ "github_metadata": { "branch": "master", "commit_count": 1437, "repo_created_at": "2015-05-24T07:26:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eacdbb3...
e36525fa-5633-4c24-b87a-6cccab3c40db
zerolxf/zero
contest/teamconst1/a.cpp
/************************************************************************* > File Name: a.cpp > Author: liangxianfeng > Mail: <EMAIL> > Created Time: 2016年08月15日 星期一 12时11分53秒 ************************************************************************/ #include <iostream> #include <cstdio> #include <cs...
ALGO
0.999838
3.226949
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2015-12-31T07:38: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": "e621bd3d...
b23437a6-0897-4f68-9aaa-dedcf4422940
Alberto-SC/Competitive-Programming-solutions
Codechef/DSA learning series/lineal data structures/ZCO15004.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define int long long #define __ ios_base::sync_with_stdio(false);cin.tie(NULL); const int maxn = 100000; signed main(){__ int t= 1,n,x,y; cin>>n; vector<int> xs[maxn]; vector<int> v(maxn); for(int i = 0;i<n;i++){ cin>>x>>y; ...
ALGO
0.99997
3.679757
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-07-20T03:18:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "767abb47e9a1...
c7033e0a-e54c-44a3-911a-af69c31a6ae6
NTU-CSIE-DSA/hw3-Virus
solution/solution.cpp
#include <assert.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #define int long long #define MN 500005 #define MQ 500005 #define swap(a, b) \ { \ int temp = a; \ a = b; \ b = temp; \ } int n, q; int id[MN], node_cnt; int c_rk[MN + MQ], c_pa...
ALGO
0.99988
4.090578
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2025-03-29T19:02:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8719f9bc36df...
41afad79-517b-421a-a739-4ee5806bf9c5
XingwXiong/SDC_Bench
x86/acl/app/master/tools/master_ctl/main.cpp
#include "stdafx.h" #ifdef HAS_READLINE #include <readline/readline.h> #include <readline/history.h> #endif #include "http_request.h" static bool __verbose = false; static long long __timeout = 0; static acl::string __server_addr; static acl::string __extname; static void print_space(int n) { for (int i =...
WEB
0.932663
3.175314
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2018-04-13T02:49:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05134afad...
f69288bd-d061-4407-ac38-aae1699f35b6
vfolunin/archives-solutions
EOlymp/2764.cpp
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <string> #include <numeric> #include <random> using namespace std; struct Random { inline static minstd_rand generator; static double get01() { static uniform_real_distribution<double> di...
ALGO
0.999985
3.992753
{ "github_metadata": { "branch": "master", "commit_count": 2367, "repo_created_at": "2017-11-27T10:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "8b20995...
06c5c959-47f6-4159-9152-6bcbd8f1b535
harsh-sharma-z/Super150_Assignments
Assignment3/String Compression.cpp
// Take as input S, a string. Write a function that does basic string compression. Print the value returned. E.g. for input “aaabbccds” print out a3b2c2d1s1. // Input Format // A single String S // Constraints // 1 < = length of String < = 1000 // Output Format // The compressed String. // Sample Input // aaabbccds...
ALGO
0.999983
3.543395
{ "github_metadata": { "branch": "main", "commit_count": 238, "repo_created_at": "2022-10-14T18:34:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e021f826db...
ab97ca4f-e26b-422f-9c93-be04beef8f64
zakolm/project_for_park_mail_c
basic_filling_algorithm/test_algorithm.cpp
#include <stdio.h> /*void pop(int ***array) { //int **tmp_array = *array; int **a = *array; //int tmp_array[6][10]; //int *b = (int*) tmp_array; //b[0] = a[1]; a[0] = a[1]; for (int i = 1; i < 5; ++i) { //for (int j = 0; j < 10; ) a[i] = a[i + 1]; } //*array = tmp_array; }*/ void print_list(int local_m...
ALGO
0.998169
3.528179
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2017-10-29T12:54:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68f242c57...
4d0cfcb1-69c9-4b08-b0ab-d8863c628620
VRGroupRWTH/mode
include/mode/tableau/butcher/explicit/ralston.hpp
#pragma once #include <mode/tableau/butcher_tableau.hpp> namespace mode::butcher_tableau { template <typename type_ = double> struct ralston_2 { using type = type_; }; template <typename type_ = double> struct ralston_3 { using type = type_; }; template <typename type_ = double> struct ralston_4 { using type = ...
ALGO
0.969737
4.727717
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-09-20T12:41:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f74ea0c524d1b...
bd9279a1-306f-404c-bc21-fd62740debae
SeokJun-yoon/Study_rep
CPP_Study2/5_3_Pointer_Practice/5_3_Pointer_Practice/CPP_Study.cpp
#include <iostream> using namespace std; // 오늘의 주제 : 포인터 실습 struct StatInfo { int hp; // +0 int attack; // +4 int defence; // +8 }; void EnterLobby(); StatInfo CreatePlayer(); void CreateMonster(StatInfo* info); // 플레이어 승리 시 true, 아니면 false bool StartBattle(StatInfo* player, StatInfo* monster); int main() { Ent...
TOOL
0.911545
3.488845
{ "github_metadata": { "branch": "main", "commit_count": 163, "repo_created_at": "2023-06-18T08:07: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": "808297e845...
64132467-adc3-44ae-9c9a-f600e74f7cda
uni-kakurenbo/cp-solutions
practice/AtCoder/abc237/f.cpp
/* * @uni_kakurenbo * https://github.com/uni-kakurenbo/competitive-programming-workspace * * CC0 1.0 http://creativecommons.org/publicdomain/zero/1.0/deed.ja */ /* #language C++ GCC */ /* #region template */ #include <bits/stdc++.h> using namespace std; #include "template.hpp" /* #endregion */ using mint = lib:...
ALGO
0.99995
4.207904
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2022-07-23T02:32:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65315b038c...
44100efa-01e5-4f5a-846c-65de8e2b9848
r-uehara0219/atcoder
BipartiteGraph.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define FOR(i,a,b) for(int i=a;i<=b;i++) #define FORD(i,a,b) for(int i=a;i>=b;i--) #define ALL(a) (a).begin(),(a).end() #define SZ(a) int((a).size()) #define SORT(c) sort((c).begin(),(c).end()) #define PB push_back #define MP make_pair #define MEMSET(...
ALGO
0.99997
4.432859
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-12-09T08:29:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "277bc1402...
cef87825-de2e-40d8-bba7-6d05e6458032
heyfaraday/coding_1year
1sem/Done/3 c листочка.cpp
#include <conio.h> #include <stdio.h> #include <stdlib.h> int main() { int N; scanf("%d", &N); int *arr = (int *)malloc(sizeof(int) * N); for (int i = 0; i < N; i++) { arr[i] = rand(); printf("%d ", arr[i]); } printf("\n"); int c; for (int i = 0; i < N - 1; i++) { for (int j = 0; j < ...
ALGO
0.998823
3.648606
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-04-03T21: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": "b1a4c005f...
6d6d7e14-553d-4557-9c85-6917e7d23866
PabloMessina/Competitive-Programming-Material
Solved problems/Red de Programación Competitiva/2016-Competencia-14/K_Routing.cpp
#include <bits/stdc++.h> #include <tr1/unordered_set> using namespace std; #define rep(i,a,b) for(int i=a; i<=b; ++i) #define MAXN 100 typedef long long int ll; typedef pair<int,int> pii; typedef tr1::unordered_set<int> useti; int n; int cost[MAXN+1]; int mincost[MAXN+1][MAXN+1]; vector<vector<int>> g; useti restr[MA...
ALGO
0.999878
3.778125
{ "github_metadata": { "branch": "master", "commit_count": 587, "repo_created_at": "2015-11-27T11:51:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5946809...
ce8015da-a0da-483b-931a-369da8013169
OkifuZ/parallel_admm
src/zensim/math/matrix/Transform.hpp
#pragma once #include "QRSVD.hpp" namespace zs::math { template <typename VecTM, enable_if_all<VecTM::dim == 2, VecTM::template range_t<0>::value == VecTM::template range_t<1>::value> = 0> constexpr auto decompose_transform(const VecInterface<VecTM> &m, ...
ALGO
0.995609
6.781218
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2024-09-09T15:14:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "467028cba...
e51d20bb-35f5-4d26-bb33-4b66fbae6d9d
SYCstudio/OI
Practice/2017/2017.6.29/CJOJ 1288 【HNOI 2002 】和平委员会.cpp
//暴力染色法 #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<vector> using namespace std; #define Other(x) ((x%2==0) ? (x-1) : (x+1) ) const int maxN=16050; const int inf=2147483647; int n,m; int cnt; vector<int> E[maxN]; int color[maxN]; int Ans[maxN]; bool solve(); bool dfs(int x); in...
ALGO
0.999998
3.570228
{ "github_metadata": { "branch": "master", "commit_count": 585, "repo_created_at": "2018-06-07T14:07: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": "ace2dc5c...
3c51b466-7ddb-4aa0-8919-0d4586517502
AkshatRauthan/Decode-DSA-2.0-With-Cpp
60. Dynamic Programming 05/Leetcode1143_LongestCommonSubSequence.cpp
#include "iostream" #include "vector" #include "string" using namespace std; vector<vector<int>> dp; int helper(string& s1, string& s2, int idx1, int idx2){ if (idx1 < 0 || idx2 < 0) return 0; if (dp[idx1][idx2] != -1) return dp[idx1][idx2]; if (s1[idx1] == s2[idx2]) return dp[idx1][idx2] = 1+helper(s1, s2...
ALGO
0.999744
4.981927
{ "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": "632e443a7c7...
4ac6e186-07f4-4de3-a7aa-b4fd082948b9
aryanSE7374/myCoding
coding/DSA/DSA-A2Z/6_LinkedList/LL_Medium/#5_loopStartingLL.cpp
#include<bits/stdc++.h> using namespace std; // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; // brute try // TC : O(N) // SC : O(N) class Solution { public: ListNode *detectCycle(ListNode *head) { unordered_map<List...
ALGO
0.999974
5.733326
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2025-01-25T14:50: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": "9ac9e49e360...
ce53878c-f6d7-47ba-a832-88f7a56006be
needhourger/university
多项式加减乘/Poly.cpp
#include "Poly.h" #include <cstring> using namespace std; ostream &operator<<(ostream &output, const Poly &p) { for (int i = p.getSize() - 1; i >= 0; i--) { if (p.getCoeff(i) != 0) { cout << " "; if (p.getCoeff(i) > 0) output << "+"; output <<...
TOOL
0.988601
4.219538
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2018-07-31T00:58:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6cc79bcba...
e36b75e9-b3dd-482b-9c6b-195c0c2f42d2
ishandutta2007/codeforces-f
frame233/normal/1083/F.cpp
// Author -- Frame #include<bits/stdc++.h> #define lowbit(x) ((x)&(-(x))) #define Finline __inline__ __attribute__ ((always_inline)) #define DEBUG fprintf(stderr,"Running on Line %d in Function %s\n",__LINE__,__FUNCTION__) #define SZ(x) ((int)x.size()) #define mkpr std::make_pair #define pb push_back typedef long ...
ALGO
0.99933
3.627088
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "cf68b64492e3...
53f6de4c-4f33-49dd-bbc9-99a04541601f
greatzero728/acade.studio
codeforces/(189 D. AlgoRace)/(189 D. AlgoRace).cpp
#include<bits/stdc++.h> using namespace std; const int NN = 66, inf = 1e9; int d[NN][NN][NN], dp[NN][NN][NN]; int main() { int n, m, r; scanf("%d %d %d", &n, &m, &r); for(int i = 0; i <= n; i++) { for(int j = 1; j <= n; j++) { for(int k = 1; k <= n; k++) dp[i][j][k] = inf; } } for(int k = 1; k <= m; ...
ALGO
0.999984
3.764746
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-09-19T07:41: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": "671b56bff03e...
5b5f5dc9-3294-4cde-ba17-b6ac51be6c69
dsc-sookmyung/2021-02-Algorithm-Study
10-우선순위큐&다익스트라/김민지_wing-beat/A-1753.cpp
#include <iostream> #include <vector> #include <queue> #define INF 987654321 #define MAX_VERTEX 20001 #define MAX_EDGE 300001 using namespace std; int dist[MAX_VERTEX]; vector<pair<int, int> > edge[MAX_EDGE]; void dijkstra(int start_node){ dist[start_node] = 0; priority_queue<pair<int, int> > pq; pq....
ALGO
0.999874
3.900445
{ "github_metadata": { "branch": "main", "commit_count": 192, "repo_created_at": "2021-09-11T09:08:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13912c1cccd...
08176113-d090-48aa-8846-d2ef65410444
MicK7/cassiopee_anaconda
Converter/Converter/getJoinDonorIndices.cpp
/* Copyright 2013-2017 Onera. This file is part of Cassiopee. Cassiopee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later ...
TOOL
0.921935
4.774136
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-08-24T14: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": "740c42f5a8...
fcc874c9-1bb0-43f4-b40a-a06659548451
qmick/nanoSTL
algorithm.hpp
#ifndef __ALGORITHM_HPP__ #define __ALGORITHM_HPP__ #include "iterator.hpp" #include "utility.hpp" #include "functional.hpp" #include "nano/algo_base.hpp" #include "nano/type_traits.hpp" namespace nano { //Non-modifying sequence operations template< class InputIt, class UnaryFunction > UnaryFunction for_each(InputI...
ALGO
0.980953
6.031556
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2015-01-22T04:43: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": "990ca1881...
d2bc0cd8-63be-4471-981b-693ce29033b7
JannatulJinat/Data-Structures-Algorithms
Number Theory/gcd.cpp
/** gcd : greatest common divisor/factor (10, 15) -->1, [5] (12, 16) --> 1, 2, [4] Euclidean method: gcd finding algo: efficent 10 | 15 | 1 10 -------- [gcd] 5| 10 |2 10 -------- 0 | 5 [return this]| assume a < b, gcd(a, b) = gcd(a, b-a)=gcd(a, b-a-a) a | b |k1 k2...
ALGO
0.999861
5.308809
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2017-11-17T20:32:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ec82d7d2...
bc6c88cf-116b-4429-b6b6-5c299e355155
sahadat-11/CodeLibrary
Graph Theory/Subtree_Sum.cpp
//In The Name of ALLAH #include<bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; #define int long long const int N = 1e3 + 7; vector<int> g[N]; int subtree_sum[N], val[N]; void dfs(int vertex, int par) { subtree_sum[vertex] += val[vertex]; // add each vertex self value; for(auto child : g[vertex]) { i...
ALGO
0.99995
4.173884
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2023-08-02T16:50: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": "7abedbf4478...
bd5df700-c174-4517-bfb8-4432a1d57db3
yijunyu/demo
datasets/github_cpp_10/3/118.cpp
#ifndef __LIST_CPP #define __LIST_CPP #include <cstdlib> #include "avl.h" #include <iostream> #include <cmath> #include <vector> using namespace std; int flag; template <class A, class B> tree<A,B>::tree() { root=NULL; } template <class A, class B> tree<A,B>::~tree() { } template <class A, class B> treeNode<...
ALGO
0.995982
3.269869
{ "github_metadata": { "branch": "master", "commit_count": 162, "repo_created_at": "2019-03-16T07:13:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d68b8cd0...
c458f64f-1d50-4824-ad46-5db17abf6940
judyazby/APCS_practice
11106/hwsh/a169.cpp
#include <iostream> #include <algorithm> using namespace std; #define MAXN 200005 int a[MAXN], b[MAXN], c[MAXN]; int main(){ ios::sync_with_stdio(); cin.tie(0); int m, n; cin >> m >> n; for(int i = 0; i < n; i++){ cin >> a[i]; b[i] = a[i]; } sort(a, a+n); int len = unique(a, a+n) - a; // 把b的數字...
ALGO
0.999995
3.882132
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-05-13T09:31: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": "85c26e148da...
a78e5a3f-20bb-4232-a0a4-0b5c39517398
abenit97/3D-Renderer-Introduction-to-Ray-Tracing
src/sphere.cpp
#include "sphere.h" #include <cmath> Sphere::Sphere(const Vec3& c, float r) : centro(c), radio(r) {} bool Sphere::intersection(const Ray& rayo, float& t0) const { Vec3 oc = rayo.origen - centro; // Vector desde el origen del rayo al centro de la esfera. float a = rayo.direccion.dot(rayo.direccion); floa...
ALGO
0.983651
4.41678
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-03-03T10:46:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f43d94fffb2b...
5a6cd2d9-627e-430c-b793-71dab02f9766
minhazul-ashim/phitron-cpp
assignment2/max_min.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int value; Node *next; Node(int v) { this->value = v; this->next = NULL; } }; int * minMax(Node * head) { int *minMax = new int(2); minMax[0] = head->value; minMax[1] = head->value; Node *temp = head;...
ALGO
0.999921
3.996527
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-06-02T16:16: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": "9e335cb70fe...
82ba631f-37a8-4833-a142-c110bf3b906b
saksham-kapoor/DSA-Prep
DP-patterns/Bitmask-DP/min-cost-of-construction.cpp
#include <iostream> #include <cstring> using namespace std; // Problem - https://docs.google.com/document/d/1zuw8hBXHsiTYTH8u986fQhn8TWfpOk9BQBIRH3lo_W8/edit /* SAMPLE INPUT 9 2 7 8 6 4 3 7 5 8 1 8 7 6 9 4 SAMPLE OUTPUT 13 */ int cost[4][4], n = 4; int dp[4][(1 << 4) - 1]; int solve(int i, int mask) { // all r...
ALGO
0.999981
4.077171
{ "github_metadata": { "branch": "main", "commit_count": 528, "repo_created_at": "2020-12-23T03:18:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 21, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98c266b7...
bd7f85ee-4df2-47e9-93db-aaa06cc65b46
aklk1ng/code
cpp/cf/842D.Vitya_and_Strange_Lesson.cpp
#include <bits/stdc++.h> typedef long long ll; const int INF = 1e9 + 7; const int N = 3e5 + 5; const int M = 20; int n, m; std::vector<int> a; struct node { int nxt[2]; int d; node() { nxt[0] = nxt[1] = -1; d = 0; } }; node t[N * M]; int len = 1; void add(int v, int num, int pos) { if (pos < 0) { ...
ALGO
0.999995
5.075361
{ "github_metadata": { "branch": "main", "commit_count": 495, "repo_created_at": "2022-02-09T13:42:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f05c070798...
af1464ce-2b14-4abc-85fd-286fed996ee9
panamadalina/CSIE-POO2021
seminar10.cpp
#include<iostream> using namespace std; class Persoana { private: char* nume; int varsta; public: //int varsta; //constructor fara parametrii Persoana() { cout << "\n~Apel constructor fara param->Persoana: Anonim"; this->nume = new char[strlen("Anonim") + 1]; strcpy(this->nume, "Anonim"); this->varsta =...
TOOL
0.948617
4.798812
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2021-09-28T16:47: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": "30306f907...
86d6ca66-80f6-42c5-88bf-c791741b28c2
rohit0235/GeeksforGeeks
Difficulty: Medium/Subset Sums/subset-sums.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void solve (int index,int sum,vector<int>&result,vector<int>&arr){ int N=arr.size(); if (index==N){ result.push_back(sum); return ; } solve (index+1,sum+a...
ALGO
0.992706
6.581695
{ "github_metadata": { "branch": "main", "commit_count": 655, "repo_created_at": "2024-09-17T06:51: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": "326c549d69...
08cd0058-288e-45ab-88a6-bab1ebdadc20
Amm0o/DA
DataStructures/Stacks&Queues/introduction.cpp
// Linear data structures // Theres no random action operation mainly use (push; pop) // We would use this to control operations that expected (push; pop) // Stacks: // --> Push,Pop,Peek O(1) // --> Lookup O(n) // LIFO --> Last in First Out // Usefull: // --> Need to know last item added; // --> Browser history (go ...
TOOL
0.939955
3.524992
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-07-22T18:37: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": "c2a6090ed80...
8589d464-03cc-4057-875f-fa84ebe432f2
hhj3258/Algorithm_Study
by_2023/BaekJoon/스터디/week37_배낭문제/2629_양팔저울.cpp
#include <bits/stdc++.h> using namespace std; int N; bool dp[31][15001]; // dp[개수][무게] void Solve(vector<int> &weight, int i, int w) { if (i > N || dp[i][w]) return; dp[i][w] = true; // 추를 안올린다 Solve(weight, i + 1, w); // 추가 올려진 쪽에 추를 더 올린다 Solve(weight, i + 1, w + weight[i]); //...
ALGO
0.999944
4.193471
{ "github_metadata": { "branch": "main", "commit_count": 462, "repo_created_at": "2021-04-29T19:04:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da1b22d713...
83a29d68-9a85-4de7-8584-39dcefe4ec7b
subrataBAEC/Programming-Fundamentals-Nano-Degree
Data_structure/14.5_module_2D_Array_practice/1.cpp
/* Module 14.5 ; 1-complete avoid duplicate sum access each element according to swastika pattern, sum and make that element zero. */ #include <bits/stdc++.h> using namespace std; int main(){ cout<<"input size and 2D array"<<"\n"; int n; cin>>n; int array[n][n]; memset(array,0,sizeof(array)); ...
ALGO
0.999848
3.733228
{ "github_metadata": { "branch": "main", "commit_count": 468, "repo_created_at": "2022-04-28T05:41:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b8ad30c10...
f9af76b4-678b-48b5-8845-d20ec0ab738b
LucasMiralha/Deque-em-C-
Projeto de estrutura de dados.cpp
#include<iostream> #include<stdio.h> #include<conio.h> #include<stdlib.h> #include <limits> #include <ios> #define MAX_SIZE 6 using namespace std; typedef struct { int frente; int fim; int arr[MAX_SIZE]; } Deque; Deque* createDeque() { Deque* deque = (Deque*)malloc(sizeof(Deque)); deque->fim = ...
ALGO
0.97811
4.053116
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-04-05T04:05: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": "a76415cac078...
b9cea9d2-6531-493d-a102-22ced9ddf637
Chinmay2390/DSA
combination_sum_iii.cpp
// combination_sum_iii.cpp - Find all k-sized combinations of 1-9 that sum to n #include <iostream> #include <vector> using namespace std; void backtrack(int k, int n, int start, vector<int>& path, vector<vector<int>>& result) { if (k == 0 && n == 0) { result.push_back(path); return; } if (...
ALGO
0.999925
6.803586
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2025-06-29T13:56:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa98f868f...
da2beb77-5712-4d3b-9b59-f6d6f22f5b0f
raulgrell/Vumod
src/math/Math.cpp
#include "Math.h" namespace math { float barycenter(Vec3 &p1, Vec3 &p2, Vec3 &p3, Vec2 &pos) { float det = (p2.z - p3.z) * (p1.x - p3.x) + (p3.x - p2.x) * (p1.z - p3.z); float l1 = ((p2.z - p3.z) * (pos.x - p3.x) + (p3.x - p2.x) * (pos.y - p3.z)) / det; float l2 = ((p3.z - p1.z) * (pos....
ALGO
0.992347
5.85818
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-06-12T15:52:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_id": "8e485a8e...
4280b535-74d9-4686-8353-d7d1e259483c
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/05/0507/personal_submission/cf1129a2_md.cpp
// 0507 #include <bits/stdc++.h> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); constexpr int inf = numeric_limits<int>::max(); int n, m; std::cin >> n >> m; vector<int> to_move(n, 0); vector<int> min_dis(n, inf); for (int i = 0; i < m; ++i) ...
ALGO
0.999969
3.937289
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "171a...