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
917c14f6-3d37-4427-ba5d-3b31b5dc7b17
orangesummertime/orangesummertime.github.io
HTML/SeatZen/temp/add.cpp
int width = neoImage.width(); int height = neoImage.height(); int diameter = 15; int sigmaSpace = 80; int sigmaColor = 80; // 创建输出图像 QImage neoResult(width, height, QImage::Format_RGB888); // 计算权重表 QVector<double> weightTable(diameter * diameter); ...
ALGO
0.994486
5.0798
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2022-03-11T13:15:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8dd50e1f27...
dff7433b-3313-4977-a921-9c3d4bc605ea
tiankonguse/ACM
contest/sgu/vol3/339.cc
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <ctime> #define inf 0x3f3f3f3f #define Inf 0x3FFFFFFFFFFFFFFFLL #define rep(i, n) for (int i = 0; i < (n); ++i) #...
ALGO
0.999745
3.712046
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2013-03-25T04:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 69, "forks": 40, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d65f4b...
feb1b898-1abe-4699-bd41-43730cbbd0ca
IvanSkvortsov/pseudo_integral
alpha/alpha.slm.demo.h
#include"alpha.slm.h" #include<iostream> #include<iomanip> #include<vector> #include<fstream> #include<cmath> #include"sf.math.h" #include"mpreal.h" #include"vector.3d.h" #include"get.work.time.h" #include<cassert> using namespace std; inline void print_i( char const * name, const int value) { cout << setw(14) << na...
TOOL
0.976906
3.679646
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2016-11-12T00:42: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": "76bf51806...
ff7f876d-79ce-4f98-ad8f-79c22de1f926
StirringWizard1/Prac6_1
main.cpp
#include <iostream> #include "Individual.h" #include "Mutator.h" #include "Rearrange.h" #include "BitFlip.h" #include "BitFlipProb.h" #include <string> Individual * execute(Individual * indPtr, Mutator * mPtr, int k) { *indPtr = mPtr->mutate(*indPtr, k); return indPtr; } int main() { std::string binarystr1; ...
ALGO
0.999699
4.31346
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-09-17T12:03: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": "04dd1102cca2...
8fa2b597-e5dc-461d-abfb-262f703903ec
reverg/PS
boj/11660.cpp
#include <iostream> using namespace std; int sum[1025][1025] = { 0, }; int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); int n, m; cin >> n >> m; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { cin >> sum[i][j]; s...
ALGO
0.999921
4.30701
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2021-06-24T14:39:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf64dd06889...
94306911-c87c-45f1-b317-aea7ef6b2c50
Md-Kais/basic_CP
Sorting/p33.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef double dl; #define endl "\n" #define Y cout << "YES" << endl; #define NO cout << "NO" << endl; #define yes cout << "Yes" << endl; #define no cout << "No" << endl; #define sp " " #define PB push_bac...
ALGO
0.999946
4.229529
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-04-03T00:02: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": "d1660ed6294a...
00a45e50-1c00-4c49-b6f6-7f61b5734a9c
Dzzirt/Game
АиСД/lab3/lab3/fs_functions.cpp
#include "fs_functions.h" #include <iostream> using namespace std; void PrintLevel(const Tree& current, int curr_pos) { PrintHelp(); int counter = 0; Tree* ptr = new Tree(); *ptr = current; while (ptr != nullptr) { if (counter == curr_pos) { cout << ptr->name << " <--" << endl; counter++; } else ...
TOOL
0.911985
3.183358
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2015-09-29T18:04:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "ad786cd18...
be371ed7-fdbc-4a6b-8e41-ee077c461346
RobotLocomotion/drake
math/continuous_lyapunov_equation.cc
#include "drake/math/continuous_lyapunov_equation.h" #include <cmath> #include <complex> #include <limits> #include <stdexcept> #include "drake/common/drake_assert.h" #include "drake/common/is_approx_equal_abstol.h" namespace drake { namespace math { using Eigen::Matrix2d; using Eigen::MatrixXd; using Eigen::Vector...
ALGO
0.999915
6.725271
{ "github_metadata": { "branch": "master", "commit_count": 33726, "repo_created_at": "2014-01-26T16:11:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3630, "forks": 1305, "issues": 690, "pull_requests": 46 }, "file_meta": { "content_id":...
54c637f0-2e1e-44e9-bf8e-ffff22558e36
lalitsontyal/LEETCODE
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points/2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points.cpp
/** * Definition for singly-linked list. * 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: vector<int> nodesBetw...
ALGO
0.999949
4.995627
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2023-11-06T15:35:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "497ccbec19...
53258dca-c19b-431a-ba2f-f05bdfe98535
TurtleShip/ProgrammingContests
Solutions/TopCoder/TCO_10/Qualifier_3/SumRectangle.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <string> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cm...
ALGO
0.999871
5.375985
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2014-04-19T08:12:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5dc284b2...
3791548a-4011-4b52-8c9f-e4bbe4e86cfc
YamenZayoud/OmniWheel-Robot
OrientationMovement.ino
#include <Arduino.h> #include <math.h> float pid3pwm, pid2pwm, pid1pwm,deltaTime,theta_dot,maxdistanceTheta =0; int xxx = 0; float Kp1 = 3.2, Ki1 = 2.2 / 100, Kd1 = 2.2 / 1000; float Kp2 = 3.05, Ki2 = 2.3 / 100, Kd2 = 2.3 / 1000; float Kp3 = 3.5, Ki3 = 2.5 / 100, Kd3 = 2.5 / 1000; float pid1, pid2, pid3; int dirM1, d...
ALGO
0.957529
4.67101
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2024-08-11T06:39: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": "4f3794b40...
149a1055-d3b1-47f6-a66e-298e05190931
VieiraEnzo/MochilaSoft
ILS3.cpp
#include "ILS.h" ILS::ILS(ProblemInstance* _p, int max_iter){ p = _p; iter_wo_impr = max_iter; } ILS::~ILS(){} /* gera um PDF de cauchy entrada: - parâmetros da distribuição saída: - pdf de cauchy tempo: O(1) */ double cauchy_pdf(double x, double loc, double scale) { double denom = M_PI * scale * (1 + std::pow...
ALGO
0.999526
5.030809
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2024-07-09T15:02: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": "f198aaa453b...
78e32fb9-b6b0-407a-a22e-e82518fff4e4
ansh2311/More_C_programs
Q6.cpp
#include <stdio.h> void findFloorAndCeil(int arr[], int n, int key) { int low = 0, high = n - 1, floor = -1, ceil = -1; while (low <= high) { int mid = (low + high) / 2; if (arr[mid] == key) { floor = ceil = arr[mid]; break; } else if (arr[mid] < key) { ...
ALGO
0.999983
4.684892
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-11-25T09:06:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "53abdbda94a8...
876c3d6d-8397-4c2c-836c-ed1c43c9e6c3
AdityaVSM/Algorithms
6 sorting/4 selection sort/main.cpp
#include<bits/stdc++.h> using namespace std; void naive_selection_sort(int a[], int n){ //time = O(n*n) space = O(n) int temp[n]; for(int i=0; i<n; i++){ int min_idx = 0; for(int j=1; j<n; j++) if(a[j] < a[min_idx]) min_idx = j; temp[i] = a[min_idx]; ...
ALGO
0.999925
4.929471
{ "github_metadata": { "branch": "master", "commit_count": 170, "repo_created_at": "2021-05-02T10:41: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": "8b52b97a...
1e12afda-8084-4d8d-9ded-3d2872ea3ac1
jiahao1001/OJ_Guide
有OJ/刷题指南(包含leetcode, POJ, PAT等)/PAT/PAT乙级(Basic Level)/1005. 继续(3n+1)猜想 (25).cpp
1005. 继续(3n+1)猜想 (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 <NAME> 卡拉兹(Callatz)猜想已经在1001中给出了描述。在这个题目里,情况稍微有些复杂。 当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数。例如对n=3进行验证的时候,我们需要计算3、5、8、4、2、1,则当我们对n=5、8、4、2进行验证的时候,就可以直接判定卡拉兹猜想的真伪,而不需要重复计算,因为这4个数已经在验证3的时候遇到过了,我们称5、8、4、2是被3“覆盖”的数。我们称一个数列中的某个数n为“关键数”,如果n不能被数...
ALGO
0.999997
4.802286
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2017-12-25T06:24:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 82, "forks": 29, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9277df...
12f53f50-5b41-4088-a1cf-b6820b6a6ded
Elpis-ES/neungji
prob/2248.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; ll dp_arr[32][32]; ll dp_cnt(int n, int l){ if(dp_arr[n][l] != -1){ return dp_arr[n][l]; } else if(l < 0 || n <= 0){ return 0; } ll ret; if(l > n){ l = n; } if(l == n){ ret = 1 << n; ...
ALGO
0.999956
3.756267
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2022-01-10T16:29:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b91b02d566a...
cc033cb8-bc6d-44ba-baf3-5ab1da687555
flaviu2001/High-School-Small-Projects
ONI/ONI 2019/conexidad.cpp
#include <bits/stdc++.h> #define ff first #define ss second using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; const string file = "conexidad"; const ll INF = 9223372036854775807ll; const int inf = 2147483647, nmax = 100005; int n, m, c[nmax], rng[nmax], free1[nmax], free2[...
ALGO
0.999962
4.006525
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-04-09T13: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": "c11556fad...
b235fcbe-cf86-42d6-923c-5eb77d0a6305
pterodactylstfw/info
Facultate/AF/lucru_acasa/partial_restanta2023/partial_restanta2023/main.cpp
#include <iostream> #include <fstream> #include <vector> std::ifstream fin("date.txt"); struct alergator{ unsigned ID; std::string nume_pren; float viteza, rezistenta; }; void citire(std::vector<alergator>&alg) { alergator tmp; int n; fin>>n; for(int i=0;i<n;i++) { bool ok=t...
ALGO
0.996162
3.606456
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2023-11-04T18:15:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ef8b29917...
9da0d6cb-afe1-4a2c-b553-8ed0367f4b44
Striz-lab/c-3sem
11/3.cpp
#include <iostream> #include <functional> #include <algorithm> #include <vector> #include <numeric> #include <set> int main(){ int n; std::cin >> n; std::vector<std::vector<bool>> con(n, std::vector<bool>(n, false)); int m; std::cin >> m; for (int i = 0; i < m; ++i){ int a, b; ...
ALGO
0.999949
4.034662
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-01-21T15:20: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": "aa6237dba321...
ba7e98f9-f8cf-45b6-9681-118b05eb6d49
luciocf/CP-Problems
USACO/USACO 2014-2015/Gold/Dec 2014/guard.cpp
// USACO Gold Dec 2014 - Guard // <NAME> #include <bits/stdc++.h> using namespace std; const int maxn = 21; const int inf = 1e9+10; int n; int h[maxn], w[maxn], s[maxn]; int dp[1<<maxn]; int solve(int mask) { if (!mask) return inf; if (dp[mask] != -1) return dp[mask]; int ans = -inf; long long soma = 0ll; ...
ALGO
0.999975
3.992649
{ "github_metadata": { "branch": "master", "commit_count": 1082, "repo_created_at": "2019-02-04T01:05:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99af673...
edf0d105-f972-4891-af70-110db34e46c6
kims7186/CPP202309
challenge/week7/recommendation_func.cpp
#include <iostream> using namespace std; const int NUM_USERS = 3; // 사용자의 수 const int NUM_ITEMS = 3; // 항목의 수 int userPreferences[NUM_USERS][NUM_ITEMS]; //사용자의수,항목의수가 입력된 선호도 2차원배열 void initializePreferences(int userpreferences[NUM_USERS][NUM_ITEMS]) { //사용자와 항목 간의 선호도를 입력 받아 2차원 배열 초기화 for (int i = 0; i < NUM...
TOOL
0.991633
5.457809
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-09-06T11:00:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe7cdcb04d7...
9f3fbf3d-6a1d-4a49-b4d9-470c870f8d7b
vinniefalco/DSPFilters
shared/DSPFilters/include/DspFilters/RBJ.h
/******************************************************************************* "A Collection of Useful C++ Classes for Digital Signal Processing" By <NAME> Official project location: https://github.com/vinniefalco/DSPFilters See Documentation.cpp for contact information, notes, and bibliography. ----------------...
TOOL
0.937278
5.402376
{ "github_metadata": { "branch": "master", "commit_count": 249, "repo_created_at": "2012-03-05T18:37:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1966, "forks": 390, "issues": 32, "pull_requests": 7 }, "file_meta": { "content_id": "df...
47adbeb4-a51d-4359-87c6-5dd86e58397c
Chris-tyt/Linearized-Shallow-Water-Simulation
common/scenarios.hpp
/** * We create a water drop in the middle of the grid. The water drop is a 2D * Gaussian function with a maximum height of max_height and a radius of r. * In other words, the height of the water drop is given by: * * h(x, y) = max_height * exp(-((x - center_x)^2 + (y - center_y)^2) / (2 * r^2)) * */ void water_...
ALGO
0.994845
4.584333
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-11-06T23:01:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6542f8959ca...
b258a24f-533d-458f-8890-fa5a7257911b
kedebug/leetcode
EvaluateReversePolishNotation/EvaluateReversePolishNotation.cpp
class Solution { public: int evalRPN(vector<string> &tokens) { stack<int> nums; stack<char> ops; for (int i = 0; i < tokens.size(); i++) { if (tokens[i][0] >= '0' && tokens[i][0] <= '9') { int value = atoi(tokens[i].c_str()); nums.push(val...
ALGO
0.999835
5.600862
{ "github_metadata": { "branch": "master", "commit_count": 227, "repo_created_at": "2013-06-06T11:39:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 230, "forks": 153, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ae8c...
65e083d8-fd4a-4b46-930e-af316115ed8e
woaitudou715/Algorithm-problem-exercises
dm08_旋转数组中的最小数字.cpp
#include<iostream> #include<vector> #include<stack> using namespace std; //快速排序算法 int Partition(int data[], int length, int start, int end) { if (data == NULL || length <= 0 || start < 0 || end >= length) throw new std::exception("Invalid parameters"); int index = start; swap(data[index], data[end]); int small = ...
ALGO
0.999779
4.253113
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-03-05T05:44: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": "8216be284a...
6755830e-ace3-4df7-93b4-1aeed9f46d54
wisest30/AlgoStudy
source/KickStart/2020_Round_H_2_Boring_Numbers/hyoseong.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; string s[2]; ll dp[2][30][30][2]; ll f(int type, int start, int cur, bool small) { auto& ss = s[type]; if(cur == ss.size()) return 1; ll& ret = dp[type][start][cur][small]; if(ret != -1) return ret; ret = 0; if((cur - start) ...
ALGO
0.999834
4.316988
{ "github_metadata": { "branch": "master", "commit_count": 2393, "repo_created_at": "2020-03-10T13:02:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1f598...
bbbc896c-d409-4a01-be05-fb2135d41b64
coolguy1842/adventofcodeold
2022/days/day4.h
#ifndef __DAY4_H__ #define __DAY4_H__ #include <day.h> #include <util.h> class Day4 : AOC::Day { public: static const int dayNum = 4; static const bool hasSecondInput = false; using AOC::Day::Day; unit partASolution = 0; unit partBSolution = 0; bool overlaps(int position, int min, int max) ...
ALGO
0.998553
5.098679
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2022-12-01T06:26: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": "fe10e6629...
e7776b1f-e4ac-43e5-9ef0-31b137407981
jimwwalker/jww_tools
trie_in_cpp/trie.h
/** Container style Trie implementation (C++) with specialisation for the main use-case, char <NAME> (<EMAIL>) **/ #include <string> #include <unordered_map> #include <vector> #include <memory> #include <mutex> #include <array> #include "utilities/trienode.h" template <typename Container, typename Conta...
ALGO
0.923757
6.224671
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2014-10-07T08:51: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": "110e960915...
ffed8d1a-04a6-4cb5-94bc-914f7e852c46
ukoloff/orazaev
edu/shad/cxx/dz1/aorazaev_z2.cpp
/* * C++ homework. Problem 2. * * Due date: 04.09.12 * * Author: <NAME> */ #include<iostream> #include<cstdlib> #include<cmath> #include<stdexcept> int gcdex(int a, int b, int & x, int & y) { if (a == 0) { x = 0; y = 1; return b; } int x1, y1; int d = gcdex(b%a,...
TEST
0.994657
5.133366
{ "github_metadata": { "branch": "master", "commit_count": 577, "repo_created_at": "2017-09-20T19:23: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": "afdedf4b...
8e9362b9-eda6-49a8-9d27-b58b494b9360
PoppyDory/CPlusPlusArray2
superArray.cpp
#include <iostream> using namespace std; // create int *aggiungiInFondo(int base[], int lunghezza, int nuovo) { int lunghezzaNuovo = lunghezza + 1; int *arrayNuovo = new int[lunghezzaNuovo]; for (int i = 0; i < lunghezzaNuovo; i++) { arrayNuovo[i] = base[i]; } arrayNuovo[lunghezza] =...
ALGO
0.99866
4.841477
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-03-06T13:27: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": "20bb885c810f...
104db8cb-1cb0-4beb-bfdc-cbb57e94e852
jovinlidan/competitive-programming
CodeForces/GNU C++17/1426C | Increase and Copy/96344266.cpp
#include <bits/stdc++.h> #define mxN 10000005 #define INF -1e9 typedef long long int ll; using namespace std; int n; //int dp[mxN] = {}; //int solve(int mx, ll total) //{ // if(dp[mx] != -1)return dp[mx]; // if(mx >= mxN)return -1e9; // //cout << mx << '\n'; // if(total >= n)return 0; // int val = 1e9;...
ALGO
0.999905
3.811983
{ "github_metadata": { "branch": "main", "commit_count": 1714, "repo_created_at": "2024-01-04T04:41: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": "d64c2514b...
1cc53009-d46a-4eab-ac9a-48b513f694a2
kephale/Physics-Abstraction-Layer
example/begin.cpp
#include <stdio.h> //for our old friend, the printf function #include "pal/palFactory.h" #include "pal/ConfigStatic.h" int main(int argc, char *argv[]) { #ifndef PAL_STATIC PF->LoadPALfromDLL(); //use this if you wish to load PAL from .dll or .so //otherwise, we can staticly link in an implementation by include the ...
ALGO
0.97029
3.854333
{ "github_metadata": { "branch": "master", "commit_count": 543, "repo_created_at": "2011-10-31T17:18:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "297ff7d5...
6ead9a31-f730-49d2-b855-0c43c227ac85
dylanhdy/codebase
Contest_ACM/ICPC2020 南京/M.cpp
#include <cstdio> #include <algorithm> #include <cmath> #include <map> #include <cstring> #include <queue> #include <vector> #define LL long long #define LD long double #define MAXN 2005 #define MAXM #define P #define MP make_pair #define PB push_back #define INF 1e18 using namespace std; int T, n, p[MAXN], siz[MAXN],...
ALGO
0.999871
3.305643
{ "github_metadata": { "branch": "master", "commit_count": 235, "repo_created_at": "2019-02-15T12:37:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99f2f0ca...
cd277e1b-56aa-4511-a9c3-b9242eae4750
PIPIKAI/ACM
botzone/扫雷AI.cpp
#include <bits/stdc++.h> //#include "jsoncpp/json.h" #define MAX_WIDTH 80 #define MAX_HEIGHT 40 using namespace std; int fieldHeight, fieldWidth, mineCount; int mineField[MAX_HEIGHT][MAX_WIDTH]; // 下标:【行(row)】【列(col)】 // 0-8:数字 // 9:雷 // 10 / A:未点开 int main() { int row, col; // 初始化随机数产生器 srand(time(0)); // 读取平...
ALGO
0.922016
4.101994
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2019-08-07T05:39: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": "62c25eccd...
688783d2-f0d1-4e99-946d-a40d3dc1bf9f
codersyl/leetcode
cpp/cpp_10-99/35.cc
// C++ // leetcode 35 // https://leetcode-cn.com/problems/search-insert-position/ // 思路: // 二分法,稍微改了一下,mid 不用+1 -1 了,这样判定条件就要放宽一点 // left == right 或者 left + 1 == right都要进行最终审判 class Solution { public: int bisearch(vector<int>& nums, int left, int right, int target){ while(left <= right) { if(left +1 >= right) ...
ALGO
0.999989
5.905726
{ "github_metadata": { "branch": "main", "commit_count": 138, "repo_created_at": "2021-06-23T05:02: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": "854b1da6b1...
e795a845-dde3-4caa-8d66-02a398c36e70
trannguyenhan/workspace-algorithms
KTLT/lab5/bai9.cpp
#include <bits/stdc++.h> using namespace std; typedef struct { int x, y, z; } block; int n; block a[100]; int maxh[100]; void input(){ cin >> n; if (n == 0) exit(0); int x, y, z; for (int i = 1; i <= n; i++){ cin >> x >> y >> z; a[3 * i - 2].x = x; a[3 * i - 2].y = y; ...
ALGO
0.999772
3.822568
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2020-09-08T02:54:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 90, "forks": 46, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c71b7a0...
d7027771-13f0-47b3-b5bf-2afff69a01b5
inder128/CompetitiveProgramming
Team/virtual-11/A.cpp
#include <bits/stdc++.h> using namespace std; #define rng(x) x.begin(), x.end() #define maxi(x, y) x = max(x, (y)) #define mini(x, y) x = min(x, (y)) #define pb push_back #define F first #define S second #define el '\n' #define int long long #define SZ(x) ((int)(x).size()) template<typename T> istream&operator>>(ist...
ALGO
0.999911
4.907819
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2020-08-09T00:35:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a4c64088...
bdfe6b5b-441e-40f3-aa2c-bbfe4a25cebd
VasishtaShastry/5-5-minesweeper
mines.cpp
#include<math.h> #include<GL/glut.h> #include <stdio.h> #define NxN_MineSweeper 5 #define TOTAL_BOXES (NxN_MineSweeper * NxN_MineSweeper) #define BOX_WIDTH 35 #define BOX_HEIGHT BOX_WIDTH typedef enum { GAME_NOT_STARTED, GAME_OVER, GAME_WON, GAME_QUIT, GAME_INPROGRESS, } status_t; t...
ALGO
0.993507
4.034604
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2014-04-25T16:35:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4fd3a612d...
19832cd8-a0f0-4c56-a5e8-a91acc485a62
vermagaurav8/Algo-DS-Notes
AmazonTestSeries/Stack/EvalPostfix.cpp
//{ Driver Code Starts // C++ program to evaluate value of a postfix expression #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to evaluate a postfix expression. int evaluatePostfix(string S) { // Your code here stack <int> val; ...
ALGO
0.999178
5.777777
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2020-04-26T10:20:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "454a558e...
852e321e-6e33-427d-8a79-c036d7540f61
zhou13/bug-fixer
network-science/data/algo_c.cpp
// For Network Science 2013 // Algorithm Demo // // <NAME> // 2013.06.24 // #include <iostream> #include <cstring> #include <cstdlib> #include <cstdio> #include <vector> #include <cmath> using namespace std; const int MAXN=6010; const int MAXM=30010; const int INTERVAL=20; const int num=20; const double c_eta=2000.; ...
ALGO
0.998242
3.71033
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2015-05-11T15:22: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": "579e8c1f...
fed63b90-0946-40d3-9fc0-0e5363590215
choijaewon323/PS
프로그래머스/3/131129. 카운트 다운/카운트 다운.cpp
#include <string> #include <vector> #include <algorithm> #include <utility> using namespace std; #define INF 1000000000 #define MAX 100000 vector<int> scores = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14, 15,16,17,18,19,20,21, 22,24,26,27,28,30,32,33,34,3...
ALGO
0.99941
4.045038
{ "github_metadata": { "branch": "master", "commit_count": 829, "repo_created_at": "2021-09-04T02:57: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": "f5862e54...
1abbc452-f133-4a65-a78a-bf0e53a33bda
AlgoMorgo/2021PS
210208/2933_신동윤.cpp
/* BOJ 2933 미네랄 https://www.acmicpc.net/problem/2933 */ #include <bits/stdc++.h> #define MAX 101 #define INF 987654321 using namespace std; int R, C, N; int dy[4] = {-1, 1, 0, 0}; int dx[4] = {0, 0, -1, 1}; char adj[MAX][MAX]; bool visited[MAX][MAX], air[MAX][MAX]; // 공중에 떠있는 미네랄 체크를 위한 변수 vector<int> stic...
ALGO
0.999884
4.336698
{ "github_metadata": { "branch": "main", "commit_count": 366, "repo_created_at": "2020-12-31T15:26:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88d6cd65d54...
d0f5f451-621f-41ca-995e-e2204dff1b5a
valerii-martell/Parallel-Programming
2_Threads_Synchronization_Problems/MPI/MPIthreads.cpp
/// <summary> /// Programming for parallel computer systems /// Laboratory work #8. MPI /// <NAME> /// NTUU "KPI" /// FICT IO - 41 /// 06.06.2017 /// Task: A=max(Z)*B + d*T*(MO*MK) /// /// Main file /// </summary> #include "stdafx.h" #include <iostream> #include <windows.h> #include "mpi.h" using namespace std; //S...
ALGO
0.998994
3.20693
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2016-09-21T20:22: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": "52bb2e6d1...
c8f91107-af7c-4b02-ac70-013d7e2cc146
eltonvs/LP1-warming-list
36_vector_sum.cpp
/* * Copyright 2016 - <NAME> * * Question: * Considerando a estrutura (com typedef) * typedef struct _Vetor { * float x; * float y; * float z; * } Vetor; * para representar um vetor no ponto no R³, implemente uma função que calcule a soma * de dois vetores. Essa função deve obedecer o p...
ALGO
0.990776
5.645257
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2016-02-02T13:07: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": "6ad53309f...
33f29c8c-92f3-4681-9b1f-22a1e0f2abb2
Arslanarsal/CSES-Solutions
Graph Algorithms/_33_Download_Speed.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define int long long #def...
ALGO
0.999933
4.507633
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-05-14T19:06:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b165bef9847...
357518de-93b7-4cc4-b98c-5563364efb28
thecodingwizard/competitive-programming
Codeforces/CF866D - Buy Low Sell High.cpp
/* * https://usaco.guide/adv/slope */ #include <bits/stdc++.h> using namespace std; using ll = long long; #define ii pair<int, int> #define f first #define s second #define pb push_back #define mp make_pair #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() #define F0R(i, n) for (int i = 0; i < n; i++) ...
ALGO
0.999939
4.29355
{ "github_metadata": { "branch": "master", "commit_count": 946, "repo_created_at": "2018-11-29T17:03:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 83, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f46d85...
fa5bd3fa-699e-4dcf-80b1-67de4fafc4ab
Simhyunjeong16/Algorithm
programmers/[2018 KAKAO BLIND RECRUITMENT] (1차) 다트게임.cpp
#include <string> #include <vector> #include <math.h> #include <iostream> using namespace std; int solution(string dartResult) { int answer = 0; int x; int result; int n = 0;//다트를 진행한 게임수 vector<int> v; int num = 0;//0~9와 10을 구분하기 위해서 for(int i=0; i<dartResult.size(); i++){ ...
ALGO
0.999546
4.334732
{ "github_metadata": { "branch": "master", "commit_count": 556, "repo_created_at": "2020-03-22T11: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": "4ad55b4a...
f9e64b6d-dcba-4962-ac79-dfb389406672
Ahsanul24/My-Codes
B_Keep_it_Beautiful.cpp
// IN THE NAME OF ALLAH // Coded by <NAME> #include<bits/stdc++.h> using namespace std; typedef long long int ll; const int MOD = 1000000007; #define pb push_back #define vi vector<int> #define vl vector<ll> #define f first #define s second #define nl '\n'; #define bit(a) __builtin_popcountll(a) #define w(x) while (x-...
ALGO
0.999998
3.582773
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-24T11:20: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": "9ebb52ecd270...
0818c6dd-2ac6-45e1-b18d-76b75a990bd5
vfolunin/archives-solutions
ACMP/1282.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int studentCount; cin >> studentCount; map<string, int> nameCount; int maxNameCoun...
ALGO
0.998547
4.411273
{ "github_metadata": { "branch": "master", "commit_count": 2367, "repo_created_at": "2017-11-27T10:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "68b9cfa...
40b3af08-5dbb-42a6-b41a-ddec90f4b522
prakhardg/Important-coding-questions
Microsoft/Ease the array.cpp
/* Given an array of integers of size N. Assume ‘0’ as invalid number and all other as valid number. Write a program that modifies the array in such a way that if next number is valid number and is same as current number, double the current number value and replace the next number with 0. After the modification, re...
ALGO
0.999952
3.701259
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2018-07-17T05:58: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": "672518aea...
268ee449-f61a-454c-aa17-1732f9395572
TrisMask/TSC
main.cpp
#include <pcl/point_types.h> #include <pcl/point_cloud.h> #include <pcl/common/transforms.h> #include <Eigen/Core> #include <nanoflann.hpp> #include <array> #include <opencv2/opencv.hpp> #include <queue> #include <algorithm> struct Color3 { float r, g, b; float &operator[](int idx) { if (idx == 0) return r;...
ALGO
0.996618
5.74725
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-25T05:50: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": "ddc8752ea59d...
9d9cc3de-62e7-47fd-aea0-14fcce2811bc
AnilChalia/CPP-codes
BinarySearchTree2.cpp
#include<bits/stdc++.h> using namespace std; // intialize class of bst class Node{ public: int data; Node* left; Node* right; Node(int data){ this -> data = data; this -> left = NULL; this -> right = NULL; } }; // INsert in BST Node* InsertInBST(Node* &root,int data){ if( root == NULL ) { ...
ALGO
0.999977
4.825191
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-07-15T07:45:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0db5e0663fb...
a5454288-6ffa-4183-9a1f-6e75a136cb01
toshiya1015programmer/compro
src/atcoder/abc228/f.cpp
#include <bits/stdc++.h> #include <atcoder/all> #define rep(i, n) for (int i = 0; i < (int) (n); i++) #define reps(i, n) for (int i = 1; i <= (int) (n); i++) #define popcount __builtin_popcountll using namespace std; using namespace atcoder; using S = long long; S op(S a, S b) { return max(a, b); } S e() { return 0ll;...
ALGO
0.990085
3.945122
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2021-11-03T20:29:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0273d507b1...
3721da52-7248-43fc-88db-bc0636c91986
KevinInzu/Heart-Rate-Watch
Proto_4_26/ScrollingWindow.h
#include <iostream> #include <deque> #include <cstdlib> #include <algorithm> #include <vector> using namespace std; // deque<int> window1; // int window_size1 = 4; // int threshold1 = 4; //////////////////////////////////////////////////////////////// ////Prototypes //////////////////////////////////////////////////...
ALGO
0.999372
5.343366
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-02-13T18:04: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": "590a0b60b6e...
ddc567ac-be7f-4674-9db7-328cbec5b8bd
lucasbrun196/beecrowds
o_rato_no_labirinto.cpp
#include <iostream> #include <vector> #include <map> #include <queue> #include <utility> using namespace std; #define INF 0x3F3F3F3F map<string, vector<string> > g; int dijkstra(string src, string dest){ map<string, int> distances; for(auto e:g) distances[e.first] = INF; queue<pair<int, string> > pq; ...
ALGO
0.999873
3.801467
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2024-07-10T04:15:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95361bab1...
1299ad29-4856-445c-9ac3-6617640b5cf0
ThiagoFBastos/programacao-competitiva
beecrowd/1744 - Pedras Pretas e Brancas.cpp
#pragma GCC optimize("O3,unroll-loops") #pragma GCC target("sse,sse2") #include <bits/stdc++.h> using namespace std; int main() { ios_base :: sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; long long **f, A, B; string S; vector<int> b; cin >> A >> B >> S; n = S.size(); for(int i = 0; i < n; ++i) if...
ALGO
0.999912
3.632509
{ "github_metadata": { "branch": "main", "commit_count": 850, "repo_created_at": "2023-12-14T19:47:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f38811493d...
288accc9-6e19-46c2-90df-a39a833beca8
LineageOS/android_hardware_nxp_nfc
snxxx/halimpl/utils/phNxpConfig.cc
/****************************************************************************** * * Copyright (C) 2011-2012 Broadcom 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: * ...
CONFIG
0.945457
4.811929
{ "github_metadata": { "branch": "lineage-19.1", "commit_count": 1399, "repo_created_at": "2018-08-10T17:28:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3...
31a4ad98-321c-4bc7-bd60-6b25ec977af9
maksonchik20/algo_templates
геометрия/точка в углу.cpp
/* Code By maksonchik20 */ #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const ll MOD = (ll) 1e9 + 7; const ld EPS = 0.00000000001; const ll INF = (ll) 1e18; const ld PI = 3.141592653589793238462643383279502884; struct point { ll x, y; point() { x = 0;...
ALGO
0.999939
4.305876
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-06-01T11:04: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": "8ad0371492...
0f7e946e-5a1a-4f52-9d0e-35408f3a0b2f
BillZhou233Cute/CSP-S-2020JX
answers/JX-00114/zoo/zoo.cpp
#include <cstdio> #include <iostream> using namespace std; typedef long long ll; const int L = 63; const int __ = 63 + 7; int n, m, C, K; bool exi[__], b[__]; ll gi() { ll x = 0; char c = getchar(); while (!isdigit(c)) c = getchar(); while (isdigit(c)) x = (x << 3) + (x << 1) + c - '0', c = getchar(); retu...
ALGO
0.999924
3.98845
{ "github_metadata": { "branch": "default", "commit_count": 3, "repo_created_at": "2020-11-09T04:37:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2883b1408...
ddccfc74-91fb-4ff8-89cf-993f3ee40fd3
axelu/leetcode
cpp/02000-02499/brightestpositiononstreet.cpp
// 2021. Brightest Position on Street // https://leetcode.com/problems/brightest-position-on-street/ // see also 2237. Count Positions on Street With Required Brightness // https://leetcode.com/problems/count-positions-on-street-with-required-brightness/ class Solution { void update(map<int,int>& arr, int l, ...
ALGO
0.999984
5.854471
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2021-04-08T21:22: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": "a7fca6154d5...
8d054ff5-4d3f-433a-9c83-9021a6a58ee7
ayushatindra/Searching-and-sorting
Searching and sorting week4/level1.cpp
#include <iostream> using namespace std; int BinarySearch(int arr[], int size, int key) { int start = 0; int end = size - 1; int mid = start + (end - start) / 2; while (start <= end) { mid = start + (end - start) / 2; if (arr[mid] == key) { return mid; } else { if (key > arr[mid]) { ...
ALGO
0.999909
3.506407
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T10:16: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": "cd03affc4d84...
0472732e-7ea8-495c-8d85-f19132042e00
Redleaf23477/ojcodes
codeforces/edu84/E2.cpp
// by redleaf23477 #include <bits/stdc++.h> // iostream macros #define endl '\n' #define var(x) "[" << #x << "=" << x << "]" // chrono macros #define chrono_now std::chrono::high_resolution_clock::now() #define chrono_duration(t1, t2) std::chrono::duration<double>(t2-t1).count() #define chrono_rand_seed chrono_now.tim...
ALGO
0.999255
3.833063
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2017-10-19T06:38: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": "85ebb17a...
916df01e-e2b2-4096-be05-c4e2f8bc7cfd
IamXDD1/OOP_Cpp
正課/Week10/TS1002/main.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <map> using namespace std; void DFS(char grid[4][4], map<pair<int, int>, bool> check, string& word, string tmp, int x, int y, bool& find, int index); int main() { fstream file; for (;;) { file.open("words.txt"); if (file) { ...
ALGO
0.999028
4.127734
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-09-12T06:57: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": "078edb05edd5...
93a60852-028f-472f-8241-258eaaa7faa7
MCKG-L/codes
算法模板/00经典题/06数学/组合数的奇偶.cpp
#include <bits/stdc++.h> #define int long long #define endl '\n' using namespace std; using i128 = __int128; typedef pair<int,int> PII; using ll = long long; const int N = 2e6 + 10,mod = 998244353,inf = 1e18; /*2025ICPC-HeNan_G 求满足l<=a<=b<=r中,C(b,a)是奇数的个数 由卢卡斯定理:C(a,b) = C(a%2,b%2)*C(a/2,b/2)可知:在mod2的意义下 C(a,b)的值即为a、b的...
ALGO
0.999972
4.68842
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-07-25T07:49: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": "f0fd5199d753...
1f2f2ddb-e45f-4084-a06e-81bb684c79a4
siddharthav19/CSES-problemset
DP/3.cpp
#include <bits/stdc++.h> typedef long long int ll; using namespace std; int mod = 1e9 + 7; vector<int> dp; // this mod operation is very heavy so do // if(ways >= mod) ways = ways - mod; // instead of ways = ways % mod; ll solve(vector<int> &nums, ll sum, ll tar) { if (sum >= tar) return sum == tar; ...
ALGO
0.999943
4.709236
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-06-18T19:05:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3583f21e2bb...
b3126db3-3343-4964-874d-7bd4f3d4fa6b
DyogoBendo/cp
cf/960-div2/c.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long void solve(){ int n; cin >> n; vector<ll> a (n); vector<int> b(n); ll soma = 0; for (size_t i = 0; i < n; i++) { cin >> a[i]; soma += a[i]; b[i] = a[i]; } int k = 0; while(k < n){ ...
ALGO
0.999908
3.824435
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2024-12-23T14:07: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": "cd3f7dd63b...
a9a208a6-6159-4235-a435-d0d8eab30873
UNSWComputing/rUNSWift-2022-release
robot/motion/generator/GetupGenerator.cpp
#include <fstream> #include <limits> #include <cctype> #include <unistd.h> #include <limits.h> #include <sstream> #include "motion/generator/GetupGenerator.hpp" #include "utils/Logger.hpp" #include "utils/angles.hpp" #include "utils/speech.hpp" #include <boost/algorithm/string.hpp> #include "../MotionDefs.hpp" using n...
TOOL
0.900376
5.933302
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-11T08:27:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "cba33c29e0747...
02442b6f-1502-4d93-bd66-580b882cfe5c
paultag/aresay
src/RSACommon.cc
/* RSA common routines * Copyright (c) 2011, <NAME> <<EMAIL>> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. ...
ALGO
0.977042
5.856858
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2011-10-25T18:09:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2bc018ca...
3265baa0-4f3d-475d-a2af-5ac488183242
sarthaksri/cpp
quickSort.cpp
#include <iostream> using namespace std; int partition(int arr[], int s, int e) { int pivotIndex, c=0, i,j, pivot = arr[s]; for(i=s+1; i<=e; i++) { if(arr[i] <= pivot) c++; } pivotIndex = s+c; swap(arr[s], arr[pivotIndex]); i = s; j = e; while(i<pivotIndex && j>pivo...
ALGO
0.999975
5.610935
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-10-02T13:12: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": "bccf014d997...
dc11d152-57f3-4a1b-8e47-64e1d7219d60
AmazingCaddy/acm-codelab
PKU/pku_2533(LIS).cpp
#include <cstdio> #include <iostream> #include <cmath> #include <complex> #include <algorithm> #include <cstring> #include <queue> using namespace std; const int maxn = 1003; int len, n, d[maxn], a[maxn]; int bin_search( int k ) { int l = 1, r= len - 1, mid; while( l <= r ) { mid = ( l + r ) >> 1; if( d[mid] < ...
ALGO
0.999803
3.813158
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2013-11-28T15:42:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f149b198...
51ec515e-5339-410a-88b7-ee39c454909f
lld2006/my-c---practice-project
286/score.cpp
#include <cmath> #include <cstdio> #include <vector> #include <cassert> #include <cstdlib> using namespace std; //lesson1, be careful about assignment, sometimes some of the operation in the loop will //modify the value in the array, if that is the case, we need to use += instead of =; //lesson2, when we have an if cla...
ALGO
0.999286
3.712096
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2011-11-04T04:05: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": "cbb2800c7...
e7c39bc9-1195-461c-8fac-c7842c08a283
shashvatms/Data-structure-and-algorithm-Coding-ninjas
recursion/Number of digits.cpp
Number of digits Easy Score 80/80 Average time to solve is 20m Problem statement Send feedback You are given a number 'n'. Return number of digits in ‘n’. Example: Input: 'n' = 123 Output: 3 Explanation: The 3 digits in ‘123’ are 1, 2 and 3. Detailed explanation ( Input/output format, Notes, Images ) ...
ALGO
0.999634
5.036386
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2023-12-26T12:00:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9bd42bb3a0...
ae554075-1ec1-4d66-831c-9ba7dbf1b18b
BryanValeriano/marathon
codeforces/edu24/b.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define eb emplace_back #define mk make_pair #define fi first #define se second #define cc(x) cout << #x << " = " << x << endl #define ok cout << "ok" << endl #define endl '\n' typedef long long ll; typedef pair<int,int> ii; const int INF = 0x3f3f3f3...
ALGO
0.999993
3.597323
{ "github_metadata": { "branch": "master", "commit_count": 188, "repo_created_at": "2018-07-19T13:13:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7230d22...
817ddf44-2723-429e-ad66-bd392e19c55a
SONIT-RAJ/CP_Codeforces
1831B.cpp
/* Author: <NAME> created: 02:02:29 28-03-2025 */ #include<bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("avx,avx2,fma") #define ll long long #define int long long #define rep(i,a,b) for(int i = a; i<b; i++) #define rew(x) for(int i = 0; i<x; i++) #define a...
ALGO
0.999888
4.517498
{ "github_metadata": { "branch": "main", "commit_count": 132, "repo_created_at": "2025-03-13T07:39:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4ad050f60...
31c443e6-58af-49ed-9ca3-277ffee84a4d
parklicoste/leetcode_75
problem_208.cpp
/* Leetcode 75 208. Implement Trie (Prefix Tree) */ /* ------ Approach 1 ---- */ /* Making Trie Data Structure */ class Trie { public: struct TrieNode{ TrieNode *child[26]; bool end; }; TrieNode* root; TrieNode* makeNode(){ TrieNode* node = new TrieNode(); node->end...
ALGO
0.999969
6.388885
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-12-25T02:40: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": "e8e93f46dc1...
cb68a9f8-5931-4219-b64c-c69f5f4ea21b
jefft255/TargetlessForestRegistration
src/PairOfStemGroups.h
/*************************************************************************** * Copyright (C) 2017 by <NAME> * * <EMAIL> * * * * This program is free software; you can ...
ALGO
0.990824
6.531763
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2016-07-26T18:04:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1b9dc57...
beb933ad-e43e-4879-9f69-e8a1b16c3bba
kkeyan931/cpp-practice
Graph/dijkstra.cpp
#include <bits/stdc++.h> using namespace std; struct edge { int to; int weight; edge(int to, int weight) : to{to}, weight{weight} {} }; struct comp { bool operator()(const pair<int, int> &a, const pair<int, int> &b) const { return a.second > b.second; } }; void dijkstra(map<int, li...
ALGO
0.999967
4.250882
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-07-13T19:29:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "244524019ca0...
bd774cf3-7de3-4e1c-a8df-cd5af417e1dd
takefekat/Competitive-programming
AtCoder/abc166/E/main.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vecll; void solve(long long N, std::vector<long long> A) { map<ll, ll> plus, minus; for (ll i = 0; i < N; i++) { if (plus.find(A[i] + i + 1) == plus.end()) plus[A[i] + i + 1] = 1; else ...
ALGO
0.999991
4.169363
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2020-06-17T12:48:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f338b0ae1...
fc5738dd-1faa-448e-80d3-564356a23265
Hngdcmnh/Algo-Second-Year
do xau cay nhi phan tim kiem.cpp
#include<bits/stdc++.h> using namespace std; typedef struct Node{ int infor; Node* left; Node* right; }* Tree; Tree root; void Init(Tree &root){ root = NULL; } bool isLeft(int val, Tree root){ if (val<root->infor) return true; return false; } bool isRight(int val, Tree root){ if (val>root-...
ALGO
0.999897
4.604531
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-07-20T14:28:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "820dc5a1ec4a...
91eb7b6e-acb4-4fc6-a947-36f0755f77b4
google-deepmind/open_spiel
open_spiel/examples/imperfect_recall_mccfr.cc
// Copyright 2021 DeepMind Technologies Limited // // 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 l...
TEST
0.917858
6.427804
{ "github_metadata": { "branch": "master", "commit_count": 4660, "repo_created_at": "2019-07-22T13:50:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4631, "forks": 1006, "issues": 17, "pull_requests": 6 }, "file_meta": { "content_id": "6...
fd492d79-1485-4f34-be68-cc833b037bd0
ishandutta2007/codeforces-q
qwerasdfzxcl/normal/1440/C1.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; int matrix[102][102]; int ansx[200002]; int ansy[200002]; int ans=0; int pt=0; void ap(int t1, int t2, int sx, int sy){ //printf("%d %d %d %d\n", t1, t2, sx, sy); for (int i=0;i<3;i++){ ansx[pt]=sx+(t1%2)+1; ansy[pt]=sy+(t2%2)...
ALGO
0.999575
3.039989
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:56: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": "ef19e19ee659...
3931b694-a1af-45e3-8cf1-b7c92cccd964
Mulab11/cntt2016-hw1
TC-SRM-571-div1-500/linkct.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int LL; const int MAXN = 55; class MagicMolecule{ public: int u[MAXN * MAXN], v[MAXN * MAXN], n, mx, m; vector <int> val; int dfs(int dep, LL st, int rm, int sum){ if(rm > mx) return -1; if(dep > m) return sum; if(bool(st & (1LL << u[dep])) && bo...
ALGO
0.99992
4.054573
{ "github_metadata": { "branch": "master", "commit_count": 4450, "repo_created_at": "2016-09-28T13:04:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 28, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "135ba...
05d5e403-c191-4d3b-85a0-e6af69ee1a04
guricerin/procon-solutions
aoj/alds1/alds1-12-b.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (int)(b); i++) #define rrep(i, a, b) for (int i = (a); i >= (int)(b); i--) #define all(x) (x).begin(), (x).end() using i32 = int32_t; using i64 = int64_t; using f32 = float; using f64 = double; using P = pair<int, int>; templat...
ALGO
0.999927
4.12698
{ "github_metadata": { "branch": "master", "commit_count": 290, "repo_created_at": "2019-05-05T13:19: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": "f8fea57c...
e55ffcba-fe38-4f1a-8034-08894d2e7358
ramjirathore/dsa-codes
Binary Tree/lowest_common_ancestor.cpp
#include<iostream> using namespace std; // Find least common ancestor of two nodes // Intution -- we see that one node lie in the left subtree and one lie in right one // Another case is when one is root itself ie LCA and the other is child // So basically we try to search nodes in both left and right subtree clas...
ALGO
0.999989
3.793895
{ "github_metadata": { "branch": "master", "commit_count": 291, "repo_created_at": "2020-10-22T20:34:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "171a5ba2...
47bbd8d3-bda2-41d6-b8c8-62be3e4f5a7a
MyWurger/5.15.--Maximum-matching-and-bipartite-graph
Lab11.cpp
/******************************************************************************** * Л А Б О Р А Т О Р Н А Я Р А Б О Т А №11 З А 5 С Е М Е С Т Р С + + * *------------------------------------------------------------------------------* * Project Type : Win64 Console Application ...
ALGO
0.998579
4.678826
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-01-27T10:05:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e50f8578ca...
3a87ef06-3fa0-40fc-a38c-8047782210c1
fbardelli/compsci
euler/074/chain.cpp
#include <iostream> #include <map> #include <vector> using namespace std; int fact[10]; int factorial(int); int countChain(int, map<int,bool> &seen,map <int,int> &cache); int main(){ //int fact[10]; int sixtyTerms = 0; int max = 0; int maxTerm = 0; for(int i = 0; i < 10; i++){ //cout << "fac...
ALGO
0.999327
4.014423
{ "github_metadata": { "branch": "master", "commit_count": 266, "repo_created_at": "2014-03-14T02:16: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": "b2eb3e7f...
044b2929-2c7e-46bb-bd68-f0a3e51ba5c4
kkcookies99/UAST
Dataset/Leetcode/train/67/436.cpp
class Solution { public: string XXX(string a, string b) { int size_a = a.size(),size_b=b.size(); char temp = '0',temp1='0'; int max = size_a > size_b ? size_a : size_b; int k = max + 1; vector<char> s(k,' '); string c = ""; while (size_a--&&size_b--) { temp = a[size_a] + b[size_b]-'0'+temp1-'0'; ...
ALGO
0.999984
4.572489
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-03-29T14:30:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "0ffe1861444...
3d0e57fb-e001-4f8c-ad45-1541cda19f0a
allpix-squared/allpix-squared
src/modules/DepositionCosmics/cry/CRYPrimary.h
/* Copyright (c) 2007-2012, The Regents of the University of California. Produced at the Lawrence Livermore National Laboratory UCRL-CODE-227323. All rights reserved. For details, see http://nuclear.llnl.gov/simulations Please also read this http://nuclear.llnl.gov/simulations/additional_bsd.html Redistribution and ...
ALGO
0.997104
6.076919
{ "github_metadata": { "branch": "master", "commit_count": 9185, "repo_created_at": "2018-06-11T12:07:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11, "forks": 22, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "eba965...
7548b723-9539-4117-b15d-78b802984d88
noahyzhang/IT-
算法与数据结构/快速排序.cpp
#include<iostream> #include<vector> #include<algorithm> void Print(std::vector<int>& vec) { for (auto e : vec) std::cout << e << ' '; std::endl(std::cout); } int RandomInRange(int start, int end) { return rand() % (end - start) + start; } int Partition(std::vector<int>& vec, int start, int end) { if (vec.empty...
ALGO
0.999639
5.67218
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-05-14T12:54: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": "18884382b...
da79bc14-dc36-4874-9a5d-f9d5ade812f1
Shakleen/Competitive-Programming-Codes
Algorithms/Top Sort/Topsort Kahn's Algorithm.cpp
#include <iostream> #include <vector> #include <list> #include <queue> using namespace std; class Graph{ list <int> *adj; // Adjacency list for storing node relation int Nodes; // Number of total nodes in the Graph public: Graph(int NodeNo); // Constructor to initialize the graph object voi...
ALGO
0.999988
5.484007
{ "github_metadata": { "branch": "First-Branch", "commit_count": 23, "repo_created_at": "2018-01-27T12:47: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": "7e1...
9c377b08-e446-4244-9286-fb0c10443c4d
sumba101/InternshipKnowledge
SampleCodes/BellmanFord.cpp
// // Created by spawnfire on 17/05/21. // #include <bits/stdc++.h> using namespace std; class Graph{ vector<vector<pair<int,int>>> e; int size; public: Graph(int v){ size=v; e.resize(v); } void add_edge(int u,int v,int w){ e[u].emplace_back(make_pair(v,w)); } vecto...
ALGO
0.999954
4.333099
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-06-02T10:55: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": "0f16a207fc...
c64aca57-ac45-40c3-b195-a3895dc4a7a7
Abdelfattah-Mohamed/LeetCode-Blind-Curated-75
solutions/19. Remove Nth Node From End of List.cpp
/** * Definition for singly-linked list. * struct ListNode { *     int val; *     ListNode *next; *     ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public:    ListNode* removeNthFromEnd(ListNode* head, int n) {        if(!head) return head;        ListNode *x = head, *y = head;        wh...
ALGO
0.999983
5.899396
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2020-03-31T00:49:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa88a3c...
b199e6d9-2f23-4df1-a038-327c063e66e9
Sanchitagarwal7/Problem-Solving
Trees 4 & 5/Boundary-Traversal-of-Binary-Tree.cpp
#include<bits/stdc++.h> using namespace std; void leftT(TreeNode<int>* root, vector<int> &res){ //base case if(root==NULL || (root->left==NULL && root->right==NULL)){ return ; } res.push_back(root->data); if(root->left) leftT(root->left, res); else leftT(root->right, re...
ALGO
0.999983
4.714107
{ "github_metadata": { "branch": "main", "commit_count": 141, "repo_created_at": "2024-03-08T14:47:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "021601b152...
4bcb3cf6-492b-406d-a90f-6cd9465243f0
turneja123/competitive-programming-library
Problem/Dynamic Programming/Maximum Strength of K Disjoint Subarrays.cpp
//https://leetcode.com/contest/weekly-contest-388/problems/maximum-strength-of-k-disjoint-subarrays/ class Solution { public: long long maximumStrength(vector<int>& nums, int k) { long long INF = 1e18; int n = nums.size(); vector<vector<long long>> dp(n, vector<long long>(k + 1, -INF)); ...
ALGO
0.999977
5.631557
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2024-03-11T08:36:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bdd08c23...
4ffae663-d8ce-4cd8-a59e-54b0b71a28d3
SriramPingali/CSE-IIT-Patna
Sem-6/CS342 - Operating System Lab/Mid-Sem Archive/Maheeth_2021_Solns/midsem-q3.cpp
/* Name: <NAME> Roll: 1801CS31 Operating Systems Lab - Midsem Assignent Question 3 Priority Preemptive Scheduling Algorithm */ #include <bits/stdc++.h> using namespace std; // structure to store ID, Priority, times for processes: Arrival, Burst, Start, Completion, Turn Around, Wai...
ALGO
0.999943
5.203377
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2022-03-11T14:24:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 28, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "92c4905...
a9acf9f0-3383-407a-aa5e-53f93feb1745
ownlifeful/Blackjack
Quiz_6_exercise_6/main.cpp
// // main.cpp // Quiz_6_exercise_6 // // Created by <NAME> on 12/17/16. // Copyright © 2016 <NAME>. All rights reserved. // #include <iostream> #include <array> enum CardRank { RANK_2, RANK_3, RANK_4, RANK_5, RANK_6, RANK_7, RANK_8, RANK_9, RANK_10, RANK_JACK, RANK_QUE...
ALGO
0.943482
5.282379
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-12-23T12:38:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "700fe4bf3b...
0fd62444-03b3-4b63-a28e-e7e58ad39412
lisongqiu/POJ
HW3_F_棋盘分割/HW3_F_棋盘分割/main.cpp
#define _CRT_SECURE_NO_DEPRECATE #include<cstdio> #include<iostream> #include<algorithm> #include<string.h> using namespace std; #define INF 0x3f3f3f3f #define SIZE 8 #define MAXN 15 int N; int map[SIZE][SIZE]; long long dp[MAXN][SIZE][SIZE][SIZE][SIZE]; int main() { scanf("%d", &N); double sum = 0; for (int i ...
ALGO
0.999971
3.339021
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-12-26T07:16: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": "77d5556f5...
45b58a49-b1c6-4a0a-9f0b-f8b3528e665d
nikhilunni/Problem-Sets
Berkeley/cs194/Assignment 1/mmultiply.cpp
#include <cstdio> #include <cstring> #include <cstdlib> #include <sys/time.h> #include <time.h> #include "counters.h" void opt_simd_sgemm(float *Y, float *A, float *B, int n); void opt_scalar1_sgemm(float *Y, float *A, float *B, int n); void opt_scalar0_sgemm(float *Y, float *A, float *B, int n); void naive_sgemm(floa...
ALGO
0.966313
4.881996
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2015-09-15T22:51:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7f9bea4...
3d947c98-d60d-465c-9154-1e4353cad398
AndrewYGHUB/leet
solution/2000-2099/2034.Stock Price Fluctuation/Solution.cpp
class StockPrice { public: int lastTs; unordered_map<int, int> mp; map<int, int> counter; StockPrice() { } void update(int timestamp, int price) { if (mp.count(timestamp)) { int oldPrice = mp[timestamp]; --counter[oldPrice]; if (counter[...
ALGO
0.999626
6.394863
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-07-21T06:56: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": "885bfe641a1c...
2ac39341-b85b-43d6-b59d-0cfc53677e57
mqheather/learning
monstermonk/monstermonk.cpp
#include <iostream> #include "monstermonk.h" static std::string s_boatLocation[BOAT_MAX_LOCATION] = {"Local", "Remote"}; //------------------------------------------------------------------------------------------------------------ MonsterMonkBoatState::MonsterMonkBoatState(int localMonkCount, ...
ALGO
0.903138
4.071378
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-10-07T12:42: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": "a8fd1127f3...