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
274e9e05-c8a4-463c-9632-691906dbb4da
Monxus9/uib_uva
Tema 7/10263.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; double xm, ym; double xA, yA, xB, yB; int n; double min_dist; double xmin, ymin; bool estaDentro(double xaux, double yaux) { if ((xA >= xaux && xB <= xaux)||(xB >= xaux && xA <= xaux)) { //cout << "SI1 " << xA << " " << xaux << " " << xB ...
ALGO
0.999768
4.425477
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-06-22T13:11: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": "d315027cd959...
65dbfda3-bf7a-4e72-a9c4-82002278d32d
Piyush276/coding-
advance/seg_tree-1.cpp
#include </Users/piyush/Desktop/CP/bits/stdc++.h> // #include <bits/stdc++.h> typedef long long ll; using namespace std; #define print(x) for(auto iuiuiuiuiui:x){ cout<<iuiuiuiuiui<<" ";}br; #define print_array(array,size) for(ll i=0;i<size;i++){ cout<<array[i]<<" ";}br; #define br cout<<"\n" #define max_val 1000000...
ALGO
0.999964
5.018136
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-03-19T04:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6a1e76b14...
c76430eb-e315-4667-8cad-b6322d905e38
ltjax/decomp
source/decomp/output.cpp
#include "output.hpp" #include <algorithm> #include <limits> using namespace decomp; namespace { void writeSvgHeader(std::ostream& out, Point const& min, Point const& max) { out << R"(<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" )"; out << " ...
TOOL
0.905425
6.309073
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2015-08-02T13:40:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9102c7d9d7...
17ba990e-3692-4b22-8bf8-5ebed368d630
glebmk/eth-algolab-2018
problems_of_the_week/Suez/main.cpp
#include <iostream> #include <cassert> #include <CGAL/QP_models.h> #include <CGAL/QP_functions.h> #include <CGAL/Gmpq.h> using namespace std; typedef CGAL::Gmpq ET; typedef CGAL::Quotient<ET> SolT; typedef CGAL::Quadratic_program<ET> Program; typedef CGAL::Quadratic_program_solution<ET> Solution; struct P { long x,...
ALGO
0.999568
3.833447
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-01-30T15:58:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e96d70f5f...
02536c40-3b64-4abc-916d-b4416f65cda7
mateuszpsnik/Sieci--STP
files_manipulation.cpp
#include <fstream> #include <cstdlib> #include <ctime> #include "files_manipulation.hpp" using std::cin; using std::cout; using std::endl; using std::fstream; using std::string; void generate_text_file() { int num_of_edges, num_of_vert, max_weight; cout << "Enter the number of vertices: "; cin >> num_of_vert; c...
TOOL
0.939027
5.184068
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-12-15T08:31: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": "647bde8c4...
c1f712f7-f27f-4e50-9b85-caf88ec1b995
Kitware/iMSTK
Source/Geometry/Implicit/imstkSignedDistanceField.cpp
/* ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK) ** iMSTK is distributed under the Apache License, Version 2.0. ** See accompanying NOTICE for details. */ #include "imstkSignedDistanceField.h" #include "imstkDataArray.h" #include "imstkImageData.h" #include "imstkLogger.h" namespace imstk...
ALGO
0.985641
7.059629
{ "github_metadata": { "branch": "master", "commit_count": 4139, "repo_created_at": "2021-09-20T17:10:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66dbf8...
78dbcc7d-48d0-4719-b288-3c28a111dea3
c21/Leetcode
medium/105*.3 Longest Substring Without Repeating Characters.cpp
/* Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the length of 1. */ class Solution { public: int lengthOfLongestSubst...
ALGO
0.999768
4.450203
{ "github_metadata": { "branch": "master", "commit_count": 309, "repo_created_at": "2015-09-28T15:32: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": "2dce9e46...
8cbcba37-ba78-4498-8dd2-d5d7b35d45d4
WolfireGames/overgrowth
Libraries/glm-0.9.4.2/glm/gtx/euler_angles.hpp
/////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentatio...
ALGO
0.95852
7.169888
{ "github_metadata": { "branch": "main", "commit_count": 193, "repo_created_at": "2022-03-08T09:38:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2697, "forks": 274, "issues": 64, "pull_requests": 21 }, "file_meta": { "content_id": "814b...
f6a5b1e3-1aec-44f2-a753-10ac7ad75b4b
otherlab/geode
geode/geometry/BoxTree.h
//##################################################################### // Class BoxTree //##################################################################### // // BoxTree represents a bounding box hierarchy as a complete binary tree, with // leaves containing a user-specified number of primitives. // // We store th...
ALGO
0.991575
7.272663
{ "github_metadata": { "branch": "master", "commit_count": 1586, "repo_created_at": "2012-08-20T03:26:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 86, "forks": 23, "issues": 53, "pull_requests": 3 }, "file_meta": { "content_id": "c3f66...
ff3fbe5e-070e-42f1-b34f-4f449be35a66
christiannlam/CannonShot
game.cpp
#include <iostream> #include <random> #include <cmath> #include "game.h" using namespace std; // CONSTANT VARIABLES int TIME_COMPONENT = 2; int POWDER_VELOCITY = 30; double GRAVITY = 9.81; double PI = 3.141592653589793238463; int RADIANS = 180; // Method to Validate User Input of Positive Seed int getSeed() { int s...
ALGO
0.993329
4.242097
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-01-10T01:19: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": "eb7e35066057...
2e023a5c-8331-4235-b0c8-0833b5da9d80
wishi353/OOPs
C++/c-template-function-swapping/main.cpp
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run a...
ALGO
0.999719
5.627302
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-07-23T07:45: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": "b7af15a514...
d2981327-b507-461f-a52f-9d34da12cf8a
paivaskrt/Algoritmos-I
MAT - Determinante e transposta.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { double M[2][2]; // Matriz 2x2 double determinante; // Leitura dos 4 números reais e armazenando na matriz M for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { cin >> M[i][j]; } } // ...
ALGO
0.999943
5.442327
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-09-08T07:29: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": "bccb557618c...
b8d8f37d-3b5c-40e5-9adf-884b9b34bfdf
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/04/0423/personal_submission/cf922d_xylu.cpp
#include <bits/stdc++.h> int main() { int n, cnths = 0; long long ans = 0; std::cin >> n; std::vector<std::string> ss(n); std::vector<int> cnth(n, 0), idx(n, 0); iota(idx.begin(), idx.end(), 0); for (int i = 0; i < n; i++) { auto &s = ss[i]; std::cin >> s; cnth[i] = ...
ALGO
0.992261
4.102644
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "663f...
4a6df4b0-c2cf-4aa9-82d5-2eba5311f93c
jitesh-singla/DSA-3rd-semester-
assignment_02.cpp
// Name: <NAME> // Sid : 21105068(ECE) // 2nd Assignment (Cicrular linked list) // **********************************************************************************************************************// #include<iostream> using namespace std; struct node { int data; node * next; }; class circular_linked_...
ALGO
0.998591
4.687219
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-09-25T16:42: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": "ad7d8ac4c870...
2420fe2a-a89f-427d-81bb-bb2571603bb7
Uzer447/Code
Codeforces/Different Divisors.cpp
#include <bits/stdc++.h> #define rep(I, N) for (int I = 0; I < (N); ++I) #define endl "\n" #define ll long long #define pb push_back #define pii pair<int, int> #define vall(X) (X).begin(), (X).end() #define vi vector<int> #define vll vector<long long> #define yes cout << "YES\n"; #define no cout << "NO\n"; #define prin...
ALGO
0.999881
4.208003
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2023-02-19T15:47: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": "862f9b01d2e...
33640461-3200-4ed6-ada6-859269e01a34
raincross7/code-similarity
codes/train_code/problem371/problem371_447.cpp
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main(void){ string s; cin >> s; int n = s.size(); bool ok = true; int a = n / 2; rep(i,a) if(s[i] != s[n-1-i]) ok = false; int b = (n-1)/2; int c = b / 2; re...
ALGO
0.999973
3.303273
{ "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": "08f2515f6ba2...
f09d5d5b-c677-4e61-bc33-3919cbdfe463
sohagcse07/Graph-theory
DFS/tast.cpp
//In the name of ALLAH // Insallah one day success will be your #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int,int> pii; typedef pair<double, double> pdd; typedef pair<ll, ll> pll; typ...
ALGO
0.998888
4.017641
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-05T04:39: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": "1a45b33879b6...
d2bef5a4-7ffa-4692-ac28-e1b2516b79fa
fishy15/competitive_programming
oi/usaco/train/ch2/2.3_all/concom.cpp
/* ID: aaryan.1 TASK: concom LANG: C++11 */ #include <iostream> #include <fstream> #include <vector> #include <utility> #include <algorithm> using namespace std; struct node { bool solved; bool queue; int index; vector<int> owns; node(int i) { index = i; solved = false; queue = false; owns = vector<int...
ALGO
0.999883
3.927988
{ "github_metadata": { "branch": "master", "commit_count": 1058, "repo_created_at": "2019-02-21T11:46:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6023b...
8217baff-77d3-4b3a-8819-b851be23ab71
Hengle/misc_microsoft_gamedev_source_code
misc_microsoft_gamedev_source_code/misc_microsoft_gamedev_source_code/extlib/havok/Source/Physics/Collide/Filter/Group/hkpGroupFilter.cpp
/* * * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's * prior written consent.This software contains code, techniques and know-how which is confidential and proprietary to Havok. * Level 2 and Level 3 source code contains trade secrets of ...
TOOL
0.923508
6.753827
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-30T07:02:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30bbcfeac4...
20ff864c-fc09-459f-977d-3862a49de3d9
networkit/networkit
include/networkit/algebraic/algorithms/AlgebraicPageRank.hpp
/* * AlgebraicPageRank.hpp * * Created on: Jun 20, 2016 * Author: <NAME> (<EMAIL>) */ #ifndef NETWORKIT_ALGEBRAIC_ALGORITHMS_ALGEBRAIC_PAGE_RANK_HPP_ #define NETWORKIT_ALGEBRAIC_ALGORITHMS_ALGEBRAIC_PAGE_RANK_HPP_ #include <networkit/auxiliary/Parallel.hpp> #include <networkit/centrality/Centrality.hpp> #...
ALGO
0.999956
6.750346
{ "github_metadata": { "branch": "master", "commit_count": 9146, "repo_created_at": "2017-02-04T13:04:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 811, "forks": 235, "issues": 23, "pull_requests": 24 }, "file_meta": { "content_id": "bc...
4f3e52e9-1248-444b-a2b9-d160472d207d
YTTRIUM398890585/UWB_RTLS
anchor_tag/src/UWB_TAG_ANCHOR/multilateration.cpp
#ifdef IS_TAG #include "UWB_TAG_ANCHOR/multilateration.h" // TODO: error handling for the case of not enough anchors, or colinear anchors /** * @brief compute the position of the tag using multilateration * * @param mul_data linked list of anchors * @param debugPrints to print debug information * @return Eigen:...
ALGO
0.995534
4.905151
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-08-30T04:07:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f885661f01c...
e9e343e5-a5b8-45f4-9198-74f050fede5d
JeongJongMun/Algorithm
백준/Silver/1697. 숨바꼭질/숨바꼭질.cc
#include <bits/stdc++.h> using namespace std; #define MAX 100000 #define MIN 0 vector<int> dist(MAX + 1); vector<int> edge[MAX + 1]; bool visited[MAX + 1]; void bfs(int start) { queue<int> q; q.push(start); dist[start] = 0; visited[start] = true; while (!q.empty()) { int c_node = q.front(); q.pop(); for ...
ALGO
0.999915
3.905188
{ "github_metadata": { "branch": "main", "commit_count": 469, "repo_created_at": "2023-05-11T05:06:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6652020200...
561fed4b-7f25-43ba-92ff-2ed2b13d6c8f
Amundeep-Dhaliwal/Numbers_Guess
TripleX.cpp
#include <string> #include <iostream> #include <ctime> using namespace std; void PrintIntroduction(int Difficulty) { cout << "You forgot the pass code to access your "<<6 - Difficulty<<" water bottle(s)!"<<endl; cout<<"You need to enter the correct 3 digit permutation(s) to quench your thirst!"<<endl; cout...
ALGO
0.991482
3.351048
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-07-11T21: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": "215b1bd618...
567a7dec-9e8e-46a0-877b-b0857baaf759
xzben/GameFrame
client/GameClient/frameworks/runtime-src/Classes/network/MemoryPool.cpp
#include "MemoryPool.h" #include <cassert> #include <cstdlib> typedef unsigned int uint32; typedef int int32; //basic memory node structure struct apr_memnode_t{ uint32 magic; //用于标记这个内存块是内存池申请的 apr_memnode_t *next; //指向下一个内存空间节点 apr_memnode_t **ref; //指向当前内存空间节点 uint32 index; //当前内存空间节点的总共内...
TOOL
0.955866
5.658586
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2014-12-06T03:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 24, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d69b00...
f42acd2d-7441-4a41-89a9-124306ef1cae
dscmsit/Problem-Solving-in-any-Language
leetcode/N-queens2.cpp
// 52. Leetcode [Backtracking, Recursion] #include <bits/stdc++.h> using namespace std; class Solution { private: bool isSafe(int row, int col, vector<vector<bool>> &grid, int n) { // check if the column had a queen before. for (int i = 0; i != row; ++i) if (grid[i][col] == 1) ...
ALGO
0.999997
6.304744
{ "github_metadata": { "branch": "main", "commit_count": 454, "repo_created_at": "2022-10-03T18:37:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 64, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "495ae07976...
6578aabf-684f-4a90-9df7-c786918ea5c9
cusplibrary/cusplibrary
cusp/ell_matrix.h
/* * Copyright 2008-2014 NVIDIA Corporation * * 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...
TOOL
0.904817
6.613692
{ "github_metadata": { "branch": "main", "commit_count": 1316, "repo_created_at": "2012-08-24T01:13:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 415, "forks": 134, "issues": 33, "pull_requests": 6 }, "file_meta": { "content_id": "228aa...
615f9ca9-08c9-43af-b8d0-3330722b3405
muhamad-hammad/DSA_LABS
LAB 03/taska1.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; Node(int data) { this->data = data; next = NULL; }; }; class singlyLL { private: Node *head; public: singlyLL() { head = NULL; } ~singlyLL() { Node *current = head; ...
ALGO
0.999696
5.444407
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-10-14T14:37:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "273f5836e83...
ae7a0535-f4c1-4619-8eed-bbb91405a888
raincross7/code-similarity
codes/train_code/problem269/problem269_179.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define ii pair<int,int> #define fi first #define sc second #define all(x) (x).begin(),(x).end() void MAIN() { int n, m; cin >> n >> m; vector<string> s(n + 1); for (int i = 1; i <= n; i++) { cin >> s[i]; s[i] = "-" + s[i]; } st...
ALGO
0.999858
3.950968
{ "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": "48b39a8c43a5...
225e130e-255e-44d8-a441-ab9dec2e1b15
KDE/kolena
mln/metal/math/sqrt.hh
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) // // This file is part of Olena. // // Olena is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free // Software Foundation, version 2 of the License. // /...
ALGO
0.999647
6.008284
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-09-18T16:04:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c35a107a30...
58582df7-44c1-45f7-a7a4-5dcddae69431
nanmenkaimak/ADS-2022
labs/lab10/d.cpp
#include <bits/stdc++.h> using namespace std; bool w[5000]; int n, m, que; int bfs(vector <int> v[], int x){ if(w[x]){ return 0; } int d[n + 1] = {-1}; bool visit[n + 1] = {false}; queue <int> q; q.push(x); d[x] = 0; visit[x] = 1; while(!q.empty()){ int t = q.f...
ALGO
0.999913
4.091496
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-09-10T10:15: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": "1272e52643a...
3ec9ba6d-01e1-430c-ad64-cd040e18d371
vladimirslav/leetcode-tasks
leetcode/GraphBellmanFord.cpp
#include "GraphBellmanFord.h" #include <iostream> using namespace std; const int UNDEFINED_DIST = 9999999; void Solution::fillDistances(vector<vector<int>>& edges, int distances[], int n) { for (int i = 1; i < n; i++) { for (auto edge : edges) { int start = edge[0]; int end = edge[1]; int weight = edg...
ALGO
0.99997
5.754757
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-07-25T16:33:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a81ef0cf44d3...
804b735c-aa0f-4fcf-b288-e15aac988c2f
EnnLTNKN/CSES
CountingTilings.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define int long long typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> rbTree; const int mod = 1e9 + 7, maxn = 20; int f[2...
ALGO
0.999986
3.925428
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-07-20T03:04: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": "0477970c20e8...
93997882-3597-43a5-a0c0-387807f5bed7
devendra-kumawat-05/DSA--Cpp-
033_Recursion-3.cpp
#include<iostream> using namespace std; // *** is Sorted or not using recursion *** bool isSorted(int arr[], int size){ // base case if(size == 0 || size == 1) return true; if(arr[0] > arr[1]){ return false; } else{ bool remainInput = isSorted(arr+1, size-1); return remainInput; } } int main...
ALGO
0.999535
5.264633
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2024-08-02T17:16:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "092fd230738...
6e2bb8cb-39e3-4bf0-9925-db2c71428bd0
swacisko/CODES
Archi/spoj parabole 12991 ACC.cpp
//#include<stdio.h> #include<iostream> #include<vector> //#include<string> //#include<map> //#include<complex> //#include<stack> //#include<list> //#include<bitset> //#include<set> //#include<iterator> #include<cmath> //#include<queue> //#include<time.h> //#include<string.h> //#include<fstream> //#include<sstream> #inc...
ALGO
0.999856
4.053545
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-11-07T14:21: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": "7d809d75e4...
3d7e0fa4-e031-442d-b2cd-caa8a3e87518
Haribala-09/hyprdots
User/History/6d0f051/hSzd.cpp
#include <bits/stdc++.h> using namespace std; const int MOD = 998244353; const int MAX_A = 1e6 + 1; const int MAX_N = 2e5 + 1; vector<int> divisors[MAX_A]; long long dp[MAX_N]; void precomputeDivisors() { for (int i = 1; i < MAX_A; i++) { for (int j = i; j < MAX_A; j += i) { divisors[j].push_...
ALGO
0.999961
5.662534
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-17T14:25: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": "c4cb777b4107...
f9d27d59-7427-4dbd-8f71-7f920e095057
muschellij2/osirix
ITK180/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
ALGO
0.959306
6.632339
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-07-17T19:45: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": "b5f4d16f3e...
f476a2a0-8b8e-4fe9-ba4a-8e57300e2f35
sarowar-al-amin/Basic-Data-Structure---its-related-problem
adjacencyMatrix.c++
// DFS algorithm implementation using adjacency matrix #include<bits/stdc++.h> #define white 1 #define grey 2 #define black 3 using namespace std; // Global variable int node, edge; int Time = 1; // 'time' is a default keyword. // Global array int startTime[80]; int stopTime[80]; int color[80]; int adj[80][80]; // ...
ALGO
0.999718
3.796126
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2020-11-23T13:24: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": "45209651aac...
9678e68b-49e5-4c75-984c-d88fcdf06d07
sanyukta111/-6companies30days
Amazon/Phone Directory.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<string>> displayContacts(int n, string contact[], string s) { int i; string t = ""; vector<vector<string>> ans; for (i = 0; i < s.size(); i++) { t += s[i]; vector<string> v; set<string> st; for (int j = 0;...
ALGO
0.999969
3.520942
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2022-01-05T05:30:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ee4e6bb216...
6321e62b-102b-4e79-b629-cd9e587bfef3
kzvd4729/Problem-Solving
codeforces/C - Vulnerable Kerbals/Wrong answer on test 3 (7).cpp
/**************************************************************************************** * @author: kzvd4729 created: Apr/28/2020 14:18 * solution_verdict: Wrong answer on test 3 language: GNU C++14 * run...
ALGO
0.99999
3.023866
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-02-01T09:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "233259e7120...
d143ead1-ed1d-43cc-a186-a546136b37c4
zzctommy/public-source-code
码库/CF1280B Beingawesomeism.cpp
#include<bits/stdc++.h> using namespace std; #define rint register int //#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++) //char buf[1<<21],*p1=buf,*p2=buf; inline int rd() { int x=0,f=1;char ch=getchar(); while(!isdigit(ch)) {if(ch=='-')f=-1;ch...
ALGO
0.999921
4.277484
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2020-07-06T05:01:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d9b9f199...
15495fff-11e0-46e2-9a45-12c8cd75482f
brahmsjiang/Exe_Cplspls
sword to offer/14.cpp
#include <iostream> using namespace std; int maxProductAfterCutting1(int length) { //length stands for original max length if (length < 2) return 0;//1*0 if (length == 2) return 1; if (length == 3) return 2; //products[i] stores sub rope's max product,whose original length is equal to i int* products = n...
ALGO
0.999743
3.871294
{ "github_metadata": { "branch": "master", "commit_count": 353, "repo_created_at": "2018-01-09T15:18: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": "dfd64eae...
a79b8e2b-8efb-4f11-a912-3e59631088cf
KN-2018-Praktikum/up-problems-groups-1-2
exercise-02/problem04.cpp
#include<iostream> using namespace std; int main() { int a, b, c, k; cin >> a >> b >> c >> k; int maxDigit = -1; if (k == 1) { a /= 100; b /= 100; c /= 100; } else if (k == 2) { a = (a % 100) / 10; b = (b % 100) / 10; c = (c % 100) / 10; } else...
ALGO
0.999865
3.817035
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2018-10-07T15:54:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e55ff8a953...
03165fb8-38e8-47a4-bd43-73648e42324a
DimitrijeDobrota/leetcode
Problems/0468.cpp
class Solution { static string valid4(const string &s) { stringstream ss(s); string crnt; int cnt = 0; while (getline(ss, crnt, '.')) { if (size(crnt) == 0 || size(crnt) > 3) break; if (any_of(begin(crnt), end(crnt), [](char c) { return isalpha(c); })) break;...
ALGO
0.997042
5.928147
{ "github_metadata": { "branch": "master", "commit_count": 851, "repo_created_at": "2022-12-05T18:50:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "841dfdfd...
568b5170-2aaf-4fed-bc43-60240badef6d
rgoermer/dealt
inc/poisson_neumann.h
/* * poisson_neumann.h * * Created on: 29.03.2023 * Author: goermer */ #ifndef INC_POISSON_NEUMANN_H_ #define INC_POISSON_NEUMANN_H_ #include <memory> #include <utilities.h> #include <ts_triangulation.h> #include <tspline_function.h> #include <isoparametric_function.h> #include <deal.II/base/convergence...
ALGO
0.909379
6.139887
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2024-06-18T08:57:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "d8d45a00c4...
723091ed-aa21-48bb-90c2-b6649d2fbbe2
kwek1/modbus-arduino-tool
arduino code/water_flowmeter/water_flowmeter.ino
unsigned long highTime; //integer for storing high time unsigned long lowTime; //integer for storing low time float avg_p; // integer for storing period float freq; //storing frequency int itr = 10; void setup() { pinMode(11,INPUT); //Setting pin as input Serial.begin(9600); } void loop()...
TOOL
0.974964
5.667368
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-07-05T04: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": "c7f7f1a66b7f...
07537be3-5b60-46ed-ba13-6542efdacecf
arjun-mittu/data-structures
coding blocks/trees/left_view.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int data; node *left; node *right; node(int d) { data = d; left = NULL; right = NULL; } }; node *build() { int d; cin >> d; queue<node *> q; node *root = new node(d); q.push(root); ...
ALGO
0.99995
3.854708
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2020-05-09T18:20:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da3b18c73...
adeb9be6-72a0-4242-9b3c-3b156224dbda
Feroz455/Fundamentals-Of-Computer-Algorithms
Chapter_02/ALGORITHM/Algorithm_2-02.cpp
/* Page 82 Algorithm 2.2 Linked representation of a stack //Type is the type of data node = record { type data; node *link; } Algoithm Add(item) { // Get a new node temp = new node; if(temp != 0) then { temp->data := item; (temp->link) := top; top := temp; re...
ALGO
0.998988
3.677896
{ "github_metadata": { "branch": "main", "commit_count": 359, "repo_created_at": "2022-03-08T05:55: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": "f77701e535...
9d325db8-476d-4421-9263-bd45754447c9
sptzxbbb/Practice
LeetCode/Algorithms/c++/Largest Number/Largest Number.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; class Solution { public: string largestNumber(vector<int>& nums) { sort(nums.begin(), nums.end(), cmp); string rst; for (int a : nums) { rst += to_string(a); } retur...
ALGO
0.999941
5.501938
{ "github_metadata": { "branch": "master", "commit_count": 358, "repo_created_at": "2015-05-02T03:51:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b37836b4...
e459071d-f716-4f3f-a51b-add7a3252c07
mtai000/RayTracing
RayTracingNextWeek/ConstantMedium.h
#pragma once #include "rtweekend.h" #include "Hittable.h" #include "Material.h" #include "Texture.h" //like a light fog or smoke class ConstantMedium :public Hittable { public: ConstantMedium(shared_ptr<Hittable> boundary, double density, shared_ptr<Texture> tex) : mBoundary(boundary), neg_inv_density(-1 / densit...
ALGO
0.946178
4.757142
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-07-15T15:17: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": "007b8f92346...
4f6e41b4-26c0-4698-8ccf-b8548acc3adb
ykdy3951/Baekjoon
1339.cpp
#include <bits/stdc++.h> using namespace std; #define fio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define endl '\n' #define ll long long #define INF 987654321 #define sc1(a) scanf("%c", &a) #define ss1(a) scanf("%s", s) #define sd1(a) scanf("%d", &a) #define sd2(a, b) scanf("%d %d", &a, &b) #define sd3(a, b,...
ALGO
0.999943
3.959147
{ "github_metadata": { "branch": "main", "commit_count": 815, "repo_created_at": "2020-12-20T10:17: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": "3874b307fe...
6003df67-fa12-4736-a51b-b49b764f92bd
donnatamara/Teori-Struktur-Data-Assigment
CPMK 2/SubCPMK 5/Soal 1.cpp
#include <iostream> using namespace std; // Definisi node untuk single linked list struct Node { int data; Node* next; Node(int val) : data(val), next(nullptr) {} }; // Fungsi untuk menambahkan node baru di akhir linked list void append(Node*& head, int data) { if (!head) { head = new Node(da...
ALGO
0.999223
5.530576
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2024-05-13T15:56: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": "cd0e8b3d315...
dcfe51d9-53cc-4501-9e89-f5926770e20c
webgeekhabib007/MyCompetitiveProgrammingTemplate
codeforces/Seraphim the Owl.cpp
//Problem Name : <NAME> //Solver : Codecrasader036 //Date : 2024-03-20 //////////////////////////////////////////////////////////////////////// //OOOOOOOOOOOOOOOOOOOOOOOkxdoollooooooollodkkOOOOOOOOOOOOOOOOOOOOOOOOO// //OOOOOOOOOOOOOOOOOOOkdoc:::ccccccccccccc:::clodxkOOOOOOOOOkOOOOOOOOOO// //OOOOOOOOOOOOOOkxdlc:::cld...
ALGO
0.999991
4.340467
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2023-12-16T13:47: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": "3d0cbf30c6a...
16cf2496-d25f-4dac-92e1-7c2b47fdeb47
danepowell/openhaptics
usr/include/HDU/hduMatrix.h
/***************************************************************************** Copyright (c) 2004 SensAble Technologies, Inc. All rights reserved. OpenHaptics(TM) toolkit. The material embodied in this software and use of this software is subject to the terms and conditions of the clickthrough Development License Agr...
ALGO
0.962429
5.849664
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-07-16T17:07:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af14475c...
b9126d59-61c9-438d-9060-c7e0caa8f134
yeohj0710/BOJ-solutions
백준/Silver/29721. 변형 체스 놀이 : 다바바(Dabbaba)/변형 체스 놀이 : 다바바(Dabbaba).cc
#include <bits/stdc++.h> #define int long long using namespace std; int32_t main() { cin.tie(0)->sync_with_stdio(0); int N, M; cin >> N >> M; unordered_map<int, unordered_map<int, bool>> m; vector<pair<int, int>> v(M); for(int i=0; i<M; i++) { cin >> v[i].first >> v[i].second; m...
ALGO
0.999951
3.545267
{ "github_metadata": { "branch": "main", "commit_count": 5765, "repo_created_at": "2022-04-05T01:21:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f0fe331d...
21fe438b-eb39-491f-90a2-78545b825520
thnhun/23520584_BT06
23520584_BT06(1)/Bai289/Bai289.cpp
#include <iostream> #include <ctime> #include <cstdlib> #include <iomanip> using namespace std; void DichTraiDong(float a[][100], int m, int n, int d) { float temp = a[d][0]; for (int j = 0; j <= n - 2; j++) a[d][j] = a[d][j + 1]; a[d][n - 1] = temp; } void DichTrai(float a[][100], int m, int n) { if (m == 0) ...
ALGO
0.999384
3.067056
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-11-26T16:33:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7774950d38be...
3956b76e-af90-4c4a-8222-5b2af69119a4
manojr-12/AcademicStorage
CPP/tempClass.cpp
#include <iostream> using namespace std; template <typename T> class arrayClass { T *ptr; int size; public: arrayClass(T arr[], int n); void bubbleSort(); void printArr(); }; template <typename T> arrayClass<T>::arrayClass(T arr[], int n) { ptr = new T[n]; size = n; for(i...
ALGO
0.998578
3.785157
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-01-26T03:28: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": "a7a67350e1d1...
fb1dd059-7337-44ba-9196-c221bda93b4d
simoncchu/SVHapCaller
bam_parse.cpp
#include"bam_parse.h" #include<iostream> #include <algorithm> using namespace std; BamParse::BamParse(string filename) { this->filename=filename; this->filename_index=filename+".bai"; min_read_length=500; max_read_length=0; insert_size=0; std_variation=0.0; } BamParse::BamParse(vector<string>*& listname) { t...
DATA
0.94253
3.786403
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2013-11-10T23:48: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": "1b282c507b...
c3fb6050-e204-4eea-9a63-dc4f2a4c4506
nyanshell/Gestapolur-Code-Storage
1105/gcj0.cpp
//GCJ 2011 QR a #include<fstream> #define MAXN 205 using namespace std; ifstream cin("A-large.in"); ofstream cout("ans.out"); int n,t; int s[ MAXN ],turn[ MAXN ]; int pa,pb,na,nb,tot; int main() { int i,tt; bool ea , eb; char ch; cin>>t; tt = t; while(t > 0) { cin>>n; tot = 0 ;pa = pb = n...
ALGO
0.999856
3.270047
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2011-10-31T16:35: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": "b20f4fc53...
acbd81b4-3075-408b-9ec8-9bb936543025
Fergomez0901/PED
Guia de Ejercicios 1/Ejercicio7.cpp
#include <iostream> #include <string.h> using namespace std; void poblarArr(int size, char cadena[]) { for(int i = 0; i < size; i++) { cout << "Ingrese la letra no. " << i+1 << " :"<< endl; cin >> cadena[i]; } } void buscar(char word[], int size, char l) { for(int i = 0; i < size; ...
ALGO
0.995138
3.189853
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-09-30T15:52: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": "aeec88dc5...
bb524032-38d6-4dee-8e7f-c51f024ff862
shaillyb17/blind-75-leetcode
tree/add&searchWord.cpp
#include <iostream> #include <algorithm> using namespace std; class Trie { public: Trie* next[26] = {}; bool isWord; Trie() { isWord = false; } }; class WordDictionary { Trie* root = new Trie(); bool search(const char* word, Trie* node) { for(int i = 0; word[i] && node; i+...
ALGO
0.99859
4.983892
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-07-05T14:12:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "163a28c67976...
dbb3dab6-ec4d-4f7e-bc4b-d8a0f1c49684
hentg089/HeapDesign
binheap.cpp
// binheap.cpp implementation file for binary heaps #include "binheap.h" #include <iostream> #include <iomanip> // Utility routines used to implement binary heaps and heapSort int parent ( int i ) { return i/2 ; } int left ( int i ) { return 2*i ; } int right ( int i ) { return 2*i + 1 ; } void BinHeap :: minHe...
ALGO
0.999851
5.047136
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-02-19T23:06: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": "8791dd4efd...
486bd6f0-e3f0-489a-8b9b-8be707dd33fe
369Saur/Codeforces
A_Eleven.cpp
#include<bits/stdc++.h> using namespace std; #define int long long string solve(){ int n ; cin >> n ; if(n == 1) return "O" ; if(n == 2) return "OO" ; vector<int> v(n,0) ; v[0] = 1 ; v[1] = 2 ; int i = 0 , j = 1 , k = 1 ; while(i+j+1 < n){ v[i+j+1] = v[i]+v[j] ; j = i+j+...
ALGO
0.999926
3.495738
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-10-13T06:07: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": "b526918857bc...
0b43fc23-68a3-430c-9588-be13947042c2
anipatil72/My_Competitive_Programming
655.cpp
// ॥ श्री गणेशाय नमः ॥ #include <bits/stdc++.h> using namespace std; 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) : v...
ALGO
0.999916
4.762068
{ "github_metadata": { "branch": "main", "commit_count": 171, "repo_created_at": "2023-04-02T04:50: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": "0aec5f1c51...
4fd20c66-b103-45fa-8725-0ac2c417c60a
Pratham274/CPP-DSA
correctarmstrong.cpp
#include <iostream> using namespace std; int countdigit(int n) { int count = 0; while (n) { count++; n /= 10; } return count; } int power(int base, int exp) { int result = 1; for (int i = 0; i < exp; i++) { result *= base; } return result; } bool armstrong(int ...
ALGO
0.999977
5.067797
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-13T06:42: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": "b0df14c3539c...
7f5314a7-9dfd-435e-997a-c0e98b9b710b
Reem1816/Assignment2_Programming1
Arabic and roman numbers.cpp
#include <iostream> using namespace std; // FCI – Programming 1 – 2018 - Assignment 2 // Program Name: Arabic and Roman numbers.cpp // Last Modification Date: 2/3/2017 // Author1 and ID and Group: Reem 20140127 G21 // Author2 and ID and Group: Ezzat 20140173 G21 // Author3 and ID and Group: Mohand 20140280 G22 // ...
ALGO
0.995847
3.970772
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-03-28T13:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "357f4647d8...
3c7940fb-04a2-4c19-921b-95ad492f7483
hsarasan/hs-code
leetcode/c++/random/leetcode_234.cpp
/* 234. Palindrome Linked List Given the head of a singly linked list, return true if it is a palindrome or false otherwise. */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(null...
ALGO
0.998959
6.066376
{ "github_metadata": { "branch": "main", "commit_count": 490, "repo_created_at": "2023-11-22T16:04: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": "eca13ab10e...
8111f780-e1f4-485d-aafe-a60a620d5118
axelsr042000/Genetic-algorithm-for-Portfolio-Selection
DataUtils.cpp
#include "DataUtils.hpp" void DataUtils::computeSTD() { if (this->returns.empty()) { this->std = 0.0; // No returns available } else { // Calculate standard deviation double std = 0.0; for (double ret : returns) { std += pow(ret - this->mean, 2); ...
ALGO
0.982568
5.543601
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-06-06T12:04: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": "fb31d651101f...
732b13e0-c85f-4c2d-9095-da5c4c2f0271
BonexGoo/Boss2D
Boss2D/addon/wav2letter-0.2_for_boss/src/criterion/attention/LocationAttention.cpp
/** * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include "criterion/attention/LocationAttention.h" using namespace fl; namespace w2l { SimpleLoca...
ALGO
0.99952
7.054271
{ "github_metadata": { "branch": "master", "commit_count": 443, "repo_created_at": "2019-07-18T01:44:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 3, "issues": 7, "pull_requests": 2 }, "file_meta": { "content_id": "f6d14ef...
1b1df889-a427-4486-a9fa-bd17d5e3cf49
ishandutta2007/codeforces-c
cdkrot/normal/1045/I.cpp
// <NAME> (2019) #include <bits/stdc++.h> using std::cin; using std::cout; using std::cerr; using std::vector; using std::map; using std::array; using std::set; using std::string; using std::queue; using std::pair; using std::make_pair; using std::tuple; using std::make_tuple; using std::get; using std::min; usin...
ALGO
0.999429
4.210941
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17: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": "a2ffd4afa392...
dc1a8639-ee4e-48ea-bf55-bb6e5f9c6492
csyouk/Cpp
workshop-materials/뇌를자극하는cpp프로그래밍_source/Hanbit_Source/06_Operators/01/example.cpp
#include <iostream> using namespace std; int main() { // 계산에 사용할 값 정의 int a = 8; int b = 4; // 사칙 연산을 한다. int c = a + b; // 덧셈 int d = a - b; // 뺄셈 int e = a * b; // 곱셈 int f = a / b; // 나눗셈 // 나머지 연산을 한다. int g = a % b; // 나눗셈의 나머지 // 결과 출력 cout << "8 + 4 = " << c << "\n"; cout << "8 - 4 = " << d << "...
TOOL
0.960024
3.851269
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2017-10-29T23:13: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": "54f119271...
cb3e8bce-3d8a-4721-9086-638364eb618c
study84/mdpu
Курс_1/C++/Семестр-2/C1S2_Lab_8_t4.cpp
#include <windows.h> #include <iostream> #include <format> #include <string> //#include <iomanip> using namespace std; int nod_test(int a, int b); int nod(int a, int b); int main() { SetConsoleOutputCP(1251); cout << "Варіант 8" << endl; cout << "Напишіть функцію на мові C++ для знаходження НСД(найбіл...
ALGO
0.995592
4.617807
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2023-12-10T15:08: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": "3df6948983d...
f34bda31-e5e5-4360-93be-cabd56f7cdfa
Abhishek-Mallick/LeetCode
Unequal Arrays - GFG/unequal-arrays.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; class Array { public: template <class T> static void input(vector<T> &A,int n) { for (int i = 0; i < n; i++) { scanf("%d ",&A[i]); } } template <class T> static void print(vector<T> &A) ...
ALGO
0.999984
5.533939
{ "github_metadata": { "branch": "main", "commit_count": 1119, "repo_created_at": "2022-05-27T18:58:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a95abd458...
6627cb67-589c-4bec-b284-223ea5b4ec42
goofts/topcoder
puzzles/Topcoder Arena/srms/div1/SRM 161/PermutationValues.cpp
#include <cstdio> #include <cmath> #include <cstring> #include <ctime> #include <iostream> #include <algorithm> #include <set> #include <vector> #include <sstream> #include <typeinfo> #include <fstream> using namespace std; class PermutationValues { public: vector<int> getValues(vector<int> lows, vector<int> ...
TEST
0.997956
4.458633
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-12-16T01:54: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": "4287db0e9222...
e2ef6a7f-ad37-4d45-b84a-9c4d0ebf6759
FangGet/BundleFusion_Ubuntu_Pangolin
include/FreeImage/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h
// Copyright (c) 1997 // Utrecht University (The Netherlands), // ETH Zurich (Switzerland), // INRIA Sophia-Antipolis (France), // Max-Planck-Institute Saarbruecken (Germany), // and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or // ...
ALGO
0.999789
6.152782
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-06-29T03:53:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 132, "forks": 34, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "9d63096...
7ed13648-6738-4920-b70f-d9cfa6e95981
zsmartercn/Tess4Android
tess-two/jni/com_googlecode_tesseract_android/src/arch/intsimdmatrixavx2.cpp
/////////////////////////////////////////////////////////////////////// // File: intsimdmatrixavx2.cpp // Description: matrix-vector product for 8-bit data on avx2. // Author: <NAME> // Created: Fri Aug 04 13:26:20 PST 2017 // // (C) Copyright 2017, Google Inc. // Licensed under the Apache License, Vers...
ALGO
0.98947
4.610046
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-01-16T06:00:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 12, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "8e101dd...
2547c9e7-4e24-491d-9650-e4680c193fad
drlongle/leetcode
algorithms/problem_0410/other.cpp
/* Introduction to this problem: We can break this problem into two smaller problems: Given an array (A), number of cuts (CUTS), and the Largest sum of sub-arrays (MAX). Can you use at most CUTS cuts to segment array A into CUTS + 1 sub-arrays, such that the sum of each sub-array is smaller or equal to MAX? Given a lo...
ALGO
0.999984
5.793026
{ "github_metadata": { "branch": "master", "commit_count": 1430, "repo_created_at": "2017-02-08T14:00: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": "3075c8d...
ab6561bc-d0d3-41d7-b9a7-a8aca3077ddb
elskow/CPP
CompetitiveProgramming/TLX_Toki/Random Problem/recentaction.cpp
// A. Recent Actions // time limit per test1 second // memory limit per test256 megabytes // inputstandard input // outputstandard output // On Codeforces the "Recent Actions" field shows the last n // posts with recent actions. // Initially, there are posts 1,2,…,n // in the field (this is in order from top to down...
ALGO
0.999963
5.143136
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2022-10-31T15:28: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": "520c70a9b...
052a5be2-c438-4009-965f-3ec466cf177e
sunyymq/NewBlashPlayer
NBMediaPlayer/include/NBMap.h
// // Created by parallels on 9/8/18. // #ifndef NBMAP_H #define NBMAP_H #include <NBRBTree.h> template <typename KeyType, typename ValueType> class NBMap { public: struct NBMapEntry { //Entry node KeyType first; //Entry key ValueType second; //Entry value struct ...
ALGO
0.991652
4.713185
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-10-18T02:49:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "752a06ccca...
f87546ca-a658-478b-b781-ae960a8a72df
Sunghak222/Algorithm
Codeforce/EduRound170A.cpp
#include <iostream> #include <string> #include <vector> #include <set> #include <stack> #include <cmath> #include <map> #include <queue> #include <algorithm> #include <functional> #define rep(i, j, k) for (int i = j; i <= k; i++) #define per(i, j, k) for (int i = j; i >= k; i--) #define pb push_back using namespace st...
ALGO
0.999922
4.270599
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-08-03T13:15: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": "31a3dfb2dd8d...
5adf2234-b389-4079-aed1-7d3d05aa9e1f
baimao123456/jianzhi-offer
面试题17-合并两个排序的链表.cpp
/**********************************/ //合并两个排序的链表 /**********************************/ #include "list.h" //合并两个排序的链表--递归,能处理相同的元素 template<class T> ListNode<T>* Merge_Recursively(ListNode<T>* pHead1,ListNode<T>* pHead2) { if(pHead1 == NULL) //如果链表1为空,不用合并,直接返回链表2 return pHead2; if(pHead2 == NULL) //如果链表2...
ALGO
0.999993
4.972279
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-06-09T13:47: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": "f72b11b672...
a6cb7aff-d8fb-4bf8-94f9-683c6a164f90
eder-matheus/programming_marathons
maratona_5/cacando.cpp
#include <stdio.h> #include <iostream> #include <stdlib.h> long mdc(unsigned long n1, unsigned long n2) { unsigned long r = n1 % n2; while (r != 0) { n1 = n2; n2 = r; r = n1 % n2; } return n2; } int main() { unsigned long res = 1; int buraco, num_buracos; int buracos_vector[105]; std::cin...
ALGO
0.999909
3.992135
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2021-08-29T20:32: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": "ccbd174e1...
1a248f5d-a4fd-4913-a2fb-c180094a6f39
abhishekbisht1429/uva-problems
uva10130.cpp
// // Created by reckoner1429 on 12/01/22. // #include <bits/stdc++.h> using namespace std; #define DEBUG #define _umap unordered_map #define _uset unordered_set #define _uint unsigned int #define _ll long long #define _ull unsigned _ll #define _vec vector #define _tp tuple #define _p pair #define _ignore_lines(n)...
ALGO
0.99996
4.331468
{ "github_metadata": { "branch": "master", "commit_count": 219, "repo_created_at": "2020-09-08T05:29:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6cb1dcf...
590f5645-f533-481b-9831-c23d0093687d
HaibaoM55/pbinfo
miny/main.cpp
#include <fstream> #include <algorithm> using namespace std; ifstream fin("miny.in"); ofstream fout("miny.out"); int n; int x[50005]; bool ciur[10004]; int prm[10004]; int e[10004]; int nrp = 0; long long z; int main() { fin >> n; for(int i = 2; i <= 10000; i++){ if(ciur[i] == false){ nrp++;...
ALGO
0.999803
3.541583
{ "github_metadata": { "branch": "master", "commit_count": 471, "repo_created_at": "2024-08-15T07:52:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fee04223...
345d87c0-93c3-4d37-9fcf-b1b5df97c7cf
AarushJ/competitive-programming
Online judge solutions/Spoj/KNAPSACK.cpp
#include<vector> #include<iostream> using namespace std; int f(int n,int w,int *dp,vector<int> &wt,vector<int> &val,int N,int W){ if(*(dp+W*n+w)>=0) return *(dp+W*n+w); if(n==0 || w ==0 ) return 0; if(wt[n] > w) *(dp+W*n+w)= f(n-1,w,dp,wt,val,N,W); else{ *(dp+W*n+w) = max( f(n-1,w,dp,wt,val,N,W), f(n-1,w-wt[n],dp...
ALGO
0.999977
3.482804
{ "github_metadata": { "branch": "master", "commit_count": 354, "repo_created_at": "2016-12-21T16:26:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f15de5a...
9f9051c3-94db-488a-9abe-25140da9dad3
ChemeketaCS/cs260Code
Week05/StackSamples/main.cpp
#include <iostream> #include "Stack.h" using namespace std; void solvePostFix() { Stack<int> nums; cout << "Enter a postfix expression (like \"5 6 + 10 -\") :" << endl; //Read in input, place items on stacks while(cin.peek() != '\n') { //Check to see if we have a number if(isdigit(c...
ALGO
0.981706
4.663561
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2020-03-31T16:40:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6cf29d19...
d3ac2b69-1833-4424-b9cb-cd504840d8c5
samuka105/TrabalhoED2
Etapas/Etapa2.h
/** * Universidade Federal de Juiz de Fora * Etapa2.h * Propósito: Classe que realiza a segunda Etapa do trabalho * */ #ifndef LEITOR2_H #define LEITOR2_H #include <string> #include "../Leitura/LeitorBase.h" #include "../Leitura/LeitorCovid.h" #include "../Leitura/Log.h" #include "../Ordenacao/MergeSort.h" #inc...
ALGO
0.941323
5.167402
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2020-12-19T14:25:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ff8e02d285e...
abeac8e2-abfe-426a-a269-9bc218f51a1b
X8invisible/LinkedList
LinkedList.cpp
/* * File: LinkedList.cpp * Author: <NAME> * * Last modified 29/03/2017 * Implements the LinkedList class. */ #include <string> #include <cassert> #include <iostream> #include <sstream> #include "linked_list.h" using namespace std; //creates an empty list LinkedList::LinkedList() { } //creates a list with ...
TOOL
0.982841
5.850645
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-10-29T15:10: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": "9306b7219f...
9ccec8ad-e8aa-491a-9cb9-d5025b233136
tarstars/beam_struct_vica
suffix/main.cpp
#include <iostream> #include <map> using namespace std; struct state { int len, link; map<char,int> next; }; const int MAXLEN = 100000; state st[MAXLEN*2]; int sz, last; void sa_init() { sz = last = 0; st[0].len = 0; st[0].link = -1; ++sz; /* // этот код нужен, только если автомат строится много раз для раз...
ALGO
0.999964
3.914959
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2012-04-28T07:01:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fcb4f2b0...
05979c28-2abb-4494-9b14-747b61dc181f
babayaga-13/Competitive-Programming
CSES/Introductory Problems/Digit_Queries.cpp
#include <bits/stdc++.h> #define ll long long #define endl "\n" #define yes cout << "YES" << endl #define no cout << "NO" << endl #define ln cout << endl #define all(v) v.begin(), v.end() #define count_one(x) __builtin_popcount(x) #define trailing_zero(x) __builtin_ctz(x) #define leading_zero(x) __builtin_clz(x) #defin...
ALGO
0.999493
4.744036
{ "github_metadata": { "branch": "main", "commit_count": 207, "repo_created_at": "2024-09-13T09:17: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": "71e10fd4f9...
559b96ff-e1c1-4c78-8a57-fcda39f3c524
aaiss0927/codetree-TILs
240206/벽 짚고 미로 탈출하기/escape-maze-with-wall-following.cpp
#include <iostream> #include <vector> #include <tuple> using namespace std; int n, x, y; int dx[4] = { 0, -1, 0, 1 }; int dy[4] = { 1, 0, -1, 0 }; vector<pair<int, int>> dirs; char grid[100][100]; bool is_range(int x, int y) { return (x >= 0 && x < n && y >= 0 && y < n); } bool is_right_wall(int x, int y, int i...
ALGO
0.99996
4.333592
{ "github_metadata": { "branch": "main", "commit_count": 494, "repo_created_at": "2024-01-21T16:59: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": "acc70afb62...
5369134d-8aa3-46a7-8c0e-8a76611e2881
Pradeep434680/Assignments-DSA
Assignment_5/Q-1.cpp
// assignment 5 question 1 #include<iostream> using namespace std; struct Stack { private: int index; int total_size; int *Arr; public: void create(struct Stack *s1,int n); void push(struct Stack *s1,int n); int pop(struct Stack *s1); int peek(struct Stack *s1); bool isEmpty(stru...
ALGO
0.998737
3.812724
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-10-03T09:36: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": "dd36d696f1be...
8ee8df8d-691f-4ca6-ac02-3ada57473222
mmbrites/Think-Like-A-Programmer
Chapter 2/Exercises/2-8.cpp
#include <iostream> using std::cin; using std::cout; // REMINDER: THIS CODE IS NOT "EXCEPTION PROOF". IF YOU TYPE BULLSHIT, YOU WILL GET BULLSHIT, E.G. OCTAL 3E TO HEXADECIMAL GIVES YOU BULLSHIT BECAUSE 3E IS NOT AN OCTAL NUMBER :) #define END_OF_LINE_ASCII_CODE 10 // this 'code' can vary depending on the operating s...
ALGO
0.993134
4.529624
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-09T17:52: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": "0395428b5320...
794c8c7c-0439-4e23-a0b1-175a91e85a31
kaurbhupinder/MegaCalc
MegaInt.cpp
#include "MegaInt.h" #include <iostream> #include<string> #include <deque> using namespace std; #include <sstream> #include <algorithm> //Calculate the addition of the two numbers.. MegaInt MegaInt::add(MegaInt accumulator, MegaInt input) { char sc; int z; char sa = accumulator.mega_int[0]; accumulator.mega_int.po...
ALGO
0.998966
4.239562
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-01-20T02:20:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb5b7f2dad...
9bbe5427-661f-4516-bc41-914f296d43ae
raincross7/code-similarity
codes/train_code/problem310/problem310_33.cpp
#include <bits/stdc++.h> #define F first #define S second #define mp make_pair #define pb push_back #define ll long long #define LEFT(a) ((a)<<1) #define RIGHT(a) (LEFT(a) + 1) #define MID(a,b) ((a+b)>>1) #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) //#define temo using namespace std; const in...
ALGO
0.99987
3.432707
{ "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": "ff0a9529b7a5...
41ad2a9a-3129-478d-bbd9-8032ae26bbf4
Abdullah-Al-Faheem/XPSC
week6/day1/Factory_Machines.cpp
#include<bits/stdc++.h> using namespace std; #define pi acos(-1) #define endl "\n" #define nl "\n" #define ll long long #define pb push_back #define NO cout<<"NO"<<endl #define YES cout<<"YES"<<endl #define all(x) (x).begin(), (x).end() #define rall(x) x.rbegin(), x.rend() #define fix(n) fixed<<setprecision(n) #define...
ALGO
0.999965
4.14822
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-03-16T13:21:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a5b3ffea01...
00e57538-8027-4fb2-a839-7bdfec6da5bd
Hyorm/ProblemSolving
baekjoon/algorithm_study/binarySearch/P1939/P1939.cpp
#include <cstdio> #include <queue> #include <memory.h> using namespace std; vector<pair<int, long long> > MAP[10001]; int C[10001] = {0,}; int N, M, X, Y; long long ans = 0; void bsr(long long low, long long high); bool bfs(long long mid); int main(){ scanf("%d %d", &N, &M); long long max = 0; for(int i = 0; i < M; ...
ALGO
0.999961
3.978315
{ "github_metadata": { "branch": "main", "commit_count": 208, "repo_created_at": "2021-02-07T12:52:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a66cce8545...
0eb1c553-3ca7-4276-9ddb-43a9d1598b70
g1050/Daily_2019
DataStructure/tree/tree2.cpp
#include <iostream> #include <vector> using namespace std; template <typename T> struct node { node<T> *lchild; node<T> *rchild; T data; }; template <typename T> class Tree { private: node<T> *t; int cnt0,cnt1,cnt2; vector <T> leaf; public: void createTree(node <T> *&p); void createTr...
ALGO
0.9999
3.703595
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2019-08-22T12:02: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": "8b141dbf...
c6b4b06c-d0b7-43aa-8973-eca0f270f279
gurudevsingh14/A2OJ-Ladder-Problems
32B. Borze.cpp
#include<bits/stdc++.h> using namespace std; #define loop(a, n) for (int i = a; i < n;i++) typedef long long int ll; void solve(); int main() { int t = 1; //cin >> t; while (t--) { solve(); } return 0; } void solve() { string s; cin >> s; string ans = ""; int n = s.size(); for (int i = 0; i < ...
ALGO
0.99987
3.322321
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2021-05-26T14:40: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": "d7436128a...
c25eafce-efa0-4814-8ef2-f430cf44b501
shibam-debnath/Leetcode
JumpGame.cpp
// <NAME> // May,2022 #include <bits/stdc++.h> using namespace std; #define ll long long bool canJump(vector<int> &nums) { if (arr[0] == 0) { return false; } int n = arr.size(); bool dp[n]; dp[n - 1] = true; for (int i = n - 2; i >= 0; i--) { dp[i] = false; // we...
ALGO
0.99964
4.049263
{ "github_metadata": { "branch": "master", "commit_count": 1359, "repo_created_at": "2022-05-15T07:04:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "781e2e7...
a4686baf-f13d-483b-973b-47b9e689553a
google-research/google-research
design_bipartite_experiments/exposure_design.cc
// Copyright 2025 The Google Research Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law...
ALGO
0.999644
6.781967
{ "github_metadata": { "branch": "master", "commit_count": 4832, "repo_created_at": "2018-10-04T18:42:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36026, "forks": 8143, "issues": 1061, "pull_requests": 576 }, "file_meta": { "content_id...