uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
15e7f0ad-720b-4a5e-b061-655c29f970b2
Pavitragandhi/leetcodesolutions
0867-transpose-matrix/0867-transpose-matrix.cpp
class Solution { public: vector<vector<int>> transpose(vector<vector<int>>& matrix) { int n = matrix.size(); int m = matrix[0].size(); vector<vector<int>> transpose(m , vector<int>(n)); for(int i = 0; i<n; i++){ for(int j = 0; j<m; j++){ transpose...
ALGO
0.999986
6.343702
ed9d6ccb-f1a3-4bba-ab61-4a29e3c32f62
Vishwaptll/Assignment_M4
M4.3_11 Area of circle,rectangel,triangle.cpp
/* 11.Write a program to calculate the area of circle, rectangle and triangle using Function Overloading Rectangle: Area * breadth Triangle: *Area* breadthCircle: Pi * Area *Area */ #include<iostream> using namespace std; class area { int a,b,ar; float c; double d,e; public: void calculate(int x,int y) { ...
ALGO
0.99624
4.407444
e9b5d929-3b04-4959-a538-62637b24c156
piperhall/Extreme-Spatial-Mapping-Encryption
cryptopp890/emsa2.cpp
// emsa2.cpp - originally written and placed in the public domain by Wei Dai #include "pch.h" #include "emsa2.h" #ifndef CRYPTOPP_IMPORTS NAMESPACE_BEGIN(CryptoPP) // Inclusion based on DLL due to Clang, http://github.com/weidai11/cryptopp/issues/300 #ifndef CRYPTOPP_IS_DLL template<> const byte EMSA2HashId<SHA1>::...
ALGO
0.862503
7.751232
e6df69a9-03ef-47b5-a4ac-d301ad05772b
Linuxydable/Godot_STL
thirdparty/assimp/code/PostProcessing/ProcessHelper.cpp
/// @file ProcessHelper.cpp /** Implement shared utility functions for postprocessing steps */ #include "ProcessHelper.h" #include <limits> namespace Assimp { // ------------------------------------------------------------------------------- void ConvertListToStrings(const std::string& in, std::list<std::string>& o...
TOOL
0.960632
7.555057
cd0c8c5a-1feb-4d68-8de3-3e044a401a18
kkisic/Procon
CPP/AtCoder/abc/142/c.cpp
#include <cmath> #include <iostream> #include <vector> #include <queue> #include <deque> #include <map> #include <set> #include <stack> #include <tuple> #include <bitset> #include <algorithm> #include <functional> #include <utility> #include <iomanip> #define int long long int #define rep(i, n) for(int i = 0; i < (n);...
ALGO
0.999838
3.865423
1df5ba57-124b-4960-b1a9-d6081a71f33d
roshan22418/DSA
Stack/TheoryBasicImplementation/InsertAtBottomnew.cpp
#include<iostream> #include<stack> using namespace std; // User function Template for C++ class Solution { public: void solve(stack<int>& st,int x){ if(st.empty()){ return st.push(x); } int temp = st.top(); st.pop(); solve(st,x); st.push(temp); } ...
ALGO
0.999901
5.139938
98c4b0c8-012e-4925-ab62-f7c4dd644c46
oC10H15No/Tongji-assignment-HighLevelLanguageProgrammingDesign-23Spring
wk 9/23242-050102-W0901.第05模块 作业 - PART2 - 数组进阶训练(5.9截止)/5-Part2/5-b9/5-b9.cpp
/*2351050 05*/ #include <iostream> using namespace std; void clear(bool check[]) { for (int i = 0; i < 10; i++) { check[i] = 0; } } bool isValid(bool check[]) { for (int i = 1; i <= 9; i++) { if (!check[i]) return 0; } return 1; } int main() { cout << "9*9ľֵΪ1-9֮" << endl; int sudoku[9][9]; for (i...
ALGO
0.994142
3.500273
b1387ec7-78e6-4b68-aaa2-5feec0256231
qwertyWSX/Test
ConsoleApplication14.cpp
#include <iostream> #include <time.h> using namespace std; class List { //asdf struct Node { Node* Next; Node* Prev; int Data; }; Node* Start; Node* End; int Size; public: List() { Size = 0; Start = nullptr; End = nullptr; } ~List() { Clear(); } int GetSize() {return Size;} void PushBa...
TOOL
0.937141
3.903467
7c2f9ae0-44de-4b75-9a3e-d459dc251fbe
ABHI-GUPTA26/leetcode-problem
linkedlist/542-01-matrix/01-matrix.cpp
class Solution { public: vector<vector<int>> updateMatrix(vector<vector<int>>& mat) { int n = mat.size(); int m = mat[0].size(); vector<vector<int>> vis(n, vector<int>(m, 0)); vector<vector<int>> ans(n, vector<int>(m)); queue<pair<int, pair<int, int>>> q; const int ...
ALGO
0.999975
6.809293
29babb6b-1b2d-46af-a40b-9ade5d6f3a9b
PinkSlime/HSI_oil_spill_mapping
Post-processing/ERW/drtoolbox/techniques/dijkstra.cpp
/** * dijkstra.cpp * * [D, P] = DIJKSTRA(G, S) * * This function computes the shortest distance tree(s) from one (or more) * source node(s) in a graph. * * G is a sparse matrix where element (i,j) contains the cost of going * from node i to node j in the graph. That is, G contains the edge * weights...
ALGO
0.999971
4.83361
3ebeedbe-5380-4cd3-bc9f-700d725fdc1a
a0mmi/solve
SolutionsOnSites/Codeforces/tasks/1592B.cpp
#include <bits/stdc++.h> using namespace std; #define forn(i, l, r) for(int i = l; i < r; ++i) #define all(a) (a).begin(), (a).end() #define f first #define s second #define pb push_back #define mp make_pair using ll = long long; using pii = pair<int, int>; using vi = vector<int>; using vb = vector<bool>; using vvi =...
ALGO
0.99978
4.501222
7d63ea65-d4b9-4613-a341-c7c6ac94be3c
Baryshev194/x-ray1.0007
xray/trunk/3rd party/FreeImage/FreeImage/Source/OpenEXR/Half/half.cpp
// Primary authors: // Florian Kainz <<EMAIL>> // Rod Bogart <<EMAIL>> //--------------------------------------------------------------------------- // // class half -- // implementation of non-inline members // //--------------------------------------------------------------------------- #include <assert.h> ...
TOOL
0.856896
6.832665
e06a75f4-5f30-48e0-b4fb-a12cf92341a5
SpencerL-Y/SELO
regression/esbmc-cpp/algorithm/algorithm108/main.cpp
// merge algorithm example #include <iostream> #include <cassert> #include <algorithm> #include <vector> using namespace std; int main () { int first[] = {5,20,25}; int second[] = {50,10,30}; vector<int> v(6); vector<int>::iterator it; // 5 10 20 25 30 sort (first,first+3); sort (second,second+3); merge ...
ALGO
0.999859
4.211429
fed298f9-1163-42eb-98eb-b8c8cd36a420
KODY159/My_code
Grader/table_cal.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; for(int i=1; i<=10; i++){ cout << n << " * " << i << " = " << n*i <<endl; } }
ALGO
0.995968
3.553068
6bbdc91f-adde-4307-8ded-2adacf8bbee8
vtokarev/khtml-soc09
kioslave/http/httpauthentication.cpp
#include "httpauthentication.h" // keys on even indexes, values on odd indexes. Reduces code expansion for the templated // alternatives. static QList<QByteArray> parseChallenge(const QByteArray &ba, QByteArray *scheme) { QList<QByteArray> values; const int len = ba.count(); const char *b = ba.constData();...
WEB
0.946425
7.113667
0c873382-9b6d-4c5e-85d8-e2391e424dde
jVeyZ/AoC2024
Evaluables/d10/d10_2.cpp
#include <fstream> #include <iostream> #include <sstream> #include <string> #include <vector> #include <utility> #include <queue> struct PATHS { std::pair<int, int> coords; int counter; std::pair<int,int> end; }; std::vector<PATHS> paths; std::vector<std::vector<int>> map; std::vector<std::pair<int, int>> ...
ALGO
0.999377
5.805792
fe55ad55-03ca-46bd-9940-375695899ee3
Xiangyu-Hu/SPHinXsys
src/shared/physical_closure/materials/diffusion_reaction.cpp
#include "diffusion_reaction.h" #include "base_particles.hpp" namespace SPH { //=================================================================================================// BaseDiffusion::BaseDiffusion(const std::string &diffusion_species_name, const std::string &gradient_species_na...
ALGO
0.996804
5.790125
99239fe1-3b22-4594-a7b9-ed83aeea3659
jinhaizeng/Leetcode
top100/No12_authority.cpp
//此种官方第一步的解法,写着玩玩,没想到好超时了 class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> result; int length = nums.size(); std::sort(nums.begin(), nums.end()); int firstPoint = 0, secondPoint = 0, thirdPoint = 0; for (firstPoint = 0; firstPoin...
ALGO
0.999913
5.361806
0d88230a-1964-4a3d-815e-27a8bc781338
annouos/PA-Roadmap-Solutions
Course 2 Algorithms Lv1/11_average_pass_faill.cpp
#include <iostream> using namespace std; int genric_number(string massage) { int number = 0; cout << massage; cin >> number; return number; } int proces(int num_1, int num_2, int num_3) { return num_1 + num_2 + num_3; } float average(int sum) { return (float) sum / 3; } void print(float re...
ALGO
0.992024
3.212377
5b1bda1d-1be3-43df-addd-7cd3887c7d8a
Thanucron/Learning_repo
theory-learning/dsa/sorting/insertion.cpp
#include <iostream> #include <string> #include <vector> using std::cout, std::cin, std::string; void printarr(int loc_arr[], int size) { for (int i = 0; i < size; i++) { cout << loc_arr[i] << ' '; } cout << '\n'; } void sortarr(int arr[], int arr_size) { ...
ALGO
0.999963
4.878921
f0c35427-2642-4363-bd02-97f2879de978
umerkang66/cs-courses
dsa/fundamentals/trees/binary-trees/main.cpp
#include <iostream> #include <vector> #include "queue.hpp" using namespace std; struct Node { int data; Node *left = nullptr; Node *right = nullptr; Node(int data) : data(data) {} }; class BinaryTree { Node *root; void append_nodes(Node *node, vector<int> arr, int level) { if (node == nullptr) ...
ALGO
0.999845
4.732848
d0a1e104-cf1a-4689-ab5a-be69153dd946
artiam99/GeeksforGeeks
14 Bit Magic Algoritms/1 Basic/22 XOR of 1 to N O(1).cpp
#include <bits/stdc++.h> using namespace std; int main() { int n = 14; switch(n % 4) { case 0: // Divisible by 4 means There are Two Zeros at the end of Binary Representation cout << n; break; case 1: // If we XOR one to that We will definitely get 1 .. eg 12 ... 1100 ^ 1101 = 0001 ...
ALGO
0.99986
4.367657
796137cb-c8b2-4ed3-9dc5-f3f2e0de2c85
huang123aini/Some_Libs
Opencv_Test/opencv-4.x/modules/gapi/samples/face_detection_mtcnn.cpp
#include <algorithm> #include <cctype> #include <cmath> #include <iostream> #include <limits> #include <numeric> #include <stdexcept> #include <string> #include <vector> #include <opencv2/gapi.hpp> #include <opencv2/gapi/core.hpp> #include <opencv2/gapi/imgproc.hpp> #include <opencv2/gapi/cpu/gcpukernel.hpp> #include ...
TOOL
0.972254
6.637559
20d51e55-e0cf-4a9f-a0ca-9b8e5280401d
iflei/Data_Structure
BinaryTree/test.cpp
#include "BinaryTree.h" #include <iostream> using namespace std; int main() { int a1[10] = { 1, 2, 3, '#', '#', 4, '#', '#', 5, 6 }; int a2[15] = { 1, 2, '#', 3, '#', '#', 4, 5, '#', 6, '#', 7, '#', '#', 8 }; BinaryTree<int> t1(a1, 10, '#'); BinaryTree<int> t2(a2, 15, '#'); t1.PostOrder(); t2.PrevOrder(); syst...
ALGO
0.99672
4.517488
489073c1-96ce-4080-a785-0af9ed90ebed
SeyoungKimLab/PerturbNet
eigen3/build_dir/doc/snippets/compile_SelfAdjointEigenSolver_SelfAdjointEigenSolver.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main(int, char**) { cout.precision(3); SelfAdjointEigenSolver<Matrix4f> es; Matrix4f X = Matrix4f::Random(4,4); Matrix4f A = X + X.transpose(); es.compute(A); cout << "The eigenvalues of A are: " << es.eigenvalues().transpo...
ALGO
0.999508
3.430531
65ac44f9-365a-484d-9f48-b81a1180c8fd
LeeNJU/LeetCode
LeetCode/Binary Tree Paths.cpp
#include<vector> #include<string> #include"TreeNode.h" //ĿһиҶӽڵ· //ⷨdfs void dfs(std::vector<std::string>& result, std::string t, TreeNode* root) { if (root == nullptr) return; t = t + std::to_string(root->val) + "->"; if (root->left == nullptr && root->right == nullptr)//Ҷӽڵ result.push_back(t.substr(0, t.size...
ALGO
0.999883
5.034597
d016e39e-77be-4626-93c3-fcad122f08be
lxb1226/leetcode_cpp
src/question15.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: // 排序 + 双指针 // TODO:需要做第二遍 vector<vector<int>> threeSum(vector<int> &nums) { int n = nums.size(); sort(nums.begin(), nums.end()); vector<vector<int>> ans; // 枚举a ...
ALGO
0.999974
5.12394
f91cb99a-79f1-4ecb-a679-0f1785729875
bellicose77/Problem-Solving
Codeforces/Practice_Training(600)/Week_One/C_Regular Bracket Sequence.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; string s; cin>>t; while(t--){ cin>>s; int x = s.length(); if(s[0]==')' || s[x-1]=='(') { cout<<"NO"<<endl; } else{ int c=0; for(int i=0;i<x;i++){ ...
ALGO
0.99989
3.651008
294736d4-4272-414b-b5de-4b718de41b2f
kbs5435586/Graduation
Client/CartoonWar/CartoonWar/Codes/QuadTree.cpp
#include "framework.h" #include "QuadTree.h" #include "Management.h" #include "Frustum.h" CQuadTree::CQuadTree() { } HRESULT CQuadTree::Ready_QuadTree(_vec3* pVerticesPos, const _uint& iNumVerticeX, const _uint& iNumVerticeZ) { m_pVerticesPos = pVerticesPos; m_iCorner[(_uint)CORNER::CORNER_LT] = iNumVerticeX * iN...
ALGO
0.935579
4.32939
793a04a8-3165-4232-9a9b-de5c845494fd
MADTeacher/flutter_basics
2/2.8/flutter_snackbar/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.997858
6.76775
245a7ad0-778f-4f21-8a09-8dbd233d6c89
andrew-pester/ComS327Assignment
1.08/pc.cpp
#include <stdlib.h> #include "string.h" #include "dungeon.h" #include "pc.h" #include "utils.h" #include "move.h" #include "path.h" #include "io.h" uint32_t pc_is_alive(dungeon *d) { return d->PC->alive; } void place_pc(dungeon *d) { d->PC->position[dim_y] = rand_range(d->rooms->position[dim_y], ...
TOOL
0.921374
3.764987
0be535d0-0235-4445-8970-099f880decfc
PranjalShinde16/Codeforces
Ladder A/29.VanyaAndFence.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,h,count=0; cin>>n>>h; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; if(a[i]>h){count=count+2;} else{count=count+1;} } cout<<count; return 0; }
ALGO
0.999862
3.323778
dc483b12-21d2-474b-9297-cdb9a37aea0d
Xilinx/pp4fpgas
examples/complex_fir-top.cpp
#include <iostream> #include <vector> #include "complex_fir.h" const int SIZE = 256; int main() { // Define taps for the complex FIR filter. Separate real and imaginary parts. int Itaps[NUM_TAPS] = {1, 2, 0, -3, 0, 4, -5, 0, 1, -2, 0, -3, 0, 4, -5, 0}; int Qtaps[NUM_TAPS] = {0, -1, 2, 0, -3, 0, 4, -5, 0,...
ALGO
0.97629
5.366478
19bc4c6a-ebfb-45d4-bc19-7b2786beeff8
m99Tanishq/DSA
DP/MiniJump.cpp
#include <bits/stdc++.h> using namespace std; void main() { int nums[] = {4, 2, 0, 3, 2, 0, 1, 8}; int n = sizeof(nums) / sizeof(nums[0]); vector<int> dp(n, 1e9); dp[0] = 0; for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) { if (i <= (j + nums[j])) ...
ALGO
0.999941
4.530965
87ef8153-163e-492d-ae93-a54f0cc26498
joydip007x/CompetitiveCodeArchive
SPOJ/IOIPALIN/18213176_WA_0ms_0kB.cpp
#include<bits/stdc++.h> using namespace std; int n ,dp[2 ][5001],ss; char s2[5001],s1[5001]; int LCS(int a, int b) { int p=0; for(int i=1 ; i<=ss ; i++) { for(int j=1 ; j<=ss ; j++) { if( s1[i-1] ==s2[j-1 ] ) dp[ p ][j]= 1 + dp[ p^1 ][j-1]; else dp[ p ][j]= max (dp[ p...
ALGO
0.999959
3.592578
9c2d862b-abe4-463e-9d36-765115f7a3d9
Jyotishmoy12/LetsReviseDSA-
recursion/Check if Array Can Be Partitioned into K Subsets.cpp
Problem Statement: Given an array of integers nums and an integer k, determine whether the array can be partitioned into k subsets such that the sum of elements in each subset is equal. Intuition: This problem requires distributing the elements of the array into k subsets where each subset has the same sum. This can b...
ALGO
0.999994
7.106543
5e9dd01f-3c0e-411b-bf3c-a8e5c84da431
SabrinaSioli/ComputerGraphics1-Project
Teste_OPENGL/eigen-3.4.0/bench/perf_monitoring/llt.cpp
#include "gemm_common.h" #include <Eigen/Cholesky> EIGEN_DONT_INLINE void llt(const Mat &A, const Mat &B, Mat &C) { C = A; C.diagonal().array() += 1000; Eigen::internal::llt_inplace<Mat::Scalar, Lower>::blocked(C); } int main(int argc, char **argv) { return main_gemm(argc, argv, llt); }
ALGO
0.998775
4.213988
8a0632eb-b736-4fb6-8c7d-c64ce3c77cfd
ishefalichopra/CPP
351_ZeroesAndOnes.cpp
#include <bits/stdc++.h> using namespace std; int countZeroes(const string &strs) { return count(strs.begin(), strs.end(), '0'); } int countOnes(const string &strs) { return count(strs.begin(), strs.end(), '1'); } // int dfs(vector<string>& strs, int i, int m, int n) { // // Base case: If we have checked...
ALGO
0.999929
5.807268
76ab444c-bc07-4899-b6aa-96c1152428bf
marshall-hobbs96/CSCE315-Pancake-P2
Main Code/src/Player.cpp
/* CSCE 315 503 Project 3 Group 17 Abdul Campos Marshall Hobbs McLain Johnson Troy Fulton Player.cpp - Implementations for Player class (making moves, returning the stack, etc.) */ #include "Player.h" Player::Player(int num_pancakes, int* order) : stack(order), stack_size(num_pancakes) {} int* Player::getStac...
ALGO
0.977968
3.799941
f66b47c1-ecd0-41ff-964b-706c79c10a83
ishandutta2007/codeforces
basic_string/normal/1146/H.cpp
#include<bits/stdc++.h> using namespace std; enum{N=309}; int x[N],y[N],f[N][N][5]; struct P{int x,y;double t;bool operator<(P a)const{return t<a.t;}}p[N*N]; int main(){ios::sync_with_stdio(0),cin.tie(0); int n,i,j,k,m=0,u,v; long long s=0; for(cin>>n,i=1;i<=n;++i)cin>>x[i]>>y[i]; for(i=1;i<=n;++i)for(j=1;j<=n;++j)...
ALGO
0.999494
3.434528
137ccee3-8f03-4984-ac28-7fc12db1657f
ishandutta2007/codeforces
mohamedabookail/normal/1438/A.cpp
/** * author: Mohamed Abo_Okail * created: 13/11/2O2O **/ #include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; #define endl "\n" #define ll long long #define sz(x) int(x.size()) #define all(x) x.begin(),x.end() int main() { std::ios_base::sync_with_stdio(0); //freo...
ALGO
0.99911
4.091965
ca321260-0946-4696-b98a-ac7beefd4446
Iman-Howlader/Competitive-Programming
HackkerRank/Sets_STL.cpp
#include <bits/stdc++.h> using namespace std; #define fast \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define testcase \ int t; \ cin >> t; \ while (t--) #define nl "\n" void solve() { set<int> a; int x, y; testcase ...
ALGO
0.999861
4.583905
739d82b1-2aa2-49c7-974d-c524fc8d3eeb
liuawen/Play-Leetcode
Play-Leetcode-master/0858-Mirror-Reflection/cpp-0858/main.cpp
/// Source : https://leetcode.com/problems/mirror-reflection/description/ /// Author : liuyubobobo /// Time : 2018-06-25 #include <iostream> #include <cassert> using namespace std; /// Simulation /// Time Complexity: O(p) /// Space Complexity: O(1) class Solution { public: int mirrorReflection(int p, int q) { ...
ALGO
0.999959
4.765063
14e12406-20e2-40f3-8084-4488ece34d92
ishandutta2007/codeforces
dxqwq/normal/1613/E.cpp
// Problem: E. Crazy Robot // Contest: Educational Codeforces Round 118 (Rated for Div. 2) // URL: https://codeforces.com/contest/1613/problem/E // Memory Limit: 512 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org) //And in that light,I find deliverance. #include<bits/stdc++.h> // #pragma G...
ALGO
0.999742
3.778654
f2e40da2-3ddd-431a-bb5e-001a539be23e
Houzich/CUDA-GPU-Brute-Force-Mnemonic-Ethereum
bitcoin/crypto/hmac_sha256.cpp
#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(rkey); memset(rkey + 32, 0, ...
ALGO
0.988649
5.846241
a1a5c693-c9b3-4910-82c6-149631bfef72
Abhinav2604/Competitive-Programming
Codeforces/garland.cpp
#include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <cmath> #include <cstring> #include <chrono> #include <complex> #define endl "\n" #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector < vi > #define pii pair<int,int> #define pll pair<long long, long long> #defi...
ALGO
0.999954
3.795061
da0f578e-c995-4186-a3e6-c9932d24a79c
oliverreekie/-The-Last-Stand-3d-Videogame
Coursework/Game/engine/src/engine/entities/shapes/trim.cpp
#include "pch.h" #include "trim.h" #include <engine.h> engine::trim::trim(std::vector<glm::vec3> vertices) : m_vertices(vertices) { std::vector<glm::vec3> normals; // Top front normal normals.push_back(glm::cross(vertices.at(0) - vertices.at(1), vertices.at(0) - vertices.at(4))); // Top left normal normals.push...
TOOL
0.94633
6.415856
d6aa06a2-b6c1-4179-b662-f2663ac0589c
ChowdriS/Programming-Practice
Talentio/Coding/number thory/lca.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: string ans=""; string longestCommonSubsequence(string s1, string s2) { int m=s1.size(); int n=s2.size(); vector<vector<string>> dp(m+1,vector<string>(n+1,"")); for(int i=1;i<=m;i++){ for(int j=1;j<...
ALGO
0.999967
5.169034
ee330f8a-7e02-436e-aaba-89429b57b398
y-yammt/ws-rnn
src/third_party/eigen_3.3.2/doc/examples/nullary_indexing.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; // [functor] template<class ArgType, class RowIndexType, class ColIndexType> class indexing_functor { const ArgType &m_arg; const RowIndexType &m_rowIndices; const ColIndexType &m_colIndices; public: typedef Matrix<typename ArgType::Scalar, ...
ALGO
0.936255
7.050192
b7e5fc65-0a10-4598-a9be-6b828c6f0d30
Hoamz123/Test_C--
TEST_7.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; /*bai 1:tim thua so nto co so mu lon nhat (neu trung mu thi chon so nho hon) int main(){ ll n;cin>>n; set<ll> s; int res = 0; for(ll i=2;i<=sqrt(n);i++){ int dem = 0; while(n%i==0){ dem++; n/=i; ...
ALGO
0.999789
3.254716
4765e690-be86-4514-b1a3-225d2f817783
sudarshanvm/problem-solving
leetcode/2812.cpp
//problem: https://leetcode.com/problems/find-the-safest-path-in-a-grid/ class Solution { public: vector<vector<int>> dir = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}}; bool isValidCell(vector<vector<int>>& mat, int i, int j) { int n = mat.size(); return i >= 0 && j >= 0 && i < n && j < n; } vo...
ALGO
0.999997
6.535885
12fe3fdc-b207-4884-8db1-93960cef9745
poweihuang17/D-Spur
vision/src/second.cpp
#include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/opencv.hpp> #include "opencv2/features2d/features2d.hpp" #include "opencv2/calib3d/calib3d.hpp" #include "opencv2/nonfree/nonfree.hpp" #include <sstream> using namespace cv; using namespace std; #define FEAT_...
ALGO
0.973518
3.819387
9c89182a-abdf-4975-a1eb-ecaf15df8f97
sanyagargg/LeetcodeSolutions
Bit Manipulation/Pow(x,n).cpp
class Solution { public: double myPow(double x, int n) { if (n == 0) return 1.0; // Base case long long N = n; // Convert to long long to handle INT_MIN case if (N < 0) { x = 1 / x; N = -N; } double ans ...
ALGO
0.999935
6.134732
bcf37a6e-69aa-45cb-bcbe-d1ba7a766922
Gliming/LeetCodePractice
Solutions/AddTwoNums_2.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(0); ListNode* last = head; ...
ALGO
0.999975
6.183466
24cd51f7-ea13-46ea-bbf4-d0e219202060
TianTcl/KU01-challenge
Solutions.cpp/2564/r6_trucks.cpp
#include <bits/stdc++.h> #define show(x) cerr << #x << " : " << x << '\n' #define loop(z) for(int i=0;i!=z;i++) #define all(y) y.begin(),y.end() #define in(v) cin >> v; #define out(v) cout << v << '\n'; #define st first #define nd second using namespace std; typedef long long ll; typedef double db; typedef float ft; #d...
ALGO
0.999983
3.333081
599a7485-b8ad-461a-ad10-16eaf2392527
Kamonraphu-Yenjit/mid_mobile
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
4dd79631-cfb0-482e-915c-49df3f91570d
NafiHasan/HabiJabi
C++/CSEDU/CSEDU 2022/SEC 2/m.cpp
#include <bits/stdc++.h> using namespace std; #define fast_io() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) vector<long long> a(2005, 0); long long dp[2005][2005]; int n; long long f(long long kid, long long pos, vector<bool> vis) { if (dp[kid][pos] != -1)return dp[kid][pos]; long long ans = 0;...
ALGO
0.999741
3.27546
db907a42-c75c-4aba-b058-0fcea3040fe8
ericsyc/leetcode
C++/46 Permutations.cpp
class Solution { public: vector<vector<int>> permute(vector<int>& nums) { vector<vector<int>> ans; backtracking(nums, 0, ans); return ans; } void backtracking(vector<int>& nums, int start, vector<vector<int>>& ans) { if (nums.size() == start) ans.push_back(nums); ...
ALGO
0.99999
6.672876
2ae3ae36-9fae-4415-98fe-3e955d78b034
akamya997/PracticeCode
202005_practice/gp of moscow/B.cpp
/* Aa^~ kokoro ga pyonpyon suru n jaa^~ // ZZZXXkXkkkZ!``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```?Wfpppbpbbpbbpbbbkbkk // ppbbbpbbpVr`` `` ` ` ` ` ```` `` ` ` `` ` ` ` ` ` ` ` ` ` dppbbkkkkkkkkkkqkqkk // HkqqqqqkkWr`` ` ` ``` ``` `?G, ` ` ``.JC!```` ` ` `` `` ````(Wpbkkkkkkkkqkkkkkqk // mmmmmqqqqpr` `` `` ``````...
ALGO
0.999994
3.907144
b04ed73e-7976-4e46-81db-844398569d21
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Phi/top0-100/escape-the-spreading-fire-Solution2.maximumMinutes/177901_Overflow.cpp
_asn1_ltostr (long v, char *str) { long d, r; char temp[LTOSTR_MAX_SIZE]; int count, k, start; if (v < 0) { str[0] = '-'; start = 1; v = -v; } else start = 0; count = 0; do { d = v / 10; r = v - d * 10; temp[start + count] = '0' + (char) r; c...
ALGO
0.999843
5.461989
6408a189-b758-4f45-a9ee-fa96cd6db11b
alexandraback/datacollection
solutions_5709773144064000_1/C++/Tue/b.cpp
//Written by technolt~h #pragma comment(linker, "/STACK:16777216") #include <cstdio> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <cstring> #include <cstdlib> #include <cmath> #include <string> #include <memory.h> #include <sstream...
ALGO
0.999663
3.111072
5c8152ea-87d1-4a6a-91ef-d87ac5167074
JYKo1846/BOJ-SWEA-211010
103-cheating.cpp
/*#include <iostream> #include <cstring> #include <utility> using namespace std; char in[12][12]; pair<int, int> pleft[102]; pair<int, int> pright[102]; int match[102]; int map[102][102]; bool visited[102]; int L, R; bool dfs(int p) { if(visited[p]) return 0; visited[p]= 1; for(int i= 1; i< R; i++) { if(map[p][...
ALGO
0.999153
3.183234
213b7f3b-2065-4860-acd2-c8d373982c03
manojmh/ComputerScience
algorithms/DP/MatrixChainMultiplication/PalindromePartitioningTabN2.cpp
/** **/ class Solution { public: int minCut(string s) { int n = s.length(); bool dp[n][n]; for(int g=0; g<n; g++) { for(int i=0,j=g; j<n; i++,j++) { if(g==0) dp[i][j] = true; else if(g==1) dp[i][j] = (s[i]==s[j]); else dp[i][j] = (s[i]==s[j] && ...
ALGO
0.99999
5.307055
9b37a10c-aa67-4b30-bbc1-88fbf354ef83
qweqwewqdas/hi
0x03/2577.cpp
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int A,B,C; vector<int>arr(10); int result = 0; cin >> A >> B >> C; result = A*B*C; string str = to_string(result); for(int i = 0; i < str.size(); i++) arr[str[i] - '0']++; for(int i ...
ALGO
0.999819
4.206354
46720fd3-d146-4099-a917-571157635ce4
JohnLulzh2002/Templates-for-CBYJD
模板题_from_ZZY/P1368 最小表示法.cpp
#include<iostream> #include<cstdio> #include<algorithm> #include<cstdlib> #include<cstring> #include<string> #include<queue> #include<cmath> #define Lint long long using namespace std; const int inf=0x7fffffff; const double eps=1e-10; const double pi=acos(-1.0); inline int read(){ int x=0,f=1;char ch;ch=getchar(); wh...
ALGO
0.999982
3.098417
45da5346-f4fa-43b3-a200-fe16260b649d
suman0725/RGD_Analysis_New
PID/PID_Cuts/Beta_Vs_momentum_P_P_hypothesis_allpositivechargeparticles/contamination/beta_root_files/bin_3/chi2pid_p_dependepnt/main.cpp
#include <TFile.h> #include <TH1F.h> #include <TCanvas.h> #include <TLegend.h> #include <TF1.h> #include <TLine.h> #include <TSystem.h> #include <ROOT/RDataFrame.hxx> #include <ROOT/RVec.hxx> #include <TFitResult.h> #include <TVirtualFitter.h> #include <iostream> #include <vector> #include <chrono> #include <TStyle.h> ...
DATA
0.967509
6.229009
5702ac74-7708-44e9-9563-acd93f6c3b8d
Kodsport/testdata_tools
examples/lampswitches/submissions/accepted/sl_nmlogn.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define trav(a, x) for(auto& a : x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int main() { cin.sync_with_stdio(0); cin.tie(0)...
ALGO
0.999939
3.620156
1ade9a99-a418-4edd-b267-9c077dc6c2fa
tayu0110/atcoder
algo/WarshallFloyd.cpp
#include<iostream> #include<vector> using namespace std; const long long INF = 1LL << 60; int main() { int N, M; cin >> N >> M; vector<vector<long long>> dp(N, vector<long long>(N, INF)); for(int e = 0; e < M; e++) { int a, b; long long w; cin >> a >> b >> w; dp[a][b]...
ALGO
0.999992
4.55084
3ab465d9-8994-4d30-a70a-dbbce5718b15
Mohdtauhid/Algorithm
quick_sort.cpp
#include<iostream> #include<conio.h> #include<math.h> using namespace std; int partition (int arr[], int low, int high) { int pivotElement = arr[low]; int j = low ; for (int i = low+1; i <=high; i++) { if (arr[i] <pivotElement) { j=j+1; if(i!=j) ...
ALGO
0.999977
4.878534
ae152c02-ed77-4f59-a85a-8a38e5713079
ishandutta2007/codeforces
xyz2606/normal/744/A.cpp
#include<bits/stdc++.h> using namespace std; const int N(1111); int c[N], rela[N], siz[N]; int getr(int x) { int p(x); while(p != rela[p]) p = rela[p]; int p1(p); p = x; while(p != rela[p]) { int p2(rela[p]); rela[p] = p1; p = p2; } return p1; } int main() { int n, m, k; vector<int> blg; scanf("%d%d%d"...
ALGO
0.999987
3.937867
07cd2c38-ac42-422f-8a58-a8b287dcc3e1
autohandle/CarNDMPCProject
src/Eigen-3.3/doc/examples/Tutorial_BlockOperations_print_block.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::MatrixXf m(4,4); m << 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13,14,15,16; cout << "Block in the middle" << endl; cout << m.block<2,2>(1,1) << endl << endl; for (int i = 1; i <= 3; ++i) { cout << "B...
ALGO
0.969002
3.6853
54fcb3f0-e26a-4a57-ae4e-55e83b2862dd
ishandutta2007/codeforces
leaf1415/normal/1574/A.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <ctime> #include <cstdlib> #include <cassert> #include <vector> #include <list> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <string> #include <algorithm> #include <utility> ...
ALGO
0.99864
4.100426
5316f1ea-04e0-4cb6-bd21-d9e88d1eea96
sxyugao/Codes
Luogu/P1608/P1608.cpp
#include <cstdio> #include <cstring> #include <iostream> using namespace std; char buf[1 << 14], *p1 = buf, *p2 = buf; inline char gc() { return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 14, stdin), p1 == p2) ? EOF : *p1++; } inline int read() { int x = 0, f = 1; char c = gc(); for (; !isdigit(c); c = g...
ALGO
0.999991
3.73446
ad5956d8-00cd-4c7b-9172-18f87acdba0c
pdohyung/solving_algorithm
baekjoon/18408.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int num, n1 = 0, n2 = 0; for(int i = 0; i < 3; i++){ cin >> num; if(num == 1) n1++; else n2++; } if(n1 > n2) cout << 1; else cout << 2; return 0; }
ALGO
0.999902
3.347067
9bbe44b6-82c8-4414-b9fb-5b97b10bc22f
Ali-hey-0/opencv
modules/dnn/src/layers/permute_layer.cpp
#include "../precomp.hpp" #include "layers_common.hpp" #include "../op_cuda.hpp" #include "../op_inf_engine.hpp" #include "../ie_ngraph.hpp" #include "../op_vkcom.hpp" #include "../op_webnn.hpp" #include "../op_timvx.hpp" #include "../op_cann.hpp" #include <float.h> #include <algorithm> #ifdef HAVE_OPENCL #include "o...
TOOL
0.864251
7.869575
2f45a9e5-6731-4aa2-95a7-9a1c2942cccf
JH-LEE-Dev/Problem-Solving
BOJ/Binary_search/2613.cpp
#include <iostream> #include <vector> #include <queue> #include <stack> #include <unordered_set> #include <unordered_map> #include <set> #include <map> #include <algorithm> #include <limits> #include <tuple> #include <string> #include <cmath> #include <bitset> #include <iomanip> using namespace std; #define endl '\n'...
ALGO
0.999997
3.946144
99a85f38-760f-4976-b45d-13c426459c1b
kamal-stark-dev/Learning
LeetCode/95. MED - Rotate Array.cpp
// 189. Rotate Array #include <bits/stdc++.h> using namespace std; void leftRotate_Brute(vector<int>& nums, int k) { int n = nums.size(); k = k % n; vector<int> temp(k); for (int i = 0; i < k; i++) { temp[i] = nums[i]; } for (int i = k; i < n; i++) { nums[i - k] = nums[i]; ...
ALGO
0.99997
5.754423
551080a0-37f3-4910-b4f7-3fc4bda1d4d5
DibloTempest/ThinhLucifer
CPP/SOLAP.cpp
#include <bits/stdc++.h> using namespace std; int main() { freopen("SOLAP.inp", "r", stdin); freopen("SOLAP.out", "w", stdout); long long n, d = 0; cin >> n; long long a[10004]; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (long long i = 1; i <= n; i++) { lo...
ALGO
0.999917
3.490663
a5a953d4-f823-4263-a4fd-407ac4fbadf3
bobowang2333/FSE19
LLVM/llvm/lib/CodeGen/EdgeBundles.cpp
#include "llvm/CodeGen/EdgeBundles.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/Passes.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/GraphWriter.h" using namespace llvm; static cl::opt<bool> ViewEdgeBundles("view-edge-bundles", cl::H...
TOOL
0.929891
7.544821
b4982cba-b776-4ebd-a2a0-2a77938189fb
ishandutta2007/codeforces
krk/normal/267/C.cpp
#include <cstdio> #include <cmath> #include <algorithm> using namespace std; const int Maxn = 105; const int Maxm = 5005; const double Inf = 1e50; const double eps = 1e-6; int n, m; int a[Maxm], b[Maxm], c[Maxm]; double mat[Maxn][Maxn]; bool taken[Maxn]; double w[Maxn]; double res; void Take(int v) { taken[v] = tru...
ALGO
0.999992
3.607932
de5548d4-0147-4a00-b8f4-9e7ad3713267
Samsung/node-jerryscript
deps/icu-small/source/tools/toolutil/uoptions.cpp
#include "unicode/utypes.h" #include "cstring.h" #include "uoptions.h" U_CAPI int U_EXPORT2 u_parseArgs(int argc, char* argv[], int optionCount, UOption options[]) { char *arg; int i=1, remaining=1; char c, stopOptions=0; while(i<argc) { arg=argv[i]; if(!stopOptions && *arg...
TOOL
0.922107
4.815145
2c4b3c5b-1a7e-477e-81ea-161bf964612a
doomsday861/Allofit
bulbswitch.cpp
/** * bulbswitcher **/ #include<bits/stdc++.h> #define ll long long #define testcase ll t;cin>>t;while(t--) #define pb push_back #define fi first #define se second #define vll vector<ll> #define for0(i, n) for (ll i = 0; i < (ll)(n); ++i) #define for1(i, n) for (ll i = 1; i <= (ll)(n); ++i) #define run ios_base::sync_...
ALGO
0.999331
3.510574
8a5e9b7e-b931-4509-a3dd-7a833eb96f61
WzDTj/Keep-Coding
Coursera/计算导论与C语言基础/week8/8-5.cpp
#include <iostream> #include <cstdio> using namespace std; int main() { int n; while (cin >> n) { for (int i = 10; i < n+1; ++i) { int temp = i, ans = 0; while (temp != 0) { ans += temp%10; temp /= 10; } if (i%ans == 0) co...
ALGO
0.998841
4.357643
f94498dd-f8bf-4f3c-aa81-8a4e0a2720ac
hakomori64/atcoder
abc/98c.cpp
#include <bits/stdc++.h> #define REP(i, n) for(ll i = 0; i < n; i++) #define REPR(i, n) for(ll i = n; i >= 0; i--) #define FOR(i, m, n) for (ll i = m; i < n; i++) #define INF LLONG_MAX #define ALL(v) v.begin(), v.end() using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<vll> vvll; int mai...
ALGO
0.999858
3.464827
6535c115-15d6-473d-a684-00ca6da187e7
Den-Git-CPP/acm_timus
1787.cpp
#include <iostream> int main() { int k, n, t; int c = 0; std::cin >> k >> n; for (int i = 0; i < n; i++){ std::cin >> t; c += (t - k); if (c < 0){c = 0;} } std::cout << c; return 0; }
ALGO
0.999924
3.461444
21e99b74-6f7b-4a7d-b4d7-ee511860395d
Arrowes/C-coding
C++/21天学通C++(第8版)源代码/2.Ex3.cpp
#include <iostream> using namespace std; // Function declaration int DemoConsoleOutput(); int main() { // Call i.e. invoke the function DemoConsoleOutput(); return 0; } // Function definition int DemoConsoleOutput() { cout << "Performing subtraction 10 - 5 = " << 10 - 5 << endl; cout << "Performing m...
TOOL
0.970236
5.318816
82e74fce-a32e-4c48-a842-1e0fbb49e8de
Streakwind/other-code
Maximum Subarray/prefixsum.cpp
#define ll long long #include <iostream> #include <vector> using namespace std; int main () { ll maxi = 0; ll curNum = 0; ll minPreSum = 0; ll res = 0; vector<ll> preSum(1); vector<ll> givenNum; cin >> maxi; for (ll i = 0; i < maxi; i++) { cin >> curNum; given...
ALGO
0.999949
4.757118
4708c802-c0d1-44ba-8d59-3b169644593d
geekyparth2004/Trees
Day-5/01.144.binary-tree-preorder-traversal.cpp
/* * @lc app=leetcode id=144 lang=cpp * * [144] Binary Tree Preorder Traversal */ // @lc code=start /** * 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...
ALGO
0.999973
6.893204
3e3ad971-74d0-429b-a2fd-4d3c94a93ce1
PTSD-3D/PTSD-Engine
dependencies/bullet/src/examples/DeformableDemo/GraspDeformable.cpp
#include "GraspDeformable.h" ///btBulletDynamicsCommon.h is the main Bullet include file, contains most common include files. #include "btBulletDynamicsCommon.h" #include "BulletSoftBody/btDeformableMultiBodyDynamicsWorld.h" #include "BulletSoftBody/btSoftBody.h" #include "BulletSoftBody/btSoftBodyHelpers.h" #include "...
TOOL
0.880299
5.806209
47345fc7-afab-45c9-8912-295d561dbab3
IMWYY/algorithmING
leetCode/dp/Problem304.cpp
#include <vector> class NumMatrix { public: std::vector<std::vector<int>> pre_sum; NumMatrix(std::vector<std::vector<int>>& matrix) : pre_sum(matrix.size() + 1, std::vector<int>( matrix.size() > 0 ? (matrix.front().size() + 1) : 1, 0)) { for (int i = 1; i <= matrix.si...
ALGO
0.999427
7.119172
10ea3e87-833d-4382-9c2d-e7cc7d074ced
riperjew/zero-bear-skr-1.3
Marlin/src/libs/vector_3.cpp
#include "../inc/MarlinConfig.h" #if ABL_PLANAR || ENABLED(AUTO_BED_LEVELING_UBL) #include "vector_3.h" #include <math.h> /** * vector_3 */ vector_3 vector_3::cross(const vector_3 &left, const vector_3 &right) { return vector_3(left.y * right.z - left.z * right.y, // YZ cross left.z * right...
TOOL
0.867709
7.164988
07c25c03-4285-4ee8-9c96-eb39996489e2
TotalElderBerry/student_app
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998859
6.785645
c14a3af6-e2da-4dc6-8a1c-dce388b57694
sarvex/leetcode-powershell
solution/1300-1399/1379.Find a Corresponding Node of a Binary Tree in a Clone of That Tree/Solution.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: TreeNode* res; TreeNode* getTargetCopy(TreeNode* original, TreeNode* cloned, TreeNode* ta...
ALGO
0.99994
5.832013
2bc73121-0faf-41ac-98f7-43ba51a3d53b
akbtech17/dsa
Other/LBBR/Arrays/1-MinMaxUsingDivideNConquer.cpp
// 1 - MinMaxUsingDivideNConquer.cpp // https://www.geeksforgeeks.org/maximum-and-minimum-in-an-array/ #include <iostream> using namespace std; pair<int, int> findMinMax(int arr[] , int s, int e) { pair<int, int> mm; //base case if (s == e) { mm.first = arr[s]; mm.second = arr[s]; return mm; } else if (e =...
ALGO
0.999895
4.962173
36f7c560-3911-4b17-ab17-e9448d5e1eb6
Rishi-09/cpp_programming
Basic/Functions/min.cpp
#include <iostream> using namespace std; // Function which returns a minimum value double min(double a, double b) { if (a < b) return a; else return b; } int main() { double num1,num2; cout << "Enter First Number : "; cin >> num1; cout << "Enter Second Number : "; cin >> nu...
ALGO
0.995729
4.420131
b8c7f896-a30f-41fe-84ed-f3e785cf46e3
shohagranasuvo/CPP_Basics
task_3_multiplication_table.cpp
#include <iostream> using namespace std; int main() { int a; cout<<"Enter a number for multiplication table : "; cin>>a; for(int i=1;i<=10;i++) { cout<<a<<" * "<<i<<" = "<<a*i<<endl; } return 0; }
TOOL
0.96459
3.258385
55c03def-4fb1-480c-9821-d65991f9dc7f
ishandutta2007/codeforces
zscoder/normal/1523/E.cpp
#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; #define fi first #define se second #define mp make_pair #define pb push_back #define fbo find_by_order #define ook order_of_key typedef long long ll; typedef pair<...
ALGO
0.99982
3.833166
5e18c16a-6c4a-4640-8511-540eb9087765
MostafaMohamed2001/C-Data-Structure
.history/hello_20240624095337.cpp
#include <iostream> #include <string> using namespace std; int main() { int N, M; string C, D; cin >> N; for (int i = 0; i < N; i++) { cin >> C; } cin >> M; for (int i = 0; i < M; i++) { cin >> D; } int p0; cin >> p0; int P[M]; for (int i = 0; i < M + 1; i++) { cin>>P[i]; }...
ALGO
0.999865
3.847162
5b8e55de-0681-4347-b628-99af0a34b05b
HuanHuanHuanFFF/HuanF-CodeX
Code Instrumentality Initiative/CF/CF 1017 d4/H.cpp
#include <bits/stdc++.h> using std::cin; using std::cout; using std::pair; using std::vector; using std::string; using ll = long long; using ull = unsigned long long; using PII = pair<int, int>; constexpr int MOD = 1e9 + 7; constexpr ll INF = 7e17 + 17; constexpr int N = 1e5 + 7; void IOS() { std::ios::sync_with...
ALGO
0.999838
4.221536
44f279da-06bc-4d06-adeb-f1be197db9c1
graphicstone/HackerRank-Solutions
Warmup Challenges/A Very Big Sum.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { long n, sum = 0; cin>>n; int arr[n]; for(int i=0; i<n; i++) { cin>>arr[i]; sum = sum + arr[i]; } cout<<sum; return 0; }
ALGO
0.999612
3.682837