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
d4a0aeef-cae9-4285-b0c0-bc66d0ad6f21
trilinos/Trilinos
packages/kokkos-kernels/batched/dense/src/KokkosBatched_Eigendecomposition_Decl.hpp
//@HEADER // ************************************************************************ // // Kokkos v. 4.0 // Copyright (2022) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Governmen...
ALGO
0.990884
6.890862
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
892021bd-e270-4610-89e9-8a860f05e890
jumboRT/rt
include/rt/math/box.hh
#ifndef RT_MATH_BOX_HH #define RT_MATH_BOX_HH #include "rt/math/vector.hh" #include <limits> namespace rt { template<class T, std::size_t N> class box { public: vec<T, N> min; vec<T, N> max; box() = default; RT_DEVICE box(vec<T, N> arg) { min = arg; max = std::move(arg); } RT_DEVICE box(vec<T...
TOOL
0.984945
7.216183
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-03-20T19:03:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8ac9d5fe5...
971d05c5-ab34-4e4b-bf3b-09f4bbaae3f8
neandrey/stroustrup
Ch_06/exercise/10_permutation/permutation.cpp
#include "std_lib_facilities.h" /* План пирложения: ввод данных -запросить 2 числа -запросить перестановка или сочитание обработка -если перестановка - вычисляем перестановку -если сочитание - вычисляем перестановку и делим на b! Выводим результат */ int factorial(int val); int permutation(int a, int b); int combinat...
ALGO
0.99813
4.254208
{ "github_metadata": { "branch": "main", "commit_count": 336, "repo_created_at": "2023-02-15T09:29: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": "054ba260bd...
84de0223-c24a-4840-8f01-ad4765de0fd9
kormyshov/sandbox
AVL/main.cpp
template<class T> class AvlTree { struct Node { Node(T val, shared_ptr<const Node> left, shared_ptr<const Node> right, int height, int size): val(val), left(left), right(right), height(height), size(size) {} T val; shared_ptr<const Node> left, right; int height; int size; // nu...
ALGO
0.999518
6.491922
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2013-05-24T02:21:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aca225311...
c3c4ba6f-b444-4032-8f53-20b06a37d73c
bhushan23/BELab
NS/RSA.cpp
#include <iostream> using namespace std; int fn,PlainText,CipherText,d,e,n; bool isPrime(int n){ int i; for(i = 2; i <= n/2; ++i){ if(n % i == 0) return false; } return true; } int GCD(int a,int b){ int temp; while(b) { temp = a%b; a=b; b=temp; } return a; } void encrypt() { int i; CipherText...
ALGO
0.999916
3.701387
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2014-07-29T08:46: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": "eed025b97...
9b50b31c-f8fc-4423-a702-bb22d0cb7283
annemiekie/BlackTracer
libraries/opencv/sources/modules/imgproc/src/smooth.cpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ALGO
0.99561
4.185742
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2018-10-31T15:55:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52433ee3...
a228b84b-5b8b-495b-95b4-680f538f91b0
mostafa-saad/MyCompetitiveProgramming
Olympiad/JOI/official/JOISC/2014/2014-sp-d2-friends-sample.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cassert> #include <iostream> #include <sstream> #include <vector> #include <queue> #include <set> #include <map> #include <utility> #include <numeric> #include <algorithm> #include <bitset> #include <complex> using namespace std; typed...
ALGO
0.999968
4.201217
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2017-02-05T22:26:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 415, "forks": 85, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7105e...
980d0843-d17f-4b18-84ce-5e20ca97d2ba
luthfia-pathan/DSA_Practice
Strings/Day_10_IsoMorphic.cpp
#include <bits/stdc++.h> using namespace std; /* Given two strings s and t, determine if they are isomorphic. Two strings s and t are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with another character while preserving the order of characters. No two char...
ALGO
0.999973
6.290834
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-04-24T06:38: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": "e878088b30b...
9e0be490-eb57-4721-95f2-1a3c080ad3c4
hanueleee/cplusplus
Chapter10/chapter10-1/문제10-1-1.cpp
#include<iostream> using namespace std; class Point { private: int xpos, ypos; public: Point(int x = 0, int y = 0) : xpos(x), ypos(y) { } void ShowPosition() const { cout << "[ " << xpos << ", " << ypos << " ]" << endl; } friend Point operator+(const Point& pos1, const Point& pos2); friend Point operator-(co...
TOOL
0.996144
5.486055
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-03-09T16:46: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": "ec81b5795fe...
b7d3b2d2-5988-4d59-841c-0cb853df166a
alehay/myTrainingProjects
Cpp/exercises/string/strEx_16_PolykovP15/num_sys/num_sys.cpp
#include <iostream> #include <string> #include <vector> #include "num_sys.h" //get a number from the user with a character check // the number is represented in the writeback std::string getBigNumUser () { std::string bigStringNum; bool isInputAccept {false}; while ( !(isInputAccept) ) { std::cout ...
ALGO
0.926061
3.048967
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2020-01-12T07:52:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d20357c2f...
fdccefec-e5f7-4b28-bceb-c9bf90182c41
Nishant-k-sagar/pre-cp-journey
B_Farmer_John_s_Card_Game.cpp
#include<bits/stdc++.h> using namespace std; bool codewithlove(const vector<vector<int>>& cards, vector<int>& p, int n, int m) { int last = -1; vector<int> pos(n, 0); for(int round = 0; round < m; round++) { for(int i = 0; i < n; i++) { int cow = p[i] - 1; if(pos[cow] >...
ALGO
0.999935
4.365719
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2025-05-16T08:29: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": "d6fdba1fba...
b1442fbe-bbab-44a5-ab12-ba2a2b2892f2
magicmoo/codeforces
#707div2/D.cpp
#include<bits/stdc++.h> using namespace std; <<<<<<< HEAD #define CAS int CASE; \ ======= #define CAS ll CASE; \ >>>>>>> cfddb953762c7216ccb8bf29c2fe869489363a85 cin>>CASE; \ while(CASE--) #define YON if(flag) cout<<"YES\n"; \ else cout<<"NO\n"; <<<<<<< HEAD #define Rep(i,x,y) for(...
ALGO
0.999983
3.47291
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2021-09-06T08:07: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": "3b702e241...
c8bf636e-bfe2-4443-ad0d-0828d7faa0f8
Sanketniza/DSA-With-CPP
DSA With Sanket/Tree/Binary Search Tree/Questions/69_Search_In_BST.cpp
/* ? lecture 69 : Search in BST ? https://www.naukri.com/code360/problems/search-in-bst_1402878?count=25&page=2&search=&sort_entity=order&sort_order=ASC&attempt_status=NOT_ATTEMPTED&leftPanelTabValue=PROBLEM Problem statement There is a Binary Search Tree (BST) consisting of ‘N’ nodes. Each node of ...
ALGO
0.999995
4.900535
{ "github_metadata": { "branch": "main", "commit_count": 663, "repo_created_at": "2024-08-17T07:19:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "578f62088a...
65cba2f2-7545-4ccf-82af-a230b949ae91
kamyu104/LeetCode-Solutions
C++/k-concatenation-maximum-sum.cpp
// Time: O(n) // Space: O(1) class Solution { public: int kConcatenationMaxSum(vector<int>& arr, int k) { static const int MOD = 1e9 + 7; if (k == 1) { return max(maxSubKArray(arr, 1), 0) % MOD; } return (max(maxSubKArray(arr, 2), 0) + (k - 2) * max(accu...
ALGO
0.999894
5.915442
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
0ee34e72-b87c-4b32-be82-4e376f46cbce
Priyo002/DSA
Contests/Codeforces/Edu Round-155(Div-2)/q2.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define pb emplace_back #define setbits(x) __builtin_popcountll(x) #define zerobits(x) __builtin_ctzll(x) #define endl '\n' #define sort(X) sort(X.begin(),X.end()) const int mod = 1e9 + 7; const long long INF = 1e18; void init() { ios::sync_with_stdi...
ALGO
0.999987
3.896733
{ "github_metadata": { "branch": "master", "commit_count": 238, "repo_created_at": "2023-06-21T09:23:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78e3316e...
331bdd64-a468-4159-977a-da494fcad820
Adhamet/Problem-Solving
codeforces/Problems/476B Dreamoon and Wifi/476B.cpp
#include <bits/stdc++.h> using namespace std; #define el '\n' #define ll long long double fact(double n) { double result = 1; for (double i = 2; i <= n; ++i) result *= i; return result; } double calc(int n, int r) { if (r > n || r < 0) return 0; return fact(n) / (fact(r) * fact(n - r)); } ...
ALGO
0.999782
4.29067
{ "github_metadata": { "branch": "main", "commit_count": 798, "repo_created_at": "2022-01-29T00:47:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db84575f7f...
3f29514e-e679-4601-b138-ac15a2760c99
friedeggs/collisionsim
Sim.cpp
#include <cstdlib> #include <iostream> #include <iterator> #include <vector> #include "Ball.h" #include "Sim.h" /** Constructs a simulation of the specified dimensions. */ Sim::Sim(int dimensions, bool rotation) { dim = dimensions; rot = rotation && dim == 2; // Right now, we can only do rotation in 2D t...
ALGO
0.999775
6.550788
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2014-09-29T15:04: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": "a99059b04...
f141e978-419a-41ed-9462-f78d4e5341e8
uma-pi1/DSGDpp
mf/matrix/op/crossprod.h
// Copyright 2017 <NAME> // // 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 law ...
ALGO
0.999748
6.694749
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2016-11-14T18:55:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1db337390...
417209e6-a3b2-4f48-8984-fe00a59dfbf2
inf-eth/i02-0491-courses
1301 - Programming for Engineers II - Spring 2013/Course Progression/PII-Spr2013-35-Computation_Order_Insertion_Sort_Binary_Search-20-04-2013/PII-Spr2013-35-Computation_Order_Insertion_Sort_Binary_Search-20-04-2013.cpp
\begin{lstlisting}[caption={Insertion Sort},escapechar=$] #include <iostream> #include <cstdlib> using namespace std; // Swapping function using reference. void Swap(int& x, int& y) { int temp = x; x = y; y = temp; } int main() { const int Size = 5; int data[Size]; // Storing random numbers in range 0-99 in da...
ALGO
0.999987
4.825828
{ "github_metadata": { "branch": "master", "commit_count": 580, "repo_created_at": "2015-11-15T08:44:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a66dfea5...
82265e10-4854-4e96-a7b5-5249d28ba889
abidurrahman11/programming-problem-solving
DZY Loves Chessboard.cpp
#include<iostream> // #include<bits/stdc++.h> // #include<set> // #include<vector> // #include<map> // #include<algorithm> using namespace std; #define ll long long #define nl "\n" #define ws " " #define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL); #define MOD 1000000007 int main () { int n, m; cin...
ALGO
0.999971
3.767354
{ "github_metadata": { "branch": "master", "commit_count": 390, "repo_created_at": "2022-07-30T03:37:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6bb3f3ae...
eed9bca6-3d53-47c0-9ce3-cf5a200e699b
simanstar/StarTL
test/test_leetcode.cpp
// // Created by simanstar on 17-4-22. // #include <iostream> #include <time.h> #include <vector> #include <MessageHeader.h> #include "OrderPush.h" #include "oms_api.h" #include <bitset> #include <algorithm> #include <stack> using namespace std; using namespace oms; int firstMissingPositive(int* nums, int numsSize) {...
ALGO
0.995124
3.86064
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-09-13T07:58:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f083d2ebf...
d5c0a6ce-a8d5-43f1-8397-6ceeb9b1816b
Balaram6712/Sem-4
IDS/Assign-6/ES18BTECH11011-Assignment-6.cpp
#include<iostream> #include<stdio.h> #include<malloc.h> #include<limits.h> #include<string.h> #include<cstdio> #include<fstream> #define MAX 100000 using namespace std; int count = 0; struct node { int val; struct node *left; struct node *right; struct node *parent; }; //node in the tree with parent link,lef...
ALGO
0.999708
3.854872
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-07-16T09:14: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": "200d4e205...
022692c9-91b6-420f-bf4b-09c75080bb69
TeoMoisi/PPD
dsm.cpp
#include <mpi.h> #include <iostream> #include <mutex> #include <vector> #include <queue> #include <thread> #include <unistd.h> #include <ctime> using namespace std; struct ChangeInfo{ int senderId; int variable; int value; int compare; }; int procId, processesNumber; int memory[5][5]; bool done = false; queue<C...
ALGO
0.994894
4.532237
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-11-20T21:03: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": "3106155b28...
39f759b5-c43c-4e86-b560-9dd4af6a406d
QuwsarOhi/CodeTree
catagory/data structure/segment tree/multidimention compression SegTree.cpp
// SPOJ - IOPC1207 // http://www.spoj.com/problems/IOPC1207/ // Segment Tree #include <bits/stdc++.h> using namespace std; #define MAX 110000 #define EPS 1e-9 #define INF 1e7 #define MOD 1000000007 #define pb push_back #define mp ...
ALGO
0.998124
3.988908
{ "github_metadata": { "branch": "master", "commit_count": 816, "repo_created_at": "2016-12-02T12:39:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04e3b497...
72e6be0b-fdae-4e3d-b251-d751f58915d1
tablopart2/DERIV_SHB
SingleOption/ext/k_BasicIRD.hpp
#ifndef KDB_BASICIRD_H #define KDB_BASICIRD_H #include "kdb_date.hpp" #include "kdb_swap_exact_schedule.hpp" /*******************************************************************************************/ /* Program Name : kdb_BasicIRD.hpp /* Version : 0.0.0.0 /* Author : <NAME> <NAME> /* Date : Sep. 1, 2010 /* Modifie...
ALGO
0.998149
3.484942
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-06-12T05:17: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": "7147199d5...
b05f463f-9627-4ddc-a88c-6642c72a2c23
souparna21/dsa-questions
01-basic-math/11-computing-power.cpp
/* Computing Power INPUT: x=2, n=3 OUTPUT: 8 INPUT: x=3, n=4 OUTPUT: 81 INPUT: x=5, n=0 OUTPUT: 1 */ /* ---------------------- Brute force solution --------------------*/ /*---Time complexity: O(n), Space Complexity: O(1)----*/ /* #include <iostream> using namespace std; int computePower(int a, int n) { ...
ALGO
0.99999
6.27811
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2021-07-02T06:34:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f627ca38...
0a7e9bb1-5af2-4ade-af75-27333dad0cc3
ishandutta2007/codeforces-i
imeimi/normal/849/B.cpp
#include <iostream> #include <algorithm> using namespace std; typedef long long llong; struct frac { int b, a; bool operator==(const frac &p) const { return (llong)a * p.b == (llong)b * p.a; } bool operator<(const frac &p) const { return (llong)a * p.b > (llong)b * p.a; } frac() {} frac(int b, int a) : b(b...
ALGO
0.999997
4.200484
{ "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": "b8d19bfd9e9e...
21512b77-d2cf-49c9-974a-a47d2b7406a9
XiaoBaiiiiii/colmap-pcd
src/base/essential_matrix.cc
// Copyright (c) 2023, ETH Zurich and UNC Chapel Hill. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright // notic...
ALGO
0.999722
5.796147
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-02-07T02:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 499, "forks": 62, "issues": 22, "pull_requests": 0 }, "file_meta": { "content_id": "b43ec66...
45a34ab2-de85-4f68-8b38-231c8467f4c7
olucasmoro/data_structure-ordination-recursion-search
src/c++/data_structure/max_heap/MaxHeap.cpp
#include "MaxHeap.h" MaxHeap::MaxHeap(int max) { h = new int[max]; //Alocando o vetor numElementos = 0;//Heap vazio this->max = max; } MaxHeap::~MaxHeap() { delete[] h; } void MaxHeap::subir(int indice) { int j; if (indice > 0)//Tem pai { //Calculo o índice do pai j = (indice - 1) / 2; //Verifica se o...
ALGO
0.97978
4.672553
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2020-10-31T20:38: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": "85e5654165e6...
f4ea1ea1-7b2d-4b99-97f4-29b5bb9db61d
hehe520/Data-structure-and-algorithm
海量数据处理/外部归并排序 - 分治.cpp
// 对 2 亿个数字进行排序, 约 10 G 的文件, 每个数字 int 能表示 // 算法流程 // 将 10 G 的文件散列到 300 个文件中, 每个文件大约 35 MB // 对 35 MB 的小文件内部排序, 或者分发到多台计算机中, 并行处理 MapReduce // 最后使用最小堆, 进行 300 路归并排序, 合成大文件 // 再写一个算法判断 2 亿个数字是否有序 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <io.h> #include <queue> #define FILE_NUM 300 // 哈希文件数...
ALGO
0.999691
4.076069
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-08-12T00:51:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 160, "forks": 76, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3d14f1...
e2dd4ce3-efd5-4fef-9420-1e216b79b462
anandshivam44/competetive-programming
Cavity_Map.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } const ll mod = 1000000007; const ll inf = 1e18; #define all(x) begin(x), end(x) #define loop(i, n) for (int i = 0; i < n; i++) #define print_array(arr) \ l...
ALGO
0.999976
3.545557
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2020-03-30T15:42:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1f40bdfa...
5d225fad-f931-4e6d-a7e0-4c12ef21b57f
mattjr/benthicQT
util/UF-3.2/Navigation/ufGreatCircle.cpp
// // C++ Implementation: GreatCircle // // Description: // // // Author: <NAME>, (C) 2009 // // Copyright: See COPYING file that comes with this distribution // // #include "ufGreatCircle.h" #include <cmath> using std::sin; using std::asin; using std::cos; using std::acos; using std::abs; using std::pow; using std:...
ALGO
0.980425
5.48345
{ "github_metadata": { "branch": "master", "commit_count": 210, "repo_created_at": "2013-05-28T05:54:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5413c2f9...
1698e595-bfbc-4e49-a399-48e010689be7
Mau-MD/Competitive-Programming
11 Algorithms/Articulation Point/main.cpp
#include <bits/stdc++.h> using namespace std; const int maxN = 3002; vector<int>adj[maxN]; int low[maxN], disc[maxN], parent[maxN]; bool v[maxN], ap[maxN]; int tim; void init() { tim = 0; for (int i=0;i<maxN;i++) { v[i] = ap[i] = false; adj[i].clear(); parent[i] = -1; low[...
ALGO
0.999977
4.340688
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-01-25T04:02: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": "1456084b73...
c8760ef4-45ba-41fa-b2bb-6a8a6e7527a2
amarjilani/Cellular-Automata
examples/include/Traffic.h
#include "CarCell.h" #include "CellularAutomata.h" #ifdef DEBUG #define DEBUG_MSG(str) \ do { \ std::cout << str << std::endl; \ } while (false) #define FLATODDS 10000000 #else #define DEBUG_MSG(str) \ do { \ } while (false) #endif #ifndef FLATODDS #...
ALGO
0.99808
5.983844
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2023-11-20T21:40:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab78a6aad96...
1808218e-bfba-44fd-a0c5-6e7161680ff6
daemon/fizzbuzz
fizzbuzz.cpp
// Compile-time fizzbuzz. // g++ -std=c++11 [-DFIZZBUZZ_N=x] [-ftemplate-depth=x+2] fizzbuzz.cpp // Fizzbuzzes from 1 to FIZZBUZZ_N, which defaults to 100. #include <iostream> #include <type_traits> template<int A, int B> struct greater_than { static constexpr bool value = A > B; }; template <int A, int B> struct d...
CONFIG
0.997206
6.294752
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-12-29T01:34: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": "5f8344c120...
ad330405-1572-4eb2-9000-b6862bbccef0
thejkane/AGM
boost/graph/distributed/triangle_counting_sucsuc.hpp
// Copyright (C) 2018 <NAME>, <NAME>, <NAME>. // Boost Software License - Version 1.0 - August 17th, 2003 // Permission is hereby granted, free of charge, to any person or organization // obtaining a copy of the software and accompanying documentation covered by // this license (the "Software") to use, reproduce, dis...
ALGO
0.997881
5.653972
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2018-02-18T21:10:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3cfdbd462...
79d22846-73fb-4cfc-abb8-db5609d25a6e
AndreiMateescu/LaboratoriesOOP
lab7/complexe lab7.cpp
#include<iostream> #include<cmath> #include<cstdlib> #pragma once using namespace std; class Complexxx{ private: int real; int imaginar; public: Complexxx(){ this->real = 0; this->imaginar = 0; } Complexxx(int real){ this->real = real; this->imaginar = 0; } ...
ALGO
0.999909
4.500698
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-04-18T10:53: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": "40acb278fa...
75dfc50c-2bd6-45fd-a2db-d51dcd30d513
vaishalivala17/Daily_Looping_Tasks_CPP
cashier.cpp
#include <iostream> using namespace std; int main(){ int amount; cout << "Enter the money value for exchange : " ; cin >> amount ; int array[10] = {2000, 500, 200, 100, 50, 20, 10, 5, 2, 1}; cout << "The curruncy you recieve is : " << amount << endl ; for (int i = 0; i < 10 ; i++){ ...
ALGO
0.997598
3.13728
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2025-07-15T15:15: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": "9aa7265909a...
61711fd6-4ddc-4129-95f4-3c420e37ab12
mrklein/mousse
0.1.0/src/finite_volume/fv_mesh/wall_dist/near_wall_dist_no_search.cpp
// mousse: CFD toolbox // Copyright (C) 2011-2015 OpenFOAM Foundation // Copyright (C) 2016 mousse project #include "near_wall_dist_no_search.hpp" #include "fv_mesh.hpp" #include "wall_fv_patch.hpp" #include "surface_fields.hpp" // Private Member Functions void mousse::nearWallDistNoSearch::doAll() { const volVecto...
ALGO
0.998766
5.743729
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2015-12-31T10:07:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c8464dd8...
d10eb2d5-fc8d-4301-abb9-51b9da266591
pedromartins28/ialg-2021-1
REO4/Lista 1/04.cpp
#include <iostream> using namespace std; #include <iostream> using namespace std; int aux=0, aux2=0, aux3=0, i=0, fib=0, vet[100]; int calc(int x){ if(i==0 and i<x){ fib = 1; vet[i] = fib; i++; calc(x); } else if(i==1 and i<x){ fib = 1; vet[i] = fib; ...
ALGO
0.999926
3.930757
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-02-20T15:31: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": "805e0d4f1995...
b11ca27c-76d2-4002-9b9c-975c404393ea
KF8311/COMP2011
L4/while-power.cpp
#include <iostream> /* File: while-power.cpp */ using namespace std; int main() /* To compute x^n where x and n are integers and n > 0 */ { int x; // The number int n; // Power or exponent int result = 1; // Final result = x^n cout << "Enter a number followed by its power: "; cin >> x >> n; ...
ALGO
0.999641
5.554008
{ "github_metadata": { "branch": "main", "commit_count": 167, "repo_created_at": "2025-02-04T00:20: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": "5287f4d90b...
f6a166cd-449d-4dd9-8369-a50a49c5eec7
Edragon/Arduino-main
libraries/MySensors/hal/crypto/AVR/MyCryptoAVR.cpp
/* * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * netw...
TOOL
0.965181
5.713046
{ "github_metadata": { "branch": "master", "commit_count": 170, "repo_created_at": "2017-10-19T10:10:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 24, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "a619c76...
bc34affa-e350-4882-af20-754e0b17500d
RahimShekh/Problems-Assignment
Assignment30_3.cpp
/*Write a program which accept 2 strings from user and check whether first N contents of 2 strings are equal or not.(implement strcmp()) input: Rahimshekh Rahimshpy 5 8 output:True false */ #include<iostream> using namespace std; bool Strcmp...
ALGO
0.998696
3.73377
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-08-29T10:28: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": "275ebfa00d2...
4bd35494-ddb4-4c63-bdc9-6cbd9d57cb1a
my4-dev/atcoder
11_beginner100/1_全探索_Close/1/A_q3.cpp
#include<iostream> #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) using P = pair<int,int>; /* 大文字を小文字に変換 */ char tolower(char c) {return (c + 0x20);} /* 小文字を大文字に変換 */ char toupr(char c) {return (c - 0x20);} // if('A'<=s[i] && s[i]<='Z') s[i] += 'a'-'A'; /* s...
ALGO
0.999673
3.310061
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-12-01T11:16:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a16fe9cda1...
69a81343-e5f1-4a6c-a044-16df275281c1
PatrickMeng97/Project3002
DTW.cpp
#include"DTW.h" #include"distance.h" #include"bmp_image.h" #include"zncc.h" DTW::DTW() { Ymax = Ymax = X = NULL; } DTW::DTW(int Ymin, int Ymax, int X){ this->Ymax = Ymax; this->Ymin = Ymin; this->X = X; } double DTW::cosDTW(BMP_Image **data1, BMP_Image**data2){ Distance dist; float P_XY[100][100]; /...
ALGO
0.999363
4.561054
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-05-06T13: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": "c43c8818eb...
e28a29c3-1042-4f4c-ba09-b6f9cc8982c2
EasonQiu/LeetCode
498_Diagonal Traverse.cpp
// Given a matrix of M x N elements (M rows, N columns), return all elements of the matrix in diagonal order as shown in the below image. // Example: // Input: // [ // [ 1, 2, 3 ], // [ 4, 5, 6 ], // [ 7, 8, 9 ] // ] // Output: [1,2,4,7,5,3,6,8,9] // Explanation: // Note: // The total number of elements of the gi...
ALGO
0.999981
6.440621
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-10-29T13:50: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": "9d8149695...
b099c574-5af3-4cb9-aa64-87d5b78c5c0d
malavassi/Gladiators
LinkedList.h
// // Created by cvaz on 22/04/19. // #ifndef GLADIATORS_LINKEDLIST_H #define GLADIATORS_LINKEDLIST_H #include "Node.h" #include <cstdlib> #include <ctime> #include <iostream> using namespace std; template <typename T> class LinkedList { public: LinkedList(){ head = nullptr; tail = nullptr; ...
TOOL
0.904945
4.109192
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2019-04-16T03:45: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": "c7a5db8d0...
31b7ac96-94a2-4b85-b7fb-f545667682a0
egormkn/ifmo-kt
course1/algorithms/5_graphs/M_cond.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <unordered_set> using namespace std; FILE *fin = fopen("cond.in", "r"); FILE *fout = fopen("cond.out", "w"); const int MAXN = 20000 + 1; int n, m; vector<int> g[MAXN], gr[MAXN]; unordered_set<int> edges[MAXN]; vector<char> used; vector<int> order, com...
ALGO
0.99987
4.505405
{ "github_metadata": { "branch": "master", "commit_count": 204, "repo_created_at": "2016-02-17T20:10:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "17e86a6...
3729f97d-a90e-43f6-96c1-db95d1963867
alexandraback/datacollection
solutions_5644738749267968_1/C++/srh/main.cpp
#include <algorithm> #include <iostream> #include <vector> int main() { int T; std::cin >> T; for (int casenum = 1; casenum <= T; ++casenum) { int N; std::cin >> N; std::vector<double> naomi(N); for (int i = 0; i < N; ++i) { std::cin >> naomi[i]; } std::vector<double> ken(N); fo...
ALGO
0.99992
3.87286
{ "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": "0d4b61b86...
00fcf56a-f4ba-4596-9db4-6713286e22b5
kryptonite43/Algorithm_study
ICOTE/Binary Search/7-2.cpp
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; int binarySearch(vector<int>& arr, int target, int curmax, int start, int end) { if (start > end) return curmax; int mid = (start + end) / 2; long long int sum = 0; int begind = lower_bound(arr.begin(), a...
ALGO
0.999995
3.756074
{ "github_metadata": { "branch": "main", "commit_count": 171, "repo_created_at": "2023-05-30T14:40:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b55d03e4f...
e653da9b-2c07-4f5b-b9c9-e9175855cc67
Geant4/geant4
source/global/HEPNumerics/include/G4AnalyticalPolSolver.hh
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
ALGO
0.995155
4.794583
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2016-06-21T08:25:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 705, "forks": 340, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "eb35a9...
3d3ed7e4-22b3-420f-8f7d-f65a896f8273
umar-07/Competitive-Programming-questions-with-solutions
1358_A/main.cpp
#include <bits/stdc++.h> #define ll long long int #define debug(x) cerr << #x << " is " << x << " "; #define mod 1000000007 #define endl "\n" #define fast_input ios_base::sync_with_stdio(false); cin.tie(NULL); using namespace std; int main() { int t; cin >> t; while(t--) { ll n, m; cin ...
ALGO
0.999983
4.126772
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-06-16T18:13: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": "db78c12560b3...
5710869f-9ebc-4175-bc58-300869dee63c
lam3082004/Code_in_thptchuyen.ntucoder.net
PICKNUM/PICKNUM.cpp
// Cho một dãy số nguyên a1, a2, a3, ..., an (3 ≤ n ≤ 1000, |ai| ≤ 109 // , với mọi i = 1, 2,..., n). // Yêu cầu: Đếm số cách chọn ra một dãy số gồm M phần tử (1 ≤ M ≤ N). Hai dãy số được gọi là // khác nhau nếu tại cùng một vị trí, giá trị 2 phần tử của 2 dãy là khác nhau. // Dữ liệu vào: // - Dòng đầu ghi 2 số n, m...
ALGO
0.999992
4.026151
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2021-07-21T15:04:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "7296d1aea...
eaa64a06-1c8f-484e-a459-d800320e9f9f
WeichenXu/shuati
542_01_matrix.cpp
#include <iostream> #include <vector> #include <queue> // Use BFS // 1. enqueue all '0' // 2. update neighbours, enqueue if it is not visited using namespace std; class Solution { public: vector<vector<int>> updateMatrix(vector<vector<int>>& matrix) { vector<vector<int>> directions = { {1,0},...
ALGO
0.999984
5.837888
{ "github_metadata": { "branch": "weichen", "commit_count": 121, "repo_created_at": "2016-10-19T18:06:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2038bf4...
20ba6679-a3ce-4445-ad74-16ddc6a8293c
huangallen2008/cppcode
code/競賽/codeforces/Codeforces Round 983 (Div. 2)/C.cpp
#include<bits/stdc++.h> using namespace std; // #pragma GCC optimize("Ofast,unroll-loops,fast-math") // #pragma GCC target("avx2,sse4,bmi,popcnt") #define int long long #define REP(i,n) for(int i=0;i<(n);i++) #define REP1(i,n) for(int i=1;i<=(n);i++) #define RREP(i,n) for(int i=(n)-1;i>=0;i--) #define RREP1(i,n) for(in...
ALGO
0.999919
4.658495
{ "github_metadata": { "branch": "main", "commit_count": 21357, "repo_created_at": "2024-06-07T09:21: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": "a62c43ae...
e0c4d401-165c-4d0e-8730-7117417915dd
Zumaks/RPI-Data-Structures-Coursework
Homework_6/testing.cpp
#include <iostream> #include <vector> #include <string> using namespace std; void generateCombinations(vector<string>& strVec, int groupLength, vector < vector < string> > &groups) { int numStrings = strVec.size(); if (numStrings < groupLength) { cout << "Error: group length is greater than the numbe...
ALGO
0.999926
5.625605
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2023-12-21T10:13:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2eb301863e...
cf7715c4-8f6b-4a5d-bea6-a3fc35181b1f
RoysamLab/Farsight-toolkit
Tracing/ftl2d/ftl2d_SuperEllipsoid2D.cxx
/*========================================================================= Copyright 2009 Rensselaer Polytechnic Institute 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/lice...
ALGO
0.977035
4.386805
{ "github_metadata": { "branch": "master", "commit_count": 4231, "repo_created_at": "2015-09-25T21:21:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b42df4...
e3b6b561-d50d-48b0-95e0-08893d516bb3
Akg-0007/leetcode-solutions
4. Find the number of islands - GFG/4.-find-the-number-of-islands.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to find the number of islands. void check(vector<vector<char>>& grid,int m,int n,int i,int j,int dx[],int dy[]){ if(i<0||j<0||i>=m||j>=n ||grid[i][j]=='0')return ; ...
ALGO
0.999803
6.638956
{ "github_metadata": { "branch": "main", "commit_count": 522, "repo_created_at": "2022-01-22T03:53: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": "9d267f814d...
de9228c9-aed1-49ca-8a5f-e788f5bcdb01
ChromiumWebApps/chromium
media/base/channel_mixer.cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // MSVC++ requires this to be set before any other includes to get M_SQRT1_2. #define _USE_MATH_DEFINES #include "media/base/channel_mixer.h" #inclu...
TOOL
0.914109
7.137541
{ "github_metadata": { "branch": "master", "commit_count": 260366, "repo_created_at": "2014-02-21T14:19:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 231, "forks": 307, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "eb...
26397c9c-7eba-4d4d-9a78-ef88a7fdd8b9
ojj1123/algorithm
백준/Gold/7579. 앱/앱.cc
// Backtracking 풀이 #include <math.h> #include <algorithm> #include <iostream> #include <map> #include <queue> #include <string> #include <utility> #include <vector> using namespace std; #define endl '\n' #define X first #define Y second int N, M, totalCost; int m[105]; int c[105]; int dp[10005][105]; void init(); ...
ALGO
0.999999
3.706791
{ "github_metadata": { "branch": "main", "commit_count": 149, "repo_created_at": "2023-06-28T02:49:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "29d0bdeb9d...
548097b3-b17d-4439-ad96-6cd5a2038842
byronsharman/aoc2023
08/day08_2.cpp
#include <bits/stdc++.h> #include <execution> using namespace std; typedef unsigned long long ull; int main() { string lr; cin>>lr; unordered_map<string, pair<string, string>> nodes; string throwaway, from, l, r; getline(cin, throwaway); getline(cin, throwaway); string line = "not empty...
ALGO
0.999579
4.517455
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-12-01T05:57: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": "557349d1d94...
c4fdc84f-5c65-4e6f-b85d-2ae9b9c3d081
erwincoumans/experiments
dynamics/corotational_fem/OpenTissue/core/geometry/geometry_tetrahedron_slicer.h
#ifndef OPENTISSUE_CORE_GEOMETRY_GEOMETRY_TETRAHEDRON_SLICER_H #define OPENTISSUE_CORE_GEOMETRY_GEOMETRY_TETRAHEDRON_SLICER_H // // OpenTissue Template Library // - A generic toolbox for physics-based modeling and simulation. // Copyright (C) 2008 Department of Computer Science, University of Copenhagen. // // OTTL is ...
ALGO
0.973226
6.365917
{ "github_metadata": { "branch": "master", "commit_count": 443, "repo_created_at": "2011-05-31T01:15:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 132, "forks": 26, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "0cc7a...
ba500ae9-4d86-46b0-98e1-ce0224727b40
telegramdesktop/tdesktop
Telegram/SourceFiles/mtproto/details/mtproto_dc_key_creator.cpp
/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "mtproto/details/mtproto_dc_key_creator.h" #include "mtproto/details/m...
ALGO
0.995378
6.557832
{ "github_metadata": { "branch": "dev", "commit_count": 20212, "repo_created_at": "2014-05-02T12:36:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 28045, "forks": 5682, "issues": 877, "pull_requests": 29 }, "file_meta": { "content_id": "...
6302c1c5-5999-477e-ab3d-e5b8eec134f7
ChipChoped/Projet-Recherche-Documentaire
src/BTree.cc
#include "BTree.hh" BTree::BTree(int minDegree): _root(BTreeNode(minDegree, true)), _minDegree(minDegree) {} void BTree::traverse() { if (_root._degree) _root.traverse(); } int BTree::search(const std::string& word) { if (_root._degree == 0) return 0; else return _root.sea...
ALGO
0.991362
4.167048
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2022-09-19T09:43:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "538f967d29b...
b9d1189e-5095-4bd0-af9b-3449df37b2ac
SaladRaider/ir_ke_ko_abstraction
src/2nd_round/main.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <sstream> #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <string> #include <array> #include <algorithm> #include <math.h> #include "secondround.h" int main() { unsigned long T; size_t numProcesses; ...
DATA
0.994075
3.515355
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2020-04-16T11:11: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": "1c80df56c...
71f8cf72-6612-404c-9300-e4c473c54645
gshovkoplyas/ITMO
Discrete Math/SegmentTree/crypto.cpp
/*<NAME> in the house*/ #define _CRT_SECURE_NO_WARNINGS #include<cstdio> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<string> #include<vector> #include<map> #include<set> #include<cstdlib> #include<ctime> using namespace std; #define taskname "crypto" int r; struct matrix2x2 ...
ALGO
0.999971
4.015059
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2014-04-01T20:46: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": "43797ae17...
2f221462-eb35-4136-9221-eb11d784beff
evggenshch/LR_1_Analyzer
Analyzer.cpp
#include <cstdio> #include <cstdlib> #include <string> #include <cstring> #include <vector> #include <algorithm> #include <iostream> using namespace std; class rule { public: char left_part; string right_part; rule() { } rule(char l_str, string r_str) { left_part = l_str; right_part = r_...
ALGO
0.99981
3.243237
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-06-13T16:33: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": "44a0f9ab62...
ea693356-5f7f-42b8-aa46-7a0e4aabf6c9
jazpuli/filesAndPointers
A2filesAndPointers.cpp
//input inclusions as needed #include <iostream> #include <vector> #include <string> #include <fstream> #include <sstream> #include <cctype> #include <algorithm> using namespace std; //create student class with name and grade class Student { public: string name; vector<double> grades; }; //create findMax to thow ...
ALGO
0.996269
6.163479
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-15T03:48: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": "777ea01bbc22...
9e79f2be-1cd7-4ef3-8a80-b8f0cb97423f
Anuradha021/DSA
Array/array2/STL_C++/Node/firstNode.cpp
#include<iostream> using namespace std; class Node{ public : int data ; Node* next ; Node(int data ){ this->data = data ; this->next = NULL; } }; void inseartAtHead(Node* &head, int d){ Node* temp =new Node(d); temp->next = head;//here we create a node temp which next part c...
ALGO
0.999362
4.99803
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-01-08T17:48: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": "f68ee126fe4...
ee704eda-83a1-43ec-b071-45f22b422b85
AlmazNasibullin/algorithms-and-data-structures
Task4/Prima.h
#include <vector> #include <limits> #include <map> #include <set> using std::vector; using std::set; using std::multimap; using std::numeric_limits; using std::pair; using std::make_pair; void Prima(vector<pair<double,double> >& points, vector<int>& pred) { int size = static_cast<int>(points.size()); vector<double>...
ALGO
0.999972
4.832592
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-02-11T14:00: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": "97bac6e622...
d22fcee6-f97c-46e8-bb4e-32e05852022c
Kenzo-Sugai/MaratonaSBC-codes
Zero Maratona de Programação 2022/Avaliacao_de_Algoritmos.cpp
#include <iostream> #include <vector> #include <string> using namespace std; struct aluno { string nome; double media; }; int main(){ int N; string nome, nota; cin >> N; if(cin.peek() == '\n') cin.ignore(); while(N--){ int menor = 10, idx; getline(cin, nome); getline(cin, nota); st...
ALGO
0.999433
4.029785
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2023-03-10T12:52:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a24c73c6a...
303a013d-e352-49d3-98de-cb1aed22e2cd
Official-Satyam-Tiwari/MC_Codes
10_Fun_Stuff/OptimalBestCandidate.cpp
#include <iostream> #include <TRandom3.h> #include <TGraph.h> #include <TCanvas.h> #include <TAxis.h> #include <TStyle.h> #include <TMath.h> using namespace std; int best_candidate(int n = 100) { TRandom3 random; random.SetSeed(0); int ranks[n]; // Randomly assign ranks to candidates for (int i ...
ALGO
0.999886
5.700979
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2025-03-02T03:26:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95caec45c1a...
e2b02419-7b92-40b4-97bd-510cfb7ae0b2
iyeddh/tp
tp3/ex5_map.cpp
#include <iostream> #include <unordered_map> #include <string> #include <tuple> using namespace std; // Définition du type pour représenter une ville using Ville = tuple<string, double, double>; // Fonction pour ajouter une ville à une unordered_map void ajoutVille(unordered_map<string, Ville>& mapVilles, const Vill...
TOOL
0.908069
5.411525
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-08T17:13: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": "eb1c6c0f802f...
a47ad327-2b55-4be4-915a-01ab7c537726
yigittin/Leet-Solves
Easy Problems/palindromeLinked.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* revers...
ALGO
0.999485
6.008733
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-06-20T22:13: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": "887e54ae1...
c7b21cd0-d984-4544-b7f6-15fab73b6433
Hzhiwei/Leetcode
Median of Two Sorted Arrays/MedianofTwoSortedArrays.cpp
// oj1.cpp: 定义控制台应用程序的入口点。 // /* There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays.The overall run time complexity should be O(log(m + n)). Example 1: nums1 = [1, 3] nums2 = [2] The median is 2.0 Example 2 : nums1 = [1, 2] nums2 = [3, 4] The media...
ALGO
0.999919
4.949037
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-09-21T01:02:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5deb78f51...
2e06c8de-bd11-4079-99a2-0b83f2dce1b6
qw225967/Bifrost
worker/third_party/libns3/src/internet/model/tcp-bic.cc
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2014 <NAME> <<EMAIL>> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is ...
ALGO
0.905903
6.681543
{ "github_metadata": { "branch": "main", "commit_count": 181, "repo_created_at": "2022-03-11T06:01:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 98, "forks": 28, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "78d0bfed...
e0373b0b-ae0c-497a-a123-b6b76eef3b31
LovkashGarg/Leetcode
2868-continuous-subarrays/2868-continuous-subarrays.cpp
class Solution { public: long long continuousSubarrays(vector<int>& nums) { int l = 0; // Left pointer for the window int r = 0; // Right pointer for the window long long count = 0; deque<int> minDeque; // To maintain minimums deque<int> maxDeque; // To maintain maximums ...
ALGO
0.999823
5.940308
{ "github_metadata": { "branch": "main", "commit_count": 2065, "repo_created_at": "2024-08-06T09:27:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "182d673ac...
afe2ddfa-c06c-4abe-8011-d978fdf1f1e1
chenzt2020/foc_learning
1.foc+svpwm/foc.h
#ifndef FOC_H #define FOC_H #include <cmath> #include <cstdint> class FOC { public: float u_d; float u_q; float theta; float u_alpha; float u_beta; float t_a; float t_b; float t_c; float i_a; float i_b; float i_c; float i_alpha; float i_beta; float i_d; float i_q; void ipark() { ...
ALGO
0.999667
6.182482
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-04T04:29:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 51, "forks": 24, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c7130b41ff...
1a9a00c5-315a-4225-9ef6-598d642080c0
tristan/project-euler-code
0023.cpp
#include <iostream> #include <vector> #include <functional> #include <fstream> #include <set> #include <array> #include <cmath> int d(int n) { int r = 0; //std::cout << n; for (int i = 1; i <= std::sqrt(n); i++) { if (n % i == 0) { //std::cout << " " << i; int x = n / i; if (x == n || x == ...
ALGO
0.999682
4.721526
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2008-12-12T06:35:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be6cf7a4a...
5fa2bb3a-949a-432f-b6d5-5b645eba63e6
jjkaddoura/CS130B_Closest_Pair
closestPair.cpp
#include <iostream> #include <fstream> #include <float.h> #include <cmath> #include <vector> #include "closestPair.h" using namespace std; int main(int argc, char* argv[]) { answers.clear(); pointsArr = new Point[MAX_ARRAY_SIZE]; string algorithmChoice; bool firstCoordinateOfPoint = true; string line; string...
ALGO
0.99974
4.790263
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-01-21T23:34: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": "6c08c23d0e...
3cb2d0bf-0946-4fac-88c4-12625595632d
minh47857/CPlusPlus
Contest/cohuong/contest5/ORCHID.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define ll long long #define pb push_back #define pi pair<int , int> const ll N = 100005 , MOD = 1e9 +7 , inf = 1e15; void file() { freopen("ORCHID.inp" , "r" , stdin); freopen("ORCHID.out" , "w" , stdout); ios::sync_with_stdio(0); cin....
ALGO
0.999986
4.522227
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-10-16T15:16: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": "7f45a61c4c...
55b73ec1-d809-4970-a33d-201f3f92ac66
nian0122/CODE
datastruct/Tree/BiTree.cpp
#include <iostream> #include <queue> typedef int Elemtype; typedef struct BiNode{ Elemtype data; struct BiNode *lchild, *rchild; }BiNode, *BiTree; BiTree CreateBiTree() { return NULL; } void InsertNode(BiTree &T, Elemtype x){ if(!T){ T = new BiNode{ x, nullptr, ...
ALGO
0.99996
5.624541
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-11-05T11:38:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2ebd0e1fa6...
1c7bd533-5834-4284-9c1b-7e10d8cb858c
Kyle-Franz-Rodriguez/DSA-CPE010-CPE21S4
HOA7/selectionsort.h
#include <iostream> template <typename T> int Routine_Smallest(T A[], int K, const int arrSize); //General Algorithm //Selection Sort (Array, Size of Array) template <typename T> void selectionSort(T arr[], const int N) { int POS, temp, pass=0; //Step 1: Repeat Steps 2 and 3 for K = 1 to N-1 for(int i = 0; i < N; ...
ALGO
0.999733
5.772154
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2024-08-12T06:36:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0500eefcb6e...
2d9d88c1-b910-48d6-af3e-8643486ad4c5
moinulshaon/UVa-Problems
vol 13/1393/1393.cpp
#include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <bits/stdc++.h> using namespace std; using namespace __gnu_pbds; typedef long long LL; typedef tree< int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; //find_by_order //ord...
ALGO
0.999828
3.946696
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2016-07-05T15:35:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "494108b2f...
b1b18289-2932-409e-b042-3447afe06d60
akhlaqueak/parallel-kcore
kcore/publish/src/ours-prefetch2.cc
__global__ void selectNodesAtLevel32(unsigned int *degrees, unsigned int level, unsigned int V, unsigned int *bufTails, unsigned int *glBuffers) { __shared__ unsigned int *glBuffer; __shared__ unsigned int bufTail; if (THID == 0) { bufTail = 0; glB...
ALGO
0.999807
3.755554
{ "github_metadata": { "branch": "main", "commit_count": 2063, "repo_created_at": "2022-07-06T14:55: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": "15021074a...
a55f09d2-81e3-4abc-b696-203e3871f65c
hibbah/ProblemSolving
Problem/BOJ_3653_MovieCollection.cpp
/********************************************************************************** 2015.05.11 https://www.acmicpc.net/problem/3653 - title : Movie collection (ACMICPC_Regionals_Europe :: NWERC 2011 - C) - input : 1. the number of DVD (N <= 100,000) 2. the number of Query (M <= 100,000) 3. the order of the DVD t...
ALGO
0.999947
4.331879
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2014-11-05T13:25:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ade8ffe48...
0debd756-c5a7-4672-9110-e2b16edb476a
Mohammad-Yasser/harwest
codeforces/1240/A.cpp
#ifndef Local #pragma GCC optimize ("O3") #pragma GCC optimize ("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma comment(linker, "/STACK:1024000000,1024000000") #endif #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; usin...
ALGO
0.999777
3.843966
{ "github_metadata": { "branch": "master", "commit_count": 1412, "repo_created_at": "2020-12-21T04:47:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83463b0...
152b2bfb-0308-430e-b023-5c1b7625b745
ishandutta2007/codeforces-m
mango_lassi/normal/1586/F.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; vector<int> getStat(int mask, int c, int k) { vector<int> res(c); for (int j = 0; j < c; ++j) { res[j] = mask % k; mask /= k; } return res; } void solve() { int k, n; cin >> n >> k; // k = 2: // Every node has a set of out-colours // Ev...
ALGO
0.999952
3.80528
{ "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": "031d6fe6c043...
f1144672-3ad4-4d44-8fa9-7ced5cc078ab
Durgaprasad-Akurathi/Basic_To_Advanced_CPlusPlus_Programs
InterView_Questions/Array_Questions/Replacing with Next Greatest.cpp
// You are given an array of integers. Your task is to modify the array such that each element is replaced with the next greater element in the array, or -1 if no such element exists. // Input: // The first line contains an integer n (1 ≤ n ≤ 1000), representing the size of the array. // The second line contains n sp...
ALGO
0.99997
4.233682
{ "github_metadata": { "branch": "main", "commit_count": 378, "repo_created_at": "2023-07-10T16:20: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": "a9fa8c48ca...
1926af8e-2ea4-4cce-a130-80df53400d3d
cholesski/Dead-instruction-elimination
DeadInstructionElimination/OurCFG.cpp
#include "OurCFG.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/CFG.h" #include "llvm/Support/Errc.h" #include "llvm/Support/raw_ostream.h" #include <cassert> #include <unordered_map> #include <unordered_set> #include <vector> #include <queue> OurCFG::OurCFG(llvm::Function &F) { CreateCFG(F); } void OurCFG::C...
ALGO
0.993723
6.182938
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-07-27T08:02:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "171d2e69c29...
6ed51c49-0da1-4f75-aa39-03c051af5969
akshitj1/drake_plants
src/glider/simulate.cc
#include "glider.h" #include "gflags/gflags.h" #include <drake/common/text_logging_gflags.h> #include "drake/systems/analysis/simulator.h" #include "drake/systems/framework/diagram_builder.h" #include "drake/systems/trajectory_optimization/direct_collocation.h" #include "drake/common/trajectories/piecewise_polynomial.h...
ALGO
0.981324
6.062162
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-09-12T17:20:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "071d858ca4...
7ba2ef69-cdf0-482c-802b-3ef1cef95dd1
AryanC19/Leetcode-24
0034-find-first-and-last-position-of-element-in-sorted-array/0034-find-first-and-last-position-of-element-in-sorted-array.cpp
class Solution { public: int n; // Upper Bound Function int ub(vector<int>& arr, int target){ int ans = -1; int low = 0, high = n - 1; while(low <= high){ int mid = (low + high) / 2; if(arr[mid] > target){ ans = mid; high = mid...
ALGO
0.999947
6.238893
{ "github_metadata": { "branch": "main", "commit_count": 751, "repo_created_at": "2024-09-19T17:52: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": "38241ef793...
158168ac-e628-41c4-a777-bce60e712c89
dakshp07/LeetCode
Binary Search on Answer/2226-maximum-candies-allocated-to-k-children/2226-maximum-candies-allocated-to-k-children.cpp
class Solution { public: bool possibleCandies(long long mid, vector<int>& candies, long long k) { // we check the the ans by dividing all ele of candies // by mid and then add the ele of new vector // and check if its >=k // eg: we consider example 1 of question // [5,8,6...
ALGO
0.999986
5.890578
{ "github_metadata": { "branch": "main", "commit_count": 1988, "repo_created_at": "2021-09-30T13:56: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": "43a3db379...
e03c6bba-1162-44da-a531-eb9c1d5991e0
sajib21/Competitive-Programming
LightOJ/1158 - Anagram Division.cpp
#include<bits/stdc++.h> using namespace std; int setBit(int mask, int pos) { return mask | (1 << pos) ; } int chkBit(int mask, int pos) { return mask & (1 << pos) ; } string num; int d, sz; int dp[1050][1010]; int f(int mask, int rem) { if(mask == ( (1 << sz)-1) ) { if(!rem) return 1; else re...
ALGO
0.999529
3.758168
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2018-07-20T08:27:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13fdb78a...
08931e5f-0c79-46e6-b391-5cdcbb63e120
shawonislam1109/Cpp_and_DSA
data-structure/linked-list/link_list.cpp
// stdc++.h #include <iostream> #include <vector> #include <string> #include <map> #include <set> #include <algorithm> #include <queue> #include <stack> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <climits> #include <functional> #include <utility> #include <iomanip> #include <fstre...
ALGO
0.987769
3.290463
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-11-22T13:24: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": "9b5225c0aea...
cb031ae3-09ed-4df5-b2b8-cd00878f8555
sumit-kumar100/Data-Structure-Algorithm
Phase-2/linked-list/13.cpp
/* @ Remove duplicates from unsorted linked list using two loops Input: head = [1,1,2,3,3] Output: [1,2,3] */ // CODE LINK : https://leetcode.com/problems/remove-duplicates-from-sorted-list/description/ #include <iostream> using namespace std; class Node { public: int data; Node *next; // constructor ...
ALGO
0.999967
5.604517
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-11-20T07:23:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8872d0c160...
b1c3be39-ee5d-4ec8-9da6-851a7f322f82
bsuljic1/Programming-techniques
TP2018/T1/Z4/main.cpp
//TP 2016/2017: Tutorijal 1, Zadatak 4 #include <iostream> #include <cmath> int main () { for(;;){ double n; int suma = 0; std::cout << "\nUnesite prirodan broj ili 0 za kraj: "; std::cin >> n; if (n < 0){ std::cout << "Niste unijeli prirodan broj!"; ...
ALGO
0.999378
3.726998
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-01-31T15:17:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8b035c2df...
e735a0ac-670c-4b65-a20b-ab0a5fff31cb
khaledatia25/cp-problems-solutions
binary-search-session/built-in-functions.cpp
#include <bits/stdc++.h> using namespace std; void file_input(); void solve() { vector<int> v = {1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 37, 37, 37, 41, 43, 47}; // binary_search(_first_iterator, _second_iterator, _val) // returns true if target is present in the vector, otherwise fa...
ALGO
0.997844
4.366593
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-09-10T08:46:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30b356f1039...
99e59a8d-97a7-4985-98ab-4b030d766268
Lukas1612/projektyStudia
Grafy_projekt/main.cpp
#include <iostream> #include <stack> #include <queue> using namespace std; union type { double _double; // occupies 4 bytes int _int; // occupies 4 bytes bool _bool; // occupies 1 byte }; class Graf_DFS { protected: int n, m; bool A[100][100]; bool odwiedzone[100]; virtual void s...
ALGO
0.999941
4.613284
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-06-14T15:39: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": "22a6cc3432...
f8bac0e3-e668-4648-904b-917ff0eeb843
Creamy1137689/kyopro
solved/abc181/f.cpp
#include <iostream> #include <iomanip> #include <utility> #include <cmath> #include <random> #include <vector> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <string> #include <algorithm> #include <atcoder/all> using namespace atcoder; using namespace std; #define rep(i,n) fo...
ALGO
0.999652
3.517796
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-05-22T15:25: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": "33256af05...