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
35f2cd87-16e9-4b47-ac21-a53dbe249d02
sgrade/cpptest
leetcode/candy-crush.cpp
// 723. Candy Crush // https://leetcode.com/problems/candy-crush/ #include <bits/stdc++.h> using namespace std; // Based on Editorial's Approach 2: In-place Modification class Solution { public: vector<vector<int>> candyCrush(vector<vector<int>>& board) { rows = board.size(), cols = board[0].size(); ...
ALGO
0.999995
5.971012
{ "github_metadata": { "branch": "master", "commit_count": 2401, "repo_created_at": "2020-08-01T16:38:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15e20a8...
8a0d1ef5-d2dd-45c2-9d85-e3fc675af331
rindsea/LeetCode
066-Plus One/066.cpp
#include <iostream> #include <vector> using namespace std; /* Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. */ class Solution { public: vector<int> plusOne(vector<int>& digits) { ...
ALGO
0.999956
5.883666
{ "github_metadata": { "branch": "master", "commit_count": 379, "repo_created_at": "2016-05-07T07:50: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": "9600a30c...
cf8da2ea-3ce0-45ef-99e7-8e2329719f37
mdarikrayhan/Competitive-Programming
codeforces/173/E.cpp
#include<bits/stdc++.h> #define ll long long #define pn putchar('\n') #define mclear(a) memset(a,0,sizeof a) #define fls() fflush(stdout) #define maxn 100005 #define Fi(x) lower_bound(id+1,id+1+n,x,cmp2)-id using namespace std; int re() { int x=0,t=1;char ch=getchar(); while(ch>'9'||ch<'0'){if(ch=='-')t=-1;ch=g...
ALGO
0.999993
3.644736
{ "github_metadata": { "branch": "master", "commit_count": 8052, "repo_created_at": "2022-05-15T11:22:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7eae5b...
80c58686-c8a2-47d5-b52e-829a6b64fe9c
sunilsch/BWINF-41-1-DEV
Aufgabe_5/source/old/Aufgabe_5_1.cpp
#include <bits/stdc++.h> using namespace std; ifstream inputFile; ofstream outputFile; const int maxNodes = 151; int n,m; vector<vector<int>> G(maxNodes); void bfs(int node, vector<vector<int>> &distancesSave){ // Calculate depth for each node vector<int> distances(maxNodes, 0); cout << "Start Function!" <...
ALGO
0.999921
3.708338
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-12-27T10:52:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49e7995af497...
ee502c3c-7f92-46e6-8fed-43de21ce06bd
wy-time/Store_code-ICPC
HDU/1038.cpp
#include <iostream> #include <iomanip> #include <cstdio> using namespace std; typedef long long ll; #define wfor(i,j,k) for(i=j;i<k;++i) #define mfor(i,j,k) for(i=j;i>=k;--i) // void read(int &x) { // char ch = getchar(); x = 0; // for (; ch < '0' || ch > '9'; ch = getchar()); // for (; ch >= '0' && ch <= '9'; ch = ...
ALGO
0.99724
3.367163
{ "github_metadata": { "branch": "master", "commit_count": 412, "repo_created_at": "2019-04-12T08:36:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "820c1ea8...
f8939dfb-0b9d-4dd5-b6b3-1798a06f8633
Suman-Jaiswal/DSA
10. Linked List/detect_loop.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define loop(itr, start, end) for (int itr = start; itr < end; itr++) #define v1(name, type) vector<type> name #define v2(name, type, size) vector<type> name(size) #define v3(name, type, size, fill) vector<type> name(size, fill) #define mat1(name, t...
ALGO
0.999923
3.854217
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-05-23T04:35:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f53632258b4...
9d494d11-0a08-442c-b34e-0437e209241f
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/09/0910/personal_submission/cf744b_sjw712.cpp
void solve(){ int n; cin >> n; int k = 0; while((1 << k) < n) k ++; vector<vector<int>> f(n, vector<int>(k)), g(n, vector<int>(k)); auto query = [&](vector<int> tmp)->vector<int>{ vector<int> res; cout << tmp.size() << endl; for(int i = 0; i < tmp.size(); i ++){ cout << tmp[i] << " "; } cout << endl;...
ALGO
0.999666
3.391007
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "6314...
fede2c77-da0e-4f7a-be2d-309e4f09a5e2
inf106605/PT
PT_projekt/PT_projekt/Generation.cpp
#include "Generation.hpp" #include <functional> #include <queue> Generation::Generation(pieces_t &pieces) { createInitialIndividuals(pieces); rating = calculateRating(); } double Generation::switchToNext(const unsigned mutationCount, pieces_t &pieces) { createNewIndividuals(mutationCount, pieces); doSelection()...
ALGO
0.9951
4.73685
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2016-04-04T15:57:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "faea9c522...
e1039ec4-7dc7-4af8-8134-ab607af85658
chetansq/c-program
c++/Operator Overloading/FOverlodingSum.cpp
#include <iostream> using namespace std; class arith_num { int a, b; public: void input() { cout << "enter value of a : "; cin >> a; } void input(int x) { cout << "enter " << x << " value of b : "; cin >> b; } arith_num operator+(arith_num obj) { ...
ALGO
0.984154
3.714758
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2024-02-14T03:44: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": "61dd3a25152...
af67dddf-7940-431f-b5bb-50b84f82f182
chirantan-basu01/LeetCode-I
sort-list/sort-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* mergeTwoLis...
ALGO
0.999996
6.032925
{ "github_metadata": { "branch": "main", "commit_count": 977, "repo_created_at": "2021-04-06T04:12:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "587e9a8464...
ac309fe6-caa2-4a6f-9744-d301f5a21050
Lovely-XPP/Slambook2-notebook
ch3/useEigen/eigenMatrix.cpp
#include <iostream> using namespace std; #include <ctime> // Eigen 核心部分 #include <Eigen/Core> // 稠密矩阵的代数运算(逆,特征值等) #include <Eigen/Dense> using namespace Eigen; #define MATRIX_SIZE 50 void solve_eqn(MatrixXd mtr, MatrixXd vt); /**************************** * 本程序演示了 Eigen 基本类型的使用 ****************************/ i...
ALGO
0.999741
4.098037
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-09-01T11:44: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": "413dcf1079ac...
ecf3f4d3-fa91-4bfb-bdda-826cdd73e9a9
secretflow/yacl
yacl/crypto/aes/aes_opt.h
// MIT License // // Copyright (c) 2018 <NAME> (<EMAIL>) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, mo...
ALGO
0.999285
7.223685
{ "github_metadata": { "branch": "main", "commit_count": 415, "repo_created_at": "2022-07-02T02:35:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 106, "forks": 81, "issues": 7, "pull_requests": 11 }, "file_meta": { "content_id": "f1b83f6...
b5c1c3b1-74bc-4dc2-a44e-cb3d427121b1
malfet/Mandelbrot
Mandelbrot/AttractionPointRenderer.h
/* * Attraction point renderer template * * Copyright (c) 2015 <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright...
ALGO
0.980373
5.582086
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2015-02-23T08:33:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ba7cc559...
d2a7ef68-5bb4-40a6-84ba-fb90a7796bfa
Priyadharshini-J-CSE/Data-structure
6.Binary_Tree.cpp
#include <iostream> #include <algorithm> // for max using namespace std; typedef struct TreeNode { int data; struct TreeNode* left; struct TreeNode* right; TreeNode(int val) { data = val; left = NULL; right = NULL; } } TreeNode; TreeNode* createTree() { int data; ci...
ALGO
0.999916
5.137667
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-05-20T10:36: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": "f2a2ad4dd8c9...
38cda7b7-1f0b-4f32-bbea-2a92cddfbf0d
hsnavarro/imepp
Codeforces/Hello2019/C.cpp
#include <bits/stdc++.h> #define db(x) cerr << #x << " == " << x << endl #define _ << ", " << #define cl(x, v) memset((x), (v), sizeof(x)) using namespace std; #define pb push_back #define st first #define nd second typedef long long ll; const int INF = 0x3f3f3f3f; const int N = 5e5 + 5; int n, ans, cnt; pair<int, ...
ALGO
0.999856
3.848597
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2018-08-22T02:40:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d621bd1...
c863e905-33cb-4761-8816-0ccdfbe0222d
cjsut/charm
examples/bigsim/emulator/littleMD/bgMD.h
/* File : bgMD.h * Version : 1.0; March 24, 2001 * * Description : Sample application for Blue Gene emulator (converse version) * Prototype Molecular Dynamics: LittleMD * Note : The program is converse-bluegene version of charm-bluegene version written * previously. *****************************...
ALGO
0.950761
5.167777
{ "github_metadata": { "branch": "cuda-project", "commit_count": 20729, "repo_created_at": "2014-02-17T19:59:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "...
5a44fa88-a23f-4e8f-805b-4cc083a49d72
zhu-he/ACM-Source
cf/533/A.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <set> using namespace std; int n, k; int h[500000]; int m[500000]; int p[500000]; int parent[500000]; int s[500000]; vector<int> G[500000]; void dfs(int x, int pa, int v) { parent[x] = pa; m[x] = v; for (int i = 0; i < G[x].size(); ++i) { if (pa...
ALGO
0.99999
3.768597
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2015-04-06T06:52: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": "f8717a840...
b8219e7c-7bc9-42c1-82a0-9c179e3dc60d
Kriti2019/GFG_
Difficulty: Hard/Sub-arrays with equal number of occurences/subarrays-with-equal-number-of-occurences.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int sameOccurrence(vector<int>& arr, int x, int y) { // code here if (x == y) { int n = arr.size(); return n * (n + 1) / 2; } unordered_map<int, int> count; ...
ALGO
0.99957
6.152409
{ "github_metadata": { "branch": "main", "commit_count": 437, "repo_created_at": "2023-12-11T05:48: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": "efe1370a14...
ff9d3d0e-a919-4982-a7ba-08ac1a387f96
DISASTER-RUMBLING/CODE
算法/洛谷题单/选举学生会.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> using namespace std; int num[20000001]; //void Swap(int* num1, int* num2) { // int tmp = *num1; // num1 = num2; // *num2 = tmp; // return; //} // //void Quick_Sort(int* arr, int begin, int end) { // if ((end - begin) < 2) { // if ((end - begin) =...
ALGO
0.999988
3.588994
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2024-01-20T15:13:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ff20958a1...
1dc7cc4d-e28b-4639-84c4-4737a74f2666
dpbnasika/ControlSystems
PID_DC_MOTOR_CONTROL.ino
/* * Simple arduino PID motor position control * Fine tune for better results * Implemented on ASlONG DC Motor with a magnetic encoder (JGB3-520B-12v-178RPM) */ #include <PIDController.h> PIDController pid; volatile int degree = 0; int encoderSignalAPin = 2; // Signal A from 1st Hall sensor int encoderSi...
ALGO
0.989175
6.379349
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2020-12-26T04:49:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "535b7dfcb6b4...
f411e9ed-425a-448d-bbaa-ca3837530b0c
PowerCell46/C-Plus-Plus-Courses
Leetcode/Replace Words.cpp
#include <iostream> #include <vector> #include <map> #include <sstream> #include <algorithm> using std::string; using std::vector; class Solution { public: string replaceWords(vector<string>& dictionary, string sentence) { std::map<char, std::vector<std::string>> firstLetterMap; for (const std::...
ALGO
0.999863
5.576502
{ "github_metadata": { "branch": "main", "commit_count": 210, "repo_created_at": "2024-09-20T22:15: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": "bdb1d8ade8...
69d874ab-bc7b-4f63-9aee-96abeeafe713
HitkarMiglani/Poly-Play
tic.cpp
#include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include <limits> using namespace std; enum class Player { EMPTY, PLAYER_X, PLAYER_O }; class TicTacToe { private: vector<vector<Player>> board; Player currentPlayer; string playerXName; string playerOName; public:...
ALGO
0.993712
6.920561
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-01-20T08:52:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a28d315ea0bc...
24fe61fd-efff-41b0-a16c-09a6d54aaad4
jakub-kaminski/continuum-robot
lib/continuum/src/Continuum.cpp
#include "../include/Continuum/Continuum.h" #include <chrono> #include <unistd.h> Eigen::Vector3d skew2vec(Eigen::Matrix3d m){ Eigen::Vector3d vec; vec << m(2,1), m(0,2), m(1,0); return vec; } //Eigen::MatrixXd ContinuumRobotInterface::robotJacobian() { // Eigen::MatrixXd jacobian(6, tubes.size()*3); ...
ALGO
0.982026
5.840266
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-01-04T21:06: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": "e653ca94b94e...
f06762e1-e40a-476b-9ea2-f86bcb1e7ee4
AkshatAggarwal14/Competitive-Programming
CodeForces/1277/c.cpp
#ifdef LOCAL // https://github.com/AkshatAggarwal14/Competetive-Programming #include "Akshat.hpp" #else #include "bits/stdc++.h" using namespace std; #define dbg(...) #endif using ll = int64_t; auto sz = [](const auto &container) -> ll { return container.size(); }; #define all(x) (x).begin(), (x).end() template <class ...
ALGO
0.999637
4.509096
{ "github_metadata": { "branch": "master", "commit_count": 850, "repo_created_at": "2021-08-16T13:49:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e616dae1...
9173f5dd-ad26-4068-baa7-6a9ddb517e69
Keith-Lemonji/Repo-homeworks
Tuan7/bst.cpp
#include <iostream> #include <vector> using namespace std; struct NODE{ int key; NODE* p_left; NODE* p_right; }; NODE* Search(NODE* pRoot, int x) { if (pRoot == nullptr || pRoot->key == x) { return pRoot; } NODE* leftResult = Search(pRoot->p_left, x); if (leftResult != nullptr) { return leftResult; ...
ALGO
0.999982
4.061665
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-03-25T13:23: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": "8d27857318d6...
500338ef-e05b-4e79-aeb0-646cdea6dc74
aokblast/LeetCode_Problem_Solving
Medium/838_Push_Dominoes.cpp
//dp //Runtime 35 //Memory Usage 14.1 class Solution { public: string pushDominoes(string dominoes) { int n = dominoes.size(); int cnt[n]; memset(cnt, 0, sizeof(cnt)); string res(n, '.'); int cur = 0; for(int i = 0; i < n; ++i){ char c = dominoes...
ALGO
0.999992
4.927179
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2021-11-01T02:46: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": "068925ee5...
8604344f-9f16-4840-a1d1-a38b4ae562b6
ayushpatel5475/CPP-GFG-CODES
05. Container Adapters/03. Priorty Queue/04_Buy_maximum_items_with_given_money.cpp
#include <iostream> #include <queue> using namespace std; int purchaseMax(int arr[], int n, int sum) { priority_queue<int, vector<int>, greater<int>> pq(arr, arr + n); int res = 0; while (sum >= 0 && pq.empty() == false && pq.top() <= sum) { sum = sum - pq.top(); pq.pop(); res...
ALGO
0.999974
6.12981
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-12-21T12:36: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": "113f9b6896f...
ed894925-97af-47de-bcb7-2bc7389c77cd
aksweb/cpAlgo
spoj/cc 18-09-24/Winning_World_Finals.cpp
// <NAME> #include <bits/stdc++.h> #define ll long long int using namespace std; #define ll long long int #define br << endl #define rep(i, n) for (ll i = 0; i < n; i++) #define repi(i, n) for (ll i = 1; i <= n; i++) #define repii(i, n) for (ll i = 1; i < n; i++) #define gcd __gcd const ll MOD = 998244353; // Code Be...
ALGO
0.999672
4.064249
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-03-24T07:51: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": "27fa8666422...
238973b1-9035-4c91-a0df-ffa08fd01d9b
alexsotocx/competitive-programming
UVA/Miguel.cpp
#include<iostream> #include<vector> using namespace std; class producto { public: long id; int cantvendidas; public: producto() {} producto(long ida, int cant) { id=ida; cantvendidas=cant; } }; int main() { int c; cout<<"Ingrese numero de posciones: "; cin>>c; pro...
ALGO
0.99953
4.000268
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-10-29T01:16: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": "336c1b1b48...
4f0512ce-1d1c-448d-a708-079e751fef3f
hfhongzy/CodeForOI
luogu-3196.cpp
#include <bits/stdc++.h> #define pb push_back #define rep(i, j, k) for(int i = j; i <= k; ++ i) #define per(i, j, k) for(int i = j; i >= k; -- i) using namespace std; const int N = 1e4 + 10; const int M = 2e6 + 10; int n, m, ans, cnt, hd[M], nxt[M], id[M], d[N]; bool vis[N]; vector<int> G[N]; void insert(int u, int v) ...
ALGO
0.999843
3.948792
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-10-12T02:46:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58620b81f1cf...
0ea2f802-4d88-46a2-8acf-0e8b93d80013
m990130/AML_SNN
lib/snn/cuda/spikeLoihiKernels.h
/* * Author: <NAME> * 10/05/2019 11:00 AM * Contains routines that converts membrane potential of neuron into spikes */ #ifndef SPIKELOIHIKERNELS_H_INCLUDED #define SPIKELOIHIKERNELS_H_INCLUDED template <class T> __global__ void getSpikesKernel( T* __restrict__ s, T* __restrict__ v, T* __restrict__ u, const T*...
ALGO
0.992555
5.206454
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2019-09-05T19:59:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8ddddbf0...
9a921341-8d2c-40ff-bee0-fbf10621814b
yancouto/competitive-programming
ojs/spoj/niceday.cpp
#include <bits/stdc++.h> using namespace std; #define x first #define y second typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; #define pb push_back #define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++) template<typename T> inline T abs(T t) { return t < 0? -t ...
ALGO
0.99972
3.826323
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2016-08-26T11:17:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f43f270...
e48591e6-2f25-432d-832a-97343032aefa
yn0212/Handwriting_Calculator_using_openCV
yn.h
#ifndef YN_H #define YN_H #include<opencv2/opencv.hpp> #include<iostream> #include <vector> #include<string> #include<stdlib.h> using namespace std; using namespace cv; namespace jyn { int maxcnt(vector<double> v, double a); int max(vector<double> v); double avg(vector<double> v); vector<double> divi...
TOOL
0.932741
3.032554
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-08-17T04:35: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": "620556ec8f2...
5a9fc6cf-27a6-46e5-964a-c33484dbe249
Mahudesh/Data-Structures-And-Algorithms
Dynamic Programming/Partitions With Given Difference S1-S2=D.cpp
#include <bits/stdc++.h> int mod=1e9+7; int helper(int n, int d, vector<int>& arr,int ind, int target, vector<vector<int>>& dp) { if(ind==0) { if(arr[0]==0 && target==0) return 2; if(target==0 || arr[0]==target) return 1; return 0; } if(dp[ind][target]!=-1) ...
ALGO
0.999959
5.182268
{ "github_metadata": { "branch": "main", "commit_count": 661, "repo_created_at": "2024-07-11T16:17:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c43e007dbc...
58c88982-ffbb-4c37-bfc6-f51a45e9c2e2
C5Hwang/Online-Judge-Solutions
LOJ/LOJ3043.cpp
#include <stdio.h> #include <stdlib.h> #define ll long long #define DEBUG printf("Passing [%s] in Line %d\n" , __FUNCTION__ , __LINE__) ; const int MAX_N = 1e5 + 10 , mod = (119 << 23) + 1 ; struct data { int r , sumr , mulr , f , addf , mulf ; }tre[MAX_N << 2] ; int n , m , tot , pw[MAX_N] ; inline int read() { ...
ALGO
0.999968
4.108488
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2018-09-23T16:39:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3c67723...
4787c8dd-2103-42c5-82b7-41d0f72d0b9f
papyrussolution/OpenPapyrus
Src/OSF/xapian/xapian-core/src/cosine_sim.cc
/** @file * @brief Cosine similarity calculation between documents */ /* Copyright (C) 2016 <NAME> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or...
ALGO
0.969764
6.261338
{ "github_metadata": { "branch": "master", "commit_count": 979, "repo_created_at": "2017-01-05T07:15:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 259, "forks": 67, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "325b...
04f527d1-3dde-4588-b4be-3d6ab6e4c4f9
Quibbler6/Ski-Safari-in-3d
src/LSystem.cpp
#include "LSystem.h" #include "MyRotate.h" /* *函数名称:LSystem() *函数功能:初始化在将文法翻译成三维信息的一些基本参数 包括:1、初始旋转角度dx、dy、dz 2、树枝长度length、 3、树枝半径radius、 4、树叶长度leafLength、 5、树叶半径leafRadius 6、长度迭代因子lengthFactor 7、半径迭代因子radiusFactor 8、树枝、树叶数量numTrunks,numLeafs 9、字符串格式的树result *传递参...
ALGO
0.961354
4.109328
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-10-24T18:49: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": "a9de6f192d42...
dbdd4181-b3e5-4822-b6a3-3d3529a687fb
himanshu062/geeks_for_geeks_problems
Difficulty: Hard/Merge Without Extra Space/merge-without-extra-space.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void mergeArrays(vector<int>& a, vector<int>& b) { // code here priority_queue<int,vector<int>,greater<int>>pq; for(auto it:a){ pq.push(it); } f...
ALGO
0.99993
5.971381
{ "github_metadata": { "branch": "main", "commit_count": 2102, "repo_created_at": "2024-03-05T14:11: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": "da90d643b...
36b73e08-2c41-4c83-b33d-1dcd376735e5
tuituji/CS148-Stanford-CG
hw6/src/main.cpp
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <fstream> #include <algorithm> #include <queue> #include "image.h" using namespace std; using namespace Eigen; template<class ArrayType, class ElementType> void iteratedBoxFilter(ArrayType &signal, ArrayType &outSignal, int filterSize, ...
ALGO
0.963425
5.191563
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-06-29T12:22:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33e8e907ce...
a4aed2b9-4568-483d-8ada-07aed60146a6
jinnatul/problemSolving
src/CodeForces/0 Codeforces/codeforces 1277A. Happy Birthday, Polycarp!.cpp
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") /// Typedef typedef long long ll; #define sc1(a) scanf("%lld",&a) #define sc2(a,b) scanf("%lld %lld",&a,&b)...
ALGO
0.99959
4.004142
{ "github_metadata": { "branch": "master", "commit_count": 521, "repo_created_at": "2018-08-06T22:11:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6fdb0f3...
4a3c65d3-56df-4866-b6cd-b5466fbaad19
juliocesar1235/RelodedC-
prueba/main.cpp
#include <iostream> #include <math.h> using namespace std; int Fun1(double dA){ return dA*3-4; } double Fun3(double da,double db,double dx, double dh, double dg){ double dm; if(db != 0 && dh-dg != 0 || (da/db-dx)/(dh-dg) >= 0 ){ dm = sqrt((da/db-dx)/dh-dg); return dm; }else{ std::cout << "data err...
ALGO
0.999313
3.268072
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-23T05:51: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": "5075a9537f...
0b41a8e6-a7d5-4070-8915-968d71367272
Oktai15/assembler-hw
word_counter.cpp
#include <iostream> #include <ctime> #include <cstdint> #include <stdio.h> #include <emmintrin.h> // g++ <NAME>.cpp -o <NAME>.out - generate .s and executor file // ./<NAME>.out - execute //g++ -std=c++11 word_counter.cpp -o word_counter.out using namespace std; int easily_calc_count_of_words(const char *str, size...
ALGO
0.967587
4.60681
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-05-07T23:22: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": "fdeb5d942...
7f4f3913-c1c5-489f-a0d8-931701a4b98b
falcopt/f4d
cobra/LocalSearch.hpp
#ifndef _F4D_LOCALSEARCH_HPP_ #define _F4D_LOCALSEARCH_HPP_ #include <cfloat> #include <map> #include <set> #include "Instance.hpp" #include "MoveGenerators.hpp" #include "Solution.hpp" #include "VertexSet.hpp" #include "operators/AbstractOperator.hpp" #include "operators/EjectionChain.hpp" #include "operators/OneOne...
ALGO
0.998025
3.722525
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-10-23T18:51:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5a9f7d94d0e...
ea04b055-dbac-4f22-93f5-2d6dc29b48ee
NextGen-Study/DSA-C-
Linked List.cpp
#include <iostream> using namespace std; // Node structure class Node { public: int data; Node* next; Node(int value) { data = value; next = nullptr; } }; // Insert at head void insertAtHead(Node*& head, int value) { Node* temp = new Node(value); temp->next = head; head = ...
ALGO
0.999372
5.956406
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-05-30T06:17: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": "40c776ddc5f...
9529b031-f5b3-4b25-b2a3-409bcfca5c5f
LittleDrogon/MySchoolProjects
2020-2021/C++ OOP/Random/soltiranje.cpp
#include <iostream> #include <cstdlib> using namespace std; void izpisipolje(int p[], int d) { for (int i = 0; i < d; i++) { cout << p[i] << " "; } cout << endl; } void zamenjaj(int &a, int &b) { int tmp = a; a = b; b = tmp; } void sortiranjepolje(int p[], int d) { for (int...
ALGO
0.999841
4.536612
{ "github_metadata": { "branch": "main", "commit_count": 163, "repo_created_at": "2023-11-12T05:13: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": "dc77c8a46f...
318478e4-0ead-43d0-88bf-39cffedc5467
Alibosnina/ADS-Prak
ADS_P2_1_Sortieren/sorting.cpp
#include "sorting.h" namespace sorting { //************************** // InsertionSort + QuickSort* //************************** void InsertQuickSort(vector<int>& a, int left, int right) { if (left < right) { if ((right - left + 1) < 350)//350 ist der ungefähre Crossover Point bei dem Insertion Sort schne...
ALGO
0.999728
4.600598
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-07-29T10:51:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11727cefbd5e...
adb1c6e5-fd84-41a9-966d-eae2e777a849
amansharma07/cses
search_sort/restaurant_customers.cpp
#include<bits/stdc++.h> #include<unordered_set> using namespace std; #define ll long long #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define debug(x) cout<<#x<<" :: "<<x<<endl; #define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<endl; #define debug3(x,y,z) cout<<#x<<" :: "<<x...
ALGO
0.999947
3.81128
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-09-02T15:32: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": "1c99d2f075d...
6ef189eb-7724-4452-812d-e4023d498ef7
MrQiuHaHa/LeetCode
141. 环形链表/141. 环形链表/main.cpp
// // main.cpp // 141. 环形链表 // // Created by 邱俊荣 on 2021/3/8. // /* 给定一个链表,判断链表中是否有环。 如果链表中有某个节点,可以通过连续跟踪 next 指针再次到达,则链表中存在环。 为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始)。 如果 pos 是 -1,则在该链表中没有环。注意:pos 不作为参数进行传递,仅仅是为了标识链表的实际情况。 如果链表中存在环,则返回 true 。 否则,返回 false 。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com...
ALGO
0.999707
4.713774
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2021-03-07T07:55:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2ec7f4114b...
30f72628-1237-421a-a9a5-2ce2d5de9996
OsrHu/algorithm
pat/2021-计院考研复试上机/7-4_Load_Balancing.cpp
#include<iostream> #include<cstring> #include<algorithm> #include<map> using namespace std; const int INF = 0x3f3f3f3f; int n; int max_servers = -INF, min_diff = INF; map<int,int> m; void dfs(int minl, int maxl, int cnt) { if(minl * 2 <= maxl) return; if(cnt > max_servers) { // cout << m...
ALGO
0.999954
3.458584
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-03-15T08:57: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": "6d318b732ded...
f8592a87-167a-4d6f-b1bc-e37e13d251cf
WadekarPrashant/CP
CodeChef/6March24_4.cpp
#include <iostream> #include <bits/stdc++.h> #include <vector> #define ll long long #define fr(i, num) for (ll i = z - 1; i < num; i++) #define frn(i, n) for (ll i = 0; i < n; i++) #define frm(c) for (char c = 'a'; c <= 'z'; c++) #define sp(a, b) swap(a, b) #define pb push_back using namespace std; ll findMin(string s...
ALGO
0.999962
3.941826
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2022-09-15T16:54:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "649cea135...
79755f37-f8c8-4f0c-88a1-8edb37ee852f
VinVash/450-DSA
Striver/GraphYoutube/55. bridges-in-a-graph-critical-connections-tarjan's-algo/main.cpp
#include <bits/stdc++.h> using namespace std; #define vi vector<int> #define vll vector<long long> #define vvi vector<vector<int>> #define vvll vector<vector<long long>> typedef long long ll; // Space complexity: O(V + 2E) + O(3N) // Time complexity: O(V + 2E) int timer = 0; void dfs(int node, int parent, vector<int...
ALGO
0.99992
4.983263
{ "github_metadata": { "branch": "main", "commit_count": 143, "repo_created_at": "2022-07-05T10:42:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2a3c4e927...
f7ef33d6-b8ef-40f0-8c7a-1a2b6274db56
Pe6r0/itktest
Modules/Filtering/ImageLabel/include/itkBinaryContourImageFilter.hxx
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
ALGO
0.986446
6.445743
{ "github_metadata": { "branch": "master", "commit_count": 48581, "repo_created_at": "2018-06-01T12:40: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": "5c95d8...
2cd74c9f-2332-44df-9e1b-13b23e3a2dd5
LutzGross/esys-escript.github.io
trilinos_source15/packages/nox/src-loca/src/LOCA_MultiContinuation_NaturalGroup.H
// $Id$ // $Source$ //@HEADER // ************************************************************************ // // LOCA: Library of Continuation Algorithms Package // Copyright (2005) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use...
ALGO
0.917274
6.709163
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "0cd5...
a314249f-caa4-4deb-b9fa-70a3196e966f
1334738575/SLAM_LYJ_src
common/Grid.h
#ifndef SLAM_LYJ_GRID_H #define SLAM_LYJ_GRID_H #include "base/Base.h" #include <opencv2/opencv.hpp> NSP_SLAM_LYJ_MATH_BEGIN //w,h... template<typename T, int DIM> class Grid { public: typedef Eigen::Matrix<T, DIM, 1> VecTemX; Grid() { clear(); } Grid(const int _resolution, const std::vector<int>& _sizes, co...
TOOL
0.935107
5.674013
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2025-02-24T14:07:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b476202ebaf...
5a2ac11b-f954-4a24-a3db-488ee2a4f01e
zephyr-fun/LeetCodeSolution
greedy/517_Super_Washing_Machines.cpp
// 2023.02.13 // max(left_need, right_need) class Solution { public: int findMinMoves(vector<int>& machines) { int tot = 0; int n = machines.size(); for(auto& m : machines) { tot += m; } if(tot % n != 0) { return -1; } int res = 0; ...
ALGO
0.999954
5.17997
{ "github_metadata": { "branch": "main", "commit_count": 2658, "repo_created_at": "2020-11-24T08:19:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f20c5b897...
6820c42f-ae8d-4018-b7c5-f44e789234c7
YLLX/S2P_MVS
3rdparty/sgbm/smooth.cpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ALGO
0.998931
5.592671
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-08-31T04:05: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": "3950d4e768...
744042f1-b0ed-4bf3-9ade-676e8b1ec32a
percivalyan/c-cpp-algo-data-structure
Praktikum Struktur Data/Pertemuan 9/lat9_5.cpp
#include <iostream> #include <iomanip> using namespace std; void Identitas(); void shellSortMenaik(); void shellSortMenurun(); void insertionSortMenaik(); void insertionSortMenurun(); int main() { int choice; cout << "================================================================" << endl; cout << "Tugas Prak...
ALGO
0.999731
4.659606
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-11-08T15: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": "05f195173be9...
00f054df-683c-4c6f-8213-d5f692c899bc
vkhristenko/test-analysis
src/defs/KalmanMuonCalibrator.h
#pragma once #include "TFile.h" #include "TH3F.h" #include "TH2F.h" #include "TH2D.h" #include "TH1I.h" #include "TProfile2D.h" #include "TRandom3.h" #include "TMatrixDSym.h" #include "TVectorD.h" class KalmanMuonCalibrator { public: KalmanMuonCalibrator(); KalmanMuonCalibrator(const std::string&); double getCo...
ALGO
0.923657
3.922151
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-10-10T22:21:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "518e64c4fbb...
ea168b3a-ecb5-4e7d-b710-1bdc697c3591
ishandutta2007/codeforces-s
summitwei/normal/1053/A.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<pair<int, int>> vpii; typedef pair<int, int> pii; typedef long long ll; #define INF 1000000000 #define MOD 1000000007 #define EPSILON 0.00001 #define MAX_N 100005 #define F0R(i, a) for (ll i=0; i<(a); i++) #define FOR(i, a, b) for(ll ...
ALGO
0.999973
3.831414
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "57491053c87d...
4100ab43-036f-44f1-88ec-67ad05185433
ckatrycz/Spray
include/taichi/visual/ray_intersection.cpp
/******************************************************************************* Copyright (c) The Taichi Authors (2016- ). All Rights Reserved. The use of this software is governed by the LICENSE file. *******************************************************************************/ #include "ray_intersection....
ALGO
0.95351
5.313482
{ "github_metadata": { "branch": "master", "commit_count": 1113, "repo_created_at": "2018-08-02T16:34:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5603ea6...
d117bee8-14fd-447d-b34f-068c8c9bd7ba
mcmenaminadrian/noc-varipage
mux.cpp
#include <iostream> #include <map> #include <vector> #include <utility> #include <tuple> #include <bitset> #include <mutex> #include <condition_variable> #include "mainwindow.h" #include "memorypacket.hpp" #include "memory.hpp" #include "ControlThread.hpp" #include "tile.hpp" #include "processor.hpp" #include "mux.hpp"...
TOOL
0.910236
4.538721
{ "github_metadata": { "branch": "master", "commit_count": 258, "repo_created_at": "2017-05-03T20:21: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": "a106f2d9...
2dfac4a2-7d7d-4e28-abd1-d5feab20c5ef
shubiuh/MFEMShubin
mfem-4.1/fem/tmop_tools.cpp
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced // at the Lawrence Livermore National Laboratory. All Rights reserved. See files // LICENSE and NOTICE for details. LLNL-CODE-806117. // // This file is part of the MFEM library. For more information and source code // availability visit ht...
ALGO
0.999818
5.623828
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-07-20T16:52: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": "689f0f75b4...
a64614dd-853e-41c1-a975-7eb079e7bc69
Stray-Modding/Hk_CXX-and-UHT
Ver1.3#214/UHTBPAccess1.3-214/JoyLibraryRuntime/Private/MathTools.cpp
#include "MathTools.h" FVector2D UMathTools::TimeIndependentLerpVector2D(const FVector2D& _base, const FVector2D& _target, float _timeTo90, float _dt) { return FVector2D{}; } FVector UMathTools::TimeIndependentLerpVector(const FVector& _base, const FVector& _target, float _timeTo90, float _dt) { return FVecto...
ALGO
0.964731
7.001799
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-07-27T15:47:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00238645b808...
61f48dd8-552f-49e9-8195-cc41e3b149a9
krishukr/cpp-code
src/LG/lg-P2455.cpp
#include <cmath> #include <cstdio> #include <iomanip> #include <iostream> const double eps = 1e-5; bool flag = false; double m[101][102], ans[101]; template <typename T> T read(); int main() { std::ios::sync_with_stdio(false); int n = read<int>(); for (int i = 0; i < n; i++) { for (int j = 0; j...
ALGO
0.999944
3.655281
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2021-01-19T08:15:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea4e610d...
623200c3-9db4-4fd6-8cb6-94c27c4e6635
Joshoccas/3-DGIIM
Primer Cuatrimestre/Sistemas Concurrentes y Distribuidos/Prácticas/Códigos/Práctica 3/gasolinera1.cpp
#include <mpi.h> #include <thread> // this_thread::sleep_for #include <random> // dispositivos, generadores y distribuciones aleatorias #include <chrono> // duraciones (duration), unidades de tiempo #include <iostream> using namespace std; using namespace std::this_thread ; using namespace std::chrono ; //**********...
ALGO
0.992609
4.674568
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-09-02T13:16:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89445ed5d29...
11ef2e60-9cc7-4b8d-8772-3dc26caadb8a
2019331099-Rabbi/Online-Judges-Problems-Solution
LeetCode/Random/98_alt.cpp
#include <bits/stdc++.h> #define endl '\n' #define PI acos(-1) #define sz 1001 #define inf 1e9 + 9 #define mod 100000000 #define RUN_FAST using namespace std; // int row[] = {0, 0, -1, 1, -1, 1, -1, 1}; // int col[] = {1, -1, 0, 0, -1, 1, 1, -1}; auto init = []() -> int { ios::sync_with_stdio(0); cin.tie(0);...
ALGO
0.99997
5.850685
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-06-29T17:28: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": "486f7412610...
116f5303-e4f2-43fe-affc-d7a845a4de27
sunmaoxiang/practice_cf_icpc
Nanjing2019ICPC(Online)/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1000000 + 100; int euler[maxn] = {0}; void getEuler() { euler[1] = 1; for(int i = 2; i < maxn; i++) { if(!euler[i]) { for(int j = i; j < maxn; j+=i) { if(!euler[j]) { e...
ALGO
0.999991
5.041577
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-09-01T12:10: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": "e2c48eb832...
49c8f35f-e870-477f-a533-8a6838ddd40a
ShriyanshiSharma/Leet-Code-GFG
BinaryTree/gfg_Lowest_Common_Ancestor_in_a_Binary_Tree.cpp
// Lowest Common Ancestor in a Binary Tree /* Given a Binary Tree with all unique values and two nodes value, n1 and n2. The task is to find the lowest common ancestor of the given two nodes. We may assume that either both n1 and n2 are present in the tree or none of them are present. Example 1: Input: n1 = 2 , n2 = ...
ALGO
0.99999
6.264668
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2022-05-22T09:06: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": "714d1e9f9...
013ed1e7-4956-4132-9743-d240e008186e
Jaid2907/Leetcode-Submissions
417-pacific-atlantic-water-flow/417-pacific-atlantic-water-flow.cpp
class Solution { public: void bfs(vector<vector<int>>& heights, queue<pair<int,int>>& q, vector<vector<bool>>& marking){ int m = heights.size(); int n = heights[0].size(); vector<vector<int>> visited(m,vector<int>(n,0)); vector<int> row = {0,0,1,-1}; v...
ALGO
0.999991
6.343297
{ "github_metadata": { "branch": "main", "commit_count": 2151, "repo_created_at": "2022-02-01T17: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": "040bae196...
3b6f8b4e-e24d-4766-ac4f-dd5156ed7db0
wvu-irl/reu-swarm-ros
swarm_ws/src/alice_swarm/src/AliceMain.cpp
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2019, WVU Interactive Robotics Laboratory * https://web.statler.wvu.edu/~irl/ * All rights reserved. * * Redistribution and use in source and binary forms, with or w...
TOOL
0.975082
4.762088
{ "github_metadata": { "branch": "master", "commit_count": 1066, "repo_created_at": "2019-05-23T13:44:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b0cbb2e...
959cd29b-0eb8-481e-ad3a-75c40866dd61
ccagml/leetcode_bricks
5.最长回文子串_20230129.cpp
/* * @lc app=leetcode.cn id=5 lang=cpp * @lcpr version=21301 * * [5] 最长回文子串 * * https://leetcode.cn/problems/longest-palindromic-substring/description/ * * algorithms * Medium (37.37%) * Likes: 6081 * Dislikes: 0 * Total Accepted: 1.3M * Total Submissions: 3.5M * Testcase Example: '"babad"' * * 给...
ALGO
0.999969
6.583978
{ "github_metadata": { "branch": "main", "commit_count": 1228, "repo_created_at": "2022-12-22T09:04:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2dee916cc...
f1dd7e41-0d6a-4086-9bfa-cf612a50cf02
karnasrr/travaux-c-
TP-C-Moderne/TP-PreparationTests/TP-ListeChaineeSimpleSansRecursivite/ListeChaineeSimpleSansRecursivite/main.cpp
// // main.cpp // ListeChaineeSimpleSansRecursivite // // Created by nasr on 28/11/2024. // /* Explications du code : 1. Structure Node : • Chaque nœud contient une donnée data et un pointeur next vers le nœud suivant. 2. Fonction reverseList : • Utilise trois pointeurs : • prev : le nœud préc...
ALGO
0.993964
5.691679
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-09-01T12:25:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "414d06069db...
d2b139ec-1858-4f3f-b3a5-4a8dc8d07ee8
megh-bari/Striver-A2Z-DSA-Sheet
Step 10 - Sliding Window & Two Pointer Combined Problems/Lec 1 - Medium Problems/longest-repeating-character-replacement.cpp
// brute class Solution { public: int characterReplacement(string s, int k) { int n = s.size(); int maxLen = 0; int maxFreq = 0; for (int i = 0; i < n; i++) { vector<int> hash(26, 0); for (int j = i; j < n; j++) { ...
ALGO
0.999975
5.71057
{ "github_metadata": { "branch": "main", "commit_count": 217, "repo_created_at": "2024-11-01T08:05:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 79, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d8c5c5c...
f670d453-af57-4c7d-a9f2-c37a832809b4
FinalTheory/ACM_Code
Templates/Data Structure/树状数组.cpp
/** * @file HDU_1166.cpp * @brief 树状数组模版 * @author FinalTheory * @version 0.1 * @date 2013-08-09 */ #define MAX 50010 int Tree[MAX]; //计算当前节点编号所支配的元素个数 inline int Lowbit( int x ) { return x & (-x); } //num of elements int N; void Add( int pos, int num ) { while ( pos <= N ) { Tree[pos] += num; pos += Lo...
ALGO
0.999956
3.788106
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2013-04-16T10:51:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c126957b...
aeba1c67-0013-461b-89f5-1e7a6f5a98e2
saxenabhishek/Maze-game
src/ProblemGen.cpp
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <fstream> #include <string> using namespace std; char go = '-', nogo = 'O'; char decideblock() { int val = rand() % 100; if (val > 10) return go; else return nogo; } int main(int argc, char **argv) { ...
TOOL
0.978576
3.419766
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2021-03-19T05:51:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "f555cc90953...
63d8d6ce-927d-46b1-ae15-09207c1d0c32
mpatel25/SortingPractice
sorting.cpp
#include "sorting.h" #include <iostream> //temporary for debugging // Temporary for debugging static void printArray (int array[], int size){ for (int i=0; i<size; ++i){ std::cout << array[i]; } std::cout << std::endl; } /*------------------------ Static Declarations ------------------------------...
ALGO
0.999968
5.515781
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2018-03-18T21:31:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "666deb86f...
5ba6d857-d2dd-4899-ade4-659be3432e54
Orang123/ACMAlgorithmExercises
图论/tarjan图连通/强连通分量/缩点/思维建边/缩点构建DAG+最短路或最长路/DAG上构建分层图求路径最大点权和/洛谷 P3119 [USACO15JAN]Grass Cownoisseur G(最长路).cpp
#include<cstdio> #include<cstring> #include<stack> #include<queue> #include<vector> #include<algorithm> #define N 100100 #define M 100100 #define INF 0x3f3f3f3f using namespace std; //ac 274ms 缩点构造DAG上的分层图(思维建边)+spfa找到达(block[1]+id)最大点权和的路径 /* 题意:约翰有n块草场,编号1到n,这些草场由若干条单行道相连. 奶牛贝西是美味牧草的鉴赏家,她想到达尽可能多的草场去品尝牧草. 贝西总是从1号草场出发,...
ALGO
0.999895
3.949466
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-02-25T05:23:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e41f8857f87...
562436da-f80f-472d-9551-348f62436ccc
Jin-SukKim/Algorithm
Problem_Solving/Key_Algorithm/Graph/16940_bfs/bfs.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> void bfs(std::vector<std::vector<int>> &graph, std::vector<bool> &visited, std::vector<int> &ans) { std::queue<int> q; q.push(1); visited[1] = true; while (!q.empty()) { int n = q.front(); q.pop();...
ALGO
0.999956
4.795043
{ "github_metadata": { "branch": "master", "commit_count": 423, "repo_created_at": "2020-05-13T07:24:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "707d0205...
9acf1ca4-4695-4467-985d-ccc36d0eb14f
NovaPigeon/Programming_Practice
hw参考/hw10/3.cpp
#include <cstdio> #include <set> #include <algorithm> using namespace std; class People { public: int id, force; People() {} People(int i, int f): id(i), force(f) {} }; bool operator <(People x, People y) { if (x.force == y.force) { return x.id < y.id; } return x.force < y.force; } in...
ALGO
0.999818
3.661039
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-10-02T18:18: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": "8a15ea6dab42...
7dacf94f-363e-41b4-8bd0-b3842ce67b0c
Aanok/cpc19
2019-09-30/preorder_traversal.cpp
// STRATEGY // We scan the traversal array and keep track on a stack of valid nodes we can // append children to, whether they are the current one or older we can reach // by backtracking. // // As long as the scan finds a smaller element than current (corresponding to a // left child) we simply push the element on the...
ALGO
0.999951
5.412313
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2019-11-26T14:58: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": "ce8cfd13f...
173953c9-e04a-4215-aa41-767e2ae0dc01
Tarunagg1/competitive_programing
gfg-problemsoftheday/Compute Before Matrix.cpp
// Compute Before Matrix // Medium Accuracy: 94.57% Submissions: 1112 Points: 4 // For a given 2D Matrix before, the corresponding cell (x, y) of the after matrix is calculated as follows: // res = 0; // for(i = 0; i <= x; i++){ // for( j = 0; j <= y; j++){ // res += before(i,j); // } /...
ALGO
0.999986
4.756018
{ "github_metadata": { "branch": "master", "commit_count": 1108, "repo_created_at": "2021-02-09T15:02:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "981e60c...
c2d5ab69-5a70-47ca-829f-a752b120f523
Randowlh/Project_ACM
code/competition/Codeforces Round #639/3.cpp
#include <bits/stdc++.h> using namespace std; const int inf = 0x7FFFFFFF; typedef long long ll; #define int long long const int mod = (0 ? 1000000007 : 998244353); const double eps = 1e-7; const ll llinf = 4223372036854775807; int mp[210000]; void work() { int n; cin >> n; int tmp; vector<int> v; fo...
ALGO
0.999917
4.776713
{ "github_metadata": { "branch": "master", "commit_count": 516, "repo_created_at": "2017-07-20T06:34:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57f094d5...
c4170fdd-6ad0-4ace-bae4-0f9f61d0d146
akshaypatidar/Spanning-Tree-Protocol
Bridge.cpp
#include "Bridge.h" Received::Received(int ID,Message mess,int t,string LAN){ id = ID; m = mess; time = t; lan = LAN; } Packet::Packet(int ID,int t,string s,string d, string LAN){ id=ID; time=t; source=s; destination=d; lan =LAN; } Bridge::Bridge(){ } void Bridge::PopulateBridge(string id,vector<pair<string...
TOOL
0.922889
4.024412
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-03-04T09:13: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": "5ff4fe0487...
c7babf05-5ad4-43aa-886d-541dbacfc307
Kim-Sumin-711/BaekJoon-solve
백준/Gold/30805. 사전 순 최대 공통 부분 수열/사전 순 최대 공통 부분 수열.cc
#include<iostream> #include<vector> #include<unordered_map> #include<algorithm> #include<functional> void set_vec_and_map(std::vector<int>& vec, std::unordered_map<int, int>& map) { int size; std::cin >> size; for (int i = 0; i < size; i++) { int temp; std::cin >> temp; vec.push_back(temp); if (map.find(temp)...
ALGO
0.999991
3.912545
{ "github_metadata": { "branch": "main", "commit_count": 253, "repo_created_at": "2024-11-17T23:58: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": "3c07d4eef5...
f9f65c91-c19b-4d1c-9638-50e5a134140a
ksngo/CPP
11/ex1111.cpp
#include <set> #include "../8/sales.h" using namespace std; //using comparison function for the key type bool compareisbn(const Sales_data &lhs, const Sales_data &rhs ){ return lhs.isbn() < rhs.isbn(); } int main() { //providing a function(returns bool) to sort the keys in multiset //use decltype t...
TOOL
0.961921
4.636029
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2020-07-16T02:40: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": "2813cae83...
e449666f-29d0-4c74-a324-4cfae075ce2e
qsnake/trilinos
packages/moocho/src/MoochoPack/src/std/MoochoPack_TangentialStepWithoutBounds_Step.cpp
// @HEADER // *********************************************************************** // // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization // Copyright (2003) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of thi...
ALGO
0.998701
3.875872
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2011-05-28T23:59:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f8f593c79e...
7ecd50a9-404c-432d-b9fa-eecb33591e15
jasondu7297/coderepair.ai
tests/code_force_tests/code0_263.cc
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define fastio() ios::sync_with_stdio(0); cin.tie(0); //debug template starts void __print(int x) {cerr << x;} void __print(long x) {cerr << x;} void __print(long long...
ALGO
0.99884
4.057525
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-02-17T09:56: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": "210491cd8de...
32a5696b-7a04-4bad-9250-039b5255d6e9
NoureldinYosri/competitive-programming
codeforces/515/D/main.cpp
#include <bits/stdc++.h> #define loop(i,n) for(int i = 0;i < (n);i++) #define range(i,a,b) for(int i = (a);i <= (b);i++) #define all(A) A.begin(),A.end() #define PI acos(-1) #define pb push_back #define mp make_pair #define sz(A) ((int)A.size()) #define vi vector<int> #define vl vector<long long> #define vd vector<doub...
ALGO
0.999973
3.267922
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2015-08-04T09:08: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": "7744ef1e0...
7f09a8ad-26e1-4e4c-a817-f31db93abab6
Zendq1998/program_practice
Explore/Learn/链表/02-双指针技巧/01-LinkedListCycle.cpp
/* Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ #include <iostream> using namespace std; ...
ALGO
0.999494
5.637583
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2017-09-27T12:56:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "0ca8aef2a...
3b98c287-903f-4753-9af6-9777c044b922
Jmozebo93/Data-Structures-and-Algorithms-_COMP280
word_analysis.cpp
#include "word_analysis.h" using namespace std; uint32_t MinimumWordLength(std::vector<std::string> &words) { // Implement this uint32_t length = 0; if(words.size() == 0){ return 0; } else { string smallest = words[0]; for (uint32_t i = 1; i < words.size(); i++){ if(words[i].length() ...
ALGO
0.986402
5.033361
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-10-01T16:52: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": "fc0e8c9fb4fc...
241512f7-23a0-42a3-8f9a-9c503c1122fc
alexander-podshiblov/HomeTasks_Programming
Semester1/Homework5/Task3/psort.cpp
#include <stdafx.h> int swap(int *a, int i, int j) { int k = a[i]; a[i] = a[j]; a[j] = k; return 0;//fdgsdgagragarg } int screening(int *a, int i, int n) { printf(" //test "); while (2 * i + 2 <= n) { if (2 * i + 2 < n) { if ((a[i] < a[2 * i + 1]) && (a[2 * i + 1] >= a[2 * i + 2])) { swap(a, i...
ALGO
0.999985
3.997539
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2012-02-23T14:58:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba5236bb1...
321b4ca5-acd4-4d14-b3cc-521dc2e4539d
dormon/Shadows
src/RSSV/rasterizeShader.cpp
#include <RSSV/rasterizeShader.h> std::string const rssv::rasterizeShader = R".( #ifndef WARP #define WARP 64 #endif//WARP #ifndef NOF_TRIANGLES #define NOF_TRIANGLES 0u #endif//NOF_TRIANGLES #ifndef SF_ALIGNMENT #define SF_ALIGNMENT 128 #endif//SF_ALIGNMENT #ifndef SF_INTERLEAVE #define SF_INTERLEAVE 0 #endif//SF...
ALGO
0.996905
4.59392
{ "github_metadata": { "branch": "master", "commit_count": 502, "repo_created_at": "2018-05-02T18:13: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": "a5846fa6...
3a361575-9889-4a20-8c24-e418b4566d3f
dib-lab/khmer
third-party/seqan/core/include/seqan/align/local_alignment_enumeration_banded.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, <NAME>, FU Berlin // All rights reserved. // // Redistribution and use in s...
ALGO
0.946476
7.222864
{ "github_metadata": { "branch": "master", "commit_count": 6672, "repo_created_at": "2012-05-15T03:52:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 771, "forks": 297, "issues": 309, "pull_requests": 44 }, "file_meta": { "content_id": "7...
de5bbcc3-894e-4320-8909-155aaa788609
Frlzz1e/Project-2
LinkedList.h
/***************************************************************** Filename: LinkedList.h - Class Specification File for LinkedList Template Class Date Created: 10/24/2024 Author: <NAME> and <NAME> Purpose: A Singly-Linked List implemented in a LinkedList template class that ...
ALGO
0.999529
5.969884
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-10-09T14:53:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a359ccc6f4f...
24b2f667-fe9c-4c8f-bf19-29e5da4023b0
bqi343/cp-notebook
Contests/USACO Solutions/2016-17/Open 2017/Plat/grass_recent.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef double db; typedef string str; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<ld> vd; typedef vector<str> vs; typedef ...
ALGO
0.99981
4.486674
{ "github_metadata": { "branch": "master", "commit_count": 1350, "repo_created_at": "2017-07-11T03:52:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2642, "forks": 429, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "c6...
f08e086a-600a-42fc-96dd-687d758a9d9f
Kitware/VTK-m
vtkm/filter/scalar_topology/internal/ParentBranchExtremaFunctor.cxx
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURP...
ALGO
0.994624
5.607654
{ "github_metadata": { "branch": "master", "commit_count": 11681, "repo_created_at": "2019-06-03T18:26:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3021...
7436e1e1-e391-4f22-8534-f91ed6576597
cloudrick/UVaOnlineJudge
src/202.cpp
#include<iostream> #include<vector> #include<set> using namespace std ; class Remainer { public : int index ; int cycle ; bool operator<(const Remainer &rhs) const { return cycle < rhs.cycle ; } Remainer(int n): cycle(n) {} } ; int main() { f...
ALGO
0.998575
4.233036
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-02-24T17:22: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": "338fecb845...
a42a6622-e5e5-46d4-ac3e-533374f64d2c
haoel/leetcode
algorithms/cpp/ransomNote/RansomNote.cpp
// Source : https://leetcode.com/problems/ransom-note/ // Author : <NAME> // Date : 2016-08-24 /*************************************************************************************** * * Given an arbitrary ransom note string and another string containing * letters from all the magazines, write ...
ALGO
0.999298
5.894869
{ "github_metadata": { "branch": "master", "commit_count": 788, "repo_created_at": "2014-10-20T03:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17857, "forks": 4931, "issues": 26, "pull_requests": 28 }, "file_meta": { "content_id": ...
4e40c913-d852-4c19-8e38-fb4fe8a04051
JustDoYoung/Coding-Test
백준/Silver/28278. 스택 2/스택 2.cc
#include <bits/stdc++.h> using namespace std; void StackFunc(stack<int> &s, int a) { switch (a) { case 1: int input; cin >> input; s.push(input); break; case 2: if (s.empty()) cout << -1 << '\n'; else { cout << s.top() << ...
ALGO
0.9988
4.497806
{ "github_metadata": { "branch": "master", "commit_count": 420, "repo_created_at": "2024-03-04T12:39:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20ed99e7...
57fbaf28-b4fd-4755-a2b2-53161862cb80
Ayush32/DSA-Cracker
Searching and Shorting/12_zero_sum_subarrays.cpp
/* * Copyright (c) 2020 * All rights reserved. */ #include <bits/stdc++.h> using namespace std; void zeroSumSubarrays(int arr[], int n) { int *prod = new int[n]; prod[0] = 1; for (int i = 1; i < n; i++) { prod[i] = prod[i - 1] * arr[i - 1]; } int temp = 1; for (int i = n - 2...
ALGO
0.999987
4.465478
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2020-11-01T05:25:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34e833f24...