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
761cd2af-21a4-4f5c-b359-76bd5d102064
cloudysman/C_Programming_PTIT
C03033_Phan_Tich_Thua_So_Nguyen_To.cpp
#include <stdio.h> #include <math.h> int isPrime(int n) { if (n < 2) return 0; for (int i = 2; i <= sqrt(n); i++) { if (n % i == 0) return 0; } return 1; } void primeFactorization(int n) { printf("%d = ", n); for (int i = 2; i <= n; i++) { int count = 0; while (n % i =...
ALGO
0.999501
5.095243
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-12-27T14:10: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": "bbb74c0903...
60646ad1-1600-41bd-9387-86ca4c037637
smyers24/Spring-Mass-System-Analysis-using-LU-Decomp-and-Cramers-Rule
CRAMER FINAL.cpp
#include <iostream> #include <cmath> using namespace std; typedef double* DArrayPtr; int main() { const int m1 = 2, m2 = 1, m3 = 1, g = 10, kk = 2; double f1, f2, f3, x, y, z; int d1, d2; cout << "Enter the matrix dimensions:\n"; cin >> d1 >> d2; //setting up dynamic memory DArrayPtr *K = new DArrayPtr[d1]; ...
ALGO
0.999933
3.409437
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-08-22T00:29: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": "8151593912...
32911a63-46b8-4f56-ae6f-dff4e9a04c8d
amov-lab/Prometheus
Modules/object_detection/cpp_nodes/calibrate_camera_charuco.cpp
#include <opencv2/highgui.hpp> #include <opencv2/calib3d.hpp> #include <opencv2/aruco/charuco.hpp> #include <opencv2/imgproc.hpp> #include <vector> #include <iostream> #include <ctime> using namespace std; using namespace cv; namespace { const char *about = "Calibration using a ChArUco board\n" " ...
TOOL
0.917394
6.647065
{ "github_metadata": { "branch": "main", "commit_count": 1572, "repo_created_at": "2019-12-03T06:28:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2835, "forks": 441, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f0a56...
b3087642-6a03-4a12-b2cb-37e52f421a60
JanHoChoi/LeetCode-Solutions
No.232 Implement Queue using Stacks.cpp
class MyQueue { private: stack<int> s1; // s1用来push 以及为s2提供数 stack<int> s2; // s2用来pop public: /** Initialize your data structure here. */ MyQueue() { } /** Push element x to the back of queue. */ void push(int x) { s1.push(x); } /** Removes the element fro...
ALGO
0.999237
5.481564
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-05-08T11:13:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d52b38fb26...
f804b7a6-d608-46ac-a17a-4aa96c3c6d88
Hitesh20/Data-Structures
C or C++/removeDuplicate.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; void print(Node *root) { Node *temp = root; while(temp!=NULL) { cout<<temp->data<<" "; temp=temp->next; } } Node* removeDuplicates(Node *root); int main() { // your code go...
ALGO
0.999713
4.340724
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-09-06T10:00: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": "be025743e5...
6497b747-0882-4fb6-af8a-b70fec07647b
notvenky/eFlesh
microstructure/microstructure_inflators/src/lib/isosurface_inflator/DynamicKdTree.hh
#pragma once //////////////////////////////////////////////////////////////////////////////// #include <nanoflann.hpp> #include <Eigen/Dense> //////////////////////////////////////////////////////////////////////////////// namespace micro { template<typename Real, int Dim> struct PointCloud { using Point = Eigen::M...
ALGO
0.987862
6.817389
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-05-03T23:17:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 169, "forks": 16, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "79893ecca...
89600357-360c-4cde-990a-2b87b9261260
yueyangw/UMANS-with-SPH
src/Engine/CostFunctions/ForceBasedFunction.h
/* UMANS: Unified Microscopic Agent Navigation Simulator ** MIT License ** Copyright (C) 2018-2020 Inria Rennes Bretagne Atlantique - Rainbow - <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 i...
ALGO
0.933009
6.212266
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-01T09:31: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": "7b6320001aae...
a1037f1e-8c92-4e4f-9d24-aee5d0a27545
cloudex-ugm/pemdascpp
Codes Week 5/Codes Week 5 - 6 - Library Cmath/Code Week 5 - 6 - Library Cmath.cpp
#include <iostream> #include <cmath> /* Library yang terdiri atas fungsi-fungsi untuk operasi matematis. Terdapat banyak fungsi matematis di dalamnya. */ using namespace std; int main() { // fungsi sin cout << "sin(90) = " << sin(90) << endl; // fungsi eksponensial cout << "exp(5) = ...
ALGO
0.988416
4.206955
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-07-29T00:00:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4cab7c930af...
f8710fc7-6f4b-4c0f-97ef-459a086771f6
openmm/openmm
plugins/amoeba/platforms/common/src/kernels/multipoleInducedField.cc
#ifndef HIPPO #define WARPS_PER_GROUP (THREAD_BLOCK_SIZE/TILE_SIZE) #if defined(USE_HIP) #define ALIGN alignas(16) #else #define ALIGN #endif typedef struct ALIGN { real3 pos; #if defined(USE_HIP) real padding0; #endif real3 field, fieldPolar, inducedDipole, inducedDipolePolar; #ifdef EXTRAPOLATED...
ALGO
0.983921
5.417803
{ "github_metadata": { "branch": "master", "commit_count": 7207, "repo_created_at": "2013-05-20T17:42:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1644, "forks": 558, "issues": 408, "pull_requests": 22 }, "file_meta": { "content_id": "...
df5eca78-91da-4f1b-ab44-231bba434e32
dolphin-emu/dolphin
Source/Core/Core/DSP/Jit/x64/DSPJitMultiplier.cpp
// Copyright 2010 Dolphin Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later // Additional copyrights go to Duddie and Tratax (c) 2004 // Multiplier and product register control #include "Core/DSP/Jit/x64/DSPEmitter.h" #include <cstddef> #include "Common/CommonTypes.h" #include "Core/DSP/DSPCore.h" us...
ALGO
0.94996
5.014997
{ "github_metadata": { "branch": "master", "commit_count": 44003, "repo_created_at": "2013-07-22T09:07:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13918, "forks": 2828, "issues": 0, "pull_requests": 338 }, "file_meta": { "content_id":...
9b2667d7-ff29-48fb-ae20-536a53123f33
ishandutta2007/codeforces-a
al3xstr33t/normal/1138/D.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <cmath> using namespace std; #define mp make_pair #define pb push_back #define ll long long //#define debug(x) ; #define debug(x) cerr << #x << " = " << x << "\n"; ostream& operator<<(ostream& cerr, vector<ll> a...
ALGO
0.999968
3.083902
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "aea2a0a733a3...
93e267f4-559e-436e-abfc-f96e53790946
arghyabarannaskar/C-
Trees/postOrderSuccessor.cpp
#include <bits/stdc++.h> /************************************************************ Following is the TreeNode class structure template <typename T> class TreeNode { public: T val; TreeNode<T> *left; TreeNode<T> *right; TreeNode(T val) { this->val = v...
ALGO
0.999998
4.418081
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-03-27T15:13: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": "ce6f87dbe3...
c5537868-5d0d-4d2d-a358-2a1bb40f640d
casparkleijne/majorproblem
Maze/Maze.cpp
#include "Maze.h" #include <Arduino.h> const uint8_t VISITED = 0x10; const int _dir[4][4] = { { 0, -1, 1, 4 }, { 1, 0, 2, 8 }, { 0, 1, 4, 1 }, { -1, 0, 8, 2 } }; unsigned char _map[64]; uint8_t _queue[64]; int _quepos = 0; int _width = 8; /* Add a wall during building phase */ int Maze::EnQueue(int value) { _queue[...
ALGO
0.926488
3.797049
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-01-06T14:32:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1d092e04...
cd3e081c-0a67-4174-8596-7f3fa29c0396
OnlyBelter/mageck-py3
gsea/src/calculategsea.cpp
#include <iostream> #include <fstream> #include <string> #include "tclap/CmdLine.h" #include <map> #include <vector> #include <sstream> #include <ctime> #include <algorithm> #include <cstdlib> #include "math_api.h" using namespace std; using namespace TCLAP; struct CallingArgs{ string gmtfile; string rankfile; ...
ALGO
0.960569
4.483601
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-08-16T08:55:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cc66db722...
97286523-40c7-4375-ab75-4b685e02e340
VanishRan/leetcode
RanLeetCode/数据结构/dataStructure/dataStructure/图/图的深度优先遍历.cpp
// // 图的深度优先遍历.cpp // dataStructure // // Created by ran on 2017/4/20. // Copyright © 2017年 ran. All rights reserved. // //#include<iostream> //using namespace std; //class Graph { //public: // int vertexNum; // int matrix[100][100] = {0}; // int visited[100] = {0}; // 0 没有访问过 //public: // Graph() //...
ALGO
0.999545
4.406337
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-12-13T14:10: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": "d68556de0...
2a79b985-ef6b-427d-b20d-579977e0cb8c
12kishansingh/LeetCode
Graph/Undirected Graph Cycle(DFS+BFS).cpp
// using DFS class Solution { public: bool dfs(vector<vector<int>>&adj,int i, vector<bool>&visited,int parent){ visited[i]=true; for(auto x:adj[i]){ if(x==parent)continue; if(visited[x])return true; if(dfs(adj,x,visited,i))return true; } ...
ALGO
0.999994
5.704891
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2024-03-24T13:44: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": "a4729ec771...
401647a8-c952-458f-8bc4-52ab70c49354
waydandeSneha/Coding_Challenges
striings/sortString.cpp
#include<bits/stdc++.h> using namespace std; string solve(string str, int n) { // bubble sort for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - i - 1; j++) { if (str[j] > str[j + 1]) { char temp = str[j]; str[j] = str[j + 1]; str[j + 1] = temp; } } } retur...
ALGO
0.999972
5.161791
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-06-07T14:06: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": "f777a65c4716...
19a87fe1-be5d-4839-8b15-70d660452f3e
marinapapa/HoPE-model
libs/glmutils/qr.hpp
// // Utilities for OpenGL Mathematics (glm) // // <NAME> 2008 // //! \file qr.hpp QR decomposition in triangular factors. //! \ingroup linalg #ifndef glmutils_qr_hpp #define glmutils_qr_hpp #include <glm/glm.hpp> #include <glmutils/traits.hpp> namespace glmutils { //! QR-factorization //! \param[in,out] A...
ALGO
0.955188
6.612382
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-06-02T09:46:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "464ae9b9a73...
39d547c1-554b-408b-9584-c4aa66fbc44e
szarbaf/Project-Euler
49.cc
/* The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another. * * There are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, exhibiting...
ALGO
0.999522
4.482161
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2018-02-10T20:55: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": "f21a3efe0...
fc325ac4-ce02-4ef6-9723-7218ffb6c4e7
Kaluox/MatriceGaussJordan
code/CMatriceGaussJordan.cpp
template<class T> void CMatriceGaussJordan<T>::MGJEchangeLignes(unsigned int uiIndexOne, unsigned int uiIndexTwo) { CMatriceExtractor<T> *MAEMatriceExtractor = new CMatriceExtractor<T>(pMGJMATMatrice); CMatrice<T> tmpLigne1 = MAEMatriceExtractor->MAEgetLigne(uiIndexOne); CMatrice<T> tmpLigne2 = MAEMatriceE...
ALGO
0.999094
3.165443
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-05-27T14:26: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": "47bcec10e...
c6e2376c-69ba-413e-8c82-586573ec28d2
Wang-Jun-Chao/Huawei-OJ
032-4348-二维数组的列排序/source/OJ.cpp
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include "oj.h" // 功能:排列一个m行n列 大小的数组 // 输入: int * pArray 指向数组第一个元素的指针,m为行数, n为列数 ,请按第i列排列 // 输出:按第i列排序完成后的数组放到入参指定的地址中 (i的取值范围 1 - n) // 返回: // 交换第i行和第j行的数据 void ExchangeRow(int * arr, unsigned int iRow, unsigned int jRow, unsigned int colN...
ALGO
0.999958
3.738622
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2016-01-15T06:05:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39b7d1e54...
3b17a8ed-5c61-4cc2-bc7a-eddbe0cc46f7
desert0616/GCGT
cgr_compressor/cgr_compressor.hpp
#ifndef CGR_COMPRESSOR_HPP #define CGR_COMPRESSOR_HPP #include <string> #include <iostream> #include <cassert> #include <algorithm> #include <vector> using size_type = int64_t; using bits = std::vector<bool>; class cgr_compressor { const size_type PRE_ENCODE_NUM = 1024 * 1024 * 16; int _zeta_k; int _m...
ALGO
0.997473
4.76864
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-06-04T06:00:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1b9f190c...
c4df73cd-02d6-4a31-ae44-e8209d039c07
badoil/cpp
algorithm/week6(binarySearch)/6-e.cpp
// 문제 // 자연수를 원소로 갖는 공집합이 아닌 두 집합 A와 B가 있다. 이때, 두 집합의 대칭 차집합의 원소의 개수를 출력하는 프로그램을 작성하시오. // 두 집합 A와 B가 있을 때, (A-B)와 (B-A)의 합집합을 A와 B의 대칭 차집합이라고 한다. // 예를 들어, A = { 1, 2, 4 } 이고, B = { 2, 3, 4, 5, 6 } 라고 할 때, A-B = { 1 } 이고, B-A = { 3, 5, 6 } 이므로, 대칭 차집합의 원소의 개수는 1 + 3 = 4개이다. // 입력 // 첫째 줄에 집합 A의 원소의 개수와 집합 B의 원소의 개...
ALGO
0.999673
3.968232
{ "github_metadata": { "branch": "master", "commit_count": 379, "repo_created_at": "2022-03-17T06:21: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": "1adcdb36...
ad84ed6f-d398-4a3a-b769-5c9454329175
mtaylor8878/ConnectFourBot
COMP8901_A5/AIPlayer.cpp
#include "AIPlayer.h" #include <vector> using namespace std; AIPlayer::AIPlayer(const Token (*board)[7], const Token &colour) : _board(board), _colour(colour) { int winCount = 0; for (int y = 0; y < ConnectFour::BOARD_HEIGHT; y++) { for (int x = 0; x < ConnectFour::BOARD_WIDTH - 3; x++) { ...
ALGO
0.988106
5.005675
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-05-17T08: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": "9f349b21fb...
3b2b6bfe-2990-4c6e-ab10-0aa53071742f
bangerlee/LeetCode
backtracking/N-Queens.cpp
/* https://leetcode.com/problems/n-queens/ Runtime: 4 ms */ class Solution { private: bool inrow(string& s) { if(s.find('Q')!=string::npos) return true; return false; } bool incol(vector<string>& v,int j,int n) { for(int m=0;m<n;m++){ if(v[m][j]=='Q') return true...
ALGO
0.999917
6.304069
{ "github_metadata": { "branch": "master", "commit_count": 854, "repo_created_at": "2018-12-11T14:27:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83aa0fd...
9f6e3a93-1dd1-4be3-97c1-5875da97dfb6
3000ye/ACM
牛客多校赛/Round-2/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; bool check(ll x, ll y) { for (int i = 0; i <= 20; i ++ ) { ll z = y * y / pow(10, i); if (z == x) return true; } return false; } void solve() { ll x; cin >> x; ll l = 0, r = 1e9; int ...
ALGO
0.999721
4.460171
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-07-17T02:49: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": "fd0408b4d32...
b451d0a7-6fce-4d72-87af-67f03051ab33
Aya-Abouzeid/Socket_Programming
HTTP_Client/request_parser.cpp
/** * CS431 : Networks. * Assignment 1 : HTTP Client * @author <NAME> * Wednesday 31 October 2018 */ #include <cstring> #include <vector> #include <sstream> #include "request_parser.h" #include "constants.h" template<typename Out> void split(const std::string &s, char delim, Out result) { stringstream ss(s)...
WEB
0.965588
3.689929
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2018-11-29T21:00: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": "3b8e75a7d...
dd8eedbd-dc08-4562-a6e7-69a1bde39afb
rachitkatariya/leetforces
GFG/Array/reverseArray.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: void reverseArray(vector<int>& arr) { int i = 0, j = arr.size() - 1; while (i < j) { swap(arr[i], arr[j]); i++; j--; } } }; int main() { Solution solution; ve...
ALGO
0.999815
5.688105
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-12-16T03:43: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": "d150236fc749...
69f85070-8ddd-4704-9295-5d4d42f73b9f
open-problem-solving/baekjoon
02/2912/root2.cpp
#include <iostream> using namespace std; #define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define INT32_INF 0x3f3f3f3f #define INT64_INF 0x3f3f3f3f3f3f3f3f #define LOG2_10_4 14 #define LOG2_10_5 17 #define LOG2_10_6 20 #include <algorithm> #include <math.h> #define MAX_N 300005 #define MAX_C 10004 #...
ALGO
0.999992
4.129855
{ "github_metadata": { "branch": "main", "commit_count": 163, "repo_created_at": "2023-06-28T01:06:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0376b51905...
8d722375-da8a-4fc1-a658-e6a4a93bcf72
enrevol/cpp
spoj/classical/MAX_NUM.cpp
#include <cstdio> #include <cstring> #include <deque> #define m2 std::make_pair typedef std::pair<int, int> p2; char s[101010]; int main() { int tt; scanf("%d", &tt); while (tt--) { int k; scanf("%s %d", s + 1, &k); std::deque<p2> de; int sz = strlen(s + 1); int num = sz - k; int l...
ALGO
0.999934
3.335442
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-03-28T03:24:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2e581de8...
79476b7b-2fae-4512-a007-952c3b126dc4
ayesha-ishaq/OS_Rate_Monotonic_Scheduling
OSprojectv3.cpp
#include <iostream> #include <fstream> #include <unistd.h> #include <sys/types.h> #include <errno.h> #include <cmath> #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <string.h> #include <semaphore.h> #include <iomanip> using namespace std; // GLOBAL VARIABLES // int n_per=1; // Number of hyperperi...
ALGO
0.999125
3.097266
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-07-23T12:57: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": "a1fafdc28845...
cbf272ea-0488-4650-9a40-af7137e5d1bd
wws2003/StudyProjectL2.1
MatrixVectorOperationsOpenCL/OpenCLHelloWorld/classes/consumer/CLVectorInnerMultiplierImpl.cpp
// // CLVectorInnerMultiplierImpl.cpp // OpenCLHelloWorld // // Created by wws2003 on 4/7/16. // Copyright © 2016 tbg. All rights reserved. // #include "CLVectorInnerMultiplierImpl.h" #include "SimplePrototypedCLEngine.h" #include "Util.h" #include <cassert> template<typename T> CLVectorInnerMultiplierImpl<T>::CL...
ALGO
0.923857
6.676329
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-02-19T07:57: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": "bcfb8599f...
01db4fe1-d36e-4027-ba8d-4e59dd78a628
btcup/sb-admin
exams/2559/02204111/1/midterm/1_1_714_5920503688.cpp
#include <iostream> using namespace std; int main() { char objective,type; //5920503688 Chanyanuch Petchthoop float land_cost,build_cost,age,estate_cost,land_tax,y,x; cout<<"Enter objective (living, Agriculture) : "; cin>>objective; if (objective=='L') { cout<<"Enter living typ...
TOOL
0.937043
3.548941
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-04-03T17: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": "2b7aef2584...
03ab011c-fd01-4d90-b2e3-8f0f03ee5e87
mishrabadal/data-structure-program
Recursion/recursion_basic.cpp
#include <iostream> using namespace std; void happy_birthday(int n) { if (n == 0) { cout << n << " happy birthday !"; return; } cout << n << " day left in birthday" << endl; happy_birthday(n - 1); } void natural_number(int n) { if (n == 0) { return; } cout ...
ALGO
0.997342
3.510017
{ "github_metadata": { "branch": "coder-army", "commit_count": 182, "repo_created_at": "2024-08-29T17:50:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e421...
67a27ad7-4ec8-4c86-93ca-762a41643020
audreypa/Finance-lib
include/black_scholes.h
#ifndef BLACK_SCHOLES_H_INCLUDED #define BLACK_SCHOLES_H_INCLUDED #define _USE_MATH_DEFINES #include <iostream> #include <cmath> #include <string> #include "statistics.h" using std::string; //=============== //ANALYTIC FORMULAE //=============== class BlackScholesCall { private: double S; double K; doub...
ALGO
0.997719
6.227812
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-07-24T14:15: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": "9c6777d3a6...
e4353e32-5a85-4ec1-952b-4f4c950466f1
ropod-project/semantic_localisation
wall_detector/src/wall_detector_code.cpp
#include "/home/martin/catkin_ws_test/src/semantic_localisation/wall_detector/include/wall_detector/wall_detector.h" std::tuple<float , float> WallDetector::FitLine( std::vector<int> indices) { std::tuple<float, float> result; int index; point sample; float xsum=0,x2sum=0,ysum=0,xysum=0,a ,b, n; n = indices....
ALGO
0.998874
5.011669
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-10-11T13:33:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d304749f46...
285c295e-7e42-4913-b12c-62d0383ec1d0
zcy05331/code-backup
洛谷/P3008.cpp
#include <bits/stdc++.h> #define R register #define ll long long #define cmax(a, b) ((a < b) ? b : a) #define cmin(a, b) ((a < b) ? a : b) #define sum(a, b, mod) ((a + b) % mod) const int MaxN = 1e5 + 10, MaxM = 2e5 + 10; struct edge { int next, to, dis; }; struct node { int pos, dis; bool operator<(nod...
ALGO
0.999953
4.066013
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2020-02-19T14:44:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8769c3cd2...
6301a0e5-4ec4-4331-a4e7-503a800e377b
horn-ice/sorcar
z3-4.8.4/src/test/lp/lp.cpp
/*++ Copyright (c) 2017 Microsoft Corporation Module Name: <name> Abstract: <abstract> Author: <NAME> (levnach) Revision History: --*/ #include <limits> #if _LINUX_ #include <dirent.h> #endif #include <algorithm> #include <string> #include <set> #include <iostream> #include <sys/types.h> #in...
TEST
0.969324
4.198785
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-10T17:29:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6dfe8ec5c7a...
97b21ca7-55d4-46ed-9c79-fc92e86b4fe5
sweeneychris/TheiaSfM
src/theia/math/rotation.cc
// Copyright (C) 2017 The Regents of the University of California (Regents). // All rights reserved. // // 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...
ALGO
0.997237
7.790918
{ "github_metadata": { "branch": "master", "commit_count": 958, "repo_created_at": "2015-02-11T18:15:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 933, "forks": 280, "issues": 36, "pull_requests": 10 }, "file_meta": { "content_id": "8e...
a38b2465-dcec-4136-8c7b-4fa72191382a
Shivani110/Lee-Algorithm
LeeAlgo.cpp
#include <bits/stdc++.h> using namespace std; #define Rc 10 #define Cc 10 struct Lee_Point { int p; int q; }; struct queue_Nodes { Lee_Point x; int distance; }; bool V(int r, int c) { return (r >= 0) && (r < Rc) && (c >= 0) && (c < Cc); } int no_of_row[] = {1, 0, -1, 0}; int no_of_col[] = {0, 1, 0, -1}; in...
ALGO
0.999938
4.108883
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-05-29T05:34: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": "9673728d93df...
6333d7d4-0459-4d1d-ac8b-156242b29a76
acg7878/PAT_code
CODE/91-100/99/ans.cpp
#include <algorithm> #include <iostream> #include <queue> #include <vector> using namespace std; struct TreeNode { int left, right; // 存储左右子节点的索引 int value; // 存储当前节点的值 }; vector<TreeNode> tree; vector<int> values; int gobal_index = 0; // 用于按中序遍历填充 BST 值 // 中序遍历填充 BST void inorderFill(int root) { ...
ALGO
0.999997
5.492434
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2024-07-20T16:39: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": "ca32a863c97...
a3fd242b-70cf-4e82-918d-745d0df1e098
SeyedAb2/Quera-C_PlusPlus-Tutorial
eko/eko.cpp
#include <iostream> #include <cstring> using namespace std; int main() { int lengthOfWord; string word,tempWord; char charTemp; cin >> word; tempWord = word; lengthOfWord = word.length(); if(lengthOfWord >=1 && lengthOfWord <=20) { for(int i = 1;i<=lengthOfWord;i++) { ...
ALGO
0.999689
4.087295
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-02-06T05:41: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": "17515c743c...
effc410e-0b23-4adc-ac2f-2338ad74857c
david-toth/Scientific-Computing
Exercises/HW 4/hw_4_ex_2.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; void print_high_score (const vector<int> &scores_mod, const vector<string> &names_mod); void print_low_score (const vector<int> &scores_mod, const vector<string> &names_mod); int main () { vector<string> names; ...
TOOL
0.928417
4.619941
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-03-06T01:39: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": "f742269d2...
d55b7e7e-ee72-4e5e-9e0f-28fa8ff8e05a
intel/graph-compiler
legacy/core/src/ops/templates/matmul_core.hpp
/******************************************************************************* * Copyright 2022-2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://...
ALGO
0.968692
7.629518
{ "github_metadata": { "branch": "main", "commit_count": 200, "repo_created_at": "2024-04-18T19:27:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 45, "forks": 17, "issues": 52, "pull_requests": 26 }, "file_meta": { "content_id": "ccfc8f3...
8e6e3d02-bd38-438c-a9be-3359d79872b6
cmzbutqq/SCUTOJ
C++/Basic/8b.cpp
#include <iostream> using namespace std; class Rectangle { protected: int length; int width; public: void Input(int l, int w) { length = l; width = w; } int Area() { return length * width; } } r1; class Rectangular : public Rectangle { int height; public: void Input(i...
ALGO
0.987861
4.356164
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2024-02-12T15:03: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": "e4d78865d2a...
c0e94dcb-24b4-4afa-8802-b38e3967bb95
ManjeetYdv/OperatingSystems
8e-Premptive priority based.cpp
// OS Practical 8: e) Implementation of Preemptive Priority scheduling #include <iostream> using namespace std; #define PId 0 //column 0 store PId #define AvT 1 //column 1 store Arrival Time #define BT 2 //column 2 store Burst Time #define Pty 3 //column 6 store Priority Number #define CT 4 ...
ALGO
0.999992
6.178314
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-02-15T13:40: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": "86d1574aef51...
280320d1-21b7-452a-a386-868512b970cc
climbmax123/Sat-vivification-playground
sat-preprocessor/main.cpp
// // Created by <NAME> on 02.06.24. // #include <fstream> #include <iostream> #include <cstdlib> #include <ctime> #include <set> #include <algorithm> #include <fstream> #include <string> #include <sstream> #include <getopt.h> #include <unordered_map> #include "types.h" #include "sortedwatchedliteralpreprocessing.h"...
ALGO
0.997951
5.330272
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2024-03-18T07:23:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e880e717e4...
6876919a-dcd5-4170-b439-a3c61fd9d0a9
priyankjairaj100/Codeforces-Solutions
contest/1307/a/71289968.cpp
#include <bits/stdc++.h> #include <string> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> //using namespace __gnu_pbds; using namespace std; //#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> //#define ordered_multiset tree<int, null_ty...
ALGO
0.999982
3.625291
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-04-25T03: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": "91f8ae410b...
7170c72e-e1ae-4844-9da9-5ae65e7c7e60
arrows-1011/CPro
AOJ/Volume11/1176.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 32 #define INF (1<<29) typedef pair<int, int> pii; int H, W, S, sum; int u[MAX][MAX]; pii memo[MAX][MAX][MAX][MAX]; int get_cost(int h1, int w1, int h2, int w2) { int cost = 0; for (int i = h1; i <= h2; i++) { for (int j = w1; j <= w2; j++) {...
ALGO
0.999953
3.519628
{ "github_metadata": { "branch": "master", "commit_count": 258, "repo_created_at": "2015-11-18T15:08:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e7831fa...
68a6288a-59b2-41b8-b8c1-ae04029c9d86
danast2/STL_learning
basics_of_working_with_algorithms_STL/al_ex6.cpp
//выполняем поиск элементов в упорядоченных и неупорядоченных векторах #include <iostream> #include <vector> #include <list> #include <algorithm> #include <string> struct city{ std::string name; unsigned population; }; bool operator==(const city &a, const city &b) { return a.name == b.name && a.populatio...
TOOL
0.991877
4.512209
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2024-02-18T15:52: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": "20dea4d64...
b9657891-ad42-4fb4-bde4-e06f4e795d51
MartinKaraivanov/CppAlgorithms
po/praznichnoPatuvane_C1_proleten_2014.cpp
#include<iostream> using namespace std; int broiGradove; int broiDirektniOtsechki; int broiPitanki; int otPitanka[400000]; int doPitanka[400000]; long long otgovori[400000]; int sasedstvo[650][650]; int naiKasPat[650][650]; long long broiNaiKasPat[650][650]; int Bezkrai = 1000000; void floyd(){ for(int i=1;i<...
ALGO
0.999956
4.201723
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-07-24T13:37:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c80f7acdb9c...
7c82fa47-acfa-4da7-b3ae-9948d522c3be
google/monster-mash
third_party/libigl/include/igl/linprog.cpp
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2015 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2....
ALGO
0.99824
5.78387
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-01-28T21:04:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1312, "forks": 182, "issues": 24, "pull_requests": 0 }, "file_meta": { "content_id": "218f48...
b5df0849-ab1e-4da2-b5c8-6f7e848bea53
MijaelTola/icpc
CodeChef/sqrdsub.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--) { int n; cin >> n; vector<int> v(n); for (int &x: v) cin >> x; auto check = [] (auto x) { long long a = -1 , b = 1e9 + 1; whil...
ALGO
0.999874
4.556951
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-08-28T22:47: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": "50ca5a43f3...
26752435-2001-414f-90ce-5cb09fa632db
ucf-cs/Tervel
tervel/containers/lf/priorityqueue-linearizable/src/priorityqueue/mdlist/mdlist.cc
//------------------------------------------------------------------------------ // // // //------------------------------------------------------------------------------ #include <cstdio> #include <cstring> #include <immintrin.h> #include "priorityqueue/mdlist/mdlist.h" #include "assert.h" #define SET_ADPINV(_...
ALGO
0.997112
4.566693
{ "github_metadata": { "branch": "master", "commit_count": 594, "repo_created_at": "2015-07-08T19:34:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 46, "forks": 11, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "70eda9b...
6df712d0-01e1-4a45-b465-0b72dda7e9b8
DonnyPlease/AdventOfCode2023
Day2_2/main.cpp
#include <iostream> #include <sstream> #include <string> #include <map> #include <unordered_map> using namespace std; pair<int,int> getNumber(string line, int i) { // Get number stringstream number; while (line[i] != ' ') { number << line[i]; i++; } return make_pair(stoi(number.str(...
ALGO
0.994541
5.02935
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-12-03T17:11:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aaabd4712...
ce3f0ac3-c12d-4230-a207-1fd12c3dc7f5
najia096/Monte-Carlo-Project
Monte Carlo Simulation.cpp
#include <iostream> #include<utility> #include <time.h> using namespace std; pair <int, int> random_walk(int n){ int x(0), y(0); string direction[] = {"N", "NW", "W", "SW", "S", "SE", "E", "NE"}; for(int i = 0; i < n; ++i){ int r = rand() % 8; if (direction[r] == "N"){ y += 1; } ...
ALGO
0.99979
4.355855
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-12-08T03:48: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": "0d4f6a4c8839...
eb38b66e-b954-4c41-9113-34a210feeb5d
thewidd/DylibLoader
D/A1450.cpp
#include <iostream> #include <vector> #include <algorithm> #include <memory> #include "A1450.h" double A1450::A1450_0(const std::vector<std::shared_ptr<int>>& data) { std::vector<int> values; // Extract the values from shared_ptrs and store them in a vector std::transform(data.begin(), data.end(), std...
ALGO
0.999341
5.652204
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-02T18:55: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": "3dbc3019c697...
187a859e-6e7f-481a-ad74-b0303d2448e4
whdcwsj/leetcode
公司笔试/wangyi0421/exam3.cpp
#include <bits/stdc++.h> using namespace std; vector<int> v; vector<int> d, u, mdata; unordered_map<int, int> ump; int n; bool check(int x) { if (x == 1)return false; for (int i = 2; i <= sqrt(x); ++i) { if (x % i == 0) return false; } return true; } long long calRes(int x) { ...
ALGO
0.999924
3.754386
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2022-04-24T08:33: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": "211cb5ec8...
cebf2d7e-7812-4b96-b5e7-32ae00423b16
younger-1/leetcode-younger
array-medium/189.旋转数组.cpp
/* * @lc app=leetcode.cn id=189 lang=cpp * * [189] 旋转数组 */ #include <iostream> #include <vector> using namespace std; // @lc code=start class Solution { public: // 35/35 cases passed (4 ms) // Your runtime beats 98.86 % of cpp submissions // Your memory usage beats 99.3 % of cpp submissions (9.6 M...
ALGO
0.999978
6.441809
{ "github_metadata": { "branch": "master", "commit_count": 324, "repo_created_at": "2021-01-30T15:09:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8448380...
e994ff5c-623b-474e-97ed-e0bbe5bc657f
gggee/Sorting
Sort/Sort.cpp
#include <iostream> #include <time.h> // time() using namespace std; #define RND(Min,Max) (rand()%((Max)-(Min)+1)+(Min)) #define SIZE 10 void BubbleSort(int mas[]) { // Bubble sort for (int i = 0; i < SIZE; i++) { for (int j = SIZE - 1; j > 0; j--) { if (mas[j] < mas[j - 1]) { swap(mas[j], mas[j - 1]); ...
ALGO
0.999764
4.981623
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-12-11T16:20: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": "3c26100802...
84290d15-5f13-49af-ac6a-4187ab301a43
fbientrigo/dihiggs
dihiggs/src/ModularParamScan.cpp
#include "THDM.h" #include "Constraints.h" #include "DecayTable.h" #include "ParamUtils.hpp" // CSV & config utilities #include <iostream> #include <fstream> #include <cmath> #include <chrono> #include <iomanip> #include <omp.h> #include <vector> #include <memory> #include <sstream> using namespace std; using namespa...
ALGO
0.994285
5.594187
{ "github_metadata": { "branch": "main", "commit_count": 98, "repo_created_at": "2025-01-29T03:01:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "a77fb6dcffb...
04a0d42f-6d89-455e-932d-22a7d242b49a
Vaibhav10sept/DSA
MICSELLANEOUS/find_all_nodes_at_distance_k.cpp
// There are two types of nodes to be considered. // 1) Nodes in the subtree rooted with target node. // For example if the target node is 8 // and k is 2, then such nodes are 10 and 14. // 2) Other nodes, may be an ancestor of target, // or a node in some other subtree. For target node 8 // and k is 2, the node 22 ...
ALGO
0.999968
4.510213
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2022-02-23T11:32: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": "ae503c4ae...
7a31d4a8-6f8c-458f-8a84-14f0adaf5554
monyhar/monyhar
monyhar/base/ranges/algorithm.h
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_RANGES_ALGORITHM_H_ #define BASE_RANGES_ALGORITHM_H_ #include <algorithm> #include <initializer_list> #include <iterator> #include <type_tra...
TEST
0.979918
7.231006
{ "github_metadata": { "branch": "master", "commit_count": 1012846, "repo_created_at": "2021-06-11T07:45:37.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "chromium/chromium", "stars": 3023, "forks": 194, "issues": 248, "pull_requests": 6 }, "file_meta": { ...
0a05fbc6-3fd7-4561-9be3-6f883aab4478
emakryo/cmpro
src/arc108/a.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; template<typename T> ostream& operator<<(ostream &os, vector<T> &v){ string sep = " "; if(v.size()) os << v[0]; for(int i=1; i<v.size(); i++) os << sep << v[i]; return os; } template<typename T> istream& operator>>(istream &is, vector<...
ALGO
0.999869
4.262988
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2017-01-24T09:57: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": "3a281c0c...
940109da-7ad7-425c-9044-955be7c6b24f
notbhuvangab/Competitive-Programming
CodeChef/LONG/June20b/CHFICRM.cpp
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fr first #define sc second #define MOD 1000000007 #define len(x) x.size() #define min3(a, b, c) min(a, min(b, c)) #define max3(a, b, c) max(a, max(b, c)) #define all(v) v.begin(), v.end() #define alla(a, n) a, a + n using namespace std; typede...
ALGO
0.999904
4.899247
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2020-04-29T13:25: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": "fc6bd90be...
b9d1d98a-42e7-47ae-9291-9b83eb4a7625
cms-sw/root
roofit/roofit/src/RooCBShape.cxx
/***************************************************************************** * Project: RooFit * * Package: RooFitModels * * @(#)root/roofit:$Id$ * Authors: ...
ALGO
0.996258
6.403188
{ "github_metadata": { "branch": "master", "commit_count": 61857, "repo_created_at": "2014-02-14T08:31:51.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "root-project/root", "stars": 4, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "conten...
ff5080c9-85c0-4ef0-802e-a9c62d60fd1b
abhishek18124/PPCPPNov2022
02 - January/Lecture 17/004CountPalindromicSubstrings.cpp
#include<iostream> #include<vector> using namespace std; bool isPalindrome(string s) { int i = 0; int j = s.size()-1; while(i < j) { if(s[i] != s[j]) { return false; } i++; j--; } return true; } int main() { string s = "abc"; int n = s.size(); int count = 0; // // time : O(n^3) // // iterate...
ALGO
0.999978
5.205082
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2022-12-10T14:17:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5196135c54...
64c93da6-3eed-4b39-ab1c-b3b5b50b467c
Rechared7230/Cpps-for-OI
P4328.cpp
#include<iostream> #include<queue> using namespace std; int dx[4]={0,0,1,-1}; int dy[4]={1,-1,0,0}; int r,c; struct maaap{ int w,r; char c; bool vis=false,v=false; }m[51][51]; struct pt{ int x,y; }st,ed,wt; int main(){ cin>>r>>c; for(int i=1;i<=r;i++){ for(int j=1;j<=c;j++){ ...
ALGO
0.999864
3.501359
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2021-08-04T12:19: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": "53cdc8c86ed...
639b2376-71d1-4abd-85cc-f1a09754362e
oxSTERBENxo/FINKI
Structured Programming EXAMS/2.10 (ENG).cpp
/*Write a program where a matrix A read from SI (maximum value of dimensions of the matrix is 100) is transformed to a new matrix B. Each element of the new matrix B is sum of positive neighbors of the corresponding element of the matrix A. Print the new matrix B on the standard output. Input A: 1 2 3 4 -1 -2 -3 -4 10...
ALGO
0.999987
4.570909
{ "github_metadata": { "branch": "master", "commit_count": 520, "repo_created_at": "2024-07-15T10:06:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0a5e9ff...
26176008-9e9e-4f0c-b07f-54dee13ef27d
r00tk1ts/OI-Training
leetcode/p121/p121.cpp
#include <chrono> #include <cstdio> #include <iostream> #include <vector> #include <stack> using namespace std; const int maxn = 1e5 + 5; class Solution { public: int maxProfit(vector<int>& prices) { stack<int> stk; int ans = 0; stk.push(prices[0]); int bottom = prices[0]; for(int ...
ALGO
0.999886
4.687624
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2020-12-21T12:26: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": "64419895a...
391e140a-a9c7-4a5d-b6c2-921c1998a706
ctpelok77/kstar
src/search/domain_transition_graph.cc
#include "domain_transition_graph.h" #include "utils/hash.h" #include <algorithm> #include <cassert> #include <iostream> using namespace std; DTGFactory::DTGFactory(const TaskProxy &task_proxy, bool collect_transition_side_effects, const function<bool(int, int)> &pruni...
ALGO
0.991465
6.534866
{ "github_metadata": { "branch": "master", "commit_count": 10539, "repo_created_at": "2020-02-07T01:44:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 7, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "aa1c8...
bf463049-e855-42e0-8382-d3ffc5ef993c
marioyc/Online-Judge-Solutions
Topcoder/Div I/300 - 2.cpp
#include <vector> #include <string> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cs...
ALGO
0.997913
3.63277
{ "github_metadata": { "branch": "master", "commit_count": 364, "repo_created_at": "2010-09-24T16:07:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 603, "forks": 359, "issues": 1, "pull_requests": 9 }, "file_meta": { "content_id": "35f2...
3a837e66-91ff-4b82-b4fa-ec5365c36ecc
yiranran/Audio-driven-TalkingFace-HeadPose
Deep3DFaceReconstruction/tf_mesh_renderer/mesh_renderer/kernels/rasterize_triangles_impl.h
// Copyright 2017 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
ALGO
0.947929
7.635182
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-03-01T05:25:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 766, "forks": 147, "issues": 48, "pull_requests": 11 }, "file_meta": { "content_id": "dbb...
a8a20f9a-1642-47b8-b5fe-6283c55922f6
swapnilsachan03/apna-college-dsa
Chapter 8 - Arrays/binary_seacrh.cpp
#include <iostream> using namespace std; int binarySearch(int arr[], int n, int key) { int start = 0, end = n - 1; while(start <= end) { int mid = (start + end) / 2; if(key == arr[mid]) { return mid; } else if(key < arr[mid]) { end = mid - 1; } else { start = mid + 1; } } ...
ALGO
0.999987
5.130434
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2023-06-06T10:41:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d31cb3a74...
42319066-85b3-4253-a82e-b046f0f00d07
cms-sw/cmssw
RecoEgamma/EgammaPhotonAlgos/src/ConversionFastHelix.cc
#include "RecoEgamma/EgammaPhotonAlgos/interface/ConversionFastHelix.h" #include "RecoTracker/TkSeedGenerator/interface/FastLine.h" #include "TrackingTools/TrajectoryParametrization/interface/GlobalTrajectoryParameters.h" #include "TrackingTools/TrajectoryParametrization/interface/CurvilinearTrajectoryError.h" #include...
ALGO
0.97953
3.982442
{ "github_metadata": { "branch": "master", "commit_count": 251237, "repo_created_at": "2013-06-26T14:09:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1144, "forks": 4480, "issues": 947, "pull_requests": 108 }, "file_meta": { "content_id...
1bce6070-4ba9-470b-862c-e9afb25ff9c0
ishandutta2007/codeforces-v
vercingetorix/normal/443/C.cpp
#include <iostream> #include <vector> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout); #endif int n; char c; int* cards=new int[25]; for(int yu=0; yu<25; yu++) cards[yu]=0; int ans = 8; cin >> n; for(int i=0; i<n; i++) { int x,y; ...
ALGO
0.997253
3.477657
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "c760b97b5e97...
45ffd40a-4f44-4f92-8523-20171303c616
stickp1/fc_openvibe
src/box-algorithms/basic/ovpCBoxAlgorithmARCoefficients.cpp
#if defined(TARGET_HAS_ThirdPartyEIGEN) #include "ovpCBoxAlgorithmARCoefficients.h" #include <cstdlib> #include <cstring> #include <iostream> using namespace OpenViBE; using namespace OpenViBE::Kernel; using namespace OpenViBE::Plugins; using namespace OpenViBEPlugins; using namespace OpenViBEPlugins::SignalProcessi...
ALGO
0.984502
6.39
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-09-18T07:11: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": "5cf815dc37...
206f1bcb-0dc5-4047-9b48-8251a9711d68
trilinos/Trilinos
packages/epetraext/example/model_evaluator/GLpApp/GLpApp_GLpYUEpetraDataPool.cpp
/* //@HEADER // *********************************************************************** // // EpetraExt: Epetra Extended - Linear Algebra Services Package // Copyright (2011) Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retain...
TOOL
0.951348
5.819129
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
57c1ae1e-eb8f-4de4-a7de-e1ba60fd54d0
HachCompany-DRSeries/DRseries
OSS_Licenses_And_Sources/ipl98/source/ipl98/cpp/algorithms/perspective.cpp
/******************************************************************** The Image Processing Library 98 - IPL98 Copyright (C) by <NAME> - <EMAIL> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Softwa...
TOOL
0.992419
6.520237
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-11-15T14:09:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "893976e3bc4...
a9a7559f-2c0c-4891-a8c2-c91dbb952dc4
Kvazimodo51/Lab2-RBPO
student0.1bib21064.Lab2.Variant25.Task1.ixx
module; #include <math.h> export module student0; namespace RBPO { namespace Lab2 { namespace Variant25 { namespace Task1 { export double f1(double x) { double res; res = sqrt((x + 3) / (x - 3)); return res; } export double f2(double x) { double res; x > 3 ? res...
ALGO
0.997794
4.059294
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-10-14T15:44: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": "401874ca64...
cd4bf1d0-945a-4e75-a226-ac6c78077d80
SeongYunKim/Algorithm
Math/1036(36진수).cpp
/* 날짜: 2020-03-30 분류: 수학, 큰 수 연산 TIP: 알고리즘 자체는 어렵지 않지만 long long 자료형으로는 36^50을 처리할 수 없으므로, 직접 36진수 덧셈, 곱셈, 대소비교 등을 구현해줘야 하는 문제(토 할뻔) */ #include <iostream> #include <vector> #include <map> #include <string> #include <algorithm> #pragma warning (disable: 4996) using namespace std; int n, k; string s[50]; map<char, i...
ALGO
0.999972
4.608506
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2020-01-05T21:28:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c13fc16...
1d21e3a9-c1b2-4298-bafd-bf76a287fc18
NekoMio/ACMcode
NeverBeSolved/2018-7-15/UNR3_A_UOJ_389.cpp
#include <bits/stdc++.h> using namespace std; inline int read() { int x = 0, f = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getchar(); } return x * f; } const int MAXN = 2e4 + ...
ALGO
0.999962
3.599599
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2017-07-14T23:35:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89381ef9...
fbd38808-6676-4e33-b7f6-b0bf6209c796
hoang-kim-duc/CompetitiveProgrammingSource
Algorithm_Arena.cpp
#include <bits/stdc++.h> using namespace std; //#define DEBUG typedef long long ll; ll n; ll mod = 1e9 + ll(7); int main() { #ifdef DEBUG freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif cin >> n; ll a = n; ll b = (n-1); ll c = (n-2); if (n%3==0){ a = n/...
ALGO
0.999978
3.698859
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-08-04T10:13: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": "fbc2b314e1...
b14d7d23-78e3-4ef7-8034-b3096df9ff7d
AlexGliesch/competitive-programming
leetcode/cpp/accounts-merge.cpp
#include "includes.h" class Solution { public: vector<vector<string>> accountsMerge(vector<vector<string>>& accounts) { vector<vector<string>> answer; map<string, vector<int>> accountsThatHaveEmail; for (size_t i = 0; i < accounts.size(); ++i) { const auto& a = accounts[i]; set<string> email...
ALGO
0.999708
5.899211
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-05-01T04:18: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": "1c711b246e4...
886684df-3b54-463d-bf0b-8a6ab30ccdea
Mackay-Fisher/Competitive-Programming
CSCE_430/Week9/lw/a.cpp
#include <iostream> #include <string> #include <vector> #include <stack> #include <cmath> #include <unordered_map> #include <string.h> #include <stdio.h> #include <sstream> #include <queue> #include <stack> #include <algorithm> #include <set> #include <map> #include <iomanip> using namespace std; typedef long long ll; ...
ALGO
0.999989
4.008401
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-15T03:00: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": "1e2ede11787b...
413e622e-3c66-448b-9bea-6d29469a5601
aheiberg10X/go
feature_funcs.cpp
#include "feature_funcs.h" float FeatureFuncs::evaluateState( GoState* gs ){ const int features_size = NFEATURES*MAX_EMPTY; float features[ features_size ] = {0}; FeatureFuncs::setBinaryFeatures( gs, features ); float convolutions[ NCONVOLUTIONS * features_size ]; //gaussian convolution ...
ALGO
0.938371
3.570285
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2012-09-27T00:57: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": "14497d60d...
f59b0528-efc8-4663-88e1-4ba9ae08ccb5
SonuRajput1010/DSA_GFG
Medium/Sum of XOR of all pairs/sum-of-xor-of-all-pairs.cpp
//{ Driver Code Starts // An efficient C++ program to compute // sum of bitwise OR of all pairs #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: // Returns sum of bitwise OR // of all pairs long long int sumXOR(int arr[], int n) { //Complete the f...
ALGO
0.999725
5.262138
{ "github_metadata": { "branch": "main", "commit_count": 813, "repo_created_at": "2023-05-09T19:48:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0348d675b9...
80abc218-0d19-46f2-bc43-f4a82b2b7880
maciejratajski1999/advent2022
10/main.cpp
#include <iostream> #include <fstream> #include <vector> #include <map> template<typename T> void printVector(std::vector<T> v){ for (T i : v) std::cout << i << ", "; std::cout << std::endl; } auto sum = [](std::vector<int> v) { int accumulator = 0; for (int i : v) { accumulator = accumulator +...
ALGO
0.999468
5.75548
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-12-02T19:46: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": "6e9e0d5a19b...
6d37f4d6-2cd4-45d3-bce2-848b412ced51
Bocchiid/WZU-Data-Structure-and-Algorithm-25sp
Experiment_02/最长连续递增子序列(求序列)_02解.cpp
#define vc vector #define pb push_back #define ll long long #define ull unsigned long long using ld = long double; #include <iostream> #include <vector> #include <algorithm> #include <cctype> #include <cmath> #include <string> #include <set> #include <map> #include <utility> #include <unordered_set> #include <unordere...
ALGO
0.999998
3.612444
{ "github_metadata": { "branch": "main", "commit_count": 662, "repo_created_at": "2025-03-02T02:31: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": "aab9d93b9c...
6f4d8571-07ff-480c-9d81-d28701aeca26
wyrover/book-code
CPP_cookbok_source/11-32.cpp
#include "matrix.hpp" // recipe 11.13 #include "kmatrix.hpp" // recipe 11.14 #include <iostream> #include <cassert> using namespace std; template<class M1, class M2, class M3> void matrixMultiply(const M1& m1, const M2& m2, M3& m3) { assert(m1.cols() == m2.rows()); assert(m1.rows() == m3.rows()); assert(m...
ALGO
0.999621
5.178509
{ "github_metadata": { "branch": "master", "commit_count": 192, "repo_created_at": "2016-07-24T07:29:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 388, "forks": 248, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e30...
7a7d0d53-a1a2-471d-9130-f13d308266b5
VinayakVispute/DSAChallengeXtreme
Archive/Arrays/reverseTheArray.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; void reverseArray(vector<int> &arr, int m) { int size = arr.size(); for (int i = m + 1; i < m + (size - m + 1) / 2; i++) { arr[size - (i - (m + 1)) - 1] = arr[i] - arr[size - (i - (m + 1)) - 1] + ...
ALGO
0.99997
3.543976
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-01-21T14: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": "dc58f94cfae...
0d0e8e75-ff93-4c41-a83b-44f08b9f0c97
rpsfonseca/SmallRayTracer
IntroRaytracer/src/main.cpp
#include <iostream> #include <fstream> #include <random> #include "ray.h" #include "geometry/Sphere.h" #include "scene.h" #include "Camera.h" #include "Material.h" #include "Lambert.h" #include "Metal.h" #include "Dielectric.h" #include "maths/Math.h" #define MAX_FLOAT 1.0e07f Scene world = Scene(); Vector3 getColo...
ALGO
0.90553
4.439732
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-07-19T11:12: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": "0d6243c7c1...
9d3fa8c7-8ded-479d-b062-82570abd5297
raunak1497/data-structures-and-algorithms
Dynamic programming/subsetSum.cpp
#include <iostream> #include <vector> #include <queue> #include <set> #include <map> #include <string> #include <utility> #include <algorithm> #include <unordered_map> #include <stack> using namespace std; #define max(a, b) (a < b ? b : a) #define min(a, b) ((a > b) ? b : a) #define mod 1e9 + 7 #define FOR(a, c) for...
ALGO
0.999944
4.579449
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-11-18T00:24:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a2079f6f67c...
b101e656-18a7-4f0d-b983-68bcdae81721
rikuTanide/atcoder_endeavor
abc169/abc169_b.cpp
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> //namespace mp = boost::multiprecision; using namespace std; const double PI = 3.14159265358979323846; typedef long long ll; const long double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) //#define rep(i, n) for (ll i = 0; i < (n);...
ALGO
0.999958
3.875152
{ "github_metadata": { "branch": "master", "commit_count": 4423, "repo_created_at": "2020-12-05T04:36: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": "c96b6ec...
d92e9c2b-9eec-4a46-aa50-56bd1640ef12
hsuehkuan-lu/leetcode
editor/en/300_LongestIncreasingSubsequence.cpp
//Given an integer array nums, return the length of the longest strictly increas //ing subsequence. // // A subsequence is a sequence that can be derived from an array by deleting som //e or no elements without changing the order of the remaining elements. For examp //le, [3,6,2,7] is a subsequence of the array [0,3,1...
ALGO
0.999969
6.127111
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2021-03-08T07:36: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": "a3ec5e0475...
9c2a084e-56b8-488b-84ab-9c8c07ef4cd2
Terence-23/RayTracing-in-a-weekend
C++/src/sphere.cpp
#include "sphere.h" bool Sphere::collide(Ray ray){ vec3 oc = ray.origin - origin; auto a = ray.direction.dot(ray.direction); auto b = 2.0 * oc.dot(ray.direction); auto c = oc.dot(oc) - radius*radius; auto discriminant = b*b - 4*a*c; return (discriminant > 0); } const Hit Sphere::collisionNorma...
ALGO
0.99758
5.512678
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2023-06-08T13:41: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": "2aae33f5a86...
54612412-675e-4dff-b8e7-4fe5664c34a9
QMCPACK/qmcpack
src/QMCDrivers/CorrelatedSampling/CSVMCUpdateAll.cpp
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 <NAME> and QMCPACK developers. // // File developed by: <NAME>, <EMAIL>...
ALGO
0.994834
6.161823
{ "github_metadata": { "branch": "develop", "commit_count": 28915, "repo_created_at": "2017-01-11T19:02:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 345, "forks": 147, "issues": 438, "pull_requests": 16 }, "file_meta": { "content_id": ...
b020ea97-2078-4d84-be3a-4d24d45fb15f
lizardmagic/C-Problem-
main.cpp
/////////////////////////////////////////////////////////////////////////////////// // Filename: main.cpp // // Author: <NAME> // // Date Modified: 10/04/2015 // // // /////////////////////////////////////////////////////////////////////////////////// #include...
ALGO
0.997284
3.520077
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-12-30T06:11: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": "21d5ff4b64...
efdd6d4e-1ea3-4737-aeca-3575c9e2139a
bairuofei/Graph-Based_SLAM-Aware_Exploration
src/graph/graph.h
#ifndef _GRAPH_H_ #define _GRAPH_H_ #include <unordered_map> #include <set> #include <eigen3/Eigen/Dense> using namespace Eigen; struct Graph { static const int UnassignedId = -1; static const int InvalidId = -2; struct Vertex; struct Edge; typedef std::set<Edge*> EdgeSet; typedef std::s...
ALGO
0.92985
4.890608
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2023-08-08T02:09:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 118, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "792bf34...
07b27897-5848-467a-bbce-c014f8dc68ac
timkim0106/AdventOfCode2024
7-1.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <unordered_set> #include <fstream> #include <sstream> #include <queue> #include <algorithm> #include <set> using namespace std; // Recursive function to evaluate all combinations void evaluate(const vector<long long>& nums, int index, long long ...
ALGO
0.999952
5.288187
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-12-03T23:52: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": "1bcd37ed7ce...