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
51ea9750-6887-46c0-ad77-491f2f2cec26
memo-saldana/Competitive-Programming
Kattis/towersOfPower2HarderVersion.cpp
#include <algorithm> #include <math.h> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <queue> #include <map> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cstring> #include <climits> #define ll long long #define ull unsigned long lon...
ALGO
0.999981
3.797354
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2018-11-28T20:55:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0972cd210...
259878ca-ab43-442d-99fa-cf55758897f0
duveypriyansh/Practice
first_come_first_serve.cpp
#include <stdio.h> int main() { #include <iostream> using namespace std; int main() { int i,tat = 0,twt = 0,ttat = 0,n; int sum = 0; int wt = 0; printf("Enter the no of processes in the list\n"); //this will give value of i scanf("%d",&n); int t[n]; printf("enter the burst time fo...
ALGO
0.999886
3.171778
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-01-21T16:48:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f43fdaf7d5e...
025e1208-c60d-41e0-9c06-00e507e0f633
deep-in-apeirophobia/CompetetiveProgramingCodes
CF/691D.cpp
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <vector> #include <string> #include <algorithm> #include <queue> #include <set> #include <map> #include <math.h> #define mp make_pair #define F first #define S second #define pb pus...
ALGO
0.999993
4.03488
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-12-17T13:48:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b4040d905...
b84be303-e819-4036-8883-275e75dc4597
stevenlovegrove/Pangolin
components/pango_core/include/pangolin/utils/simple_math.h
/* This file is part of the Pangolin Project. * http://github.com/stevenlovegrove/Pangolin * * Copyright (c) 2011 <NAME> * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * re...
TOOL
0.957448
5.720842
{ "github_metadata": { "branch": "master", "commit_count": 2160, "repo_created_at": "2010-11-20T01:50:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2577, "forks": 880, "issues": 42, "pull_requests": 6 }, "file_meta": { "content_id": "1...
97061da6-fdca-4de1-943b-1a255efbce57
eric-gurrola/isce3
lib/isce/core/Sinc2dInterpolator.cpp
//-*- C++ -*- //-*- coding: utf-8 -*- // // Author: <NAME>, <NAME>, <NAME> // Copyright 2017-2018 #include <algorithm> #include "Interpolator.h" /** @param[in] sincLen Length of sinc kernel * @param[in] sincSub Sinc decimation factor */ template <typename U> isce::core::Sinc2dInterpolator<U>:: Sinc2dInterpolator(in...
ALGO
0.985225
6.515859
{ "github_metadata": { "branch": "develop", "commit_count": 1418, "repo_created_at": "2019-08-05T21:40:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7819fe...
0a154e1a-ea47-4aee-933b-b62e1da7468b
NikolajBjorner/z3
src/sat/smt/arith_sls.cpp
/*++ Copyright (c) 2023 Microsoft Corporation Module Name: arith_local_search.cpp Abstract: Local search dispatch for SMT Author: <NAME> (nbjorner) 2023-02-07 --*/ #include "sat/sat_solver.h" #include "sat/smt/arith_solver.h" namespace arith { sls::sls(solver& s): s(s), m(s.m) {} ...
ALGO
0.99993
6.552456
{ "github_metadata": { "branch": "master", "commit_count": 18486, "repo_created_at": "2015-05-14T21:45:35.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "Z3Prover/z3", "stars": 8, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id":...
1ddf0815-82d0-4851-af6c-dd80255d859e
SatvikDandale/TY_SEM1
TY_PSUO/LAB/LAB_1_12Aug.cpp
#include<bits/stdc++.h> using namespace std; class node{ public: int data; node *up, *down; node(int d){ data = d; up = down = NULL; } }; class Stack{ private: node *top; public: Stack(){ top = NULL; } void push(int d){ // Empty stack if (top == NULL){ top = new node(d); } el...
ALGO
0.948314
3.657844
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2019-09-14T09:06: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": "ca9c20add...
03612beb-2cac-4203-8dbc-c0843cdcbfa9
nguyen-trinhtk/wiedemann-analyzer
linboxbuild/linbox-install/include/linbox/matrix/matrixdomain/blas-matrix-domain-mul.inl
/* linbox/matrix/blas-matrix-domain.inl * Copyright (C) 2004 <NAME>, <NAME> * 2020 <NAME> * Written by : * <NAME> <EMAIL> * <NAME> <EMAIL> * <NAME> (briceboyer) <<EMAIL>> * * originally linbox/algorithms/blas-domain.inl * * ========LICENCE======== * Th...
ALGO
0.943643
6.95689
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2025-06-20T13:21: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": "530fc6e01f8...
a5348802-c945-4645-b77d-f9780ce6c698
devdrx/cp-submissions
graycode.cpp
//A Gray code is a list of all 2^n bit strings of length n, where any two successive strings differ in exactly one bit (i.e., their Hamming distance is one). // Your task is to create a Gray code for a given length n. #include <bits/stdc++.h> using namespace std; vector<string> init (vector<string> grey){ grey.pus...
ALGO
0.999996
4.403877
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-03-29T14:31: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": "6d9f41c9d6e...
55ea0ee7-c3b0-4ecb-9ad3-fafc1d1e14ce
autowarefoundation/autoware_universe
localization/yabloc/yabloc_image_processing/include/yabloc_image_processing/segment_filter/segment_filter.hpp
// Copyright 2023 TIER IV, Inc. // // 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 i...
TOOL
0.928959
6.925931
{ "github_metadata": { "branch": "main", "commit_count": 8531, "repo_created_at": "2021-11-19T02:59:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1208, "forks": 763, "issues": 216, "pull_requests": 161 }, "file_meta": { "content_id": "1...
adf2d977-60ba-4d9d-98d1-447842a07d01
Emptopia/Algo_Learning
Project0926/Solution.cpp
#include "Solution.h" int Solution::removeElement(vector<int>& nums, int val) { int slow = 0; for (int fast = 0; fast < nums.size(); fast++) { if (nums[fast] != val) { nums[slow] = nums[fast]; slow++; } } return slow; } int Solution::findMaxConsecutiveOnes(vector<int>& nums) { int temp = 0; int res...
ALGO
0.99997
5.165958
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2022-07-25T09:47: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": "d501bccdb...
fc657740-2620-471f-a79a-d25498718d42
sxs-collaboration/spectre
src/Evolution/Systems/ForceFree/ElectricCurrentDensity.cpp
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Evolution/Systems/ForceFree/ElectricCurrentDensity.hpp" #include <cstddef> #include "DataStructures/DataVector.hpp" #include "DataStructures/LeviCivitaIterator.hpp" #include "DataStructures/Tags/TempTensor.hpp" #include "DataStructures/T...
ALGO
0.999564
6.357394
{ "github_metadata": { "branch": "develop", "commit_count": 17103, "repo_created_at": "2017-04-07T17:28:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 168, "forks": 202, "issues": 530, "pull_requests": 57 }, "file_meta": { "content_id": ...
72f2f13d-1b50-4831-bee9-2dae1daf4eb8
Matvey-Makaro/Assembler
second_pass.cpp
// // Created by matvey on 5/14/23. // #include "second_pass.h" #include <cassert> SecondPass::SecondPass(size_t programm_size, LexemeTable &lexeme_table, NameTable &name_table, LiteralTable &literal_table, RowToAddress &row_to_address) : _lexeme_table(lexeme_table), _name_table(name_t...
TOOL
0.936629
4.874544
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-05-08T09:47: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": "438be3d7d5b...
46329870-f5a1-49ec-a31b-575f7336b6fd
voyager23/Project-917
src/no_matrix.cpp
/* * priority_q.cpp * * Copyright 2024 Mike <<EMAIL>> * 01Dec2024_09:30 * Try to remove the matrix completely and rely on the info * in the priority queue to advance the nodes. * Keep coord pair */ #include <iostream> #include <cstdint> #include <vector> #include <queue> #include <utility> #include <algorit...
ALGO
0.999939
4.170636
{ "github_metadata": { "branch": "trunk", "commit_count": 43, "repo_created_at": "2024-12-17T10:09: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": "5b7deaeb3d...
02d476fa-cdbb-49f9-9f5c-de3e707279e6
durgeshkk/Codeforces-Contests
Practice/1700/E_MEX_and_Increments.cpp
#include<bits/stdc++.h> #include<iomanip> #include <deque> #include <bitset> #include <cstdint> #define ll long long int #define enter(a) for(ll i=0;i<a.size();i++) cin>>a[i]; #define show(a) for(ll e: a) cout<<(e)<<" "; cout<<endl; using namespace std; ll mod = (ll)(1e9+7); void solve() { ll n;cin>>n; vect...
ALGO
0.999508
4.174232
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-11-23T16:31:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1375d85f546...
333409bc-c139-4da8-b74d-4877d285e5de
Tamimkhan7/CF-Contest
Random/C Quests.cpp
#include <bits/stdc++.h> using namespace std; #define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> #define faster \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); typedef long long int ll; void solve() { int ...
ALGO
0.999965
3.538911
{ "github_metadata": { "branch": "main", "commit_count": 118, "repo_created_at": "2023-09-22T15:40: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": "a1fbd599af...
78dbb8da-4b34-4744-be64-74cefc00e2e9
cea-trust-platform/trust-code
src/ThHyd/Incompressible/Sources/Terme_Boussinesq_base.h
/**************************************************************************** * Copyright (c) 2024, CEA * 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 retai...
ALGO
0.947109
4.024304
{ "github_metadata": { "branch": "master", "commit_count": 9704, "repo_created_at": "2021-03-29T11:57:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 59, "forks": 19, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "08faae...
514f3713-368b-4c44-8c78-dba38f885522
parth2170/reco
imageGraph/src/lrMahalanobis.cpp
/* * This software is Copyright © 2016 The Regents of the University of California. All Rights Reserved. Permission to copy, modify, and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the ab...
ALGO
0.999749
5.767541
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2018-12-06T16:39:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e86d722d...
e633274c-9319-4074-814f-488f2a4cce19
biela000/rep1
algorytmy/fib_numbers.cpp
#include<iostream> #include<vector> typedef unsigned long long ull; ull Fib(int n) { if (n == 0) { return 0; } if (n == 1) { return 1; } return Fib(n - 1) + Fib(n - 2); } class ProdFib { public: ProdFib(const ProdFib&) = delete; static ProdFib& Get() { static ProdFib pf; return pf;...
ALGO
0.999971
4.612283
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2021-06-22T15:37: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": "5cd42bf1d81...
3f659635-fc6b-4a70-88da-b89daf30873f
tridibsamanta/GeeksforGeeks_Solutions
Practice/Word_Break.cpp
/** * Title : Word Break * Author : <NAME> * Link : https://practice.geeksforgeeks.org/problems/word-break1352/1 **/ // { Driver Code Starts //Initial template for C++ #include <bits/stdc++.h> using namespace std; int wordBreak(string A, vector<string> &B); // User code will be pasted here int main(){ ...
ALGO
0.998992
5.064774
{ "github_metadata": { "branch": "master", "commit_count": 351, "repo_created_at": "2020-03-28T17:49:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f338805a...
ae8db0aa-1f79-44d6-83d4-44dfb1db24e5
IgnAMS/ICPC
Ejercicios/Vjudge/ProgComp II/Contest 13/F.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) typedef pair<int,int> ii; #define ff first #define ss second struct e{ int s, cost, en; //size, cost, enemy e(int s, int cost, int en): s(s), cost(cost), en(en) {} }; vector<vector<ii>> g; struct G{ ...
ALGO
0.999363
3.539758
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2021-05-19T20:12:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2d17c9b8...
a65b3c24-123b-4ad0-a1ca-be562296a200
Anshu-771/DSA
bubble+.cpp
#include <iostream> using namespace std; void bubble(int arr[], int n) { int i, j, flag; for(i = 0; i < n; i++) { flag = 0; for(j = 0; j < n - i - 1; j++) { if(arr[j] > arr[j + 1]) { int temp = arr[j]; arr[j] = arr[j + 1]; ...
ALGO
0.999876
4.670869
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-07T16:04:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be08134d057e...
d66f8af3-b160-49ff-8bac-1209a454aa35
rapidsai/raft
cpp/include/raft/neighbors/detail/cagra/bitonic.hpp
/* * Copyright (c) 2023-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
ALGO
0.999883
7.474115
{ "github_metadata": { "branch": "branch-25.08", "commit_count": 2224, "repo_created_at": "2019-06-13T14:32:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 912, "forks": 208, "issues": 421, "pull_requests": 12 }, "file_meta": { "content_i...
2c53278b-1e9d-41ab-8321-02df073c0765
Laboputer/ProblemSolving
Baekjoon/12000/12100.cpp
#include <stdio.h> #define MAXN 20 int N; int m[MAXN][MAXN]; int arr[MAXN]; int cnt; int ans = 0; void F(int n) { if (n == 5) { for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) if (ans < m[i][j]) ans = m[i][j]; return; } int tmp[MAXN][MAXN]; // tmp변수를 전역으로 두면 재귀에서 바뀐다..? ...
ALGO
0.999981
3.502979
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2017-08-26T16:16: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": "9d45c4c5b...
def45226-d5bb-4cf7-bb7c-c4de3446f2cc
zRegle/algorithm
dfs/字符的所有组合.cpp
/** * 剑指offer - 字符的所有组合 * 输入n个字符, 求这n个字符的所有组合方案数 * * 示例: * 输入: a, b, c * 输出: 7 * 解释: a, b, c, ab, ac, bc, abc * 注意: 字符相同但顺序不同, 例如"ab"和"ba", 也视作同一个组合, */ #include <string> #include <vector> using namespace std; /* dp方法查看dp文件夹 */ class Solution { public: int combination(vector<char>& chs) { in...
ALGO
0.999719
5.353598
{ "github_metadata": { "branch": "master", "commit_count": 272, "repo_created_at": "2018-08-04T13:47:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a215be48...
ea1beade-ea57-49d9-a372-e15eec86daf6
IDNI/TML
tests/tc/tcrand.cpp
#include <iostream> #include <cstdlib> #include <map> #include <set> #include <ctime> #include <fstream> #include <array> using namespace std; #define measure_time(x) start = clock(); x; end = clock(); \ cout << double(end - start) / CLOCKS_PER_SEC << endl size_t size(const map<int, set<int>>& m) { size_t r = 0; f...
ALGO
0.989407
4.4796
{ "github_metadata": { "branch": "master", "commit_count": 1457, "repo_created_at": "2017-09-29T15:05:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 123, "forks": 28, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "3d3b6...
8868c170-4a57-40a7-93f4-7b34a5387e40
mesolitica/malaya-speech
ctc-decoders/openfst-1.6.3/src/bin/fstdisambiguate.cc
// See www.openfst.org for extensive documentation on this weighted // finite-state transducer library. // // Disambiguates an FST. #include <cstring> #include <memory> #include <string> #include <fst/script/disambiguate.h> DEFINE_double(delta, fst::kDelta, "Comparison/quantization delta"); DEFINE_int64(nstate, fst...
ALGO
0.978477
6.507619
{ "github_metadata": { "branch": "master", "commit_count": 730, "repo_created_at": "2020-08-22T03:44:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 262, "forks": 45, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "d19447...
cb215cc9-5a08-42ab-84f6-de0a1ffdf4fa
anakhaei/CarND-Extended-Kalman-Filter-Project
src/tools.cpp
#include <iostream> #include "tools.h" using Eigen::VectorXd; using Eigen::MatrixXd; using std::vector; Tools::Tools() {} Tools::~Tools() {} VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth) { VectorXd rmse(4); rmse << 0, 0, 0...
ALGO
0.992376
6.114587
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-08-24T01:01: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": "3045f8f2fd...
10aa87d4-6c54-4106-8e0e-f986ea8df577
akhikolla/testpackages
fuzzedpackages/RiemBase/inst/include/manifolds/riem_05grassmann.h
#ifndef RIEM_05GRASSMANN_H #define RIEM_05GRASSMANN_H #define ARMA_NO_DEBUG // [[Rcpp::depends(RcppArmadillo)]] #include <RcppArmadillo.h> using namespace arma; // 01. dim(x) inline int grassmann_dim(arma::mat x){ int n = x.n_rows; int p = x.n_cols; int output = p*(n-p); return(output); } // 02. inner(x,d1...
ALGO
0.998299
6.632099
{ "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": "8c18499436...
6064f6cc-2e47-45e4-80df-1029750c7226
shubhamt7/leetcode-solutions
findDupsInFilepath.cpp
class Solution { public: vector<string> getFileNameAndContent(string file){ string content = ""; int i; for(i = file.length() - 2; file[i] != '('; i--){ content += file[i]; } string fileName = file.substr(0, i); return {content, fileName}; ...
ALGO
0.988797
4.931528
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-02-02T16:53:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07b3fba41...
d53af8f5-6be8-4715-a0fa-d6a25dda40bd
Sudhanshu3011/Leetcode
Reccursion/Power.cpp
// Pow(x, n) // Implement pow(x, n), which calculates x raised to the power n (i.e., xn). // Example 1: // Input: x = 2.00000, n = 10 // Output: 1024.00000 // Example 2: // Input: x = 2.10000, n = 3 // Output: 9.26100 // Example 3: // Input: x = 2.00000, n = -2 // Output: 0.25000 // Explanation: 2-2 = 1/22 = 1/4 ...
ALGO
0.999726
6.326428
{ "github_metadata": { "branch": "main", "commit_count": 100, "repo_created_at": "2024-01-20T15:13: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": "d2c86aa91e...
93a7b3c4-3096-4f9a-b167-09551edd81cf
scanof/Competitive-Programming
Leetcode/Burst_Balloons.cpp
class Solution { #define fi first #define se second #define forn(i,n) for(int i=0; i< (int)n; ++i) #define for1(i,n) for(int i=1; i<= (int)n; ++i) #define fore(i,l,r) for(int i=(int)l; i<= (int)r; ++i) #define ford(i,n) for(int i=(int)(n) - 1; i>= 0; --i) #define fored(i,l,r) for(int i=(int)r; i>= (int)l; --i) #define ...
ALGO
0.999986
4.137481
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-11-14T00:36:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37ed21964484...
74a51269-41f8-4391-b0be-fbb78f4b0d35
victor-korotchenya/StandardAlgorithms
StandardAlgorithms/Geometry/segmented_regression_old.h
#pragma once #include"segmented_regression.h" namespace Standard::Algorithms::Geometry { template<class int_t1, class long_int_t1, class point_t1> requires(sizeof(int_t1) <= sizeof(long_int_t1)) struct segmented_regression_old final { using int_t = int_t1; using long_int_t = long_int_t1...
ALGO
0.999525
6.093346
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-03-12T18:35:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8808ce9a183a...
89336c3a-2784-4484-8f35-8a717b5a6008
parth1212121/COL106_ASSIGNMENTS
ASSIGNMENT_7/dict.h
// Do NOT add any other includes #include <fstream> #include <iostream> #include <string> #include <vector> #pragma once using namespace std; struct TrieNode { char key; long long freq; bool is_end; vector<TrieNode *> children; TrieNode(char key, long long freq, bool is_end) : key{key}, freq...
ALGO
0.967482
4.543565
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-10-07T04:49:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "279adf6b0e5f...
bd012a24-608e-43de-af70-587404547959
CubbyFlow/CubbyFlow
Sources/Core/Geometry/Sphere.cpp
// This code is based on Jet framework. // Copyright (c) 2018 <NAME> // CubbyFlow is voxel-based fluid simulation engine for computer games. // Copyright (c) 2020 CubbyFlow Team // Core Part: <NAME>, <NAME>, <NAME>, <NAME> // AI Part: <NAME>, <NAME> // We are making my contributions/submissions to this project solely i...
TOOL
0.929846
7.415017
{ "github_metadata": { "branch": "main", "commit_count": 996, "repo_created_at": "2018-05-05T13:13:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 286, "forks": 34, "issues": 33, "pull_requests": 1 }, "file_meta": { "content_id": "0ea0115...
8d230fdf-2a8b-4bd2-a28e-4264223f2b3c
pedrodelyra/competitive-programming
urionlinejudge/mathematics/1582.cpp
#include <bits/stdc++.h> using namespace std; using lld = long long int; lld gcd(lld a, lld b) { return b == 0 ? a : gcd(b, a % b); } lld gcd(lld a, lld b, lld c) { return gcd(a, gcd(b, c)); } int main() { lld x, y, z; while(cin >> x >> y >> z) { if(x * x == y * y + z...
ALGO
0.999504
4.738235
{ "github_metadata": { "branch": "master", "commit_count": 163, "repo_created_at": "2016-07-13T00:23:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54e1a11d...
c43b0011-6b2c-4d75-ae08-1f19762609fb
fenic-peiteado/Advent-of-Code-24
day5/main.cc
/** * @file main.cc * @author <NAME> (<EMAIL>) * @brief The solution for advent of code 2024 day 1 * @version 0.1 * @date 2024-11-30 * * @copyright Copyright (c) 2024 * */ #include <bits/stdc++.h> #include "utils.cc" typedef long long ll; typedef std::vector<long long> vi; typedef std::vector<std::string> v...
ALGO
0.99947
5.493882
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-11-30T20:51: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": "c0a9399239b...
536e0cb7-47d0-41a3-b4e8-fad91056db89
RSL-NEU/person-reid-benchmark
MetricLearning/KISSME/toolbox/lib/LMNN/_mexfunctions/lmnnobj.cpp
/* * ============================================================= * cdist.c * input: x,a,b * x: DxN matrix * a: 1xN vector of indices * b: 1xN vector of indices * * output: sum((x(:,a)-x(:,b)).^2) * * ============================================================= */ /* $Revision: 1.2 $ */ #include "m...
ALGO
0.999596
4.945529
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-11-22T18:17:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 197, "forks": 73, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "eeeaa3...
39d38a75-6a14-4cc6-882d-ba93d7859dcc
PyayAungSan/Data-Structure-and-Algorithm
Greedy/different_summands.cpp
#include <iostream> #include <vector> using namespace std; vector<int> optimal_summands(int n) { vector<int> summands; /* Given integers k and l, where l<= k, represent k as a sum of as many pairwise distinct integers each of which is at least l as possible. if k <= 2l then answe...
ALGO
0.999957
4.269366
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-06-01T20:11:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "35409dd8a3...
2d0c31bd-4d6b-43aa-bd2b-29920f90a473
DarnedBuzzard70/OI-Love
outgoing-training-notes/qbxt-2023-summer-noip-s/Day9/Code/A.cpp
#include <iostream> #include <vector> using namespace std; #define loop(i, a, n) for (int i = a; i < int(n); ++i) vector<int> v; string s; int rec(int& sind, int& vind){ int left, right; char op; if (s[++sind] == '('){ left = rec(sind, vind); } else { left = v[vind++]; } op = s...
ALGO
0.999943
4.144145
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-08-08T14:12: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": "8b1ef068dcd...
d14bd9cd-89a7-4e10-a620-cc05a1701c9f
QuanNM-PTIT/C_plus_plus_PTIT
CPP0331 - SUM STRING.cpp
// Created by <NAME> #include<bits/stdc++.h> using namespace std; #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define ll long long #define FOR(i, a, b) for(int i = a; i <= b; ++i) #define FORD(i, a, b) for(int i = a; i >= b; --i) #define F(i, a, b) for(int i = a; i ...
ALGO
0.999888
4.838893
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-10-01T05:15:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9ce602bff5...
3597588c-225c-434e-ad91-a4fc447e853b
ishandutta2007/codeforces-j
juve45/normal/264/A.cpp
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> //required // #include <ext/pb_ds/tree_policy.hpp> //required // using namespace __gnu_pbds; using namespace std; void debug_out() { cerr << endl; } template<class T> ostream& prnt(ostream& out, T v) { for(auto e : v) out << e << '\n'; return out;}...
ALGO
0.9993
3.314245
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:42:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "badc243edd81...
c0bb8109-1d7b-4172-9f86-17f5c031c3ac
victmar13/FAL
Examen Junio 2023/Ej3/Source.cpp
//A43 //<NAME> #include <iostream> #include <vector> #include <iomanip> #include <fstream> using namespace std; struct tHeroe { vector<int> clase; vector<int> nivel; vector<int> ptosAtaque; }; struct tDatos { int numHeroes, nCristales, maxLevelCristal, PV; tHeroe heroe; //[x] == num Heroe , }; struct tSol { ve...
ALGO
0.999708
3.94258
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-06T18:17: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": "6a0ed4132126...
ad823fa0-5c3d-4b3a-8aba-b67f4d3612e5
BabkenK/Jul-15Homework
array_recursive_print.cpp
#include <iostream> void printArrayRecursive(int arr[], int size, int i); void printArrayRecursive(int arr[], int size, int i) { if (i >= size) { return; } std::cout << arr[i] << " "; printArrayRecursive(arr, size, i + 1); } int main() { int size = 0; std::cout << "Enter the ...
ALGO
0.971447
5.672705
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-16T21:23: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": "6626d9e77f14...
d34402f8-b238-4199-8170-93367274b4b5
ProteoWizard/pwiz
pwiz_tools/Bumbershoot/idpicker/Qonverter/waffles/GMixtureOfGaussians.h
/* Copyright (C) 2006, <NAME> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. see http://www.gnu.org/copyleft/l...
TEST
0.940678
6.775983
{ "github_metadata": { "branch": "master", "commit_count": 12477, "repo_created_at": "2018-03-12T21:16:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 277, "forks": 106, "issues": 87, "pull_requests": 34 }, "file_meta": { "content_id": "9...
825be561-7d4a-46da-8d1b-65434941e47b
marcclintdion/a8a__SHADER_GALLERY_300
MATRIX_MATH.cpp
void Scale(float* mtx, float xScale, float yScale, float zScale) { // [ 0 4 8 12 ] [ x 0 0 0 ] // [ 1 5 9 13 ] x [ 0 y 0 0 ] // [ 2 6 10 14 ] [ 0 0 z 0 ] // [ 3 7 11 15 ] [ 0 0 0 1 ] mtx[ 0] *= xScale; mtx[ 4] *= yScale; mtx[ 8] *= zScale; mtx[ 1] *= xScale; mtx[ 5]...
ALGO
0.995952
4.441433
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-09-30T14:00:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7078ea40f...
f5624eba-9048-4316-bdd7-b36bc96900b5
miaomiaozhi/dailystudy
Template/Algorithm/Kruskal.cpp
/* 克鲁斯卡尔 最小生成树算法 常数很小 O(mlogm) m为边数 流程: 1、将所有边按照权重从小到大排序 时间复杂度瓶颈 2、遍历所有边 利用并查集在O(1)时间判断a b是否联通 不连通那就加权 加边 */ const int N = 100010, M = 2e5 + 10; struct Edge { //因为不关心边的顺序 所以也用结构体数组来存储边 int a, b, w; bool operator< (const Edge &E) const { //重载操作符 return w < E.w; } }edge[M]; int n, m; int...
ALGO
0.999969
4.604865
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-09-06T13:02: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": "f1ff03990da...
ab58620b-1121-4d10-9593-b0eb9ce709ff
qiaozishun4/CSP2024_BJ
BJ-Senior/answers/BJ-S00498/duel/duel.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; typedef long long ll; ll n, a[N]; bool cmp(const ll x, const ll y) { return x > y; } int main() { freopen ("duel.in", "r", stdin); freopen ("duel.out", "w", stdout); cin >> n; ll num = 0; for (int i = 1; i <= n; i++) { ...
ALGO
0.99949
3.335546
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-11-01T16:05: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": "072e2f2c8f...
1176d83c-bd7c-4740-a9e9-bc8cbfc2cbbd
ruhul000/Competitive-Programming
Data Structure & Algorithm/DP/Coin Change/CoinChange.cpp
// Returns the count of ways we can sum S[0...m-1] coins to get sum n /*#include<stdio.h> int count( int S[], int m, int n ) { // If n is 0 then there is 1 solution (do not include any coin) if (n == 0) return 1; // If n is less than 0 then no solution exists if (n < 0) return 0; ...
ALGO
0.999895
4.543042
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-12-17T12:14:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2a0b4f46bc0...
75bba268-0f83-4b50-b487-57348d3258de
GordilloXavi/pro1
P8/P59112.cc
#include<iostream> #include <vector> using namespace std; typedef vector< vector<char> > Matrix; void display(Matrix& m){ int n = m.size(); for(int i = 0; i<n; ++i){ for(int j = 0; j<n; ++j)cout << m[i][j]; cout << endl; } cout << endl; } int main() { int n; while(ci...
ALGO
0.999846
3.913744
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2018-10-11T16:40: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": "e2a7f57e5...
2af0d0ce-2686-4434-b984-e684ea5f7fef
curlfoxs/algorithm
cses_model/c.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ar array const int mxN=2e5; int n, m; ll x; struct { struct { ll mn, s, lazy, mxl, mxr, mxs; bool sub=0; } seg[1<<19]; /* update current node when accessed */ void eval(int i, ll x, bool sub, int l, int r) { ...
ALGO
0.999889
3.878589
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-10-12T23:51: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": "9c03661d15...
25a46179-60b9-4bf6-8d0a-62f044cf8551
HONG-LOU/training
Daily_Training/23-1/7/e.cpp
/** * author: HONG-LOU * created: 2023-01-07 21:26:44 **/ #include <bits/stdc++.h> auto main() -> int { std::cin.tie(nullptr) -> std::ios::sync_with_stdio(false); int n, m; std::cin >> n >> m; std::vector<std::vector<int>> a(n); std::vector<bool> c(n, false); int ans = 0; for (int i = 0; i < m;...
ALGO
0.999433
4.123845
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2022-11-16T10:37:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "116439c9d39...
83e02948-6d5c-44b7-807b-d39a7d0c84bd
AdsonFS/beecrowd-codes
codes/2136.cpp
#include <bits/stdc++.h> using namespace std; #define all(S) (S).begin(), (S).end() #define PI 3.1415926535897 #define INF 0x3f3f3f3f #define mod 1000000007 #define pb push_back #define mk make_pair #define MAX 100005 #define S second #define F first typedef long long ll; typedef pair<int, int> ii; typedef pair<int, ...
ALGO
0.99941
3.249793
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-11-22T19:41: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": "a2f873721c2f...
30419d9b-8652-4e99-8a95-f5ea0edabb91
sujeong000/PS-Study
BOJ/7000-7999/7453.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int N; int A[4000], B[4000], C[4000], D[4000]; vector<int> sum; void match_CD() { for (int i=0; i<N; i++) { for (int j=0; j<N; j++) { sum.push_back(C[i] + D[j]); } } sort(sum.begin(), sum.end(...
ALGO
0.999831
4.426485
{ "github_metadata": { "branch": "main", "commit_count": 708, "repo_created_at": "2021-07-12T14:16:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1421be09e3...
6decd0bc-ef58-4100-9c16-ebad39a7351b
MansiSMore/CodeChef_Solutions
BIRDFARM.cpp
/* In Chefland, each chicken has X legs and each duck has Y legs. Chef's farm can have exactly one type of bird. Given that the birds on the farm have a total of Z legs: Print CHICKEN, if the farm can have only chickens but not ducks. Print DUCK, if the farm can have only ducks but not chickens. Print ANY, if the farm ...
ALGO
0.999329
4.645823
{ "github_metadata": { "branch": "main", "commit_count": 352, "repo_created_at": "2021-05-02T14:09:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60d81a50cc...
3b7dc86a-022c-4a65-af34-68c41693a5a2
alexandraback/datacollection
solutions_5709773144064000_1/C++/fengzlzl/b.cc
#include <cstdio> #include <iostream> using namespace std; int main() { freopen("B-large.in", "r", stdin); freopen("B-large.out", "w", stdout); int T; scanf("%d", &T); for (int cas = 1; cas <= T; cas++) { double C, F, X; scanf("%lf%lf%lf", &C, &F, &X); // cout << C << " " << ...
ALGO
0.997939
3.704004
{ "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": "118a10dca...
c3f6ecfd-46d9-4e72-bb5f-5bda5ab8651d
nkb02/dsa
Recursion/CombinationSum II.cpp
#include <bits/stdc++.h> #define ll long long #define int ll #define lld long double #define el "\n" #define sp " " #define F first #define S second #define rep(i, m, n) for (ll i = m; i < n; i++) #define rev(i, n, m) for(ll i=n-1; i>=m; i--) #define pb push_back #define mp make_pair #define fl(i, n) for (int i = 0; i ...
ALGO
0.999774
4.515263
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-06-24T09:54: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": "2898f019e9c5...
376cbe6d-6dda-4fb2-937b-ffeda70f047a
vuquangsang/VQS
incseq.cpp
#include <bits/stdc++.h> using namespace std; //#define ll int #define lg(x) __lg(x) #define alla(a,n) a+1,a+n+1 #define el "\n" #define all(x) x.begin(),x.end() #define pb push_back #define ll long long #define fi first #define se second #define Mask(i) (1ll<<(i)) #define c_b...
ALGO
0.99977
3.630396
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-02-15T18:54: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": "4f93a2f189d1...
5d1fada9-1d0d-466b-bb83-1d8c01739a35
SKKU-ESLAB/Auto-Compression
kernel/U-XNNPACK/bench/f32-velu.cc
// Copyright 2020 Google LLC // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #include <algorithm> #include <cmath> #include <functional> #include <random> #include <vector> #include <benchmark/benchmark.h> #include "bench/utils.h" ...
TEST
0.960582
5.391812
{ "github_metadata": { "branch": "master", "commit_count": 957, "repo_created_at": "2019-11-26T04:25:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21, "forks": 18, "issues": 0, "pull_requests": 13 }, "file_meta": { "content_id": "d39357...
bf6d1879-883f-4d00-97a4-f1aed7afffdc
Bhavya-Goyal-Git/DSA-practice
29_checkRotatedSorted.cpp
#include <iostream> #include <vector> using namespace std; // Problem Link : https://leetcode.com/problems/check-if-array-is-sorted-and-rotated/submissions/1276039059/ // Problem : Given an array nums, return true if the array was originally sorted in non-decreasing order, then rotated some number of positions (inclu...
ALGO
0.999985
6.100229
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-02-12T09:05: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": "427cb6164bc...
0f9b8633-8a81-46d1-b5c6-493f7f14ab42
ooooo-youwillsee/leetcode
lcof/lcof_029/cpp_029/Solution1.h
// // Created by ooooo on 2020/3/18. // #ifndef CPP_029__SOLUTION1_H_ #define CPP_029__SOLUTION1_H_ #include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> spiralOrder(vector<vector<int>> &matrix) { if (matrix.empty()) return {}; int m = matrix.size(), n = matrix[0...
ALGO
0.999984
6.737353
{ "github_metadata": { "branch": "master", "commit_count": 1019, "repo_created_at": "2019-10-29T04:42:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a328349...
b18db778-2e72-42e4-ae51-748ccd22f5b2
aleksamarkoni/uvasolutions
10196 - Check The Check/main.cpp
#include <iostream> #include <string> using namespace std; #define WIDTH 8 #define HEIGHT 8 enum PLAYER { WHITE, BLACK }; enum UNDER_CHECK { BLACK_KING, WHITE_KING, NO_KING }; class Board { public: char board[8][8]; bool isEmpty() { for (int i = 0; i < WIDTH; i++) for (int j = 0; j < HEIGHT...
ALGO
0.999267
4.934757
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2014-11-05T14:53: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": "a16cc885...
588cf70b-db01-4eeb-8b6b-d1c84a74284b
setarcos/itppexp
polar/bec/bec.cpp
#include <itpp/itsignal.h> #include <fstream> using namespace std; using namespace itpp; int main() { vec a[2]; a[0] = "0.5"; int n = 1; for (int i = 0; i < 10; ++i) { n *= 2; int j = i + 1; a[j % 2].set_size(n); for (int k = 0; k < n / 2; ++k) { a[j % 2][k ...
ALGO
0.989784
4.10904
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2016-06-09T01:27:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85691241a...
5f8cbde1-deab-4fb3-97dd-3a4b4cf24a5b
pr1stvan/thesis_project
sources/treeitem.cpp
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** Commercial License Usage ** Licensees holding valid commercial Qt...
TOOL
0.959266
6.151309
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2018-04-16T02:16: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": "608b552a4...
35c08046-b090-4aeb-bf30-dcef725316fa
AlixHaider/NMPC_Acado_Simulink_Speedgoat
mpc.cpp
/* * This file is part of ACADO Toolkit. * * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization. * Copyright (C) 2008-2009 by <NAME> and <NAME>, K.U.Leuven. * Developed within the Optimization in Engineering Center (OPTEC) under * supervision of Moritz Diehl. All rights reserved. *...
ALGO
0.957385
5.656913
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-01-30T03:44:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fe8616044d...
28f7c387-6fe2-441a-821d-1d963becde94
Olapeju/Merge_list
MergeList/Damilola_Ogunsola_Assignment8/Header.h
//A program that merges two ordered list objects of integers into a single ordered list object of integers. #include<assert.h> #include <iostream> struct Node //linked list node { int data; struct Node* next; }; void MoveNode(struct Node** destination, struct Node** source) //This function takes the node fr...
ALGO
0.997546
5.45223
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-08T22:30:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50cd38e01c...
c1412724-f643-4ba5-b319-e1ee04dc96d6
ttamx/Competitive-Programming
codeforces/1950F.cpp
#include<bits/stdc++.h> #define sz(x) (int)(x).size() #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() using namespace std; using ll = long long; using db = long double; using vi = vector<int>; using vl = vector<ll>; using vd = vector<db>; using pii = pair<int,int>; using pll = pair<ll,ll>...
ALGO
0.999776
3.882603
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2023-03-11T10:01:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b6e9adc6c3...
2b577b6c-ec55-4382-934d-b41d88e5f12e
liuq901/code
SPOJ/sp_1476.cpp
#include <cstdio> #include <cstdlib> #include <cstring> struct data { int x,c; struct data *next,*tail,*opp; }; struct data *a[56000]; int n,b[56000]; int main() { void work(); int t; scanf("%d",&t); while (t--) work(); system("pause"); return(0); } void work() { struct data *add(int,in...
ALGO
0.999974
3.33712
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2013-09-18T08:58:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67e5c9b7...
59c0b9a5-4949-4b9f-ae44-8dfb115a23b2
jjj5306/jjj5306.github.io
Algorithm/Solving/BOJ/14002.cpp
/** DP 가장 긴 증가하는 부분 수열 4 **/ //다시 풀기 #include <iostream> #include <vector> #include <algorithm> #include <cstdlib> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int N; cin >> N; vector <int> A(N); for (auto& i : A) cin >> i; vector <int> B(N, 1); //이전 위치를 저장하는 배열 F vector <in...
ALGO
0.999997
4.150267
{ "github_metadata": { "branch": "main", "commit_count": 154, "repo_created_at": "2021-08-05T06:16:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0939877a67...
cf6b6cbe-114a-42fe-9784-4ecced87665c
lydrainbowcat/tedukuri
配套光盘/例题/0x20 搜索/0x23 剪枝/Sudoku/POJ3076 Sudoku.cpp
//Author:XuHt #include <cstdio> #include <vector> #include <cstring> #include <iostream> using namespace std; char s[16][16]; int cnt[1<<16], f[1<<16], num[16][16], n = 0; vector<int> e[1<<16]; void work(int i, int j, int k) { for (int t = 0; t < 16; t++) { num[i][t] &= ~(1 << k); num[t][j] &= ~(1 << k); } int ...
ALGO
0.999901
3.730298
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2018-03-18T01:24:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2487, "forks": 607, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "e5...
5bf1f1ff-2d3b-4df1-89d1-48a21c56e2a7
pieper/Slicer4
Applications/CLI/DiffusionApplications/dwiNoiseFilter/itkMaskedMeanImageFilter.h
/*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: $RCSfile: itkMaskedMeanImageFilter.h,v $ Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) Insight Software Consortium. All rights reserved. Se...
ALGO
0.933997
7.114246
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2010-03-23T23:08:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7cc0f9415...
5955925d-1f9d-41ae-b6b5-c3a197a13c45
Washburn7/Competitive-programming
1922C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr int N = 2e5 + 10; void solve() { int n; cin >> n; vector<int> a(n + 1); vector<int> l(n + 1), r(n + 2); for(int i = 1; i <= n; i++) cin >> a[i]; for(int i = 1; i < n; i++) { if(i == 1 || a[i + 1] - a[i] < a[...
ALGO
0.999976
4.899736
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-12-14T19:54:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14fbb1eb5b8e...
97232e20-7bd4-4674-9cf8-fa0258cf64ad
xulzee/LeetCodeProjectCPP
source/autumn-recruitment/148. Sort List.cpp
// // Created by liuze.xlz on 2019-08-28. // #include "utils.h" class Solution { public: ListNode *sortList(ListNode *head) { return head == nullptr ? nullptr : MergeSortList(head); } ListNode *MergeList(ListNode *l1, ListNode *l2) { ListNode *dummy_head = new ListNode(0); ListNode...
ALGO
0.999963
6.136651
{ "github_metadata": { "branch": "master", "commit_count": 257, "repo_created_at": "2019-07-29T13:58:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13902431...
2fc8d288-4363-400d-9663-9b85b39ac153
NopsMops/AoC
2022Cpp/AdventOfCode/Day6/Day6.cpp
// Day6.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <limits> #include <fstream> #include <string> #include <sstream> #include <vector> #include <regex> #include <cassert> #include <map> #include <list> #include <set> int result(std::string& li...
ALGO
0.998785
4.4289
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2022-10-07T10:03: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": "1e8a38c2e...
c356cfff-fb61-4147-9478-d10a4f9248af
shas9/codehub
Atcoder/Beginner Contest/Round 171/F-01.cpp
// God put a smile upon your face <3 #include <bits/stdc++.h>` #define slld(longvalue) scanf("%lld", &longvalue) #define ll long long #define ull unsigned long long #define pll pair < long long, long long > #define fastio ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0) #define pb push_back #define bug ...
ALGO
0.999941
4.057892
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-07-25T17:32: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": "11e43e7ad8...
48b0aaec-1f24-4dd6-9264-48d4a7cb7fcd
ZnnnnnH2/discrete-math
1329.cpp
#include <iostream> #include <string.h> #include <stdio.h> #include <math.h> #include <algorithm> #include <vector> typedef long long ll; typedef int *intt; typedef char *charr; const int inf=0x3f3f3f3f; const int N=1e5+5; std::string str; int getmun(int &l, int &r) { for (; l < r; l++) { if (str[l] ...
ALGO
0.999719
3.622096
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-02-26T10:02:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "601a61269fa...
4bcb3417-8960-41f9-a0a9-224082332180
djkovrik/EckelCpp
Volume 2/7. Containers/ex13.cpp
/* Modify Ring.cpp so that the underlying implementation can be chosen using a template argument. (Let that template argument default to list.) */ //: C07:Ring.cpp // From "Thinking in C++, Volume 2", by <NAME> & <NAME>. // (c) 1995-2004 MindView, Inc. All Rights Reserved. // See source code use permissions stated in ...
TOOL
0.959031
6.460855
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-07-01T15:39:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 95, "forks": 36, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "919781c9...
dfd53f77-1981-4eeb-b05b-05ba6976f82f
vishal-chdhry/grind-75-notebook
week-3/partition-equal-subset-sum.cpp
class Solution { public: bool canPartition(vector<int>& nums) { int sum = 0, n = nums.size(); for (int i : nums) sum += i; if (sum & 1) return false; sum /= 2; bool dp[n + 1][sum + 1]; for (int i = 0; i < n + 1; i++) for (int j = 0; j < sum + 1; j++) dp[i][j] = false; for (int i ...
ALGO
0.999032
5.604886
{ "github_metadata": { "branch": "main", "commit_count": 134, "repo_created_at": "2022-05-22T04:58: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": "23c724e57e...
ebbbc7a3-7564-42cc-8e56-4439dfed871d
410588896/leetcode
algorithms/cpp/convertSortedArrayToBinarySearchTree/convertSortedArrayToBinarySearchTree.cpp
/* * @lc app=leetcode id=108 lang=cpp * * [108] Convert Sorted Array to Binary Search Tree */ /******************************** * * Given an array where elements are sorted in ascending order, convert it to a height balanced BST. * * For this problem, a height-balanced binary tree is defined as a binary tree in ...
ALGO
0.999994
7.034583
{ "github_metadata": { "branch": "master", "commit_count": 377, "repo_created_at": "2020-08-31T12:50: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": "48fef42f...
f20067fd-4d2f-4d3a-a399-f60806792cb2
capitalaslash/libmesh_sandbox
hermite1d/main_trad.cpp
#include <libmesh/dirichlet_boundaries.h> #include <libmesh/dof_map.h> #include <libmesh/equation_systems.h> #include <libmesh/error_vector.h> #include <libmesh/exodusII_io.h> #include <libmesh/fe.h> #include <libmesh/kelly_error_estimator.h> #include <libmesh/libmesh.h> #include <libmesh/linear_implicit_system.h> #inc...
ALGO
0.974772
4.967944
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2015-08-03T16:05: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": "331fbfd30...
6d736461-c112-4726-9c51-9a546fb4480c
ayushdixit487/September-Leetcoding-Challenge
Day8/Sum of Root To Leaf Binary Numbers.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.999988
5.547462
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-09-01T17:30:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16ab95a92...
921f29c8-4d62-47b9-8ea2-7f24e4e7abe2
irfansofyana/cp-codes
02 - SMA/Latihan_OSN_2016/Uva/11085.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> pi; int n,m,i,j; pi arr[100]; int indeks,idx; vector<int> jaw[1005]; int A[10]; bool bisa(int x,int y){ //x itu baris, y itu kolom (yang mau di check) for (int z = 0 ; z < idx; z++) { //idx banyak nya ratu yang sudah ditempatkan int xx = arr[z].f...
ALGO
0.999864
3.704041
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-10-28T15:45: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": "17b62ef7c...
bc739e35-b101-4c33-90df-4d3523e8efa2
ishandutta2007/codeforces-i
ivan100sic/normal/733/D.cpp
#include <iostream> #include <map> #include <algorithm> using namespace std; map<pair<int, int>, pair<int, int>> m; int min3(int a, int b, int c) { return min(a, min(b, c)); } int main() { int n, r0 = 0, i0, j0; cin >> n; for (int i=1; i<=n; i++) { int a, b, c; cin >> a >> b >> c; if (a > b) swap(a, b); ...
ALGO
0.999959
3.985453
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "de4cf8da685e...
8412b6bc-ed79-4e81-9f9e-6ba9c52757ae
Qengineering/Face-Recognition-Jetson-Nano
src/TBlur.cpp
#include "TBlur.h" #include <iostream> //---------------------------------------------------------------------------------------- // // Created by Q-engineering 2020/9/25 // //---------------------------------------------------------------------------------------- using namespace cv; using namespace std; //------------...
ALGO
0.992848
4.601979
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2021-01-13T11:46:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 118, "forks": 33, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "d73cbc7f...
9ec6cc88-c2e5-4aa2-80de-8b9baef948f7
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/10_4180_20.cpp
package codejam2010.qualification; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.io.StreamTokenizer; import java.math.BigInteger; public class SnapperChain { public static void main(String[] args) throws Exception { InputFile input ...
ALGO
0.992825
3.413777
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00: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": "e01388782...
98a9a10f-3327-49eb-ba62-e49acdc9f150
spmallick/learnopencv
3D-Gaussian-Splatting-Code/gsplat/gsplat/cuda/csrc/third_party/glm/test/core/core_func_integer_find_lsb.cpp
#include <glm/glm.hpp> #include <cstdio> #include <cstdlib> //To define "exit", req'd by XLC. #include <ctime> #ifdef NDEBUG static int pop(unsigned x) { x = x - ((x >> 1) & 0x55555555); x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0F0F0F0F; x = x + (x << 8); x = x + (x << 16); ret...
ALGO
0.993919
3.478577
{ "github_metadata": { "branch": "master", "commit_count": 2579, "repo_created_at": "2015-02-17T08:00:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22057, "forks": 11720, "issues": 229, "pull_requests": 48 }, "file_meta": { "content_id...
dc1ec818-ea95-42fd-a976-0326044f0385
Ishwarendra/Contests
ATCODER/AtcoderBeginnerContest/242abc/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; #define all(a) ((a).begin()), ((a).end()) #define log(v) for(auto __i = ((v).begin()); __i != ((v).end()); __i++) cout << *(__i) << " "; cout << "\n"; #define...
ALGO
0.999756
4.589999
{ "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": "638ef3fed480...
7e8b99d0-e4ad-408a-8d74-8062e26815fa
WalterDeRacagua/TAIS
SEMANA 4/PRACTICA/EJERCICIO 4.4/numerosBacon.cpp
/*@ <authors> * * Nombre, apellidos y usuario del juez (TAISXXX) de los autores de la solución. * *@ </authors> */ #include <iostream> #include <fstream> #include "grafos.h" #include <map> #include<string> #include <queue> #include <vector> using namespace std; /*@ <answer> Escribe aquí un comentario general...
ALGO
0.999276
4.77447
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2024-09-12T14:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb6da632b...
a3e3decb-87db-485d-921f-839579f53780
aladshaw3/cats
include/kernels/GNernstPlanckDiffusion.h
/*! * \file GNernstPlanckDiffusion.h * \brief Kernel for use with the corresponding DGNernstPlanckDiffusion object * \details This file creates a standard MOOSE kernel that is to be used in conjunction * with the DGNernstPlanckDiffusion kernel for the discontinous Galerkin * formulatio...
TOOL
0.952754
6.203387
{ "github_metadata": { "branch": "master", "commit_count": 1140, "repo_created_at": "2020-03-06T15:33:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 5, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "6c8815b...
8edb2419-f5c1-414a-8691-bfb53af242e7
shanopow/victoria_crazy
classes.h
#include <unordered_map> // global market, only make one class Market { public: unordered_map<string, float> market_h; Market(){ market_h["p_grain"] = 4; market_h["p_fruit"] = 1.8; market_h["p_fish"] = 4; market_h["p_cattle"] = 4; market_h["p_tea"] = 5; market_h["p_coffee"] = 9; ...
TOOL
0.9103
4.049338
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-10-24T11:25: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": "2a7f8a93b0d3...
2996c6f9-29c7-4d53-9655-45fa79d33e03
mnchapel/mobdec
src/component/reconstruction/reconstruction3dTriangulation.cpp
/// @file reconstruction3dTriangulation.cpp /// @author <NAME> /// @date 2017/10/18 #include <component/reconstruction/reconstruction3dTriangulation.h> //--------------------------------------------------------------------------------------- void Reconstruction3dTriangulation::compute() noexcept { std::ve...
ALGO
0.951559
6.555785
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-09-28T16:27:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11aebbac5f...
3a65355e-58ee-43a7-8ddd-67df20bcff65
kkkanata/CppStudy
study4.cpp
#include <iostream> using namespace std; int main4(void) { int a = 0; int b = 0; char p; char q; char aray[7] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G' }; int aray2[6] = { 3, 1, 4, 1, 5, 9 }; cin >> p >> q; for (int i = 0; i < sizeof(aray); i++) { if (aray[i] == p) { a = i; } if (aray[i] == q) { b = i; ...
ALGO
0.999121
3.441969
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-06-04T13:22:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6c3b2d62875...
fa123cb9-5cde-4dca-b6f0-97223307a6f8
zzctommy/public-source-code
码库/SP419 TRANSP - Transposing is Fun.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define mkp make_pair #define pb push_back #define sz(v) (int)(v).size() typedef long long LL; typedef double db; template<class T>bool ckmax(T&x,T y){return x<y?x=y,1:0;} template<class T>bool ckmin(T&x,T y){return x>y?x=y,1:0;} #define re...
ALGO
0.999874
4.492109
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2020-07-06T05:01:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a68d0f3f...
f38f7cd6-e988-4eba-af5d-0edf89f0b2ca
vamsitallapudi/CompetitiveProgramming
contests/HackerEarth/HealthifyMeTest/RearrangingArrays.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define ff first #define ss second #define ll long long #define pb push_back #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define mii map<int, int> #define pqb priority_queue<int...
ALGO
0.999902
4.418323
{ "github_metadata": { "branch": "master", "commit_count": 223, "repo_created_at": "2021-01-20T04:18:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4d00506...
69907fd6-0221-4c26-bf66-351ff04e9592
Poppy-sun/Assignment2_Cylindrical-Radiator-
src/main.cc
#include "cpu_heat.h" #include "gpu_heat.h" #include <cuda_runtime.h> #include <iostream> #include <string> #include <vector> #include <chrono> #include <cstdlib> #include <cmath> int main(int argc, char* argv[]) { int n = 32; int m = 32; int p = 10; bool compute_average = false; bool use_gpu = fa...
TOOL
0.992155
5.675093
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2025-05-02T13:38: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": "a76a87bc85f...
da7c91dc-6a51-4242-aef5-7b1096ddecd0
Piyush13-ambure/DSA
Minimum Points To Reach Destination.cpp
/*Given a m*n grid with each cell consisting of a positive, negative, or zero integer. We can move across a cell only if we have positive points. Whenever we pass through a cell, points in that cell are added to our overall points, the task is to find minimum initial points to reach cell (m-1, n-1) from (0, 0) by follo...
ALGO
0.999998
6.557466
{ "github_metadata": { "branch": "main", "commit_count": 607, "repo_created_at": "2025-01-02T17:15: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": "29b1cef185...
42d879d2-a164-4c67-b96e-f9da64e8498c
manhtung001/Datastructure-Algorithm-PTIT
28_NhamChuSo.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll SO(string s) { ll so = 0; for (int i = 0; i < s.size(); i++) { so = so * 10 + s[i] - '0'; } return so; } main() { string a, b; cin >> a >> b; for (int i = 0; i < a.size(); i++) { if (a[i] == '6') a[i] = '5'; } for (int i = 0; i < b...
ALGO
0.999915
4.089036
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-03-06T03:06:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21c5082f5...
cb74d355-9fb2-437d-8060-215be09e39f3
alpeshmakwana1/DSA-CPP
arrays/easy/CheckArraySorted.cpp
#include <iostream> using namespace std; /* Problem Statement: ------------------ Check whether a given array of integers is sorted in accending order Approach: --------- - If the array has only one element, it's trivially sorted. - For arrays with more than one element, iterate through the array and compare each ele...
ALGO
0.999982
6.094086
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-06-12T17:34:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eaf29c51cd2...
59c2138c-6a3f-4085-b3ac-002da8e56d21
sandialabs/TChem
src/core/problems/TChem_Impl_SimpleSurface_Problem.hpp
/* ===================================================================================== TChem version 2.0 Copyright (2020) NTESS https://github.com/sandialabs/TChem Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Governme...
ALGO
0.966317
5.59926
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2020-10-27T05:01:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 60, "forks": 23, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "843750807...
fee1cfc1-c364-493a-88c7-daa304d2c8a3
goliot/algorithmStudy_Cpp
algorithmStudy_VS_CPP/algorithmStudy_vs_cpp/7576.cpp
#include <iostream> //7576 #include <algorithm> #include <queue> using namespace std; int m, n; int map[1001][1001]; bool visited[1001][1001]; int path[1001][1001]; int dy[] = {0, 0, 1, -1}; int dx[] = {1, -1, 0, 0}; queue<pair<int, int> > q; void bfs() { while(!q.empty()) { int y = q.front().first; ...
ALGO
0.999974
4.088018
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2024-08-13T16:45:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e05629022b9...