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
2e3584bb-03b3-451c-ad5f-233d92d1555c
shutalker/bmstu-labs
magistracy/term_1/Fedoruk_V_G/lab4_refactored/MLPApproxNet.cpp
#include "MLPApproxNet.h" #include <fstream> #include <iomanip> #include <string> #include <cmath> #include <random> #include <algorithm> void MLPApproxNet::Init(const Config &conf) { config = conf; inputWeightDim = config.inputVecDim + 1; outputWeightDim = config.inputLayerNeurons + 1; inputLayerWeigh...
DATA
0.982797
5.213654
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2017-03-25T09:48: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": "f7b88841b...
218e5049-e5b3-49a4-903c-31ddebe7a333
ryotaro612/at_c
src/abc238/c.cc
#include <bits/stdc++.h> #include <string> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) ll MOD = 998244353ll; long long modinv(long long a, long long m) { long long b = m, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -=...
ALGO
0.999644
4.721879
{ "github_metadata": { "branch": "master", "commit_count": 2006, "repo_created_at": "2019-07-01T03:51: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": "86f8826...
bb798e05-61ee-410c-b067-5d9b10ab2dda
Yeeunbb/Lecture_Data-Structure
angmu.cpp
#include <cstdlib> //헤더함수. C의 stdio.h와 비슷 #include <iostream> //C++의 헤더함수 using namespace std; const int MAX_STACK_SIZE = 100; //배열의 최대크기 100 typedef int ItemType; //int형 자료형 class Stack{ //stack 클래스 int top; //데이터 값의 위치 ItemType data[MAX_STACK_SIZE]; //크기를 100으로 가지는 int형 배열 public: Stack(); //생성자 ~Stack(); //...
ALGO
0.999707
4.757326
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-10-04T10:17: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": "07adfdcdb...
7601d401-1731-42b4-b245-f890056e2c09
n-stott/mines
boids/src/camera_trackball.h
#ifndef CAMERA_TRACKBALL_H_ #define CAMERA_TRACKBALL_H_ #include <Eigen/Dense> /// Implements a 3D trackball around the Z axis. class CameraTrackball { public: static const float DEFAULT_EULER_YAW; static const float DEFAULT_EULER_PITCH; public: CameraTrackball(); /// Init the camera to look at cen at a d...
TOOL
0.917714
6.989333
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2017-02-08T10:03:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89cf67f78...
37eddbd0-f541-47f3-a40d-c17005bb2230
DIOYF/ray_tracer_rendering
RayTracingTheRestOfYourLife/Src/bvh.h
#pragma once #include "rtweekend.h" #include "object.h" #include "hittable_list.h" #include <algorithm> #include <iostream> // 构建BVH树用于碰撞检测, 首先构建bvh结点,每个bvh结点包含一个可以进行碰撞检测的包围盒 // Note that the children pointers are to generic hittables. They can be other bvh_nodes, or spheres, or any other hittable. class bvh_node : ...
ALGO
0.999264
5.281026
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-02-11T05:16:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee2d86b145a...
5253c6f1-f572-4b92-82fe-e2be344d18d1
dipta007/Competitive-Programming
Codechef/MAY challenge 2018/EDGEST.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <iomanip> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #includ...
ALGO
0.999854
4.195962
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2016-03-27T22:30:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "682c928e0...
c7ebc4a5-cc63-477d-9491-022fc094be1f
Min-swo/BOJ
백준/Gold/1339. 단어 수학/단어 수학.cc
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> using namespace std; #define MAX 10 pair<int, int>prior[26]; int val[26]; bool compare(pair<int, int> a, pair<int, int> b) { return a.second > b.second; } int main(void) { ios::sync_with_stdio(false); cin.tie(N...
ALGO
0.999902
3.981375
{ "github_metadata": { "branch": "master", "commit_count": 618, "repo_created_at": "2024-03-20T08:39:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59372160...
bbd29795-2e26-41ee-98c8-3aa9584c7216
Kirsten-Osborn/GUH2019
DeliveryOptimisation.cpp
// Delivery Optimisation // Program description and information. /* Program used to find the optimal location in great britain to place a logistical hub. The program optimises such tha the cost for delivery is minimised. It does this by taking in a CSV file containing location and population data for the top 100 most...
ALGO
0.999885
3.49967
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-11-16T12:15:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "feb4da72c...
5c160d4a-1f10-4918-abf6-f5d93e198a29
ishandutta2007/codeforces-j
jakube/normal/961/D.cpp
#include <bits/stdc++.h> using namespace std; constexpr double EPS = 1e-9; template <class T> T det(T a11, T a12, T a21, T a22) { return a11 * a22 - a12 * a21; } template <class T> T sq(T x) { return x * x; } template <class T> class Vector { public: Vector(T x, T y) : x(x), y(y) {} Vector& operat...
ALGO
0.999952
5.339926
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:42: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": "0884e7da95b1...
cd114818-3fac-45a8-90c3-233c796058da
Rahaf-Mansour/Programs-in-Cpp
programs in c++/322.cpp
#include <iostream> const int TOTALYEARS = 100; int main() { int ageFrequency[TOTALYEARS] = {}; int currentAge = -99; while ( true ) { std::cout << "Please input an age from one to 100, put -99 to stop\n"; std::cin >> currentAge; if ( currentAge == -99 ) { break; } if ( currentAge > 0 and currentAge < (TOTA...
ALGO
0.96759
3.60093
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-11-12T21:38: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": "6a6a0682ff72...
5458a538-7140-4eb9-97c5-13895948a237
RobinStar520/LeetCode
Medium/994-Rotting Oranges.cpp
// You are given an m x n grid where each cell can have one of three values: // 0 representing an empty cell, // 1 representing a fresh orange, or // 2 representing a rotten orange. // Every minute, any fresh orange that is 4-directionally adjacent to a rotten orange becomes rotten. // Return the minimum number of mi...
ALGO
0.999972
6.091885
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2023-07-22T06:44:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9038f9a184...
04133b13-c3a7-45f8-bcd3-c61ee0d5aa21
IlliaOvcharenko/cpp-2020-random-forest
src/decision_tree.cpp
#include "decision_tree.h" double calc_info_entropy(const target_type& targets) { double s = 0.0; if (targets.empty()) return s; std::map<int, int> count; for (const auto& t: targets) { ++count[t]; } for (auto& c: count) { double p = static_cast<double>(c.second) / targets.siz...
ALGO
0.992581
6.023005
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-02-27T08:13: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": "309008a61d6...
66b1a428-a13b-4715-9bf2-2eddc21906a5
arthinox/chord_identification
Milestone 1 C++ Jiho.cpp
#include "ece420_main.h" #include "ece420_lib.h" #include "kiss_fft/kiss_fft.h" // JNI Function extern "C" { JNIEXPORT float JNICALL Java_com_ece420_lab4_MainActivity_getFreqUpdate(JNIEnv *env, jclass); } // Student Variables #define F_S 48000 #define FRAME_SIZE 1024 #define VOICED_THRESHOLD 123456789.0f float lastFr...
ALGO
0.971587
5.342556
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-11-03T18:54:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcaefe05a92...
76741634-9b3b-4b16-9cf5-cd6f864063c9
rahul557-shah/DSA
Question102.cpp
//Check whether two strings are isomorphic or not #include <bits/stdc++.h> using namespace std; bool Isomorphic(string str1, string str2) { int n = str1.length(); int m = str2.length(); int map1[256] = {0}; int map2[256] = {0}; if (n != m) return false; else { for (int i = 0;...
ALGO
0.999977
5.029264
{ "github_metadata": { "branch": "main", "commit_count": 168, "repo_created_at": "2022-01-10T09:09: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": "331ab3bc32...
31fcda86-4846-4e82-9e29-15f4ad4d8404
qdcampagna/BTODSTARLNUNP_EVTGEN_Model
EvtGenModels/EvtbTosllWilsCoeffNLO.hh
/*********************************************************************** * Copyright 1998-2020 CERN for the benefit of the EvtGen authors * * * * This file is part of EvtGen. * * ...
WEB
0.998584
4.86594
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2022-03-12T20:42:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37797a06679...
3dceb0a6-7154-488a-87fb-2b0545d462f5
foqsi/Beginning-Programming-Assignments
testing/arraysummingtotals.cpp
#include <iostream> #include <iomanip> using namespace std; int main(){ /* //SUMMING ALL THE ELEMENTS OF A TWO DIMENSIONAL ARRAY Table1 const int NUM_ROWS = 5; //Number of rows const int NUM_COLS = 5; //Number of columns int total = 0; //Accumulator int numb...
ALGO
0.97887
5.28335
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2022-12-08T03:26: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": "4733e0883...
27932058-c487-44bf-a6ce-a02cef67e177
mariyaeggs/C_Methodology_Collection
C++_I/W3_PrgAssign2_Eggensperger_M.cpp
//elseif.cpp // Description: Show mastery of the else/if statements // Author: <NAME> // Date: 09.21.2015 // Compiler: Dev-C++ #include <iostream> using namespace std; int main() { string input; cout << "What shape would you like to use, a circle (c) or a square (s)? Type in either a (c) or an (s): \n"; cin >...
TOOL
0.936248
3.023955
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2017-03-10T18:25:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43e7e4f29...
f28e52db-2451-41a6-947d-23c80633c234
maram46/Robot-arm-control
arduino.ino
#include <Servo.h> Servo wrist; Servo hand; double hand_angle=90; double wrist_angle=90; void setup() { Serial.begin(115200); hand.attach(8); wrist.attach(9); hand.write(hand_angle); wrist.write(wrist_angle); } String getValue(String data, char separator, int index){ int found = 0; int strIndex[] = ...
TOOL
0.908773
5.472307
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-08-02T20:19:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63732d14832f...
4334b2c6-4f82-4357-baec-662c99f909aa
maksymbuleshnyi/Algorithms2
common.h
#pragma once #include <cstddef> #include <stdexcept> #include <vector> // -------------------- // -------------------- // Common pivot functions that will be reused across multiple tasks // -------------------- // -------------------- using Pivot_f = size_t (*)(int *, size_t); /** * @brief function that selects piv...
ALGO
0.994806
7.31127
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-11-06T21:30:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0345615f8614...
4928aec9-c293-49ee-a13e-0b1d4877c77b
KaizynX/Code
Luogu/luogT2027_2.cpp
#include <bits/stdc++.h> #define DEBUG using namespace std; const int Maxn = 1e3+7; const int Maxm = 1e2+7; int n, m; int sum[Maxn]; int f[Maxm][Maxn]; // f[i][j] i'th divide after j (i <= m, j < n) inline int calc(int l, int r) { return sum[r]^sum[l-1]; } int main() { scanf("%d%d", &n, &m); for(int i = 1...
ALGO
0.999982
3.773984
{ "github_metadata": { "branch": "master", "commit_count": 351, "repo_created_at": "2018-02-19T10: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": "06d2fffe...
7b844383-9741-41fc-8cc9-6e41580c86ad
saxenaakansha30/algorithm
cpp/GeeksForGeeks/Mathematics/primeFactors.cpp
// // primeFactors.cpp // GeeksForGeeks // // Created by Akansha.Saxena on 24/10/21. // #include <iostream> using namespace std; class Solution { public: // function to check if n is prime bool isPrime(int n) { if(n<=1) { return false; } else if (n == 2 || n == 3)...
ALGO
0.999638
5.183565
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2021-10-23T20:25: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": "176750afd...
343ae4f2-dcc6-46b2-92de-8a3a55fc1379
u-wyh/luogu-code
P5905.cpp
#include<bits/stdc++.h> using namespace std; #define int long long const int MAXN = 3e3+5; const int MAXM = 1e4+5; const int INF = 1e15; int n,m; int head[MAXN]; int nxt[MAXM]; int to[MAXM]; int weight[MAXM]; int cnt=1; int h[MAXN]; int dis[MAXN]; long long ans; queue<int>q; int updatecnt[MAXN]; bool in[MAXN]; bo...
ALGO
0.999964
3.715342
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2025-05-09T09:40: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": "06a63345fef...
4b9d007d-d28b-4b62-936a-f1bb48b8baa0
Arjun3492/DSA
0)NumberTheory.cpp/3)sieveOfEratosthenes.cpp
// Find all the prime numbers less than or equal to n using sieve of eratosthenes // Problem Statement:Given a number N, print all primes smaller than or equal to N. It is also given that N is a small number. // Approach 1: Naive Approach // Time complexity:O(n*sqrt(n)) // Space complexity:O(1) // Approach 2: Sieve...
ALGO
0.999851
5.655001
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2023-08-23T18:10:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c499171e52...
49c5c5c6-c24e-4388-ba19-8db44e1267af
firewood/topcoder
atcoder/abc_179/f.cpp
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> #include <iostream> #include <sstream> #include <numeric> #include <map> #include <set> #include <queue> #include <vector> using namespace std; typedef long long LL; typedef long double LD; typedef pair<LL, LL> II; typedef pair<LL, II> III; ty...
ALGO
0.999677
3.532464
{ "github_metadata": { "branch": "master", "commit_count": 4451, "repo_created_at": "2011-04-18T02:33:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b19a6a...
2a5151e2-839a-41e9-bc6f-11c453036225
manush2312/DSA
Basic_programs/Array Problems/Move Zeros/move0.cpp
/* We will be given an Array as an input and we need to move all the 0's to right side of the array. Examples:- input :- {0, 1, 0, 3, 12} output :- {1, 3, 12, 0, 0} input :- {2, 0, 1, 3, 0, 0, 0} output :- {2, 1, 3, 0, 0, 0, 0} */ #include<iostream> using namespace std; void moveZeroes(int arr[], int n){ ...
ALGO
0.999851
5.031795
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-09-04T06:23: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": "a2bf65884716...
30ccfd1f-630e-4f85-ae9d-c4a65345492d
Wasii25/ADS
c++/11/11.cpp
#include <iostream> using namespace std; template <typename T> void bubblesort(T arr[], int n){ for(int i=0; i<n; i++){ for(int j=0; j<n-i-1; j++){ if(arr[j]>arr[j+1]){ T temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } ...
ALGO
0.999776
5.008763
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-01-11T14:20:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09b6edfa6aa...
dea041f6-bd40-4004-80ba-b83c64e9a885
ishandutta2007/codeforces-a
avinashkartik/normal/154/C.cpp
#pragma optimization_level 3 #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #include<bits/stdc++.h> using namespace std; #define GODSPEED ios:: sync_with_stdio(0);cin.tie(0);cout.tie(0);cout<<fixed;cout<<setprecision...
ALGO
0.999483
3.882852
{ "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": "cff3cbba39b2...
d119cd4b-2490-4a04-9f19-053a01e7adac
aryan3142/Data-Structures-Algorithms
Sorting Algorithms/HeapSort.cpp
#include<bits/stdc++.h> using namespace std; void swap(int *x,int *y){ int temp = *x; *x = *y; *y = temp; } void heapify(int A[],int k,int n){ int greatest = k; int l = 2*k + 1; int r = 2*k + 2; if( l < n && A[l] > A[k]){ greatest = l; } if( r < n && A[r] > A[greatest]){ greatest = r; }...
ALGO
0.999953
4.627019
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-05-09T09:58: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": "e991fff52...
08d42581-25f7-401f-b748-0efedaa21555
bvquoc/CP-Trainning-2021
0 - Contest 2020/VNOI Online 2021/z-Contestants/HP-12 Pham Thanh Son/DECOR.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define forinc(i,a,b) for(int i=a;i<=b;++i) #define fordec(i,a,b) for(int i=a;i>=b;--i) mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int rnd(int l,int r){ return rng()%(r-l+1) +l;} #define fi first #define se second #define pii p...
ALGO
0.999976
3.668997
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2020-06-03T07:47: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": "dd3f051b...
4ab49260-73f4-4303-ae2e-d605723a26a2
hummatli/onvif-qt-server-client
onviflibs/gsoap/gsoap-2.8/gsoap/samples/lu/luserver.cpp
/* luserver.h LU factorization Web service. -------------------------------------------------------------------------------- gSOAP XML Web services tools Copyright (C) 2001-2008, <NAME>, Genivia, Inc. All Rights Reserved. This software is released under one of the following two licenses: GPL or Genivia's license fo...
WEB
0.99247
5.372068
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-08-03T06:59:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 226, "forks": 106, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "9f36a...
bd4303e3-6dd7-4b66-bc38-16e6b3563f61
SamuelKurtzer/SudokuSolver
solver.cpp
#include <vector> #include <string> #include <iostream> #include <random> #include <set> #include <fstream> #include <unordered_map> using namespace std; typedef vector<vector<int>> grid; /* vector<int> listAllRelatedSquares(grid puzzle, int x, int y){ // List all values that are releted to the given square set<in...
ALGO
0.998466
5.330796
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-01-28T00:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c3a3486065...
2f85aa3f-b981-4e42-b411-c14455b57275
LLNL/psuade-lite
Src/Optimizers/NewuoaOptimizer.cpp
// ************************************************************************ // Copyright (c) 2007 Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the PSUADE team. // All rights reserved. // // Please see the COPYRIGHT_and_LICENSE file for the copyrig...
ALGO
0.999317
5.945141
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-02-24T19:01:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "9515a7c73be3...
a03578d9-1eb1-4347-ac04-dcc15747f1dc
TheUnicat/competitive-pwogramming
usaco/silver/2019/February/2_painting_the_barn.cpp
// // Created by TheUnicat on 2024-07-03. // #include <fstream> #include <sstream> #include <string> using namespace std; int prefix_sums[1001][1001]; int good_tiles = 0; int main() { ifstream infile("paintbarn.in"); string line; getline(infile, line); int n, k; istringstream iss(line); iss >...
ALGO
0.999814
5.35454
{ "github_metadata": { "branch": "main", "commit_count": 290, "repo_created_at": "2024-05-12T07:59: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": "7fe510fcd0...
120e3ef0-c235-4714-ba27-7143c57d0495
Deejai007/CP-Solutions
CodeForces/GNU C++17/1512D | Corrupted Array/189752353.cpp
/*~CF~10/10/22:*/ #include <bits/stdc++.h> #define int long long #define rd(x) \ int x; \ cin >> x #define read(x, y) \ int x, y; \ cin >> x >> y #define all(x) (x).begin(), (x).end() #define get(a, n) \ int a[n]; \ for (int i = 0; i < n; i++) \ { ...
ALGO
0.999535
4.104701
{ "github_metadata": { "branch": "main", "commit_count": 409, "repo_created_at": "2022-11-12T13:43: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": "7336aa8be6...
79c84439-ec0f-42a1-bf27-82cdedcf4417
kenillakhani/DataStructures-Algorithms
Queue/Implementation.cpp
#include <iostream> using namespace std; class Queue { public: int front, rear, size; int *array; Queue() { size = 10000; array = new int[size]; front = rear = 0; } public: void enqueue(int data) { if (rear == size) { cout << "Queue is ful...
ALGO
0.993837
4.004535
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-06T07:47: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": "471ec1d25ace...
1cfd4193-1f06-4e8c-a86f-3200a1053d18
rsln-s/aggregative-coarsening-for-multilevel-hypergraph-partitioning
packages/rythmos/adapters/gaasp/tpl_src/dense.cpp
/****************************************************************** * * * File : dense.c * * Programmers : <NAME> and <NAME> @ LLNL * * Version of : 25 February 2000 * *--...
ALGO
0.999799
6.098746
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-04-04T20:05:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b068d6266...
965adfac-60f0-42f8-9844-716b8ea50274
cerenarkac21/CS204-Advanced-Programming
hw4/main.cpp
// <NAME> #include <iostream> #include <string> #include <fstream> #include <sstream> #include "strutils.h" #include "DynamicQueue.h" #include "IntQueue.h" #include "DynIntStack.h" using namespace std; struct Command { string commandString; Command * nextCom; // constructor Command::Command(string commandString_...
TOOL
0.970235
3.729593
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2022-02-19T15:50: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": "97e64696a77...
b18bb5a3-5397-41ce-975f-903531007a3f
CERN-PH-CMG/cmg-cmssw
Geometry/TrackerCommonData/plugins/DDPixFwdDiskAlgo.h
#ifndef DD_PixFwdDiskAlgo_h #define DD_PixFwdDiskAlgo_h #include <map> #include <string> #include <vector> #include "DetectorDescription/Core/interface/DDTypes.h" #include "DetectorDescription/Core/interface/DDAlgorithm.h" class DDPixFwdDiskAlgo : public DDAlgorithm { public: //Constructor and Destructor DDPixFw...
ALGO
0.967704
6.730923
{ "github_metadata": { "branch": "heppy_94X_dev", "commit_count": 185721, "repo_created_at": "2013-09-25T08:23:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 19, "forks": 242, "issues": 16, "pull_requests": 1 }, "file_meta": { "content_i...
dbe2ba96-8f90-4e3d-9e2c-cdefb06379c8
yeongjinjeong/ProblemSolving
백준/Silver/10814. 나이순 정렬/나이순 정렬.cc
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; struct Person { int age; int order; string name; }; bool cmp(Person left, Person right) { if (left.age < right.age) return true; if (left.age > right.age) return false; if (left.order < right.ord...
ALGO
0.999688
4.576937
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2024-07-15T04:39:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64ce66644f...
548ec70c-5287-4ccb-a4e5-0416a95ead9b
JuanpaBC/Capstone-G6
Arduino/Servo/Servo.ino
#include <Servo.h> //Imports the library Servo //<NAME> #define trigPin 3 // TriggerSensor #define echoPin 2 // EchoSensor #define servoPin 12 Servo servo; //Defines the object Servo of type(class) Servo int angle = 0; // Defines an integer int SCOOPDELAY = 5; int MAXANG = 170; int MINANG = 0; int duration; int dis...
TOOL
0.909193
5.98837
{ "github_metadata": { "branch": "main", "commit_count": 257, "repo_created_at": "2023-10-21T19:51: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": "ae8d68a7e9...
2e5cedac-1728-447d-abd4-f29d7319b8ec
lazydev01/365DayCPChallenge
lazydev01/day_755.cpp
#include <bits/stdc++.h> using namespace std; #ifdef ONLINE_JUDGE #define cerr if(0) cerr #endif #define int long long int #define endl "\n" #define YES cout<<"YES\n" #define NO cout<<"NO\n" void entertainmentInMac(){ int t; cin >> t; while(t--){ int k; cin >> k; string s; ...
ALGO
0.999992
4.626593
{ "github_metadata": { "branch": "main", "commit_count": 1059, "repo_created_at": "2022-12-18T09:37:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62238018a...
41c26836-5b12-4a00-b4ae-9d906447daf8
qhoa256/PTIT-CODE-DSA
Thuc Hanh Lan 1/A.NGUOI_DU_LICH.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int n, c[1005][1005], cmin = INT_MAX, visited[1005], x[1005], ans = INT_MAX; vector<vector<int>>res; void Try(int i, int sum) { for (int j = 2; j <= n; j++) { if (!visited[j]) { x[i] = j; visited[j] = 1; sum += c[x[i - 1]][x[i]]; if (...
ALGO
0.999902
3.547545
{ "github_metadata": { "branch": "main", "commit_count": 92, "repo_created_at": "2023-02-28T16:05:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd0ddb877c...
31c08709-6c95-4aa0-98f7-a24a5c1f4cd3
tyNAKAMOL/WebApplication1
coding/GATE.cpp
#include<stdio.h> int NAND(int x, int y) { if (x == 1 && y == 1)return 0; else return 1; } int NOR(int x, int y) { if (x == 0 && y == 0)return 1; else return 0; } int XNOR(int x, int y) { if (x == y)return 1; else return 0; } int XOR(int x, int y) { if (x != y)return 1; else return 0; }...
ALGO
0.997507
3.641447
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2020-08-06T05:31:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7fb71155...
ca379fff-d81f-4e9e-a77c-2d94bc3d3c1a
prostodiva/practiceCode
c++/linkedList/practice/Palindrome/ref.cpp
//A string is a palindrome if it reads forward and backward in the same way #include <iostream> #include <string> using namespace std; template<typename T> struct Node { T data; Node* next; Node(T value) : data(value), next(nullptr) {}; }; template<typename T> void InsertAtBack(Node<T>*& head, T value) ...
ALGO
0.999396
5.035289
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2025-05-23T17:08: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": "61dc150c1a7...
af15a481-f632-4e1a-ae96-4bff1c0f12f1
DuyMinh0102/My_Work
BIG NUM/tonguoc/tonguoc.cpp
#include <bits/stdc++.h> using namespace std; string s = ""; int n; void Init(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); freopen("tonguoc.inp", "r", stdin); freopen("tonguoc.out", "w", stdout); } string nhan(string x, long long y){ string ans = ""; long long nho = 0, curr; ...
ALGO
0.999977
4.307893
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-12T06:36: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": "f1143360f036...
836011af-c663-4d1c-83c9-8ec929e67ecb
Rahaf200/student_calculator
Student_calculator/Student_calculator.cpp
#include <iostream> using namespace std; int calculateTotal(int marks[], int numSubjects) { int total = 0; for (int i = 0; i < numSubjects; i++) { total += marks[i]; } return total; } double calculateAverage(int total, int numSubjects) { return (double)total / numSubjects; } char calcula...
TOOL
0.989256
5.307971
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-03-03T18:42: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": "6dd2c644ef...
50c5a05f-0915-415c-9dea-6c7f9cd3e900
gwdevhub/GWToolboxpp
GWToolboxdll/Windows/Pathfinding/MathUtility.h
#pragma once #include <GWCA/GameContainers/GamePos.h> namespace MathUtil { //Interception on a straight line segment. This function assumes that there are no obstacles for any agent. GW::Vec2f intercept(const GW::Vec2f &chaser, const float &chaser_vel, const GW::Vec2f &target, const GW::Vec2f &directio...
ALGO
0.988178
4.015672
{ "github_metadata": { "branch": "master", "commit_count": 6395, "repo_created_at": "2016-09-02T23:23:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 178, "forks": 92, "issues": 109, "pull_requests": 3 }, "file_meta": { "content_id": "050...
65633979-de84-44b8-bb82-6d578476cfe0
juanmaarg6/FP
practicas/practicas_2ª_matricula/entrega_ejercicios_sesion_6/III_RedondearDecimal_Funcs.cpp
/* Relación de ejercicios 3 Ejercicio 13: Programa que, dado un número real y un número de cifras decimales al cual queremos redondear, calcula el redondeo del número real. Entradas: Un número real (numero), Número de cifras decimales al cual queremos redondear (redondeo). Salida...
ALGO
0.996366
4.094065
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-02-12T17:34:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "904f572635b...
faf053c6-2c63-4a46-8472-7c6321922750
DuyMinh0102/My_Work
30 - 7/SORTING012/SORTING012.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6; int n, t; int a[maxn+5]; int cnt[3]; void Init(){ freopen("SORTING012.INP", "r", stdin); freopen("SORTING012.OUT", "w", stdout); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } void Solve(){ cin >> t; while(t--){...
ALGO
0.999923
3.362899
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-12T06:36: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": "8266636c38e4...
bf260618-6e00-4283-84b1-30efb58bc5a8
Sookmyung-Algos/2021algos
algos_assignment/3rd_grade/심채영_vision0101/week1/1926.cpp
#include <iostream> #include <algorithm> #include <queue> #include <string> using namespace std; // pair의 값을 X, Y로 불러옴. #define X first #define Y second int board[502][502]; // 그려짐 = 1, 안 그려짐 = 0 bool vis[502][502]; // 방문하면 1 int n, m; // 행, 열, int num = 0; // 그림 수 int area = 0; int max_area = 0; // 가장 넓은 그림 int dx[...
ALGO
0.999455
4.17632
{ "github_metadata": { "branch": "master", "commit_count": 5558, "repo_created_at": "2021-02-22T06:32:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2b5eef...
86f3d075-ab92-49dd-9afa-5e843fe0c05b
Apress/beginning-cpp20
Examples/NoModules/Chapter 07/Ex7_05.cpp
// Searching within substrings #include <iostream> #include <string> int main() { std::string text; // The string to be searched std::string word; // Substring to be found std::cout << "Enter the string to be searched and press Enter:\n"; std::getline(std::cin, text); std::cout << "Enter t...
ALGO
0.992712
5.724715
{ "github_metadata": { "branch": "main", "commit_count": 240, "repo_created_at": "2020-10-02T13:57:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 171, "forks": 74, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "b1918ebe...
11c78bb1-2e1e-4f6e-b467-328657a86c09
cowpybara/LogicaAlgoritmosG4
ejerciciosFor/ejercicio5.cpp
/*Para un grupo de clase de 8 estudiantes, realice un programa que permita calcular y dar como salida lo siguiente: ✓ Cantidad de alumnos aprobados ✓ Cantidad de alumnos reprobados ✓ Promedio general del grupo Nota mínima para aprobar: 70*/ #include <iostream> using namespace std; void promedio() { int alumnos = ...
TOOL
0.979282
4.023046
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2024-04-02T19:53:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1001804f5aa...
c0cd4790-93e3-441f-8d77-1312b6f83f27
xnmng/LeetCode
0988-smallest-string-starting-from-leaf/0988-smallest-string-starting-from-leaf.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99995
5.595312
{ "github_metadata": { "branch": "main", "commit_count": 4708, "repo_created_at": "2022-08-08T03:21: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": "28d656dc4...
91ddcbb1-11a5-4f9b-972c-c924481c6cb8
joaopfg/SIFT-algorithm-for-feature-detection
main.cpp
#include <bits/stdc++.h> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> using namespace std; using namespace cv; //SIFT implementation //////////////////////////////////////////// const float sigma = 0.5; const float k = sqrt(2.0); const float contrast_threshold = 0.03; const float magn...
ALGO
0.998972
4.297119
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-05-29T15:40: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": "be2159dbac...
5ac713fa-5cae-4042-973d-8430b4011177
ThinhIT137/CTDL
Bai_B/BSTset.cpp
#ifndef tree_cpp #define tree_cpp 1 #include <bits/stdc++.h> #include "node.cpp" using namespace std; template<class T> class BSTSet { private: node<T> *root; // Thêm node void add(node<T>* &t, T data) { if (t == NULL) { t = new node<T>(data); } else { if (data < t-...
ALGO
0.999901
5.125593
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-10T15:57: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": "2b7c1d5b4112...
7f6a040b-fdce-4fd4-bcaa-2e3c0342185b
Sasho80/4.2.ComplexConditions-ExamProblems
01.OnTimeForTheExam.cpp
#include <iostream> #include <string> using namespace std; int main() { int examHours, examMinutes, arrivalsHours, arrivalsMinutes; cin >> examHours; cin >> examMinutes; cin >> arrivalsHours; cin >> arrivalsMinutes; string late = "Late"; string onTime = "On Time"; string early = "Early"; int examTime = (examHo...
ALGO
0.997741
4.259493
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-05-20T21:13: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": "bc6814eea8e...
130b3976-5477-409e-8e98-2640c635adcc
Princess-Pyeonggang-and-Spiderman/Algorithm
wjdrud2532_c++/21608.cpp
// 21608 상어 초등학교 #include <iostream> #include <algorithm> #include <queue> using namespace std; int n; int arr[401][5] = {0,}; int dx[] = { 0, 0, 1, -1 }; int dy[] = { 1, -1, 0, 0 }; int maxFavoriteNum = 0; int maxEmptyNum = 0; int minRowNum = 21; int minColNum = 21; queue<pair<int, int>> q; queue<pair<int, int>>...
ALGO
0.999886
3.500514
{ "github_metadata": { "branch": "main", "commit_count": 492, "repo_created_at": "2022-11-02T04:09:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50b9ae8046c...
e626e162-63b8-426a-a4d7-42b5ad7ea79b
leeeyupeng/leeeyupeng.github.io
project/algorithm/leetcode2021/src/1172.DinnerPlates_3.cpp
#include"leetcode.h" #define VMAX 100010 class DinnerPlates { private: int capacity; vector<stack<int>*> vs; priority_queue<int,vector<int>,greater<int>> left; priority_queue<int,vector<int>,less<int>> right; int notuseindex; vector<stack<int>*> notuservs; public: DinnerPlates(int capacity)...
ALGO
0.9986
4.971498
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-02-12T02:05:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65cf864ec8...
2933758c-7b32-448c-9478-f5132e4cdabc
AdityaNath0777/A2Z-DSA
03_Arrays/Easy/C++/06_move_zeros.cpp
#include <bits/stdc++.h> using namespace std; void moveZeroes_brute(vector<int>& nums) { int n = nums.size(); vector<int> temp; for (int i=0; i<n; ++i){ if(nums[i] != 0) temp.push_back(nums[i]); } for (int i=0; i<temp.size(); ++i){ nums[i] = temp[i]; } for (int i=tem...
ALGO
0.999989
4.959337
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2024-07-24T18:18:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9829ceb...
3c791e78-ccbe-43ec-a44c-e009096379e3
jomael/NaroCAD
Lib/AlternateWrapper/NaroOccCore/NaroOccCore-build-desktop/OCWrappersExt/out/math/math_Powell.h
// File generated by CPPExt (MPV) // #ifndef _math_Powell_OCWrappers_HeaderFile #define _math_Powell_OCWrappers_HeaderFile // include native header #include <math_Powell.hxx> #include "../Converter.h" #include "math_Vector.h" #include "math_Status.h" #include "math_Matrix.h" namespace OCNaroWrappers { ref class O...
TOOL
0.941244
5.65398
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-05-07T04:31:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6a9380d7...
7cd4e3b7-01aa-4307-bbb1-ab8321646997
zchee/cuda-sample
4_Finance/binomialOptions/binomialOptions_gold.cpp
/* * Copyright 1993-2015 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related...
ALGO
0.999912
6.634152
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-10-06T22:31:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 371, "forks": 179, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "74f9e1...
6acea3b1-7945-475e-85ad-9f1c360ad46d
manoflearning/cp-codes
Google Code Jam/2022/Round 1C 2022/C.cpp
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #include <cassert> using namespace std; #define ll long long #define ull unsigned long long #define ld long double #define pii pair<int, int> #define pll pair<ll, ll> #define fr first #define sc second #define vt vector #define all(c) (c).begin(), (c).end() #define sz(...
ALGO
0.999951
4.780247
{ "github_metadata": { "branch": "main", "commit_count": 1899, "repo_created_at": "2020-08-06T14:38: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": "267440674...
88a4d2be-f426-4f7e-a539-891fb043cd27
jpoffline/bst
lib/linked_list.h
#pragma once #include <iostream> #include <ostream> #include <vector> /////////////////////////////////////////////////////////////////////////////////////// /// Definition of the linked list node. template <class KY> class NODE { private: KY data; NODE* next; public: NODE() {}; KY get_data() {return data;}...
TOOL
0.943058
5.361622
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-09-16T10:27: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": "4ebc13b47a...
adcadc6f-8d43-42e3-bbd0-f3ca1fe86978
swraj28/DSA_Revision
C++/11. Sorting & Searching/019.Leetcode_1283_Find the Smallest Divisor Given a Threshold.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define ff first #define ss second #define pb push_back #define mp make_pair #define mod 1000000007 #define ms(arr, v) memset(arr, v, sizeof(arr)) #define bct(x) __builtin_popcountll(x) #define all(v) (v).begin(),(v).end() ...
ALGO
0.999926
5.087899
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2022-03-21T03:54: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": "e30064a19...
c36f9b0b-504b-426f-b4d7-433b29b11db7
MaheshChowdary2004/C-
sum of two arrays.cpp
#include <iostream> #include <vector> std::vector<std::vector<int>> sum(const std::vector<std::vector<int>>& matrix1, const std::vector<std::vector<int>>& matrix2) { std::vector<std::vector<int>> result; size_t rows = matrix1.size(); size_t cols = matrix1[0].size(); result.resize(rows, std::vector...
ALGO
0.999947
6.082292
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-01T08:31: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": "1cbf9fc8497e...
d5ba0099-7e86-4ea5-8cdf-b7436fafce04
M-Rodrigues/Programming
InterviewBit/13 Dynamic Programming/Length of Longest Subsequence/main.cpp
int Solution::longestSubsequenceLength(const vector<int> &A) { int N = (int)A.size(); if (N == 0) return 0; vector<int> lisd(N), lisr(N); /* normal lis */ for (int i = 0; i < N; i++) { lisd[i] = 1; for (int k = 0; k < i; k++) { if (A[k] < A[i]) l...
ALGO
0.999975
5.183164
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2019-01-13T14:53: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": "cc955f1d5...
efe4c17a-22a0-462a-872a-c6b574c2f76c
mikasaw/-
LeetCode/101.二叉树对称.cpp
给定一个二叉树,检查它是否是镜像对称的。 例如,二叉树 [1,2,2,3,4,4,3] 是对称的。 1 / \ 2 2 / \ / \ 3 4 4 3 但是下面这个 [1,2,2,null,3,null,3] 则不是镜像对称的: 1 / \ 2 2 \ \ 3 3 说明: 如果你可以运用递归和迭代两种方法解决这个问题,会很加分。 //采用递归的方法 class Solution { public: bool isSymmetric(TreeNode* root) { return isMirror(root,root); ...
ALGO
0.999987
5.735142
{ "github_metadata": { "branch": "master", "commit_count": 227, "repo_created_at": "2020-02-22T01:48:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47a3b1a3...
3ba3bc49-9ef6-4386-9531-c759ea096b7e
m-lopez/dimitri_lib
congruence/congruence.hpp
// Copyright 2013 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
ALGO
0.99654
5.327349
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2013-12-26T03:34:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96e5f0e04...
c35c5c9e-bb63-4e98-bd47-182f64e04bef
SamudraMitra/CodeISM26
Long Challenge/Binary Search Long Challenge/R.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define totalboxes(x) totalBoxes(reds, blues, a, b, x) ld totalBoxes(ll reds, ll blues, ll a, ll b, ll ared) { reds = reds - a * ared; blues = blues - b * ared; ld more = min((reds * 1.0) / b, (1.0 * blues) / a); ...
ALGO
0.999903
4.096711
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-10-24T06:45:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f42d1ef529...
bd05a37c-9605-43f0-93f9-f2f557b5e889
mohitmehar20/01_MyRepository
DSA/SortingAndSorting/selectionSort.cpp
#include <iostream> using namespace std; void selectionSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { int minIndex = i; for (int j = i + 1; j < n; j++) { if (arr[j] < arr[minIndex]) minIndex = j; } swap(arr[minIndex], arr[i]); ...
ALGO
0.99996
4.210492
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2023-11-01T13:11:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27f09a062ce...
44c80a42-3aa5-4600-8d2a-674c01f54032
dmentock/solver_cpp
src/grid/discretization_grid.cpp
#include <iostream> #include <mpi.h> #include <fftw3-mpi.h> #include "discretization_grid.h" void DiscretizationGrid::init(bool restart, std::string& vti_file_content) { MPI_Comm_rank(MPI_COMM_WORLD, &world_rank); MPI_Comm_size(MPI_COMM_WORLD, &world_size); cout << "World Size: " << world_size << " Rank: " <...
ALGO
0.967887
3.617667
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2023-03-31T17:09:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9e49b35481...
58997ac8-db78-4ed9-b633-32e6408df31b
sonmansu/algorithm-2022
14_Fragment/main.cpp
#include "../smtool.h" #include <bits/stdc++.h> using namespace std; vector<string> input; int finish = 0; void printInput(){ for (int i = 1; i < input.size(); i++) { printf("%2d: %s\n", i, input[i].c_str()); } } /* find kth element */ vector<int> findElement(int &k, const map<char, vector<int>> &buc...
ALGO
0.999614
3.916202
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2022-03-06T09:09: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": "247501428df...
df48238c-538f-491c-8b4c-8fd039d63196
GregMakasoff/CPLusPlusProjects
Assignment1/main.cpp
#include "matrix.hpp" /** * opens the text file containing the connectivity matrix * @param title used for file name * @return a vector filled the matrix */ static vector<double> openFile(const string& title) { fstream file; vector<double> matrix; matrix.resize(16); file.open(title); if (!file.i...
ALGO
0.996971
3.72031
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-01-28T18:46: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": "fd7b5cd4d1...
71f59d04-c5b3-43e4-9530-f1b2dae4d126
wolf2lyon/Clases_progra2_2021
Semana 7/Carretera/Terrestre.cpp
#include "Terrestre.h" #include <iostream> #include <conio.h> using namespace System::Drawing; using namespace std; Terrestre::Terrestre() { obj_terrestre = new ArrBase_Movimiento(); } Terrestre::~Terrestre() { delete obj_terrestre; } void Terrestre::Crear_Vehiculos(int MAXW, int MAXH) { variante = rand() % 4;...
TOOL
0.925766
3.394927
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2021-04-02T15:30: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": "8c8d972b773...
c4c2f7b8-46b7-4fa5-8c2a-509df4535c9a
Amin747/My-Codes
1011 Capacity To Ship Packages Within D Days.cp
class Solution { public: int shipWithinDays(vector<int>& weights, int D) { int minc = 0; int total = 0; //Get the upper and lower bounds of the binary search for(auto w : weights) { minc = max(minc, w); //Get maximum single weight (capacity must...
ALGO
0.999982
6.108038
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2020-01-30T08:25: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": "d5a85fe1...
4fa86d63-6e86-4289-8928-4b8dd21bcc14
DyogoBendo/cp
cf/941-div2/b.cpp
#include <bits/stdc++.h> using namespace std; int grid[500][500]; int check_first(int n, int m){ int superior_color = grid[n - 1][m - 1]; int lowest_first_column = -1; for (int i = n - 1; i > 0; i--) { if(grid[i][0] == superior_color){ lowest_first_column = i; break; ...
ALGO
0.999982
5.061148
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2024-12-23T14:07:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1d610e136...
d0636b51-ea8d-4df9-89d1-54b76686ed31
lrw04/raycaster
raycaster/main.cpp
#include <algorithm> #include <iostream> #include <fstream> #include <vector> #include <string> #include <cstdio> #include <cmath> #include <ctime> #include <SDL.h> #ifndef M_PI #define M_PI 3.14159265358979323846264338327950288 #endif int SW, SH, BLK; double FOV, WALK, TURN; SDL_Window* window = NULL; SDL_Renderer...
ALGO
0.998063
4.38496
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-07-27T03:55: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": "2f5c8738db...
c2fcd982-bc74-41ff-bb47-08224fee9bd7
AntonioRegin/Evolutionary_Computing
A2/Solution.cpp
// // Created by mithr on 9/17/19. // #include <iostream> #include <string.h> #include <fstream> #include "Globals.cpp" #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpragma-once-outside-header" using namespace std; #ifndef S_ #define S_ double eval(int pj[]); const int SolutionSize = 150; //in ...
ALGO
0.999113
3.241446
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-09-10T23:39: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": "dce08aefdd...
a86d04de-5402-43bb-90f8-8d01ab846ab6
KF8311/COMP2011
lab1/lab1.cpp
// Lab1: Pass or Fail #include <iostream> using namespace std; int main() { // Set the overall precision to avoid displaying too many decimal places cout.precision(5); // The following constants are used so that we can change these values later const double PASSING_OVERALL = 36; const double PASSI...
TOOL
0.957434
5.648319
{ "github_metadata": { "branch": "main", "commit_count": 167, "repo_created_at": "2025-02-04T00:20:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9b5da67b4...
f7ab6239-64f6-4956-a2d1-980a88ce04ae
483759/AlgorithmSolutionStorage
C++/AlgorithmSolutionStorage/AlgorithmSeminar/11000/11724.cpp
#include <cstdio> #include <vector> #include <stack> using namespace std; vector<int> graph[1001]; bool visit[1001]; int N, M, cnt; void dfs(int node) { stack<int> s; s.push(node); while (!s.empty()) { int cur = s.top(); s.pop(); visit[cur] = true; for (int a : graph[cur]) { if (visit[a])continue; s.pus...
ALGO
0.999934
4.216386
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2019-04-15T11:53: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": "f5f4b2ab6...
9c619120-f7cf-403a-813b-6ada22380b8a
bjarkimb/EQ2443-2445-Project-Group2
include/gnuradio/digital/costas_loop_cc.h
/* -*- c++ -*- */ /* * Copyright 2006,2011,2012,2014 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or ...
ALGO
0.942496
7.726919
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-12-19T09:13:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "645da555a7...
b74219d1-1ffd-4de0-9c6e-d366c9b3fd17
nullishzero/PDFEdit
src/utils/algorithms/basic_algos.h
/* * PDFedit - free program for PDF document manipulation. * Copyright (C) 2006-2009 PDFedit team: <NAME>, * <NAME>, * <NAME> * Former team members: <NAME> * * This program is free software; you can redistribute it a...
ALGO
0.997841
5.815371
{ "github_metadata": { "branch": "gui-jm", "commit_count": 2952, "repo_created_at": "2012-03-09T11:35:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 93, "forks": 36, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d74cc...
7ae8c0e8-ee98-4ac7-89fc-9c84f080079f
vanitas-23/Daily_progress
2121-find-if-path-exists-in-graph/find-if-path-exists-in-graph.cpp
class DisjointSet { public: DisjointSet(int n) : N(n), sz(n), pars(n, -1) { } void reset() { sz = N, fill(pars.begin(), pars.end(), -1); } int find(int x) { return pars[x] < 0 ? x : pars[x] = find(pars[x]); } int size() { return sz; } int count(int x) { return -pars[f...
ALGO
0.999979
5.94916
{ "github_metadata": { "branch": "main", "commit_count": 2888, "repo_created_at": "2023-09-20T13:45: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": "bd38b6779...
beb81938-a4bf-43fc-ad1b-b41c0b0d1c61
KR-penguin/Colatsu-conjecture
Colatsu conjecture/Colatsu conjecture/Colatsu conjecture.cpp
#include <iostream> using namespace std; void Colats(unsigned long a) { while (a != 1) { if (a % 2 == 0) { cout << a << endl; a /= 2; } else if (a % 2 == 1) { cout << a << endl; a *= 3; a++; } } ...
ALGO
0.999829
4.072675
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-09-28T21: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": "964a4403f496...
748a178c-fb81-4b49-abb0-ac53244d3921
kaldi-asr/kaldi
src/ivectorbin/compute-eer.cc
// ivectorbin/compute-eer.cc // Copyright 2013 <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 a copy of the License at // // http://ww...
ALGO
0.996419
6.85189
{ "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":...
b577d9b8-7eaa-404d-91e9-d5229e2ad430
KunalKaushikk/Practice
Data Structure & algo/dsa practice/someprograms.cpp
#include <bits/stdc++.h> #include <math.h> using namespace std; /* Reverse int main() { int num; int reverse = 0; cin >> num; while (num > 0) { int lastdigit = num % 10; reverse = reverse * 10 + lastdigit; num = num / 10; } cout << reverse; return 0; } */ /* armst...
ALGO
0.999848
3.900006
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-10-10T18:40: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": "2af1cc57d5a0...
40873683-d8b4-43d6-b40f-d69f656cc256
amansaxena1/Coding
codeforces/A_Rock_paper_scissors.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if((a =="rock" && b == "scissors" && c =="scissors" ) || (a == "paper" && b =="rock" && c =="rock") || (a =="scissors" && b == "paper" && c == "paper")){ cout<<"F"; } else if((b =="rock" && a == "scissors"...
ALGO
0.999994
3.676172
{ "github_metadata": { "branch": "master", "commit_count": 162, "repo_created_at": "2020-10-10T13:21:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "839365ec...
2a0a1af2-3705-4a6b-a99f-ccd64e1e0eb1
phatcvo/adas
common/numerics/vector.h
/////////////////////////////////////////////////////////////////​//////// /// @file vector.h /// @brief Define vector type /// @author /// @date 10/5/2017 /// @version 1.0.1 /////////////////////////////////////////////////////////////////​//////// #ifndef _ADAS_VECTOR_H_ #define _ADAS_VECTOR_H_ ///////////////////...
TOOL
0.915344
6.609821
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-06-01T15:08:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb3d39c590...
bfc05bd2-1bf1-402b-ac25-6dce8cf60297
willyistaken/Competitive-Programming
codeforce/1817B.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; //#include<bits/extc++.h> //__gnu_pbds vector<int> side[2005]; int p[2005]; int cnt[2005]; bool incircle[2005]; int bot ; int top ; void clean(int n){ for(int i=1;i<=n;i++) { p[i] = 0; incircle[i] = 0; } bot = 0; top = 0; } void dfs(int cur...
ALGO
0.999944
4.265935
{ "github_metadata": { "branch": "main", "commit_count": 386, "repo_created_at": "2021-12-08T13:26:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac10b77d9e...
1f473c8a-b0f3-4a20-9b82-ebb4e6ec9bb1
Ujjwal2327/Love-Babbar-Yt-Playlist-Practice
cpp56.cpp
#include<bits/stdc++.h> using namespace std; vector<int> nextSmallerElement(vector<int>&arr){ vector<int>ans=arr; stack<int>st; st.push(-1); int i= arr.size()-1; for(; i>=0; i--){ if(st.top()<arr[i]){ ans[i]=st.top(); st.push(arr[i]); } else{ ...
ALGO
0.999981
5.138032
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-02-23T09:42:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63b9e5ae81...
78b778bf-ccce-4140-a3f3-2e51b6cb227d
thirofoo/atcoder-archives
abc345/abc345_c_51290361_AC.cpp
/* * Author: through * Submission URL: https://atcoder.jp/contests/abc345/submissions/51290361 * Submitted at: 2024-03-16 21:10:01 * Problem URL: https://atcoder.jp/contests/abc345/tasks/abc345_c * Result: AC * Execution Time: 4 ms */ #include <bits/stdc++.h> using namespace std; using ll = long long; using ld ...
ALGO
0.999991
4.297897
{ "github_metadata": { "branch": "main", "commit_count": 5513, "repo_created_at": "2022-12-17T09:45:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "f44dd2804...
f2315ee3-208f-4462-83e9-e66464be320e
Artimary/itmo-cxx-labs
lab4/main.cpp
#include <iostream> #include <vector> #include <chrono> #include "CustomVector.h" #include "CustomMatrix.h" std::vector<double> stlVectorAddition(const std::vector<double>& v1, const std::vector<double>& v2) { std::vector<double> result(v1.size()); for (int i = 0; i < v1.size(); ++i) { result[i] = v1[i] + v2[i]; ...
TEST
0.996784
5.569034
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-10-07T13:38:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0300609940af...
73a2cf77-7267-4830-8b96-7cf0ad31abed
cataclysmbnteam/Cataclysm-BN
src/ballistics.h
#pragma once class Creature; class item; class dispersion_sources; class vehicle; struct dealt_projectile_attack; struct projectile; struct tripoint; /** Aim result for a single projectile attack */ struct projectile_attack_aim { ///< Hit quality, where 0.0 is a perfect hit and 1.0 is a miss double missed_by;...
ALGO
0.996299
6.643137
{ "github_metadata": { "branch": "main", "commit_count": 87015, "repo_created_at": "2014-09-04T05:39:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 841, "forks": 308, "issues": 644, "pull_requests": 32 }, "file_meta": { "content_id": "a0...
8426134f-b2da-4b71-b599-f5219c540d34
ZettaBite4031/ZettaEngine
ContentToolsDLL/Geometry.cpp
#include "Geometry.h" #include "../Utilities/IOStream.h" namespace Zetta::Tools { namespace { using namespace Math; using namespace DirectX; void RecalculateNormals(Mesh& m) { const u32 num_indices{ (u32)m.raw_indices.size() }; m.normals.resize(num_indices)...
TOOL
0.933849
3.121922
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-11-12T22:29:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5efaf9239...
f8b3b331-b01c-4777-ac8a-e14bec897f4a
OI-wiki/OI-wiki
docs/geometry/code/scanning/scanning_2.cpp
#include <algorithm> #include <cstdio> #include <cstring> constexpr int MAXN = 300; using namespace std; int lazy[MAXN << 3]; // 标记了这条线段出现的次数 double s[MAXN << 3]; struct node1 { double l, r; double sum; } cl[MAXN << 3]; // 线段树 struct node2 { double x, y1, y2; int flag; } p[MAXN << 3]; // 坐标 // 定义sort比较 b...
ALGO
0.993368
3.934186
{ "github_metadata": { "branch": "master", "commit_count": 12101, "repo_created_at": "2018-07-11T03:28:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23612, "forks": 4310, "issues": 112, "pull_requests": 9 }, "file_meta": { "content_id":...
99be9aee-bba6-4d44-bcc7-18550a0fa1f5
ustcyyw/algorithm
luogu/union_find/CF1954E.cpp
/** * @Time : 2024/4/13-4:22 PM * @Author : <EMAIL> * @E-mail : <EMAIL> * @Github : https://github.com/ustcyyw * @desc : */ /* * 考虑某个确定的伤害值k * 第一次使用闪电后 会将生命值 <= k 的敌人杀死。 * 于是敌人就不是相连的了 就会因死去的敌人而分割成多个相连部分 * 于是后续使用闪电 就只能在每一个部分独立地使用 * 接下来再使用闪电 累计伤害变为2k 又会使生命值 <= 2k 的敌人杀死,每个部分又会再次细分 * * 假设第一次使用闪电后 敌人被分割成c1部分 ...
ALGO
0.9999
3.675525
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2024-11-11T07:09:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f75b3a000...
17aea78c-6c2b-42ed-8992-f978a283cabe
sha314/Network
src/percolation/network_percolation_v7.cpp
// // Created by shahnoor on 10/30/19. // #include "network_percolation_v7.h" #include <iostream> #include <algorithm> #include <climits> using namespace std; NetworkPercolation_v7::NetworkPercolation_v7(Network_v7 *net) { _net = net; _link_count = _net->getLinkCount(); _network_size = _net->getNodeCoun...
ALGO
0.997516
4.346616
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2018-08-09T20:15:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b190180a...
9a6789de-8592-4c69-921c-40a370e4955c
alecjacobson/gptoolbox
external/exactgeodesic/src/example0.cpp
/* read mesh from file and - if one vertex is specified, for all vertices of the mesh print their distances to this vertex - if two vertices are specified, print the shortest path between these vertices <NAME>, 01/2008 */ #include <iostream> #include <fstream> #include "geodesic_algorithm_exact.h" int main(in...
ALGO
0.99743
4.409169
{ "github_metadata": { "branch": "master", "commit_count": 1649, "repo_created_at": "2014-02-21T13:46:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 655, "forks": 175, "issues": 60, "pull_requests": 14 }, "file_meta": { "content_id": "2...
0f4ac63d-d231-43e1-b3c0-8f86f781be2e
Parallel-Computing-course/parallel_12.03
fractal_generator.cpp
#include "fractal_generator.h" #include <omp.h> void generatePattern(cv::Mat& surface, int posX, int posY, int blockSize, int currentStep) { if (currentStep == 0) return; int unit = blockSize / 3; cv::rectangle(surface, cv::Point(posX + unit, posY + unit), cv::Point(posX + 2 * unit, p...
ALGO
0.998783
4.727259
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-31T17:49:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b249d98744cc7...
ab01b458-d396-4ca8-a1af-1c6d50164a84
thenfour/Clarinoid
src/clarinoid/synth/filters/MoogLadderFilter.hpp
// "Designing Software Synthesizer Plug-Ins in C++" // https://willpirkle.com #pragma once #include "OnePoleFilter.hpp" namespace clarinoid { namespace filters { struct MoogLadderFilter : IFilter { MoogLadderFilter() { m_LPF1.SetType(FilterType::LP); m_LPF2.SetType(FilterType::LP); m...
TOOL
0.95742
6.59447
{ "github_metadata": { "branch": "master", "commit_count": 362, "repo_created_at": "2020-08-13T21:15:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 48, "pull_requests": 0 }, "file_meta": { "content_id": "d1399e5...