uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ceac257c-e2c9-4bef-b118-86699a0ff54b
zapwiz22/DSA-in-CPP
dynamic-programming/30-delete-ops-two-strings.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: int minDistance(string word1, string word2) { int n = word1.length(), m = word2.length(); vector<int> prev(m + 1, 0), curr(m + 1, 0); for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { if (word1[i...
ALGO
0.99995
5.427387
22b3e9cf-82cf-4256-ad88-dd35eefa9b31
sudiptarathi2020/Problem-Solves
lightoj/Coin_Change_i.cpp
#include<bits/stdc++.h> #define ll long long #define ld long double #define pb push_back #define pf push_front #define mkp make_pair #define endl '\n' #define ub upper_bound #define lb lower_bound #define IN cin #define out cout #define elif else if #define yes cout<<"yes\n"; #define YES cout<<"YES\n"; #define NO cout...
ALGO
0.999775
3.424997
1070e1ea-fc83-48c8-aadd-2720a38322f4
abhishek18124/PPCPPOct2021
5. February/Lecture 28 - 5thFebruary2022 /005BinaryTrees_DeleteFromBST.cpp
/* Given a BST and a key, design an algorithm to delete the node with the given key, if present, from the BST. */ #include<iostream> #include<queue> using namespace std; class node { public: int data; node* left; node* right; node(int data) { this->data = data; this->left = this->right = NULL; } }; ...
ALGO
0.99999
5.213182
dfe628ea-fadf-4188-9adf-8c9caacfac96
ZachWWalden/AdventOfCode
2023/Dec7/Prob2/main.cpp
#include <exception> #include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> #include <cstdint> enum CardType { J = 0, TWO = 1, THREE = 2, FOUR = 3, FIVE = 4, SIX = 5, SEVEN = 6, EIGHT = 7, NINE = 8, T = 9, Q = 10, K = 11, A = 12 }; enum HandType { HIGH_CARD = 0, PAIR = 1, TWO...
ALGO
0.920374
4.473362
697c7f55-fdbf-4a59-a267-bf2be0e3145d
kangwang-F/cpp-algorithms-learning
Code/VSCODE/Code_for_wanting/list/list.cpp
#include<iostream> /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ struct ListNode { int v...
ALGO
0.999933
4.255374
899fa3b8-494c-4fdb-8af6-eb8548867a42
gabriel-candeia/Competitive-Programming-Solutions
Codeforces/[GYM] - 2016 USP Try-outs/F.cpp
/* se i for impapar tu soma i a resposta e para se não soma n a resposta e ai faz i = teto(i/2) n = teto(n/2) */ #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--) { int n, x; cin >> n >> x; if(x % 2 == 1) { cout << x/2+1 << endl; ...
ALGO
0.999924
4.267169
88643da4-2bdb-495f-9231-31111e89e763
MuhammadAhmadNaveed4714/Oop
code91.cpp
#include<iostream> using namespace std; // Function to find max difference int maxAbsDiff(int arr[], int size) { int* ls=new int [size]; int* rs=new int[size]; //find left nsmaller elements ls[0] = 0; for (int i = 1; i < size; i++) { int j = i - 1; while (j >= 0 && arr[j] >= arr[i]) { j--; } if (j >=...
ALGO
0.999961
5.036133
b144ca04-5d15-4e95-ad27-7afb776f9cba
Deepak22903/PP
Misc/pathSumBST.cpp
#include <iostream> #include <stack> #include <utility> #include <vector> using namespace std; /** * 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(nullpt...
ALGO
0.99999
7.070571
bd792a3a-a6a7-4db1-9fb6-0cef95070b7b
mammothb/boost_1_54_0
libs/graph/example/make_biconnected_planar.cpp
#include <boost/graph/biconnected_components.hpp> #include <boost/graph/make_biconnected_planar.hpp> #include <boost/graph/boyer_myrvold_planar_test.hpp> using namespace boost; int main(int argc, char** argv) { typedef adjacency_list < vecS, vecS, undirectedS, property<vertex_index_t, int>,...
ALGO
0.995968
7.067492
de8b67a6-d65f-4d5e-af80-18bba7459b5b
muazzamaqeel/Quantum-Computing
src/libs/eigen-3.4.0/eigen-3.4.0/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.99873
4.531452
ad123d91-2bb9-4f21-b167-82b76a305c19
MaherRayes/lpm-for-ignis
src/runtime/skysun/PerezModel.cpp
#include "PerezModel.h" #include "Illuminance.h" #include "Logger.h" namespace IG { // Data based on 'Modeling Skylight Angular Luminance Distribution from Routine Irradiance Measurements' by R. Perez, R. Seals, and J. Michalsky (1993) constexpr size_t BinCount = 8; static float Ranges[BinCount + 1] = { 1.000...
ALGO
0.999137
7.320416
59386578-ceb2-4961-8728-691df7d501b0
Sort-Care/TemperalDifference
src/cartpole.cpp
#include "cartpole.hpp" /* * Environment Set up */ const double FAIL_ANGLE = M_PI/2; // fail angle, if exceeds (-M_PI/2, M_PI/2) const double FORCE = 10.0; // Motor force, Newton const double GRAV = 9.8; // Gravitational constant const double CART_M = 1.0; // Cart mass const double POLE_M = 0....
ALGO
0.997981
4.743066
534d8566-e1f3-47b2-8d3f-83897eaf1d68
proydakov/codeforces
Codeforces_Round_#670/A/solution.cpp
#include <map> #include <vector> #include <cstdint> #include <iostream> #include <algorithm> int mex(std::map<int, int> const& map, int score) { int val{}; for(size_t i = 0; ; i++) { auto const it = map.find(i); if (it != map.end() && it->second >= score) { val = (i + 1...
ALGO
0.999822
4.995507
115c8696-a118-43f6-9583-df2f974f919d
ishandutta2007/codeforces
c8kbf/normal/1684/B.cpp
/* template by c8kbf */ // macOS doesn't have <bits/++.h> (shame) #include <cstdlib> #include <iostream> #include <cstdio> #include <iomanip> #include <fstream> #include <cmath> #include <cstring> #include <ctime> #include <deque> #include <string> #include <stack> #include <vector> #include <map> #include <queu...
ALGO
0.999118
3.63432
92b3cea5-69b4-4d83-b3a7-166b57fd76ac
Account1-Anurag/PRACTICE-CODES
All File/YetnotherrokenKeoard.cpp
#include <iostream> #include <string> using namespace std; int main() { int t; cin >> t; while (t--) { string keys; cin >> keys; string typedString = ""; for (char key : keys) { if (key == 'b') { if (!typedString.empty() && islower(typedString.back()))...
ALGO
0.99893
5.322505
a7128372-538d-424e-97ba-ec8574b3f044
sudhir45/CPP-Practice-Programs
numofcarryoperations.cpp
#include<stdio.h> #include<string.h> #include<bits/stdc++.h> int digitSum(int n) { int sum; for (sum=0; n > 0; sum+=n%10,n/=10); return sum; } int numberOfCarryOperations(int a,int b){ return (digitSum(a) + digitSum(b) - digitSum(a+b)) / 9; } int main(){ int a=1499, b=2517; std::cout<<numberOfCarryO...
ALGO
0.999437
4.533192
4e40caa4-bf3a-47d7-9038-814e21f8ae3b
fitri-hy/translation-bot-flutter
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
cab88fdc-3d4c-49a8-b6fd-6723fb6dc622
linzhi/LeetCode
C++/Reverse_Integer.cpp
/* * Author: linzhi qilinzhi#gmail.com * * Title: Reverse Integer * */ class Solution { public: int reverse(int x) { int y = 0; while (x) { y *= 10; y += x % 10; x /= 10; } return y; } };
ALGO
0.999915
5.923434
788a6750-de23-4c7e-9e74-17d34cd1cbae
MixerMovies/RedShadow
ProjectRedShadow/libs/bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp
#include "btConvex2dShape.h" btConvex2dShape::btConvex2dShape(btConvexShape* convexChildShape) : btConvexShape(), m_childConvexShape(convexChildShape) { m_shapeType = CONVEX_2D_SHAPE_PROXYTYPE; } btConvex2dShape::~btConvex2dShape() { } btVector3 btConvex2dShape::localGetSupportingVertexWithoutMargin(const btVector3...
ALGO
0.944696
7.572961
1139c69a-c166-4f6c-90cd-a8d2086c33f1
impolska742/leetcode-practice
my-folder/problems/concatenation_of_array/solution.cpp
class Solution { public: vector<int> getConcatenation(vector<int>& nums) { int n = nums.size(); for(int i = 0; i < n; i++) { nums.push_back(nums[i]); } return nums; } };
ALGO
0.998743
5.572411
72b10a89-fec3-4a46-81a4-f975a0238c40
iulikqa/CPP_HW
Lab_1.cpp
#include <iostream> using namespace std; int main() { int n; long long product = 1; // Используем long long для больших чисел // Ввод числа n cout << "Enter a number n :"; cin >> n; // Проверка на корректность ввода if (n < 1) { cout << " The number must be positive!" << endl; ...
ALGO
0.999977
5.534352
4d9dab13-4936-4be9-a5a2-a57b77944674
AIABHISHEK/DataStructureAndAlgo_Problems
leetcode/remove_ele.cpp
#include<bits/stdc++.h> #define ll long long int #define int_ unsigned int using namespace std; int removeElement(vector<int> &nums, int val){ int i = 0; int j = nums.size() - 1; int l = 0; while (i < j) { if (nums[i] == val){ while (nums[j] == val){ j--; ...
ALGO
0.999827
4.648237
9bc54ad9-4ed4-4a57-bbe3-6f5fb0f8b554
mdtariqueh007/My_Leetcode
17-letter-combinations-of-a-phone-number/letter-combinations-of-a-phone-number.cpp
class Solution { void f(int ind,string&digits,string&res,vector<string>&ans,vector<string>&mapping){ if(ind==digits.size()){ ans.push_back(res); return; } int index = digits[ind] - '0'; string val = mapping[index]; for(int j = 0;j<val.size();j++){ ...
ALGO
0.999964
6.787032
513c2524-5988-4191-9241-2500107c8da7
shraddha8866/code-cpp
array4.cpp
//Write a program to find the middle element of an array #include<iostream> using namespace std; int main(){ int size; cout<<"Enter the size of the array :"; cin>>size; int arr[size]; for(int i=0;i<size;i++){ cout<<"Enter number "<<i+1<<" : "; cin>>arr[i]; } if(size%2==0){ ...
ALGO
0.998834
4.400864
accf99dc-f5b9-416a-9790-711cb858bc98
Anish168/Utsav_Session
Recursion/nXm_emptyGrid.cpp
#include <iostream> using namespace std; int ways(int i, int j) { // base case if (i == 0 && j == 0) { return 1; } if (j < 0) { return 0; } if (i < 0) { return 0; } // recursive case return ways(i, j - 1) + ways(i - 1, j); } int main() { int...
ALGO
0.999981
5.610674
b5ee166d-a849-4c69-97d9-01368dd50d0e
Harshsheladiya/clothing-app-sem-5-harsh-pc-code-
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.998809
6.763549
be9f8c80-76d2-4a7d-ae11-ada864d55c78
rayddteam/freebsd-pi
contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
#define DEBUG_TYPE "function-lowering-info" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/CodeGen/FunctionLoweringInfo.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/IntrinsicInst.h" #include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llv...
TOOL
0.889142
6.999651
772f6a3e-8566-439a-baea-538d833bcaae
SAURABH-KHARTODE123/CppCodes
lab 15/template_swap.cpp
#include <iostream> using namespace std; template <class T> T swap_number(T& a,T& b){ T t; t=a; a=b; b=t; return 0; } int main(){ // demo <int>d1; int x=10; int y=60; cout<<"values before swapping "<<x<<" "<<y<<endl; swap_number(x,y); cout<<"values after swapping "<<x<<" "<<y<<endl;...
ALGO
0.999105
4.767464
af44758f-85ab-4496-a049-885747296493
sagar-karatagi/DSA-All-Problems
LeetCode/1_Two_Sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { vector<int> v = nums; int num1; int num2; sort(v.begin(),v.end()); for(int i =0,j=v.size()-1;i<j;){ if(v[i]+v[j]==target){ num1 = v[i]; num2 = v[j]; ...
ALGO
0.999896
6.156809
9a0d88af-a581-4f34-b979-d377d01fa98f
UVARocketry/SpaceportAmericaCup23-24
kalman_linear/eigen/bench/perf_monitoring/gemv.cpp
#include "gemv_common.h" EIGEN_DONT_INLINE void gemv(const Mat &A, const Vec &B, Vec &C) { C.noalias() += A * B; } int main(int argc, char **argv) { return main_gemv(argc, argv, gemv); }
ALGO
0.852912
4.484408
ea964cad-c8d4-4b2e-b858-9b5768ceb35a
suryansh-sinha/DSA-CPP
Week_3/l2_13_sortZeroOnes.cpp
#include<iostream> using namespace std; void sortZeroOne(int arr[], int size){ int zeroCount=0, oneCount=0; // Count all zeros and ones. for(int i=0; i<size; i++){ if(arr[i]==0) zeroCount++; if(arr[i]==1) oneCount++; } // Place zeros first for(int i=0; i...
ALGO
0.999005
4.584774
d603ac7e-ed77-4a96-b730-8078760c68cc
PeteMango/DMOJ
Mock CCC/mccc1j4.cpp
#include <bits/stdc++.h> using namespace std; const int MN = 1e6 + 5; long long N, sum=0, a[MN], b[MN]; string s; int main () { cin >> N >> s; // Forward int prev=-1; for(int i = 0; i < N; i++) { if(s[i] == '1') { a[i] = 0; prev = i; } else { ...
ALGO
0.999894
4.05688
1fe23a68-aaab-4013-b89e-eccfd81bfeff
deadlytoah/aoc2022
aoc2022/Models/RopeBridge.cpp
// // RopeBridge.cpp // aoc2022 // // Created by Hee Suk Shin on 2023/01/05. // #import "CppErrorCode.h" #import "RopeBridge.hpp" #include <optional> #include <sstream> #include <tuple> #include <unordered_set> #include <variant> #include <vector> std::vector<std::tuple<std::optional<std::string>, std::optional<s...
ALGO
0.931822
5.886915
14b976d8-1040-47b9-a4a9-ac62fb3aa759
gcourchinoux/llvm-gaspard
lib/CodeGen/LoopTraversal.cpp
#include "llvm/CodeGen/LoopTraversal.h" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/CodeGen/MachineFunction.h" using namespace llvm; bool LoopTraversal::isBlockDone(MachineBasicBlock *MBB) { unsigned MBBNumber = MBB->getNumber(); assert(MBBNumber < MBBInfos.size() && "Unexpected basic block number."); ...
ALGO
0.998971
7.627181
e42694aa-c52a-4dac-b2c0-b55afd265c2e
BinomialSheep/Competitive
AtcoderContest/ABC316/B.cpp
#pragma region header #include <bits/stdc++.h> // デバッグ用マクロ:https://naskya.net/post/0002/ #ifdef LOCAL #include <debug_print.hpp> #define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else #define debug(...) (static_cast<void>(0)) #endif using namespace std; using ll = long long; using vi = vector<int>...
ALGO
0.99993
5.183626
1a917376-bbd5-4a6d-9568-81aba5f11168
k032131/VINS-Pose-Correction
feature_tracker/src/nonmax_3x3.cpp
// This function is taken from libCVD. The only change is the return type which // returns the index of the maxima scores and not a new vector of scores! // Created on: Dec 18, 2012 // Author: cforster #include "fast.h" #include <vector> namespace fast { //This function has been moved from fast_corner.cxx. Look ...
ALGO
0.999674
6.694974
24f5a34b-bc26-4ff3-ac24-8b1064bfc4ae
xiapengchng/352_Leetcode
Solution/001.Two Sum/Solution1.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { map<int,int> dict; for(int i=0;i<nums.size();i++) { dict[nums[i]]=i; int cha=target-nums[i]; //cout<<i<<"res"<<cha<<"dict"<<dict[cha]<<endl; if(dict[cha]>0&&dict[cha]...
ALGO
0.999968
5.922363
2693a40e-1b66-4352-b508-c5d917a69d95
luyuechao/raytracing_in_one_weekend
src/inOneWeekend/06_diffuse_with_child_ray.cpp
#include "rtweekend.h" static constexpr int maxBounceStep = 50; static constexpr int samples_per_pixel = 10; // Count of random samples for each pixel static color ray_tracing(const ray& r, int bounce_step, const hittable& world) { // If we've exceeded the ray bounce limit, no more light is gathered. if (bo...
ALGO
0.986803
6.117791
dd430152-3d57-4ec1-838c-61ba652816cf
nuPRISM/MAX10_rev0
MAX10/tsbs/common_rtl_library/tsb/ip/rtl/fft/fft_1k/altera_fft_ii_181/sim/c_model/r22sdf/util.cpp
using namespace std; /*---------------------------------------------- | log2_int +----------------------------------------------*/ int log2_int(int arg) { int res = 0; for (int i = 0; i < 30 ; i++) { if (arg > (pow(2.0,i))) { res = i+1; } } return res; } /*---------------------------------...
ALGO
0.987086
4.352201
dd568c75-978e-4c5d-931a-68886ca0e876
ShelpAm/competitive_programming
competitest/NowCoder/unknown_contest/Bridging the Gap 2/main.cpp
// Problem: Bridging the Gap 2 // Contest: unknown_contest // Judge: NowCoder // URL: https://ac.nowcoder.com/acm/contest/81598/A // Memory Limit: 2097152 // Time Limit: 2000 // Start: Tue 23 Jul 2024 12:36:56 PM CST // Author: ShelpAm #include <bits/stdc++.h> #ifdef __cpp_lib_ranges #include <ranges> #endif using i...
ALGO
0.999975
4.607576
53440432-5ccb-447f-ab9d-d5307944d30e
huhkyun1275/boost_realize
libs/bimap/example/projection.cpp
// VC++ 8.0 warns on usage of certain Standard Library and API functions that // can be cause buffer overruns or other possible security issues if misused. // See https://web.archive.org/web/20071014014301/http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx // But the wording of the warning is mis...
TOOL
0.971372
4.729417
c0eb2b4e-764b-49db-a52e-2ae03210e801
jki14/competitive-programming
2017/facebook.com/hackercup/r1/prob.cpp
#include <algorithm> #include <cassert> #include <cstdio> #include <vector> using namespace std; const int inf = 0x3f3f3f3f; class SplayTree{ public: class SplayNode{ public: int key; int value; int score; int nsize; int sum; int maximum; int del...
ALGO
0.999707
4.205427
9ee5a50f-d1b9-4219-929c-693dcabf0e9e
MatsukSket/university
sem2/PIOIVIS/lab1/lab1.cpp
#include <iostream> #include <ctime> #include <cstdlib> int getRandom(){ return rand() % 10 + 1; } class List{ public: class Node{ public: int data; Node *next = nullptr; Node *prev = nullptr; }; Node *head = nullptr; Node *last = nullptr; // functions bool isEmpty...
TOOL
0.996479
4.452441
efb6a86f-b951-4e19-a031-a7a831890e4e
dkhonker/sysu
数据结构/数据结构实验课文件/EXP2/代码3.10/20354033/basic_a.cpp
#include <windows.h> /* This is where all the input to the window goes to */ LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { switch(Message) { /* Upon destruction, tell the main thread to stop */ case WM_DESTROY: { PostQuitMessage(0); break; } /* All other message...
ALGO
0.997543
3.294124
3d665bbf-ecee-4693-9c1d-87c62babda71
Community-Core/community-source
src/merkleblock.cpp
#include "merkleblock.h" #include "hash.h" #include "consensus/consensus.h" #include "utilstrencodings.h" CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter) { header = block.GetBlockHeader(); std::vector<bool> vMatch; std::vector<uint256> vHashes; vMatch.reserve(block.vtx.size());...
ALGO
0.997772
6.073921
012f335a-f1ff-4758-a7ef-d9861619ed69
spol-29/Codechef
ccflow016.cpp
#include<bits/stdc++.h> using namespace std; int main(){ long long t; cin >> t; while(t--){ int a,b,gcd,lcm; int MX = max(a,b); int MN = min(a,b); cin >> a >> b; for(int i = MX; i >=1; i--){ if(a%i == 0 && b%i == 0){ gcd=i; break; } } int j = MN; while(true){ if(j%a == 0 && j%b == 0)...
ALGO
0.9999
4.216882
b5a7dc07-112b-4ab9-b549-45915c546208
karinadityas/UTS-MobileLanjut
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.998762
6.786404
aadb2a3b-d6cd-4731-a612-d06727fb7884
prakharkhare999/Data-Structure-and-Algo
Tree/post-order traversal.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node* left; Node* right; Node(int data){ this->data=data; left=NULL; right=NULL; } }; Node* buildtree(){ int data; cout<<"enter the data"<<endl; cin>>data; if(data==-1){ return...
ALGO
0.999641
4.115074
337c5e2d-8ce1-4256-9cdf-8bc431bf9bcc
kapil4457/Striver-playlist
Spanning_Tree.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find sum of weights of edges of the Minimum Spanning Tree. int spanningTree(int V, vector<vector<int>> adj[]) { // code here priority_queue<pair<int,int>,vector<pa...
ALGO
0.999964
5.933062
cb1c69c4-94e2-4023-9b43-6cec2a034dd4
ActiveSky/Leetcode-Record
Linked_List/205.同构字符串.cpp
/* * @lc app=leetcode.cn id=205 lang=cpp * * [205] 同构字符串 */ #include <string> #include <unordered_map> #include <iostream> using namespace std; // @lc code=start class Solution { public: /** * transform string to number */ string chars_to_nums(string s) { unordered_map<char, int> map...
ALGO
0.999932
6.529708
d5139f74-208d-4f44-a2b2-c75ab98d2749
queid7/mmh
PyCommon/external_libraries/BaseLib/math/nr/cpp/examples/xsphfpt.cpp
// Auxiliary routine for sphfpt #include "nrtypes.h" extern int m,n; extern DP c2,dx,gmma; void derivs(DP x,DP y[],DP dydx[]) { dydx[0]=y[1]; dydx[1]=(2.0*x*(m+1.0)*y[1]-(y[2]-c2*x*x)*y[0])/(1.0-x*x); dydx[2]=0.0; }
ALGO
0.99978
4.115325
ad7d5d41-b07b-4093-9910-7c68a6f14201
Paras7527/Logic_Building
program212.cpp
#include<iostream> using namespace std; bool CheckBit(int iNo) { int iMask=0x200; int iResult=0; iResult=iNo & iMask; if(iResult == iMask) { return true; } else { return false; } } int main() { int iValue = 0; bool bRet = false; cout<<"Enter number...
ALGO
0.987593
5.551041
9508d031-c908-459b-98df-de79c8f2ccd8
pvy-it-tdh/LeThachPhucVy_Cpp
Chapter3/challenge13.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { // Constants for conversion rates const double YEN_PER_DOLLAR = 98.93; const double EUROS_PER_DOLLAR = 0.74; // Variables to store the dollar amount and the converted amounts double dollars, yen, euros; // Ask the user to...
TOOL
0.909595
7.13985
d7cf97e0-9328-425f-9d83-e6c642b9625a
y-ume/ProgrammingContest
OnlineJudges/Atcoder/CodeFestival_2016_qual_B/e.cpp
// #include {{{ #include <iostream> #include <cassert> #include <cstring> #include <cstdlib> #include <cstdio> #include <cctype> #include <cmath> #include <ctime> #include <queue> #include <set> #include <map> #include <stack> #include <string> #include <bitset> #include <vector> #include <complex> #include <algorithm>...
ALGO
0.999879
4.113717
42b3c2ce-fd83-43ad-8195-47a5b9078d6d
SLIIT-FacultyOfComputing/tutorial-03b-it21369506
exercise03.cpp
#include <iostream> using namespace std; int volume(int height, int width, int length); // 1. Define a structure called Box // have the integer data types Height, Width, Length struct Box { int Height; int Width; int Length; }; // Do not change the main function int main() { // 2. Create a variable ...
TOOL
0.951987
4.279901
c8084899-8c88-4e9e-9a2b-d7bfd74c6576
jove-decompiler/llvm-project
libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2, // weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity, // class Proj2 = identity> // requires mergeable<I1, I2, O, Comp, Proj...
TEST
0.997276
7.466825
1ff41bc3-3d0b-45c3-9299-784a6b23eaee
REMath/implementations
xgil/backend/backend_block.cpp
#include "backend_block.h" #include "backend_xdb.h" #include <imlang/storage.h> #include <memory/mstorage.h> #include <memory/serial.h> #include <util/monitor.h> #include <unistd.h> NAMESPACE_XGILL_BEGIN // file to read/write worklist information. #define WORKLIST_FILE "worklist.sort" // number of stages to use when...
TOOL
0.882225
4.365083
f5637494-9ece-4bec-be4b-a30f96bc0cd9
thegamer1907/Code_Analysis
CodesNew/611.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 500203 #define ll long long int n, m; set<string> Set; string S; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cin >> n >> m; for(int i=0; i<n; i++){ cin >> S; Set.insert(S); } int k = 0; for(int i=0...
ALGO
0.999983
4.254148
218eb562-6b3e-4d3b-98ba-7d60c77d0aaf
morris821028/UVa
OnlineJudge/ZEROJUDGE/a817. 1.圈叉連線數問題.cpp
#include <bits/stdc++.h> using namespace std; int n, g[16][16] = {}; const int dx[] = {0, 1, 1, 1}; const int dy[] = {1, 0, 1, -1}; int test(int x, int y, int k) { char c = g[x][y]; int cnt = 0; while (x >= 0 && x < n && y >= 0 && y < n) { if (g[x][y] != c) return 0; cnt++; x += dx[k], y += dy[k]; } retu...
ALGO
0.999831
4.02768
c4dadc1b-1008-423f-8b27-531f500be434
NUS-HcRL/cloth_opt
deps/eigen/bench/perf_monitoring/trmv_lo.cpp
#include "gemv_common.h" EIGEN_DONT_INLINE void trmv(const Mat &A, const Vec &B, Vec &C) { C.noalias() += A.triangularView<Lower>() * B; } int main(int argc, char **argv) { return main_gemv(argc, argv, trmv); }
ALGO
0.977933
4.982642
a3e86102-0bfa-4504-8e15-26a8baebbcc1
Kwasniok/cpp-raytracing
src/examples/basic_minkowski.cpp
/** * @file * @brief basic example executable of 3D Euclidean space embedded in 4D. * @note The 4th dimension affects the size of the hyperspheres and is called * `time`. * @note This example is for testing and debugging. */ #include <algorithm> #include <argparse/argparse.hpp> #include <iostream> #include...
TOOL
0.946039
6.952947
9e5518ae-f14f-4f84-81b3-68b999dd3f58
rhg/krita
libs/global/kis_algebra_2d.cpp
#include "kis_algebra_2d.h" #include <QTransform> #include <QPainterPath> #include <kis_debug.h> #include <boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics/stats.hpp> #include <boost/accumulators/statistics/min.hpp> #include <boost/accumulators/statistics/max.hpp> #include <array> #includ...
ALGO
0.997237
7.288375
a56db724-0f37-49b6-ae94-ecf269c959e2
aplqo/exercises
others/2020.10.24-Exam/D-Lcm.cpp
#ifdef APTEST #include "debug_tools/program.h" #endif #include <algorithm> #include <iostream> #include <numeric> using namespace std; constexpr unsigned long long mod = 998244353; class Number { public: Number() = default; Number(const unsigned long long v) : val(v % mod){}; friend inline Number operator*(cons...
ALGO
0.999843
5.404676
9b119a16-bd56-4aff-8a6c-ef7aabfd970d
sarvex/leetcode-simula
solution/2100-2199/2157.Groups of Strings/Solution.cpp
class Solution { public: int mx, n; vector<int> groupStrings(vector<string>& words) { unordered_map<int, int> p; unordered_map<int, int> size; mx = 0; n = words.size(); for (auto& word : words) { int x = 0; for (auto& c : word) x |= 1 << (c - 'a')...
ALGO
0.999908
5.838264
4c07fb32-1b82-4fd7-8a23-5dc78d2b310e
jena-33/labs-jert
LAB_1.5.cpp
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Ru"); int n; cout << "Введите число\n"; cin >> n; if (n < 0) cout << "Отрицательное"; if (n > 0) cout << "Положительное"; else cout << "Ноль"; return 0; }
ALGO
0.998096
3.366516
0e7ef1fd-90e5-4a15-86b2-36b08acce50c
MasterIceZ/TOI17_Practice
Speed_DP/Longest.cpp
/* * AUTHOR : Hydrolyzed~ * SCHOOL : RYW * TASK : Longest * ALGO : Dynamic Programming * DATE : 17 July 2021 * */ #include<bits/stdc++.h> using namespace std; #define endl "\n" #define all(x) (x).begin(), (x).end() using ll = long long; char a[1010][1010]; int l[1010][1010], r[1010][1010], u[1010][1010], d[...
ALGO
0.999856
4.500939
43be3b6a-b60e-4547-83db-366eb0c952f4
rjk51/pocket_money
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
730153ec-fcf9-445a-aa58-249efb8da7cd
saarang123/Competitive-Programming
codeforces/1199E.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; // ----------------------------------------Defines and Template-------------------------------------// //#define int long long #define ll long long #define double long ...
ALGO
0.999702
4.019351
7e078d96-e76b-41f8-ba09-26e74eef6eb2
gexiannan2/HttpProxyServer
include/boost/libs/spirit/example/x3/calc/calc9/compiler.cpp
#include "compiler.hpp" #include "vm.hpp" #include <boost/variant/apply_visitor.hpp> #include <boost/assert.hpp> #include <iostream> #include <set> #include <iostream> namespace client { namespace code_gen { void program::op(int a) { code.push_back(a); } void program::op(int a, int b) { ...
TOOL
0.880296
5.926121
1f9078f4-45a3-467c-ba80-c3e30c155d5b
maruthi718/LEETCODE-SUBMISSIONS
2211-count-collisions-on-a-road/2211-count-collisions-on-a-road.cpp
class Solution { public: int countCollisions(string dir) { int count = 0; int i = 0, j = dir.length()-1; while(i < dir.length() and dir[i] == 'L') i++; while(j >= 0 and dir[j] == 'R') j--; while(i <= j) { if(dir[i]!='S') co...
ALGO
0.999893
5.351477
b8de371f-fdba-4e56-9e5f-733091448d31
quethaibinh/code_ptit_DSA
DSA05043.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long const int MOD = 1e9 + 7; int main(){ #ifndef ONLINE_JUDGE freopen("nhap.txt", "r", stdin); freopen("xuat.txt", "w", stdout); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin >> ...
ALGO
0.999851
4.011065
4d11555c-5198-4442-8c52-49cbe5375bcf
rutikeyone/index-rand-library
IndexRandLibrary/IndexRand.cpp
#include "IndexRand.h" #include <iostream> #include "pch.h" namespace IndexRandLibrary { double IndexRand::GetIndexRand(std::vector<int> clusters, std::vector<int> classes) { double IndexRand = 0; int tp_plus_fp = Sum(Comb(Bincount(clusters), 2)); int tp_plus_fn = Sum(Comb(Bincount(classes...
ALGO
0.997995
5.488414
6e65606a-d0b1-412c-87f2-5cb7ad7052b4
unclejimbo/yet-another-ray-tracer
src/material/metal.cpp
#include <yart/material/metal.h> #include <algorithm> #include "../util/rayhit.h" namespace yart { Metal::Metal(const Eigen::Array3f& albedo, float roughness) : albedo(albedo) { this->roughness = std::clamp(roughness, 0.0f, 1.0f); } Metal::Metal(float r, float g, float b, float roughness) : albedo(r, g, b) { ...
ALGO
0.919883
6.615445
894eee51-1674-4ee6-913a-37612bc10547
zhou-jk/code
Codeforces/CF1890 Codeforces Round 906 (Div. 2)/B/B.cpp
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; const int N=55; int n,m; char s[N],t[N]; void solve() { cin>>n>>m; for(int i=1;i<=n;i++) cin>>s[i]; for(int i=1;i<=m;i++) cin>>t[i]; bool flag=true; for(int i=1;i<m;i++) if(t[i]==t[i+1]) { ...
ALGO
0.999985
3.920157
f689c3e5-8907-47ef-92c9-56d14ebc4bdc
PlasmaControl/FreeMHD
OpenFOAM-v2206/ThirdParty/sources/boost/boost_1_74_0/libs/compute/perf/perf_stl_prev_permutation.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0); } int main(int argc, char *argv[]) { perf_parse_args(argc, argv); std::cout << "size: " << PERF_N << std::endl; // create ve...
ALGO
0.988614
5.424448
171e8012-0c89-4f5b-8bcc-02bf9baa73e0
nayemhasan45/Phitron
BasicDS/week 1/module 3/Y_Range_sum_query.cpp
#include<bits/stdc++.h> using namespace std; int main (){ long long n,q; cin>>n>>q; long long arr[n]; for (int i = 0; i < n; i++) { cin>>arr[i]; } long long presum[n]; presum[0]=arr[0]; for (int i = 1; i < n; i++) { presum[i]=arr[i]+presum[i-1]; } w...
ALGO
0.999855
4.200737
c9f99184-b21e-41ed-b30c-03cab7343245
Real-Man-Club/Baekjoon
devappmin/16236.아기 상어.cpp
/** * @file 16236.아기 상어.cpp * @author @devappmin * @brief 아기 상어(골드4) * @version 0.1 * @date 2022-02-09 * * @copyright Copyright (c) 2022 @devappmin * */ #include <bits/stdc++.h> #include <iostream> using namespace std; #define MAX 22 int world[MAX][MAX]; int visited[MAX][MAX]; int n; int lvl = 2; int sexp...
ALGO
0.999874
4.770722
0453ee48-bd0c-476e-8eea-332b46f95e00
gutingyue/C-Test
Test-函数模板/Test-函数模板/test2.cpp
#include <iostream> using namespace std; template <class T> T Add(T left, T right){ cout << "ģɺAdd: "; cout << (left + right) << endl; return left + right; } template <class T1,class T2> T1 Add(T1 left, T2 right){ return left + right; } int Add(int left, int right){ cout << "ȫֺAdd" << endl; return left + righ...
ALGO
0.971624
5.553833
6e962ad3-2c44-476d-85ad-5aed404394b0
gvsrgh/Advanced-Data-Structures-lab-programs
07 Graphs/01 Dijkstras Algorithm.cpp
#include <iostream> #include <climits> #include <vector> using namespace std; // Function to find the vertex with minimum distance value int minDistance(int dist[], bool visited[], int V) { int min = INT_MAX, min_index; for (int v = 0; v < V; v++) if (!visited[v] && dist[v] <= min) min = ...
ALGO
0.999985
6.838899
8be8ccef-2af0-4e28-b7b2-0e1498dbc1d0
Akrobatik/ps
BaekJoon/03000/3640.cpp
// Title : 제독 // Link : https://www.acmicpc.net/problem/3640 // Time : 12 ms // Memory: 2820 KB #include <bits/stdc++.h> using namespace std; struct MCMF { public: using Cap = int; using Cost = int; using Edge = tuple<int, int, Cap, Cost>; MCMF(int _n) : n(_n), edges(_n), dual(_n), dist(_n), pv(_n), pe(...
ALGO
0.999971
5.247402
1daa5d21-67c6-4d5e-84e2-d5759e1fc52f
prosanes/architecture-simulator
Arquitetura/ULA.cpp
/** * Faltam uns sinais de controle! */ #include "ULA.h" #include <stdio.h> void ULA::sinais_controle(bool s, bool t, bool u, bool v, bool x) { sinais[0] = x; sinais[1] = v; sinais[2] = u; sinais[3] = t; sinais[4] = s; } int ULA::operacao(int a, int b) { //00000 if (sinais[0] == false &...
ALGO
0.995355
3.641233
b9726478-3adb-4424-86f6-0373fff226a1
FermiQ/negfy2
HartreeFock/sap.cpp
#include "sap.h" #include "elements.h" SAP::SAP() { // Allocate memory atoms.resize(sizeof(element_symbols)/sizeof(element_symbols[0])); // Location to get the files from std::string loc; char * libloc=getenv("ERKALE_SAP_LIBRARY"); if(libloc!=NULL) { loc=libloc; } // Read atoms for(size_t Z=1;Z...
TOOL
0.969322
4.556839
f729bccc-12a7-41b4-be5e-2686a17c7158
my0614/c-cpp
leap_year.cpp
#include <stdio.h> #include <stdlib.h> int Year(int n) { if (n == 0) return 1; if (n < 4) return 0; if (n >= 400 && n % 400 == 0) return 1; if (n >= 100) { if (n % 100 != 0 && n % 4 == 0) return 1; } else { if (n % 4 == 0) r...
ALGO
0.999957
4.110699
7951cd81-2f20-4eff-8421-68c1be0c439e
AMIRREZAYV/AP_1402_2
AP_1402_2_1/AP_1402_2_1_b/AP_1402_2_2.cpp
#include <iostream> using namespace std; int MajmoArgham(int num) { int sum = 0; while (num > 0) { sum += num % 10; num /= 10; } return sum; } int main() { int num1, num2, num3; cout << " 3 Adad Vared Konid: " << endl; cin >> num1 >> num2 >> num3; for (int i = num1...
ALGO
0.999876
4.291898
7d8527ba-b828-499e-a0cc-fe015a6ce263
pshemeko/SzkolenieSages
Chess2/decl/main.cpp
#include <iostream> template<typename T1, typename T2> auto max(T1 a, T2 b) -> decltype(a + b) { return a < b ? b: a; } int main() { auto z = 12; decltype(z) a; std::cout << max(11.3, 12UL) << '\n'; }
ALGO
0.975573
4.261906
68c28b07-585c-45db-ae72-ff69d137097c
VaporumCoin/VaporumCoin-daemon
src/rest.cpp
#include "primitives/block.h" #include "primitives/transaction.h" #include "main.h" #include "httpserver.h" #include "rpc/server.h" #include "streams.h" #include "sync.h" #include "txmempool.h" #include "utilstrencodings.h" #include "version.h" #include <boost/algorithm/string.hpp> #include <boost/dynamic_bitset.hpp> ...
WEB
0.909865
5.170199
93ee0a14-e1db-43e1-aeed-50223224cff5
NextToBeThe1st/CodeSketch
Programmers/서버 증설 횟수/soyoung_.cpp
#include <string> #include <vector> #include <queue> #include <iostream> using namespace std; // ð뿡 ̿ϴ m // m ̸̶ ʿX // ϳ kð ϰ, Ŀ ݳ // players ̴ 24 int solution(vector<int> players, int m, int k) { int answer = 0; queue<pair<int, int>> q; for (int i = 0; i < 24; ++i) { while (q.size() >...
ALGO
0.999921
4.641772
683f5322-6090-427f-acc8-a1f1b9bab5da
gdscp/first_lecture-STL-quick_start
template.cpp
//Bering Tafa //simple template to get you starting cp #include <climits> #include <fstream> #include <iomanip> #include <iostream> #include <cstring> #include <cmath> #include <string> #include <sys/types.h> #include <type_traits> #include <vector> #include <algorithm> #include <stack> #include <queue> #include <set> ...
ALGO
0.985732
3.323572
26e605ef-794d-4444-be69-0fcc2035179f
kosekitau/atcorder
aaa/163-d.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <math.h> #include <vector> #include <queue> #include <functional> #include <map> #include <set> using namespace std; using ll = long long; using Graph = vector<vector<int> >; using P = pair<int, int>; #define INF 1000000001 #define M...
ALGO
0.999931
3.768395
7957d03b-ffaa-41ff-81f4-c3ec63bd4bdb
tanzir5/CompetitiveProgramming
LibraryFinal/DU_Neuromancer/String/trie_static.cpp
///Time_Efficient // Static TrieTree // AS => Alphabet Size #define MAXNODE 1000000 #define AS 26 #define scale(x) (x-'a') int nxt[MAXNODE+2][AS+2]; int ep[MAXNODE+2]; struct TrieTree{ int idx, rt; TrieTree() { rt = idx = 0; memset(nxt[rt], -1, sizeof(nxt[rt])); m...
ALGO
0.999934
4.436418
f1a787f3-fe47-4081-9678-daa31044ca4a
mycliu10/cs-ds-practices
UCSD/AlgorithmToolbox/week5_dynamic_programming1/1_money_change_again/change_dp.cpp
#include <iostream> #include <vector> using std::vector; int get_change(int m) { //write your code here int maxsize = 5; if(m>maxsize) { maxsize = m+1; } vector<int> results(maxsize, 0); results[0] = 0; results[1] = 1; results[2] = 2; results[3] = 1; results[4] = 1; for(int i=5; i<=m; ++...
ALGO
0.999969
5.23298
bfcf80c7-cf28-4f56-acab-2ab062c15f75
RifatNurShafin/becrowd-100
test.cpp
#include<bits/stdc++.h> using namespace std; int main() { string s,s1,s2; cin>>s>>s1>>s2; if(s=="vertebrado") { if(s1=="ave") { if(s2=="carnivoro") printf("aguia\n") ; else printf("pomba\n"); } else { ...
ALGO
0.998245
4.422444
8b19e77d-b344-41ec-a03a-c2227bda90bf
JACoders/OpenJK
code/game/AI_Utils.cpp
// These utilities are meant for strictly non-player, non-team NPCs. // These functions are in their own file because they are only intended // for use with NPCs who's logic has been overriden from the original // AI code, and who's code resides in files with the AI_ prefix. #include "b_local.h" #include "g_nav.h" #in...
TOOL
0.947636
3.183337
d1779fa5-86dd-4585-b1a4-a2e6fc55719f
Radi03825/FMI
Introduction to programming/Recursion/findMaxAndMin.cpp
#include <iostream> using namespace std; double findMax(double* arr, int size) { if (size == 1) { return *arr; } double max = findMax(arr + 1, size - 1); return (*arr > max) ? *arr : max; } double findMin(double* arr, int size) { if (size == 1) { return *arr; } double mi...
ALGO
0.999936
4.866969
f0db7489-a77a-461e-834a-1b62ecd7ea49
obregonia1/at_coder
typical90/078/main.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) int main() { int n, m; cin >> n >> m; map<int, vector<int>> g; rep(i, 0, m) { int a, b; cin >> a >> b; g[a].push_back(b); g[b].push_back(a); } int result = 0; rep(i, 0, m + 1) { int cou...
ALGO
0.999745
3.963867
06279b56-17e5-48de-8899-cf4a358bafd4
PedroAngeli/Competitive-Programming
Solutions/Codeforces/Contests/Codeforces Round #595 (Div. 3)/d2.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 2*1e5 + 5; int main(){ int n,k; cin >> n >> k; vector <pair <int,int> > seg[MAXN]; vector <int> ans; for(int i=0;i<n;i++){ int l,r; cin >> l >> r; seg[l].push_back(make_pair(r,i)); } set <pair <int,int> > conj; for(int...
ALGO
0.999992
3.636044
4d91e7ce-8b3d-4c22-a2d7-090fe83a03c1
lokeshdhayal/Competetive-Programming
Lokesh/con_sub.cpp
#include<iostream> #include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define MAX 1000000 #define nl "\n" ll p,q,n,minimum,max1,temp,x,t,m,k,count1,result; int a[MAX]; void find_p(int i,int sum){ if(sum % k == 0){ result++; } if(i > n){ return; }...
ALGO
0.999688
3.681662
83e8b363-8e20-47b0-b972-c73f508b96c0
Venum693/Stipe_flutter_projects
flutter_rr_c_audiorecorder/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.998318
6.76073
027c1f19-e621-4a3c-bc70-d8e6c66fe5f1
KUNALLATTA29/24-8-24_cpp_test
prog_5.cpp
#include<bits/stdc++.h> using namespace std; int main(){ vector<int> arr; for(int i=0;i<10;i++){ int k; cin>>k; arr.push_back(k); } map<int,int> map1; for(auto it:arr){ map1[it]++; } int maxi=0; int ele=0; for(auto it:map1){ if(it.second>...
ALGO
0.999855
3.712857
29c2f51a-7fbc-430d-acbb-110ab820177c
hackybacky/my-leet
718-maximum-length-of-repeated-subarray/718-maximum-length-of-repeated-subarray.cpp
class Solution { public: int n , m; int ans = 0; int dp[1001][1001]; int recur(int i , int j , vector<int>&nums1 , vector<int>&nums2){ if(i == n or j == m){ return 0; } if(dp[i][j] != -1)return dp[i][j]; recur( i + 1 , j , nums1 , nums2),recur(i , j +...
ALGO
0.999995
5.936505