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
0480a49c-5303-49bf-bf7b-3a09da193a2e
t104/atcoder-cpp
nihonbashi2021/b.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; #define INF 1001001001 #define LINF (1LL<<60) #define rep(i,n) for (int i = 0; i < (n); ++i) template<typename T1,typename T2> inline bool chmin(T1 &a,T2 b){ return a > b && (a = b, true); } template<typename T1,typename T2> i...
ALGO
0.999962
4.616408
{ "github_metadata": { "branch": "master", "commit_count": 657, "repo_created_at": "2021-07-24T09:44: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": "06f9b551...
68b6da4e-8aef-4327-9ef9-cbdb405419bd
Ahmad-AlDeeb/Problem-Solving
Codeforces/Polycarp Restores Permutation.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define ll long long #define ld long double #define F first #define S second #define vll vector<long long> #define pb push_back #define all(v) v.begin(), v.end() ////////////////////////////////...
ALGO
0.999785
3.899806
{ "github_metadata": { "branch": "main", "commit_count": 1500, "repo_created_at": "2023-01-11T08:37:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "efb028eef...
6eb0122a-2b64-4b5c-a8cc-1002c2b9f707
SeungJL/BaekJoon-Study
2022/06_Jun/Week_5/17140/승주.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int a = 3, b = 3; // a는 세로 크기, b는 가로 크기 int r, c, k; bool cmp(pair<int, int> P1, pair<int, int>P2) { if (P1.second < P2.second) { return true; } else if (P1.second == P2.second) { if (P1.first < P2.first) { return true; } e...
ALGO
0.999984
3.948168
{ "github_metadata": { "branch": "main", "commit_count": 681, "repo_created_at": "2022-01-28T04:31:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "28a2acfcdf...
f00b8b1f-9746-4e5e-89a4-17805806519d
KIET7UKE/Hacktoberfest-2K22
DSA/CODECHEF/3.cpp
#include <bits/stdc++.h> using namespace std; template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; } template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::valu...
ALGO
0.999985
4.176116
{ "github_metadata": { "branch": "main", "commit_count": 287, "repo_created_at": "2022-09-25T05:27:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 67, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "78cbe5e5...
976ae7fb-259d-41c4-838a-fc5513e34d74
WhiZTiM/coliru
Archive2/2d/41745c2b475110/main.cpp
#include <iostream> using namespace std; void askValues(int a[], int); // << changed fron int to void void dispValues(int a[], int); int countOdd(int a[], int); int countEven(int a[], int); void copyOdd(int a[], int b[], int); // changed from int to void void copyEven(int a[], int b[], int); // changed from int to vo...
ALGO
0.998417
3.782817
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11757b...
095adc4d-1fe8-4e76-a285-5331c88ffabd
stevenbai0724/CSES-Problem-Set
Graphing Algorithms/monsters.cpp
//https://cses.fi/problemset/task/1194 //TLE, 18 out of 21 points #include <bits/stdc++.h> using namespace std; #define int long long signed main(){ cin.tie(nullptr)->sync_with_stdio(false); int n, m; cin>>n>>m; vector<vector<char>>arr(n+1, vector<char>(m+1)); vector<pair<int, int>>mon; v...
ALGO
0.999966
4.253302
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2020-11-23T13:01: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": "1f09730f39b...
e2715613-ce90-47a9-8b39-49839d21bd44
ishandutta2007/codeforces-a
afterall/normal/1427/G.cpp
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; #define pb push_back #define pii pair < int , int > #define F first #define S second //#define endl '\n' //#define int long long #define sync ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) #pragma GCC optimize("Ofast,no-stack-protector,...
ALGO
0.999521
3.496141
{ "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": "d23a49b9e100...
5abd23b0-2e4c-4fbc-bb43-f581698297da
rainliu/leetcode
src/200NumberOfIslands/200NumberOfIslands.cpp
class union_find{ vector<int> id; vector<int> sz; int cnt; public: union_find(int N){ cnt = N; id.resize(N); sz.resize(N); for(int i=0; i<N; ++i){ id[i]=i; sz[i]=1; } } int find(int i){ while(i!=id[i]){ id[i...
ALGO
0.999963
5.909027
{ "github_metadata": { "branch": "master", "commit_count": 913, "repo_created_at": "2015-02-14T23:06:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8313d1...
87cb9407-29d4-4d9a-8d52-60eec349a92e
PabloMessina/Competitive-Programming-Material
Solved problems/Codeforces/740A_AlyonaAndCopybooks.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i = a; i <= b; ++i) #define invrep(i,b,a) for(int i = b; i >= a; --i) #define umap unordered_map #define uset unordered_set typedef vector<int> vi; typedef vector<vi> vii; typedef long long int ll; typedef pair<int,int> pii; int n; ll a,b,c; ll m...
ALGO
0.999937
3.656968
{ "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": "7f1fea1...
27a76847-a0e6-46c2-89bf-6b0faf782f03
norlanliu/algorithm
leetcode/91_decode_ways.cc
/* * ===================================================================================== * * Filename: 91_decode_ways.cc * * Description: * * Version: 1.0 * Created: 04/12/2015 10:57:41 AM * Revision: none * Compiler: gcc * * Author: (<NAME>), <EMAIL> *...
ALGO
0.999248
4.438582
{ "github_metadata": { "branch": "master", "commit_count": 203, "repo_created_at": "2015-01-22T01:32: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": "961daa00...
8495a1a5-fda6-45b7-a056-d522af21ffe0
flaviu2001/High-School-Small-Projects
ONI/ONI 2019/arb.cpp
#include <bits/stdc++.h> #define ff first #define ss second using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; const ll INF = 9223372036854775807ll; const int inf = 2147483647, nmax = 250005; int n, p, test, depmax, c[nmax], dep[nmax], e[nmax], f[nmax], l[nmax], aib[nmax], ...
ALGO
0.999764
3.638354
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-04-09T13:40: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": "0db897fc4...
14825bc8-75ba-4acc-9951-9e9e84401292
Gecode/gecode
gecode/int/ldsb/brancher.hpp
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* * Main authors: * <NAME> <<EMAIL>> * * Copyright: * <NAME>, 2012 * * This file is part of Gecode, the generic constraint * development environment: * http://www.gecode.org * * Permission is hereby granted, free of charge, t...
ALGO
0.997577
7.136448
{ "github_metadata": { "branch": "master", "commit_count": 5620, "repo_created_at": "2015-11-06T07:33:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 309, "forks": 77, "issues": 40, "pull_requests": 9 }, "file_meta": { "content_id": "7d4e...
af788db9-383b-4776-b972-75321302296f
tar3q-az1z/Atcoder-solutions
Atcoder Beginner Contest(ABC)/abc217_c.cpp
#define _USE_MATH_DEFINES #include<iostream> #include<vector> #include<string> #include<cstring> #include<stack> #include<queue> #include<cstdio> #include<set> #include<unordered_set> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<utility> #include<cstdlib> using namespace std; typ...
ALGO
0.999966
3.699831
{ "github_metadata": { "branch": "main", "commit_count": 242, "repo_created_at": "2023-03-25T04:46:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31f949ab48...
b853dd3a-013d-4617-90bd-5664655fe2ab
davidzyc/oi
luogu/2446.cpp
#include<cstdio> #include<iostream> #include<vector> #include<cstring> #include<queue> using namespace std; typedef long long ll; typedef pair<ll, int> pli; const ll INF = 0x3f3f3f3f3f3f3f3f; const int MAXN = 3005; const int MAXM = 70007; int n, m; int ecnt = 0; int first[MAXN], nxt[MAXM], to[MAXM]; ll l[MAXM]; vecto...
ALGO
0.999868
3.658937
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2018-01-14T02:54: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": "f0a403b06...
9acf772e-eb1f-4ba2-8d17-a6cbd88f8fcd
cntoumas/LabExercises
Class exercises/structures/structs max and sum.cpp
// struct me int x, int y, boolean max, int sum // function me struct eisodo kai typwnei to sum kai to max // function me struct gia eisodo x kai y #include <iostream> using namespace std; struct vars { int x; int y; int max; int sum; }; void set_input (vars &ptr){ cout << "Insert number for x" << endl; cin ...
ALGO
0.988342
4.216107
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-11-02T21:01:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12c110298b5...
c044be26-087e-41ee-b499-993200baf5ac
noahisch/ParallelMaxFlow
DinicAlgorithm/Assign.cpp
#pragma once #include "Assign.h" #include <cassert> using namespace std; Assign::Assign():network(nullptr) {} //Assign::Assign(int n) : Tassign(vector<intWrapper>(n, { 0 })) {} void Assign::init(int n, std::vector<DinicVertexLayerP> & networkObj) { Tassign = PartialSumTree<intWrapper>(vector<intWrapper>(n, { 0 })); ...
ALGO
0.997828
3.997073
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-04-27T05:20:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0baaa6bac7...
81bae36e-8881-495c-99b0-7ad5e3792d3c
KodairaTomonori/AtCoder
ABC/130/E.cc
#include <iostream> using namespace std; long long csum[2010][2010] = {0}; long long dp[2010][2010] = {0}; long denom = 1000000007; int main() { int S[2001] = {0}, T[2001] = {0}; int N, M; int _i, _j, i, j; cin >> N >> M; for (i = 1; i < N + 1; i ++) cin >> S[i]; for (i = 1; i < M + 1; i ++) cin >> T[i]; ...
ALGO
0.999992
4.306756
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-03-14T13:33:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ca391b1f1...
17de0403-e31f-4419-984f-93a3cf59ebf1
abhik2003/my_cp
codeforces/cf_958/C_Increasing_Sequence_with_Fixed_OR.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <algorithm> #include <numeric> #include <cmath> #include <climits> #include <cassert> #include <bitset> #include <fs...
ALGO
0.999645
4.469553
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2023-05-03T13:41: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": "e60da35b0...
44d3aa58-b7bf-4a77-a2b6-c585fb006303
P0L3NARUBA/roblox-2016-source-code
CSG/sgCore/Core/APLICAT/EXP_INTF.cpp
#include "../sg.h" static void exp_def_pl(lpD_PLANE pl, lpREGION_3D g); static BOOL exp_cut_face_pl(lpNPW np, short face, lpD_PLANE pl, lpNP_VERTEX_LIST ver); static BOOL exp_up(lpNPW np, short face, lpNP_VERTEX_LIST ver); BOOL exp_divide_face(lpNPW np, short face, lpREGION_3D gab) { NP_VERTEX_L...
ALGO
0.962564
4.139578
{ "github_metadata": { "branch": "master", "commit_count": 915, "repo_created_at": "2025-03-23T14:24:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 52, "forks": 25, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf01336...
17bc7f02-178d-4476-8539-25e85859afdf
EunTilofy/ACM-code
2022-fall/0912-icpc2022-kunming/B.cpp
#include<bits/stdc++.h> #define ll long long //#define int long long #define db double #define ld long double #define dbg1(x) cerr<<#x<<"="<<(x)<<" " #define dbg2(x) cerr<<#x<<"="<<(x)<<"\n" #define dbg3(x) cerr<<#x<<"\n" using namespace std; #define reg register #define inf 0x3f3f3f3f #define infL 0x3f3f3f3f3f3f3f3f t...
ALGO
0.999873
3.827557
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2022-09-12T07:31: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": "2b133630ac...
0e00d02c-5f05-4549-8ffe-8367ba11da60
chulbulsingh27/GFG-Problem-of-the-day
Cousins of a given node.cpp
/*Given a binary tree and a node, print all cousins of given node in order of their appearance. Note that siblings should not be printed. Example 1: Input : 1 / \ 2 3 / \ / \ 4 5 6 7 Given node : 5 Output : 6 7 Explanation : Nodes 6 and 7 are on the s...
ALGO
0.999972
5.236474
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2021-11-07T07:23: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": "8d819c2d07...
60bb0d77-a348-4a10-b9f1-a9457ca99a10
ANGSD/metaDMG-cpp
ngsLCA_cli.cpp
#include <stdlib.h> #include <stdio.h> #include <assert.h> #include <string.h> #include <cassert> #include <htslib/bgzf.h> #include "ngsLCA_cli.h" pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER; pars *pars_init(){ pars *p =(pars*) calloc(1,sizeof(pars)); p->ht...
DATA
0.965001
3.433182
{ "github_metadata": { "branch": "master", "commit_count": 179, "repo_created_at": "2020-07-03T00:47:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "a26b9f58...
d34e00ab-a246-45a3-8902-3202419db7de
AdityaPrakash-26/Leetcode-Solutions
Aditya/0100-0999/222.count-complete-tree-nodes.cpp
/* Accepted 18/18 cases passed (30 ms) Your runtime beats 69.36 % of cpp submissions Your memory usage beats 94.01 % of cpp submissions (30.8 MB) */ /* * @lc app=leetcode id=222 lang=cpp * * [222] Count Complete Tree Nodes */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * ...
ALGO
0.999971
6.760738
{ "github_metadata": { "branch": "master", "commit_count": 939, "repo_created_at": "2021-03-05T04:43:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f760b1a...
2358c945-7181-4127-8aad-07779faa36e3
zefengqiu1/cs8
CS8/bst/bst_function.h
#ifndef BST_FUNCTION_H #define BST_FUNCTION_H #include "tree_node.h" #include <iomanip> template <typename T> void tree_insert(tree_node<T>* &root, const T& insert_me); template <typename T> bool tree_search(tree_node<T>* root, const T& target,tree_node<T>* &found_ptr); template <typename T> tree_node<T>* tree_sear...
ALGO
0.99923
3.833986
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-12-14T10:34: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": "18dfd1b6bf...
1ce9e102-3f00-4727-aafa-31febcfd02bc
hilockman/cim2ddl
znd/dev/src/PowerGrid/Reliability/PGReliability/PRAdequacyBase/PROverLimitAdRadial.cpp
#include <float.h> #include "PROverLimitAd.h" extern const char* g_lpszLogFile; extern void Log(const char* lpszLogFile, const char* pformat, ...); namespace PRAdequacyBase { extern CPRMemDBInterface g_PRMemDBInterface; void CPROverLimitAd::FormRadialBranDFactor(tagPRBlock* pPRBlock, const int nRadial, const int nB...
ALGO
0.995622
4.476765
{ "github_metadata": { "branch": "master", "commit_count": 157, "repo_created_at": "2017-07-24T07:48:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2a9cbfd...
dabbd0b4-f2bb-44cb-85e7-3da7a829cf7f
kaloronahuang/KaloronaCodebase
Practices/AtCoder/ARC099E.cpp
// ARC099E.cpp #include <bits/stdc++.h> using namespace std; const int MAX_N = 770; int n, m, color[MAX_N], cnt[2]; bool G[MAX_N][MAX_N], tmp[MAX_N << 1], pack[MAX_N << 1]; void dfs(int u, int col) { color[u] = col, cnt[col == 1]++; for (int i = 1; i <= n; i++) if (G[u][i] == false && i != u) ...
ALGO
0.999912
3.637038
{ "github_metadata": { "branch": "master", "commit_count": 554, "repo_created_at": "2018-11-02T01:32:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1f4d1b...
37ef9df0-c368-49f3-b2ba-43436ef5c576
zhouyuhaoat/PAT
2.test/A1132-A1135/A1132.cpp
/* * author: zhouyuhao * created: 2023-04-03 11:46:30 * modified: 2023-04-03 11:53:21 * item: Programming Ability Test * site: Yuting */ /* @pintia psid=994805342720868352 pid=994805347145859072 compiler=GXX ProblemSet: PAT (Advanced Level) Practice Title: 1132 Cut Integer https://pintia.cn/pr...
ALGO
0.999521
5.952483
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2025-05-20T01:36: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": "6ffad09bfa5...
84087211-f923-40c1-99a0-33b11505217d
saadam1n/CpuRenderer
src/Renderer/Triangle.cpp
#include "Triangle.h" #include <limits> #include <iostream> Vertex TriangleIntersection::GetInterpolatedVertex(void) const { Vertex InterpolatedVertex = Surface->Vertices[0] * (1.0f - U - V) + Surface->Vertices[1] * U + Surface->Vertices[2] * V ; InterpolatedVertex.Normal = glm::normalize(InterpolatedVert...
ALGO
0.99
6.180326
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-05-31T22:56:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7cd9836e55...
4bda4996-8c5b-4238-883d-582bdc66aa58
mkoldaev/bible50cpp
lang/jap/gen/Bible14.h
#include <map> #include <string> class Bible14 { struct jap1 { int val; const char *msg; }; struct jap2 { int val; const char *msg; }; struct jap3 { int val; const char *msg; }; struct jap4 { int val; const char *msg; }; struct jap5 { int val; const char *msg; }; struct jap6 { int val; const char *msg; }; struct...
CONFIG
0.986685
3.087311
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-04-01T21:23: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": "8d2cb57d0...
640739e8-299a-43f9-bedf-7f6eb829c3be
tingluotw/leetcode
Primitives/54_Spiral_matrix.cpp
/* solution 1: * Use a big map with boundaries and go over the map step by step * If we meet the boundary, change the direction * time complexity = O(n) * space complexity = O(n) * * solution 2: layer-by-layer * time complexity = O(n) * space complexity = O(1) //save more space */ class Solution { public: ...
ALGO
0.999999
6.355384
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-07-07T04:27: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": "18f29fc93...
c27f247d-0f35-4eff-a2ec-986b14c1fab2
MisguidedBadge/AI
NeuralNetworkStuff/NeuralNetworkStuff/Pool.cpp
#include "Pool.h" /* Max Pool (Details in Header) -- Takes in the largest value of the subset */ vector<vector<vector<float>>> MaxPool(vector<vector<vector<float>>> &image, int size, int height, int width) { // output image vector<vector<vector<float>>> output; // temp value to be compared and stored float temp ...
ALGO
0.992376
4.529501
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2019-09-17T07:53:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "161bc3e0d...
e713d972-69d0-4dde-8c9d-403a091703a9
KatsuyaKikuchi/ProgrammingContest
AtCoder/Virtual/20200616/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pll; #define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i)) #define REP(i, n) FOR(i,n,0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll) 1e15; ll N, M; ll A[100005]; ll S[100005]; bool check(...
ALGO
0.999991
4.359725
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2020-12-04T21:42:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3910ca6b...
99803afb-8f9d-4a32-8e8e-596d649469b4
Isa-rentacs/AOJ
2252.cpp
#include <iostream> #include <string> using namespace std; bool r[26]; int main(){ int state=-1; string str; int ret=0; r['y' - 'a'] = true; r['u' - 'a'] = true; r['i' - 'a'] = true; r['o' - 'a'] = true; r['p' - 'a'] = true; r['h' - 'a'] = true; r['j' - 'a'] = true; r['k' ...
ALGO
0.998357
3.299948
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2011-12-03T13:36: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": "4a966220a...
75cb07bf-3cfa-46bb-a152-eeac8c6de968
lsst/mops_daymops
include/lsst/mops/rmsLineFit.h
// -*- LSST-C++ -*- /* jmyers 8/18/08 * *This code is for getting the best-fit line for a series of observations * (i.e. a tracklet) and determining the RMS of the error for the detections. * * This also includes code for filtering out groups of tracklets which do not * fit the criteria. */ #ifndef LSST_RMSL...
ALGO
0.987248
6.364332
{ "github_metadata": { "branch": "main", "commit_count": 327, "repo_created_at": "2014-08-16T07:47:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 10, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2b71b8973f...
b88c2531-77ce-4490-b0c7-27adb4138b6a
trox667/aoc
2021/cpp/day_13.cpp
// // Created by trox667 on 13.12.21. // #include <iostream> #include <set> #include "day_13.hpp" #include "utils.hpp" namespace day13 { using Point = std::pair<int, int>; using Instruction = std::pair<char, int>; void get_coords_instructions(const std::vector<std::string> &lines, ...
ALGO
0.999377
5.620137
{ "github_metadata": { "branch": "main", "commit_count": 226, "repo_created_at": "2020-11-27T17:48:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb07b2d61c...
eb6a2389-0fcf-489b-9644-5a676e4259d6
Minephliss/Code
Practice-luogu/3/P1019.cpp
#include <iostream> #include <vector> #include <stack> #include <string> using namespace std; int n; char start; string words[21]; string adj[21][21]; int edgeto[21][2]; void connect (int a, int b) { string s1 = words[a]; string s2 = words[b]; int minl = min(s1.length(), s2.length()); for(int i = 1; i...
ALGO
0.999926
3.780833
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2019-08-18T15:50:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56b7602e9...
58f204cc-0025-49f5-97be-b16cfbcc9f05
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/13/04/4.cpp
#include <cstdlib> #include <cstdio> #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; const int MAXN = 604; int K, N; int oinit[MAXN]; int init[MAXN], backt[MAXN], out[MAXN]; int par[MAXN]; bool used[MAXN]; vector<int> redge[MAXN], ledge[MAXN], oredge[MAXN], oledge[MAX...
ALGO
0.999409
3.502764
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "128daeac...
2e71dc1a-33fd-4c01-ab46-240f7f31686b
TISparta/pcuni-2019
clase-16/examples/p05.cpp
#include <bits/stdc++.h> using namespace std; const int MAX_N = 25; int n, m, grid[MAX_N][MAX_N]; void swapCols (int c1, int c2) { for (int r = 0; r < n; r++) swap(grid[r][c1], grid[r][c2]); } void read () { cin >> n >> m; for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) cin >> grid[i][j]; } int ...
ALGO
0.999991
3.91446
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-01-18T10:15: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": "4fe2be14b...
c2fad2db-de79-4324-9d56-a6bb70d95522
GersonCavalheiro/OpenMPSnapshot
May2023/RepCPP/210781113/rheology.cxx
#include <cmath> #include <iostream> #include "3x3-C/dsyevh3.h" #include "constants.hpp" #include "parameters.hpp" #include "matprops.hpp" #include "rheology.hpp" #include "utils.hpp" static void principal_stresses3(const double* s, double p[3], double v[3][3]) { double a[3][3]; a[0][0] = s[0]; a[1][1] = s[1]; a[...
ALGO
0.993612
3.943736
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-08-19T17:35:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5cf21d4a6...
af2897f7-a3c7-4287-9cdc-07176db97b31
sailor-ux/mycodes
leetcode_vscode/leetcode_148/leetcode_148_2.cpp
#include <iostream> using namespace std; struct ListNode { int val; ListNode* next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode* next) : val(x), next(next) {} }; class Solution { public: ListNode* sortList(ListNode* head) { ...
ALGO
0.99994
5.613884
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2019-10-11T08:27: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": "8e6e8cc9123...
7c27957a-277a-4371-851b-6ef52c13ff70
ashrash/Connect-4-12th-Project
connect4.cpp
/* 2012 Computer science Project.*/ /* Connect 4 */ #include"graphics.h" #include"fstream.h" #include"process.h" #include"string.h" #include"stdlib.h" #include"conio.h" #include"stdio.h" #include"math.h" #include"bios.h" #include"dos.h" /* Pre-Processor Directives With their Bio...
TOOL
0.950603
3.381622
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-11-18T13:59: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": "cc3ba6d898...
adcdeded-1bc5-46ef-b904-d0474b9dbd0a
Cheesheep/OBJECT_class
Quote_Sturct_WEEK04/Quote_Sturct/Quote_Sturct/分数四则运算.cpp
//#include<iostream> //using namespace std; //struct fraction { // int mol; // int dem; //}; //int getBig(int a, int b) {//获取最大公约数 // if (a > b) // a = a - b; // else // b = b - a; // // if (a != b) // getBig(a, b); // else // { // //printf("最大公约数为%d\n", a); // return a; // } //} //int get_min(int m, int n, int bi...
ALGO
0.993987
4.991045
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-05-10T08: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": "60ac427639d9...
e8974bbf-bc1e-4a70-b43c-15354cc2db9f
Aly-Shair/DSA-2
Lecture 39 Permutations of a String.cpp
/* Given a string S. The task is to print all unique permutations of the given string that may contain dulplicates in lexicographically sorted order. Example 1: Input: ABC Output: ABC ACB BAC BCA CAB CBA Explanation: Given string ABC has permutations in 6 forms as ABC, ACB, BAC, BCA, CAB and CBA . Example 2: Input: ...
ALGO
0.99995
6.202648
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-04-17T15:24: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": "20c2a768bbf8...
02d89716-1caa-4c20-8cbc-08428b7b455c
plliao/FASTEN
InfoPath.cpp
#include "stdafx.h" #include <InfoPathModel.h> int main(int argc, char* argv[]) { Env = TEnv(argc, argv, TNotify::StdNotify); Env.PrepArgs(TStr::Fmt("\nStochastic network inference. build: %s, %s. Time: %s", __TIME__, __DATE__, TExeTm::GetCurTm())); TExeTm ExeTm; Try bool verbose = true; const TStr InFNm...
ALGO
0.988488
5.43804
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2015-04-02T07:08:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "903a44c90...
376f80ab-bf36-4bc0-a4a0-edba56b17482
Nazanin-Rashedi/CE_Accuracy
src/infra/FourierMotzkinBasic.hh
#ifndef FOURIER_MOTZKIN_BASIC_HH #define FOURIER_MOTZKIN_BASIC_HH #pragma once #include "infra/glob_infra_standard_includes.hh" #include "matrix.hh" class FourierMotzkinBasic { public: typedef std::vector<double*> double_pvt; public: FourierMotzkinBasic(const bool aTrace); public: void initEq(const ...
ALGO
0.99649
5.645715
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-11-25T11:48: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": "234eb32b445...
53b2e636-6f60-4daa-8f02-aee6ed847d74
heavyai/heavydb
ThirdParty/warpcore/include/helpers/io_helpers.h
#ifndef HELPERS_IO_HELPERS_H #define HELPERS_IO_HELPERS_H #include <vector> #include <string> #include <fstream> #include <iostream> namespace helpers { constexpr std::size_t binary_dump_magic_number() noexcept { return 0xAAAAAAAA55555555; } template<class T> void dump_binary( const std::vector<T>& data, ...
TOOL
0.97357
6.920177
{ "github_metadata": { "branch": "master", "commit_count": 10877, "repo_created_at": "2017-05-07T15:07:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3015, "forks": 456, "issues": 265, "pull_requests": 20 }, "file_meta": { "content_id": ...
ae00078f-42eb-4afc-9358-2dda50a849d8
eemoreira/biblioteca-de-problemas
cf/edu132/c.cpp
#include <bits/stdc++.h> #define endl '\n' using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> ii; typedef priority_queue<ii, vector<ii>, greater<ii>> pqg; #define mp make_pair #define fst first #define snd second #define all(x) begin(x), end(x) #define sor(x) sort(all(x)) #define...
ALGO
0.999968
3.857398
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-04-30T01:16: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": "95e4de3fb50...
0a9475ca-d8dc-4d0d-ab17-9104671c7214
liuyuqinggg/daimasuixianglu
链表/删除链表元素.cpp
#include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; void printList(ListNode* head){ cout << "[ "; while (head) { ...
ALGO
0.998955
4.469939
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-11-04T10: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": "8ef4e80de4...
84155e32-f306-4eb5-be2e-5b52834ceeb5
esthedebeste/advent-of-code
days/2024/07.cpp
#include "shared.h" uint64_t concat_numbers(uint64_t a, uint64_t b) { uint64_t bigness = 1; uint64_t b_copy = b; do { b_copy /= 10; bigness *= 10; } while (b_copy != 0); return a * bigness + b; } uint64_t add(const uint64_t a, const uint64_t b) { return a + b; } uint64_t mul(const uint64_t a, const uint64_...
ALGO
0.999544
5.135803
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2022-11-09T20:02:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bfc5bfba3e5...
0498700c-cbb6-464d-abd5-aa5f68eb3bb2
Llewellyn500/JustKode-Training
codes/class work/question 45.cpp
// Question 45 // Without using any additional variable(s) to X and Y, device an algorithm that can be used to interchange the content of two variables X and Y. Use inital values of X and Y to be 10 and 20 respectively to go through your solution and see if the new values of X and Y are now 20 and 10 respectively. #in...
ALGO
0.999776
5.284426
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2022-07-14T18:24:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7482d08277...
832764f3-20ed-421e-8f47-57ea1a2feeb9
glemaitre/traffic-sign-detection
src/apps/main.cpp
// By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, install, // copy or use the software. // License Agreement // For Open Source Computer Vision Library // (3-...
ALGO
0.994281
5.16104
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2015-01-08T09:20:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 108, "forks": 61, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9d892c...
46249597-27cb-4751-96ac-fbea3228de10
burakozdemir/CSE241---Object-Oriented-Programming
hw2/141044027/141044027/main.cpp
/** * Homework2_Burak_Özdemir_141044027 **************************************** * Created on 07.10.2017 by Burak_Özdemir **************************************** * Bu program ConnectFour adlı bir oyunun C dilinde * yazılmış ufak bir simulasyonudur.Oyunun oynanısına ve * kurallarına internetten bakabilirsniz. *...
TOOL
0.935826
3.341501
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-01-25T14:29: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": "8083a9a38b...
be14d4f6-4a54-4ecc-892c-e7c7c5c897f7
BinomialSheep/CompetitiveC--
AtcoderContest/ABC279/E.cpp
#include <bits/stdc++.h> // デバッグ用マクロ:https://naskya.net/post/0002/ #ifdef LOCAL #include <debug_print.hpp> #define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else #define debug(...) (static_cast<void>(0)) #endif using namespace std; using ll = long long; using vi = vector<int>; using vl = vector<lo...
ALGO
0.999992
4.070199
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2023-12-12T17:45: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": "d57078484...
16d7402b-21bc-4a69-a09f-38110fa8e34e
Aaryan2705/GFG
Difficulty: Medium/Partition Equal Subset Sum/partition-equal-subset-sum.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: bool helper(int idx, vector<int>& arr, float sum, vector<vector<int>> &dp) { if(sum == 0) return true; if(idx >= arr.size()) return false; if(...
ALGO
0.975017
5.648077
{ "github_metadata": { "branch": "main", "commit_count": 582, "repo_created_at": "2024-03-09T10:15:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c81688c54f...
6aade68b-c00b-4ebd-ae98-465fd966ac5c
ayush-20221/CrackYourPlacement
String/Basic Calculator II.cpp
class Solution { public: int calculate(string s) { int curr_num =0 ; int n = s.size() ; stack<int> st ; int result =0 ; char operation = '+' ; for(int i=0;i<n;i++) { char curr_char = s[i] ; if(isdigit(curr_char)) ...
ALGO
0.999966
4.900366
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-07-18T16:06: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": "89ff7a9981b...
bf44840f-47f0-460f-ac12-e5e7def73e52
MITTALBHAVYA/journey2c-
GeneralCppfiles/heap.cpp
#include<iostream> using namespace std; class heap { public: int arr[100]; int size; heap() { arr[0]=-1; size=0; } void insert(int val) { size++; int index=size; arr[index]=val; while(index>1) { int parent=index/2; ...
ALGO
0.999916
3.657879
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2023-04-21T11:53: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": "c55e80a5543...
e7434873-6ed4-45f5-9efd-6c3229f9918b
RobotLocomotion/drake
systems/analysis/antiderivative_function.h
#pragma once #include <memory> #include <optional> #include <utility> #include <vector> #include "drake/common/default_scalars.h" #include "drake/common/drake_copyable.h" #include "drake/common/eigen_types.h" #include "drake/common/unused.h" #include "drake/systems/analysis/scalar_dense_output.h" #include "drake/syst...
ALGO
0.99468
7.551258
{ "github_metadata": { "branch": "master", "commit_count": 33726, "repo_created_at": "2014-01-26T16:11:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3630, "forks": 1305, "issues": 690, "pull_requests": 46 }, "file_meta": { "content_id":...
62eda050-47e9-4182-83e4-cf79c8bb74c1
dbeurle/neon
src/solver/linear/biconjugate_gradient_stabilised_ocl.cpp
#include "solver/linear/biconjugate_gradient_stabilised_ocl.hpp" #ifdef ENABLE_OPENCL #include "exceptions.hpp" #include "dmatrix_vector_product.hpp" #include "numeric/float_compare.hpp" #define VIENNACL_HAVE_EIGEN #define VIENNACL_WITH_OPENCL #include <viennacl/vector.hpp> #include <viennacl/compressed_matrix.hpp...
ALGO
0.972641
6.125679
{ "github_metadata": { "branch": "master", "commit_count": 1869, "repo_created_at": "2017-08-06T09:51:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 8, "issues": 15, "pull_requests": 1 }, "file_meta": { "content_id": "a6feb...
4dfd7ead-fa66-45aa-8d50-41489dfa5ca0
penn-graphics-research/ziran2019
Lib/Ziran/Math/MathTools.h
#ifndef MATH_TOOLS_H #define MATH_TOOLS_H #include <cmath> #include <mmintrin.h> #include <xmmintrin.h> #include <Ziran/CS/Util/Forward.h> namespace ZIRAN { namespace MATH_TOOLS { /** int floor much faster than (int)floor(x) */ inline static int int_floor(float x) { int i = (int)x; /* truncate */ return...
ALGO
0.982272
5.705391
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-11-06T07:21:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 235, "forks": 39, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "fad8f185...
c8836fce-c9ba-4b0d-8c63-668fcc29a39d
GaboYR/CompetitiveProgramming
IEEE/DP/C.cpp
#include<bits/stdc++.h> using namespace std; #define all(x) x.begin(),x.end() #define sz(x) (int)x.size() #define fast_io ios_base::sync_with_stdio(false);cin.tie(nullptr); #define cin std::cin #define cout std::cout using ll = long long; using ld = long double; using ii = pair<int,int>; using vi = vector<int>; using v...
ALGO
0.999868
3.565237
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-01-19T22:33: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": "55d0ad54a1d...
8df7272d-6522-4600-ba36-81f44f3eeaf3
jh8579/Baekjoon_Algorithm_Cpp
2018/10845_make_queue/issue/make_queue.cpp
// 큐 // issue : 명령어들을 enum으로 처리할 수 있을까? #include <iostream> #include <string> using namespace std; int n; string ins[10000]; int input_number[10000]; int my_queue[10000]; int count_queue = 0; void print_push(int num); void print_pop(); void print_size(); void print_empty(); void print_front(); void print_back(); i...
ALGO
0.999252
4.416044
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2018-03-20T08:30:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf0c16319...
c2866c3b-4941-4e99-8598-94a02fb25813
win32ss/supermium
native_client_sdk/src/gonacl_appengine/src/cube/matrix.cc
// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** @file matrix.cc * Implements simple matrix manipulation functions. */ //----------------------------------------------------------------------------- #include <stdlib.h>...
TOOL
0.968182
7.016887
{ "github_metadata": { "branch": "main", "commit_count": 1508499, "repo_created_at": "2023-05-09T04:03:00.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "chromium/chromium", "stars": 3385, "forks": 105, "issues": 631, "pull_requests": 0 }, "file_meta": { ...
9ec04247-dbdf-4ab0-9d81-61c7903390be
snandasena/cpp-advanced-topics
ds/leetcode/src/remove_linked_list_elements.cpp
// // Created by sajith on 11/12/21. // //#include "base.h" #include <iostream> #include <vector> #include <memory> using namespace std; struct Node { int val{0}; shared_ptr<Node> next{nullptr}; Node() = default; explicit Node(int x) : val(x) {} Node(int x, shared_ptr<Node> const &_next) : val(...
ALGO
0.999716
5.76432
{ "github_metadata": { "branch": "tutorials", "commit_count": 1360, "repo_created_at": "2020-11-21T04:21: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": "dc65...
89af448c-3a21-4ebc-a90e-1d13d6032ead
mb11797/CB_Launchpad_CPP_2024
Class26/largest_rectangle_under_histogram_ALTERNATE.cpp
#include<iostream> #include<stack> using namespace std; int main(){ int n; // int n=8; cin>>n; // int n = 8; stack<int> s; // int hist[n] = {6,2,5,4,5,1,6}; // int hist[n] = {2,4,5,6,6,5,4,2}; int hist[n]; for(int p=0; p<n; p++){ cin>>hist[p]; } int area = 0; int i...
ALGO
0.999962
3.91879
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-03-23T16:57:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9809190b76c...
48d68d9b-a402-4fb1-bff2-0990bb83609b
luk036/ellcpp
lib/src/lsq_corr_ell.cpp
// -*- coding: utf-8 -*- #include <ellcpp/cutting_plane.hpp> #include <ellcpp/ell.hpp> #include <ellcpp/oracles/lmi0_oracle.hpp> #include <ellcpp/oracles/lmi_oracle.hpp> #include <ellcpp/oracles/qmi_oracle.hpp> #include <ellcpp/utility.hpp> // #include <iostream> #include <limits> #include <tuple> #include <vector> #in...
ALGO
0.99917
5.677278
{ "github_metadata": { "branch": "master", "commit_count": 351, "repo_created_at": "2017-09-20T06:23:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7dbc459...
e36467de-90a4-4b46-816e-8bc60b22ecf3
sushantkumar143/Competitive-Programming
Contest/Codeforces Contest/Contest 2/A_Deranged_Deletions.cpp
#include <bits/stdc++.h> using namespace std; bool is_derangement(const vector<int>& a, const vector<int>& b) { for (int i = 0; i < a.size(); ++i) if (a[i] == b[i]) return false; return true; } int main() { int t; cin >> t; while (t--) { int n; cin >> n; ...
ALGO
0.999971
3.912982
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2025-06-27T06:28: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": "20e5eda89...
375a9049-1917-403a-8193-9af16773139a
SaiKrishna1207/DSA-Practice
Week-1/Day-2/Cinema.cpp
#include <bits/stdc++.h> #include <cstdlib> #include <iostream> #include <string> using namespace std; void solve(vector<int> money, int n) { int i, j, balance50 = 0, balance25 = 0, balance100 = 0, flag = 0; if(money[0] != 25) { cout << "NO" << endl; return; } for(i = 0;i < n;i++) ...
ALGO
0.999514
3.946887
{ "github_metadata": { "branch": "master", "commit_count": 399, "repo_created_at": "2020-03-27T05:44: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": "971cfc17...
87d7cdb2-631d-4de8-a2aa-3e3d77b9fdb6
ishandutta2007/codeforces-d
davidberard/normal/1288/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pii; typedef long double ld; const ll MOD = 1e9+7; ll modpow(ll b, ll p) { ll ans = 1; for(; p; p/=2, b=b*b%MOD) { if (p&1) ans = ans*b%MOD; } return ans; } ll ways[1010]; ll fac[2010]; ll ifac[2010]; v...
ALGO
0.999968
4.209888
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "617acc981844...
2b915852-bf03-41dd-b837-573ea8ad4749
brucelevis/tprShaderBox
src/random/PerlinNoise1D.h
/* * ========================= PerlinNoise1D.h ========================== * -- tpr -- * 创建 -- 2018.12.03 * 修改 -- 2018.12.03 * ---------------------------------------------------------- * Perlin Noise 2D 简易版 ...
ALGO
0.920606
4.792293
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-04-05T23:56: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": "6d79e7e1fa...
1e86d042-f6fa-4b49-b77c-b0845ee002f5
SohailKumar/WaveFunctionCollapse
WFC.cpp
#include "WFC.h" #include <queue> #include <set> #include <stacktrace> WFC::WFC(const int gridWidth, const int gridHeight) { this->adjacencyRules[{ Tiles::BLANK, Direction::NORTH }] = { Tiles::UP, Tiles::BLANK }; this->adjacencyRules[{ Tiles::BLANK, Direction::EAST }] = { Tiles::RIGHT, Tiles::BLANK }; this->adjacen...
ALGO
0.999351
5.861809
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2025-05-05T03:53:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c29be18221b...
b76501db-be61-4260-a22e-ccbd0f618f45
konjac/leetcode
search-in-rotated-sorted-array-ii.cc
#include <iostream> using namespace std; class Solution { public: bool search(int A[], int n, int target) { int sep = n - 1; for(int i = 0; i+1<n; ++i){ if(A[i] > A[i+1]){ sep = i; break; } } //cout << "sep = " << sep << endl; if(target == A[sep]) ret...
ALGO
0.999983
4.905675
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2014-05-13T03:13:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa90b708f...
71730b9a-9f13-4173-b483-d4a6b46e1c32
XJTUOSV-SSEer/XB-Muse
Scheme1/CryptoTestingApp/Server.cpp
#include "Server.h" #include "CryptoEnclave_u.h" #include <algorithm> // for std::find #include <iterator> // for std::begin, std::end #include <iostream> using namespace std; Server::Server(vector<int> userIds,int eid){ this->eid = eid; for(int userId:userIds){ Addrs[userId] = vector<string>(); ...
WEB
0.915282
3.782194
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2024-05-29T08:21:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14de7e1451...
6d9949dc-a815-4768-a96b-a56312a7d0c4
ibex-team/ibex-sip
src/marendet/numeric/ibex_RestrictionLinearizerSIP.cpp
/* ============================================================================ * I B E X - ibex_RestrictionLinearizerSIP.cpp * ============================================================================ * Copyright : IMT Atlantique (FRANCE) * License : This program can be distributed under the terms of the ...
ALGO
0.998071
6.046478
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2020-03-25T21:49:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b61c7a7ea...
20e1f4e8-8031-4869-979f-080cf321f1bf
HassanAhmedAgwa/ass3
FCI-CS213-A3-2018-laila.moustafa-18-20140101-20140096.zip/Dickens(20140096)/main.cpp
#include <string> #include <iostream> #include <string> #include <vector> #include <iterator> #include<sstream> using namespace std; vector<string> collection; /******************************************************************/ void get( string str, string res ) { collection.push_back(res); for( int i = 0; i...
ALGO
0.999826
4.655151
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-11-17T22:33: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": "a5b049a2ac...
cafde3d1-7f25-4729-8a77-37988429c6fd
samirharry/Programacion-Competitiva
Codeforces/1020B.cpp
#include <bits/stdc++.h> #define debug(x) cout << #x << " => " << x << endl #define debugArray(x, n) \ for (ll i = 0; i < n; i++) \ cout << #x << "[" << i << "] => " << x[i] << endl using namespace std; typedef long long ll; const ll MX = 1000; struct Graph { ll pa[MX] = {0}; bool isVis[MX] =...
ALGO
0.999925
4.029152
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2019-07-16T21:25: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": "4ad3e0fbc...
1e6f907f-7a2d-4bf2-8609-0b2c941adafe
lucasprax/Class_Programs
QUESTAO3.cpp
#include <iostream> #include <string.h> #include <stdlib.h> using namespace std; int main(){ int codigo; float valorm, valorp, valorg; int quant_p = 0, quantg_p = 0; int quant_m = 0, quantg_m = 0; int quant_g = 0, quantg_g = 0; int opt; cout<<"<NAME> & <NAME>\n"; cout<<" TRAZENDO FELICID...
TOOL
0.959559
3.353634
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-04-27T11:39: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": "43d3cbe681a...
5a03e23a-a262-4f3d-bc5c-ab5025346ffd
Manvityagi/Data-Structures-and-Algorithms
General/permutations/distinct_permutations.cpp
#include <bits/stdc++.h> using namespace std; int factorial(int n) { // single line to find factorial return (n == 1 || n == 0) ? 1 : n * factorial(n - 1); } vector<string> lexpermute(string s) { vector<string> output; int n = s.size(); char first_char, sec_char; sort(s.begin(), s.end()); ...
ALGO
0.999982
5.075792
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2019-10-15T07:36:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 46, "forks": 47, "issues": 6, "pull_requests": 1 }, "file_meta": { "content_id": "fa63b9...
91211033-05cf-41cb-827d-d63647fc0d53
SDC-GS-STUDY/21-autumn-datastructure-study
week07/eiloppang/eiloppang_연습문제4강_12번.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_STACK_SIZE 100 typedef char element; typedef struct StackType { element data[MAX_STACK_SIZE]; int top; } s; void initStack(StackType* s) { s->top = -1; } int is_empty(StackType* s) { return (s->top == -1); } ...
ALGO
0.999621
3.305532
{ "github_metadata": { "branch": "main", "commit_count": 319, "repo_created_at": "2021-09-08T12:50:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0503455742e...
68d6a68a-3627-4083-9c29-e76f4f06f8e5
gentnerlab/isotools
src/isoi/BBox.h
/* $Id: BBox.h,v 1.1 2011/01/06 22:29:07 samn Exp $ */ #ifndef BBOX_H #define BBOX_H //struct to represent bounding box //in a coord. system where top is 0 //and bottom of image is h template <class T> struct BBox { //data T left,top,right,bottom; //functions BBox() { left=top=right=bottom=T(0); } BBox(con...
ALGO
0.952544
5.536763
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-02-23T00:11:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "762ce55d6f5...
327b9918-3c63-4fb4-b21c-9b14efbb491d
brown9804/Abstract-ComputerStructures-Hub
1_AbstractListArraysTemplate/Sort/mergesort.h
#ifndef MERGESORT_H_ #define MERGESORT_H_ #include "header.h" // corre merge sort template<class T> void ArrayList<T>::mergeSort() { T* temp = mergeSort(array, capacity, size); delete [] array; array = temp; sorted = true; } template<class T> T * ArrayList<T>::mergeSort(T * array, int theCapacity,...
ALGO
0.997527
4.97869
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2019-06-18T06:03: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": "7da40b3df...
93246261-0aac-4280-8376-b8bd8886a8e6
ishandutta2007/codeforces-n
namnamseo/normal/1336/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pp; typedef pair<ll,ll> pll; void cppio(){ ios_base::sync_with_stdio(0); cin.tie(0); } #define all(x) (x).begin(),(x).end() #define pb push_back #define eb emplace_back #define x first #define y second #define rep(i,n) for(int i =...
ALGO
0.999988
4.372963
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57736dfde6f7...
3946c278-ab68-4781-b3b3-bffb3c9afcd6
rapidswap/algorithm-study
stack_queue/오큰수.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <string> #include <deque> #include <stack> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; stack<int> o; stack<int> mn; stack<int> nge; while...
ALGO
0.999975
4.702094
{ "github_metadata": { "branch": "main", "commit_count": 298, "repo_created_at": "2023-05-11T13:54: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": "9a48c0904b...
ff86e317-9fd4-4044-8328-298a355537c2
vitei/Usagi
Engine/AI/AvoidanceTools.cpp
#include "Engine/Common/Common.h" #include "Engine/AI/BehaviorTree/Behaviors/AvoidanceBehavior.h" #include "Engine/AI/AICommon.h" namespace usg { namespace ai { static inline Vector2f GetCollisionNormal(const IShape& shape, const Line& line) { const uint32 uNumVerts = shape.GetNumVerts(); for (uint32 i = ...
ALGO
0.994523
6.046251
{ "github_metadata": { "branch": "master", "commit_count": 992, "repo_created_at": "2018-04-21T22:35:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 54, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c63c97fb...
9e219e0c-fbdc-4d95-990e-d028c04dc245
Kibiandkimi/stu
Problem/Luogu/P8506.cpp
// // Created by kibi on 22-9-4. // // // Created by kibi on 22-9-4. // //Solved 0pts because of no '/n' in last line, fix it (60pts, same problem?) //add c != EOF #include <bits/stdc++.h> using namespace std; int n; int main(){ scanf("%d", &n); getchar(); bool a, b, f; int ans = 0; for(int i = 1; ...
ALGO
0.999355
3.50905
{ "github_metadata": { "branch": "master", "commit_count": 250, "repo_created_at": "2022-08-17T09:51:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3256840e...
63713a32-90bb-4288-a83c-80107fcb00fb
viranch044/Cpp_Codes
Trie Contact serach.cpp
// We're going to make our own Contacts application! The application must perform two types of operations: // add name, where name is a string denoting a contact name. This must store as a new contact in the application. // find partial, where partial is a string denoting a partial name to search the application for....
ALGO
0.999374
4.535508
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-07-04T14:25: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": "a6c717ba4...
b321884d-05a8-4425-8f31-504046a225f4
Atulp48/DSA_with_CPP
6_Linked_List/26_loop_detect_floyed_detection.cpp
#include <iostream> #include <map> using namespace std; class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = NULL; } }; void insert(Node *&head, int d) { Node *temp = new Node(d); temp->next = head; head = temp; } void insert_ta...
ALGO
0.999975
4.952621
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-10T12:46:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0650186130e...
a8fd9a3a-bd14-4ec9-82aa-b14ba9a8fd08
Niloyb34/OOP-Object-oriented-programming-
Friend function safdar doagr part 2.cpp
#include<bits/stdc++.h> #include<iostream> using namespace std; class B;//arokom class declare korar smoy ; use korte hbe //4 number line er kajtake bola hoi forward declaration class A { private: int num1; public: friend void getValue(A &obj1,B &obj2); friend void Add(A &obj1,B &obj2); friend void sub(...
ALGO
0.974755
3.236401
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-10-03T04:00: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": "4d1ff9c2bf25...
c94c8214-f4e8-4cd0-bf8c-e80f852840da
nishu112/Geek-Codes
GeeksforGeeks/Toppers Of Class.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii std::pair<int,int> #define vi std::vector<int> #define vll std::vector<long long> #define mp(a,b) make_pair(a,b) #define pb(a) push_back(a) #d...
ALGO
0.999961
3.219337
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-02-11T12:47:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11a62aef4c...
214f20ef-9fdd-4f07-add6-41a76f8e9795
tyask/procon
cf/contest/1506/d/d.cpp
#include <bits/stdc++.h> namespace { #pragma GCC diagnostic ignored "-Wunused-result" #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wsign-compare" #define overload4(_1,_2,_3,_4,n...
ALGO
0.999713
3.793681
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2020-12-14T23:25: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": "3327d84c2...
539118e8-5481-41c7-9b8f-454093556faa
hezhaojiang/leetcode-cpp
861.翻转矩阵后的得分.cpp
/* * @lc app=leetcode.cn id=861 lang=cpp * * [861] 翻转矩阵后的得分 */ #include<vector> #include<algorithm> using namespace std; // @lc code=start class Solution { public: int matrixScore(vector<vector<int>>& A) { /* 行翻转 */ int result = 0; int N = A.size(); if (!N) return result; ...
ALGO
0.999904
6.234703
{ "github_metadata": { "branch": "master", "commit_count": 346, "repo_created_at": "2020-04-02T15:55:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20ca3064...
09e1e42c-cf22-48c5-a93c-13a012c77cda
Shubham-1720/Code-Playground
ARSD_DU_CS(H)/2nd year Programs/3rd Semster/Data Structure/dll.cpp
#include <iostream> using namespace std; class Node{ public: int data; Node * next; Node * prev; Node(); friend class DLL; }; class DLL{ public: Node * head; DLL(); void insert_at_begining(int); void insert_at_end(int); void insert_at_position(int, int); void delete_from_begini...
ALGO
0.997949
5.615032
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-06-12T18:58: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": "4727dff115b...
5c00aedf-a41f-4b28-9560-2b49aa663740
ganghe74/algo
baekjoon/14939_불 끄기.cpp
#include <bits/stdc++.h> using namespace std; const int INF = 1e9; string s; int a[10]; int greedy_flip(int pstate, int &state, int &nstate) { int cnt = 0; for (int i=0;i<10;++i) { if (pstate & (1 << i)) { cnt++; nstate ^= (1 << i); state ^= (1 << i); if...
ALGO
0.999694
3.649372
{ "github_metadata": { "branch": "master", "commit_count": 645, "repo_created_at": "2018-05-13T11:19:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "eee1c825...
92b3271a-a65a-46ac-b478-f0c155934515
theanujsinha01/DSA-in-CPP
STL C++/map_ops.cpp
#include <iostream> #include <map> using namespace std; int main() { map<int, string> m; // Insert key-value pairs m[1] = "One"; m[2] = "Two"; m[3] = "Three"; m[4] = "Four"; m[5] = "Five"; // Print map elements cout << "Map elements: "; for (auto p : m) { cout << p.fir...
TOOL
0.979683
5.709691
{ "github_metadata": { "branch": "main", "commit_count": 301, "repo_created_at": "2024-10-03T13:13: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": "18b520da09...
0ad742d0-de43-43a5-8946-9e52c3f039d8
zzuliLL/Leetcode-
71-80/73. Set Matrix Zeroes.cpp
//单纯的处理每一行,每一列,只申请了两个栈的空间,就是题目中的第二种情况,O(m+n) class Solution { public: void setZeroes(vector<vector<int>>& matrix) { stack<int> r, l; int m = matrix.size(); int n = matrix[0].size(); for(int i = 0; i < m; i++) { bool f = false; for(int j = 0; j < n; j++...
ALGO
0.999566
5.401736
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2017-12-30T13:04: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": "2b1825484...
16954231-89bb-48b0-b69c-5fc8fb436dfc
Sarthak-Malla/LeetCode
1061. Lexicographically Smallest Equivalent String/main.cpp
#include<iostream> #include<vector> using namespace std; vector<int> hash; int find(int curr) { if (hash[curr] == -1) return curr; return hash[curr] = find(hash[curr]); } void union_(int x, int y) { hash[x] = y; } string smallestEquivalentString(string s1, string s2, string baseStr) { int ...
ALGO
0.999992
5.244987
{ "github_metadata": { "branch": "main", "commit_count": 226, "repo_created_at": "2022-05-27T06:15:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6536a385cd...
ba5bac46-1c87-4b99-803d-13c21e29d3b7
vinus322/algorithm
cpp/algorithm/algorithm/algo_trianglepath.cpp
#include<stdio.h> #include<iostream> #include<algorithm> #include<vector> #include<queue> #include<string> using namespace std; int n; int map[101][101]; int dp[101][101]; void calMaxSum(int x, int y, int cnt) { int& ret = dp[x][y]; if (ret > cnt) return; dp[x][y] = cnt; if(map[x+1][y] != -1) calMaxSum(x + 1, ...
ALGO
0.999969
4.082507
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-01-10T15:56: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": "53338d1c6...
19e6e7cb-00f6-4863-93b9-7e027cf89492
Errichto/youtube
testing/gen_tree2.cpp
// generating a tree in a not-so-stupid way #include <bits/stdc++.h> using namespace std; int rand(int a, int b) { return a + rand() % (b - a + 1); } int main(int argc, char* argv[]) { srand(atoi(argv[1])); int n = rand(2, 20); printf("%d\n", n); vector<pair<int,int>> edges; for(int i = 2; i <...
ALGO
0.998442
3.813564
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2019-02-03T13:25:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2725, "forks": 523, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "894e...
a154c853-5fe2-4704-8346-2b6b22990118
xony/lazy-eval
vertex_cover.h
/* * * vertexcover.h * * Created on: Oct 18, 2011 * Author: fgrossmann */ #include "dyn_prog_solver.h" #include <vector> #include "common.h" #include "structures/graph.h" #include "structures/graph_structure.h" #include "structures/graph_structure_factory.h" namespace sequoia { class VertexCover : publi...
ALGO
0.988899
4.821455
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2013-07-15T05:45: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": "2707d5b8de...
152862fd-7416-41c2-b6e6-9be8c0f8de06
stbrumme/euler
euler-0306.cpp
// //////////////////////////////////////////////////////// // # Title // Paper-strip Game // // # URL // https://projecteuler.net/problem=306 // http://euler.stephan-brumme.com/306/ // // # Problem // The following game is a classic example of Combinatorial Game Theory: // // Two players start with a strip of n white ...
ALGO
0.99997
4.53928
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-12-12T15:07:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 136, "forks": 36, "issues": 1, "pull_requests": 4 }, "file_meta": { "content_id": "ee3ba3d...
f9354995-5805-430e-8cca-b3a249dcc4a0
lorenzo-ferrari/olinfo
src/ois_boring.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize ("O3") using LL = long long; const int mod = 1e9 + 7; double lg[100001]; struct fn { int b, c; fn() : b(1), c(0) {} fn(int _b, int _c) : b(_b), c(_c) {} int eval(LL i) { LL y = c, ans = 1; while (y) { if (y & 1) ans = a...
ALGO
0.999822
4.503187
{ "github_metadata": { "branch": "main", "commit_count": 195, "repo_created_at": "2021-06-02T18:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "237123121c...