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
182cdd01-8dca-4326-aba1-40bae142017e
dhs347/Dream
Code_Lib/cf650D_lj.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define rep(i, a, b) for(int i=(a); i<(b); i++) #define per(i, a, b) for(int i=(b)-1; i>=(a); i--) #define sz(a) (int)a.size() #define de(a) cout << #a << " = " << a << endl #define dd(a) cout << #a...
ALGO
0.999915
3.259149
{ "github_metadata": { "branch": "master", "commit_count": 1232, "repo_created_at": "2019-09-26T15:21:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ebd96...
0ee64302-3fd8-4885-877c-c5aee675048d
Churk-Ben/AllStudyRepo
Study_of_C&C++/VSCodeFiles_of_cpp_2/Day07/0708.cpp
// This program is to multiply two numbers using high precision multiplication. #include <iostream> #include <cstring> #include <algorithm> using namespace std; int num1[10001]; int num2[10001]; int ans[100001]; void mulhighprecision(string s1, string s2) { reverse(s1.begin(), s1.end()); reverse(s2.begin(), s...
ALGO
0.999991
4.346361
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-12-30T08:58: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": "56420a89a6b...
a8e413d1-6c35-4d4e-b8f9-1ce652b6a0a9
lavihayem/1110-cisc-Prof-landsam
programs/practice countWords/main.cpp
/* Name: CountWords Copyright: Author: <NAME> Date: 17/03/06 15:37 Description: Counts the words in a file by looking for white space between words */ #include <cstdlib> #include <iostream> #include <fstream> //include library for file processing #include <cctype> using na...
ALGO
0.989642
4.463604
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-07-28T06:31: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": "f77bd6932d...
b64d6ce8-f4ad-468c-9ce0-895b4261a1cb
victormanoliu97/FII
Obejct Oriented Programming/Laborator 02/Clasa.h
#include<iostream> using namespace std; class IntList { private: int Elemente[1000]; int Count; public: IntList(); // Constructor implicit ~IntList(); // Destructor implicit bool Add(int element); // returneaza false daca lista este plina (s-au adaugat 1000 de elemente) bool Insert(int index, int element...
TOOL
0.924813
4.241379
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2017-04-17T13:05:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad3d1bb19...
7ec9e123-c596-4adb-af2f-afe880f110eb
graphbig/graphBIG
benchmark/bench_kCore/kcore.cpp
//====== Graph Benchmark Suites ======// //======== kCore Decomposition =======// // // Usage: ./kcore.exe --dataset <dataset path> --kcore <k value> #include "common.h" #include "def.h" #include "openG.h" #include <queue> #include "omp.h" #ifdef HMC #include "HMC.h" #endif #ifdef SIM #include "SIM.h" #endif using ...
ALGO
0.998069
4.693008
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2015-01-20T21:51:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 70, "forks": 34, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "530ad16a...
1ec7a2ee-3229-4913-b331-82ba97f4ccce
trietgaming/personal-CP-trainning-memories
USACO/Gold/road_construction.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const string FNAME = ""; //const int MAXN =; struct DSU { vector<int> parent; int largest, component_num; DSU(int n): parent(n + 1, -1), largest(1), component_num(n) {} int get_root(int node) { return parent[node] < 0? node: parent[node]...
ALGO
0.999954
3.992026
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-31T06:44: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": "ced28bad29b7...
b4280276-a04c-464c-ae63-64d80e1d3e77
arulkolla/competitive-programming
codeforces/1015/E1.cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 200007; const int MOD = 1000000007; void solve() { int n, m; cin >> n >> m; char a[n + 7][m + 7]; bool marked[n + 7][m + 7]; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { cin >> a[i][j]; marked[i][j] = false; ...
ALGO
0.999826
3.017095
{ "github_metadata": { "branch": "master", "commit_count": 849, "repo_created_at": "2021-01-12T05:23:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb463aa2...
0d4dddc1-4c75-4a61-8650-fe760d17e238
chinawch007/LeetCode
1244.cpp
class Leaderboard { public: struct node { int p; int s; int v; node(int p, int s, int v) : p(p), s(s), v(v){}; }; struct cmp{ bool operator()(node x, node y){return x.s < y.s;} }; Leaderboard() { } void addScore(int playerId, int score) { ...
ALGO
0.999371
5.263073
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-09-12T19:34:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1119d39b...
401c3678-c68b-49f7-a199-e03761e51e1e
Geant4/geant4
source/processes/electromagnetic/standard/include/G4eCoulombScatteringModel.hh
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
TOOL
0.935876
5.783981
{ "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": "cf5ed6...
41b49b6f-7b79-437e-ae56-c6c6495ec089
Jyotika999/LEETCODE_JOURNEY
n-queens-ii/n-queens-ii.cpp
class Solution { public: bool safe(int row, int col, vector<string>board, int n) { int r = row; int c = col; // checking if atttacked by upperleft to down right diagonal while(row>=0 and col>=0 ) { if(board[row][col]=='Q') re...
ALGO
0.999976
5.980443
{ "github_metadata": { "branch": "main", "commit_count": 1506, "repo_created_at": "2021-04-15T14:05: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": "2e2805583...
eb607a81-165c-4c23-a108-3804a6458e6e
Shawn-Ogbomo/DSA_T_GOODRICH
ch1/exercises/ch1/p_1_3.cpp
//The birthday paradox says that the probability that two people in a room //will have the same birthday is more than half as long as the number of //people in the room(n), is more than 23. This property is not really a //paradox, but many people find it surprising.Design a C++ program that can //test this paradox by a...
ALGO
0.9702
5.466429
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2024-07-14T05:32: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": "3a714a7f2...
04ceb18b-d076-45cd-811c-9f36d1ca2f9a
lonelam/SolveSet
templetes/seg_tree.cpp
const int inf = 0x3f3f3f3f; const int maxn = 100000 + 10; int minv[maxn]; int v0; int * pv; void init(int n) { v0 = 1; while(v0 < n) { v0 <<= 1; } pv = minv + v0; } //l, r, ql, qr ,all inclusive int query(int o, int l, int r, int ql, int qr) { int mid = l + (r - l) / 2; int ans = in...
ALGO
0.999822
3.508769
{ "github_metadata": { "branch": "master", "commit_count": 276, "repo_created_at": "2016-07-09T12:38:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3aebeab...
7b64f23e-b8fb-493a-8c3c-7d237813bb5d
coronalabs/corona
external/Angle/Project/src/libGLESv2/mathutil.h
// // Copyright (c) 2002-2012 The ANGLE 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. // // mathutil.h: Math and bit manipulation functions. #ifndef LIBGLESV2_MATHUTIL_H_ #define LIBGLESV2_MATHUTIL_H_ #include <intrin.h> ...
TOOL
0.970368
5.189465
{ "github_metadata": { "branch": "master", "commit_count": 848, "repo_created_at": "2018-12-29T17:05:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2673, "forks": 291, "issues": 147, "pull_requests": 18 }, "file_meta": { "content_id": "4...
f6a021eb-b5ee-4a9a-8b3d-0cf6d9de165a
jccarvalhosa/maratona
live-archive/world-finals/2008/always.cpp
#include <iostream> #include <string> #include <ostream> #include <sstream> #include <algorithm> #include <cstring> using namespace std; typedef long long ll; const int N=111; ll d, c[N], p[N]; int grau; int valid(int x) { p[0]=1; for(int i=1;i<=grau;i++) p[i]=p[i-1]*x%d; ll sum=0; for(int i=0;i<=grau;i++) sum +...
ALGO
0.998169
3.580878
{ "github_metadata": { "branch": "master", "commit_count": 482, "repo_created_at": "2012-12-12T23:19:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00b0e791...
5b9a8195-1bbf-4571-8199-ec5cfff7a40a
zzucch/itmo-is-algo-2022
Lab 2/2E.cpp
#include <iostream> using namespace std; void merge(int aScore[], int aID[], int left, int mid, int right) { int it1 = 0, it2 = 0; int resultID[right - left]; int resultScore[right - left]; while ((left + it1 < mid) && (mid + it2 < right)) { if (aScore[left + it1] < aScore[mid + it2]) { ...
ALGO
0.999986
4.608468
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2023-05-19T21:02: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": "bc1d9faaec0...
1501cdda-899b-4515-bed9-5716097f36d4
RahulScripted/CodeChef
CodeChef-Problems/Rating Less 500/CarTrip.cpp
// Chef rented a car for a day. Usually, the cost of the car is Rs 10 per km. However, since Chef has booked the car for the whole day, he needs to pay for at least 300 kms even if the car runs less than 300 kms. If the car ran X kms, determine the cost Chef needs to pay. #include <iostream> using namespace std; int m...
ALGO
0.923114
3.817115
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2024-09-18T00:27: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": "10699a42ca8...
c5e1708e-4300-4a39-9f6f-59a0e1647e6a
silenke/my-leetcode
problems/341. 扁平化嵌套列表迭代器/2.cc
#include "..\..\leetcode.h" /** * // 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 is...
ALGO
0.999543
6.264408
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-06-28T14:36: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": "0095a18005...
9f18dfff-ecce-4b3d-b621-8820ba5b0b16
hitskyer/course
dataAlgorithm/dongyaxing/Recursion/goStep.cpp
#include <iostream> using namespace std; // 递归,深度到40,就需要7s才完成 unsigned int step_1(int n) { if (n == 1 || n == 0) { return 1; } else if (n == 2) { return 2; } else return step_1(n-1) + step_1(n-2); } // 通过arr记录台阶数,即使n=118,也能瞬间出结果。 unsigned int step_2(int n, unsigned int *arr) { arr[0] = 1; arr[1] = 1; ar...
ALGO
0.999965
3.415414
{ "github_metadata": { "branch": "master", "commit_count": 2084, "repo_created_at": "2018-01-15T01:40:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 10, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "66a94...
f39afc8e-c3a8-4581-b158-ce70b12e4ae2
sachuverma/DataStructures-Algorithms
Leetcode Daily Challenge/December-2020/19. Cherry Pickup II.cpp
/* Cherry Pickup II ================ Given a rows x cols matrix grid representing a field of cherries. Each cell in grid represents the number of cherries that you can collect. You have two robots that can collect cherries for you, Robot #1 is located at the top-left corner (0,0) , and Robot #2 is located at the top-...
ALGO
0.999994
6.410166
{ "github_metadata": { "branch": "master", "commit_count": 1430, "repo_created_at": "2020-10-07T10:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2049, "forks": 541, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e5...
586895d9-0fbc-4b8a-88dd-dfc960939d71
nyeongna/PS_C
1913_달팽이/r1.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define MOD 1000000000 #define lld long long int int a[1000][1000]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); int n, k; cin >> n >> k; int i, j; int r=1, c=1, rfirst=1, cfirst=1, rlast=n, clast=...
ALGO
0.999843
3.501824
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-02-11T07: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": "dcb48d803f...
e3d099d7-e6ba-4272-b12c-cb89587a50e3
CrouchCoder/Summer-2024-Comp-Sci
Mini Projects/p1.cpp
#include <iostream> using namespace std; void selectionSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { int minIndex = i; for (int j = i + 1; j < n; j++) { if (arr[j] < arr[minIndex]) { minIndex = j; } } swap(arr[i], arr[minIndex]); ...
ALGO
0.999828
5.498466
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-06-16T05:31: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": "e2de1b4c566a...
ff07438a-a869-4cfa-8863-08ac28d3b60a
Maximusthr/beecrowd
4 - Estruturas-e-Bibliotecas/1063.cpp
#include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(NULL); int x; while(cin >> x && x){ vector<char> num; vector<char> saida; for (int i = 0; i < x; i++){ char aux; cin >> aux; num.push_back(aux); } ...
ALGO
0.999437
3.559516
{ "github_metadata": { "branch": "main", "commit_count": 235, "repo_created_at": "2024-12-11T14:13: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": "9adba0cd18...
e80aea27-2ddb-429d-8e6b-ee14c359b51f
qbrilliance/qristal-decoder
include/qristal/decoder/quantum_decoder.hpp
// Copyright (c) 2022 Quantum Brilliance Pty Ltd #pragma once #include "Algorithm.hpp" #include "IRProvider.hpp" #include "InstructionIterator.hpp" #include "xacc.hpp" #include "xacc_service.hpp" #include <assert.h> #include <cmath> #include <iomanip> #include <numeric> #include <random> #include <sstream> #include ...
ALGO
0.993156
6.956272
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2023-09-12T01:37:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7b32932f90...
515820a6-392e-4a52-9b99-55e5a3ee9d00
Jminu/bakringdog_codingtest
workbook/POCS/week2/2302.cpp
#include <iostream> using namespace std; int seat_arr[41] = { 0 }; int fibo(int n) { int result = 0; if (n == 0 || n == 1) return 1; else { result = fibo(n - 2) + fibo(n - 1); } return result; } int count(int seat_len) { int count = 0; int result = 0; int acc = 1; for (int i = 1; i <= seat_len; i++) ...
ALGO
0.99987
3.584703
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2024-12-15T15:45: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": "531cf922e...
5282f5e4-7d92-4d21-a8d8-107d88aa41ab
akhikolla/testpackages
fuzzedpackages/OptCirClust/src/OptFramedClust.h
// // OptFramedClust.h // OptClust_Log_Linear // // Created by <NAME> on 6/15/20. // Copyright © 2020 <NAME> and <NAME>. // All rights reserved. // Revised by <NAME>. // #include <stdio.h> // #include <cassert> // #include <cstring> // #include <iostream> // #include <string> // #include <list> #include <vector...
ALGO
0.991761
5.154886
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-01-15T17:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66246d59fd...
e13f2c13-163b-40c8-8023-56951cf0cf24
aqswa/problem-solving
Two Pointer/1806.cpp
// // Created by LG on 2024-05-12. // #include <iostream> #include <vector> using namespace std; int main() { int N, S; // 합이 S 이상인 연속된 수열 중에서 가장 짧은 수열의 길이 구하기 cin >> N >> S; vector<int> nums(N, 0); for(int i=0; i<N; i++) { cin >> nums[i]; } int e = 0; int sum = nums[0]; int...
ALGO
0.999985
4.481835
{ "github_metadata": { "branch": "main", "commit_count": 221, "repo_created_at": "2022-08-13T12:52:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3a103c6b0...
4ce3275f-e8a1-49c0-b196-dfeec3b362aa
kasangeri/CompetitiveCoding-SoC-
enemy.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1000000; long long tree[2][N],temp[N],v[N]; int n; long long query(long long tree[], int k) { long long s = 0; while (k>0) { s+=tree[k]; k-=k&-k; cout<<k<<" "; ...
ALGO
0.999962
3.771751
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-05-22T04:15: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": "7819f6a05...
e71a1e37-31e0-463c-ba20-c4b4b75efb67
maratonaupf/codigos
URIOJ/uri2784.cpp
/* * <NAME> * URI 2784 - Ilhas */ #include <stdio.h> #include <vector> #include <queue> #include <algorithm> using namespace std; #define INFTO 0x3f3f3f3f typedef pair<int, int> ii; typedef vector<ii> vii; int N, M; vector<vii> LG; vector<int> dist; void dijkstra(int s){ dist.assign(N, INFTO); dist[s] = ...
ALGO
0.999605
3.639844
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2017-02-19T21:11:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0c1a6...
e71c7aa7-27a3-45da-bb11-d6f0a2adc549
piCoder3141/Competitive-Coding
codejam/2021/1C/B.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> #define cj(t) cout << "Case #" << t << ": " #define nl "\n" const int inf = 1e9; const ll INF = 1e18; const ll mod = 1e9 + 7; ll powmod(ll x, ll y, ll md = mod){ ll ret = 1; while (y > 0){ ...
ALGO
0.999982
4.911588
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-12-23T15:01: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": "0ef3946410...
d56c0645-1428-4d5b-a9a5-3afb1739c376
CGAL/cgal
Mesh_3/include/CGAL/Mesh_3/radius_ratio.h
// Copyright (c) 2006 <NAME> (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL$ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : <NAME> #ifndef CGAL_MESH_3_RADIUS_RATIO_H #define CGAL_MESH_3_RADIUS_RATIO_H #include <CGAL...
ALGO
0.992645
5.322324
{ "github_metadata": { "branch": "master", "commit_count": 113659, "repo_created_at": "2014-10-01T12:22:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5443, "forks": 1475, "issues": 511, "pull_requests": 136 }, "file_meta": { "content_id...
329bfb5e-5b7f-48d4-925a-b59c0a8b0850
DustLeep/DataStructure
Homework/02/Task 2.cpp
#include "../../List/list.h" #include <iostream> #include <cstdlib> #include <ctime> #include "../../List/queue.h" using namespace std; void print(int arr[], int n) { // 打印数组 cout << "高度:"; for (int i = 0; i < n; i++) { cout << arr[i] << " "; } cout << endl; } int main() { srand(t...
ALGO
0.999861
4.09241
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2023-03-25T05:31:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f18cc8da...
7cca7e76-0fe1-465e-847b-b8c865e155c1
BIT-21-SE-simplysml/C-
没啥用的、On查找.cpp
//用于数组两个位置之间数据交换 void swap(vector<int>& arr, int a, int b) { int temp = arr[b]; arr[b] = arr[a]; arr[a] = temp; } //划分算法 //返回基数划分后所在的下标 int partition(int left, int right, int pivot_index, vector<int>& arr) { int pivot = arr[pivot_index]; swap(pivot_index, right) //将基数放置最后 int save = left;...
ALGO
0.999988
4.272281
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-10-12T07:36:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89f8b6d6d7...
82c92bd3-9eab-43cd-be53-0df4d822bc5a
wja0/Algorithm
basic/1699.cpp
#include <iostream> using namespace std; // int main() // { // ios_base::sync_with_stdio(false); // cin.tie(nullptr); // int n; // cin >> n; // int result = 0; // while (n) // { // for (int i = n; i > 0; i--) // { // if (n >= i * i) // { // ...
ALGO
0.999893
4.369113
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-02-08T15:07: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": "e99801f681e...
45dfc338-fc2e-417b-aa3f-ea15d3677359
gengyouchou/Codeforces
B_Mathematical_Circus.cpp
#include <algorithm> #include <array> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <functional> // std::minus #include <iostream> #include <map> #include <math.h> #include <numeric> // std::accumulate #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stri...
ALGO
0.999968
4.904975
{ "github_metadata": { "branch": "master", "commit_count": 276, "repo_created_at": "2023-04-20T05:43:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e561a75...
b0a2df8a-ef0b-4ffe-aa8e-6de52d33a660
hst10/fpga_graph_acc
triangle_counting_hls/triangle_counting_v2.cc
#include <string.h> #include <stdio.h> #define BUF_SIZE 4096 int triangle_counting(volatile unsigned int neighbor[9], volatile unsigned int offset[7], volatile unsigned int edge[18], unsigned int num_edges) { #pragma HLS INTERFACE m_axi port=neighbor d...
ALGO
0.999339
4.433161
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-05-15T05:23:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d10de0ae...
4bdfa278-0b55-4f43-b8d6-8d75f8e3ecc8
osada0000/osadakensyuu2025
experiment_junbi/experiment_junbi.ino
int airpressure0 = A0; //メインタンク(p1) int airpressure1 = A1; //シリンダ下(p2) int airpressure2 = A2; //サブタンク(p3) int airpressure3 = A3; //シリンダ上(p4) int kyon = A5; char command; void setup() { pinMode (2, OUTPUT); pinMode (3, OUTPUT); pinMode (4, OUTPUT); pinMode (5, OUTPUT); pinMode (6, OUTPUT); pinMode (7, OUTP...
TOOL
0.937272
4.073751
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-14T07:58: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": "30daa05a0dd5...
068a7221-bb2f-46e2-b205-660f4561a681
dhrubajyotinath6/Preparation
DSA/STRIVER/A-Z/BINARY SEARCH/162. Find Peak Element.cpp
/* https://leetcode.com/problems/find-peak-element/ Example 1: Input: nums = [1,2,3,1] Output: 2 Explanation: 3 is a peak element and your function should return the index number 2. Example 2: Input: nums = [1,2,1,3,5,6,4] Output: 5 Explanation: Your function can return either index number 1 where the peak element i...
ALGO
0.999984
5.62705
{ "github_metadata": { "branch": "master", "commit_count": 465, "repo_created_at": "2022-01-24T17:01: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": "0c54b9ba...
b72f603c-93df-425f-bcb8-4b4822bc0968
prajwalkandekar123456/Striver-Graph-Series
Problems/NumberOfProvinces.cpp
/** Problem : Given an undirected graph with V vertices. We say two vertices u and v belong to a single province if there is a path from u to v or v to u. Your task is to find the number of provinces. Note: A province is a group of directly or indirectly connected cities and no other cities outside of the group. **/ ...
ALGO
0.999932
5.340755
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-10-21T13:04:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f74903c441...
638c4863-f3f0-4575-8303-a8bc2359c182
oliverpecha/Stanford-SEE
CS106B/Chapter02 (Functions and Libraries) BookExercises/13.RandomDarts/RandomDarts.cpp
/* * File: RandomDarts.cpp * -------------- * Random numbers offer yet another strategy for approximating the value of !. Imagine that you have a * dartboard hanging on your wall that consists of a circle painted on a square backdrop, * as in the following diagram: * * What happens if you throw a whole bunch of ...
ALGO
0.999412
5.449776
{ "github_metadata": { "branch": "master", "commit_count": 314, "repo_created_at": "2019-12-22T20:44: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": "052642b1...
f451c6ea-ad88-4ea3-b935-09c1ba361395
JustBeYou/infoarena
infoarena/probleme/rangemode.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef signed long long ll; typedef unsigned int uint; typedef unsigned short ushort; typedef unsigned char uchar; const int nmax = 100001; const int BUCKET_SZ = static_cast<int>(sqrt(nmax)) + 1; //const int BUCKET_SZ = 3; const int BUCKE...
ALGO
0.999999
4.592886
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-04-03T11: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": "11ccc0c60...
c4de5fdc-2da5-465d-93cb-fba25ebc8237
dmdware/sfh
source/render/fogofwar.cpp
#include "fogofwar.h" #include "../sim/utype.h" #include "../sim/unit.h" #include "../sim/bltype.h" #include "../sim/building.h" #include "heightmap.h" #include "../utils.h" #include "../math/fixmath.h" #include "../app/appmain.h" #include "../gui/layouts/messbox.h" VisTile* g_vistile = NULL; void AddV...
TOOL
0.954226
3.629788
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-12-06T10:34:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8e49a0462a...
a1a78c0b-70c9-48a9-9e6f-feea0e90ee22
ishandutta2007/codeforces-w
wxhtzdy/normal/1721/D.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <ctime> #include <cassert> #include <complex> #include <string> #include <cstring> #include <chrono> ...
ALGO
0.999896
4.313622
{ "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": "2b4586358635...
e0d6a74b-aa91-437e-9485-539afdeb3d7f
TomaszGolan/codility
Lesson 10/Peaks.cxx
int solution (vector <int> &A) { vector <int> peaks; // position of peaks // fill peaks ids for (unsigned int i = 1; i < A.size() - 1; i++) if (A[i] > A[i - 1] and A[i] > A[i+1]) peaks.push_back (i); if (peaks.size() == 0) return 0; // no peaks for (unsigned int nBlocks = peaks.size(); nBlocks > 1; nBl...
ALGO
0.998941
4.501983
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2015-12-18T20:37:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1e43c9f6...
eb71ea35-8314-463d-821b-5ccfb731b745
voreen-project/voreen
voreen/src/core/datastructures/transfunc/2d/2dprimitives/utils/transfuncprimitive.cpp
/*********************************************************************************** * * * Voreen - The Volume Rendering Engine * * ...
TOOL
0.952488
6.2774
{ "github_metadata": { "branch": "main", "commit_count": 2506, "repo_created_at": "2024-10-29T14:44:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 18, "forks": 7, "issues": 17, "pull_requests": 0 }, "file_meta": { "content_id": "26801929...
7afd7288-d047-4b09-a0aa-0bc01077f082
bdazdaz12/Kuznyechik-Cipher
grasshopper/crypto/streebog/StreebogHash.cpp
/** * @brief GOST 34.11-2012 hash function with 512/256 bits digest. */ #include "StreebogHash.h" #include <err.h> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <sysexits.h> #include <unistd.h> #define READ_BUFFER_SIZE 65536 #define TEST_BLOCK_LEN 8192 const union uint512_u...
ALGO
0.945652
6.2126
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-12-05T23:57: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": "55be4c7d6ada...
3965f7b5-9911-4427-9ced-105108b2889e
google/or-tools
ortools/routing/parsers/solomon_parser.cc
// Copyright 2010-2025 Google LLC // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
TOOL
0.980741
7.051935
{ "github_metadata": { "branch": "stable", "commit_count": 15256, "repo_created_at": "2015-02-21T01:25:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12243, "forks": 2248, "issues": 60, "pull_requests": 12 }, "file_meta": { "content_id":...
74decaf0-612f-44b8-ae83-224efc2afb30
kkishi/atcoder
contests/abc247/abc247_e/main_dp.cc
#include <bits/stdc++.h> #include "atcoder.h" void Main() { ints(n, x, y); V<int> a(n); cin >> a; // dp[i+1][state] = the number of intervals ending at i with state. vector dp(n + 1, vector(4, int(0))); int ans = 0; rep(i, n) { if (y <= a[i] && a[i] <= x) { int s = ((a[i] == x) << 1) | (a[i] =...
ALGO
0.999744
4.613784
{ "github_metadata": { "branch": "master", "commit_count": 924, "repo_created_at": "2020-05-17T21:30: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": "9daa86c4...
781163da-bad0-4a10-9090-52a11b6404da
ModelDBRepository/91387
AlphaSynRk4.cpp
/*************************************************************************/ /********** AlphaSyn.cpp *************/ /*************************************************************************/ /**** ****/ /**** Functions...
ALGO
0.999953
5.623596
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-29T21:07:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "3b9d3a97f3f...
94d5a14b-4f3b-48c6-a6fd-7fad192e96a2
9646516/leetcode_source
src/191.cpp
// id:299630339 // runtime:4 ms // memory:5.7 MB // title:Number of 1 Bits // translatedTitle:位1的个数 // questionId:191 // time:2022-04-13 22:50:45 /// 9646516 #include <bits/stdc++.h> using namespace std; using ll = long long; const int INF = 0x3F3F3F3F; const int maxn = 2e5 + 555; const int MOD = 1e9 + 7; template <t...
ALGO
0.999738
5.224394
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-05-13T15:16: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": "f7fe2ecc73d...
cd4967ad-b363-47cd-a2dc-6320b7fae0bf
boxaio/HCPSOTS
src/hilbert_curve.h
#ifndef HILBERT_CURVE_H #define HILBERT_CURVE_H #include "polyscope/surface_mesh.h" #include "polyscope/curve_network.h" #include "polyscope/point_cloud.h" #include "utils.h" #include "sort.h" #include "sampling.h" #include <iostream> #include <fstream> #include <stdexcept> class Compare { using vec2s = std::vec...
ALGO
0.999429
5.725063
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-02-17T03:11: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": "da61da8693b1...
18723bff-d74d-4358-bb79-e082b1f934ba
ArjunTa1war/codeforces
149a.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int k, total = 0, ans = 0; ; cin >> k; int arr[13]; arr[0] = 0; for (int i = 1; i <= 12; i++) { cin >> arr[i]; } sort(arr, arr + 13); for (...
ALGO
0.999853
3.905035
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-01-08T19:24: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": "5c2615e4a545...
154b1ab3-46b2-42c6-8ec2-9a9a75b2bd48
sgwnag/openFOAM-plus
src/meshTools/AMIInterpolation/AMIInterpolation/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | -----------------------------------...
ALGO
0.92026
6.63627
{ "github_metadata": { "branch": "PDRFoam-rc1", "commit_count": 24446, "repo_created_at": "2021-06-30T05:20: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": "f...
0af7b6d9-4b1d-48ec-bcba-60e381962e04
lancercd/Learning-code
test/test50.cpp
#include "iostream" #include "algorithm" #include "stack" #include "string" using namespace std; int main() { string str; while (cin >> str) { stack<char> arr; for (unsigned int i = 0; i < str.size(); ++i) { if (arr.empty()) { arr.push(str[i]); } else { ...
ALGO
0.999505
3.884035
{ "github_metadata": { "branch": "master", "commit_count": 279, "repo_created_at": "2020-08-18T06:38:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd4890d4...
f0ea8467-529a-47fd-83d5-6182044e577e
Strazhin/Danila
4л/main3.cpp
#include <iostream> #include <cstring> using namespace std; class String { private: char *value; int len; public: String():value(new char[1] {}),len(0) {}; // конструктор по умолчанию String(const char * s) { len = strlen(s); value = new char[len + 1]; strcpy(value, s); } String(const String& s) { len =...
TOOL
0.941142
4.092022
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-03-01T20:13:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d658e4ddc4...
9e682f37-5bad-4442-a2d0-65454fbd440d
Reshal1234/DSA-c-codes
binary_search_tree_search_delete.cpp
#include<bits/stdc++.h> using namespace std; struct node{ int data; struct node* left; struct node* right; node(int val){ data=val; left=NULL; right=NULL; } }; void preorder(struct node* root){ if(root==NULL){ return; } cout<<root->data<<" "; preorder(...
ALGO
0.999992
3.850697
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-28T10:20: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": "a69c643801b5...
4da9f2f7-44cc-4d9f-a935-ecb6de44bb86
Kuro0911/C-p-p
algo/convex-hull.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define tb ' ' #define all(a) (a).begin(), (a).end() #define sz(x) ((int)x.size()) #define MOD (int)(1e9 + 7) typedef pair<int, int> pii; typedef pair<pii, int> ppi; typedef pair<int, pii> pip; typedef pair<pii, pii> ppp; //##########################...
ALGO
0.999976
5.033551
{ "github_metadata": { "branch": "master", "commit_count": 444, "repo_created_at": "2022-06-06T09:05: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": "60579c57...
bbec901b-d620-414b-ad91-2b3171267a29
shiningstarpxx/newstart
algorithm/leetcode/cpp/hashtable_423lt.cpp
// // Created by 裴星鑫 on 2021/11/24. // #include <string> #include <unordered_map> #include <vector> using namespace std; class Solution { public: string originalDigits(string s) { unordered_map<char, int> cache; for (auto c : s) cache[c]++; vector<int> count(10, 0); count[0] = cache['z']; coun...
ALGO
0.983044
4.438645
{ "github_metadata": { "branch": "master", "commit_count": 394, "repo_created_at": "2021-09-08T14:40: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": "2345711c...
d65a9d33-09f7-4e30-9686-fa0013918fa7
ThePhilomathsApprentice/TestApplication
TestApplication/Pasacal.cpp
/* Given an integer rowIndex, return the rowIndexth (0-indexed) row of the Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it: Example 1: Input: rowIndex = 3 Output: [1,3,3,1] Example 2: Input: rowIndex = 0 Output: [1] Constraints: 0 <= rowIndex <= 33 */ #include ...
ALGO
0.999444
6.500792
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-12-17T17: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": "fe084c434...
4ed03bc6-63ef-4b80-b04a-543a77815568
1998factorial/Codeforces
contests/educationalRound19/E.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 100005; int N; int a[maxn]; int step[maxn][320]; int main(){ int i , j; scanf("%d" , &N); for(i = 1; i <= N; ++i){ scanf("%d" , &a[i]); } int block_size = sqrt(N); for(j = 1; j <= block_size; ++j){ for(i = N; i >= 1;...
ALGO
0.99978
3.692816
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2019-12-15T09:20:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6402887a2...
bb29c918-991e-4ca1-9b60-f894d3e75503
dynamic21/Evo-v1
agent.cpp
#include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include <algorithm> #define boardSize 3 #define topAgentPercentage 0.2 #define topSpeciesPercentage 0.2 #define exposurePercentage 0.1 //divide the desired percentage by 2 to get accurate usage #define logLength 100 #define mutationRate 0.1 #def...
ALGO
0.999117
3.437649
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2021-01-24T01:06: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": "33ecd3ff3...
1eb7f4a7-6db9-4e4b-8c38-4765e24fd604
UMANG2707/DYNAMIC_PROGRAMMING_CODES
Mk_Change.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; // Min Coin Recursion int MinCoin(int cn[] , int n , int amount) { if(amount==0) { return 0; } int ans = INT_MAX; for(int i=0;i<n;i++) { if(amount >= cn[i]) { int sm = MinCoin(cn,n,amount-cn[i])...
ALGO
0.999911
4.207685
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-02-12T18:00:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f521a6684e...
37004ed7-6c5f-483a-b08e-ee9c4c8300d7
yamate11/compprog
abc/abc388/d/cans2.cc
#include <bits/stdc++.h> #include <cassert> using namespace std; using ll = long long int; using u64 = unsigned long long; using pll = pair<ll, ll>; // #include <atcoder/all> // using namespace atcoder; #define REP(i, a, b) for (ll i = (a); i < (b); i++) #define REPrev(i, a, b) for (ll i = (a); i >= (b); i--) #define A...
ALGO
0.999954
4.10541
{ "github_metadata": { "branch": "main", "commit_count": 219, "repo_created_at": "2021-03-11T06:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e78d153e0...
8a3f6568-7ca0-42fe-8b6f-74cb4a6744ac
danyr59/Simulador-de-Planificacion-de-procesos
fcfs.cpp
#include "fcfs.h" Fcfs::Fcfs(int num_process) : bloqued_process_queue() { // aladur oircesiss process_list.push_back(std::make_shared<Process>(Process(1, 0, 3))); process_list.push_back(std::make_shared<Process>(Process(2, 1, 5))); process_list.push_back(std::make_shared<Process>(Process(4, 9, 5))); ...
ALGO
0.994981
4.2026
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-03-06T01:39:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "7344e22c5e0...
96220304-1585-47bd-bd66-001700744747
MaskRay/cquery
src/utils.cc
#include "utils.h" #include "platform.h" #include <doctest/doctest.h> #include <tinydir.h> #include <loguru/loguru.hpp> #include <siphash.h> #include <algorithm> #include <cassert> #include <cctype> #include <cstring> #include <fstream> #include <functional> #include <iostream> #include <locale> #include <sstream> #...
TEST
0.918791
6.689696
{ "github_metadata": { "branch": "master", "commit_count": 1172, "repo_created_at": "2017-11-19T03:51:20.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "jacobdufault/cquery", "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "conte...
3fa6e4dc-40c4-41f1-9a77-2a329df9b5bc
rishabhjha708/abc
PrimeNumberSieves.cpp
#include<bits/stdc++.h> using namespace std; #define all(v) v.begin(), v.end() typedef unsigned long long int ulli; typedef long long int ll; vector<ulli> sieve(ulli n) { vector<bool> prime(n + 1, true); prime[0] = false; prime[1] = false; long long int m = sqrt(n); for (ulli p = 2; p <= m; p+...
ALGO
0.998684
3.847794
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-07-24T13:43: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": "cc36c2debe...
02c5b22d-1f92-4a64-bc46-1c8653b0b812
crazy-cat/algorithm_repo
unclearup/ss.cc
// Author: qushuqian // Problem:输入两个字符串,从第一字符串中删除第二个字符串中所有的字符。例如, // 输入”They are students.”和”aeiou”,则删除之后的第一个字符串变成”Thy r // stdnts.”。 // solution: #include <iostream> #include <assert.h> #include <string> using namespace std; int main() { int num = 0x80000000; cout << num << endl; // cout << hex << num << en...
ALGO
0.994389
3.382483
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2013-09-14T15:39:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd2c0ddb5...
f17040ff-7c6c-4c79-a174-3b95f9180c26
mirinta/leet_code
tree/0116_populating_next_right_pointers_in_each_node.cpp
#include <queue> /** * Definition for a Node. */ class Node { public: int val; Node* left; Node* right; Node* next; Node() : val(0), left(nullptr), right(nullptr), next(nullptr) {} Node(int _val) : val(_val), left(nullptr), right(nullptr), next(nullptr) {} Node(int _val, Node* _left, N...
ALGO
0.999248
5.770092
{ "github_metadata": { "branch": "master", "commit_count": 1725, "repo_created_at": "2023-04-09T12:48:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a835fc...
a0675c61-6edf-40d2-8430-80187b1c23d3
Galya777/LanguageAuthomatsAndCalculation
Authomat.h
#include <set> #include <vector> #include <fstream> #include "ALists.h" /// Съхранява преходите на автоматите. struct Transition { /// Състоянието, от което се потегля. int from; /// Състоянието, към което отива прехода. int to; /// Буквата на състоянието. char letter; Transition(); ...
ALGO
0.938698
3.953227
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-11-21T21:11:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fbd55a78b...
699f7903-2e7e-4ac9-a01c-5ab8ddccda14
jtn-ms/data-augmentation
include/cvBlob/cvb_contour.cpp
// Copyright (C) 2007 by <NAME> // <EMAIL> // // Copyright (C) 2013 by <NAME> for ProViSys Engineering // <EMAIL> // // This file is part of cvBlob. // // cvBlob is free software: you can redistribute it and/or modify // it under the terms of the Lesser GNU General Public License as published by // the Free Software Fo...
ALGO
0.964599
5.102954
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-08-29T04:17:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db3eaa251d...
89341987-6748-4ad2-996c-c0f7f2b97f57
gafeol/competitive-programming
ojs/cf/1188/A.cpp
#include <bits/stdc++.h> using namespace std; #define fst first #define snd second typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; #define pb push_back #define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++) #ifndef ONLINE_JUDGE #define debug(args...) fprintf(st...
ALGO
0.999989
4.517229
{ "github_metadata": { "branch": "master", "commit_count": 406, "repo_created_at": "2016-09-11T01:55: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": "cec98a97...
b0328583-14b8-49cd-b431-723ced75598e
ju4700/Competitive-Programming
B_The_Picky_Cat.cpp
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--){ int n; cin >> n; vector<int> a(n); for(auto &x : a) cin >> x; int m = (n + 1) / 2; bool p = false; auto cm = [&](int p...
ALGO
0.999769
5.301437
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-03-17T14:45: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": "63e42a926621...
4802f0ab-e22e-493f-a9f3-a9ccdc7b24c4
upadhyayprakash/dsa_practise
trie_dsa/0_implement_trie.cpp
/** * Implement a Trie data structure with 3 methods: * - insert(string word): Inserts the word * - search(string word): Returns True/False if there's full word match * - startsWith(string prefix): Returns True/False if prefix exists * * YouTube(Striver's): https://youtu.be/dBGUmUQhjaM?si=pL_WfgHWvuwVcuyk * Pat...
ALGO
0.999575
6.33256
{ "github_metadata": { "branch": "main", "commit_count": 139, "repo_created_at": "2024-07-01T15:48: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": "d212ad6c2e...
1f0c689d-0f3d-4de9-97cf-8505c9b8ddb8
Sonawane-Punam/Array
UniIntA1.cpp
//Sort Array without using sorting algorithm #include<iostream> using namespace std; class Array { public: void Intersection(int *Arr,int *Brr,int N,int M) { int *Crr = new int(N); int k=0; for(int i=0;i<N;i++) { for(int j=0;j<M;j++) ...
ALGO
0.999947
4.708222
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-01-25T05:45: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": "d76e671dd944...
d89b03d1-4990-4b76-8a5e-6d03901a5466
sam1322/100DaysOfCode
Leetcode solutions/173-binary-search-tree-iterator/173-binary-search-tree-iterator.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.999938
5.884072
{ "github_metadata": { "branch": "master", "commit_count": 585, "repo_created_at": "2021-08-09T05:34: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": "010fc1e2...
497c3379-5ab6-4eba-acca-7ec50b14f65b
Khushisrivastava9/LeetCode-Practice
1605-minimum-number-of-days-to-make-m-bouquets/minimum-number-of-days-to-make-m-bouquets.cpp
class Solution { public: bool possible(int day, vector<int>& bloomDay, int m, int k) { int cnt = 0; int totalbqtmade = 0; int n = bloomDay.size(); // Avoid global variable dependency for (int i = 0; i < n; i++) { if (bloomDay[i] <= day) { cnt++; } else { totalbqtm...
ALGO
0.999999
5.977467
{ "github_metadata": { "branch": "main", "commit_count": 673, "repo_created_at": "2024-06-01T13:50:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "678c200dac...
2b7e7306-09e4-4c03-a2fc-8ebf69a47d2f
lrscy/ACM-ICPC
Personal Training/HDU/HDU2196.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 1e5 + 10; struct Edge { int to, cost, next; }; Edge es[MAXN << 2]; int head[MAXN], nmax[MAXN][2], son[MAXN][2]; int n, cnt; void add( int u, int v, int w ) { es[cnt].to = v; es[cnt].cost = w; es[cnt].next = head[u]; head[u] = cnt++; return ; } vo...
ALGO
0.999884
3.652388
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2016-05-13T16:34: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": "3d10a665...
3cf975f6-1f1f-43a9-9598-b30bb791f816
TCGBench/TCGBench
data/partially_correct_code/partially_correct_code_canonical/P3385/60-80_2.cpp
#include <bits/stdc++.h> using LL = long long; using namespace std; const int N = 2e3 + 5, M = 6E3 + 5 , INF = 1E9; int h[N], e[M], ne[M], w[M], idx; int dist[N], cnt[N]; bool st[N]; int n, m; void add(int a, int b, int c) { e[idx] = b, w[idx] = c, ne[idx] = h[a], h[a] = idx++; } bool spfa() { for (int i = 1 ; i...
ALGO
0.999933
5.123026
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-16T11:23:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fb63c4e19360...
864fce06-2fbd-4c56-9558-47b3affd7c15
HKUST-Aerial-Robotics/D2SLAM
camera_models/include/camodocal/code_utils/eigen_utils.h
#ifndef EIGEN_UTLIS_H #define EIGEN_UTLIS_H #include <eigen3/Eigen/Eigen> #include <iostream> using namespace std; namespace eigen_utils { typedef Eigen::Matrix<double, Eigen::Dynamic, 1> Vector; typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Matrix; template <int num_rows = Eige...
TOOL
0.914757
6.004207
{ "github_metadata": { "branch": "main", "commit_count": 613, "repo_created_at": "2023-03-11T16:42:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 373, "forks": 54, "issues": 38, "pull_requests": 2 }, "file_meta": { "content_id": "0b25f21...
94f02c20-fc49-44c8-8612-361f6281af4c
mzry1992/workspace
OJ/CDOJ/POJ1386.cpp
#include <stdio.h> #include <string.h> #include <math.h> int tcase,fcase; int n,i,j; char list[1100]; struct nodetype { int next; char ch; }node[26]; int ind[26],outd[26],f[26]; struct passtype { int next; int end; }pass[110000]; int findf(int x) { if (f[x] != x) f[x] = findf(f[x]); ...
ALGO
0.999943
3.286911
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2012-11-03T05:40:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7dc682ed4...
ac17f705-ba30-4f0d-b7f2-ab784e278f85
AayushDev-02/Cpp-DSA-Programs
Heaps/merge_k_sorted_array.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; class info { // data we want to store into heap public: int data; // the value of element in the array int row; // the value of row in array ( like - which array part is this element) int col; // th...
ALGO
0.999974
5.399341
{ "github_metadata": { "branch": "master", "commit_count": 163, "repo_created_at": "2022-10-22T13:47:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc8cd679...
d2d38f29-fabf-4fcb-aead-3363b851fca1
sunovivid/Problem-Solving
9663N-queen.cpp
/* 반복(dfs)의 종료 조건을 잘못 설정함 (n-1이 아니라 n) DFS: 각 반복 단위를 명확히 설정해라. (상태 방문: goal test -> {자식 생성 -> 방문})할 것인지, (상태 방문: {자식 생성 -> goal test -> 방문})할 것인지 dfs는 goal_test를 상태 처음 방문했을 때 하고 자식을 생성하는 게 낫다 */ #include <iostream> #include <algorithm> #include <vector> #define MAX 15 using namespace std; /* 문제 정의 그 유명한 N-퀸 */ ...
ALGO
0.999977
5.347317
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2020-04-15T05:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c02b1028...
ce8805c4-0610-492c-9942-e465c7590f12
yamate11/compprog
abc/abc369/c/cans2.cc
#include <bits/stdc++.h> #include <cassert> using namespace std; using ll = long long int; using u64 = unsigned long long; using pll = pair<ll, ll>; // #include <atcoder/all> // using namespace atcoder; #define REP(i, a, b) for (ll i = (a); i < (b); i++) #define REPrev(i, a, b) for (ll i = (a); i >= (b); i--) #define A...
ALGO
0.999904
4.202925
{ "github_metadata": { "branch": "main", "commit_count": 219, "repo_created_at": "2021-03-11T06:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "731da84c87...
df1e58b5-7c77-4083-9f51-8d477eeb0f3a
nnovoice/hackerrank
solutions/w7-challenges/diehard.cpp
#include <stdio.h> int gcd(int a, int b) { for (;;) { if (a == 0) return b; b %= a; if (b == 0) return a; a %= b; } } int max_of(int a, int b) { return (a < b) ? b : a; } int main() { int nCases = 0, a = 0, b = 0, c = 0, gcd_num = 0, max_of_inputs = 0; scanf ("%d", &nC...
ALGO
0.999986
4.538507
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2014-06-27T08:42: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": "98583fadd...
17b1a3f6-39e0-42b6-93f5-3665acf77085
TommyDS2005/Estructuras
Taller 03/main.cpp
#include <iostream> #include <fstream> #include <string> #include <list> #include <vector> #include <sstream> #include <string.h> using namespace std; /* TALLER-03 Nombre: <NAME>, <NAME> Fecha: 02/04/2023 Solucion: Se hace la lectura del archivo que contiene los procesos a realizar, se crea un arbol AVL que permite...
ALGO
0.999658
4.912446
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-02-20T18:06: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": "dab4d994e8f...
df9d2fbb-880b-43f3-b9f2-e2c8254a02e2
vishal1patidar/Practice-DSA
1359-count-all-valid-pickup-and-delivery-options/1359-count-all-valid-pickup-and-delivery-options.cpp
class Solution { public: int MOD = 1e9 + 7; int countOrders(int n) { vector<vector<long>> dp (n + 1, vector<long>(n + 1, 0)); for (int unpicked = 0; unpicked <= n; unpicked++) { for (int undelivered = unpicked; undelivered <= n; undelivered++) { // If all orders...
ALGO
0.999921
5.639328
{ "github_metadata": { "branch": "main", "commit_count": 1865, "repo_created_at": "2021-10-06T04:24:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ca8358b2...
eba0bbb9-df3c-49b5-b79a-5e15f094431f
gabrafo/Revisao
ex54.cpp
#include <iostream> using namespace std; // Objetivo do programa: Realizar uma busca sequencial em um vetor de caracteres para encontrar um elemento específico. // O programa recebe o número de caracteres, os caracteres separados por espaços e um caracter a ser buscado. // Em seguida, imprime os índices no vetor onde ...
ALGO
0.999752
4.882372
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-12-08T04:26: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": "89716b2199b7...
d1c02b8c-45e6-4fb6-a690-ba707b5b4e34
0xLogic/OpenIW8
workspace/iw8/shared/codware/sdk/havok/hk2018_2_0_r1/source/common/base/algorithm/sort/hksort.inl
/* ============== hkAlgorithm::quickSortRecursive<hkReflect::Type const *,HavokPhysics_GlobalTypeCompendium_TypeCompare> ============== */ void __fastcall hkAlgorithm::quickSortRecursive<hkReflect::Type const *,HavokPhysics_GlobalTypeCompendium_TypeCompare>(const hkReflect::Type **pArr, int d, int h, HavokPhysics_Glob...
ALGO
0.999536
5.67865
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-11-05T15:29:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7ed15d335...
1ff77732-8396-48de-9b09-a80cbe6da407
tsodapop/UIC_Courses
CS251/Program05/TESTS/dfs.cpp
#include <iostream> #include "Graph.h" #include "_util.h" int main(int argc, char *argv[]){ graph g; std::vector<graph::vertex_label> dfs_rpt; bool has_cycle; header(argc, argv); if(argc != 3) { std::cout << "usage: ./dfs <filename> <source-vertex>\n"; return 0; } else { if(!g.read_file(...
ALGO
0.977004
5.421084
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-09-26T05:51:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "b8d5c18ab...
e6b42b11-2b4b-4d04-b5a0-40e2ceb760fb
Kyaki101/Competitive-Programming
CF/977/c.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; template <typename Key, typename Value> using ordered_map = tree<Key, Value, less<Key>, rb_tree_tag, tree_order_statistics_node_update>; template <typename T> using ord...
ALGO
0.999907
4.080452
{ "github_metadata": { "branch": "main", "commit_count": 242, "repo_created_at": "2023-12-19T16:25: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": "c55db07c3e...
78367335-ba7a-4d8d-b2b5-0b6ccd7f1b5f
Ishwarendra/Contests
CODEFORCES_CONTEST/950_Div3/G.cpp
#include "bits/stdc++.h" #ifdef LOCAL #include "/Users/ishwar/Debug/debug.h" #else #define print(...) 1; #endif using i64 = long long; /** * If u to v has odd edges include xor of all numbers in type-1 * else not. * Two tries for even and odd depth. * Find the best xor for same depth parity as v with `d[v]` *...
ALGO
0.999941
4.770463
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-02-11T15:50:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd7134739c28...
ae3afc86-8053-48e0-9baa-abdcae3a8d69
nucleargezi/acm-icpc
luogu/P_6136_模板_普通平衡树_数据加强版.cpp
#include "MeIoN_Lib/Z_H/MeioN.hpp" #include "MeIoN_Lib/MeIoN_all.hpp" #include "MeIoN_Lib/ds/splay/splay_sequence.hpp" void before() {} // #define tests using Splay = splay_sequence<int>; void Yorisou() { constexpr int N = 1'0'000'000; Splay seg(N); LL(n, q); VEC(int, a, n); sort(a); seg.rt = seg.new_node...
ALGO
0.99966
5.499106
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2024-10-29T13:52:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b794c39...
0733701a-9c88-49f1-8227-2e4e88ee0bdf
ParBLiSS/parconnect
ext/hash/invertible_hash.hpp
/* * Downloaded from <NAME>'s github repository * URL : https://gist.github.com/lh3/974ced188be2f90422cc */ /* For any 1<k<=64, let mask=(1<<k)-1. hash_64() is a bijection on [0,1<<k), which means hash_64(x, mask)==hash_64(y, mask) if and only if x==y. hash_64i() is the inversion of hash_64(): hash_64i(hash_...
ALGO
0.994107
5.51166
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2015-12-14T17:46:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11, "forks": 2, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "205ef63e...
3a6dbad2-a995-4f07-8c4a-afb1778d619f
CodeTiger927/CodeForcesRepo
650/flyingsort.cpp
using namespace std; #include <iostream> #include <algorithm> #define MAXN 200005 int N,K,a[MAXN],b[MAXN],c[MAXN],cc[MAXN],dp[MAXN],dpf[MAXN]; void solve() { cin >> N; for(int i = 0;i < N;++i) { cin >> a[i]; b[i] = a[i]; c[i] = cc[i] = dp[i] = dpf[i] = 0; } sort(b,b + N); K = unique(b,b + N) - b; for(in...
ALGO
0.999887
4.370639
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2021-05-09T19:25:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "806fe5f6ed3...
f13b45f4-f0d2-4dc2-b274-90b66d093822
sugaliudaykiran/Cpp
Basic_Cpp/spiral_order_matrix_traversal.cpp
#include<bits/stdc++.h> using namespace std; int32_t main(){ int n, m; cin >> n >> m; int ar[n][m]; for (int i=0; i<n; i++){ for (int j=0; j<m; j++){ cin >> ar[i][j]; } } // spiral order print int row_start = 0, row_end = n-1, col_start = 0, col_end = n-1; ...
ALGO
0.999967
3.313693
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2021-12-09T15:16: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": "de7690114...
bf5e7c65-a602-4a2e-ab9f-90b2ae809752
luk036/xnetwork
lib/include/xnetwork/algorithms/matching.h
// Copyright 2016 XNetwork developers. // Copyright (C) 2004-2018 by // <NAME> <<EMAIL>> // <NAME> <<EMAIL>> // <NAME> <<EMAIL>> // // Copyright (C) 2008 by // <NAME>. // // Copyright (C) 2011 by // <NAME> <<EMAIL>> // // All rights reserved. // BSD license. /** Functions for computing && verifying matchin...
ALGO
0.998639
5.8275
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2018-06-08T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0675c3ff7...
4bc5786b-7b51-45de-a4a2-4f343b9b8b52
alexandraback/datacollection
solutions_5686313294495744_1/C++/subscriber/1.cpp
#include<stdio.h> #include<iostream> #include<vector> #include<cmath> #include<algorithm> #include<memory.h> #include<map> #include<set> #include<queue> #include<list> #include<sstream> #define mp make_pair #define pb push_back #define F first #define S second #define SS stringstream #define sqr(x) ((x)*(x)) #def...
ALGO
0.999667
3.433059
{ "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": "1e9605494...
8fe16432-1f9b-49f1-aeb0-7446e55b6973
PetrovSergeyAleksandrovich/MACROSes_and_PREPROCESSOR
main.cpp
#include <iostream> #include <cstdlib> #include <string> #include <ctime> //поле struct Field { char field[10][10]; }; //заполнение поля точками, расстановка врагов void point (Field& cell) { for (int i = 0; i < 10; ++i) { for (int j = 0; j < 10; ++j) { cell.field[i][j] = '.'; } ...
TOOL
0.968967
3.223696
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-05-01T06:08: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": "4718678b43...
68a41547-b8b8-4e49-996c-e981932f5b38
duchunhui0917/datastructure
simulator.cpp
// // Created by duchunhui on 2018-12-22. // #include "simulator.h" #include "linkQueue.hpp" #include "priorityQueue.hpp" #include <iostream> using namespace std; simulator::simulator() { cout << "please enter number of server:"; cin >> noOfServer; cout << "please enter low and high arrival time:"; ci...
ALGO
0.958719
3.97761
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-12-22T15:05: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": "0c243a876d...
8eb29566-ed7f-4f15-a04d-ebbc28d9a259
TimeDA/TimeDA
dataset/cpp_12_18/gcj2013/spnautilus/2442487_2766487_spnautilus_b.cpp
#include <stdio.h> typedef long long ll; int T; int N; ll P; int main() { int tt; scanf("%d", &T); for(tt = 1; tt <= T; ++tt) { scanf("%d %I64d", &N, &P); ll NP2 = 1ll << N; // printf("2^N : %I64d\n", NP2); ll sola = 0; ll solb = -1; ll suma = 1; ll sumb = 0; ll a = NP2 ...
ALGO
0.999834
4.157009
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-10-24T06: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": "2e8b363040f...
8272b25d-3665-4ae4-aac1-2b6325c0ba11
NileshBarandwal/Daily_Challenge
LeetCode Monthly Challenge/July/Day 13/RobotCollisions.cpp
// 2751. Robot Collisions class Solution { public: vector<int> survivedRobotsHealths(vector<int>& positions, vector<int>& healths, string directions) { int n = positions.size(); vector<tuple<int, int, char, int>> robots; // {position, health, direction, index} for (int i = 0; i < n...
ALGO
0.999987
5.976263
{ "github_metadata": { "branch": "main", "commit_count": 297, "repo_created_at": "2024-04-17T17:25:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2977528aac...