uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
949d75ac-c1a9-467e-aee1-d2270481765f
ianhwu/Test
Source Code/swift 5/swift 5/swift-master/stdlib/public/stubs/UnicodeNormalization.cpp
#include "../SwiftShims/UnicodeShims.h" #include <stdint.h> #if defined(__APPLE__) // Declare a few external functions to avoid a dependency on ICU headers. extern "C" { // Types typedef struct UBreakIterator UBreakIterator; typedef struct UText UText; typedef struct UBreakIterator UNormalizer2; typedef enum UBreak...
TOOL
0.941981
6.278874
7674ae40-4237-4a91-85d3-57fae974fd71
xu20160924/leetcode
leetcodecpp/leetcode/TwoEightNine.cpp
// // Created by John on 2020/3/1. // #include <iostream> #include "vector" using namespace std; class Solution { public: void gameOfLife(vector<vector<int> > &board) { int m = board.size(), n = m ? board[0].size() : 0; for (int i = 0; i < m; ++i) { for (int j = 0; j < n; ++j) { ...
ALGO
0.999452
5.894242
d7ecfa52-45cb-48ed-9a66-446e2771a3bb
GitCodeBoy/unreal-editor-dev
Engine/Source/Runtime/Navmesh/Private/DetourCrowd/DetourLocalBoundary.cpp
#include "DetourCrowd/DetourLocalBoundary.h" #include "DetourCrowd/DetourCrowd.h" #include "Detour/DetourAssert.h" dtLocalBoundary::dtLocalBoundary() : m_nsegs(0), m_npolys(0) { dtVset(m_center, FLT_MAX,FLT_MAX,FLT_MAX); } dtLocalBoundary::~dtLocalBoundary() { } void dtLocalBoundary::reset() { dtVset(m_center, F...
ALGO
0.997912
6.742632
f5a7f889-d0c2-43c4-895a-97f7d410bdea
benedicttan88/QuantLib
ql/math/integrals/kronrodintegral.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <ql/math/integrals/kronrodintegral.hpp> #include <ql/types.hpp> namespace QuantLib { static Real rescaleError(Real err, const Real resultAbs, const Real resultAsc) { ...
ALGO
0.999864
7.376414
dd86810f-4098-422c-915f-03079337c4ba
killer-abhi/Geeks-For-Geeks---DSA
10 Linked Lists/segregate_even_odd_nodes.cpp
#include<bits/stdc++.h> #include "singly_linked_list.cpp" using namespace std; Node *segregateEvenOdd(Node *head){ Node *temp=head; Node *evenHead=NULL; Node *oddHead=NULL; while(temp->next!=NULL){ if(temp->data%2==0){ evenHead=insertAtLast(evenHead,temp->data); }else{ ...
ALGO
0.999513
5.285152
361a1761-2434-440a-9f65-03b143162134
joaovitor73/ExeCplusplus
vetorMatriz/exe 15.cpp
#include <iostream> using namespace std; int main(){ bool A[3],B[3], R[3]; char Oper; for (int l=0 ; l <3 ; l++){ cout << "\nDigite O " << l+1 << "a. valor do vetor A 1(verdadeiro) ou 0(falso): "; cin >> A[l]; cout << "\nDigite O " << l+1 << "a. valor do vetor B 1(verdadeiro) ou 0(falso): "; cin...
ALGO
0.997998
4.230775
091e02be-7be1-429c-bdf2-e15e77f5bee7
XuDaShuai2024/DailyPractice
带界面userList/main.cpp
#pragma once #include"list.h" #include "manage.h" #include<iostream> using namespace std; //typedef struct user{ // char* name; // int age; // char* dept; // user(char *name,int age,char *dept) { // this->name = name; // this->age = age; // this->dept = dept; // } //}Student,Teacher; //void print(void* data) { // u...
TOOL
0.880269
3.20738
90357a7a-c3ea-44f8-a21b-7a441d2317b8
jainish1510/DSA-codehelp-course
Lecture-064/7_Right_View.cpp
#include <bits/stdc++.h> #include "BinaryTree.h" using namespace std; void RightView(Node* root, vector<int>& answer, int lvl) { if(root == NULL) { return; } if(lvl == answer.size()) { answer.push_back(root->data); } RightView(root->right, answer, lvl+1); RightView(root->left...
ALGO
0.999951
5.205744
87c89d53-11d1-4dcb-93c1-a954d11cf725
Caesar-github/rknpu2
examples/rknn_api_demo/src/rknn_with_mmz_demo.cpp
/*------------------------------------------- Includes -------------------------------------------*/ #include "rk_mpi_mmz.h" #include "rknn_api.h" #include <float.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #define STB_IMAGE_IMPLEMENTATION #include "stb/stb_imag...
DATA
0.950529
4.94275
1494f955-354f-4541-a98f-51ffe1c533ce
Andriusjok/OriginalHashFunction
FileRead.cpp
#include <iostream> #include <iomanip> #include <string> #include <climits> #include <cstring> #include <fstream> #include <sstream> using std::ostringstream; using std::ifstream; using std::ofstream; using std::cin; using std::cout; using std::endl; using std::string; void Hash(const char* input, unsigned int length, ...
ALGO
0.997238
4.447554
9275cbf9-26c9-4ec1-aaa3-40fe4c4b0b8e
Saketmishra14/DSA-Supreme-3.0
03 Basics of Programming-level-2/Mega Session-Pattern/fancy12pattern.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"enter value of n -:"; cin>>n; for(int i=0;i<n;i++){ for (int j = 1; j <=(2*i)+1; j++) { if (j%2==0) { cout<<"*"; } else{ cout<<i+1; ...
ALGO
0.999854
3.471015
f3136720-1151-4a09-8c5a-69d4c82a5ed8
izenecloud/izenelib
source/ir/Zambezi/bloom/BloomFilter.cpp
#include <ir/Zambezi/bloom/BloomFilter.hpp> #include <ir/Zambezi/Consts.hpp> #include <ir/Zambezi/Utils.hpp> NS_IZENELIB_IR_BEGIN namespace Zambezi { uint32_t BloomFilter::computeLength(uint32_t df, uint32_t bitsPerElement) { return (df * bitsPerElement + BLOOM_FILTER_UNIT_SIZE - 1) / BLOOM_FILTER_UNIT_SIZE; } ...
ALGO
0.944948
6.893139
f7bc93f4-d4b7-466f-bb17-9a1bd7f12b08
Vestigor/Programming_Paradigms
2024_9_23/problem_4.cpp
/*********************************************************** * File: problem_4.cpp * Author: Xiaolong Ma(С) * E-mail: <EMAIL> * Compiler: Visual Studio 2022 * Function: solve the problem which is called "the mystery of scale" * Date: 2024.9.24 * Update: 2024.9.24 ******************************************...
ALGO
0.978451
4.496034
8c6cfa23-b6d7-4eae-8f64-55d552a34b0d
Vision-99/Competitive-Programming
TLE/900/3 jan/odd_even.cpp
#include <bits/stdc++.h> using namespace std; int main() { int x; cin>>x; cout<<(x&1 ? "1":"0"); return 0; }
ALGO
0.999849
4.144221
392925eb-c7cb-4226-84cc-98cb83a87bf9
SPkimdain/clickhouse
ClickHouse-master/src/Processors/QueryPlan/Optimizations/projectionsCommon.cpp
#include <Processors/QueryPlan/Optimizations/projectionsCommon.h> #include <Processors/QueryPlan/ExpressionStep.h> #include <Processors/QueryPlan/FilterStep.h> #include <Processors/QueryPlan/ReadFromMergeTree.h> #include <Common/logger_useful.h> #include <Core/Settings.h> #include <DataTypes/DataTypeNullable.h> #incl...
ALGO
0.873784
7.67975
e069b62d-89f7-445a-a14a-2ad13bfd83be
JeongWoo9906626/CodingTest
프로그래머스/2/42586. 기능개발/기능개발.cpp
#include <string> #include <vector> #include <queue> using namespace std; std::vector<int> solution(std::vector<int> progresses, std::vector<int> speeds) { std::vector<int> answer; std::queue<int> Progress; for (int Number : progresses) { Progress.push(Number); } std::queue<int> Speed...
ALGO
0.999776
5.292527
4b11f08f-5e62-4c57-9346-52e4af02f8d4
Sidharth70754/Data_Structure_Algorithm
Difficulty: Medium/Largest subarray with 0 sum/largest-subarray-with-0-sum.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /*You are required to complete this function*/ class Solution { public: int maxLen(vector<int>& arr, int n) { unordered_map<int, int> prefixSumMap; int maxi = 0; int ...
ALGO
0.999833
6.482244
cdd52b44-d17d-4cdb-aefd-05bee0f2343e
WilliamMcAvoy77/Arowanacoin2
src/protocol.cpp
#include <protocol.h> #include <util/system.h> #include <util/strencodings.h> #ifndef WIN32 # include <arpa/inet.h> #endif static std::atomic<bool> g_initial_block_download_completed(false); namespace NetMsgType { const char *VERSION="version"; const char *VERACK="verack"; const char *ADDR="addr"; const char *INV="...
WEB
0.866306
6.23269
89d90b8d-8883-4050-b93a-3d1d38d9b6cc
lclpsoz/competitive-programming
CF/321893/D.cpp
#include "bits/stdc++.h" #include "ext/pb_ds/tree_policy.hpp" #include "ext/pb_ds/assoc_container.hpp" using namespace std; ////////////// Prewritten code follows. Look down for solution. //////////////// #define x first #define y second #define LEN(x) ((int)(x).size()) #define ALL(x) x.begin(), x.end() using ll = long...
ALGO
0.999536
4.194675
ba1ca166-ef91-4e11-a6fe-56c574e13c97
MostafaAshraf98/Problem-Solving
DP/HeroGame.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<int> vi; #define sf(n) scanf("%d", &n) #define sff(n, m) scanf("%d%d",&n,&m) #define sfl(n) scanf("%I64d", &n) #define sffl(n, m) scanf("%I64d%I64d",&n,&m) #define sfs(s) scanf("%s",s...
ALGO
0.999984
3.918029
7e309a8b-ffb1-40d7-b70f-2552b362c871
TajwarSaiyeed/problem-solving-codechef-leetcode-codechef
30-11-2024/Z. Hard Compare.cpp
#include <bits/stdc++.h> using namespace std; #define yes cout << "YES" << '\n' #define no cout << "NO" << '\n' typedef long long ll; void solve() { ll a, b, c, d; cin >> a >> b >> c >> d; if (a == c && b == d) { no; return; } double log_ab = b * log(a); double log_cd = d...
ALGO
0.997629
4.293705
5ccb67a2-af41-412b-8b3c-55ebb5c0e2c4
nayemhasan45/Vilnius_University_LT
First_Semester/linier_dynamic_4.cpp
#include <iostream> #include <vector> using namespace std; int main() { int size; cout << "Enter the size of the array: "; cin >> size; vector<int> myArray(size); // Input elements for the array cout << "Enter " << size << " integers for the array:" <<endl; for (int i = 0; i < size; ++i) { ...
ALGO
0.999967
4.720424
77911f58-4741-492e-a328-66b71f7746b5
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_10570_8.cpp
#include <bits/stdc++.h> using namespace std; long long mod = 1e9 + 7; string C, J; long long rods[500005]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; for (int i = 1; i <= n; i++) cin >> rods[i]; sort(rods + 1, rods + n + 1); long long sum = 0; for (int i = 1; i < n; i++...
ALGO
0.999864
3.797405
50ce8971-aebf-4c13-bad2-01a1b2f9a2cb
jnyfah/Algorithms-and-Data-Structures
Sorting Algorithms/counting_sort.cpp
#include <iostream> //const const int MAX = 10; //function declaration void display(int[], int); int getMax(int[], int); void countingSort(int[], int); int main() { //unsorted elements int arr[] = {10,15,1,60,5,100,25,50}; //size of the array int n = sizeof(arr)/sizeof(arr[0]); //output unsorted elements...
ALGO
0.99964
5.092012
450960bd-abf8-4cbf-964d-8590365e2694
middlebro/Problem_Solve
PS2019_Week11_Stair/PS2019_Week11_Stair/main.cpp
#include <iostream> #include <cstring> using namespace std; long long int steps[61]; int main(int argc, const char * argv[]) { ios::sync_with_stdio(false); int t; cin >> t; while (t--) { memset(steps, 0, sizeof(steps)); steps[1] = 1; int x, y; cin >> x >> y; if (x...
ALGO
0.999955
3.881946
684a6ec0-9f7e-491f-9f3e-35c17f90b593
aokblast/LeetCode_Problem_Solving
Medium/1124_Longest_Well-Performing_Interval.cpp
// //Runtime 52 //Memory Usage 23 class Solution { public: int longestWPI(vector<int>& hours) { int res = 0, n = hours.size(), cnt = 0; unordered_map<int, int> mp; for(int i = 0; i < n; ++i) { cnt += hours[i] > 8 ? 1 : -1; if(cnt > 0) {...
ALGO
0.999804
5.375908
50be16a2-1d60-4c56-8ad4-a07fd0e80091
ESHAN-tech/DSAlovebabberYT
Tata_NQT_Dsa/movezero.cpp
#include <iostream> #include<algorithm> using namespace std; void movezero(int *arr , int n){ // here iam using two pointer._._. int s =0; int e = n-1; while( s < e){ // if value at right side > 0 ignore while(arr[s]>0 && s<=e) { s++; } while(arr[e]<0 && s<=e) { e-...
ALGO
0.999902
4.079638
8a4f886a-f4c6-40e2-b3a3-a8be6872a2eb
MrKerim/Competitive-Programing
LeetCode/Evaluate Reverse Polish Notation - LeetCode/solution.cpp
class Solution { public: int evalRPN(vector<string>& tokens) { stack<int> st; int x,y; for(string s : tokens){ if(s == "+") { y = st.top(); st.pop(); x = st.top(); st.pop(); st.push(x+y); } else if(s == "-")...
ALGO
0.99994
6.046392
c375e731-3275-4024-80e3-0a4b4e99939b
atul-5242/DSADailyPractice2
Linked-List/Traversing-a-Linked-List-in-C++.cpp
#include<iostream> using namespace std; struct node//creation of data type of Node. { int data; node *next; node(int x){//here in c++ we can use this like counstruct to insliaze a value in structure. data=x; next=NULL; } }; // here SLL means = Singly LinkedList // if we not using the &...
ALGO
0.999823
5.30168
c1f1263a-c0e7-4b9e-901a-69bb97138057
xnmng/LeetCode
0948-bag-of-tokens/0948-bag-of-tokens.cpp
class Solution { public: // based on the problem, our goal is to maximize the score // we notice that it would make sense to greedily flip smaller tokens face-up, // and flip larger tokens face-down // this allows us to maintain a larger score, which ideally will allow us to flip more // tokens face...
ALGO
0.99997
6.289552
ea8b9244-1b59-4ee6-8452-9a62dff68eac
tuhh-softsec/APR4Vul
experiments/RepairThemAll/libs/z3/src/muz/transforms/dl_mk_bit_blast.cpp
#include "muz/transforms/dl_mk_bit_blast.h" #include "ast/rewriter/bit_blaster/bit_blaster_rewriter.h" #include "ast/rewriter/rewriter_def.h" #include "ast/ast_pp.h" #include "ast/rewriter/expr_safe_replace.h" #include "tactic/generic_model_converter.h" #include "muz/transforms/dl_mk_interp_tail_simplifier.h" #include ...
ALGO
0.936313
7.339427
e5ea2908-5c92-4ec1-a7de-f8c619616f8a
SamXop123/CPP-codes
PrimeCheck.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; if (n == 0 || n == 1) { cout << "Neither Prime nor Composite"; return 0; } bool isPrime = true; for (int i = 2; i <= n / 2; i++) { if (n % i == 0) { isPrime = false; break; ...
ALGO
0.999772
4.879686
ece0a716-1036-4354-a598-d1b657e7722b
CrazyOri/repo
element_min_max_1_c.cpp
//Szukanie elementu minimalnego w tablicy //uwaga: elementy tablicy w C numerowane sa od 0 // zatem nasza tablica ma indeksy od 0 do n-1 // a[0], a[1], ..., a[n-1] <<<<<<< HEAD //inpg930 ======= //inpg931 >>>>>>> branch #include <iostream> using namespace std; int main() { int ilosc; // definicja zmienne...
ALGO
0.998387
3.71007
0cf803fa-79dc-4ecc-87a0-f42a955cad74
ly8961907/Digital-Image-Processing-System
eigen/blas/single.cpp
#define SCALAR float #define SCALAR_SUFFIX s #define SCALAR_SUFFIX_UP "S" #define ISCOMPLEX 0 #include "level1_impl.h" #include "level1_real_impl.h" #include "level2_impl.h" #include "level2_real_impl.h" #include "level3_impl.h" float BLASFUNC(sdsdot)(int* n, float* alpha, float* x, int* incx, float* y, in...
TOOL
0.896638
3.392982
9e1f90e3-052e-4f0e-a7f0-6746dc45ab1c
rahulYUV/DsaRepo
array/dublicate.cpp
#include<iostream> using namespace std; int removeDublicate(int arr[],int size){ int count = 0; for(int i =1;i<size;i++){ if(arr[i]!=arr[i+1]){ count++; } } return count; } int main (){ int arr[]={1,1,2,3,3,4,4,4,4,4,5,5}; int size = 12; int ...
ALGO
0.999734
4.208697
965617e7-76d6-4902-8f26-79fb69dca36d
Ahsanhf/0014_Stock
0014_Stock.cpp
#include <iostream> using namespace std; //Node class representing a single node in the linked list class Node { public: int data; Node* next; Node() { next = NULL; } }; //stack class class Stack { private: top = NULL; //Intialize the stack with a null top pointer } public: Stack() { top = NULL; //Intialize...
ALGO
0.974625
4.825462
c4d402e2-87aa-4202-9dab-9ffb8d12b67a
microy/MultiresolutionMeshAnalysis
src/Frustum.cpp
/*************************************************************************** * * * This code was higly inspired by DigiBen * * Programming Lesson on Frustum Culling * * <EMAIL>...
ALGO
0.998127
6.140102
969cdd68-a80f-4966-8037-53c05381befb
NipunRathore/GFGPracticeSolutions
Medium/Rotate by 90 degree/rotate-by-90-degree.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; void rotate (vector<vector<int> >& matrix); // } Driver Code Ends //User function template for C++ /* matrix : given input matrix, you are require to change it in place without using extra space */ void transpose (vecto...
ALGO
0.999924
5.455972
62f573a9-a126-42a4-af65-28745e6217bf
ishandutta2007/codeforces
sugim48/normal/912/D.cpp
#include <bits/stdc++.h> #include <random> using namespace std; #define rep(i, N) for (int i = 0; i < N; i++) #define pb push_back typedef long long ll; typedef pair<int, int> i_i; typedef pair<ll, int> ll_i; struct edge { int v, w; }; const ll INF = INT_MAX / 2; const int MOD = 1e9 + 7; const ll e18 = 1e18; int N, ...
ALGO
0.999453
3.361669
86efb7e9-c8bf-4a9e-81c2-db3cc4f218f6
ermolaevv/ppc-2024-autumn
tasks/seq/sharamygina_i_most_different_neighbor_elements/src/ops_seq.cpp
#include "seq/sharamygina_i_most_different_neighbor_elements/include/ops_seq.hpp" #include <functional> #include <random> bool sharamygina_i_most_different_neighbor_elements_seq::most_different_neighbor_elements_seq::pre_processing() { internal_order_test(); input_ = std::vector<int>(taskData->inputs_count[0]); ...
ALGO
0.999395
5.45739
8154acdd-6bd3-4dd3-847a-d3194056f7c3
dgcnz/competitive-programming
codeforces/741B-arpa-weak-amphitheater-valuable-hoses.cpp
// dp(i, cap) : maximum value with first i representatives and capacity cap // // dp(i, cap) = max ( // dp(i - 1, cap), // dp(i - 1, cap - sum({wj | j <- V(i)})) + sum({vj | j <- V(i)}) // {dp(i - 1, cap - wj) + vj | j <- V(i)} // ) #include <bits/stdc++.h> usin...
ALGO
0.999996
4.621285
8bde1de2-aec6-4268-b4f2-4c23a4c1af29
Sayak05/GeekForGeeks-solutions
Basic/Pattern 11/pattern-11.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void printTriangle(int n) { // code here int start = 1; for(int i=0;i<n;i++){ if(i%2==0){ start = 1; } else{ ...
ALGO
0.999775
5.859438
5d7ac1d7-17db-4071-9443-1d5205201e69
GaurishIIITNR/CP-Problems-Solutions-2
E_Binary_Deque.cpp
// HHM #include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ll tests; cin >> tests; while (tests--) { ll n, k; cin >> n >> k; ll sm = 0; map<ll, ll> mp1, mp2; vector<ll> v(n); ll low = -1, high = n; ll cnt = 0; ...
ALGO
0.999875
3.823718
22a8cba9-81eb-4000-809c-08e4ad8b0997
me1lopig/Ordenacion
Burbuja.cpp
// Burbuja.cpp : // ejemplo de ordenacion mediante el metodo de la burbuja #include <iostream> using namespace std; void imprimir(int vector[],int size) { // imprime un vector for (int i = 0; i < size; i++) { cout << "[" << i << "]=" << vector[i] << endl; } } int main() { int numero...
ALGO
0.999772
4.905744
abecb80d-c52d-4a3d-ab39-a27d619d6cf6
hjiang13/LLMs-in-IR
POJ-104/11/496.cpp
#include <iostream> using namespace std; int main(int argc, char* argv[]) { int y,m,d,a,n; cin >> "%d%d%d",&y,&m,&d); if((y%4)==0&&(y%100)!=0||(y%400==0)) a=1; else a=0; switch(m) { case 1: n=d; break; case 2: n=31+d; break; case 3: n=31+28+d; break; case 4: n=31+28+31+d; break; case 5: n=31+28+31+30+d; break; case 6: ...
ALGO
0.999802
3.325727
04ff8fab-5ef5-471f-8515-c2c97318bccf
lc-3-2/llvm
libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp
// <random> // template<class RealType = double> // class fisher_f_distribution // template<class _URNG> result_type operator()(_URNG& g, const param_type& parm); #include <random> #include <cassert> #include <vector> #include <algorithm> #include <cmath> #include "test_macros.h" double fac(double x) { double ...
TEST
0.988892
4.623489
5a16dd54-2a8d-44c7-9cfe-a927ad0b311b
ananabh/C-CPP-Learning
C++ Tutorial/17.cpp
/*Pass by value and pass by reference */ #include <iostream> using namespace std; void passval(int val){ //copies the value from main function. val=100; } void passref(int *val){//passed the address and we are changing value inside address . *val=100; } int main() { int x=20; passval(x); ...
TOOL
0.98291
4.70547
36e9cd68-80b9-4414-a12f-46b8f8435126
Sughandhan/Competitive-Programming
codeforces/1445/B.cpp
#include<iostream> using namespace std; int main(){ long long t; cin>>t; while(t--){ long long a,b,c,d; cin>>a>>b>>c>>d; cout<<max(a+b, c+d)<<endl; } return 0; }
ALGO
0.99826
3.788821
3690991e-b565-4e03-95f9-c53227988078
rifatr/Competitive-Programming
Old_items/DimikOJ/12 factorial 100.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define lop(a, b) for(int i = a; i < b; i++) #define lopj(a, b) for(int j = a; j < b; j++) #define Case(i) cout << "Case " << int(i) << ": " #define yes cout << "yes\n" #define no cout << "no\n" int main() { ios_base::sync_with_stdio(0); cin.t...
ALGO
0.99962
4.614709
a88389c8-1c02-4752-b6cb-70f268a31ab9
mominarashad/pd-task
task10.cpp
#include<iostream> using namespace std; void finalprice (string countryname,int ticketprice); main() { string countryname; int ticketprice; int totalprice; cout<<"enter the country name:"; cin>>countryname; cout<<"enter the ticket price:"; cin>>ticketprice; finalprice (countryname,ticketprice); } void finalprice ...
TOOL
0.921939
4.839386
7db4d4b5-a6ae-4897-9ff0-31ab0c429b56
pjdurden/Codeforces-template-codes-and-resources
Graphs/Topological Sort/Topological Sort (in_deg).cpp
// Greedily take all nodes with in_deg == 0 and push them into the topological ordering, then decrease the in_deg of other nodes accordingly // Problem link: https://cses.fi/problemset/task/1679 #include <bits/stdc++.h> using namespace std; #define ar array #define ll long long const int MAX_N = 1e5 + 1; const int ...
ALGO
0.999996
5.032279
1063ba78-cc63-4556-83a0-9fc5aeb84245
zhangxin0518/opencv-4.1.0
samples/cpp/image_alignment.cpp
/* * This sample demonstrates the use of the function * findTransformECC that implements the image alignment ECC algorithm * * * The demo loads an image (defaults to fruits.jpg) and it artificially creates * a template image based on the given motion type. When two images are given, * the first image is the input image...
ALGO
0.992105
3.95843
b349031f-ee54-44c5-b33f-0c01467c0ff3
alirezaomidi/acm
hackerrank/project-euler/1-multiples-of-3-and-5/1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef pair<int, ii> iii; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<iii> viii; typedef vector<vii> vvii; typedef set<int> si; typedef vector<si> vsi; typedef pair<double, double...
ALGO
0.999673
4.275968
cccf2a2f-a4ff-4f15-942b-bf93bea9ef80
doPggy/leetcode-chicken
greedy/135.Candy/solve.cpp
#include <algorithm> #include <vector> using namespace std; // 思想就是和旁边那个人比,因为有左右,就搞两次 class Solution { public: int candy(vector<int>& ratings) { int s = ratings.size(); //! 极端情况 if(s < 2) return s; vector<int> num(s, 1); // 初始化 // 左到右 for(int i = 0; i < s - 1; i++) ...
ALGO
0.999998
5.698945
ed28cfe3-3689-4c5e-b74a-1b561268ce95
pcynlitx/pcynlitx
PROJECT.TEST.TOOLS/RODINIA_KMEANS_STD_THREAD/rodinia_std_thread_kmeans.cpp
/*****************************************************************************/ /*IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. */ /*By downloading, copying, installing or using the software you agree */ /*install, copy or use the software. */...
ALGO
0.984959
5.574241
afe1f6ad-ad22-41f1-9a96-c73c7b8c365a
xerofenix/codsoftCpp
calc.cpp
#include <iostream> using namespace std; int main() { double num1, num2; char operation; cout << "Enter the first number: "; cin >> num1; cout << "Enter the operation you want to perform ('+', '-', '*', '/'): "; cin >> operation; cout << "Enter the seond number: "; cin >> num2; if ...
TOOL
0.882337
3.846436
1d88c09e-38e1-4f1d-9bc3-4bc2854f3ad8
KausBoss/CP-SubGrouped
GFG/Topological sort.cpp
/* */ #include <bits/stdc++.h> using namespace std; #define ll long long int #define vi vector<int> #define pb push_back #define fi first #define si second #define pii pair<int,int> #define vii vector<pair<int,int>> #define F(a,n) for(int i=0;i<n;i++){cin>>a[i];...
ALGO
0.999947
5.046872
8575b4b3-a309-4d76-84ee-ada90068ad66
DevSWYoon/UntoC_Altudy
19학번_김나현/9461.cpp
#include <iostream> using namespace std; int main() { unsigned long long arr[101] = { 1,1,1,1,2,2,3,4,5, }; int T, N; cin >> T; unsigned long long* result = new unsigned long long[T]; for (int i = 0; i < T; i++) { cin >> N; if (N > 8) { for (int j = 9; j <= N; j++) arr[j] = arr[j - 1] + arr[j - 5]; ...
ALGO
0.99989
3.736505
5e46bd63-a36a-4eef-899f-7d719c255bf2
Aishwarya7902/DAILY-LEETCODE-CHALLENGE
2023/MAY/28th may__1547. Minimum Cost to Cut a Stick Hard.cpp
VIDEO :https://www.youtube.com/watch?v=x4cRwVEFwHc&t=261s class Solution { public: int t[103][103]; int solve(vector<int>& cuts,int l, int r){ if(r-l<2)return 0; int result=INT_MAX; //lth index =starting point of stick //rth index=ending point of stick if(t[l][r]!=-1)ret...
ALGO
0.99998
5.552458
fc3680b9-cad3-4e9f-89f7-ae41e14b0885
GitDhamani/Using-STL-Containers
STL Deque.cpp
#include <iostream> #include <deque> #include <algorithm> template <typename T> void Display(std::deque<T> &v) { std::cout<<"[ "; for (auto element: v) std::cout<<element<<" "; std::cout<<"]"<<std::endl; } int main() { //Create Deque std::deque<int> d1 {1,2,3,4,5}; std::deque<int> d2 (10,1...
TOOL
0.967904
5.250653
fc1bf03d-4c21-4ad9-a3bf-446fc587b28f
yuecpyue/2023aaia3
week16/week16-5.cpp
//week16-5.cpp leetcode學習計畫94. Binary Tree Inorder Traversal class Solution { public: void helper(TreeNode* root,vector<int>& ans){ if(root==nullptr) return; helper(root->left,ans);//左 ans.push_back(root->val);//中 helper(root->right,ans);//右 } vector<int> inorderTraversal(Tr...
ALGO
0.999997
6.458748
a8cf91be-063c-4eea-ad17-aeb295fdef53
Ahmed-1282/Object-Oriented-Programming
Lab Tasks/i201884_lab02/Q420i1884.cpp
using namespace std; bool Substring(char *str1, char *str2, int i, int j) { bool a = false; bool b = true; if (j==0) {return a;} if (i==0) {return b;} if (str1[i - 1] == str2[j - 1]) {return Substring(str1, str2, i - 1, j - 1); } else return Substring(str1, str2, i-1, j);} int main() { ...
ALGO
0.998507
3.349405
26e4960a-2a1a-4972-83b7-94b11f1d95e0
aditya28sarin/Data-structures-and-Algorithms
30 Days of Code/Day 19_ Interfaces _ HackerRank.cpp
class Calculator : public AdvancedArithmetic { public: int divisorSum(int n) { int sum=0; for(int i=1;i<=n;i++) { if(n%i==0) sum=sum+i; } return sum; } };
ALGO
0.994732
5.446119
9f872895-3848-48f1-894e-d4f62d08b274
dngtundt/KTLT_NICE
chuong_5/Bai11.cpp
#include <stdio.h> // Hàm đệ quy phụ trợ để tính số Fibonacci thứ n long long Fibonacci(int n) { if (n <= 2) { return 1; } return Fibonacci(n - 1) + Fibonacci(n - 2); } // Hàm tìm số Fibonacci lớn nhất nhưng nhỏ hơn n (đệ quy) long long FibonaccimaxDeQuy(int n, int i, long long a, long long b) { if (a + b >= n)...
ALGO
0.999979
5.08216
58b7ba01-5bc2-46e8-b256-dab61340284e
trankhai07/cautruc
DSA4014(cap_nghich_the).cpp
#include<bits/stdc++.h> using namespace std; long long two_mersort(long long a[],int l,int h,int m){ long long T[m+1],P[m+1]; int x=l,y=h+1; for(int i = 0;i < h-l+1;i++) T[i] = a[x++]; for(int i = 0;i < m-h;i ++)P[i] =a[y++]; int i0=0,j0=0,k=l; long long cn =0; while(i0 < h-l +1&& j0 < m-h){...
ALGO
0.999849
3.731757
edbad916-a551-4921-b4cd-f9e136e43635
ishandutta2007/codeforces
klimoza/normal/1256/F.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <math.h> #include <cmath> #include <vector> #include <algorithm> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <cassert> #include <random> #include <deque> #include <bitset> #include <string> #include <queue> #includ...
ALGO
0.999999
4.665936
4db00bcd-2b14-4b25-9e28-abac291ff319
dungtran174/PTIT_HK4
Code PTIT/practice/dske_dscanh.cpp
#include <bits/stdc++.h> using namespace std; void xuly() { int n; cin >> n; scanf("\n"); int a[n+1][n+1] = {}; for (int i = 1; i <= n; i++) { string s; getline(cin, s); stringstream ss(s); int x; while (ss >> x) { a[i][x] = 1; a[x][i] = ...
ALGO
0.999528
3.146199
34a7e9ca-9e4d-42c1-8cb4-c8cf63b92c31
amsraman/Competitive_Programming
USACO/Contests/Silver/2018-2019/Contest 3/silver19feb2.cpp
#include <bits/stdc++.h> using namespace std; int n, k, a, b, c, d, pre[1001][1001], ans; int main() { freopen("paintbarn.in","r",stdin); freopen("paintbarn.out","w",stdout); cin >> n >> k; for(int i = 0; i<n; i++) { cin >> a >> b >> c >> d; pre[a][b]++, pre[c][b]--, pre[a][d]--, ...
ALGO
0.999951
4.439747
702db512-ec23-42de-82ec-628778fe0fba
mokkun2005/3DProgram
BaseFramework/Src/Framework/Math/KdAnimation.cpp
#include "KdAnimation.h" #include "../Direct3D/KdModel.h" // 二分探索で、指定時間から次の配列要素のKeyIndexを求める関数 // list … キー配列 // time … 時間 // 戻り値 … 次の配列要素のIndex template<class T> int BinarySearchNextAnimKey(const std::vector<T>& list, float time) { int low = 0; int high = (int)list.size(); while (low < high) { int mid = (low ...
ALGO
0.967835
5.216592
f24072e8-c561-4696-af12-bd995ae3fcae
infinity-boi/DSA-codes
039minStepsto1.cpp
// https://www.naukri.com/code360/problems/min-steps-to-one-using-dp_920548?utm_source=youtube&utm_medium=affiliate&utm_campaign=Codestudio_AyushiSharma #include <bits/stdc++.h> using namespace std; // greedy - gives wrong answer int minStepsGreedy(int n){ int steps = 0; while ( n > 1) { if (n % 3...
ALGO
0.999963
5.533486
5c94f640-cb7b-46e1-a549-2e0a8fa09b86
kingofyeti/opengl_configuration
nanogui/ext/eigen/doc/snippets/MatrixBase_marked.cpp
#ifndef _MSC_VER #warning deprecated #endif /* Matrix3d m = Matrix3d::Zero(); m.part<Eigen::UpperTriangular>().setOnes(); cout << "Here is the matrix m:" << endl << m << endl; Matrix3d n = Matrix3d::Ones(); n.part<Eigen::LowerTriangular>() *= 2; cout << "Here is the matrix n:" << endl << n << endl; cout << "And now h...
ALGO
0.988735
3.752687
293fc973-f581-4e52-9138-07d952d23e93
tinhngovnptho/Code
CP/Code THCS/HSG12/HAIPHONG2021/CAU1.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a); i <= (b); ++i) #define FORD(i, b, a) for (int i = (b); i >= (a); --i) #define FORA(i, v) for (__typeof((v).begin()) i = (v).begin(); i != (v).end(); ++i) #define ALL(v) (v).begin(), (v).end() #define sz(x) (int)(x).size() #define fi f...
ALGO
0.998917
4.334769
c605d02e-10d4-46ae-b3bc-a88fc264813c
PedroAngeli/Competitive-Programming
Solutions/UVA/CF-C2/662.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define f first #define s second using ld = long double; using ll = long long; using ii = pair <int,int>; using pll = pair <ll,ll>; using vi = vector <int>; using vll = vector <ll>; using vii = vector <ii>; using vpll = vector<pll>; vi d; vector <vi...
ALGO
0.999852
3.920482
0f5cbef6-808f-4cbe-946e-8b592d19f424
ishandutta2007/codeforces
benq/normal/789/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pii; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statisti...
ALGO
0.999943
4.295466
f1017657-d7dc-4ab0-977a-27d9a209b502
nqmcl2735/Longest-Path
proF.cpp
//ngqminh.cl2735 #include <bits/stdc++.h> #define PB push_back #define pii pair <int,int> #define vi vector <int> #define vii vector <pii> #define mpa make_pair #define oo INT_MAX #define F first #define S second #define reset(x, i) memset(x,i,sizeof(x)) #define sz(x) int(x.size()) #define mp make_pair #define maxn 100...
ALGO
0.999872
4.375065
100724e4-e6e9-4031-a666-4a7c1ff98086
raincross7/code-similarity
codes/train_code/problem373/problem373_181.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> using namespace std; uint64_t K, N; int main() { vector<pair<uint64_t, uint64_t>> s; // データ読み込み cin >> N >> K; uint64_t a, b; for (uint64_t i = 0; i < N; i++) { cin >> a >> b; s.push_back(make_pair(b, a)); } // value順に並び替え sort...
ALGO
0.999984
3.989461
8fb64e2c-f1d4-4580-9310-15ed91b4c481
drashti-panchal/Dsa-in-C-
2_Patterns/4.cpp
// 1 // 2 2 // 3 3 3 // 4 4 4 4 // 5 5 5 5 5 #include <iostream> using namespace std; int main(){ for(int i=1;i<=5;i++){ for(int j=0;j<i;j++){ cout<<i <<" "; } cout<<endl; } }
ALGO
0.999768
3.455398
978f872e-66ca-4b91-b966-5494173b4514
hostei/home
ans2.cpp
#include <bits/stdc++.h> #define ll long long #define ld long double const ll MOD = 1e9 + 7; const ll INF = 1e9; using namespace std; int partition(int arr[], int l, int r) { int p = arr[r]; int i = l - 1; for (int j = l; j < r; j++) { if (arr[j] < p) { i++; int...
ALGO
0.999876
3.944801
a1f0c7b6-888d-4655-a604-100d76507809
afeng11/4366
release/src/router/APP-IPK/DM-ipk/crypto++/tea.cpp
// tea.cpp - modified by Wei Dai from code in the original paper #include "pch.h" #include "tea.h" #include "misc.h" NAMESPACE_BEGIN(CryptoPP) static const word32 DELTA = 0x9e3779b9; typedef BlockGetAndPut<word32, BigEndian> Block; void TEA::Base::UncheckedSetKey(const byte *userKey, unsigned int length, const Name...
ALGO
0.996125
7.695383
a10d76d5-0878-4c12-8f6e-f2307f56ce05
miguelAlessandro/CompetitiveProgramming
hackerrank/inti_sets.cpp
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; int t; const long long MOD = 1000000007; const long long two = (MOD+1)/2; long long a, b, n; long long p[40]; long long sum(long long a){ a %= MOD; return a*(a+1)%MOD*two%MOD; } long long f(long long a, long long y){ return (sum(a/y)...
ALGO
0.999692
4.319275
9a29ba99-a231-4b26-bd64-43fb7f72b115
morinokami/intro-to-cpp
ch07/list0712.cpp
#include <iostream> using namespace std; void fill_zero(int* p, int n) { while (n-- > 0) { *p = 0; p++; } } int main() { int x[5] = {1, 2, 3, 4, 5}; int x_size = sizeof(x) / sizeof(x[0]); fill_zero(x, x_size); cout << "全要素に0を代入しました。\n"; for (int i = 0; i < x_size; i++) ...
TOOL
0.898673
3.389442
9c90a0a9-54a9-4158-96da-a4d388e02317
PlatinumTeam/MBExtender
MBExtender/src/TorqueLib/math/util/quadTransforms.cpp
#include "../../platform/platform.h" #include "quadTransforms.h" BiQuadToSqr::BiQuadToSqr( const Point2F &p00, const Point2F &p10, const Point2F &p11, const Point2F &p01 ) : m_kP00( p00 ) { m_kB = p10 - p00 ; // width m_kC ...
ALGO
0.998035
5.672497
1481e31b-052c-4df7-ba50-259333c79f92
carlomigueldy/flutter-vscode-prelaunch-script-demo
app/client_app/windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.997907
6.797273
02cf168f-4f59-4786-9e46-2770b45e2729
BrunoLad/coding-challenges
Uri Online Judge - beecrowd/1048 - Salary Increase.cpp
#include <iostream> #include <iomanip> #include <cmath> #include <stdio.h> using namespace std; int main() { double s, ns; cin >> s; if (s <= 400.00) { ns = s + (s * 0.15); } else if (s <= 800.00) { ns = s * 1.12; } else if (s <= 1200.00) { ns = s + (s...
ALGO
0.998534
3.640426
0fdf6750-3983-47b2-a4ba-da30152945f4
DevleenaBanerjee/Stock_Prediction_ds
venv/Lib/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/libs/graph/example/bellman-example.cpp
using namespace boost; template < typename Graph, typename ParentMap > struct edge_writer { edge_writer(const Graph & g, const ParentMap & p) : m_g(g), m_parent(p) { } template < typename Edge > void operator() (std::ostream & out, const Edge & e) const { out << "[label=\"" << get(edge_weight, m_...
ALGO
0.999285
5.759479
f574ad26-6615-49f0-889c-9d571cc6a8e1
darchr/gem5
src/systemc/tests/systemc/misc/sim_tests/biquad/biquad3/biquad.cpp
/***************************************************************************** biquad.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /*****************************************************************************...
ALGO
0.999475
5.159113
6ee5f161-e5ef-487e-adff-bf34e1e4228a
afkyyd/engine
Engine/Source/ThirdParty/hlslcc/hlslcc/src/hlslcc_lib/opt_copy_propagation.cpp
/** * \file opt_copy_propagation.cpp * * Moves usage of recently-copied variables to the previous copy of * the variable. * * This should reduce the number of MOV instructions in the generated * programs unless copy propagation is also done on the LIR, and may * help anyway by triggering other optimizations tha...
ALGO
0.854529
7.894845
b11b2e4f-e039-4278-aa92-8c021949533a
Rober11pg/Estructura
Parcial II/Clase Colas/Cola 4.cpp
/* Programa que implementa la gestion básica del TDA Cola Determinar si una cola A, B estan mutuamnte contenidas*/ #include <iostream> #include "Cola.h" // # instrucciones de prefuncionamiento, gobernar la compilación #define FIN 9999 // definicion del marcado de fin de lecura using namespace std; int main() { C...
ALGO
0.992026
5.277171
6f0d9c29-7783-4d2b-bebf-9d680b7bbc16
lostedleo/nori
net/brpc/protocol.cpp
// Since kDefaultTotalBytesLimit is private, we need some hacks to get the limit. // Works for pb 2.4, 2.6, 3.0 #define private public #include <google/protobuf/io/coded_stream.h> const int PB_TOTAL_BYETS_LIMITS_RAW = google::protobuf::io::CodedInputStream::kDefaultTotalBytesLimit; const uint64_t PB_TOTAL_BYETS_LIMIT...
TOOL
0.889549
7.704761
f32d098f-3433-4db5-8845-611c7e60189f
alexpopovici0/metin2server-project
src/etc/boost_1_72_0/libs/geometry/example/07_b_graph_route_example.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Second variant, with bundled properties #include <iostream> #include <fstream> #include <iomanip> #include <limits> #include <boost/tuple/tuple.hpp> #include <boost/foreach.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/dijkstra_shortest...
ALGO
0.99885
6.305035
5bd353ec-1dd1-43f2-9831-c4ba68b1a790
openkylin/platform_external_skia
src/shaders/gradients/SkSweepGradient.cpp
#include "include/private/SkFloatingPoint.h" #include "src/core/SkRasterPipeline.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkWriteBuffer.h" #include "src/shaders/gradients/SkSweepGradient.h" SkSweepGradient::SkSweepGradient(const SkPoint& center, SkScalar t0, SkScalar t1, ...
TOOL
0.88271
7.753118
977c973a-6ea4-4615-9b72-4b552e4ffa33
cpvrlab/SLProject
externals/libigl/include/igl/cut_mesh.cpp
// wrapper for input/output style template <typename DerivedV, typename DerivedF, typename DerivedC> IGL_INLINE void igl::cut_mesh( const Eigen::MatrixBase<DerivedV>& V, const Eigen::MatrixBase<DerivedF>& F, const Eigen::MatrixBase<DerivedC>& C, Eigen::PlainObjectBase<DerivedV>& Vn, Eigen::PlainObjectBase<Der...
ALGO
0.995274
5.571088
0a72addb-20fd-4a24-a370-710ed6695b7b
Saehanseul/flutter_chat
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
681ee23e-6615-4897-b599-0b111f39e3d3
sarvex/leetcode-crystal
lcof/面试题62. 圆圈中最后剩下的数字/Solution.cpp
class Solution { public: int lastRemaining(int n, int m) { return f(n, m); } int f(int n, int m) { if (n == 1) { return 0; } int x = f(n - 1, m); return (m + x) % n; } };
ALGO
0.999988
6.583467
78c2aeb1-bc4b-40dd-bbaf-262823427f45
sarvex/leetcode-haskell
lcof2/剑指 Offer II 006. 排序数组中两个数字之和/Solution.cpp
class Solution { public: vector<int> twoSum(vector<int>& numbers, int target) { int i = 0; int j = numbers.size() - 1; vector<int> res; while (i < j) { int sum = numbers[i] + numbers[j]; if (sum < target) { i++; } else if (sum > ta...
ALGO
0.999939
6.562867
ebe65c7c-5936-4caa-bb7c-9ade309d2445
sourabhjain9887/6Companies30Days-
GlodmanSachs/Run_Length_Encoding .cpp
#include <bits/stdc++.h> using namespace std; int main() { string s, ans; cin >> s; int count = 1; for (int i = 0; i < s.length(); i++) { if (s[i] == s[i + 1]) { count++; continue; } string temp1(1, s[i]); ans.append(temp1); s...
ALGO
0.999994
4.012446
56bd70ab-e9ac-4adb-b148-19939d08f8de
RamiHadji/Programming-Advices-Problem-Top
Problem11/Problem11/Problem11.cpp
// Problem11.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> using namespace std; enum enPassFail { Pass = 1, Fail = 2 }; void ReadNumbers(int& Mark1, int& Mark2, int& Mark3) { cout << " Please enter your number 1 " << endl; cin >> Mark1; cout <...
ALGO
0.996165
4.748244
323eee95-8234-4536-8670-d339dfa4e6aa
prajeshshrestha/Data-Structure-and-Algorithms
Queue/circular linked list using linked list.cpp
#include <iostream> struct node { int data; struct node *next; }; struct node *front = 0, *rear = 0, *newnode, *temp; void enqueue(int num); void dequeue(); void display(); main() { enqueue(69); enqueue(100); enqueue(56); display(); dequeue(); display(); } void display() { temp = ...
ALGO
0.998404
4.353882
abfba3d4-83ed-4b75-b67f-f70a89e0a2c2
Vinit-28/POTD-Leetcode
Year=2023/Month=09/Date=16/Solution.cpp
// Problem Link : https://leetcode.com/problems/path-with-minimum-effort/description/ // Solution // class Solution { public: int dirR[4] = {1,-1,0,0}, dirC[4] = {0,0,1,-1}; bool isCellValid(int i, int j, int &r, int &c){ return !(i<0 || j<0 || i>=r || j>=c); } int minimumEffortPath(vector<ve...
ALGO
0.999999
6.374106
44ac3508-e991-47e1-94b9-cdaf2dc95cdc
sion-k/Algorithm
baekjoon/19951/main.cpp
#include <bits/stdc++.h> using namespace std; int n, m; int s[100000]; int t[100000]; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); cin >> n >> m; for (int i = 0; i < n; i++) { cin >> s[i]; } for (int i = 0; i < m; i++) { int a, b, k; cin >> a ...
ALGO
0.999979
3.661938