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
2b6045d6-a2b8-4205-a472-2e3883c5e32b
ClausKlein/cppstd20-code
lib/spanfix.cpp
//******************************************************** // The following code example is taken from the book // C++20 - The Complete Guide // by <NAME> (www.josuttis.com) // http://www.cppstd20.com // // The code is licensed under a // Creative Commons Attribution 4.0 International License // http://creativecom...
TOOL
0.923995
5.887465
{ "github_metadata": { "branch": "develop", "commit_count": 3, "repo_created_at": "2023-05-18T10:14:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f29f3ffda...
2f2bf62a-36f2-4a48-bc36-50052dbfd66a
shelltdf/osgall
prebuild/cgal-master/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp
//! \file examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting.cpp // Constructing an arrangement of non-intersecting line segments using the // predefined kernel with exact predicates. #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Arr_non_caching_segment_basic_traits_2...
ALGO
0.97463
5.81835
{ "github_metadata": { "branch": "master", "commit_count": 233, "repo_created_at": "2020-04-25T21:58:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 10, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "bcc7ba...
96424a0f-90fd-42e4-82bc-3819c389c1d7
MrHumanRebel/sze_programozas
vizsgak/minta/regi_rendszer/2019-20_1/04_menetrend/menetrend_dani.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; #define TELL cout << #define ASK cin >> #define MAX 128 struct adat { string jarat; string hely; int erk_ora; int erk_perc; int el_ora; int el_perc; }; string beolv() { string input; getline(cin, input); ...
TOOL
0.923388
4.298282
{ "github_metadata": { "branch": "main", "commit_count": 770, "repo_created_at": "2022-02-07T20:30:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3f34bffb0...
ebc8baf2-3c99-4873-ad24-7b26f08651e6
CJ-1998/Algorithm_Test
Do_It!_Algorithm_Coding_Test_C++/16_BOJ1377.cpp
/* 문제: 버블 소트 알고리즘을 다음과 같이 C++로 작성했다. bool changed = false; for (int i=1; i<=N+1; i++) { changed = false; for (int j=1; j<=N-i; j++) { if (A[j] > A[j+1]) { changed = true; swap(A[j], A[j+1]); } ...
ALGO
0.999853
4.408576
{ "github_metadata": { "branch": "main", "commit_count": 315, "repo_created_at": "2022-12-20T23:26:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6837e3b21f...
989ce023-e356-4c55-bcf6-7f01800a8ff1
ishandutta2007/codeforces-d
dj3500/normal/113/B.cpp
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <cmath> #include <algorithm> #include <sstream> #include <stack> #include <cstring> #include <iomanip> using namespace std; #define pb push_back #define INF 1000000000 #define FOR(i,n) for(i...
ALGO
0.999193
3.579334
{ "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": "836343c76ed5...
4450ea5d-a45d-4071-a2d4-4e26cb8717ae
SamujjalChoudhury/Class
OOPs/19-03-19/three.cpp
// WAP to read an array of n integers and reverse the order of the element in the array of n integer and to reverse the order of element in the array without using temporary. #include<iostream> using namespace std; void setArray(int [], int); void getArray(int [], int); void reverse(int [], int); int main() { int ...
ALGO
0.99986
4.703053
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2019-02-19T14:19: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": "fea219b00...
8ebe5de9-23c0-4fa6-ae29-011d7ee7cdca
2019331043-Zakaria/Algorithm-CSE237
ArticulationPoint&Bridge/ArticulationBridge.cpp
/* * @Author: Zakaria * @Date: 2022-03-30 17:48:29 * @Last Modified time: 2022-03-31 12:26:11 */ #include<bits/stdc++.h> #define pb push_back #define pi acos(-1.0) #define mod 1000000007 #define test int t; cin>>t ;while(t--) typedef long long ll; using namespace std; ...
ALGO
0.999948
4.295394
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2022-03-30T12:00:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10f593c4e4d...
47405205-81e8-4e08-a154-46869c0ad3b5
WorstConn/cv-praktikum-fh-m
OpenCvPraktikum/Helper/CvHelper.h
/* * cvHelper.h * * Created on: 07.11.2012 * Author: <NAME>, <NAME> */ #ifndef CVHELPER_H_ #define CVHELPER_H_ #include "../header.h" using namespace std; using namespace cv; //struct BufferPSNR //// Optimized GPU versions //{ // // Data allocations are very expensive on GPU. Use a buffer to solve: al...
TOOL
0.926965
5.069102
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2015-11-21T10:09: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": "9e67ffb19...
17952c82-75da-40a9-b5cb-852ac2ed210b
andersfylling/david
engine/include/david/TreeGen.h
#pragma once #include "david/david.h" #include "david/types.h" #include <array> #include "david/bitboard.h" namespace david { namespace gameTree { /** * This class instance lives through the whole engine lifetime. * * Used to generate nodes from a gameState node. * * Number of levels to be generated or nr of no...
ALGO
0.902177
6.342973
{ "github_metadata": { "branch": "master", "commit_count": 516, "repo_created_at": "2017-10-12T20:59:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "6d1a49c6...
99889b89-0bbe-4e6c-8f54-7daae2885599
Guminsung/Algorithm
BOJ/15681.cpp
#include <iostream> #include <vector> using namespace std; int make_tree(int r); vector<vector<int>> edge(100001); int root[100001]; bool visited[100001]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, r, q, u, v; cin >> n >> r >> q; for (int i = 0; i < n -...
ALGO
0.999985
4.261941
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-10-20T18:02: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": "87a89bc7f2cd...
7f77d911-b8bc-4fca-a027-921d160fdb99
rlatjwls7882/Baekjoon
01xxx/1799. 비숍/비숍.cc
#include<bits/stdc++.h> using namespace std; int A[20], B[20]; bool visited[20]; vector<vector<int>> conn(20); int dfs(int cur) { visited[cur]=true; for(int next:conn[cur]) { if(B[next]==-1 || !visited[B[next]] && dfs(B[next])) { A[cur]=next; B[next]=cur; return tru...
ALGO
0.999927
3.679476
{ "github_metadata": { "branch": "main", "commit_count": 1418, "repo_created_at": "2024-09-15T04:27: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": "92969ec2c...
3debcea9-aac6-43ba-8b57-10ab740c46d8
nmellado/Super4PCS
src/super4pcs/algorithms/match4pcsBase.h
// Copyright 2017 <NAME> // // 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...
ALGO
0.995596
6.601577
{ "github_metadata": { "branch": "master", "commit_count": 329, "repo_created_at": "2014-06-24T17:54:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 486, "forks": 218, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "cec4...
a1dfe0d4-07e1-4333-b92e-34b7f729b9dd
ariloc/CompetitiveProgrammingCodes
CSES/Problem Set/School Dance.cpp
#include <algorithm> #include <bits/stdc++.h> //#pragma GCC optimize("Ofast,unroll-loops") //#pragma GCC target("avx,avx2,fma") #define forn(i,n) for(int i = 0; i < int(n); i++) #define forsn(i,s,n) for(int i = int(s); i < int(n); i++) #define dforn(i,n) for (int i = int(n)-1; i >= 0; i--) #define dforsn(i,s,n) for...
ALGO
0.999993
3.616907
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2020-08-19T01:48:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a9bb323...
b5e6cf2a-c07e-4425-a2e7-6a786cfd03ed
seitsorra/Algorithms_Examples
C++/src/Cracking Coding Interview/Linked List/removeUniques.cpp
#include "MyLinkList.h" #include <stack> #include <iostream> #include <unordered_set> using namespace std; class Trie { public: struct TrieNode{ struct TrieNode* children[26]; bool isEndOfWord; }; TrieNode* getNode(){ TrieNode* node = new TrieNode; node->isEndOfWord =...
ALGO
0.999778
3.144921
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2019-05-05T17:14: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": "bb3cb78b7...
a270ac3c-2e8b-460b-bd3b-bb5556bb99aa
SWEG-2015EC-Batch/Code-Crafters
ETS1379_15_YARED_HABTAMU/BMI Calculator/BMI_V2.cpp
#include <iostream> using namespace std; int main() { char gender; double height, weight, BMI; cout << Enter your gender by saying m or f "; cin >> gender; cout << "enter your weight= "; cin >> weight; cout << "Enter your height= "; cin >> height; BMI = weight / (height * height); ...
TOOL
0.992289
3.702131
{ "github_metadata": { "branch": "main", "commit_count": 501, "repo_created_at": "2023-11-01T17:25:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa6cc1eee07...
1d7ae867-6a9c-4b2e-be19-fe2915059374
ishandutta2007/codeforces-a
akemi-homura-/normal/1494/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { int T; scanf("%d", &T); while (T--) { int n, u, r, d, l; scanf("%d%d%d%d%d", &n, &u, &r, &d, &l); int ans = 0; for (int mask = 0; mask < (1 << 4); mask++) { int ur = mask >> 0 & 1, rd = mask >> 1 & 1, dl = mask >> 2 & 1, lu = mask >> 3 & 1; int...
ALGO
0.998003
4.079952
{ "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": "e02bcfdf4ebb...
e38e80c6-049b-4a61-a718-51d814a6fef5
linneszyx/CP-Problems
Hard/Split Array Largest Sum/split-array-largest-sum.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int splitArray(int arr[] ,int N, int K) { // code here int totalSum = 0; int mx = INT_MIN; for(int i=0;i<N;i+=1){ totalSum+=arr[i]; mx = max...
ALGO
0.999974
5.816453
{ "github_metadata": { "branch": "master", "commit_count": 2715, "repo_created_at": "2023-01-14T11:59:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fea146a...
8a36b9fb-a945-4189-b2c8-da4b020968b5
nileshsah/Algorithms
SUBLCM.cpp
#include <bits/stdc++.h> #define ll long #define get(a) scanf("%ld", &a); #define rep(n) for( ll i = 1; i <= n; i++ ) #define repVector(v) for( typeof(v.begin()) it = v.begin(); it != v.end(); it++ ) #define repSet(s) for( typeof(s.begin()) it = s.begin(); it != s.end(); it++ ) #define all(c) c.begin(), c.end() #defin...
ALGO
0.999509
3.547664
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-02-17T10:07:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78304ff00...
8ca8cf66-c293-47ee-9508-10b4c25b84af
VinayRatnam/AVLTree
Commands.h
#pragma once #include "TreeNode.h" #include <iostream> #include <sstream> #include <string> using namespace std; bool check_Valid_ID(string ID) { int len = ID.size(); //ID has to be 8 digits if (len != 8) { return false; } for (int i = 0; i < len; i++) { //if one of the characters...
ALGO
0.958847
4.26447
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-10-02T21:44: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": "289126ddca35...
8cc691f5-9468-44f1-a608-2347e0cec0cf
chrismile/cfd3d
src/CfdSolver/Opencl/UvwOpencl.cpp
/* * BSD 2-Clause License * * Copyright (c) 2019, <NAME>, <NAME>, <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyrig...
ALGO
0.999731
5.464287
{ "github_metadata": { "branch": "master", "commit_count": 259, "repo_created_at": "2019-10-11T22:40:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "719be5...
a861f24e-72d7-4362-94a4-506b7743b10d
ddonix/sfjs2
536/536.cpp
/*uva 536:Tree Recovery * 题意:由二叉树的先序和中序序列,求出后序序列。 * 思路:先序最先出现根,中序根在中间,左边是左子树右边是右子树 * 可用递归。这题不需要构造出二叉树,在递归的时候就求出后序序列。 * 先跟,后右子树,再左子树。最后结果反着来就是。 * */ #include <iostream> #include <string> using namespace std; string sw(string p, string d) { string res; int len = p.size(); if(len <= 1) res = p; e...
ALGO
0.999998
4.50567
{ "github_metadata": { "branch": "master", "commit_count": 210, "repo_created_at": "2019-07-01T07:43:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5d13290...
cb4bcac7-78cd-4e60-89d1-c415e8f2ce38
NguyenAnhTuan1912/data-structures
stack/tuan_cpp/exercises/stack_exercise_03_tuan.cpp
/* @author <NAME> Question: Create a Stack has method print (Stack has HeadNode, Size and MaxSize and Constructor that auto push() element when initializing stack and Print method). Nodes have data (Integer Type) and NextNode. Initialize 1 stack has 5 elements and print that 5 elements. Done. */ #include <...
TOOL
0.965497
5.737103
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-02-16T00:27:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c44885f5fb...
9be9b466-b10c-4042-a171-f8af3a58f068
raincross7/code-similarity
codes/train_code/problem102/problem102_370.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <iomanip> #include <map> #include <queue> #include <string.h> #include <vector> using namespace std; typedef long long ll; int main() { int N, K; cin >> N >> K; vector<ll> A; ll a; ll sum = 0; ll rui[N + 1]; memset(rui, 0, sizeof(rui));...
ALGO
0.999819
4.290977
{ "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": "1efb8c829c50...
9e1c00ae-b383-4b54-8922-a458e2e6aa49
llvm/clangir
llvm/lib/CodeGen/MachinePipeliner.cpp
//===- MachinePipeliner.cpp - Machine Software Pipeliner Pass -------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TOOL
0.989851
6.615055
{ "github_metadata": { "branch": "main", "commit_count": 533567, "repo_created_at": "2022-08-04T00:48:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 514, "forks": 156, "issues": 138, "pull_requests": 35 }, "file_meta": { "content_id": "4...
72641849-9802-460a-9e97-4c593cbae3d9
ana-GT/Algorithms
Ford/Vertex.h
/** * @file Vertex.h * @brief Vertex generic type * @author <NAME> * @date 2012-07-31 */ #ifndef _VERTEX_H_ #define _VERTEX_H_ #include <climits> #include <list> #include <vector> #include <stdio.h> #define INF INT_MAX #define NIL (-1) /** * @enum COLOR */ typedef enum { WHITE, BLACK, GRAY } COLOR; /...
ALGO
0.927701
4.346154
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2012-08-03T20:57:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "057186a0a1...
75095f8e-4410-4a81-90f1-22f981a87d92
goofcode/ps
baekjoon/1325.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; int N, M; int bfs(vector<vector<int>> &trust, int s) { queue<int> q; vector<bool> visited(N, false); q.push(s); visited[s] = true; int cnt = 0; while (!q.empty()) { int c = q.front(); ...
ALGO
0.999995
4.485179
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-04-15T08:21:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "6ba99e98b...
d24768a9-b168-419a-b370-91714f953f28
Cytin7/ZJUI-CS225-SP22-D7
Ass5_Ex4_KMP_Alg/listkmp_template.cpp
// // listkmp.cpp // // // Created by KD on 14.01.21. // Modified by KD on 12.03.22. // #include <stdio.h> #include <iostream> #include <cstdlib> #include "listkmp.h" using std::cin; using std::cout; template <class T> KMPlist<T>::KMPlist(int size) { maxsize = size; if (size < 20) minsize = size; ...
TOOL
0.986833
5.830104
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2022-02-22T12:14:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "90b1f7dc2d7...
09ed0fe7-301b-46e9-86a3-1dc7920a4c24
SERGMxL/folderProyectos
Secuencias.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> sequence(n); for (int i = 0; i < n; ++i) { sequence[i] = i; } for (int i = 0; i < m; ++i) { int u, x; char op; cin >> u >> op >> x; if (op ==...
ALGO
0.99995
4.497126
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T13:21:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0a635245740...
39e52e58-c943-4875-84be-6386f6914bd1
Xylot/Labs
Lab 2/int_ranges.cpp
/* <NAME> ECE 1305 Lab 2 9/18/15 Calculates int ranges */ #include <iostream> #include <cmath> using namespace std; int main(void) { cout << "\n------------UNSIGNED INT FOR LOOP IMPLEMENTATION------------" << endl; int xf, yf; //Going to 32 demonstrates the looping back to a large negative number whe...
ALGO
0.97105
4.759546
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2015-09-21T18:44:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d363cce04...
24d3b347-5b4a-4ba6-abaa-0396303b8bc9
menhhduc/Cryptography
BI12-092-Nguyen Le Minh Duc-Ex3.cc
#include <iostream> #include <math.h> using namespace std; int gcd(int x, int y) { int temp; while (1) { temp = x % y; if (temp == 0) return y; x = y; y = temp; } } int main() { double p; cout << "Enter p: "; cin >> p; double q; cout << ...
ALGO
0.999945
4.819063
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-06T06:54: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": "c56aa0d97c44...
aaab5968-6a6a-4430-8731-ed1eeefc9caf
kkmonlee/aoc
2024/21.cpp
// g++ -std=c++17 -lgmpx -lgmp 21.cpp #include <gmpxx.h> #include <functional> #include <iostream> #include <string> #include <tuple> #include <unordered_map> #include <vector> typedef std::pair<int, int> position_t; typedef std::tuple<position_t, position_t, int, int> cache_key_t; #define CREATE_BUTTON_LOCATIONS(....
ALGO
0.999485
5.084115
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-12-08T05:41:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d7e134a2f7...
a87bd1ca-e994-48ca-b820-42da77151826
Haider-BA/madpac
madpac/peano/applications/navierstokes/prototype1/adapters/SpacetreeGrid2InitialiseScenario.cpp
#include "peano/applications/navierstokes/prototype1/adapters/SpacetreeGrid2InitialiseScenario.h" #include <limits> peano::applications::navierstokes::prototype1::adapters::SpacetreeGrid2InitialiseScenario::SpacetreeGrid2InitialiseScenario() { } peano::applications::navierstokes::prototype1::adapters::SpacetreeGri...
ALGO
0.901179
4.835569
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-10-04T12:02: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": "e1da73d255...
1d40c44b-1c2c-4e23-9a39-524c5d9bed69
Nishant-Jain-Codes/daily-problem-solving-questions
Coding Ninjas(PENDING)/Data Structures(PENDING)/lect_14_PriorityQueues/kSmallestElements.cpp
/* Code : K smallest Elements Send Feedback You are given with an integer k and an array of integers that contain numbers in random order. Write a program to find k smallest numbers from given array. You need to save them in an array and return it. Time complexity should be O(n * logk) and space complexity should not ...
ALGO
0.999988
5.791521
{ "github_metadata": { "branch": "main", "commit_count": 1054, "repo_created_at": "2022-07-18T06:17:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c07807e4...
15f88f60-fc4d-4a9a-a511-1d43eca55c0e
lexxxer18/cpp-practice-sem1
lab3/lab3.cpp
#include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; /** * Программа нахождения объема V_i каждого из n цилиндров, * при заданных радиусах оснований {R_1, R_2, ..., R_n} и высотах {H_1, H_2, ..., H_n} * * Пример ввода-вывода: * * 📐📊 Нахождение объема...
TOOL
0.997391
5.81828
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-11-21T00:37: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": "849d29b8eb...
dd57bb6a-e05e-4378-89a7-943101f67bc9
logoutAgain/pat
PAT1019数字黑洞.cpp
#include<iostream> #include<string> #include<algorithm> #include<cctype> #include<iomanip> #include<cstdlib> using namespace std; /*如果N的4位数字全相等,则在一行内输出“N - N = 0000”;否则将计算的每一步在一 行内输出,直到6174作为差出现,输出格式见样例。注意每个数字按4位数格式输出。 输入样例1: 6767 输出样例1: 7766 - 6677 = 1089 9810 - 0189 = 9621 9621 - 1269 = 8352 8532 - 2358 = 6174 输入样例2...
ALGO
0.99996
3.40453
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2017-04-10T10:47: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": "d624af66f...
8dd7e5d6-30aa-4866-b426-3ea43cb62ad1
Dennis-Bersenev/Neko-at-sea-me
src/convexhull.cpp
// Header #include "convexhull.hpp" #include "tiny_ecs.hpp" #include "render.hpp" #include <cmath> #include <iostream> #include "render_components.hpp" // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // DON'T WORRY ABOUT THIS CLASS UNTIL ASSIGNMENT 2 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!...
ALGO
0.960664
4.437582
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-07-19T23:09:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d0bd18c8d...
0124c714-ff2d-4359-8a41-6de76faaf660
SeismicTools/HorizonTrackingTools
src/FotiadiMath.share/fotiadi_math.h
/** @file fotiadi_math.h * Основные функции библиотеки. */ #pragma once #include <cstdint> #include <string> #if defined(_MSC_VER) // Microsoft #ifdef __EXPORT_FUNCTION__ #define EXPORT_FM __declspec(dllexport) #else #define EXPORT_FM __declspec(dllimport) #endif #elif defined(__GNUC__) // GCC #ifdef __EXPORT_F...
ALGO
0.973942
5.668925
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-05-11T13:49:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01cc570081674...
452f8f9d-5070-43e0-81da-7de2617f1ee2
perchuts/CompetitiveProgramming
AtCoder/abc283/h.cpp
#include <bits/stdc++.h> #define all(x) x.begin(), x.end() #define sz(x) (int) x.size() #define endl '\n' #define pb push_back #define _ ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define int ll using namespace std; using ll = long long; using ull = unsigned long long; using ii = pair<int,int>; us...
ALGO
0.999835
3.183805
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2021-12-19T23:57: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": "9ced7ba60...
d58b7ef2-2731-4774-85ef-e4b7c7c365a6
XueqiangHe/OneWeekRayTracing02
main.cpp
#include "rtweekend.h" #include "hittable_list.h" #include "bvh.h" #include "sphere.h" #include "camera.h" #include "material.h" #include <iostream> #include "texture.h" #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" #include "box.h" double hit_sphere(const vec3& center, double radius, const ray& r)//返回直线系数...
ALGO
0.983758
4.347095
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2022-03-22T08:21:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4fb8b21e6cf...
001210ff-6bdd-46e1-a722-8982a34927a7
namals/directed_exploration
include/directed_exploration/de_planner.h
#include <ros/ros.h> #include <nav_msgs/OccupancyGrid.h> #include <nav_msgs/Path.h> #include <nav_msgs/GridCells.h> #include <visualization_msgs/MarkerArray.h> #include <tf/transform_listener.h> #include <move_base_msgs/MoveBaseAction.h> #include <actionlib/client/simple_action_client.h> #include <boost/thread.hpp> #i...
ALGO
0.998719
3.135623
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-06-03T10:02: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": "6df9764aeb...
346c23cf-588c-4ce6-8b42-ac7c13420a6f
BamBam714/HUGOR
main.cpp
#include <bits/stdc++.h> using namespace std; void addEdge(vector<int> adj[], int u, int v) { adj[u].push_back(v); adj[v].push_back(u); } void printGraph(vector<int> adj[], int V) { for (int v = 1; v < V; ++v) { cout << "\n Shortest Round trip " << v; for (auto x: adj[v]) co...
ALGO
0.999624
4.420675
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-06-08T05:04:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b992eb441820...
33070a04-6a0b-4ae3-9fa7-fba83b04fcbf
IonovvA/Lists
List.h
#pragma once #include <iostream> #include <fstream> #include <string> using namespace std; struct Link { int val; Link* next; Link(int _v = 0, Link* _n = nullptr) : val(_v), next(_n) {}; }; class List { Link* start; Link* end; public: List() { start = new Link(); start->n...
TOOL
0.982904
4.068735
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-03-02T13:01:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e9e7aa4ec83...
535e9d13-df21-44f6-81a3-98f05f72aefc
knightzf/review
leetcode/streamOfCharacters/q4.cpp
#include "header.h" struct Trie { bool isword = false; vector<Trie*> v = vector<Trie*>(26, nullptr); }; class StreamChecker { Trie * trie; string s; public: StreamChecker(vector<string>& words) { trie = new Trie(); for(const auto& w : words) { Trie* node =...
ALGO
0.999636
5.842235
{ "github_metadata": { "branch": "master", "commit_count": 846, "repo_created_at": "2013-05-15T02:50: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": "2560af60...
475a6dc0-f83c-44d9-b5ac-9283f4362030
alihakankurt/CSES-Solutions
Sorting and Searching/Stick Lengths.cpp
#include <bits/stdc++.h> using namespace std; using i8 = int8_t; using i16 = int16_t; using i32 = int32_t; using i64 = int64_t; using isize = ptrdiff_t; using u8 = uint8_t; using u16 = uint16_t; using u32 = uint32_t; using u64 = uint64_t; using usize = size_t; using f32 = float_t; using f64 = double_t; inline constex...
ALGO
0.99995
5.049736
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2024-07-02T20:03:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e47d29711f...
e7bd0055-7bef-4905-86ca-61b242a307c1
YawenChen0823/intrduction_to_algorithm
sort/heapsort.cpp
/* date:2017-07-23 author:<NAME> Description: this algorithm aims to sort an random array using max heap sort. max-heap data structure:in the binary tree, every parent should > its children, if the node is from 1 to n, and parent=i, then left child=2i,right child=2i+1 heapsort comlexity=O(nlgn) */ #include <iostrea...
ALGO
0.999932
4.988578
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-07-26T05:24: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": "5dd93a74b2...
03b29b91-4461-408e-a7b9-d99cca7fdb35
coolfluid/coolfluid3
plugins/UFEM/src/UFEM/les/WALE.hpp
// Copyright (C) 2010-2011 <NAME> for Fluid Dynamics, Belgium // // This software is distributed under the terms of the // GNU Lesser General Public License version 3 (LGPLv3). // See doc/lgpl.txt and doc/gpl.txt for the license text. #ifndef cf3_UFEM_EulerDNS_hpp #define cf3_UFEM_EulerDNS_hpp #include "../InitialCon...
TOOL
0.990658
5.210162
{ "github_metadata": { "branch": "master", "commit_count": 6081, "repo_created_at": "2011-08-08T12:37:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 78, "forks": 77, "issues": 60, "pull_requests": 0 }, "file_meta": { "content_id": "e8cd9...
50dab8f6-8b26-4353-9acc-5332ddacbb31
ishandutta2007/codeforces-s
smax/normal/1666/G.cpp
#include <bits/stdc++.h> using namespace std; #define double long double const int MAX = 2e5 + 5; const double EPS = 1e-9; struct Point { double x, y, z; Point(double _x = 0, double _y = 0, double _z = 0) : x(_x), y(_y), z(_z) {} Point operator - (const Point &p) const { return Point(x ...
ALGO
0.999013
4.734487
{ "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": "a9fde7eabb2e...
db848374-4e9f-4782-b52f-9e219967bfa1
davo-99/Graph-Course-Project
graph_body.cpp
#include "graph_head.hpp" Graph::Graph(std::map<int, std::set<int>> a) : adj_list(a) {} void Graph::add_vertex$edge(int u, int v) { adj_list[u].insert(v); adj_list[v].insert(u); } bool Graph::is_cyclic(int i, int parent, std::deque<bool>& v) { v[i] = true; for (auto it = adj_list[i].begin(); it != ad...
ALGO
0.992813
4.320686
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-11-01T02:13:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cbe3275c945...
23807e94-7e81-42e5-b5a9-6fa34592c6f1
dheerujilagam/leetcode
Total Cuts - GFG/total-cuts.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: int totalCuts(int n,int k,vector<int> &a){ vector<int> pre(n), suf(n); int mx = -1, mn = 1e6 + 1, count = 0; f...
ALGO
0.999747
5.414018
{ "github_metadata": { "branch": "main", "commit_count": 1998, "repo_created_at": "2022-07-27T09:15: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": "4aa380a7f...
759bb901-dec8-410d-a9d4-bb2ac7f18ad2
pgh08/DSA
BST/SearchInBST.cpp
#include<iostream> using namespace std; class node{ public: int data; node* left; node* right; node(int d){ this->data = d; this->left = NULL; this->right = NULL; } ~node(){} }; node* buildBST(node* root, int d){ if(root == NULL){ root ...
ALGO
0.999977
4.481892
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2023-02-22T18:16: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": "63b54e1ce...
338b3092-e874-4c7b-b3e8-3f7ccd6545e7
mitesh-200228/DS-Algo-Whole-Chapter
Binary Trees/ALLleafNodeAreAtSameOrNot.cpp
#include <unordered_set> #include <stack> #include <iostream> #include <vector> #include <string> #include <numeric> #include <algorithm> #include <queue> #include <stack> #include <map> #include <unordered_map> #include <set> #include <climits> #include <cmath> #include <math.h> #include <limits> #define ll long long ...
ALGO
0.999853
3.52982
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2021-12-31T07:15:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ecf24950f3b...
118c356d-a86b-4a49-bee9-103347617645
Zattox/Year-2_Algorithms-1
SET-7/P3.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 2e9; struct DSU { vector<int> parent, rk; DSU(int n) : parent(n), rk(n, 0) { for (int i = 0; i < n; ++i) { parent[i] = i; } } int find(int v) { if (parent[v] == v) return v; return parent[v] = fi...
ALGO
0.999941
5.083221
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2024-09-26T00:59:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0395b4a374...
3d815d50-654c-48c3-8ebb-19c05cd859ae
kns-1/ncrwork
C/Assignment-1/RealCalculatorString/realCalculatorString.cpp
#include<iostream> #include<stdio.h> #include<ctype.h> using namespace std; #define MAX 100 int top_operand = -1, top_operator = -1, result = 0; int operand_stack[MAX]; //operand stack char operator_stack[MAX]; //operator stack void push_operand(int ele) { operand_stack[++top_operand] = ele; } void push_operator(cha...
ALGO
0.999936
3.707975
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2019-02-01T05:15:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15d145763...
0af9f5a9-f14c-41b6-a0f4-c118f841405e
b21quocbao/Competitive-Programming
SUPERIOR_Substring.cpp
#include <bits/stdc++.h> #define fn "test" #define fn1 "" using namespace std; const int mn = 1 * (int)(1e5) + 10; const int mod = 1 * (int)(1e9) + 7; const int mm = 1 * (int)(1e3) + 10; const int base = 1 * (int)(1e9); const bool aNs = 0; int tt, ntest = 1; void docfile() { ios::sync_with_stdio(false); ci...
ALGO
0.999551
3.702812
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-02-22T14:52:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "542ab1fd83...
f2476f8a-2b4d-4d13-92db-19ab7c33f80d
Suikaba/procon-solved
AOJ/1350-1399/1379-Parallel_Lines.cpp
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1379 #include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; int main() { int m; cin >> m; vector<int> x(m), y(m); for(int i = 0; i < m; ++i) { cin >> x[i] >> y[i]; } auto slope = [&] (int i, int j) { i...
ALGO
0.999875
4.168622
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2018-04-18T08:29:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b2ff221b...
1529c31b-c508-429d-978e-4533d010c78c
kthohr/stats
include/stats_incl/dens/dinvgamma.ipp
/*################################################################################ ## ## Copyright (C) 2011-2023 <NAME> ## ## This file is part of the StatsLib C++ library. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with ...
ALGO
0.99772
7.26476
{ "github_metadata": { "branch": "master", "commit_count": 342, "repo_created_at": "2017-06-21T15:28:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 549, "forks": 75, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "05928...
36d90c84-d0ea-40ae-bd78-24e8f9eaf7d7
revantg/shittycoders
9B - Running Student/B - Running Student.cpp
/* 9 B - Running Student author : ltra_golu | submitted at : 2018-07-13 05:01:09 time taken : 62 ms | memory consumed : 8 KB */ #include <bits/stdc++.h> using namespace std; long double dist(long long x1, long long y1, long long x2, long long y2) { long long x = (x2 - x1) * (x2 - x1); long double y = (y2 -...
ALGO
0.999889
4.227837
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-06-03T09:49:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d92e7131d...
234e388a-0043-4a27-89ea-2283eb1b58e8
bbruceyuan/algorithms-and-oj
code4interview/c++/面试题38. 字符串的排列.cpp
#include <string> #include <vector> #include <algorithm> #include <stack> #include <iostream> #include <limits> #include <queue> #include <unordered_map> #include <set> using namespace std; class Solution { public: vector<string> permutation (string s) { // 使用回溯 进行剪枝 vector<string> res; p...
ALGO
0.999883
5.183862
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2016-10-25T12:56:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 48, "forks": 15, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "706126...
c5071be6-7815-429e-b319-f55d5090843a
Deeplearning-JorD/DAIMA
1846D.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using db = double; #define endl '\n' #define PII pair<ll, ll> #define siz(s) (ll)(s.size()) #define all(a) a.begin(), a.end() #define all1(a) a.begin() + 1, a.end() #define priq priority_queue #define SPO(n) fixed << setprecision(n) #define rep(i, l, r...
ALGO
0.999583
3.634413
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-12-26T13:33: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": "bd969bc415fd...
59cd8bb1-cca4-44c3-be38-1d4353c146e1
BenQuickDeNN/LeetCodeSolutions
最长有效括号.cpp
#include <string> #include <cstdlib> #include <algorithm> using namespace std; class Solution { public: int longestValidParentheses(string s) { // 使用动态规划 int res = 0; int len = s.length(); int *dp = new int[len]; memset(dp, 0, sizeof(int) * len); for(int i = 1; i < le...
ALGO
0.99989
5.101038
{ "github_metadata": { "branch": "master", "commit_count": 260, "repo_created_at": "2020-04-13T14:04:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8dde413d...
98a38936-2c2d-454c-b162-6afe1f44d8d5
psharma078/METTS
finiteT_observer.cc
#include "itensor/all.h" #include "itensor/util/print_macro.h" #include "mytdvp.h" #include "measurement.h" #include "tebdGates_Hubb.h" #include "collapse.h" #include "runningStats.h" using namespace std; using namespace itensor; int main(int argc, char* argv[]) { if(argc < 2) { printfln("Usage...
ALGO
0.993582
4.589615
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-05-03T22:42: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": "63b40407e6e...
f20def51-a5fd-4d30-86ef-7df36a8b68f4
VARUN-009/Graphs
Cheapest-flight-within-k-stops.cpp
class Solution { public: int findCheapestPrice(int n, vector<vector<int>> &flights, int src, int dst, int k) { unordered_map<int, vector<pair<int, int>>> adj; // vector<pair<int,int>> adj // 2d vector -- adjacency list // taken 2d vector because ek node...
ALGO
0.99987
5.466222
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-07T05:19: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": "5ab3978e0815...
b8c05c1c-996e-43a3-805c-0c1dc1ae163c
ishandutta2007/codeforces-d
dvdg6566/normal/1299/C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vi; typedef pair<ll,ll> pi; typedef vector<pi> vpi; typedef long double ld; #define pb emplace_back #define mp make_pair #define lb lower_bound #define ub upper_bound #define ALL(x) x.begin(), x.end() #define SZ(x) (int)x.size() #defi...
ALGO
0.999849
3.498108
{ "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": "12029714a574...
70ec3a32-84b6-45f7-a5a1-5fd95879051e
eliogovea/solutions_cp
Codeforces-Gym/100507 - 2014-2015 ACM-ICPC, NEERC, Eastern Subregional Contest/I.cpp
// 2014-2015 ACM-ICPC, NEERC, Eastern Subregional Contest // 100507I #include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; int main() { ios::sync_with_stdio(false); cin.tie(0); //freopen( "dat.txt", "r", stdin ); string up, down; cin >> up >> down; int sol = 0; for( int i = 0, j = 0;...
ALGO
0.999843
3.747781
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-11-16T04:08: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": "19f7e5b7db...
a42cdcd6-ac52-48f0-8158-38fe88a5733f
rajnishkr/SpojSolution
multq3.cpp
#include<iostream> #include<cstdio> #include<algorithm> #include<vector> using namespace std; int rem0[600001]; int rem1[600001]={0}; int rem2[600001]={0}; int flag[600001]={false}; void create(int b,int e,int index) { rem0[index]=e-b+1; if(b==e) { rem0[index]=1; return;} create(b,(b+e)/2,2*index+1); ...
ALGO
0.999951
3.374252
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-06-19T16:19: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": "6bd2213f72...
2d417506-b1ea-48a1-b6d9-84e7886022a6
cacophonix/SPOJ
ARBITRAG.cpp
/* USER: zobayer TASK: ARBITRAG ALGO: warshall */ #include <cstdio> #include <map> #include <string> #include <algorithm> using namespace std; #define MAX 30 #define EPS 1e-9 char res[2][4] = {"Yes","No"}; double value[MAX][MAX]; map< string, int > M; map< string, int > :: iterator it; inline int hash(char *s, int ...
ALGO
0.999672
3.75332
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2012-11-13T17:07:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 92, "forks": 101, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "8407e8...
334b783e-5d71-4c32-a4c5-d3c5af60daa0
pandora-auth-ros-pkg/pandora_ros_pkgs
pandora_vision/pandora_vision_datamatrix/src/datamatrix_detector.cpp
/********************************************************************* * * Software License Agreement (BSD License) * * Copyright (c) 2014, P.A.N.D.O.R.A. Team. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following con...
ALGO
0.934483
5.481113
{ "github_metadata": { "branch": "indigo-devel", "commit_count": 1039, "repo_created_at": "2014-03-13T12:40:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89...
89fb0ee4-c05b-4671-a831-a8f25545a8f9
mnikhil1011/DAA_1
website_q2/DAA_Q2/main.cpp
#include <iostream> #include <raylib.h> #include <raymath.h> #include <vector> #include <stack> #include <algorithm> using namespace std; /// @brief width of the screen int width = 800; /// @brief height of the screen int height = 500; /// @brief the last time we ran a step in the algorithm float lastUpdateTime = 0; ...
ALGO
0.99999
4.102099
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-16T19:14: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": "69d4d35d3b83...
e26dd46a-b060-40fa-a530-2d291655666d
AgingCurve/Problem_Solving
boj_12865_평범한배낭_아직못품.cc
#include <iostream> #include <vector> std::vector<int> bag; void makeBag (std::vector<std::pair<int, int>> list, int maxWeight, int wcount, int vcount, int index) { if(list.empty()){ return; } for(int i = index ; i < list.size(); i++){ if(maxWeight >= wcount+list[i].first){ wcount ...
ALGO
0.999864
3.934903
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-01-10T23:38: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": "9fdcaaff4034...
fd28277d-a137-4ac1-82df-7101433a9b19
ghorwin/SIM-VICUS
externals/IntegratorFramework/src/SOLFRA_LESBand.h
#ifndef SOLFRA_LESBandH #define SOLFRA_LESBandH #include "SOLFRA_LESInterfaceDirect.h" #include "SOLFRA_IntegratorInterface.h" #include <vector> #include <iosfwd> namespace IBKMK { class BandMatrix; } namespace SOLFRA { class IntegratorSundialsCVODE; class IntegratorSundialsIDA; /*! Implementation of a band matr...
TOOL
0.946808
6.207387
{ "github_metadata": { "branch": "master", "commit_count": 8316, "repo_created_at": "2020-04-23T13:09:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 36, "forks": 14, "issues": 107, "pull_requests": 0 }, "file_meta": { "content_id": "b9c...
756c4bd5-9e30-450f-9b7b-d6a6c127219b
alxsoares/Topcoder-4
srm_548_2/1000.cpp
#include <vector> #include <map> #include <set> #include <deque> #include <algorithm> #include <cassert> #include <sstream> #include <iostream> #include <iomanip> #include <numeric> #include <cstdio> #include <cmath> #include <cstring> #include <climits> #include <ctime> #include <complex> using namespace std; const ...
ALGO
0.999588
3.676699
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2013-04-27T01:11:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ade5cd85...
5b70e68d-fd95-4555-9bc7-9526f03ce878
thhuang/algo4fun
solutions/leetcode/maximum-points-in-an-archery-competition/main.cpp
class Solution { public: vector<int> maximumBobPoints(int numArrows, vector<int>& aliceArrows) { vector<int> result; int max_points = 0; vector<int> curr_arrows; int curr_points = 0; int arrows = numArrows; function<void(int)> search = [&](int i) -> void { ...
ALGO
0.999739
4.637764
{ "github_metadata": { "branch": "main", "commit_count": 3321, "repo_created_at": "2022-01-28T00:13:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95ce503b...
8162ca8f-1031-4f17-85bd-dcca966561a4
sburuiana/adventofcode
2015/day3/part1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; #define mp make_pair #define CHECK(x) if(!(x)) return false; #define CHECKRET(x, y) if(!(x)) return (y); #define SKIP(x) if((x)) continue; typedef pair<int, int> pii; vector<string> getAllLines() { vector<string> v; string s; while (getline(cin,...
ALGO
0.999967
3.750928
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2020-12-03T05:19:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "637e0819e...
86c6c7c4-f4ed-499c-b465-f532add807f0
pritamnikam/ds_algorithms
bst/BinarySearchOrderNotKnown.cpp
#include <iostream> using namespace std; int BinarySearch(int arr[], int size, int n); int BinarySearchDscArray(int arr[], int size, int n); int BinarySearchOrderNotKnown(int arr[], int size, int n) { if (size == 1) { return arr[0] == n ? 0 : -1; } if (arr[0] < arr[size - 1]) { return BinarySearch(arr, size,...
ALGO
0.999894
4.670596
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-03-09T01:33: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": "3a232ac1cf0...
474d549f-da07-480e-90b9-8454dcb16793
benisreallycool1/algorithms_in_multiple_languages
circularQueue/main.cpp
/* This extends the regular queue. The last element is connected to the first element. Enqueue: Check if queue is full. For first element => FRONT=0 Increase REAR indec by 1. Add new element in position pointed to by REAR Dequeue: Check if queue is empty. Ret...
ALGO
0.998934
4.578889
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-04-21T00:42:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f353a9f42420...
088f1ca7-12ef-48c5-8292-9b3b82d81b8d
dpeck12/LeetCode-Easy
candies.cpp
#include <iostream> #include <vector> #include <numeric> #include <algorithm> using namespace std; class Solution { public: vector<bool> kidsWithCandies(vector<int>& candies, int extraCandies) { int maximum = INT_MIN; for (int i = 0; i < candies.size(); i++) maximum = max(maximum, ca...
ALGO
0.999969
5.177037
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-08-09T11:39:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a971df91c7...
a33368de-9619-4c86-928d-56d4b068828e
fmomos/MajorAbility
programme/code22.cpp
// 7-23 栈操作的合法性 // 分数 15 // 作者 DS课程组 // 单位 浙江大学 // 假设以S和X分别表示入栈和出栈操作。 // 如果根据一个仅由S和X构成的序列,对一个空堆栈进行操作,相应操作均可行(如没有出现删除时栈空)且最后状态也是栈空, // 则称该序列是合法的堆栈操作序列。请编写程序,输入S和X序列,判断该序列是否合法。 // 输入格式: // 输入第一行给出两个正整数 n 和 m,其中 n 是待测序列的个数,m(≤50)是堆栈的最大容量。随后 n 行, // 每行中给出一个仅由S和X构成的序列。序列保证不为空,且长度不超过100。 // 输出格式: // 对每个序列,在一行中输出YES如果该序列是合法...
ALGO
0.999772
4.17811
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-12-16T13:26:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "901d0c95f5d...
ec2e77e4-3c46-40ee-baad-2dfc4cdc799e
wirc-sjsu/fofem
FOF_DLL/caldryvis.cpp
#include "string.h" #include "math.h" #include "BMSoil.h" double temdR [eC_MaxLev]; double temRi [eC_MaxLev]; double mud1 [eC_MaxLev]; double mud2 [eC_MaxLev]; extern double Jim[]; extern double tempdi; /********************************************************* * ********************************************...
ALGO
0.999713
3.943414
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-12-13T16:58:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5e010fee8...
fb2e4701-af23-41f8-a279-1ee710438e8b
siddharth25pandey/CPP-Programming
C++ Pattern problem/Butterflypattern.cpp
/* Pattern that we are going to make: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ...
ALGO
0.999973
3.711349
{ "github_metadata": { "branch": "master", "commit_count": 1586, "repo_created_at": "2020-09-30T19:06:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 60, "forks": 227, "issues": 11, "pull_requests": 31 }, "file_meta": { "content_id": "ee...
a4b50d39-48a1-4ffe-af7c-0580077826da
KeiShimon/AtCoder-C-
ABC126/D/D.cpp
#include <algorithm> #include <iostream> #include <queue> #include <string.h> #include <vector> using namespace std; #define REP(i,x) for(int i{ 0 }; i < (int)(x); i++) #define PB push_back #define MP make_pair typedef int64_t ll; typedef vector<ll> Vl; typedef pair<ll, int> pli; using G = vector<vector<pli>>; temp...
ALGO
0.999748
4.310228
{ "github_metadata": { "branch": "master", "commit_count": 259, "repo_created_at": "2019-03-06T05:55: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": "ed5ac54b...
aa0db878-49ad-45ac-952d-1da85059cca2
MohammedHassan172/task-3-Submission
MohammedHasaan_HarrySafe/MohammedHassan_Safe.ino
long long counter = 0; long long counter2 = 0; long long counter3 = 0; int degrees1 = 0; int degrees2 = 0; int degrees3 = 0; const int pps = 360; #define SIGNAL_A 2 #define SIGNAL_B 3 #define SIGNAL_A2 18 #define SIGNAL_B2 19 #define SIGNAL_A3 20 #define SIGNAL_B3 21 #define GrennLed 13 void setup() { //setting the ...
TOOL
0.998985
4.621818
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-09-19T15:50: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": "3b399cde62d1...
973b0f4e-fc9e-4cbe-b90f-f67c6d9b945f
tbenisa13/Cave
Logic.cpp
// // Logic.cpp // Practice1 // // Created by <NAME> on 12/18/20. // Copyright © 2020 <NAME>. All rights reserved. // #include "Logic.hpp" using std::string; using std::cin; using std::cout; using std::endl; using std::vector; using std::bitset; using std::istream; using std::ostream; extern const int cintGlobal...
TOOL
0.938642
3.815621
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-05-17T14:04:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3699893aae7b...
e10210ac-cd3d-451a-9822-3f635c8553fb
shahidul-brur/OnlineJudge-Solution
UVa/12936 - Hehe.cpp
/********************************************************** Status: Accepted Problem: UVa 12936 Author: Md. <NAME>, Department of Computer Sciemce and Engineering, Begum Rokeya University, Rangpur, Bangladesh ***********************************************************/ #include <bits/...
ALGO
0.995621
3.272277
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2019-06-15T04:11:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2118accb...
c111f61e-c015-42dd-870a-7ff7f51cd3fe
devakarkesavan/Leetcode
0079-word-search/0079-word-search.cpp
class Solution { public: bool dfs(int row, int col, vector<vector<int>>& vis, const string& word, vector<vector<char>>& board, int index) { if (index == word.size() - 1) { return true; } int n = board.size(); int m = board[0].size(); vis[row][col] = 1; i...
ALGO
0.99979
6.465809
{ "github_metadata": { "branch": "main", "commit_count": 728, "repo_created_at": "2024-02-23T07:48: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": "16ef231026...
1ba6514b-fcab-45a2-a97a-1400eb80d767
jmfveneroso/code_problems
elements_of_programming_interviews/ch08_stacks_and_queues/queue_with_max.cpp
// ===================================================== // Book: Elements of programming interviews // Problem 8.13: Queue with max // ===================================================== #include <iostream> #include <queue> #include <deque> using namespace std; template<typename T> class QueueWithMax { queue<T>...
ALGO
0.998815
6.21307
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2019-05-23T15:21:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79586b91...
868dd3ed-8731-46a6-b985-bd9011c902eb
lessandro/nbis
misc/nistmeshlab/vcglib/vcg/complex/trimesh/update/selection.h
/**************************************************************************** * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * * Copyri...
TOOL
0.968944
6.268342
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2011-09-21T11:13:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 80, "forks": 81, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "7efebfa1...
4a50b51e-47fd-4b8d-adb5-dcecb33a9888
lihzxs/LouGuOJCode
cpp/P1638.cpp
///////////////////////////////////////////// // // FileName : First.cpp // Creator : Fm // Date : 2019-11-15 00:20 // Comment : OJ(P1638) // /////////////////////////////////////////// //#include "pch.h" #include <iostream> #include <cstdio> #include <stdlib.h> #include <algorithm> #include <math.h> #include <sta...
ALGO
0.999997
3.299406
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-09-10T11:40:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a1202d403...
0b127195-132a-4514-ad0e-97db99d25f7f
Abdullah-source78/Cpp-Working-PRC-Set
ew2.cpp
/// for Guidline #include <iostream> using namespace std; /// passing array and its size to the user define function void getarray(int a[], int S) { for(int i= 0; i<S; i++) { cout<<"Enter value at "<<i<<" index :"; cin>>a[i]; } } void showarray(int a[], int S) { for(int i= 0; i<S; i++) ...
TOOL
0.995787
3.419631
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-12-11T12:57: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": "14a9f2f8b4d2...
02b2da9c-f0af-4a7c-a574-81bbc06817de
manasi1401/csc250
homework/homework2.cpp
/****************************************************************************** * Name: <NAME> * ID: 7404855 * Section: M0002 * Homework 2 *****************************************************************************/ #include <iostream> #include <iomanip> using namespace std; int main() { //Prints out the precenta...
ALGO
0.987625
3.632637
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-11-06T21:17: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": "8ba92d51cd...
31bd34ef-bdb8-4b3c-a8e1-ef8ee06cf74e
olroque/LeetCode
14_longest_common_prefix/longest_common_prefix.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: string longestCommonPrefix(vector<string>& strs) { // Empty string to hold common prefix string comPrefix = ""; // Get size of string int strsSize = strs.size(); // Check that the v...
ALGO
0.999172
5.525925
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-10-08T15:40:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f1547ed8ac...
918fdd32-5174-4a2e-85e5-1bd7213ab66e
notgarrett/algosa5
src/headers/adjacency-list.hpp
/** * @file adjacency-list.hpp * @author <NAME> */ #pragma once #include <vector> using namespace std; // * Forward Declarations ============ template <typename keyType> class Vertex; template <typename keyType> class Edge; template <typename keyType> class Adj_List_Graph; // * Vertex Definition =============...
ALGO
0.983358
5.12544
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-03-30T23:32:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2bfef17b85...
6c633d20-400e-4bc9-a336-ef30d1217eca
whoswq/Computational-Physics
practice/numerical integral/test_integral.cpp
#include "integral.h" #include <chrono> #include <cmath> #include <fstream> #include <iomanip> #include <iostream> #include <math.h> #include <random> #include <sstream> #include <stdlib.h> #include <string> #include <windows.h> // using namespace std; using std::cin; using std::cout; using std::endl; using std::ofstre...
ALGO
0.992396
4.709744
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-04-03T07:31: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": "61bd4fea2529...
5b1da104-0bac-4ac0-b054-a6ed8deb736d
tinicius/programing-problems
Online Judges/CODEFORCES/D. Kirill And The Game.cpp
#include <bits/stdc++.h> using namespace std; #define _ \ ios_base::sync_with_stdio(0); \ cin.tie(0); #define endl '\n' #define dbg(x) cout << #x << " = " << x << endl typedef unsigned long long ll; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3fll; int main() { ...
ALGO
0.99996
3.726792
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2022-10-11T22:03:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cab641cedf...
284f98e8-8c4d-4ec0-abb2-ac58d02f452e
cpjreynolds/cse3150lab2
lab2.cpp
#include "balance.hpp" #include <iostream> #include <vector> #include <cmath> #include <tuple> #include <numeric> /* * returns the standard deviation of the given list. * * used to determine convergence. */ static double stddev(const std::vector<double>& lst) { double mean = std::accumulate(lst.begin(), lst.en...
ALGO
0.99328
5.941813
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-02-01T17:28:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "573d66e313f...
0238f135-9a39-4329-9f23-6a4f4c3e04a6
NikkiLicea/csci104HW
lab-nlicea/final-prep/knapsack_skel.cpp
#include <iostream> #include <map> #include <vector> #include <string> using namespace std; // client interface void knapsackHelper(const map<string, int>& items, int limit, vector<string>& curr, int minW){ if(minW > limit){ cout << "Solution:" << endl; for(auto c : curr){ cout << c << endl; } } else{ fo...
ALGO
0.999879
4.416859
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-05-19T03:57: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": "92ea15bbbd77...
8f6eec9e-bcf2-449e-8f30-a4746874746b
PabloNicolla/learning-ground
DSA/LC/981_time_based_key-value_store.cpp
#include <string> #include <unordered_map> #include <vector> struct Data { int timestamp{}; std::string value{}; }; class TimeMap { std::unordered_map<std::string, std::vector<Data>> map{}; public: TimeMap() { } void set(std::string key, std::string value, int timestamp) { map[key].push_back({ti...
ALGO
0.998457
6.989454
{ "github_metadata": { "branch": "main", "commit_count": 467, "repo_created_at": "2024-06-13T00:02:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69530d74c1...
50c6cfdd-d240-45d6-a06b-10b1858203f8
SgtApone117/leetcode_daily
0515-find-largest-value-in-each-tree-row/0515-find-largest-value-in-each-tree-row.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999926
6.06988
{ "github_metadata": { "branch": "main", "commit_count": 1440, "repo_created_at": "2023-10-11T16:39:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03fd057fd...
0ccf5cfd-534a-4aa6-953b-84e95b2398e1
Ahsanul24/My-Codes
E_Boro_Bhai_also_uses_AI.cpp
// IN THE NAME OF ALLAH // Coded by <NAME> #include<bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>order_set; // find_by_order() - Returns...
ALGO
0.999929
3.778962
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-24T11:20: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": "d90671a0af2f...
7ed59de8-a712-4b93-b468-5507edb2f5c1
duckdb/duckdb
third_party/zstd/common/xxhash.cpp
/* * xxHash - Fast Hash algorithm * Copyright (c) 2012-2020, <NAME>, Facebook, Inc. * * You can contact the author at : * - xxHash homepage: http://www.xxhash.com * - xxHash source repository : https://github.com/Cyan4973/xxHash * * This source code is licensed under both the BSD-style license (found in th...
ALGO
0.982797
5.679066
{ "github_metadata": { "branch": "main", "commit_count": 59407, "repo_created_at": "2018-06-26T15:04:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 31074, "forks": 2450, "issues": 412, "pull_requests": 112 }, "file_meta": { "content_id":...
7aba9e69-7dfc-426b-8c24-60978daa6098
verrka/alg.lab
DSU_3/DSU/DSU.cpp
#include "DSU.h" #include <iostream> using namespace std; int p[100000]; int rk[100000]; void init_dsu() { for (int i = 0; i < 100000; i++) { p[i] = i; rk[i] = 1; } } int set_find(int v) { if (p[v] == v) { return v; } else { return p[v] = set_find(p[v]); } } b...
ALGO
0.999013
4.009656
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-11-25T19:28: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": "e0858ed54ede...