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
6b7b239a-06f3-411a-b23e-8ba24d475ecc
IkhlasJamshaid/ASSIGNMENT-OF-FOP_-IKHLAS-JAMSHAID-_-454122
IKHLAS JAMSHAID_454122_Assignment-1_Section_AE-01 CODES/PROGRAM 5.cpp
#include <iostream> using namespace std; int main() { int a[6] = {11, 23, 69, -10, 420, 17}; int temp, min, max; for (int i = 0; i < 5; ++i) { min = i; for (int j = i + 1; j < 6; ++j) { if (a[j] > a[min]) { temp = a[j]; a[j] = a[min]; a[min]...
ALGO
0.999663
4.340534
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-17T13:11: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": "b9a969b07e0d...
7bccb431-9ad9-4470-8330-f778f4d07758
pmnyc/Data_Engineering_Collections
Programming_Projects/C++ Projects/CPP_Online Course/Chap13/LinkListForward/main.cpp
// LinkedListForward - a linked list that links new // objects to the end of the list #include <cstdio> #include <cstdlib> #include <iostream> #include <string.h> #define nullptr 0 // required for pre-'09 compilers using namespace std; // NameDataSet - stores a person's name (these objects // ...
ALGO
0.993314
4.256258
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-10-15T04:35:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8066c975f...
dea950bd-ae92-4cef-a3a5-89b27e02211b
kylebd99/StackedFilters
Main/CQFDataGenerator.cpp
#pragma clang diagnostic push #pragma ide diagnostic ignored "cert-flp30-c" // // Created by kylebd99 on 8/30/19. // #include <cstdlib> #include <fstream> #include <random> #include <string> #include <chrono> #include <tclap/CmdLine.h> #include "StackedFilter.h" #include "ZipfDistribution.h" std::vector<IntElement> g...
DATA
0.932024
5.131514
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-06-09T20:31: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": "00bad86e7e...
5ff650e0-8492-45b8-befc-8e24644ca870
iRoy7/algo-progs
bs_stack_ADT.cpp
#include <stdio.h> #define MAXIS 10 struct Stack { int size; int data[MAXIS]; Stack(viod) : size(0) {} void init() { size = 0; } bool isEmpty() { return size == 0; } void push(int x) { data[size++] = x; } int pop() { return (isEmpty())? -1 : data[--size]; } int top() { return (isEmpty())? -1 : data[size - 1]; ...
ALGO
0.999255
3.879773
{ "github_metadata": { "branch": "master", "commit_count": 244, "repo_created_at": "2016-01-24T13:22: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": "44c487f2...
b3b5ef81-97d5-4a11-8093-abdb4ef91912
iskang5532/PS
BOJ/11727 2xn 타일링 2.cpp
/* * 11727 2xn 타일링 2 * DP * 시간 복잡도: ? * 문제: https://www.acmicpc.net/problem/11727 * ETC) 기존 2xn 타일링 문제에서 2x2 크기의 타일을 고려해야 하는 문제. * 2x2을 넣을 수 있는 [n == 2]부터 고려. 1x2 타일을 사용했을 때의 남는 공간이 n-2와 같았던 것처럼, * 2x2 타일을 사용했을 때의 남는 공간 또한 n-2와 같다. 그러므로, n-2를 두 번(*2) 이용하게 해준다. */ #include <iostream> using namespace std; #de...
ALGO
0.999989
4.327102
{ "github_metadata": { "branch": "master", "commit_count": 330, "repo_created_at": "2021-07-29T10:17:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d4b16dd...
8bebe382-7b99-4db3-8557-92d5616a09ff
Roykesydon/Leetcode-Practice
other/54.cpp
#include <iostream> #include <vector> using namespace std; class Solution { private: int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; int n, m; vector<vector<bool>> vis; bool dontNeedChangeDir(int x, int y, int dir) { int nextX = x + dx[dir]; int nextY = y + dy[dir]; ...
ALGO
0.999999
5.963568
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2022-06-02T02:29: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": "e38c691e40a...
ec6fdcb0-874c-4311-bdef-d18fecd35ded
BrunoSilvestre00/competitive-programming
beecrowd/1768.cpp
#include <iostream> using namespace std; int main(){ int N = 3; while(N != 99){ for (int i = 1; i <= N; i+=2){ int spc = (N-i)/2; for(int j = 0; j < spc; j++){ cout << ' '; } for(int j = 0; j < i; j++){ cout << '*'; ...
ALGO
0.999848
3.540433
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-03-08T14:59:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ddaa25e82d63...
530407f6-e838-4922-9662-77c5ed7e7d9b
garimachhikara128/DTU-2023-24-Even-ADA-A4
Graph/Hamiltonian.cpp
#include<iostream> #include<map> #include<queue> #include<vector> using namespace std ; class Graph { map<int, map<int,int> > strg ; int V ; public : Graph(int V) { this->V = V ; } void addEdge(int u, int v, int cost) { strg[u][v] = cost ; strg[v][u] = cost ...
ALGO
0.999951
4.306636
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-01-18T08:11:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32180097fff...
2b93f90b-7da8-4407-949e-be668314214f
Fennec2000GH/SWE-Chest
src/LeetCode/Trees/563_Binary_Tree_Tilt_1.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <queue> #include <vector> using namespace std; /* https://leetcode.com/problems/binary-tree-tilt/ */ //Problem: /* Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum ...
ALGO
0.999989
6.542109
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2019-12-08T07:23: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": "212aa8f70...
a93b7a54-5919-4151-84c2-908116c1505e
Dandya/ptrid
src/ptrid.cc
#include <iostream> #include <vector> #include "ptrid_lib/readers.h" #include "ptrid_lib/probabilistic_scheme.h" #include "ptrid_lib/markov_chain.h" #include "ptrid_lib/math_func.h" #define MARKOV_CHAIN // #define CHISQ // #define INFO_DISTANCE #if defined(MARKOV_CHAIN) /* using likelihood function */ void PrintTyp...
ALGO
0.951089
3.51622
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-04-26T05:41:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c7a9b596dd3...
55ad96e1-f01d-42cd-96ad-2a1d284c2431
nomaannm/DS-ALGO-Sheets
CrackingACodingInterview/HashTable_Impl.cxx
#include <cstdint> #include <iostream> #include <string> #include <vector> using namespace std; constexpr int TABLE_SIZE = 10; struct Node { string key; string value; Node* next; Node(const string& k, const string& v) { key = k; value = v; next = nullptr; } }; class HashT...
ALGO
0.991015
5.927457
{ "github_metadata": { "branch": "main", "commit_count": 223, "repo_created_at": "2023-09-01T03:59:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c29d52d5b4...
f6e073ec-71e8-4e7f-b403-28fa2c913033
gnorasi/gnorasi
Gnorasi/ext/tgt/bounds.cpp
/*********************************************************************************** * * * Voreen - The Volume Rendering Engine * * ...
TOOL
0.935945
6.508131
{ "github_metadata": { "branch": "master", "commit_count": 769, "repo_created_at": "2014-10-02T14:37:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 8, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "980149dc4...
32fc1c78-382c-448e-abd9-34632171d13d
fattypiggy/PAT
甲级/1030 Travel Plan/main.cpp
// runtime: 4ms // space: 384K // link: https://pintia.cn/problem-sets/994805342720868352/problems/994805464397627392 // 最短路径的变形题目。 #include <cstring> #include <algorithm> #include <cstdio> #include <vector> #include <climits> #include <queue> #include <stack> using namespace std; const int MAX = 500; const int INF = ...
ALGO
0.999951
3.867714
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2020-04-05T09:02:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5119a7f1...
4a615c72-f776-4d51-9f01-21eedc56db22
Njuapp/Codeforces-Solution
F/977F.cpp
#include <iostream> #include <cstdio> #include <vector> #include <unordered_map> #include <unordered_set> #include <utility> #include <algorithm> using namespace std; typedef long long int ll; int n; ll arr[200010]; int last[200010]; int maxlen[200010]; int out[200010]; unordered_map<ll , int> mp; int main() { cin ...
ALGO
0.999998
3.525715
{ "github_metadata": { "branch": "master", "commit_count": 151, "repo_created_at": "2018-01-31T18:35: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": "4d235724...
d7f0b161-a360-4cae-9321-a4de408c6ed4
chengyiwei/algorithm
CDJCC_ACM/Sakura Tears training #6/E/D.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int N,K; cin >> N >> K; vector<int> A(N + 1, 0), B(N + 1, 0); for (int i = 1; i <= N; i++) cin >> A[i]; for (int i = 1; i <= N; i++) cin >> B[i]; if (A == B) {cout << "Yes\n"; return;} if (K == 1) { vector<int> A_, B_; ...
ALGO
0.99998
4.329429
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-08-13T07:27:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4df0bba6c15...
8f2d1bfe-5d63-44e2-904a-26379dd647a6
RickySandi/Estructuras
Dijkstra_Kruskal/Grafo.h
#ifndef Grafo_h #define Grafo_h #include"Vertice.h" #include <queue> #include <functional> #include <fstream> typedef pair<char, pair<char, char>>pi; class Grafo { private: Vertice<int> vec[100]; int iesimo; public: Grafo(); ~Grafo(); void insertarArista(char origen, char destino, char p...
ALGO
0.998145
3.447258
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2020-02-21T04:06: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": "6db73777e...
60a10d48-57d8-4a99-a888-73df55830b11
dhnanj2/CP_Kit
BinaryTree/SumTree.cpp
/* Given a Binary Tree. Return 1 if, for every node X in the tree other than the leaves, its value is equal to the sum of its left subtree's value and its right subtree's value. Else return 0. An empty tree is also a Sum Tree as the sum of an empty tree can be considered to be 0. A leaf node is also considered a Sum T...
ALGO
0.999981
5.929021
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-09-04T08:13:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19fe04444d...
87ab7c8d-31ef-4e90-a78f-c5bf1e74b79e
Ritik-Gupta-675/4th-sem-Lab
DAA/Lab 5/2.c++
#include <bits/stdc++.h> using namespace std; void dfs(int node,vector<vector<int>>&adj,vector<bool>&visited){ cout<<node<<" "; visited[node] = true; for(auto i : adj[node]){ if(!visited[i]){ dfs(i,adj,visited); }}} void dfsStack(int start, vector<vector<int>>& adj, vector<bool...
ALGO
0.999982
5.188734
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-16T18:39: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": "d1218a694368...
2331c8d4-fbf7-4a65-8f71-b8e74d76e180
ishandutta2007/codeforces-o
orzdevinwang/normal/70/D.cpp
#include<bits/stdc++.h> #define L(i, j, k) for(int i = j, i##E = k; i <= i##E; i++) #define R(i, j, k) for(int i = j, i##E = k; i >= i##E; i--) #define ll long long #define db double #define pii pair<int, int> #define sz(a) ((int) (a).size()) #define x first #define y second using namespace std; const int N = 1e5 + 7; ...
ALGO
0.999943
4.435061
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45: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": "1f7a668c02a9...
a9d2a6b6-9002-4c7f-90aa-e4c086f39f59
taitruong256/Competitive-programming
IUH_Olympic_ICPC/VongLoai2023_2/D.cpp
/*============================================================================================================== __ __ _____ ______ _______ | | | | / __ \ / _____| / __...
ALGO
0.99992
4.386162
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-04-14T06:59: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": "d6af746b2108...
49b566e5-40ef-4aee-9e4c-aa32931f08e9
Mahedi-hasan1/DSA-codes
Contest/B_Good_Kid.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define fastio \ ios::sync_with_stdio(false); \ cin.tie(nullptr) #define ll long long int #define pb push_back #define show(x) cout << #x <...
ALGO
0.999957
3.766982
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-09-08T11:53:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73e70665fa03...
c05d706c-760f-46e2-b376-3b41acddddaf
namratakaushik016/Strivers_SDE_sheet
0004-median-of-two-sorted-arrays/0004-median-of-two-sorted-arrays.cpp
class Solution { public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { int m = nums1.size(); int n = nums2.size(); //need to ensure that nums1 is shorter than or equal to nums2 if(m > n){ swap(nums1, nums2); swap(m, n); } ...
ALGO
0.999994
6.361367
{ "github_metadata": { "branch": "main", "commit_count": 326, "repo_created_at": "2023-07-04T05:58:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34d3bf937f...
f51c916c-21ec-448b-a315-9e426ca963c8
johnsonn6003/csc134
M3T2_Johnson/main.cpp
#include <iostream> using namespace std; void createpayChartWithFor() { cout << "This is the pay chart using for" << endl; } void createPayChartWithWhile() { cout << "This is the pay chart using while" << endl; int hour = 30; float pay; float hourlyPay; //ask the user for hourly pay cout <...
ALGO
0.994093
3.672884
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-01-15T19:06:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95e63c31e...
d0bc8a4a-e6cb-4277-821b-5a0220d7680c
tr0j4n034/SPOJ
SHPATH.cpp
#include <bits/stdc++.h> using namespace std; #define Long long long #define ld long double #define pii pair<int, int> #define pli pair<Long, int> const int me = 10025; const int mod = 1.e9 + 7; int t, n, m, q, A, B; int dis[me]; string city, a, b; vector<pii > edges[me]; map<string, int> pos; set<pii > s; in...
ALGO
0.999964
3.838336
{ "github_metadata": { "branch": "master", "commit_count": 442, "repo_created_at": "2017-03-20T11:02:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 96, "forks": 67, "issues": 0, "pull_requests": 6 }, "file_meta": { "content_id": "7eefec...
b97460c9-0c5d-4b8d-bd1e-ea257a31cdea
toddhester/rl-texplore-ros-pkg
src/rl_agent/src/Models/ExplorationModel.cc
/** \file ExplorationModel.cc Implements the ExplorationModel class. Reward bonuses based on the variance in model predictions are described in: Hester and Stone, "Real Time Targeted Exploration in Large Domains", ICDL 2010. And intrinsic reward bonuses based on variance novelty as described in: Hester ...
ALGO
0.949969
7.099431
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2015-03-23T15:58:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 63, "forks": 24, "issues": 5, "pull_requests": 2 }, "file_meta": { "content_id": "24db0de...
10d72883-f73b-4ade-8727-651760cbd0a0
alex2835/stuff2
OuliningFilters/graduate_work/src/image_processing/cpu/kmeans_image_cpu.h
#pragma once #include "image_processing.h" #include "kmeans_cluster.h" #include "pixel.h" #include <functional> #include <algorithm> using PixelDistaceRate = std::function<float(const Pixel&, const Pixel&)>; namespace cpu { static void Init(const cpu::Image& image, std::vector<KMeansCluster<Pixel>>& cluster...
ALGO
0.984717
5.800753
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2020-02-07T09:24: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": "46fb5c80...
4a9bb2b4-a440-4f6e-aa0a-5ccf87a7ef58
aryankashyap7/Hackerrank-Conqueror
Problem Solving/Algorithms/Strings/Strong_Password.cpp
#include <bits/stdc++.h> using namespace std; int main() { int dummy; string s; int upper = 0, lower = 0, symbol = 0, digit = 0, length = 0, kitnehai = 0, kitnegayab = 0, khali_jagah = 0; cin >> dummy; cin >> s; for (int i = 0; i < dummy; i++) { if (s[i] >= 'A' && s[i] <= 'Z') ...
ALGO
0.999292
3.323178
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2021-05-19T16:08:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93fb8fc2a9...
d4ed1f17-2760-44c4-975a-edc94624c6a3
daepoid/algorithm-study
baekjoon/1000/1939.cpp
// // Created by SeHyun on 2023-01-09. // #include "bits/stdc++.h" #define MAX 10001 using namespace std; int N, M; int low = 0, high = 0; bool visited[MAX]; vector<pair<int, int>> board[MAX]; bool bfs(int start, int end, int cost) { queue<int> q; q.push(start); visited[start] = true; while (!q.em...
ALGO
0.999964
4.15735
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2021-04-14T08:40: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": "6fc66e1feb...
9adbb797-7308-495b-9f05-803b56df6209
DanielCruzAr/Actividades_integradoras
Act_integral4/disjoint.h
/* Competencia a evaluar SEG0702A Tecnologias de vanguardia Disjoint Sets <NAME> A01701370 */ #ifndef DISJOINT_H_ #define DISJOINT_H_ #include <sstream> #include <string> #include <iostream> #include <vector> using namespace std; /* Creamos la clase Dj Como voy a implementarla utilizando un vector de strings decidi t...
ALGO
0.991219
4.693025
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2020-09-10T16:53: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": "30a6c4314...
6d04b286-4160-407c-a6ae-1e824ba16ae8
emmothemmoth/WorkoutApp
Source/Engine/Utilities/CommonUtilities/Line.hpp
#pragma once #include "Vector2.hpp" namespace CommonUtilities { template <class T> class Line { public: // Default constructor: there is no line, the normal is the zero vector. Line() { myPoint0.x = 0; myPoint0.y = 0; myPoint1.x = 0; myPoint1.y = 0; } // Copy constructor. Line(const Line ...
ALGO
0.950559
5.769601
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-06-28T20:06: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": "818360fe8a...
932744da-d7e0-48a4-a171-3df94651fb0f
dnovosel19/FER
PREDIPLOMSKI/5. semestar/PROJEKT R/prufer.cpp
#include<iostream> using namespace std; void kodPrufer(int **stablo, int n) { int static stani = 0; // varijabla koju koristimo za ispis zareza int cvor[n] = {0}; // polje od n clanova, svi na pocetku 0 for(int i=0; i<n; i++) { // po redovima broji koliko ima poveznica, jedinica for(int ...
ALGO
0.999797
4.108988
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-01-20T16:17: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": "cc77a3d49d1...
1242488f-4c61-4487-bad6-20dfb082ab10
mySoftSnail/MyCodingTestStudy
백준/11780_플로이드 2.cpp
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); int n, m; const int INF = 0x3f3f3f3f; cin >> n >> m; vector<vector<int>> d(n + 1, vector<int>(n + 1, INF)); vector<vector<int>> nxt(n + 1, vector<int>(n + 1, 0)); while (m--) { int a, b, cost; cin >> a >> b >> cost...
ALGO
0.999991
3.984767
{ "github_metadata": { "branch": "master", "commit_count": 302, "repo_created_at": "2022-06-17T11:50: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": "d5b1fb20...
8d6266cd-2040-4091-bd4b-2b9df924f809
ROCm/rpp
src/modules/batch_pd/cl/cl_vision.cpp
/* MIT License Copyright (c) 2019 - 2025 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mo...
ALGO
0.961044
4.364858
{ "github_metadata": { "branch": "develop", "commit_count": 1433, "repo_created_at": "2019-08-28T23:59:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 66, "forks": 45, "issues": 0, "pull_requests": 9 }, "file_meta": { "content_id": "f8696...
2f93ff06-5d5a-4c19-a4c4-5eaafeacd76f
starcraftman/ProjectEuler
cpp/src/problem074.cpp
/** The number 145 is well known for the property that the sum of the factorial of its digits is equal to 145: 1! + 4! + 5! = 1 + 24 + 120 = 145 Perhaps less well known is 169, in that it produces the longest chain of numbers that link back to 169; it turns out that there are only three such loops that exist: 169 → ...
ALGO
0.998131
6.601183
{ "github_metadata": { "branch": "master", "commit_count": 217, "repo_created_at": "2015-02-27T15:56: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": "c6d61428...
e32f770d-2932-4218-bd9a-5e319a13dea4
jhycj/euler
로봇운행.cpp
#include<stdio.h> int count; int n; int m; int sx; int sy; int ex; int ey; int map[62][62]; int cost[62][62]; int Q[7200]; void bfs(int sy, int sx){ int rear; int front; int i; int k; int dy[4] = {0, 1, 0, -1}; int dx[4] = {1, 0, -1, 0}; int y; int x; int ty; int tx; count = -1 ; ...
ALGO
0.999936
3.462916
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-08-11T03:56: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": "5fe64ed047...
8a1d4c17-2387-4a47-88cb-4eb982dfc624
Ganbilly/my-algo
C++/gold/1/01562.cpp
#include <iostream> #include <vector> #define MOD 1000000000 using namespace std; int v[10][100]; int main(){ ios::sync_with_stdio(false); cout.tie(NULL); cin.tie(NULL); int n; cin >> n; int sum = 0; v[0][0] = 0; for(int i = 1; i < 10; i++){ v[i][0] = 1; } for(int i =...
ALGO
0.999853
3.978731
{ "github_metadata": { "branch": "main", "commit_count": 177, "repo_created_at": "2022-01-29T12:35: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": "1efa104329...
9f5bbc4c-7f11-4156-b98a-2f6ab88d69fd
aadarshkt/Data-Structures-and-Algorithms-Problems-on-Different-Platforms
DSA/Graphs/DFS/Counting_Rooms.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<char>> matrix; vector<vector<bool>> visited; bool floodfill(int i, int j, int n, int m) { if (i >= n || j >= m || i < 0 || j < 0 || matrix[i][j] == '#' || visited[i][j] == 1) return false; visited[i][j] = 1; floodfill(i, j + 1, n, m); ...
ALGO
0.999751
4.974096
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2022-07-04T10:36: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": "e39dc6c0a...
2967aae4-0571-4e4a-957d-08ceb2a4c9ad
Technophile58/CPP-basic-and-DSA
function/prime2.cpp
// Online C++ compiler to run C++ program online #include <iostream> using namespace std; // 1 to n print all prime numbers bool checkPrime(int N) { // we will check if N is prime or not if (N <= 1) { return false; } // check if N is divisible by any number b/w [2, N-1] for (int i = 2...
ALGO
0.999891
4.358464
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-05-05T19:01: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": "643035c8a2c...
fc975ae8-b4db-4879-91f3-ea460a48aa5a
hossamthapit/CompetitiveProgramming
Uva/498/23398861_AC_140ms_0kB.cpp
#include<bits/stdc++.h> #define DEBUG true #ifdef ONLINE_JUDGE #undef DEBUG #define DEBUG false #endif #define stop(x) {cout<<x<<endl;exit(0);} #define TRACE(x) if(DEBUG) cerr << #x << " = " << x << endl; #define TRACE2(x,y) if(DEBUG) cerr << #x << " = " << x << " | " << #y << " = " << y << endl; #define TRACE3(x,y,z) ...
ALGO
0.999335
3.645887
{ "github_metadata": { "branch": "master", "commit_count": 221, "repo_created_at": "2018-03-02T12:52: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": "3bd5022b...
3ef89a01-49d2-4c47-ab95-01c8d6416782
WarlonZeng/Big4_Interview_Practice
CODELAB/FACEBOOK/3_HOUR/SYMMETRY.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ bool checkLeftRight(TreeNode* left, TreeNode* right) { if (left == NULL && right == NULL) { return true; } if ...
ALGO
0.999997
5.670517
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2017-02-16T22:25:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d33a0f92...
2afcc495-d67a-4062-8f13-acdebecc7a03
Toxa-man/labWorks_8373_2018
TimofeevaAI/lab_2/lab_2.cpp
#include <iostream> #include <time.h> #include <cstdlib> using namespace std; int main() { srand(time(NULL)); const int size = 10; int arr[size]; int arrn[size]; for (int i = 0; i < size; i++) { arr[i] = rand() % 20; cout << i + 1 << ":" << arr[i] << endl; } int i = 0, j = 0, u = 0, l = 0; int q, min,...
ALGO
0.999824
3.436983
{ "github_metadata": { "branch": "master", "commit_count": 1239, "repo_created_at": "2018-09-11T21:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 26, "issues": 0, "pull_requests": 92 }, "file_meta": { "content_id": "c3fea...
8a04e6dc-eb95-47d6-953d-3b2ae328b654
DapengJin/LeetCode
138.随机链表的复制.cpp
#include "pkgs.h" /* * @lc app=leetcode.cn id=138 lang=cpp * * [138] 随机链表的复制 */ // @lc code=start /* // Definition for a Node. class Node { public: int val; Node* next; Node* random; Node(int _val) { val = _val; next = NULL; random = NULL; } }; */ class Solution { ...
ALGO
0.995324
5.539833
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-06-22T22:27: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": "ac78e9dc8c0d...
7645a9e7-5987-4b44-8baf-bfca4cce7f44
KalshuCodes/Previous-Codes-and-Solves-Competitive
Dimitrescu.cpp
#include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <cmath> #include <cstring> #include <chrono> #include <complex> #define priority_queue < ll, std::vector<ll>, std::greater<ll> > mnheap; // mnheap.push(), mnheap.top(), mnheap.pop() #define REP(i,a,b) for (auto i = a; i != b; i++) #define ll long...
ALGO
0.999774
3.613728
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-12-29T19:43:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c165ed60d...
c1e3d06a-6e92-4a56-ac46-f7662cfa5f51
OO7kartik/Data_Structures
C++/LInked_List/LL_Reverse_Recursion_list.cpp
#include<iostream> using namespace std; struct node { int data; node *next; }*head; void Insert(int data) //to insert data at the starting { node *temp1 = new node(); temp1->data = data; temp1->next = head; head = temp1; } void Printy() { node *temp = head; cout<<"the list now is: "; while(temp != NULL) { ...
ALGO
0.998965
4.205289
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-03-23T05:20: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": "5d2dc30c4...
baaa37f4-f262-4636-8d1c-b66f98f54c97
JeffreyGoncalves/CPP
src/tPyramid/tPyramid.cpp
#include "tPyramid.h" TPyramid::TPyramid(Point3D A, Point3D B, Point3D C, Point3D topPoint, Color color, float ref, float a, float refrac) : Object3D(color, ref, a, refrac) { this->P1 = A; this->P2 = B; this->P3 = C; this->PTop = topPoint; //Base Triangle base(P1,P2,P3, color, ref, a, refrac); this->listTrian...
TOOL
0.994302
4.510679
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2017-11-29T13:18: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": "d0e35daf7...
93f43304-f29f-4a2f-8135-1755698bad06
aryan091/Take-U-Forward-SDE-Sheet
BinarySearch/Binary Search on Answers/AgressiveCows.cpp
#include <iostream> #include <vector> #include <bits/stdc++.h> using namespace std; bool canPlaceCows(vector<int> &stalls , int cows , int minDist) { int n = stalls.size(); int cowCount = 1; int lastCoordinate = stalls[0]; for( int i = 1 ; i < n ; i++) {...
ALGO
0.999977
4.689933
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-07-31T17:18: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": "183502cdf9a1...
68d2190d-60d8-4c66-8c7d-735905ba4b5e
Rajveer-CSE-27/Coding-Journey-CPP
Trees/Striver series/L41. Ceil in a Binary Search Tree.cpp
// || जय जय जय बजरंग बली || #include <bits/stdc++.h> using namespace std; #define ll long long /** https://www.youtube.com/watch?v=KSsk8AhdOZA&list=PLkjdNRgDmcc0Pom5erUBU4ZayeU9AyRRu&index=41 https://www.geeksforgeeks.org/problems/implementing-ceil-in-bst/1 Approach :: Keep a value that represents ans; Initialize...
ALGO
0.999988
4.458185
{ "github_metadata": { "branch": "main", "commit_count": 673, "repo_created_at": "2023-07-25T11:08: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": "081f5376f8...
8bed3313-c270-42fe-8cdb-bc8280b7a3d4
xingyingone/algorithm
dp/最长回文子串/zijixiede .cpp
#include <iostream> #include <string> #include<vector> #include<iterator> #include<sstream> #include<algorithm> using namespace std; //left:左边界 right:右边界 mid:中间值 radius:半径 //left_i_left:对称点左边界 left_i:i关于mid的对称点 int manacher(string str) { int n = str.size(); string str1; for (int i = 0; i < n; ++i) { st...
ALGO
0.999925
4.253232
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-07-17T09:19:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a5348e45b...
a5bb5abb-8ca8-4c55-83be-c625138e32bb
C-B-U/algorithm_challenge
시즌2/상/dps0340/0817_6_dps0340.cpp
#pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2") #include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <queue> #include <functional> #include <utility> #include <map> #define lld long lo...
ALGO
0.999659
3.630059
{ "github_metadata": { "branch": "main", "commit_count": 2333, "repo_created_at": "2022-04-27T14:04:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 68, "issues": 6, "pull_requests": 8 }, "file_meta": { "content_id": "9e5446c2...
d1f4a290-c2c5-49ab-9e84-c91a42aef7ba
DinhDuyen2810/MyCode
C++/Graph/BFS.cpp
#include <iostream> #include <map> #include <list> #include <queue> using namespace std; typedef struct{ int id; bool var; } NODE; int main() { int nodes, edges; int a, b; queue<int> theQUEUE; cin >> nodes >> edges; NODE *arr = new NODE[nodes]; map<int, list<int>> theMAP; for(int ...
ALGO
0.999994
4.164887
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-12T04:59: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": "8cbee0ecd16c...
90d690e7-18a6-4aea-b358-5616dbd902ea
Stichting-MINIX-Research-Foundation/minix
external/bsd/libc++/dist/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
TEST
0.901877
7.19615
{ "github_metadata": { "branch": "master", "commit_count": 7153, "repo_created_at": "2014-10-03T08:10:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3236, "forks": 1099, "issues": 93, "pull_requests": 25 }, "file_meta": { "content_id": "...
3f854ead-970a-40cf-85d0-0d0be075d86c
sinhasaurabh079/Leetcode-Practiced-Questions
Array Problems/Merge-Sorted-Array.cpp
/* */ class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int i=0,j=0; int k=0; vector<int> nums3(m+n); // jb tk dono array m elements same h tb tk ye while(i<m && j<n) { if(nums1[i]<nums2[j]) // num1 m chota e...
ALGO
0.999959
5.494051
{ "github_metadata": { "branch": "main", "commit_count": 631, "repo_created_at": "2022-10-17T19:08:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ff47797af...
b58d1ade-6ce8-4b8c-a92c-0a50a247dc34
KleimenovM/mipt_cpp
08022021/j.cpp
#include <iostream> #include <string> int main() { int num, r; std::string babyl = ""; std::cin >> num; r = num % 60; for (int i = 0; i < r / 10; i++) babyl += "<"; for (int i = 0; i < r % 10; i++) babyl += "v"; num = (num - r) / 60; while (num >= 1) { babyl = "." + babyl; ...
ALGO
0.999705
4.423733
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2021-02-06T15:36: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": "239e509a4...
a840440b-39ea-486e-b8b2-a8693a174a18
efertuc/MPI
MPI/l5.cpp
#include <iostream> #include <ctime> #include <fstream> #include <string.h> #include <cmath> #include <sstream> #include <stdio.h> #include <iostream> #include <cstdlib> #include "mpi.h" using namespace std; // karatsuba method class class Karatsuba { public: int lengthController(string &, string &); string addSt...
ALGO
0.99995
3.90027
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-01-15T18:32: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": "0c116f7007ac...
ffa162d0-fec9-4f41-9b09-b70384602e99
ishandutta2007/codeforces-y
yuma_/normal/679/C.cpp
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; template<class T> using Table = vector<vector<T>>; const ld eps=1e-9; const int dx[4] = { -1,0,1,0 }; const int dy[4] = { 0,1,0,-1 }; struct UnionFind { vector<int> data;...
ALGO
0.999208
3.976448
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bdd0ad8d761...
a3e74c0e-d702-4d35-b4b3-cca6c5cf5849
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1245/all/29594083_64006503.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <math.h> #include <cmath> #include <vector> #include <algorithm> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <cassert> #include <random> #include <deque> #include <bitset> #include <string> #include <queue> #includ...
ALGO
0.999832
4.528309
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40: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": "9278227fd...
6de3cb31-82b3-4c18-b605-d19c52b52782
ishandutta2007/codeforces-w
wiwiho/normal/1348/D.cpp
//#define NDEBUG #include <bits/stdc++.h> #include <bits/extc++.h> #define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define iter(a) a.begin(), a.end() #define riter(a) a.rbegin(), a.rend() #define lsort(a) sort(iter(a)) #define gsort(a) sort(riter(a)) #define mp(a, b) make_pair(a, b)...
ALGO
0.999544
3.395843
{ "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": "c17b6ecaa55c...
562fe0d5-46a7-4237-b11c-f10450f40c31
Igronemyk/OI
POJ/2481.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int MAXN = 100010; template<typename T> inline T read(){ T result = 0;int f = 1;char c = getchar(); while(c > '9' || c < '0') {if(c == '-') f *= -1;c = getchar();} while(c <= '9' && c >= '0') {result = result * 10 + c - ...
ALGO
0.999904
4.127207
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2017-09-14T04:04:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbee2618...
7b30a29f-0d6a-410a-9fc6-26bc0ccd4e40
mrvivekthumar/CPP_Programming_Sem_2
experiment 2/exp2_4.cpp
// Using The Concept Of Function Overloading, Find The Perimeter Of Triangle, Square And Rectangle. #include <iostream> using namespace std; double Perimeter(double); // perimeter Of Square. int Perimeter(double, double, double); // Perimeter Of Triangle. float Perimeter(double, double); // Perimete...
ALGO
0.985406
3.623923
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2023-08-17T12:20: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": "05e2c79024...
709c5723-fafe-438a-944a-541ce353d790
ishandutta2007/codeforces-w
wxhtzdy/normal/1299/B.cpp
/** * author: wxhtzdy * created: 06.02.2022 20:50:25 **/ #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> x(n), y(n); for (int i = 0; i < n; i++) { cin >> x[i] >> y[i]; } if (n % 2 == 1) { cout << "NO" <...
ALGO
0.999977
5.010778
{ "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": "c60734a22942...
817a45d0-dbc2-4f03-bd28-fb38d7819474
parvez-ahammed/online-judge-solves
AtCoder/Beginner Contest/341/D_Only_one_of_two.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" ll n, m, k; bool check(ll mid) { ll lcm = (n * m) / __gcd(n, m); ll cnt = (mid / n) + (mid / m) - 2 * (mid / lcm) ; return cnt >= k; } ll bs() { ll l = 1, r = 1e18 + 5; while (l < r) { ll mid = (l + r)...
ALGO
0.999953
4.621222
{ "github_metadata": { "branch": "master", "commit_count": 508, "repo_created_at": "2022-07-12T22:20: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": "6a2235d8...
1cd62775-7554-46c2-92e5-3af1f0caa67e
RochX/USACO
Training/sprime.cpp
/* ID: PROG: sprime LANG: C++ */ //NAME : //GROUP : Binary //LAST MODIFIED : 13 March 2018 //PROBLEM ID : USACO Superprime Rib //DESCRIPTION : Given a length for a set of numbers, find all of the superprime numbers that are the given length //SOURCES/HELP : #include <iostream> ...
ALGO
0.999054
4.383126
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-01-06T03:39: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": "b780ef622db...
52f1b1da-bf47-483d-876d-5b981d22bc7b
varsha7104/graphs
basic/bfs/bfs.cpp
/*Given a connected undirected graph containing V vertices, represented by a 2-d adjacency list adj[][], where each adj[i] represents the list of vertices connected to vertex i. Perform a Breadth First Search (BFS) traversal starting from vertex 0, visiting vertices from left to right according to the given adjacency l...
ALGO
0.999977
5.699692
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2025-07-03T03:09:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e904f4248e0...
5f15e628-2469-4cbb-ac3c-0bcbc80f571a
kookjd7759/Algorithm
백준/Bronze/10182. AcidBase/AcidBase.cc
#include <bits/stdc++.h> #define Sync ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr) #define Fixed(x) cout << fixed; cout.precision(x) #define Interactive cin.tie(0)->sync_with_stdio(0) #define instr(x) getline(cin, x) #define ll long long #define in cin >> #define out cout << #define spc << " " <...
ALGO
0.996559
3.468201
{ "github_metadata": { "branch": "main", "commit_count": 2962, "repo_created_at": "2023-08-07T12:27: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": "9a30678ed...
c8b61d11-84e6-4bb4-9fb3-4f32801142f3
Dipankar-Kumar-Singh/Codeforces
B_Woeful_Permutation.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define TestCases int TOTALTC ; cin >> TOTALTC ; for(_case = 1 ; _case <= TOTALTC ; _case++) #define FAST ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); #define all(x) (x).begin() , (x).end() #define nl "\n" int _case = 1 ; void solv...
ALGO
0.999938
4.547921
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-02-10T11:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c34b4dd2ddcf...
e7f5ca79-9246-482f-845b-7d6fa1687c7d
work-fw/algorithms
BFS/BJ1039_exchange.cpp
// BJ 1039 #include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <queue> using namespace std; int number; int k; int resultMax; int digits; void swap(int x, int y) { vector<int> tmp; int num = number; while (num != 0) { tmp.push_back(num%10); num /= 10; } reverse(tmp.begin(...
ALGO
0.999984
4.127794
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2019-07-09T11:15:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eccb55dde...
bce9ad2f-481e-4a96-a03a-8eb29781170e
100sarthak100/DataStructures-Algorithms
Code/30DayChallenge/Day_1_Arrays/mergeOverlappingIntervals.cpp
// For example: // Given [1,3], [2,6], [8,10], [15,18], // return [1,6], [8,10], [15,18]. // Make sure the returned intervals are sorted. // Input // 2 // 4 // 1 3 2 4 6 8 9 10 // 4 // 6 8 1 9 2 4 4 7 // Output // 1 4 6 8 9 10 // 1 9 // time - O(n Log n) and // O(1) Extra Space Solution #include<bits/stdc++.h> ...
ALGO
0.999952
4.80301
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2020-05-25T14:43:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2b476a55a...
60043a9c-fb09-4c49-8276-2b4e60033550
yagnik28/DP
Frog_Jump_Tabulation.cpp
#include<bits/stdc++.h> using namespace std; // Tabulation. // Bottom-Up Approch // See Mmeoization solution before this. // T.C ==> O(N) // S.C ==> O(N) + O(N) --> O(N) for recursion stack + O(N) for DP Array. // Using prev2 for dp[i - 2], prev for dp[i-1] and cur for dp[i] we can reduce ==> S.C ==> O(N). int main(...
ALGO
0.999973
4.510874
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-12-29T20:59: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": "fb91ae1d56...
97834be4-ff11-4e50-93d7-c339ff331b4e
blank-manash/coding-library
Graph/Floyd Warshall.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int #define uset unordered_set #define umap unordered_map #define db(x) cout << #x << " == " << x << ";\n" #define a(x) a.begin(),a.end() typedef vector<int> vi; typedef pair<int,int> pi; const int INF = 1e7; void test() { int V; cin >> V; ...
ALGO
0.999886
3.998911
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-05-22T07:44: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": "76712aa8d2...
5cb2ee64-803e-4f4c-9cf9-dcf24e421603
wyjoutstanding/Algorithm
aoapc_uva/aoapc-code/ch04/UVA12412fc.cpp
#include<bits/stdc++.h> using namespace std; const double limit=1e-6; struct Student{ long long SID; int CID,score[4],rank=1,totalScore=0; double averageScore=0.0; string name; Student(long long s,int c,string n,int a[]):SID(s),CID(c),name(n){ for(int i=0;i<4;++i){ score[i]=a[i];...
TOOL
0.93861
3.474845
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-01-20T13:40:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 55, "forks": 11, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "a025960...
46f9e34c-d646-49c5-91f6-f6183e557408
A-Y-1/AscendC-S4
Heaviside/op_kernel/heaviside.cpp
#include "kernel_operator.h" using namespace AscendC; const static int BUFFER_NUM = 1; const static int BLOCK_SIZE = 32; const static int COMPARE_ALIGNED = 256; template <typename T> class kernelHeaviside { public: __aicore__ inline kernelHeaviside() {} __aicore__ inline void Init(GM_ADDR input, GM_ADDR values, G...
ALGO
0.990753
4.354623
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-03-31T06:58:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e33cf8ae697...
d5a7cd4a-5c49-446c-8ab3-64035d0be42b
Lizhmq/Course_Projects
Parallel-Dijkstra-MPI/code/parallel/mpi_solver.cpp
#include <cstdlib> #include <cstdio> #include <string.h> #include <vector> #include <functional> #include <algorithm> #include <queue> #include "mpi.h" #include "values.h" #include "nodearc.h" using namespace std; #define MODUL ((long long) 1 << 62) #define VERY_FAR 4557430888798830399LL // 0x3f3f3f3f3f3f3f3fLL exte...
ALGO
0.998082
3.537138
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2019-03-24T16:05:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c7ce237d...
08944e8c-0591-44d6-a5cd-416c215ed279
dsandrade0/island
src/quadtree.cpp
#include "quadtree.hpp" using namespace std; void Quadtree::fileAnimal(Animal* animal, float x, float z, bool addAnimal) { //Figure out in which child(ren) the animal belongs for(int xi = 0; xi < 2; xi++) { if (xi == 0) { if (x - animal->radius() > centerX) { continue; } } else if (x + animal->radiu...
ALGO
0.986781
4.726906
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-02-17T22:26: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": "c55c28ff9...
91d314df-c9fb-42df-8142-ade797e00580
shichaog/WebRTC-audio-processing
webrtc-audio-processing/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
/* * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
ALGO
0.989308
3.42882
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-09-01T11:27:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 398, "forks": 140, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "5d632...
5c91fb20-6539-4362-bc51-308e170b5443
fgindraud/hawkes
src/input.h
#pragma once // File parsing #include <algorithm> #include <cassert> #include <cerrno> // LineByLineReader #include <cstdio> // LineByLineReader io #include <cstdlib> // free #include <memory> // open_file #include <stdexcept> #include <string> #include <system_error> // io errors #include <unordered_map> #include ...
DATA
0.917749
6.516792
{ "github_metadata": { "branch": "master", "commit_count": 230, "repo_created_at": "2019-12-12T19:38:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d46aa13...
b28512a0-d263-48ab-9913-a054f2ae8fff
erekleroinishvili/online-judge
Timus/timus1042.cpp
#include <iostream> #include <vector> #include <cassert> using namespace std; const int N = 250; int main() { int n; cin >> n; vector<vector<bool>> v(n, vector<bool>(n+1)); for (int i = 1; i <= n; ++i) { int x; while (cin >> x && x != -1) v[x-1][i-1] = 1; } for (int i = 0; i < n; ...
ALGO
0.999914
3.841799
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-05-06T12:57:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8258497487...
2a588b35-6ddf-415a-a1f0-179e4e4ad328
kt117/ProCom
atcoder/abc/101-200/171-180/178/d.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; const ll MOD = 1e9+7; const ll INF = 1e18; #define rep(i,m,n) for(ll i = (m); i <= (n); i++) #define zep(i,m,n) for(ll i = (m); i < (n); i++) #define rrep(i,m,n) for(ll i = (m); i >= (n); i--) #define print(x) cout << (x) << end...
ALGO
0.999732
4.291307
{ "github_metadata": { "branch": "master", "commit_count": 280, "repo_created_at": "2020-04-09T05:59:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "de87f0a...
ddaa089c-0c5e-48f3-b14f-a8ceec55ddef
Mudit2003/Coding
DSA/tree.cpp
#include <iostream> #include <string> #include <vector> #include<queue> class Tree { public : struct node { std::string data; struct node *left; struct node *right; node(std::string data) { // pointer reference is used with this in cpp this->data = data; left = NULL; right ...
ALGO
0.999853
4.337001
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-05-02T08:01:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96b3d41ec49f...
5b16359e-1014-48f4-8aae-da0904bb3d59
LucaDantas/CP
Seletiva_IOI/2021/Dia4/pB/s1.cpp
// divide em blocos decrescentes deve dar alguns pontos #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int,int>; #define ff first #define ss second #define pb push_back #define all(a) (a.begin(), a.end()) #define sz(a) (int)(a.size()) constexpr int maxn = 1e6+10; vector<int> pr...
ALGO
0.999951
3.678534
{ "github_metadata": { "branch": "master", "commit_count": 870, "repo_created_at": "2019-11-28T16:12:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c8b2eb8...
97619554-38a7-45ca-a2c5-79f72a39a482
aces/mni_surfreg
tools/surface-distance-transform.cc
/* Copyright <NAME> Professor of Neurology McGill University */ /* Compute distance transform on surface. */ #include <iostream> #include <iterator> #include <stdexcept> #include <ParseArgv.h> #include <CGAL/Simple_cartesian.h> #include <CGAL/double.h> #include <surflib/ShortestPathQuery.hpp> #include <s...
ALGO
0.960419
5.38196
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2018-12-03T20:38:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "348745772a...
cf18b2a4-1617-4478-87dd-7bc7b018a638
TinyRkings/Mapping-IoT-Applications-on-the-Edge-to-Cloud-Continuum-with-a-Filter-Stream-Model
Applications/Traffic_Situation_Management/TSM.cc
#include "TSM.h" #include <fstream> #include <iostream> #include <iomanip> using namespace std; TSM::TSM() { imgFrame1Copy = cv::imread("Reference.jpg", 1 ); cv::VideoCapture capVideo; capVideo.open("HSCCInterstateHighwaySurveillanceSystemTESTVIDEO.mp4"); if (!capVideo.isOpened()) { ...
ALGO
0.959641
3.705664
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-04-20T20:34:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de902e2897c...
d4788633-69c1-4831-bd7b-1f8c08ec8958
diazf/indri
contrib/lemur/src/SHA1.cpp
/*========================================================================== * Copyright (c) 2004-2008 Car<NAME> University and University of * Massachusetts. All Rights Reserved. * * Use of the Lemur Toolkit for Language Modeling and Information Retrieval * is subject to the terms of the software license set for...
TOOL
0.945107
6.149843
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2018-04-08T12:28:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea1ec9e5...
c8f3072a-df05-432f-b117-2be2d34ddbc5
airwindows/airwindows
plugins/LinuxVST/src/ChimeyGuitar/ChimeyGuitarProc.cpp
/* ======================================== * ChimeyGuitar - ChimeyGuitar.h * Copyright (c) airwindows, Airwindows uses the MIT license * ======================================== */ #ifndef __ChimeyGuitar_H #include "ChimeyGuitar.h" #endif void ChimeyGuitar::processReplacing(float **inputs, float **outputs, VstI...
ALGO
0.975861
4.864377
{ "github_metadata": { "branch": "master", "commit_count": 458, "repo_created_at": "2018-01-22T02:05:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 951, "forks": 91, "issues": 31, "pull_requests": 4 }, "file_meta": { "content_id": "bbe5...
0e1cd571-9e8e-4217-b0ec-556e7279368e
qiaozishun4/CSP2024_BJ
BJ-Junior/answers/BJ-J01505/explore/explore.cpp
#include<iostream> using namespace std; char a[1010][1010]; bool f[1010][1010]; int dx[4] = {0,1,0,-1}; int dy[4] = {1,0,-1,0}; int main() { freopen("explore.in","r",stdin); freopen("explore.out","w",stdout); int t; cin >> t; for (int o=1;o<=t;o++) { int n,m,k; cin >> n >> m >> k; ...
ALGO
0.99979
3.624939
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-11-01T16:05: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": "18d5d53d19...
2897213b-37e1-4fcd-b1f2-5e12c9bcaa3d
Chpark/itomp
itomp_cio_planner/src/model/rbdl_model_util.cpp
#include <itomp_cio_planner/model/rbdl_model_util.h> using namespace RigidBodyDynamics; using namespace RigidBodyDynamics::Math; namespace itomp_cio_planner { void updateFullKinematicsAndDynamics(RigidBodyDynamics::Model &model, const RigidBodyDynamics::Math::VectorNd &Q, const RigidBodyDynamics::...
ALGO
0.98103
5.729207
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2014-04-28T03:35:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 11, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "7cbfc0...
2befd542-c913-4540-8cfb-33cad42b692b
pongsaphol/submission
evaluator/o62/may15/mooz_server.cpp
#include "mooz_server.h" #include <bits/stdc++.h> #define pii pair<int, int> #define x first #define y second using namespace std; const int N = 305; vector<int> g[N]; vector<pii> ans; int low[N], pre[N]; void tarjan(int u, int p) { static int idx = 0; low[u] = pre[u] = ++idx; for(int v : g[u]) if(!pre[v]) { t...
ALGO
0.999464
3.803022
{ "github_metadata": { "branch": "master", "commit_count": 287, "repo_created_at": "2018-10-02T16:54:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48d95e74...
fbb8a672-d83b-4add-b77c-3560ffd5b43c
AnonKour/Soccer-Player-Behavior-Development-for-the-RoboCup-Standard-Platform-League
Src/Tools/NeuralNetwork/CompiledNN.cpp
/** * Implements a class that compiles neural networks to optimized X86 machine * code and applies them on input data. * * @author <NAME> */ #include "CompiledNN.h" #include "Model.h" #include "CompiledNN/CompiledNNImpl.h" #include "Tools/Global.h" namespace NeuralNetwork { using namespace asmjit; using name...
TOOL
0.980112
6.636
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-07-08T17:33:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79d456b46cc...
147b4c5c-1536-499e-a18a-3be172ee00f3
a7a7-7/BOJ
백준/Gold/2042. 구간 합 구하기/구간 합 구하기.cc
#include<iostream> #include<vector> #define fastio ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0) using namespace std; using ll = long long; vector<ll> seg; ll n, m, k, base = 1; ll i, j; ll rs(ll l, ll r) { l += base; r += base; ll res = 0; while (r >= l) { if (l % 2 == 1) res +=...
ALGO
0.999968
4.677675
{ "github_metadata": { "branch": "main", "commit_count": 145, "repo_created_at": "2025-03-19T15:36: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": "04299ec904...
43b9740c-d605-41b6-9262-cee888556492
snmath-pi/USACO-OLYMPIAD
UsacoGold/DP/EditDistanceCPH.cpp
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <climits> #include <cmath> #include <complex> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include...
ALGO
0.999992
4.15607
{ "github_metadata": { "branch": "main", "commit_count": 95, "repo_created_at": "2023-01-15T09:53: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": "fde6c4cd7b4...
b1ee38bb-8d07-48bf-b46f-11465b077908
pt13762104/code-archive
vongda.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #ifndef yoshi_likes_e4 #define endl '\n' #endif #define problem "" #define multitest 0 #define debug(x) cerr << #x << " = " << x << endl; void init() { } void Yoshi() { int n; cin >> n; vector<int> R(n); for (auto &i : R) cin >>...
ALGO
0.999984
4.802485
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-16T08:19: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": "98f0d7ace0a5...
313ebc88-45b8-4941-aef2-1e27b56a3d45
rozen03/algo3_2c2016
tp1/punto2/ej2.cpp
#include <cmath> #include <fstream> #include <iostream> #include <list> #include <sstream> // std::ostringstream #include <stdlib.h> #include <string> using namespace std; uint64_t rdtsc() { unsigned int lo, hi; __asm__ __volatile__("rdtsc" : "=a"(lo), "=d"(hi)); return ((uint64_t)hi << 32) | lo; } void imprimir...
ALGO
0.999927
3.846599
{ "github_metadata": { "branch": "master", "commit_count": 493, "repo_created_at": "2016-12-03T02:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74e39590...
f611754f-d122-406e-844f-8be79ab484f1
naveenvashistha/DSA-C-
heaps/kth largest & smallest element/main.cpp
#include <bits/stdc++.h> using namespace std; //orgasmic //time: O(n) for avg and O(n^2) for worst //space: O(1) int quick(vector<int>& nums, int k, int pivot, int length) { int low = pivot + 1; int high = length; while(low <= high) { if(nums[pivot] < nums[low] && nums[pivot] > nums[high]){ ...
ALGO
0.99997
5.059448
{ "github_metadata": { "branch": "main", "commit_count": 366, "repo_created_at": "2024-08-21T10:42: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": "7519751bc0...
6f39ef72-ca56-48a9-8002-aa7d922c0649
Gurpal-saghi-9/CPP-50-Practice-Programs
08. Amstrog number/03_printing_1_to_n.cpp
#include <iostream> #include <cmath> using namespace std; bool isAstrong(int n){ int sum = 0; int original = n; int dig = 0; // counting the number of digits int temp = n; while (temp > 0) { temp /= 10; dig++; } // sum of the power of the digits temp = n; ...
ALGO
0.999849
5.224473
{ "github_metadata": { "branch": "main", "commit_count": 244, "repo_created_at": "2025-01-16T15:25: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": "f6fe80bff7...
6423bac3-08dc-4f23-9aa8-882f70078cad
charu-wadhs16/SUDOKU
sudoku.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int checkforit(int arr[9][9]) { int c=0; for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { if(arr[i][j]==0) { c++; break; } } } return c; } int validInput(int arr[9][9]) { for (int i = 0; i < 9;i++) { for (int...
ALGO
0.9998
4.178314
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-01-13T09:51:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a5d8b5603b1...
a7bdcd2b-d490-4995-9980-5ae2ecb5c8a6
Pratik333-droid/trivial-projects
dsa-labs/Sorting Algorithm/radix_sort.cpp
// A program to demonstrate the implementation of radix sort #include <iostream> #include <cmath> #define garbage -11111 using namespace std; const int arr_size = 10; void displayArray(int num[]) { for (int i = 0; i<arr_size; i++) cout <<num[i]<<", "; cout <<endl; } int returnMaxDigit(int arr[]) { i...
ALGO
0.999967
5.113444
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-18T08:28: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": "ef7649dc10e3...
5a40a917-44c3-48df-b49c-61e5a23fea27
YashasviDagar/DSA-
Binary Search/lo_hi_bound.cpp
#include <bits/stdc++.h> using namespace std; int lower_bound(vector<int>& arr,int target){ int n= arr.size(); int low=0, high=n-1; int index=n; while(low<=high){ int mid=(low+high)/2; //O(log2(N)) //maybe or maybe not the answer! if(arr[mid]>=target){ high=mid-1; ...
ALGO
0.999939
5.100576
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2025-07-08T13:59: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": "c55f95b347c...
d89dc2c5-fc21-408e-b056-3d4176714778
mloskot/concrtextras
ConcRT_SamplePack/Samples/ExcelDemo/ConcRTDemoAddin/Portfolio.cpp
/*** * ==++== * * Copyright (c) Microsoft Corporation. All rights reserved. * * ==--== * =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ * * Protfolio.cpp * * Contains the Excel add-in part of the Constrained Stock Protfolio determination using Different...
ALGO
0.970081
5.40435
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-03-05T11:09:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94d6388a9...
f2b12f38-d89b-45bf-adf2-9789423a4fa5
CodecoolGlobal/cpp-magic-ascii-art-cpp-nionys
cpp-magic-ascii-art-starter-main/src/pipeline/AsciiArtifier.cpp
#include "AsciiArtifier.h" #include <cmath> #include <fstream> #include <sstream> #include "PixelArray.h" std::string AsciiArtifier::asciiArtify(const PixelArray<double> &array, unsigned int targetVerticalResolution, unsigned int targetHorizontalResolution) { std::stringstr...
TOOL
0.967858
5.56473
{ "github_metadata": { "branch": "development", "commit_count": 33, "repo_created_at": "2025-01-13T09:40:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4fce...
e7d3b355-61d3-4044-a151-55fe6fa13dff
TinyProbe/nvim-config
lua/abbrevs/cpp/isprime.cpp
bool isprime(long long n) { static constexpr long long bases[] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, }; static constexpr auto modMult = [](long long lhs, long long rhs, long long m) { return (long long)((__int128)lhs * rhs % m); }; static constexpr auto modPow = [](long lon...
ALGO
0.999536
4.550533
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2025-05-10T11:54: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": "867c8aed73a...
35913fc3-27de-4bb6-b604-3576114e30c8
PaddlePaddle/Paddle
paddle/cinn/adt/equation_solver.h
// Copyright (c) 2023 PaddlePaddle Authors. 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...
ALGO
0.999013
6.922987
{ "github_metadata": { "branch": "develop", "commit_count": 54743, "repo_created_at": "2016-08-15T06:59:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23037, "forks": 5770, "issues": 1009, "pull_requests": 823 }, "file_meta": { "content_...