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
e0fa80ec-891b-438b-a6fc-2ce6258a8ad7
smily31/dsa-learning
Basic Algorithm/largest_subarray_of_sum_k.cpp
// Find the size of largest subarray whose sum is equal to given value k // Video reference to understand code :- https://www.youtube.com/watch?v=cyu_nuW5utA&list=PL_z_8CaSLPWeM8BDJmIYDaoQ5zuwyxnfj&index=7 #include <bits/stdc++.h> using namespace std; // sliding window technique // variable sized // this technique wil...
ALGO
0.999877
5.536583
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2021-06-02T18:47:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca355a11aea...
c1a1efeb-4e9b-4542-b42f-3c3d4fe1c706
TarunSinghania/Prewritten-code
trees/center.cpp
//pizza/17 #include <bits/stdc++.h> using namespace std; #define fr(i,a,b) for(int i=a;i<b;i++) #define pb push_back #define speed ios::sync_with_stdio(false), cin.tie(0) , cout.tie(0) #define fillm(m,r,c,k) fr(i,0,r)fr(j,0,c)m[i][j]=k; #define prm(m,r,c) fr(i,0,r){fr(j,0,c){cout<<m[i][j]<<" "; }cout<<endl;} #define...
ALGO
0.999981
3.900494
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-02-07T15:33:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f925cd2db7...
c91a2b31-bda9-4a9c-8f14-5df58277f04e
VishalSingh-07/Data-Structures-and-Algorithms
Section 13 - Stack/Parenthesis Matching/Parenthesis_Matching.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: char data; Node *next; }; class Stack { private: Node *top; public: Stack() { top=NULL; } void push(char x); char pop(...
ALGO
0.996247
4.923969
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2022-08-29T10:11:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d033f126...
5d1f3da8-0f06-4764-a2cd-a356605c0f51
ArkadiuszStanislawLega/leetcode
3184/main.cpp
#include <climits> #include <iostream> #include <iterator> #include <ratio> #include <string> #include <unordered_map> #include <utility> #include <vector> #include <algorithm> #include <cassert> #include <chrono> #include <map> #include <tgmath.h> #include <set> #include <stack> using namespace std; using namespace st...
ALGO
0.999536
5.223776
{ "github_metadata": { "branch": "main", "commit_count": 168, "repo_created_at": "2024-01-16T15:19: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": "dc761b795a...
7b7e73ac-80b0-473b-af0e-18585f8c31fc
Monster-Girl/Data-Structure
MergeSort.h
#include<iostream> using namespace std; #include<assert.h> void PrintSort(int* a, size_t n) { for (size_t i = 0; i < n; i++) { cout << a[i] << " "; } cout << endl; } void Merge(int* src, int* dst, int left, int right) { if (left >= right) return; int mid = left + (right - left)/2; Merge(src, dst, left, mid)...
ALGO
0.999832
5.154279
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2017-03-06T13:09: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": "7140848bd...
e4b667eb-dae1-4c2d-bf38-05f2f1416108
yrhiba/Competitive_Programming
Content/Algorithms, ADHOC & Data Structures/Cses/IntroductoryProblems/Grid_Paths.cpp
/* CSES Problem Set Grid Paths link to the problem: https://cses.fi/problemset/task/1625/ */ #include <iostream> #include <vector> #include <string> #include <set> #include <map> #include <queue> #include <deque> #include <stack> #include <utility> #include <iomanip> #include <algorithm> #include <cmath> #include <cl...
ALGO
0.99999
4.680872
{ "github_metadata": { "branch": "main", "commit_count": 485, "repo_created_at": "2023-10-01T16:44: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": "46a009e0d7...
9b941b73-46c2-48e9-8b45-9f798eb4e4fe
YashM7/DIVVY-Data-Analysis-Program
hashmap.h
/*hashmap.h*/ // // <<<NAME>>> // U. of Illinois, Chicago // CS 251: Spring 2020 // Project #06: hashing DIVVY data // // References: original non-collision code written by <NAME> (UIC) // // hashmap implements a hash table assuming a perfect hash function; // the class is not designed to handle collisions. The clas...
ALGO
0.979882
5.61457
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-06T22:18: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": "1780963eea62...
13c92705-5cf3-467c-b92c-6ed4f7941fd7
Utkarsh41/Codebase
Get minimum element from stack - GFG/get-minimum-element-from-stack.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /* The structure of the class is as follows class _stack{ stack<int> s; int minEle; public : int getMin(); int pop(); void push(int); }; */ class Solution{ int minEle; stack<int> s,ut; public: ...
ALGO
0.999729
5.146683
{ "github_metadata": { "branch": "main", "commit_count": 613, "repo_created_at": "2022-05-18T03:50:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "299bc385bc...
2af254c9-94ef-4dc3-b127-7b4172e6cfd5
JhonMarioA/Programacion-2
Parcial 01.cpp
//<NAME> //<NAME> #include <iostream> using namespace std; int x, y; int matrizA[3][4]; int matrizB[3][4]; void pedirdatos(){ cout<<"Digite el tamaño de la matriz (Es de 3 filas y 4 columnas): "<<endl; cin>>x>>y; cout<<endl; cout<<"Ingrese los datos (Solo ceros y unos): "<<endl; for(int i=0; i<x; i++){ ...
ALGO
0.998361
3.679083
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-09-11T21:31: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": "f5636c3e3ee2...
f1618836-230c-41e1-80d4-01ae33df1b68
sardineYJA/Data-Algorithm
排序/main.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #define MaxStackSize 18000 // 顺序堆栈的最大元素个数 typedef int KeyType; typedef struct { KeyType key; } DataType; #include "LinQuene.h" // 基数排序 #include "SeqStack_Sort.h" ///////////////////// 插入排序 /////////////////////////////////////// /* 直接...
ALGO
0.999943
3.722143
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-08T06:54:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbd850f679...
21a71e93-4024-49df-be87-ee7234ff2612
Artoriaxx/Part-Of-Code
csu 买一送一.cpp
#include<bits/stdc++.h> #define maxn 100050 using namespace std; vector<int> G[maxn]; int a[maxn]; long long f[maxn]; int vis[maxn]; long long pre[maxn]; void dfs(int u, int fa, int cnt) { for (int i = 0; i < G[u].size(); i++) { int v = G[u][i]; if (!vis[a[u]]) cnt++; vis[a[u]]++; f[v] = f[u] + cnt - pre[a[v]]...
ALGO
0.999915
3.116194
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-12-20T04:49:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee1f5086ed...
83f29632-7781-44e8-a20d-4dcda2b03da6
Rurril/IT-DA-3rd
study/Ace/VCWeek6/BOJ_17129_이정혁.cpp
#include<iostream> #include<vector> #include<queue> using namespace std; int n, m, sx, sy, result; char arr[3001][3001]; int arr2[3001][3001]; bool visited[3001][3001]; int movement[4][2] = { {1,0}, {-1,0}, {0,1}, {0,-1} }; void init() { cin >> n >> m; for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) {...
ALGO
0.99995
4.454389
{ "github_metadata": { "branch": "master", "commit_count": 1611, "repo_created_at": "2020-08-20T10:49:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4994e...
3c1ee6b6-ae24-46c2-9f96-ecc736edfada
HULCBio/MotionStation
Octave/Octave3.6.4_gcc4.6.2/include/octave-3.6.4/octave/sparse-base-chol.h
/* Copyright (C) 2005-2012 <NAME> Copyright (C) 1998-2005 <NAME> This file is part of Octave. Octave is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any late...
TOOL
0.944787
4.796942
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-04-20T18:55:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 14, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "4fa4e636...
d203375d-35b6-4678-aa90-38061e78883c
AlanShadow931/Cpp_project
new delete 改寫 Ch8 Q8/main.cpp
#include <iostream> #include <stdlib.h> #include <time.h> int main() { // 宣告三個指標用於動態分配陣列 int* A=0; int* B=0; int* C=0; int i, j, m, n; // 輸入陣列的列數與行數 printf("請輸入陣列大小\n"); printf("請輸入列數:"); scanf("%d", &m); printf("請輸入行數:"); scanf("%d", &n); // 動態分配三個 m*n 大小的陣列 A = n...
ALGO
0.999821
3.795543
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2025-06-02T02:18:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85c2d06fee6...
107345ef-3393-474b-843b-c4b3bb4a7593
Joao-vpf/Algoritmos
Grafos/dfs.cpp
void dfs(int x) { vis[x]=true; for (auto e : gr[x]) { if(!vis[e]) { dfs(e); } } } //VARIAÇÕES void dfs(int u) //dfs que analisa por adj { queue <int> q; q.push(u); while (!q.empty()) { int v = q.front(); q.pop(); vis[v]=false ...
ALGO
0.998845
4.263572
{ "github_metadata": { "branch": "main", "commit_count": 263, "repo_created_at": "2022-08-10T14:17: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": "74dca1d014...
22e61b25-5bf6-4366-bc9b-478573a3c6f8
raghutillu/Coding
src/trees/BinarySearchTrees/Merging/NoSpaceConstraints/MergeBSTs.cpp
#include <iostream> using namespace std; struct Node { int data = 0; Node* left = nullptr; Node* right = nullptr; Node(int _data) : data(_data) {} Node() = default; }; void Bst2Dll(Node* root, Node*& head) { if (!root) { return; } Bst2Dll(root->right, head); root-...
ALGO
0.999993
5.764399
{ "github_metadata": { "branch": "master", "commit_count": 281, "repo_created_at": "2017-08-25T17:35: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": "d0ae528b...
759f2c6c-caf6-4583-b3ad-f5e3f4071799
Apodus/rynx
src/rynx/tech/sphere_tree.hpp
#pragma once #include <rynx/math/vector.hpp> #include <rynx/math/geometry/bounding_sphere.hpp> #include <rynx/profiling/profiling.hpp> #include <rynx/std/unordered_map.hpp> #include <rynx/tech/parallel/accumulator.hpp> #include <vector> inline float sqr(float x) { return x * x; }; namespace rynx { class collision_...
ALGO
0.99698
4.76089
{ "github_metadata": { "branch": "master", "commit_count": 297, "repo_created_at": "2019-08-17T22:56:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61d30e6...
88742e3d-9bff-499e-a7bf-c45f68ebcd1a
matheuxlp/TrackEditor
TrackEditor/TrackEditor/Curves/Bezier.cpp
#include "Bezier.hpp" Bezier::Bezier() {} void Bezier::generateCurve(int pointsPerSegment) { float step = 1.0 / static_cast<float>(pointsPerSegment); int nControlPoints = (int)controlPoints.size(); if (nControlPoints < 4) { std::cerr << "Less then 4 points" << std::endl; return; } ...
ALGO
0.998131
4.94187
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-11-27T16:22: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": "d0b8a83a2c0...
052cf1ed-74f5-4167-890f-3db6cf09ad07
vmtk/vmtk
vtkVmtk/Contrib/vtkvmtkConcaveAnnularCapPolyData.cxx
/*========================================================================= Program: VMTK Module: $RCSfile: vtkvmtkConcaveAnnularCapPolyData.cxx,v $ Language: C++ Date: $Date: 2012/09/19 $ Version: $Revision: 1.0 $ Copyright (c) <NAME>, <NAME>. All rights reserved. See LICENSE file for details. Po...
ALGO
0.984864
5.252401
{ "github_metadata": { "branch": "master", "commit_count": 1486, "repo_created_at": "2010-08-16T21:39:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 385, "forks": 174, "issues": 77, "pull_requests": 6 }, "file_meta": { "content_id": "03f...
81f3b2a4-d9ea-46da-9056-49bbdfa1e24a
joselumarja/ArcoP3
sobel1.cpp
/*<NAME> <NAME>*/ #include <QtGui/QApplication> #include <QGraphicsScene> #include <QGraphicsView> #include <QGraphicsPixmapItem> #include <stdio.h> #include <omp.h> #define COLOUR_DEPTH 4 int weight[3][3] = {{ 1, 2, 1 }, { 0, 0, 0 }, { -1, -2, -1 } }; double SobelBasico(QImage *srcImage, QI...
ALGO
0.994535
5.259136
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-12-02T02:24: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": "f7addf5b29...
2a43f2c2-aa24-4220-9cf1-e46c9cb26c64
MRPT/mrpt
libs/math/include/mrpt/math/TBoundingBox.h
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | https://www.mrpt.org/ | | | | Cop...
TOOL
0.94626
7.668783
{ "github_metadata": { "branch": "develop", "commit_count": 9818, "repo_created_at": "2013-10-19T21:09:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2056, "forks": 644, "issues": 26, "pull_requests": 2 }, "file_meta": { "content_id": "0...
d0d2b36a-c808-4061-84fb-1032288f9a16
hsinanchen2007/MyStudy
Leetcode_Study/487.最大连续1的个数 II.cpp
/* https://leetcode.cn/problems/max-consecutive-ones-ii/ 487. 最大连续1的个数 II 中等 127 company 谷歌 Google company Zoom 给定一个二进制数组 nums ,如果最多可以翻转一个 0 ,则返回数组中连续 1 的最大个数。 示例 1: 输入:nums = [1,0,1,1,0] 输出:4 解释:翻转第一个 0 可以得到最长的连续 1。 当翻转以后,最大连续 1 的个数为 4。 示例 2: 输入:nums = [1,0,1,1,0,1] 输出:4 提示: 1 <= nums.length <= 105 num...
ALGO
0.999768
6.345923
{ "github_metadata": { "branch": "main", "commit_count": 188, "repo_created_at": "2022-12-19T05:16:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b598d2b23d...
90a2521e-0d03-4f68-bb8b-57b0a6229eed
shengren/Practice
leetcode/Linked_List_Cycle_II.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *detectCycle(ListNode *head) { if (!head) return NULL; // Idetify if there is a cycle ListNode...
ALGO
0.999924
5.465513
{ "github_metadata": { "branch": "master", "commit_count": 164, "repo_created_at": "2012-04-18T21:04: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": "49c7baf9...
2ac1d974-aa92-4a4b-afdc-f0251d83804e
RhobanProject/SimLagrange
SymOptim/src/PenaltyMethod.hpp
#ifndef LEPH_SYMOPTIM_PENALTYMETHOD_HPP #define LEPH_SYMOPTIM_PENALTYMETHOD_HPP #include <string> #include <vector> #include <stdexcept> #include "VectorMap/src/VectorMap.hpp" #include "Symbolic/src/Symbol.hpp" #include "Symbolic/src/Constant.hpp" #include "Symbolic/src/Bounder.hpp" #include "Symbolic/src/terms.h" #in...
ALGO
0.999866
7.282358
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2015-10-14T07:52:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60ec6c4f0...
60abb5f4-1065-467b-aa4f-3d688a326870
ramchendooran/Unscented-Kalman-Filter-Multiple-Object-Tracking
src/ukf.cpp
#include "ukf.h" #include "Eigen/Dense" using Eigen::MatrixXd; using Eigen::VectorXd; // Angle normalization convenience function void wraptopi(double& theta) { while (theta> M_PI) theta-=2.*M_PI; while (theta<-M_PI) theta+=2.*M_PI; } /** * Initializes Unscented Kalman filter */ UKF::UKF() { // if this is fal...
ALGO
0.979316
4.811571
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-01-03T22:03:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "516ad1f778...
cab1b4ff-3030-4405-8612-345a7000a7a7
Kimhayoung0311/ICPC
minimun cost.cpp
// // minimun cost.cpp // ICPC_regional // // Created by 김하영 on 2018. 3. 14.. // Copyright © 2018년 HAYOUNG_KIM. All rights reserved. // /* #include <iostream> #include <cstdio> #include <vector> #include <queue> #include <functional> #define INF 99999999 using namespace std; int BFS(vector<pair<int, int> >* v_a...
ALGO
0.999807
3.868811
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-12-26T07:38: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": "76664ed003...
1b165a85-7436-4254-8f65-ca2e25bf681a
Kawser-nerd/CLCDSA
Source Codes/AtCoder/arc081/B/4870507.cpp
#include <algorithm> #include <bitset> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> const int MOD = 1e9 + 7; const int iINF = 1000000000; const long long int llINF = 1000...
ALGO
0.999998
3.901881
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "69562120...
c4245bc4-e0a4-4e32-af94-0e43cc9cc1b5
NeonRoamer/General_Physics
RKF45_deflection.cpp
//Testing magnitude and direction of deflection //Sets moon orbit in xy plane, and rotates the incoming asteroid by a random inclination angle //Assumes elastic collision between impactor and asteroid //Impulse is delivered at a random theta and phi relative to asteroid #include<iostream> #include<vector> #include<stri...
ALGO
0.991819
5.774111
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2025-03-22T23:24: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": "279cf935b1e...
3fe4a568-d108-45d9-9bc0-62180688a61b
NurMuhammadCSE/10-Days-Challenge
Day 3/Search-Sorted-Array.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: int search(vector<int>& nums, int target) { for (int i = 0; i < nums.size(); i++) { if (nums[i] == target) { return i; } } return -1; } }; int search(vector<int>...
ALGO
0.999992
6.199653
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-02-17T13:09: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": "cbb0c5eabb92...
e8b10062-1001-48c9-832a-6b43b215c42e
PragyApurva/Advent-of-code
q1.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; void solve() { ifstream file("file1.txt"); //open the file int count=0; if(file) { string line; int f,s; vector<vector<int>>v; while(getline(file, line)) //read the file line by line { ...
ALGO
0.999556
3.708277
{ "github_metadata": { "branch": "2024", "commit_count": 1, "repo_created_at": "2024-12-16T03:35: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": "56f4f36b2db4...
06174620-b162-4f26-9dcf-21ceb2247af3
Jongjunp/BOJ
2243/solution.cpp
#include <iostream> #include <queue> using namespace std; const int MAX = 1000001; int tree[4*MAX] = {0}; void update_tree(int node, int start, int end, int targ, int val) { if (targ<start || targ>end) return; if (start==targ && end==targ) { tree[node] += val; return; } int mid = (start...
ALGO
0.999913
4.555138
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2022-03-03T11:18: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": "a4549ea91d...
63c67b2f-167e-4662-a389-af2b4d25af8f
iliyian/CompetitiveProgramming
codeforces.com/2056/A.cpp
#include <bits/stdc++.h> #define int long long void solve() { int n, m; std::cin >> n >> m; int x1, y1; std::cin >> x1 >> y1; int xx = x1, yy = y1; for (int i = 1; i <= n - 1; i++) { int x, y; std::cin >> x >> y; xx += x, yy += y; } xx += m, yy += m; std::cout << (xx - x1) * 2 + (yy - y1)...
ALGO
0.999933
4.266666
{ "github_metadata": { "branch": "main", "commit_count": 354, "repo_created_at": "2024-04-21T10:50: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": "89d5b2a737...
3ddce6dc-01db-4880-90d6-ec668cfa1149
Abraham-Chileshe/IMKT-FEFU-2022-2023
ЯиМп/Информатикс/Задача №112491 Моделирование стека.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> using namespace std; template <typename T> class MyStack { private: T* data; int capacity; int size; public: MyStack() { capacity = 10; data = new T[capacity]; size = 0; } ~MyStack() { ...
ALGO
0.999939
5.140275
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2023-03-13T03:42: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": "b87c1d5093...
642c0861-d02b-4270-8aeb-125d0899b82f
A5hi5hKujur/Competitive-Programming-MNNIT
Number_Theory/1_primality.cpp
/* primality : Check if the inputted number is prime or not. Nieve Approach : - input a number. - run a loop from 2 to n-1 to see if any number within this range completely divides the inputted number. - If any one number between 2 to n-1 divides n completely, we say that 'n' is not a prime number. Otherw...
ALGO
0.999928
4.788041
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2020-02-22T17:03:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71db34f90...
113f60b0-97cf-463a-8f3b-737d89986145
Ggy-king/Combined-Programming-Language
贪吃蛇.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <conio.h> #include <time.h> #define VERSION "1.0" #define MOVE_SPEED 300 #define MAP_WIDTH 45 #define MAP_HEIGHT 13 #define FOOD_SCORE 100 #define MOVE_SCORE 1 #define SPEED_UP 10 #define IS_WALL 0 #define IS_SPEEDUP 0 ty...
TOOL
0.998
4.022336
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-05-02T07:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99697f2cd8bd...
159908c6-9a24-4083-a4c9-7d23231171a0
AlexFalz/Uni
1 Anno/2 Semestre/Programmazione 2/Esercizi/EsListe/Lista Semplice/rimozione.cpp
/* Corso di Programmazione II (A-L), Prof. <NAME> Esercizi su Liste Esercizio 6: Rimozione di un elemento da una lista concatenata. */ #include<iostream> #define MAX 25 using namespace std; struct Nodo { int valore; Nodo* succ; }; class ListaSemplice { public: ListaSemplice() {testa=NULL;} ~ListaSempli...
ALGO
0.996402
4.793354
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2020-12-10T17:23:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2057e2d1dcb...
1c749670-5bcc-4524-b37e-df50354724f8
WangLaban/LeetCode
9_PalindromeNumber.h
/* Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Output: false Explanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome. Example 3...
ALGO
0.999888
5.791855
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2018-08-27T06:16:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ba580e9...
77be6526-42c2-46e6-b78f-c07bc2b3644c
VIRAJcHOPADE/Data-Structures-in-CPP
BST/Assignments/Pair sum in a BST.cpp
/*Given a binary search tree and an integer S, find pair of nodes in the BST which sum to S. You can use extra space of the order of O(log n). Sample Input 1: 8 5 10 2 6 -1 -1 -1 -1 -1 7 -1 -1 12 Sample Output 1: 2 10 5 7 */ /********************************************************** Following is the Binary Tree Nod...
ALGO
0.999992
4.155182
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-03-26T15:35:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71abd5f6616...
3091d67e-1f03-4ed8-851b-2bf134c1bea9
Swastik-Roy-Choudhury/MSME-INTERNSHIP-PROJECTS
InternPe tasks/task4/connect_four_game.cpp
#include <iostream> #include <vector> using namespace std; // Constants for the game board const int ROWS = 6; const int COLS = 7; const char EMPTY = ' '; const char PLAYER1 = 'X'; const char PLAYER2 = 'O'; // Function to print the game board void printBoard(const vector<vector<char>>& board) { for (int i = 0; i...
ALGO
0.998484
6.550861
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-24T13:14: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": "630de1a6e842...
ccdc787a-9ea4-4001-bd92-9af29bdeb295
mpfeifer1/Kattis
triangles3.cpp
#include <bits/stdc++.h> using namespace std; #define int long long typedef long long ll; int n, m; vector<string> v; // Returns a 2d array with how far up and right each point can move vector<vector<int>> getUpRight() { vector<vector<int>> res; res.resize(2*n+2,vector<int>(2*m+2,0)); for(int i = 2; i < ...
ALGO
0.999743
3.895547
{ "github_metadata": { "branch": "master", "commit_count": 881, "repo_created_at": "2017-11-27T05:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 175, "forks": 79, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "b67d4...
627d95f6-67d7-4d2f-abc8-080a0eeffe1b
fextivity/codeforces-submissions
codeforces/1237/D.cpp
#include<bits/stdc++.h> using namespace std; // Optimization //#pragma GCC optimize("O3") #define endl '\n' // Shortcut #define int long long #define eb emplace_back #define pb push_back #define pob pop_back #define mp make_pair #define upb upper_bound #define lwb lower_bound #define fi first #define se second #defi...
ALGO
0.999981
3.626912
{ "github_metadata": { "branch": "master", "commit_count": 1484, "repo_created_at": "2020-12-21T15:42:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2967511...
e6a385ce-fe9b-4568-9ce9-e3ece2996aca
LVID-FFG/LAB5
cpp/frend.cpp
#include "frend.h" #include <iostream> #include <vector> #include <iomanip> #include <random> #include <algorithm> using namespace std; void frends(vector<pair<string, vector<string>>>& frends_list){ string frend1, frend2; cin >> frend1; cin >> frend2; if (frend1 == frend2){ cout << "Нельзя ...
ALGO
0.993092
4.257989
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-06T15:09: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": "f082e97d057a...
667374c6-6dbe-4102-b83a-c97e8e0c9630
InsightSoftwareConsortium/ITK
Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h
/*========================================================================= * * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.o...
ALGO
0.999264
7.259848
{ "github_metadata": { "branch": "main", "commit_count": 57165, "repo_created_at": "2010-07-27T15:48:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1517, "forks": 701, "issues": 268, "pull_requests": 49 }, "file_meta": { "content_id": "a...
2ae1e654-0c92-4e66-b54f-15475fdf6abe
mjdousti/Therminator
src/headers/solver.hpp
/** * * Copyright (C) 2021 <NAME>, <NAME>, <NAME>, * and <NAME>. All rights reserved. * * Please refer to the LICENSE file for terms of use. * */ #pragma once #include "general.hpp" #include <vector> #include <Eigen/Core> #include <Eigen/Sparse> typedef Eigen::Matrix<VALUE, Eigen::Dynamic, 1> state_type; typ...
ALGO
0.998475
6.47466
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2015-02-21T17:57:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48763c849...
3276471e-902a-44c5-b4bf-3306d74080b5
ArinGaon/Algorithm
백준/Silver/1316. 그룹 단어 체커/그룹 단어 체커.cc
// 1316번 그룹단어 체커 #include <iostream> #include <vector> using namespace std; int main() { int num; string word; int cnt = 0; cin >> num; for (int i = 0; i < num; i++) { cin >> word; bool alphabet[26] = { false, }; // word에서 알파벳이 출현하지 않으면 false alphabet[(int)(word[0]) - 97] = true; // 알파벳 소문자의 아스키 코드는 97번 ...
ALGO
0.999975
4.463531
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2022-11-25T02:11:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c30e5b5c55...
ae288200-814f-4334-868c-ee8596d8242a
moretimes/template
DataStructure/Splay-Remove.cpp
#include<cstdio> #include<iostream> #include<algorithm> using namespace std; const int MAX_N = 1001000 + 10; const int INF = ~0U >> 1; struct Node { Node*ch[2], *p; int size, val, gcd; Node() { size = 0; val = gcd = 0; } bool d() { return this == p->ch[1]; } void setc(Node*c, int d) { ch[d] = c; c->p =...
ALGO
0.999974
3.727845
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2015-08-08T14:16:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ec771175...
25208bb0-89b4-4ae7-ad8a-d497211bb0ec
GQH123/Renatus-ACM-Codes
Codeforces Round #700 (Div. 1)/d/d.cpp
#include <bits/stdc++.h> #define rep(i, l, r) for (register int i = l; i <= r; i++) #define per(i, r, l) for (register int i = r; i >= l; i--) #define srep(i, l, r) for (register int i = l; i < r; i++) #define sper(i, r, l) for (register int i = r; i > l; i--) #define erep(i, x) for (register int i = hi[x]; i; i = e[i]...
ALGO
0.999984
4.048209
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-08-17T06:57:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a9f0cce9e...
c7ece116-973a-4fd7-8b8d-aca4f6f1d9c8
BorisPro/Numerische-Verfahren-der-Finanzmathematik
BaSheet03/Task17/main_s3_17.cpp
/* * main_s3_17.cpp * * Created on: 01.06.2014 * Author: BlueCrescent */ #include "PathGenerators.h" #include "simulationIntegrand.h" #include "asian_fair_prices.h" #include "MCMultiIntegrator.h" #include "QMCMultiIntegrator.h" #include "Cpp11UniformDice.h" #include <fstream> #include <string> #include <c...
ALGO
0.989487
5.544862
{ "github_metadata": { "branch": "master", "commit_count": 311, "repo_created_at": "2014-04-07T14:59: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": "524981c2...
62fa64ca-a513-4b00-9b62-200016cdfeb1
bvazquezj/Algoritmos-Computacionales
probar alg/P019-cuentas-tiempo.cpp
// Autores: <NAME> // <NAME> // // Ordenamiento por cuentas -Counting Sort- // // Los datos de entrada los toma de un archivo guardado en el mismo directorio que el programa, // esto se realizo con el objetivo de que en las pruebas no se tecleen todas las veces // los datos de entrada // ...
ALGO
0.997965
4.039223
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-06-08T02:07: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": "818f16c70e46...
78b60a75-8e3d-48ed-b484-2a1b526bc2ba
alexandraback/datacollection
solutions_5753053697277952_1/C++/nase/a.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <numeric> #include <cstring> using namespace std; #define ll long long #define VI ...
ALGO
0.999903
3.443074
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "765511f93...
7a3c1f6b-9d00-4c63-862c-afbd8c93a133
nakatamaho/mplapack
mplapack/test/lin/common/Rqrt14.cpp
/* * Copyright (c) 2021 * <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 * notice, this list of ...
ALGO
0.999167
5.56919
{ "github_metadata": { "branch": "master", "commit_count": 2597, "repo_created_at": "2017-03-29T02:30:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 95, "forks": 13, "issues": 22, "pull_requests": 0 }, "file_meta": { "content_id": "27d7...
f00607f6-e2a6-45f7-8ddb-bace53a86ed5
ishandutta2007/codeforces-t
thebes/normal/1221/F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> pll; const int MN = 5e5+5; struct nou{ll x, y, w;}arr[MN]; ll n, m, i, j, st[6*MN], lz[6*MN], id[6*MN], x, y, ans=-1LL<<60, A, B; map<ll,ll> mp, rev; void build(ll i,ll s,ll e){ if(s!=e){ build(2*i+1,(s+e)/2+1,e); ...
ALGO
0.99988
3.717886
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "c86ca1f69066...
80d28497-04bb-4a62-b1a7-915982c176ca
mattrubin/CameraAssist
include/FCam/AutoFocus.h
#ifndef FCAM_AUTOFOCUS_H #define FCAM_AUTOFOCUS_H #include <vector> #include "Frame.h" //! \file //! Convenience functions for performing autofocus namespace FCam { class Lens; /** This class does autofocus, by sweeping the sensor back and forth until a nice thing to focus on is found. You call \r...
TOOL
0.948008
6.656897
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2012-04-13T15:48:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e27d3723...
cc6bdac4-95cb-46f9-93c4-f0258f7a0230
obaydullahmhs/Programming-Contest
Lightoj/1238 - Power Puff Girls.cpp
///বিসমিল্লাহির_রহমানির_রহীম #include<bits/stdc++.h> #define pie acos(-1.0) #define N 2000005 #define eps 1e-9 #define ff first #define ss second #define nl ...
ALGO
0.999911
3.812792
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2020-02-07T18:18: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": "987a2cd70...
aabd73aa-b04d-46e3-a924-27b74cce3132
YaoSam/Algorithms
Data Sturcture/bbtree.cpp
#pragma once #include "bbtree.h" namespace ME{ TEMP void AVLtree<T>::RotateLL(treeNode<T>* node,treeNode<T>* node_parent=NULL) { treeNode<T>* Root = node->left; if (node_parent==NULL) root = Root; else { if (node_parent->left == node) node_parent->left = Root; else node_parent->right = Root...
ALGO
0.999727
5.136137
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2016-02-26T05:30: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": "d9a47490...
1647c8e9-fee0-4976-9081-17ebd97d8cdd
ChiaraTirino/informatica2019
Lezione_6/soluzioni/esercizio4.cc
/* Esercizio: Moto rettilineo Author: <NAME> - 2018 */ #include <iostream> #include <fstream> #include <cmath> using namespace std; #define N 1000 int main() { // creazione variabile per la velocita; double v[N]; double spazio, tempo; // apertura file dati fstream f; f.open("../data_moto.dat", ios::i...
ALGO
0.971305
4.274024
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-09-15T08:55: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": "d1f126be1...
2845cb58-71c9-4a10-8e34-39766e0d2ad1
ikjot-2605/Competitive-Programming
CodeForces/1385D.cpp
/*COMPETITIVE PROGRAMMING C++ TEMPLATE */ #include <algorithm> #include <vector> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <string> #include <cmath> #include <iostream> #include <stack> #include <queue> #include <climits> #include <iomanip> #include <iterator> #define a...
ALGO
0.999947
4.965413
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2020-04-11T11:53: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": "33cb6cc79...
02821ac8-5f73-4831-a95c-255ff49f1f51
kleopatra999/chromium-2
src/third_party/libprotobuf-mutator/src/src/libfuzzer/libfuzzer_mutator.cc
// Copyright 2017 Google Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable...
TEST
0.928003
5.843795
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-06-12T06:56:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "e3cdeb659...
f664dd12-bab5-4192-9d40-036a4484abec
kssilveira/mara
kaue/spoj/candn.cpp
#include <cstdio> #include <map> #include <vector> #include <queue> #include <iostream> #include <stack> using namespace std; typedef pair<int, int> Node; typedef vector<Node> Graph; Graph graph[5010]; int distc[5010], distn[5010]; int j, b, c, n, s; void dijkstra(int begin, int* distances) { bool gone[5010] = {0...
ALGO
0.999886
3.384476
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2011-09-12T22:23: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": "98445739d...
a34aac1e-ddac-4e7c-a294-52b735999cdb
yadav-ankit/My-Programms
ankit/Learnt New/min_set.cpp
/*Given n sets each containing m integers. You need to create MinDiff set by picking exactly 1 element from each set. The difference between the maximum and minimum elements in the MinDiff set should be minimum. eg: for the sets {30, 20, 10, 40},{ 22, 33, 44, 99},{ 16, 17, 18, 19} min diff set is {19, 20, 22}. Max and ...
ALGO
0.99991
4.460628
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2016-02-10T19:55:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f37dd7dd0...
97509024-5e08-427b-96c0-e375e58282b2
hallamlab/LAST-Plus
src/GappedXdropAligner3framePssm.cc
// Copyright 2011 <NAME> #include "GappedXdropAligner.hh" #include "GappedXdropAlignerInl.hh" namespace cbrc { int GappedXdropAligner::align3pssm(const uchar *seq, const ScoreMatrixRow *pssmFrame0, const ScoreMatrixRow *pssmFrame1, ...
ALGO
0.994631
6.181101
{ "github_metadata": { "branch": "master", "commit_count": 157, "repo_created_at": "2015-06-25T01:01:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 19, "forks": 3, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "47052ab7...
fa56cf4e-81a5-40d6-9fef-c1458e224207
bbordere/scop42
srcs/Utils.cpp
#include "Utils.hpp" void split(std::string const &str, char delimiter, std::vector<std::string> &vector) { std::string token; std::istringstream is(str); if (str.empty()) return; while (std::getline(is, token, delimiter)) { std::size_t start = token.find_first_not_of(WHITE_SPACES); start = start != st...
TOOL
0.902128
5.190072
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-01-05T11:37: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": "a7ae0083b29...
221893ef-b663-41a3-bba5-4a9eca9db795
matheus3301/neps-academy-exercises
OBI/c.cpp
#include <bits/stdc++.h> #define endl "\n" #define debug(x) cerr << #x << " : " << x << endl #define x first #define y second using namespace std; typedef long long ll; typedef pair<int,int> ii; const int mxN = 510; int n, f; int mx[4] = {0,0,1,-1}; int my[4] = {1,-1,0,0}; char grid[mxN][mxN]; bool valido(in...
ALGO
0.999663
3.394627
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2019-11-06T19:40:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ffbe35b4f...
5de4d1fe-6643-4cf5-b84f-8fe6333b82b1
E3SM-Project/E3SM
components/eam/src/physics/crm/samxx/precip_proc.cpp
#include "precip_proc.h" void precip_proc(real5d &q, int ind_q, real5d &qp, int ind_qp) { YAKL_SCOPE( tabs , :: tabs ); YAKL_SCOPE( a_bg , :: a_bg ); YAKL_SCOPE( a_pr , :: a_pr ); YAKL_SCOPE( a_gr , :: a_gr ); YAKL_SCOPE( coefice , :: coefice ); YAKL_SCOPE( accrrc...
ALGO
0.999208
4.308917
{ "github_metadata": { "branch": "master", "commit_count": 64504, "repo_created_at": "2014-07-03T19:04:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 381, "forks": 425, "issues": 535, "pull_requests": 54 }, "file_meta": { "content_id": "...
17911e26-b3d3-4b28-b9cd-b299d3a688e6
iwiwi/programming-contests
icpc/wf2011/J.cpp
#include <cstdio> #include <algorithm> #include <vector> #include <map> #include <string> #include <climits> #include <iostream> #include <cassert> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define pb push_back #define mp make_pair typedef long long ll; const int K = 1000000; vector<pai...
ALGO
0.998491
3.21998
{ "github_metadata": { "branch": "master", "commit_count": 286, "repo_created_at": "2011-10-30T17:14:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f4b52ef...
56250605-b25c-468a-9a6b-a533b99df894
zwickl/garli
garli/tags/0.93/src/model.h
// GARLI version 0.93 source code // Copyright 2005 by <NAME> // All rights reserved. // // This code may be used and modified for non-commercial purposes // but redistribution in any form requires written permission. // Please contact: // // <NAME> // Integrative Biology, UT // 1 University Station, C0930 // Austin,...
ALGO
0.99445
3.468058
{ "github_metadata": { "branch": "master", "commit_count": 1258, "repo_created_at": "2015-07-20T20:36:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "356f3ad...
bafa398f-26c8-449c-b37b-fa6921f1f61b
johnbhurst/nqueens
archive/gnu_queens_arr/gnu_queens.cpp
// $Id: gnu_queens.cpp 673 2007-03-31 23:05:52Z jhurst $ // Copyright 2007 <NAME> // <NAME> (<EMAIL>) // 2007-03-26 #include <iostream> #include <ctime> #include "board.h" int main (int argc, char *argv[]) { if (argc < 1) { std::cerr << "I need a number." << std::endl; exit(-1); } int size = atoi(argv[...
ALGO
0.980005
3.728573
{ "github_metadata": { "branch": "master", "commit_count": 388, "repo_created_at": "2018-01-07T19:29:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 11 }, "file_meta": { "content_id": "6ef808c...
865251d0-dfed-4381-8b92-18294841ec7d
DarkHandler/PProgramming
t4/code/src/main.cc
#include <boost/mpi.hpp> #include <iostream> #include <random> #include <thread> #include <chrono> #include <cmath> #include <cstring> namespace mpi = boost::mpi; void createNumbers(const int& count, float* out) { std::random_device rd; //seed for the random number engine std::mt19937 gen(rd()); //Standard merse...
ALGO
0.999498
4.665398
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-12-13T19:09: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": "dd1039af71...
7a795e2e-0592-4655-84af-717d96dd7876
eloqdata/eloqsql
sql/filesort_utils.cc
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2012, 2020, MariaDB 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; version 2 of the License. ...
ALGO
0.95263
5.214168
{ "github_metadata": { "branch": "eloq-10.6.10", "commit_count": 195663, "repo_created_at": "2025-03-02T10:33:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 52, "forks": 11, "issues": 0, "pull_requests": 9 }, "file_meta": { "content_id":...
2f209fa9-91f5-4a7e-ba82-ac0c9854d970
akhilkammila/WordhuntSolver
FinalWordHuntSolver.cpp
/** * Author: <NAME> (https://github.com/akhilkammila) * * Implements an advanced solver for WordHunt – an iMessage word game * * This solver finds all possible words on a WordHunt board. It then chooses * a subset of the words based on a reward-to-complexity ratio. Complexity is * based on number of diagonals...
ALGO
0.999372
4.821128
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-03-30T23:26:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "3aba0730604...
56ec80d7-6803-49f4-b14d-d0601498267f
Mir00r/LeetCode-Coding-Arena
Arrays/Medium/Conatiner_With_Most_Water.cpp
#include <bits/stdc++.h> using namespace std; #define LI long int #define LLI long long int #define LL __int64 #define ULL unsigned long long #define LLU long long unsigned #define row 10 #define col 10 #define MAX 10000 #define jora pair <int, int> #define memo(arr, value) memset(arr, value, sizeof(arr)) #define pb...
ALGO
0.999945
4.68376
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2016-09-10T10:00: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": "20372bc7e...
54e6a830-47e7-4789-9e3c-eba4f85ec914
jkadamczyk/AGH_JIMP2
lab3/minimaltimedifference/MinimalTimeDifference.cpp
// // Created by Tay on 3/14/17. // #include "MinimalTimeDifference.h" unsigned int minimaltimedifference::ToMinutes(std::string time_HH_MM) { std::string hours = time_HH_MM.substr(0,2); if(time_HH_MM.length() == 4) { std::string hours = time_HH_MM.substr(0,1); } std::string minutes = time_HH_...
ALGO
0.931038
4.890017
{ "github_metadata": { "branch": "master", "commit_count": 417, "repo_created_at": "2017-02-28T10:46: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": "efb883c8...
a4765c8c-9c0e-4c40-a961-adbf0fd142f6
roy4801/solved_problems
uva/10922.cpp
/* * Uva 10922 - 2 the 9s * author: roy4801 * AC(C++) 0.0000 */ #include <iostream> #include <cctype> #include <cstring> #include <cstdlib> using namespace std; char d[1001]; bool first = true; bool testMultipleOfNine(char num[], int &count) { int mul = 0; if(first) { strcpy(d, num); first = false; } ...
ALGO
0.995223
3.208172
{ "github_metadata": { "branch": "master", "commit_count": 875, "repo_created_at": "2018-04-02T13:30:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbca1ee2...
d256af65-857c-4cce-b196-5658b0a7c096
kercre123/victor
coretech/vision/engine/gazeDirection.cpp
/** * File: gazeDirection.cpp * * Author: <NAME> * Date: 11/26/2018 * * Description: see header * * Copyright: Anki, Inc. 2018 **/ #include "gazeDirection.h" #include "coretech/common/shared/types.h" #include "util/console/consoleInterface.h" namespace Anki { namespace Vision { namespace { CONSOLE_VAR(...
ALGO
0.935664
7.086111
{ "github_metadata": { "branch": "snowboy", "commit_count": 38827, "repo_created_at": "2024-09-10T20:49:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 35, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "26e...
9f002305-357d-4ef0-963a-b162224fae47
bilbo3000/coding
leetcode/median_two_sorted_array/MedianTwoSortedArray.cpp
#include <iostream> using namespace std; class Solution { public: double findMedianSortedArrays(int A[], int m, int B[], int n) { int total = m + n; if (total % 2 == 0) { // Length is even return (findMedianHelper(A, m, B, n, (m + n) / 2) + findMedianHelper(A, m, B, n, (m ...
ALGO
0.999997
5.858149
{ "github_metadata": { "branch": "master", "commit_count": 981, "repo_created_at": "2014-03-08T03:04:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20ec686c...
c37d4b08-1b22-4234-b052-7bce88fa6d68
bothemrun/CAP-Complete-Algorithmic-Programming
Leetcode_All_Solved/1245.m1.cpp
//m1 //prefix max depth. //no need for fixed size priority queue. //Ref: 1245. Tree Diameter votrubac : https://leetcode.com/problems/tree-diameter/solutions/420452/c-with-picture-o-n/ //NOTE: classical pattern: Tree Given By Undirected Graph & No Root: //- (1) but what's the topmost root? for acyclic graph, any nod...
ALGO
0.999848
5.559842
{ "github_metadata": { "branch": "main", "commit_count": 1606, "repo_created_at": "2022-02-13T12:44:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "892ce8177...
cd6c3c0f-54c4-403f-bab2-2899b508e5c5
amoljore7/02-Logic-Building-Program-All
06_Structure & Union/Assignment7.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////////// // // 7. Write a program which contains a structure to specify data of students given below : Roll number // name, department, course, year of joining. Write a function to print names of students who joined // in ...
TOOL
0.955185
3.107766
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-01-14T10:45: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": "b7e66b72dd...
1d569907-e840-4371-bcad-2cd6e13f6480
NishantKaushik007/Leetcode-GFG-Problems
3. Count 1's in binary array - GFG/3.-count-1s-in-binary-array.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: // Function to count number of Ones // arr: input array // N: size of input array int countOnes(int arr[], int N) { // Your code here int low=0,high=N-...
ALGO
0.999602
5.393943
{ "github_metadata": { "branch": "main", "commit_count": 4154, "repo_created_at": "2022-05-28T15:05: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": "5332abcd5...
7aac1e5a-529d-41e7-aa2a-cf246cf60ca5
SnehAl2o7/Daily-DSA
Array-Basic/MissingNumber.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: // Self came up solution int missingNumberSort(vector<int>& nums) { sort(nums.begin(),nums.end());//sort the array in sequence int n = nums.size();//getting lenght of array for(int i = 0;i<n;i++){ ...
ALGO
0.9999
4.871773
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2025-03-09T07:32: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": "c1dfe80b0d...
cb63db58-1d07-4da0-8e4a-1a087dac1da9
PythonOT/POT
ot/lp/EMD.h
/* This file is a c++ wrapper function for computing the transportation cost * between two vectors given a cost matrix. * * It was written by <NAME> (2014) and mainly consists of a wrapper * of the code written by <NAME> available on this page * http://people.seas.harvard.edu/~nbonneel/FastTransport/ * ...
ALGO
0.999866
6.301034
{ "github_metadata": { "branch": "master", "commit_count": 1569, "repo_created_at": "2016-10-20T14:42:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2592, "forks": 526, "issues": 50, "pull_requests": 13 }, "file_meta": { "content_id": "6...
3a6d3084-b125-4ebf-9834-4e7229de9790
Nguyenthithuhang0406/Algorithm-And-C4EJS
c++/ChaLaGi/B. Not Quite Latin Square.cpp
#include<bits/stdc++.h> using namespace std; char solve(){ string s1, s2, s3; cin >> s1 >> s2 >> s3; bool a = false, b = false, c = false; for(int i = 0 ; i < 3; i ++){ if(s1[i] == 'A') a = true; if(s1[i] == 'B') b = true; if(s1[i] == 'C') c = true; } if(a == false) return 'A'; if(b == false) return 'B'; ...
ALGO
0.999911
4.175538
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-04-24T14:59: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": "71ef293f68...
8e920d88-7ec7-4a5d-8962-17560eca54b1
zyx-db/codeforces
virtual-contests/Round918-Div4/solved/E.cpp
#include <bits/stdc++.h> #include <cstring> #include <ios> #include <unordered_map> using namespace std; typedef long long int ll; typedef long double ld; typedef vector<ll> vl; typedef pair<ll, ll> pl; typedef vector<pair<ll, ll> > vll; #define pb push_back #define all(x) (x).begin(), (x).end() #define f(i,l,r) for ...
ALGO
0.999954
3.867463
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-07-18T01:05:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22b5cecce3b...
713802fd-2c16-481f-a2c3-3180df8de743
lucasbrenner/competitive-programming
content/data-structures/seg_tree_poly.cpp
#include "../primitives/mint.cpp" // polynomial's degree + 1 const int K = 4; Int d2 = Int(1) / 2, d4 = Int(1) / 4, d6 = Int(1) / 6; // f[i](x) = 0^i + 1^i + ... + x^i function<Int(ll)> f[] = { [](ll x){ return Int(x) + 1; }, [](ll x){ return Int(x) * (x + 1) * d2; }, [](ll x){ return Int(x) * (x + 1) * (...
ALGO
0.999807
4.202502
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2020-03-25T20:17:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "620cb92d...
7d197d7a-d045-4be6-8c58-048983c4d53a
sd-ot/sdot_pub
src/sdot/get_centroids.h
#pragma once #include "../Integration/SpaceFunctions/Constant.h" #include "../Integration/FunctionEnum.h" #include "../Support/Assert.h" #include <vector> namespace sdot { /** We assume that grid has already been initialized by diracs */ template<class Grid,class Bounds,class Pt,class TF,class TI,class Func,class...
ALGO
0.999153
6.063136
{ "github_metadata": { "branch": "master", "commit_count": 213, "repo_created_at": "2019-12-12T14:57:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e13d2a2c...
5055e085-06d1-4436-9062-11a6952b8ab4
lnishan/Competitive-Programming_Solutions
UVa/UVa_10596_Morning Walk_Eulerian Circuit_AWFUL PROBLEM.cpp
#include <cstdio> #include <cstring> #include <vector> #include <algorithm> using namespace std; const int N = 202; int deg[N]; vector<int> g[N]; char vst[N]; void dfs(int vi) { vst[vi] = 1; int i; const int &sz = g[vi].size(); for (i = 0; i < sz; i++) { int &vj = g[vi][i]; if (!vst[vj]) dfs(vj); } } ...
ALGO
0.999795
4.0831
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2015-03-20T05:48:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8dd49286...
4f2544cb-1ba6-407d-97d6-c3f61cc76768
singalhimanshu/CB-Algo-Course
Graphs/graphAdjListInt.cpp
#include<bits/stdc++.h> using namespace std; #define SQ(a) (a)*(a) #define F first #define S second #define PB push_back #define MP make_pair #define ll long long int typedef vector<ll> vi; typedef pair<ll, ll> pi; class Graph { int n; vector<int> *lst; public: Graph(int v) { n = v; ...
ALGO
0.999635
4.378155
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-06-16T03:05: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": "c458349c19...
7b83cacb-559c-4d94-9209-cb0c21595a1e
Shivam06/Coding
stl/algorithms.cpp
#include<iostream> #include<algorithm> #include<vector> #include<set> using namespace std; typedef vector<int> vi; typedef vector<vector<int> > vvi; typedef pair<int,int> ii; #define all(c) c.begin(), c.end() #define tr(c, it) for(auto it = c.begin(); it != c.end(); it++) #define present(c, v) (c.find(v) != c.end()) /...
TOOL
0.994768
3.476506
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2016-06-07T13:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1bded34...
852c800c-e0e6-41ac-8e40-b0dccf2be1e0
iyerkritika/MyLeetcode
Libraries/Misc.cpp
#include "Misc.h" std::string get_num(int num_h,int num_t,int num_ones) { std::string word; // this check is to see if there is any number in the hundreds tens or ones place fo cases like 1000 or 123000 etc if(num_h==0 && num_t==0&& num_ones==0) return ""; // if there is something in those places we parse th...
ALGO
0.987551
4.205302
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2020-10-05T16:23: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": "1089a0e3c...
8f0742de-d43c-4c43-ad89-dcfb24f9be65
Dzy0726/LeetCode-Practice
LinkList/19.删除链表的倒数第N个节点/deleteNnode.cpp
/*** * @Author: <NAME> * @Date: 2023-04-27 16:32:28 * @LastEditors: <NAME> * @LastEditTime: 2023-04-27 16:47:12 * @FilePath: /19.删除链表的倒数第N个节点/deleteNnode.cpp * @Description: * @ * @Copyright (c) 2023 by <NAME>, All Rights Reserved. */ class Solution { public: struct ListNode { int val; ...
ALGO
0.999981
5.582425
{ "github_metadata": { "branch": "main", "commit_count": 288, "repo_created_at": "2023-04-06T15:00: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": "8c815b4763...
1eecf687-772b-4b29-8dca-0d63aef775bd
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/04/0414/personal_submission/cf258b_Mohanad_Nahhal.cpp
/* <NAME> */ #pragma GCC optimize("O3,unroll-loops") #include<bits/stdc++.h> using namespace std; void solve() { int m; const int mod = 1e9 + 7; cin >> m; string s; int mm = m; while (mm) { s.push_back(mm % 10 + '0'); mm /= 10; } reverse(s.begin(), s.end()); v...
ALGO
0.999611
4.610829
{ "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": "ff76...
99a6e4d1-14f5-4624-8a5d-0dc7c5070d4e
alexandraback/datacollection
solutions_1673486_0/C++/NateRiver/A-A.cpp
//============================================================================ // Name : A-A.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <stdi...
ALGO
0.996595
3.386489
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f27172df...
4777f150-9759-4abb-afb7-97e679111037
rahulmansharamani14/essential_DSA
stack/array_implementaion_of_stack.cpp
/* This is normal array implementation of stack where array size is not dyanamic which means it doesn't grow and shrink deepending on the needs at runtime. */ #include <iostream> using namespace std; struct stack{ int *arr; int capacity; int top; stack(int c){ capacity = c; arr = new...
ALGO
0.998601
4.857996
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2022-06-07T08:58: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": "1cfbdd19d20...
e1d2138b-b595-422a-a079-0d4b86fce63f
phurintbyp/rover_flask
arduino/mega/rover_control/motor_control.cpp
#include "motor_control.h" #include "servo_control.h" #include <L298N.h> #include <Arduino.h> #include <math.h> #define PI 3.14159265358979323846 #define DEG_TO_RAD 0.01745329252 // Define motor drivers for front, middle, and rear wheels (left and right) L298N motorFrontLeft(8, 9, 10); // Front Left: ENA = 8, IN1 =...
TOOL
0.99485
4.591671
{ "github_metadata": { "branch": "main", "commit_count": 228, "repo_created_at": "2024-10-08T15:00: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": "e8dcec2378...
38482b8f-1121-4368-ba88-5579435c55f3
AdarshJha-1/DSA
src/array/MajorityElement.cc
#include <iostream> #include <unordered_map> #include <vector> using namespace std; int majorityElementBetter(vector<int> &nums) { int ans = 0; int hightKey = -1; unordered_map<int, int> map; for (int i = 0; i < nums.size(); i++) { if (map.find(nums[i]) == map.end()) { map[nums[i]] = 1; } else ...
ALGO
0.999911
5.030992
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2024-10-26T12:24: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": "1acae9e7939...
186619b3-b7de-4b0c-abc2-bd125463e11d
Fotis-Nikolid/Computational_Geometry
polygon.cc
#if 0 #ifndef POLYGON_CC #define POLYGON_CC #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Polygon_2.h> #include <iostream> #include <vector> #include "polygon.h" //receives a vector of points, and an algorithm with associated criteria, and then creates the polygon based on the algorith...
ALGO
0.999538
3.920994
{ "github_metadata": { "branch": "main", "commit_count": 253, "repo_created_at": "2023-11-10T14:55:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eebfcd3506...
1be380dd-4a01-482e-88af-62573d97db0e
lengocphan2001/lengocphan2001
Hello 2022/B.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ff first #define ss second #define Fi(a, n) for (int i = a; i < n; i++) #define Fd(n, a) for (int i = n; i >= a; i--) #define all(a) a.begin(), a.end() #define sz(a) (int)a.size() #define pb push_back #define yes cout << "YES" << endl #define no...
ALGO
0.999859
3.928942
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-05-19T11:11: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": "8cfab8efb...
1859cac8-0a7c-481b-a495-988536082e67
rjenez/W266-final-project
data/programming-homework-dataset-plagiarism-detection/src/B2016/Z1/Z1/student9099.cpp
#include<iostream> #include<vector> #include<cmath> bool JelOpak(int n){ int rem; std::vector<int> vektorostatka; n=abs(n); for(;;) { if(n<=0) break; rem=n%3; vektorostatka.push_back(rem); n=n/3; } for(int i=0; i<vektorostatka.size(); i++) std::cout<<vektorostatka[i]; for(...
ALGO
0.999428
4.088691
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T00:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73a72087c4...
44e42fbf-ed5e-4915-beea-f641d07e6c37
lva98/IAR
Ant Colony/teste.cpp
#include <bits/stdc++.h> using namespace std; std::random_device rd; std::mt19937 gen; std::uniform_real_distribution<> r_dist; std::uniform_int_distribution<> i_dist; int integer(int i, int j){ i_dist = std::uniform_int_distribution<>(i, j); return i_dist(gen); } void reset() { ...
ALGO
0.997236
3.295022
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-03-25T06:47: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": "e5fc5b5f8...
762064b6-c416-49e6-b625-6fa43a738e34
dhs347/Dream
Team_Training/28、Petrozavodsk Summer-2013. Gennady Korotkevich Contest 1/code/a.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define rep(i, a, b) for(int i = (a); i < (b); ++i) #define per(i, a, b) for(int i = (b) - 1; i >= (a); --i) #define de(x) cout << #x << " = " << x << endl #define dd(x) cout << #x << " = " << x << ...
ALGO
0.999999
3.408738
{ "github_metadata": { "branch": "master", "commit_count": 1232, "repo_created_at": "2019-09-26T15:21:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c8b82...
08c0c16b-90d7-4705-8ed0-4259fad64cad
yz1019117968/FSE-24-UniTrans
cleaned_data/transcoder_evaluation_gfg/cpp/CHECK_GIVEN_STRING_ROTATION_PALINDROME.cpp
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // #include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include...
ALGO
0.991618
5.531441
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-04-06T11:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c1af3960e7...