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
a77068ca-916a-4e15-bc9b-da04b19c5b78
AravinthPanch/gesture-recognition-for-human-robot-interaction
source/human-robot-interaction/include/GRT/CoreAlgorithms/BernoulliRBM/BernoulliRBM.cpp
#include "BernoulliRBM.h" namespace GRT{ BernoulliRBM::BernoulliRBM(const UINT numHiddenUnits,const UINT maxNumEpochs,const double learningRate,const double learningRateUpdate,const double momentum,const bool useScaling,const bool randomiseTrainingOrder){ this->numHiddenUnits = numHiddenUnits; this->max...
ALGO
0.988963
6.374033
{ "github_metadata": { "branch": "master", "commit_count": 284, "repo_created_at": "2014-12-09T10:50:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 74, "forks": 34, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da69ce...
33f3007e-7279-4348-bf5e-b8a78df72cc4
brucechin/Leetcode
687-Longest Univalue Path.cpp
/* Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the root. Note: The length of path between two nodes is represented by the number of edges between them. Example 1: Input: 5 / \ 4...
ALGO
0.999992
6.363776
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2017-11-03T07:40:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d85056c90...
b9d2d914-62a6-43c2-983e-d049699ab34c
vatsalsinha/leetcode
designBrowserHistory.cpp
class BrowserHistory { public: vector<string> h; int pos = 0; BrowserHistory(string homepage) { h.push_back(homepage); } void visit(string url) { ++pos; h.resize(pos); h.push_back(url); } string back(int steps) { pos = max(pos-steps, 0); ...
ALGO
0.977623
5.435207
{ "github_metadata": { "branch": "main", "commit_count": 801, "repo_created_at": "2021-03-25T07:18:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3efde98def...
c72f275a-ca62-455a-8aee-94df9eee5ae0
OpenHD/rv1126_ohd_sushi
external/camera_engine_rkaiq/algos/anr/rk_aiq_anr_algo_mfnr.cpp
#include "rk_aiq_anr_algo_mfnr.h" ANRresult_t mfnr_get_mode_cell_idx_by_name(CalibDb_MFNR_2_t *pCalibdb, const char *name, int *mode_idx) { int i = 0; ANRresult_t res = ANR_RET_SUCCESS; if(pCalibdb == NULL){ LOGE_ANR("%s(%d): null pointer\n", __FUNCTION__, __LINE__); return ANR_RET_NULL_POINTER; } if(name =...
CONFIG
0.984016
5.852996
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2021-11-25T15:26:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 32, "forks": 28, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "5e24353...
0696c1a5-350c-4db8-95aa-d29d21f754f9
sogou/srpc
tools/templates/config/config_full.cc
#include <fstream> #include "config.h" #include "workflow/WFGlobal.h" #include "workflow/UpstreamManager.h" #include "workflow/UpstreamPolicies.h" #include "srpc/rpc_metrics_filter.h" #include "srpc/rpc_trace_filter.h" using namespace srpc; // default upstream_route_t static unsigned int default_consistent_hash(cons...
CONFIG
0.945346
6.198003
{ "github_metadata": { "branch": "master", "commit_count": 914, "repo_created_at": "2020-09-14T09:35:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2064, "forks": 402, "issues": 30, "pull_requests": 0 }, "file_meta": { "content_id": "225...
6aadab8d-3e5d-4fbb-8a34-bf5c391ea5bc
takeoverjp/leetcode
29.divide-two-integers.cpp
/* * @lc app=leetcode id=29 lang=cpp * * [29] Divide Two Integers */ #include <bits/stdc++.h> #include "lassert/lassert.h" using namespace std; // @lc code=start class Solution { public: int divide(int dividend, int divisor) { if (dividend == INT_MIN && divisor == -1) { return INT_MAX; } boo...
ALGO
0.999285
6.409512
{ "github_metadata": { "branch": "master", "commit_count": 837, "repo_created_at": "2020-10-30T15:34:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0cff74b2...
8b7a8e08-f014-4454-ac2b-5d65b26ffc36
ggrubich/newton-roots
expr.h
#ifndef ROOTS_EXPR_H #define ROOTS_EXPR_H #include <optional> #include <memory> #include <string> #include <unordered_map> #include <unordered_set> #include <variant> // Tree structure representing a mathematical expression. class Expr { public: struct Const { double val; Const(double val); }; struct Var { ...
ALGO
0.929403
7.266264
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-04-28T19:01: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": "2a0e95f38...
79399a33-8460-4ad3-8882-d9fe323a1b7c
loal123/CP
codeforces/C_Target_Practice.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pii pair<int, int> #define pll pair<ll, ll> #define vi vector<int> #define vl vector<ll> #define fi first #define se second #define pb push_back #define mp make_pair const ll mod = 1e9 + 7; // Super is a cute girl void s...
ALGO
0.999155
4.584863
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-12-23T13:34: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": "a088fedfd0d...
5f09a83d-915c-4b7c-b74c-eaaec5e2c4fe
Jabalov/Algorithms-And-DS-Implementations
Implementations/Linked-List/CircularLL.cpp
#include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node *next; } * Head; void create(int A[], int n) { int i; struct Node *tmp, *last; Head = (struct Node *)malloc(sizeof(struct Node)); Head->data = A[0]; Head->next = Head; last = Head; for (i = 1; i < n; i++) ...
ALGO
0.999973
4.230514
{ "github_metadata": { "branch": "master", "commit_count": 295, "repo_created_at": "2019-02-15T22:32:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2e49974...
f0b9c909-a368-4433-90c5-8931502b1607
ZhiyLiu/optim
Correspondence_Oct7/Pablo2_Oct7/lib/seurat/include/HanInterpolation.h
#ifndef HANINTERPOLATION_H #define HANINTERPOLATION_H #include "M3DQuadFigure.h" class HanInterpolation{ public: HanInterpolation(); ~HanInterpolation(); void SetM3DQuadFigure(M3DQuadFigure* quadfig){ m_M3DQuadFigure = quadfig; } void SetInterpolationLevel(int level){ m_InterpolationLevel = level; } ...
ALGO
0.966318
5.568641
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2017-11-04T00:57: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": "533179246...
5f3a4259-c105-4b04-8ec6-a5dda80fd72f
yongyi781/euler
include/euler/BinomialModPrimePower.hpp
#pragma once #include "prime.hpp" inline namespace euler { /// A class to compute binomial coefficients mod prime powers. class BinomialModPrimePower { public: // O(p*min(e, p) + e^2) BinomialModPrimePower(int64_t p, int e) : _p(p), _e(e), fact(e * 2 - 1), ifact(e * 2 - 1), pfact(e * 2 - 1) { pP...
ALGO
0.999915
6.771668
{ "github_metadata": { "branch": "main", "commit_count": 117, "repo_created_at": "2024-10-21T02:44: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": "a302e225e6...
a72213a8-e1ca-4997-9ce1-f28558a827ee
Farhan0140/XPSC
Week_4/Day_4/B_Segment_with_Big_Sum.cpp
#include <bits/stdc++.h> using namespace std; //_______________________________________________________________________________________________ const int mod = 1e9 + 7; #define pi 3.141592653 #define ll long long int #define all(x) x.begin(),x.end() #define out(x) cout << x << "\n"; #define ina(a,x,y) for(int i=x;i<...
ALGO
0.999936
3.3314
{ "github_metadata": { "branch": "main", "commit_count": 361, "repo_created_at": "2024-10-26T14:16:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f82284d48c...
2ea9daa9-a115-4e03-a6c0-c43da9263689
mdmohsin212/phitron
week 11/day 2/S_Non_coprime_Split.cpp
#include <bits/stdc++.h> using namespace std; #define fastio() \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define yes cout << "YES\n" #define no cout << "NO\n" #define ln '\n' #define gcd(a, b) __gcd(a, b) #define ll long long typedef vector<ll> vi; typed...
ALGO
0.999953
5.15289
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2024-03-15T04:18:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55650438c...
2d2772dd-f92e-44bf-9a8c-4982f9ae5abc
tkdgur0906/baekjoon
백준/Silver/2108. 통계학/통계학.cc
#include<iostream> #include<algorithm> #include<vector> using namespace std; int arr[500000]; bool bo = true; bool compare(pair<int,int> a , pair<int,int> b) { return a.first > b.first;} void avg(int n) { double sum = 0; for (int i = 0; i < n; i++) { sum = sum + arr[i]; } sum = sum / n; if (sum > -1 && sum ...
ALGO
0.999906
3.758577
{ "github_metadata": { "branch": "main", "commit_count": 213, "repo_created_at": "2022-03-06T09:37: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": "45b5f5ecc1...
1bade2b9-4341-4a41-89df-b0db67434373
suf01/Local_DSA
diagonal_traverse.cpp
vector<int> findDiagonalOrder(vector<vector<int>>& mat) { map<int, vector<int> > mpp; int n = mat.size(); int m = mat[0].size(); if(n*m == 0){ return {}; } for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ mpp[i+j].push_bac...
ALGO
0.999997
5.837842
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2022-03-25T11:59: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": "8f5d46038b...
454c94b7-c39f-4e69-9496-ebd32b7be9e1
Ninjaclasher/Competitive-Programming
CCC/ccc02s5.cpp
#include <bits/stdc++.h> using namespace std; int main() { long double w, h, xx, yy; scanf("%Lf%Lf%Lf%Lf", &w, &h, &xx, &yy); long double slope = yy/(w-xx); for (int i = 1; i <= 1000000; i++) { long double y = slope * (i * w - xx), x = (i * h) / slope + xx; long double a = (int) ((...
ALGO
0.999843
3.166028
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2018-07-09T14:51:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "768c5310...
64ee67fb-a20f-4eb5-a0d0-f076b2aa83c1
ishandutta2007/codeforces-e
ecnerwala/normal/1249/F.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 210; int N, K; int A[MAXN]; vector<int> adj[MAXN]; vector<int> dp[MAXN]; void dfs(int cur, int prv) { dp[cur] = vector<int>({A[cur]}); for (int nxt : adj[cur]) { if (nxt == prv) continue; dfs(nxt, cur); dp[nxt].insert(dp[nxt].begin(), 0); vector...
ALGO
0.999744
4.265383
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23f0a1b034c8...
2e785110-371b-4b30-aa0e-93cd9e694023
ITJEONG-DEV/2021_algorithm
210628/1015.cpp
#include <iostream> #include <list> #include <tuple> using namespace std; typedef pair<int, pair<int, int>> Item; void print_item_list(list<Item> items) { list<Item>::iterator it; for(it = items.begin(); it != items.end(); ++it) { cout<<"<"<<(*it).first<<" <"<<(*it).second.first<<", "<<(*it).seco...
ALGO
0.999992
4.427632
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-06-26T12:00: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": "b6728f7ec9c0...
7e56257e-7228-4ffd-a088-4f6752689233
martinafrazzoni/cpp_programming
esercitazione_10/crea_riempi_distruggi_array.cpp
/* Scrivere un programma che crei dinamicamente un array di int, di dimensioni inserite dall'utente da tastiera, e che lo riempia con valori anch'essi inseriti dall'utente. Quindi il programma stampa il contenuto dell'array. A questo punto, il programma conserva in memoria SOLO una parte degli elementi iniziali dell'a...
ALGO
0.910567
3.567507
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2023-09-02T07:27: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": "d5eac9c22...
522deb6c-f6d8-400c-98c6-ee1bb59ae772
Pepi100/Uni-Work
SECOND YEAR/First semester/Fundamental Algorithms/Lab Test/252_Nedelcu_Radu_Ioan_1_1.cpp
#include <fstream> #include <iostream> #include <vector> using namespace std; ifstream fin("graf.in"); int parents[100002]; int getParent(int n){ int copie = n; while(parents[n] != 0){ n = parents[n]; } int root = n; //parcurgem inca o data pentru a optimiza n= copie; while(p...
ALGO
0.999958
3.897698
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2021-11-28T09:45: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": "6822d53d...
3d57900b-e04f-4a8a-9be1-a924c3aa3aa1
uvansh/DSA_Questions
Arrays/MajorityElement.cpp
#include <iostream> using namespace std; // Naive implementation int MajorityElement(int arr[], int size) { int count = 0; for (int i = 0; i < size; i++) { for (int j = i + 1; j < size; j++) { if (arr[i] == arr[j]) { count++; } } ...
ALGO
0.999997
5.696312
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2024-11-29T16:09:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17b992076...
2725fdff-edce-40cf-911b-fb3b61a463a0
lucky6six/leetcode
4_字符串/76.最小覆盖子串.cpp
/* * @lc app=leetcode.cn id=76 lang=cpp * * [76] 最小覆盖子串 * * https://leetcode.cn/problems/minimum-window-substring/description/ * * algorithms * Hard (46.98%) * Likes: 3147 * Dislikes: 0 * Total Accepted: 719.5K * Total Submissions: 1.5M * Testcase Example: '"ADOBECODEBANC"\n"ABC"' * * 给你一个字符串 s 、一...
ALGO
0.999974
7.291974
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-08-23T10:10:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0864d355e27f...
37a5075d-6c6a-4978-bdb8-22ab71866a0c
ksushant881/Data-Structures-and-Algorithms
TREE/count_nodes_in_complete_binary_tree.cpp
#include<bits/stdc++.h> using namespace std; #define pi 3.1415926536 #define ll long long int #define mod 1000000007 class Node{ public: int data; Node*left; Node*right; Node(int x){ data = x; left = right = NULL; } }; /* complete binary tree has only last level partially fille...
ALGO
0.999629
3.554384
{ "github_metadata": { "branch": "main", "commit_count": 407, "repo_created_at": "2021-04-16T19:43:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6422379c79...
5139042d-6446-4009-b500-50319b2b0045
greentealover1/DataStructure_practice
DataStructure_practice/homework.cpp
#include <iostream> #define MAX_DEGREE 80 //다항식의 처리 가능한 최대 차수+1 using namespace std; class Polynomial { //프로그래밍 프로젝트2.1 private: int degree;//다항식의 최고 차수 float coef[MAX_DEGREE];//각 항에 대한 차수의 계수들(5x^5+4x*5이면 [5,4...]이런식 public: Polynomial() { degree = 0; }//생성자 void read() { //차수, 계수 읽기 cout << "다항식의 최고 차수를 입력하세요:...
ALGO
0.997999
4.061858
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-03-04T07:35: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": "1308f6635...
9f3f8bf0-9c9e-4182-a769-85c500f0988b
Todaymorning/Leetcode
9_greedy/13_435_non-overlapping-intervals.cpp
// 435. 无重叠区间 // labuladong 题解思路 // 中等 // 给定一个区间的集合 intervals ,其中 intervals[i] = [starti, endi] 。返回 需要移除区间的最小数量,使剩余区间互不重叠 。 // 示例 1: // 输入: intervals = [[1,2],[2,3],[3,4],[1,3]] // 输出: 1 // 解释: 移除 [1,3] 后,剩下的区间没有重叠。 // 示例 2: // 输入: intervals = [ [1,2], [1,2], [1,2] ] // 输出: 2 // 解释: 你需要移除两个 [1,2] 来使剩下的区间没有重叠。 // 示例 ...
ALGO
0.999888
5.530362
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-07-24T12:50: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": "fb396b5e36...
3469c932-b42f-4d26-bd5b-fc9f600de2e9
Prathamesshh/Leetcode-Files
838. Push Dominoes.cpp
class Solution { public: string pushDominoes(string dominoes) { std::size_t num_of_dominoes = dominoes.size(); int last_right = -1; int last_left = 0; for (std::size_t i = 0; i < num_of_dominoes; ++i) { char c = dominoes[i]; if (c == 'R') { i...
ALGO
0.999977
6.302805
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2025-01-31T15:34: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": "e2036541e4...
28dab027-5a64-41ce-987a-7001e7449031
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/08/53/15.cc
#include <iostream> #include <sstream> #include <string> #include <vector> #include <deque> #include <queue> #include <set> #include <map> #include <algorithm> #include <iterator> #include <functional> #include <utility> #include <numeric> #include <complex> #include <cstdio> #include <cmath> #include <cctype> #include...
ALGO
0.999893
4.191387
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "cd9f32b4...
0df79638-daad-4842-9dfb-be21d07d603c
VeloxChem/VeloxChem
src/t4c_electron_repulsion/ElectronRepulsionContrRecPSXX.cpp
// // VELOXCHEM // ---------------------------------------------------- // An Electronic Structure Code // // SPDX-License-Identifier: BSD-3-Clause // // Copyright 2018-2025 VeloxChem developers // // Redistribution and use in source and binary ...
ALGO
0.949034
3.346732
{ "github_metadata": { "branch": "master", "commit_count": 6590, "repo_created_at": "2024-03-15T09:59:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 2, "issues": 4, "pull_requests": 9 }, "file_meta": { "content_id": "7be97c3...
0e50e475-487d-4edc-bc25-0cefbb2699e0
ishandutta2007/codeforces-i
igorfardoc/normal/1707/C.cpp
#include<bits/stdc++.h> #define log 20 using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<long long> vl; int n, m; vvi g; vi p; vector<bool> ans; vi tin, tout; vi score; int needscore = 0; vvi up; int timer = 0; int get_p(int v) { ...
ALGO
0.999953
3.955122
{ "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": "175f87dfd9cb...
ed4c2ec8-fbd3-4ba2-bbe7-64cb4f564910
InfiniteLoopify/boolean-expression-calculator
main.cpp
#include <iostream> #include <fstream> #include <string> //stack of type T and length of array N template <class T, int N> class Stack { public: Stack() : m_size(-1){} ~Stack(){} Stack(const Stack& other) : m_maxSize(50) { m_size = other.m_size; for(int i = 0; i <= m_...
ALGO
0.999316
4.116351
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-05-22T02:35:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "231eda5132...
0f2151af-3519-4a51-ab2c-a097ddc0f077
mbokinala/cpp-course
logical-operators.cpp
#include <iostream> using namespace std; main() { /* Expressions (things that evaluate to a boolean) ex. 7 > 5 (1 / true), 5 == 10 (0 / false), etc. -------------------------------------------------------------- AND conjunction - && - true ONLY if both expressions are true ...
ALGO
0.981434
4.018328
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-06-06T17:17: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": "a01c68fa7...
4319438d-ccb5-4fa7-835b-06f2f9b589f4
pwzy/MOEA-D
c++ code/main_moea.cpp
/*========================================================================== // Implementation of Multiobjective Evolutionary Algorithm Based on // Decomposition (MOEA/D) For Continuous Multiobjective Optimization Problems (2006) // // See the details of MOEA/D in the following paper // <NAME> and <NAME>, MOEA/D: ...
ALGO
0.999722
3.374876
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-07-30T13:57:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6104952b...
aac5130e-dab9-4bfc-aa3c-29e1cc274274
AyushSolanki234/data-structure
Chapter-4/4StackUsingArray.cpp
#include<bits/stdc++.h> #define N 5 int stack1[N]; int top = -1; using namespace std; int push(){ int data; if(top==N-1){ cout<<"Overflow!"<<endl; } else{ cout<<"Enter the data: "; cin>>data; top++; stack1[top] = data; } return 0; } int pop(){ int ...
ALGO
0.989236
3.481204
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2022-04-13T05:26: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": "5529832c6ea...
b5b2f038-db2e-40d9-a13e-eac2f2eb3136
4Marsha1/DSAProblems
Contests/#100/flattenBSTtoDegenTree.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.99999
6.278705
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2021-12-22T14:21:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b798910cd4...
7075ad11-0e7f-4e2c-b8ec-474ac45c6145
Edekje/Euler
Euler 11/Euler_11.cpp
#include <iostream> #include <stdlib.h> #include <cstring> using namespace std; int main() { char map[] = "08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08\n\ 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00\n\ 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65\n\ 52 70 95 23 04 60 11 ...
ALGO
0.999821
3.208671
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2014-05-24T21:09:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45e9bd75f...
e6fdfd8b-b78a-4204-b937-e01b0a70b196
Adwait-Borate/CodeForces
B_Fireworks.cpp
#include <iostream> using namespace std; // Custom GCD function long long gcd(long long a, long long b) { while (b != 0) { long long temp = b; b = a % b; a = temp; } return a; } // Function to calculate LCM long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; /...
ALGO
0.999964
5.545104
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2024-08-15T04:47:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f12cc3e2...
d7073f28-b232-4e98-abd3-5f0410f3b54a
Seungchan0325/baekjoon
solutions/16074_0.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 505; using t4i = tuple<int, int, int, int>; struct DSU { int N; vector<int> root; DSU(int _N) : N(_N) { root.resize(N+1); iota(root.begin(), root.end(), 0); } int find(int x) { if(root[x] == x) return x; ...
ALGO
0.999982
4.172535
{ "github_metadata": { "branch": "main", "commit_count": 795, "repo_created_at": "2023-12-31T15:30: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": "a809c447a5...
514d1ccb-8a4c-4234-b745-e2a7a0bb686e
zcy26814/zzzccy-ZJU-CS-course
密码学/hw2/hw2.0.cpp
static void perm_init(char perm[8][256][8], char p[64]) /* 64-bit, either init or final */ { register int b, j, k; int i; /* Clear the permutation array */ memset(perm, 0, 8 * 256 * 8); for(i = 0; i < 8; i++) { for(j = 0; j < 256; j++) { for(k = 0; k < 64; k++){ b ...
ALGO
0.99861
4.175805
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2022-05-20T07:44:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d11ea61feb...
78821e90-b86a-4a5c-b4a0-115822a1ea4a
wannn-one/problem-set-01
nomer2/nomer2.cpp
#include <iostream> #include <stack> using namespace std; int orderOfOperations(char token) { // Order operasi int priority = 0; switch (token) { case '*': case '/': priority = 2; break; case '-': case '+': priority = 1; break; ...
ALGO
0.999825
5.235343
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-11-08T15:31: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": "fb8ae4b71288...
46838fb6-db07-486a-b0b7-b33f1b6dcc98
Yixuan-Lee/LeetCode
algorithms/src/Ex_139/Work_break.cpp
// references: // https://leetcode.com/problems/word-break/discuss/43790/Java-implementation-using-DP-in-two-ways // video: https://www.youtube.com/watch?v=8-AGBdUyZ5M #include <iostream> #include <vector> #include <string> using std::vector; using std::string; class Solution { public: bool wordBreak(...
ALGO
0.989876
5.31523
{ "github_metadata": { "branch": "master", "commit_count": 442, "repo_created_at": "2018-10-05T04:14: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": "65c2bcb9...
f0a0dfd2-8ba2-4b3e-b8bf-6c6abf607308
TatsukiNishimura/Algorithm-DataStructure
chapter3/hash/chain.cpp
#include <stdio.h> #include <stdlib.h> #define KEY int #define DATA int #define BUCKET_SIZE 50 typedef struct cell { KEY key; DATA data; struct cell *next; } CELL; CELL *table[BUCKET_SIZE]; void init() { int i; for (i = 0; i < BUCKET_SIZE; i++) { table[i] = NULL; } } int hash(K...
ALGO
0.999391
3.975343
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2023-06-06T08:36: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": "d500e2dfb8f...
dfe189cc-056a-480f-895c-80d5c5297b32
ja-ho/baekjoon_algorithm
code/14499(주사위굴리기).cpp
#include <cstdio> #include <vector> #include <utility> #include <queue> using namespace std; int n, m, x, y, k; queue<int> command; // 1 == 동, 2 == 서, 3 == 북, 4 == 남 vector<int> dice; // 0 = 위, 1 = 위 2 = 오른, 3 = 아래 4 = 왼 5 = 바닥면 int map[22][22]; pair<int, int> start_point; void roll(int dir) { int temp; if (dir ==...
ALGO
0.999939
4.174414
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2017-08-20T10:01: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": "573dd5441...
3d5364ee-efcd-4f86-996f-ac70bd1a028e
skyhigh8591/VocationalTraining_LearningCode
Program_Chip_Arduino_code/test01/test01.ino
byte a,b,c; void setup() { // put your setup code here, to run once: Serial.begin(9600); Serial.println("Test 1"); a=0x01; a = a << 3; Serial.println("a = 0 x 01 << 3 in BIN : "); Serial.println(a,BIN); Serial.println(a,HEX); Serial.println(" "); a=0x03; a = a << 5; Serial.println("a = ...
ALGO
0.93248
3.508622
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-08-05T11:35: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": "356229cf6b...
a1c24c50-4a4e-47a9-92fd-f44fb9b3dbfe
nakamo326/atCoder
math-algorithm-book/019.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; long long getFactorial(long long n) { long long ret = 1; while (n > 1) ret *= n--; return ret; } long long combinate(long long num, long long choose) { return num * (num - 1) / getFactorial(choose); } int main() { ll n; cin >> n; ll n...
ALGO
0.999926
4.278481
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2021-10-12T06:17: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": "01b6ace7df4...
414f01fe-3d2e-4fe7-925c-21fd30bc9a40
mxr612/OI-log
oitiku/5/B/energy.cpp
/** * energy */ #include <math.h> #include <stdio.h> const int MXN = 300050, MD = 998244353; inline long long mod(long long x) { return (x % MD + MD) % MD; } long long mi[MXN] = {1}; int T, n; long long f[MXN][2] = {}; signed main() { freopen("energy.in", "r", stdin); freopen("energy.out", "w",...
ALGO
0.999936
3.787615
{ "github_metadata": { "branch": "master", "commit_count": 390, "repo_created_at": "2019-10-31T10:28:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2897223...
ebc32ec5-5f94-4044-86c1-4b5f5ca2ab28
rashed-001/Code
1717C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; // int arr[100005]; ll gcd(ll a, ll b) { if (!a) return b; return gcd(b % a, a); } bool isPrime(int n) { if (n <= 1) return false; if (n <= 3) return true; if (n % 2 == 0 || n % 3 == 0) return false; ...
ALGO
0.999981
3.796699
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-08-02T05:39: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": "96fe4a1a2072...
5b9351ad-669c-4dbf-92b4-fb14a84eb7fc
is2ei/coding-challenges
AtCoder/20181006/B/cpp/main.cpp
#include <iostream> #include <vector> std::string f(int t, std::vector<std::pair<int, int> > arr) { int min_cost = -1; for (int i = 0; i < arr.size(); i++) { if (arr[i].second > t) { continue; } if (min_cost == -1 || min_cost > arr[i].first) { min_cost = arr[i].f...
ALGO
0.999994
4.652438
{ "github_metadata": { "branch": "master", "commit_count": 1118, "repo_created_at": "2019-04-10T08:49:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5e480e...
c347bfc6-06a6-4368-af73-1282cb76202f
SukbeomH/Code-Test-Algorithm
lecture/10주완성C++알고리즘/교안학습/split.cpp
#include <bits/stdc++.h> using namespace std; vector<string> split(string input, string delimeter) { vector<string> ret; long long pos = 0; string token = ""; while((pos = input.find(delimeter)) != string::npos) { token = input.substr(0, pos); ret.push_back(token); input.erase(0, pos + delimeter.l...
ALGO
0.952956
3.325962
{ "github_metadata": { "branch": "master", "commit_count": 223, "repo_created_at": "2023-12-19T23:49: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": "ad83b924...
5a10c13c-a66c-40b5-9aa5-c50a187a9bda
Softjey/ZSE_CPP
Cz4/zad/Zad38/Zad38/Zad38.cpp
#include <iostream> using namespace std; string repeat(string str, int amount) { string sum = ""; for (int i = 0; i < amount; i++) { sum += str; } return sum; } int main() { const string SYMBOL = "*"; cout << "Podaj swoj numer w dzienniku: "; int num; cin >> num; const int width = 5 + (num % 3); cons...
ALGO
0.999251
3.657847
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-02-29T09:21: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": "e38d8ba6546a...
cd622e0d-e51b-482e-b9ea-29a4dcd7a16e
tianbingsz/CodingPractise
coding/licenseKey.cpp
/* You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups by N dashes. Given a number K, we would want to reformat the strings such that each group contains exactly K characters, except for the first group which could be shor...
ALGO
0.999706
6.236796
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-12-02T02:18:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13ea80f709...
6afa9583-2182-4d67-9f13-d30a7cd1c561
Personwithhat/CRYENGINE
Code/Tools/HLSLCrossCompiler/offline/toGLSLStandalone.cpp
#include "hlslcc.hpp" #include "stdlib.h" #include "stdio.h" #include <algorithm> #include <string> #include <string.h> #include "hash.h" #include "serializeReflection.h" #include "hlslcc_bin.hpp" #ifdef _WIN32 #include <direct.h> #else #include <sys/stat.h> #endif #include "timer.h" #if defined(_WIN32) && !defined...
TOOL
0.909103
3.45997
{ "github_metadata": { "branch": "release_fixed", "commit_count": 6382, "repo_created_at": "2018-07-26T16:30:04.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "MergHQ/CRYENGINE", "stars": 11, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "...
6cd5a915-4efa-4676-96db-4552a5980e6c
wisteria-soba/atcoder-solved
ABC/172/a.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) #define REPR(i,n) for(ll i = n;i >= 0;--i) #define FOR(i,m,n) for(ll i = m, i##_len=(n);i <i##_len; ++i) #define all(x) (x).begin(),(x).end() template<class T> inline bool chmax(T& a, T b) { if ...
ALGO
0.999979
3.544261
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-08-11T07:03:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72f330043d7d...
d261dfa0-aa80-407b-98fb-fced804c4cd5
Bakytw/Algorithms
5contest/taskB.cpp
#include <iostream> static const long long kInf = 1e9; class AVLTree { private: struct Node { Node *left = nullptr, *right = nullptr; long long key, height = 0; Node(long long key) : key(key), height(1) {} ~Node() { delete left; delete right; } }; Node* root_ = nullptr; long ...
ALGO
0.999998
4.669027
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2022-10-06T20:57: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": "9f3b38f68d0...
45ed77f0-c4ad-48a3-afe7-fc3a0902431d
LutzGross/esys-escript.github.io
trilinos_source15/packages/tpetra/core/test/RowMatrixTransposer/main.cpp
/* // @HEADER // *********************************************************************** // // Tpetra: Templated Linear Algebra Services Package // Copyright (2008) Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains cer...
ALGO
0.993815
6.011476
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "92f8...
5bc81016-83d0-4918-b187-017e2ada4817
jjj5306/jjj5306.github.io
Algorithm/Solving/BOJ/9020.cpp
/** 정수론 골드바흐의 추측**/ #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int T; cin >> T; //5000까지 에라토스테네스의 체 생성 vector <int> S(10001, 1); S[0] = -1; S[1] = -1; for (int i = 2; i < S.size(); i++) { if (S[i] != 1) continue;...
ALGO
0.999838
4.408724
{ "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": "6633d6b31e...
e3cd242e-fb20-4cb1-ab60-f2086ed34b70
bhavyeah20/interviewbit
Trees/inorderSuccessor.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ TreeNode* Solution::getSuccessor(TreeNode* A, int B) { // Do not write main() function. // Do not read input, instead use th...
ALGO
0.999992
4.119037
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2021-04-10T14:15:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2784252e...
b12004aa-c24a-4a75-9cee-defc16641e28
mindspore-ai/models
official/cv/PVNet/src/lib/voting/src/voting_cpu.cpp
/*Copyright 2021 Huawei Technologies Co., Ltd 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 writing, ...
DATA
0.996531
3.277415
{ "github_metadata": { "branch": "master", "commit_count": 4305, "repo_created_at": "2021-10-15T06:38:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 362, "forks": 101, "issues": 13, "pull_requests": 2 }, "file_meta": { "content_id": "7d0...
91a076b3-d690-4dd0-9024-445d668e7490
public-domain/muscle
loglocalalnx.cpp
#include "myutils.h" #include "seqdb.h" #include "isgap.h" #include "params.h" void GetLetterCounts(const string &Path, unsigned &NA, unsigned &NB); float Pct(float x, float y); byte CodonToAA(const byte *DNA); static const char *FrameStr(unsigned Frame) { if (Frame == 0) return "F0"; else if (Frame == 1) retu...
ALGO
0.956969
4.707111
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-03-01T20:48:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86e65d9460d...
0d1d3bba-fcb5-4eb2-9af3-733e52a267ec
imtiaz1710/competitive-programming
Vjudge/CodeForces/6A/24792500_AC_62ms_8kB.cpp
#include <bits/stdc++.h> #define ll long long #define fin freopen("in.txt", "r", stdin) #define fout freopen("out.txt","w", stdout) #define dbg(x) cerr << #x << ": " << x << endl #define fastio ios::sync_with_stdio (false); cin.tie (0); using namespace std; int is_pos(int a,int b,int c) { double p=(a+b+c)/2.0; ...
ALGO
0.999604
3.923265
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-11-01T15:12:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ace23a46c1d...
23791b9c-adce-4de9-bdaf-aeec42b5e057
fsq/leetcode
2673. Make Costs of Paths Equal in a Binary Tree.cpp
class Solution { public: int n, mx, ans = 0; int find(vector<int>& c, int s, int x) { if (x > n) return s; s += c[x-1]; return max(find(c, s, x*2), find(c, s, x*2+1)); } int f(vector<int>& c, int p, int x) { p += c[x-1]; if (x*2 > n) { ans += mx - p;...
ALGO
0.999712
4.411854
{ "github_metadata": { "branch": "master", "commit_count": 1935, "repo_created_at": "2018-01-18T01:31:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6dcfcc0...
2613e53e-17b8-4f07-a883-5646af8dc1aa
MrDindows/OdessaWinterCodeSchool
KthOnRangeLogN.cpp
#include <iostream> #include <algorithm> using namespace std; const int N = 100001; int tr[N * 32]; int lp[N * 32]; int rp[N * 32]; int root[N]; int lastn = 1; void update(int& cur, int l, int r, int pos) { tr[lastn] = tr[cur]; lp[lastn] = lp[cur]; rp[lastn] = rp[cur]; cur = lastn++; if (l =...
ALGO
0.999963
5.81967
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-01-13T10:12:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cee45fe09c...
1e50db01-5519-4b29-8f7d-cf8ec08106c8
LeoLe101/Cannibals-and-Explorers
CSS-342-Assignment-2/cannibals.cpp
// // cannibals.cpp // CSS-342-Assignment-2 // // Created by <NAME> on 10/22/17. // Copyright © 2017 <NAME>. All rights reserved. // #include "cannibals.hpp" //Constructors /** Default constructor of the cannibals class */ cannibals::cannibals() { executed.assign(11, 0); output.push_back("EEECCC \\--/ ...
ALGO
0.99774
3.581533
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-10-25T15:57: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": "8dbe236219...
4b0ad3f7-ee06-4048-bea1-090343f1563d
SFML-game-RiD/RiD_pixel_Game
RiD_RPGproject/RiD_RPGproject/Move.cpp
#include "Move.h" void MP::Move::moveBlockDown(PawnObject& obiect, sf::Clock& currentTime) { if (obiect.getBlockLenghtCopy() > 0 && currentTime.getElapsedTime() >= obiect.getReadyTime()) { _move_pixel_down(obiect); obiect.decreaseBlockLengthCopy(); obiect.setLastActive(currentTime); } else if (obiect.getBl...
ALGO
0.923463
5.111847
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2020-03-06T14:41:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6bf19b3f9...
d8e8537e-78a5-45d6-b54a-3798ad543f01
zyx4843/leetcode
src/Palindrome_Partitioning.cpp
// Source : https://oj.leetcode.com/problems/palindrome-partitioning/ // Author : <NAME> // Date : 2014-12-08 /********************************************************************************** * * Given a string s, partition s such that every substring of the partition is a palindrome. * Return all possible pal...
ALGO
0.999675
5.659181
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2014-11-21T05:44: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": "bd338ea9d...
490a4530-ee6d-4c0e-b758-1f30597e5a60
Salil03/Competitive-Programmming
Programs/empty/single/Cow Routing/sol.cpp
//OPTIMIZATIONS #pragma GCC optimize("O3") //(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS) //#pragma comment(linker, "/stack:200000000") //(UNCOMMENT WHEN NEEDED) //#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native") //OPTIMIZA...
ALGO
0.999381
3.402404
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2018-07-29T13:53: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": "03a48248...
ca208fc8-c737-4c9e-9420-3a16e0e8c644
akshin-kuvshin/smth
Университет/Олимпиады/2024-2025/CF 996/D (ПАПОЧКА ЗАРЕШАЛ)/D.cpp
// author: Danila "akshin_" Axyonov // ЛЕТСГОУ НАХУЙ!!! ПАПОЧКА ЗАРЕШАЛ!!! Я УМНЕЙШИЙ ИЗ КИТАЙЦЕВ!!! // Поясняю: я пишу задачу, сдаю её в 1:56:47 (всего контест идёт 2 часа) и получаю TL на тесте 9. // Моментально понимаю, где он происходит; менее, чем за две минуты я своими дрожащими руками // делаю фикс, отправляю з...
ALGO
0.999855
3.864421
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2024-10-10T09:36:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6946b30cc6...
87c93f9b-58f6-4e03-a7b0-7143bfbe0681
lanamiranda17/ABB
Implementação.cpp
#include <iostream> using namespace std; struct noh{ int num; noh *filhoEsq; noh *filhoDir; }; class ABB { private: noh *raiz; public: ABB(); ~ABB(); void destruirNohRecursivamente(noh* umnoh); noh* criar_noh (int valor); void inserirRecursivamente...
ALGO
0.999791
4.748122
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-19T12:25: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": "4afb19d89de7...
940d1b45-4f74-4506-b8a1-4f81557e202f
jack-slingsby/Peano-Fork
src/peano4/grid/PeanoCurve.cpp
#include "PeanoCurve.h" #include "AutomatonState.h" constexpr int peano4::grid::PeanoCurve::CallStack; constexpr int peano4::grid::PeanoCurve::NumberOfBaseStacks; bool peano4::grid::PeanoCurve::isTraversePositiveAlongAxis( const AutomatonState& state, int axis ) { assertion( axis >= 0 ); ...
ALGO
0.999422
5.913195
{ "github_metadata": { "branch": "main", "commit_count": 7515, "repo_created_at": "2021-11-23T15:42: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": "a4f52d4ca...
4d0dec37-65b4-4b21-86fc-a40265d522a2
ashutosh-singh83/DSA
Vectors/vector(1).cpp
#include<iostream> #include<vector> using namespace std; int main(){ vector<int> v; cout<<"The size of the vector is : "<<v.size()<<endl; cout<<"The capacity of the vector is : "<<v.capacity()<<endl; v.push_back(1); cout<<"The size of the vector is : "<<v.size()<<endl; cout<<"The capacity of th...
TOOL
0.941151
3.296003
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-12-16T07:27:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d6fd77e92c...
2ab29d66-0ea4-42de-8bd3-4d7fc2db6596
juzarantri/SDE_Sheet_Challenge-Striver-
Reverse Pairs.cpp
#include <bits/stdc++.h> int merge(vector<int> &arr, int low,int mid, int high){ int j = mid+1; int count = 0; for(int i = low ; i <= mid; i++){ while(j <= high && arr[i] > 2LL*arr[j]){ j++; } count += (j-(mid+1)); } vector<int> temp; int left = low, rig...
ALGO
0.999719
4.880501
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2022-06-05T04:27: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": "88d68ab5964...
c8c95f5b-96ea-480c-aa4e-d664d1149b7c
busebd12/InterviewPreparation
LeetCode/C++/General/Hard/SmallestRectangleEnclosingBlackPixels/solution.cpp
#include <algorithm> #include <array> #include <deque> #include <limits> #include <utility> #include <vector> /* Time complexity: O(b) [where b=number of black pixels] Space complexity: O(b) */ class Solution { public: int minArea(vector<vector<char>> & image, int x, int y) { int resul...
ALGO
0.999711
6.518067
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2015-12-15T14:19: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": "e93bdbc4...
28cbe7ed-2398-42c5-810e-d38fd9921ac9
nikhilsharma3387/sem7_lp3
new/daa/5_nQueens.cpp
#include <iostream> #include <vector> // Function to print the N-Queens board void printBoard(const std::vector<std::vector<int>>& board) { for (int i = 0; i < board.size(); ++i) { for (int j = 0; j < board.size(); ++j) { if (board[i][j] == 1) { std::cout << "Q "; } ...
ALGO
0.999981
6.280573
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-05T17:21: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": "c1e3b8b6887c...
fbf1e09a-b48b-4dde-ab75-4dcbf5a55b2e
itohdak/Competitive_Programming
AtCoder/ABC/archive/193/E.cpp
#include <bits/stdc++.h> #include <print.hpp> using namespace std; // #include <atcoder/all> // using namespace atcoder; #define ll long long #define ld long double #define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--) #define rrep(...
ALGO
0.999958
3.847659
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-10-16T18:27: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": "4e4ef562b...
9ce60076-3816-4939-b4b7-0bbf1336268b
Istahak/CFsolution
E_Mike_and_Geometry_Problem.cpp
#include <bits/stdc++.h> #define ll long long int #define endl "\n" using namespace std; const int M = 1e9 + 7, N = 200000 + 5; ll fact[N], invfact[N]; ll bigmod(ll a, ll b) { a %= M; long long res = 1; while (b > 0) { if (b & 1) res = res * a % M; a = a * a % M; b >>...
ALGO
0.999989
4.560893
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-07-20T14:03:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4b4fa94e25...
b86d854b-5186-4cc2-8412-dc56a061db6c
DugarRishab/Algo.io
data/leetCode Solutions/Q6_zigzagConversion/Q6_zigzagConversion.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: string convert(string s, int numRows) { int n = s.length(); string result; int j = 0, k=0; int gap = 2 * numRows - 3; if(gap < 0) gap = 0; int x = gap; for (int i = 0; i < n; i++) { k = 0; if(x >= 1){ if (i == 0) ...
ALGO
0.999999
5.387127
{ "github_metadata": { "branch": "main", "commit_count": 179, "repo_created_at": "2022-09-30T19:13:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 40, "issues": 6, "pull_requests": 1 }, "file_meta": { "content_id": "8ab5e436e...
848c898e-2f65-4f20-9408-32749612f032
DaniiarS/AlgoProblems
graph_traversal.cpp
#include <iostream> #include <vector> #define WHITE '0' #define GREY '1' #define BLACK '2' void dfs(const std::vector< std::vector<int> > &graph, std::vector<char> &color, int v, int size){ color[v] = GREY; for(int i = 0; i < size; i++){ if(graph[v][i] == 1 && color[i] == WHITE){ dfs(grap...
ALGO
0.999934
4.010159
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-10-15T16:48:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3095d532a5a1...
b677d507-e5df-482f-8f1f-74d1cf816a7d
kparthan/fisher-bingham
support/nlopt_funcclass_test.cpp
#include <iostream> #include <cstdlib> #include <vector> #include <math.h> #include <nlopt.hpp> using namespace std; typedef struct { double a, b; } my_constraint_data; class Function { private: //my_constraint_data *d; //void *d; public: //Function() {} //Function(void *data) { //d =...
ALGO
0.998701
5.184018
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2016-11-30T02:27:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08f396c9a...
2f2585ec-c446-499a-861a-12543091a1d7
JohoraAva/CSE-410--Computer-Graphics-Sessional
codes/Ball2.cpp
///version 1 #include<bits/stdc++.h> // #include "Point.cpp" #include "Matrix.cpp" using namespace std; class Ball{ public: Point centre,axis,dir,look; double radius; Point up;//fixed int simulation; //walls Point wall[4]; void wallinit(double width) { wall[0]=Point(width,...
ALGO
0.999299
3.586887
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-03-01T13:24: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": "3ffc6cb1ae9b...
adf5b795-3765-4bdd-8e88-0b7bd991f35f
codesharplsc/LeetCodePractice
Spiral Matrix.cpp
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int> result; if (matrix.size() == 0) return result; ComputeMatrix(matrix, result, 0, 0, matrix[0].size(), matrix.size()); return result; } void ComputeMatrix(vector<v...
ALGO
0.999998
6.440805
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2015-07-05T07:48: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": "9d7d5bf27...
e71ef91a-aef4-4e45-bd10-0a7b74cbf85c
rygorous/intel_occlusion_cull
SoftwareOcclusionCulling/TransformedMeshSSE.cpp
//-------------------------------------------------------------------------------------- // Copyright 2013 Intel Corporation // All Rights Reserved // // Permission is granted to use, copy, distribute and prepare derivative works of this // software for any purpose and without fee, provided, that the above copyright no...
ALGO
0.996765
5.456772
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2013-01-28T07:46:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 238, "forks": 43, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc3bed4...
1b108828-4df5-4b79-b7b1-102a5c4cc12a
ecslew/mds-mutual-aid-dao-eos
hbtcoop.hpp
#include <functional> #include <string> #include <cmath> #include <eosiolib/eosio.hpp> #include <eosiolib/transaction.hpp> #include <eosiolib/asset.hpp> #define KEY_SYMBOL S(0,KEY) #define STAKE_SYMBOL S(0,STKEY) #define KEY_INIT_SUPPLY 1000000 #define TIME_WINDOW_FOR_VOTE ((uint64_t)(30*24*3600)) #define TIME_WINDO...
ALGO
0.925328
6.565472
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-11-21T06:16: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": "d1ffdb9cd2...
50cfb074-4cf2-4799-ae4a-dbe69fcee60b
AshAzax22/PRACTICE
C++/linked list.cpp
p#include<iostream> #include<stdlib.h> using namespace std; struct node{ int data; struct node* next; }; void insert_into_linked_list_beginning(struct node **headref,int element){ struct node *newnode=(struct node*)malloc(sizeof(struct node)); newnode->data=element; newnode->next=*headref; *headref=newnode; } ...
ALGO
0.999695
4.751095
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-11-21T05:15: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": "9ae7aef977a...
1e2da652-e9c7-4dc5-ab5f-3362f47722d2
viren-sureja/Love-Babbar-450
12_graph/34_waterJug_problem_using_BFS.cpp
/* link: https://www.geeksforgeeks.org/water-jug-problem-using-bfs/ */ // ----------------------------------------------------------------------------------------------------------------------- // #include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; void printpath(map<pii, pii>mp, pii u) { ...
ALGO
0.999992
5.11705
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2021-03-21T14:17:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 356, "forks": 169, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f1244...
a47b6317-d53e-41ad-8758-eccad0eb95dc
BaeDongWoo/algorithm
class 3/BOJ_)1107번 리모컨/BOJ_)1107번 리모컨.cpp
/*BOJ_)1107¹ø ¸®¸ðÄÁ b_d_o_o */ #include<iostream> #include<string> #include<vector> using namespace std; int main() { int N, M; vector <int> button; cin >> N >> M; for (int i = 0;i < M;i++) { int num; cin >> num; button.push_back(num); } int result = 9999999; int cnt = 0; string a; for (int i = 0;i <...
ALGO
0.999919
3.204113
{ "github_metadata": { "branch": "main", "commit_count": 287, "repo_created_at": "2022-10-27T16:17: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": "5f76753e8f...
b657f7e1-2fd4-4135-b3cc-f8bfdf5f25d3
ironheads/Template
FFT.cpp
namespace myFFT { #define maxn ((1<<17)+1) const double pi = acos(-1.0); struct cp { double a, b; cp operator +(const cp &o)const {return (cp) {a + o.a, b + o.b};} cp operator -(const cp &o)const {return (cp) {a - o.a, b - o.b};} cp operator *(const cp &o)const {return (cp) {a*o.a - b*o.b, b*o.a + a*o.b};}...
ALGO
0.999966
3.408768
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2019-05-16T07:33:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb56e6591...
d8f98248-ee1e-4da7-9657-38086d057545
Shaik-aarif/My-LeetCode-Solutions
Medium/1143_Longest_Common_Subsequence.cpp
/* Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0. A subsequence of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative order of the remaining characte...
ALGO
0.999991
5.775599
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2023-01-01T08:19:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cad5485...
aeff7736-aaea-4332-ba44-c6d23a310e6f
shreyamishra956/week3-DP5-CipherSchools
Graph_representation-q1.cpp
#include<bits/stdc++.h> using namespace std; class Graph { int v; list<int> *adj; public: Graph(int V) { v = V; adj = new list<int>[v]; } void AddEdges(int u, int v) { adj[u].push_back(v); adj[v].push_back(u); } Void RemoveEdge(int u, int v) {...
ALGO
0.999643
4.592939
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-02-13T15:17: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": "6a5b31fbf807...
0ddcce69-d2e0-4f24-9885-599290eb868b
GraceTessa/Alignement-Sequence2D
seq_main_1.cpp
#include <chrono> #include <iostream> #include <fstream> #include <algorithm> #include <ctime> using namespace std; // Classique sequences edit distance method int classic_seq_edit_distance(const string &a, const string &b) { int m = a.size(); int n = b.size(); int** scores; scores = new int* [m + 1]...
ALGO
0.999566
3.556511
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-07-06T15:40: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": "8cc9062062ef...
b6941110-8eed-473f-b058-e263cf8165eb
kyper999/mkl-dnn2
src/cpu/ref_lrn.cpp
/******************************************************************************* * Copyright 2016-2017 Intel 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.apa...
ALGO
0.971535
7.681
{ "github_metadata": { "branch": "master", "commit_count": 813, "repo_created_at": "2017-05-26T03:53: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": "3ea707a9...
1cf38e30-1dcc-45bd-a1e4-98d83df75973
whitecloudy/UERANSIM_forwarder
src/lib/crypt/eia2.cpp
// // This file is a part of UERANSIM open source project. // Copyright (c) 2021 <NAME>. // // The software and all associated files are licensed under GPL-3.0 // and subject to the terms and conditions defined in LICENSE file. // #include "eia2.hpp" #include "mac.hpp" #include <utils/bits.hpp> static OctetString Ge...
ALGO
0.987117
6.83981
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2021-07-07T13:44:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8bac9900...
c1eb5d34-6322-4b70-8cf5-8b5bd4b4959b
CaptainSlowWZY/OI-Code
BZOJ/BZOJ3992.cpp
// SDOI2015 // Good Problem with NTT #include <algorithm> #include <cstdio> const int kLen = 1 << 14, kMod = 1004535809; typedef long long LL; typedef LL Poly[kLen]; int n, m, x, sz, g = 2, deg, invl; int fac[200], log[8005]; Poly G, bs, res; LL FPow(LL bs, int ex, int mod) { LL res = 1; for (; ex; (bs *= bs) %= ...
ALGO
0.999969
4.638094
{ "github_metadata": { "branch": "master", "commit_count": 364, "repo_created_at": "2018-07-05T00:46: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": "fff481b4...
3d870641-f72a-49bf-93e4-0b96084f00c0
twpca/toi-primary-2022
solution/tester2/2022_adhoc.cpp
// O(n0 + n2) // Expect: AC #include<bits/stdc++.h> #define REP(x,y,z) for(int x=y;x<=z;x++) #define MSET(x,y) memset(x,y,sizeof(x)) #define M using namespace std; int n0,n2,l; string repeat(int x, string s) { string res = ""; REP(i,1,x) res += s; return res; } int main() { while (~scanf("%d %d", &n0, &...
ALGO
0.998677
3.76851
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-03-11T15:29:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f5ef5fb4f8a99...
3c6005e6-3378-41e9-b3f4-cd10dac2cc95
lsiddiqsunny/Leetcode-solve
Top 170/Easy/1165. Single-Row Keyboard.cpp
/* There is a special keyboard with all keys in a single row. Given a string keyboard of length 26 indicating the layout of the keyboard (indexed from 0 to 25), initially your finger is at index 0. To type a character, you have to move your finger to the index of the desired character. The time taken to move your fing...
ALGO
0.999952
5.67779
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2020-02-23T12:47:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5311f88e4...
2548815a-50d6-4536-affd-45b3dea0f34f
RigelOrion251/FRC_2022-2023
allwpilib-main/allwpilib-main/wpimath/src/main/native/cpp/ComputerVisionUtil.cpp
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #include "frc/ComputerVisionUtil.h" #include "frc/geometry/Rotation3d.h" #include "units/math.h" namespace frc { unit...
ALGO
0.999345
7.584197
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-12-04T04:03:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a49352c6cf...
503cf9fc-636c-4434-8d55-04092f02ae91
HossamSaberr/Problem-Solving-Library
Most Tech Used/Graph/FloydWarshall.cpp
struct FloydWarshall { int n; vector<vector<long long>> dist; vector<vector<bool>> neg; // neg[i][j] = true if i→j can go through a neg-cycle FloydWarshall(int _n) : n(_n), dist(n, vector<long long>(n, 1e18)), neg(n, vector<bool>(n, false)) { for (i...
ALGO
0.999846
4.606502
{ "github_metadata": { "branch": "main", "commit_count": 139, "repo_created_at": "2024-12-16T17:08:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0fd4607f0...
ba981621-25ba-4a00-82c2-a2b85f4e01de
rishita2305/OCD-Daily-DSA
DAY 02.cpp
//DAY 3 //Q1) GOOD BAD STRING //APPROACH: counting the number of consecutive vowels or consonants and then comparing them to find out if the string is bad or not. // TC: O(n) SC:O(1) where n = length of string class Solution { public: int isGoodorBad(string S) { int v=0; int c=0; for(int ...
ALGO
0.990007
3.227475
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2025-02-26T17:08: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": "474e31d22b7...
f24bd7bc-df0a-4f5c-b383-9a53753efba4
jonhanke/eclib-with-quadchar
procs/legendre.cc
// legendre.cc: implementations of functions for solving legendre equations ////////////////////////////////////////////////////////////////////////// // // Copyright 1990-2005 <NAME> // // This file is part of the mwrank package. // // mwrank is free software; you can redistribute it and/or modify it // under the te...
ALGO
0.999983
3.24545
{ "github_metadata": { "branch": "master", "commit_count": 130, "repo_created_at": "2015-04-25T17:51:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "0650a3ee...
68aa89bd-e74a-4a28-9c5c-2da6bac5d046
Daniel2022/Some-Code-Exercise
hw4/test1.cpp
#include <stdlib.h> #include <vector> #include <iostream> #include <algorithm> #include <sstream> template<class T> class HyperVector; template<class T> class HyperVectorIterator : public std::iterator< std::random_access_iterator_tag, T >{ public: HyperVectorIterator(typename std::vector<std::vector<T> *>::iterato...
ALGO
0.999051
3.423146
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-07-16T13:40: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": "8851f3f61f...
a27b1b8f-c9d8-4eb4-876f-f7117fb6fac1
TaoSama/ICPC-Code-Library
2017 Training/4.13/5-10.cpp
// // Created by TaoSama on 2017-04-13 // Copyright (c) 2017 TaoSama. All rights reserved. // #pragma comment(linker, "/STACK:102400000,102400000") #include <bits/stdc++.h> using namespace std; #define pr(x) cerr << #x << " = " << x << " " #define prln(x) cerr << #x << " = " << x << endl const int N = 1e5 + 10, INF...
ALGO
0.999987
3.682435
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2016-03-24T05:56: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": "5289dff2...
09f236c3-924d-42ca-bdd3-bfe0c4f1653e
looke/EigenCalcForARM
src/SingleShiftQZIteration.cpp
/* * SingleShiftQZIteration.cpp * * Created on: 2017年5月27日 * Author: looke */ #include "SingleShiftQZIteration.h" //#include <iostream> using namespace std; //SingleShiftQZIteration::SingleShiftQZIteration() //{}; SingleShiftQZIteration::SingleShiftQZIteration(BasicMatrix* p_input_OpMatrix_A, BasicMatrix*...
ALGO
0.981642
3.347361
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2017-06-07T13:58:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31b3ae976...