uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
908905ed-96ea-4692-bf2f-e9aded4fb37f
bethanrv/cse-486---Final-Project
Joseph C++/eigen/doc/examples/TutorialLinAlgSVDSolve.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { MatrixXf A = MatrixXf::Random(3, 2); cout << "Here is the matrix A:\n" << A << endl; VectorXf b = VectorXf::Random(3); cout << "Here is the right hand side b:\n" << b << endl; cout << "The least-squares ...
ALGO
0.999695
4.175827
584d15bf-5ae4-4503-a628-2482f6d7f514
ilpam/myLeetcode
tmp/08-atoi.cpp
class Solution { public: int myAtoi(string s) { int i = 0; int result = 0, pop; bool nagative = false; while (i < s.size() && s[i] == ' ') { ++i; } if (i < s.size()) { if (s[i] == '-') { nagative = true; ++i; ...
ALGO
0.999515
5.299443
550bb6b8-8e88-4763-ab20-0360520a55f8
Lalit-N97/learning-from-lc
lc-2401.cpp
/** Medium - Longest Nice Subarray https://leetcode.com/problems/longest-nice-subarray Written By : LalitN97 **/ class Solution { public: /** Idea : we need to take two pointers to iterate over the nums array which will consider shrinking and expanding the window between two pointers based on satisfying t...
ALGO
0.999993
6.221078
a2e7e1ef-fdc4-4d1a-80ea-5c38ea72d486
bluesea0/Leetcode
263. 丑数/263. 丑数.cpp
#include <iostream> #include<vector> #include<queue> using namespace std; //10-15Ҳ̫ˡ class Solution { public: bool isUgly(int num) { if(num==0) return false;//0dz int nums[]={2,3,5}; for(auto n:nums){ while(num%n==0){ num/=n; } if(num==1)br...
ALGO
0.999805
4.971737
5e5a4fa2-9352-4ef4-9ebc-a915e7e19670
masterSahil/DSA
Practical_Exam/main.cpp
#include<iostream> #include<vector> using namespace std; class Node { public: int data; Node* next; Node(int data) { this->data = data; this->next = NULL; } }; class List { public: int size; Node* head; List() { this->head = NULL; this->size = 0; } ...
ALGO
0.995967
4.663692
3c83882e-9514-42ee-a372-e68600e294e9
ndhuanhuan/16_coding_practice
401-600/476. Number Complement.cpp
// https://zxi.mytechroad.com/blog/bit/476-number-complement/ class Solution { public: int findComplement(int num) { size_t mask = ~0; while(num & mask) mask <<= 1; return ~num ^ mask; } };
ALGO
0.99962
6.032689
0a957da9-0135-4332-a782-e8a89a22a06f
kevinbadboyz/latihan_api
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.998733
6.76775
3f88521d-6f6b-4a4f-821f-e68cf374df8d
FES-leg/realtime_pthread
resource/file_handling/src/csv_handling.cpp
/** @file * @brief Contains definitions of functions used for reading and loading parameters from csv configuration files. */ /***************************************************************************************** * INCLUDES ****************************************************************************************...
TOOL
0.893544
3.813767
8092e032-1caf-46ab-b673-b54ab9215dc7
nikolapeja6/SS-Proj
SS Projekat/SS Projekat/line.cpp
#include "line.h" #include "my_util.h" #include <stack> using namespace std; #define OPCODE_OFF 24 #define ADDRMODE_OFF 21 #define REG0_OFF 16 #define REG1_OFF 11 #define REG2_OFF 6 #define TYPE_OFF 3 regex Line::blank("^\\s*$"); regex Line::comment("^[^;]*;\\s*(.*)$"); regex Line::label("^\\s*(\\w+)\\s*:[^:]*$"); r...
TOOL
0.940279
4.285811
4c767c18-e0a1-442a-8cb3-aca7117b9075
time-shimizu/mytodoapp
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.998859
6.785645
157dc713-e547-4652-b507-a735331175de
lucioeiras/inatel
c103/0-provas/1/hash5.cpp
#include <iostream> #include <cmath> using namespace std; struct Data { int key; int status; }; struct Hash { void create_table(Data t[], int m) { for (int i = 0; i < m; i++) { t[i].key = -1; t[i].status = 0; } } int aux(int k, int m) { int h = k % m; if (h < 0) { h += m...
ALGO
0.999949
4.142238
bc27a2c3-86d7-46d6-b0ad-0004df3e7ca4
giovanni1351/OpenCVOpenGL02
OpenCV4-6/sources/3rdparty/openexr/IlmImf/ImfRgbaYca.cpp
//----------------------------------------------------------------------------- // // Conversion between RGBA and YCA data. // //----------------------------------------------------------------------------- #include <ImfRgbaYca.h> #include <assert.h> #include <algorithm> using namespace IMATH_NAMESPACE; using namespa...
ALGO
0.969859
7.339673
fe6a5a25-59e4-4d1d-a2d7-f6c3c8eeb127
Rpatel9675/cpp_project
Calculator.cpp
#include "bits/stdc++.h" using namespace std; // Function to calculate the factorial of a number unsigned int factorial(int num) { int result = 1; for (int i = num; i > 0; i--) { result *= i; } return result; } // Function to validate if the input is a number bool isNumber(double& num) { c...
ALGO
0.99747
5.16277
8dfc4534-e18d-40a7-b2f7-6b5e5be1c44d
Shadow-gardan/Data-structure
Delete_tree_middle.cpp
#include <stdio.h> #include <stdlib.h> // Tree node structure struct Node { int data; struct Node* left; struct Node* right; }; // Function to delete a subtree void deleteTree(struct Node* root) { if (root == NULL) return; deleteTree(root->left); deleteTree(root->right); printf("De...
ALGO
0.999967
7.010442
33b21346-3304-4224-b320-3544b5e5d3d9
YashvirSinghNathawat/Strivers-SDE-Sheet-Challenge
15. Day 6 Majority element.cpp
#include <bits/stdc++.h> int findMajorityElement(int arr[], int n) { // Write your code here. int cnt=0,maj; for(int i=0;i<n;i++){ if(cnt==0){ maj = arr[i]; } if(arr[i]==maj){ cnt +=1; } else cnt-=1; } cnt = 0; for(int i=0;i<n;i++){ if(arr[i]==maj) cnt++; } if(cnt>(n/2)) return maj; retur...
ALGO
0.999944
4.727836
a4030702-c35c-47ed-91e1-2f8a2aab901d
giagia-git/PhatTrienUngDungDiDong
myapp/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.998627
6.785645
162ae04e-d383-4b4d-a6b9-9db08bd99760
austin1997/Leetcode_cn
leetcode_826_M/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <limits> #include <deque> #include <queue> #include <unordered_set> #include <unordered_map> #include <map> #include <set> #include <TreeNode.h> using namespace std; /* * @lc app=leetcode.cn id=826 lang=cpp * * [826] 安排工作以达到最大收益 ...
ALGO
0.999825
5.734076
5d2a3a0d-4c03-48f7-b00a-5d6101b72629
sigma390/DSA-Codes-Complete
1.Arrays/linearderch.cpp
#include<iostream> using namespace std; int linsearch(int arr1[], int n,int k){ // linear search implementation order of n for (int i = 0; i < n; i++) { if (arr1[i]==k) { return 1; } } return 0; } int main(){ int arr1[] = {1,2,3,4,5,6}; int n = s...
ALGO
0.99949
3.322432
5dea41e6-ec6d-4295-8f59-330491cff886
NVlabs/AutoDMP
dreamplace/ops/weighted_average_wirelength/src/weighted_average_wirelength.cpp
/** * @file weighted_average_wirelength.cpp * @author Yibo Lin * @date Jun 2018 * @brief Compute weighted-average wirelength and gradient according to e-place */ #include "utility/src/torch.h" #include "utility/src/utils.h" #include "weighted_average_wirelength/src/functional.h" DREAMPLACE_BEGIN_NAMESPACE t...
ALGO
0.969145
5.611355
96b9b338-f5cb-4b34-b900-66dfe9a34343
temraq/Graph-Paths
WindowsProject1/WindowsProject1/FileName.cpp
#include "Header.h" #include <iostream> #include <fstream> #include <vector> using namespace std; const int MAX_SIZE = 100; void Stack:: push(int e) { // edg[top] = e; top++; } void Stack:: pushwhole(Stack St) { // for (int i = 0; i < St.top; i++) { // this->push(St.edg[i]); // } ...
ALGO
0.99965
3.857683
8af0aa90-5b99-4d3e-bde1-abb0348c8a8e
PootieT/explain-then-translate
CodeGenMirror/data/transcoder_evaluation_gfg_fixed/cpp/MINIMUM_NUMBER_OF_JUMPS_TO_REACH_END_OF_A_GIVEN_ARRAY_2.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; int f_gold ( int arr [ ], int n ) { int * jumps = new int [ n ]; int min; jumps [ n - 1 ] = 0; for ( int i = n - 2; i >= 0; i -- ) { if ( arr [ i...
TEST
0.999636
5.170598
ff150c5f-f1a1-40af-ac33-da35e55cc469
BhishamGahlaut805/C_CPP_DSA_Algorithms
DSA_QUESTIONS/20_Jump_Game.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: bool canJump(vector<int> &nums) { int n = nums.size(); int farthest = 0; for (int i = 0; i < n; i++) { if (i > farthest) { return false; } farthes...
ALGO
0.999961
5.803679
28c99e9c-5dde-40df-a188-f80ed73f9547
ivorymood/ALGORITHM
PROGRAMMERS/LEVEL_02/Q42885.cpp
//https://programmers.co.kr/learn/courses/30/lessons/42885 //Ʈ #include <iostream> #include <vector> #include <algorithm> using namespace std; int solution(vector<int> people, int limit) { // sort(people.begin(), people.end()); // ū int low = 0; int high = people.size() - 1; i...
ALGO
0.999919
5.171292
e9ff2a37-6582-44a0-b2c9-8d3b25b262ab
malixian/-SYCL-MultiVendor-Test
dnn_op/gemm/sycl/main.cpp
#include <CL/sycl.hpp> #include <array> #include <sys/time.h> #include <iostream> using namespace std; using namespace sycl; #define M 256 #define N 256 #define K 256 #define INPUT_SIZE_1 M * K #define INPUT_SIZE_2 K * N #define OUTPUT_SIZE M * N constexpr int REPEAT = 100; int main() { gpu_selector Selector; ...
ALGO
0.980899
3.801259
3f6b20de-0ee3-4c43-970d-4f72d7f64956
lucifer-430/dsa
Recursion/R2/recursion class 2 codes/recursioncode1.cpp
#include<iostream> #include<vector> using namespace std; // int max(int a, int b) { // if(a > b) { // return a; // } // else { // return b; // } // } void printAllEvens(int arr[],int n, int index) { //base case if(index == n) { return; } //1 acse main if( !...
ALGO
0.99943
4.781439
d96ed78d-727e-4826-a559-04648e657953
Mrddddx/my_acm
hdu/P4391.cpp
#include<bits/stdc++.h> using namespace std; char A[1008611], B[1008611]; int n; int nxt[1008611]; int ori[1008611]; stack<char> ch; stack<int> c; char ans[1008611]; int cnt; void getNext(string s, int len){ nxt[1] = nxt[0] = 0; ori[0] = 0; for(int i = 1; i < len; i++){ int j = nxt[i]; whil...
ALGO
0.999975
3.555105
1504924c-d531-40bf-9a56-bd3d97b32b58
yash3001/Competitve-Programming
Codeforces/Practice/0. Contests/43) Practice #28/e.cpp
// @author ↓ // // ▄████ ▄▄▄ ███▄ ▄███▓ ███▄ ▄███▓ ▄▄▄ // ██▒ ▀█▒▒████▄ ▓██▒▀█▀ ██▒▓██▒▀█▀ ██▒▒████▄ //▒██░▄▄▄░▒██ ▀█▄ ▓██ ▓██░▓██ ▓██░▒██ ▀█▄ //░▓█ ██▓░██▄▄▄▄██ ▒██ ▒██ ▒██ ▒██ ░██▄▄▄▄██ //░▒▓███▀▒ ▓█ ▓██▒▒██▒ ░██▒▒██▒ ░██▒ ▓█ ▓██▒ // ░▒ ▒ ▒▒ ▓▒█░░ ▒░ ░ ░░ ▒░ ░ ░ ▒▒ ▓▒█░...
ALGO
0.999918
4.795808
773a52c2-3025-4115-a65e-7cfb430d0d0b
MiRoboticsLab/cyberdog_mivins
mivins_core/mivins_frontend/mivins_direct/src/feature_detector_utilities.cpp
#include <mivins/direct/feature_detector_utilities.h> #include <algorithm> #include <numeric> #include "fast/fast.h" #include <mivins/utils/cv_utils.h> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <mivins/common/frame.h> #include <mivins/common/camera.h> #include <mivins/comm...
ALGO
0.975445
6.910483
baf730ff-5a63-40fb-a825-b724499a7b33
Roman-n/Xray-CoC_Demosfen
src/3rd party/NVTT/src/nvimage/NormalMipmap.cpp
// This code is in the public domain -- <EMAIL> #include <nvcore/Ptr.h> #include <nvmath/Montecarlo.h> #include <nvmath/SphericalHarmonic.h> #include <nvimage/NormalMipmap.h> #include <nvimage/FloatImage.h> using namespace nv; FloatImage * nv::createNormalMipmapMap(const FloatImage * img) { nvDebugCheck(img != NU...
ALGO
0.994975
5.8968
c7f84e35-2a2f-46bc-87d9-3bfd62e42b79
foiki/spbu-Homeworks
sem1/homework5/task5/calculator.cpp
#include "calculator.h" int priority(char a) { if ((a == '*') || (a == '/')) { return 2; } if ((a == '+') || (a == '-')) { return 1; } else { return 0; } } int arithmeticOperation(int a, int b, char x) { if (x == '+') { return a + b; } ...
ALGO
0.999737
3.431529
29129c07-664d-477e-b57d-9ab8936cc165
CTSRD-CHERI/libcxx
test/std/algorithms/robust_against_adl_on_new.pass.cpp
// <algorithm> #include <algorithm> #include <functional> #include "test_macros.h" struct A { int i = 0; bool operator<(const A& rhs) const { return i < rhs.i; } static bool isEven(const A& a) { return a.i % 2 == 0; } }; void *operator new(std::size_t, A*) = delete; int main(int, char**) { A a[4] =...
TEST
0.999337
5.696238
d094987f-a71b-4219-806c-29ec78b0d58b
LauZyHou/Algorithm-To-Practice
LeetCode/199.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 Solution { public: vector<int> rightSideView(TreeNode* root) { vector<int> ans; if(!root) return ans;...
ALGO
0.999938
6.05851
40d9f258-bef6-4ef7-9544-2b7df1f5359e
EasyDeps/boost
libs/spirit/example/x3/roman.cpp
/////////////////////////////////////////////////////////////////////////////// // // A Roman Numerals Parser (demonstrating the symbol table). This is // discussed in the "Symbols" chapter in the Spirit User's Guide. // // [ JDG August 22, 2002 ] spirit1 // [ JDG March 13, 2007 ] spirit2 // [ JDG May 13, 2015 ] ...
TOOL
0.973949
7.699979
3a96b9f5-ca5e-4302-843f-452c1576cd38
freepart2022/FreePart-22
code/static_analysis/extract_APIs/cv2/opencv-3.4.9/opencv-3.4.9/samples/cpp/videocapture_gphoto2_autofocus.cpp
#include <cstdlib> #include <cstdio> #include <iostream> #include <algorithm> #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> using namespace std; using namespace cv; const char * windowOriginal = "Captured preview"; const int FOCUS_STEP = 1024; const int MAX_FOCUS_STEP = 327...
TOOL
0.959366
5.910912
0eef4d3c-b9ca-423b-8533-0ba572bc8cda
Amisha328/Data-Structure-Algorithm
Matrix/11_SnakeMatrix.cpp
#include<bits/stdc++.h> using namespace std; void snakeMatrix(vector<vector<int>> &mat, int n, int m){ for(int i = 0; i < n; i++){ if(i & 1) for(int j = m-1; j >= 0; j--) cout<<mat[i][j]<<" "; else for(int j = 0; j < ...
ALGO
0.999977
3.92362
9336ba40-0681-4454-b9af-f5a4066b0270
Rajdeep7/LeetcodeSolutions
Linked-List/PartitionLinkedList.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* partition(ListNode* head, int x) { ListNode *cur = new ListNode(0); cur->next = head; head = cur; ...
ALGO
0.999999
5.277257
fc4b6068-c0b0-4e53-90ee-c848a5ae7d3d
Lincito-31/Preseleccion
USACO/2017/December Contest/Bronze/C.cpp
#include <bits/stdc++.h> #define ALL(x) x.begin(),x.end() using namespace std; int n,cant[3],con,last=7; int main(){ ifstream in("measurement.in"); ofstream out("measurement.out"); in >> n; vector<tuple<int,string,string>> cows(n); for(int i=0;i<n;i++){ in >> get<0>(cows[i]) >> get<1>(cows[i...
ALGO
0.999914
4.338433
1cf2e7fa-ac0d-4e0e-b1e9-225dadb1e481
jeewonMoon/Algorithm
입문2/입문2/10872.cpp
#include<iostream> using namespace std; int main() { int n, result=1; cin >> n; for (int i = n; i > 0; i--) { result *= i; } cout << result << endl; return 0; }
ALGO
0.99999
4.733515
93b62eb2-18e6-4552-b7b2-658d13680fda
phantronghuy/lts_tracklocation
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.998859
6.785645
1fec0d3f-70d3-443e-b9a3-fae916ab116a
potataahhh/Leetcoding-Challenge-2025
Jan Leetcoding Challenge/Day 13/3223. Minimum Length of String After Operations.cpp
class Solution { public: int minimumLength(string s) { vector<int>v(26,0); int res=0; for(char &ch:s){ v[ch-'a']++; } for(int i=0;i<26;i++){ if(v[i]==0) continue; if(v[i]%2==0){ res+=2; } else{ ...
ALGO
0.999961
5.590889
81cec37e-2ed7-4d13-a585-d0932f4e44c7
Macesuted/Code
HydroOJ/bzoj/3730.cpp
/** * @author Macesuted (<EMAIL>) * @copyright Copyright (c) 2021 */ #include <bits/stdc++.h> using namespace std; namespace io { #define SIZE (1 << 20) char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c, qu[55]; int f, qr; inline void flush(void) { return fwrite(obuf, 1, oS - obuf, stdout),...
ALGO
0.999984
4.449626
d61456e7-c0f4-4b50-94c3-d3be16013807
kainhuang/DiskHivf
src/eigen-3.4.0/doc/examples/TutorialLinAlgComputeTwice.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2f A, b; LLT<Matrix2f> llt; A << 2, -1, -1, 3; b << 1, 2, 3, 1; cout << "Here is the matrix A:\n" << A << endl; cout << "Here is the right hand side b:\n" << b << endl; cout << "Computing LLT...
ALGO
0.999897
3.145425
fa7477cb-363b-48c0-b0d7-5ec465d886ca
ericgjackson/slumbot2019
src/build_hand_value_tree.cpp
#include <stdio.h> #include <stdlib.h> #include <memory> #include <string> #include "cards.h" #include "files.h" #include "game.h" #include "game_params.h" #include "hand_evaluator.h" #include "io.h" #include "params.h" using std::string; using std::unique_ptr; static void DealOneCard(void) { Card max_card = Game...
ALGO
0.889011
4.573968
8dd1df9e-f87c-4ac3-902e-28ff1c37dd79
LIMXTEC/BitCore
src/policy/policy.cpp
// NOTE: This file is intended to be customised by the end user, and includes only local node policy logic #include <policy/policy.h> #include <consensus/validation.h> #include <validation.h> #include <coins.h> #include <tinyformat.h> #include <util.h> #include <utilstrencodings.h> CAmount GetDustThreshold(const CTx...
TOOL
0.886741
7.426601
a2d10ef2-ad6c-4700-b0e5-084b052c7608
Acrsahil/100_Days_DSA
Competetive_Coding/codechefarray1.cpp
#include <bits/stdc++.h> using namespace std; #define F(i, n) for (int i = 0; i < n; i++) #define vi vector<int> #define ln long long int #define test int t; cin >> t; while (t--) #define ll long long #ifndef ONLINE_JUDGE #define debug(x) cerr << #x << " -> "; _print(x); cerr << endl #else #define debug(x) #endif vo...
ALGO
0.999991
3.975542
1fde7678-9dbb-447b-99bb-8a4a852a0c46
sarvex/leetcode-giz
solution/2200-2299/2286.Booking Concert Tickets in Groups/Solution.cpp
class Node { public: int l, r; long s, mx; }; class SegmentTree { public: SegmentTree(int n, int m) { this->m = m; tr.resize(n << 2); for (int i = 0; i < n << 2; ++i) { tr[i] = new Node(); } build(1, 1, n); } void modify(int u, int x, int v) { ...
ALGO
0.999954
5.199092
3e0f4621-757c-47f7-bcca-605c5f57ceef
weiquanmao/PlyWin
PlyWin/ply/vcglib/apps/sample/trimesh_join/trimesh_join.cpp
#include<vcg/complex/complex.h> #include<vcg/complex/append.h> #include<vcg/complex/algorithms/clean.h> #include<vcg/complex/algorithms/clip.h> #include<vcg/complex/algorithms/update/bounding.h> // input output #include <wrap/io_trimesh/import_ply.h> #include <wrap/io_trimesh/export_ply.h> // std #include <vector> u...
ALGO
0.956047
4.802542
4b3ad126-489c-4bdb-a4c1-146db8e286ec
HPC-Fortran2CPP/Fortran2Cpp
data/readable_format/cpp/file1685.cpp
#include <iostream> #include <vector> #include <cmath> // For std::abs // Function to perform matrix multiplication void matrix_multiply(const std::vector<std::vector<double>>& a, const std::vector<std::vector<double>>& b, std::vector<std::vector<double>>& c, ...
TEST
0.990597
6.283616
6af4d9c4-82bc-46b2-8915-c3a813e6e897
pangzilu/svis
svis_teensy/dependencies/libraries/Audio/analyze_peak.cpp
#include "analyze_peak.h" void AudioAnalyzePeak::update(void) { audio_block_t *block; const int16_t *p, *end; int32_t min, max; block = receiveReadOnly(); if (!block) { return; } p = block->data; end = p + AUDIO_BLOCK_SAMPLES; min = min_sample; max = max_sample; do { int16_t d=*p++; // TODO: can we s...
TOOL
0.955239
5.1412
da3d6d21-5f3f-4e33-b429-6fe4db491267
nguyenkimdao1998/Contest_D19
Contest/Baitap/mini_Contest1/xaudoixung.cpp
#include <iostream> #include <string> using namespace std; bool checkPalindrome(string s){ for (int i=0; i<=s.length()/2; i++) if (s[i]!=s[s.length()-i-1]) return 0; return 1; } int main(){ string s; getline(cin,s); if (checkPalindrome(s)) cout << "La chuoi palindrome"...
ALGO
0.999715
3.522024
477b586b-828b-4953-894a-342c89529a03
hayounSong/Song_Algorithm
백준/다이나믹 프로그래밍/백준12865.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int N, K; vector<pair<int, int>> v; int dy[101][100001] = {0}; int main() { v.push_back({0, 0}); cin >> N >> K; for (int i = 0; i < N; i++) { int a, b; cin >> a >> b; v.push_back({a, b}); } so...
ALGO
0.999796
3.797387
fa29a26b-34a4-4fac-93de-82de062c7d34
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Gemma/top0-100/closest-subsequence-sum-Solution.minAbsDifference/177821_DoS.cpp
QString IRCView::openTags(TextHtmlData* data, int from) { QString ret, tag; int i = from; for ( ; i < data->openHtmlTags.count(); ++i) { tag = data->openHtmlTags.at(i); if (data->reverse) { ret += fontColorOpenTag(Preferences::self()->color(Preferen...
TOOL
0.862298
5.306125
9327044f-0149-44a3-997c-cf9c3d829d20
heiseish/Competitive-Programming
cf/contest/529/F.cpp
/** A detective who uses his deductive powers to corner a suspect, and then does nothing to stop them from committing suicide, is no better than the murderer himself. */ #include <bits/stdc++.h> #define forn(i, l, r) for(int i=l;i<=r;i++) #define all(v) v.begin(),v.end() #define pb push_back #define nd second ...
ALGO
0.999985
4.002144
d4591c88-4b56-48e5-bd93-cfb9754da413
shiridikumar/cp
891a.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main(){ int test; cin>>test; for(int tes=0;tes<test;tes++){ int n; cin>>n; int a[n]; int s=0; int odd=0; int even=0; for(int i=0;i<n;i++){ cin>>a[i]; s+=a[i]; ...
ALGO
0.999692
4.489765
12d6258d-265f-4016-a272-f7874e71dc7c
Tolumbas/pka
parser.cpp
#include "myvector.h" #include "automata.h" #include "parser.h" #include <string> #include <iostream> using namespace std; string parseString(string in,int from, int& to){ int index = from; while(index < in.size()){ if (in[index]!='.' && in[index]!=',' && in[index]!=')' && in[index]!='|' && in[index]!...
ALGO
0.97982
3.408993
009837ba-e3ec-49a3-9308-228a5f0887a0
eric2003/ModernCMake
codes/hpc/stencil/stencil03/gaussblur.cpp
#include "gaussblur.h" #include <immintrin.h> #include <vector> #include <cmath> static void x_kernel_blur(Image &b, Image const &a, int nblur, float *__restrict kernel) { int nx = a.shape(0); int ny = a.shape(1); int ncomp = a.shape(2); b.reshape((size_t)nx, (size_t)ny, (size_t)ncomp); for (int co...
ALGO
0.998387
6.353354
2dae91a1-6603-4d8e-a3dd-4aad39bb7990
ssun-g/solution
Programmers/N개의_최소공배수.cpp
#include <string> #include <vector> using namespace std; int solution(vector<int> arr) { int answer = 0; while (true) { int cnt = 0; answer++; for (int i = 0; i < arr.size(); i++) { if (answer % arr[i] == 0) cnt++; } if (cnt == arr.size()) break; } return answer; }
ALGO
0.999791
4.462012
cd51f8fb-756e-4c02-a2ca-09f05344d9ef
walkccc/LeetCode
solutions/1716. Calculate Money in Leetcode Bank/1716.cpp
class Solution { public: int totalMoney(int n) { const int weeks = n / 7; const int firstWeek = trapezoid(1, 7); const int lastFullWeek = trapezoid(1 + weeks - 1, 7 + weeks - 1); const int remainingDays = trapezoid(1 + weeks, n % 7 + weeks); return (firstWeek + lastFullWeek) * weeks / 2 + remaini...
ALGO
0.9998
5.192545
eccf288f-5b6a-4561-9961-9b722bf09cba
afa456/HPC-project1
evaluator.cpp
/* * CX 4220 / CSE 6220 Introduction to High Performance Computing * Programming Assignment 1 * * Serial polynomial evaluation algorithm function implementations goes here * */ double poly_evaluator(const double x, const int n, const double* constants){ //Implementation constants = consta...
ALGO
0.999482
4.638866
868f8444-fd23-4318-b7d1-e70de85b5cc0
CoderSubrota/dsa
tree/search-binary-tree/assignment/countMe.cpp
#include <bits/stdc++.h> using namespace std; int main() { int T; cin >> T; cin.ignore(); // Ignore the newline after T while (T--) { string S; getline(cin, S); map<string, int> word_count; string word, result; int max_count = 0; stringstr...
ALGO
0.999272
4.70542
3b4f9076-4104-44a3-81bd-0ac070be8668
mathbioleiden/Tissue-Simulation-Toolkit
lib/libCellShape/lattice_util.cpp
#include <iostream> #include <map> int ** make_lattice(int size_x, int size_y){ int * content = new int [size_x * size_y]{0}; int ** lattice = new int* [size_x]; for (int index = 0; index < size_x; index ++){ lattice[index] = content + index * size_y; } return lattice; } void denoise_lattice(int ** lattice_i...
ALGO
0.998815
4.054889
547f1285-f919-43f4-9816-08b43b29c3c3
Luiz1996/Trab_ED
Lista Dinamica Duplamente Encadeada Circular.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> //TAD = Tipo Abstrato de Dados, Lista Encadeada Dinamica Circular typedef struct{ int chave; char nome[30]; //etc... }tipoitem; struct celula{ celula* ant; tipoitem item; celula* prox; }; typedef struct{ celula* primeiro; }tipolista; //funcoes para m...
ALGO
0.997674
4.312491
c9748f34-e052-490a-9aab-c4afa90cf94f
mythreyajl/Programming
C++/Coding Challenges/Problem 013 - Large sum/number.cpp
#include "number.h" int number::sumCarry[3]; number::Number number::sum; number::number( std::string textNumber ) { for (int i=0; i<textNumber.length(); ++i) num.data[ i ] = textNumber.at( 49-i ) - 48; updateSum(num); } void number::updateSum( Number newNumber ) { int carry = 0; for( int i=0...
ALGO
0.984726
3.737792
106ffb83-0975-4cc6-b171-ab72449e332b
EdricYeo117/DataStructure-AlgorithmsPracticeRepo
LeetCode/LeetCode Recursion/mergeTwoSortedLists.cpp
/* You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists. Return the head of the merged linked list. Time Complexity: - O(m + n), where m and n are the lengths of the two linked lists...
ALGO
0.999956
6.433914
1f4dec91-7dd7-46df-817a-561f1fb17a30
hiteshmewada/LeetHub
102-binary-tree-level-order-traversal/102-binary-tree-level-order-traversal.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.999944
6.145972
6399a1dd-d8a5-440d-88ca-a271b021cee0
OzzieIsaacs/winmerge-qt
ext/boost_1_70_0/libs/fiber/src/numa/linux/topology.cpp
#include "boost/fiber/numa/topology.hpp" #include <exception> #include <map> #include <regex> #include <set> #include <string> #include <utility> #include <boost/algorithm/string.hpp> #include <boost/assert.hpp> #include <boost/config.hpp> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #inclu...
TOOL
0.906772
6.193396
33d37887-f3d7-4f2d-8089-81e9ef4ca9e1
MoRunChang2015/LeetCode
src/257.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 Solution { private: vector<string> ans; void dfs(TreeNode* root, string path) { path = path + to_...
ALGO
0.999855
6.249298
2d36a630-0e63-4cb5-9c15-9670e104b4d9
neerkhandor/dsa_cpp
Binary Search/practiceAll.cpp
#include<iostream> using namespace std; int binarySearch(int arr[],int n,int target){ int s=0; int e=n-1; int mid=s+(e-s)/2; while(s<=e){ if(arr[mid]==target){ return mid; } else if(arr[mid]>target){ e=mid-1; } else{ s=mid+1; ...
ALGO
0.999866
4.530902
774ed81e-825a-4e74-a33b-8fe52333ccfe
kejpmdt/backpack
Static/Workspace/CODES/Problems/Acwing/done/AC2171/AC2171.cpp
#include <cstdio> #include <iostream> #include <cstring> #include <queue> #define MAXN 1005 #define MAXM 20050 using namespace std; #define mi2(a, b) (a < b ? a : b) #define INF 0x3f3f3f3f int n, m, s, t; int fst[MAXN], nt[MAXM], v[MAXM], to[MAXM]; int mi[MAXN], pre[MAXN]; bool used[MAXN]; void addline(int i, int a, in...
ALGO
0.999878
4.233335
9d96efea-9a43-4299-8598-677e1cb89c8e
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_4710_11.cpp
#include <bits/stdc++.h> using namespace std; inline long long read() { long long f = 1, ans = 0; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(); } while (c >= '0' && c <= '9') { ans = ans * 10 + c - '0'; c = getchar(); } return f * ans; } pair<long lo...
ALGO
0.999916
3.864887
8fd537b1-20a9-4f3d-bd33-5bb8a3b967c2
simulacrum-trade/simulacrum
src/bip38.cpp
#include "bip38.h" #include "base58.h" #include "hash.h" #include "pubkey.h" #include "util.h" #include "utilstrencodings.h" #include "random.h" #include <openssl/aes.h> #include <secp256k1.h> #include <string> /** 39 bytes - 78 characters * 1) Prefix - 2 bytes - 4 chars - strKey[0..3] * 2) Flagbyte - 1 byte - 2 ch...
ALGO
0.99578
7.318334
4e636b45-82ef-4ea1-8be0-a872dcf61a6a
hiranoo/atcoder
contests/OTHER_CONTESTS/GIGACODE/d.cpp
#include <bits/stdc++.h> // #include <atcoder/segtree> #include <time.h> #define rep(i, s, t) for(int i = (s); i <= (t); i++) #define repd(i, s, t) for(int i = (s); i >= (t); i--) #define all(v) v.begin(), v.end() typedef long long ll; typedef unsigned long long ull; using namespace std; typedef pair<int, int> pii; typ...
ALGO
0.999903
4.381999
f16155b5-49ac-41c5-a32c-736ccd8f0f70
siddiqui-zeeshan/Leetcode
Code/Add Two Numbers.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) { ListNode* head=new ListNode(); ListNode* t1=l1; ListNo...
ALGO
0.999937
6.057303
18a528ca-01bb-4c75-a4ac-48318fded894
raincross7/code-similarity
codes/train_code/problem181/problem181_72.cpp
#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) using ll = long long; #define fast_io(); std::ios_base::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0); int main(){ ll k,a,b; std::cin >> k >> a >> b; //A枚以下のとき1回の操作で1枚増える //A枚以上ある時2回の操作でB-A枚増える if(b-a>1 && k-a>-1) std::cout...
ALGO
0.999884
3.280183
a54b5d13-d477-45a5-983d-cd0ab0cbb846
Chengen-Cai/shiny-journey
eun3.cpp
#include<iostream> #include<set> using namespace std; int main() { set<int> num ; int n = 0; cin>>n; int nume[n]; int counter =0; for (size_t i = 0; i < n; i++) { int c = 0; cin>>c; nume[i] = c; if (num.count(nume[i])==0) { counter++; ...
ALGO
0.999878
3.612928
d2ac0bbf-3d91-45cb-bf01-9afde579cb54
chapel-lang/chapel-attic
third-party/llvm/llvm-src/lib/CodeGen/LiveRangeShrink.cpp
#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/iterator_range.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineOperand.h" #include...
ALGO
0.991027
7.947615
5cf895a6-630f-4080-ae4d-4f469d944625
li-t2016/leetcode
Middle/Prob39_combinationSum.cpp
#include <vector> #include <iostream> using namespace std; class Solution{ public: vector<vector<int>> combinationSum(vector<int>& candidates, int target){ vector<int> current_combine; vector<vector<int>> res = dfs(candidates, target, 0, current_combine); return res; } vector<vec...
ALGO
0.999995
5.583228
4800cb08-f299-4394-a363-5ed3d98d58f8
freedevm/leetcodeC-
algorithms/cpp/reverseBits/reverseBits.cpp
// Source : https://leetcode.com/problems/reverse-bits/ // Author : Hao Chen // Date : 2015-03-30 /********************************************************************************** * * Reverse bits of a given 32 bits unsigned integer. * * For example, given input 43261596 (represented in binary as 00000010100101...
ALGO
0.999873
6.12299
b11b7a64-fb24-443d-87fa-1b0a36623465
daniel0412/coding
leetcode/code/GenParenthesis.t.cpp
#include "gtest/gtest.h" #include "GenParenthesis.h" TEST(GenParenthesis, GenParenthesis) { GenParenthesis sol; int n = 4; vector<string> res = sol.generateParenthesis(n); for(auto s : res) { cout << s << endl; } }
ALGO
0.967383
6.236325
850e213f-2a69-444e-ac4e-41ef76ce2291
binbli/Virtual-Lane-Boundary-Generation
3rdParty/LSD/LSDLines.cpp
/*----------------------------------------------------------------------------*/ /** @file lsd.c LSD module code @author rafael grompone von gioi (<EMAIL>) */ /*----------------------------------------------------------------------------*/ /*--------------------------------------------------------------------...
TOOL
0.993686
5.887753
0a88925f-2797-4995-92db-8d9d6c3755c6
avandolder/cs3520
assign2/state.cpp
#include <algorithm> #include <cstdlib> #include <iostream> #include <utility> #include <GL/freeglut.h> #include <GL/gl.h> #include "state.h" // Convert a point on the screen to a location on the path. float PlayState::point_to_path(int x, int y) { // Use rectangle-point collision to make sure point is on the path...
ALGO
0.998089
5.03273
e6aee3c7-1f7f-41b8-928b-abfa7833f8bb
IgnorantCopy/Python_learning
Old/人脸识别/opencv/sources/modules/gapi/src/api/kernels_video.cpp
#include "precomp.hpp" #include <opencv2/gapi/video.hpp> namespace cv { namespace gapi { using namespace video; GBuildPyrOutput buildOpticalFlowPyramid(const GMat &img, const Size &winSize, const GScalar &maxLevel, ...
ALGO
0.984644
7.065443
21029501-eb1b-42df-b281-e734d8ba08ca
bhaak/HackedUpReader
thirdparty/agg/examples/multi_clip.cpp
#include <stdlib.h> #include <ctype.h> #include <stdio.h> #include "agg_basics.h" #include "agg_rendering_buffer.h" #include "agg_rasterizer_scanline_aa.h" #include "agg_scanline_u.h" #include "agg_color_gray.h" #include "agg_renderer_mclip.h" #include "agg_renderer_scanline.h" #include "agg_path_storage.h" #include "a...
TOOL
0.866615
6.09932
a4c23875-701e-4cf8-be7f-86d818b7452e
leifjacky/equihash-beam
src/core/uintBig.cpp
#include "uintBig.h" namespace beam { char ChFromHex(uint8_t v) { return v + ((v < 10) ? '0' : ('a' - 10)); } void uintBigImpl::_Print(const uint8_t* pDst, uint32_t nDst, std::ostream& s) { const uint32_t nDigitsMax = 8; if (nDst > nDigitsMax) nDst = nDigitsMax; // truncate char sz[nDigitsMax * 2 + ...
ALGO
0.934291
6.285758
e4ff2457-c957-4d3b-9264-272eb598732c
shirodora2/Shirodora2
Shirodora/Classes/Data/Move/Move.cpp
// // Move.cpp // BarrageGame // // Created by Ryoutarou Onimura on 2016/06/25. // // #include "Move.hpp" //========================================================================= // 追加のインクルードはここから //========================================================================= //====================================...
TOOL
0.870024
5.091432
d2c2fb56-7fd9-478c-a775-543fbd59a4c5
Kawser-nerd/CLCDSA
Source Codes/AtCoder/arc001/C/2262739.cpp
#include <iostream> #include <fstream> #include <string> #include <cmath> #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> #include <numeric> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <functional> #include <cctype> #define BIT(a) (1 << (a)) ...
ALGO
0.999619
3.891219
ef473607-64dd-4d4f-ab15-65c2c299d82a
ishandutta2007/codeforces
nikgaevoy/normal/1178/B.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; mt19937 mt(736); void solve(istream &cin = std::cin, ostream &cout = std::cout) { string str; cin >> str; vector<int> ps(str.size()); for (int i = 1; i < ps.size(); i++) ps[i] = ps[i - 1] + (str.substr(i - 1, 2) == "vv" ? 1 : 0); ll ans ...
ALGO
0.999079
4.652451
8dc39b8f-25a7-4423-aa6a-168df79a8480
Slama305/data-structure
main_tree.cpp
#include <iostream> using namespace std; class node{ public: int data; node* left, *right; node(){ data=0; left=NULL; right=NULL; } }; class bst{ private: node*root; public: bst(){ root=NULL; } void add(int d){ node *p=new node; p->data=d; if (root ==NULL){ root=p; return; } node* ...
ALGO
0.999838
4.299712
a4ed4735-63b6-49b5-888d-1201d882d0d5
ZeroXm0/codeup
贪心 G_找零钱.cpp
#include <cstdio> #include <algorithm> using namespace std; int money[5] = {50, 20, 10, 5, 1} ; int main() { int n, flag; while(scanf("%d", &n) != EOF) { int hashTable[5] = {0}; for(int i = 0; i < 5; i++) { while(n >= money[i]) { n -= money[i]; hashTable[i]++; } if(n == 0){ flag = i; brea...
ALGO
0.999344
3.302607
b5cc8f07-e059-498e-9bab-142ba306fcdb
MrMatt1010/CS103-Assessment-1-Q-4
CS103 Assessment 1 Q 4/CS103 Assessment 1 Q 4.cpp
// CS103 Assessment 1 Q 4 // Student Name: Matt Taylor // This program allows the user to play hangman as outlined in the brief #include <iostream> #include <string> #include <cstdlib> #include <ctime> using namespace std; // Function required to draw a line void drawLine(int length) { for (int i = 0; i < length; i...
TOOL
0.949489
4.150173
0ef3ebca-3cc8-4eb0-9503-e23e27abdc4c
ishandutta2007/codeforces
realcomplex/normal/842/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define fi first #define se second int main() { ios_base::sync_with_stdio(false);cin.tie(false); ll l,r,a,b,k; cin >> l >> r >> a >> b >> k; for(ll j = a;j<=b;j++){ if(k*j >= l && k*j <= r){ cout << "YES"; ...
ALGO
0.999959
3.160798
cfd00352-9496-4723-9a39-0079ff90133d
jangit93/GenericFlightSimulation
EIGENDIR/doc/examples/Tutorial_ArrayClass_interop.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); MatrixXf n(2,2); MatrixXf result(2,2); m << 1,2, 3,4; n << 5,6, 7,8; result = (m.array() + 4).matrix() * m; cout << "-- Combination 1: --" << endl << result << endl << e...
ALGO
0.999745
4.531452
009c3f2f-e7c0-430c-97b0-0b0b897186b5
kaffu0424/problem-solving
boj/boj_11729.cpp
#include <iostream> #include <math.h> using namespace std; int N; void hanoi(int n, int from, int to, int by) { if (n == 1) { cout << from << " " << to << "\n"; } else { hanoi(n - 1, from, by, to); cout << from << " " << to << "\n"; hanoi(n - 1, by, to, from); } ...
ALGO
0.999963
4.674845
2ccd9012-badc-4bd1-a23e-71808a60d206
KanishkRajTech/LeetCode_Solution
Graph/684_Redundant_Connection.cpp
class Solution { int find(vector<int>& dsuf, int v){ if(dsuf[v] ==-1) return v; return dsuf[v] = find(dsuf,dsuf[v]); } public: vector<int> findRedundantConnection(vector<vector<int>>& edges) { int n = edges.size(); vector<int> dsuf(n+1, -1); for(auto edge : ed...
ALGO
0.999952
5.598253
9349048f-9194-4676-889f-4d2c0e1d5d6e
Pravin-Mundhe/CPP-Programming
PalindromeStringUsingRecursion.cpp
#include<iostream> using namespace std; bool Palindrome(char str[],int s, int e) { if(e==0) // An empty string is considered as palindrome return true; if(s==e) // If there is only one character return true; if(str[s]!=str[e]) //If first and last characters do not match return false; if(s<e) //If there are...
ALGO
0.998546
3.831521
7d68a406-c832-466f-b311-56d283f68bf5
wynagito/algorithmzuo-recording
algorithmzuo_recording/32/bit_set.cpp
#include <vector> #include <string> using namespace std; // 位图原理 // 其实就是用bit组成的数组来存放值,用bit状态1、0代表存在、不存在,取值和存值操作都用位运算 // 限制是必须为连续范围且不能过大。好处是极大的节省空间,因为1个数字只占用1个bit的空间。 // 位图的实现 // Bitset是一种能以紧凑形式存储位的数据结构 // Bitset(int n) : 初始化n个位,所有位都是0 // void fix(int i) : 将下标i的位上的值更新为1 // void unfix(int i) : 将下标i的位上的值更新为0 // void fli...
ALGO
0.998815
5.461938
6c64e112-6d6a-4472-aa85-06ca902a24d3
Gheorghe24/Web-Client
requests.cpp
#include <stdlib.h> /* exit, atoi, malloc, free */ #include <stdio.h> #include <unistd.h> /* read, write, close */ #include <string.h> /* memcpy, memset */ #include <sys/socket.h> /* socket, connect */ #include <netinet/in.h> /* struct sockaddr_in, struct sockaddr */ #include <netdb.h> /* struct hostent, g...
WEB
0.954682
4.624473
8e6a87bb-44f7-469c-8c73-6b9e0a7626f5
TechTycoon-Jitu/LoveBabbarDSA
Lecture40-Rat-in-a-maze-problem/Rat-in-a-maze-problem.cpp
#include <iostream> #include <vector> using namespace std; bool issafe(int **arr, int x, int y, int n) { if (x < n && y < n && arr[x][y] == 1) { return true; } return false; } bool ratinaMaze(int **arr, int x, int y, int n, int **solarr) { // Base case if (x == n - 1 && y == n - 1) {...
ALGO
0.999952
5.60392
6927be2c-52bb-4ee3-8473-6ba6260b2fc9
MidVC/Luogu
archive/B2019_Int_bool_int/main.cpp
#include <iostream> int main() { int a = 0; scanf("%d", &a); printf("%d", int(bool(a))); return 0; }
ALGO
0.9585
3.209246
466c82e5-d184-49a1-b375-48d534b83bfc
Arvi-Saleque/Code_Template
code duet/others/tricks.cpp
// if i need to clauclate connected componenet on reverse graph // means the edge are connected which are not present in the input // so just simple as normal connected component // use DSU for faster calculation // when someething realtead to construrct with character // at first try if it possible with 1 char then ...
ALGO
0.999764
3.779629