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
a66eef5c-d5b6-4ebe-8f06-544ed3ec1e44
ishandutta2007/codeforces-p
pllk/normal/513/G1.cpp
#include <iostream> #include <algorithm> #include <cstdio> using namespace std; int n, k; int p[100]; int q[100]; int z; void haku(int c) { if (c == 0) { int t = 0; for (int a = 0; a < n; a++) { for (int b = a+1; b < n; b++) { if (p[a] > p[b]) t++; } ...
ALGO
0.999183
3.778879
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4fae17bd20f...
3b1e7d4b-d690-4ff1-b209-678a40c26110
lianke123321/differentiation-detector-android
code/analysis_replay/plot/xput/xput.cpp
#include <iostream> #include <vector> #include <fstream> #include <cstring> using namespace std; // This will eath through white spaces. void eatspaces(istream &inp) { while(inp.peek() == ' ' || inp.peek() == '\n') inp.get(); } // Skip the rest of the line. void skipline(istream &inp) { while(inp.get() != '...
TOOL
0.92132
4.553263
{ "github_metadata": { "branch": "master", "commit_count": 1377, "repo_created_at": "2016-02-29T19:32:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9031b1...
9fd592fe-9461-4056-8db5-f9d071bf1b85
vilya/AdventOfCode-2018
day02/day02a.cpp
#include <algorithm> #include <cstdio> #include <cstring> int main(int argc, char** argv) { int twos = 0; int threes = 0; FILE* f = fopen(argv[1], "r"); char line[256] = {}; while (fgets(line, sizeof(line), f) != nullptr) { int n = strlen(line); std::sort(line, line + n); bool has_double = fals...
ALGO
0.999654
4.02577
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-01-14T11:04: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": "3cecbe3dcb...
d876203c-ad90-4dcf-ae40-697f226a402f
ishandutta2007/codeforces-l
lhic/normal/618/D.cpp
#include <iostream> #include <fstream> #include <set> #include <map> #include <string> #include <vector> #include <bitset> #include <algorithm> #include <cstring> #include <cstdlib> #include <cmath> #include <cassert> #include <queue> typedef long long ll; typedef double ld; using namespace std; const int MAXN = 300...
ALGO
0.9993
3.470526
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17: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": "3cb9e138bf59...
7f55af29-3faa-4c7d-8fc2-cc3d3e6905eb
chriswald/FaceBash
src/ArgParse.cpp
#include "ArgParse.hpp" /* * Constructor: * Sets the count to the number of arguments and copies all arguments * to to an array of strings. Does not copy the first argument, the * program name. */ ArgParse::ArgParse(int argc, char **argv) { vector<string> cmds; count = argc-1; arguments = new string[cou...
TOOL
0.922729
5.550384
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2012-08-30T03:39:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f628b6e5...
d909e6c9-4f71-4c1f-9836-4da76c537888
shangar21/pointcloud_upsampling
bolt/bilateral_smooth_src/bilateral_smooth.cpp
#include <numeric> #include <pybind11/pybind11.h> #include <pybind11/numpy.h> #include <pybind11/eigen.h> #include <Eigen/Dense> #include <nanoflann.hpp> #include <iostream> namespace py = pybind11; Eigen::Vector3f regressionNormal(Eigen::MatrixXf neighnours){ Eigen::Vector3f mean = neighnours.colwise().mean(); Eig...
ALGO
0.988789
6.556088
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-02-29T21:08:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "1a8baeab336...
c19443a0-4e71-4588-91fe-83603973bfe1
arpitkekri/My-Leetcode-Solution-In-CPP
perfect-squares/perfect-squares.cpp
class Solution { public: bool isDivide(int n, int count, set<int> &squres) { if(count == 1) return squres.find(n) != squres.end(); for(auto &sq: squres) { if(isDivide(n - sq, count-1, squres)) return true; } return false; } ...
ALGO
0.999951
5.027409
{ "github_metadata": { "branch": "main", "commit_count": 448, "repo_created_at": "2021-03-28T17:52:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d57c287f6b...
c9a3ae10-0991-41b3-9e1a-0d50cfa17230
Srishtik16/Leetcode-Submissions
907-sum-of-subarray-minimums/907-sum-of-subarray-minimums.cpp
class Solution { public: int sumSubarrayMins(vector<int> &a) { int n = a.size(); vector<int> prev(n), next(n); stack<int> s; for(int i = 0; i < n; i++) { while(!s.empty() && a[s.top()] > a[i]) { s.pop(); } if(s.empty()) { ...
ALGO
0.999975
5.434301
{ "github_metadata": { "branch": "main", "commit_count": 3606, "repo_created_at": "2022-04-28T14:27: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": "62a80df49...
0ef721df-7cbd-410d-9b95-b27e4d11ef79
HemantKr79/CB-Competitive-Programming-Solutions
17. Advanced DS - Trie Problems/Max Xor Pair.cpp
#include <iostream> using namespace std; class Node { public: Node *left; // for 0 Node *right; // for 1 Node() { left = NULL; right = NULL; } }; class Trie { public: Node *root; Trie() { root = new Node; } void insert(int num) { Node *tmp = root...
ALGO
0.999973
4.458111
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-03-01T02:17: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": "0f384fa16d13...
ec5bd9d8-61a9-47ea-a8b4-35004a91fa7f
pristineio/webrtc-mirror
webrtc/modules/audio_processing/level_controller/down_sampler.cc
/* * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
ALGO
0.96427
6.24264
{ "github_metadata": { "branch": "master", "commit_count": 19056, "repo_created_at": "2015-02-19T21:38:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 161, "forks": 79, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "5d8c...
0496bde5-067d-4d70-8bf7-5ccb1c238401
an-yun/CLRS
Chapter06/heap.cpp
#include "list_heap.h" #include "d_heap.h" #include<winsock.h> #include<windows.h> #include<mysql.h> #include<stdio.h> #include<string.h> #include<stdlib.h> #pragma comment (lib, "libmysql.lib") #pragma comment (lib, "mysqlclient.lib") int main6_5_9() { list_heap<int, 3> h{ list<int>{1,5,7,11},list<int>{2...
ALGO
0.980816
3.00409
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2015-12-01T12:32:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ccd8dc4ad2...
e2cfb4f3-1451-42c6-8a60-4a8c3c856f89
durzal1/NEAT_cpp_
Distance.h
#ifndef NEAT_DISTANCE_H #define NEAT_DISTANCE_H #include <iostream> #include <list> #include <vector> #include "Genome.h" using namespace std; #include "System.h" #include "random.h" #include "types.h" // constants const int c1 = 1; const int c2 = 1; const int c3 = 3; // 3 for large pop size 1000+ while 0.4 for small ...
ALGO
0.998695
5.076503
{ "github_metadata": { "branch": "BEST", "commit_count": 11, "repo_created_at": "2021-04-03T16:43:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f13dd9ad75...
10fd1ff2-140e-4525-b5aa-ca6094b8e456
Masttf/XCPC
codeforces/CF1989/d.cpp
#include<bits/stdc++.h> #define int long long using namespace std; #define dbg(x...) \ do { \ cout << #x << " -> "; \ err(x); \ } while (0) void err() { cout << endl << endl; } template<class T, class... Ts> void err(T arg, Ts ... args) { cout << fixed << setprecision(10) << arg << ' '; err(args....
ALGO
0.999983
3.461748
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2025-02-09T13:42:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a725c48c6...
06efc114-02f6-45df-a07b-fc077545b656
haowron/algorithms
uvaoj/uva489.cpp
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> #define rep(i, n) for (int i = 0; i < n; ++i) #define repr(e, i) for (au...
ALGO
0.999954
3.137127
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2020-08-19T13:20:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5388f631b...
2bd95cdb-6348-400b-b205-6505bc474863
NCAR/lrose-core
codebase/apps/radar/src/RadarModelQc/FiltFuzzyRemap.cc
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* // ** Copyright UCAR (c) 1990 - 2016 // ** University Corporation for Atmospheric Research (UCAR) // ** National Center for Atmospheric Research (NCAR) // ** Bo...
TOOL
0.93573
5.565479
{ "github_metadata": { "branch": "master", "commit_count": 7406, "repo_created_at": "2016-02-09T23:36:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 99, "forks": 51, "issues": 16, "pull_requests": 3 }, "file_meta": { "content_id": "6a82b...
3d5644a1-9d1d-43ad-9f15-6e9ed982313f
udacity/cs344
Problem Sets/Problem Set 2/reference_calc.cpp
#include <algorithm> #include <cassert> // for uchar4 struct #include <cuda_runtime.h> void channelConvolution(const unsigned char* const channel, unsigned char* const channelBlurred, const size_t numRows, const size_t numCols, const float *filter...
ALGO
0.967371
5.418535
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2013-02-05T01:31:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1322, "forks": 1140, "issues": 0, "pull_requests": 12 }, "file_meta": { "content_id": "0a...
2333746d-0f90-4fa3-acc9-77cf42e035ea
ry0u/SRM
SRM683/MoveStonesEasy.cpp
// BEGIN CUT HERE // END CUT HERE #line 5 "MoveStonesEasy.cpp" #include <iostream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <cstring> #include <queue> #include <set> #include <map> #define REP(i,k,n) for(int i=k;i<n;i++) #define rep(i,n) for(int i=0;i<n;i++) using namespac...
ALGO
0.999994
4.230907
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2015-01-24T21:03: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": "430208167...
4d8023dc-7750-459c-abf7-d456b2e09c7e
JvanKatwijk/sdr-j-sw
swreceiver/plugins/decoders/decoder-utils/pllC.h
# /* * Copyright (C) 2010, 2011 * <NAME> (<EMAIL>) * Lazy Chair Programming * * This file is part of the SDR-J. * Many of the ideas as implemented in SDR-J are derived from * other work, made available through the GNU general Public License. * All copyrights of the original authors are rec...
ALGO
0.984106
4.073169
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2015-11-08T08:52:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "61f71b8b...
7fbdb16b-d356-4716-a523-1c54ceba7b52
gokulcodes/leetcode
1721-swapping-nodes-in-a-linked-list/1721-swapping-nodes-in-a-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* swapNodes(L...
ALGO
0.999996
5.973253
{ "github_metadata": { "branch": "main", "commit_count": 1129, "repo_created_at": "2022-03-17T10:48: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": "901a5ac61...
e9739fa4-852e-4d25-b308-50de90891e13
shanto173/DynamicPrograming
9_count_subSetSum_problem.cpp
#include<bits/stdc++.h> using namespace std; int countSubSetSum(int Array[],int sum,int n){ int t[n+1][sum+1]; for (int i = 0; i < n+1; ++i) { for (int j = 0; j < sum+1; ++j) { if(i == 0){ t[i][j] = 0; } if(j == 0){ t[i]...
ALGO
0.999659
4.373154
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-06-26T08:48:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b603ab9e9...
3f7e2697-c423-4c15-b734-e76edc1347e4
shinobu-takahata/atcoder
src/atcoder/abc/abc328/b/abc328_b.cpp
#include <iostream> #include <vector> #include <set> int main() { int N; std::cin >> N; // Nを入力 int count = 0; // ゾロ目の日数をカウントする変数 for (int i = 1; i <= N; ++i) { int Di; std::cin >> Di; // 各月の日数を入力 for (int j = 1; j <= Di; ++j) { // iとjを十進法で表すために、各桁の数字を取得 ...
ALGO
0.999822
5.286158
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-12-02T07:34: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": "86b8f928c...
3d34c4c1-6eaa-465c-9851-d67d8123833a
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/10/1007/personal_submission/cf325b_yawn_sean.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3,Ofast,unroll-loops") // #include <bits/extc++.h> // using namespace __gnu_cxx; // using namespace __gnu_pbds; using namespace std; signed main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long n; cin >> n; bool flg = fal...
ALGO
0.999873
4.355991
{ "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": "b9ca...
257eaaae-9817-4a71-b807-72a095c9d1fb
christopherryder/Connect-Four
Connect_Four/Transposition_Table.hpp
#ifndef __TRANSPOSITION_TABLE_HPP__ #define __TRANSPOSITION_TABLE_HPP__ // It is interesting to consider whether this class would be better removed and replaced with an std::unordered_map. // Initially, I was unsure whether the baggage of unordered_map would be too great. Although this is a fallacy in of itself, // as...
TOOL
0.97378
6.949194
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2022-05-13T14:37: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": "136148396...
b71032fa-5904-4317-bc9c-33a64571ee11
PhilippeCarphin/tests
CPP_tests/tbb_check/main.cpp
#include <iostream> #include <tbb/tbb_stddef.h> #include <tbb/parallel_for.h> void do_individual_element(size_t i, float f) { std::cout << "array element " << i << " = " << f << std::endl; } void parallel_for_with_lambda(size_t n, float *my_floats) { // On passe à parallel_for : // - Un blocked_range que TBB va...
ALGO
0.968393
5.753664
{ "github_metadata": { "branch": "master", "commit_count": 729, "repo_created_at": "2016-03-07T23:35:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3a7729b...
7a4741ce-d86f-4966-9382-a195a1019b6d
star-bnl/star-sw
StRoot/StGenericVertexMaker/StiPPVertex/StPPVertexFinder.cxx
/************************************************************ * * $Id: StPPVertexFinder.cxx,v 1.120 2017/10/03 21:25:15 genevb Exp $ * * Author: <NAME> ************************************************************ * * Description: does not fear any pileup ********************************************************...
ALGO
0.926915
5.301363
{ "github_metadata": { "branch": "main", "commit_count": 38269, "repo_created_at": "2020-11-12T22:30:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 29, "forks": 66, "issues": 9, "pull_requests": 29 }, "file_meta": { "content_id": "cdb06f...
033077a1-0162-4a7a-a5f7-3874167f8031
saugata-git/Search_Engine
src/LinkedList.h
#pragma once #include "Page.h" #include <assert.h> class LinkedList { private: int itemCount; public: page *headPtr; LinkedList(); ~LinkedList(); bool isEmpty() const; int getLength() const; bool insert(int newPosition); page* getPageAt(int position) const; bool remove(int position); void clear(); void S...
ALGO
0.991143
3.051085
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2019-10-18T20:33:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ae08a7d6e...
f2ef43dc-f0d6-4843-85b7-85f47c1a2118
alvi00/My-DSA-Learning-Journey
2.STL/1.Containers/2.stl_list.cpp
#include <bits/stdc++.h> using namespace std; // This is the second container I am learning and it is list // This is fully similar to vector // But the only advantage is you gotta do front operations too void list_learn() { // Create a list 'anas' with 5 elements, each initialized to 10 list<int> anas(5, 10)...
TOOL
0.934375
5.048831
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2023-12-23T12:15:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b815730cd7f...
00743e3a-a24e-4e0a-9688-9b73ea4a704e
fwillett/speechBCI
LanguageModelDecoder/srilm-1.7.3/lattice/src/LatticeReduce.cc
/* * LatticeReduce.cc -- * Lattice compaction algorithms * */ #ifndef lint static char Copyright[] = "Copyright (c) 1997-2010 SRI International. All Rights Reserved."; static char RcsId[] = "@(#)$Header: /home/srilm/CVS/srilm/lattice/src/LatticeReduce.cc,v 1.6 2014-08-29 21:35:47 frandsen Exp $"; #endif #include...
ALGO
0.99985
4.844368
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-06-11T20:01:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 167, "forks": 40, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "dd4b1aa0...
52d37ad1-1d3e-4b9d-aa2b-56a018685298
thhyj/bzoj-ACcode
bzoj2813.cpp
#include <bits/stdc++.h> using namespace std; inline void R (int &v) { static char ch; v = 0; bool p = 0; do { ch = getchar(); if (ch == '-') p = 1; } while (!isdigit(ch)); while (isdigit(ch)) { v = (v + (v << 2) << 1) + (ch^'0'); ch = getchar(); } if (p)v = -v; } inline void R (long long &v) { static...
ALGO
0.999982
3.717018
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-17T03:08: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": "ad509d9867...
0d108da1-7755-4a68-a7e1-29611f0afdf4
JoanEspasa/rantanplan-public
src/coreSolverFileYices2.cpp
#include "coreSolverFileYices2.h" #include "expression.h" #include <sstream> #include <string> #include <cstdlib> #include <map> using namespace std; CoreSolverFileYices2::CoreSolverFileYices2(string name, int verbosity) { filename = name; verbose = verbosity; t = 0; } CoreSolverFileYices2::~CoreSolverF...
ALGO
0.906489
4.540758
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-10-11T07:20:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "db09896067...
de0289d2-8669-42a6-a212-d585c9145fee
pressogh/algorithm
C++/1005 ACM Craft.cpp
// 1005 #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; void pv(vector<int> arr) { for (auto item : arr) cout << item << ' '; cout << '\n'; } int main() { cin.tie(nullptr), cout.tie(nullptr), ios::sync_with_stdio(false); #ifdef _DEBUG freopen("input.txt", "r", stdin...
ALGO
0.999798
3.935402
{ "github_metadata": { "branch": "master", "commit_count": 348, "repo_created_at": "2021-05-24T07:39:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6d55c9c...
d34fc3f8-d244-474a-8a8d-4da2a3826489
Valet78/skillbox
1-10/5 Logical operators and complex conditions/5.6_z1/main.cpp
/* Задание 5.6.1. Военный фельдшер Напишите программу, проверяющую, достаточно ли снаряжения у фельдшера для выхода на работу с ранеными. Для этого ему нужно иметь при себе не менее 2000 мл медицинского спирта или не менее пяти наборов походных аптек. Советы и рекомендации Будьте внимательны с условием задачи. Выве...
TOOL
0.919503
3.882653
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2023-05-27T09:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5a466004f...
4acbc589-baf3-40e0-a5a8-6904a9dc361e
opengauss-mirror/Plugin
contrib/timescaledb/tsl/src/compression/array.cpp
/* * This file and its contents are licensed under the Timescale License. * Please see the included NOTICE for copyright information and * LICENSE-TIMESCALE for a copy of the license. */ #include <postgres.h> #include "compression/array.h" #include <access/htup.h> #include <access/tupmacs.h> #include <catalog/nam...
TOOL
0.905983
7.007516
{ "github_metadata": { "branch": "master", "commit_count": 1613, "repo_created_at": "2021-07-06T10:02:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fee08fb...
5168a385-affe-4054-a30a-2124cf5fd761
Geant4/geant4
source/processes/hadronic/models/im_r_matrix/src/G4MesonAbsorption.cc
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
ALGO
0.995224
4.450722
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2016-06-21T08:25:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 705, "forks": 340, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "f33a24...
4621fb8e-79ab-446d-8644-33149dce75d6
rjenez/W266-final-project
data/programming-homework-dataset-plagiarism-detection/src/B2016/Z1/Z2/student5713.cpp
/*B 2016/2017, Zadaća 1, Zadatak 2 NAPOMENA: ulaz/izlaz za zadatke je specificiran javnim autotestovima. Zalbe za ne analiziranje testova se ne uvazavaju! NAPOMENA: nece svi (javni) testovi sa zamgera biti dostupni na c9. */ #include <iostream> #include <vector> #include <iomanip> #include <stdexcept> usin...
ALGO
0.994408
4.380477
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T00:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a7def1e31...
09ab7dc7-7b98-420d-b096-229aadf8897c
GuillermoCruz27/Linked-List
TP-Nro1/Exercise-5/main.cpp
/* * Autor: <NAME> * Año: 2024 * Asignatura: Estructura de datos * Tema: Listas Enlazadas */ //Importar librerias #include <iostream> #include "../Exercise-5/ListaEnlazaSimple.hpp" #define endl '\n' /* * Dada una lista de caracteres, adaptar la estructura y operaciones básicas de una lista simple. Además, incl...
ALGO
0.964878
5.229951
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-09-17T19:37:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "0212af42319...
85d73f87-10d9-45d2-96b9-dd20cb066125
chaviawasthy/dsa
vectors/inputinvector.cpp
#include<bits/stdc++.h> using namespace std; void print(vector<int>v){ cout<<"Printing vector:"<<endl; for(int i=0; i<v.size(); i++){ cout<<v[i]<<" "; //or // cout<<v.at(i)<<" "; both will give same output } } void print1(vector<int>v){ cout<<"Printing vector:"<<endl; for(auto x...
TOOL
0.997157
3.073367
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-07-13T17:20:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84970c38a9...
ad34c4ef-17ed-4854-a621-c74691f44601
lluisgomez/er_ocr_tesseract
ocr_hmm_decoder.h
#include <opencv2/opencv.hpp> #include <opencv2/highgui.hpp> #include <opencv2/objdetect.hpp> #include <opencv2/imgproc.hpp> #include <iostream> #include <fstream> using namespace cv; using namespace std; enum decoder_mode { DECODER_VITERBI = 0 // Other algorithms may be added }; class CV_EXPORTS OCRHMMDecoder...
ALGO
0.968853
6.020086
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2014-06-06T05:59:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d5a669040...
1f61d494-7a20-4877-b8e4-2de2380827bc
cms-sw/cmssw
TrackingTools/GeomPropagators/interface/HelixLineExtrapolation.h
#ifndef HelixLineExtrapolation_H #define HelixLineExtrapolation_H #include "DataFormats/GeometryVector/interface/GlobalPoint.h" #include "DataFormats/GeometryVector/interface/GlobalVector.h" #include <utility> class Line; /** Abstract interface for the extrapolation of a helix to * the closest approach to a line....
TOOL
0.902787
5.994322
{ "github_metadata": { "branch": "master", "commit_count": 251237, "repo_created_at": "2013-06-26T14:09:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1144, "forks": 4480, "issues": 947, "pull_requests": 108 }, "file_meta": { "content_id...
fc042353-2c58-46b3-aea7-fee913aacd9d
ayu-ano/Dynamic_Programming-Dp-
3-07_Minimum_No_of_deletion_to_make_string_palindrome/Varient_of_this_QN_GFG/varient_1_form_a_palindrom.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int form_a_palindrom_in_minInsertions(string str1) { string str2 = ""; int n = str1.length(); // Create the reverse of the input string for (int i = n - 1; i >= 0; i--) { str2.push_back(str1[...
ALGO
0.999927
6.847918
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2024-08-10T18:26:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5a811b862c...
5061949b-d580-4af4-838c-c22186c6ba08
sreejithsankar55/Codeforces
522A(DFS).cpp
//MY FIRST DFS #include <bits/stdc++.h> #define ll long long #define ld long double #define pb push_back #define mp make_pair #define ff first #define ss second using namespace std; vector<bool> visited; vector<vector<int> > graph; int maxi=0; int cc=0; void dfs(int v,int c) { visited[v] = true; for(...
ALGO
0.999964
3.83791
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2018-07-19T13:03:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 9, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "30e72de2...
953306a4-79cc-4b99-b17e-73da1c126f22
FierceCoder212/MPI-Cpp
MPI 2/Scatterv and Gatherv.cpp
//#include <mpi.h> //#include <cstdlib> //#include <iostream> //#include <time.h> //#include <math.h> //#include <chrono> //#include <string> //using namespace std; //int* randomize_array(int&); //int* get_sendcounts(int, int); //int* get_disp(int*, int, int); //void do_something(int*, int); //void print_array(int*, in...
ALGO
0.999462
3.941054
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-11T07:27:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91af911d0ef0...
1f7146d1-39d0-4062-8717-cc8eb6c39c76
mishraiiit/MultiGridSolver
src/common/MatrixIO.cpp
#include <iostream> #include <typeinfo> #include <Eigen/Sparse> #include <bits/stdc++.h> #include <deque> #include <string> using namespace std; using namespace Eigen; typedef SparseMatrix<double, RowMajor> SMatrix; SMatrix readMatrix(string filename) { std::ifstream fin(filename); int M, N, L; // Ignore ...
ALGO
0.997319
4.269835
{ "github_metadata": { "branch": "master", "commit_count": 209, "repo_created_at": "2018-01-22T08:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "5bb77f42...
539fb9ea-570c-41e1-be6d-d3ea049d64b1
sva83/Computer-Graphics-through-OpenGL-3rd-Edition
Quelle.cpp
/////////////////////////////////// // square.cpp // // OpenGL program to draw a square. // // <NAME>. /////////////////////////////////// #include <GL/glew.h> #include <GL/freeglut.h> // Drawing routine. void drawScene(void) { glClear(GL_COLOR_BUFFER_BIT); glColor3f(0.0, 0.0, 0.0); glPolygonMode(GL_FRONT_AND_BA...
TOOL
0.96642
4.914837
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-31T15:22: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": "5465cdeccc8f...
cc8f5b1a-1a66-4821-a26d-4addccd06b65
HarshCasper/NeoAlgo
C-Plus-Plus/graphs/detect_cycle.cpp
#include<bits/stdc++.h> #define Graph unordered_map<int, vector<int>> #define vb vector<bool> using namespace std; bool dfs (int curr, vb visited, Graph graph) { if(!visited[curr]) { visited[curr] = true; for(int i=0; i < graph[curr].size(); i++) return dfs(graph[curr][i], visited, graph); } else ...
ALGO
0.999934
5.031754
{ "github_metadata": { "branch": "master", "commit_count": 7521, "repo_created_at": "2020-06-24T16:04:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 887, "forks": 1041, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e...
1d1897fd-90a1-478e-8f43-090dcb3dd419
ishandutta2007/codeforces-t
tokusakurai/normal/1693/D.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rep2(i, x, n) for (int i = x; i <= n; i++) #define rep3(i, x, n) for (int i = x; i >= n; i--) #define each(e, v) for (auto &e : v) #define pb push_back #define eb emplace_back #define all(x) x.begin(), x.end() #define ra...
ALGO
0.999691
3.960521
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "c4a6042d1f9a...
4b8f7253-f399-49a3-865b-7dc7395f4a83
dekamps/miind
libs/TwoDLib/MasterOMP.hpp
// Copyright (c) 2005 - 2015 <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 copyright notice, this list of conditions and t...
ALGO
0.983216
6.310266
{ "github_metadata": { "branch": "master", "commit_count": 2013, "repo_created_at": "2015-03-06T18:51:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 7, "issues": 19, "pull_requests": 8 }, "file_meta": { "content_id": "fbd42...
0fc2188a-eeda-4bc3-906d-9e2c73a7d17f
Prashanth14/Problem-Solving
SortArrayByParity.cpp
// Given an integer array nums, move all the even integers at the beginning of the array followed by all the odd integers. // Return any array that satisfies this condition. // Example 1: // Input: nums = [3,1,2,4] // Output: [2,4,3,1] // Explanation: The outputs [4,2,3,1], [2,4,1,3], and [4,2,1,3] would also be acc...
ALGO
0.999997
5.753213
{ "github_metadata": { "branch": "main", "commit_count": 298, "repo_created_at": "2022-05-26T22:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "101a8eed91...
50bed9ef-72be-434b-b5cc-12dd0e846c6b
crazymerlyn/spoj
VECTAR7.cpp
#include <bits/stdc++.h> using namespace std; long long mod = 1e9 + 7; long long mypow(long long a, long long b) { long long res = 1; while (b) { if (b % 2) res = res * a % mod; a = a * a % mod; b /= 2; } return res; } long long comb(int n, int r) { long long num = 1, deno...
ALGO
0.999944
4.975576
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2019-04-09T16:34:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6307b95c7...
69b23edd-b265-4833-8aa2-5ca9a38c72dd
The-OpenROAD-Project/OpenROAD
src/rmp/src/logic_optimization_strategy.h
// SPDX-License-Identifier: BSD-3-Clause // Copyright (c) 2024-2025, The OpenROAD Authors #pragma once #include "abc_library_factory.h" #include "base/abc/abc.h" #include "db_sta/dbSta.hh" #include "utl/Logger.h" #include "utl/deleter.h" namespace rmp { // The `LogicOptimizationStrategy` class defines an interface ...
ALGO
0.938828
7.581586
{ "github_metadata": { "branch": "master", "commit_count": 31212, "repo_created_at": "2019-10-28T17:48:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2056, "forks": 696, "issues": 386, "pull_requests": 61 }, "file_meta": { "content_id": ...
49e86342-9860-464c-972c-ef7f1bcd8536
floric/OR_Solver
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); connect(ui->calculateButton, SIGNAL(clicked(bool)), this, SLOT(StartCalculation())); } MainWindow::~MainWindow() { delete ui; } void Main...
TOOL
0.902205
5.68872
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-01-15T23:00: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": "07f04c8da8...
0a03a8f8-07de-4494-9649-86924322cee1
Edemolt/CrackYourInternship
day13/493. Reverse Pairs.cpp
class Solution { public: int fn(int l, int r, vector<int> &nums){ if(l >= r) return 0; int mid = (l + r)/2; int cnt = fn(l, mid, nums) + fn(mid + 1, r, nums); int j = mid + 1; for(int i = l; i <= mid; i++){ while(j <= r && nums[i] > 2ll * nums[j]) j += 1; ...
ALGO
0.99999
5.604514
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2024-07-15T03:37: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": "d165b84a5...
85e97d1b-fa37-48d7-822d-fcb31eef6fde
H-b-IO-T-O-H/marusia_challenge
task3/task3.cpp
/* Помоги Марусе вывести Дашу Путешественницу из подземелья. Дано квадратное поле [N x N] заданной величины (N находится в диапазоне [10; 100]). Поле — подземелье с коридором, который ведет к выходу. Даша находится в начале коридора, а голосовой помощник помогает ей выбраться из подземелья. Выход находится в конце ...
ALGO
0.999474
3.902846
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-08-11T20:15: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": "733488675...
f3106934-07bf-47bc-af62-71d3255bfcbf
ishandutta2007/codeforces-r
riverhamster/normal/1381/C.cpp
#include <cstdio> #include <cctype> #include <cstring> #include <algorithm> #include <vector> #include <queue> using namespace std; #define File(s) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout) typedef long long ll; template<typename T> inline void gi(T &x){ char ch; x = 0; int f = 1; while(isspace(c...
ALGO
0.999937
3.473747
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75bfef770792...
be00269c-b04c-4460-b651-9a5beca78eab
navom7/DS-Algo
C++/UdemyGraph/BFS/AdjacencyListRepresentationWithNode.cpp
#include<iostream> #include<unordered_map> #include<list> #include<vector> using namespace std; class Node{ public: string cityName; list<string> nbrs; Node(string city) { this->cityName = city; } }; class Graph{ //map of all the nodes present in the string with //city name as k...
ALGO
0.99954
5.319083
{ "github_metadata": { "branch": "main", "commit_count": 254, "repo_created_at": "2021-07-28T09:31: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": "8adb7fc4d0...
65c7d023-1639-4c22-a3a9-b2d23859ed12
kongyi123/Algorithms
Visual Studio 2017/Projects/Project4/Project4/1747.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> #include <string.h> #define MAX 1003001 bool check[MAX+10]; // 소수인지 char str[7]; int len, mid; bool isPalindrome(const int in) { sprintf(str, "%d", in); len = strlen(str); mid = len / 2; for (int i = 0;i < mid;i++) { if (str[i] != str[len - i...
ALGO
0.999722
4.24567
{ "github_metadata": { "branch": "master", "commit_count": 154, "repo_created_at": "2018-07-27T03:34:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "233d2b55...
1ce27284-4eb4-4d28-8878-ab9fcc08941e
SafirIqbal/Demo-repo
Chapter5.cpp
#include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <iostream> using namespace std; using namespace cv; //Warp Perspective (King) Card// //int main() { // Mat imgwarp; // float w = 250, h = 350; // // string path = "Resources/cards.jpg"; // Mat img = imread(path); //...
ALGO
0.969535
4.402829
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-03-21T14:24:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "655402d7fdb5...
84764dcf-e2ca-454e-af47-629d5fad1516
AhnafTChowdhury/problemSolving
Uva/Mathematics/Number_theory/Prime_numbers/uva_10168.cpp
// hasta la victoria siempre // এবারের সংগ্রাম মুক্তির সংগ্রাম । এবারের সংগ্রাম,স্বাধীনতার সংগ্রাম । #include <bits/stdc++.h> using namespace std; #define pii pair<int , int > #define pLL pair<LL,LL> #define psi pair<string, int> #define ff first #define ss second #define LL long long #define uLL unsigned long l...
ALGO
0.999816
3.24739
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2016-02-07T16:33: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": "5deca32e6...
4ae705fe-8255-498f-8574-ee7267e71a11
seesealonely/leetcode
leetcode/simulation/1895.LargestMagicSquare.cc
/* A k x k magic square is a k x k grid filled with integers such that every row sum, every column sum, and both diagonal sums are all equal. The integers in the magic square do not have to be distinct. Every 1 x 1 grid is trivially a magic square. Given an m x n integer grid, return the size (i.e., the side len...
ALGO
0.999966
6.149104
{ "github_metadata": { "branch": "master", "commit_count": 1478, "repo_created_at": "2020-04-30T13:14:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e34509e...
b44ce3ff-e1dd-47ab-90b9-69a33eb50a09
oguzhanerbas1/-dev_hafta_3
Lab Soru 4.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> // Ö?renci yapysy struct Ogrenci { int ogrenciNo; char ad[50]; struct Ogrenci* next; }; // Ö?renci listesine yeni ö?renci ekleme fonksiyonu struct Ogrenci* ogrenciEkle(struct Ogrenci* head, int no, const char* ad) { struct Ogrenci* yeniOgrenci...
TOOL
0.984147
3.748178
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-29T21:01: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": "68110a89ca58...
a212b796-e0aa-40b5-a18b-e5765c920b3a
L-abib/1st-tri-cse
C++ codes of 1st Trimester/Lab assignment/midtask7.cpp
#include <iostream> using namespace std; int main() { double sell, com, total; cout << "Enter 1st salesperson's gross sales: " << endl; cin >> sell; com = (sell*9)/100; total = sell + com + 2000; cout << "1st salesperson's gross income: " << total << endl; cout << "Enter 2nd salesperson's...
ALGO
0.985014
3.35515
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-12-16T09:56: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": "74dc83e7f350...
66f47d8b-cf0c-4dee-8df5-9b09f26283e4
Jihaduttolibinn/ucpempat
ucpempat/ucpempat.cpp
#include <iostream> using namespace std; // Node structure class Node { public: int data; Node* next; }; // Queue class1 class Queue { private: Node* front; Node* rear; public: // Constructor to initialize the queue Queue() { front = NULL; rear = NULL; } // 1. All...
ALGO
0.975142
5.263982
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-06-07T02:39: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": "b17c447ce0...
ea132154-a255-483e-b443-0c83ae0e26eb
hikarutaknouch/AtCoder
ABC/131/c.cpp
#include <bits/stdc++.h> #define REP(i, n) for(int i = 0; i < n; i++) #define REPP(i, n) for(int i = 1; i <= n; i++) #define REPR(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() #define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()); using name...
ALGO
0.999706
4.104946
{ "github_metadata": { "branch": "master", "commit_count": 451, "repo_created_at": "2018-12-28T05:16:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 25, "pull_requests": 0 }, "file_meta": { "content_id": "5007fd2...
10890043-0096-4225-b6f9-2f61f748e21f
fawazalrasyid/cii2b4-struktur-data
praktikum/mod-6/tp/tp-mod6/main.cpp
#include "DLL.h" #include <iostream> using namespace std; int main() { int pilihan = 0; List L; adr P; createList_1301213016(L); pilihan = selectMenu_1301213016(); while (pilihan != 0) { switch(pilihan) { case 1: { int i; int jumlah; infot...
TOOL
0.932925
3.766236
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-09-29T06:44: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": "bfa8b8c1dc7...
91af743b-16bd-496a-8626-c23bf086ca62
colorfulvox/ProgrammersChallenge
Programmers/Lv. 3/입국심사.cpp
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; long long solution(int n, vector<int> times) { sort(times.begin(), times.end()); long long mintime = times[0]; long long first = mintime; long long last = mintime * n; long long answer = mintime * n; while ...
ALGO
0.999983
5.183576
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2023-12-10T23:09: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": "8c5b1eebe...
e747dadc-364d-4eb1-8c7e-204cc5e9d539
ytz12345/ICPC_Template_2019
构造/若干排列使所有数对都出现一次.cpp
/*n/2个排列使得所有无序数对(i,j)都出现一次 *n为奇数则相邻行首尾相连(最后一行和第一行也相连),偶数不连 * used in ICPC 2019 <NAME> */ typedef vector<int> vi; void get_even(int n, vi ans[]) { vi a(n); for (int i = 0; i < n; i ++) a[i] = i + 1; for (int i = 1; i <= n / 2; i ++) { ans[i].resize(n + 1); for (int j = 0; j < n / 2...
ALGO
0.999978
3.723679
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2019-02-27T05:46:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13a1148bb...
dbb62a0c-94b4-42c7-806e-7597513b6673
codewithdivu/Cpp
Problems/Pythagorial_equation.cpp
#include <bits/stdc++.h> using namespace std; bool checkPythagoral(int x, int y, int z) { int a = max(x, max(y, z)); int b, c; if (a == x) { b = y; c = z; } else if (a == y) { b = x; c = z; } else { b = x; c = y; } if (a *...
ALGO
0.998911
4.645544
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2022-03-19T03:55:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a16ae48c9...
989062a3-0177-4a21-9a20-95a52e7c3c6d
wdlin/VS_DataStructuresAndAlgorithms
优先队列/BinomialHeap.h
#ifndef _BINOMIAL_HEAP_H_ #define _BINOMIAL_HEAP_H_ #include <vector> /* 二项堆(二项队列) BinomialHeap 二项堆是二项树的集合(森林) 二项树: 二项树的递归定义: 二项树的第0棵树只有一个结点; 二项树的第K棵树通过将一棵B k-1连接到另一颗树B k-1的根构成。 也可以这样定义: 度数为0的二项树只包含一个结点 度数为k的二项树有一个根结点,根结点下有k个子女,每个子女分别是度数为k-1,k-2,…,0的二项树的根 时间复杂度 insert:log(n) findMin:log(n) deleteMin:log(n) delete(node...
ALGO
0.999373
4.356156
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2015-07-29T07:16: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": "ad829b638...
9f1daec6-353d-4fb2-aefa-fe68a8ffe69b
kimjihyo/daily-coding-challenge
boj/10845/solution.cpp
#include <iostream> #include <queue> #include <string> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; queue<int> q; for (int i = 0; i < n; i++) { string str; cin >> str; if (str == "push") { int val; cin >> val; q.push(val); } i...
ALGO
0.999042
4.502896
{ "github_metadata": { "branch": "main", "commit_count": 227, "repo_created_at": "2024-06-01T05:11: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": "b031a5fdd9...
556a6705-e267-4e4b-ac03-c6df003cb71d
jh4843/MyCplusplus
CodingTestBFS/main.cpp
#include <string> #include <vector> #include <queue> #include <algorithm> #define MAX_STATE 17 using namespace std; struct Point { int cur, ship, wolves, state; }; vector<int> adj[20]; vector<int> Info; //이미 방문한 노드도 상태가 다르다면 방문하되, 양이나 늑대의 숫자가 늘어나지 않는다. bool visited[17][1 << MAX_STATE]; int bfs() { queue<Point> q; q...
ALGO
0.999938
4.206443
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-10-04T01: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": "6e5856a62...
33395800-2aa1-4cdf-8313-17eb2fd3b4aa
codestorm04/Arma_ML
src/trees/tree_classifier.cc
/* * Decision Tree using C4.5 algorithm, handling categorical features for multiple classification. * Mathmetics reference: https://www.cnblogs.com/coder2012/p/4508602.html https://shuwoom.com/?p=1452 * compile with flags: g++ logistic_classifier.cc -std=c++14 -o test -larmadillo * author: <NAME...
ALGO
0.996949
5.909898
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2018-10-29T08:21:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 10, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "b1172fa...
1488d612-9112-458e-8429-dd69cafd36e5
mosabbeer/Problem_Solving
linklist.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long struct node { int data; struct node *next; }; int main() { int n, i, count = 0; struct node *a, *head = NULL, *current, *temp, *tempu, *secondhead; for (i = 0; i < 7; i++) { temp = (struct node *)malloc(sizeof(struct node)); ...
ALGO
0.999874
3.123484
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-07-15T02:42: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": "9727d8b746d3...
0bf22a5b-b4f6-4fb9-9cb7-98867a7d29a6
theDreamBear/algorithmn
leetcode2/LCR 161.连续天数的最高销售额.cpp
/* * @lc app=leetcode.cn id=LCR 161 lang=cpp * @lcpr version=30117 * * [LCR 161] 连续天数的最高销售额 */ // @lcpr-template-start using namespace std; #include <algorithm> #include <array> #include <bitset> #include <climits> #include <deque> #include <functional> #include <iostream> #include <list> #include <queue> #inclu...
ALGO
0.999891
6.194059
{ "github_metadata": { "branch": "master", "commit_count": 1074, "repo_created_at": "2019-02-24T04:03: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": "9d39c22...
bd6dea87-04b9-4645-92d1-e393205f4220
MasterVols/EDF-Rocket
Machine Learning/tobE/neural_network.h
#ifndef NEURAL_NETWORK #define NEURAL_NETWORK #include <vector> #include <string> class Neural_Network { public: Neural_Network(int, std::vector<int>, int); ~Neural_Network(); void randomize(); // randomizes weights and sets biases to 1 void change_weight(int,...
ALGO
0.969605
4.378229
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2023-02-18T21:42: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": "15a49ef5920...
d2097f9c-fc07-468d-b14d-61b461e0a8b4
irikong/LeetCode
src/0098-Validate Binary Search Tree.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.999967
6.699574
{ "github_metadata": { "branch": "main", "commit_count": 210, "repo_created_at": "2022-03-17T12:10: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": "3bf342a433...
8a3d58f6-dafc-469a-8dfb-5f117c1eaab4
Edlward/code
workpieceML/temp.cpp
#include <vector> #include "math.h" #include "stdio.h" #include "temp.h" #include "contour.h" using namespace cv; using namespace std; void Temp::tempInit() { Mat temp = imread("temp.png"); if(!temp.data) { printf("can not find template\n"); exit(0); } // Mat tempGray; cvtColo...
ALGO
0.995293
4.029528
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2019-04-29T09:26:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2ba347f...
27417b97-6627-4053-9360-047d222ba68b
jmsman3/C-Language-Week-03-
Return + Parameter/Sort_It.cpp
#include <bits/stdc++.h> using namespace std; class Student { public: string name; int cls; char sec; int id; int math_marks; int eng_marks; }; int main() { int n; cin >> n; Student a[n]; for (int i = 0; i < n; i++) { cin >> a[i].name >> a[i].cls >> a[i].sec >> ...
ALGO
0.999912
4.212164
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-03T03:55:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebb5f6805288...
b651e53c-e169-459f-9710-dee13249e58c
joaovitor73/ExeCplusplus
vetorMatriz/exe 27.cpp
#include <iostream> using namespace std; int main(){ int m[10][10], vDs[5], vL5[5]; for(int l=0 ; l < 10; l++){ for(int c=0 ; c < 10; c++){ m[l][c] = c; if(l+c == 4){ vDs[l] = m[l][c]; } if(l == 4){ vL5[c] = m[l][c]; } } } cout <<"\nMatriz original: ";...
ALGO
0.999028
3.692353
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-06-07T11:46: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": "76df844e24e2...
4c196a16-4c11-4f7e-88d3-4232cad2e4c7
kuldeep2510/LB_17
16-11/Program215.cpp
#include<iostream> using namespace std; typedef struct node { int data; struct node *next; }NODE, *PNODE; class Stack // Singly Linear Linked List { private: PNODE first; int size; public: Stack() { first = NULL; size = 0; } void push(int no) // InsertFi...
ALGO
0.999773
4.364249
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2021-11-12T14: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": "ab8af2edc...
1117a15e-6c86-4380-b056-5d7957ad6191
hieplpvip/cses-solutions
cpp/1136.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 5; int n, m, sz[N], p[N], nxt[N], Time, in[N], out[N], ans[N]; vector<int> g[N]; void dfs_sz(int u) { sz[u] = 1; for (int &v: g[u]) { if (v == p[u]) continue; p[v] = u; dfs_sz(v); sz[u] += sz[v]; if (g[u][0] == p[u] || sz[v] > s...
ALGO
0.999929
4.23099
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-02-10T10:25:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "27216215...
e5c24a72-e9b9-4a32-9f84-e1ae90dfc1a3
abgrg30/ComputerArchitecture
branch predictor/linear piecewise perceptron/predictor.h
#ifndef PREDICTOR_H #define PREDICTOR_H /* Define all your tables and their sizes here. All tables must be statically-sized. Please don't call malloc () or any of its relatives within your program. The predictor will have a budget, namely (32K + 256) bits (not bytes). That encompasses all storage (all tabl...
ALGO
0.970293
5.905012
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-11-17T02:23:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ec9a9e087...
bb2c1997-ea06-4b11-a954-73900dbbd810
keisuke90/AtCoder
abc/abc350/c.cpp
#include <bits/stdc++.h> #define rep(i, start, end) for(int i = start; i < end; i++) using namespace std; int main(){ int n; cin >> n; // map<int, int> mp; vector<int> a(n+1), pos(n+1); rep(i, 1, n+1) { cin >> a[i]; pos[a[i]] = i; // mp[a[i]] = i; } vector<pair<int...
ALGO
0.999901
3.386821
{ "github_metadata": { "branch": "main", "commit_count": 642, "repo_created_at": "2023-03-11T11:26: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": "a9a523b0e5...
21f335e1-a55b-4b50-84ec-6eaf68967301
ShuffleZZZ/ITMO
Diskret/9thLab/C(Matching).cpp
#include <fstream> #include <vector> #include <algorithm> std::vector <std::vector <unsigned int>> graph; std::vector <int> matching, ans; std::vector <bool> came; bool dfs(unsigned int i) { if (!came[i]) { came[i] = 1; for (auto j : graph[i]) { if (matching[j] == -1 || dfs(matching[j])) { matching[...
ALGO
0.999996
4.132114
{ "github_metadata": { "branch": "master", "commit_count": 142, "repo_created_at": "2018-04-07T23:14:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "def4e4e...
2c04c4f9-a6cb-481c-bd54-d7d7495b0b3b
aryandosaj/CompetetiveProgramming
1305_e.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 ll long long #define ull unsigned long long #define MOD 1000000007 #define pb push_back #define pl pair<ll, ll> #define vll vector<ll> #define pll vect...
ALGO
0.999991
3.577033
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-08-22T18:02: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": "a57f1521a8...
7a474432-d972-4349-abc1-7c6ed81781b1
alexandraback/datacollection
solutions_5695413893988352_0/C++/isea/B_bf.cpp
/** * @author - iSea_baidu @ 2016-05-01 00:34 * @brief - From sky to the sea. **/ #include <cmath> #include <ctime> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <fstream> #include <sstream> #include <vector> #include <string> #include <bitset> #include <queue> #include <map...
ALGO
0.999993
3.392208
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df4cc87f6...
e3138f70-ec13-4f61-ac80-33afac52e406
PTNhatHa/Nam-3-ki-1
ToanUD/N8_26-10-2023/Monotunechain_Andrew.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 100 struct Point { int x, y; bool operator < (Point p) { return x < p.x || (x == p.x && y < p.y); } bool operator == (Point p) { return x == p.x && y == p.y; } }; bool checkP(Point p[], int n, Point pn) { int i=0; while(i<n) ...
ALGO
0.999898
3.81352
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-23T03:31: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": "a78caae08d05...
fd9b1a2f-9041-4c32-8e5c-94cd004f1a2e
cyunlee/cplusplus-ps
백준/Silver/2178. 미로 탐색/미로 탐색.cc
#include <bits/stdc++.h> using namespace std; #define X first #define Y second int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; int n, m; char board[102][102]; int dist[102][102]; int main(void){ ios::sync_with_stdio(0); cin.tie(0); cin >> n >> m; //미로 입력 for(int i=0; i<n; i++){ string str; cin...
ALGO
0.99996
3.787373
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2024-12-23T08:26: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": "6967c4fe262...
8bd3be10-ea2d-4ec4-a840-3538fd252e05
khaledatia25/cp-problems-solutions
vjudge-extracted-solutions/UVA/12532/43878781_AC_120ms_0kB.cpp
/* Buggy Code Written By <NAME> ^_^ */ #include <bits/stdc++.h> #include <iostream> #define KHALED_WALEED_ATTIA ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); #define space " " #define endl '\n' #define all(v) v.begin(), v.end() #define allr(v) v.rbegin(), v.rend() #define stprec(n) cout << fixed << setprecisi...
ALGO
0.999941
4.497785
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-09-10T08:46:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dce7ac6d791...
bab7ba08-9a05-44da-a1ad-19c25e5ddcf1
vishu-garg/competetive-programming
practice/cc6.cpp
#include<bits/stdc++.h> #include<algorithm> using namespace std; #define ll long long #define ld long double #define rep(i,a,b) for(ll i=a;i<b;i++) #define repb(i,a,b) for(ll i=a;i>=b;i--) #define err() cout<<"=================================="<<endl; #define errA(A) for(auto i:A) cout<<i<<" ";cout<<endl; #def...
ALGO
0.999972
4.167342
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-05-31T12:42: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": "b8faa28937...
935f417a-9a37-471b-b895-be7fc3684d29
Warawreh/CP-Library
Contests/ICPC Brazil Subregional 2022/g.cpp
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define fast ios::sync_with_stdio(false);cin.tie(0); typedef long long ll; typedef long double ld; typedef unsigned long long ull; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); struct pt{ ld x,y; pt(){ x =...
ALGO
0.999152
4.239214
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-04-16T08:24: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": "6559fb81f24...
eacfcbab-d720-4f41-9273-b18d5f1341c8
thhyj/bzoj-ACcode
bzoj2251.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 6005; int sa[maxn], rk[maxn], height[maxn], n, c[maxn]; char s[maxn]; inline void getsa(int m) { int i, j, k, *x = rk, *y = height; for (i = 0; i < n; ++i) c[x[i] = s[i]]++; for (i = 1; i < m; ++i) c[i] += c[i - 1]; for (i = n - 1; i >= 0; --i) sa[--c[...
ALGO
0.999981
3.475988
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-17T03:08: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": "cc1cd0687f...
892a869a-1eda-4e13-828c-c0b81761e2f6
jake-billings/edu-csci2312
hw02/billingsJakeHW02.cpp
/** * Name: <NAME> * Date: 02/01/2018 * Class: CSCI 2312 * Description: * * Problem * ======= * Build two grids which are each X width and Y long where X and Y are * user inputs. * * Randomly select 1/3 of the grid cells to be 1's and 2/3 to be 0's. * * Compare the two to create a third grid in which 1's ...
ALGO
0.972261
5.632155
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2018-01-17T17:09:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe7f0b352...
04f01315-2e7c-4ab5-951b-29ab2b2a61cf
Gowtham-G29/Leetcode-Problems
1_Single_number_136.cpp
//Hash Map #include <iostream> #include <vector> #include <unordered_map> using namespace std; class Solution { public: int singleNumber(vector<int>& nums) { unordered_map<int, int> map; for (int i = 0; i < nums.size(); i++) { map[nums[i]]++; } for (int i = 0; i < nums....
ALGO
0.999989
6.584102
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-06-17T19:19: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": "1c7108f171b0...
86f17af9-8ba9-40e4-9530-822bcc6dfe8b
bqmnhat/CompetitiveProgramming
BigOCoding/DTICH/main.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; int n, m, gem[2002][2002], LastAns[2001][2001], di[4] = {1, 0, -1, 0}, dj[4] = {0, 1, 0, -1}; char a[2001][2001]; bool vis[2001][2001]; stack<pii> stk; void ReadData() { for (int i=1; i<=n; i++) { for (int j=1; j<...
ALGO
0.999972
3.73847
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-10-28T06:45: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": "6876ee84c58...
9e9cc8b3-9be3-43ad-8881-a85969d25238
saurabhjais12/DSA-in-C--
100-Days-of-Coding-main/day62.cpp
// Gold Mining // Anusree has decided to go to a gold mine along with N of his friends (thus, total N+1 people including // Anusree go to the gold mine). // The gold mine contains a total of X kg of gold. Every person has the capacity of carrying up atmost // Y kg of gold. // Will Anusree and his friends together be ...
ALGO
0.999877
3.614397
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-17T16:55:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1bb0cab7ac87...
c5ca31eb-ef59-4be7-9aac-d964294ea947
NVIDIAGameWorks/PhysX
physx/source/lowlevelaabb/src/BpBroadPhaseABP.cpp
// // 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 copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in bin...
ALGO
0.996432
4.69754
{ "github_metadata": { "branch": "4.1", "commit_count": 12, "repo_created_at": "2018-12-05T14:30:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3397, "forks": 824, "issues": 311, "pull_requests": 18 }, "file_meta": { "content_id": "7fe45...
b35a3de4-1e2c-4961-b720-bf0bba68008a
uw-ipd/tmol
tmol/utility/datastructures/in_place_heap.h
#include <tmol/utility/tensor/TensorAccessor.h> #include <tmol/utility/tensor/TensorPack.h> #include <iostream> namespace tmol { template <tmol::Device D, typename Int> class InPlaceHeap { public: AT_HOST_DEVICE InPlaceHeap(Int max_n_nodes) : capacity_(max_n_nodes), size_(0), heap_t_(TPack...
ALGO
0.956081
5.298159
{ "github_metadata": { "branch": "master", "commit_count": 286, "repo_created_at": "2018-02-13T23:36:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 39, "forks": 3, "issues": 3, "pull_requests": 7 }, "file_meta": { "content_id": "84a8ddea...
0b1fa6b7-9ff6-4eaf-b355-1da44aabc0ca
Raiden49/stanley_controller
src/stanley_core.cpp
#include "stanley_controller/stanley_core.hpp" namespace stanley_controller { void StanleyCore::OdomCallback(const nav_msgs::Odometry::ConstPtr& odom_msg) { odom_callback_flag = true; tf::pointMsgToTF(odom_msg->pose.pose.position, odom_pos); odom_yaw = tf::getYaw(odom_msg->pose.pose.orientation);...
ALGO
0.996084
3.972624
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-10-17T06:00:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c40179d4...
57a9515e-5672-4515-b5e5-5d754226caed
tusharsharma2822/Data-Structure
Array/Left Rotate by D places/Optimal.cpp
#include<bits/stdc++.h> using namespace std; void reverse(vector<int> nums, int start, int end){ while(start < end){ int temp = nums[start]; nums[start] = nums[end]; nums[end] = temp; start++; end--; } } void leftRotate(vector<int> nums, int d){ d = d % nums.size();...
ALGO
0.999861
5.357402
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2025-06-23T06:53: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": "e66e2142f...
e87b2c0c-ff00-44ba-b593-62d09479e869
HuangShiqing/LearnAndTry
leetcode/数组-搜索旋转排序数组.cpp
#include <vector> using namespace std; // 33. 搜索旋转排序数组 // 整数数组 nums 按升序排列,数组中的值 互不相同 。 // 在传递给函数之前,nums 在预先未知的某个下标 k(0 <= k < nums.length)上进行了 旋转,使数组变为 [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]](下标 从 0 开始 计数)。例如, [0,1,2,4,5,6,7] 在下标 3 处经旋转后可能变为 [4,5,6,7,0,1,2] 。 // 给你 旋转后 的数组 nums 和一个整数 tar...
ALGO
0.999971
5.392529
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-01-05T16:06:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "118a18cdbc...