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
edd6fcc3-0665-443a-9afc-dfacb3e25562
Jaivik-Jariwala/Memory-LineMaze_Solver
Motor_calibration.ino
// Motor A int motorPin1 = 2; // Motor 1, Input A int motorPin2 = 3; // Motor 1, Input B // Motor B int motorPin3 = 4; // Motor 2, Input A int motorPin4 = 5; // Motor 2, Input B void setup() { // Define motor control pins as outputs pinMode(motorPin1, OUTPUT); pinMode(motorPin2, OUTPUT); pinMode(motorPin3, OU...
ALGO
0.948554
5.864609
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-10-06T07:50:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6ad0559758...
8cb1be70-8ca3-43b1-b46a-7f41e5c5b054
LeeJin0527/algorithm
SW-Expert/dfs.cpp
#include<iostream> #include<cstring> using namespace std; int arr[1001]; bool visit[1001]; int Count = 0; //방문했을때의 배열 만들기 //처음에 bool false로 모두 초기화 //그전에 방문했으면 방문처리 하고 방문 안함 //그전에 방문 안했으면 방문처리 하고 dfs void dfs(int index,int sta ) { visit[index] = true; if (arr[index] == sta) { Count++; return; } index = ...
ALGO
0.999837
3.484454
{ "github_metadata": { "branch": "master", "commit_count": 589, "repo_created_at": "2020-09-14T03:10:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d90af24...
93ae63f8-750a-4be7-b1d3-e9378cda65fe
yuhyao/Contest-Library
graph/costflow-primal-dual.cpp
/** * Author: <NAME> * Date: 23-10-04 * Description: Successive Shortest Path for flow graph $G = (V, E)$. * Usage: Always run $mincostflow(src, sink)$ for some $src$ and $sink$ to get the minimum cost and the maximum flow. * Time: Unknown. * Status: tested on https://codeforces.com/gym/102759/problem/F. */ temp...
ALGO
0.999945
4.525954
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2021-07-06T12:01:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c34af38a71...
b266c21f-ab93-4f49-a7c0-53dd357b88f9
rohandarandale1144/GFG_to_GitHub
Difficulty: Easy/Anagram/anagram.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function is to check whether two strings are anagram of each other or not. bool isAnagram(string a, string b){ // Your code here sort(a.begin(), a.end()); ...
ALGO
0.999719
6.641882
{ "github_metadata": { "branch": "main", "commit_count": 1116, "repo_created_at": "2023-02-11T08:44: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": "4956e348a...
43115167-fb5d-4872-bd0c-a63d8805d374
JasonAJordan/studying
hunter/135/lab 5/numbers.cpp
/* Author: <NAME> Course: CSCI-135 Instructor: <NAME> Assignment: Lab 5 Write a program numbers.cpp that defines a function bool isDivisibleBy(int n, int d); isDivisibleBy(100, 25) == true isDivisibleBy(35, 17) == false In the same program numbers.cpp, add a function bool isPrime(int n); */ #include <iostream> usi...
ALGO
0.998863
5.271845
{ "github_metadata": { "branch": "main", "commit_count": 241, "repo_created_at": "2021-03-17T21:15: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": "5d7723a1be...
a19cecba-a3ab-41b2-bf3d-c39b42d99984
sekine-rikuto/AtCoder
ABC185/B.cpp
#include <bits/stdc++.h> //#include <atcoder/all> typedef long long ll; using namespace std; //using namespace atcoder; #define _overload(_1, _2, _3, name, ...) name #define _rep(i, n) for(ll i = 0; i < (ll)n; i++) #define _reps(i, s, n) for(ll i = (ll)(s); i < (ll)n; i++) #define REP(...) _overload(__VA_ARGS__, _rep...
ALGO
0.999994
3.950627
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2020-08-25T10:44: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": "ffed2757f...
4449a365-467c-432b-bd65-dadbecc55720
lifev/lifev
lifev/eta/tutorials/3_ETA_rhs_and_value/main.cpp
//@HEADER /* ******************************************************************************* Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University This file is part of LifeV. LifeV is free software; you can redistribute it a...
ALGO
0.991993
5.554908
{ "github_metadata": { "branch": "master", "commit_count": 12133, "repo_created_at": "2012-11-06T15:58:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36, "forks": 30, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3bd53...
193104e4-4548-4610-a0cd-4400493cb477
Tasiaka/CPP_School_21
Containers/s21_multiset/s21_multiset.h
#ifndef S21_MULTISET_H #define S21_MULTISET_H #include <utility> #include "../s21_set/s21_set.h" namespace s21 { template <typename Key> class multiset : public set<Key> { public: using value_type = Key; using reference = value_type&; using const_reference = const value_type&; using avltree = typename set<...
TOOL
0.967351
6.835455
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-10-24T18:10:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "7560179d9f68...
7a0b3fb6-07de-41e3-a947-6776e7524913
walmartlabs/small-world-graph
c/wikipedia/wikipedia_neighbor_set_impl.cpp
#include "wikipedia_neighbor_set_impl.h" #include "benchmark.h" #include <algorithm> #include <vector> #include <fstream> #include <iostream> #include <valgrind/callgrind.h> #include <assert.h> using namespace std; //static bool compare_distances(relationship_t& first, relationship_t& second); static inline void add_...
ALGO
0.958331
4.501626
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2012-02-16T18:36:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15f25bf5cad...
2f0e3d71-7725-4aab-9df6-0c8082dfa9c4
Mahi-Anol/Compatetive_Coding
Codeforces/1725_B.cpp
#include<iostream> #include<cmath> using namespace std; #define pr(x) cout<<x<<endl; #define pr1(ar,x) for(int i=0;i<x;i++)cout<<ar[i]<<" \n"[i==x-1]; #define pr2(ar,x,y) for(int i=x;i<y;i++)cout<<ar[i]<<" \n"[i==y-1]; void s_test(); void FIO(); int t=1; void merge(int arr[],int st,int end) { int mid=st+(end-st...
ALGO
0.999973
3.558792
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-04-22T11:39:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34ca2bb6822...
e03ad026-e07a-48b0-abc3-92d7470339ec
tuyentran2222/TTUD
Trainning3/ProT_nQueen.cpp
#include <bits/stdc++.h> using namespace std; #define MAX_N 12 int N,M; int visited[MAX_N+1][MAX_N+1]; int dem=0; bool check(int v,int k){ int i,j; if (visited[v][k]==1) return false; //hang ngang for (i=k;i>=1;i--){ if (visited[v][i]==2) return false; } for (i=v,j=k;i>=1,j>=1;i--,j--){ ...
ALGO
0.999971
3.397867
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-04-16T05:52: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": "0001850090...
aab546fb-dc17-4afe-b7f6-8d818944bfd7
naumazeredo/competitive-programming
uva/12911.cpp
#include <bits/stdc++.h> using namespace std; #define st first #define nd second #define mp make_pair #define pb push_back #define cl(x, v) memset((x), (v), sizeof(x)) #define db(x) cerr << #x << " == " << x << endl #define dbs(x) cerr << x << endl #define _ << ", " << typedef long long ll; typedef long double ld; ...
ALGO
0.999982
3.743265
{ "github_metadata": { "branch": "master", "commit_count": 274, "repo_created_at": "2015-02-16T14:25:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "baf1b40...
41e2448b-6054-4830-8ff6-6973295083d2
samiulalimsaad/Phitron
2nd Semester/Algorithm/Extra Practice/bfs.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; vector<int> arr[N]; int dis[N]; bool visited[N]; void bfs(int s) { queue<int> q; q.push(s); visited[s] = true; dis[s] = 0; while (!q.empty()) { int parent = q.front(); q.pop(); cout << "Parent => " << pa...
ALGO
0.999901
4.607184
{ "github_metadata": { "branch": "main", "commit_count": 118, "repo_created_at": "2023-03-31T21:49: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": "47025130d0...
56f98286-086a-49fd-92d9-528e359cf5b3
s-shamil/DS-and-Algo-Implementation
BinarySearchTree.cpp
#include<stdio.h> #include<stdlib.h> #define FALSE_VALUE 0 #define TRUE_VALUE 1 struct treeNode { int item; struct treeNode * left; //points to left child struct treeNode * right; //points to right child }; struct treeNode * root; void initializeTree() { root = 0; } struct treeNode * searchItem(s...
ALGO
0.999956
3.673805
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-12-27T19:39: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": "7fb8a67c9864...
1332a9fb-03e5-4c46-8174-3c0d9171c013
DooDoo3804/Study
coding_test/c++/Programmers/LV3_43162_네트워크.cpp
#include <iostream> #include <string> #include <vector> using namespace std; int parents[201] = { 0 }; int find_parent(int a) { if (parents[a] == a) return parents[a]; return parents[a] = find_parent(parents[a]); } void make_parent(int a, int b) { a = find_parent(a); b = find_parent(b); if (a ==...
ALGO
0.999884
4.886676
{ "github_metadata": { "branch": "master", "commit_count": 575, "repo_created_at": "2022-07-21T00:38: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": "c2303cab...
7698abd4-2369-497b-88c8-e86254c90d69
OscarMendoza99/MultiplicacionMatrices-ClasicaVSBloques
Clasica VS Bloques.cpp
#include <iostream> #include <vector> #include <chrono> #define SIZE 600 using namespace std; std::chrono::time_point<std::chrono::high_resolution_clock> inicio, fin; int64_t duracion; vector<vector<int> > A(SIZE,vector<int>(SIZE,0)); vector<vector<int> > B(SIZE,vector<int>(SIZE,0)); vector<vector<int> > C(SIZE,vec...
ALGO
0.995611
4.343897
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-03-30T22:21: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": "035a6036af...
5f9bb670-82ec-4a4f-89f7-23c83208ac85
dani3l8200/AVL
src/AVL.cpp
#include "AVL.h" #include <string> #include <cstring> #include<stdio.h> #include <stdlib.h> #include <iostream> #include <fstream> using namespace std; AVL::AVL() { root = NULL; } NodeAVL * AVL::getRoot(){ return root; } NodeAVL* AVL::newNode(Persona * key) { NodeAVL * a = new NodeAVL; a->key = key; a...
ALGO
0.998594
3.726912
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-06-13T05:32: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": "6648f7c9ac...
bec94689-ac31-4bf7-bb89-4393c74a58c2
acil-bwh/ChestImagingPlatform
Utilities/LesionSizingToolkit/itkVesselEnhancingDiffusion3DImageFilter.h
/*========================================================================= Program: Insight Segmentation & Registration Toolkit Module: itkVesselEnhancingDiffusion3DImageFilter.h Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) Insight Software Consortium. All rights reserved. ...
ALGO
0.946736
7.338104
{ "github_metadata": { "branch": "master", "commit_count": 2341, "repo_created_at": "2015-01-06T10:43:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 58, "forks": 35, "issues": 23, "pull_requests": 0 }, "file_meta": { "content_id": "53c6...
1a6c4570-2d41-4294-955a-dc083a4bb262
PinJhih/nonogram-perf
src/puzzle/board.cc
#include "puzzle/board.h" #include <algorithm> #include <array> #include <cstdio> #include <cstring> using namespace std; short hashIndex(int i, int j) { return i * 100 + j; } void toIndex(short p, int& i, int& j) { i = p / 100, j = p % 100; } Board::Board() { state = INCOMPLETE; for (int i = 0; i < BOARD_SIZE...
ALGO
0.992648
4.578224
{ "github_metadata": { "branch": "perf", "commit_count": 27, "repo_created_at": "2023-10-30T08:11:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00b5a394616...
e7cafe82-a8ec-4f97-a013-33cf459a6c7f
zhbngchen/USACO_wsl
usaco/cpp/2021_feb_contest/weird_algorithm.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vl; typedef vector<vl> vvl; typedef vector<bool> vb; typedef unordered_set<int> si; ty...
ALGO
0.999993
4.148458
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-10-01T13:00: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": "aa5ca07dd1...
7c63cb89-53c7-4758-b4bf-05d5aeff6cf4
Unengine/BOJPlusPlus
BOJ/BOJ1260.cpp
#include<iostream> #include<queue> using namespace std; int n, m, v; bool** GraphMatrix; bool* isVisited; void init() { for (int i = 1; i <= n; ++i) { for (int j = 1; j <= n; ++j) { GraphMatrix[i][j] = false; } isVisited[i] = false; } for (int i = 0; i < m; ++i) { int link1, link2; cin >> link1 ...
ALGO
0.999992
3.926979
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-10-13T06:20: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": "5e6bd7718b...
cbe98193-3d62-42ab-a090-4cc14d5fa16b
Kitware/VTK-m
vtkm/filter/scalar_topology/worklet/contourtree_distributed/hierarchical_augmenter/IsAttachementPointNeededPredicate.h
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURP...
ALGO
0.943972
6.066177
{ "github_metadata": { "branch": "master", "commit_count": 11681, "repo_created_at": "2019-06-03T18:26:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aba8a...
60744a5e-973b-4b25-8cd3-0c47506dcbb5
albertsegura/ammm-metaheuristic
brkga/src/myDecoder.h
/* * myDecoder.h * * Any decoder must have the format below, i.e., implement the method decode(std::vector< double >&) * returning a double corresponding to the fitness of that vector. If parallel decoding is to be * used in the BRKGA framework, then the decode() method _must_ be thread-safe; the best way to * gu...
ALGO
0.995523
3.419481
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2014-12-03T08:37:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5407a809e...
efe85a4b-9839-4005-bc5f-e2e3afbc10bf
StevensDeptECE/CPE593
old/session13/GraphMatrix2019S.cc
#include <cmath> #include <iostream> #include <fstream> #include <limits> #include <stack> using namespace std; constexpr double inf = std::numeric_limits<double>::infinity(); class MatrixGraph { private: int V; double* w; public: MatrixGraph(int V) : V(V) { w = new double[V*V]; for (int i = 0; i < V*V; i++) ...
ALGO
0.999848
4.306761
{ "github_metadata": { "branch": "master", "commit_count": 238, "repo_created_at": "2017-09-05T19:22:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 62, "forks": 57, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "3d7d4e2...
c034c072-2ea5-443f-b681-4a4819fb8421
kwdx/LeetCode-Practise
Cpp/1460.通过翻转子数组使两个数组相等.cpp
/* * @lc app=leetcode.cn id=1460 lang=cpp * * [1460] 通过翻转子数组使两个数组相等 */ #include <iostream> #include <vector> #include <unordered_map> using namespace std; // @lc code=start class Solution { public: bool canBeEqual(vector<int>& target, vector<int>& arr) { if (target.size() != arr.size()) return false;...
ALGO
0.999875
6.014127
{ "github_metadata": { "branch": "master", "commit_count": 379, "repo_created_at": "2019-11-29T10:20:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79c56068...
1c1f4986-4e85-4627-89fd-25304224c957
202030481266/CP-Templates-and-Solutions
Plus题目/medium/数组是否表达为二叉树的前序遍历.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pii> vpii; #define pb push_back #define mp make_pair #define fi first #define se second #define all(x) (x).begin(), (x).end() #...
ALGO
0.999973
5.34592
{ "github_metadata": { "branch": "main", "commit_count": 606, "repo_created_at": "2023-01-27T08:36: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": "e37867296e...
5f7efc46-85b2-4e6a-bf71-5ca79e2de85d
kirankuyate2157/cpp_programs
.vscode/IPadress.cpp
#include <bits/stdc++.h> #include<string> using namespace std; #define input freopen("input.text","r",stdin),freopen("output.text",'w',stdout) #define fast ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0) bool isValidIP(string s) { if (s.length() > 3) { return false; } if (s.front() == '0...
ALGO
0.998992
3.754006
{ "github_metadata": { "branch": "main", "commit_count": 171, "repo_created_at": "2022-01-03T14:01:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e57d06beae...
ff319858-79f2-46cf-b3d0-305ffdc0ced3
twareproj/tware
src/frontend/ml/SortWriter.h
#ifndef SORT_WRITER_H #define SORT_WRITER_H #include <cstdint> #include <cstring> #include <fstream> #include <functional> #include <set> #include <vector> #include "job/Task.h" #include "net/Socket.h" #include "util/Logging.h" using std::function; using std::multiset; using std::vector; namespace tupleware { class...
ALGO
0.980109
6.156594
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-09-15T04:04:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3810d2aa1...
4b2ace32-6f87-4f78-83af-e06370315a9a
WMXNLFD/Algorithm
LeetCode_cpp/148SortList.cpp
#include <iostream> #include <vector> #include <set> #include <list> struct ListNode { int val; //数据域 ListNode *next; //指针域 ListNode(int x) : val(x), next(NULL) {} //构造函数 }; class Solution { public: ListNode* sortList(ListNode* head) { return head == NULL ? NULL :mergeSort(head); } ...
ALGO
0.999985
5.262763
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-03-02T02:13: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": "557843dded...
73cb275f-5e75-41fa-ab22-6134ffb648b6
utoppia/leetcode
DynamicProgramming/416-partition-equal-subset-sum.cpp
/****************************************** * author : utoppia * description : solution for leetcode * updated at : 2024-01-13 01:53:38 * filename : 416-partition-equal-subset-sum.cpp * language : cpp * editor : Emacs 27.1 *****************************************/ #include <algorithm> #include ...
ALGO
0.999874
5.661736
{ "github_metadata": { "branch": "main", "commit_count": 271, "repo_created_at": "2021-08-26T12:21: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": "00037862f7...
5a7acfdf-7dca-4f56-a878-8118468dd3cb
AIFM-sys/AIFM
shenango/apps/parsec/pkgs/tools/cmake/src/Source/cmComputeTargetDepends.cxx
/*========================================================================= Program: CMake - Cross-Platform Makefile Generator Module: $RCSfile: cmComputeTargetDepends.cxx,v $ Language: C++ Date: $Date: 2012/03/29 17:21:07 $ Version: $Revision: 1.1.1.1 $ Copyright (c) 2002 Kitware, Inc., Insi...
ALGO
0.972563
6.687982
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-10-12T02:03:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 122, "forks": 37, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "2c621a3...
e36ea09f-ef65-48ff-804a-6e961bacd971
marlam/path-tracing
src/11/pathtracer.cpp
#include <vector> #include <limits> #include "math.hpp" #include "ray.hpp" #include "animation.hpp" #include "animation_constant.hpp" #include "camera.hpp" #include "prng.hpp" #include "sampler.hpp" #include "surface_sphere.hpp" #include "surface_triangle.hpp" #include "material_twosided.hpp" #include "material_lamber...
ALGO
0.994572
6.286643
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-09-15T06:40:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c06e17e55158...
6572f2f3-9ce4-4f97-9667-84645b56fe06
cyp0922/Algorithm-Code
마법사 상어와 블리자드_ 211611번.cpp
// 1시간 45분 #include<iostream> #include<queue> #include<vector> #include<algorithm> #include<cstring> using namespace std; int N, M; int arr[50][50]; int commend[2]; int dx[] = { 0,0,-1,1 }; int dy[] = { -1,1,0,0 }; int turn[] = { 2,1,3,0 }; int score = 0; struct ss { int num; int y; int x; }; void attack() { i...
ALGO
0.999929
4.475688
{ "github_metadata": { "branch": "master", "commit_count": 308, "repo_created_at": "2020-08-10T07:45: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": "1fca48b2...
412e0eec-b44f-4730-a787-fa45cb4bd815
bkalchv/fmi-up
Homework1/homework1-task1-WOS.cpp
// Дадена е декартова координатна система. Всеки правоъгълник със страни успоредни на координатните оси в нея // може да се определи с четири числа с плаваща точка: координатите на долния си ляв ъгъл (x, y), ширината и дължината си. // Напише програма, която прочита от стандартния вход данни за два правоъгълника и изв...
ALGO
0.99795
4.37519
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2020-12-15T12: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": "13fcc2f5531...
30bb6d66-be57-4e34-896e-a757efeedb5b
PriyanshK09/combinatorial-class
findPeakElement.cpp
#include <iostream> #include <vector> using namespace std; // Leetcode Solution (Time Limit Exceeded) int findPeakElement(vector<int>& nums) { int n = nums.size(); int left = 0, right = n - 1; while (left < right) { int mid = left + (right - left) / 2; if (nums[mid] < nums[mid + 1]) { ...
ALGO
0.999988
6.08006
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-02-21T05:12:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "baebe0f5fb5...
0a479ea3-3ace-4940-86c3-5126f0cd4541
UniStuttgart-VISUS/megamol
plugins/imageseries/src/util/LRUCache.h
/** * MegaMol * Copyright (c) 2022, MegaMol Dev Team * All rights reserved. */ #pragma once #include <algorithm> #include <functional> #include <memory> #include <stdexcept> #include <unordered_map> #include <utility> #include <vector> namespace megamol::ImageSeries::util { template<typename Key, typename Value...
TOOL
0.984125
6.920067
{ "github_metadata": { "branch": "master", "commit_count": 15745, "repo_created_at": "2017-06-16T08:56:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 56, "forks": 37, "issues": 40, "pull_requests": 30 }, "file_meta": { "content_id": "db1...
ff585a36-648e-457d-a3d0-4f4c501fa9de
gaoxiang12/slambook
ch7/feature_extraction.cpp
#include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/highgui/highgui.hpp> using namespace std; using namespace cv; int main ( int argc, char** argv ) { if ( argc != 3 ) { cout<<"usage: feature_extraction img1 img2"<<endl; return 1;...
ALGO
0.988075
4.875572
{ "github_metadata": { "branch": "master", "commit_count": 147, "repo_created_at": "2016-06-27T06:19:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7186, "forks": 3302, "issues": 193, "pull_requests": 11 }, "file_meta": { "content_id": ...
bdd7395b-9d3c-4a51-84fa-41134fc69390
Shaalekh/logicdash
MEMORY/MEMORY.ino
#include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_ST7735.h> // Hardware-specific library for ST7735 #include <SPI.h> // Pin Definitions #define TFT_CS 17 // Chip select #define TFT_RST 16 // Reset #define TFT_DC 15 // Data/Command #define ROT_A 14 // Rotary Encoder Pin A #define R...
ALGO
0.981445
5.907434
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-12-15T10:14: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": "a4fc5002122...
afb9043c-b21c-4f20-b171-adba7ec183f4
Kimayak/Leetcode
Medium/Group Anagrams.cpp
// Given an array of strings strs, group the anagrams together. You can return the answer in any order. // An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. // Example 1: // Input: strs = ["eat","tea","tan","ate"...
ALGO
0.999986
6.56204
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2023-10-10T00:47: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": "b37e069b439...
c0b4de2e-9f1e-483d-8cba-2ac0218d1c02
sskhi1/MACS
Programming Abstractions - cs106b/ass2/WordLadder.cpp
/* * File: WordLadder.cpp * -------------------------- * Name: [TODO: enter name here] * Section: [TODO: enter section leader here] * This file is the starter project for the Word Ladder problem. * [TODO: rewrite the documentation] */ #include <iostream> #include "console.h" #include "simpio.h" #include "queue....
ALGO
0.999241
4.414863
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-08-06T16:26: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": "39b14378007...
a443d655-3b01-4ee4-998b-3575a251d9d8
alifalhasan/CP-code-vault
Codeforces/Codeforces Round/Codeforces Round 766 (Div. 2)/A - Not Shading/142915986.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/tree_policy.hpp> #include<ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define ll long long template<typename temp>using ordered_set = tree<temp, null_type, less<temp>, rb_tree_tag,tree_order_statistics_node_update>; //order_of_key(k) : Numb...
ALGO
0.999779
3.803783
{ "github_metadata": { "branch": "main", "commit_count": 5924, "repo_created_at": "2023-06-06T13:32:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "083f1d0e5...
4c915132-3883-466b-b6ec-1bbc43f5e5af
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/05/0527/personal_submission/cf835d_yakultgo.cpp
#include <bits/stdc++.h> #define endl '\n' using namespace std; typedef long long ll; void solve() { string s; cin >> s; int n = s.size(); vector<vector<int>> dp(n, vector<int>(n)); for (int i = 0; i < n; i++) dp[i][i] = 1; for (int len = 2; len <= n; len++) { for (int i = 0; i ...
ALGO
0.999893
3.695779
{ "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": "9f5b...
b5ced789-2bae-47bc-86d3-0c030950fce6
WeikangChen/algorithm
lintcode/64_merge-sorted-array/merge-sorted-array.cpp
/* @Copyright:LintCode @Author: chenweikang @Problem: http://www.lintcode.com/problem/merge-sorted-array @Language: C++ @Datetime: 16-04-24 18:33 */ class Solution { public: /** * @param A: sorted integer array A which has m elements, * but size of A is m+n * @param B: sorted integer a...
ALGO
0.999931
5.339972
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2016-05-12T03:25: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": "97b845c97...
ce035baf-1a4b-459a-8cdf-a8ff1f546ba6
alexandraback/datacollection
solutions_2449486_1/C++/alikhtarov/b.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n, C = 1; cin >> n; int nr, nc; while (n-- && cin >> nr >> nc) { vector<vector<int>> B(nr, vector<int>(nc)); for (int i = 0; i < nr; ++i) for (int j = 0; j < nc; ++j) cin >> B[i][j]; vector<int> MR(nr, 0), MC(nc, 0)...
ALGO
0.999908
4.351847
{ "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": "0faafb26a...
a335a61c-c262-4f23-9622-8bd437ac1d49
zhenfelix/OnlineJudgeCodings
kickstart/2020-E/C-Toys.cpp
// https://codeforces.com/blog/entry/81821 // #include <bits/stdc++.h> #include <vector> #include <algorithm> #include <climits> #include <iostream> #include <unordered_map> #include <cstring> #include <queue> using namespace std; using ll = long long; using pii = pair<int, int>; const int inf = 0x3f3f3f3f; const in...
ALGO
0.999958
3.661578
{ "github_metadata": { "branch": "master", "commit_count": 152, "repo_created_at": "2019-01-18T05:00: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": "cbf092ba...
1f58efe7-2e5f-4a2c-8cf3-9f975bf61706
jindalshivam09/cppcodes
ACM/CodeChef/TMSLT.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef list<int> li; typedef vector<int> vi; typedef vector<double> vd; typedef vector<long long> vll; typedef vector<bool> vb; typedef pair<int,int> pii; typedef vector<pair<int,int> > vpii; typedef pair<double,double> pdd; typedef vector<p...
ALGO
0.99973
3.842705
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-08-21T11:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63c8ee2929...
ac6584f7-3a45-424b-bcd6-38650eb09965
Kathleen7474/-leetcode
42TrappingRainWater.cpp
class Solution { public: int trap(vector<int>& height) { int pool = 0; // height, idx stack<pair<int, int>> prev; int start = 0; while(start<height.size()&&height[start]==0){ start++; } if (start==height.size()) return pool; ...
ALGO
0.999985
6.018389
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2023-03-18T14:12: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": "6998b12a01...
4d09344a-8be3-44da-9c21-abf82be8f45f
nubianaliatti/Grafos_2023.3
grafo.cpp
#include <iostream> #include<vector> #include <limits> #include "Grafo.h" using namespace std; #define INFINITO std::numeric_limits<int>::max() Grafo::Grafo(int ordem, int orientado) //construtor { this->ordem = ordem; this->orientado = orientado; num_arestas = 0; vertices = n...
ALGO
0.999379
4.199935
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-11-29T13:36: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": "41cef1711480...
1465a0dd-fb8e-468c-b68a-71d6e3fe0db0
DominikHorn/hashing-benchmark
include/probe.hpp
#pragma once #include <immintrin.h> #include <algorithm> #include <array> #include <cstddef> #include <iterator> #include <learned_hashing.hpp> #include <limits> #include <string> #include <utility> #include "include/convenience/builtins.hpp" #include "include/support.hpp" namespace masters_thesis { template <class...
ALGO
0.96348
5.84769
{ "github_metadata": { "branch": "main", "commit_count": 328, "repo_created_at": "2021-08-02T16:22:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "174c04543...
8d96be37-0623-4f47-adf9-595d89efd488
alfeng/TicTacToe
common/CTicTacToe.cpp
// **************************************************************************** // CTicTacToe class -- contains logic for game AI // **************************************************************************** #include "CTicTacToe.h" // Marker names for printing std::string const CTicTacToe::markerName[] = { " ", "X...
ALGO
0.985623
5.94386
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2018-03-04T17:37: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": "669512f21...
040f8aab-060a-4132-bdaf-68311dfca38e
MohamedSamehMohamed/Competitive-Programming
SPOJ/RMQSQ/29025980_AC_60ms_5120kB.cpp
// Author : <NAME> #include <bits/stdc++.h> using namespace std ; const int N = 1 << 17; int a[N], seg[N<<1], n, q; void build(int node = 0, int l = 0, int r = n-1) { if (l == r) { seg[node] = a[l]; return; } int m = (l+r) >> 1; int n1 = node * 2 + 1; int n2 = n1 + 1; build(n1, l, m); build(n2, ...
ALGO
0.999991
5.131139
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2021-02-12T14:21:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0adf2bcfb5d...
51187341-e9a6-4635-a7b6-9dd39d9c1811
Hou-Xiaoxuan/AlgorithmCompetition
algorithm_prictice/Clasical/DP/Cow Exhibition.cpp
#include<bits/stdc++.h> using namespace std; const int N=100000; /*WA,完全不明白为什么,不就是01背包吗?为什么二维就不行? const int inf=0x3f3f3f3f; int f[100][N*2+5];//Si is i, the max of Fi int main() { int n;cin>>n; for(int i=0;i<=n;i++) for(int j=0;j<=N*2;j++) f[i][j]=-inf; for(int i=0;i<=n;i++) f[i][N]=0; ...
ALGO
0.999916
3.673205
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2022-03-08T08:59:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ad0bb8fa...
a7bb6d6b-2192-44bb-9671-8d4dab10a80b
NVIDIA/thrust
thrust/unique.h
/* * Copyright 2008-2013 NVIDIA Corporation * * 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...
ALGO
0.997266
4.309956
{ "github_metadata": { "branch": "main", "commit_count": 4758, "repo_created_at": "2012-03-06T01:01:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4980, "forks": 764, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "08ef8...
6cbb2d5a-8b0a-4b35-b78f-1e591334cbcd
PrashantAmoli/LeetCode
1239-maximum-length-of-a-concatenated-string-with-unique-characters/1239-maximum-length-of-a-concatenated-string-with-unique-characters.cpp
class Solution { public: int ans = 0; void solve(int i, string &s, vector<string>& arr, vector<int>& used){ if(i == arr.size()) return; bool unique = true; int size = arr[i].size(); // Take if(size + s.size() <= 26){ for(auto &c: arr[i]){ ...
ALGO
0.999986
5.334732
{ "github_metadata": { "branch": "main", "commit_count": 190, "repo_created_at": "2022-10-09T15:22: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": "ea1920de54...
71c5daec-696a-4088-a51f-bf82d1719f75
opengauss-mirror/openGauss-server
src/gausskernel/cbb/instruments/utils/list.cpp
/* * Copyright (c) 2020 Huawei Technologies Co.,Ltd. * * openGauss is licensed under Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2. * You may obtain a copy of Mulan PSL v2 at: * * http://license.coscl.org.cn/MulanPSL2 * * THIS SOFTWARE IS PROVIDED ...
TOOL
0.991869
4.823662
{ "github_metadata": { "branch": "master", "commit_count": 4852, "repo_created_at": "2020-06-30T14:08:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 736, "forks": 260, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "6ed9...
e12a0595-67c7-4e69-a81d-ea464c353e98
PrinceCuet77/UVa
Cpp/10959 The Party, Part I.cpp
#include <bits/stdc++.h> using namespace std; #define inf 1000000000 #define sz 1005 vector < int > a[sz], dist(sz); void bfs(int s) { queue < int > q; q.push(s); dist[s] = 0; while ( !q.empty() ) { int u = q.front(); q.pop(); ...
ALGO
0.999766
4.382779
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-01-19T16:34: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": "0298e6cfc...
73185521-9941-4c99-b8b0-9a9d43b07b01
cherrytomato1/C-Algorithm
visual_studio_0001~0054/알고리즘/0023_200425_17087_숨바꼭질.cpp
/* 1. 수빈이와 동생들 사이의 거리에서 최대 공약수를 구하는 문제 2. 수빈이의 좌표와 동생 좌표로 수빈이와 동생들의 자연수 거리를 구함 3. 모든 동생들의 거리의 최대공약수를 구함 ( 유클리드 호제법) */ #include<iostream> #include<vector> #include<algorithm> #include<cstdlib> using namespace std; int getGCD(int a, int b) //유클리드 호제법 재귀형식 { if (b == 0) //최대 공약수 (나누어 떨어짐)을 구하면 리턴 ...
ALGO
0.999575
3.669146
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2019-10-06T18:07: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": "f7b51e44...
46caf23f-d70d-438e-a8d6-dc08cda8fac9
maicoltascon/ejerciciosc-
pilasYcolas/numCelular.cpp
#include <iostream> #include <stack> #include <queue> void mostrarNumeros(const std::stack<int>& numeros) { std::stack<int> numerosCopia = numeros; std::cout << "Números de celular ingresados:" << std::endl; while (!numerosCopia.empty()) { std::cout << numerosCopia.top() << std::endl; numer...
ALGO
0.995621
5.755488
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-11-03T00:10: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": "1cdf6671fa9...
04493ba4-2c1c-47f4-8fdf-f6a6989cbd90
SveedKekich/Academic
cpp/RGR/rgr.cpp
/** * Done by: * Student Name: <NAME> * Student Group: 123 * RGR * variant 21 */ #include <iostream> #include <vector> #include <string> #include <algorithm> using std::cout, std::cin, std::vector, std::string; bool IsValid(const string &input) { vector<char> sequence; bool exclamation = false; std::c...
ALGO
0.998378
3.792011
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-09-16T19:52: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": "fc6243b19fc...
d076b18b-e63b-4c5e-ab00-20cedd34418c
He-Jingkai/cse-lab
mr_worker.cc
#include <iostream> #include <fstream> #include <sstream> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <dirent.h> #include <sys/file.h> #include <mutex> #include <string> #include <vector> #include <map> #include <sys/time.h> #include "rpc.h" #include "mr_protocol.h" us...
DATA
0.928157
4.421594
{ "github_metadata": { "branch": "lab4", "commit_count": 1, "repo_created_at": "2021-10-08T12:06:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be0424f12188...
f341064f-fc54-46d2-8854-e00fed0da4c6
br3ttb/Arduino-PID-Library
PID_v1.cpp
/********************************************************************************************** * Arduino PID Library - Version 1.2.1 * by <NAME> <<EMAIL>> <EMAIL> * * This Library is licensed under the MIT License **********************************************************************************************/ #if...
ALGO
0.929594
6.421022
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2011-12-14T11:52:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2074, "forks": 1125, "issues": 65, "pull_requests": 24 }, "file_meta": { "content_id": "3...
4a00e016-188d-4595-989d-63335560ea6c
you22fy/atcoder
ABC359/c.cpp
#include <iostream> #include <queue> #include <map> #include <utility> using namespace std; typedef pair<long long, long long> Pll; struct Tile { Pll operator()(const Pll &pos) const { if ((pos.first + pos.second) % 2 == 0) { return {pos.first / 2, pos.second}; } e...
ALGO
0.999979
4.616547
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2023-06-25T10:00: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": "daa1f7adf42...
3de078af-3c1a-42c5-b681-931b192765c7
viennamesh/viennamesh-dev
plugins/vgmodeler/external/gsse/gsse02/external/boost/numeric/mtl/mtl_fwd.hpp
// Software License for MTL // // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // All rights reserved. // Authors: <NAME> and <NAME> // // This file is part of the Matrix Template Library // // See also license.m...
TOOL
0.977529
3.769078
{ "github_metadata": { "branch": "master", "commit_count": 1333, "repo_created_at": "2013-07-25T10:54:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 12, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "b28bdd...
2bf5557f-7a4c-4c30-938c-149b4b265807
dvdg6566/CP-solutions
Dunjudge/GT/food.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vi; typedef pair<ll,ll> pi; typedef vector<pi> vpi; typedef double dl; #define mp make_pair #define pb push_back #define f first #define s second #define MOD 1e9+7 #define lb lower_bound #define ub upper_bound #define dst distance #de...
ALGO
0.99996
3.694868
{ "github_metadata": { "branch": "master", "commit_count": 212, "repo_created_at": "2019-01-14T14:51:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c0c2bbf...
5588f28a-0958-4e5a-9cca-c0d2adf87361
SunTianFang/siasun_2dnavigation
MappingNavigation_3.0.4test/src/lib/MapOptimizer/src/MapOptimizer.cpp
#include "stdafx.h" #include <iostream> #include "MapOptimizer.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif unsigned int m_nNextSerialId; /////////////////////////////////////////////////////////////////////////////// // // 当接到一个新的里程信息时进行的处理。 // int CMapOptimi...
ALGO
0.977805
3.638418
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-04-26T07:30: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": "a8ecd74004...
38264bfc-2f1c-4a82-a97a-51d0a42fea82
taotao54321/cpp-procon
attic/test/graph_euler_trail_list/solve.cpp
#include "procon.hpp" #include "graph.hpp" [[noreturn]] void impossible() { PRINTLN("NO"); EXIT(); } signed main() { i64 N = RD(); i64 M = RD(); vector<vector<i64>> G(N); i64 v_any = -1; REP(_, M) { i64 s = RD(); i64 t = RD(); G[s].emplace_back(t); G[t].emp...
ALGO
0.999971
4.674586
{ "github_metadata": { "branch": "master", "commit_count": 741, "repo_created_at": "2019-03-13T15:13: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": "5098578e...
4d15a589-5664-4292-b583-2e464d784d51
hvdieu/mycode
Cpp/ap3.cpp
#include <functional> #include <algorithm> #include <iostream> #include <cstdlib> #include <utility> #include <cstring> #include <numeric> #include <sstream> #include <climits> #include <cstdio> #include <string> #include <vector> #include <bitset> #include <stack> #include <queue> #include <cmath> #include <ctime> #...
ALGO
0.999944
4.615777
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-04-23T16: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": "2f9ada94cb...
e5a1cd3c-172b-4cc1-807c-3438739ccc15
Atharvapalande07/Leetcode
0054-spiral-matrix/0054-spiral-matrix.cpp
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int> result; int row = matrix.size(); int col = matrix[0].size(); int top= 0; int bottom=row-1; int left=0; int right=col-1; /* dir 0 = left To right ...
ALGO
0.999998
6.366726
{ "github_metadata": { "branch": "main", "commit_count": 410, "repo_created_at": "2025-06-06T11:39: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": "73921e19aa...
b649b955-a1c1-4216-9138-42001a7a045d
cusplibrary/cusplibrary
cusp/elementwise.h
/* * Copyright 2008-2014 NVIDIA Corporation * * 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...
TOOL
0.947065
7.489017
{ "github_metadata": { "branch": "main", "commit_count": 1316, "repo_created_at": "2012-08-24T01:13:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 415, "forks": 134, "issues": 33, "pull_requests": 6 }, "file_meta": { "content_id": "4fba1...
c9b68398-7720-474d-b49c-fc93994da1ec
LeulShiferaw/CSES
Counting Towers/main.cpp
#include <bits/stdc++.h> #include <bits/extc++.h> using namespace std; using namespace __gnu_pbds; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i, a, b) for(int i = a; i<b; i++) using indexed_set = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_upda...
ALGO
0.999959
4.576934
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-11-21T09:46: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": "4c17dbaa97c...
9023aefd-6b15-42fa-a0e7-e8ba8e10ae20
52North/IlwisCore
core/geos/src/noding/IteratedNoder.cpp
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2006 Refractions Research Inc. * Copyright (C) 2001-2002 Vivid Solutions Inc. * * This is free software; you can redistribute and/or modify it under * the ter...
ALGO
0.999902
6.707885
{ "github_metadata": { "branch": "master", "commit_count": 6882, "repo_created_at": "2013-05-15T13:19:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36, "forks": 13, "issues": 26, "pull_requests": 0 }, "file_meta": { "content_id": "b1485...
07c0462b-e31d-4dfb-8c0c-1de53bf79bfc
qingfusheng/hello-algorithm
leetcode/2779. 数组的最大美丽值.cpp
// 排序+滑动窗口(双指针) #include <bits/stdc++.h> using namespace std; class Solution { public: int maximumBeauty(vector<int>& nums, int k) { int result = 0, n = nums.size(); sort(nums.begin(), nums.end()); int i=0,j=0; while(i <= j && j < n){ if(nums[j] - nums[i] <= 2 * k){ ...
ALGO
0.99998
5.381556
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2023-09-01T03:03:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c52eb29...
e2b18720-dad8-4b1d-8742-cf01f3162fa9
CAEL0/algorithm
heavy_light_decomposition.cpp
// BOJ 13510 트리와 쿼리 1 #include <bits/stdc++.h> #define sz size() #define bk back() #define fi first #define se second using namespace std; typedef long long ll; typedef pair<int, int> pii; struct SegmentTree { vector<int> tree; SegmentTree(int n) { tree.resize(4 * n); } int init(int idx, int s, int e, ...
ALGO
0.999976
5.110148
{ "github_metadata": { "branch": "main", "commit_count": 928, "repo_created_at": "2021-07-01T05:45:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d82bf4790...
c7016ca4-ddd2-476c-9c9e-171d2a1195bc
smdogroup/tacs
src/bpmat/GSEP.h
/* This file is part of TACS: The Toolkit for the Analysis of Composite Structures, a parallel finite-element code for structural and multidisciplinary design optimization. Copyright (C) 2010 University of Toronto Copyright (C) 2012 University of Michigan Copyright (C) 2014 Georgia Tech Research Corporatio...
ALGO
0.996637
6.306767
{ "github_metadata": { "branch": "master", "commit_count": 1729, "repo_created_at": "2018-02-06T15:05:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 129, "forks": 75, "issues": 16, "pull_requests": 6 }, "file_meta": { "content_id": "1f61...
08758014-420f-4d51-bad9-29543fb13745
kthohr/stats
include/stats_incl/misc/matrix_ops/accu.hpp
/*################################################################################ ## ## Copyright (C) 2011-2023 <NAME> ## ## This file is part of the StatsLib C++ library. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with ...
ALGO
0.972003
6.490631
{ "github_metadata": { "branch": "master", "commit_count": 342, "repo_created_at": "2017-06-21T15:28:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 549, "forks": 75, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "90790...
87c3786f-81f6-4333-a60e-3dc7036f78e5
llllvvuu/meta-hacker-cup-solver
round1_logs/pass@256/Substantial Losses_151.cpp
#include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vecto...
ALGO
0.999894
5.439082
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-09-03T16:52: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": "d15eb0bedda...
46d79fe4-88e1-4a57-8105-c22766cdf33d
tokers/LightOJ
1100-1199/1171.cpp
/************************************************************************* > File Name: LightOJ1171.cpp > Author: ALex > Mail: <EMAIL> > Created Time: 2015年09月07日 星期一 15时43分42秒 ************************************************************************/ #include <iostream> #include <fstream> #include <c...
ALGO
0.999973
3.478103
{ "github_metadata": { "branch": "master", "commit_count": 283, "repo_created_at": "2015-06-02T12:15:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2ac476a...
a9fc7613-8f93-46f6-af49-c47621803a63
sunkyoo/opencv4cvml
vs2019/ch13/cascade/main.cpp
#include "opencv2/opencv.hpp" #include <iostream> using namespace cv; using namespace std; void detect_face(); void detect_eyes(); int main() { detect_face(); detect_eyes(); return 0; } void detect_face() { Mat src = imread("kids.png"); if (src.empty()) { cerr << "Image load failed!" << endl; return; } ...
TOOL
0.92265
5.138548
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-03-17T01:06:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 126, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "d45c5...
b52bf6f0-f643-4050-bec7-c96ff1cf6f6a
chr1shr/voro
examples/no_release/neigh_test.cc
// Voronoi calculation example code // // Author : <NAME> (Harvard University / LBL) // Email : <EMAIL> // Date : April 14th 2013 #include "voro++.hh" using namespace voro; // Set up constants for the container geometry const double x_min=-1,x_max=1; const double y_min=-1,y_max=1; const double z_min=-1,z_max...
ALGO
0.979154
5.827765
{ "github_metadata": { "branch": "master", "commit_count": 445, "repo_created_at": "2019-09-28T18:04:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 186, "forks": 51, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "e91c...
7fd2c7b8-97e7-4162-846a-2f5a39742191
ZongoForSpeed/ProjectEuler
problemes/probleme353.cpp
#include "problemes.h" #include "premiers.h" #include "racine.h" #include "timer.h" #include "multidimension.h" namespace { double distance(const std::tuple<long, long, long> &a, const std::tuple<long, long, long> &b, long r) { // https://en.wikipedia.org/wiki/Great-circle_distance#From_chord_length ...
ALGO
0.998857
3.904201
{ "github_metadata": { "branch": "master", "commit_count": 365, "repo_created_at": "2015-08-04T21:51:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3946785...
79c09647-56bb-4e6e-bcd7-dece01d8aec1
MagdyGeorge1/LeetCode
0787-cheapest-flights-within-k-stops/0787-cheapest-flights-within-k-stops.cpp
class Solution { public: vector<pair<int, int> > g[1000+10]; int dist[10000]; int n; int Dijkstra(int src ,int d , int k ) { for (int i = 0; i <= n; i++) dist[i] = 1e9; // dist[src] = 0; // cost , node , num of cites priority_queue<pair<int...
ALGO
0.9997
4.622813
{ "github_metadata": { "branch": "main", "commit_count": 234, "repo_created_at": "2023-01-13T21:41: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": "5b29f7b7dc...
b1d983d5-2df0-40ad-afb1-53b3598006d6
Prashxnt/FaultSim-A-Memory-Reliability-Simulator
src/BCHRepair_cube.cpp
/* Copyright (c) 2015, Advanced Micro Devices, Inc. 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 conditions and ...
ALGO
0.9769
5.50201
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-08-25T17:39:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63502f7d0c...
1ece6cfa-f9bf-4521-9fc8-fda77de87bfd
Sahil-Badkul/leetcode
695-max-area-of-island/695-max-area-of-island.cpp
class Solution { public: int dfs(vector<vector<int>>& grid, int r, int c, int &area,vector<vector<bool>> &seen){ if(r < 0 || r >= grid.size() || c < 0 || c >= grid[0].size() || seen[r][c] || grid[r][c] == 0) return 0; seen[r][c] = 1; int left = dfs(grid,r-1,c, area, seen); int up = d...
ALGO
0.999841
6.662426
{ "github_metadata": { "branch": "main", "commit_count": 1968, "repo_created_at": "2022-02-17T10:28:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "906eb1d2e...
d6cd4618-cfb3-496d-ab77-1fbe4545adcb
slava-sh/code-plagiarism-detector
data/open-Olive/sources/009917-open-2015-257-Olive.cpp
#define _CRT_SECURE_NO_DEPRECATE #define _USE_MATH_DEFINES #include <vector> #include <string> #include <cstring> #include <algorithm> #include <map> #include <set> #include <iterator> #include <cstdio> #include <memory.h> #include <iostream> #include <cmath> #include <queue> #pragma comment(linker, "/STACK:64000000"...
ALGO
0.999979
3.416752
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2015-04-26T21:39:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59f6c13b...
2b20f0a9-1cdf-4527-9088-b3f768ef11d2
eurekesh/very-fun-and-wholesome-problems
Problem_3.cpp
#include <iostream> #define SUPERDUPER int #define TEN 0 #define ZERO 10 #define ENDL std::cout #define COUT std::endl #define FOR_REAL << #define MINUS + #define EQUALS != #define NOT_EQUALS = #define TWO_HUNDRED 100 #define short long #define unsigned signed int main(){ SUPERDUPER J = ZERO; SUPERDUPER i = TE...
ALGO
0.985858
3.242034
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-12-06T00:58:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a4feed8d75b...
e4b5c1a8-8eba-4e1f-b633-258c910ca02b
andreilaurentiuradu/laburi_PA
lab_1/merge_sort.cpp
// // Created by Laur on 3/18/2024. // #include <iostream> #include <vector> using namespace std; void merge_sort(int st, int dr, vector<int> &v, int n) { if (st < dr) { // cel putin 2 nr de sortat // luam jumatatea int mij = (st + dr) / 2; // divide merge_sort(st, mij, v, n); ...
ALGO
0.999997
6.145338
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-18T21:38: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": "f4ab5c39b1d4...
ec8f0ee8-6ef2-4de8-abb6-1648c97257f1
Farama-Foundation/ViZDoom
src/vizdoom/src/weightedlist.h
/* ** weightedlist.h ** A weighted list template class ** **--------------------------------------------------------------------------- ** Copyright 1998-2006 <NAME> ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the followin...
TOOL
0.927234
4.610305
{ "github_metadata": { "branch": "master", "commit_count": 1911, "repo_created_at": "2015-06-26T18:38:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1862, "forks": 418, "issues": 31, "pull_requests": 2 }, "file_meta": { "content_id": "1a...
9585c245-a874-430c-b1af-da8a47be6c43
ishandutta2007/codeforces-d
danya.smelskiy/normal/6/E.cpp
# include <iostream> # include <cmath> # include <algorithm> # include <stdio.h> # include <cstdint> # include <cstring> # include <string> # include <cstdlib> # include <vector> # include <bitset> # include <map> # include <queue> # include <ctime> # include <stack> # include <set> # include <list> # include <random> ...
ALGO
0.999939
3.447022
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01: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": "17a500a5878f...
f038ba44-f8fb-4457-8d44-e97ce8f2c605
Utkrisht2/Intresting-problems
problems+snippet/problem44.cpp
/*Nitin and Sobhagya were playing a game with coins. If Sobhagya has more coins then he is winning, otherwise Nitin is winning. Note that this means if both Nitin and Sobhagya have the same number of coins, then Nitin is winning. Initially Nitin has A coins while Sobhagya has B coins. Then Ritik came and gave his C co...
ALGO
0.999792
3.686487
{ "github_metadata": { "branch": "main", "commit_count": 121, "repo_created_at": "2023-10-20T11:45:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31112a1b36...
1054bc49-539e-4a40-a4a0-7e8419fc32f3
EnzoIdk/Algoritmia-24-1
Proyectos Algoritmia/Laboratorio 3/Lab03_2020_2/main.cpp
/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/cppFiles/main.cc to edit this template */ /* * File: main.cpp * Author: Enzo * * Created on 10 de mayo de 2024, 09:24 PM */ #include <iostream> #include <...
ALGO
0.998642
3.504071
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-09-27T15:26:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f9ad88103d8...
aa6f9d19-bd2a-4718-8b1e-5895abaad6eb
hckim96/One-BOJ-Everyday
G3-1507/1507.cc
#include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector<vector<int> > cost(N + 1, vector<int> (N + 1, 0)); int answer = 0; for (int i = 1; i <= N; ++i) { for (int j = 1; j <= N; ++j) { ...
ALGO
0.999969
3.928985
{ "github_metadata": { "branch": "master", "commit_count": 1106, "repo_created_at": "2020-09-23T04:52:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c1cccb...
85e073f7-4f32-4c12-bffb-84acc54a6646
Hoderu/NIX_Programming
NIX_Prioritet_Queue/NIX_Prioritet_Queue/main.cpp
// // main.cpp // NIX_Prioritet_Queue // // Created by <NAME> on 19.11.15. // Copyright © 2015 mipt. All rights reserved. // #include <iostream> #include <cstdio> #include <cstdlib> #include <math.h> #include <string> #include <cstring> using namespace std; struct vertex { string data; struct vertex *ref...
ALGO
0.996774
4.039884
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-03-28T10:42: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": "a418174b67...
819564f9-33b7-420b-aa34-9d4e0103ed71
Lalo1017/Ejercicios_Club
codeforces/Laerdos.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lli; #define MAX_NUM 1e18 int main(){ map<lli, lli> les_gusta; map<lli, lli> no_les_gusta; map<lli ,lli> :: iterator itr; lli n, k, l; int type; cin >> n; lli type_1=0; lli type_2=0; for(lli i=0; i<n; i++){ cin >> type; cin >> k;...
ALGO
0.999403
3.391529
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-12-26T18:42: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": "ad401106a3...
5b496033-d532-44c4-801a-41cd970323e8
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/11/65/3.cc
// another fine solution by misof // #includes {{{ #include <algorithm> #include <numeric> #include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cass...
ALGO
0.999803
3.792735
{ "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": "972526a8...
26744722-5488-4aef-8968-8ddcf1092dab
AlerianEmperor/Random-Terrain-Generator
Random_Terrain_Generator/Perlin_Noise.h
#ifndef _PERLIN_NOISE_H_ #define _PERLIN_NOISE_H_ #include <iostream> #include <vector> #include <time.h> using namespace std; #define max(x, y) x > y ? x : y #define min(x, y) x < y ? x : y int p[512]; int permutation[256] = { 151,160,137,91,90,15, 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240...
ALGO
0.998335
5.416045
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-11-03T04:36:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a130f9fe2e...
9673d174-182e-473e-84da-25706251f8b1
pavan709/DSA
cpp1/13graph/topological.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; void buildgraph(vector<int> adj[], int i, int j) { adj[i].push_back(j); } void print(vector<int> adj[], int v) { for (int i = 0; i < v; i++) { cout << i << "->"; for (auto x : adj[i]) cout << x << " "; cout...
ALGO
0.999969
4.490005
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-05-28T10:04: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": "4f0aec9ed6...
6d0a5cf5-8d91-494a-911b-9b58e7ad1eba
xuxinyang/luogu
PREANDADVANCE/B4070.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const int maxn = 1e6 + 5; ll n; ll cnt, pos, ans; ll prime[maxn]; bool vis[maxn]; void init() { vis[1] = true; for (int i = 2; i < maxn; i++) { if (!vis[i]) prime[++pos] = i; for (int j = 1; j <= pos && i * prime[...
ALGO
0.999969
4.078473
{ "github_metadata": { "branch": "main", "commit_count": 751, "repo_created_at": "2022-03-27T12:51: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": "e114f012b2...
5511fa38-57fd-4689-98d7-8e4184a819dd
umangdhiman/Practice-code
trees/left_view.cpp
//Iterative solution //#include<iostream> //#include<queue> //#include <vector> // //using namespace std; // //struct node{ // int data; // struct node *left, *right; //}; // //// A utility function to create a new Binary Tree node //struct node *newNode(int item){ // struct node *temp = (struct node *)malloc...
ALGO
0.999982
4.816921
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-04-11T11:25: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": "20656630f...
ad7ae15f-c0db-4758-8400-d17edecf20db
italotelly/coding_test
백준/Bronze/3009. 네 번째 점/네 번째 점.cc
#include <iostream> using namespace std; // 네 번째 점 int main() { cin.tie(NULL); ios::sync_with_stdio(false); int x1, y1, x2, y2, x3, y3; int x, y; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; if (x1 == x2) { x = x3; } else if (x2 == x3) { x = x1; } else ...
ALGO
0.999933
4.852911
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-03-31T14:36: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": "4a00a30b7b...
c93f3744-a899-49ba-8bc4-e2bdb1b0d715
WorldOfWheat/CodeDepositary
C_C++/Codeforces/C. Sum of Cubes.cpp
#include <bits/stdc++.h> #define int long long using namespace std; signed main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; while (n--) { int m; cin >> m; if (m == 1) { cout << "NO" << "\n"; continue; } bool flag = ...
ALGO
0.999889
4.57195
{ "github_metadata": { "branch": "main", "commit_count": 540, "repo_created_at": "2022-07-25T08:13: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": "1341b1b51f...