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
6e7c94af-b35e-49e5-80e5-03f8eeaa88ef
Bio-Tvorogok/-graph-logic
KLogic/planar.cpp
#include "planar.h" planar::planar(QWidget *parent) : QThread() { } void planar::setting(QVector<QVector<QVector<int>>> matrix){ for (int var = 0; var < matrix.size(); var++) { QVector<int> a; n.push_back(0); main_matrix.push_back(a); for (int var_ = 0; var_ < matrix.size(); var_...
ALGO
0.922614
3.553245
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-08-22T12:05: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": "e89bcae311...
51aa374b-3984-49dd-a844-3a721cc3726f
Sifathislam/PhitronAllPrograms
DSA/ALGORITHMS/Week 2/Module6.5PracticesDay/Find_The_Depth.cpp
#include<bits/stdc++.h> using namespace std; // Create the list to find the depth const int N = 1e5+7; vector<int> Adj_List[N]; bool visited[N]; int depth[N]; void DFS_Count_Depth(int v){ // sec : 1 visited[v] = true; for (auto &&edge : Adj_List[v]) { // sec : 2 if(visited[edge]) con...
ALGO
0.999973
4.215213
{ "github_metadata": { "branch": "main", "commit_count": 184, "repo_created_at": "2023-03-31T21:19: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": "c5221a42ff...
1f8b81c3-c049-478a-89df-6cb429539d25
gcmillora/slader-codes
9781285852744/593-8.cpp
#include<iostream> using namespace std; int main(){ int array[10]; for(int ctr=0;ctr<5;ctr++){ //Set the element at index ctr to index multiplied by //the index minus 1. array[ctr] = ctr*(ctr-1); //If the remainder of index divided by 2 is 0, then //element at index ct...
ALGO
0.999932
3.639091
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2021-02-26T06:22:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b822bf181a4...
d65dcd5d-4122-4d27-936a-705ce81add80
SquidwardOV/OOP
Laba6.cpp
list.h // List.h #pragma once #include <iostream> template <typename T> class List { private: struct Node { T data; Node* next; Node(const T& value) : data(value), next(nullptr) {} }; Node* head; public: List() : head(nullptr) {} ~List() { while (head != null...
ALGO
0.992098
5.379138
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-09-18T20:10:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50de71fa613...
b345f637-2678-4612-9829-57681904c2d4
MarioJim/CompetitiveProgramming
Cpp/CodeForces/1496/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { int tests; cin >> tests; for (int t = 0; t < tests; ++t) { int n, k; cin >> n >> k; set<int> nums; for (int i = 0; i < n; ++i) { int tmp; cin >> tmp; nums.insert(tmp); } bool printing = true; int mexN = 0; ...
ALGO
0.999838
3.741523
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2019-01-23T16:47:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d03f09774...
0823cdc8-ffd5-451d-9302-a4afc7371772
goncalo-aguiar/Informacao_e_Codificacao_Projetos
IC3/IC_projeto3/src/findlang.cpp
#include "fcm_novo.cpp" int main(int argc, char** argv) { //Context order and alpha int k = -1; float a = 0; char l ='a'; while(k <= 0){ cout << "Insert context order (k): "; cin >> k; } while(a <= 0){ cout << "Insert alpha (a): "; cin >> a; ...
ALGO
0.96974
4.806085
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-20T23:20:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8a284616cec...
07a380b5-7a73-4454-9ec6-3a95c29940b9
sahilg50/DSA
ARRAY/spiralOrderMatrix.cpp
//Print the matrix in spiral order #include <iostream> using namespace std; int main() { cout << "Enter the number of rows in matrix: "; int m; cin >> m; cout << endl << "Enter the number of columns in matrix: "; int n; cin >> n; int arr[100][100]; cout << "Enter the elem...
ALGO
0.999609
5.174851
{ "github_metadata": { "branch": "main", "commit_count": 562, "repo_created_at": "2021-08-23T05:44:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1bfcb9a57...
ce7d7945-16b6-4eee-b993-6e3bbc0f3740
WuXing918/test
sort/select.cpp
#include <iostream> using namespace std; void print( int* const &a, int length) { for (int i = 0; i < length; i++) { cout << a[i] << " "; } cout << endl; } void select_sort(int a[], int length) { for(int i = 0; i< length; i++) { int min = i; for(int j= i+1; j < length; j++) { if(a[min] > a[j]) { mi...
ALGO
0.999959
4.448138
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2016-01-22T13:56: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": "8ba4b98d7...
0b34170d-24d3-43c7-9677-4eeb415e6119
abdullaAshraf/Problem-Solving
CodeForces/CF84-D2-C.cpp
/* Author: <NAME> Idea: -since x is 4*10^4 we can use an easy simulation -at every point max of 2 circles can be there but to make easier implemtaion I will use vector -make an array of vector of size 4*10^4 -get every circle and add it's id to the vector of point from c-r to c+r shifted by 2*10^4 to avoid ne...
ALGO
0.99998
4.165492
{ "github_metadata": { "branch": "master", "commit_count": 195, "repo_created_at": "2017-11-29T16:41:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d03b495c...
0900313c-9cca-44a6-b550-7b805dae7db0
palilo815/ps
baekjoon/17000/17787.cpp
#include <bits/stdc++.h> using namespace std; const int mxN = 3e5; int a[mxN]; int main() { cin.tie(nullptr)->sync_with_stdio(false); #ifndef ONLINE_JUDGE freopen("in", "r", stdin); freopen("out", "w", stdout); #endif int k; cin >> k; vector<int> ans, vt; for (int i = 1, n; i <= k; ++i) ...
ALGO
0.999859
3.834718
{ "github_metadata": { "branch": "master", "commit_count": 6725, "repo_created_at": "2020-01-12T04:58:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf879c7...
0c03616e-0dfa-4ef2-86d4-84dcb3fa8e87
RealTimin/cpp_BOJ
9251.cpp
// #include <stdio.h> // #include <string.h> // char str1[1001]={0}; // char str2[1001]={0}; // int count[1000]={0}; // int len1, len2; // int main(void) // { // int i, j, k; // int max; // scanf("%s %s", &str1, &str2); // len1 = strlen(str1); // len2 = strlen(str2); // for(i=0;i<len1;i++) // ...
ALGO
0.999983
4.497375
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2022-01-28T10:19: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": "a4f9b569e...
cedfb398-ee05-4a25-9443-592e116b31ae
hetbhagatji09/DSA
ThreadedBinaryTree.cpp
#include <iostream> using namespace std; struct node { char data; bool leftthread, rightthread; node* left; node* right; }; node* root = nullptr; // Initialize the root node node* currentnode = nullptr; // Initialize the current node char InorderSucc() { node* temp = currentnode->right; if (...
ALGO
0.999991
6.520434
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-06-25T17:47:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2d46208fe45...
f97b27fc-68c4-4858-8387-ccb8e67ce789
qze841/modcpp
coding_interview/shuffle_array.cpp
// Type your code here, or load an example. #include <iostream> #include <vector> #include <random> #include <algorithm> auto shuffle1(std::vector<int>& a){ size_t i=0; if(a.size()<=2) return a; while(i < a.size() -2){ auto temp=a[i+1]; a[i+1] = a[i+3]; a[i+3] = a[i+2]...
ALGO
0.999499
5.956532
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-03-25T19:05: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": "e172ebeca429...
876c908a-29a9-4652-9d92-f148bb036499
leexsh/LeetCode
07_hard/4-MedianofTwoSortedArrays.cpp
#include "bits/stdc++.h" using namespace std; // // Created by leexsh on 2020/3/25. // /* LeetCode-4 题目:寻找两个有序数组的中位数 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2。 请你找出这两个有序数组的中位数,并且要求算法的时间复杂度为 O(log(m + n))。 你可以假设 nums1 和 nums2 不会同时为空。 示例 1: nums1 = [1, 3] nums2 = [2] 则中位数是 2.0 示例 2: ...
ALGO
0.999992
5.902315
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2019-11-04T09:01: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": "83cbf85c...
5875a3f3-7378-4247-89b7-2fae84432e0a
icoty/LeetCode
Algorithms/532.K-diff_Pairs_in_an_Array.cpp
#include "AllInclude.h" class Solution { public: // https://www.cnblogs.com/grandyang/p/6545075.html int findPairs(vector<int>& nums, int k) { unordered_map<int, int> mp; for(auto ele : nums) ++mp[ele]; int ret = 0; for(auto ele : mp){ ...
ALGO
0.99928
5.560717
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2018-11-10T01:13:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1a7cac1...
332c4dbe-4ee7-4f44-ba1d-e79fb2d5ce41
AfsanaChoity/XPSC_Phitron_batch_6
practice_contest/Yet_Another_Monsters_Problem.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<long long> h(n); for (int i = 0; i < n; i++) { cin >> h[i]; } sort(h.begin(), h.end()); vector<long long...
ALGO
0.999901
4.743433
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-03-25T14:53: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": "6191beeb396b...
005a27b8-f96b-4551-b86c-6603ef35342b
zjsxzy/algo
Uva/P10246.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <queue> #include <stack> #include <bitset> #include <vector> #include <cstdio> #include <string> #include <sstream> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int MAXN = 111; const int...
ALGO
0.999967
3.438629
{ "github_metadata": { "branch": "master", "commit_count": 1296, "repo_created_at": "2013-05-18T10:52:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43bf4ae...
adb092b2-9d9a-4804-8053-b3d25124ba36
tfg1434/cp
Codeforces/1983D.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #endif #define f first #define s second template<class T> using V = vector<T>; using vi = V<int>; #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define pb push_back #define lb lower_bound #define ub upper_bound ...
ALGO
0.999961
4.927306
{ "github_metadata": { "branch": "master", "commit_count": 1550, "repo_created_at": "2022-01-03T21:50: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": "3b8b140...
6863eaa7-37ba-4656-bcdb-714cbb345aee
Yihang-creator/photomozaic
main.cpp
// File: main.cpp // Author: Cinda // Date: 2020-10-31 // Description: development of gold code #include "rgbtree.h" #include "cs221util/PNG.h" #include "cs221util/RGBAPixel.h" #include "tileUtil.h" #include <iostream> #include <map> #define TILESIZE 30 using namespace std; using namespace cs221u...
ALGO
0.951116
3.847306
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-12-24T03:58:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba95091a4c...
9ffa8b89-ad73-4606-95e8-d270b903280a
alfonsovega97/ProyectoIntegradorPEL
Solver.cpp
#include <iostream> using namespace std; #include "Solver.h" Solver::Solver() { } //Parte <NAME> void Solver::pedirRectasEnPlano() { char opt; bool exit = false; bool correct = false; while(!exit){ double p1, p2, v1, v2; cout << "\nIntroduce la primera recta de forma parametrica, es de...
ALGO
0.99297
3.55162
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-01-18T12:15: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": "87bbbc4341...
f9ce9514-b207-4062-b110-21f4a8948309
ishandutta2007/codeforces-f
fruwajacybyk/normal/1091/E.cpp
#include <bits/stdc++.h> #include <unistd.h> #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define FORD(i, a, b) for(int i = (a); i >= (b); --i) #define VAR(v, i) __typeof(i) v=(i) #define FORE(i, c) for(VAR(i, (c).begin()); i != (c).end(); ++i) #define all(v) (v).begin(),(v).end() #define PII pair<int,int> #define mp ...
ALGO
0.999911
3.386376
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "edd4d898bb78...
d8a7aa99-4d26-467a-aee6-83a1fcfa0d4b
zhipengge/gcode
src/algorithm/geometry.h
// @author: gezhipeng @ 20250222 // @file: geometry.h // @brief: geometry #ifndef SRC_ALGORITHM_GEOMETRY_H_ #define SRC_ALGORITHM_GEOMETRY_H_ #include <Eigen/Dense> #include <cmath> #include <limits> namespace gcode { typedef Eigen::Vector2d vector2d_t; typedef Eigen::Vector3d vector3d_t; typedef Eigen::Vector2f vec...
ALGO
0.999034
6.864838
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2023-04-08T03:15: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": "f48f7af74...
a0c64b2d-49b1-44e2-bb7b-34416b0d4b01
Koalla6/Models_4
Проект1/Source.cpp
#include <conio.h> #include <memory.h> #include <iostream> #include <fstream> #include <stack> using namespace std; #define N 8 #define E 15 const int MAX_E = (int) 1000000; const int MAX_V = (int) 1000; const int INF = (int) 1000000000; int firstVert[MAX_V], visited[MAX_V]; int edgeCount=0, capacity[MAX_E], onEnd[M...
ALGO
0.999903
3.401532
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-03-23T00: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": "d04794ec2f41...
9b6d0583-5109-47e2-b9d3-4dea9fc71dc6
manishswami1114/vs-code
Data_structure/linked_lists.cpp
/*#include <bits/stdc++.h> using namespace std; class Node { public: int info; Node *next; }; void printList(Node *n) { while (n != NULL) { cout << n->info << endl; n = n->next; } } int main() { Node *start = NULL; int n; cin >> n; Node *ptr; while (n--) {...
ALGO
0.999837
4.729509
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-11-14T08:13: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": "d1d5bc662...
d097bdbb-9966-42c1-8790-6a4fc5ec9911
Jeffrin2005/Dynamic_Programming
Longest Increasing Subsequence.cpp
class Solution { private: vector<vector<int>> memo; int findLIS(int previousIndex, int currentIndex, vector<int>& nums){ if (currentIndex == nums.size()){ return 0; } if(memo[previousIndex + 1][currentIndex] != -1) { return memo[previousIndex + 1][currentIndex]; ...
ALGO
0.999999
6.423036
{ "github_metadata": { "branch": "main", "commit_count": 204, "repo_created_at": "2023-11-24T06:26:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2af522f3dc...
a4bcb8ab-bfac-42d7-ac1e-11189f9dadac
j-r77/xplode
algorithms/ctane.cpp
#include "ctane.h" #include "../util/output.h" #include "partitiontable.h" #include <iterator> CTane::CTane(Database& db) :BaseMiner(db) { } int CTane::nrCFDs() const { return fCFDs.count(); } Itemset CTane::getConstantCFDs(const Itemset& nodeItems, const SimpleTidList& tids, const std::vector<MinerNode<Part...
ALGO
0.989553
4.211215
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-02-02T11:00:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f427b7ecb2...
9ec4c989-3b2a-4eaf-8dda-3f90296b92ec
MostlyFor/Algorithm_topic
백준/Gold/10942. 팰린드롬?/팰린드롬?.cc
#include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n = 0; cin >> n; vector<int> arr(n, 0); for (int i = 0; i < n; i++) cin >> arr[i]; // dp[k] = s, k 번째 인덱스는 최대 s를 가지는 홀수 펠린드롬 // dp2[k] = s, k번과 k+1 번째 인덱스를 ...
ALGO
0.999968
4.393495
{ "github_metadata": { "branch": "main", "commit_count": 983, "repo_created_at": "2023-08-03T07:30:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5002fedb3...
3ddda02f-f6a1-478d-ac60-37b1b38eba2f
santi2019/UCC-Santiago-Vietto
2do/Programacion 3/Practico/Parciales/Parciales-Finales/Resolucion de todos/Ej10.cpp
/* [Ejercicio 10]: Implementar un método a la clase lista que reciba como parámetro un valor D. El método debe buscar este valor y moverlo a la primera posición (Solo moviendo enlaces. No creando nodos nuevos). */ #include <iostream> #include "Estructuras/Lista.h" using namespace std; class ListaExamen : public Lista...
ALGO
0.999446
4.318969
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2023-06-10T22:48:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "446866c3ba0...
79791f63-6cac-496f-81bc-283523a11a3b
eohyemin/Algorithm_works
etc/p43237.cpp
#include <string> #include <vector> #include <iostream> #include <cmath> using namespace std; int solution(vector<int> budgets, int M) { int answer = 0; long sum = 0; for(int i=0; i<budgets.size(); i++) { sum += budgets[i]; } int start = 0; int end = budgets[0]; for(int i=...
ALGO
0.999989
4.721598
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2020-04-04T09:47: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": "d63487db8...
2dced7f0-9978-4a12-af77-8c6f44b056ec
GuillermoFrancoAbellan/ExoCLASS
cosmorec_lite/Development/ODE_PDE_Solver/PDE_solver.h
//================================================================================================== // // Author <NAME> July 2010 // last modification: Aug 2012 // //================================================================================================== // 27.06.2011: added PDE setup for integro-differenti...
ALGO
0.999785
5.429495
{ "github_metadata": { "branch": "main", "commit_count": 1785, "repo_created_at": "2022-04-08T14:00:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d019da85...
9ea4ae1c-ae32-4e81-a722-11e984e005e9
Sankalp7860/Algorithms
Assignment_07/question_02.cpp
#include <iostream> #include <vector> using namespace std; using namespace chrono; int MCM_topDown(int i, int j,vector<int> &arr) { if (i == j) return 0; int mini = INT_MAX; for (int k = i; k < j; k++) { int steps = arr[i - 1] * arr[k] * arr[j] + MCM_topDown(i, k, arr) + MCM_topDown(k + 1, j, ar...
ALGO
0.999964
4.067381
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-18T05:52: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": "8c7f818fff86...
9d689039-ca1a-4fa2-83d6-0b79539c94fb
minhvvan/CodingTest_CPP
백준/Gold/30805. 사전 순 최대 공통 부분 수열/사전 순 최대 공통 부분 수열.cc
#include <bits/stdc++.h> #include <unordered_set> using namespace std; #define INPUT_OPTIMIZE cin.tie(NULL); cout.tie(NULL); ios::sync_with_stdio(false); #define INF 2e9 using namespace std; int N, M; vector<pair<int,int>> A; vector<pair<int,int>> B; bool cmp(pair<int,int> a, pair<int,int> b) { if (a.first == b.fir...
ALGO
0.999998
3.41504
{ "github_metadata": { "branch": "main", "commit_count": 800, "repo_created_at": "2023-09-18T05:34: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": "0dc5571e5e...
80f0b545-1f3a-43b9-adad-47944fa6a7b8
kj1241/Algorithm_Portfolio
Algorithm/Algorithm-Portfolio/BinarySearch/main.cpp
#include <iostream> #include <cstdlib> #include <algorithm> struct Score { int number; double score; }; Score* BinarySearch(Score ScoreList[], int Size, double Target) { int Left = 0; int Right = Size - 1; while (Left <= Right) { int Mid = (Left + Right) / 2; if (Target == ScoreL...
ALGO
0.999827
5.165999
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-02-22T09:36: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": "201cbe9ddad...
d60f62a8-9329-4919-a896-443ccd59094a
bigwitch3r/PP_Lab4
general_task_4_allreduce.cpp
#include <stdio.h> #include "mpi.h" #include <cstdlib> #include <ctime> void general_task_four_allreduce(int* argc, char** argv) { MPI_Init(argc, &argv); int rank, size, result = 0; int array[100]; for (int i = 0; i < 100; i++) { array[i] = i; } MPI_Comm_rank(MPI_COMM_WORLD, &ran...
ALGO
0.996136
4.020153
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2022-05-30T15:26:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a3e9c91c...
e72fe1b6-79f6-42d2-97d2-e90ee2d4714e
shj0306/Baekjoon_Algo
Mario_dataStructure/21939.cpp
//#include <bits/stdc++.h> //#include <unordered_map> //#define all(x) (x).begin(), (x).end() //#define fast_io ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) //using namespace std; //using pii = pair<int,int>; // //const int MAX = 100001; // //struct cmp1 { // bool operator()(pii p1, pii p2) { // if (p1.fi...
ALGO
0.999605
4.599576
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2022-03-22T05:12: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": "85624b4b6...
92446f53-7da8-4895-a4cf-7a7585a6f877
MandarinIndia/CSESProblemSet
SortingAndSearching/tower.cpp
#include<bits/stdc++.h> using namespace std; template <typename A> ostream& operator<< (ostream &cout, vector<A> const &v) {cout << '['; for(int i = 0; i < v.size(); i++) {if (i) cout << ','; cout << v[i];} return cout << ']';} template <typename A> istream& operator>> (istream& cin, vector<A> &x){for(int i = 0; i < x...
ALGO
0.99983
4.274889
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-06-28T04:02: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": "ee06c1d8197...
009975b6-1cf7-444a-b004-49088aafa253
anujc0de/Competitive-Programing-Algo-and-Datastructures
graph/dfs/problem _bfs/problem2.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 3; vector<int> g[N]; int visited[N] = {0}; int dist[N] = {0}; void bfs(int start) { queue<int> q; q.push(start); visited[start] = 1; while (!q.empty()) { int v = q.front(); q.pop(); for (int i : g[v]) ...
ALGO
0.999796
4.073285
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-02-25T18:51:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbf63665ad...
573db151-187b-4768-ae07-d2253d479ea4
sparsh2002/Placement-Course-cpp
codeforces/strings/16_Get_an_Even_String.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<ll> vl; typedef vector<vl> vvl; #define rep(i,a,b) for(int i=a ; i<b ; i++) long long INFF = 1000000000000000...
ALGO
0.999958
3.716735
{ "github_metadata": { "branch": "master", "commit_count": 345, "repo_created_at": "2021-09-08T12:52:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f355b83d...
9f0294fc-35ab-4b0b-a78a-e2f8a653265b
OpenModelica/OpenModelica
OMCompiler/SimulationRuntime/OMSICpp/runtime/include/Core/Utils/numeric/bindings/lapack/computational/tftri.hpp
// // Copyright (c) 2002--2010 // <NAME>, <NAME>, <NAME>, // <NAME> and <NAME> // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // THIS FILE IS AUTOMATICALLY GENERATED // PLEASE DO NOT EDIT! // #ifndef BOOS...
ALGO
0.926999
7.095734
{ "github_metadata": { "branch": "master", "commit_count": 37531, "repo_created_at": "2015-05-03T16:59:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1002, "forks": 322, "issues": 2061, "pull_requests": 46 }, "file_meta": { "content_id":...
5b89bb31-e77b-41c0-9564-5d07fa3f16b1
openinx/algorithm-solution
leetcode/generate-parentheses.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <stdio.h> #include <stdlib.h> using namespace std; class Solution { public: vector<string> solve(int n, vector< vector<string> > & dp, vector<bool> &visited){ if(visited[n]) return dp[n]; dp[n] = vector<string>(); for(int i ...
ALGO
0.999559
5.246713
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2013-11-10T18:06:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d4af7e30...
1ff61449-a504-49a6-a45e-a3c403a359d6
Azher-Bashir/PROGRAMMING
inc/ICT FAST/OOP/arrays/code 01 (printing arrays).c++
//Taking lenght of arrays form the user and taking input from the user from //the user and printing the number of the array that the user wants to print #include <iostream> using namespace std; int main() { int n, a; cout << "Enter teh legth of the array: "; cin >> n; int number[n]; for (int i =...
TOOL
0.902527
3.397911
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-10-26T20:25:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61efbe99813...
358ec25d-6f86-42e9-aa0c-2f840a0fc401
virtyaluk/leetcode
problems/1473/solution.cpp
const int MAX = 1e7; class Solution { private: int dp[101][101][22]; public: int minCost(vector<int>& houses, vector<vector<int>>& cost, int m, int n, int target) { memset(dp, -1, sizeof(dp)); int ans = dfs(houses, cost, 0, target, 0); return ans > MAX ? -1 : ans; ...
ALGO
0.99973
5.041291
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-01-19T04:27:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19b85d74d...
5953e408-9801-49f4-b7cd-8cda3adb5813
20-with-Java/Part_1_FastCampus
Part1_강의자료/Ch04_전체탐색_시뮬레이션/문제별코드/1730_판화/1730.cpp
#include <stdio.h> #include <string.h> #include <utility> using namespace std; int main() { bool pass_vertical[12][12] = {}, pass_horizontal[12][12] = {}; char command[255]; int N; pair<int, int> cur = make_pair(0, 0); scanf("%d %s", &N, command); for (int i = 0; i < strlen(command); i++) ...
ALGO
0.99996
4.115001
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2023-02-17T06:14:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebbee0672d...
8cb579bb-4956-4a36-aa3a-78e95e0dd5ee
kassonlab/gmxapi
src/gromacs/linearalgebra/gmx_lapack/dorml2.cpp
#include <cctype> #include "../gmx_lapack.h" #include "gromacs/utility/real.h" void F77_FUNC(dorml2,DORML2)(const char *side, const char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int gmx_unused *info) { const char xside=std::toupper(*side); c...
ALGO
0.991325
4.84952
{ "github_metadata": { "branch": "master", "commit_count": 19315, "repo_created_at": "2017-05-25T14:05:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 53, "forks": 13, "issues": 93, "pull_requests": 2 }, "file_meta": { "content_id": "463f...
42464136-9c01-4b86-b78c-e3ca9b96e40a
Hoony0321/Algorithm
2021_02/2021_02_06/2020_서울대학교_프로그래밍_경시대회_Division2/baekjoon_19843.cpp
//baekjoon_19843_수면 패턴 #include<iostream> #include<vector> using namespace std; int T; int N; vector<vector<int>> list; constexpr unsigned int HashCode(const char* str) { return str[0] ? static_cast<unsigned int>(str[0]) + 0xEDB8832Full * HashCode(str + 1) : 8603; } int ChangeDaytoInt(string day){ int return...
ALGO
0.999883
3.989192
{ "github_metadata": { "branch": "main", "commit_count": 391, "repo_created_at": "2022-03-12T06:11:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f49b734160...
a5a93dfe-79a1-4781-b1c9-4adbb5ad4160
kunyavskiy/competitive-programming-archive
opencup/17-18/171126/J.cpp
#include <iostream> #include <fstream> #include <vector> #include <set> #include <map> #include <cstring> #include <string> #include <cmath> #include <cassert> #include <ctime> #include <algorithm> #include <sstream> #include <list> #include <queue> #include <deque> #include <stack> #include <cstdlib> #include <cstdio>...
ALGO
0.998664
3.495135
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2022-10-08T20:56:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c442c4f2c2f...
b94fd829-e6eb-4d85-9c28-b9506bc97918
ShadyWing/Computer_Graphics_PBL
ray_trace.h
#pragma once #include "lineTriangle3DIntersection.h" #define M_PI 3.141592653589793 #define CUR_INFINITY 1e8 #define MAX_RAY_DEPTH 1 struct my_draw_color { float r; float g; float b; my_draw_color operator +(const my_draw_color& input_color) { return my_draw_color{ r + input_color.r,g + input_color.g,b + input_c...
ALGO
0.999349
5.235345
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-08-04T12:30:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "3787fb9219...
95aff4b8-3805-4e6a-a441-483703e5cffd
Lotuses-robot/Codes
Exercise/Luogu/P9745/84pts.cpp
// Copyright 2023 Lotuses #define tsz signed #include <cstdio> #include <cassert> #include <cstring> #include <vector> template<typename T> void read(T &r) { r = 0; static char ch, last; ch = getchar(), last = 'z'; while (ch < '0' || ch > '9') last = ch, ch = getchar(); while (ch >= '0' && ch <= '9') r = (r << 1) + (r...
ALGO
0.999867
4.467998
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2022-11-08T05:50:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a838e223ce...
487e4a12-e819-4e22-a404-1e15448f2c3c
rohit2000123sahu/Codeforces-Solutions
Codeforces Round #773 (Div. 2)/A. Hard Way.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define F first #define S second #define PI 3.1415926535897932384626 #define all(x) x.begin(), x.end() #define endl '\n' #define MOD 1000000007 typedef vector<ll> vl; typedef pair<ll, ll> pl; typedef unordered_...
ALGO
0.999986
5.361771
{ "github_metadata": { "branch": "main", "commit_count": 450, "repo_created_at": "2021-03-31T13:03:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca585e3d98...
a618dcc8-ad49-4f44-be04-654025635214
shuvokhalid173/uva-online-judge-solution-
10050_uva.cpp
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> ...
ALGO
0.998985
3.290708
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-11-27T11:32: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": "1720a311ae...
c67b5d33-5536-4eb1-9b1d-8919cdf09c59
TanishqBhargava/Hackerearth
Algorithms/String Algorithms/Z Algorithm/Rhezo and Division.cpp
/*========================*\ | ID: tanishqbhargava2509 | | LANG: C++ | \*========================*/ //<NAME> #include<bits/stdc++.h> using namespace std; long long dp[10005][5][5][3][3]; char P[200010], T[10005]; int ar[200010], Z[200010], counter; long long go(int idx, int two, int three, int five, in...
ALGO
0.999862
4.086755
{ "github_metadata": { "branch": "main", "commit_count": 1786, "repo_created_at": "2021-06-22T11:44:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "844c7a091...
09c4af99-47e0-4158-b332-d508e2f2a7f1
jeetshee4/Cpp-Coding-Practice
Pattern 4/PyramidPattern.cpp
#include <iostream> using namespace std; int main () { int n; cout<<"Enter the row number:"; cin>>n; for(int i = 1 ; i<= n; i++) { //First the space Triangle for(int j = 1 ; j <= n - i ; j++){ cout<<" "<<" "; } //Then the Flipped Triangle for(in...
ALGO
0.999906
3.985384
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-06-21T10:50: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": "59b22a4084a...
6b091854-234e-47c5-997b-75c33dd41be6
trygas/own_vio_example
EstimatorOptimization.cpp
// // Created by liu on 20-1-15. // #include "EstimatorOptimization.h" #include "PoseLocalParameterization.h" void EstimatorOptimization::SetParameter() { for(int i = 0; i < svar.GetInt("camera_number", 1); ++i){ _tic[i] = para._Tic; _ric[i] = para._Ric; } _feature_manager.SetRic(_ric); ...
ALGO
0.996205
3.684183
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2019-12-03T09:17:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9731ba513...
70b2ba01-4cc4-4835-9e5d-f610e67ff9fa
raincross7/code-similarity
codes/train_code/problem329/problem329_371.cpp
#include <iostream> #include <vector> #include <string> #include <cstring> #include <algorithm> #include <cmath> #include <set> #include <map> #include <stack> #include <queue> #include <iomanip> #include <cassert> #include <random> #include <tuple> #include <cstdint> #include <complex> #include <bitset> #define rep(i...
ALGO
0.999993
4.720174
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "c084b3b8a951...
f5eb1766-5804-4e62-a9f6-ba08da7f22ef
greenfox-zerda-sparta/katbtr
week-03/day-1/Exercise06.cpp
#include <iostream> using namespace std; /** * Create a function called "fliter_greater_than_5" that takes a pointer to an int array, and it's size. * It should return a pointer to a new array that only consists the numbers that are bigger than 5. */ int* filter_greater_than_5(int* array, int size) { int* point...
TOOL
0.999796
5.040351
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2016-10-19T11:35:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c4923665...
936ff24a-47d4-400f-b612-5ea6915af975
AlejandrVilla/KD_Tree
BruteForce.cpp
#include <bits/stdc++.h> #define pii pair<int,int> using namespace std; vector<pii> points; pii pr = {100,100}; set<pair <double, pii> > order; double dist(const pii &a, const pii &b){ return (sqrt( pow(b.first - a.first, 2.00) + pow( b.second - a.second, 2.00))); } int main(){ srand(time(NULL)); for(i...
ALGO
0.994426
3.814352
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-11-29T02:17: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": "2ab3d8793db6...
1c2e3660-3ae7-43ce-ad7f-e1e4d60994e1
MegEngine/MegEngine
dnn/src/fallback/matrix_mul/gemm_common.h
#pragma once #include <cstddef> #include <cstdint> #include <functional> #include "src/common/utils.h" namespace megdnn { namespace matmul { /** * \brief Generic pack function. * * Assuming the untransposed case, this works by first reading <block_w> * consecutive values from the first input row. This same numb...
ALGO
0.999322
6.462233
{ "github_metadata": { "branch": "master", "commit_count": 3305, "repo_created_at": "2020-03-18T08:21:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4802, "forks": 546, "issues": 169, "pull_requests": 1 }, "file_meta": { "content_id": "8...
754ef324-6e2a-4dc3-8b05-4106122a48a8
thegamer1907/Code_Analysis
Codes/AC/2611.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e7; int cnt[N + 11], n, sum[N + 11], q; bool isprime[N + 11]; int main(){ scanf("%d", &n); for(int i = 1; i <= n; i++){ int x; scanf("%d", &x); cnt[x]++; } for(int i = 2; i <= N; i++) if(isprime[i] == 0) for(int j = i + i; j <...
ALGO
0.999755
3.746411
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-05-24T10:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f2b97ea0...
b721700a-b0c3-4ffe-8822-78c89662c7d5
pubby/Ralph-4
levelc.cpp
#include <cstdio> #include <cstdlib> #include <algorithm> #include <array> #include <fstream> #include <iostream> #include <sstream> #include <string> #include <vector> constexpr int W = 16; // width constexpr int H = 15; // height constexpr char ralph_char = '&'; using grid_t = std::array<std::array<char, W>, H>; ...
TOOL
0.998002
4.016058
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-04-16T00:04:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e7393e621...
45419516-0f5a-46b2-8635-83b3fc1c2ad7
ishandutta2007/codeforces-w
wzyeustia/normal/1284/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef tuple<ll, ll, ll> t3l; typedef tuple<ll, ll, ll, ll> t4l; typedef vector<ll> vl; typedef vector<vl> vvl; typedef vector<vvl> vvvl; typedef vector<int> vi; typedef v...
ALGO
0.999493
4.330173
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34: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": "f540ee0f8757...
24e1b614-5efb-44d3-ac53-879e8075a148
ryotaro612/at_c
src/abc360/b.cc
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #ifndef ONLINE_JUDGE #define dbg(...) \ cerr << "\e[91m" << __func__ << ":" << ...
ALGO
0.999971
5.228085
{ "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": "abed170...
8057ef49-705a-47ed-b6de-3b268e0e4014
AleJimenezRJ/MemorySystem
src/memoriaVirtual.cpp
#include <climits> #include <iostream> #include <map> #include <mutex> #include "memoriaVirtual.h" std::map<int, int> memoriaFisica; // Simula la memoria física // Constructor de MemoriaVirtual. // Inicializa los marcos de memoria física y las tablas de páginas para cada proceso. MemoriaVirtual::MemoriaVirtual(int to...
TOOL
0.963173
5.856605
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-10T04:37: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": "82f4f9102911...
0f6b780d-8f88-4673-a57f-1c9f072225c5
Sukarnapaul1893/Sukarna-s-Topic-Wise-Problems-Solutions
0-1 BFS/SPOJ - KATHTHI.cpp
tutorial link : https://codeforces.com/blog/entry/22276 #pragma warning(disable:4786) #pragma warning(disable:4996) #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/trie_policy.hpp> #define pii pair<int,int> #define pll pair<long long ,long long> #define pli pair<long long , int> #de...
ALGO
0.999911
3.89217
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2019-03-06T23:11: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": "27938c63...
829c397d-3f0c-41be-b225-3827d9c5ebbd
dsc-iem/TheAlgorithms
CPlusPlus/search/binary_search.cpp
/** * @file * @brief [Binary search * algorithm](https://en.wikipedia.org/wiki/Binary_search_algorithm) */ #include <iostream> /** binary_search function * \param [in] a array to sort * \param [in] r right hand limit = \f$n-1\f$ * \param [in] key value to find * \returns index if T is found * \return -1 if T ...
ALGO
0.999982
5.390254
{ "github_metadata": { "branch": "main", "commit_count": 183, "repo_created_at": "2021-10-01T18:56:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 49, "forks": 34, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "da6ef6273...
e9b40c7c-1077-42a8-ba54-5352be746615
chetweger/kivy-minimax
ai/metaboard.cpp
#include "metaboard.h" #include <algorithm> MetaBoard::MetaBoard() { } void MetaBoard::printMe() { cout << "Printing out board:\n"; cout << "Current player is: " << (int) this->generateNextPlayer() << "\nPlayer MAX is: " << player_max << "\n"; for (int i = 0; i < 9; i++) { this->boards[i].printMe(...
ALGO
0.93045
3.134988
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2014-10-28T02:47: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": "1858f2bbe...
ae7a5b5e-e1ad-4bdd-9e03-64ff267bb724
shubha360/CPP-Practice-Codes
C++ 2nd Course test codes/Section 08/test8.cpp
#include<iostream> int main() { const int thousandValue = 1000; const int fiveHundredValue = 500; const int twoHundredValue = 200; const int oneHundredValue = 100; const int fiftyValue = 50; const int twentyValue = 20; const int tenValue = 10; const int fiveValue = 5; const int two...
TOOL
0.976478
3.526639
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-07-27T09:03: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": "6bdc176c34...
2326744d-664a-45c5-8769-9d251d3b7130
KhushiSonkusare/LeetCode
0416-partition-equal-subset-sum/0416-partition-equal-subset-sum.cpp
class Solution { public: bool canPartition(vector<int>& nums) { int sum = 0; for (int num : nums) { sum += num; } if (sum % 2 == 1) { return false; } int target = sum / 2; int n = nums.size(); vector<vector<bool>> dp(n, vecto...
ALGO
0.999754
5.805929
{ "github_metadata": { "branch": "main", "commit_count": 1387, "repo_created_at": "2024-06-06T11:57: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": "c84bd936f...
1ac0a480-fe00-4a13-8438-ab72e3dc1549
gvin27/Competitive_Programming
CODEFORCES/Codeforces Round #779 (Div. 2)/A_AC.cpp
#define onlycc ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #include <bits/stdc++.h> using namespace std; typedef long long ll; int t, n; string s; int main() { onlycc; cin >> t; for(int tc = 0; tc < t; tc++) { int num[2] = {}, ans = 0; cin >> n; cin >> s; for(i...
ALGO
0.999797
4.357543
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2020-08-02T07:08: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": "434a2645...
b853567f-fc69-4dd2-932c-93ef11c01840
amanjaiswl/CodeforcesCP
.ccls-cache/@home@runner@CodeforcesCP/947Div12@q2.cpp
// this is ques 1. did it correctly in the contest. rest couldn't do :( #include <iostream> #include <vector> #include <algorithm> using namespace std; void solve() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; ++i) { cin >> a[i]; } for (int i = 0; i < n; ++i) { ...
ALGO
0.999973
4.825541
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2024-04-19T08:00:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0389b75ed8...
1a125cdb-56f6-47a8-aa0d-5a25d2871177
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Mixtral/top0-100/closest-subsequence-sum-Solution.minAbsDifference/177750_DoS_Exec_Code.cpp
begin_softmask(fz_context *ctx, pdf_run_processor *pr, softmask_save *save) { pdf_gstate *gstate = pr->gstate + pr->gtop; pdf_xobject *softmask = gstate->softmask; fz_rect mask_bbox; fz_matrix tos_save[2], save_ctm; fz_matrix mask_matrix; fz_colorspace *mask_colorspace; save->softmask = softmask; if (softmask ...
TOOL
0.94837
5.592309
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-22T14:39:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59d8a62d6911...
cda01375-4244-4dbe-b389-20f2cb5f2e4a
MiT9Y/School42-21-Learning
CPP_Modules/M02/ex03/main.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: ...
ALGO
0.93822
5.153005
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-02-10T15:03:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d57f1cba444...
864e0abc-d2c5-48a3-8e61-e26e74e19e1e
Kodaen/IAnt
ActionPositionMyself.cpp
#include "ActionPositionMyself.h" #include "GlobalBlackboard.h" #include "MapSystem.h" ActionPositionMyself::ActionPositionMyself(LocalBlackboard& _blackboard) : Action(_blackboard) {} EStatus ActionPositionMyself::doAction() { GlobalBlackboard& r_gbb = GlobalBlackboard::singleton(); Location* currentAnt = _blackb...
TOOL
0.917297
3.543812
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2024-02-10T18:32: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": "9d7ad63f3c...
67f2a754-6165-4041-8b26-83b8c9e6f70b
SkeletonK10/NODEVPS
BOJ/15489.cpp
#include <bits/stdc++.h> #define FastIO std::ios::sync_with_stdio(false); cin.tie(0); //////New Type Definition//////////////////////////////////////////////////////////////// typedef long long ll; typedef std::pair<int, int> pii; typedef std::tuple<int, int, int> tiii; typedef std::complex<double> cpx; ////////////...
ALGO
0.999964
4.675394
{ "github_metadata": { "branch": "main", "commit_count": 316, "repo_created_at": "2023-06-12T23:45: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": "7d8895d0b2...
41c3274e-f8bc-4ccf-a055-23030807e1a0
sstarodubov/algorithm_research
C++/codeforces/800/1611a.cpp
#include <iostream> #include <map> #include <cmath> #include <string> #include <stack> #include <vector> #include <set> using namespace std; void read_arr_long(int n, long long *a) { for (int i = 0; i < n; ++i) { cin >> a[i]; } } void read_arr(int n, int *a) { for (int i = 0; i < n; ++i) { ...
ALGO
0.999902
4.126054
{ "github_metadata": { "branch": "main", "commit_count": 1798, "repo_created_at": "2021-02-01T16:56: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": "86e73fb86...
573348ea-27ff-40cf-99dd-33c7c1bf23df
hs05june/CP
cp_practice/contests/1703G.cpp
// ੴ ਵਾਹਿਗੁਰੂ #include<bits/stdc++.h> #define rp(i,a,n) for(int i=a;i<n;i++) #define rep(i,a,n) for(int i=a;i<=n;i++) #define ll long long #define int long long #define deq deque<ll> #define mii map<ll,ll> #define pii pair<ll,ll> #define pb push_back #define f first #define s second #define sz(a) (int)a.size...
ALGO
0.999713
3.434216
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-07-20T13:09: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": "6484cf68bec...
f1f360ef-6a8a-4fc2-b635-484f5bce3b29
TapasSenapati/anomaly
graphcreate.cpp
#include "graphcreate.h" int SIZE1 = sizeof(AdjListNode); int SIZE2 = sizeof(Graph); int SIZE3 = sizeof(AdjList); AdjListNode* newAdjListNode(int dest) { AdjListNode* newNode = new AdjListNode[SIZE1]; newNode->dest = dest; newNode->next = NULL; return newNode; } Graph* createGraph(int V,int E) { ...
ALGO
0.996966
5.294278
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2013-11-16T10:33: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": "d1b89e20fa...
827e406e-1f15-46cc-a53a-9a8f0d997605
Joaco-gavernet/competitive-programming
rounds/round-909/C.cpp
#include <bits/stdc++.h> using namespace std; //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); // neal Debugger template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; } template<typename T_container, type...
ALGO
0.999969
4.59792
{ "github_metadata": { "branch": "master", "commit_count": 523, "repo_created_at": "2023-07-10T02:25:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6f47c22...
7a028dfa-8517-44fc-9424-1a51d5be954e
RayRiver/misc
cocos2dx/aitest/Classes/TSP/TSPAlgorithm.cpp
#include "TSPAlgorithm.h" #include "utils/helper.h" #include "TSPMap.h" using namespace std; TSPAlgorithm::TSPAlgorithm() { this->init(0.0, 0.0, 1, 3, 0); } TSPAlgorithm::~TSPAlgorithm() { } void TSPAlgorithm::init( double crossoverRate, double mutateRate, int nPopSize, int nChromoLength, int nBestToAdd ) { m_h...
ALGO
0.999964
5.014771
{ "github_metadata": { "branch": "master", "commit_count": 155, "repo_created_at": "2014-02-22T06:40:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba8a5e3c...
ba661984-5067-4b1d-8eb3-bbce405ad401
Ekaterina132479/factorial_parallel
0/main.cpp
#include <iostream> #include <vector> #include <thread> #include <mutex> using namespace std; mutex mtx; // Мьютекс для синхронизации вывода // Функция для вычисления минора матрицы vector<vector<int>> getMinor(const vector<vector<int>>& matrix, int row, int col) { int n = matrix.size(); vector<vector<int>> ...
ALGO
0.999999
5.651347
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2025-02-10T17: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": "3c6b46e2f8d...
f31276c8-0f54-46a2-b952-f74b74a8ef70
SavelMike/OSY-progtest2
buddymm.cpp
#ifndef __PROGTEST__ #include <cstdio> #include <cstdlib> #include <cstring> #include <cstdint> #include <cassert> #include <cmath> #include <iostream> using namespace std; #endif /* __PROGTEST__ */ struct BFLElement { // Pointer to next element uint32_t next; // Address uint32_t address; }; struct BFLElement* us...
ALGO
0.983047
4.14792
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2022-04-24T19:03: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": "7e6d93aba...
599b4855-6c03-4cce-99fa-37151c14119c
arnabs542/interviews
leetcode/1055_shortest-way-to-form-string.cpp
//From any string, we can form a subsequence of that string by deleting some number of characters (possibly no deletions). //Given two strings source and target, return the minimum number of subsequences of source such that their concatenation //equals target. If the task is impossible, return -1. // //Example 1: // //...
ALGO
0.999826
5.840901
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2021-01-15T05:19:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55e8617cf...
dfb8320b-69db-49fe-ab8d-54b9473605ad
DVRodri8/Competitive-programs
OnlineJudgeUVa/C++/11xxx/11956 - Brainfuck/main.cpp
#include <iostream> #include <string> #include <array> using namespace std; int main(){ short cases; string line; char command; cin >> cases; cin.ignore(); for(int i=1; i <= cases; i++){ array<int, 100> memory; for(int c=0; c < 100; c++){ memory[c] = 0; } int position = 0; getli...
ALGO
0.99746
3.757471
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-04-04T12:45: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": "b1be4557f...
c8b6d8fb-a11d-4812-8b11-5da4e230fd34
Skeef79/Huffman-encoder-decoder
huffman.cpp
#include<iostream> #include<fstream> #include"bstream.h" #include<unordered_map> #include<set> #include<functional> #include<string> #include<time.h> #include<map> #include<assert.h> #include<filesystem> using namespace std; typedef string codeT; typedef short charT; const charT TERM = 257; class HuffmanNode { public...
ALGO
0.999109
4.262427
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-09-14T13:57:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf07c2254c40...
23cdf60d-9946-464b-8709-c83faf52ea08
DennisVanEe/ArtificialEye_v2
dependencies/opensubdiv/include/opensubdiv/far/gregoryBasis.cpp
// // Copyright 2013 Pixar // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with: // ...
ALGO
0.993036
6.010307
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2017-08-23T01:19:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81579cdf3...
1eb47736-d34d-43f1-bfc1-d91c9aa1cd7c
dwkim606/IPPBA
Scheme.cpp
#include "Scheme.h" #include "distr.h" #include <iostream> using namespace std; namespace Scheme { void mskGen(MasterSecretKey& msk) { int i, j, k; for (i = 0; i <N; ++i) { for (j = 0; j < K; ++j) { msk.S[i * K + j] = (U(GEN)%2); } } for (k = 0; k < M; ++k) msk.U[k] = (U(GEN) >> (SFT)); } void...
ALGO
0.9943
3.98013
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2018-11-30T06:47:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b73fad830...
18394085-7a8a-495d-8349-0015a6a5a392
abhinavkumariem/LeetCode-sde-sheet
0380-insert-delete-getrandom-o1/0380-insert-delete-getrandom-o1.cpp
class RandomizedSet { public: vector<int> s; RandomizedSet() { } bool insert(int val) { if(find(s.begin(), s.end(),val)==s.end()){ s.push_back(val); return true;} return false; } bool remove(int val) { for (auto i = s.begin(); i != s.end(...
ALGO
0.991117
5.891283
{ "github_metadata": { "branch": "main", "commit_count": 98, "repo_created_at": "2022-10-13T04:59: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": "b51e6193eae...
6c92d2e7-117a-449c-b02a-900b4718386f
Elena-Cherepovskaya/KP_OS
BTree.hpp
#ifndef UNTITLED_BTREE_HPP #define UNTITLED_BTREE_HPP #include <vector> #include <memory> #include <stack> #include <iostream> #include <functional> #include <optional> #include <memory> #include <string> #include "Exception_Btree.hpp" template<typename T_key, typename T_value, int t> class B_node { public: std...
ALGO
0.993291
5.701584
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-19T09:29: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": "2ba575d8d0ef...
e278a083-7044-4705-9912-014f2d12915b
cea-trust-platform/trust-code
src/VDF/Sources/Dilatable/Source_QC_VDF_Face.cpp
/**************************************************************************** * Copyright (c) 2024, CEA * 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 retai...
ALGO
0.934625
3.832309
{ "github_metadata": { "branch": "master", "commit_count": 9704, "repo_created_at": "2021-03-29T11:57:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 59, "forks": 19, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "69f197...
19258b55-fb21-45f9-83a1-1c4c8a1d044f
HongdaZ/mrft
src/removeEnh.cpp
#include <cmath> #include "removeEnh.h" #include "cnctRegion.h" #include "pad2zero.h" #include "excldRegion.h" #include "tissueType.h" #include "roundness.h" #include "radius.h" using std::sqrt; void removeEnh( int *ptr_seg, const int &label, const double &prop_brain, const double &prop_radius, ...
TOOL
0.983462
6.174237
{ "github_metadata": { "branch": "master", "commit_count": 737, "repo_created_at": "2020-05-12T15:17: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": "96dcae71...
965d72fa-9867-45c8-a8bb-ccfba16f4121
LutzGross/esys-escript.github.io
trilinos_source15/packages/nox/test/epetra/MultiPhysics/ConvDiff_PDE.H
//@HEADER // ************************************************************************ // // NOX: An Object-Oriented Nonlinear Solver Package // Copyright (2002) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or o...
ALGO
0.992829
6.599003
{ "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": "f119...
e2190cb8-1a39-48df-83e1-71fbb92868d2
flarelabstfx/Grail-Visualisation
Grail-3.4.5/backbone/list/list.h
//#This comes from 3.1.4-new // This code copyright (c) by the Grail project. // No commercial use permitted without written consent. // August 1994 /*************************************************************************** File: array.h ----- Description: ------------ This file contains the type def...
TOOL
0.98242
5.08326
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2022-06-27T12:14:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc0cfbec1559...
d95dc2bb-0f34-48cc-8f8c-a4265053f044
McCoyGroup/Psience
ci/tests/TestData/LegacyMBPol/libs/mbpol/mbpol/ttm4-es.cpp
#ifdef HAVE_CONFIG_H # include "config.h" #endif // HAVE_CONFIG_H #include <cmath> #include <cassert> #include <algorithm> #include "macros.h" #include "ps.h" #include "ttm4-es.h" #include "ttm4-smear.h" #include "constants.h" //////////////////////////////////////////////////////////////////////////////// name...
ALGO
0.999274
4.573885
{ "github_metadata": { "branch": "master", "commit_count": 712, "repo_created_at": "2019-05-27T23:23:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f1badb5f1...
8e49c4d1-476b-436d-9e7b-dc2ba4b569d4
hjiang13/LLM4IR
results/Task2_IR_Decompilation/DecompiledResuts_Human_x_164_O2/Gemma_Huamn_x_164_O2_decompiled/test/CPP_146.cpp
#include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> typedef struct { int *data; int size; } vector; int specialFilter(vector *v) { char str[3]; int *p = v->data; int *end = v->data + v->size; int count = 0; while (p < end) { if (*p > 10) { sp...
ALGO
0.988895
4.08911
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-05-21T20:32:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "105577b09a1...
8a5a356f-b84c-4566-84ce-e21c9468b71f
iamjatin08/FINAL450
ARRAY/MergeIntervals.cpp
#include<bits/stdc++.h> using namespace std; bool sortcol( const vector<int>& v1, const vector<int>& v2 ) { return v1[0] < v2[0]; } vector<vector<int>> MergeIntervals(vector<vector<int>>& input){ sort(input.begin(),input.end(),sortcol); vector<vector<int>> output; for(int i = 0 ; i<input.size() ;...
ALGO
0.999974
4.598929
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-08-07T21:21: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": "ed23c2c930a1...
0f59d8df-930d-4616-9ba9-e17f16e8fcff
jose-dom/bitcoin_forecasting
env/lib/python3.9/site-packages/pystan/stan/lib/stan_math/stan/math/prim/scal/fun/Phi_approx.hpp
#ifndef STAN_MATH_PRIM_SCAL_FUN_PHI_APPROX_HPP #define STAN_MATH_PRIM_SCAL_FUN_PHI_APPROX_HPP #include <stan/math/prim/scal/fun/inv_logit.hpp> #include <cmath> namespace stan { namespace math { /** * Return an approximation of the unit normal CDF. * * http://www.jiem.org/index.php/jiem/article/download/60/27 * ...
ALGO
0.99835
5.74219
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-01-04T01:45:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 12, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "129f4c2a...
8b34a3e9-b5c7-4edd-b8fb-f10354c39f5d
GersonCavalheiro/OpenMPSnapshot
May2023/RepCPP/104462787/ImageSharpenUtils.h
#ifndef CAPTURE3_IMAGE_SHARPEN_UTILS_H #define CAPTURE3_IMAGE_SHARPEN_UTILS_H #include <cmath> #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include "../engine/objects/image/Image.h" namespace Capture3 { static void sharpenImage(Image &image, unsigned int radius, double strength) { const unsigned i...
TOOL
0.907896
7.009449
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-08-19T17:35:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de6cea031b...
df06f4c9-76c7-4c53-ae60-d977df5a75ef
yashdivya5/LeetCode
420-strong-password-checker/strong-password-checker.cpp
class Solution { public: int strongPasswordChecker(string password) { int n = password.length(); int missing = getMissingTypes(password); if (n < 6) { return max(6 - n, missing); } vector<int> repeats; for (int i = 0; i < n; ) { ...
ALGO
0.998496
4.926702
{ "github_metadata": { "branch": "main", "commit_count": 198, "repo_created_at": "2025-03-17T19:28: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": "c5d37890e8...
5b1708b4-e2e0-4d4c-bb45-8b81e5b520f6
victorsenam/treinos
ojs/codeforces/901/B/B.cpp
#include <bits/stdc++.h> #define cout if (1) cout using namespace std; typedef long long int ll; typedef pair<ll,ll> pii; #define pb push_back const int N = 200; vector<int> p, q; int n; vector<int> sum (vector<int> a, vector<int> & b) { if (b.size() > a.size()) a.resize(b.size(),0); for (int i = 0; i < b.size()...
ALGO
0.999979
3.001544
{ "github_metadata": { "branch": "master", "commit_count": 844, "repo_created_at": "2015-08-23T22:27: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": "a700e1bd...
1fcf8496-7107-4430-b49c-596ebea7e4f1
AnmolRatan07/tic_tac_toe
tic_tac_toe.cpp
#include <iostream> #include <cmath> using namespace std; char board[3][3] = {{'1', '2', '3'}, {'4', '5', '6'}, {'7', '8', '9'}}; char current_marker; int current_Player; void drawboard() { cout << " " << board[0][0] << " | " << board[0][1] << " | " << board[0][2] << endl; cout << "------------\n"; cout <<...
ALGO
0.999448
4.33452
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-07-07T10:09: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": "a0e12fe5feb8...
e9f56e1f-7c04-4d84-a948-90711a259773
Muhammad11201120/DataStructure
InsertAfterLinkedList/InsertAfterLinkedList.cpp
#include <iostream> using namespace std; class Node { public: int value; Node* next; }; void InsertInTheBiganing( Node*& head , int value ) { Node* newNode = new Node(); newNode->value = value; newNode->next = head; //Move the head pointer to the new node head = newNode; } Node* FindElement( Node* head , int val...
ALGO
0.999886
4.453427
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-06-05T23:25:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81537a4db9d5...