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
c006a70e-9a44-4080-88b9-2b9ec9702f75
y-tanimoto/Bp-Tree
old/node.cpp
#include "node.h" // キーの挿入 bool Node::m_insert(const int key_to_insert, Node* child_node_to_insert) { // 葉ノードでなければ、子ノードはm_childrenの(i+1)番目に格納する int offset = 1; if (is_leaf_node()) { offset = 0; } int left = std::numeric_limits<int>::min(); // 左側の値の初期値はintの最小値に int right; for(int ...
ALGO
0.999243
4.335921
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2022-01-26T19:01: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": "6e69555f7...
0f92e40b-4d0e-4785-b693-7d5300b9efab
ishandutta2007/codeforces-a
alireza_kaviani/normal/876/A.cpp
#include <bits/stdc++.h> using namespace std; template<class t> void operator>>(istream &in , vector<t> &vec) { for(int i = 0 ; i < vec.size() ; i++) { cin >> vec[i]; } } template<class t> void operator << (ostream &out , vector<t> &vec) { for(int i = 0 ; i < vec.size() ; i++) { cou...
ALGO
0.999924
3.485533
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2617cc827408...
ed35e5df-1e2e-45b7-b1bc-cd1e8662cb47
FatBat2001/Problem_Solving
number_theory/number_theory/numberTheory.cpp
#include<iostream> #include<vector> #define ll long long #define Ban8aly ios_base::sync_with_stdio(0);cin.tie(0),cout.tie(0); using namespace std; const int N = 1e6+3; void seive () { int sieveArray[N]; for (int i = 2; i * i <= N; i++) { if (sieveArray[i]) continue; for (int j = i * i; j <= N...
ALGO
0.999703
4.065638
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2022-12-04T16:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52c73a6e018...
e0863d19-016d-49eb-8117-9d5433914a2e
PetrVevoda/smallupbp
embree-2.0/examples/renderer/device_ispc/renderers/pathtracer.h
// ======================================================================== // // Copyright 2009-2013 Intel Corporation // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // y...
TOOL
0.905865
5.544629
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-06-24T06:42:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 141, "forks": 20, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8b0c6a...
ad5cd98e-f027-4341-9a7b-d5b5c3b6299c
Vazzz007/invert-reflection
func_eval.cpp
#include "func_eval.h" int InvertMatrix(int n, double* a, double* x) { int i; int j; int k; double tmp1; double tmp2; // Create adjugate matrix for (i = 0; i < n; ++i) for (j = 0; j < n; ++j) x[i * n + j] = (double)(i == j); // Reflection method's main body ...
ALGO
0.999851
4.616358
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-09-21T09:10:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7da94d7f98...
ede1e684-e10b-48e1-910a-8bca74a97c01
RedRushTeam/Raspred-project
main_class_for_seg_type_memory.cpp
#include "main_class_for_seg_type_memory.h" main_class_for_seg_type_memory::main_class_for_seg_type_memory(){} void main_class_for_seg_type_memory::set_V(int _V) { this->_V = _V; } int main_class_for_seg_type_memory::get_V() const { return _V; } void main_class_for_seg_type_memory::set_zatMD(int _zatMD) { ...
ALGO
0.994458
3.464021
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-11-04T10:15: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": "4d41698aac39...
a73b9583-61d5-43a2-8ab2-fef97d048820
2254649642/Test
Primer/string.cpp
#if 0 #include <iostream> #include <string.h> using namespace std; class String { public: String(const char* chStr = nullptr) { if (chStr == nullptr) { _chStr = new char[1]; memset(_chStr, 0, 1); } else { _chStr = new char[strlen(chStr) + 1]; memset(_chStr, 0, strlen(chStr) + 1); strcpy(_chStr, ...
TOOL
0.991905
3.525467
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-08-24T14:44: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": "a86ec3dff7cb...
cc203c11-7f22-45ac-8435-37992f904888
ftth05/SCC-SP2023
Final copy/Q1_V3_fixed.cpp
#include <iostream> #include <fstream> #include <vector> #include <cmath> #include <algorithm> using namespace std; // Define the BaseCadd class class BaseCadd { public: int num_features; std::vector<float> S; void sim(std::vector<float>& D, int n_rows, int n_cols) { int n = sqrt(D.size()); // assumin...
ALGO
0.998428
5.614921
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-03-20T16:00: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": "e122c3e0f69...
d4c92d0a-1718-44cb-ba1f-a6d72dd69998
XiaoConstantine/Leetcode
Pow.cc
/* * ===================================================================================== * * Filename: Pow.cc * * Description: Implement Pow(x,n) * Version: 1.0 * Created: 03/19/13 16:35:16 * Revision: none * Compiler: gcc * * Author: <NAME> (XC), * O...
ALGO
0.999892
5.88471
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2013-10-04T20:06:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec9f1b7c9d...
a3c259d4-4017-4a87-b1e1-b49a9e92b39b
Pandey-SaurabhP/CP
Codeforces/1834+C.cpp
#include <bits/stdc++.h> using namespace std; #define read(a, n) for(ll i = 0; i < n; ++i) cin >> a[i]; #define print(a, n) for(ll i = 0; i < n; ++i) if(i == n - 1){ cout << a[i] << endl; } else { cout << a[i] << ' '; } typedef long long int ll; typedef long double ld; const ll mod = 1e9 + 7; const ll mxn = 1e6 + 5...
ALGO
0.999996
4.799934
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-04-13T08:49:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "53c0c4cb6a...
f5b05799-c703-4ff5-b6dd-30491a51458d
inkryp/cp
UVa/10128_.cpp
// https://onlinejudge.org/external/101/10128.pdf // Precompute the answers! // Actual solution does not use precomputed values. #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); freopen("ans.txt", "w", stdout); const int MAXN = 13; long long...
ALGO
0.999129
4.534922
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-09-11T22:37: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": "3a2f88285...
41e97852-632d-4e86-a872-c5bc0b6043de
tips367/Data-Structures
Binary Search Tree/Insertion of a key in BST/Insertion of a key in BST.cpp
// Insertion of a key in BST #include <iostream> class Node { public: int data; Node* left, * right; Node(int data) { this->data = data; left = right = NULL; } }; // Method 1. Recursive /* Node* insert(Node* root, int value) { if (root == NULL) { // Insert the firs...
ALGO
0.999991
5.897911
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2020-01-10T01:20:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3214b558...
7d91c9c1-fdfd-4b8f-bc68-9b027f483b86
ManuelMendoza0206/SIS-112PRACTICA_01
Ejericicio_01_03.cpp
// Materia: Programación I, Paralelo 4 // Autor: <NAME> // Fecha creación: 16/08/2023 // Fecha modificación: 19/08/2023 // Número de ejericio: 3 // Problema planteado: Promedio de notas, escriba un programa que lea N notas y saque le promedio general. #include "iostream" using namespace std; int main() { int contador ...
TOOL
0.948943
3.577501
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-08-18T22:58: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": "4f7a48fef9f...
9ea35e01-bbc2-4681-83e0-e3fac7a44f08
josura/generic_programs
prog1/grafo.cpp
#include <iostream> #include<climits> #define inf 9999999 using namespace std; template<class T> class MGraph{ int numver,numarc,max; T **K; int **M,**dist,**pred; int find_index(T el){ for(int i=0;i<numver;i++){ if(*K[i]==el){return i;} } return -1; } public: MGraph(int n){ max=n; numver=...
ALGO
0.999946
3.645358
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2019-03-24T09:30: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": "523f1c9ea...
d242c7d9-3da4-425c-9464-555ea8ccbb6a
looneyd-rohit/cp_templates
cp_old/learn_practice/prefixsumtechnique_1.cpp
/* We are given an array of numbers, also we are making call to a function such that it finds the sum of elements between two indices in the array including those two indices. Now, we need to do this in O(1) time complexity for each call of the function, whereas we are allowed to perform any preprocessing we need in th...
ALGO
0.999707
5.966155
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-08-10T04:42:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "310729a681b...
5471b867-a4bf-4716-b519-dd09bd5685b8
Llonvne/ACM
学习笔记/C++PrimerPlus/(2-7)不完整的章节/chapter 6/6.8_cctypes.cpp
// cctypes.cpp -- using the ctypes.h library #include <cctype> #include <iostream> int main(int argc, char* argv[]){ using namespace std; cout << "Enter text for analysis and type @ to terminate input \n"; char ch; cin >> ch; int whitespace = 0; int digit = 0; int chars = 0; int punct...
TOOL
0.981833
3.638047
{ "github_metadata": { "branch": "main", "commit_count": 281, "repo_created_at": "2021-08-16T14:14:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d51b8222cd...
af5199f9-f048-4e36-bb93-8d74c2d251eb
eposts/Rich
src/iso_code/10/lz.cpp
// lz.cpp : Defines the entry point for the console application. // #include <windows.h> #include <stdio.h> #include <memory.h> #ifndef _WIX_LZ77_COMPRESS_HEADER_001_ #define _WIX_LZ77_COMPRESS_HEADER_001_ #endif // 滑动窗口的字节大小 #define _MAX_WINDOW_SIZE 65536 // 对滑动窗口中每一个2字节串排序 // 排序是为了进行快速术语匹配 // 排序的方法是用一个64k大小的指针数组...
TOOL
0.974734
3.191581
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2013-05-11T12:17:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 131, "forks": 47, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "800edd...
1c47cf00-8017-4b80-a177-2faba0e9e6f7
shammun/phitron_cse_fundamentals
1_Intro to Programming Language/Module 17/post_order_traversal.cpp
/* In-order traversal Left -> Right -> Root */ #include <iostream> #include <vector> #include <algorithm> #include <string> #include <stack> using namespace std; class Node { public: int val; // Value stored in the node (data). Node* left; // Pointer to the left node in the binary tre...
ALGO
0.999954
5.366323
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-11-18T11:52: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": "79189cad386...
7a2d713f-148a-449f-980a-c80d29913eb7
C0ldSmi1e/CompetitiveProgramming
Contests/CodeforcesCodeforcesRound943Div.3/D_PermutationGame.cpp
/** * Author: C0ldSmi1e * Created Time: 05/02/2024 08:01:11 AM **/ // time-limit: 2000 // problem-url: https://codeforces.com/contest/1968/problem/D #include <bits/stdc++.h> using namespace std; #ifdef DANIEL_DEBUG_TEMPLATE #include "../debug.h" #else #define debug(...) 42 #endif int main() { cin.tie(nullptr)->...
ALGO
0.999568
4.379942
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2021-12-04T15:25:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "437b30af7...
f6a166bd-f7ac-499f-8239-defcbeaf0ff0
jmarshall23/Unreal2004
Core/Inc/FConfigCacheIni.h
/*============================================================================= FConfigCacheIni.h: Unreal config file reading/writing. Copyright 1997-1999 Epic Games, Inc. All Rights Reserved. Revision history: * Created by <NAME> =============================================================================*/ /*...
CONFIG
0.932263
6.724986
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-11-27T23:58:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "328fef2a9f00...
3d4bd0df-8fc4-4cc0-aad1-e53cc2e4260d
ROCm/tensorflow-upstream
third_party/xla/xla/service/gpu/model/interpolator.h
/* Copyright 2025 The OpenXLA Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
ALGO
0.924832
7.788267
{ "github_metadata": { "branch": "develop-upstream", "commit_count": 184865, "repo_created_at": "2018-04-09T21:24:50.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "tensorflow/tensorflow", "stars": 694, "forks": 99, "issues": 10, "pull_requests": 80 }, "file_m...
5daac4e7-87e5-4102-a6e1-b78430ac181e
rm-controls/rm_control
rm_common/include/rm_common/linear_interpolation.h
// // Created by yezi on 22-5-21. // #pragma once #include <vector> #include <ros/ros.h> namespace rm_common { class LinearInterp { public: LinearInterp() = default; void init(XmlRpc::XmlRpcValue& config) { ROS_ASSERT(config.getType() == XmlRpc::XmlRpcValue::TypeArray); for (int i = 0; i < config.size()...
ALGO
0.996017
6.025429
{ "github_metadata": { "branch": "master", "commit_count": 2914, "repo_created_at": "2021-08-10T06:04:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 258, "forks": 97, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "2587d...
b407c793-e94f-4012-ae9d-554039089fa6
MichaelReiter/CSC205
Assignment 5/twirl_mapping.cpp
/* twirl_mapping.cpp CSC 205 - Spring 2016 A PNG image processor. <NAME> - 03/02/2016 <NAME> - 03/21/2016 */ #include <string> #include <iostream> #include "lodepng.h" #include "png_canvas.h" #include <math.h> using namespace std; double alpha = 0.750492; // 0.750492 radians = 43 degrees double inver...
ALGO
0.975916
6.210858
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2016-01-12T23:13: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": "02116f1e1...
51efd10e-92b0-438b-8651-e962857a3f78
ishandutta2007/codeforces-r
rfpermen/normal/1257/F.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3") using namespace std; #define ll long long #define ull unsigned long long #define rep(i,n,N) for(int i=n;i<=N;++i) #define rap(i,n,N) for(int i=n;i>=N;--i) #define mp make_pair #define pb push_back #define pob pop_back #define pf push_front #define pof pop_front #def...
ALGO
0.999782
3.469685
{ "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": "906fe03f6b9f...
532c1cfa-bf9b-4a29-8f58-b39df27c1364
AlecAivazis/condorBatch
include/CORE/QuarkGluonTagger/QuarkGluonTagger.cc
#include "./QuarkGluonTagger.h" // Liner Radial Momentum taken from http://arxiv.org/abs/1106.3076v2 float getLRM(int ijet , int power) { float sum_pt_ri=0; float sum_pt=0; vector<int> cands = pfjets_pfcandIndicies().at(ijet); for (unsigned int ivc=0; ivc<cands.size(); ivc++) { int ican = cands[iv...
ALGO
0.998354
3.987493
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2014-07-07T03:01:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3deab1561...
29a916dd-c65a-4df7-9903-91bcd996ad25
calvinmccarter/mega-cggm
AltNewtonBCD/util.cpp
#include "util.h" #if defined(LANG_M) || defined(MATLAB_MEX_FILE) #include <mex.h> #define PRINTF mexPrintf #else #include <stdio.h> #define PRINTF printf #endif #include <math.h> #include <omp.h> #include <sys/time.h> #include <utility> #include <vector> using namespace std; // Returns difference in seconds double...
TOOL
0.996128
5.403499
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2015-10-09T15:35:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc4f50612...
328ee578-d324-41b6-a848-f79f29e5c7f7
278100598/c_code
codeforce/0715 2017-2018 ACM-ICPC, NEERC, Northern Subregional Contest/EEE.cpp
#include <bits/stdc++.h> #define int long long using namespace std; int lcm(int a, int b){ int c = __gcd(a, b); return (a/c)*(b/c)*c; } const int N = 3e5+25, MX = 1e6+25; int cnt[MX], arr[N]; bitset <MX> used; vector <int> sorted_cnt; signed main(){ ios::sync_with_stdio(0); cin.tie(0); //freopen("equal.in", "r", s...
ALGO
0.999982
3.558517
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-25T10:34:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7cd80ee3f04...
2c928ce3-c328-403b-8f55-722b2e454b77
khansamad47/Command-line-chess
pawn.cpp
/* Implementation file "pawn.cpp" */ /* Author: <NAME> Program last changed: 9th December 2018 */ #include "pawn.h" bool Pawn::isValidMove(const char* source_square, const char* destination_square) { if(myBoard -> isPathClear(source_square, destination_square) == 0) { return 0; } /* A pawn cannot mo...
ALGO
0.94474
6.272063
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-02-18T19:44: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": "10444e3b65...
805c7882-e56b-41f8-bf22-9d0448576630
raincross7/code-similarity
codes/train_code/problem434/problem434_20.cpp
/*** author: yuji9511 ***/ #include <bits/stdc++.h> using namespace std; using ll = long long; using lpair = pair<ll, ll>; const ll MOD = 1e9+7; const ll INF = 1e18; #define rep(i,m,n) for(ll i=(m);i<(n);i++) #define rrep(i,m,n) for(ll i=(m);i>=(n);i--) #define printa(x,n) for(ll i=0;i<n;i++){cout<<(x[i])<<" \n"[i==n-1...
ALGO
0.999938
3.529307
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "f6ec839b569f...
351ee3e3-f38d-4b76-b452-906a65e01675
ASCI-COEP/hacktoberfest
Mathematical/totient_sieve.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e6 + 1; int phi[N]; // upper bound for the generated phi values // totient value of a number // phi(n) : the count of numbers less than n which are coprime to n // phi(n) is multipicative in nature // i.e phi(a * b) = phi(a) * phi(b) if...
ALGO
0.999741
5.443217
{ "github_metadata": { "branch": "master", "commit_count": 242, "repo_created_at": "2019-09-30T05:32:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 119, "issues": 17, "pull_requests": 107 }, "file_meta": { "content_id": "cc1...
4fae9b39-e71a-4299-be2a-cbb65f8ffdaa
kunal1244/A2OJ-Ladders
Div2C/487A.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int void solve(){ ll a, b, c, p, q, r, x, y, z, t, m, n, mini = 100000000; cin >> a >> b >> c; cin >> p >> q >> r; cin >> x >> y >> z; for (ll i = 0; i <= 200; i++){ for (ll j = 0; j <= 100; j++){ if (i + b <= r)...
ALGO
0.999688
3.77098
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2021-02-08T12:10: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": "e3625515a...
46ba81f8-4e8a-476b-9cef-a31dd4262f0c
AlperSaltabas/OR_Tools_Google_API
src/constraint_solver/python/pywrapcp_util.h
// Copyright 2010-2014 Google // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
TOOL
0.902279
3.792512
{ "github_metadata": { "branch": "master", "commit_count": 3052, "repo_created_at": "2015-03-15T18:40:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a324b67...
f6eedb07-6bd9-4dcd-801b-19747445e2ad
codemonkeyricky/lc
411.cpp
#include <iostream> #include <vector> #include <cassert> #include <stack> #include <queue> #include <algorithm> #include <unordered_map> #include <unordered_set> #include <map> #include <set> #include <bitset> #include <numeric> #include <cmath> #include <climits> using namespace std; struct TreeNode { int val; ...
ALGO
0.999959
5.622058
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2024-11-11T05:29: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": "b07f3aa53f...
e9a77a5e-5acf-4788-8267-b16df0fc5d2b
visheshgargavi/mission_faang
DP/55_Edit_Distance.cpp
// In this problem we are going to find the minimum number of operations to convert string a to string b // Oprtation Like: //1.Insertion //2.Deletion //3.Replace // Basically this problem is a avariation of LCS but , here we have to do opposite operation whatever we did in LCS Problem #include <bits/stdc++.h> using...
ALGO
0.999991
5.646677
{ "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": "0041f5818...
f1f07202-f872-4322-955d-71fb897b9515
kspp101/GAMES101-homework
作业2/main.cpp
// clang-format off #include <iostream> #include <opencv2/opencv.hpp> #include "rasterizer.hpp" #include "global.hpp" #include "Triangle.hpp" constexpr double MY_PI = 3.1415926; Eigen::Matrix4f get_view_matrix(Eigen::Vector3f eye_pos) { Eigen::Matrix4f view = Eigen::Matrix4f::Identity(); Eigen::Matrix4f tran...
ALGO
0.904915
6.237588
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-04-16T09:11: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": "852893a59b8...
17892a2f-fb18-4f25-914b-40c04a77a401
cadenzah/cs
ps/programmers/lv2/biggest_wrong.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; int get_digits(int value) { int base_length = 1; while ( value / 10 != 0) { value /= 10; ++base_length; } return base_length; } // string to_string(int value) { // string result = "";...
ALGO
0.999894
5.455639
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-02-19T14:44:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51a394fd3...
559de427-10b7-4baf-8074-36640fcf881e
mattya-lab/Qualification
Ouyou_information/R0Autumn-3.cpp
#include<stdio.h> void simple_perceptron(int ni, int nc, int x[][2], int y[], double wy[], double by); void three_layer_perceptron(int ni, int nm, int nc, int x[][2],int m[][2], int y[], double wm[][2], double wy[], double bm[], double by) { for (int out = 0; out < nc; out++) { double yte...
ALGO
0.993381
3.781051
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-05-19T04:50:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d6fa123e...
fc03043d-b3cc-4064-a43e-298949b4c90b
superAman07/Cpp-basic-STL-to-advance-DSA
Fibonnaci.cpp
// Most efficient solution in O(logn) #include <bits/stdc++.h> using namespace std; // Function to multiply two 2x2 matrices void multiply(vector<vector<int>>& mat1, vector<vector<int>>& mat2) { // Perform matrix multiplication int x = mat1[0][0] * mat2[0][0] + mat1[0][1] * mat2[1][0]; int y = mat1[0][0] * mat2[0][1...
ALGO
0.999999
6.063411
{ "github_metadata": { "branch": "main", "commit_count": 357, "repo_created_at": "2023-11-14T07:00:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4184d61fbf...
0e49a374-8717-4a24-9061-3c95c9b6afd8
xuxueqiang16/interview
JZOffer/ex61-PlayingCard.cpp
/************************************************************************* > File Name: JZOffer/ex61-PlayingCard.cpp > Author: Stranger > Mail: <EMAIL> > Created Time: Tue 06 Nov 2018 10:52:11 AM CST ************************************************************************/ #include <iostream> using na...
TEST
0.998675
5.013778
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2018-06-28T13:56: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": "5539db35...
48521e4b-c8f7-4104-a830-3788a8eea320
Er418/WaveFunctionCollapse
WaveFunctionCollapse.cpp
#pragma clang diagnostic push #pragma ide diagnostic ignored "modernize-use-nodiscard" // // Created by <NAME> on 06.03.23. // #include "WaveFunctionCollapse.h" const std::vector<WaveFunctionCollapse::Direction> WaveFunctionCollapse::Adjacent = {Up, Left, Right, Down}; const std::map<WaveFunctionCollapse::Direction,...
ALGO
0.999206
6.100832
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-02T08: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": "469990615aa2...
2caa635d-a797-46cf-8113-b4d3810ef0fe
sunwuzhou03/flybird
flybird_cpp/src/bird_control.cpp
#include "bird_control.h" #include <random> #include <iostream> #include <conio.h> bird::bird(){//小鸟初始位置 std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<int> dis(2, 20); x = 22; y = dis(gen); score = 0; } void bird::bird_show(){ SetConsoleColor(0x0E); Go...
TOOL
0.929537
3.81456
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-05-30T08:23:40.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "Nemocccc/flybird", "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id":...
5a411993-6eb3-4fc7-a31c-5640d6637083
antodld/pendulum_feasibility_solver
src/polygons.cpp
#include "../include/pendulum_feasibility_solver/polygons.h" // clang-format off #include <boost/geometry.hpp> #include <boost/geometry/geometries/polygon.hpp> #include <boost/geometry/geometries/adapted/boost_tuple.hpp> #include <boost/geometry/multi/geometries/register/multi_polygon.hpp> // clang-format on BOOST_GEO...
ALGO
0.999768
4.484279
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2023-02-22T12:26:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2566f1f41...
90f8c1db-8910-4d66-a433-a1353f73d5bd
WeiyiGeek/Study-Promgram
C++/第十节/exception.cpp
#include <iostream> #include <climits> /**采用了try catch **/ //表示当函数执行的时候返回值若是一个字符类型的 unsigned long returnFactorial(unsigned short num) throw (const char *); int main() { unsigned short num = 0; std::cout << "请输入一个整数: "; while( !(std::cin>>num) || (num<1) ) { std::cin.clear(); // 清除状...
ALGO
0.995622
3.754472
{ "github_metadata": { "branch": "master", "commit_count": 117, "repo_created_at": "2019-04-07T13:55:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "6f48759e...
8f14b1a4-27ff-45a9-83bb-d1ad153fb2d5
Hanyang-Study-Club/9To11_Summer
5주차_탐욕법/005_LV3_섬_연결하기/happyOBO.cpp
#include <bits/stdc++.h> #include <climits> #include <sstream> using namespace std; int getParent(vector<int>& parent, int x); void unionParent(vector<int>& parent, int a, int b); bool findParent(vector<int>& parent, int a, int b); int CalcKruskalAlg(int n, vector<pair<int, pair<int, int>>>& edges) { int weight = 0...
ALGO
0.999932
4.667625
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2023-07-16T12:58:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc63df34c...
bc7fee3c-2c35-4080-9e63-fe504cb3726a
md-asif-shahriar/cpp-interview
Linked-List/remove_duplicate_sorted.cpp
#include <bits/stdc++.h> using namespace std; class ListNode { public: int val; ListNode *next; }; ListNode *push_start(ListNode *head, int new_val) { ListNode *node = new ListNode(); node->val = new_val; node->next = head; head = node; return head; } ListNode *remove_duplicate1(ListNode ...
ALGO
0.999893
4.997934
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-11-08T13:21: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": "3b76ca91edaf...
7309ef33-5b2e-4884-91c1-7392d46d5593
0x56794E/yawnsSimulator
toJinx/src/SE.cpp
#include <limits> //For max val of int #include "mpi.h" #include <string> //for string //own includes #include "SE.h" #include "TopologyUtils.h" #include "TrafficLoader.h" #include "Communicator.h" using namespace std; const int MAX_INT = std::numeric_limits<int>::max(); const int INTENDED_P_COUNT = 4; const int LA =...
ALGO
0.992701
4.584582
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2016-08-17T13:16: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": "2efdfd8a...
a0cf0ddb-8621-4f46-a8a0-c2e4114ca4e2
yottacto/leetcode
problems/36-valid-sudoku/36.hh
#include <vector> struct Solution { bool isValidSudoku(std::vector<std::vector<char>>& board) { for (auto i = 0; i < 9; i++) { auto st = 0; for (auto j = 0; j < 9; j++) { if (board[i][j] == '.') continue; auto num = board[i][j]...
ALGO
0.989311
6.304634
{ "github_metadata": { "branch": "master", "commit_count": 396, "repo_created_at": "2017-11-23T13:49:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ace7dc7...
efd5b057-17ae-443d-82c9-d1861e23e8e5
QasimWani/Data-Structures-and-Algorithms
Data Structures/Hash/Hash.cpp
#include <string> #include <iostream> #include <cstdlib> #include "Hash.h" using namespace std; Hash::Hash() { A = 34; B = 1; P = long(10000019); M = 1000; temp = NULL; numHash = new list<contactPtr>[M]; nameHash = new list<contactPtr>[M]; } int Hash::get_int_Hash(long long data) { in...
ALGO
0.926963
3.777686
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2020-01-04T13:26:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "044a3b5f...
6d8d7f9d-e9c6-4d72-a8cd-a6b411f12108
ishandutta2007/codeforces-m
meliodasira/normal/1667/D.cpp
#include <bits/stdc++.h> using namespace std; template<typename T> void chmin(T& x, const T& y) { if (x > y) x = y; } template<typename T> void chmax(T& x, const T& y) { if (x < y) x = y; } typedef int64_t s64; typedef uint64_t u64; typedef uint32_t u32; typedef pair<int, int> pii; #define rep(i, l, r) for (int i = ...
ALGO
0.999809
4.425073
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "434150b24fb2...
bfd8ef57-e922-462d-a6d7-ffef4f203895
barjinderpaul/Programming
Coding Practice/4th_october.cpp
/* Graphs : BFS, DFS; #include<iostream> #include<queue> #include<list> using namespace std; void bfs(list<int>*adj, int v, int e, int source){ cout<<"BFS Start\n"; queue<int>q; int vis[v+1]={0}; q.push(source); vis[source]=1; while(!q.empty()){ int front = q.front(); cout...
ALGO
0.999892
5.141979
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-10-01T08:51: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": "e58d940f2...
7b9e9af0-e5fe-4d2d-a48a-560147d5cc95
dinhvietcuong1996/CP
contests/2111/2111E.cpp
#include <iostream> #include <vector> #include <limits> // numeric_limits<type>::max(), numeric_limits<type>::min() #include <string> #include <algorithm> // sort, max, min, reverse, swap #include <unordered_set> #include <unordered_map> #include <deque> #include <queue> #include <stack> #include <set> #in...
ALGO
0.999805
4.445403
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2025-05-30T22:35: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": "543b7be165c...
490fe263-b5ba-4633-b357-95d3d47c03c1
pawelbrzoza/optimization-methods
optimization-methods/opt_alg.cpp
#include"opt_alg.h" #include<vector> extern std::vector<double> fibvec; extern std::vector<double> lagvec; double *expansion(double x0, double d, double alfa, int Nmax) { double *interval = new double[2]; solution X0(x0), X1(x0 + d); X0.fit_fun_outside(); X1.fit_fun_outside(); if (X0.y == X1.y) { interval[0] ...
ALGO
0.999999
5.091117
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-12-16T22:53: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": "ae3c643839...
4877b66b-5eb2-4ebc-9baa-a7ab25afc5a9
bluesky0904/codetree-TILs
250206/방화벽 설치하기/firewall-installation.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> #define MAX_N 8 #define MAX_M 8 #define DIR_NUM 4 using namespace std; int grid[MAX_N][MAX_M]; int n, m; vector<pair<int, int> > empty_places; vector<int> selected_indices; queue<pair<int, int> > bfs_q; bool visited[MAX_N][MAX_M]; int max_em...
ALGO
0.999843
4.688855
{ "github_metadata": { "branch": "main", "commit_count": 1377, "repo_created_at": "2023-11-12T08:32: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": "4864cb894...
5950da74-a885-405c-9526-18af5348ae16
jJayyyyyyy/OJ
LeetCode/001-100/P005_Longest_Palindromic_Substring.cpp
/* https://leetcode.com/problems/longest-palindromic-substring/description/ 找出最长回文子串 同类题目 P005, P647 参考思路 https://leetcode.com/problems/longest-palindromic-substring/solution/ 从中间向外延伸, expandFromCenter */ #include <iostream> #include <string> class Solution { public: int getPalindLength( const string & s, int ...
ALGO
0.99993
5.531194
{ "github_metadata": { "branch": "master", "commit_count": 545, "repo_created_at": "2018-04-13T02:19:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e160182...
5b1a950f-c690-435c-a778-72d042306591
mockingbirdnest/Principia
physics/kepler_orbit.hpp
#pragma once #include <optional> #include <ostream> #include <string> #include "base/not_null.hpp" #include "geometry/instant.hpp" #include "physics/body.hpp" #include "physics/degrees_of_freedom.hpp" #include "physics/massive_body.hpp" #include "quantities/named_quantities.hpp" #include "quantities/quantities.hpp" ...
TOOL
0.937143
5.71693
{ "github_metadata": { "branch": "master", "commit_count": 22774, "repo_created_at": "2014-02-08T02:55:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 817, "forks": 71, "issues": 104, "pull_requests": 3 }, "file_meta": { "content_id": "2c...
93573ab3-19ca-4bb5-89e4-a6c690131bf2
CoolManBob/ALReborn
alef/Modules/AUtility/AuBplusTree/BinTree.h
#ifndef _BINTREE_H_ #define _BINTREE_H_ #include "ApBase.h" class CBinTreeNode; // TraverseCallBack, a callback function, like // void somefunction(CBinTreeNode*,void*); // see CBinTree::Traverse method below. typedef void (*TraverseCallBack)(CBinTreeNode*,void*); // CBinTreeNode. The tree is built by CBinTreeN...
ALGO
0.996474
5.221641
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2022-01-17T04:44:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 42, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "731ce3f...
36980d3a-193b-46ac-9ae3-a3b3a86d4434
kbp12/Algorithmic-Designs
303-range-sum-query-immutable/303-range-sum-query-immutable.cpp
class NumArray { public: vector<int>nums; vector<int>sums; int n; int buildst(int l, int r, int i){ if(l>r) return 0; if(l==r){ sums[i] = nums[l]; return sums[i]; } int m = l+(r-l)/2; sums[i] = buildst(l,m,2*i+1) + buildst(m+1,r,2*i+2); ...
ALGO
0.999953
6.477084
{ "github_metadata": { "branch": "main", "commit_count": 3202, "repo_created_at": "2022-04-08T02:41:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6fdaacbd...
6e25b7c4-3490-49ad-b39e-b48c79edfe9d
Mathee-us/exerciciosMaratona
mini maratona 4/2033A.cpp
#include <iostream> #include <cmath> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--){ int n; cin >> n; int x = 0; int moveNumber = 1; while(true){ // Each move has distance 2*moveNumber ...
ALGO
0.999705
4.00305
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-03-16T18:16:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2473571e124...
f946bab6-ec6d-4697-947f-0f4be7155d82
CDPS/Competitive-Programming
LeetCode/0380 - Insert Delete GetRandom O(1).cpp
class RandomizedSet { public: unordered_map<int,int> mp; vector<int> a; RandomizedSet() { ios_base::sync_with_stdio(false); } bool insert(int val) { if(mp.count(val) > 0 ) return false; a.push_back(val); mp[val] = a.size() -1; return true; ...
ALGO
0.990049
5.553205
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2017-09-27T03:10:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a31f29cb...
04ff3164-32ae-4e5d-b3d4-3bf1c0a58b1f
kuldeepsaini23/dsastriversheet
LinkedList/MediumProblemLL/Segrregate odd and even nodes in LL.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* oddEvenList...
ALGO
0.999971
6.032999
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-08-29T05:27: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": "561e09231ee5...
411d8af9-2fc8-475e-9c61-b2921629c5c5
hxz1998/funny_leetcode
CPP/No391.cc
/** * Created by Xiaozhong on 2020/9/10. * Copyright (c) 2020/9/10 Xiaozhong. All rights reserved. */ #include "vector" #include "iostream" #include "map" using namespace std; class Solution { public: bool isRectangleCover(vector<vector<int>> &rectangles) { // 保存四个最大外围点 int left = INT32_MAX, ri...
ALGO
0.999772
5.810987
{ "github_metadata": { "branch": "master", "commit_count": 272, "repo_created_at": "2020-05-04T22:52:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c225afa4...
37b78ed1-9c3a-43ff-9345-b0f97f5dd280
feelus-disk/_programming
_lang_cpp/[Страуструп]принципы и практика с++ Source/Exercise Solutions/Ch11/e11-9.cpp
// <NAME> 1/17/2010 // Chapter 11 Exercise 9 /* Write a function vector<string> split(const string& s) that returns a vector of whitespace-separated substrings from the argument s. */ #include "std_lib_facilities.h" /* Here, first, is the obvious split(): */ vector<string> split(const string& s) // return a v...
ALGO
0.998689
5.627074
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2015-07-07T10:13:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a615bf3d...
3e71c17e-eaf1-43e2-83b0-baa34992dbc3
need-more-sleeep/ejudje_graphs
Source.cpp
#include <iostream> #include <unordered_set> #include <string> #include <unordered_map> #include <sstream> std::unordered_set <std::string>first_line; std::unordered_set<std::string> second_line; std::unordered_map<std::string, std::unordered_set<std::string>> deps; std::string result; void split(std::istringstream&...
ALGO
0.999807
4.099377
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-01-24T17:13: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": "b2f13e33cd...
e0526096-4c38-4ce7-8256-060c7c770ecd
Porosh45/Problem-Solving
[UVA-11110].cpp
#include<bits/stdc++.h> #define ll long long #define pi acos(-1.0) #define pb push_back #define vi vector<int> #define mapii map<int , int> #define mapci map<char, int> #define mapsi map<string,int> #define FOR(i,n) for(int i = 0;i<n;i++) #define CP(n) cout<<"Case "<<n<<": " #define fr freopen("input.txt","r",stdin) #d...
ALGO
0.999728
3.504821
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-05-22T21:51: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": "5bab70a261b3...
deed1bd3-3cca-483d-9c1f-946eed9dc5b7
ploffer11/CPP
16367.cpp
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") //#define int long long using namespace std; using ll = long long; using pii = pair<int, int>; const int INF = 987654321; const int MOD = 1e9 + 7; class TwoSatisfiability { private: struct Strongl...
ALGO
0.99989
4.024145
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-01-08T06:23: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": "082c2cea2...
d94b182a-18c1-4bb1-a29c-c893cdf88f14
MasterHoracio/COJ-Solutions
3740-CrazyCircle.cpp
#include <cstdio> #include <vector> #include <algorithm> using namespace std; int main(){ int tc, n, one, student, ans, search, temp; vector <int> circle, order_circle; bool change[1005]; scanf("%d",&tc); while(tc--){ scanf("%d",&n); fill(change, change + n, false); for(int i = 0; i < n; i++){ scanf(...
ALGO
0.999878
3.554823
{ "github_metadata": { "branch": "master", "commit_count": 190, "repo_created_at": "2016-10-08T04:34:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26941997...
1143d79c-b8e9-41dc-8845-843a87d3bea2
MultivacX/leetcode2020
algorithms/hard/1585. Check If String Is Transformable With Substring Sort Operations.h
// 1585. Check If String Is Transformable With Substring Sort Operations // https://leetcode.com/problems/check-if-string-is-transformable-with-substring-sort-operations/ // Runtime: 84 ms, faster than 98.46% of C++ online submissions for Check If String Is Transformable With Substring Sort Operations. // Memory Usage...
ALGO
0.999989
6.570534
{ "github_metadata": { "branch": "master", "commit_count": 1856, "repo_created_at": "2019-12-31T13:19:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d71c8a4...
949d46ee-ac7b-4d93-9f9a-7b261599db30
vinitpatil2812/CP
CodeForces/contests/1945/1945E.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll, ll> #define pv(v) { for(auto &x : v) cout << x << " "; cout << endl; } // printVector #define iv(v) { for(auto &x : v) cin >> x; } // inputVector #define all(v) v.begin(), v.end() // first and last iterator const int mod = 1e9 + ...
ALGO
0.999816
4.408797
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-04-10T07:08: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": "390a2e4a61...
e6924804-931c-45a0-af24-b6f166a1be16
hoang1803/toanrr
10.cpp
#pragma GCC target("avx2") #pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define task "10" #define MASK(i) (1LL << (i)) #define c_bit(i) __builtin_popcountll(i) #define BIT(x, i) ((x) & MASK(i)) #define SET_ON(x, i) ((x) | MASK(i)) #define SET_OFF(x, i) ((x) & ~MASK(i)) #define all(x) x.be...
ALGO
0.99995
4.863532
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-03-30T08:30: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": "08e66992a6c...
b4e85fd9-dac8-4f6e-b23c-1fe44fe4b526
SAYAN-DEV-NATH/Phitron_Course
Basic Data Structures/W-3 Doubly Linked List/M-10 STL List & Cycle Detection/List_modifiers.cpp
#include <bits/stdc++.h> using namespace std; int main() { // list<int> list1 = {1, 2, 3, 4, 5}; // Type 1; // list<int> list1; // Type 2; // list1.assign({10, 20, 30, 40, 50}); // list<int> list2 = {1, 2, 3, 4, 5}; //Type 3; // list<int> list1; // list1.assign(list2.begin(), list2.end()); ...
TOOL
0.956752
3.602423
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-07-07T15:02: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": "42f4124016fc...
52ea3428-bcb4-407a-8f7d-ed99ee5d4eb4
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/09_15917_76.cpp
#include <stdio.h> #include <math.h> #include <iostream> #include <sstream> #include <set> #include <map> #include <vector> #include <list> #include <string> #include <algorithm> #include <iomanip> using namespace std; int result; const int mods = 10000; const string tocount = "welcome to code jam"; void Cou...
ALGO
0.997831
3.362687
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00: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": "020f4b565...
83903ff5-7b10-4282-b30d-98aea9d637a8
raincross7/code-similarity
codes/train_code/problem477/problem477_277.cpp
#include <bits/stdc++.h> using namespace std; // ----------- define -------------- #define int long long #define ii pair<int,int> #define fi first #define sc second #define all(x) (x).begin(),(x).end() // --------------------------------- int get(int a, int b, int x) { int l = ((a - 1) / x + 1) * x; int r = b / x...
ALGO
0.999624
5.143973
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "0aff82cd8db2...
2d1f34be-fd25-45bd-bfff-3c3a6dbc68bf
uofs-simlab/ChasteOS
heart/src/solver/electrics/bidomain/OperatorSplittingCrankNicolsonBidomainSolver.cpp
/* Copyright (c) 2005-2015, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
ALGO
0.999782
6.36813
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-11-17T16:44:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93db38fcf18...
724c80eb-b0e7-4633-94c1-0c6a4a762ce7
TheRealMolen/adventofcode2020
aoc20/day7.cpp
#include "pch.h" #include "harness.h" struct Rule; struct ChildRule { int count; Rule* rule; bool operator<(const ChildRule& other) const { return (rule < other.rule); } }; struct Rule { string outer; set<ChildRule> contents; set<string> content_strings; bool operator<(c...
ALGO
0.954248
4.859027
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2020-12-01T23:01: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": "8d5fe8a7f69...
35b35d7a-ca38-4b8b-b3be-ade7909a90ec
tuenti/programming-challenge-2
finalists/protocolocon/challenge_04/c4.cc
// -*- mode: c++; coding: utf-8; c-file-style: "stroustrup"; -*- #include <fstream> #include <iostream> #include <algorithm> #include <vector> #include <map> #include <string> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <ctype.h> #include <limits> #include <set> #include <std...
ALGO
0.999055
3.057233
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2012-05-18T09:14:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 17, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd27802174...
483dd932-7e5f-4d8b-80ac-48d8702ddcec
4X0L073/ipk-exercises
Blatt2/Aufgabe1.cpp
#include <iostream> #include <cmath> double ergebniss (double a,double b ,double c){ double e1; double D1; D1 = sqrt(b * b - (4 * a * c)); e1 = (-b + D1 )/(2 * a); return e1; } double ergebniss2 (double a, double b, double c){ double e2; double D2; D2 = sqrt(b * b - (4 * a *...
ALGO
0.999558
4.032521
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-11-23T11:39: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": "5735294796...
8c826667-d856-4461-92f8-df3a1108fc0a
SatyamMattoo/DSA-Problems
Arrays and Strings/Problem_3.cpp
#include <iostream> using namespace std; void duplicatearr(int arr[], int size) { int i = 0; int j = size - 1; int k = 0; while (k <= j) { if (arr[k] == 0) { swap(arr[k], arr[i]); i++; k++; } else if (arr[k] == 1) { ...
ALGO
0.999785
4.05732
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-09-03T08: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": "12c2c0d3a2f2...
c8199db6-808f-486f-9e7a-0106b29cabb1
corganhejijun/printer
ReadFile/stpReader/src/BRepExtrema/BRepExtrema_ExtCC.cxx
// Created on: 1993-12-15 // Created by: <NAME> // Copyright (c) 1993-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser ...
ALGO
0.993918
7.281612
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2019-09-21T08:20:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39c3e15a...
6a93da22-011c-4d7c-8008-b94799da39d6
tangjz/acm-icpc
leetcode/1001-2000/1032-stream-of-characters.cpp
class StreamChecker { static const int maxc = 26, maxm = 1 << 13 | 1; typedef struct { bool suf; int cnt, sta, msk, nxt; } Trie; vector<Trie> nodes; vector<int> bcnt; int cur; void parse(vector<string> &words) { int n = words.size(); vector<int> ord(n); ...
ALGO
0.999322
6.029631
{ "github_metadata": { "branch": "master", "commit_count": 293, "repo_created_at": "2013-10-06T18:57:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 45, "forks": 13, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "660ab6...
243d481a-be95-4994-b3f0-0bb4ade6c5a6
hyunwoo4136/object_following
src/object_following.cpp
#include <ros/ros.h> #include <vector> #include "sensor_msgs/LaserScan.h" #include "geometry_msgs/Twist.h" using namespace std; /////////////////////////////////////////////////////////////////////////// var. declaration #define PI 3.141592 geometry_msgs::Twist cmd_vel; // velocity command to be published boo...
ALGO
0.978769
4.466707
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-09-01T15:10: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": "5334d46aa...
ea8353db-f349-4251-aaca-519f7ae4e274
MC3297/usaco-solutions-bronze
aircownditioning.cpp
#pragma region #include <bits/stdc++.h> using namespace std; using ll = long long; #define int ll using pii = pair<int,int>; #define vt vector #ifndef LOCAL #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #define debug(...) #endif #define fi first #define se second #define pb pu...
ALGO
0.999991
4.495162
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2022-02-01T16:58: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": "d211385e96b...
45f12629-36c4-4e48-8e72-9c10bfa8e7fe
itsuhane/slamtools
src/slamtools/pnp.cpp
#include <slamtools/pnp.h> #include <ceres/ceres.h> #include <slamtools/frame.h> #include <slamtools/track.h> #include <slamtools/sliding_window.h> #include <slamtools/ceres/lie_algebra_eigen_quaternion_parameterization.h> #include <slamtools/ceres/reprojection_error_cost.h> #include <slamtools/ceres/preintegration_err...
ALGO
0.976769
6.725329
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-09-11T10:14:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3d5673f...
5311de45-1ea8-43d2-b2f5-cfa4572c162a
magyarakoos/contest-prog
mester/haladó/mohó/ladapakolas-raktarban/main.cpp
#include <bits/stdc++.h> #define cinv(v) for (auto& e : v) cin >> e; #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define size(v) (int)v.size() #define has(s, e) s.count(e) using namespace std; using ll = long long; int main() { cin.tie(0), ios::sync_with_stdio(0); int N, M; ci...
ALGO
0.999993
3.846177
{ "github_metadata": { "branch": "main", "commit_count": 6327, "repo_created_at": "2023-12-20T17:09: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": "5ee10769f...
ba863675-854f-4d04-a59e-e71897712ea5
PayalBhandwalkar/_C-
C++ Introduction/sorting_searching/rotate_array.cpp
#include <iostream> using namespace std; void rotate(int *input, int d, int n) { int temp[d]; for(int i=0; i<d; i++) temp[i] = input[i]; for(int i=d; i<n; i++){ input[i-d] = input[i]; } for(int i=n-d, k=0; i<n; i++, k++){ input[i] = temp[k]; }} int main() { int t; cin...
ALGO
0.999665
3.877329
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-08-04T07:41:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c30f1a4da...
41fe7cfd-6551-4a10-8320-9ad8b29e5e06
ishandutta2007/codeforces-s
spy20051623/normal/1521/D.cpp
#include <bits/stdc++.h> using namespace std; vector<int> m[200005]; vector<pair<int, int>> rem; vector<pair<int, int>> cha; int lvl[200005]; int fa[200005]; void bfs(int s) { memset(lvl, 0, sizeof lvl); queue<int> q; int p; q.push(s); lvl[s] = 1; fa[s] = 0; while (!q.empty()) { p = q.front(); q.pop(); ...
ALGO
0.999635
4.173913
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "f7fe981b6eb9...
eb550bc4-e8d5-4a58-b3ed-83debd5146b9
callmerockett/Competitive-Programming
OJ_Solutions/URI/2854.cpp
#include <map> #include <iostream> #include <vector> #define MAXN 333 using namespace std; int pai[MAXN], r[MAXN], sz, n, m, cur = 0; map<string, int> mp; int findSet(int i) {return i == pai[i]? i : pai[i] = findSet(pai[i]);} void join (int a, int b) { a = findSet(a); b = findSet(b); if (a == b) return; ...
ALGO
0.999921
3.545386
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2018-01-06T04:49: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": "98eb60dad...
93f1cebf-0898-4c17-b96d-b19ccbd9c311
Dzy0726/LeetCode-Practice
Backtracking/77.组合/combine.cpp
class Solution { public: vector<int> path; vector<vector<int>> result; void backTracking(int n, int k, int start) { if (path.size() == k) { result.push_back(path); return; } for (int i = start; i <= n; i++) { path.push_back(i); backTrac...
ALGO
0.999983
6.587106
{ "github_metadata": { "branch": "main", "commit_count": 288, "repo_created_at": "2023-04-06T15:00: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": "5691dd4301...
88508b9a-f37d-4f52-9754-a3620347b050
yzj9639/PATexercise
2019.pat/A1018.cpp
#include <cstdio> #include <cstring> #include <vector> #include <algorithm> using namespace std; const int maxv = 510; const int INF = 1000000000; int cmax, n, sp, m; int weight[maxv], G[maxv][maxv];//w表示需要PBMC携带的车辆数 int d[maxv], minNeed = INF, minRemain = INF; bool vis[maxv] = {false}; vector<int> pre[maxv]; vector<in...
ALGO
0.999997
3.591464
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-11-16T13:29:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "117d5b6402...
cbc0c32a-9eb5-48d2-a001-d82d87dbc4da
rohan-goyal-1/CP
USACO/Silver/CountingHaybales.cpp
#include <algorithm> #include <array> #include <cassert> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <unordered_map> #include <unordered_set> #include <utility> #include <v...
ALGO
0.999958
4.678755
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-05-23T04:55: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": "efa24722874...
246bd502-bd99-4e7c-937b-34d42a078e7a
hylTianMeng/PreCode
c++/codeforces/CF963E/my.cpp
#include<bits/stdc++.h> #define dd double #define ld long double #define ll long long #define uint unsigned int #define ull unsigned long long #define N 140 #define M number using namespace std; const int INF=0x3f3f3f3f; const int mod=1e9+7; template<typename T> inline void read(T &x) { x=0; int f=1; char c=g...
ALGO
0.999914
3.677963
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-06-18T11:04:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "973142905413...
1742c289-211a-4097-9a84-99f4eafdf77c
xanzacks/DAZStudentRegister
Source Files and Header File(s)/Jiayan Dong/List.h
// the Linked List class // Created by <NAME> // Modified by: <NAME> // IDE: MSVS 2019 #ifndef LIST_H #define LIST_H using namespace std; //compare function return -1 if left < right, return 0 if left = right, return 1 if left > right template <class T> class List { private: //linked list node struct ListNode{ ...
TOOL
0.994575
4.600457
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-02-23T11:20: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": "21f8786f84...
c6d880c8-65b2-40ef-b303-5cb10107fff9
flskhhdf/boj_algorithm
X9012.cpp
#include <iostream> #include <stack> #include <type_traits> using namespace std; bool Match(char a, char b) { if (a == '(' && b == ')') return true; if (a == '[' && b == ']') return true; if (a == '{' && b == '}') return true; return false; } int main() { int tc; cin >> tc; while (tc--) { ...
ALGO
0.999473
4.869604
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2022-10-04T13:57: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": "9f7ad8630f3...
6fbdb0b3-3b61-43b4-8ed2-c7db31c925ef
kevin4coding/algo-pub
code/655.print-binary-tree.cpp
class Solution { public: vector<vector<string>> printTree(TreeNode* root) { const auto h = [&]() { std::function<int(TreeNode*)> fold = [&](TreeNode* n) { if (n == 0) { return 0; } else { return 1 + std::max(fold(n->left), fold(n->right)); } }; ...
ALGO
0.999822
6.72009
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-10-18T05:36:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4cac2f15...
4972f0db-c0f7-4c34-bb65-7bf967d0ed4b
davimuri/adventofcode2024
src/day5.cpp
#include <iostream> #include <fstream> #include <sstream> #include <map> #include <vector> #include <set> using namespace std; vector<string> readLines(string filename) { fstream InputFile(filename, ios_base::in); vector<string> lines; string text; while (getline(InputFile, text)) { lines.push_...
ALGO
0.99991
5.181156
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-01T20:44:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3da4591ffde3...
a6c43c26-26d1-45e0-a97b-ed82e21d8fc0
LionZhY/LeetCode-ACM
hot100/lc145.cpp
#include <iostream> #include <vector> using namespace std; // 145 二叉树后序遍历 // 结构树 struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; // 递归后序遍历 左-右-中 void postorderTraversal(TreeNode* cur, vector<int>& vec) { if (cur == nullptr)...
ALGO
0.999949
5.388269
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2025-06-26T02:49: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": "c3e9ee1f1f3...
8a9a7da9-904e-4890-ba8a-a1db6ff36f63
tomoakiii/atcoder2
Archive/abc288/c.cpp
#include <atcoder/all> #include <bits/stdc++.h> using namespace std; using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) template<typename T> inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); } template<typename T> inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true...
ALGO
0.999915
3.775784
{ "github_metadata": { "branch": "main", "commit_count": 252, "repo_created_at": "2024-02-05T06:43: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": "b6f5295a32...
cc38ac23-3ff8-4053-89dd-5e300e5650c2
yliu-cs/ACM
CodeForces/CodeForces-977C.cpp
#include <iostream> #include <cstdio> #include <string> #include <cstring> #include <algorithm> #include <iomanip> #include <cctype> #include <cmath> #include <stack> #include <queue> #include <vector> #include <cstdlib> #include <sstream> #include <set> #include <map> using namespace std; #define mem(a,b) memset(a,b,s...
ALGO
0.999971
3.400432
{ "github_metadata": { "branch": "master", "commit_count": 442, "repo_created_at": "2018-10-03T10:47:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e18a7af9...
c4616c9c-c251-4458-8225-bfbb11c77f47
abhigitit/Diamanti_SE_Intern
Task6_reverseWordsString.cpp
/* Task 6: Reverse words in a given string --reverseString fucntion is written to reverse the entire string. --First step of the algoirthm is to reverse the entire string and then reverse word by word. --reverseWords function calls reverseString internally to reverse words in the string. --Additional spaces either befo...
ALGO
0.999908
5.934014
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-03-11T02:25: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": "19ff350ff0...
3a28f80b-4ff9-40ea-9c91-0d4857577806
Daseull/Algorithm
백준/Gold/15971. 두 로봇/두 로봇.cc
#include <iostream> #include <queue> using namespace std; int n, s, e; vector<vector<pair<int, int>>> edges; int solve() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int u, v, w, distance; queue<pair<int, int>> q; vector<bool> visited(n + 1, false); vector<int> before(n+1); q.push({ 0, s });...
ALGO
0.999979
4.23774
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2022-06-23T09:13: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": "b1f1502d36...
33284a03-ca39-4e39-88ba-ed785e53b2d0
ankitsri98/CSES-Solutions
Binary Search/Movie Festival.cpp
#include<bits/stdc++.h> using namespace std; #define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) typedef long long int lli; typedef long long ll; typedef pair<ll, ll> pll; typedef vector<pll> vop; typedef vector<ll> vl; typedef vector<vl> vvl; #define REP(i,a,b) for(long long int i=a;i<b;i++)...
ALGO
0.999985
3.979705
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2020-11-06T17:00:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3541779aa1...