uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
ed5c50c9-0d0b-4de8-ac1d-9201be607bdd
ranadheer450/PracCoding
Programs/missingNumber.cpp
#include<stdio.h> #include<time.h> #include<iostream> #include<list> #include<iterator> #define SIZE 10 using namespace std; int findproduct(int a) { int pro = 0; for (int i = 0; i < a; i++) { pro += i; } return pro; } int main() { int a[] = { 9,6,4,2,3,5,7,0,1 }; int size,sum; size = sizeof(a) / sizeof(a[0]...
ALGO
0.999605
3.283665
af433a48-6f33-48f1-ab04-a362ed7f2375
Araksya-Hambaryan/ITC-9
Elya_Karapetyan/Homeworks/C++/5_02_04/simpleDividers.cpp
#include <iostream> bool isPrime (int number) { for (int i = 2; i <= number / 2; ++i) { if (0 == number % i) { return false; } } return true; } void primeDivisors(int number) { std::cout << "Prime divisors of " << number << " are: "; for (int i = 2; i <= number; ++i) {...
ALGO
0.998078
5.070628
5f2f3213-d6cb-43aa-b6fa-ebd7c18553c1
zan8161/ITSA
ITSA/AR22_Codec.cpp
#include <iostream> #include <string> using namespace std; int main() { string input; while (cin >> input) { string::iterator ptr = input.begin(); while (ptr != input.end()) { *ptr -= 3; ptr++; } cout << input << endl; } }
ALGO
0.999696
4.406007
d58dcb48-59c6-4419-b72d-118ff1e63364
shafinkun/Academic
Data Structure/SelectionSort.cpp
// Implementing Selection Sort Algorithm #include <iostream> #include <vector> using namespace std; void selectionSort(vector<int> &arr) { int n = arr.size(); for (int i = 0; i < n - 1; i++) { // Find the minimum element in unsorted array int minIndex = i; for (int j = i + 1; j < n...
ALGO
0.999981
5.969042
ce68ec98-4686-4787-81ed-31d10c6b0410
Anshuman261104/Leetcode
0867-transpose-matrix/0867-transpose-matrix.cpp
class Solution { public: vector<vector<int>> transpose(vector<vector<int>>& matrix) { vector<vector<int>> res(matrix[0].size(), vector<int>(matrix.size(), 0)); for (size_t r = 0; r < matrix.size(); r++) { for (size_t c = 0; c < matrix[0].size(); c++) { res[c][r] = matrix...
ALGO
0.999985
6.408694
fe134c2b-0d81-4964-aded-3ff26d7d4aec
jassellmedina09/CSC211
Labs/Lab9/program4 (1).cpp
#include <iostream> #include <string> using namespace std; void binary_strings(string in, int len) { if (len == 0){ cout << in << endl; return; } binary_strings(in + "0", len-1); binary_strings(in + "1", len-1); } int main() { int x; cout << "length of strings: "; cin >> x; c...
ALGO
0.999834
5.089396
62c9faf2-35a4-4152-8d8b-ba2296c0fae5
hrithik86/algorithm
segmentTree-3.cpp
//Segment Tree //Lazy Propagation in Segment Tree #include <bits/stdc++.h> using namespace std; void buildTree(int *arr,int*tree,int start,int end,int treeIndex){ if(start==end){ tree[treeIndex]=arr[start]; return; } int mid=(start+end)/2; buildTree(arr,tree,start,mid,2*treeIndex);...
ALGO
0.999904
4.511695
b421905f-b531-4e9d-8369-5e2c7cb8fd47
chenggoi/ProgrammingStudy
ACM/TOJ/1833.cpp
#include<iostream> using namespace std; int main() { string a; while(getline(cin, a) && a != "ENDOFINPUT") { if(a == "END") { continue; } string b; string x, y; x = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; y = "VWXYZABCDEFGHIJKLMNOPQRSTU"; g...
ALGO
0.999809
3.859045
c3e2dbfb-38a7-4059-88b5-676f1df77870
MijaTola/Codeforce
1141F2.cpp
#include <bits/stdc++.h> using namespace std; int n; int v[1510]; vector<pair<int,int> > b; map<long long, vector<pair<int,int> > > mp; int main() { cin >> n; for (int i = 0; i < n; ++i) cin >> v[i]; for (int i = 0; i < n; ++i) { long long cur = 0; for (int j = i; j >= 0; j--) ...
ALGO
0.999925
3.334217
c91b6766-0c46-4895-8e86-395561fa4e99
Yaohui1996/ASimpleNNCMake
include/eigen-3.3.8/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_broadcast_simple_rowwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); Eigen::VectorXf v(4); mat << 1, 2, 6, 9, 3, 1, 7, 2; v << 0,1,2,3; //add v to each row of m mat.rowwise() += v.transpose(); std::cout << "Broadcasting result: " << std::...
ALGO
0.998355
4.296038
9c80c006-e22b-43c6-bdba-a34a7aa5471b
arash-ha/Cpp
Course Schedule II.cpp
/* Course Schedule II There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [ai, bi] indicates that you must take course bi first if you want to take course ai. For example, the pair [0, 1], indicates that to take cours...
ALGO
0.999999
6.719961
8d339c8b-be95-4d6b-b48b-411e1dc562ca
anaypaul/LeetCode
AddTwoNumbers.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) { int carry = 0; int num = 0; ListNode *answer = new Lis...
ALGO
0.999949
6.221071
4e0d126f-9488-489b-aa90-ef1a83a4d868
orangain/opencv
modules/core/src/pca.cpp
#include "precomp.hpp" /****************************************************************************************\ * PCA * \****************************************************************************************/ namespace cv { PCA::P...
ALGO
0.998769
6.824454
74ae27a1-1269-4feb-9bd2-45006753223d
FarahNawar/Algorithm
StandardTemplateLibrary(STL)/printing with iterator.cpp
#include<iostream> #include<vector> using namespace std; int main() { vector <int> vec(5); for(int i=0;i<5;i++) vec[i]=i; cout<<"printing without iterator "<<endl; for(int i=0;i<vec.size();i++) cout<<vec[i]<<" "; cout<<"\nprinting with iterator "<<endl; vector <int> :: iterator...
TOOL
0.971058
3.490592
77966e75-2280-4e09-af18-69daaa754831
sarvex/leetcode-prolog
solution/2600-2699/2642.Design Graph With Shortest Path Calculator/Solution.cpp
class Graph { public: Graph(int n, vector<vector<int>>& edges) { this->n = n; g = vector<vector<int>>(n, vector<int>(n, inf)); for (auto& e : edges) { int f = e[0], t = e[1], c = e[2]; g[f][t] = c; } } void addEdge(vector<int> edge) { int ...
ALGO
0.999943
5.789479
549b7883-7aa3-458e-bbd7-3dbc26148299
anubhvshrma18/Leetcode-Daily-Challenges
October 2024/Day 24. Flip Equivalent Binary Trees.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.999992
6.786998
01daff60-ec50-4ac1-8f8c-243d9a38ebff
Alfaz-Ahmad/c_Languaage
[H]cutting_paper_squares.cpp
#include <assert.h> #include <ctype.h> #include <limits.h> #include <math.h> #include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> char* readline(); char* ltrim(char*); char* rtrim(char*); char** split_string(char*); int parse_int(char*); /* * Comple...
ALGO
0.999864
3.499287
c9b5d1c2-8d76-4cc6-951d-d3dfc2187108
saumyap48/leetcode
0046-permutations/0046-permutations.cpp
class Solution{ public: void permu(vector<int>& nums, vector<vector<int>>& ans, vector<int>&temp,vector<bool>&visited){ if (visited.size() == temp.size()) { ans.push_back(temp); return; } for (int i =0; i < visited.size(); i++) { if(visited[i]==0){ visited[i]=1; te...
ALGO
0.999995
6.344451
80a7020a-8258-49af-aa6e-f9ca04557b39
SharafatKarim/pstu-cse-academic
semester 3/cit (dsa)/chapter 4/codes/matrix_multiplication.cpp
#include <iostream> using namespace std; int** createMatrix(int row, int column) { int **matrix = new int*[row]; for (int i=0; i < row; i++) { matrix[i] = new int[column]; } return matrix; } void printMatrix(int **matrix, int row, int column) { for (int i=0; i < row; i++) { for (in...
ALGO
0.999932
4.992319
675bac38-966d-4531-8130-d670946bd87e
MANISHBMK10/Cplusplus
finding_relatives.cpp
#include<iostream> #include<sstream> #include<fstream> #include<vector> using namespace std; // checks if people are related! void first_last(vector<string> names){ int count = 0; vector<string> Firstname, Lastname; for(const auto& Fullname : names){ string first, last; istringstream ss(Fullname); ss >> first >> l...
ALGO
0.990758
5.329815
169e46c5-e7b7-44f1-b3e7-b30bae849435
Binsal/Leetcode
0117-populating-next-right-pointers-in-each-node-ii/0117-populating-next-right-pointers-in-each-node-ii.cpp
/* // Definition for a Node. class Node { public: int val; Node* left; Node* right; Node* next; Node() : val(0), left(NULL), right(NULL), next(NULL) {} Node(int _val) : val(_val), left(NULL), right(NULL), next(NULL) {} Node(int _val, Node* _left, Node* _right, Node* _next) : val(_...
ALGO
0.999865
5.663171
fc8537f1-0dd6-499a-bc59-f1397acf9619
abhishekxix/Programs
cpp_course/multiplication-table.cpp
#include <iostream> #include <cstdlib> using namespace std; int main() { system ("clear"); for(int num1 {1}; num1 <= 10; num1++) { for(int num2 {1}; num2 <= 10; num2++) { cout << num1 << " * " << num2 << " = " << (num1 * num2) << endl; } cout << "\n--------...
ALGO
0.96452
3.900769
1a220090-e049-46b8-904b-ba194984f27f
MingzhenY/code-warehouse
CodingWebsites/URAL/Volume4/1316#2.cpp
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> #define inf 0x5fffffff #define FOR(i,n) for(long long (i)=1;(i)<=(n);(i)++) #define For(i,n) for(long long (i)=0;(i)<(n);(i)++) #define out(i) <<#i<<"="<<(i)<<" " #define OUT1(a1) cout out(a1) <<endl #define OUT2(a1,a2) co...
ALGO
0.997197
3.197608
c4bc6f0e-8827-4a9f-a06e-379c962824d9
longqt321/Math_for_CS
convex_hull/main.cpp
#include <iostream> #include <math.h> #include <algorithm> #include <functional> #include <random> using namespace std; const double eps = 1e-6; struct point{ double x,y; point(double x=0,double y=0) : x(x),y(y){} bool operator==(const point& o){ return fabs(x - o.x) <= eps && fabs(y-o.y) <= eps; ...
ALGO
0.999986
4.178624
b823a8ad-1559-4806-a227-e90e6e36ba60
c5xheavy/dog_story
tests/collision-detector-tests.cpp
#define _USE_MATH_DEFINES #include <cmath> #include <functional> #include <sstream> #include <catch2/catch_test_macros.hpp> #include <catch2/matchers/catch_matchers_templated.hpp> #include <catch2/matchers/catch_matchers_floating_point.hpp> #include "../src/collision_detector.h" namespace Catch { template<> struct ...
TEST
0.927463
7.041751
04f1edfd-a01e-4697-9960-b7bc66a17365
ArnabBir/codechef-solutions
TWTCLOSE.cpp
#include<iostream> #include<cstring> #include<cstdio> using namespace std; int main(){ int K,N,i,counter = 0; char inp[10], num; cin>>N>>K; bool open[N]; getchar(); for(int i=0; i<=N ;++i) open[i] = false; while(K--){ counter = 0; cin>>inp; if (!strcmp(inp,"CLOSEALL")){ for(int i=0; i<=...
ALGO
0.995539
3.724228
fb4634b4-29f0-4465-a145-65bb06b9c7a9
LuckyCoinProj/luckycoinV4
src/crypto/aes.cpp
#include "aes.h" #include "crypto/common.h" #include <assert.h> #include <string.h> extern "C" { #include "crypto/ctaes/ctaes.c" } AES128Encrypt::AES128Encrypt(const unsigned char key[16]) { AES128_init(&ctx, key); } AES128Encrypt::~AES128Encrypt() { memset(&ctx, 0, sizeof(ctx)); } void AES128Encrypt::Encr...
TOOL
0.957431
7.64474
6014b7c8-31ec-490e-b530-6dc5b29ced8f
moai/moai-dev
src/zl-vfs/ZLVfsFileSystem.cpp
#include "pch.h" #include <moai_config.h> #ifdef NACL #include "NaClFile.h" #endif #include <zl-vfs/zl_util.h> #include <zl-vfs/ZLVfsFileSystem.h> #include <zl-vfs/ZLVfsVirtualPath.h> #ifdef _WIN32 #include <direct.h> #include <io.h> #else #include <sys/types.h> #include <dirent.h> #include <unistd.h> #endif #i...
TOOL
0.906603
5.797219
e0d8c738-af41-42f4-a658-1a318eb5e65f
nikhiljha625/Cp_All_questions
E_1_Rudolf_and_Snowflakes_simple_version.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #pragma GCC optimize("Ofast") #define ll long long #define pb push_back #define all(v) v.begin(),v.end() #define ff first #define ss second #define pyes cout << "YES" << "\n" #define p...
ALGO
0.999503
4.273327
e9011550-ffed-4582-95e2-da9f23c3de3d
iRobot42/Geeks-for-Geeks
Basic/Prime Palindrome Sum.cpp
long long getPPS( int a, int b ) { bitset< 100000 > sieve; sieve.set(); for ( int i{ 2 }, r{ sqrt( b )}; i <= r; ++i ) if ( sieve.test( i )) for ( int m{ i * i }; m <= b; m += i ) sieve.reset( m ); long long sum{}; for ( a == 1 ? ++a : a; a <= b; ++a ) if ...
ALGO
0.993955
4.898308
e334b81d-a874-4045-b588-eec4049b4d45
nakusyat/django_test
public/giza/GIZA++-v2/transpair_model5.cpp
#include "transpair_model5.h" #include "Parameter.h" int m5scorefound=0,m5scorenotfound=0; GLOBAL_PARAMETER(float,d5modelsmooth_factor,"model5SmoothFactor","smooting parameter for distortion probabilities in Model 5 (linear interpolation with constant)",PARLEV_SMOOTH,0.1); float d5modelsmooth_countoffset=0.0; LogPro...
ALGO
0.99929
5.435946
264d76d6-7753-407a-a78d-5bb75ad11378
Fossam40/CSES-Solutions
SortingProblems/maximumsubarr2.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,int> pi; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int n, a, b; cin >> n >> a >> b; set<pi> s; queue<pi> q; int arr[n]; ll sum_end = 0; ll sum_beg = 0; ll m = -1e18; for(int ...
ALGO
0.999744
3.952277
5c066ceb-3b9a-43cf-9879-14556688a196
riteshsaini01/C-CPP
C++/Array.cpp
#include<iostream> using namespace std; int main() { int marks[4]={23,45,56,89}; int mathmarks[4]; mathmarks[0]=334; mathmarks[1]=34; mathmarks[2]=33; mathmarks[3]=43; cout<<"These are maths marks"<<endl; cout<<mathmarks[0]<<endl; cout<<mathmarks[1]<<endl; cout<<mathmarks[2]<<e...
ALGO
0.994763
3.061905
6e1b7df1-e938-4487-b808-7c5b589d8b60
WPorter94/Sorting-Algs
TestAllSorts.cpp
#include <iostream> #include <iterator> #include <vector> #include "Random.h" #include "Selection_Sort.h" #include "Bubble_Sort.h" #include "Insertion_Sort.h" #include "Shell_Sort.h" #include "Merge_Sort.h" #include "Heap_Sort.h" #include "Quick_Sort.h" int testSorts(int[], int[], int, int); using namespace std; typ...
ALGO
0.995408
5.262377
b7b52a8a-dfcb-4d45-87b3-2d3dae983147
ktmkillshot/Hacktoberfest2022
codeforces/266-B.cpp
// Solution for problem https://codeforces.com/contest/266/problem/B #include <iostream> using namespace std; int main() { int n, t; cin >> n >> t; char a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < t; i++) { for (int j = 0; j < n - 1; j++) ...
ALGO
0.999815
4.18697
849361f7-b3b9-456d-9c39-f3b3caa907a3
pflyly/torzu-mirror
externals/dynarmic/src/dynarmic/ir/opt/constant_propagation_pass.cpp
#include <optional> #include <mcl/assert.hpp> #include <mcl/bit/rotate.hpp> #include <mcl/bit/swap.hpp> #include <mcl/stdint.hpp> #include "dynarmic/common/safe_ops.h" #include "dynarmic/ir/basic_block.h" #include "dynarmic/ir/ir_emitter.h" #include "dynarmic/ir/opcodes.h" #include "dynarmic/ir/opt/passes.h" namespa...
ALGO
0.962878
7.756101
e534dc81-1b0c-4fdc-94cf-532e015d0fe1
storecodetn/TinK27_Thang0721
NP_An.cpp
#include <bits/stdc++.h> using namespace std; FILE *fi = freopen("NP.inp", "r", stdin); FILE *fo = freopen("NP.out", "w", stdout); int n, q, s; const int Max = 6e5 + 11; typedef pair<long long, long long> ii; vector<ii> a[Max]; long long Dist[Max]; struct Segmentree { int l[Max]; int r[Max]; int leaf[Max];...
ALGO
0.999929
3.56638
6e0ebb5d-f2a7-4c60-b38e-6934d28f703c
waqasaslam718/DSA
DSA-PracticQuestions/StringPracticQuestion/PrintDuplicateCharactersInString.cpp
#include<iostream> using namespace std; void printDuplicateChracterOfString(string str) { bool found = false; int i; int count[256] = {0}; for( i= 0; i < str.length(); i++) { if(count[str[i]] >= 1) { cout<<str[i]<<" "; found = true; } ...
ALGO
0.999067
3.82523
f50da71b-c0ae-446e-9219-318da908475f
Pranit5895/LeetCode
Algorithm/Algorithm-1/Day8/617. Merge Two Binary Trees.cpp
class Solution { public: TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) { //add the values of t2 onto t1 if(t1==NULL){ return t2; }else if(t2==NULL){ return t1; }else{ //t1!=NULL && t2!=NULL //use t1 as final result t1->val += t2->val...
ALGO
0.999994
6.350904
897f0115-3c59-4e72-b27d-93cab20ecc9d
ahmeddhus/Simple-Calculator
Calculator.cpp
#include<iostream> using namespace std; int numOf,result=0,a; void Add () { int numOf,result=0,a; cout<<"Enter the number of numbers + \n"; cin>>numOf; for(int i=0 ; i<numOf ; i++) { cout<<"Enter num. \n"; cin>>a; result+=a; } cout<<result<<endl; } void Minus...
ALGO
0.983968
3.057904
dfd26793-1c81-461e-ac64-ef07ef9b99f7
derek-zr/leetcode
Solution/698-partition-to-k-equal-sum-subsets/partition-to-k-equal-sum-subsets.cpp
// Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into k non-empty subsets whose sums are all equal. // // // // Example 1: // // // Input: nums = [4, 3, 2, 3, 5, 2, 1], k = 4 // Output: True // Explanation: It's possible to divide it into 4 subsets (5), (1, ...
ALGO
0.999935
5.800313
c5e46cfa-cfda-4189-9aa1-19c0436b0738
keywet06/code
CF/CF1503D.cpp
#include <bits/stdc++.h> const int N = 200005; int n, c, x, y, min, ca, cb, l, u, ans; int a[N], f[N]; int main() { std::ios::sync_with_stdio(0); std::cin.tie(0), std::cout.tie(0); std::cin >> n; for (int i = 1; i <= n; ++i) { std::cin >> x >> y; if (c = x > y) std::swap(x, y); ...
ALGO
0.999971
3.793079
861dad86-efcc-4813-8152-e19f38359792
oneapi-src/SYCLomatic
llvm/lib/CodeGen/MachinePostDominators.cpp
#include "llvm/CodeGen/MachinePostDominators.h" #include "llvm/InitializePasses.h" #include "llvm/Support/GenericDomTreeConstruction.h" using namespace llvm; namespace llvm { template class DominatorTreeBase<MachineBasicBlock, true>; // PostDomTreeBase namespace DomTreeBuilder { template void Calculate<MBBPostDomTr...
ALGO
0.998956
7.671473
314f37b8-e5f7-43e7-97ac-78a4d988acd9
TasnimAnas/100DaysOfCodes
Day 3/6.cpp
class Solution { public: vector<int> countBits(int n) { vector<int> ans(n + 1, 0); for (int i = 1; i <= n; i++) { if (i % 2) ans[i] = 1 + ans[i >> 1]; else ans[i] = ans[i >> 1]; } return ans; } };
ALGO
0.999979
6.023814
32feccaa-588e-4e37-bf90-984560d15da1
TianxiangR/leetcode-solutions
45.jump-game-ii.cpp
/* * @lc app=leetcode id=45 lang=cpp * * [45] Jump Game II */ // @lc code=start class Solution { public: int jump(vector<int> &nums) { int end, far, jumps; end = far = jumps = 0; for (int i = 0; i < nums.size(); ++i) { if (i > end) { ...
ALGO
0.999942
6.49622
952bead0-67e7-4c9d-a884-1e51dc34b7be
ttlast/ACM
DP/oi/hnoi 98.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; //ϵͳɿ һά const int maxn = 10000; int p[maxn],c[maxn]; int dp[maxn]; int main() { int n,m,i,j; while(scanf("%d%d",&n,&m)!= EOF) //n m ,ÿ { for(i = 0;i < m;i ++) { scanf("%d%d",&c[i],&p[i]); } memset(dp,...
ALGO
0.999935
3.158297
e96bae26-749c-4094-931c-8068cc3cfcac
ishandutta2007/codeforces
e869120/normal/1086/B.cpp
#include <iostream> #include <vector> using namespace std; #pragma warning (disable: 4996) int n, a, b, s, cnt; vector<int>X[1 << 18]; int main() { scanf("%d%d", &n, &s); for (int i = 1; i <= n - 1; i++) { scanf("%d%d", &a, &b); X[a].push_back(b); X[b].push_back(a); } if (n == 2) { cout << s << endl; re...
ALGO
0.998921
3.609003
fadb4203-ed68-4d49-bad5-38ea10a4ff60
msameerfarooq/Hacktoberfest2022
15. Tree/4. Least_Common_Ancestor.cpp
#include <bits/stdc++.h> using namespace std; // A Binary Tree node struct Node{ int key; struct Node *left, *right; }; Node * newNode(int k){ // function to create new node using the key Node *temp = new Node; temp->key = k; temp->left = temp->right = NULL; return temp; } // storing paths in a vector of bool ...
ALGO
0.99999
5.713946
201638c3-a8cd-4a95-b237-5d867c9f4986
qiaozishun4/CSP2024_BJ
BJ-Senior/answers/BJ-S00297/duel/duel.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long inline int read() { int res=0,op=0; char ch=getchar(); while(!isdigit(ch)) { op|=ch=='-'; ch=getchar(); } while(isdigit(ch)) { res=(res<<3)+(res<<1)+(ch^48); ch=getchar(); } return op?-res:res; } inline void write(int x) { if(x<0) { ...
ALGO
0.99997
3.863923
4c55e975-3317-4188-92e9-6edb161c2b02
AdityaShekharTiwary/geeks_for_geeks
magic_number.cpp
int countTriplets(vector<int>arr) { int n = arr.size(); vector<int> hash(n, 0); for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[j] > arr[i]) hash[i]++; } } int cnt = 0; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (arr[j] > arr[i]) cnt += hash[j]; } } ...
ALGO
0.999977
4.914043
4e415a72-eaeb-4de4-bcfd-72b919bdbcc0
PanagiotisPrountzosCS/leetcode_solutions_c_cpp
src/318.cpp
class Solution { public: int maxProduct(vector<string>& words) { vector<int> bit_mask; vector<int> lengths; int max_p = 0; for (int i = 0; i < words.size(); i++) { lengths.push_back(words[i].siz...
ALGO
0.999449
5.70396
b35dd7c5-d360-4a3e-bb40-a6560ef9068d
cls1277/OnlineJudge-Codes
luogu/luogu3370.cpp
//By cls1277 #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef long long LL; #define INF 2147483647 #define Fo(i,a,b) for(LL i=(a); i<=(b); i++) #define Ro(i,b,a) for(LL i=(b); i>=(a); i--) #define Eo(i,x,_) for(L...
ALGO
0.999705
4.583694
a42de787-3d0b-462c-ad1c-f0db9715a709
luexmbhurg/TEXTMASTERAI
llama.cpp/llama.cpp-master/ggml/src/ggml-cpu/vec.cpp
#include "vec.h" #include <cassert> #if defined(_MSC_VER) // disable "possible loss of data" to avoid hundreds of casts // we should just be careful :) #pragma warning(disable: 4244 4267) #endif // precomputed gelu table for f16 (128 KB) ggml_fp16_t ggml_table_gelu_f16[1 << 16]; // precomputed quick gelu table for ...
ALGO
0.993855
6.915284
1e3f3558-0959-427d-ae8a-bf80939346c4
fadifrancis96/3d-animation-course-projects
igl/sparse_voxel_grid.cpp
#include "sparse_voxel_grid.h" #include <unordered_map> #include <array> #include <vector> template <typename DerivedP0, typename Func, typename DerivedS, typename DerivedV, typename DerivedI> IGL_INLINE void igl::sparse_voxel_grid(const Eigen::MatrixBase<DerivedP0>& p0, const F...
ALGO
0.996609
7.769069
934ec35e-51c4-452e-8a5e-5991d9600196
heissanjay/Leetcode
0095-unique-binary-search-trees-ii/0095-unique-binary-search-trees-ii.cpp
class Solution { public: vector<TreeNode*> generateTrees(int n) { if (n == 0) { return {}; } vector<vector<vector<TreeNode*>>> memo(n + 1, vector<vector<TreeNode*>>(n + 1)); return generateTreesHelper(1, n, memo); } private: vector<TreeNode*> generateTreesHelper(...
ALGO
0.999935
7.308112
0924774c-9a60-4be2-8456-a629eef9c00d
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0717/personal_submission/cf243b_md.cpp
// 0717 #include <bits/stdc++.h> using namespace std; using i64 = long long; using pii = std::pair<int, int>; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n, m, h, t; std::cin >> n >> m >> h >> t; std::vector<std::vector<int>> graph(n); std::vector<std::pair<int,...
ALGO
0.999969
4.38012
2d32f65d-8ac7-4453-9433-ed62ce41c085
alexandraback/datacollection
solutions_2464487_1/C++/shadeel/A.cpp
#include <cstdio> #include <iostream> #include <cstring> using namespace std; int main(void){ freopen("A-large.in", "r", stdin); freopen("out.txt", "w", stdout); int cas, cc=0; long long int r, t; scanf("%d", &cas); while( cas-- ){ cin >> r >> t; // 2*n^2 + (2r-1...
ALGO
0.999718
3.898742
35578ed0-967d-4a49-88b7-d71e412b657d
wuwywu/work-temperature_scalenet
改变网络的尺度/化学/HN=400.cpp
//wuyong @ccnu.cn 2022.03.28 // <EMAIL> // ѧͻ ϵͳ¶ڴ24һΪϢ̬¶ֻǵ24 // ϵͳͬӣ // ʹõޱ #include<stdlib.h> #include<stdio.h> #include<math.h> #define Pi 3.141592653589793 #define NN 400 // ij߶ // Զ庯 double fv(double v,double m,double n,double h,double e); double gn(double v,double n,double T); double gm(double v,double m,do...
ALGO
0.999149
3.004243
784389cb-487c-4c15-85d3-8e35e6dad5a7
sarvex/leetcode-d
solution/1400-1499/1469.Find All The Lonely Nodes/Solution.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.999962
5.651058
881b54da-3097-4162-b270-8f2beba06971
davechurchill/ualbertabot
SparCraft/source/Player_Kiter_NOKDPS.cpp
#include "Player_Kiter_NOKDPS.h" using namespace SparCraft; Player_Kiter_NOKDPS::Player_Kiter_NOKDPS (const size_t & playerID) { _playerID = playerID; } void Player_Kiter_NOKDPS::getMoves(GameState & state, const MoveArray & moves, std::vector<Action> & moveVec) { moveVec.clear(); size_t enemy(state.getEnemy(...
ALGO
0.97892
3.858217
46eef418-3f68-4d16-9493-002551653386
flydog-sdr/FlyCat_SDR_GPS
extensions/DRM/dream/drmchannel/ChannelSimulation.cpp
#include "ChannelSimulation.h" /* Implementation *************************************************************/ void CDRMChannel::ProcessDataInternal(CParameter&) { int i, j; _COMPLEX cCurTapSamp; /* Save old values from the end of the vector */ for (i = 0; i < iMaxDelay; i++) veccHistory[i]...
ALGO
0.999677
3.560304
e0c115ed-bd62-4949-8166-3c05b26bc554
Hiyabye/Baekjoon
21xxx/21555.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; void solve(void) { int n, k; cin >> n >> k; vector<long long> a(n), b(n); for (int i=0; i<n; i++) cin >> a[i]; for (int i=0; i<n; i++) cin >> b[i]; vector<vector<long long>> dp(2, vector<long long>(n, 0)); dp[0][0] = a[0]; dp[...
ALGO
0.999948
3.681278
fd5922a5-cd5e-4289-9304-8dbde725e724
nguyentuss/Competitive-Programming
CP/OnlineJudge/LQDOJ/practice.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace std; #define boost ios::sync_with_stdio(0); cin.tie(NULL); #define ii pair<long long , long long> priority_queue <ii , vector <ii> , greater<ii>> pq; int main() { boost; long long n , c , a , b; cin >> n >> c; for (int...
ALGO
0.99997
3.459165
ed8e7126-5cfd-4832-a292-f506cdaf3f9e
nststnchl/os2016
midtermsh/midtermsh.cpp
#include <unistd.h> #include <vector> #include <string> #include <fcntl.h> #include <cstring> #include <signal.h> #include <wait.h> using namespace std; struct call_my { string name; vector<string> args; call_my(char* s, vector<char*> mas) { name = s; for (int i = 0; i < mas.size(); i++) {...
TOOL
0.911331
3.144151
f050cf41-1ffd-49ca-9dfa-3e4c968e61d0
TheProjecter/toric-code-decoding
qecsim_perfect_toric/blossom5-v2.02.src/PMmain.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "PMimplementation.h" void PerfectMatching::Finish() { #define IS_VALID_MATCH(i) ((Edge*)(i->match) >= edges && (Edge*)(i->match) < edges + edge_num) Node* i0; Node* i; Node* j; Node* k; Node* b; Node* b_prev; Node* b_prev_prev; for (i0=node...
ALGO
0.999834
3.26423
148ae4cf-2da1-4d77-9f10-bea83759f965
ishandutta2007/codeforces
atomicenergy/normal/742/C.cpp
#include <iostream> #include <map> #include <vector> using namespace std; long long gcd(long long a, long long b){ while(b) b^=a^=b^=a%=b; return a; } int main() { vector<int> v; int n; cin >> n; for(int i=0; i<n; i++){ int k; cin >> k; v.push_back(k-1); } long long m = 1; for(int i=0; i<n; i++){ int...
ALGO
0.999991
3.715321
eb9a95f0-2293-4b15-9941-fc3eb0a733d7
BithumbCoin/BithumbCoin
contracts/libc++/upstream/test/std/algorithms/alg.modifying.operations/alg.swap/iter_swap.pass.cpp
// <algorithm> // template<Iterator Iter1, Iterator Iter2> // requires HasSwap<Iter1::reference, Iter2::reference> // void // iter_swap(Iter1 a, Iter2 b); #include <algorithm> #include <cassert> int main() { int i = 1; int j = 2; std::iter_swap(&i, &j); assert(i == 2); assert(j == 1); }
TEST
0.990902
5.288396
9ab80aad-535c-4918-a7d6-2b6da89fc5f2
Rajeshnds/Competitive-Programming
codeforces/dragonmas/codeforces(c++)/C_Magic_Odd_Square.cpp
#include<bits/stdc++.h> using namespace std; int n; void solve(){ int k=(n+1)/2; int a=1,b=2; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(i+j<=k||abs(i-j)>=k||i+j>=3*k)cout<<b<<" ",b+=2; else cout<<a<<" ",a+=2; } cout<<endl; } } int main(){ cin>>n...
ALGO
0.999872
3.08804
c570de17-84c5-4eda-95a7-7a5f92f16f9d
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/04/0412/personal_submission/cf605a_lyxxys.cpp
void solve(){ int n; cin >> n; vector <int> p(n); for (int i = 0, x; i < n; ++ i){ cin >> x; x -= 1; p[x] = i; } int res = 0; for (int i = 0, j = -1; i < n; ++ i){ while (i > j || j+1 < n && p[j+1] > p[j]){ j += 1; } fmax(res, j-i...
ALGO
0.999867
4.505171
dded8be8-ef9b-4b3c-a9de-92f8b1e1e1a5
rikuTanide/atcoder_endeavor
abc145/abc145_b.cpp
#include <bits/stdc++.h> #include <cmath> using namespace std; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define sz(x) ll(x.size()) typedef long long ll; typedef pair<int, int> P; //typedef pair<ll, ll> P; //const double INF = 1e10; const ll INF = 1001001001; #define mins(x, y) x = min(x, y) #define maxs(x, y) x ...
ALGO
0.99996
4.180462
cb0429b8-3064-4e72-96b2-f29385626685
wildstyl3r/isomorph
src/checker.cpp
#include "checker.hpp" Graph wrong1, wrong2; bool BK_checker(Graph G, Graph H, std::function< std::pair< bool, std::vector<int> >(Graph, Graph) > P, int repeat) { unsigned seed = std::chrono::system_clock::now().time_since_epoch().count(); std::minstd_rand0 gen(seed); std::uniform_int_distribution<i...
ALGO
0.994361
5.283557
07e2dd72-2e25-4801-a5f5-bd2873c808b8
rojae/Problem-Sloving
baekjoon/baek_1748.cpp
#include <iostream> #include <cmath> using namespace std; int main(){ int n; long ans=0; cin >> n; int len = log10(n) + 1; for(int i=0; i<len; i++){ // 1~9 = 0 // ans += (10^0 * 9) * (1) 1 = 자릿수 ans += ( pow(10, i) * 9 ) * (i+1); } ans += (n - pow(10,len) + 1) ...
ALGO
0.999691
4.080518
db53be94-d8c7-4037-9a5b-0e62163f8f97
bhasamritasarmah/Computer-Science-Topics
Coding Interview/PrintPairsFromArray/PrintPairsFromTwoArrays.cpp
/* * Given an array of n integers, and another array of m integers, print every possible pair of elements * from the two arrays. E.g. if vec1 = {0, 7, 3} and vec2 = {-5, -1}, then possible pairs are - * (0, -5) * (0, -1) * (7, -5) * (7, -1) * (3, -5) * (3, -1) * Print every pair in a new line. * The arrangement should ...
TOOL
0.984983
5.489121
e3851fcd-97ef-412e-b343-dad7769f6354
AnubhavSaxena3/Cplusplus
cnvrttoupprnlower.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string str = "aNuBhAv SaXeNa"; // convert to upper case // for (int i = 0; i < str.size(); i++) // { // if (str[i] >= 'a' && str[i] <= 'z') // { // str[i] -= 32; // } // }...
ALGO
0.956527
3.747217
6023953f-da6c-4d05-bc55-f7a92cb51adf
Badal3375/https---github.com-Badal3375-Placement_set
badal/binary.cpp
#include<iostream> #include<math.h> using namespace std; int main(){ int n; cout<<"enter the value of n "<<endl; cin>>n; int i=0; int ans=0; while ( n!=0) { int bit =n &1; ans = (bit*pow(10,i))+ans; n=n>>1; i++; } cout<<"the digit "<< ans <<endl; }...
ALGO
0.999787
3.951189
d0efbcb5-075d-427d-bf3d-ba5df6bd2867
Ashishmaley/codechef_codeforce_geeks_codingninjas
EXPSTP.cpp
#include <iostream> using namespace std; #define ll long long int void solve(){ ll x1, y1, x2, y2, N; cin >> N >> x1 >> y1 >> x2 >> y2; ll c = min(min( x2 ,N - x2 +1), min( y2 ,N - y2+ 1)) + min(min( y1 , N - y1 + 1),min( x1 , N - x1 + 1)); ll c1 = abs(y1 - y2)+abs(x1 - x2); cout << min(c, c1)<<"...
ALGO
0.999814
4.856087
aeaa1ee6-d2c6-46f9-a070-e981ce1393fd
xjonwang/competitive-programming
usaco-guide/gold/bitmask-dp/kattis-cat-and-mice/main.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ar array #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_...
ALGO
0.999844
5.374658
be681b86-1795-4876-9717-9b9b7892acd4
shubhadityaburela/Dense-Hessian-Bracketing
Approach 1/eigen/failtest/fullpivqr_int.cpp
#include "../Eigen/QR" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { FullPivHouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
TEST
0.877595
3.150836
5d899dcc-7948-40f4-a9b8-8cdd0d1467c5
sanjsriv98/Parallel-Semi-Order-Matrix-and-Document-Frequency-Indexer
DF/DF_MTH/driver.cpp
#include "_FTW.h" int main(int argc, char **argv) { if (argc < 2) { cerr << "Usage: " << argv[0] << " <num_elements> <num_workers> [<directory_root>]" << endl; // return 0; return 0; } int num_elem = atoi(argv[1]); int nwork = atoi(argv[2]); stoproot = getNode(); make...
ALGO
0.998594
3.449615
09883daa-b65a-4ac6-8b4e-7b4a139d5b53
Trevorchenmsu/LeetCode-Solutions
leetcode/editor/en/[1480]Running Sum of 1d Array.cpp
//Given an array nums. We define a running sum of an array as runningSum[i] = su //m(nums[0]…nums[i]). // // Return the running sum of nums. // // // Example 1: // // //Input: nums = [1,2,3,4] //Output: [1,3,6,10] //Explanation: Running sum is obtained as follows: [1, 1+2, 1+2+3, 1+2+3+4]. // // Example 2: // //...
ALGO
0.999718
6.722067
2342dea0-3d22-4f9a-83ae-fa3d2503475d
osama-afifi/Online-Judges-Solutions
UVA Problems/Test/TEST/Dinic.cpp
#include <iostream> #include <algorithm> #include <stdio.h> #include <cstring> #include <string> #include <sstream> #include <vector> #include <map> #include <queue> #include <stack> using namespace std; const int maxnode = 20000 + 5; const int maxedge = 1000000 + 5; const int oo = 1000000000; int node, src, dest,...
ALGO
0.981402
3.664714
acae471f-2974-4b5d-b18b-6c1ec2c51268
Harsh23Kashyap/DSA-Basics
Assignment 6/CPP Coding Blocks/set.cpp
#include <set> #include <iostream> using namespace std; int main() { int arr[]={3,2,1,10,20,40,30,60, 40,60}; int n= sizeof(arr)/sizeof(int); set <int> s; for (int i=0;i<n;i++) s.insert(arr[i]); for(auto it=s.begin();it!=s.end();it++) cout<<*it<<endl; }
ALGO
0.998379
3.312934
30477fa1-71c7-4059-bda3-74d0983603a7
hanjjong/Algorithm
BAEKJOON/재귀/2630-색종이 만들기.cpp
#include <iostream> int N, cnt_white, cnt_blue; int arr[130][130]; int check(int x, int y, int size){ int color = arr[x][y]; for(int i = x; i < x+size; i++){ for(int j = y; j < y + size; j++){ if (color != arr[i][j]) return 0; } } if(color == 1) cnt_...
ALGO
0.999442
4.612742
a28560b9-6dc4-436f-8445-ae3fc0cf0be0
lyskai/rd
tests/sample/source/SampleOpticalFlowViz.cpp
#include "ridehal/sample/SampleOpticalFlowViz.hpp" #include <algorithm> #include <math.h> namespace ridehal { namespace sample { #define KernelCode( ... ) #__VA_ARGS__ static const char *s_pSourceMvColor = KernelCode( __inline__ float ConvertMvFloat( short x ) { return (float) ( (float) ( x >> 4 ...
TOOL
0.859907
6.558898
869fa39d-ed79-4109-a36b-9deaf205a655
MaTianmao/src
src/boost/libs/graph/example/bron_kerbosch_clique_number.cpp
//[code_bron_kerbosch_clique_number #include <iostream> #include <boost/graph/undirected_graph.hpp> #include <boost/graph/bron_kerbosch_all_cliques.hpp> #include "helper.hpp" using namespace std; using namespace boost; // Declare the graph type and its vertex and edge types. typedef undirected_graph<> Graph; typede...
ALGO
0.99922
6.12348
a5d70f0c-2f7b-4006-99cf-482b6c9709ec
jared711/GravThrow
GravThrow3_BackUpThisFolder_ButDontShipItWithYourGame/il2cppOutput/UnityEngine.IMGUIModule1.cpp
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <limits> #include <stdint.h> // System.Byte[] struct ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031; // System.String struct String_t; IL2CPP_EXTERN_C_BEGIN IL2CPP_EXTERN_C_END #ifdef __clang__ #pragma cla...
TOOL
0.859788
3.318855
bcd2133c-17db-4074-9c18-7daed2396651
ishandutta2007/codeforces
jiangly/normal/1165/D.cpp
#include<bits/stdc++.h> typedef long long ll,int64,LL; const int inf=1e9; namespace FastIO{ const int BUF_SIZE=1<<24; char buf[BUF_SIZE],*p1,*p2; inline char gc(){ return p1==p2?p2=(p1=buf)+fread(buf,1,BUF_SIZE,stdin):0,p1==p2?-1:*p1++; } inline int read_int(){ int ans=0; char c=gc(); bool sign=0; for(;(...
ALGO
0.999668
3.620729
d0414847-05e4-4101-9e88-2290b0012245
ishandutta2007/codeforces
jtnydv25/normal/832/E.cpp
#include <bits/stdc++.h> using namespace std; #define sd(x) scanf("%d", &(x)) #define F first #define S second #define ll long long const int N = 505; int mod = 5; inline int add(int x, int y){ x += y; if(x >= mod) x -= mod; return x;} inline int sub(int x, int y){ x -= y; if(x < 0) x += mod; return x;} inline int mul(...
ALGO
0.999995
4.427438
1633afc2-72a6-402f-ab78-2b4c7ade9cdf
wabiverse/UnrealEngineOldArchived
Engine/Source/ThirdParty/Intel/Embree/Embree2140/src/kernels/bvh/bvh_intersector_hybrid.cpp
#include "bvh_intersector_hybrid.h" #include "bvh_intersector_single.h" #include "bvh_intersector_node.h" #include "../geometry/intersector_iterators.h" #include "../geometry/triangle_intersector.h" #include "../geometry/trianglev_intersector.h" #include "../geometry/trianglev_mb_intersector.h" #include "../geometry/t...
ALGO
0.999735
7.461708
ecc6b6e8-264c-4608-a2ef-85910bc3c078
smhemel/LeetCode
1593. Split a String Into the Max Number of Unique Substrings.cpp
class Solution { public: int backtrack(int start, const string& s, unordered_set<string>& seen) { if (start == s.size()) { return 0; } int maxSplits = 0; for (int end = start + 1; end <= s.size(); ++end) { string substring = s.substr(start, end - start); ...
ALGO
0.999954
6.065843
5810ac18-76f7-449e-a2e7-12fb59f18376
fbosnjak/bioinf
algo/algo.cpp
#include <iostream> #include <vector> #include <map> #include <string> #include <cmath> #include <set> #include <algorithm> #include <deque> #include <fstream> #include <chrono> using namespace std; struct Node; struct Edge { Node *node_a, *node_b; bool revComplement_a = false, revComplement_b = false; int ove...
ALGO
0.998247
5.318913
5c208774-f6b3-4b7b-b00b-5f8469a5d91f
ZhongRuoyu/LeetCode
problems/53-maximum-subarray.cpp
// Solved 2021-12-07 // Runtime: 96 ms (90.58%) // Memory Usage: 67.6 MB (91.24%) class Solution { public: int maxSubArray(vector<int> &nums) { int sum = 0; int max = numeric_limits<int>::min(); for (size_t i = 0; i != nums.size(); ++i) { sum += nums[i]; max = std...
ALGO
0.99955
6.515891
89ea54ce-ad75-4e6b-89bd-503fe389ffae
sssteeefaaan/DS-Priprema-20-21
MPI/Jul2020/b.cpp
//#include <stdio.h> //#include <mpi.h> //#include <stdlib.h> //#include <math.h> //#include <time.h> // //int main(int argc, char** argv) //{ // srand(time(NULL)); // // int rank, size, master = 0; // MPI_Status stat; // int value; // // MPI_Init(&argc, &argv); // MPI_Comm_size(MPI_COMM_WORLD, &size); // MPI_Comm_rank...
ALGO
0.999491
3.112643
b5845b07-2889-431a-8c71-4a1fb575ed83
alliseeisgold/formal_langs
tests/test.cpp
#include "../src/Solver.h" #include <gtest/gtest.h> #include <map> using std::string; using std::map; using namespace testing; TEST(AlphaTest, CheckParseError) { string tests[] = {"a", "ab", "ab.", "a*", ".", "1", "+a", "eg."}; for (const auto& test : tests) { Solver automat(test); long long a...
TEST
0.937285
5.013782
ecf82fb4-aa8e-4d65-8321-58916fd09d4d
Harshkaushik04/Cube
new_training/cube.cpp
#include "headers/cube.hpp" #include<random> using namespace std; Cube::Cube(){ this->solvedCube3DArray={{{color::White,color::White,color::White}, {color::White,color::White,color::White}, {color::White,color::White,color::White}}, {{color::Red,color::Red,color::Red}, {color::Red,color::Red,color:...
ALGO
0.99879
4.427568
75ea9ca3-64a5-4832-b53d-7ff3055249c0
Nafyaz/my-codes
Codeforces/0616E.cpp
#include<bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef long long LL; typedef pair<LL, LL> pLL; #define ff first #define ss second #define show(x) cout << #x << ": " << x << "; " #define INF 1000000000000015 #define MOD 1000000007 #define MAXN 2000006 int main() { ios_base::sync_with_stdio...
ALGO
0.999983
3.957982
85767228-a6e0-4d1a-a699-4f8069884f20
sajjadhussains/Algorithm
week-05/exam-05/problem3.cpp
//problem_link:https://www.eolymp.com/en/problems/2472 #include <bits/stdc++.h> using namespace std; const int N =1e5; vector<int>adj_list[N]; int main() { int n,k; cin >>n>>k; for(int i=0;i<k;i++){ int operation_sign; cin>>operation_sign; if(operation_sign==1){ int u...
ALGO
0.999891
4.786942
3d69e579-6d43-4918-ac14-06d9245e2c3c
trithucvo010704/Partice_PythonCore
CONTEST7/bt.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int last_pos(const vector<int> &a, int l, int r, int x) { int res = -1; while (l <= r) { int m = (l + r) / 2; if (a[m] < x) { res = m; l = m + 1; } else {...
ALGO
0.999982
4.495597
2d1cde6b-f3c6-4128-965e-5642f4c60c0a
matoilic/thesis
Libraries/opencv/samples/cpp/tutorial_code/ImgTrans/HoughLines_Demo.cpp
/** * @file HoughLines_Demo.cpp * @brief Demo code for Hough Transform * @author OpenCV team */ #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h> using namespace cv; using namespace std; /// Global variables /** General variables */ Mat src, edg...
ALGO
0.986873
6.660863
70d2c66c-0683-4f9b-a038-0f26ace1b71a
river-wind/CarNDT3_P1PathPlanning
src/Eigen-3.3/doc/examples/DenseBase_middleRows_int.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(2..3,:) =\n" << A.middleRows(2,2) << endl; return 0; }
ALGO
0.85259
3.307581