uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
82291f9a-444b-4c85-b872-cf6ff00a85b7
art-kosm/homeworks
term_1/homework_01/task_02/main.cpp
#include <iostream> using namespace std; int main() { int a = 0; cout << "Enter a: "; cin >> a; int b = 0; cout << "Enter b: "; cin >> b; bool positive = false; if(a * b > 0) positive = true; if(a < 0) a = -a; if(b < 0) b = -b; int result = -1; ...
ALGO
0.999931
4.188015
c70209b6-448e-4c7c-9baf-e5da4cccad89
ishandutta2007/codeforces
geniucos/normal/1110/B.cpp
#include<bits/stdc++.h> using namespace std; int N, M, K, x[100009], y[100009]; int main () { //freopen ("input", "r", stdin); //freopen ("output", "w", stdout); scanf ("%d %d %d", &N, &M, &K); for (int i=1; i<=N; i++) scanf ("%d", &x[i]); for (int i=1; i<N; i++) y[i] = x[i + 1] - x[i] - 1; sort (y + 1, y +...
ALGO
0.999935
3.147405
83ec9ea7-2079-4129-b47f-7ad347485ca4
nicholaskarlsen/lammps-scale-vashishta
src/KOKKOS/pair_gran_hooke_history_kokkos.cpp
// clang-format off #include "pair_gran_hooke_history_kokkos.h" #include "atom_kokkos.h" #include "atom_masks.h" #include "error.h" #include "fix_neigh_history_kokkos.h" #include "force.h" #include "kokkos.h" #include "memory_kokkos.h" #include "modify.h" #include "neigh_list.h" #include "neigh_request.h" #include "n...
ALGO
0.956781
6.748015
c436030a-fd46-42c9-a9f1-840646977220
SushiStar/LC
easy/MinStack.cpp
class MinStack { public: std::vector<int> sorted; std::stack<int> sk; int min; /** initialize your data structure here. */ MinStack() { } int breakpoint(int x) { int a = 0; // left int b = sorted.size()-1; int mid = -1; mid = (a...
ALGO
0.999974
6.205447
306d448c-1c50-45d8-9cf4-fa8932e4f072
mogeku/MyOpenCV
samples/cpp/ela.cpp
/** @file ela.cpp @author Alessandro de Oliveira Faria (A.K.A. CABELO) @brief Error Level Analysis (ELA) permits identifying areas within an image that are at different compression levels. With JPEG images, the entire picture should be at roughly the same level. If a section of the image is at a significantly dif...
TOOL
0.956995
5.366011
c54a085c-67f8-4cc7-8523-9b3092553bd1
ThomasFaure66/github
CharmProduction/src/other/dNdy_centrality_midrapidity.cpp
#include <iostream> #include <sstream> #include <string> #include<math.h> #include <fstream> #include <cmath> #include <ctime> #include <cstring> #include <gsl/gsl_errno.h> #include <gsl/gsl_spline.h> #define M_HBARC 0.197 using namespace std; double alphaEM=1.0/137.0; double mllSqr=0.0; double qFSqrSum=1.0/9.0+4.0/9...
DATA
0.911153
4.952118
6ac237dc-1d82-495a-8283-fca2653c4bf9
RajArya420/My-project-in-Phitron
DS/Module 10/operation.cpp
#include<bits/stdc++.h> using namespace std; int main() { list<int>mylist={20,40,30,10,50,10}; mylist.sort(); // mylist.unique(); mylist.reverse(); for(int val: mylist) { cout<<val<<endl; } return 0; }
ALGO
0.999355
3.820278
02d2c0b9-4142-4272-b918-15d67e0f54d0
aerimforest/Baekjoon
[2437] 저울.cpp
// [2437] 저울 // https://www.acmicpc.net/problem/2437 // 그리디 알고리즘 #include <cstdio> #include <vector> #include <algorithm> using namespace std; int main() { int n, tmp, sum = 1; scanf("%d", &n); vector<int> weight; for (int i = 0; i < n; i++) { scanf("%d", &tmp); weight.push_back(tmp); } sort(we...
ALGO
0.999952
4.146416
0e018bfd-2c61-4253-a91b-818ab1d734fb
moletop/leetcode_record
code/1.array/dichotomy/sword_to_offer_51_Array_reverse_pairs.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int reversePairs(vector<int> data) { vector<int> tem(data.size()); return Merge_sort(0 , data.size()-1 , data , tem); } private: int Merge_sort(int l , int r, vector<int> &nums, vector<int>& tem){ //终止 if(...
ALGO
0.99988
4.952715
2e5cd0fc-d513-4946-8cf6-839b9be5581f
SkylineUI/external_libcxx
test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
// <algorithm> // template<RandomAccessIterator Iter> // requires ShuffleIterator<Iter> // && LessThanComparable<Iter::value_type> // void // stable_sort(Iter first, Iter last); #include <algorithm> #include <iterator> #include <random> #include <cassert> std::mt19937 randomness; template <class RI> v...
TEST
0.999308
7.480476
88eab4c4-83f7-4ee5-89ba-e80d5d4e54f8
yash3001/Competitve-Programming
Love Babbar 450/Bit Manipulation/5_find_pos_of_only_set_bit.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int findPosition(int n) { // code here int ans{}, count{}; while(n>0){ if(n&1){ count++; } ans++; n>>=1; ...
ALGO
0.999835
6.111828
03846131-ef6b-4e4a-8854-68bd805d8f9c
masterchef2209/coding-solutions
codes/codeforces/1141E.cpp
#include <bits/stdc++.h> //not accepted //#include <boost/multiprecision/cpp_int.hpp> //using namespace boost::multiprecision; using namespace std; #define pb push_back #define eb emplace_back #define mp(x,y) make_pair(x,y) #define mod 1000000007 double PI=3.1415926535897932384626; typedef long long ll; typedef lon...
ALGO
0.99996
3.68521
239c7111-d6ae-4dcf-aced-04ba85b80c50
shangrex/leetcode
0110-balanced-binary-tree/0110-balanced-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999897
6.465475
22a3194f-89f1-4090-81ed-d7e3217aa17f
bryansgue/Casadi_3.5.5
casadi/include/casadi/core/concat.cpp
#include "concat.hpp" #include "casadi_misc.hpp" using namespace std; namespace casadi { Concat::Concat(const vector<MX>& x) { set_dep(x); } Concat::~Concat() { } int Concat::eval(const double** arg, double** res, casadi_int* iw, double* w) const { return eval_gen<double>(arg, res, iw, w); } ...
TOOL
0.953028
5.595421
56d294ae-bb50-444c-9f9b-072534398399
Yashmenaria1/Leetcode_daily_solutions
1489. Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree.cpp
class UnionFind { public: vector<int> parent; UnionFind(int n){ parent.resize(n); for(int i=0;i<n;i++) parent[i] = i; } int findParent(int p) { return parent[p] == p ? p : parent[p] = findParent(parent[p]); } void Union(int u , int v) { i...
ALGO
0.999918
5.256448
7fd171d8-0cdc-4799-951f-831f3ed0b633
kamilsa/PDS1
my_graphs/sgr.cpp
// // Created by Kamil on 21/09/15. // #include <iostream> #include <unordered_map> #include "sgr.h" bool classcomp::operator()(const shared_ptr<StaticVertex> &lhs, const shared_ptr<StaticVertex> &rhs) const { return lhs->getName() < rhs->getName(); } std::size_t KeyHasher::operator()(const shared_ptr<StaticVert...
ALGO
0.999609
4.429689
f1a649a0-63f0-4dca-98ab-1a3820c11109
PanPyzi/barewm
main.cpp
#include <X11/Xlib.h> #include <X11/Xutil.h> #include <stdbool.h> #include <stdio.h> #include <cstdlib> #include <vector> #include <unistd.h> #include <typeinfo> struct client{ Window win; int desktop;bool visible;}; void OnMapRequest(Display* dpy,const XMapRequestEvent& ev); void OnCreateNotify(const XCreateWindowEv...
TOOL
0.954947
4.108799
0ed97a39-d9cc-4d64-b79a-824d04c2f740
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_3185_47.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b; int n = 0; while (a < b) { a = 3 * a; b = 2 * b; n++; } cout << n; return 0; }
ALGO
0.999811
4.026925
360ff3f6-2890-49f7-9706-e734d034cc65
snigdha2808/codechef-questions
Practice_codechef/FLOW004.cpp
#include<iostream> #include<cmath> using namespace std; int main() { int i,t,sum=0; cin>>t; for(i=0;i<t;i++) { int n; cin>>n; int fd,ld,c=0,copy; ld=n%10; copy=n; while(copy!=0) { c++; copy=copy/10; } fd=n/(i...
ALGO
0.999862
4.72467
85acd843-c9f1-44cc-bb8d-c68b113042be
cy9ic/codeforces
Kotlin practice 9 (release 2)/spy.cpp
#include <iostream> using namespace std; int main(){ int t ; cin>>t; while(t>0){ int n ; cin>>n; int arr[n]; for(int i = 0 ; i < n ; i ++){ cin>>arr[i]; } int store = arr[0]; int count = 0; for(int i = 1;i<n;i++){ if(arr[i]==store){ count++; } } if(count==0){ cout<<0<<endl; }...
ALGO
0.999883
3.454621
2318479c-acf2-46a4-b861-c823aedcc0bd
layman89gsu/Codeforces_Problems
Boredom.cpp
/********Start of Template*******/ /***In The Name Of God***/ /****Better three hours too soon than a minute too late.****/ #define ONLINE_JUDGE #include<bits/stdc++.h> #include<iomanip> using namespace std; #define db(x) cout<<#x<<"="<<x<<'\n' #define db2(x,y) cout<<#x<<"="<<x<...
ALGO
0.998816
4.060427
50aafc2a-ac22-4091-bc2d-b459c2a1f5e8
simonlynen/android_libs
eigen/jni/eigen/doc/snippets/Tutorial_solve_triangular.cpp
Matrix3f A; Vector3f b; A << 1,2,3, 0,5,6, 0,0,10; b << 3, 3, 4; cout << "Here is the matrix A:" << endl << A << endl; cout << "Here is the vector b:" << endl << b << endl; Vector3f x = A.triangularView<Upper>().solve(b); cout << "The solution is:" << endl << x << endl;
ALGO
0.999667
3.045018
1d17f983-62a2-40d9-b856-073517801076
PokemonCoin70/PokemonPAY
src/crypto/hmac_sha256.cpp
#include "crypto/hmac_sha256.h" #include <string.h> CHMAC_SHA256::CHMAC_SHA256(const unsigned char* key, size_t keylen) { unsigned char rkey[64]; if (keylen <= 64) { memcpy(rkey, key, keylen); memset(rkey + keylen, 0, 64 - keylen); } else { CSHA256().Write(key, keylen).Finalize(rke...
ALGO
0.985362
5.856034
3c2e1065-7b9e-4855-8b12-1b39fa7766f4
Kai7/LeetCode
0054.SpiralMatrix/main.cpp
#include "solver.hpp" #include "utils/data_structure.hpp" #include "utils/utils.hpp" void runSample(vector<vector<int>>& matrix){ std::cout << "Input: matrix = " << toString_Matrix(matrix) << std::endl; Solution solver; vector<int> ans = solver.spiralOrder(matrix); std::cout << "Output: " << toString(ans) << s...
ALGO
0.999735
5.275264
3594db9b-0b14-46ba-910e-5aa689d7ac9a
JNArrazola/Leetcode_Files
455_assign_cookies/main.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int findContentChildren(vector<int> &g, vector<int> &s) { sort(g.begin(), g.end()); sort(s.begin(), s.end()); int index = 0, cnt = 0; while (index < s.size() && cnt < g.size(...
ALGO
0.99963
5.382671
0f52d54e-bfc7-4746-b810-6265e2e42df6
MingzhenY/code-warehouse
CodingWebsites/URAL/Volume4/1336.cpp
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> #define inf 0x5fffffff #define FOR(i,n) for(long long (i)=1;(i)<=(n);(i)++) #define For(i,n) for(long long (i)=0;(i)<(n);(i)++) #define out(i) <<#i<<"="<<(i)<<" " #define OUT1(a1) cout out(a1) <<endl #define OUT2(a1,a2) co...
ALGO
0.999092
3.097996
b2b7bf5a-9dfa-44de-8cf8-867673b1faa3
Exr0nProjects/learn_cpp
problems/contests/vjudge/313606/1/main.cpp
/* * VJudge 313606 1 * 24 July 2019 * Alice's weird dishes */ #include <iostream> #include <cstdio> #include <exception> #include <algorithm> #include <math.h> #include <random> #include <tuple> #include <string> #include <vector> #include <set> #include <map> #include <unordered_map> #include <queue> #include <s...
ALGO
0.999772
3.419888
c20c7884-fecc-4a28-a672-1eca32087a95
ZhouWeikuan/zoj
zju.finished/2185.cpp
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<iostream> using namespace std; int find(int n){ int low =1, hi =5000; int mid; while(hi > low){ mid = (hi+low)/2; if(mid * (mid+1) < 2*n){ low = mid + 1; } else { hi = mid; } ...
ALGO
0.997987
3.7922
99acf82e-5b29-4221-9657-61bc995600c6
urasylmaz1/rehber-sistem
frontend/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.998303
6.76775
5da8b870-1756-43a2-bdb3-6bf23d345006
Alex22sv/ProgramacionEstructurasDinamicas
CPP/CalcularPotencia.cpp
/* 16/08/2023 */ #include <iostream> #include <windows.h> using namespace std; /* / ; () > [] ? : $ @ & % # "" = _ ! */ int CalcularPotencia(int base, int exponente); int main(){ // Función que permite mostrar los caracteres especiales en la terminal SetConsoleOutputCP(CP_UTF8); int base, expone...
ALGO
0.977376
4.311291
d1102b2b-a222-40ed-8c3e-e36098c82ed1
ishandutta2007/codeforces
hld67890/normal/632/A.cpp
#include <iostream> #include <stdio.h> #include <cstdlib> #include <string.h> using namespace std; int main () { long long s = 0 , p , k; char z[60][60]; int i , n; scanf ( "%d%I64d" , &n , &p ); k = 0; for ( i = 1 ; i <= n ; i++ ) scanf ( "%s" , z[i] ); for ( i = n ; i >= 1 ; i-- ) { if ( strlen ( z[i] ) ==...
ALGO
0.982953
3.197675
23fb0fe4-dcf3-4f2d-88ab-0c94984011b4
coke5151/programming-competition
ZeroJudge/e155.cpp
// e155.10935 - Throwing cards away I // https://zerojudge.tw/ShowProblem?problemid=e155 #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; while (cin >> n) { if (n == 0) return 0; queue<int> q; for...
ALGO
0.99971
5.702688
332344a1-4b0d-45fa-beea-f8a5ad0faedf
BigMangoHead/competitive-programming
codeforces-mock/codeforces-r953/A/a.cpp
#include <bits/stdc++.h> using namespace std; void run() { int n; cin >> n; vector<int> a(n-1); for (int i=0;i < n-1; i++) { cin >> a[i]; } int end; cin >> end; sort(a.begin(), a.end()); cout << end + a[n-2] << endl; } int main() { std::ios::sync_with_stdio(false); ...
ALGO
0.999702
3.151774
fbe60726-3a8f-45f0-a643-5e67a731beb9
kxkx5150/MikanOS-Codespaces
mikanos/day27c/apps/rpn/rpn.cpp
#include <cstring> #include <cstdlib> #include <cstdio> #include "../syscall.h" int stack_ptr; long stack[100]; long Pop() { long value = stack[stack_ptr]; --stack_ptr; return value; } void Push(long value) { ++stack_ptr; stack[stack_ptr] = value; } extern "C" void main(int argc, char** argv) { stack_pt...
ALGO
0.99557
4.401271
e143cdeb-dd22-4400-bbc8-a6bcaec77cfc
raincross7/code-similarity
codes/train_code/problem059/problem059_27.cpp
// #pragma GCC optimize(3,"Ofast","inline") #include <bits/stdc++.h> #include <iostream> #include <fstream> using namespace std; typedef long long ll; typedef unsigned long long ull; const int mod = 1e9 + 7; const ll infll = 1e18 + 9; const int infint = 1e9 + 7; const int MAXN = 1e5 + 7; const double eps = 1e-9; const ...
ALGO
0.999918
3.48861
c7eaf83b-694d-474d-842e-1cae28f33517
Nemrod-7/codewars
temp/pipes.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; const vector<pair<int,int>> direct = {{0,-1},{1,0},{0,1},{-1,0}}; // north,east,south,west void showgraph (vector<wstring> pipe) { for (int i = 0; i < pipe.size(); i++) { for (int j = 0; j < pipe[i].size(); j+...
ALGO
0.993357
3.444751
d8fc5b50-793c-40d0-9c02-0e1b6158c17c
jonosquire/athena-cgl
src/hydro/rsolvers/hydro/llf_rel_no_transform.cpp
// C++ headers #include <algorithm> // max(), min() #include <cmath> // sqrt() // Athena++ headers #include "../../hydro.hpp" #include "../../../athena.hpp" // enums, macros #include "../../../athena_arrays.hpp" // AthenaArray #include "../../../coordinates/coordinates.hpp" // Coord...
ALGO
0.999687
6.235303
b2dad0b4-7128-44ba-871a-1d4880592977
susan-castillo/fundamentos-progra-0125
susan/condicionales/06-05-25/sumaElementos.cpp
#include <iostream> #include <vector> using namespace std; int main(){ vector<int> numbers; int number = 0; bool answer; int sum = 0; start: cout << "Ingrese un numero: "; cin >> number; numbers.push_back(number); cout << "Quieres ingresar otro numero: (Si = 1 y No = 0): "; ...
ALGO
0.99264
3.148459
66789350-b885-464c-b674-c4d0a647a72a
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-cot-gpt4/Codenet/p02289/681549998/response_9.cpp
#include <iostream> #include <queue> using namespace std; priority_queue<int> heap; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int key; char com[10]; while (1) { cin >> com; if (com[0] == 'e' && com[1] == 'n') break; if (com[0] == 'i') { ...
ALGO
0.992333
3.844003
0a63aef2-f490-4982-9d62-1d4103ded009
Katsudon10/Competitive-programming
Atcoder/ABC/ABC196/c.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;++i) const int inf = INT_MAX; using ll = long long; //fixed << setprecision(5) int main(){ long long int num,num1,c,d; cin >> num; num1 = num; long long int a=1,aa=1; long int ss = 0; while (num1 != 0) { num1 /= 10; ss++; } if (...
ALGO
0.999533
3.366775
a92c09a2-3a0b-4ddc-bdae-bb3986e82d55
StreamAI/Leetcode-CPP
Dynamic Programming/354.俄罗斯套娃信封问题.cpp
/* * @lc app=leetcode.cn id=354 lang=cpp * * [354] 俄罗斯套娃信封问题 */ // @lc code=start #include<vector> #include<algorithm> using namespace std; class Solution { public: int maxEnvelopes(vector<vector<int>>& envelopes) { int sz = envelopes.size(); if(sz < 2) return sz; sort(env...
ALGO
0.999991
6.170091
2844a1b1-7ab4-4ce9-a8be-ddb604a02c16
Pyaxy/algorithm-practice
Program_Design/ACWing/BasicAlgorithmCourse/Lecture_1_BasicAlgorithm/归并排序.cpp
#include<iostream> using namespace std; const int N = 1e6 + 10; int n; int q[N], temp[N]; void merge_sort(int q[], int l, int r) { if(l >= r) return; int mid = l + r >> 1; merge_sort(q, l, mid); merge_sort(q, mid+1, r); int k = 0, i = l, j = mid + 1; while(i <= mid && j <= r) { if(q[i] <= q[j]) { ...
ALGO
0.999998
4.192751
4748df00-6a0a-4977-ab9d-ea2c9507a344
jaredramey/AutomationTest_Playground
Engine/Source/Runtime/GeometryCore/Private/CompGeom/FitOrientedBox2.cpp
#include "CompGeom/FitOrientedBox2.h" #include "Containers/Array.h" #include "Math/Vector.h" #include "OrientedBoxTypes.h" #include "VectorTypes.h" #include "IndexTypes.h" #include "MathUtil.h" #include "CompGeom/ConvexHull2.h" #include "CompGeom/ExactPredicates.h" namespace UE { namespace Geometry { template<typenam...
ALGO
0.99888
7.914419
d307b2f8-65bc-40ce-b25a-b5a059e08d3b
Ujala-2110/STRIVER-SDE-SHEET
Longest_palindromic_substr.cpp
#include <bits/stdc++.h> int expand(string &s, int left, int right) { while (left >= 0 and right < s.length() and s[left] == s[right]) { left--; right++; } return right - left - 1; } string longestPalinSubstring(string str) { int start = 0, end = 0; int maxLen = 0; for (int ...
ALGO
0.999935
5.929638
4a75d572-6475-410f-bce7-a93c88ddff75
doorcs/Algorithm
Programmers/풍선_터트리기.cpp
#include <string> #include <vector> using namespace std; int solution(vector<int> a) { int sz = a.size(); vector<int> rmin(sz); int min = 1e9; for (int i = sz-1; i > 0; i--) { min = min < a[i] ? min : a[i]; rmin[i] = min; } int ans = 0; min = 1e9; for (int i = 0; i < s...
ALGO
0.999735
4.952792
0cc5301a-911b-496c-ab6f-257137118353
viram-ms/CPP
c++/trie.cpp
class node { public: map<int,node*>mp; bool isLast; }; class Trie { public: node* root; /** Initialize your data structure here. */ Trie() { root = new node(); root->isLast=false; } /** Inserts a word into the trie. */ void insert(string word) { n...
ALGO
0.999758
5.432993
48bb9085-e10b-4160-91e8-a5ba25747063
KwakJiyeon/BOJ
20210809~20210815/10103_주사위게임.cpp
#include <iostream> using namespace std; int main() { int n = 0; cin >> n; int p1 = 100; // â int p2 = 100; // for (int i = 0; i < n; i++) { int s1, s2; cin >> s1 >> s2; if (s1 > s2) { p2 -= s1; } else if (s1 < s2) { p1 -= s2; } } cout << p1 << "\n" << p2; }
ALGO
0.99987
3.380579
960e7e64-5d50-4f34-abf4-4e537a98f051
arash16/prayers
UVA/vol-001/113.cpp
/* >>~~ UVa Online Judge ACM Problem Solution ~~<< ID: 113 Name: Power of Cryptography Problem: https://onlinejudge.org/external/1/113.pdf Language: C++ Author: Arash Shakery Email: <EMAIL> */ #include <stdio.h> #include <string.h> #include <string> #include <iostream> #include <sstream> #include <math...
ALGO
0.999405
3.185199
db3955c4-094f-4ded-8b9b-53ef1af72f81
AkshathKamath/Data-Structures-Algorithms
Linked List/1D/delete_head.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; public: Node(int data1) { data = data1; next = nullptr; } }; Node *arrtoLL(vector<int> &arr, int n) { Node *head = new Node(arr[0]); Node *mover = head; for (int i = 1; i < n; i+...
ALGO
0.999853
5.422242
431c7b6e-61cd-4282-ae96-5ce28d1ee8f4
neuroimaginador/utils4ni
src/transform_volume.cpp
#include <Rcpp.h> using namespace Rcpp; # define CUBE(x) ((x) * (x) * (x)) # define SQR(x) ((x) * (x)) // This is a simple example of exporting a C++ function to R. You can // source this function into an R session using the Rcpp::sourceCpp // function (or via the Source button on the editor toolbar). Learn // m...
ALGO
0.985956
6.086182
f3b4cc2e-80ce-4415-9424-898d60991761
johangardhage/retro-book-tricks3dgurus
ORIGINAL/SOURCE/T3DIICHAP13/T3DLIB9.CPP
// T3DLIB9.CPP - z buffering // I N C L U D E S /////////////////////////////////////////////////////////// #define DEBUG_ON #define WIN32_LEAN_AND_MEAN #include <windows.h> // include important windows stuff #include <windowsx.h> #include <mmsystem.h> #include <objbase.h> #include <iostream.h> // include impo...
ALGO
0.974233
4.294258
20a910b5-9234-4738-b7da-65d53e9358d9
Tsh007/DSA
combinedDsa/combinedDsa/DP/3_frog_jump.cpp
//// //// 3_frog_jump.cpp //// combinedDsa //// //// Created by Tejash Singh on 15/10/24. //// // //#include <stdio.h> //#include "bits/stdc++.h" // //using namespace std; // ////int customFunc(vector<int>&height,int n,int prev){ //// //// if(n>=height.size())return INT_MAX; //// //// if(n == height.si...
ALGO
0.999867
5.091485
d8f8a1fd-58bb-4cdf-98de-19b59b88f0e2
lzb991435344/Algorithm
nowcoder/nowcoderAlgorithm/03String/A树在B树种存在拓扑KMp.cpp
#include <iostream> #include <string> #include <stdio.h> using namespace std; /** 对于两棵彼此独立的二叉树A和B,请编写一个高效算法,检查A中是否存在一棵子树与B树的拓扑结构完全相同。 给定两棵二叉树的头结点A和B,请返回一个bool值,代表A中是否存在一棵同构于B的子树。 需要判断A树中是否存在B的子树,我们可以把树进行一个前序遍历(图片左边的树为A树,右边的树为B树):A:12453 B:245, 我们可以发现A中有245字串和B中的子串相等,发现了这个东西后,再仔细思考是否可以把两个树的子树问题变换为字符串匹配的问题呢, 但这里还...
ALGO
0.999845
4.561471
7fbea9a6-08dc-4670-a1be-344fe46988a0
neelkanjariya1996/Algorithms
Searching_and_Sorting/pigeonhole_sort.cpp
#include <iostream> #include <vector> using namespace std; void pigeonhole_sort (int arr[], int n) { int index = 0; int range = 0; int min = 0; int max = 0; int i = 0; min = arr[0]; max = arr[0]; for (i = 1; i < n; i++) { if (arr[i] < min) { ...
ALGO
0.999982
5.10966
a16e4a9a-d746-4cad-8d17-a1ffeacf4a39
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Gemma/top0-100/maximize-score-after-n-operations-Solution.maxScore/177843_+Info.cpp
_PUBLIC_ size_t strlen_m_ext_handle(struct smb_iconv_handle *ic, const char *s, charset_t src_charset, charset_t dst_charset) { size_t count = 0; #ifdef DEVELOPER switch (dst_charset) { case CH_DOS: case CH_UNIX: smb_panic("cannot call strlen_m_ext() with a variable dest charset (must be UTF16* or UTF8)"...
ALGO
0.994552
4.650455
31dae793-9879-4d08-b3de-3fb04d28e785
Mann-gupta1/-45dayschallengeby-arshgoyal
reverse-pair.cpp
class Solution { public: int reversePairs(vector<int>& nums) { return mergeSort(nums, 0, nums.size() - 1); } private: int mergeSort(vector<int>& nums, int pre, int next) { if (pre >= next) { return 0; } int flag = pre + (next - pre) / 2; int ...
ALGO
0.999942
5.965729
9151e1ce-91ca-48d0-9eee-bf688949baa9
MrZ3RO-K3NiS7/CODE-SUBMiSSiONS
CODECHEF/WATERFILLING.cpp
#include <bits/stdc++.h> using namespace std; #define Nice_To_Meet_U int main() #define MRZ ios_base #define ll long long #define db double #define ld long double #define ull unsigned long long #define str ...
ALGO
0.999727
3.58003
e09beaf9-8c91-4a9c-b53e-8395f46d79db
Sakurai00/Contest-Code
Cpp/AtCoder/ABC/120-139/137/137-A.cpp
#include <bits/stdc++.h> using namespace std; int main () { int A, B, max; cin >> A >> B; max = A + B; if (max <= A * B) max = A * B; else if (max <= A - B) max = A - B; cout << max << endl; }
ALGO
0.999243
3.553411
492f919c-0629-4d3f-ba5d-169d85e1cca5
oscarmb94/bta
geos-3.8.1/src/operation/buffer/BufferInputLineSimplifier.cpp
#include <geos/operation/buffer/BufferInputLineSimplifier.h> #include <geos/geom/CoordinateSequence.h> // for inlines #include <geos/geom/CoordinateArraySequence.h> // for constructing the return #include <geos/algorithm/Distance.h> // for use #include <geos/algorithm/Orientation.h> // for use #include <geos/util.h> #...
ALGO
0.990275
7.021716
77e47d81-e9ef-473b-8b46-c06d3d02bf64
Hikari9/UVa
10220 - I Love Big Numbers!.cpp
/** UVa 10220 - I Love Big Numbers! by Rico Tiongson Submitted: May 5, 2013 Accepted 0.122s C++ O(n^2) time */ #include<deque> #include<vector> #include<iostream> using namespace std; #define digitTYPE short class BigInt{ typedef deque<digitTYPE> vdig; typedef long long lag; #define T_ template #define _T type...
ALGO
0.999701
3.548081
df7995a8-842a-4076-9b76-2a9ddbe929f1
ishandutta2007/codeforces
tatyam/normal/1268/A.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using uint = unsigned int; using pcc = pair<char, char>; using pii = pair<int, int>; using pll = pair<ll, ll>; using pdd = pair<double, double>; using tuplis = array<ll, 3>; template<class T> usin...
ALGO
0.999966
3.92458
ff6d679c-5008-4cb2-91e5-51e4379f258c
manncodes/contest
1779/c/c-new.cpp
/* Author: manncodes Time : 03 January 2023 21:02:52 File: c.cpp 92017900-36d8-44ee-9fdb-f94b4f33c352 "*/ #include "bits/stdc++.h" #include "ext/pb_ds/assoc_container.hpp" #include "ext/pb_ds/tree_policy.hpp" using namespace std; using namespace __gnu_pbds; template <typename T> using oset = tree<T, n...
ALGO
0.999981
5.043891
cae8d34c-f002-4603-9977-34e26031cef3
easy-graph/Easy-Graph
cpp_easygraph/functions/components/strongly_connected.cpp
#include "strongly_connected.h" #include "connected.h" #include "../../classes/directed_graph.h" #define MAX_NODES_NUM4RECURSION_METHOD 100000 py::object strongly_connected_components(py::object G) { bool is_directed = G.attr("is_directed")().cast<bool>(); if (is_directed == false) { printf("connecte...
ALGO
0.997872
6.593319
7c09a6a5-f604-4b7c-9434-3d343e868ed6
KPBaldur/Curso01C
ForArray.cpp
#include <iostream> using namespace std; int main(){ int numeros[] = {10, 20, 30, 40, 50}; int tamano = sizeof(numeros) / sizeof(numeros[0]); // Ciclo for que recorre un array e imprime sus elementos for(int i = 0; i< tamano; ++i) { cout << numeros[i] << endl; } return 0; }
ALGO
0.913375
3.931703
33df43ee-3631-4aeb-8b14-937fd3247887
Gopisen777/DSA_Superme_2.0
Arrays/Array/18_Sort_0_1_2s.cpp
#include<iostream> using namespace std; int main(){ int arr[] = {0,1,0,1,0,1,2,2,0,1,2}; int n = 11; int left = 0; //0 se int right = n-1; //2 se int index = 0; while(index <= right){ if(arr[index] == 0){ swap(arr[index],arr[left]); left++; index++; } else if(arr[index] == 2...
ALGO
0.999972
3.320179
a00584b3-f3de-49ff-b2f1-28fc33f4992d
N-eeraj/code_website
Code/cpp/palindrome.cpp
#include<iostream> #include<string.h> using namespace std; int main() { char input[25]; string result = "Palindrome"; int length, i; cout << "Enter Input: "; cin >> input; length = strlen(input); for (i = 0; i < length / 2; i++) { if (input[i] != input[length - i - 1]) ...
ALGO
0.997329
3.994317
d7f5d970-1659-48ec-b6dd-23f75d4ca8f9
myway3d-export/myway3d
ThirdParty/MyGui/src/MyGUI_GeometryUtility.cpp
/*! @file @author George Evmenov @date 12/2010 */ #include "MyGUI_Precompiled.h" #include "MyGUI_GeometryUtility.h" namespace MyGUI { namespace geometry_utility { VectorFloatPoint cropPolygon(FloatPoint* _baseVerticiesPos, size_t _size, const IntCoord& _cropRectangle) { VectorFloatPoint resultVerticie...
TOOL
0.996024
6.456762
0e561bae-1af8-4868-a8d6-ffd2e80d2be0
muskan20-creator/program
test program 3.cpp
#include <iostream> using namespace std; int main() { int base; int height; cout << "Area = 1/2*base*height"; cin >> base; cin >> height; cout <<"Area is " << 1.0/2.0*base*height; return 0; }
TOOL
0.870768
3.644695
7e36b170-1efe-4850-af4f-1f23eab6abc7
jazzcat/freeswitch
src/mod/applications/mod_stress/FFTReal.cpp
/***************************************************************************** * * * DIGITAL SIGNAL PROCESSING TOOLS * * Version 1.03, 2001/06/15 * * ...
ALGO
0.99964
5.69827
35f345bb-66a6-43cc-ac5a-d6a36b940f7f
jianminchen/LeetCode-III
28. Implement strStr().cpp
class Solution { public: int strStr(string haystack, string needle) { if (haystack.size() == 0 && needle.size() == 0) return 0; for (int i = 0; i < haystack.size(); i++) { string temp = haystack.substr(i, needle.size()); if (i + needle.size() <= haystack.s...
ALGO
0.999782
5.798705
30da4fff-3450-4088-a4bd-d8b08acae77d
raincross7/code-similarity
codes/train_code/problem403/problem403_58.cpp
#include<bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int a,b; cin>>a>>b; if(a>=b){ for(int i=1;i<=a;i++) cout<<b; } else for(int i=1;i<=b;i++) cout<<a; return 0; }
ALGO
0.99992
3.09068
32b3847b-b524-4849-80de-0d626d74d3ad
amineleghouil/LeetCode
2410-maximum-matching-of-players-with-trainers/2410-maximum-matching-of-players-with-trainers.cpp
class Solution { public: int matchPlayersAndTrainers(vector<int>& players, vector<int>& trainers) { sort(players.begin(), players.end()); sort(trainers.begin(), trainers.end()); int i = 0, j = 0, res = 0; while (i < players.size() && j < trainers.size()) { if (players[i] ...
ALGO
0.999932
5.60848
de05bb51-f422-4c99-91ba-9d26def61ae8
pengw0048/Ural--Timus--Solution
2003/2003_6989895_AC_20160906201055.cpp
#include <iostream> #include <map> #include <cmath> using namespace std; map<int,int> c; int main(){ int n,x,l,t; ios::sync_with_stdio(false); cin>>n; for(int i=0;i<n;i++){ cin>>x; l=-1; while(x>=2){ t=sqrt(x)+1; for(int j=2;j<=t;j++)if(x%j==0){ ...
ALGO
0.999968
3.207648
d1858193-c261-4fee-9af5-d6aff618a1cc
chauhansatyam3112/DSA-problems
0297-serialize-and-deserialize-binary-tree/0297-serialize-and-deserialize-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Codec { public: // Encodes a tree to a single string. string serialize(TreeNode* root) { if(...
ALGO
0.999671
6.092735
4eb74f6b-a884-466f-9cc7-f8af45dcec02
ZhuoerFeng/2019-OOP
PA4/problem_27/operator.cpp
#include "node.h" #include "operator.h" int GT::priority() { return 1; } int ST::priority() { return 1; } int GTE::priority() { return 1; } int STE::priority() { return 1; } int DEQ::priority() { return 1; } int NEQ::priority() { return 1; } int NOT::priority() { return 2; } int AND:...
ALGO
0.999289
5.180144
a5167322-7de3-4a35-bc95-eb50884b9372
EthanKim8683/High-School-Competitive-Programming
Codeforces/Problemset/DFS and Similar/1249b2.cpp
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; using U = unsigned; U adjs[200000]; U days[200000]; U dfs(U a, U root, U day) { const auto b = adjs[a]; if (b != root) day = dfs(b, root, day + 1); days[a] = day; return day; } int main(void) { #if defined(ETHANKIM8683) f...
ALGO
0.999932
4.171702
616d7e47-c9ab-4002-a4b1-09812d2e3942
yftsai/uva-online-judge
contest_volumes/volume_123/12335.cpp
#include <iostream> #include <cstdint> #include <string> using namespace std; string reverse(string s, uint64_t k) { if (k==0) return s; else { size_t len = s.length(); uint64_t n=1, f=1, m; for (; k/f>=(n+1); f*=++n) ; m = k/f; s = reverse(s, k-m*f);...
ALGO
0.99987
4.530834
05ae27bc-95aa-453b-be88-c6181e4b47ef
yyl/leetcode-cpp
SingleNumber.cpp
#include "SingleNumber.h" #include <unordered_map> using namespace std; Solution::Solution() { } int Solution::singleNumber(int A[], int n){ int result = 0; for (int i=0; i<n ;i++) { // exclusive or operation result ^= A[i]; } return result; } int Solution::singleNumber2(int A[],...
ALGO
0.999872
5.442575
d0012dfd-71fc-41d3-a541-cfbce04be42d
by-student-2017/lammps-14May16
src/USER-LB/fix_lb_viscous.cpp
/* ---------------------------------------------------------------------- Contributing authors: Frances Mackay, Santtu Ollila, Colin Denniston (UWO) ------------------------------------------------------------------------- */ #include <math.h> #include <stdlib.h> #include <string.h> #include "fix_lb_viscous.h" #inc...
ALGO
0.956921
5.977115
a1ceb2c7-3371-4a9e-8414-7799cf1dbed4
pedropiin/competitive-programming
mc621/09-20/throwing-cards-away2.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main (int argc, char* argv[]) { ios::sync_with_stdio(false); cin.tie(0); vector<int> pow2; int i = 0; int temp = pow(2, i); while (temp < 1000000) { pow2.push_back(temp); i++; temp = pow(2, i); ...
ALGO
0.999954
4.023418
ee899cee-5167-4bca-b09f-14556f6205c8
a00012025/Online_Judge_Code
TIOJ/1224.cpp
#include<bits/stdc++.h> #define LL long long using namespace std; const int maxn=1000000+10 ; struct P { int x,d,u,val ; bool operator < (const P &rhs) const { return x<rhs.x ; } }a[200000+10]; int ST[5*maxn],tag[5*maxn] ; void modify(int l,int r,int L,int R,int id,int val) { if(l==L && r...
ALGO
0.998253
3.255795
5637ef8d-484a-4d13-9dc4-b64ca3419a15
gnuinos/iceweasel-uxp
other-licenses/7zstub/src/CPP/7zip/UI/FileManager/BrowseDialog.cpp
// BrowseDialog.cpp #include "StdAfx.h" #include "../../../Common/MyWindows.h" #include <commctrl.h> #ifndef UNDER_CE #include "../../../Windows/CommonDialog.h" #include "../../../Windows/Shell.h" #endif #include "../../../Windows/FileName.h" #include "../../../Windows/FileFind.h" #ifdef UNDER_CE #include <commd...
TOOL
0.880654
5.988506
3195e5ea-8178-4e6d-8a77-39947501db92
federicomasiero/ant-colony
main.cpp
#include "TSP.h" #include "AntColony.cpp" int main(int argc, char** argv) { if (argc < 2) { cout << "Please, insert file path!\n"; system("PAUSE"); } cout << "File: " << argv[2] << "\n"; AntColony algorithm(argv[2]); algorithm.solve(); system("PAUSE"); };
ALGO
0.998264
3.954759
3b783d20-34ad-4244-82f1-71ee88837ee5
lee20h/TIL
Problem Solving/BOJ/1463. 1로 만들기.cpp
#include <iostream> #include <algorithm> using namespace std; int ans = 100000000; void sol(int x, int count, bool flag) { if (x==1) { flag = true; ans = min(count,ans); } if (ans<=count) return; if(x%3==0 && !flag) sol(x/3, count+1, flag); if(x%2==0 && !flag) sol(x/2, count+1, flag); if(!flag) sol(x-...
ALGO
0.999971
4.127394
035ccc24-65c3-4468-a95e-8a405ac5d862
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_3062_0.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 805; int f[MAXN], g[MAXN], o[MAXN]; int n, m; vector<int> p[110000]; int q[110000]; int main() { scanf("%d%d", &n, &m); int res = 0; for (int i = (1); i <= (int)m; i++) { int x, y; scanf("%d%d", &x, &y); if (x <= n - 800) res += 3; ...
ALGO
0.999681
3.282132
943dd76a-7b46-4e3a-8bb5-88fb4a74a1bf
Juan-Garcia16/Programacion-2
taller_punteros/ejercicio5.cpp
/*5-. Determinar si un número es primo o no; con punteros y además indicar en qué posición de memoria se guardó el número. VSC ver 1.93.1 octubre 3/2024 Juan Pablo García */ #include <stdio.h> #include <math.h> int esPrimo(int *pnum) { if (*pnum <= 1) { return 0; //lo numeros menores o igual...
ALGO
0.997251
3.112014
bffd4885-ce44-42cd-b31f-c2c298cc94d7
ZhuangPeng97/BuildFaceFlowDataCode
tools/Fast_RNRR-master/include/igl/grid_search.cpp
#include "grid_search.h" #include <iostream> #include <cassert> template < typename Scalar, typename DerivedX, typename DerivedLB, typename DerivedUB, typename DerivedI> IGL_INLINE Scalar igl::grid_search( const std::function< Scalar (DerivedX &) > f, const Eigen::MatrixBase<DerivedLB> & LB, const ...
ALGO
0.999976
5.85154
34a296ef-d304-4aea-8cf2-249eeeda027a
facebookresearch/NeRF-Det
mmdet3d/mmcv/ops/csrc/pytorch/cpu/box_iou_quadri.cpp
template <typename T> void box_iou_quadri_cpu_kernel(const Tensor boxes1, const Tensor boxes2, Tensor ious, const int mode_flag, const bool aligned) { int output_size = ious.numel(); auto num_boxes1 = boxes1.size(0); auto num_boxes2 = boxes2.size(0); ...
ALGO
0.99401
5.091899
b762d35f-b7cc-42b6-911c-b6415ea0a8c4
Laaaaksh/Cp
Codeforces/templates/bfsdfs.cpp
#include <bits/stdc++.h> using namespace std; // Function to add an edge to the graph void addEdge(vector<vector<int>>& adj, int u, int v) { adj[u].push_back(v); adj[v].push_back(u); // For undirected graph } // BFS function void bfs(const vector<vector<int>>& adj, int start) { set<int> visited; queue...
ALGO
0.999993
6.599164
2d2ca67f-ab54-4944-a193-d4e66509a9e9
NicolauHS/beecrowd-problems
beecrowd/1029_Fibonacci_Quantas_Chamadas.cpp
#include <bits/stdc++.h> using namespace std; int fib(int index, int& callCount) { if (index == 0) { return 0; } if (index == 1) { return 1; } callCount+=2; int leftCalls = 0, rightCalls = 0; auto left = fib(index - 1, leftCalls); auto right = fib(index - 2, rightCalls); callCount += l...
ALGO
0.999808
4.346617
5ee88f0e-d7cc-4236-8321-d64d5b1b04e9
JonathonMacleod/Distributed-Game-Architecture
libs/BOOST1.82.0/libs/intrusive/perf/perf_list.cpp
//Includes for tests #include <boost/intrusive/detail/config_begin.hpp> #include <boost/config.hpp> #include <list> #include <functional> #include <iostream> #include <boost/intrusive/list.hpp> #include <boost/date_time/posix_time/posix_time.hpp> using namespace boost::posix_time; //[perf_list_value_type //Iteration ...
TEST
0.886251
6.884774
924fed46-7943-4065-90b8-c9c3e0908a6c
Parth-Sohal/cpp.Parth
vectors/cyclicsort.cpp
#include <iostream> #include <algorithm> #include <limits.h> #include <cmath> #include <bits/stdc++.h> #include <vector> using namespace std; // int main(){ // vector<int> nums = {3,1,3,4,2}; // int i = 0; // while(i<nums.size()){ // if((nums[i]>0 && nums[i]<nums.size()) && (nums[i]!=nums[num...
ALGO
0.999866
3.829628
b1b106f5-5bff-479a-a2a8-7e9d0d0edfb6
erlang24/zhlc_perception
universe/perception/tracking_object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp
#include "tracking_object_merger/data_association/solver/mu_successive_shortest_path.hpp" #include <mussp/mussp.h> #include <array> #include <cassert> #include <fstream> #include <iostream> #include <string> #include <unordered_map> #include <vector> namespace gnn_solver { void MuSSP::maximizeLinearAssignment( con...
ALGO
0.998872
5.754651
ca233fa1-2ad0-4306-a88b-11875e9a1eca
ishandutta2007/codeforces
mr.ilchi/normal/286/A.cpp
/* * in the name of god * * * * * * * * */ #include <iostream> #include <fstream> #include <sstream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <ctime> #include <algorithm> #include <vector> #include <queue> #include <deque> #include <stack> #include <set> #include <map...
ALGO
0.999924
3.670765
7e418032-e780-443f-a143-5ae349d9bdd0
VogelDevelopment/CreativeCoding-Cinder
src/HelloWorldApp.cpp
#include "cinder/Log.h" #include "cinder/ImageIo.h" #include "cinder/Rand.h" #include "cinder/Timer.h" #include "cinder/app/App.h" #include "cinder/app/RendererGl.h" #include "cinder/gl/Batch.h" #include "cinder/gl/Context.h" #include "cinder/gl/GlslProg.h" #include "cinder/gl/Texture.h" #include "cinder/gl/VboMesh.h" ...
ALGO
0.913864
5.517238
76c701bf-2696-45be-a099-7bea917fe550
ramywael/Algorithmic-Challenges-L2
Problem 9/Problem 9.cpp
#include<iostream> using namespace std; int ReadPostiveNumber(string message) { int number = 0; do { cout << message << "\n"; cin >> number; } while (number < 0); return number; } int CalcFrequancy(int number,short digit) { int reminder = 0; int counter = 0; while (number > 0) { reminder = number % 10; ...
ALGO
0.998981
4.565031
09ad2d97-bc39-4e00-93f3-66b0adbd6949
jaisharma687/LeetCode
2201 to 2300/C++/2206_divide-array-into-equal-pairs.cpp
#include<bits/stdc++.h> using namespace std; #define endl '\n' #define int long long const int mod = 1e9+7; class Solution { public: bool divideArray(vector<int>& nums) { unordered_map<int,int> mp; for(int x: nums){ mp[x]++; } for(auto& x: mp)...
ALGO
0.999468
5.036977
74ecd416-3645-49fc-b699-d70dc731ecc9
mayank7jha1/LNMIIT
Lecture 4/Search.cpp
#include<bits/stdc++.h> using namespace std; // const int N = 0; bool Search(int *a, int s, int target) { if (s < 0) { return false; } if (a[s] == target) { return true; } //Next Stage: return Search(a, s - 1, target); } int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >>...
ALGO
0.999997
4.664445
63379fd6-44fa-4e2b-97a5-96ab3e7acd42
abdulrahman9901/LeetCode-solutions
Manually added/reverse-linked-list/Accepted/6-7-2024, 6_59_34 PM/Solution.cpp
// https://leetcode.com/problems/reverse-linked-list /** * 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) {} * }; ...
ALGO
0.999925
6.216363
7579152e-f966-4901-823a-ddcee22420ee
andeplane/AtomifyVisionPro
LAMMPS/src/compute_reduce_chunk.cpp
#include "compute_reduce_chunk.h" #include "arg_info.h" #include "atom.h" #include "compute.h" #include "compute_chunk_atom.h" #include "error.h" #include "fix.h" #include "input.h" #include "memory.h" #include "modify.h" #include "update.h" #include "variable.h" #include <cstring> using namespace LAMMPS_NS; enum {...
TOOL
0.992384
5.564133