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
1569c57f-5208-4ebc-81b2-dfab9eee1776
KeilChris/TensorFlow_MIMXRT1064-EVK_Microspeech
packs/ruy/1.0.0/src/ruy/apply_multiplier.cc
/* Copyright 2020 Google LLC. All Rights Reserved. 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 ...
ALGO
0.99667
7.279493
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-09-14T09:25:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8fce0fd74...
57cf8781-c2dd-4bad-882a-df83d88b5123
northpoleforce/SZTU_Cpp2023
期中综合练习(选做)/D. 向量4(类复合).cpp
#include <bits/stdc++.h> #define ll long long using namespace std; class CVector { private: int n, *a; public: CVector(int nn, int *aa) { n = nn; a = new int[n]; for (int i = 0; i < n; ++i) a[i] = aa[i]; } void show() { for (int i = 0; i < n; ++i) { printf("%d ", a[i]); } } float Average() { ...
ALGO
0.974084
4.160689
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-21T06:59: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": "81bac70bea16...
369aa294-83ac-42b9-9364-093454d256a6
gabrielvm98/CG-EB
OpenGL S16 EB final/OpenGL S4.0/Source.cpp
//TF #include <math.h> #include <vector> #include <time.h> #include <glutil.h> #include <figures.h> #include <camera.h> #include <files.hpp> #include <model.hpp> i32 n = 11; //estado de la bala/bola false: no se mueve, true: se mueve bool shooting = false; const u32 FSIZE = sizeof(f32); const u32 ISIZE = sizeof(u...
TOOL
0.979194
3.475942
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-07-09T19:53: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": "a042d7d16f9a...
fa4474bf-5d27-4af1-9082-f74566b5469c
FlorianPusse/OpenDS-CTS
ISDESPOT/reactive-smart/is-despot/include/util/util.h
#ifndef UTIL_H #define UTIL_H #include <iostream> #include <sstream> #include <vector> #include <map> #include <algorithm> #include <math.h> // #include <chrono> #include <locale> using namespace std; // using namespace chrono; /* // NOTE: disabled C++11 feature template<typename T> void write(ostringstream& os, T t...
TOOL
0.920336
4.529743
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-01-06T12:52:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 7, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1834f49d3...
fa60bec3-379f-498c-b2d9-297c9c90315b
hongkedavid/codeeval_challenges
trim_new.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'breakup_sms' function below. * * The function is expected to return a STRING_ARRAY. * The function accepts following parameters: * 1. STRING input_string * 2. INTEGER char_limit */ v...
ALGO
0.999925
4.648355
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2015-03-06T02:26: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": "5904bcc996...
994c4757-6b59-4c58-b08c-f8139f450803
trendct/data
2016/03/ct_opioid_epidemic/packrat/lib/x86_64-apple-darwin13.4.0/3.2.3/dplyr/include/dplyr/Result/min.h
#ifndef dplyr_Result_Min_H #define dplyr_Result_Min_H namespace dplyr { template <int RTYPE, bool NA_RM> class Min : public Processor<RTYPE, Min<RTYPE,NA_RM> > { public: typedef Processor<RTYPE, Min<RTYPE,NA_RM> > Base ; typedef typename Rcpp::traits::storage_type<RTYPE>::type ST...
TOOL
0.987298
6.991704
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2016-03-28T12:59:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a5af5f37...
c2d6926e-a9d0-4188-a37c-e1791445fbe8
hyunynim/Algorithm_2021
BOJ/15683.cpp
#include<bits/stdc++.h> using namespace std; int board[10][10]; int tmp[10][10]; int n, m, ans = 1e9; int dx[] = {0, -1, 0, 1}; int dy[] = {-1, 0, 1, 0}; vector<vector<int>> dr = {{0}, {0}, {0, 2}, {0, 1}, {0, 1, 2}, {0, 1, 2, 3}}; vector<int> pick; struct CAMERA{ int x, y, p; }; vector<CAMERA> seq; void check(){ ...
ALGO
0.999886
4.276135
{ "github_metadata": { "branch": "main", "commit_count": 141, "repo_created_at": "2021-01-27T00:45:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2334e9d2e...
be581493-d846-4193-b9a1-8a3342a97dbc
Iman-Howlader/Competitive-Programming
BootCamp-S16/W-3/S_Array_Negations.cpp
/** * Author : iman320 * Created: 2024-01-02 21:42:30 **/ #include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define nl '\n' #define ll long long #define all(x) x...
ALGO
0.999937
4.631401
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-09-05T14:42:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7567425a19c3...
12851693-d41a-44b2-a2eb-61be0b6ba02d
tarunpodavu1/dsa_gfg
recursion/wordsPhoneDig.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; // Possible Words From Phone Digits // Given a keypad as shown in the diagram, and an N digit number which is represented by array a[ ], // the task is to list all words which are possible by pressing these numbers. // Input: N = 3, a[] = ...
ALGO
0.999719
4.577895
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2021-10-13T17:06: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": "cb0b7f589...
9da55f2b-c439-43fd-b921-29f6c9a505f1
LTLAE/grade13.1PDB
exp 1-B-1.cpp
#include <iostream> using namespace std; int main() { int input = 114514; int b = 0; //make while working while (b<=0) { cout << "Please input x. Or input 114514 to quit." << endl; //enhance user experience cin >> input; if (input == 114514) { break; } els...
ALGO
0.997821
3.126224
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-10-31T02:54:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28beeba45c5f...
6741bc4a-0828-4ac9-b056-0a91245cf339
sauloverissimo/foggeett
foggeett/functions/adx.cpp
#include "adx.hpp" #include "utils.hpp" #include <cmath> #include <numeric> #include <sstream> #include <optional> #include <algorithm> std::optional<KPIResult> adx(const std::vector<Tick>& ticks, const std::string& campo, std::optional<int> n, ...
ALGO
0.969619
5.699139
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2025-04-29T11:48:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65f512a0e06...
b9c971b0-0a15-479a-a5aa-bfc9098109b5
xufuq/DataStructsBook
chapter7/matrix/include/matrix.h
#include <iostream> #include <algorithm> template<class T> class matrix { template <class U> friend std::ostream& operator<<(std::ostream&, const matrix<U>&); template <class U> friend std::istream& operator>>(std::istream&, const matrix<U>&); public: matrix(int theRows = 0, int theColumns...
ALGO
0.984382
3.653057
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-03-26T02:23: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": "9751315fb0...
70a0a43c-2e96-4385-af19-80fecb6aabe0
cyndereN/C-Cpp-Learning
Data Structure/Leetcode/27.RemoveElement.cpp
// 给你一个数组 nums 和一个值 val,你需要 原地 移除所有数值等于 val 的元素,并返回移除后数组的新长度。 // 不要使用额外的数组空间,你必须仅使用 O(1) 额外空间并 原地 修改输入数组。 // 元素的顺序可以改变。你不需要考虑数组中超出新长度后面的元素。 // 数组的元素在内存地址中是连续的,不能单独删除数组中的某个元素,只能覆盖。 // 1.暴力 class Solution { public: int removeElement(vector<int>& nums, int val) { int size = nums.size(); for (int i =...
ALGO
0.999915
5.709404
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2020-06-04T13:36: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": "60b3c407...
05aecda2-eeae-4f91-b7f1-80169fd4ecc4
gs22006/Baekjoon
백준/Ruby/4004. 쿠나이/쿠나이.cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef __int128 lll; typedef long double ld; typedef pair<ll, ll> pll; typedef pair<ld, ld> pld; #define MAX 9223372036854775807LL #define MIN -9223372036854775807LL #define INF 0x3f3f3f3f3f3f3f3f #define fi first #define se second #define fastio ios...
ALGO
0.999886
3.405026
{ "github_metadata": { "branch": "main", "commit_count": 810, "repo_created_at": "2022-09-22T00:45: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": "9e026cb4fb...
7248f10b-4036-410a-b6af-7a70fe527307
akhikolla/InformationHouse
triangulr/src/ptri.cpp
#include <Rcpp.h> using Rcpp::log; using Rcpp::NumericVector; using Rcpp::warning; // [[Rcpp::export]] NumericVector PTriC( NumericVector q, double min, double max, double mode, bool lower_tail, bool log_p) { int n = q.size(); if (min >= max || mode > max || min > mode) { warning("NaN(s) produced."...
ALGO
0.999186
6.677604
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-12-30T15:51:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c21db2487...
92665ced-4fe5-4581-9b07-c268ee095383
dabarrett42/Lab7
RombergIntegration.cpp
#include "RombergIntegration.h" #include "RecursiveIntegration.h" #include "QueueLinked.h" #include "Double.h" using CSC2110::Double; #include <math.h> //a is the lower limit and b is the upper limit double RombergIntegration::accurateRomberg(MultiVarFunction* f, double a, double b, int level) { Double* db; //use...
ALGO
0.998312
4.845335
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-10-09T04:27: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": "603985f42e...
58a65202-d2f1-4928-bc75-6eb9a023b1a8
Sanskar8779/DSA
BinaryTree/103. ZigZagLevel.cpp
// #include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *left, *right; Node(int key){ data = key; left = right = NULL; } }; void ZigZag(Node *root, vector<vector<int>> &vec){ if(root == NULL) return; queue<Node *> q; q.push(root); bool lef...
ALGO
0.999999
5.178934
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2021-06-12T13:20:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68ac0a2e95...
69cb51d8-2ae5-41dd-96d7-42ab23cace01
kirijuana/TI_LAB2
Sazonov_TI_LAB2_Haff/func_all.cpp
#include "stdafx.h" #include "lib.h" using namespace std; ofstream fout("E://уч/3 курс/2й семестр/Теория информации/lab 2/out.txt"); ifstream fin("E://уч/3 курс/2й семестр/Теория информации/lab 2/in.txt"); class Node { public: int count; char symbol; Node *left; Node *right; Node *rightright; Node() { } Nod...
ALGO
0.999963
3.535006
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-06-03T12:20: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": "bac6bfd659...
5194b00f-69cb-4c64-9b75-697b6dde799c
newdeal123/BOJ
Greedy Algorithm(그리디 알고리즘)/2529_부등호.cpp
#include <iostream> using namespace std; int N; char arr[12]; int ans1[12], ans2[12]; void getMin(int idx); bool is_overlap(int idx, int n, int tmp[]) { for (int i = 0; i < idx; i++) { if (tmp[i] == n) return true; } return false; } void getMax(int idx) { if (idx == N+1) { for (int i = 0; i <= N; i++) ...
ALGO
0.999976
3.387383
{ "github_metadata": { "branch": "master", "commit_count": 377, "repo_created_at": "2019-01-04T07:36:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8a0dcb0...
10db2928-d13f-42be-acb1-c1da71c2e503
aditti-ramsisaria/ece-capstone
odometry/odometry.ino
#include <math.h> // Motor 1 #define IN1 4 #define IN2 5 #define enA 6 #define M1_ENCA 2 #define M1_ENCB 10 // Motor 2 #define IN3 7 #define IN4 8 #define enB 9 #define M2_ENCA 3 #define M2_ENCB 11 #define FORWARD 1 #define STOP 0 #define BACKWARD -1 // Constants const int COUNTS_PER_ROTATION = 14; const float GEAR...
ALGO
0.999001
4.766508
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2023-02-15T22:20:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e11bf3e1680...
e815475e-9055-424a-8ff8-d05e919deec9
graspit-simulator/graspit
include/graspit/bbox_inl.h
//###################################################################### // // GraspIt! // Copyright (C) 2002-2009 Columbia University in the City of New York. // All rights reserved. // // GraspIt! is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as publi...
ALGO
0.990369
3.043776
{ "github_metadata": { "branch": "master", "commit_count": 733, "repo_created_at": "2015-10-21T23:24:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 204, "forks": 85, "issues": 33, "pull_requests": 3 }, "file_meta": { "content_id": "ceaff...
f318b08e-ca90-49ca-9d6a-3a4cf788b0fb
lforg37/marto
include/ieeefloats/ieee_adder.hpp
#ifndef IEEE_ADDER_HPP #define IEEE_ADDER_HPP #include "ieeefloats/ieeetype.hpp" #include "ieeefloats/ieee_rounding.hpp" #include "tools/static_math.hpp" #include "primitives/shifter.hpp" #include "primitives/lzoc.hpp" #include "primitives/shifter_sticky.hpp" #ifdef IEEE_ADDER_DEBUG #include <iostream> #include "tool...
ALGO
0.999346
7.377667
{ "github_metadata": { "branch": "Functions", "commit_count": 311, "repo_created_at": "2021-11-25T14:50:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36e88...
791677fc-c760-4fd0-bbdc-a4608f0378e8
nthapa000/Practice
Practice/LinkedList/LinkedListQues/MiddleOfLL.cpp
#include<iostream> struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class Solution { public: ListNode* middleNode(ListNode* head) { // Find th...
ALGO
0.999947
6.077348
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2024-09-13T20:23: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": "30f8737aa...
cb014894-4fcd-4306-9d4a-ace8dea360a7
Sharpless298/CompetitiveProgramming
Luogu/B3609-1.cpp
#include <bits/stdc++.h> using namespace std; int timer = 0, id = 0; vector<vector<int>> G, scc; vector<int> scc_id; vector<int> dfn, low; stack<int> stk; void DFS(int u) { dfn[u] = low[u] = ++timer; stk.push(u); for (int v : G[u]) { if (scc_id[v] == -1) { if (!dfn[v]) DFS(v); low[u] = min(low[u], low[...
ALGO
0.999979
4.699373
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-04-12T13:45:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01c8d7871a8...
a245145c-d850-4592-bd90-16ec159ff64e
mccc03/Modulo1
Codes/ising.cpp
#include <iostream> #include <fstream> #include <cmath> using namespace std; ///////////////////////////// /* Defining RNG parameters */ ///////////////////////////// #define IM1 2147483563 #define IM2 2147483399 #define AM (1.0/IM1) #define IMM1 (IM1-1) #define IA1 40014 #define IA2 40692 #define IQ1 53668 #define...
ALGO
0.999512
4.781138
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2022-08-29T15:13: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": "7628a8571...
70a25d8a-1966-4808-b7cb-829e74e76d8d
smsh0722/PS
problems/2042.cpp
/* 2042 구간 합 구하기 * Segment Tree * smsh0722 * */ #include <iostream> #include <cmath> using namespace std; /* ST: Segment Tree * ti: tree idx (ST) * li: left idx (arr) * ri: right idx (arr) * */ int64_t constructST( int64_t ST[], const int ti, const int li, const int ri, const int64_t arr[] ) { /* base */ ...
ALGO
0.999697
5.403004
{ "github_metadata": { "branch": "main", "commit_count": 193, "repo_created_at": "2022-02-14T13:27: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": "1be82dd454...
bb460ec8-d1f8-4de3-94e3-04ec0dcc627a
KKRainbow/LeetCode
Accepted/649.dota2-senate.125596825.ac.cpp
class Solution { string getRes(char c) { return c == 'R' ? "Radiant" : "Dire"; } public: string predictPartyVictory(string senate, int br = 0, int bd = 0) { string next; bool flag = false; for (auto c : senate) { if (c == 'R') { if (br > 0) { ...
ALGO
0.999988
5.64518
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2015-11-08T09:31:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74aa5e4f...
c1f77425-7e38-4a73-9a8e-0ae164ed0cfd
dealii/dealii
include/deal.II/lac/solver_richardson.h
// ------------------------------------------------------------------------ // // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 1999 - 2024 by the deal.II authors // // This file is part of the deal.II library. // // Part of the source code is dual licensed under Apache-2.0 WITH // LLVM-exception OR LGPL-...
ALGO
0.993412
6.418935
{ "github_metadata": { "branch": "master", "commit_count": 65304, "repo_created_at": "2014-07-17T14:00:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1530, "forks": 789, "issues": 533, "pull_requests": 92 }, "file_meta": { "content_id": ...
a6eaa19d-b1a8-4616-a9f8-57b007321a76
stefano-sansotta/2D-Diffusivity
Librerie/postprocess.h
//Classe con alcune funzione per post process #include <iostream> #include <fstream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #define DST(X,Y) abs(X-Y) #define DST2(X,Y) pow((X-Y),2) using namespace std; class postpro{ public: void Diffusion2(float**,float**,float...
ALGO
0.998074
3.068998
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-08-29T18:08:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7db23dad4e...
3aef8d8f-e5de-4b56-8727-85d2e1a6c30e
m4rcus06/CP
codeforces/Contest/1359C/main.cpp
#include <bits/stdc++.h> using namespace std; using lli = int64_t; //replace with your directory #ifdef LOCAL #include <C:/Coding/CP/templates/content/debug/debug.h> #else #define debug(...) #endif void solve() { lli h, c, t; cin >> h >> c >> t; lli l = -1, r = 1e9 + 7; while (r - l > 1) { ...
ALGO
0.999955
4.377467
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-09-24T16:21:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1fc16d6f7e...
028ec7ad-da11-4d24-95b1-887749e916b9
ambacc244/algorithm
C++/level3/불량_사용자.cpp
#include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; vector<vector<string>> sum_id; void calculate(int length, vector<vector<string>> checked_id, vector<string> order){ if(length == checked_id.size()){ sort(order.begin(), order.end()); vector<vector<s...
ALGO
0.999425
4.458879
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2020-03-07T11:27: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": "2c6f189c1...
2b09fd14-c151-4339-bb91-a5198176a4f3
linhkdvu/LinhVu_CIS5_40488-9
Lab/Savitch_8thEd_Chap4_Prob17_Query_Digit/main.cpp
/* File: main.cpp Author: Dr. <NAME> Created on January 24, 2017, 1:35 PM Purpose: Query the digits */ //System Libraries #include <iostream> #include <cstdlib> #include <ctime> using namespace std; //User Libraries //Global Constants //Such as PI, Vc, -> Math/Science values //as well as conversions fro...
ALGO
0.996928
4.29938
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2017-01-05T20:14:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97b3d9aa4...
ec79cd4b-87c0-4d53-94c5-76745696f653
kulkarnitejal/BinarySearchTree
main.cpp
// Sample driver // EE 312 Fall 2018 // // The BST should work for any data type or object. // Other user created objects must have the << operator overloaded for // output. // #include <iostream> #include <fstream> #include "BST312.h" using namespace std; template <typename T> void print(vector<T> vec){ for(int...
TEST
0.984211
3.837839
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-11-17T22:54: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": "e615e06ad0...
e3dc5580-08fa-4c08-980e-bdddd31f2adf
10XGenomics/supernova
lib/assembly/src/paths/MakeAlignsPathsParallelX.h
///////////////////////////////////////////////////////////////////////////// // SOFTWARE COPYRIGHT NOTICE AGREEMENT // // This software and its documentation are copyright (2008) by the // // Broad Institute/Massachusetts Institute of Technology. All rights // // are...
ALGO
0.945067
4.336548
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2016-11-09T19:16:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 65, "forks": 25, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "ece98fbe5...
d94f6eca-a58c-4faa-9a31-bfade3475e73
joaoguidev/Midterm-Algo-II
testingBinaryTree.cpp
#include <iostream> #include "binaryTree.h" using namespace VGP244; using namespace std; int main() { BinTree<int, std::less<int>> intBTree; intBTree.insert_it(24); intBTree.insert_it(15); intBTree.insert_it(33); intBTree.insert_it(14); intBTree.insert_it(20); intBTree.insert_it(82); intBTree.insert_it(21)...
TEST
0.988551
5.608375
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-08-03T06:12: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": "15930e37e036...
5da2e962-9b28-4d22-9576-69d5c22fce13
ksushant881/Data-Structures-and-Algorithms
ATCODER/ABC 237/E_Skiing.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long int; using ld = long double; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vb = vector<bool>; using vc = vector<char>; using vs = vector<string>; using vvi = vector<vector<int>>; using vvl = ...
ALGO
0.999995
3.876467
{ "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": "d31b9947d8...
8a884d8a-fbfc-4ec8-8fd0-97b5043cdf11
Jack-Christopher/PC-Practicas
Contest/JackGoesToRapture.cpp
#include <bits/stdc++.h> int acumulado[500005]; std::vector< std::vector<std::pair<int, int>> > adjacency_matrix; void Dijkstra(int s, int n) { for(int i = 0; i<n; i++) acumulado[i] = 2147483647; // 2147483647 es el valor maximo de int acumulado[s] = 0; std::priority_queue<std::pair<int, int>, st...
ALGO
0.999902
4.047599
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2021-09-24T23:36: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": "88fd3561d...
61898df9-b61d-4712-a7f2-97e5d7ef774b
Plastburk/AdventOfCode2021
AdventOfCode2021/Code/Day20.cpp
#include "Day20.h" #include "Utilities/Utilities.h" #include <atomic> #include <ppl.h> void Day20::ReadInput(std::ifstream& stream) { stream.read(Input1.data(), Input1.size()); char c = 0; do { stream.read(&c, 1); } while (c != '#' && c != '.'); stream.seekg(-1, stream.cur); char buffer[100 * 100 + 99]; ...
ALGO
0.99939
5.584689
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2021-11-30T20:30: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": "fb42de033b5...
6f481422-04e6-4438-b798-b36e640b43f0
arangodb/arangodb
3rdParty/boost/1.78.0/libs/math/example/lambert_w_precision_example.cpp
// Copyright <NAME> 2016, 2018. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or // copy at http ://www.boost.org/LICENSE_1_0.txt). //! Lambert W examples of controlling precision // #define BOOST_MATH_INSTRUMENT_LAMBERT_W // #define only for (much) diagnos...
ALGO
0.915789
5.955916
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
a065e700-14fb-4cc7-943a-77ecb37990fe
JBlakd/self-study
dp-decode-ways/decode_ways.cpp
#include <cassert> #include <iostream> #include <string> #include <vector> using namespace std; class Solution { public: int numDecodings(string s) { if (s[0] == '0') { return 0; } vector<int> dp(s.length() + 1); dp[0] = 1; dp[1] = 1; for (int i = 1; i < s.length(); ++i) { boo...
ALGO
0.999084
5.243398
{ "github_metadata": { "branch": "main", "commit_count": 430, "repo_created_at": "2022-01-02T04:54: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": "32d6ed0a8d...
f24a0a91-e7c8-4bff-8ea2-5d68bafe202d
nborden11/restaurant-ranker
main.cpp
//Restaurant‑Ranker //COP3530 Project 3b //Team: <NAME>, <NAME>, <NAME> #include <iostream> #include <fstream> #include <string> #include <vector> #include <limits> #include <cctype> #include <chrono> #include <algorithm> using namespace std; //<NAME> – JSON parsing and dataset filtering //parses the string to get...
ALGO
0.999213
5.222491
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-04-17T21:44:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "0c10ed4dedcf...
ff7a7e57-1072-4d17-a52e-9e9a80b44824
igoingdown/leetcode
16.cpp
class Solution { public: int threeSumClosest(vector<int>& nums, int target) { sort(nums.begin(), nums.end()); int res = nums[0] + nums[1] + nums[2], n = nums.size(); for (int i = 0; i < n - 2; i++) { if (i > 0 && nums[i] == nums[i - 1]) continue; int l = i + 1, r = n ...
ALGO
0.999999
6.319283
{ "github_metadata": { "branch": "main", "commit_count": 536, "repo_created_at": "2021-08-23T02:33:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a717db4ae7...
63ab30d9-00cc-44c0-b4fd-a153ed80f50d
aditya-464/coding_prac
acc/acc_prac2.cpp
#include <bits/stdc++.h> using namespace std; string solve(string s, vector<string> d, int n) { reverse(s.begin(), s.end()); for (int i = 0; i < n; i++) { reverse(d[i].begin(), d[i].end()); } vector<int> score; for (int i = 0; i < n; i++) { int c = 0; for (int j = ...
ALGO
0.999997
4.407771
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-15T14:59: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": "cfffdcb8c9da...
a5f481db-adb6-4aee-bb53-016ff22f11a3
alxrsc/Lab-POO
Solutions Lab 9/AbstractFactory.cpp
// Pros: // - este mai flexibil, separand crearea obiectelor de utilizarea lor, premitand schimbarea tipurilor de produse create fara a modifica codul client // - este consistent, asigura ca obiectele dintr-o familie de produse sunt compatibile intre ele // - este extensibil, adaugarea unor noi familii de produse este ...
TOOL
0.939887
6.803591
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-10-11T15:04: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": "12d3899e71e...
61a72c96-6622-4166-8203-0112c3e08893
Chandiharh-university/opps-and-dsa-harsh0955
adjacent matrix and adjacent list .cpp
#include <iostream> #include <vector> using namespace std; class Graph { private: int vertices; vector<vector<int>> adjMatrix; vector<vector<int>> adjList; public: Graph(int n) { vertices = n; adjMatrix.resize(vertices, vector<int>(vertices, 0)); adjList.resize(vertices); ...
ALGO
0.999375
5.831314
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-12-19T09:42:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2dc1e4756c1...
862908c0-3a79-48bd-b322-8e6d8b3ee774
elodina/alligator
mesos_allocation_go_module/proxygen/proxygen/lib/http/codec/HTTPSettings.h
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once...
TOOL
0.918501
6.736411
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2015-05-22T16:44:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 2, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "1fc5d5f621...
b2c8c318-3590-4d07-ac7e-e42ec38f87df
mostafaizz/uber-in-light
CrossCorrelationTester/Source.cpp
#include <vector> #include <string> #include <iostream> #include <sstream> #include <fstream> #include <cstdlib> #include <iomanip> #include <algorithm> using namespace std; const double MM_PI = 3.14159265359; // try to read this from file struct SymbolData { string symbol; double amplitude; double frequency; do...
ALGO
0.950201
4.306079
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-01-24T14:31:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65ad6a6d0e...
5ea068d4-1f6d-4b2f-8268-aa328c567ae9
kretash/rasterizer
include/math.hh
#pragma once #include <math.h> #include <algorithm> #define def_clamp(v, i, a) ( std::min( std::max(v, i), a) ) #define def_mix( x, y, m ) ( x+((y-x)*m) ) struct float2 { float2() {} float2( float x, float y ) : x( x ), y( y ) {} float x = 0.0f, y = 0.0f; float2 operator+(const float2& o) { ...
TOOL
0.991405
6.481666
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2017-07-23T18:09: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": "8ca837578...
8bf1631b-2820-4bc5-9a95-c0624a84c947
yimo22/Algorithm
백준/Gold/17136. 색종이 붙이기/색종이 붙이기.cc
#include <iostream> #include <limits> #include <utility> #include <numeric> using namespace std; int paperCnt[5]; int map[10][10]; int availalbe_map[10][10]; int Answ = std::numeric_limits<int>::max(); void Input(){ for(int i=0;i<10;i++){ for(int j=0;j<10;j++){ cin >> map[i][j]; } } } void make0(pair...
ALGO
0.999605
4.148567
{ "github_metadata": { "branch": "master", "commit_count": 360, "repo_created_at": "2022-09-29T07: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": "89f362f0...
681a270f-2814-49d0-bee2-3a5f26ac0232
LSH3333/PS
baekjoon/10994.cpp
#include <iostream> using namespace std; char stars[500][500]; void print(int n, int r, int c) { if(n == 0) return; int len = 4 * (n-1) + 1; //cout << "n: " << n << ' ' << "(" << r << "," << c << ") " << "len: " << len << '\n'; for(int i = r; i < r+len; i++) { for(int j = c; j < c+len; j++) {...
ALGO
0.999975
3.812417
{ "github_metadata": { "branch": "master", "commit_count": 1357, "repo_created_at": "2021-07-07T06:42:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c7431e...
3ac74b28-5007-445c-9f4a-677b7dec8e15
JeffDot/Cipher_School_Work
FileCryption/FileCryption/BlockCryption.cpp
#include "BlockCryption.h" #include <iostream> #include <string> using namespace std; BinaryString BlockEncryption(BinaryString in, BinaryString Key) { BinaryString KeyArray[NR + 1] = { "", "", "", "", "" }; GetKeyArray(Key, KeyArray); BinaryString wtmp = in; BinaryString utmp = ""; BinaryString vtmp = ""; int ...
ALGO
0.999878
4.643336
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2015-06-09T13:00:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ea4a54ec...
e5b6c8c5-5232-492a-9c1a-1c407aed8e36
nawngs/CompetitiveProgramming
Exercises/LANDING.cpp
#pragma GCC optimize ("O3") #include <bits/stdc++.h> #define ll long long #define ld long double #define fi first #define se second #define pll pair < ll, ll > #define pii pair < int, int > #define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); using namespace std; const string NAME = ""; const string NAME2 =...
ALGO
0.999967
3.701299
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2021-06-19T07:51: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": "9be9ab1bc11...
90fe0c6f-eb9d-49f3-8211-583ab228eddf
taifyang/yolov5-sort
include/hungarian.h
/////////////////////////////////////////////////////////////////////////////// // Hungarian.h: Header file for Class HungarianAlgorithm. // // This is a C++ wrapper with slight modification of a hungarian algorithm implementation by <NAME>. // The original implementation is a few mex-functions for use in MATLAB, foun...
ALGO
0.999693
5.504137
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-05-02T13:38:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6e89b0a1b24...
2fca2820-76b9-4b8b-9551-557ab00fccf6
GraphChi/graphchi-cpp
toolkits/graph_analytics/label_propagation.cpp
/** * @file * @author <NAME> * @version 1.0 * * @section LICENSE * * Copyright [2012] [Carnegie Mellon University] * * 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://w...
ALGO
0.999583
5.783606
{ "github_metadata": { "branch": "master", "commit_count": 960, "repo_created_at": "2013-07-24T13:36:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 808, "forks": 311, "issues": 25, "pull_requests": 8 }, "file_meta": { "content_id": "aef6...
d1b2ef38-04e7-4637-8d10-2f02a30f9e9f
Vol-Tric/codehelp
lecture 25(dynamic programming)/program_2.cpp
// minimum cost climbing stairs #include<bits/stdc++.h> using namespace std; class Solution{ public: // recursive int MCclimbingStairs(vector<int>&cost , int num){ if(num == 0 || num == 1){ return min(cost[num] , cost[num-1]); } return cost[num] + min(MCclimbingStairs(co...
ALGO
0.999986
5.064764
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-03-06T03:47:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c4fddf25a1...
26f3bbc4-6563-4dd5-9196-700aa1fdf7b8
Hdvk35/Dsa
LinkedList/stack.cpp
#include<iostream> #include<stack> #include<bits/stdc++.h> using namespace std; class Stack{ public: int *arr; int top; int size; Stack(int size){ this-> size = size; arr = new int[size]; top = -1; } void push(int element){ ...
ALGO
0.99899
4.281772
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-02-06T07: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": "0b600af12fb...
625bce97-8007-4896-99d0-31a50173f4f5
Sujitmaurya123/DSA_gfg_leetcode_Questionn
LeetCode_DSA_Question/Leetcode_Nov_2023/BusRouters.cpp
/* 815. Bus Routes You are given an array routes representing bus routes where routes[i] is a bus route that the ith bus repeats forever. For example, if routes[0] = [1, 5, 7], this means that the 0th bus travels in the sequence 1 -> 5 -> 7 -> 1 -> 5 -> 7 -> 1 -> ... forever. You will start at the bus stop source (Yo...
ALGO
0.999951
5.796917
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2023-09-25T16:04:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "686bd1090...
aad8e0d4-9c91-4d90-ae1c-0ab75f28a1d9
Iman-Howlader/Competitive-Programming
Codeforces/B_Chemistry.cpp
/** * Author : iman320 * Created: 2023-10-22 17:35:18 **/ #include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define nl '\n' #define ll long long #define ve vect...
ALGO
0.999976
4.921292
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-09-05T14:42:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f61a37d894b9...
a92f8ed5-a128-4bef-903f-7370839f3b0b
zhaofeng-shu33/tech-chores-archive
2014/graphics_programming/graphic_source_code/polygon_modeling_program.cpp
#define MAX_POLYGONS 8 #define MAX_VERTICES 10 #include<GL/glu.h> #include<stdio.h> #include<stdlib.h> #include<iostream> #include<GL/glut.h> typedef struct polygon{ int color; bool used; int xmin,xmax,ymin,ymax; int xc,yc; int nvertices; int x[MAX_VERTICES]; int y[MAX_VERTICES]; }polygon; polygon polygon...
TOOL
0.996142
3.909299
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2020-04-05T06:32: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": "e2c24759...
b96f6dd6-f62d-4e19-b772-e5bacf3fdb9a
lifeich1/rspc-src
_archive/1823/c/main.cc
#include <bits/stdc++.h> // Placeholder for upcoming un-std algorithm, by rspc // End placeholder for upcoming un-std algorithm, by rspc // Scheme by rspc: #if defined(RSPC_TRACE_HINT) #define TRACE(...) do { __VA_ARGS__; } while (0) #else #define TRACE(...) (void)0 #endif #define TRACELN(...) TRACE(__VA_ARGS__; cout...
ALGO
0.99991
4.714461
{ "github_metadata": { "branch": "master", "commit_count": 351, "repo_created_at": "2022-03-12T13:04:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "2b7eee1b...
6e12e735-bb87-472e-b832-178c802a21b7
pibloo94/TAIS
Ej62/main.cpp
//<NAME> #include <iostream> #include <fstream> #include <vector> #include <algorithm> #include "Matriz.h" using namespace std; struct tSolucion { int puntuacion; int columna = 1; }; /* casos recursivos: - puntuaciones(i, j) = tablero(i, j) sii puntuaciones(i-1, j) == -1 , es decir, esta fuera del tablero. - p...
ALGO
0.999934
3.805404
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2019-09-09T14:13:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b368cc36...
f0e284e0-948a-4dda-bb20-50e2f80be5f1
yzygitzh/oj_solutions
leetcode/src/323.cpp
class Solution { public: int countComponents(int n, vector<pair<int, int>>& edges) { if (n <= 0) return 0; vector<int> parent(n); for (int i = 0; i < n; i++) parent[i] = i; for (auto itr = edges.begin(); itr != edges.end(); ++itr) { unionSet(itr->first, itr->second, paren...
ALGO
0.999893
6.315928
{ "github_metadata": { "branch": "master", "commit_count": 219, "repo_created_at": "2017-01-28T15:31:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15a741a8...
15f98a7f-4a4e-4dcd-96bb-c26135dec820
ateow/42-Core-SG
#11_C++_modules/C++_Module_09/ex02/main.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: ...
ALGO
0.999411
6.090129
{ "github_metadata": { "branch": "main", "commit_count": 268, "repo_created_at": "2023-09-07T16:48:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0ea3f019e...
53f42d48-c312-4ae6-9057-61d48c08a0b2
ishandutta2007/codeforces-m
merkurev/normal/576/C.cpp
#include <iostream> #include <vector> #include <cstdio> #include <algorithm> #include <set> #include <map> #include <cassert> #include <numeric> #include <string> #include <cstring> #include <cmath> using namespace std; #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define eprintf(...) 42 #end...
ALGO
0.999483
3.7086
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "1b5ec0ce7436...
a0b60d46-2558-4b36-b8bf-4b4f79658110
ChristophS198/AoC_2020
7/sol_7.cpp
#include <unordered_map> #include <string> #include <vector> #include <stack> #include <unordered_set> #include "../utility.h" /* Just for fun: Implemented using a graph */ const std::string MY_BAG_NAME{ "shiny gold" }; struct TmpBag { std::string bag_name; std::vector<std::pair<int,std::string>> contained_...
ALGO
0.996571
4.534954
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2023-08-06T07:00: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": "679cd8998...
182f16cf-2c11-4321-b78a-c11a80ac4e40
YuhneiNazar/desk_lab7
desk_lab7/desk_lab7.cpp
#include <iostream> #include <fstream> #include <string> #include <sstream> #include <iomanip> using namespace std; int** incidence; int** adjacency; int vertices; int edges; void initGraph(string fname); void makeIncidenceMatrix(string line, int lineNumber); void makeAdjacencyMatrix(string line); string adjacencyMa...
ALGO
0.996117
3.925639
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-04-10T19:43: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": "cd15c7175fce...
0df8b681-8cea-472d-a3da-1c3380ea15d4
akluffy/LeetCode
Sudoku Solver/Sudoku Solver.cpp
/******************************************* Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be only one unique solution. A sudoku puzzle... ...and its solution numbers marked in red. https://oj.leetcode.com/prob...
ALGO
0.999588
5.985581
{ "github_metadata": { "branch": "master", "commit_count": 198, "repo_created_at": "2014-02-05T22:04: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": "b085e186...
90876832-327d-4b1a-8488-bd8a6b0827dc
rmasti/FEM
parrGpu/src/mpiMain.cpp
#include "mhdRT.hpp" #include "occa.hpp" //#include <cuda_runtime_api.h> int main(int argc, char *argv[]){ MPI_Init(&argc, &argv); constants C; C.f_limiter = 5; C.num_ghost = 3; C.cfl = 0.45; C.nmax = 1000000; C.wint = 1000; C.pint = 100; double A = (2-1)/(1.0+2.0); double tend = 6.0/sqrt(A*ACCEL...
ALGO
0.988018
3.670424
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2018-08-22T20:59: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": "9ca4322f...
57b06af3-a026-485f-86d5-893507e70be9
aalghlai/Member-Management-System-C-
Abdulrahman Al-Ghlai Lab 7 B.cpp
// <NAME> w2029025 // Lab Assignment 7 Part B Lab // July 23, 2023 // C++ code for Lab 7 Part B: #include <iostream> #include <cmath> class MortgageCalculator { public: MortgageCalculator(); // Default constructor // Setter functions void setLoanAmount(double amount); void setAnnualInterestRate(dou...
TOOL
0.951399
5.351397
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-22T17:11: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": "80a7773a649c...
3bd2b97f-71d6-4eb6-acfb-7c33a3d98061
lao19881213/Beamfomer-on-GPUs
CNProc/src/InversePPF.h
#ifndef LOFAR_CNPROC_INVERSE_PPF_H #define LOFAR_CNPROC_INVERSE_PPF_H #if 0 || !defined HAVE_BGP #define INVERSE_PPF_C_IMPLEMENTATION #endif /* The subbandList is specified in the Parset file (and class), exactly in the format we need: #subbands x the index van de FFT bin. So, 248 x [0..511] The station PPF first...
ALGO
0.990808
6.282259
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-09-13T03:12:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c8e6b4282...
42470125-100d-461a-8143-2043fe40128a
threedslider/blackdot-b
source/blender/compositor/cached_resources/intern/symmetric_separable_blur_weights.cc
/* SPDX-FileCopyrightText: 2023 Blender Authors * * SPDX-License-Identifier: GPL-2.0-or-later */ #include <cstdint> #include <memory> #include "BLI_array.hh" #include "BLI_hash.hh" #include "BLI_index_range.hh" #include "BLI_math_base.hh" #include "RE_pipeline.h" #include "GPU_texture.hh" #include "COM_context.h...
TOOL
0.956008
7.41912
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2023-08-04T04:13:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5be873003...
4062859b-86bc-44eb-98dd-2a1234c16db0
Coach-Academy/Winter-2-2023
Level 2/Class 1/Practice G1/Week 02/L.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); int t = 1; //cin >> t; while (t--) { int q; cin >> q; priority_queue<int, vector<int>, greater<int>> pq; string s; int x; ...
ALGO
0.99666
3.861962
{ "github_metadata": { "branch": "main", "commit_count": 527, "repo_created_at": "2023-11-22T17:57:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8fe2fa08619...
49f01c81-935e-47c5-8c72-3f2592913be5
deepanshu-j/Leetcode
74-search-a-2d-matrix/74-search-a-2d-matrix.cpp
#define vi vector<int> class Solution { public: int inf = 0x3f3f3f3f; int bs1(vi v, int target){ int sz=v.size(); int l = 0, r = sz-2; while(l<=r){ int mid = (l+r)/2; // it belongs to this range // if(v[mid]<=target and tar...
ALGO
0.999962
5.649028
{ "github_metadata": { "branch": "main", "commit_count": 910, "repo_created_at": "2022-02-17T13:18: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": "783412d7d4...
78471944-454a-45af-ab94-dee96078688b
DanielGuachamin/Ejercicio-Deber-Clase_30
main.cpp
#include <iostream> #include <ctime> #include <fstream> #include <iomanip> #include "ejercicio1.h" #include "ejercicio2.h" #include "ejercicio3.h" using namespace std; using namespace ejer1; using namespace ejer2; using namespace ejer3; const int MAX = 100; int menu_gral(); int main() { int opcion; do { opc...
TOOL
0.956046
3.616936
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-14T19:38: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": "7c8710ef9b...
f2998cf3-60b7-485d-bae3-43b357fba375
xiaozhuo12138/StdSamples
include/Analog/VAGenSVF.hpp
// http://dafx.de/paper-archive/2020/proceedings/papers/DAFx2020_paper_70.pdf #pragma once #include <Eigen/Dense> #include <cmath> /** * Generalized State-Variable Filter structure, * as defined by <NAME> McClellan (https://dafx2020.mdw.ac.at/proceedings/papers/DAFx2020_paper_70.pdf) * * I've added some nonlinear...
ALGO
0.998496
6.324615
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-03-29T01:37: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": "9409cba0cd4...
10695f44-0178-4958-b8ad-a97165a63107
SaloniSwagata/DSA
Numbers/Add_Binary.cpp
#include<iostream> using namespace std; int reverse(int n) { int rev = 0; while(n>0) { int lastDigit = n%10; rev = rev*10 + lastDigit; n/=10; } return rev; } int addBinary(int a, int b) { int ans=0; int prevcarry=0; while(a>0 && b>0) { if (a%2 == 0 &...
ALGO
0.999984
4.913138
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2020-10-24T04:58: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": "1dc1a8f6...
0acc5ffe-4b13-44a7-b282-5692c89450b7
da0ran9e/Algorithm-Competivive-Programing
src/b.cpp
#include <bits/stdc++.h> using namespace std; double power(const double x, int n) { if (n == 0) { return 1.0; } double ret = power(x, n / 2); ret = ret * ret; if (n % 2 == 1) { ret = ret * x; } return ret; } class Delina { public: double getProbability(int T, int G) { double p =...
ALGO
0.998808
4.483409
{ "github_metadata": { "branch": "main", "commit_count": 705, "repo_created_at": "2022-12-08T15:43: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": "9de91f3963...
e347f2a7-30a8-40a7-b74c-0707032e8e40
zarinakolybaeva/-
lab9/h.cpp
#include <iostream> #include <vector> using namespace std; vector<int> perfixFunction(string s){ vector<int> pi(s.size()); pi[0] = 0; for(int i = 1;i < s.size(); i++){ int j = pi[i-1]; while(j > 0 && s[j] != s[i]){ j = pi[j-1]; } if(s[j] == s[i]){ pi[...
ALGO
0.999933
4.000841
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-02-07T09: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": "099575a226bd...
ebdf5908-a048-4559-b734-fce1187fad75
mihneadinik/CrackingTheCodingInterview
2 - LinkedLists/2.4/24_2.cpp
#include <iostream> #include "/home/mihnea_dnk/Desktop/cracking/2 - LinkedLists/LinkedList.h" Node<int> *rep(Node<int> *node, int k) { Node<int> *head, *tail; head = node; tail = node; while (node != nullptr) { Node<int> *next = node->next; if (node->data >= k) { tail->next ...
ALGO
0.999982
4.336135
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-07-26T19:09: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": "7612addff169...
4dc27dd1-c01b-45d2-9f84-a44197948956
PRINCE-DHAMECHA/network_and_infromation_security
6_knapsack.cpp
//-----------------------// //----PRINCE-DHAMECHA----// //-----------------------// #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long long int lli; typedef unsigned long long int ulli; typedef float flt; typedef string str; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pa...
ALGO
0.999949
3.509945
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-01-24T02:30: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": "e0e19b8770f...
bf4ad77f-a953-4bc7-996c-27a051ff8b8c
bastianheinzelmann/Dunchangeling
Experiments/ExperimentsMain.cpp
#include <iostream> #include "../Dunchangeling/Graph.h" #include <string> #include <random> #include "../Dunchangeling/GeneticAlgorithm.h" #include "../Dunchangeling/Room.h" #include "../Dunchangeling/Grid.h" #include "../Dunchangeling/Constants.h" #include "../Dunchangeling/GraphUtils.cpp" #include "../Dunchangeling/...
ALGO
0.999047
5.30015
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2020-03-12T17:05: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": "33bd076a0...
3db75b8f-7bf6-4dca-8ff8-2285713416ff
akshay090703/gfg-practice-problems
Day 158/sortStackRecursively.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; class SortedStack { public: stack<int> s; void sort(); }; void printStack(stack<int> s) { while (!s.empty()) { printf("%d ", s.top()); s.pop(); } printf("\n"); } int main() { int t; cin >> t; whil...
ALGO
0.999908
6.104686
{ "github_metadata": { "branch": "main", "commit_count": 286, "repo_created_at": "2024-02-06T08:01: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": "81d089cf96...
3a1c9851-09dc-451a-be9c-36f74970be8c
jun-yoshiyoshi/algorithm-datastructure
chapter05_2/problem5_6.cc
#include <iostream> #include <vector> using namespace std; const int INF = 1 << 29; template <class T> void chmin(T &a, T b) { if (a > b) a = b; } int main() { int N, W; cin >> N >> W; vector<int> a(N), m(N); for (int i = 0; i < N; ++i) cin >> a[i] >> m[i]; vector<vector<int>> ...
ALGO
0.999991
3.786506
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-09-14T00:27: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": "23294c8d208...
17332b85-bc7f-4c6f-8b4d-ffab9ec09017
knockcat/Leetcode
2508-add-edges-to-make-degrees-of-all-nodes-even/2508-add-edges-to-make-degrees-of-all-nodes-even.cpp
class Solution { public: pair<int,int> removeTwo(vector<int>& odd, int one , int two) { vector<int> res; for(int i = 0; i<4; ++i) { if(i == one or i == two) continue; res.push_back(odd[i]); } return {res[0],res[1]}; } bool is...
ALGO
0.999913
5.276203
{ "github_metadata": { "branch": "master", "commit_count": 3603, "repo_created_at": "2022-01-15T12:41:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 500, "forks": 122, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e2...
e16f1b91-419a-4a6f-8954-d2d7aae0779e
airockchip/rknn_model_zoo
examples/clip/cpp/postprocess.cc
// Copyright (c) 2024 by Rockchip Electronics Co., Ltd. All Rights Reserved. // // 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 // // Unl...
ALGO
0.998599
3.983741
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-02-15T02:35:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1681, "forks": 285, "issues": 248, "pull_requests": 9 }, "file_meta": { "content_id": "2ca5...
660563c6-30a4-4d78-9556-28fe9f054b17
jnanliu/solves-for-PAT
Advanced Level/1024 Palindromic Number/main.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <queue> #include <map> #include <set> #include <string> #include <iostream> #include <sstream> #define maxn 10010 #define maxe 20010 using namespace std; string n, m; int k; string add(string ori) { int Len = or...
ALGO
0.999991
3.616283
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-07-28T17:14:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ef6a8fd3...
bc42b61e-30d2-47d3-a330-87a1a77e844a
MAZHARMIK/Interview_DS_Algo
Linked List/Flatten a Multilevel Doubly Linked List.cpp
/* Company Tags : Miscrosoft Leetcode Link : https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/ */ //Approach-1 (Using stack) class Solution { public: Node* flatten(Node* head) { if(!head) return NULL; stack<Node*> st; Node* curr = head; ...
ALGO
0.999952
5.808871
{ "github_metadata": { "branch": "master", "commit_count": 5946, "repo_created_at": "2020-07-12T13:13:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2586, "forks": 1357, "issues": 7, "pull_requests": 37 }, "file_meta": { "content_id": "...
c8504217-8fe6-43c4-b7c6-794a90e00e50
pranayd17/CP-Problem-Solutions
Number_of_Atoms.cpp
class Solution { public: class Formula { public: string atom; int count; Formula(string atom, int count) { this->atom = atom; this->count = count; } }; string countOfAtoms(string formula) { stack<Formula> st; int i = 0; ...
ALGO
0.999967
4.850541
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2024-08-28T17:52:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4260041b67...
ca8ace5d-6f51-40bf-8a55-8fe8c673bd1e
YJYandHCX/SIMPLE_DB
memtable.h
#pragma once #include <iostream> #include <vector> #include <bitset> #include <algorithm> #include <functional> #include <atomic> #include <bitset> #include <algorithm> #include <unistd.h> #include "config.h" #include "utils.h" namespace SIMPLE_DB { /* std::vector<int> produce_prime_number(int n) ; //从bitset...
TOOL
0.943723
3.57171
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2020-06-13T05:14:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca3f1c85f...
4efa7672-857c-43f6-a90e-101bb98b8ecb
MoKob/eopi
primitives/doors.hpp
#ifndef EOPI_PRIMITIVES_DOORS_HPP_ #define EOPI_PRIMITIVES_DOORS_HPP_ #include <cstdint> #include <iostream> namespace eopi { namespace primitives { // output the solution to the five-hundred doors problem inline void fivehundred_doors() { // 500 closed doors as input // x_i toggles every ith door, starting a...
ALGO
0.996491
5.105509
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2017-08-03T08:28:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf95f56d...
a7569859-cc88-415c-b460-a34cb1c96cb9
jas-karan/myLeetcode
binary-tree-zigzag-level-order-traversal/binary-tree-zigzag-level-order-traversal.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.999999
6.176592
{ "github_metadata": { "branch": "main", "commit_count": 2643, "repo_created_at": "2021-12-25T09:57: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": "f682eb180...
da20e674-9d23-4923-bc27-4f516d52c4b2
sutitMUT/MIIA0106B
Code/Cplus/LAB07_03/LAB07_03.cpp
#include <iostream> using namespace std; // ฟังก์ชันสำหรับการสลับค่าภายในอาร์เรย์ void swap(int* a, int* b) { int temp = *a; *a = *b; *b = temp; } // ฟังก์ชันสำหรับการเรียงลำดับโดยใช้ Bubble Sort void bubbleSort(int* arr, int size) { for (int i = 0; i < size - 1; ++i) { for (int j = 0; j < size - i - 1; ++j) { ...
ALGO
0.999888
5.200107
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-01-03T14:58:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75ba2d1e97a...
5db21989-c06c-4bbd-b3d5-bb783456a2f8
Vikash7974/LeetCode-Questions
Count the triplets - GFG/count-the-triplets.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: int countTriplet(int arr[], int n) { unordered_map<int,int> mp; for(int i=0;i<n;i++) { mp[arr[i]]++; } //sort(arr,arr+n); ...
ALGO
0.999682
6.201912
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2023-02-07T11:33: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": "c1949a4135...
aac7d841-46ef-4481-bc21-5da897021ec6
mirrionna/ProyectoTT1
src/IERS.cpp
// $Source$ //---------------------------------------------------------------------- // IERS //---------------------------------------------------------------------- // Proyecto TT1 // /**@file IERS.cpp * @brief Cálculo de los tiempos IERS y los datos de movimiento polar. * * @author <NAME> * @bug No known bugs. */ /...
ALGO
0.99659
6.339216
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2025-03-22T11:24: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": "8fccc1fbd49...
bffcd178-bbac-444e-984f-e7a67ca99fe3
KatsuyaKikuchi/ProgrammingContest
AtCoder/Virtual/20200524/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pll; #define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i)) #define REP(i, n) FOR(i,n,0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll) 1e15; int main() { cin.tie(0); ios::sync_with_s...
ALGO
0.999354
3.523164
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2020-12-04T21:42: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": "9e6728a9c...
af8dd0e7-8df4-4acd-b025-ce348a6d3898
All1n524/c-programming-by-doing
Pointers/Pointers3.cpp
//includes the essential things that we use like cout << #include <iostream> //makes it so that we don't have to type std:: before every command using namespace std; //creates an integer M that is 3 const int M = 3; //creates an int that is n with the value of 3 const int N = 3; //creates a function printArr with par...
TOOL
0.948778
4.624995
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-01-14T07:39:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62d84c25f24...
3c4beee1-86db-4126-9217-1f4d4c8581be
tqchen/ffi-navigator
tests/dummy_repo/dgl/src/graph/sampler.cc
/*! * Copyright (c) 2018 by Contributors * \file graph/sampler.cc * \brief DGL sampler implementation */ #include <dgl/sampler.h> #include <dgl/immutable_graph.h> #include <dgl/runtime/container.h> #include <dgl/packed_func_ext.h> #include <dgl/random.h> #include <dmlc/omp.h> #include <algorithm> #include <cstdlib...
ALGO
0.903782
7.088931
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2019-12-27T16:44:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 241, "forks": 24, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "449709ef...
88831bf8-ce73-4a3e-b8dc-aa4c6d45dcd0
miaowh/ICPC
Codeforces/contest/717/c.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 105; int a[maxn]; int vis[200005]; bool check(int n, int sum) { vis[0] = 1; for (int i = 0; i < n; i++) { for (int j = sum - a[i]; j >= 0; j--) { if (vis[j]) vis[j + a[i]] = 1; } } return vis[sum / 2]; } void wor...
ALGO
0.999983
3.305907
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2021-06-02T06:06: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": "9711a82a1cb...
32fe05f8-d047-45f0-a9d3-474d851c08c4
animeshkarmakarAK/Computer-Programming
subset.cpp
#include<bits/stdc++.h> #define rep(i,n) for(int i=0; i<(int)n; i++) #define repp(i,k,n) for(int i = k; i<=(int)n; i++) #define pb(x) push_back(x) #define mem(x,y) memset(x,y,sizeof(x)); #define pii pair<int,int> #define pmp make_pair #define uu first #define vv second using namespace std; #define READ(f) freopen(f, "r...
ALGO
0.999105
3.665849
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-04-22T16:47:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49cd8ead1b...
5a7d5f5c-ca6f-48dd-8e45-70ac6c95bd7d
rookiexiong7/HIT-courses
Bioinformation/实验/exp1/code/sort.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <bitset> #include <cstdlib> uint64_t extract_val(uint64_t* addr, int idx){ int i = idx >> 5 ; int j = idx % 32; if(j == 0) return addr[i]; uint64_t code1 = addr[i]; code1 = (code1 << j * 2); uint64_t code2 = a...
ALGO
0.999395
3.413609
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2023-10-27T02:09:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e4e9b3b4f...