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
46fa19d6-148d-437b-b30e-9fad8cbe47f5
locusrobotics/robot_navigation
dwb_plugins/src/standard_traj_generator.cpp
/* * Software License Agreement (BSD License) * * Copyright (c) 2017, Locus Robotics * 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 re...
TOOL
0.920057
7.045146
{ "github_metadata": { "branch": "noetic", "commit_count": 120, "repo_created_at": "2017-09-19T16:16:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 470, "forks": 147, "issues": 14, "pull_requests": 4 }, "file_meta": { "content_id": "a066...
a6b574ea-1543-4f9d-8996-bcb7d1cac9b4
readlnh/patsolution
Advanced/A1013.cc
#include <bits/stdc++.h> using namespace std; const int kMaxn = 1000 + 5; int f[kMaxn]; int a[kMaxn * kMaxn], b[kMaxn * kMaxn]; int init(int n) { for(int i = 1; i <= n; i++) f[i] = i; } int findf(int x) { if(f[x] != x) f[x] = findf(f[x]); return f[x]; } int main() { int n,m,k; ...
ALGO
0.999959
3.609225
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-07-29T12:37:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e883e3c9ea...
82b49539-3e60-4097-888b-3e57759643c2
lhtestw2/TestingCode
solver.cpp
#include "solver.hpp" #include "utils.hpp" #include "parser.hpp" #include <fstream> #include <iostream> namespace FileExtract { Solver::Solver(std::string path, double thresh) : thresh_(thresh) { path_list_ = FileExtract::util::walk_through(path); path_ = std::move(path); } void Solver::first_read(const Pars...
ALGO
0.996287
4.7146
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2023-06-12T01:44: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": "6095b844391...
81d433a6-0b73-45e4-a229-6569eb9a59b7
hsnavarro/imepp
notebook/data-structures/segment-tree-point-update.cpp
//Segment Tree (Range Query and Point Update) //NOT the Lazy Propagation version //Update and Query - O(log n) //Space - O(n) int n, v[N], st[4*N]; // n - size of the array (up to N) // You could do point update in all values of v, instead of using build void build(int p = 1, int l = 1, int r = n){ if(l == r) { s...
ALGO
0.997835
5.723253
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2018-08-22T02:40:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6b04e79...
b97b4697-2526-4cbe-8da8-de249f7d1978
xmansyis/CSCI-21-Spring-2014
Projects/p4/p4.cpp
/*PROJECT 4 *The purpose of project 4 is to implement and test the functionality of a binary search tree. *In this project, the program will read data(s) from a file and performed the correct command(s). *This project will be creating a tree, deleting a tree, clear a tree, insert a string(a word), *find a string(a ...
ALGO
0.998868
4.101719
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2014-01-27T16:57: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": "22e2fd89...
b51c8469-d9c5-48f4-bece-14993b81bde1
x-fer/xfer-natpro
2015/mi/nikola/cubic_brute.cpp
#include <cstdio> #include <cmath> #include <ctime> using namespace std; const int MAXN = 1e6 + 2; const int MAXK = 1e6 + 2; int a[MAXN], k; int check_if_median(int starting, int offset) { int candidate = a[starting + offset]; int less = 0; int great = 0; int same = 0; for (int i = starting...
ALGO
0.999679
3.874
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2015-03-30T09:14:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50faac8d54...
b682020c-fc7c-49e6-929b-00cd0cbede37
ALanHua/algorithm
04_Heap/04_Heap/Heap.h
// // Heap.h // 04_Heap // // Created by yhp on 2018/3/14. // Copyright © 2018年 none. All rights reserved. // #ifndef Heap_h #define Heap_h #include <cassert> #include <algorithm> using namespace std; template <typename Item> class MaxHeap { private: // 成员变量 Item* data_; int count_; int capa...
ALGO
0.978688
3.523682
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-03-08T15:47: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": "7beb14227...
95b2c105-6452-47e5-b7d3-fb82837150f0
o3de/o3de
Gems/WhiteBox/Code/Source/Rendering/Atom/TangentSpaceHelper.cpp
/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include "TangentSpaceHelper.h" #include <AzCore/std/containers/array.h> #include <CryCommon/Cry_...
ALGO
0.996634
6.862634
{ "github_metadata": { "branch": "development", "commit_count": 26515, "repo_created_at": "2021-04-05T06:38:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8421, "forks": 2320, "issues": 3293, "pull_requests": 98 }, "file_meta": { "conten...
36db9166-082c-4ebf-9e12-70a2b316eaa9
Dongubak/BOJ-REMIND
Prefix Sum/크리스마스인형.cpp
#include <bits/stdc++.h> #define ll long long #define MOD 20091101 using namespace std; int D[100000 + 1]; int psum[100000 + 1]; int cnt[100000 + 1]; int getClosestCommonMod(int i) { if(i <= 0) return -1; int findMod = psum[i]; int j; for(int j = i - 1; j >= 0; j--) { if(psum[j] == findMod) { retur...
ALGO
0.999857
3.915953
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-08-18T05:46: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": "3ed1d0c39a6...
2d0edbfc-75a3-4cba-825a-2d446fd3554b
SeSACAlgorithm/AlgorithmStudy
백준/시뮬레이션/17822) 원판 돌리기/태호.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; int n, m, t, sum = 0; int board[52][52]; int dx[4] = {-1, 0, 0, 1}; int dy[4] = {0, -1, 1, 0}; vector<tuple<int, int, int>> casees; vector<pair<int, int>> adress; void Input() { cin >> n >> m >> t; for (int i...
ALGO
0.999868
4.035011
{ "github_metadata": { "branch": "main", "commit_count": 3364, "repo_created_at": "2024-02-23T07:02:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e0747a314...
f5243fef-0f09-4b5f-8e4d-25f00a7da607
ishandutta2007/codeforces-h
holyk/normal/1478/A.cpp
#include <algorithm> #include <bits/stdc++.h> #define perr(a...) fprintf(stderr, a) #define dbg(a...) perr("\033[32;1m"), perr(a), perr("\033[0m") template <class T, class U> inline bool smin(T &x, const U &y) { return y < x ? x = y, 1 : 0; } template <class T, class U> inline bool smax(T &x, const U &y) { return x...
ALGO
0.99988
4.071359
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "fea600b7e359...
2524b11c-55cf-442f-b6f2-794d0ebe0330
LAGameStudio/apolune
Apolune/Matrix.cpp
// // matrix.cpp // // // #include "Matrix.h" #include "Vertex.h" // vars // functions Matrix Matrix::operator *(Matrix &m) // return MatrixMulMatrix(this, m) { Matrix temp; temp.p[_XX] = p[_XX]*m.p[_XX]+p[_XY]*m.p[_YX]+p[_XZ]*m.p[_ZX]; temp.p[_YX] = p[_YX]*m.p[_XX]+p[_YY]*m.p[_YX]+p[_YZ]*m.p[_ZX]; temp.p[_ZX...
ALGO
0.964511
3.861855
{ "github_metadata": { "branch": "trunk", "commit_count": 65, "repo_created_at": "2020-10-31T03:15:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 95, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "cccf6f53df...
41f0c897-532b-4bef-9399-6ed118b2e63d
ueda-keisuke/TopCoder
CentaurCompanyDiv2.cpp
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #include...
ALGO
0.999106
4.258373
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2012-07-23T18:32: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": "d6ec5b9e3...
3ab6541f-32fb-4e21-954d-4bc383e508a2
Trietptm-on-Coding-Algorithms/online-judge
acm/1030/cap.cpp
#include <cstdio> #include <cmath> #include <algorithm> #include <iostream> #include <algorithm> #include <iostream> #include <algorithm> #include <iostream> using namespace std; int main() { int t; scanf("%d", &t); while (t-- > 0) { int n, k; scanf("%d %d", &n, &k); long lo...
ALGO
0.999987
3.355244
{ "github_metadata": { "branch": "master", "commit_count": 196, "repo_created_at": "2017-05-25T05:02:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32c5ab3f4...
8c4ca138-b977-4ee1-a1e5-21da40d67528
pierre-dejoue/picross-solver
src/examples/src/example_1.cpp
#include <picross/picross.h> #include <cassert> #include <cstdlib> #include <iostream> int main() { // Puzzle definition const picross::InputGrid::Constraints rows { { 3 }, { 1, 1 }, { 1, 1 }, { 3 }, { 3 }, { } }; const picross::InputGrid::Constraints co...
ALGO
0.989648
6.349974
{ "github_metadata": { "branch": "main", "commit_count": 361, "repo_created_at": "2013-02-15T16:19:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90448c2b4...
a0b8dcd3-7215-4f45-ad5d-ef6a25d81a1e
mlz000/Algorithms
ACM contest/2015多校/1/11.cpp
#include <bits/stdc++.h> using namespace std; #define ls (rt << 1) #define rs (rt << 1 | 1) #define pb push_back #define mp make_pair #define F first #define S second typedef long long LL; inline void read(int &t) { int f = 1;char c; while (c = getchar(), c < '0' || c > '9') if (c == '-') f = -1; t = c - '0'; while...
ALGO
0.999747
3.973699
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2017-08-23T03:57:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cface7c...
31ce277f-40b1-4927-84e7-84924a270728
jhpc-quantum/RIKEN-braket
ket/include/ket/gate/fused/pauli_x.hpp
#ifndef KET_GATE_FUSED_PAULI_X_HPP # define KET_GATE_FUSED_PAULI_X_HPP # include <cassert> # include <cstddef> # include <array> # include <algorithm> # include <utility> # include <type_traits> # include <ket/qubit.hpp> # include <ket/control.hpp> # include <ket/gate/fused/gate.hpp> # include <ket/gate/utility/index...
ALGO
0.982289
6.206135
{ "github_metadata": { "branch": "master", "commit_count": 500, "repo_created_at": "2017-11-13T08:21:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 17, "forks": 1, "issues": 24, "pull_requests": 1 }, "file_meta": { "content_id": "178ca76...
b8545260-e7cf-462b-bd58-35c84bb891b9
AshwinKanna/practice-tasks
data-structures/tree/binary_tree/complete_binary_tree.cpp
// Construct Complete Binary Tree from an array // Left child of element at index i = 2i+1 // Right child of element at index i = 2i+2 #include <iostream> using std::cout; using std::endl; class node { public: int value; node *left = nullptr; node *right = nullptr; }; class complete_b_tree { pub...
ALGO
0.999637
6.041224
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-05-01T08:11: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": "e7dc7403e...
798702e6-78d9-4510-8de3-274bd2e990ba
PiusLim373/leetcode_and_hackerrank
leetcode/algo2/day14/413_arithmetic_slices.cpp
#include <iostream> #include <vector> int numberOfArithmeticSlices(std::vector<int> &nums) { if (nums.size() < 3) return 0; std::vector<int> count(nums.size(), 0); int last_diff = -999; int diff_count = 0; for (int i = 1; i < nums.size(); i++) { int curr_diff = nums[i] - nums[i ...
ALGO
0.999428
5.661952
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-01-29T02:58: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": "43733d28f1a8...
653a2326-18b3-4768-92ba-bd08fe7e7cf6
KENEW/Algorithm
14888.cpp
//#include<iostream> //#include<algorithm> //#include<vector> //using namespace std; // //int N; // //vector<int> int_vec; //vector<int> now_cal_method; // //int cal_method[4]; // //int min_ = 1000000000, max_ = -1000000000; // //void calculator() //{ // int result = int_vec[0]; // for (int i = 0; i < N - 1; i++) // { ...
ALGO
0.99993
3.661587
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2020-04-17T16:03:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "169fe0ea3...
9869eaf4-fbdb-4a09-a054-786dc6cc6784
codingJokerr/codetree-TILs
240820/Next Level/next-level.cpp
#include <iostream> #include <string> #include <utility> using namespace std; // class User { // public: // string id; // int lev; // User(string i ="", int lev =0) { // this->id = id; // this->lev = lev; // } // }; // User 정보 나타내는 pair 선언 pair<string, int> user1 = make_pair("codetre...
TOOL
0.993722
4.499293
{ "github_metadata": { "branch": "main", "commit_count": 431, "repo_created_at": "2024-01-28T10:40: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": "ca336df964...
c4c2274e-41c2-4075-bf82-5dd63552ea3f
stwind/atcoder
contests/bitflyer2018-qual/D/main.cpp
// https://emtubasa.hateblo.jp/entry/2018/11/09/103321 // https://sen-comp.hatenablog.com/entry/2019/11/29/163258 // https://blog.hamayanhamayan.com/entry/2018/06/02/235536 #include <bits/stdc++.h> using namespace std; // clang-format off #define REP(i, x, y) for(int i = x; i < y; i++) #define REPR(i, x, y) for(int i...
ALGO
0.999904
4.069221
{ "github_metadata": { "branch": "main", "commit_count": 893, "repo_created_at": "2020-06-18T11:43: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": "931ed56d8f...
e5fdfd3e-712c-4195-bd8a-a7eb7974489a
berkeley-container-library/bcl
bcl/containers/sequential/SparseHashAccumulator.hpp
// SPDX-FileCopyrightText: 2021 <NAME> // // SPDX-License-Identifier: BSD-3-Clause #pragma once #include <cstdio> #include <stdexcept> #include <unordered_map> #include <unordered_set> #include <queue> #include <numeric> #include <bcl/core/detail/hash_functions.hpp> #include <bcl/containers/sequential/CSRMatrix.hpp...
ALGO
0.976995
7.135784
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2019-05-21T22:00:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 124, "forks": 20, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "b7dc4e...
6e775a33-20ae-4158-8966-49578072ef53
WAduck/cutekibry-s-documents
C++/Online Judges/LOJ104 普通平衡树/104-fhqtreap.cpp
/* Algorithm: Fhq Treap Time complexity: O(n log n) */ #include <cstdio> using namespace std; const int SCP=682*999/6, SPN=682999173; int val[SCP], size[SCP], times[SCP], lson[SCP], rson[SCP], rnd[SCP], rt, cnt; int x, y, z, ans, i, j, k, l, r, n, m, rk, p, opt; int seed=SPN>>1; inline int find(int p, int x){ for(; val...
ALGO
0.999983
4.304026
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2018-11-05T11:42: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": "78118695c...
c8bb2751-c665-4d8c-8372-2ce5750c0703
Kirtan-Rajesh/DSA
Binary Tree/checkheightbalanced_binaryTree.cpp
#include<iostream> using namespace std; // for each node, the difference between the highest // of the left subtree and right subtree <=1 /* 1 2 3 4 5 6 7 */ struct Node{ int data; Node* left; Node* right; Node(int val){ data=val; left=NULL; right=N...
ALGO
0.999861
4.10695
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-02-02T17:33:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8dafefa01196...
5f179ece-1d4c-47bc-ae23-1abe80c170f1
Kim-dongeon/Algorithm
06 algorithm/2_팰린드롬만들기.cpp
/* 문제 팰린드롬이란, 앞으로 읽으나 뒤로 읽으나 똑같은 문자열을 말한다. 예를 들어, “abcba”, “abccba” 등이 있을 수 있다. 문자열이 주어질 때, 이를 팰린드롬으로 만들기 위하여 추가해야 하는 최소의 문자 개수를 출력하는 프로그램을 작성하시오. 예를 들어, 문자열이 “abca” 로 주어질 경우, ‘b’만 추가하면 “abcba” 를 만들 수 있으므로, 이 때는 1개의 문자만 추가하면 된다. 또 다른 예로써, 문자열이 “adcba” 로 주어질 경우에는, 문자 2개를 추가해야 한다. 입력 첫 번째 줄에 문자열이 주어진다. 이 문자열의 길이는 1,00...
ALGO
0.999982
4.331396
{ "github_metadata": { "branch": "master", "commit_count": 195, "repo_created_at": "2018-01-08T07:34:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b51b0c96...
67a53eb2-c6e2-48aa-8dd0-417bdc372096
NilanshBansal/DataStructures
programstool/generictree/check2treesarestructurallyidentical.cpp
Given two Generic trees, return true if they are structurally identical i.e. they are made of nodes with the same values arranged in the same way. Input format : Line 1 : Tree 1 elements in level order form separated by space (as per done in class). Order is - Root_data, n (No_Of_Child_Of_Root), n children, and so o...
ALGO
0.995497
5.10128
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2018-06-26T19:18:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a9ca285b...
c21e133e-f03a-474e-8714-edddc8aa59d5
zhang-peixiang/c_class_code
PriorityQueue/PriorityQueue/test.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> using namespace std; #if 0 #include <queue> #include <vector> #include <functional> // 优先级队列---堆排序 int main() { // 优先级队列默认为:大堆 priority_queue<int> p; // 初始化1 p.push(0); p.push(1); p.push(2); p.push(3); p.push(4); p.push(5); cout << p.size() << endl; cout <...
ALGO
0.998873
4.758434
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2020-03-28T11:55: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": "14ada2ed6...
33d8fb6a-8659-45b7-bf16-d5c51d66147d
cswni/ejercicios-programacion-somoto
ejercicio-4.cpp
/* Hacer un programa en donde el usuario introduzca un numero y nos de como resultado la suma de los multiplos de 4 que hay entre el 1 hasta ese numero. POr ejemplo si el usuario escribe 10 la suma de los multiplos de 4 es 12. */ #include <stdio.h> main (){ printf ( "\n\tHacer un programa en donde el usuario introduz...
ALGO
0.999101
3.298272
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-07-08T23:01:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4effb2835...
3c448ded-cd25-4934-a168-95eee8d42f5a
xiyanykt/code
Codeforces/2028/C.cpp
#include<bits/stdc++.h> using u32 = unsigned int; using i64 = long long; using u64 = unsigned long long; using f64 = long double; using i128 = __int128; using u128 = unsigned __int128; using f128 = __float128; #ifndef ONLINE_JUDGE #include "algo/debug.hpp" #else #define debug(...) (void)42 #endif template<class T> c...
ALGO
0.999958
5.068608
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-04-23T01:10: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": "1de9243ceeb...
17677b18-06c2-4ddb-aff7-e1c3193244e1
misteraverin/graph-drawer
TimGA.cpp
// // Created by Roman on 17/02/2017. // #include "TimGA.h" bool cmpIndividuals(Individual individual1, Individual individual2) { return individual1.fitness() < individual2.fitness(); } Individual TimGA::evolve() { std::vector<Individual> population; for (int i = 0; i < parameters.maxPopulationSize; ++i)...
ALGO
0.999987
4.869112
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-01-29T13:57: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": "e9c2859b5...
aa6e4aa6-67f7-4685-b273-0ef01d3be0ad
mmm2sp/MIPT_2sem
week2/Task9.cpp
#include <iostream> using namespace std; /* * Проверка правильности скобочностной последовательности (заканчивается @) */ bool sequence_is_correct(char last_bracket) { bool answer = true; char c; do { cin >> c; if (c == '(' || c == '[' || c == '{' || c == '<') { answer = seq...
ALGO
0.970702
3.96227
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2022-02-01T15:01: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": "7bbe713233c...
6d6aa249-e6a1-4317-bd6c-3a5b2bcbec46
HelloWorldZTR/OICodes
number.cpp
/* This Program has Been Accepted */ #include<iostream> #include<cstdio> #include<cstring> using namespace std; const int NUMM=15; string dic[4700]; // The Defalut Value Is int dic_[4700][NUMM]; //All 0,Or There will be int num[NUMM]; //some undefine char numc[NU...
ALGO
0.999811
3.161877
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-11-03T04:32: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": "124967952...
ab37d527-854d-4023-9661-7df1787f982b
kaydenpham27/Competitive-Programming
Solutions/CSES/Sorting_And_Searching/josephus_problem_2.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define i64 long long #define mp make_pair #define pb push_back #define all(x) (x).begin(), (x).end() #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tr...
ALGO
0.999989
4.383952
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2024-01-05T08:05:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0cbce2377c5...
075e64fb-bcb7-4f1f-96e7-54a798f370e0
nvkuy/CompetitiveProgramming
CodeForces/Codeforces Round 862 (Div. 2)/A.cpp
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update> #pragma GCC optimize("O3,unroll-loops") #pr...
ALGO
0.999885
4.800001
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2022-01-21T04:40:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1894d375...
becab3f8-94b4-43ed-a9b3-a2e6840e3a56
zhangzisu/sources
_collection/LOJ/2585.cpp
#include <algorithm> #include <cstdio> #include <cstring> #include <queue> #include <set> #define MAXN 300010 #define MAXM 10000010 const int INF = 0x3f3f3f3f; std::multiset<int> pos[MAXN]; int n, k, q, m, root, all, tot, cnt; int ans[MAXN], id[MAXM], L[MAXM], R[MAXM], min[MAXM]; struct operation { int op, x, t, k; i...
ALGO
0.999972
3.992895
{ "github_metadata": { "branch": "Online-Judge", "commit_count": 361, "repo_created_at": "2018-03-11T08:30:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "51...
9751ec58-1d8e-4048-87a0-1b49c67d73ee
idriss-arto/leetcode
1287.有序数组中出现次数超过-25-的元素.cpp
/* * @lc app=leetcode.cn id=1287 lang=cpp * 二分查找 * [1287] 有序数组中出现次数超过25%的元素 */ /* 思路: 满足条件的整数 x 至少在数组 arr 中出现了 span = arr.length / 4 + 1 次, 那么我们可以断定:数组 arr 中的元素 arr[0], arr[span], arr[span * 2], ... 一定包含 x。 我们可以使用反证法证明上述的结论。假设 arr[0], arr[span], arr[span * 2], ... 均不为 x, 由于数组 arr 已经有序, 那么 x 只会连续地出现在 arr[0], arr[s...
ALGO
0.99995
6.009936
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2024-12-15T13: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": "054b308e05...
a0e89d9a-501a-44b3-99ee-9d89875d0e61
Andro-human/SWAYAM-Problem-Solving
Homework/Dynamic Programming 2/Friends Pairing Problem.cpp
// DP SOLUTION class Solution { private: int mod = 1000000007; public: int countFriendsPairings(int n) { vector<long long> dp (n+1, 0); dp[0] = 1; dp[1] = 1; for (int i=2; i<=n; i++) { dp[i] = (dp[i-1] + ((i-1)*dp[i-2])%mod)%mod; } ...
ALGO
0.999997
5.464178
{ "github_metadata": { "branch": "main", "commit_count": 98, "repo_created_at": "2024-03-09T11:54: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": "f8e260eb2e3...
0819d829-88cb-480a-aceb-d98c49935f38
zombiesquirrel/vxdtf
modules/trasan/src/TCircleFitter.cc
//----------------------------------------------------------------------------- // $Id: TCircleFitter.cc 10129 2007-05-18 12:44:41Z katayama $ //----------------------------------------------------------------------------- // Filename : TCircleFitter.cc // Section : Tracking // Owner : <NAME> // Email : <EMAIL> ...
ALGO
0.986591
5.901802
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2013-09-10T12:59: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": "8ecd76b5f...
fb1e5602-633d-4ae5-9967-949e284b27ba
AdityaKarn/cp-cpp
codeforces/1409/E.cpp
#include <iostream> #include <vector> #include <algorithm> #include <climits> #define REP(i, n) for (int i = 1; i <= n; i++) #define mod 1000000007 #define pb push_back #define ff first #define ss second #define ii pair<int, int> #define vi vector<int> #define vii vector<ii> #define lli long long int #define INF 10000...
ALGO
0.999649
3.772241
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2020-04-15T12:20: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": "2a052d0da...
aff3ba5d-e0d0-41f4-98d1-9302852800f9
UCL/STIR
src/include/stir/numerics/BSplines1DRegularGrid.inl
/* Copyright (C) 2005 - 2009-10-08, Hammersmith Imanet Ltd Copyright (C) 2013, University College London This file is part of STIR. SPDX-License-Identifier: Apache-2.0 See STIR/LICENSE.txt for details */ /*! \file \ingroup BSpline \brief Implementation of the B-Splines Interpolation \auth...
ALGO
0.994409
6.611712
{ "github_metadata": { "branch": "master", "commit_count": 9261, "repo_created_at": "2015-09-28T07:44:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 125, "forks": 96, "issues": 305, "pull_requests": 38 }, "file_meta": { "content_id": "ab...
8c7fb79c-c30f-4b20-ad2a-a880c95c387c
VishalSaha001/DSA_practice
sparseTable.cpp
#include <vector> #include <math.h> #define max(a, b) (a) > (b) ? (a) : (b) class sparseTable { private: std::vector<std::vector<int>> table; int m, n; void build(std::vector<int> &arr) { table[0].resize(n); for (int i = 0; i < n; i++) table[0][i] = arr[i]; for (int...
ALGO
0.9999
5.061609
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2023-10-08T13:17: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": "b645de6d8...
7cc932a0-7d8a-435e-8525-ccddf47bb43a
TheePreyy/Learning
RPSLP.cpp
/* A game of rock paper scissors with an added twist*/ #include <iostream> using namespace std; int main() { // Live long and prosper srand (time(NULL)); int computer = rand() % 5 + 1; int user = 0; cout << "Rock Paper Scissors!\n"; cout << "1) Rock\n"; cout << "2) Paper\n"; cout << "3) Scissors...
TOOL
0.984981
3.849888
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-27T20:18:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4d8b1f1e666...
ec1b0df5-6cbb-4cbf-b2f0-cdbbe7003cf8
YatharthChauhan2362/C-Plus-Plus
C++ Concepts/65_List.cpp
// List in C++ // This program was created by <NAME> /* -> A List is a bi-directional linear storage of elements. Few key features as to why a list should be used is, 1. It gives faster insertion and deletion operations. 2. Its access to random elements is slow. -> Write some code using lists and its methods 1. Bef...
ALGO
0.971527
5.665352
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-09-11T04:43:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1aa6330a4f0...
c193a65a-a48c-48e0-a2dd-9d87e9a0e386
DIGUIMRBS/Atividade-de-Estrutura-de-Dados
Estrutura2.cpp
#include <iostream> class Pilha { private: int *dados; int topo; int tamanhoMaximo; public: Pilha(int tamanhoMax) { tamanhoMaximo = tamanhoMax; dados = new int[tamanhoMaximo]; topo = -1; } ~Pilha() { delete[] dados; } bool estaCheia() { return ...
ALGO
0.995798
5.745449
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-07T18:13: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": "0de26bd1c132...
47883427-aaee-41f2-8b99-c67ce4ba6a2f
lesc-ufv/fast_flow_cloud
benchmarks/hls/sobel_naive/src/krnl_sobel_naive.cpp
/********** Copyright (c) 2020, Xilinx, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the fol...
ALGO
0.989106
5.507222
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2021-09-01T01:09:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c171b827141...
9683542b-7ee3-4419-a2f8-449f4de62926
ishandutta2007/codeforces-w
wenhao801/normal/1558/A.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <vector> using namespace std; inline int read () { int ret = 0, t = 1; char c = getchar(); while ((c < '0' || c > '9') && c != '-') c = getchar(); if (c == '-') t = -1, c = getchar(); while (c >= '0' && c <= '9') ret = ret * 1...
ALGO
0.999953
3.512844
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16: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": "cacdddc137d5...
4fa60cfe-3db9-4fc9-9e6a-6b92b0bd89df
alps-jbnu/23ALPStudy
2023-1/Intermediate/kimmi7574/MST/10423.cpp
#include <bits/stdc++.h> using namespace std; vector<tuple<int, int, int>> edge; vector<int> installed_city; int parent[1002]; int find(int x) { if (parent[x] == x) return x; else return parent[x] = find(parent[x]); } void merge(int x, int y) { x = find(x); y = find(y); if (x < y) parent[y] = x; else paren...
ALGO
0.99992
4.598376
{ "github_metadata": { "branch": "main", "commit_count": 2930, "repo_created_at": "2023-02-03T06:11:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 59, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73f307ee...
a7dae135-cf14-42ef-9f22-90c4f4ab98c9
jemmy512/software-engineer
Algorithm/LeetCode/Search/752-open-the-lock.cc
/* Medium You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap around: for example we can turn '9' to be '0', or '0' to be '9'. Each move consists of turning one wheel one slot. The lock initially starts...
ALGO
0.999347
6.329854
{ "github_metadata": { "branch": "master", "commit_count": 1797, "repo_created_at": "2017-05-25T07:01:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07125...
18bb56c5-11f2-4d5b-9e2d-6a12b789aecc
GauthamBanasandra/DSLib
DSLib/Lib/Knapsack/Knapsack.cpp
#include "Knapsack.h" #include <numeric> ChangeMaker::ChangeMaker(const std::vector<int>& coins) : coins_(coins) { memo_.resize(coins_.size(), std::vector<CountInfo>(std::accumulate(coins_.begin(), coins_.end(), 0) + 1)); } // Using Knapsack to compute the minimum number of coins, when the availability of coins are...
ALGO
0.999284
5.806035
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2017-11-01T12:06: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": "3e07b1aa...
7358991c-e88a-431c-81a7-e442c4617aef
jack-coding/WZQ_game
gamemodel.cpp
#include"gamemodel.h" #include<QTimer> #include<QDebug> GameModel::GameModel() { } void GameModel::startGame(GameType type) { gameType=type; //初始化棋盘 gameMapVec.clear(); for(int i=0;i<BOARD_GRAD_SIZE;i++) { std::vector<int> lineBoard; for(int j=0;j<BOARD_GRAD_SIZE;++j) { ...
TOOL
0.927413
4.565899
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-07-26T11:09: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": "d9bdaf01fc...
0c16de94-1bb4-4733-b498-6f0bd31a38ae
Valifirt/NORSI_geo_2017
class_version/Graph.cpp
// // Created by Valifirt on 17/07/17. // #include <iostream> #include <math.h> #include <cmath> #include <queue> #include <limits> #include <sys/stat.h> #include <cstring> #include "Graph.h" Graph::Graph(std::string path, std::vector<std::pair<float, float>> vector_r) { this->name = path.substr(path.rfind("/") ...
ALGO
0.978401
3.670539
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2017-07-10T08:19: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": "ec792b5fe...
bbddbacf-28e2-4f20-8447-be4780efe472
endlessm/chromium-browser
third_party/libgav1/src/src/dsp/x86/warp_sse4.cc
// Copyright 2020 The libgav1 Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
ALGO
0.998686
7.001219
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2015-07-03T21:40:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 18, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "ca99a266...
57e863f4-6b63-4cea-b0a6-0181f53f9874
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0708/personal_submission/cf1585d_Equinox.cpp
#include <bits/stdc++.h> using i64 = long long; using i128 = __int128; using PII = std::pair<int, int>; const int inf = 1e9 + 7, P = 998244353; template<typename T = int> class FenWick { private: int n; std::vector<T> tr; public: FenWick(int _n) : n(_n), tr(_n + 1) {} FenWick(int _n, std::vector<...
ALGO
0.999978
4.56293
{ "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": "70ca...
63b6d477-dd82-4d0a-a10d-5764ddef1237
3abqreno/ProblemSolving
C/71-Dividing coins(iteration).cpp
// _____ _ // |____ | | | // / / __ _| |__ __ _ _ __ ___ _ __ ___ // \ \/ _` | '_ \ / _` | '__/ _ \ '_ \ / _ \ // .___/ / (_| | |_) | (_| | | | __/ | | | (_) | // \____/ \__,_|_.__/ \__, |_| \___|_| |_|\___/ // | | // |_| #include<iostream> #incl...
ALGO
0.99992
4.875607
{ "github_metadata": { "branch": "main", "commit_count": 346, "repo_created_at": "2022-08-05T12:03:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91b2a0a6e4...
2ef60721-df2c-4e41-8ee3-64472e75aea6
ververica/ForSt
db/seqno_to_time_mapping.cc
// Copyright (c) Meta Platforms, Inc. and affiliates. // // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). #include "db/seqno_to_time_mapping.h" #include "db/version_edit.h" ...
ALGO
0.982719
6.507307
{ "github_metadata": { "branch": "main", "commit_count": 12429, "repo_created_at": "2024-02-02T08:57:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 97, "forks": 19, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "50d69d0...
74f2fd6b-f208-4335-a055-903bc34dfefd
xuannhat1203/SS14-BTC
BT03.cpp
#include<stdio.h> #include<string.h> int main() { int str[100]; int *ptr = str; int str2[100]; int *ptr2 = str2; int str3[100]; int *ptr3 = str3; int str4[100]; int *ptr4 = str4; do { printf("\n*********MENU********\n"); printf("1. Nh?p vào m?ng\n"); pr...
TOOL
0.954458
3.345847
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-29T17:14: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": "685abceb2a70...
fae71c44-c62e-4aac-ae99-6cc01b2dc335
michaelehab/LeetCode-April-Challenge-2022
535.Encode-and-Decode-TinyURL.cpp
class Solution { unordered_map<string, string> tmp; int last = 0; public: // Encodes a URL to a shortened URL. string encode(string longUrl) { string s ="http://tinyurl.com/" + to_string(last++); tmp[s] = longUrl; return s; } // Decodes a shortened URL to its original U...
ALGO
0.966195
5.679575
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2022-04-01T19:55:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4faffc4d9b7...
4b5ac02f-b794-4c40-b2cd-19c23ed836ad
singh-saubhagya/Cpp-programs
PHASE_2/binarysearch/tempCodeRunnerFile.cpp
#include<bits/stdc++.h> using namespace std; typedef long long lli; #define endl '\n' #define tab '\t' vector<lli> arr; lli n, k; bool check(lli mid) { lli count=1; lli st=arr[0]; for(lli en=1;en<n; en++ ) { if(arr[en]-arr[st]>=mid) { count++; st=en; ...
ALGO
0.999975
5.050412
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-07-01T16:15:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fe6c152e790...
404103bf-1079-4756-b311-34d5a2afc11b
BlackRob/Euler
p3/primethis.cpp
#include<cstdlib> #include<iostream> #include<vector> using namespace std; void factorize( unsigned long long, *vector<int> ); int genAPrime( *vector<int> ); int main(){ unsigned long long number; vector<int> primes; primes.push_back(3); cout << "Enter a number, and I will factor it into primes " ; cin >> numbe...
ALGO
0.99968
3.686899
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2011-11-06T05:28: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": "6e33c1a85...
2de22e1f-7d57-4722-99df-560b5a863991
ionut-mntn/Laboratoare-OOP-Cpp
l4root/ApothekeRepo.cpp
#include <iostream> #include "ApothekeRepo.h" #include "Medikation.h" #include <algorithm> using namespace std; ApothekeRepo::ApothekeRepo() { //konstruktor } void ApothekeRepo::hinzufugen(Medikation m) { //hinzufugt ein Medikament istoric_undo.push_back(med); //salvez in istoric inainte sa adaug cv nou med.pu...
TOOL
0.940043
3.541673
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-03-02T17:29: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": "93385f97a770...
be2dc1b1-7d89-4535-a832-f0f90e8db88a
andreaunitn/Sort-Visualizer
utils.cpp
#include "utils.hh" void generate_random_numbers(std::vector<int>& vec) { std::random_device dev; std::mt19937 gen(dev()); std::uniform_int_distribution<std::mt19937::result_type> dist(1, 100); for(unsigned int i = 0; i < NUM_ELEM; i++) { vec.push_back(dist(gen)); } } void update_vect...
ALGO
0.992926
4.499261
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-01-21T15:18: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": "057f51175819...
945cf699-aa77-4406-bce1-4cf4434cea1b
fengyoung/metis
src/platform/metis_train.cpp
#include <iostream> using namespace std; #include "MasterTrainer.h" #include "MasterTrainer_Perceptron.h" #include "MasterTrainer_MLP.h" using namespace metis_plat; #include <stdio.h> #include <string.h> class CmdParams { public: CmdParams() { incr = 0; } virtual ~CmdParams() { } void Clear() { out_mod...
DATA
0.95
4.722707
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-06-15T08:56:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "81ae20fc6...
9a4e6694-7971-495f-a025-6d543d73ec0f
TanyaZavyalova/TCHMK
function2.cpp
#include "function2.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #define block 200 veryLong::veryLong() { binary=false; sign='+'; length=0; number=NULL; } int veryLong::rd(char *inputFile) { length=readd(&number,inputFile,&sign); return 0; } int veryLong::rdb(char *inputFil...
TOOL
0.961326
3.146821
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2015-06-10T07:26: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": "bb9baaef4...
14935546-3fc4-4933-bb8d-74110e693399
aosm/graphviz
graphviz/dynagraph/common/Line.cpp
/* Copyright (c) AT&T Corp. All rights reserved. This software may only be used by you under license from AT&T Corp. ("AT&T"). A copy of AT&T's Source Code Agreement is available at AT&T's Internet website having the URL http://www.research.att.com/sw/tools/graphviz/license/ If you received this software w...
ALGO
0.999241
4.978054
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2013-03-22T20:32:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fba336c88fd...
931408eb-94f4-479e-ab7d-74656228e577
tikhoncheva/work
Compopt/Drafts/FAP_BranchCut2/AlgBronKerbosch.cpp
/* * <NAME> Algorithm * * Algorithm (classic formulation) for finding a maximal complete subgraph in * the given graph * */ void enumirateCliques1(const std::vector<std::vector<int> > G, std::set<int> & C, std::set<int> Cand, std::set<int> Not, std::vector<std::set<int> >& listC) { if (Cand.empty() && Not.e...
ALGO
0.999977
4.83095
{ "github_metadata": { "branch": "master", "commit_count": 192, "repo_created_at": "2014-04-22T10:06:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b801bf8...
08f5dc51-6c09-417c-91e4-1f9a676d5a45
InitGo/acwing
z笔试真题/intel/1.cpp
#include <bit/stdc++.h> using namespace std; bool check(string a, string b) { for (int i = 0; i < b.size(); i ++ ) { if (b[i] != '?') { if (b[i] != a[i]) return false; } } return true; } int main() { } //xxxx-xx-xx string get_date(string s) { string year = s.substr(0, 4); string mon =...
ALGO
0.998799
3.953002
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2022-10-02T02:38:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f919bc418...
902751d7-4a94-4891-8d1d-84942df669b7
Joseeelv/Universidad
2º Carrera/2º Cuatrimestre/Estructura de Datos No Lineales/EjerciciosExamenÁrboles/Septiembre2022.hpp
/*Construye una función que, dado un Árbol Binario, devuelva true si es un AVL y false en el caso contrario.*/ #include <iostream> #include "../Árboles/abin.h" //Para que un abin sea un AVL, este tiene que ser un ABB y estar equilibrado. template <typename T> bool esAVL(const Abin<T> &A){ bool flag = esABB(A.raiz()...
ALGO
0.998684
4.647614
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2024-03-06T12:30:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74ea0fe25b6...
b6d92058-a278-4dc4-9a05-171ae66f6ffc
MOHAMMED1MEDHAT/icpc-assuit-solutions
array/Neighbors.cpp
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { string answer = "yes"; int n, m, x, y; cin >> n >> m; char arr[n][m]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> arr[i][j]; } } cin >> x >> y; ...
ALGO
0.999905
4.470032
{ "github_metadata": { "branch": "newComers", "commit_count": 6, "repo_created_at": "2022-09-06T14:14:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cde7439...
91daf49f-eb6d-4809-b326-24f1500ff849
ankan-ekansh/Competitive-Programming
CodeChef practice/RAINBOWA.cpp
#include<bits/stdc++.h> using namespace std; int main(){ #ifndef ONLINE_JUDGE freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin>>t; while(t--){ int n; ...
ALGO
0.99977
4.068952
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-07-03T18:45:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eea3156cae...
21e17197-8212-4f66-88de-3e5fb53db483
isso1550/MSWIO_24Z
cw9/CW 9 - EA_OPT/EA_calculations.cpp
// EA algorithm implementation (c) <NAME> - Warsaw University Of Technology // // 2020-12-04 #include <cstring> #include <math.h> #include <ctime> #include <stdio.h> /* printf, fopen */ #include <stdlib.h> /* exit, EXIT_FAILURE */ #include "ea.H" #include "problem.h" extern int NTRANSF; extern int ...
ALGO
0.99998
4.791485
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-11-24T11:31: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": "0e5b5571e9d...
1438af24-b893-4701-9cee-c56436e9ca85
LOVKUSH9888/DSA-Basics
Sorting-Algo's/bubbleSort.cpp
//This loop works by comparing adjacent //This is optimized already #include <iostream> using namespace std; void bubbleSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { // loop through the entire array bool swapped = false; // keep track of whether any swaps were made // loop through ...
ALGO
0.999982
5.043774
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2023-02-08T01:09:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "07937f97...
68393b3a-ce8c-4a79-9e3a-b30bd067726e
gallegoj/tfarima
src/outliers.cpp
#include "RcppArmadillo.h" #include "outliers.h" #include "res.h" #include "diff.h" #include "pol.h" #include "gls.h" using namespace arma; void tratioC(int tau, arma::colvec &x, const arma::colvec &y, double &b, double &t) { int i, N; double Sxx, Sxy; N = y.n_elem; Sxx = Sxy = 0; for (i = tau; i < N; i++) ...
ALGO
0.985108
3.923816
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2021-03-23T15:12:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3aa8a1b28...
763a5dec-6dcb-47ac-b5d8-c0bf11cf4a99
maj42/top_cpp
top_c++/homework_22/homework_22.cpp
#include <iostream> using namespace std; void task1(); void task2(); int main() { srand(time(0)); //task1(); //task2(); } void task1() { int arr[3][4]; for (int i = 0; i < 3; ++i) { for (int j = 0; j < 4; ++j) arr[i][j] = rand() % 2; } int zeroes = 0; for (int i = 0; i < 3; ...
ALGO
0.998675
3.673263
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2023-11-25T18:21: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": "ef87f1c9e...
65c07539-e531-4cd9-92a2-b9699a073226
Balaji4/LetUsC
Misc/CGLAB/LAB1.CPP
#include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> void Lined(int x0,int y0,int x1,int y1,int c); int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode,x1,x2,y1,y2; /* initialize graphics mode */ initgraph(&gdriver, &gmode, ""); /* read resul...
ALGO
0.956583
3.529655
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-11-26T20:41: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": "1b08c7d798cf...
b4dd2181-7b5a-474e-beb6-50a1ab390967
CodeB3nder/Data_Structures_and_Algorithms-
AtCoder/BC170/not_divisible.cpp
#include <bits/stdc++.h> using namespace std; #define fo(i, n) for (int i = 0; i < n; i++) #define ll long long #define pb push_back #define mp make_pair #define F first #define S second #define all(x) x.begin(), x.end() #define clr(x) memset(x, 0, sizeof(x)) #define sortall(x) sort(all(x)) #define tr(it, a) for (auto ...
ALGO
0.999817
3.886328
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2020-04-05T03:33: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": "474ea9d0b...
bc7a4965-ebbc-4731-b158-cb37400014ee
abhiramdapke/Independent-projects
Linked-List/Creating and finding the length of a doubly Linked List.cpp
#include <iostream> using namespace std; struct Node { int data; struct Node *prev; struct Node *next; }*first = NULL; void create(int a[], int n) { struct Node *t,*last; int i; first = new struct Node; first->data = a[0]; first->prev = first->next = NULL; last = first;...
ALGO
0.999679
5.260829
{ "github_metadata": { "branch": "master", "commit_count": 384, "repo_created_at": "2020-01-22T23:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "795f8424...
5ec9fb79-89e9-45d7-b4d4-7eafc1aac125
saiabhiteja/Data-Structures-and-Algorithms
450-questions/array/arrays_6.cpp
#include <bits/stdc++.h> using namespace std; #define vec vector<int> #define pp pair<int,int> #define ll long long #define mod 1e9+7 #define fo(i,n) for(i = 0;i<n;i++) void display(vec arr){ int i = 0; fo(i,arr.size()){ cout<<arr[i]<<" "; } cout<<endl; } /* find union and intersection of tw...
ALGO
0.999967
4.833251
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-07-11T18: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": "dcd7152148e5...
63fbe62e-0c0b-4fae-9a23-a896fd37200e
webosose/chromium91
src/third_party/libjxl/src/lib/jxl/jpeg/enc_jpeg_huffman_decode.cc
// Copyright (c) the JPEG XL Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
ALGO
0.989371
6.35814
{ "github_metadata": { "branch": "master", "commit_count": 220, "repo_created_at": "2022-02-18T03:16:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "60e52a488...
9e2b566c-3c98-4716-82b5-d31a08a377a3
arifpirxada/dsa
Stack/Stack_Problems/min-stack.cpp
#include <stack> using namespace std; // https://leetcode.com/problems/min-stack/ class MinStack { private: stack<int> mainStack; stack<int> minStack; public: MinStack() {} void push(int val) { mainStack.push(val); if (minStack.empty() || val <= minStack.top()) { minStac...
ALGO
0.999524
6.538378
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2023-12-14T16:51: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": "603f5dbc8...
6da5b012-bf50-40df-9a7b-3e2f5781a14c
ag-wnl/usaco
silver/room_allocation.cpp
#include<bits/stdc++.h> using namespace std; #define ff first #define ss second #define ll long long #define zerobits(x) __builtin_ctzll(x) #define setbits(x) __builtin_popcountll(x) #define all(x) (x).begin(), (x).end() #define pb push_back #define vi vector<int> #define invectr(x) \ for (auto &i : x) \ ...
ALGO
0.99999
4.362544
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-10-07T11:09: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": "30e5f958b309...
b6ef90b9-cb97-4c47-849e-59278b04630c
WHS241/Algorithms
structures/src/structures/binary_search_tree_naive.tpp
#ifndef PRIMITIVE_BINARY_SEARCH_TREE_CPP #define PRIMITIVE_BINARY_SEARCH_TREE_CPP namespace tree { template<typename T, typename Compare> template<typename, typename> basic_binary_search_tree<T, Compare>::basic_binary_search_tree(bool duplicates) : binary_search_tree<T, Compare>(duplicates) {} template<typename ...
ALGO
0.997517
6.291727
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2019-07-07T13:38: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": "fab9184af...
0ed2afc7-5c9a-4c6e-9f48-b2e11031493e
Lan-ce-lot/overflow
总结/模板/dp/最长不降子序列/牛客团队G.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<stack> #include<vector> #include<map> #include<set> #include<bitset> #include<string> #include<cmath> #include<sstream> using namespace std; typedef long long ll; const double pi=acos(-1.0); const int eps=1e-10; const int...
ALGO
0.999931
3.607287
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2020-07-12T14:35: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": "6e95000bf...
bd012821-897d-470c-9983-1bf4621be944
smoe1/ThesisCode
dogpack-mapped/lib/2d/cart/ApplyPosLimiter.cpp
#include<cmath> #include "DogParams.h" #include "dogdefs.h" #include "dog_math.h" #include "Legendre2d.h" void ApplyPosLimiter(const dTensorBC4& aux, dTensorBC4& q) { double Min(double, double); const int mx = q.getsize(1); const int my = q.getsize(2); const int meqn = q.getsize(3); const int k...
ALGO
0.999705
4.398187
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-06-04T20:02:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab2f685d60...
d19ea159-f81c-4bbe-ba63-28848b503524
wangjula/PostgraduateAdmissionTest
PostgraduateAdmissionTest/PostgraduateAdmissionTest/uva_1368_dna_consensus.cpp
// // uva_1368_dna_consensus.cpp // PostgraduateAdmissionTest // // Created by 王久亮 on 2019/4/14. // Copyright © 2019年 王久亮. All rights reserved. // #include "uva_1368_dna_consensus.hpp" #include <iostream> #include <string> #include <vector> #include <map> using namespace std; int test_uva_1368_dna_consensus() { ...
ALGO
0.999957
4.962746
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-04-14T10:57:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64b234686...
14e96bec-a3c2-4592-b540-e40da751b059
Jeffneck/Webserv
includes/ConfigParser.hpp
#ifndef CONFIGPARSER_HPP #define CONFIGPARSER_HPP #include <string> #include <vector> #include <map> #include "Config.hpp" #include "Server.hpp" #include "Location.hpp" #include "Exceptions.hpp" /** * @class ConfigParser * * The `ConfigParser` class is responsible for parsing the configuration file for the web se...
CONFIG
0.981409
7.32449
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-11-06T15:31: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": "29acaa38556...
79131ab2-d488-4aa2-8b93-82f4eb723e1c
Mithril0rd/ComplexCode
cf452f.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int MAX_N = 300007; #define lson idx<<1 #define rson lson|1 struct Node { int l, r, sum; Node() { } Node(int _1, int _2, int _3) { l = _1, r = _2, sum = _3; } }; int n; Node seg[MAX_N<<2]; void build(int l, int r, int idx...
ALGO
0.999993
3.646121
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2014-04-01T03:18:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8964be73...
ac19ee1f-f333-474f-a060-6392adaff3ab
ppff/ENNlib
examples/00-FeedForward/main.cpp
#include <iostream> #include <vector> #include "enn.hpp" int main() { std::cout << "ENNlib example n0 : initiation to neural networks." << std::endl; std::cout << "We will create a very simple neural network (2 inputs connected to 1 output) and try computing some values." << std::endl; std::cout << "It is called a...
ALGO
0.983876
4.562862
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2015-10-29T18:24:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bdc45b966...
a8ea4228-dd81-4491-a316-1229d07d75d1
spideriron299/EjerciciosEscuelaC
Calculadora matrices.cpp
#include <stdio.h> # main(){ int M[3][3]={0}; int N[3][3]={0}; int elemento[3][3]={0}; int i,j, Op; for(i=0; i<3; i++){ for (j=0; j<3; j++){ printf("\n Introduce la cifra [%d] [%d] para rellenar la matriz 1: ",i, j); scanf("%d", &M[i][j]); } } for(i=0; i<3; i++){ for (j=0; j<3; j++){ printf("\n Introd...
ALGO
0.99832
3.400721
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-07-11T01:42: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": "6e76fe50cf...
ea54f2fb-0c29-4c9a-aabe-3aa65133d9b7
debosmita212/LeetCode-Problems
622-design-circular-queue/622-design-circular-queue.cpp
class MyCircularQueue { private: vector<int> v; int start=0,len=0; public: MyCircularQueue(int k) : v(k){ //initialize k size of array } bool enQueue(int value) { //if full then cannot insert anymore if(isFull()) return false; //circular queue use modula...
ALGO
0.999629
5.780587
{ "github_metadata": { "branch": "main", "commit_count": 684, "repo_created_at": "2022-08-23T16:06: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": "24bb39a02d...
36c38a4b-4038-43b1-a470-2e4e83e1d480
prashant5878-shukla/-CrackYourInternship
Linked LIst/Flatten_nested_list.cpp
/** * // This is the interface that allows for creating nested lists. * // You should not implement it, or speculate about its implementation * class NestedInteger { * public: * // Return true if this NestedInteger holds a single integer, rather than a nested list. * bool isInteger() const; * * //...
ALGO
0.999647
6.316457
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-07-14T16:04:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e15c8e02673...
4ca684a5-3270-48ab-8953-84e4107bad61
radarsat1/siconos
kernel/src/simulationTools/RollingFrictionContact.hpp
/* Siconos is a program dedicated to modeling, simulation and control * of non smooth dynamical systems. * * Copyright 2020 INRIA. * * 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 * *...
ALGO
0.997857
5.51613
{ "github_metadata": { "branch": "master", "commit_count": 8920, "repo_created_at": "2016-01-15T15:18:31.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "siconos/siconos", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_i...
9e12bc11-5e92-4fe0-bc70-e6333dea5888
fabbrito/leetcode-cpp
Challenges/src/C39_Combination_Sum/Solution39.cpp
#include "pch.h" #include "Solution39.h" namespace leetcode_39 { using namespace std; class Solution; } class leetcode_39::Solution { public: vector<vector<int>> combinationSum(vector<int>& nums, int target) noexcept { vector<vector<int>> result = {}; vector<int> vec = {}; sort(nums.begin(), nums.end()); ...
ALGO
0.999992
6.566537
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2023-10-17T02:43: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": "e84968716...
33121eda-5b83-46ac-aaf3-3686588877df
piyank22/UVA
11504.cpp
/******************* AUTHOR: HUMBLE_LOSER *******************/ #include <iostream> #include <cstdio> #include <math.h> #include <ctime> #include <bitset> #include <iomanip> #include <cstring> #include <sstream> #include <algorithm> #include <stack> #include <queue> #include <list> #include <map> #include <set> #includ...
ALGO
0.999746
4.097472
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-11-06T17:45:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f79e682beb...
6c917a46-3ed0-4f4c-8deb-d5bd01584e1c
ToLoveToFeel/LeetCode
Cplusplus/_0697_Degree_of_an_Array/_0697_main.cpp
// Created by WXX on 2021/2/20 9:15 #include <iostream> #include <vector> #include <unordered_map> using namespace std; // 哈希表记录:(数值,(出现次数,第一次出现的位置,最后一次出现的位置)) /** * 执行用时:36 ms, 在所有 C++ 提交中击败了95.77%的用户 * 内存消耗:25 MB, 在所有 C++ 提交中击败了59.63%的用户 */ class Solution { public: int findShortestSubArray(vector<int> &nums)...
ALGO
0.999908
5.565736
{ "github_metadata": { "branch": "master", "commit_count": 2211, "repo_created_at": "2019-12-30T06:46:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e490432...
b9ecc735-4260-4c9b-b5c3-35d70fd91c22
hit9/path-finding-visualizer
base.cc
#include "base.h" #include <spdlog/spdlog.h> #include <argparse/argparse.hpp> #include <fstream> #include <string> int GRID_MAP[M][N]; bool CHANGED_GRIDS[M][N]; Point ParsePointString(const std::string &s) { std::string sx, sy; // flag 的含义: 0 时输出给 sx, 1 时输出给 sy int flag = 0; for (const auto ch : s) { if...
ALGO
0.996125
5.068101
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-07-29T08:30:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09385f28cf...
082ab93d-0d6e-43d3-833c-b9ddb0e94131
CS17B023/Leetcode-Solutions
Array/ContainerWithMostWater.cpp
/*Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water. Note: You may ...
ALGO
0.999972
5.837562
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-12-30T17:01:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a1a3ab99c...
21e429d6-23f7-4b14-9565-75225e05fdfc
TuckerHaydon/MediationLayerStudent
src/mediation_layer/physics_simulator.cc
// Author: <NAME> #include "physics_simulator.h" #include "runge_kutta_4.h" #include <fftw3.h> namespace game_engine { namespace{ // Generates a multivariate gaussian sample. // mu: mean // sigma: covariance // gen: random number generator Eigen::VectorXd mvnrnd( const Eigen::V...
ALGO
0.998823
6.572527
{ "github_metadata": { "branch": "master", "commit_count": 242, "repo_created_at": "2019-03-19T22:30:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3cce810b...
5129609e-1409-4a3a-8c8c-face91ab4dc8
akshay090703/learning-dsa-with-cpp
Dynamic Programming/countSquaresWithAll1s.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: // Tabulation // TC -> O(n^2) // SC -> O(n^2) int solve(vector<vector<int>> &matrix, int n, int m) { vector<vect...
ALGO
0.999927
6.008034
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2023-12-06T18:04: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": "4f31d32f9ab...
a4b0f373-ef3c-4e58-b582-8d2cb784a973
S2hubham/DSA_VOYAGE
steps-7-Binary-trees/3.hard/1.RootToNodePath.cpp
#include<bits/stdc++.h> using namespace std; // Root to Node Path in Binary Tree struct Node{ int data; Node* left; Node* right; Node(int val){ data = val; left = right = NULL; } }; bool func(Node* root, int x, vector<int> &ans){ // base case if(root == NULL) return f...
ALGO
0.999985
5.092234
{ "github_metadata": { "branch": "main", "commit_count": 247, "repo_created_at": "2024-08-08T14:15:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c314d960d8...