uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
49fc6c5a-6610-4cf6-9671-8c043beba8be
ketansahu07/Interview
Heap/sort k sorted array.cpp
/* Given an array of n elements, where each element is at most k away from its target position, devise an algorithm that sorts in O(n log k) time. Time Complexity: O(Nlog(K)) */ int sortK(int arr[], int n, int k) { //(A O(k) operation). We assume, k < n. int size; size=(n==k)?k:k+1; priority_que...
ALGO
0.99999
4.815018
84785b1a-c910-47b0-9a6e-28d8787cd6a8
cdonnachie/verge7.0
src/rpc/client.cpp
#include <rpc/client.h> #include <rpc/protocol.h> #include <util/system.h> #include <set> #include <stdint.h> class CRPCConvertParam { public: std::string methodName; //!< method whose params want conversion int paramIdx; //!< 0-based idx of param to convert std::string paramName; //!< paramete...
CONFIG
0.954142
7.41819
9fcddb18-a1b0-4385-8527-30b54b30a9c8
LenapeRobotics/LenapeRobotics
opencv-master/opencv-master/modules/cudastereo/src/disparity_bilateral_filter.cpp
#include "precomp.hpp" using namespace cv; using namespace cv::cuda; #if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) Ptr<cuda::DisparityBilateralFilter> cv::cuda::createDisparityBilateralFilter(int, int, int) { throw_no_cuda(); return Ptr<cuda::DisparityBilateralFilter>(); } #else /* !defined (HAVE_CUDA) */ #i...
TOOL
0.991143
7.222837
2382b705-f04a-4e7a-a72e-ceda737155e0
maurolucci/pds-lim
src/fort_solve.cpp
#include "fort_solve.hpp" #include "gurobi_common.hpp" #include <boost/range/adaptor/filtered.hpp> #include <chrono> #include <gurobi_c++.h> namespace pds { using Fort = std::tuple<std::set<Vertex>, std::set<Vertex>, std::set<Edge>>; namespace { struct LazyFortCB : public GRBCallback { MIPModel mipmodel; GRBM...
ALGO
0.999878
6.073877
39f2535e-7b8c-4d54-a9ca-b461c5b0ec90
youmelo1/TrabGB-CG2024
Visualizador3D/Dependencies/glm/test/gtx/gtx_fast_trigonometry.cpp
#include <glm/gtc/type_precision.hpp> #include <glm/gtx/fast_trigonometry.hpp> #include <glm/gtx/integer.hpp> #include <glm/gtx/common.hpp> #include <glm/gtc/constants.hpp> #include <glm/gtc/ulp.hpp> #include <glm/gtc/vec1.hpp> #include <glm/trigonometric.hpp> #include <cmath> #include <ctime> #include <cstdio> #includ...
TEST
0.988342
6.199861
7d3156f1-0cc9-4498-94ed-f90d59102ea7
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5735_1.cpp
#include<stdio.h> int main(){ int a,b,d,r; double f; scanf("%d %d",&a,&b); d=a/b; r=a%b; f=(double)a/b printf("%d %d %.5f",d,r,f); return 0; }
ALGO
0.999261
3.041602
0a05ac91-fa49-4086-8f59-252f7c0d7ece
OwOrider/2023aaib3
week09/week09-1b.cpp
class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { int M =matrix.size(); int N =matrix[0].size();//0右、1下、2左、3上 int i = 0,j=0,dir=0; int dI[4] = {0,1,0,-1};//移動的值 int dJ[4] = {1,0,-1,0};//移動的值 vector<int> ans; for(int kk=1;kk<M;kk+...
ALGO
0.999995
5.694077
768dbd36-d4da-460b-a8d0-73e879b7316f
DundeShini/DSA0159-OOPS
fibonacci series using friend function.cpp
#include<iostream> using namespace std; class fibonacci { private: int a=0; int b=1; int t,num; public: fibonacci() { cout<<"enter the number :"<<endl; cin>>num; cout<<"the fibonacci series is :"<<a<<b; for(int j=1;j<=num;j++) { t=a+b; cout<<t; a=b; b=t; } } friend int show...
ALGO
0.997868
3.669174
2f4dd801-817a-457d-bcbd-1d2358ceb8eb
SequentiaSEQ/SEQ-Core-Elements
src/test/fuzz/banman.cpp
#include <banman.h> #include <fs.h> #include <netaddress.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> #include <test/util/setup_common.h> #include <util/readwritefile.h> #include <util/system.h> #include <cassert> #include <cstdint> #include <limits> #include <st...
TEST
0.869735
6.764435
fe264bb8-6ea4-42db-845b-d8ac7ed0dc21
mandeep-1/DSA_PracticeWork
Find the widow (Sorting).cpp
#include <bits/stdc++.h> using namespace std; int main() { //write your code here int testCase; cin>>testCase; while(testCase--) { int len; cin>>len; int arr[len]; for(int i=0; i<len; ++i) cin>>arr[i]; int start=-1, last=-1; for(int i=0; i<len-1; ++...
ALGO
0.999728
3.901443
093ab225-c99d-4f44-bcc7-8a39aa6ef1d4
hieupm123/again
code/C++/CSES2/2413 - Counting Towers.cpp
/* Problem Name: Counting Towers Problem Link: https://cses.fi/problemset/task/2413 Author: Sachin Srivastava (mrsac7) */ #include<bits/stdc++.h> using namespace std; #define int long long #define endl '\n' const int mxN = 1e6+6; int dp[mxN][3]; const int md = 1e9+7; signed main(){ ios_base::sync_with_stdio(fal...
ALGO
0.999926
5.158226
f69cb823-07fa-4622-a83c-7958f7f1a1d5
Nicolauzzz/Metode-Numerik-Nicolaus-Evan-Widyatna
Crout/Crout/Crout.cpp
#include <iostream> #include <vector> using namespace std; // Fungsi untuk mencetak matriks void printMatrix(vector<vector<double>>& mat) { int n = mat.size(); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cout << mat[i][j] << "\t"; } cout << endl; } } //...
ALGO
0.999997
5.209561
31408e2a-aef2-4000-8904-d8895d3304a2
sulmone/boost_1_53_0
libs/numeric/ublas/test/test_inplace_solve.cpp
#include <iostream> #include <boost/numeric/ublas/vector.hpp> #include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/matrix_sparse.hpp> #include <boost/numeric/ublas/triangular.hpp> #include <boost/numeric/ublas/io.hpp> #include "utils.hpp" namespace ublas = boost::numeric::ublas; static const dou...
TEST
0.950246
6.153728
7009e365-5f59-41aa-b370-e87be42c8fda
Aashi-sharma30/AashiSharma_PS_2A
Day5.cpp/5.cpp
+#include<iostream> using namespace std; int main(){ int n.arr[100],brr[100]; int i; int a=1; cout<<"enter elements of arr"; cin>>arr[i]; if(n%2==0) for(i=0;i<n/2;i++){ arr[i]=a; a=a+2; } a=n; for(i=n/2;i<n;i++){ arr[i]=a; a=a-2; } else{ for(i=0;i<n/2;i++){ a[i]=a; a=a+2; } a=n-1; ...
ALGO
0.999818
3.111969
3ee6515d-c412-462f-9a41-cd08328021b0
MKaif07/IS_Practical
7_railFence_Decryption.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t, n, m, i, j, k, sum = 0; string s; cout << "Enter the message to decrypt" << '\n'; cin >> s; cout << "Enter key" << '\n'; cin >> n; vector<vector<char>> a(n, vector<char>(s.size(), ' ')); j = 0; int flag = 0; for...
ALGO
0.999989
3.926074
1623843b-6891-4f62-8323-22ef00b606b2
guzmaneandrew/GuzmanAndrew_CSC_CIS_17a
Class/Inheritance_Polymorphism_VirtualFunctions/TimeDate/2_DateClass/main.cpp
/* * File: main.cpp * Author: Dr. Mark E. Lehr * Created on July 21, 2020, 1:07 PM * Purpose: Date Class */ //System Libraries Here #include <iostream> #include <string> using namespace std; //User Libraries Here #include "DateWS.h" //Global Constants Only, No Global Variables //Like PI, e, Gravity, or con...
TOOL
0.880577
3.846574
92fd0d2c-7164-4524-b697-8f17d07d9edc
jaARke/LeetCode
146-1.cpp
#include <bits/stdc++.h> using namespace std; int speed_up = []{ ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL); return 0; }(); class LRUCache { private: int cap; unordered_map<int, int> cache; unordered_map<int, int> freqs; // Number of times each key appears in the deque deq...
ALGO
0.999394
5.527837
c3d3bed7-fac5-4780-9464-467f78b401c1
SheronovIvan/visual_image_recognition
7/descrypt.cpp
#include <opencv2/opencv.hpp> #include <opencv2/features2d.hpp> #include <iostream> int main() { std::string image_path1 = "C:/Users/isher/Downloads/image1.png"; std::string image_path2 = "C:/Users/isher/Downloads/image2.png"; cv::Mat img1 = cv::imread(image_path1, cv::IMREAD_COLOR); cv::Mat img2 = cv:...
ALGO
0.998467
5.659083
7149538f-ca4a-4570-a993-503f00bdfe99
dhruvabhat24/Leetcode-2024
February/CPP/Find Bottom Left Tree Value/Find Bottom Left Tree Value code.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.999988
6.387522
0b5705fd-dcb8-4442-b387-5f7354405ac9
ZhuangPeng97/BuildFaceFlowDataCode
tools/BuildGraph_face/include/igl/find.cpp
#include "verbose.h" #include <iostream> template < typename T, typename DerivedI, typename DerivedJ, typename DerivedV> IGL_INLINE void igl::find( const Eigen::SparseMatrix<T>& X, Eigen::DenseBase<DerivedI> & I, Eigen::DenseBase<DerivedJ> & J, Eigen::DenseBase<DerivedV> & V) { // Resize outputs ...
ALGO
0.998121
4.19303
7bb3d950-f260-40d6-beaf-bd2f0456700e
checkra1n/tapi
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
#include "MetadataLoader.h" #include "ValueList.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitmaskEnum.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/STLFunctionalExtras.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallString.h" #incl...
TOOL
0.857359
7.828026
7c08f3f5-9e93-48d2-a80a-d2729adc7f7b
mobilemadman2/functions
c-plus-plus/UpCoder Storage/GIAIPT (Bac 2).cpp
#include <iostream> #include <iomanip> // setprecision #include <cmath> //sqrt, pow using namespace std; void giaiPTB1(double a, double b){ if (a == 0){ if (b == 0){ cout << "VSN"; } else{ cout << "VN"; } } else{ cout << fixed << setprecision(4) << -b / a; } } void giaiPTB2(int a, int b, int c){ if (a ==...
ALGO
0.99919
4.199577
4ee1f794-5403-4e51-ad49-c1fa4c4f66f1
071yoon/Algorithm
Daily/2022_11/2022-11-04/cola.cpp
#include <string> #include <vector> using namespace std; int solution(int a, int b, int n) { int answer = 0; while(n){ int left = n % a; int give = (n / a) * b; answer += give; n = left + give; if (n < a) break; } return answer; }
ALGO
0.999763
4.324655
b546b7a2-1bab-4d0c-bcea-e08a1ad4ba02
Mark-1707/TeachMeDSA
Binary Tree Postorder Traversal/Solution2.cpp
// https://leetcode.com/problems/binary-tree-postorder-traversal/description/ #include<bits/stdc++.h> using namespace std; /** * @brief Iterative Solution * */ struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x),...
ALGO
0.999865
6.402466
6477fae1-3da7-42a7-b790-b23c5b64efca
expfunction/learnAssembly
LearnAssembly/deps/ch13/IndexOf_cpp/IndexOf.cpp
// IndexOf.cpp // Implements a linear search of an array of // long integers. #include "indexof.h" long IndexOf( long searchVal, long array[], unsigned count ) { for(unsigned i = 0; i < count; i++) { if( array[i] == searchVal ) return i; } return -1; }
ALGO
0.999788
4.703398
b776b514-3f7b-4ec7-81d9-650fb33d045d
seo-bo/ProblemSolving
백준/Silver/19939. 박 터뜨리기/박 터뜨리기.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double lb; typedef pair<int, int> pii; int main(void) { ios::sync_with_stdio(false); cin.tie(0); int n = 0, k = 0; cin >> n >> k; int sum = k * (k + 1) / 2; if (n < sum) { cout << -1; return 0; } n -= sum; n % k ? cout << k ...
ALGO
0.999955
3.559287
79eac38f-2921-4f38-94f3-e5e3bd1905cb
ThatOneTallKid/Leetcode
Negative weight cycle - GFG/negative-weight-cycle.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int isNegativeWeightCycle(int n, vector<vector<int>>edges){ // Code here vector<int> dist(n, 10000000); dist[0] = 0; for(int i =1;i<=n-1;i++) { for(auto i : edges) { ...
ALGO
0.999886
6.105084
df2563db-4d6a-4c8e-b67f-7668cfe716ba
Obirvalger/CompGraph
task1/align_project/src/matrix_example_custom.cpp
#include <iostream> #include "matrix.h" #include "io.h" using std::cout; using std::endl; using std::tuple; using std::get; using std::tie; using std::make_tuple; // Matrix usage example // Also see: matrix.h, matrix.hpp for comments on how filtering works class BoxFilterOp { public: BoxFilterOp(Matrix<int> &ke...
ALGO
0.934235
4.494218
d3d24e1c-458b-48ff-b9bd-3c299baf19c0
jimmybaraglia/ALTR_v2
Modules/prediction/include/eigen-eigen-69d418c06999/doc/examples/Tutorial_ArrayClass_cwise_other.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXf a = ArrayXf::Random(5); a *= 2; cout << "a =" << endl << a << endl; cout << "a.abs() =" << endl << a.abs() << endl; cout << "a.abs().sqrt() =" << endl << a.abs().sqrt() << endl...
ALGO
0.979368
3.130341
85ebcd95-0edf-429e-8164-e7a45597d795
GenSpectrum/LAPIS-SILO
src/config/verified_config_attributes.cpp
#include "config/verified_config_attributes.h" #include <spdlog/spdlog.h> #include "config/source/yaml_file.h" #include "silo/common/panic.h" namespace { using silo::config::ConfigKeyPath; using silo::config::ConfigValue; using silo::config::ConfigValueType; using silo::config::YamlFile; template <typename T, Config...
TOOL
0.899319
7.613416
403d9510-8aa7-4618-b5c9-2cc3efc10a37
ma2this510/Projet-MNI-M1
fput_long.cpp
/** * fput3.cpp * Implémentation de la classe FPUT et de la fonction principale pour simuler le * système Fermi-Pasta-Ulam-Tsingou (FPUT). */ #include <cmath> #include <fstream> #include <iomanip> #include <iostream> #include <vector> using namespace std; typedef struct { double x, v; } double2; /** * FPUT *...
ALGO
0.999958
4.524569
e99c6cd0-dd91-4b1c-848e-ffc4986c291d
ShivangNagta/Simulation_Engine
assets/codeSample/PINNS/1D-Heat-FDM-ChatGPT/1dHeat_2.cpp
#include <SDL2/SDL.h> #include <iostream> #include <vector> #include <algorithm> // Simulation parameters const int nx = 100; // Number of spatial points const double length = 1.0; // Length of the rod const double dx = length / (nx - 1); // Spatial step size const double alpha = 0.1; // Thermal diffusivity const doub...
ALGO
0.999347
6.043049
8d82a3dd-9ff9-4526-a014-cf6c99ef19a9
saquibjawedbit/cp
D_Connect_the_Dots.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define MOD 1000000007 int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); ll tc =1; cin >> tc; for(ll t =1; t <= tc; t++) { ll n,m; cin >> n >> m; vector<ll> arr(n+1); for(int i = 1; i <= n; i++...
ALGO
0.999692
3.76515
f5dd0f73-0753-4ad1-9ea6-98e006892633
lishun1995/leetcode
07.整数反转.cpp
#include <iostream> #include <vector> using namespace std; /* һ 32 λзҪÿλϵֽзת : 123 : 321 : -123 : -321 : 120 : 21 */ class Solution { public: int reverse(int x) { //vector<int> vec; //int temp = 0; // //if(x == 0) // return x; //if(x > 2147483647 || x < -2147483648) // return 0; //if(x < 0) //...
ALGO
0.999637
4.757305
96ebdfbb-7898-45d1-8235-d0b4f7029724
pmq20/node-packer
current/deps/icu-small/source/common/stringtriebuilder.cpp
#include "utypeinfo.h" // for 'typeid' to work #include "unicode/utypes.h" #include "unicode/stringtriebuilder.h" #include "uassert.h" #include "uhash.h" U_CDECL_BEGIN static int32_t U_CALLCONV hashStringTrieNode(const UHashTok key) { return icu::StringTrieBuilder::hashNode(key.pointer); } static UBool U_CALLCO...
ALGO
0.980947
7.441104
00b0cb47-77aa-4695-bb77-aae2a566aea7
Green-grape/Algorithm
BOJ/dynamic_programming2/12865.cpp
#include <iostream> #include <vector> using namespace std; const int MAX_WEIGHT=100000; const int MAX_N=100; vector<vector<int>> cache(MAX_WEIGHT+1,vector<int>(MAX_N,-1)); vector<pair<int,int>> items; int getMaxValue(int remainWeight, int use){ if(remainWeight==0 || use<0) return 0; int& ret=cache[remainWeig...
ALGO
0.999995
4.688869
710cd942-135d-4d95-88e8-29071cd176b6
taco-group/CoMamba
opencood/pcdet_utils/iou3d_nms/src/iou3d_nms.cpp
#include <torch/serialize/tensor.h> #include <torch/extension.h> #include <vector> #include <cuda.h> #include <cuda_runtime_api.h> #include "iou3d_nms.h" #define CHECK_CUDA(x) do { \ if (!x.type().is_cuda()) { \ fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); \ exit(-1); \ } \...
ALGO
0.959295
5.799828
c7bfe015-d21c-4a89-ba10-c70d1bbf221e
henrymound/2018-Summer-Research
Golang/Tello/references/opencv-master/samples/cpp/lkdemo.cpp
#include "opencv2/video/tracking.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/videoio.hpp" #include "opencv2/highgui.hpp" #include <iostream> #include <ctype.h> using namespace cv; using namespace std; static void help() { // print a welcome message, and the OpenCV version cout << "\nThis is a demo ...
ALGO
0.982972
5.98176
c0dab906-004f-4008-a7fc-4ae523add569
taliumtech/talium
src/instantx.cpp
#include "uint256.h" #include "sync.h" #include "net.h" #include "key.h" #include "util.h" #include "base58.h" #include "main.h" #include "protocol.h" #include "instantx.h" #include "activemasternode.h" #include "masternodeman.h" #include "darksend.h" #include "spork.h" #include "txdb.h" #include <boost/lexical_cast.hp...
TOOL
0.990698
5.085901
27c17102-a48b-4cd7-acd1-b018c865e044
ishandutta2007/codeforces
rosed/normal/1537/E2.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define ls(p) (p<<1) #define rs(p) (p<<1|1) #define mid ((l+r)>>1) #define eps (1e-8) #define lowbit(i) ((i)&(-i)) const int mod=1e9+7; const int inf=1e18; const int N=2e5+10; void solve() { int n,m; cin>>n>>m; string s;cin>>s; int p=1; ...
ALGO
0.999989
3.529238
8ef645d2-dc95-4e94-8afe-8ed137ee5e5c
iavinaspu/CodeChef
BATTERYLOW.cpp
#include<bits/stdc++.h> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int T{0}; cin >> T; while(T--){ int X{0}; cin >> X; if(X<=15){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }...
ALGO
0.999434
4.958272
73cb6d84-08e7-4518-ab7a-ec17f1c039ac
lehadnk/3q_tp1
src/ChartGenerator.cpp
// // Created by Алексей Заузин on 14.01.2023. // #include <cmath> #include "ChartGenerator.h" CalculatedChart ChartGenerator::generate( std::vector<ElementConcentrationPoint> A, double bConcentration, double cConcentration, CalculatedCoefficients coefficients ) { std::vector<CalculatedChartPoints...
ALGO
0.997473
4.976569
aabce38b-1e4b-4379-a606-3e7509972e20
pianocode/CarND-Extended-Kalman-Filter-Project
src/tools.cpp
#include <iostream> #include "tools.h" using Eigen::VectorXd; using Eigen::MatrixXd; using std::vector; Tools::Tools() {} Tools::~Tools() {} VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth) { /** TODO: * Calculate the RMSE...
ALGO
0.991802
6.198599
cab10341-dee8-4a75-bf69-b90a3eb31aa8
DraSoGo/Competitive_Programming
Codeforces/0006_Vasya_and_Robot.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); long long n,cl,cr,ql,qr,x,r,ans = INT_MAX; cin >> n >> cl >> cr >> ql >> qr; long long QS[n+1]; QS[0] = 0; for (int i = 1; i <= n; i++) { cin >> x; QS[i] = x+QS[i-1]; ...
ALGO
0.997735
3.256748
70ffc7b2-becd-48b4-9cbf-18d84393d545
yangxinhan/C-practice
AtCoder/typical90_bi.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n, a = 0; vector<int> z; vector<int> ans; cin >> n; for (int i = 0; i < n; i++) { int t, x; cin >> t >> x; if(t == 1){ z.insert(z.begin(), x); } else if (t == 2) { z.i...
ALGO
0.999973
4.440283
6da8360c-bb90-41b1-a782-5b55ddadbbde
AmiraliFarazmand/AD-IUST
HW3/knapsack2.cpp
// Knapsack problem. #include <string> #include <vector> #include <sstream> #include <iterator> #include <bits/stdc++.h> #include <ctime> using lint = long int; using lolint = long long int; using namespace std; typedef vector<vector<int>> Matrix; typedef struct item { int price; int weight; double value; ...
ALGO
0.999845
4.205615
2d5eed4a-8594-4935-9b83-ca4698eae266
CAPDGroup/CAPD
capdExt/cxsc-2-5-4/src/fi_lib/q_ari.cpp
/* CVS $Id: q_ari.cpp,v 1.16 2014/01/30 17:23:54 cxsc Exp $ */ #ifndef Q_ARI_CPP #define Q_ARI_CPP #include "fi_lib.hpp" namespace fi_lib{ using cxsc::real; /* ------------------------------------------------------------------- */ /* --- utilities --- */ /* -----...
TOOL
0.956423
5.685492
490f44dc-d3ee-4528-a2e3-119e2a3aedb5
payal122000/datastructure
mergesort.cpp
#include<stdio.h> int divide(int p,int r ){ int q; if(p > r) q = (p+r)/2; printf("%d ",q); } int main() { int arr[100],n,i,j,temp; printf("Enter number of elements: "); scanf("%d",&n); printf("Enter elements: "); for(i=0;i<n;i++) { scanf("%d",&arr[i]); } divide(6,2 ); }
ALGO
0.99927
3.102614
3a3b9942-7627-45b1-a7f6-a6a01584db46
jyap808/jumbucks
src/rpcblockchain.cpp
#include "main.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace std; extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, json_spirit::Object& entry); double GetDifficulty(const CBlockIndex* blockindex) { // Floating point number that is a multiple of the minimum difficult...
WEB
0.892911
5.846817
220cbffa-2513-42ae-b7df-0d4f17c793c3
ishandutta2007/codeforces
evilbuggy/normal/1065/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; const int inf = 1e9; pair<int, int> arr[105], g[305][305], dp[105][3]; int n; int get(int x, int y, int p){ return 3*n*x + 3*y + p; } pair<int, int> add(pair<int, int> &a, pair<int, int> ...
ALGO
0.999852
3.977825
fb779570-8a1a-43ce-bbc3-ebc021d8d9e8
AshyrMalik/DSA
Assignment 3/Prims.cpp
#include <stdio.h> #include <iostream> #include <climits> using namespace std; #define V 5 int minKey(int key[], bool mstSet[]) { int min = INT_MAX, min_index; for (int v = 0; v < V; v++) { if (mstSet[v] == false && key[v] < min) { min = key[v]; min_index = v; ...
ALGO
0.999881
4.940013
9c8ba01b-3b76-4e2d-9e17-cf7d48f69207
pranxol/UVA_solutions
10924.cpp
#include<stdio.h> #include<iostream> #include<string.h> using namespace std; int main() { /*int sum=0,i; for(i=32;i<=52;i++) { sum=sum+i; } cout<<sum;*/ int i,j,k,n=1000; char check[1000]; int prime[500]; for(i=2;i<=n;i++) { check[i]='1'; } check[1]='1'; for(i...
ALGO
0.999524
3.494939
1b9bd003-2369-4929-8f7b-99b4b2aca016
TheUnicat/competitive-pwogramming
codeforces/contest_976/C_976.cpp
// // Created by TheUnicat on 2024-09-29. // #include <iostream> using namespace std; using ll = long long; ll t, b, c, d; ll truth_table[2][2][2]; int main() { //b, c, d -> a; truth_table[0][0][0] = 0; truth_table[0][0][1] = 1; truth_table[0][1][0] = 0; truth_table[1][0][0] = 0; truth_table[...
ALGO
0.998709
5.554775
c0e0b059-e39c-4e6a-8d9e-4ab69ebb33bd
Bhargavmandava18/Compiler-design-
11a/FIRST set for predictive parser..cpp
#include<stdio.h> #include<ctype.h> void FIRST(char[],char ); void addToResultSet(char[],char); int numOfProductions; char productionSet[10][10]; int main() { int i; char choice; char c; char result[20]; printf("How many number of productions ? :"); scanf(" %d",&numOfProductions); for(i=0;i<numOfProductions;i++)//read ...
ALGO
0.999886
3.183283
e90e5624-4123-43bc-815c-a88457042cb4
combofish/leetcode-solutions-cpp
src/ProgrammerCarl-1/try_78.cpp
/** -- method: --result: -- analyse: Time: O() Space: O() */ #include "combofish_utils.hpp" #include <algorithm> class Solution { public: // function start. private: vector<int> path; vector<vector<int>> result; void backtracking(vector<int> &nums, int startIndex) { result.push_back(path...
ALGO
0.999446
6.453584
876cf8e0-df5b-4e4c-ae2f-a07827202bdb
ishwar2303/Competitive-Coding
LinkedList/LinkedList.cpp
#include <iostream> using namespace std; class Node { public: int data; Node* next; public: Node(int data) { this->data = data; this->next = NULL; } }; class List { public: Node* start; public: List() { start = NULL; } bool isEmpty() { ...
ALGO
0.994451
5.2013
49b4fe57-5022-4aeb-bee5-0ed1373e5e4b
vrushalingale/https-github.com-AkashSingh3031-The-Complete-FAANG-Preparation
3]. Competitive Programming/08]. LeetCode/1]. Problems/C++/0008)string_to_int_atoi.cpp
#include <bits/stdc++.h> #include <string> #include <algorithm> class Solution { public: string trim(string s) { string white = " "; int pos = 0; while (s[pos] == ' ') { ++pos; } return s.substr(pos, s.size() - pos); } string trimZero(st...
ALGO
0.999042
4.865401
f6eb7c31-5a94-4c87-8283-26821ec0267c
sanjanprakash/Hackerrank
Algorithms/Strings/anagram.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int t; cin >> t; while (t > 0) { int arr1 [26], arr2 [26], i, sum = 0; string x; cin >> x; if (x.length () % 2 != 0) cout << "-1\n"; ...
ALGO
0.999736
4.010891
ed879399-726e-48ea-a00a-3f4b11311119
ElmurodAzodov/C-plus-plus
shartli operatorlari/switch_case.cpp
//! 1 #include <iostream> using namespace std; int main() { int kun; cout << "Haftaning kunini kiriting (1-7): "; cin >> kun; switch (kun) { case 1: cout << "Dushanba"; break; case 2: cout << "Seshanba"; break; case 3: cout << "Chorshanba"; ...
TOOL
0.92171
3.531546
fc8fae6a-0cf4-44e9-a3b4-d2d4a091e465
tbz24/Algorithms
Finite Automata.cpp
#include <bits/stdc++.h> using namespace std; #define NO_OF_CHARS 256 int getNextState(string pat, int M, int state, int x){ // If the character c is same as next character // in pattern,then simply increment state if (state < M && x == pat[state]) return state+1; // ns stores the result whi...
ALGO
0.999952
5.958052
86e88e0b-8d28-4d8f-997d-0fdd58242c33
Congee/leetcode
src/1943.describe-the-painting.cpp
#ifdef __LOCAL__ #include <leetcode.h> #endif class Solution { public: vector<vector<long long>> splitPainting(vector<vector<int>>& segments) { // ------- // ------- // ------- // ---------- return sweep_psum(segments); return sweep(segments); } vector<vector<long long>> sweep_ps...
ALGO
0.999548
5.922003
58395bc4-2d03-45a7-aa06-89335da4a95a
MatchaMachiato/CompetitiveProgramming
Joi/JOI18_commuter_pass.cpp
#include <bits/stdc++.h> #define ll long long #define pii pair <ll, ll> #define st first #define nd second #define rep(i, n, m) for (ll i = (n); i <= (m); i ++) #define rrep(i, n, m) for (ll i = (n); i >= (m); i --) using namespace std; const long long INF = 1e18; const long long N = 1e5 + 5; int n, m; void dijkstra(v...
ALGO
0.999855
4.775908
2e03d4ed-5478-4c93-b182-83759053d6ec
Johannyjm/c-pro
AtCoder/othercontests/old/candyDistribution.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int N, x; cin >> N >> x; int a[110]; for(int i = 0; i < N; ++i) cin >> a[i]; sort(a, a + N); int stock = x; int res = 0; for(int i = 0; i < N - 1; ++i){ if(a[i] <= stock){ stock -= a[i]; re...
ALGO
0.999874
4.228421
776b6a44-3d55-451b-a4d1-e7fa8d974625
bfeng/CryptoGRU
third_party/cryptoTools/thirdparty/linux/boost/libs/msm/doc/PDF/examples/iPodEuml.cpp
#include <vector> #include <set> #include <string> #include <iostream> // we need more than the default 20 states #define FUSION_MAX_VECTOR_SIZE 20 // we need more than the default 20 transitions #include "boost/mpl/vector/vector50.hpp" #include <boost/msm/back/state_machine.hpp> #include <boost/msm/front/euml/euml.hpp...
TOOL
0.91824
5.742204
ebaa5974-8ca8-4099-8227-1f710c45f1f5
nmante/cracking
chap-5/cpp/5-3.cpp
#include <iostream> #include <bitset> /* * Problem: Given an integer, print the net smallest and next largest number that * have the same number of 1 bits in their binary representation. * * Examples: * * 2(0010) -> 1(0001), 4(0100) * * 3(0011) -> 5(0101), * * 17(10001) -> 12(01100), 18(10010) ...
ALGO
0.999649
5.896301
d6d2a0c4-cef8-4779-87b0-ad8be4da512f
tumbaba/20240520
LinearSearch.cpp
#include <iostream> #include <string> #include <vector> using namespace std; // ĵ ˰ int LInearSearch(const vector<int>& arr, int target) { for(size_t i = 0; i<arr.size(); i++) //size_t : unsigned integerŸ 迭 ε Ÿ , ޸ ũ⸦ Ÿ , ݺ 迭 ũ õȺ if (arr[i] == target) { return i; // ϸ ε ȯ } return -1; // ...
ALGO
0.99939
5.077092
d025c49e-4270-4714-b449-28260056f3de
firiexp/contest_log
atcoder/ABC/044B.cpp
#include <iostream> using ll = long long; using namespace std; int main() { string w; cin >> w; for(int i = 0; i < w.size(); i++){ int count = 0; for (int j = 0; j < w.size(); ++j) { if (w[i] == w[j]) count++; } if (count % 2 != 0){ cout << "No" << "...
ALGO
0.999985
4.232976
f3f0e20d-e42b-4373-b27f-6f3814ada40c
sapscode/Code-Files
C++ test files/QUESTIONS/All_permutations.cpp
//Time Complexity: O(n*n!) Note that there are n! permutations and it requires O(n) time to print permutation. #include<bits/stdc++.h> using namespace std; void Permute(string& str, int left, int right) { if(left==right) cout<<str<<"\n"; else { for(int i=left;i<=right;i++) { ...
ALGO
0.999972
4.86089
37921bb9-fc88-4644-b180-ce6cbaae9385
laizcorbe/Listas
EjercicioDos.cpp
#include <iostream> using namespace std; /* EJERCICIO 2: Realice un procedimiento o funcin que al recibir dos listas como parmetro, devuelva una tercer lista que concatene las mismas. */ struct NodoListaSE { int info; NodoListaSE *sgte; }; void MostrarLista(NodoListaSE *lista) { wh...
TOOL
0.995906
4.572265
ab81024f-16f3-4c18-9a6f-2cd93b73b8a5
JackInDaBean/university-projects
Assignment1.cpp
// 25011384 Jake Isaac Harvey 159101 Assignment 1 #include <iostream> using namespace std; int difference, inputday, inputmonth, inputyear, finalday, finalmonth, finalyear, leapyear, monthdays; int main() { cout << "Please enter the difference in days: "; cin >> difference; cout << "Please input a date ...
ALGO
0.998196
4.252507
6b93fdef-5941-41bc-abdc-1e47de268112
sti11er/oop_and_grammar_theory
H/H5.cpp
#include <iostream> #include <string> /* template <typename T, typename U> void f(T, U) { std::cout << "f-T-U" << std::endl; } template <typename U> void f(short, U) { std::cout << "f-short-U" << std::endl; } template <typename T> void f(T x, int) { std::cout << "f-T-int" << std::endl; void *p = &x[0]; } template <...
TOOL
0.9636
6.276834
867655d0-3b86-49ae-b25c-fcc27dbe673d
ethan-mino/Algorithm
Baekjoon/BarkingDog/BFS/2206.cpp
#include <bits/stdc++.h> using namespace std; #define x first #define y second int dx[4] = {0, -1, 0, 1}; int dy[4] = {-1, 0, 1, 0}; int board[1000][1000]; int vis[1000][1000][2]; int bfs(pair<int, int> s, int s_vis, int n, int m, int wall){ // 깰 수 있는 벽의 개수가 wall일 때, s부터 (N, M)까지의 최단거리를 구하는 함수 queue<pair<int, ...
ALGO
0.999921
4.709395
97273eb5-7178-4994-806c-368cdc4594bf
buithog/DSA_PTIT
ghepchucai.cpp
#include<bits/stdc++.h> using namespace std; int used[1000000],n; int a[30]; char c[]={'A','B','C','D','E','F','G','H'}; int check(){ for(int i=1;i<n-2;i++){ if(c[a[i]-1] != 'A' && c[a[i]+1] != 'A' &&c[a[i]-1] != 'E' &&c[a[i]+1] != 'E' )return 0; } return 1; } void in(){ if(check()){ for(int i=1;i<=n;i++) cout<<...
ALGO
0.999964
3.573956
14b7d0b6-8fbb-4d70-99ad-9746d8f683a2
Ghansham-GAP/Java
SpecificClass.cpp
#include<iostream> using namespace std; class Array { public: int *Arr; int Size; Array(int length) { Size = length; Arr = new int[Size]; } void Accept() { cout<<"Enter the values\n"; for(int i = 0; i < Size; i...
ALGO
0.995655
3.963818
4febd1f9-6198-48ed-bc56-ba443746a169
wsaults/Cat-n--Mouse
catnmouse/catnmouse/libs/Box2D/Common/b2Math.cpp
#include <Box2D/Common/b2Math.h> const b2Vec2 b2Vec2_zero(0.0f, 0.0f); const b2Mat22 b2Mat22_identity(1.0f, 0.0f, 0.0f, 1.0f); const b2Transform b2Transform_identity(b2Vec2_zero, b2Mat22_identity); /// Solve A * x = b, where b is a column vector. This is more efficient /// than computing the inverse in one-shot cases...
ALGO
0.998962
7.23058
3d62df82-f75f-4b08-84b8-b11eb6fd6f39
mdunggggg/SPOJ-PTIT
P182PROH.cpp
#include<bits/stdc++.h> #define faster() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define pi 2*acos(0) using namespace std; typedef long long ll; void solve( ){ string s; cin>>s; string gio="",phut="",giay="",time=""; for (int i = 0 ; i <= 1; i++) gio+=s[i]; for (int i = 3 ; i <= 4 ; i++) p...
ALGO
0.957072
3.114439
dd8fa2ff-e241-4e49-8152-94ed1132ad44
imishinist/gazosan
third-party/tbb/examples/task_group/sudoku/sudoku.cpp
#include <cstdio> #include <cstdlib> #include <string> #include <atomic> #include "oneapi/tbb/tick_count.h" #include "oneapi/tbb/task_group.h" #include "oneapi/tbb/global_control.h" #include "common/utility/utility.hpp" #include "common/utility/get_default_num_threads.hpp" #pragma warning(disable : 4996) const uns...
ALGO
0.999164
6.093251
0662c5d6-67f7-4443-8672-94f9b2a65bda
taatzz/LeetCode
383.cpp
#include <vector> #include <unordered_map> #include <algorithm> #include <cstring> #include <cstring> #include <string> #include <map> #include <set> #include <stack> #include <queue> #include <unordered_set> using namespace std; // class Solution { // public: // int returnToBoundaryCount(vector<int>& nums) { // ...
ALGO
0.999977
4.874979
b5457da0-c5b1-48fe-b83a-13ffd7021b1d
kimsj0302/algorithm_study
BOJ/2302.cpp
#include<iostream> #include<vector> using namespace std; int table[50] = { 1, }; int DP(int num) { if (num < 0) return 0; if (table[num] != 0) return table[num]; int answer = 0; if (num > 1) { if (table[num - 2] == 0) table[num - 2] = DP(num - 2); answer += table[num - 2]; } if (num > 0) { if (table[...
ALGO
0.999806
3.415623
e4f836bd-c95d-4f84-aca6-22f4b7562465
simplc/LeetCode
ProblemSet/541_01_Matrix_v2.cpp
// 541. 01 Matrix // source: https://leetcode.com/problems/01-matrix // difficulty: Medium // author: simplc /* Description: Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: 0 0 0 0 1 0 0 0 0 ...
ALGO
0.999969
6.436887
b635aabf-d5db-4d84-a5a9-2cdbfca70202
NividhSingh/LeetCode
593/593.cpp
class Solution { public: // helper to compute squared distance between two points static int dist2(const vector<int>& a, const vector<int>& b) { int dx = a[0] - b[0]; int dy = a[1] - b[1]; return dx*dx + dy*dy; } bool checkDistances(vector<int>& p1, vector<int>& p2, vector<int>& ...
ALGO
0.999612
4.794442
f15c8c17-7f58-40bb-93b5-d30480e975ff
rajpatil9696/DSA-code-help-
recursion/binary_search_using_recursion.cpp
#include<iostream> using namespace std; bool binarysearch( int *arr, int s ,int e , int k){ int mid = s+(e-s)/2; // base case if(s>e){ return false ; } if(arr[mid]==k){ return true ; } if(arr[mid]<k){ return binarysearch(arr,mid+1,e,k); } else{ retu...
ALGO
0.999902
4.909605
578a1372-f374-4f4e-839d-fa1d67d8ec14
strange-tiger/Baekjoon_practice
7562_MoveOfKnight/7562_MoveOfKnight/MoveOfKnight.cpp
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <queue> #include <vector> #include <utility> #include <cstring> #define r first #define c second std::vector<std::pair<int, int>> graph[300][300]; bool isVisited[300][300]; int count[300][300]; int bfs(std::pair<int, int> s, std::pair<int, int> e) { std::q...
ALGO
0.999232
4.103234
17e4dba1-c56a-47ac-9654-d6ed5b6cd69f
nirbhay-design/Ultimate-oops-sheet
programmes/virtual_friend_cpp.cpp
#include <bits/stdc++.h> using namespace std; // forward declaration class base1; class base2 { public: virtual base1 * add_two_base1(base1 *, base1 *); }; class derived: public base2 { public: base1 * add_two_base1(base1 *, base1 *); }; class base1 { friend base1 * base2 :: add_two_ba...
ALGO
0.962247
5.141836
589c9bca-930e-4419-9777-1aab0f3148f6
Aastha23/Algorithmic-Toolbox
week 4/binary_search.cpp
#include <iostream> #include <cassert> #include <vector> using std::vector; int binary_search(const vector<int> &a, int x) { int left = 0, right = (int)a.size()-1; for(int i=0;i<a.size();i++) { if(right<left) return -1; int mid=left+(right-left)/2; if(x==a[mid]) return mid; else if(x<a[m...
ALGO
0.999895
5.283334
ef13007e-7f1e-498d-a685-5b7f0216a3f6
mnsantos/metnum20171C-tp1
src/code/main.cpp
#include "matriz.h" #include "resolvedor.h" #include "armador.h" #include "parametros.h" #include "fileManager.h" #include <stdlib.h> using namespace std; bool TESTS_FLAG = 0; int iter = 30; bool variar_termino_independiente = 0; Matriz calcularWP(vector<Team> teams) { Matriz rs = Matriz(teams.size(),1); for (int...
ALGO
0.998095
3.879627
a97a1937-6e9e-4581-9ed7-a16f3da73c6f
nakib1948/Competitive-programming
Chess_knight_move.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define ff first #define ss second #define rep(i,n) for(i=0;i<n;i++) #define debug cout<<"debug"<<endl; #define heyyoo ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); ll i,j,x,y,z,c=0,sum=0,n,m,e,e1; ll d...
ALGO
0.99994
4.048641
bcfe1fbc-c2d9-43ad-acd0-20a13eaf2227
URRealHero/Assignments
DA_E/计卓2201_U202215322_濮澍/LinkList/main.cpp
#include "LinkList.h" #include <cstdio> using namespace std; int main(){ int op=1; LinkList L = NULL; ArrList Lists; Lists.length = 0; while(op){ system("clear"); printf("\n\n"); printf(" Menu for Link List Table\n"); printf("-------------------------------------------------\n"); printf(" 1. Ini...
ALGO
0.995955
3.494535
f60c7035-a9fb-4829-a8c1-0ab8c5da0d2b
albertov/hs-multivac
cbits/cbits.cpp
#include "cbits.h" MVUpdaterH MVNewUpdater (int TubeSemiWidth, int BarrierWidth, int OutSpaceWidth) { UpdaterType *up = new UpdaterType(TubeSemiWidth, BarrierWidth, OutSpaceWidth); return static_cast<MVUpdaterH>(up); } void MVDestroyUpdater(MVUpdaterH upH) { UpdaterType *up = static_cast<UpdaterType*>(upH); d...
ALGO
0.977619
4.376608
4cc52714-bfd5-4d85-abf4-0fc495796d78
kfdykme/cProgram
Chapter10/Pro_6.cpp
#include <stdio.h> #include <stdlib.h> #define STACK_SIZE 100 int stack[STACK_SIZE]; int top = 0; int do_calc(int n,char mark); int pop(void); void push(int i); int main(void){ char ch; int n; printf("Enter an RPN expression:"); for(;;){ scanf(" %c",&ch); //printf("\nstack[%d] : %d ch = %d",top,stack[to...
ALGO
0.999777
3.666002
cbc724d3-fcaf-4835-b527-a0a9249df7e9
alexisavb/cracking-the-coding-interview
Chapter 3/sortstack.cpp
#include <bits/stdc++.h> using namespace std; class SortStack{ public: stack<int> first; stack<int> second; void push(int); void switchLastValue(stack<int>&); void pop(); int peek(); }; void SortStack::push(int value){ if(first.empty() && second.empty()) ...
ALGO
0.999862
4.189552
4bac88c8-6de9-4ed2-b176-dca8d40ea5a0
HPMkwn/Codding
cppFundamentals/getline.cpp
#include<iostream> #include<sstream> #include<string> using namespace std; int main(){ // std::string token; // std::string abc; // std::cin>>abc; // std::istringstream iss(abc); // while (std::getline(iss,token,',')) // { // std::cout<<token<<"\n"; // } int x,y; while (cin>>...
ALGO
0.978567
3.687653
83e526a5-6253-4c73-acc3-48e1fae38339
ishandutta2007/codeforces
sevenkplus/normal/120/D.cpp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; int n,m,a[100][100],A,B,C,S=0;ll s[100][100]; int main() { freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); scanf("%d%d",&n,&m); for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) ...
ALGO
0.999887
3.626623
001db835-6eb8-40cf-855b-2dc8b0ee8e15
yooseongc/cpp-study
04_stl/15_parallel_sort.cpp
#include <cassert> #include <iostream> #include <chrono> #include <vector> #include <random> #include <typeinfo> #if __has_include(<execution>) #define PARSTL 2 #include <execution> #include <algorithm> #elif __has_include(<experimental/execution>) #define PARSTL 1 #include <experimental/execution>...
ALGO
0.974232
4.937909
594e6cb8-b0df-4548-9c86-2d6471644076
ankush-1208/Competitve-Programming
AtCoder/abc243/B.cpp
/* Author: ankush_kr */ #include <bits/stdc++.h> using namespace std; #define tsukuyomi ios_base::sync_with_stdio(false);cin.tie(NULL); #define ip cin>> #define op cout<< #define pb push_back #define endl "\n" #define int long long #define vi vector<int> #define vb vector<bool> #define vvi vector<vector<int>> #define ...
ALGO
0.999951
3.823022
4bf1472b-2d08-4425-81a4-012f8b3cc563
adityabelgaonkar05/CompProgLog
B_Intercepted_Inputs.cpp
#include <bits/stdc++.h> #define int long long #define endl '\n' #define ab adityabelgaonkar using namespace std; vector<int> allfactors(int n) { vector<int> factors; for (int i = 1; i * i <= n; ++i) { if (n % i == 0) { factors.push_back(i); } } return factors;...
ALGO
0.999796
3.987038
fc9efa4a-bbec-463a-b0e5-8e66a664f8a8
HPC-AI-Team/lammps-fugaku-threadpool-sc23
lib/atc/WeakEquationSchrodinger.cpp
#include "WeakEquationSchrodinger.h" #include "Material.h" #include <iostream> #include <fstream> namespace ATC { //============================================================== // Class WeakEquationSchrodinger //============================================================== //-------------------------------------...
ALGO
0.962902
4.298952
4d2f09d5-de28-4a9a-9bae-f8e49714a585
Payaljangra/week1-DP5-CipherSchools
intersection_2LL.cpp
#include<bits/stdc++.h> using namespace std; class ListNode { public: 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) {} }; ListNode * removeDuplicateNodes(ListNode * head){ if(head...
ALGO
0.999847
4.502263
21934e6a-85c3-4d27-af19-4e43587b8749
u-wyh/Mycode
线段树分治/线段树分治——模板.cpp
// 线段树分治模版题,C++版 // 一共有n个节点,一共有m条操作,每条操作是如下三种类型中的一种 // 操作 0 x y : 点x和点y之间一定没有边,现在增加一条边 // 操作 1 x y : 点x和点y之间一定存在边,现在删除这条边 // 操作 2 x y : 查询点x和点y是否联通 // 1 <= n <= 5000 // 1 <= m <= 500000 // 不强制在线,可以离线处理 // 测试链接 : https://loj.ac/p/121 // 如下实现是C++的版本,C++版本和java版本逻辑完全一样 // 提交如下代码,可以通过所有测试用例 // 这道题是线段树分治结合可撤销并查集维护联通性的板子题 这...
ALGO
0.999981
4.553034
f06b3dd5-7d5f-4ab4-b4cc-97f33c4e7dcb
yikai04/Library-System
Utils.cpp
#include "Utils.hpp" #include <iostream> #include <fstream> #include <string> #include <chrono> //Time #include <ctime> #include <Windows.h> #include <regex> //Regular Expression sqlite3* mDatabase; bool loadDataBase() { int rc; rc = sqlite3_open(DATABASE_FILE, &mDatabase); if (rc) { std::cout << "Can't open da...
TOOL
0.946184
4.082931