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
6725e008-87b5-4585-a7ef-f87a810d5202
Ortunate/Homeworks
ADS_exp/3.cpp
#include <bits/stdc++.h> using namespace std; #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 typedef int status; typedef int KeyType; typedef struct { KeyType key; char others[20]; } TElemType; // Binary tree node element definition typedef struct { int pos; TElemTy...
ALGO
0.999878
4.34462
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-11-22T16:10:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afa9e258ade...
ed52abb8-bae6-455b-be1a-ece562cf5f2f
n-jing/mesh_mass_spring
src/balance.cpp
#include <iostream> #include <igl/readOBJ.h> #include <igl/writeOBJ.h> #include <random> #include <Eigen/Core> #include <string> #include "mesh.h" #include "remove_duplicate_vert.h" #include "solver.h" #include "writer.h" using namespace std; using namespace Eigen; using namespace igl; extern EdgeMesh edge_mesh; in...
ALGO
0.953075
4.07431
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2020-01-14T08:36:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2f77b78e...
e631b61c-cb70-43cd-9beb-73199490612d
verma-tanishq/placement-essentials
greedy/Fractional_Knapsack.cpp
#include<bits/stdc++.h> using namespace std; struct Item{ int value; int weight; Item(int v, int w){ this->value=v; this->weight=w; } }; static bool comp(struct Item a, struct Item b){ double r1 = (double) a.value/a.weight; double r2 = (double) b.value/b.weight; return r1>r...
ALGO
0.999976
4.141589
{ "github_metadata": { "branch": "main", "commit_count": 317, "repo_created_at": "2021-03-30T04:10:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a328d6eb2d...
ebe7ce33-827e-4577-9d8f-e4c9f640d01d
yachShekhar/problem-solving
red-black-tree.cpp
#include <bits/stdc++.h> using namespace std; #define TOUPPER(str) transform(str.begin(), str.end(),str.begin(), ::toupper) #define TOLOWER(str) transform(str.begin(), str.end(),str.begin(), ::tolower) template < class T > T MAX( T a, T b ){return ( a > b ? a : b );} template < class T > T MIN( T a, T b ){return ( a <...
ALGO
0.99896
4.329976
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-11-10T12:16:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0dae4d018...
05fbe420-95af-47e3-a3c4-788be9520df2
geniuszmath75/Programowanie
C++/Strukturalne/Romb/main.cpp
#include <iostream> using namespace std; int main() { int n, i, j, k; cin >> n; i=n; k=2; while(i--) { j=i+1; while(j--) cout << " "; j=k; while(j--) cout << "*"; cout << endl; k+=2; } i=2*n; while(i--) cout << "*"; cout << en...
ALGO
0.999975
3.619813
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2021-08-29T10:29: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": "d25e388fbc0...
a179d97b-7071-4dc1-90d3-f0b7ac304264
ishandutta2007/codeforces-l
low_/normal/1280/C.cpp
#include<iostream> #include<fstream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> #include<deque> #include<set> #include<map> #include<bitset> #include<ctime> #include<queue> using namespace std; #define int long long #define mn 200005 #define inf 4444444444444444444 #define mod 1000000009 #def...
ALGO
0.999873
3.689419
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17: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": "a94cf760efd4...
78dbfae2-1fa3-4c94-ad6b-1a21347c2aa7
BBB965/BAEKJOON_ALGORITHM
백준/Gold/1987. 알파벳/알파벳.cc
#include <iostream> using namespace std; int R, C, ans = 0; char alpha[22][22]; bool check_a[27]; int dy[4] = { 0,1,0,-1 }; int dx[4] = { 1,0,-1,0 }; void board(int y, int x, int cnt) { ans = max(ans, cnt); for (int i = 0; i < 4; i++) { int ny = y + dy[i]; int nx = x + dx[i]; if (ny < 0 || nx < 0 || ny >= R ...
ALGO
0.99945
3.581697
{ "github_metadata": { "branch": "main", "commit_count": 228, "repo_created_at": "2023-05-30T01:26:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a02b9695e...
3260a071-5078-43c5-830b-12ad3026251f
LLNL/COGENT
COGENT/src/ibc/multidim/ParsingCore.H
//Parsing class for arbitrary equation //Written by <NAME> // #ifndef _PARSEEQUATION_H_ #define _PARSEEQUATION_H_ #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> #include <iostream> #include <sstream> #include <iomanip> #include <time.h> #define PARSING_STR_PRECISION 15 namespace ParsingS...
ALGO
0.940336
3.608962
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2016-06-24T23:22:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d168d0ae2...
1f561cbc-6728-4b45-a278-8c5b8df9321e
HyeonHoYoon28/baekjoon23
1764/index.cpp
#include <stdio.h> #include <iostream> #include <string.h> #include <algorithm> #include <vector> #include <string> using namespace std; vector<string> V1, V2, res; string tmp; int main() { int n, m, ans = 0; scanf("%d%d", &n, &m); for (int i = 0; i < n; i++) { // scanf("%s", tmp); cin >> tmp; V1.push_back...
ALGO
0.999994
3.44849
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-02-13T00:50: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": "b32bf4ed370...
b72545bc-19b6-4ab1-b26b-39a08a632d7f
samanta-bordallo/IEFP
PROGRAMAÇÃO .NET/Programação Algoritimos/Aula 1/loja_ troco_while.cpp
/* <NAME> - Loja troco while*/ #include <iostream> using namespace std; int calc_troco(int preco, int entrege) { return entrege - preco; } int main(void) { string nome; int preco, entrege, troco; cout << "Qual o seu nome\nResposta: " << endl; cin >> nome; cout << "Qual o preco do artigo?\nRespo...
ALGO
0.978149
3.445014
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-08-28T18:21:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "76fe9c97ea7...
e29fb326-99aa-4092-8fa6-f1119cc6187e
hareeshghk/AlgorithmImplementations
graph_algorithms/dijikistra.cpp
#include <iostream> #include <queue> #include <map> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; struct Edge { string src; string dst; int weight; }; map<string, int> dijikistra(vector<Edge> edges, string source) { int num_nodes; map<string, int> distan...
ALGO
0.999925
5.017916
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-05-02T17:08: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": "901b259ab3...
489351dd-c3f6-4b0e-a012-a5aed9fd33d9
soikot-shahriaar/CPP-Programming
09 2D Arrays/pb-06-max-sum-of-row.cpp
// Write a program to print the row number having the maximum sum in a given matrix. #include <iostream> using namespace std; int main() { int r, c; cout << "Enter the number of Rows: "; cin >> r; cout << "Enter the number of Columns: "; cin >> c; cout << "Enter the elements of the matrix:" <...
ALGO
0.99995
5.73855
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-02-01T18:20: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": "54fe59b6825...
5f1b3fdf-5bd5-4230-ae45-7a78521f0452
suhasjains/AMR-Solver
src/octreegrid.cpp
#include "octree.h" #include "vtk.h" #include "boundary.h" #include <iostream> #include "direction.h" #include "ghost.h" ///AMR grid stuff /*!Namespace containing things related to grid*/ namespace myOctree { extern int max_level; std::list<Octree*> nodes; std::list<Octree*> leaf_nodes; std::list<Octree*> root_nodes...
ALGO
0.982535
3.712008
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2016-06-10T07:32:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 10, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "440f97a...
375ba782-947a-495b-913b-762f82532d01
shenweichen/Coursera
Specialization_Data_Structures_Algorithms_UC_San_Diego/Course2_Data_Structures/week3_Hash_Tables/phone_book/phone_book.cpp
#include <iostream> #include <string> #include <vector> using std::string; using std::vector; using std::cin; struct Query { string type, name; int number; }; vector<Query> read_queries() { int n; cin >> n; vector<Query> queries(n); for (int i = 0; i < n; ++i) { cin >> queries[i].type; if (queri...
ALGO
0.998406
4.493182
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2016-06-30T04:31:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 900, "forks": 663, "issues": 3, "pull_requests": 5 }, "file_meta": { "content_id": "e8e57...
b9f86f56-34b2-40bf-b366-671c6ff0e570
gajalgarg09/Cpp-Problem-Solving-Journey
sortStackUsingRecursion.cpp
// You’re given a stack consisting of 'N' integers. Your task is to sort this stack in descending order using recursion. // We can only use the following functions on this stack S. // is_empty(S) : Tests whether stack is empty or not. // push(S) : Adds a new element to the stack. // pop(S) : Removes top element from th...
ALGO
0.999882
5.160558
{ "github_metadata": { "branch": "main", "commit_count": 288, "repo_created_at": "2024-08-13T08:49:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93f4361123...
e6a03c3e-eeb5-4968-9637-e9722eb60236
noodlesby11/Simple-Interactive-drawing-system-based-on-openGL
OpenGLVersion2/BezierCurve.cpp
#include<stdlib.h> #include"function.h" //定义二维点坐标数据结构 Pt3D curve[MAXGRAPH][20]; int curvenum = 0; int curvePoint[MAXGRAPH]; //计算多项式的系数 void GetCnk(GLint n, GLint* c) { GLint i, k; for (k = 0; k <= n; k++) { c[k] = 1; for ( i = n; i >= k+1; i--) { c[k] = c[k] * i; } for ( i = n-k; i >=2; i--) { c[...
ALGO
0.999115
3.565278
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-01-03T13:07:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86cb2c874b...
14a9a30b-a21a-474c-aa79-6c341d51fe91
KatanaGraph/katana
lonestar/analytics/cpu/k-truss/k_truss_cli.cpp
/* * This file belongs to the Galois project, a C++ library for exploiting * parallelism. The code is being released under the terms of the 3-Clause * BSD License (a copy is located in LICENSE.txt at the top-level directory). * * Copyright (C) 2019, The University of Texas at Austin. All rights reserved. * UNIVER...
ALGO
0.995898
6.440309
{ "github_metadata": { "branch": "master", "commit_count": 11893, "repo_created_at": "2020-11-04T20:19:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 103, "forks": 66, "issues": 23, "pull_requests": 8 }, "file_meta": { "content_id": "1cf...
13f11e52-ebb3-4fd5-a329-1271ed9c2362
ifndef-define/AdventCode
2015/gpt.cpp
#include <cstdint> #include <cstring> #include <iostream> #include <sstream> #include <iomanip> #include <vector> static inline uint32_t rotate_left(uint32_t x, uint32_t n) { return (x << n) | (x >> (32 - n)); } void printHexArrayInHex(uint32_t* arr, int len) { for (int i = 0; i < len; i++) { printf("...
ALGO
0.999476
5.947134
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-12-22T04:30:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f9dbe732973...
54c7a801-b7b4-4ff2-9347-958a691c3e42
ftiasch/problem-setting-public
2017-sichuan/dynamic-transitive-closure/random.cpp
#include "testlib.h" #include <functional> #include <vector> int main(int argc, char* argv[]) { registerGen(argc, argv, 1); std::vector<std::tuple<int, int>> params; for (int i = 1; i + 2 < argc; i += 3) { auto c = std::atoi(argv[i]); auto n = std::atoi(argv[i + 1]); auto q = std::...
TEST
0.984728
4.196672
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-08-15T12:29:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd560a31d...
8a86502d-c6b2-4b80-858c-406d94560ae8
omranitto/SP_algorithm_SA_NO_visualizition_testing
src/coordinate_calc.cpp
#include "stdafx.h" #include "../inc/global.h" //#include "coordinate_calc.h" void coordinate_calc(double * Current_width, double * Current_height, struct block *module, struct st_t *spc, unsigned int * inv_psl) { unsigned int l, K_ID, L_ID, K_indexPos; module[spc->nsl[1]].x = 0; module[spc->nsl[1]].y = 0; double ...
ALGO
0.999599
3.807167
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-11-27T18:04: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": "1f081def55...
96113e78-de7c-4af8-93d0-3521d2bb2619
dials/dials
src/dials/algorithms/polygon/area.h
/* * area.h * * Copyright (C) 2013 Diamond Light Source * * Author: <NAME> * * This code is distributed under the BSD license, a copy of which is * included in the root directory of this package. */ #ifndef DIALS_ALGORITHMS_POLYGON_AREA_H #define DIALS_ALGORITHMS_POLYGON_AREA_H #include <cstddef> namespa...
ALGO
0.957099
7.106321
{ "github_metadata": { "branch": "main", "commit_count": 12463, "repo_created_at": "2015-07-22T13:36:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 92, "forks": 54, "issues": 172, "pull_requests": 28 }, "file_meta": { "content_id": "9270...
7d21dda7-54d0-42cf-bc3d-b0a93c412fd9
uchicago-cs/cmsc12300
examples/cpp/itersolver/Solver.h
/* * CMSC 12300 - Computer Science with Applications 3 * <NAME>, 2013 * * A base class for solvers of systems of linear equations * that use an iterative method. */ #ifndef SOLVER_H_ #define SOLVER_H_ #include "LinearEquations.h" class Solver { // The maximum number of iterations int maxiter; // The actual ...
ALGO
0.999061
6.125212
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2013-04-05T20:50:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 74, "forks": 41, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "d5b61463...
afe4ec36-bdbb-4627-8d1d-d25abb7eb7e5
dpkass/HHU-Competitive-Programming
B11 - Contest 9/is_it_a_cat.cpp
// // Created by dpkass // #include <bits/stdc++.h> using namespace std; #define Speed \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define print(i) cout << i << endl #define print_col(a) for(auto item: a) cout << item << ' ' typedef long long ll; typedef lon...
ALGO
0.99995
4.710937
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2023-07-22T12:01: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": "da7a7fb5c...
7aa2ff21-5250-435c-96e0-105160012b59
Kiet-Nguyenn/Schoolwork
CSCE 120 (C++)/HW/image_stitching/functions_given.cpp
#include <iostream> #include <sstream> #include <fstream> #include <cmath> #include "functions.h" using namespace std; #define N 9 // Number of unknowns void gaussianElimination(double mat[N][N+1]); int forwardElim(double mat[N][N+1]); void backSub(double mat[N][N+1]); void swap_row(double mat[N][N+1], int i, int j);...
ALGO
0.999727
3.811692
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-10-16T04:02: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": "c7f0770e8a7...
045a6ed3-0a26-46d2-b120-69dbc7a7980d
Jay-sorani835/Main
19oct_JAY/Assignment/module - 4(CPP)/m(4)/matrix.cpp
//Add two 1D matrix #include <iostream> using namespace std; class Matrix{ public: int size,*data; Matrix(int s) : size(s){ data = new int[size]; } Matrix operator +(Matrix obj){ if(this->size != obj.size){ cout<<"Matrices have different sizes. Addition not possible."<<end...
ALGO
0.988094
4.858139
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2023-11-03T10:39:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49c4963414e...
110174f5-2a09-4c0f-a827-a5e11d913230
comatose/CppPrac
vaccine.cpp
#include <iostream> #include <vector> #include <numeric> using namespace std; bool canimmunize(const vector<int>& population, int num_clinics, int max_kits) { int n = 0; for(auto& p: population) { int m = (p + max_kits - 1) / max_kits; n += m; } return n <= num_clinics; } int solve(co...
ALGO
0.999972
3.963597
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2012-01-17T12:51: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": "0b2bbb785a...
070d3b12-5016-4c52-a3ca-3e5b6a829e74
npnkhoi/Competitive-programming
BootCamps/2018ThayHung/BTDoiTuyenNK/FIBISTR.cpp
using namespace std; #include <bits/stdc++.h> typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> ii; typedef vector<int> vi; typedef pair<ll, ll> pll; #define fi first #define se second #define pb push_back #define mp make_pair #define FOR(i,a,b) for (int i = (a); i <= (b); i++) #define FOD(i,...
ALGO
0.999967
3.625139
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-04-01T03:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5633ae0e7...
b257b839-54b7-4f85-8468-ec3596328052
Pawelwysoczanski/Pamsi
quiksort.cpp
#include <iostream> #include <ctime> using namespace std; int *tab, n, opcja, c, *pom; int d = 0; int z = 0; clock_t start, koniec; double roznica; void zamien(int tab[], int indeks1, int indeks2) // Funkcja zmieniająca wartości poszczególnych elementów tablicy { int temp = tab[indeks1]; tab[indeks1] = tab[in...
ALGO
0.99753
4.094126
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-04T20:44: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": "9b80f9ca85cf...
513be189-0909-464f-9211-e23599abe768
olimpiada-informatica/Soluciones
2023/Clasificatorio/minpormax.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<ll>; const ll mod = 1e9+7; int main() { int T; cin >> T; while (T--) { int n; cin >> n; vi a(n); for(ll& x : a) cin >> x; vi min_end(n); vi min_st; ll min_sum = ...
ALGO
0.999867
4.052501
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-09-26T17:12:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "053dd06729ab...
06f59adc-3914-4d48-a4bb-d0bbc9949108
bsu2018gr09/KisliakouUDz
0-4.cpp
//Расположить в порядке возрастания элементы массива А(N), начиная с k-го элемента. #include <iostream> #include <random> #include <time.h> #include <iomanip> using namespace std; int* give_memory(int N); void init_array(int* p, int N); void sortFromPosition(int* p, int N, int k); void print_array(int* p, int N); i...
ALGO
0.999699
4.722473
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2019-02-21T07:51:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12f63e088d...
ec479212-8a69-4aa4-ab67-1e6cf68a12d0
svn-111/Codeforces
icpc1.cpp
#include<bits/stdc++.h> #define ll long long int using namespace std; int main() { ll a,b,c,d,e,m,n,mn,mx,avg,sum,cnt,x,y,z; cin>>a>>b>>c>>x; int g[9]; g[0] = a; g[1] = b; g[2] = c; bool safe[3] = {true, true, true}; sum = a+b+c; avg = sum/3; for(int i=0; i<3 ; i++) { ...
ALGO
0.99996
3.305407
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-02-26T18:48:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8f495aead1d...
66ec37d6-f901-46a2-a34f-938997acd2dc
suryapratap64/Dsa-source-code
11.STLlybrary.cpp/takinginputv.cpp
// C++ program to input multiple items #include <iostream> #include <vector> using namespace std; int main() { int n; // Input the number of elements cout << "Enter the number of elements you want to " "input: "; cin >> n; // Initialize a vector of size n vector<int> vec(n); // Input n numbers ...
ALGO
0.998199
3.83573
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-11-25T12:46: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": "d4833dde6320...
fa15167b-3676-4892-aee3-d5e877c0959b
sam1322/Practice-cpp
Graphs/Kahn'salgo.cpp
#include<bits/stdc++.h> #include<algorithm> using namespace std; #define fr(i,a) for(int i=0;i<a;i++) #define forn(i,a,n) for(int i = a; i < n ;i++) #define Sort(a) sort(a.begin(),a.end()) #define Rev(k) reverse(k.begin(),k.end()) #define Sz(x) x.size() #define Show(v) for(int i =0 ; i < v.size();i++) cout<<v[i] //o...
ALGO
0.999988
4.333133
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-08-01T05:06:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf1184c689b...
bcb3d4a7-fe9c-4b08-a498-39142fc30722
Priyanshu150/DSA-problems
Greedy/Intutive and Logic based/Gas Station/Maths_approach.cpp
#include<bits/stdc++.h> using namespace std; // Time complexity :- O(n) // Where n is length of array // Space complexity :- O(1) // Approach :- // If total_fuel_value - total_dist_travelled >= 0, then only its possible to complete circular journey // For index, we can assume that current index i...
ALGO
0.999899
5.427722
{ "github_metadata": { "branch": "main", "commit_count": 485, "repo_created_at": "2024-12-11T16:32:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7bb743448...
8e90dd43-4c29-4457-9cf3-6b5b101e0bc6
farmpiggie/competitive-programming
templates/sparse_table.cpp
// summation sparse table #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; const int K = 25; // log2(1e7) int main() { int n; vector<int> a(n); // the input array vector<vector<int>> st(K + 1, vector<int>(N)); // sparse table auto merge = [&](int a, int b) { ...
ALGO
0.999935
5.343384
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2023-10-31T06:35: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": "552f6ed97fe...
f2d9aff4-4fa4-459b-b6bb-3c225b84c1eb
elifpulukcu/CSES-Solutions
Introductory-Problems/BitStrings.cpp
/* CSES Problem Set Link: https://cses.fi/problemset/task/1617 Problem: Bit Strings Description: Calculate the number of bit strings of length n. The result should be given modulo 10^9 + 7. Time Complexity: O(log n). We use fast exponentiation (binary exponentiation) to compute 2^n mod (10^9 +...
ALGO
0.999972
5.495601
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-12-19T19:47: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": "dd06f58ad43...
cc9caae4-2283-4721-8c18-da3a900c2aa7
seoyamin/Algorithm-Study
seoyamin/Programmers/[Lv.3] 불량 사용자 - 해결 dfs ver.cpp
#include <string> #include <vector> #include <set> using namespace std; set<int> s; bool check[8]; int len; void dfs(vector<string> &user_id, vector<string> &banned_id, int i, int num) { if(i == len) { // 모든 banned id 처리한 경우 종료 s.emplace(num); return; } for(int j=0 ; j<use...
ALGO
0.999229
4.588811
{ "github_metadata": { "branch": "main", "commit_count": 350, "repo_created_at": "2022-06-29T07:33:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4920130ad...
31d53ef4-9b83-4933-96c2-00db0fc7ac5b
bfidler/Algorithms-DataStructures
Labs/Lab6/BTreeInternal.cpp
// BTreeInternal.h wdg 2014 #include "BTreeNode.h" BTreeInternal::BTreeInternal() : currChildren(0) { } BTreeInternal *BTreeInternal::insert(int item, int &newKey) { int pos=0; while(pos<currChildren-1 && item>=marker[pos+1]) pos++; int addedKey; BTreeNode *split = child[pos]...
ALGO
0.957116
3.805913
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-29T00:04:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "b07e89ec72...
ad0ec706-bba2-4690-8b57-ce883586996c
Vasilena01/Data_structures_and_algorithms_FMI
Kontrolni/K1_2023/K1_2023.cpp
#include <iostream> #include <vector> using namespace std; /*Zad k1_2023 void getUniqueIndicies(string str) { int n = str.length(); vector<int> freq(256); vector<int> uniqueIndicies; for (int i = 0; i < n; i++) freq[str[i]]++; for (int i = 0; i < n; i++) { if (freq[str[i]] == 1) uniqueIndicies.push_back...
ALGO
0.999647
4.425809
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-10-15T08:59:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60c0ef78a1d...
71766349-1a03-404b-b6b0-aa60a1515222
ALRhub/ITPAL
cpp/src/projection/BatchedCovOnlyProjection.cpp
#include <projection/BatchedCovOnlyProjection.h> BatchedCovOnlyProjection::BatchedCovOnlyProjection(uword batch_size, uword dim, int max_eval) : batch_size(batch_size), dim(dim){ for (int i = 0; i < batch_size; ++i) { projectors.emplace_back(CovOnlyMoreProjection(dim, max_eval)); projection...
ALGO
0.980282
6.687303
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2020-05-27T11:11:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "719f265ef76d...
fe0409b8-5fb8-406d-9fb9-2cab288338c3
AbdulrahmanJ204/cp
D_M_arrays.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define int ll #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define endl '\n' #define cendl cout<<endl #define cyes cout<<"YES" #define cno cout<<"NO" #define cin(v) for(ll i=0;i<v.size();i++)cin>>v[i]; #define cin1(v,n) for(ll ...
ALGO
0.999899
4.160068
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-01-24T07:28:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7249facf63a8...
56fbc9e5-f5b9-4ccd-a36e-3c8a53134f02
ricardo0129/usaco_practice
Chapter_2/2.1/hamming.cpp
/* ID: ruizr271 TASK: hamming LANG: C++ */ #include <iostream> #include <bits/stdc++.h> using namespace std; #define ll long long #define vll vector<ll> #define vi vector<int> #define pii pair<int,int> #define FOR(i,n) for(int i=0;i<n;i++) #define f first #define s second int n,b,d; int ans[64]; int ...
ALGO
0.999851
3.454796
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-05-14T23:52: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": "40d35a8e6...
9aecd9ad-fc74-4ca5-afb1-a088495cb63e
MohamedWaheed327/Competitive_Programming
DS/DSU.cpp
// Mohamed_Waheed #include <bits/stdc++.h> using namespace std; class DSU { private: vector<int> par, sz; int find_par(int node) { if (node == par[node]) { return node; } return par[node] = find_par(par[node]); } public: DSU(int n) { par.resize(n + 1); ...
ALGO
0.999086
4.168756
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2023-09-22T13:23:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bceee2f045...
a8c9173e-1736-425b-b40c-d3e45a521073
paperbackdragon/Project-Euler
c++/01-09/prob09.cpp
/* URL: http://projecteuler.net/index.php?section=problems&id=9 A Pythagorean triplet is a set of three natural numbers, a < b < c, for which a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc. Answer: 31875000 */ #i...
ALGO
0.999838
4.620511
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2011-07-09T20:14:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3dc1b8d1...
30ea1e71-5267-430c-8dbf-3affe2666d0f
krisdimitrov03/FMI-UP-OOP-2022-23-Homeworks
Object-Oriented-Programming/Homework-03/Task-02/Queue.hpp
#pragma once #include <stdexcept> namespace globals { const int RESIZE_COUNT = 4; } template <typename T> struct Element { T element; int priority; }; template <typename T> class Queue { Element<T>* data = nullptr; size_t count = 0; size_t capacity = globals::RESIZE_COUNT; int maxPriority = 0; void free(); ...
TOOL
0.90923
5.669476
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-06-14T12:42:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ccaca8ff1582...
3daa3805-7611-4bb2-8041-a7bfde353801
pikapalasokeri/blob
src/main/cxx/MostPopulatedCircleFinder.cpp
#include "MostPopulatedCircleFinder.hpp" #include <cstddef> #include <cassert> MostPopulatedCircleFinder::MostPopulatedCircleFinder(double* points, int dim1, int dim2) : xMin_(std::numeric_limits<double>::max()), xMax_(-std::numeric_limits<double>::max()), yMin_(std::numeric_limits<double>::max()), yMax...
ALGO
0.999725
6.734708
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2017-09-25T15:05: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": "3fc97bec...
65abe6f1-a34f-4c3c-9712-52acf6aef622
image-science-laboratory/Z-Alumni-okabe-AtCoder
ABC_250to300/ABC_261/B-TournamentResult.cpp
#include <algorithm> #include <cmath> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; const double PI = 3.141592653589793...
ALGO
0.999881
4.023473
{ "github_metadata": { "branch": "main", "commit_count": 237, "repo_created_at": "2022-07-10T04:03:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28417dcc7e9...
33772a5b-4ef2-4ee5-a4b3-c3f534c56a29
czimaginginstitute/MotionCor3
Align/CGroupFFTStack.cpp
#include "CAlignInc.h" #include "../Util/CUtilInc.h" #include <cuda.h> #include <cuda_runtime.h> #include <cufft.h> #include <memory.h> #include <stdio.h> using namespace MotionCor2; using namespace MotionCor2::Align; static int s_iBufferID = 0; static Util::CGroupFrames* s_pGroupOld = 0L; static Util::CGroupFrames* ...
ALGO
0.970316
4.832537
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-10-12T17:13:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 51, "forks": 5, "issues": 9, "pull_requests": 2 }, "file_meta": { "content_id": "9818ca1bb96...
881bd70a-5a35-4b3b-889f-4032174d7f2c
leverimmy/Codes
比赛/学校/2019-11-9邀请赛/source/std/jump.cpp
#include <stdio.h> #include <stdlib.h> #define ll long long #define DEBUG printf("Passing [%s] in Line %d\n" , __FUNCTION__ , __LINE__) ; const int MAX_N = 5e4 + 10 , MAX_K = 200 + 10 ; struct Link { int num ; Link *next ; }list[MAX_N << 1] ; ll res ; Link *head[MAX_N] ; int n , k , cur , siz[MAX_N] , tmp[MAX_K] ...
ALGO
0.999876
3.825469
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-11-04T09:43: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": "86bcffde1...
c324195a-7ec0-4e54-a502-64d8f64ba26c
alec-z/UCSD-Data-Structure
week3/4_substring_equality/substring_equality.cpp
#include <iostream> #include <vector> #include <cassert> using namespace std; class Solver { static const long long m1 = 1000000007; static const long long m2 = 1000000009; static const long long x = 261; string s; vector<long long> hash_from_0_m1; vector<long long> hash_from_0_m2; vector<long long> x_power_m...
ALGO
0.999911
5.016132
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-01-24T10:27:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dec9b1c63303...
a88a5b46-899e-42a0-8ae8-63442f1ac329
ASHUTOSHRAZZ100/Code_practice
Basic C++/OPPs Assignments/Memeber Function Assignment-1/Question-1.cpp
#include <iostream> using namespace std; class Complex { int a, b; public: void setData(int, int); void showData(); Complex add(Complex); Complex subtract(Complex); Complex multiply(Complex); }; void Complex::setData(int x, int y) { a = x; b = y; } void Complex::showData() { cout...
ALGO
0.996254
4.724767
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-04-19T20:20:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b82ebbede36...
c500b3b6-71b9-417e-9771-ccb892b3e7f1
1maeth2/CCC
1998/set1/censor.cpp
/* The Society for Prevention of Profanity on the Internet has observed a growing number of chat lines on the World Wide Web. A chat line allows a Web user to type lines of text which are transmitted to all other users. The Society is concerned about the number of fourletter words being transmitted by these chat lines...
ALGO
0.995193
4.968164
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-02-16T20:04:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5fe74bae3...
01d34d98-662f-4010-b7cd-6cea98c2f826
tishaag098/leetcode
Arrays/sort_0s_1s_2s.cpp
//-------------Asked in many companies------------------------- /*Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. We will use the integers 0, 1, and 2 to represent the color red, whit...
ALGO
0.999787
4.846002
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-04-13T09:48:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1dbaf6e05f...
e6e82294-6202-4351-8be6-3dd6d3ebd96b
thienchidh/ListBaiTapCoBan_C-_-_DeBai
254_.cpp
/* Bài 254: Hãy đếm giá trị trong mảng thỏa: lớn hơn tất cả các giá trị đứng đằng trước nóKỹ thuật sắp xếp*/ #include<bits/stdc++.h> using namespace std; #define MAX 100 template <typename T> void nhap (T a[], int &n) { cin >> n; for(int i = 0; i < n; i++) { cin >> a[i]; } } template <typename T>vo...
ALGO
0.999845
3.572746
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-09-26T10:41: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": "914296eb29...
f0a7fdb3-678b-4718-96de-3ad257944d21
ucascnic/SYCL_multiblockADMM
main_admm.cpp
#include<iostream> #include"admmsolver.h" #include<string> #define ARMA_ALLOW_FAKE_GCC #include<armadillo> #include<vector> // #include<cuda_runtime_api.h> // #include<cnic_sparsematrix.h> // #include<matrix_function.h> // #include<thrust/device_ptr.h> // #include<thrust/copy.h> //#include"mytest_sparse.h" #include<Com...
ALGO
0.935151
3.811349
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-12-04T14: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": "4fcbfe0ba649...
ae47073f-4b5f-4ad7-85e9-c8911cfc9824
DreamLife-Jianwei/Qt-Vtk
03_ThirdVtk/Vtk9/include/vtk-9.0/vtkLinearContourLineInterpolator.h
/*========================================================================= Program: Visualization Toolkit Module: vtkLinearContourLineInterpolator.h Copyright (c) <NAME>, <NAME>, <NAME> All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is d...
ALGO
0.947045
6.891991
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2021-06-22T02:34:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 174, "forks": 45, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d49a70...
bb87011b-6944-4d6d-82bb-1d0a42eb8737
enriquefynn/libvns
sources/routing/astarhandler.h
/*************************************************************************** * * * Copyright (C) 2011-2012 <NAME> - All Rights Reserved * * Email: <EMAIL> or <EMAIL> * * ...
ALGO
0.945988
6.790592
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2014-09-11T18:32:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d92dac265...
b95f746b-903f-4d17-9b4a-7db0e244cab1
egpbos/barcode
barlib/include/hmc/leapfrog/time_step.hpp
/* * Barcode * Copyright <NAME> * * Distributed under the terms of the MIT License. * The full license is in the file LICENSE, distributed with this software. */ #ifndef BARCODE_TIME_STEP_HPP #define BARCODE_TIME_STEP_HPP #include <stdexcept> // runtime_error #include <vector> #include <algorithm> // sort #incl...
ALGO
0.995275
6.408654
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2018-10-11T17:54:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "db6ccfd19...
9b9751a9-9cd5-4977-af4b-2cd59bf7d25d
Netflix/Surus
resources/R/RAD/src/anomaly_detection.cpp
// [[Rcpp::depends(RcppEigen)]] #include <Rcpp.h> #include <RcppEigen.h> using namespace Rcpp; // inverts the singular values // takes advantage of the fact that singular values are never negative inline Eigen::ArrayXd Dsoft(const Eigen::ArrayXd& d, double penalty) { Eigen::ArrayXd di(d.size()); for (int j = 0; ...
ALGO
0.999874
6.759948
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2015-01-12T20:31:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 460, "forks": 108, "issues": 13, "pull_requests": 3 }, "file_meta": { "content_id": "ebe16...
717fa9bb-e105-4a6b-996a-39a395aa7c3d
Dytchem/OI-Notes
Dytchem-ac/CodeForces/1867D/45607260_AC_78ms_2388kB.cpp
#include <iostream> #include <bitset> #include <cstring> #include <memory> #include <vector> using namespace std; const int maxn = 200005; int a[maxn]; long long dis[maxn], d = 0; bitset<maxn> vis; int solve() { memset(&vis, 0, sizeof(vis)); int n, k; cin >> n >> k; for (int i = 1; i <= n; ++i) cin >> a[i]; i...
ALGO
0.999957
4.248697
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-01-14T12:54: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": "2e86547cef4...
51842ba4-6db3-4683-8e74-159c6a84817a
UAV-sjtu/redpoint
redPoint.hpp
// #include <opencv2/highgui.h> #include <opencv2/opencv.hpp> #include <iostream> #include <vector> #include <cmath> using namespace std; using namespace cv; struct ss { int i; float a; }; bool comp(const ss &a, const ss &b) { return a.a>b.a; } bool compp(const int &a, const int &b){ return a < b; } voi...
ALGO
0.959224
3.778997
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-03-01T07:23:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b04eb0cf183...
d4ae3317-9f22-4561-b4dd-17fc89a92dff
Washburn7/Competitive-programming
1893B.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr int N = 2e5 + 10; void solve() { int n, m; cin >> n >> m; vector<int> a(n + 1), b(m + 1); for(int i = 1; i <= n; i++) cin >> a[i]; for(int i = 1; i <= m; i++) cin >> b[i]; sort(b.begin() + 1, b.end()); vector<in...
ALGO
0.999943
3.272941
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-12-14T19:54:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd2e3a999ae1...
3279e65a-be02-4b13-b964-23547bc11839
AkshayMariyanna/solutions
uva/10104.cpp
//! https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1045 #include <iostream> using namespace std; typedef long long ll; ll gcd_extended(ll a, ll b, ll &x, ll &y) { if (a == 0 && b == 0) { x = 0; y = 0; return 0; } else if (a == 0) { x = 0; y = 1...
ALGO
0.999884
4.231644
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2018-07-27T18:00: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": "bc1a2e760...
5c6d1d2c-5e3e-4d3b-a460-976cf2472463
NVIDIAGameWorks/PhysX
physx/source/lowleveldynamics/include/DyFeatherstoneArticulationUtils.h
// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in bin...
TOOL
0.948352
5.610316
{ "github_metadata": { "branch": "4.1", "commit_count": 12, "repo_created_at": "2018-12-05T14:30:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3397, "forks": 824, "issues": 311, "pull_requests": 18 }, "file_meta": { "content_id": "6c6e9...
dccf57cd-6b2f-4175-a637-ebe6d68d8169
kirollosatef/problem-solving
codeforces-contests/Contest_ICPC_L2/F.cpp
#include <bits/stdc++.h> #define vec(type) vector<type> #define sz(x) (int)(x).size() #define all(x) x.begin(), x.end() #define read(file) ifstream cin(file) #define fill(x, i) memset(x, i, sizeof(x)) #define lp(s, n, i) for (int i = s; i < n; i++) #define lpe(s, n, i) for (int i = s; i <= n; i++) #define rlp(s, n, i) ...
ALGO
0.999989
3.932985
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2022-05-07T15:28:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "717fba5c...
4989b47f-4ef3-4858-a3db-7863ee135433
yveltvoumamy/phystech_study_projects
algo/1_term/sorts_and_bisect/G. Unfair_Towers.cpp
#include <iostream> void Hanoi(int n, int start, int end); int main() { int n; std::cin >> n; Hanoi(n, 1, 3); return 0; } void Hanoi(int n, int start, int end) { char space = ' '; char end_line = '\n'; int no_turn = 0; int turn = 1; if (n == no_turn) { return; } if (n == turn) { std::co...
ALGO
0.999936
4.596606
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-11-05T13:05: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": "942eac8bfb39...
53a3b9c3-658d-41ba-970f-6204484d79c8
kushalprasadjoshi/computer-graphics
practicals/08-rotation-and-reflection/02-reflection-along-x-axis.cpp
#include <stdio.h> #include <conio.h> #include <graphics.h> #include <math.h> char IncFlag; int PolygonPoints[3][2] = { {10, 100}, {110, 100}, {110, 200} }; void PolyLine() { int iCnt; line(0, 240, 640, 240); line(320, 0, 320, 480); for (iCnt = 0; iCnt < 3; iCnt++) { line(Pol...
ALGO
0.998968
3.713459
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2025-02-19T13:13:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68f0036d1f0...
f29c248d-178f-42c4-acd3-95717dfa8bbf
estape11/ANPI_proyecto3
src/proceso/Liebmann.cpp
// // Created by estape11 on 31/05/18. // #include <iostream> #include <Matrix.hpp> #include <vector> #include "Liebmann.h" #include <limits> #include <cmath> #include <omp.h> using namespace anpi; template<typename T> Liebmann<T>::Liebmann(T pLambda, EdgeNode<T> up, EdgeNode<T> down, EdgeNode<T> left, EdgeNode<T> r...
ALGO
0.999959
4.517313
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-06-05T15:42: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": "4298b7dda...
e4cc49bb-ee4e-40c8-a6cd-ec9d58cc5978
mkaouer/Code-Smells-Detection-in-JavaScript
JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/374130/spot-0.8/spot-0.8/src/tgbaalgos/randomgraph.cc
// Copyright (C) 2008, 2009, 2010 Laboratoire de Recherche et // Développement de l'Epita (LRDE). // Copyright (C) 2004, 2005, 2007 Laboratoire d'Informatique de // Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), // Université Pierre et <NAME>. // // This file is part of Spot, a model checking library....
ALGO
0.920474
4.869611
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2016-11-16T11:47:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 4, "issues": 0, "pull_requests": 18 }, "file_meta": { "content_id": "5067ca84...
1a3eb2c9-2f21-4236-a159-630a7dbf6bac
mkltaneja/Leetcode
229. Majority_Element_II.cpp
vector<int> majorityElement(vector<int> &nums) { int n = nums.size(); int a, b; int cnt1 = 0, cnt2 = 0; for (int x : nums) { if (x == a) cnt1++; else if (x == b) cnt2++; else if (cnt1 == 0) a = x, cnt1 = 1; else if (cnt2 == 0) ...
ALGO
0.999923
4.675603
{ "github_metadata": { "branch": "master", "commit_count": 2991, "repo_created_at": "2020-04-15T14:34:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63765ff...
0eda0793-ff85-4d3a-9db7-b2d83055b24b
lihebi/Helium
include/helium/parser/LibraryManager.h
#ifndef LIBRARYMANAGER_H #define LIBRARYMANAGER_H #include <vector> #include "helium/parser/AST.h" #include <boost/filesystem.hpp> #include <boost/foreach.hpp> #include <gtest/gtest.h> #include <rapidjson/istreamwrapper.h> #include <rapidjson/document.h> #include <rapidjson/prettywriter.h> namespace fs = boost::fi...
TOOL
0.957194
5.975195
{ "github_metadata": { "branch": "master", "commit_count": 731, "repo_created_at": "2015-09-10T22:41: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": "13ba1c56...
182f7910-7d1c-454e-bb30-c92a19e220d8
Alaxe/noi2-ranking
2017/solutions/B/BSD-Burgas/progres.cpp
#include <cstdio> #define MAXN 999 using namespace std; char result[15], cifri; unsigned n, red[MAXN], d; void found_one(unsigned c) { result[c]++; if (result[c]>9) { if (c==0) { result[c]=1; cifri++; return; } result[c]=0; found_on...
ALGO
0.999958
3.106368
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-03-20T21:56:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f05a0c31...
cbb69315-3269-4aa3-b798-399394666a4f
MarkVsudo/FMI-IP-Course
GROUP_1_WEEK_3_PRACT/task10.cpp
// По дадено число N изкарайте на екрана квадрат от N x N символи, където под главния диагонал стоят минуси (-), а над главния диагонал стоят плюсове (+) // Пример: // Вход: 4 // Изход: // ++++ // -+++ // --++ // ---+ // Вход: 7 // Изход: // +++++++ // -++++++ // --+++++ // ---++++ // ----+++ // -----++ // ------...
ALGO
0.99951
5.359633
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2024-10-04T18:46:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ca6a686f73...
1b400c12-535f-49dd-a77a-e4faacb6ce29
RomanchenkoAS/cpp_hw
hw8/main.cpp
#include <iostream> #include <vector> #include <random> #include <cstdlib> // for srand using namespace std; template<class TypeName> class MatrixClass { private: vector<vector<TypeName>> matrix; void erase() { // 'Deallocate' memory by creating an empty vector and swapping them vector<vector<...
TOOL
0.949737
5.399166
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2023-09-03T17:07: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": "0e0c3f6fba6...
2fd9eefb-e980-4fd4-91a6-7f31fc66f7f7
gaspargu/T3
aleatorizado5.cpp
#include <iostream> #include <cmath> #include <vector> #include <random> #include <algorithm> #include <set> #include <climits> #include <ctime> #include <unordered_map> #include "structs.h" #include "funcionesHash.cpp" using namespace std; // Retorna la distancia minima cuadrada de n pares de puntos // Paso 1 del a...
ALGO
0.9997
4.939758
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-11-29T19:07: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": "cbcae816cea...
c0d9463e-fa84-4f12-a167-78cf3f316697
BlackOpiumm/DSA-Assign--Sem3
Assignment7.cpp
#include<iostream> #define SIZE 20 #define INFINITY 99 using namespace std; // Class definition for Minimum Spanning Tree class MST { private: int G[SIZE][SIZE], nodes; public: // Constructor to initialize the graph with zeros MST() { for (int i = 0; i < SIZE; i++) { for (int j = 0; j...
ALGO
0.999982
5.414032
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-21T10:55: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": "173577f5787f...
868c5c66-bc58-4ae3-b313-c7de1a3be6e5
epibook/epibook.github.io
solutions/cpp/permutation_array2.h
// Copyright (c) 2015 Elements of Programming Interviews. All rights reserved. #ifndef SOLUTIONS_CPP_PERMUTATION_ARRAY2_H_ #define SOLUTIONS_CPP_PERMUTATION_ARRAY2_H_ #include <vector> using std::vector; namespace ApplyPermutation2 { void CyclicPermutation(int, const vector<int>&, vector<int>*); // @include void ...
ALGO
0.999887
6.429102
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2014-04-10T16:56:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 334, "forks": 238, "issues": 6, "pull_requests": 2 }, "file_meta": { "content_id": "cd101...
e874bbc1-4a73-4b74-92a3-50c5d283b12a
umrlastig/StructuredMesh
code.cpp
#include "header.hpp" #include "raster.hpp" #include <regex> #include <unordered_map> #include <ogrsf_frmts.h> #include <CGAL/IO/WKT.h> std::list<Polygon> get_LOD0_from_shapefile(char *path) { GDALAllRegister(); GDALDataset *dataset; std::list<Polygon> polygons; dataset = (GDALDataset*) GDALOpenEx(path, GDAL_...
DATA
0.969775
4.49084
{ "github_metadata": { "branch": "master", "commit_count": 210, "repo_created_at": "2024-11-30T09:02:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d8370726...
12bde9cc-ba9b-4dee-aebb-30d756f5a986
ASSERT-KTH/Supersonic
predictions/submissions-aizu-coop-gpt35/Codenet/p00614/964259725/response_7.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int C[6] = {1, 5, 10, 50, 100, 500}; int P; int N[6]; const int T = 10000; int dp[2][T]; int numCoins[T]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); while (cin >> P) { if (P == 0) break; for ...
ALGO
0.999574
4.041208
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-02-03T10:33:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2c62e82a89df...
9db2b831-49a6-41b7-ac20-1b0f9e031a26
TajwarSaiyeed/problem-solving-codechef-leetcode-codechef
26-6-2024/leetcode/58. Length of Last Word.cpp
/* Author: <NAME> Date: 2024-06-26 23:07:31 File: 58. Length of Last Word.cpp */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree_tag,...
ALGO
0.999701
5.806546
{ "github_metadata": { "branch": "main", "commit_count": 337, "repo_created_at": "2024-03-11T01:27:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db58a23d67...
c0c3611f-b454-4e1a-a0af-84cdcda2eea6
mosqd/leetcode
78-Subsets/main.cpp
/** Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. Example: Input: nums = [1,2,3] Output: [ [3], [1], [2], [1,2,3], [1,3], [2,3], [1,2], [] ] */ class Solution { public: vector<vector<int>> subsets(...
ALGO
0.999901
6.543522
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2019-12-02T09:10: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": "895dc3537...
d9e5d4a3-cda0-40bf-af81-6d722423037d
ermig1979/Simd
src/Simd/SimdAvx512bwReduceGray4x4.cpp
/* * Simd Library (http://ermig1979.github.io/Simd). * * Copyright (c) 2011-2018 <NAME>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation th...
ALGO
0.981966
3.019099
{ "github_metadata": { "branch": "master", "commit_count": 4063, "repo_created_at": "2015-03-25T15:24:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2179, "forks": 437, "issues": 30, "pull_requests": 1 }, "file_meta": { "content_id": "3...
9ad9a571-f029-42cf-9f59-76613c7972fb
anayethasan/Data-Sracture
Module - 18 Operations on Binary Tree/Binary tree input.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node* left; Node* right; Node(int val) { this->val = val; this->left = NULL; this->right = NULL; } }; Node* tree_input() { int val; cin >> val; Node* root; if(val == -1) ...
ALGO
0.99998
5.148575
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-28T19:42: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": "c4eb1747a378...
c20bb01f-0aac-4eb3-b25c-65c7b8c553c4
ilyarudyak/cs106b
pa3_recursion/pa3_attempt2/main.cpp
#include <iostream> #include <vector> using namespace std; void printInBinary(int number) { if (number == 0) { return; } printInBinary(number / 2); cout << number % 2; } void subsets(string soFar, string rest) { if (rest.empty()) cout << soFar << endl; else { subse...
ALGO
0.99988
4.415271
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2016-01-08T14:17:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8263647b...
b112611f-7130-4583-a3cf-f86c7e565b7f
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/04/0416/personal_submission/cf509c_Mohanad_Nahhal.cpp
/* <NAME> */ #pragma GCC optimize("O3,unroll-loops") #include<bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; string last; for (int i = 0; i < n; i ++) { int sum, summ = 0; cin >> sum; string num; for (int j = 0; j < last.size(); j ++) { ...
ALGO
0.99985
4.829757
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "ef1c...
28a21641-384a-4b1e-83b2-747108b88f5b
kohler/click
tools/click-xform/adjacency.cc
/* * adjacency.cc -- adjacency matrices for Click routers * <NAME> * * Copyright (c) 1999-2000 Massachusetts Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software ...
ALGO
0.967969
4.167218
{ "github_metadata": { "branch": "master", "commit_count": 10856, "repo_created_at": "2010-09-21T22:45:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 762, "forks": 324, "issues": 115, "pull_requests": 25 }, "file_meta": { "content_id": ...
4f5400b5-71e4-4bb7-b981-6fa6d588be3f
dzhang314/MultiprecisionBenchmarks
gmp/main.cpp
#include <cassert> #include <chrono> #include <cstdint> #include <cstdlib> #include <benchmark/benchmark.h> #include <gmp.h> template <mp_bitcnt_t PRECISION> static void axpy(mpf_t *y, mpf_t a, const mpf_t *x, std::size_t n) { #pragma omp parallel { mpf_t temp; mpf_init2(temp, PRECISION); #pragma ...
TEST
0.949042
6.66014
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2025-04-05T12:17: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": "957fa903836...
516f6c89-2adb-4066-89ed-0dcb299826ac
JS00000/acmCode
graph/1_3_4.cpp
// 求欧拉回路 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define MAXN 10001 #define MAXM 1000007 using namespace std; struct EdgeNode { int to; int next; }; int head[MAXN] = {0}; EdgeNode edge[MAXM]; bool s[MAXN] = {0} ; int ans[MAXM]; int ansi = 0; bool vis[MAXM]; void dfs(int now)...
ALGO
0.999994
3.7087
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2016-04-04T07:18: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": "01fc07c0c...
0413e860-b425-4088-a377-2fef7b74747c
tiger1710/acmicpc.net
백준/Platinum/10265. MT/MT.cc
#include <iostream> #include <vector> #include <stack> #include <algorithm> using namespace std; #define endl '\n' #define ALL(x) (x).begin(), (x).end() #define REP(i, from, to) for (int i = (from); i < (to); i++) //https://github.com/kks227/BOJ/blob/master/10200/10265.cpp //https://coloredrabbit.tistory.com/45 //http...
ALGO
0.999951
4.034343
{ "github_metadata": { "branch": "main", "commit_count": 353, "repo_created_at": "2024-01-31T06:00: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": "c41d6222c6...
0b7ce2fb-5b42-4de6-9ea9-e03535152da7
kangbm94/ROOTSharedLibs
ThreeVector.hh
#include "Math.hh" class ThreeVector{ private: vector<double>TV; double R(){ return sqrt(TV[0]*TV[0]+TV[1]*TV[1]); } int Polarity = 1; double PhiInMemory = 0; public: ThreeVector(){} ThreeVector(double x,double y,double z){ TV={x,y,z}; if(Norm()==TV[2]){ PhiInMemory=0; } if(GetSinPhi(...
TOOL
0.964331
3.810315
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-06-04T08:27: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": "d3fd3fda7b...
1346c0f3-cfd8-4781-abb9-c44b626b08dd
pikaeror/stepik_c-_1
c++/c_plusplus/main.cpp
#include <QCoreApplication> #include <iostream> #include <iomanip> #include <cmath> #include "clockk.h" int sum(int value, int sum_v=0) { if(std::abs(value) < 1) { return sum_v; } return sum(int(value/10), sum_v + value%10); } int next_even_value(int value) { if(value % 2 == 0) { retur...
ALGO
0.997358
3.369625
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-04-05T13:03: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": "8556acfe9c...
3d77d38c-93ac-4f4e-9eeb-c4a568f0e6a7
kaldi-asr/kaldi
src/chain/chain-denominator.h
// chain/chain-denominator.h // Copyright 2015 Johns Hopkins University (Author: <NAME>) // See ../../COPYING for clarification regarding multiple authors // // 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...
ALGO
0.999665
6.203874
{ "github_metadata": { "branch": "master", "commit_count": 9405, "repo_created_at": "2015-04-20T17:23:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14986, "forks": 5368, "issues": 189, "pull_requests": 63 }, "file_meta": { "content_id":...
09ef5734-7e9c-4d58-ba62-a06801217877
Bungmint/competitiveprogramming
contest/cses/xor_pyramid.cpp
// Problem: Xor Pyramid // Contest: CSES - CSES Problem Set // URL: https://cses.fi/problemset/task/2419/ // Memory Limit: 512 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) #pragma GCC optimize("O3") #pragma GCC target("sse4") #include <bits/stdc++.h> using namespace std; using ll = lon...
ALGO
0.999994
4.620329
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2021-02-28T11:36:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d28efc1a8...
ba543864-3745-4ed1-97dd-61baf629d44a
lloydlegoman/matgim_C2plus
takmicenie-2/04.cpp
#include <iostream> #include <cmath> #include <sstream> #include <string> #include <map> using namespace std; // https://arena.petlja.org/sr-Latn-RS/competition/os7-202324-kvalifikacije2#tab_135694 int main() { int rounds, participants; string match, winner; map<string,int> table; cin >> rounds; ...
ALGO
0.999697
3.981571
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-11-10T13:31: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": "b6bbe69fe93...
4ee34b5e-c07a-490f-a850-7c91d2b6617f
virajchandra51/TLE_CP_31
800/28 - Make_it_Beautiful.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; // Number of test cases cin >> t; while (t--) { long long n; // Number of elements in the array cin >> n; long long a[n]; // Array to store the elements for (int i = 0; i < n; i++) // Read n elements into ...
ALGO
0.999718
4.428378
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2025-01-08T19:49:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 26, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a07e07a0e3...
206ddf8a-dc6c-4b6c-9cc8-4c79720d2245
Matheus-Aguilar/Competitive-Programming
Codeforces/Contests/Div 2 - 641 (1350)/d2.cpp
#include<bits/stdc++.h> #define optimize ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define ll long long #define INF 0x3f3f3f3f #define INFLL 0x3f3f3f3f3f3f3f3f #define pii pair<int, int> #define PI 3.141592653589793238462643383279502884L #define mod % 1000000007 #define all(v) v.begin(), v.end() #...
ALGO
0.999907
3.937091
{ "github_metadata": { "branch": "master", "commit_count": 170, "repo_created_at": "2020-03-12T18:00: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": "f9b0340d...
afcbb88c-5056-42b4-b1a3-2044e2af914c
abugatto/pcl_practice
src/processCloud.cpp
#ifndef PROCESSCLOUD_CPP #define PROCESSCLOUD_CPP //standard functions #include <limits> #include <cmath> //Declare ROS c++ library #include <ros/ros.h> #include <ros/console.h> #include <visualization_msgs/MarkerArray.h> //PCL libraries #include <sensor_msgs/PointCloud2.h> #include <pcl/visualization/pcl_visualizer...
DATA
0.940468
5.432129
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-06-21T21:09:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59403541e...
9baa4cad-0911-4649-98a9-1182847fe359
SaqlainAveiro/Competitive-Programming-Solves
zTemplates/Data Structures/Segment Tree (No-Lazy-Propagation).cpp
#include<bits/stdc++.h> using namespace std; #define FastIO ios_base :: sync_with_stdio(false), cin.tie(0), cout.tie(0) #define read(in) freopen("Input.txt","r",stdin) #define write(out) freopen("Output.txt","w",stdout) #define pf printf #define sf scanf #define fr0(i,n) for(long long int i=0 ; i<n ; i++) #define fr1...
ALGO
0.999754
3.218371
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2021-06-04T22:13: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": "b062e51c8b0...
2e319bd8-843a-43ec-8036-2edb896de29e
johnathan79717/competitive-programming
PuzzleUp/2015/digit-table/main.cc
#include <cstdio> #include <cassert> #include <initializer_list> //const int N = 5; //char table[N][N+1] = { //"11111", //"12221", //"12121", //"12221", //"11111", //}; const int N = 9; char table[N][N+1] = { "111111111", "122222221", "123333321", "123222321", "123212321", ...
ALGO
0.999794
3.771379
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2016-04-07T07:50:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4039cf29a...
cde31fa0-2c23-44df-b085-b64225d891cb
nathandking/cpm-ibc
src/Interpolation.h
#pragma once #include <iostream> #include <vector> #include "math.h" #include "Scalar.h" #include "Tube.h" #include <Eigen/Sparse> using namespace std; namespace cpm { class Interpolation{ public: Interpolation(Tube &t); // for interpolation onto closest points of tube Interpolation(T...
ALGO
0.943532
5.289392
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-04-19T13:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "70fd00dd90c...