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
7458d530-66b7-47f3-90a7-d859d6cf9d80
sandialabs/LCM
src/LCM/evaluators/poro/MixtureSpecificHeat.hpp
// Albany 3.0: Copyright 2016 National Technology & Engineering Solutions of // Sandia, LLC (NTESS). This Software is released under the BSD license detailed // in the file license.txt in the top-level Albany directory. #ifndef MIXTURE_SPECIFIC_HEAT_HPP #define MIXTURE_SPECIFIC_HEAT_HPP #include "Albany_Types.hpp" #i...
ALGO
0.95012
6.878911
{ "github_metadata": { "branch": "main", "commit_count": 13886, "repo_created_at": "2020-04-22T18:50:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 7, "issues": 43, "pull_requests": 1 }, "file_meta": { "content_id": "8110ede...
b0a39784-3b61-49f8-9e8a-b3367576bea1
Req1630/TankDefense
TankDefense/SourceCode/Object/Collider/Capsule/CapsuleCalculation.cpp
#include "CapsuleCalculation.h" #include <algorithm> namespace { constexpr float OX_EPSILON = 0.000001f; }; //----------------------------------. // ∠p1p2p3は鋭角?. //----------------------------------. bool IsSharpAngle( const D3DXVECTOR3& p1, const D3DXVECTOR3& p2, const D3DXVECTOR3& p3 ) { D3DXVECTOR3 vec1 = p1 - ...
ALGO
0.997382
5.468066
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2021-05-13T01:54:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15612ac83...
deb829e5-330d-408a-ad43-194521b6a236
borglab/gtsam
gtsam/3rdparty/Spectra/MatOp/SparseGenMatProd.h
// Copyright (C) 2016-2025 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at https://mozilla.org/MPL/2.0/. #ifndef SPECTRA_SPARSE_GEN_MAT_PROD_H #define SPECTRA_SPARSE_GEN_MAT_P...
ALGO
0.930716
7.040983
{ "github_metadata": { "branch": "develop", "commit_count": 19360, "repo_created_at": "2017-03-27T17:12:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3002, "forks": 845, "issues": 99, "pull_requests": 25 }, "file_meta": { "content_id": ...
a0c057ba-b8fd-4dda-ae0a-657e3ad33f0d
alias09inc/atcoder
ABC/309/B.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n; cin >> n; vector<string> s(n); for(int i=0; i<n; i++) { cin >> s[i]; } vector<char> stock(4); stock[0] = s[0][0];//左上 stock[1] = s[n-1][0];//左下 stock[2] = s[n-1][n-1];//右下 stock[3] ...
ALGO
0.999998
3.336423
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2023-06-29T16:10: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": "5d76ebfdf...
5d001997-bb27-4fb6-8496-82360614ae2a
nikosmelakis/undergraduate-hmu
3rd_semester/Algorithms/Lab/Κώδικες C όλων των αλγορίθων/DFS-adjecency-matrix.cpp
#include <stdio.h> #include <stdlib.h> #define N 20 void DFS(int); //n is the number of vertices int G[N][N], visited[N], n, m; main() { int i, j, v1, v2; printf("Enter number of vertices: "); scanf("%d", &n); printf("\nEnter number of edges: "); scanf("%d", &m); //Initialize a...
ALGO
0.99981
4.51871
{ "github_metadata": { "branch": "main", "commit_count": 240, "repo_created_at": "2023-06-15T12:32:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fc9205f72...
5a8c0aa0-0ab6-45db-a909-87ce223768fe
Thamik/NumSim_WS1516
src/solver.hpp
/* * Copyright (C) 2015 <NAME> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distribut...
ALGO
0.999032
5.330398
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2015-10-21T12:51: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": "cb5bd3d63...
fec59141-85c2-4a54-9ece-579db94b9b55
snl-dakota/dakota-packages
acro/tpl/momhlib/MOMHLib/Common/trandomgenerator.h
/* Multiple Objective MetaHeuristics Library in C++ MOMHLib++ Copyright (C) 2001 <NAME>, <NAME> (<EMAIL>) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation (www.gnu.org); either version 2.1 of t...
TOOL
0.967592
3.128023
{ "github_metadata": { "branch": "devel", "commit_count": 279, "repo_created_at": "2021-08-17T16:15:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 6, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "fde8e2810b...
d91ea453-78e3-4815-b272-0bb302ac70f5
kakatbvn/The-Duyet
Captures/145502_32_Assignment_1_Nguyen_The_Duyet_Bai_110.cpp
/* Program: Assignment 1 - Exercise 110 Purpose: Practice Author: <NAME> - 20223938 Date: 2004.01.28 */ #include<stdio.h> int main(){ printf("This is Assignment 1-Exercise 110"); int d, m; do{ printf("\nNhap vao ngay: "); scanf("%d", &d); if(d<0||d>31) printf("\nNhap lai nga...
ALGO
0.989072
3.486611
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-10T11:56: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": "bf923446c3aa...
a8349260-2619-44e5-8b01-1ed7b8d00739
nachiket-15/DSA_Problem_Practise
Medium/Sequence of Sequence/sequence-of-sequence.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: int function(int n,int m) { //If you have reached the end , i.e. till max element //You will add up the count ...
ALGO
0.999994
5.459919
{ "github_metadata": { "branch": "main", "commit_count": 1563, "repo_created_at": "2023-07-22T06:16: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": "08c26f407...
6e2eb6bb-6af2-4fef-847e-b0c6ce747d08
Ishaan-11/Launchpad
lecture16/merge.cpp
#include<iostream> using namespace std; struct node { int data; node* next; node() { } node(int data) { this->data=data; this->next=NULL; } }; void createlinklist(node** head) { int data; cout<<"enter data and -1 to exit"<<endl; cin>>data; if(data!=-1) { ...
ALGO
0.999837
3.619358
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-05-03T15:13:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85c36c316b...
032cd971-d7c0-4001-bdbb-55363b900985
dakshgupta2002/long-lines
100DaysOfCode/day 18/minimizationDeque.cpp
//<NAME> //<NAME> #include <bits/stdc++.h> using namespace std; #define deb(x) cout << #x << " " << x <<endl; #define sum(a) accumulate(a.begin(), a.end(), 0); #define fo(i, n) for (auto i = 0; i < n; i++) #define foitr(it, l) for (auto it = l.begin(); it != l.end(); it++) typedef long double ld; typedef unsigned ...
ALGO
0.999922
4.836402
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2021-07-11T17:51:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d77603c1a7...
0c94098b-0a4c-45c4-b466-062f7887bddb
aabgx/UNIVERSITY
AN_1/SEMESTRUL_II/SDA/LABORATOARE/LABORATOR_02/rezolvare/rezolvare/Colectie.cpp
#include "Colectie.h" #include "IteratorColectie.h" #include <iostream> #include <map> using namespace std; bool rel(TElem e1, TElem e2) { return true; } Colectie::Colectie() { prim = nullptr; //pointer la primul nod len = 0; //lungimea actuala } //Complexitate: Best=Theta(1), Average=Worst=Theta(n), Overall O(n...
TOOL
0.991496
3.889845
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-03-21T06:29: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": "99399ecc7c9...
afcdee2d-498c-4836-a848-63f5b8dcf032
jabong111/Algorithm
BOJ/not_finish.cpp.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <stack> #include <queue> #include <bitset> #include <memory.h> using namespace std; int graph[101][101]; int origin[101][101]; int visit[101][101]; int dx[4] = {0,0,1,-1}; int dy[4] = {1,-1,0,0}; int n; int current_way; int max_way...
ALGO
0.999856
3.675303
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-07-27T11:55: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": "63dc5aee17...
cd37a8b8-acb0-487f-b39e-03d0dacb6e6a
bdthanh/Leetcode
letter_combinations_of_a_phone_number.cpp
#include <iostream> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <numeric> #include <queue> #include <list> #include <stack> #include <cassert> #include <unordered_map> #include <unordered_set> #include <map> #include <set> using namespace std; class Solution { public: vect...
ALGO
0.99993
5.826745
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-01-07T18:24: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": "df85832fe...
b324331c-bad7-4f8e-92f3-85ec02e2b562
gotoa1234/LeetCodeProblemSolvingBy_C_Double_Plus
Medium/0006.Zigzag_Conversion.cpp
#include <iostream> #include <vector> using namespace std; namespace Solution6 { #pragma region Paste to execute /* #include "Medium/0006.Zigzag_Conversion.cpp" #include <vector> using namespace Solution6; using namespace std; Solution6::convert useClass; Solution6::convert::Zigzag_Conver...
ALGO
0.999982
5.860888
{ "github_metadata": { "branch": "main", "commit_count": 393, "repo_created_at": "2022-08-11T03:50: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": "e3e932f38e...
284d21f5-66ec-4dfd-a51a-414211e4b7ee
bneb/euler
problem7/problem.cc
#include <chrono> #include <cmath> #include <iostream> using namespace std; namespace euler { bool is_prime(int n) { if ((n&1) == 0 || (n%3) == 0) { return false; } int jump = 2; int div = 5; while (div <= sqrt(n)) { if ((n%div) == 0) { return false; } div += jump; jump = 6-jump...
ALGO
0.999216
5.14264
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-06-27T07:00: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": "38cc568bf7d...
e0e4750e-0fc4-44f1-a5ef-c95d8a25898a
gaoyichao/XiaoTuMathBox
include/XiaoTuMathBox/LinearAlgibra/MatrixOperators.hpp
#ifndef XTMB_LA_MATRIX_OPERATORS_H #define XTMB_LA_MATRIX_OPERATORS_H #include <cassert> #include <algorithm> #include <vector> #include <cmath> #include <iostream> ///////////////////////////////////////////////////////////////////////// // // 矩阵的转置 // ///////////////////////////////////////////////////////////////...
TOOL
0.902783
6.052526
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2021-10-03T15:50: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": "efb247918...
96a96997-413e-4282-a575-157dfc644d49
AwesomePancakes/OrozcoBrandon_42636
Homework/Gaddis_8thEd_Chap9_Prob9_Median/main.cpp
/* File: main Author: <NAME> Created on March 10, 2017, 4:12 PM Purpose: Median Function */ // System Libraries #include <iostream> // Input/Output objects using namespace std; // Name-space used in the System Library // User Libraries // Global Constants // Function prototypes void outputArray(...
ALGO
0.99995
5.566939
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-03-13T21:09: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": "f0f57372b...
23752672-6990-40cd-ba0c-c6bfde825900
huwzpf/University
sem3/Multimedia/LAB2/Main.cpp
#include "opencv2/opencv.hpp" #include "opencv2/core/types_c.h" //#include "opencv2/calib3d/calib3d_c.h" using namespace cv; using namespace std; #include "Typedefs.h" void showImg(string s, int x, int y, Mat img) { namedWindow(s); moveWindow(s, x, y); imshow(s, img); } void findCheckerboard(ReferenceRegionsT...
ALGO
0.973313
4.115812
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-03-23T00:00: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": "c36ed452b48...
2c2dddee-c279-4f78-bc4f-b0dd5dd990aa
korca0220/Algorithm_study
ACMICPC/SWtest/Problem/DynamicProgramming/12996.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstring> typedef long long ll; using namespace std; const int MOD = 1000000007; int N; int in[3]; ll dp[51][51][51][51]; ll getNum(int a, int b, int c, int m){ if(m==0){ if(a==0 && b==0 && c==0) return 1; else return 0; } ...
ALGO
0.99998
4.331953
{ "github_metadata": { "branch": "master", "commit_count": 404, "repo_created_at": "2019-05-03T04:26: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": "d855d48a...
6a68026c-c168-4a08-b5c0-56a4eecf954a
chandranshubhardwaj0907/graphs-code
graphs/bsf.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; class Graph { private: int vertices; bool directed; vector<vector<int>> graph; public: Graph(int vertices, bool directed = false) { this->vertices = vertices; this->directed = directed; graph = vector<vector<int>>(vertice...
ALGO
0.999917
5.624069
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-11-30T17:39:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1007446ede99...
a0ca7fe7-2cfb-4d33-98e4-c252e06f35f3
puspraj-repos/CPP-practice
Graph Theory/kahn_top_sort.cpp
#include<bits/stdc++.h> using namespace std; vector<vector<int>> graph; vector<int> top_sort(vector<vector<int>> graph, vector<int> in_degree) { queue<int> no_dependencies; int no_of_nodes = in_degree.size(); for(int i = 0; i < no_of_nodes; i++) { if(in_degree[i] == 0) { n...
ALGO
0.999996
4.962624
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-01-22T16:21: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": "201ed7786401...
5214f577-3f14-4481-a5e2-926265f9c7cc
intervalrain/Cpp
leetcode/Stack/1261.find-elements-in-a-contaminated-binary-tree.cpp
/* * @lc app=leetcode id=1261 lang=cpp * * [1261] Find Elements in a Contaminated Binary Tree */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNo...
ALGO
0.999788
6.300928
{ "github_metadata": { "branch": "main", "commit_count": 265, "repo_created_at": "2022-04-25T18:46:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7892d703c2...
686c6427-5fc5-4627-8a72-68fa80b963fc
MakinoRuki/Codeforces
R908/1894E.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <unordered_map> #include <cmath> #include <set> #include <map> #include <queue> #include <random> #include <ctime> #include <list> #define N 200005 #define M 5005 #define eps 1e-7 using namespace std; typedef long l...
ALGO
0.999962
3.495378
{ "github_metadata": { "branch": "master", "commit_count": 3630, "repo_created_at": "2017-11-19T03:14: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": "b3b0711...
c482ddd8-e063-49d6-9821-b4278d86b5ef
liangyling3/DataStructure
递归/--回溯法-完全背包问题.cpp
/* example input: 48 10 9 6 10 11 8 4 5 7 12 13 11 6 12 9 14 10 13 8 15 7 */ #include <iostream> #include <vector> #include <iomanip> using namespace std; class Good { public: int volume; int value; }; ostream & operator << (ostream & out, vecto...
ALGO
0.999975
4.039963
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2018-09-06T07:54: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": "ddc58f21d...
25c8d81d-38cc-4263-ace7-c5467a6b88dd
reiniermujica/algorithms-and-contests
PSN/2008-Egipto/FINALES/JOURNAL.CPP
#include <cstdio> #include <vector> #include <algorithm> using namespace std; const int MAXN = 5050; int N, M, a, b, sol, i, j, R[MAXN]; bool mk[MAXN], empate; vector < int > G[MAXN], L; int dfs( int v ) { mk[v] = true; for ( int i = 0; i < G[v].size(); i++ ) { int next = G[v][i]; i...
ALGO
0.999954
3.256616
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-06-24T22:17:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fed5257c18...
c91a1563-6570-42b8-b14f-3b6a61abb354
Echez-cpu/HTTP_Webserver
webserv_mostResent copy1_macOS/includes/ConfigParser.hpp
#pragma once #include "ServerConfiguration.hpp" #include "Helper.hpp" #include <set> class ConfigParser { private: unsigned long _maxClientBodySize; std::string _listeningServerPort; std::map<int, std::string> _defaultErrorPages; public: std...
CONFIG
0.959969
5.336485
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-07-10T14:32:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "778fcf0a560...
f19b2328-69be-4480-a45a-3ba1079ec142
yonsweng/ps
codeforces/1407/a.cpp
#include <iostream> using namespace std; int main() { // freopen("1.in", "r", stdin); int t; cin >> t; while(t--) { int a[1000], n; cin >> n; int zeros = 0, ones = 0; for(int i=0; i<n; i++) { cin >> a[i]; if(a[i] == 0) zeros++; else ...
ALGO
0.999902
3.3766
{ "github_metadata": { "branch": "main", "commit_count": 457, "repo_created_at": "2019-07-31T11:35:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ec7612944...
80885208-c0eb-41f5-bf04-8fab5902a369
nojhan/paradiseo
mo/tutorial/Lesson1/lesson1_fitContinuator.cpp
//----------------------------------------------------------------------------- /** lesson1_fitContinuator.cpp * * SV - 27/04/10 - version 1 * */ //----------------------------------------------------------------------------- // standard includes #define HAVE_SSTREAM #include <stdexcept> // runtime_error #inclu...
ALGO
0.999987
5.8398
{ "github_metadata": { "branch": "master", "commit_count": 5554, "repo_created_at": "2013-01-11T08:47:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 108, "forks": 36, "issues": 45, "pull_requests": 4 }, "file_meta": { "content_id": "019...
f5392916-5d05-4171-aa00-47c17e122a49
ThatDNS/UVa-solutions
UVA/Ch 5. Mathematics/10338 - Mischievous Children.cpp
// Problem: 10338 - Mischievous Children #include <bits/stdc++.h> using namespace std; inline long long MAX3(long long a, long long b,long long c){return (a)>(b)?((a)>(c)?(a):(c)):((b)>(c)?(b):(c));} inline long long MIN3(long long a, long long b,long long c){return (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c));} #...
ALGO
0.999909
3.703307
{ "github_metadata": { "branch": "master", "commit_count": 285, "repo_created_at": "2018-08-29T12:08: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": "108ed0e4...
f1b60628-b335-4d6e-ae6d-329a7682804c
Sagar-Wadhwa-726/DSA-Supreme-Batch
Week-20/Lecture-1_GREEDY_ALGORITHM.cpp
#include <iostream> #include <conio.h> #include <climits> #include <vector> #include <string> #include <algorithm> using namespace std; bool mycomp(pair<int, int> &a, pair<int, int> &b) { return a.second < b.second; } // T.C : O(NlogN) int solveAccomodationProblem(int &numberOfTrains, int arrival[], int departure[...
ALGO
0.999193
3.897461
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2023-11-24T11:12: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": "a0c49b068...
161fb584-7879-47a9-888b-da6cb2fd55be
Dowsed/AP2
Week_5_Writing_Files_Basic_Audio_Manipulation/multiThreading/multiThreading/main.cpp
// // main.cpp // multiThreading // // Created by <NAME> on 04/11/2021. // Copyright © 2021 <NAME>. All rights reserved. // #include <iostream> #include <vector> #include <thread> #include <numeric> void accumulateRange(int &sum, int start, int end) { sum = 0; for (int i = start; i < end; ++i) { ...
ALGO
0.989739
5.69007
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-10-07T16:04: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": "7d0565ead3f...
eef99dac-46e8-4cba-b231-50fb7b395544
zukun/rcc
mrf/MRF-benchmarks/photomontage/familySeamFinder.cpp
#include "familySeamFinder.h" #include "mrf.h" #include "ICM.h" #include "GCoptimization.h" #include "MaxProdBP.h" #include "TRW-S.h" #include "BP-S.h" //------- MRF::CostVal edgySmoothCostFn(int pix1, int pix2, int dp,int dq) { //printf("yo %d %d %d\n",g_width, g_height, g_sources.size()); Coord p(pix1%g_width...
ALGO
0.998506
3.347568
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-02-21T15:10:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 16, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a860eb9...
188d97e1-138b-4f3f-9438-4b64133643f1
alexandraback/datacollection
solutions_6404600001200128_1/C++/Crossfade/Main.cpp
#include "Precomp.h" using namespace std; int main() { ifstream src("Output.txt"); string currentDate = currentDateTime(); replace(currentDate.begin(), currentDate.end(), ':', '.'); ofstream dst((string("Output") + currentDate + string(".txt")).c_str()); dst << src.rdbuf(); src.close(); dst.close(); ifstream...
ALGO
0.999729
3.58003
{ "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": "38c981bf3...
a207b91b-845b-475a-8c68-e4764fae54a9
Tiger1994/LeetCode
Q63.cpp
#include<vector> #include<algorithm> using namespace std; class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) { int m = obstacleGrid.size(), n = obstacleGrid[0].size(); vector<vector<int>> dp(m, vector<int>(n, 1)); for (int i = 0; i < m; i++){ for (int j = 0; j < n; j++){...
ALGO
0.99979
5.446301
{ "github_metadata": { "branch": "master", "commit_count": 201, "repo_created_at": "2018-06-04T15:32:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fed55c0...
8cb96bdb-867b-4d1e-b997-dfe0d9816523
logicmachine/LibCompetitive
graph/bipartite_matching.cpp
#include <iostream> #include <vector> using namespace std; bool bipartite_matching_dfs( int v, const vector< vector<int> > &conn, vector<bool> &used, vector<int> &match) { used[v] = true; for(int i = 0; i < conn[v].size(); ++i){ int u = conn[v][i], w = match[u]; if(w < 0 || !used[w] && bipartite_matching_dfs(...
ALGO
0.99985
5.10416
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2012-07-08T02:20:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 34, "pull_requests": 0 }, "file_meta": { "content_id": "3510ae92...
0cff8c87-6318-4a8b-9289-9fd81bd6ea70
oowuag/LittleProgram
VSPROJ-test/test/65.Fit.hxx
// LeastSquare FitLine #include<stdio.h> #define N 10 //N - data number float X[10] = {1.9,0.8,1.1,0.1,-0.1,4.4,4.6,1.6,5.5,3.4}; float Y[10] = {0.7,-1.0,-0.2,-1.2,-0.1,3.4,0.0,0.8,3.7,2.0}; double Sum_Average(float d[N]) { unsigned int i=0; float z=0; for(i=0;i<N;i++) { z = z + d[i]; } z = z/...
ALGO
0.999231
3.80435
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-12-01T09:22:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f45f16ab...
c94983d3-a671-4a81-9aa4-fff2b8298e11
ladamalina/leetcode-2022-cpp
2491. Divide Players Into Teams of Equal Skill (medium)/main.cpp
// #include <bits/stdc++.h> #include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <memory> #include <nume...
ALGO
0.999934
5.525443
{ "github_metadata": { "branch": "master", "commit_count": 837, "repo_created_at": "2022-07-23T05:09: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": "4d051055...
2dd8df3a-e9e3-4edd-984b-3719b9da21d3
Zohix1/DataStruction
DataStruction_Design/FileSearch.cpp
#include<bits/stdc++.h> using namespace std; typedef struct File{ string filename; File(string& filename) { this->filename=filename; ofstream file(filename); string line; cout<<"请输入文件内容: "<<endl; while (getline(cin, line) && line != "END") { file << line << ...
TOOL
0.947718
4.317935
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-03-07T11:54: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": "26f8ef4a21e...
d78221ca-6b52-4cab-a754-619eb54c2300
jaycody/nature-of-code-examples
noc-ex-cinder/introduction/NOC_I_4_Gaussian/src/NOC_I_4_GaussianApp.cpp
// // I.4 Gaussian // The Nature of Code // // Converted from <NAME>'s Processing Examples // Created by <NAME> // #include "cinder/app/AppBasic.h" #include "cinder/gl/gl.h" #include "cinder/Rand.h" using namespace ci; using namespace ci::app; using namespace std; class NOC_I_4_GaussianApp : public AppBasic { ...
ALGO
0.91257
5.571293
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-07-09T05:57:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "431f137ad...
bb42cbd6-64ef-4a93-ba1a-bea7bae298e0
KaizynX/Code
poj/poj3616.cpp
#include <cmath> #include <vector> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 1e3+7; int n, m, r; long long dp[N]; struct Node { int s, t, w; friend bool operator < (const Node &n1, const Node &n2) { return n1.t < n2.t; } ...
ALGO
0.999946
4.189528
{ "github_metadata": { "branch": "master", "commit_count": 351, "repo_created_at": "2018-02-19T10:48:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94b45056...
c516a865-f510-45f0-b0eb-800f4c40535c
ameen-sid/90_Days_DSA
DAY - 10/Array/Shift_Element_By_N.cpp
#include<iostream> using namespace std; // Time Complexity : O(N) // Space Complexity : O(T) ==> Where T is no of times to shift elements in array. void shiftArray(int arr[], char direction, int times, int n) { if (direction == 'L' || direction == 'l') { // Shift array to left int temp[times]; for (int i = 0;...
ALGO
0.9999
5.108274
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2024-02-05T14:35: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": "42ec0fd08f9...
da7c69f7-fe31-4b22-b0d7-4e0109220fcc
jtlap/nt2
modules/core/reduction/include/nt2/reduction/functions/expr/dot.hpp
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // Copyright 2011 - 2012 MetaScale SAS // // Distributed under the Boost...
ALGO
0.975294
6.273301
{ "github_metadata": { "branch": "master", "commit_count": 14374, "repo_created_at": "2010-11-02T16:07:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 39, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d72a...
93f5c872-eda2-4d36-a445-0856a0c6d5b9
HindrikStegenga/HexGame
HEX/HexNode.h
#pragma once #include <vector> #include <memory> #include "StateAndAstar.h" #include <string> //Forward declaration vanwege circuliere dependency class HexGrid; using std::vector; using std::wstring; class HexNode { public: HexNode(int x, int y, const HexGrid& hRef,int ID); ~HexNode(); void CalculateConnections()...
ALGO
0.955473
3.667121
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2017-03-22T18: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": "359009b14...
521bfac9-170b-4d48-9dd0-ae4decf3d05c
nutan-sangani/CP-Practice
Initial practice 1300-1400/C_Vampiric_Powers_anyone.cpp
#include <iostream> #include<bits/stdc++.h> #define ll long long #define forLoop for(int i=0;i<n;i++) #define pii pair<int,int> #define pb push_back #define pll pair<ll,ll> #define mp make_pair #define um unordered_map #define us unordered_set #define umll unordered_map<ll,ll> #define omll map<ll,ll> #define vecll vect...
ALGO
0.999841
4.865012
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-12-03T11:56: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": "bc416627ff8...
4aa779f9-5427-42aa-9585-a34b8151c6bb
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/11/1115/personal_submission/cf353c_kamtuo.cpp
/*----------------------------------*/ /* Author : KaMtuo */ /* Email : <EMAIL> */ /* Creation_time : 2024-11-15 14:53 */ /* Software : Visual Studio Code */ /*----------------------------------*/ #ifndef KAMTUO_LEETCODE int main() { std::ios::sync_with_stdio(false); cin.tie(nul...
ALGO
0.999956
4.749532
{ "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": "17ef...
ffd86abb-92ef-4309-8f98-fb6a1f95f64a
ishandutta2007/codeforces-i
-is-this-fft-/normal/1254/C.cpp
#include <iostream> #include <vector> #include <algorithm> #include <deque> using namespace std; typedef long long ll; ll area (int i, int j, int k) { cout << 1 << " " << i << " " << j << " " << k << '\n'; ll ans; cin >> ans; return ans; } int orient (int i, int j, int k) { cout << 2 << " " << i << " " <<...
ALGO
0.999892
3.985669
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "c36802ca8af7...
2eb2b2df-5f84-4f54-b4b5-ac0bf15b15ba
ricekot/learning
advent-of-code-2019/day3.2.cpp
#include <iostream> #include <vector> #include <string> #include <cmath> #define CORNER 50 /* With CORNER 27500, points of intersection of the two wires (obtained from day3.cpp) (13223, 13650) (13223, 13982) (13242, 12872) (13256, 12872) (13406, 12570) (13406, 12744) (13406, 12757) */ using namespace std; int coun...
ALGO
0.999718
5.144194
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2020-11-01T19:30: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": "17798697e17...
e1cd745f-0842-46e2-818d-de88df62efa0
ice871117/algorithm
mirror_binary_tree/main.cpp
/** leetcode 101 对称2叉树 给定一个二叉树,检查它是否是镜像对称的。 例如,二叉树 [1,2,2,3,4,4,3] 是对称的。 1 / \ 2 2 / \ / \ 3 4 4 3 但是下面这个 [1,2,2,null,3,null,3] 则不是镜像对称的: 1 / \ 2 2 \ \ 3 3 */ #include <iostream> #include <stack> #include <queue> #include <string> using namespace std; template <class T> int le...
ALGO
0.999976
5.6568
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-02-23T13:42: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": "f162eff11...
41ab6627-e876-48fe-9a3f-5d5ce2b0eb08
Sagor000000/Compiler-Design
lab task 4/4.3/4.3.cpp
#include <iostream> #include <stack> #include <string> // Function to check if the given expression is properly parenthesized bool isProperlyParenthesized(const std::string& expression) { std::stack<char> s; for (char c : expression) { if (c == '(' || c == '{' || c == '[') { s.push(c); ...
ALGO
0.938283
6.928631
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-11-20T20:15: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": "3bd922f9494b...
eda69768-8459-4513-91ba-3e3f43bd1e25
jianglab/motioncorr
src/SP++3/include/levinson.h
/* * Copyright (c) 2008-2011 <NAME> (<NAME>), <EMAIL> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 2 or any later version. * * Redistribution and use in source and bin...
ALGO
0.999837
5.956335
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2015-07-24T20:50:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "0234124ee...
60e350a3-2332-43c3-8055-d701cbe6b4d0
zealsnair/Stacks-Love-Babbar
n_stacks_in_an_array.cpp
#include <bits/stdc++.h> using namespace std; class NStack { int *arr; int *top; int *next; int s, n; int freespot; public: // Initialize your data structure. NStack(int N, int S) { n = N; s = S; arr = new int[s]; top = new int[n]; next = new i...
ALGO
0.996971
4.529088
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-28T13:54: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": "b35fe06c29cb...
fbf61ce5-5871-4a7e-86dd-971af7644fba
PMI-16-2021/algoritm
lab01/Voridan/Sort/tests.cpp
#include "tests.h" #include "sorts.h" #include <iostream> #include <cassert> int Test1_01(){ int arr[10] = {4,43,75,35,5,43,11,57,47,77}; InsertionSort(arr, 10); int sorted[10] = {4,5,11,35,43,43,47,57,75,77}; for (int i = 0; i < 10; ++i) { if(arr[i] != sorted[i]) return -1; } ...
TEST
0.917943
5.142921
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2022-02-16T08:42:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 182 }, "file_meta": { "content_id": "747e41d214...
eb904de8-8308-47e4-99ff-fe53d556cf7f
isaac-diniz/Curso-Cpp
Exercícios/exercíciosLIvro/cap 6/exer10.cpp
/* Faça um programa que preencha um vetor com dez números inteiros e um segundo vetor com cinco números inteiros, calcule e mostre dois vetores resultantes. O primeiro vetor resultante será composto pela soma de cada número par do primeiro vetor somado a todos os números do segundo vetor. O segundo vetor resultante s...
ALGO
0.999713
4.820419
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2024-01-05T17:22:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7e196bda2...
ac87dddc-e66b-4e2f-9535-c1521951e8bd
tapojit047/Competitive-Programming
SORTING/MERGE/Untitled3.cpp
#include<bits/stdc++.h> using namespace std; int n, ara[105]; void mergee(int l, int r, int m) { int n1 = m-l+1, n2 = r-m; int L[n1], R[n2]; for(int i = 0; i < n1; i++){ L[i] = ara[l+i]; } for(int i = 0; i < n2; i++){ R[i] = ara[m+i+1]; } int i = 0, j = 0, k = l; whi...
ALGO
0.999994
4.885606
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-12-21T15:50: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": "85425e4c9c...
1e5aea0c-73a1-4fe4-9f0b-fd5b5c42264d
DarkRainX3/C-and-CPP-Assignments
Lab 10/lab10exe_A.cpp
// lab10_ExA.cpp // ENSF 337 - Fall 2018 - LAB 10 #include <iostream> using namespace std; void insertion_sort(int *int_array, int n, int sort_order); /* REQUIRES * n > 0. * 1 <= sort_order && sort_order <= 2 * Array elements int_array[0] ... int_array[n - 1] exist. * PROMISES * If sort_order == 1 v...
ALGO
0.999889
5.437419
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-02T22:35: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": "c7892e64ff...
d0bdf759-41d9-4d02-92b8-5772a89a304d
simran-ctrl/100daysofcode
3 Divisors - GFG/3-divisors.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: bool isPrime(int num) { if (num <= 1) { return false; } for (int i = 2; i * i <= num; i++) { if (num % i == 0) { return false; } } return true;// ...
ALGO
0.998731
5.407455
{ "github_metadata": { "branch": "main", "commit_count": 415, "repo_created_at": "2023-06-29T17:18: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": "c186903531...
10d21de3-d83b-46e6-aab5-40d0eabac45f
jczh98/Algorithm
training/Petrozavodsk Summer-2016. AtCoder Japanese Tasks Selection/solution/a.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include<iostream> #include<algorithm> #include<map> #include<vector> #include<cmath> using namespace std; typedef long long Int; typedef pair<double, double> DP; typedef pair<Int, Int> P; #define EPS (1e-8) #define SQ(x) ((x) * (x)) #define ONLINE 0 #define ...
ALGO
0.999859
3.820913
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2016-07-02T08:52:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88a1bd5a4...
b6982b30-b10c-48b5-8eda-c5c27497897e
sadibhaque/DataStructure
queueWithLinkedList.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int struct node { int data; struct node *next; }; typedef struct node node; node *head = NULL; void deleteFirst(){ if(head == NULL) return; node *current = head; head = current -> next; free(current); } void deleteLastNode(...
ALGO
0.999382
4.191149
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2023-09-02T15:03: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": "22d72ba4e38...
8ccce790-3deb-4e4f-96e6-163935a58074
skyfeature/cautious-potato
checking_global_variable.cpp
#include <iostream> #include <vector> using namespace std; #define Large 1000000007 int N, M; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; vector<vector<int> > V; int can_reach_dfs(int x, int y){ if ((x == N-1) and (y == M-1)){ return 1; } if ((x < 0) or (y < 0) or (x >= N) or (y >= M)){ return 0; } if...
ALGO
0.999986
4.826186
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-11-18T15:16: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": "b483403b0a...
73442a77-7b6a-49e2-a543-6f7dd414ac92
theval-s/study-tasks
ITMO-University/AlgosAndDataStructs/Lab4/Source.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void bubble_sort(vector<int>& vec) { int n = vec.size(); for (int i = 0; i < n; i++) { short swaps = 0; for (int j = 1; j < n - i; j++) { if (vec[j - 1] > vec[j]) { swaps++; swap(vec[j - 1], vec[j]); } } if (swaps =...
ALGO
0.999992
4.449565
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2022-04-15T11:12: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": "b0ae51f6dbe...
95321669-c315-4bce-9598-7d2c23ca51b6
avadapal/Combinatorial-Min-Cost-Flow
src/verbose_prints.h
using namespace std; template<typename Network, typename IntegerType, typename RationalType> void print_queries(Network& N, SpanningTree<Graph<IntegerType, RationalType>, IntegerType, RationalType>& ST_original) { cout << "Printing Queries: " << endl; typedef typename Network::GraphType Graph; Graph& ...
ALGO
0.994262
3.733726
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-09-12T19:13: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": "02c82e9dc9...
28f4b0a1-84df-4aeb-8eae-01f5e900b860
BryanCastro/Palindrome-Checker
Palindrome-Checker/main.cpp
#include <iostream> #include <string> int main() { std::string word; std::string reversedWord; char letterChecker; //used to letters in word individually char option; //used for repeat statement of code int sizeOfWord; //used to store length of word std::cout << "======================" << std::endl; std::cou...
ALGO
0.990104
4.099051
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-08-18T01:59:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3401c0d3f7...
070f6ad1-3d03-4622-90ab-8fc65e423bfa
Giantpizzahead/comp-programming
Codeforces/Practice/1372 - Round 655 Div 2/C.cpp
#include <iostream> using namespace std; const int MAXN = 200005; int T, N; int arr[MAXN]; void solve(int tn) { cin >> N; bool alreadySorted = true; for (int i = 0; i < N; i++) { cin >> arr[i]; if (arr[i] != i+1) alreadySorted = false; } if (alreadySorted) { cout << 0 <<...
ALGO
0.999954
4.041386
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-04-04T04:04:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c82322221...
cb7eda9b-9706-4b61-b016-60945b253db8
muraproject/arduino_online
kapal/smc12/smc12.ino
#include <Servo.h> #include <Wire.h> // I2C Slave addresses (matching the slave programs) #define SLAVE1_ADDR 0x55 // RPM slave #define SLAVE2_ADDR 0x56 // Current, voltage, speed slave // Set a slower I2C clock speed for better reliability #define I2C_CLOCK_SPEED 50000 // 50 kHz // Servo/ESC Servo ESC1; Servo ES...
WEB
0.925878
3.837499
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-08-04T01:46:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10899025e13...
041d50b7-421e-4f32-a1d8-335fe5e010b8
yosupo06/library-checker-problems
convolution/convolution_mod_1000000007/gen/unsigned_overflow.cpp
#include <iostream> #include <set> #include <limits> #include "random.h" #include "../params.h" using namespace std; int main() { int val = MOD - 2; // Find smallest size n where n * val * val > numeric_limits<unsigned long long>::max() int n = 0; unsigned long long res = 0; long long val2 = (lo...
ALGO
0.998246
3.599591
{ "github_metadata": { "branch": "master", "commit_count": 3115, "repo_created_at": "2019-05-30T20:49:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 589, "forks": 137, "issues": 98, "pull_requests": 3 }, "file_meta": { "content_id": "5f...
9ed272d2-352e-4dc2-af9c-ac28e442e90c
AdityaGaur7/CP-problems
problem/problem/1927C.cpp
#include<bits/stdc++.h> using namespace std; #define v vector<int>v #define vpb(x) v.push_back(x) #define mp(x,y) make_ pair(x,y) #define F first #define S second #define rev(a) reverse(a.begin(),a.end()) #define r(i,a,b) for ( int i = a; i< b; i++) #define tc int t;cin>>t;while(t--) #define ll long long #define lw...
ALGO
0.999977
3.480695
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-03-24T18:51: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": "b292691ff7...
07a7b454-8a66-448d-b18c-95c9627e09aa
ConorFWild/gemmi_tools
gemmi_tools/include/gemmi/rhogrid.hpp
// Copyright 2019 Global Phasing Ltd. // // Prepares a grid with values of electron density of a model. #ifndef GEMMI_RHOGRID_HPP_ #define GEMMI_RHOGRID_HPP_ #include <complex> #include "grid.hpp" // for Grid #include "model.hpp" // for Structure, ... namespace gemmi { template <typename F> double determine_cu...
ALGO
0.991463
6.641179
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2020-03-10T11:19: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": "ded948966...
6875263d-aa43-42cd-8bfc-edcd5450fc1e
haocse/DocScanTest
app/src/main/cpp/common/homography/LWHomographyExtractor.hpp
// // LWHomographyExtractor.hpp // AbaScan // // Created by <NAME> on 20/12/2017. // Copyright © 2017 <NAME>. All rights reserved. // #ifndef LWHomographyExtractor_hpp #define LWHomographyExtractor_hpp #ifndef _EiC #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <opencv2/opencv.hpp> #endif cv:...
ALGO
0.994761
4.709045
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-04-26T06:24:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac0f84d033...
12085e88-0ef2-4bdd-918d-0ed63c2aa3e1
Vermasaiyam/DSA
Lecture 85 (Introduction to Graphs)/graphsIntro.cpp
#include<iostream> #include<unordered_map> #include<list> using namespace std; template <typename T> class graph { public: unordered_map<T, list<T>> adj; void addEdge(T u, T v, bool direction) { adj[u].push_back(v); if(direction == 0) { adj[v].push_back(u); ...
ALGO
0.999785
5.056551
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2024-07-18T04: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": "813f5011ca...
4884d1d9-c489-475d-99c1-f68e8e329c8c
tshipenchko/contester.ru
500/517.cpp
#include <iostream> #define N 10 using namespace std; int main() { bool arr[N][N]; for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) cin >> arr[i][j]; int ship = 0; for (int i = 0; i < N; i++) { int line = 0; for (int j = 0; j < N; j++) { if (!arr...
ALGO
0.999866
4.289746
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2023-10-22T15:47: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": "38930db87...
99307047-73ab-4ee0-922a-42ffb2b13ea8
Snketiah/SSROBOT_Firmware
Src/SixDofRobot.cpp
// // Created by <NAME> on 5/18/23. // #include "SixDofRobot.h" float32_t clamp_f32(float32_t val, float32_t min, float32_t max) { if (val < min) return min; if (val > max) return max; return val; } SSROBOT_Status SixDofRobot::getAngles(Point P) { const float HALF_PI = PI / 2.0f; const float epsilon =...
ALGO
0.956251
6.651174
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-25T21:07:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56309182a03c...
0dd4ed7d-0237-40cc-b537-7c98780b5acc
ishandutta2007/codeforces-m
molamola/normal/1067/B.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <memory.h> #include <math.h> #include <assert.h> #include <stack> #include <queue> #include <map> #include <set> #include <string> #include <algorithm> #include <iostream> #include <functional> #include <unordered_set> using namespace std; typedef lon...
ALGO
0.999989
3.884495
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "95bd611cf435...
0de01ed0-73fb-4ba6-9823-6aff04d124c3
silverAbyss/DataStructure
week_seven/7-2.1.cpp
#include <cstdio> #include <cstdlib> #include <iostream> #include <vector> #include <queue> #include <map> #include <stack> #include <iterator> #include <algorithm> using namespace std; #define N 12 typedef struct node{ char data; struct node* left; ...
ALGO
0.999973
3.518184
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-12-07T11:45:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1869570062...
e015c04d-6c5a-46f9-bbb4-a267ebc81b4a
dOtOb9/Competitive_Programming_Solution
Solutions/Snuke_Queue.cpp
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <set> #include <map> #include <queue> #include <iomanip> #include <functional> using namespace std; using l = long long; using ul = unsigned long long; const int inf = 2147483647; // 2e9 1 << 30 const l...
ALGO
0.999812
3.322521
{ "github_metadata": { "branch": "main", "commit_count": 196, "repo_created_at": "2023-10-27T15:31:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "963747d483...
5a51acb7-029c-4442-8b33-623b56fc9d43
qian99/acm
problem/搜索/dfs/hdu 4090 GemAnd Prince.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<map> #include<queue> #include<stack> #include<cmath> #include<vector> #define inf 0x3f3f3f3f #define Inf 0x3FFFFFFFFFFFFFFFLL #define eps 1e-9 #define pi acos(-1.0) using namespace std; typedef long long ll; const int mo...
ALGO
0.999845
3.75399
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-01-23T14:37:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c06714d04...
245e0313-3ed7-4b41-b2c9-109d5667f374
sailik1991/PlanningAssistance
planner/FAST-DOWNWARD/src/search/lm_cut_heuristic.cc
#include "lm_cut_heuristic.h" #include "lm_cut_landmarks.h" #include "option_parser.h" #include "plugin.h" #include "task_proxy.h" #include "task_tools.h" #include <iostream> using namespace std; // construction and destruction LandmarkCutHeuristic::LandmarkCutHeuristic(const Options &opts) : Heuristic(opts), ...
ALGO
0.995127
5.794326
{ "github_metadata": { "branch": "current-dev", "commit_count": 11, "repo_created_at": "2017-02-01T23:18:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "032d...
42ee1dcc-30ff-4863-924a-3addb85328ba
srmacario/competitive-programming
gym/101652/r.cpp
#include <bits/stdc++.h> using namespace std; #define st first #define nd second #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; typedef pair<int,int> pii; typedef pair<int,...
ALGO
0.999911
4.293332
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-03-20T13:55:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fcc9d1731...
2188405e-4d9f-4a54-8828-e5f8032d12f4
KacperOG/zadaniac-
zad1cw6.cpp
#include <iostream> using namespace std; double liczba_a = 0; double liczba_b = 0; double liczba_c = 0; int main() { // Wyświetla relację dwóch liczb std::cout << "Porownanie dwoch liczb \n"; std:: cout << "Wprowadz liczbe a: \n"; std:: cin >> liczba_a; std:: cout << "Wprowadz liczbe b: \n"; s...
ALGO
0.999345
3.561547
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-11-05T11:08:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c34359ca59...
9607acf6-6650-461e-aa08-5c592eb00b3d
ishandutta2007/codeforces-v
vercingetorix/normal/1311/B.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <ctype.h> #include <queue> #include <cstring> #include <set> #include <bitset> #include <map> #include <chrono> #include <random> #include <unordered_map> #include <stdio.h> using namespace std; typedef long long ll; typedef long do...
ALGO
0.999892
3.407205
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5ef857f5379...
5d14101d-5b10-4f8b-9246-041bc2079887
bat1024996/2021
test_6_14/test_6_14/test.cpp
#include<iostream> using namespace std; //void Qsort(int* arr, int left, int right) //{ // if (right<=left) // return; // int p = left,e = right; // while (left < right) // { // while (arr[right] >= arr[p] && --right>p ); // while (arr[left] <= arr[p] && ++left<e); // if (left < right) // swap(arr[left], arr[ri...
ALGO
0.999808
3.645056
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2021-01-15T03:11: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": "8a614ea2b...
ee54a1c6-e48b-47c7-8b51-e80e6dcbb217
inchoel/DailyCoding
acmicpc.net/10451_순열사이클.cpp
#include <cstdio> #include <algorithm> #include <utility> #include <vector> using namespace std; int countCycle (const vector<int>& v, size_t n) { int start, temp, cnt=0; bool isVisited[n]; for (size_t i=1; i<=n; i++) isVisited[i] = false; for (size_t i=1; i<=n; i++) { if (isVisited[i] == true) ...
ALGO
0.999801
3.631573
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2017-11-05T05:21:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d5a670e...
fc84189d-72e4-4e7b-be0f-118e5e44af6a
caliman103/Projects
C_C++/Largest_Second/main.cpp
#include <iostream> #include <vector> using namespace std; void updateweights(vector<int> &arr); int main() { vector<int> arr = {3, 5, 2, 7, 8, 10, 9, 6}; updateweights(arr); return 0; } void updateweights(vector<int> &arr) { if (arr.size() == 2) { return; } int max = 0, secondMax...
ALGO
0.999978
3.965832
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-07T02:48: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": "e064484e4035...
20b6f271-ceff-410f-836c-39d1d85f2414
jg719/Linear-Systems-Solver
Matrix/main.cpp
#include "Matrix.h" #include "Matrix.cpp" #include "CSRMatrix.h" #include "CSRMatrix.cpp" #include <chrono> //#include "functionality.cpp" //#include "solver_tests.cpp" //#include "time_tests.cpp" using namespace std; void GUI(){ string mat_type; string method; int rows; char choice = 'Y'; cout << "Welcome to t...
ALGO
0.996071
3.365224
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-04-14T08:06: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": "5c8a47ad6d...
ff5d62e9-f858-4f8d-ac3b-e34ad08d9f93
ankushbhatia2/spoj-solutions
MPILOT/MPILOT-14541923.cpp
#include<bits/stdc++.h> #define Get getchar() #define ll unsigned long long #define pc(x) putchar(x) using namespace std; int binary_gcd(ll a, ll b) { if (b == 0) { return a; } return binary_gcd(b, a % b); } bool isprime (ll num) { if (num <=1) return false; else if (num == 2) ...
ALGO
0.999974
3.079237
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-10-03T06:10: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": "108d7dc41b...
0148e12e-8867-440e-994d-f4ac21f0087b
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Source/Runtime/Engine/Private/PhysicsEngine/SimpleSuspension.cpp
// Copyright Epic Games, Inc. All Rights Reserved. #include "Physics/SimpleSuspension.h" #include "Chaos/Real.h" // Some calculations are expected to exceed the engine's SMALL_NUMBER threshold static double SUSPENSION_SMALL_NUMBER = 1.e-10; // Tolerance for using single axis calculations static double SUSPENSION_AL...
ALGO
0.997306
6.046636
{ "github_metadata": { "branch": "5.4", "commit_count": 164, "repo_created_at": "2023-03-14T06:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "31b6147b95...
0c875776-d7be-4364-8219-de8e785b1924
SAMYAK99/CS-180
C++/Trie_unique_prefix.cpp
// SEARCHING AND MATCHING IN EFFICIENT WAY #include<bits/stdc++.h> using namespace std; struct trie { struct trie *children[500]; int frequancy =0; }; // craete a null node struct trie *create() { struct trie * newnode =new trie; newnode->frequancy=1; for(int i=0;i<500;i++) { newnode->children[i]...
ALGO
0.99989
3.795552
{ "github_metadata": { "branch": "main", "commit_count": 2051, "repo_created_at": "2020-10-13T20:14:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 152, "forks": 395, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "a5b6e...
d11eb37f-1e0c-4dc3-903c-01d5ec1f8128
Maycon708/Maratona
URI/1651 - Cilindro.cpp
#include <bits/stdc++.h> #define INF 1LL << 30 #define rep(i, a, b) for(int i = int(a); i < int(b); i++) #define pb push_back #define debug(x) cout << #x << " = " << x << endl; #define debug2(x,y) cout << #x << " = " << x << " --- " << #y << " = " << y << "\n"; #define debugM( x, l, c ) { rep( i, 0, l ){ rep( j, 0, c ...
ALGO
0.999361
3.551296
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-02-28T17: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": "c6f193bbaf...
fc80e240-e92d-4c9f-937d-00a35930971f
krypten/competitive-coding
competitive-coding/spoj/abcdef/abcdef_ac.cpp
#include <cstdio> #include <algorithm> #include <vector> using namespace std; int main() { vector <int> v; vector <int> t; vector <int> :: iterator it; int tmp; int n; int i,j,k; int ans = 0; scanf("%d", &n); for ( i = 0; i < n; i++) { scanf("%d", &tmp); v.push_back(tmp); } for ( i = 0; i < n; ...
ALGO
0.999971
3.556691
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-02-24T08:29:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "0d922e175e...
fd3f5d76-16d8-4374-9fde-9ae49532c293
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1248/Standings3/29173222_62997445.cpp
#include <bits/stdc++.h> using namespace std; #define PB push_back #define MP make_pair #define LL long long int #define FOR(i,a,b) for(int i = a ; i < b ; i++) #define RFOR(i,a,b) for(long long int i = a ; i >= b ; i--) #define FI first #define SE second const LL MOD = 10000000...
ALGO
0.999993
3.882145
{ "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": "6777c9702...
e82f0f9f-e997-4f0e-a9bb-d198dc81ad30
LarissaKolbe/Algorithm-Engineering-Git
Antworten/CodingWarmups_1/pi_monte_carlo.cpp
#include <iostream> #include <omp.h> #include <random> using namespace std; int main() { int n = 100000000; // amount of points to generate int counter = 0; // counter for points in the first quarter of a unit circle auto start_time = omp_get_wtime(); // omp_get_wtime() is an OpenMP library routine #pragma o...
ALGO
0.999755
5.680165
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2022-10-21T20:50: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": "af017321877...
712dcfb5-7088-438d-aed2-ed60f0a9f5ff
Yostita/Dispersion
Agenda dispersion cerrada/Agenda.cpp
/*----------------------------------*/ /* Practica 8. <NAME> */ /*----------------------------------*/ #pragma once #include "Agenda.h" #include "assertdomjudge.h" Agenda::Agenda(int capacidad) { assertdomjudge(capacidad>0); this->capacidad = capacidad; nombres = new string[capacidad]; telefonos = (long*)mallo...
TOOL
0.928083
4.178389
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2020-10-29T14:29: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": "3b2e04129da6...
9289fbbd-ffce-4f75-9daa-d23f2bc25739
lviala/LidDrivenCavitySolver
src/LDCpoissonSolver_Banded.cpp
#include <iostream> #include <iomanip> #include <cstring> #include <mpi.h> #include "LDCpoissonSolver_Banded.h" #define F77NAME(x) x##_ extern "C" { double F77NAME(dpbtrf) (const char& UPLO, const int& n, const int& kd, const double* AB, const int& ldab, int...
ALGO
0.998661
5.753313
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2020-02-22T12:53:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "226f5cb6...
087b9274-b7ff-402a-bf7c-2f668aae08cc
Mr-Phoebe/ACM-ICPC
比赛源码/2015 Multi-University Training Contest 07/1004.cpp
#include <cstdio> #include <algorithm> #include <cstring> const int MaxN = 200005; const int MaxM = 400005; int ax[MaxM], m; int query[MaxN][3]; int addIdToQueryId[MaxN]; int bit[2][MaxM]; inline int getId(int x) { return std::lower_bound(ax, ax + m, x) - ax + 1; } void add(int* tr, int k, int v) { while (k ...
ALGO
0.999584
4.261296
{ "github_metadata": { "branch": "master", "commit_count": 421, "repo_created_at": "2015-11-16T08:47:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a24d64...
a73bb04a-bd81-44d0-bada-4a1fe0f7f7ae
brpapa/algorithms
solutions/uva/10004.cpp
/* graphs > specials > bipartite > bipartite checking difficulty: easy date: 31/Jan/2020 by: @brpapa */ #include <iostream> #include <vector> #include <queue> using namespace std; int main() { int V; while (cin >> V) { if (V == 0) break; vector<int> adjList[202]; int E; cin >> E; ...
ALGO
0.99972
5.750787
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2019-01-25T20:40:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "099ad8...
ab89bcd1-ac59-4133-913a-e94030325b5e
Ahnaf-41M/Problem-Solving-in-Online-Judges
UVA/10765 - Doves and bombs.cpp
#include<bits/stdc++.h> #define gcd(a,b) __gcd(a,b) #define lcm(a,b) (a*(b/gcd(a,b))) #define pb push_back #define endl "\n" #define ll long long #define ull unsigned long long #define W(t) while(t--) #define rep(i,n) for(i = 0; i < n; i++) #define repit(it,type) for(auto it = type.begin...
ALGO
0.999955
3.656901
{ "github_metadata": { "branch": "master", "commit_count": 474, "repo_created_at": "2020-10-19T12:48: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": "6def1485...
badeaa82-3d7b-46c9-9f7a-abbc4c04ea66
a0kami/PA-ST
trajectoires/trajdist.cpp
#include "trajdist.h" float distEucl(Json::Value p1, Json::Value p2) { return sqrt((p1["x"].asFloat() - p2["x"].asFloat()) * (p1["x"].asFloat() - p2["x"].asFloat()) + (p1["y"].asFloat() - p2["y"].asFloat()) * (p1["y"].asFloat() - p2["y"].asFloat())); } float dtw_old(Json::Value t1, Json::Value t2) { /...
ALGO
0.998947
4.685266
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-12-06T19:35: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": "7a75f4e88...
59dbda50-335f-4084-a6d7-9ed6184a587e
amulya-pokala/File-Systems
Client.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include<string.h> #include<pthread.h> #define _WINSOCK_DEPRECATED_NO_WARNINGS #include<winsock2.h> #pragma comment(lib,"ws2_32.lib") WSADATA wsa; SOCKET s; FILE *fp, *fp1; pthread_mutex_t lock; struct sockaddr_in server; typedef struct fileMetaDat...
TOOL
0.979441
3.218887
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-06-23T04:57: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": "3c2e6c36e4...
ad6180eb-2c4d-41fb-8c8f-d8ff93ed2cf3
Tokumasu-Lab/md_fdps
generic_ext/normalize.hpp
/**************************************************************************************************/ /** * @file normalize.hpp * @brief normalize interface for position, potential, and force. */ /**************************************************************************************************/ #pragma once #include ...
TOOL
0.95607
6.009154
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2017-08-22T23:08:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0596469478...
bfb9bcb5-7c89-4c58-8da3-50d296a0d29d
Aa-Aanegola/Data-Structures-and-Algorithms
Lab/Lab8/BST.cpp
#include<bits/stdc++.h> #define long long long #define INF (long)1e16 using namespace std; struct node { long data; node *lc, *rc; }; class BST { node *root; public: BST() { root = NULL; } bool del(long data); void insert(long data); bool search(long data); long search_successor(long data); void inord...
ALGO
0.999946
3.959799
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-06-23T04:40: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": "81de16cbf3...