uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
7a973d09-6d71-4a5f-b073-ce5a27445026
asheesh20/Must-Do-Coding-Questions
Array/subarraysum.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> subarraySum(int arr[], int n, long long s) { vector<int> v; int start=0,f=0,sum=0; for(int i=0;i<n;i++){ sum+=arr[i]; while(sum>s && start<i){ sum-=arr[start]; ...
ALGO
0.999717
4.03962
8e7f071a-d5af-4f4d-86c8-f3ddd6c47586
JanekKwadrat/Solutions
Codeforces/2023-data_structures_fan/dat.cpp
/* Jan Zakrzewski https://codeforces.com/contest/1872/problem/E */ #include <bits/stdc++.h> using namespace std; int constexpr N = 1e5+10; int t, n, q; int a[N]; char s[N]; int sum[N]; int zeros, ones; int k, l, r, g; int main() { ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> t; ...
ALGO
0.999643
4.412401
963cc7fd-784d-4c62-bb6b-da5d6b494c9d
kshiozaw/AtCoder
ABC-Like/HHKB2020/progB.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int h,w; cin >> h >> w; int ans=0; vector<vector<char>> mp(h,vector<char>(w)); for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ cin >> mp[i][j]; } } for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ if(mp[i][j]=='.'){ if(i+1<h && mp[i+1][j]=='.') ...
ALGO
0.999893
4.0718
389c92ee-0a25-4218-a8a2-0fb0101cd671
Pulakesh5/_DSA_
August 22/19 Aug/1296. Divide Array in Sets of K Consecutive Numbers LC.cpp
class Solution { public: bool isPossibleDivide(vector<int>& nums, int k) { map<int,int> count; for(int num:nums) count[num]++; sort(nums.begin(), nums.end()); for(auto &num:nums) { if(count[num]==0) continue; for(int _nm=num;_n...
ALGO
0.999942
5.326611
35889a30-bc7e-416e-a9a4-de398fae6ee9
arpanhub/TCS-CodeVita
GreedyVirus/greedyVirus.cpp
#include <iostream> #include <vector> #include <queue> #include <climits> using namespace std; // Directions for the 8 neighboring cells (up, down, left, right, and diagonals) int directions[8][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}, {-1, -1}, {-1, 1}, {1, -1}, {1, 1}}; // Function to check if a cell is within bounds...
ALGO
0.999987
6.171661
72991fab-c92e-43a8-a808-aeee21efa7c7
sunruoshi/Luogu-Codes
[算法1-6] 二分查找与二分答案/P1024-[NOIP2001 提高组]-一元三次方程求解.cpp
#include <cstdio> #include <cmath> int main() { double a, b, c, d; scanf("%lf %lf %lf %lf", &a, &b, &c, &d); for (double i = -100; i <= 100; i += 0.001) { if (fabs(i * i * i * a + i * i * b + i * c + d) < 0.0001) printf("%.02lf ", i); } return 0; }
ALGO
0.995947
3.182472
1ba54407-5aa6-46b9-a1f7-30d315b1e93d
ariannacalderara/DACH-MED-DEMO
venv/lib/python3.12/site-packages/sklearn/utils/src/MurmurHash3.cpp
// Note - The x86 and x64 versions do _not_ produce the same results, as the // algorithms are optimized for their respective platforms. You can still // compile and run any of them on any platform, but your performance with the // non-native version will be less than optimal. #include "MurmurHash3.h" //-------------...
ALGO
0.998223
7.198757
b1278ece-4b03-4cf9-a724-c96fbbb6500e
fuzh97/leetcode
code/0224.基本计算器.cpp
/* * @lc app=leetcode.cn id=224 lang=cpp * * [224] 基本计算器 */ // @lc code=start class Solution { public: int calculate(string s) { stack<int> nums, ops; int len = s.size(), sign = 1, ans = 0; for (int i = 0; i < len; i++) { if (s[i] == ' ') { continue; ...
ALGO
0.999814
5.762531
28345b8a-566b-4edc-b952-5f467757a4d0
alessandro-bugatti/appunti_terza
archivio/2021_2022/programmazione/introduzione/indovina_numero/main.cpp
#include <iostream> #include <ctime> using namespace std; int main() { const int MAX = 10000; srand(time(NULL)); int numero_da_indovinare = rand()%MAX + 1; int tentativo; cout << "Indovina il numero che ho pensato: "; cin >> tentativo; while (tentativo != numero_da_indovinare) { ...
TOOL
0.956128
3.510139
38661617-1946-4265-9edd-4381a91a1eef
junaidjesan2/data-structure
week-01/assignment - 01/Get_Prefix_Sum.cpp
#include <bits/stdc++.h> using namespace std; int main() { long int n; cin >> n; long long int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } long long int pre[n]; pre[0] = a[0]; for (int i = 1; i < n; i++) { pre[i] = a[i] + pre[i - 1]; } for (int i...
ALGO
0.999937
3.911208
8dab4f13-62e7-4526-b05e-f1675cc34463
Seungwuk98/Algorithm-Solving-C-
16994BOJ_rope_query.cpp
#include <iostream> #include <bits/stdc++.h> #include <vector> using ll = long long; using namespace std; struct Node { Node *l, *r, *p; char val; int cnt; bool inv; bool fil; Node(){ l=r=p=nullptr; val=0; cnt=1; inv = 0; } }; struct SplayTree { Node *tree; Node *...
ALGO
0.999763
4.527934
fbfe72fd-3b44-4ace-bac5-8771a875986a
davidsoerdjana/learn_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.998859
6.785645
88a603b5-d7ad-4b8a-b539-0cb89f13bf37
forestion24/school-programming
bohater.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); vector <pair<int, pair<int, int> > > wzrostHp; vector <pair<int,pair<int, int> > > wzrostDmg; long long n, z; cin >> n >> z; long long a, d; for (int i = 0; i < n; i+...
ALGO
0.99962
3.426759
4d04e17a-ca32-4976-8698-4dc5995e64a0
HPC-AI-Team/lammps-fugaku-threadpool-sc23
src/EXTRA-FIX/fix_momentum_chunk.cpp
// clang-format off #include "fix_momentum_chunk.h" #include "atom.h" #include "compute.h" #include "compute_chunk_atom.h" #include "compute_com_chunk.h" #include "domain.h" #include "error.h" #include "group.h" #include "modify.h" #include <cmath> #include <cstring> using namespace LAMMPS_NS; using namespace FixCo...
TOOL
0.9157
6.407161
2b3708cd-459a-4eab-a149-96a6efa3a294
EdenMCa/Programacion-de-dispositivos-moviles
seleccionar_alumno_modificado/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.997481
6.76775
8e383310-ff84-4192-a93e-c2c5d7671499
YashGupta018/LeetCode
LeetCode January Challenge(2023)/Delete Columns to Make Sorted.cpp
class Solution { public: int minDeletionSize(vector<string>& strs) { int n = strs.size(); int m = strs[0].size(); int ans = 0; for(int i=0; i<m; i++) { for(int j=0; j<n-1; j++) { if(strs[j][i] > strs[j+1][i]) { ans++; ...
ALGO
0.999964
6.244825
6b3ea669-535b-4ac3-87db-e087e5cb8f01
Jinseok-Heo/ps
baekjoon_1463.cpp
#include <iostream> using namespace std; int min_func(int a, int b) { return a <= b ? a : b; } int main() { int x; cin >> x; int* dp = new int[x + 1] {0, }; if (dp == nullptr) return -1; dp[1] = 0; dp[2] = 1; dp[3] = 1; for (int i = 4; i < x + 1; i++) dp[i] = min_func(dp[i / 3] + i % 3 + 1, dp[i / 2] +...
ALGO
0.99993
4.010353
988c4ae7-c67e-4c9a-84de-f20e1f3e5670
Akhilesh286/cpp
project3/solutions/p6.cpp
#include <iostream> using namespace std; int main() { int n, t1 = 0, t2 = 1, nextTerm = 0, i = 1; cout << "Enter the number of terms: "; cin >> n; while (i <= n) { if(i == 1) { cout << t1 << " "; } else if(i == 2) { cout << t2 << " "; } else { ...
ALGO
0.999936
4.959249
104e2195-10b9-45db-bece-ea27919ad272
ritisha032/StriverSDESheet
16thjune/DFS Traversal.cpp
void dfs(int i,vector<int> adj[],vector<int> &visited, vector<int> &ls){ visited[i]=1; ls.push_back(i); for(auto it:adj[i]){ if(!visited[it]){ dfs(it,adj,visited,ls); } } } vector<vector<int>> depthFirstSearch(int V, int E, vector<vector<int>> &edges) { // Write your co...
ALGO
0.999792
5.943059
94da307e-a393-44da-a88e-fa956144977a
Md-Akram-Khan/Number-theory
SOD(single).cpp
#include<bits/stdc++.h> using namespace std; long long SOD(long long n) { long long ans=1; for(long long i=2; i*i<=n; i++) { int c=0; while(n%i==0) { n/=i; c++; } long long sum = 1, p = 1; for(int j = 1; j <= c; j++) { p...
ALGO
0.999985
5.559725
7c4cc73b-47a6-47e1-a5c2-8461d42aa356
codingksj/Baekjoon-Solution
백준/02000~02999/02000~02099/02010.cpp
#include<iostream> #include<set> #include<unordered_map> #include<map> #include<vector> #include<queue> #include<deque> #include<stack> #include<algorithm> #include<string> #include<numeric> #include<cmath> #include<cctype> #include<cstring> #include<iomanip> #include<chrono> using namespace std; typedef long long LL...
ALGO
0.999582
5.098934
f5952290-35d2-4d65-b673-5c2f4225dcef
mertpasacukur/riscv_llvm
libc/src/math/gpu/copysign.cpp
#include "src/math/copysign.h" #include "src/__support/common.h" namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(double, copysign, (double x, double y)) { return __builtin_copysign(x, y); } } // namespace LIBC_NAMESPACE
TOOL
0.942561
5.640227
1b129895-9abf-4f46-8ca3-143afdc64555
YttriumWillow/OI
Problems/P1420.cpp
#include <iostream> #define longint long long #define reg register #define qwq puts("fzy qwq ~"); using namespace std; int n, cnt = 1, ans = -1145141919; int a[100010]; int main() { scanf("%d", &n); a[0] = -114514; for (reg int i = 1; i <= n; ++i) { scanf("%d", &a[i]); if (a[i] - a[i - 1...
ALGO
0.999618
3.511599
aecaf343-f354-430d-b145-9af2cb98498f
ctare/ga-lib
main.cpp
#include "genetic.hpp" #include "calcs.hpp" #include <iostream> #include <functional> #include <vector> #include <random> #define FOR(i, f, n) for(int (i) = (f); (i) < (n); (i)++) #define RFOR(i, f, n) for(int (i) = (f); (i) >= (n); (i)--) #define REP(i, n) for(int (i) = 0; (i) < (n); (i)++) #define RREP(i, n) for(i...
ALGO
0.997366
4.22131
27f2c547-d259-4439-a249-9d74b8599049
conan1005/DSA-Questions
Leetcode/15-intervals/hard/1851-minimum-interval-to-include-each-query.cpp
/******************************************************************* Given intervals array & queries array, ans to a query is min interval containing it Ex. intervals = [[1,4],[2,4],[3,6],[4,4]], queries = [2,3,4,5] -> [3,3,1,4] Min heap & sort by size of intervals, top will be min size, Time: O(n log n + q log q) -...
ALGO
0.999945
5.925985
98e85560-09e8-423b-b4e3-1f14c8e28d5b
ImMasterSam/SCIST-Solutions
三章:資料結構與演算法/第一節:深度優先搜尋/富翁種花/富翁種花.cpp
#include <iostream> #include <vector> #include <map> using namespace std; map<char, int> flower = {{'R', 1}, {'O', 2}, {'Y', 3}, {'G', 4}, {'B', 5}, {'I', 6}, {'P', 7}, {'L', 8}, {'W', 9}}; map<int , char> num = {{1, 'R'}, {2, 'O'}, {3, 'Y'}, {4, 'G'}, {5, 'B'}, {6, 'I'}, {7, 'P'}, ...
ALGO
0.999739
3.54276
d4b8c97a-6d06-4d29-b046-6ed8b7f633ac
dharmishthamakwana/expense_tracker_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
cee4970b-5449-462b-bf93-616477bddc7f
rawadhossain/LeetCode
94-binary-tree-inorder-traversal/iterativeApproach.cpp
class Solution { public: vector<int> preorderTraversal(TreeNode *root) { vector<int> arr; stack<TreeNode *> st; if (root == NULL) return arr; while (!st.empty()) { if (root != NULL) { st.push(root); ro...
ALGO
0.99998
5.955714
b9cfe704-b252-4103-bd93-d4cdfba82804
rajib3777/Data-structure-Algorithm
Sum_Without_Leaf.cpp
#include<bits/stdc++.h> using namespace std; class tree { public : int val; tree* left; tree* right; tree(int val) { this -> val = val; this -> left = NULL; this -> right = NULL; } }; tree* input_tree(tree* root) { int val; cin >> val; if(val == -1) ...
ALGO
0.999838
3.970754
bbecc786-2002-4a9e-9018-662ce05a89a8
ronee12/Uva-Solutions
10245.cpp
#include <stdio.h> #include <math.h> int main() { long i,j,N; double X[10001]={0.0},Y[10001]={0.0},dist,d,p; while(scanf("%ld",&N)!=EOF) { if(N==0) break; dist = 999999999999999999; for(i=0 ; i<N ; i++) { scanf("%lf%lf",&X[i],&Y[i]); for(j=0 ;...
ALGO
0.999928
3.481147
2e0948b1-fb43-4ac8-b390-8218c26b37d8
heavenMOJANG/ICPC
.history/programmes_C_Cpp/AtCoder/abc406/C_20250517202049.cpp
#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3, "Ofast", "inline") #include <bits/stdc++.h> #define int long long using namespace std; constexpr int INF = 0x7fffffff; void solve() { int n; cin >> n; vector<int> a(n + 1); for (int i = 1; i <= n; ++ i) cin >> a[i]; vector<int> p0, ...
ALGO
0.999894
4.871137
c6d9bfea-d937-4190-8162-f633d8923146
Docencia-fmrico/attention-grupo-dia-libre
bt_navigation/src/nei_controller.cpp
#include <plansys2_pddl_parser/Utils.h> #include <memory> #include "plansys2_msgs/msg/action_execution_info.hpp" #include "plansys2_msgs/msg/plan.hpp" #include "plansys2_domain_expert/DomainExpertClient.hpp" #include "plansys2_executor/ExecutorClient.hpp" #include "plansys2_planner/PlannerClient.hpp" #include "plans...
TOOL
0.987753
6.064875
701607c6-4fb6-4fd4-bd8b-37b971cf5a8b
AbdullahRFA/3-1_All_Resources
Computer Graphics Lab/Graphics Lab 3/378/378-rotate.cpp
#include<bits/stdc++.h> #include <conio.h> #include <graphics.h> #include <math.h> using namespace std; #define PI 3.14159265 int main() { int gd, gm; gd = DETECT; initgraph(&gd, &gm, ""); int x1 = 0, y1 = 0; int x2 = 100, y2 = 50; setcolor(YELLOW); line(x1, y1, x2, y2); float angle ...
ALGO
0.956375
3.910347
7dd57c90-f574-414d-9276-4061dbfda65a
faizan346/Ds-Algo-Cplusplus
hashmap-heap/37longestSubarrayWithSumDivByK.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n, 0); for(int i = 0; i < n; i++) { cin >> a[i]; } int k; cin >> k; unordered_map<int, int> umap; // rem, ind; umap[0] = -1; int sum = 0; int len = 0; for(int i = 0; i < n; i...
ALGO
0.999914
3.951908
0f088d61-2d22-4f3f-b1a7-77e00a0d0fe2
matheusfalhas/cpe
prova1/ex1_idade/idade.cpp
#include <iostream> using namespace std; int main(){ int i; // pede para digitar a idade cout << "Digite sua idade:\n"; // le o numero digitado cin >> i; if(i > 65 || i == 16 || i == 17){ cout << "ELEITOR: VOTO FACULTATIVO\n"; }else if(i > 17 && i <= 65){ cout << "...
ALGO
0.968741
3.785616
e3cf28f6-cb7d-46ce-8e63-a722609b2829
gaoxifeng/Feature-Preserving-Octree-Hex-Meshing
extern/libigl/include/igl/crouzeix_raviart_massmatrix.cpp
#include "is_edge_manifold.h" #include "doublearea.h" #include <cassert> #include <vector> template <typename MT, typename DerivedV, typename DerivedF, typename DerivedE, typename DerivedEMAP> void igl::crouzeix_raviart_massmatrix( const Eigen::PlainObjectBase<DerivedV> & V, const Eigen::PlainObjectBase<Deri...
ALGO
0.985124
6.207595
3538bcba-8c54-4ab4-abb6-d84f715a52d4
AnushkaPhogat16/DSA_arrays
121-best-time-to-buy-and-sell-stock/best-time-to-buy-and-sell-stock.cpp
class Solution { public: int maxProfit(vector<int>& nums) { int profit = 0; int minPrice = INT_MAX; for( int i = 0 ; i<nums.size(); i++){ minPrice = min(minPrice, nums[i]); profit = max(profit, nums[i] - minPrice); } return profit; } };
ALGO
0.999744
6.02273
1e544568-bf4d-4c8e-a3d5-1ec2027e2583
Arresto/Merlin
Marlin/src/feature/bedlevel/hilbert_curve.cpp
/********************* * hilbert_curve.cpp * *********************/ #include "../../inc/MarlinConfig.h" #if ENABLED(UBL_HILBERT_CURVE) #include "bedlevel.h" #include "hilbert_curve.h" constexpr int8_t to_fix(int8_t v) { return v * 2; } constexpr int8_t to_int(int8_t v) { return v / 2; } constexpr uint8_t lo...
ALGO
0.999744
5.682351
70876561-9ead-4be4-9373-ecf53037c00b
iluvjava/AMATH-583
final2/eigenfaces/eigenfaces_par.cpp
#include "amath583.hpp" #include "omp.h" #include <iostream> // Basic (original) outer -- Optimize and parallelize me void outer(Matrix& A, const Vector& x) { // No need to implement this is just not significant enough for parallelization. for (size_t i = 0; i < A.num_rows(); ++i) { double a = x(i); #...
ALGO
0.99944
3.835658
bad36c36-2792-4714-82bd-fed454f7cf87
sheucm/leetcode-algorithm
00139_DP__Word_Break/sol1.cpp
class Solution { public: bool wordBreak(string s, vector<string>& wordDict) { const unordered_set<string> word_set(wordDict.begin(), wordDict.end()); vector<bool> flag (s.size() + 1, false); flag[0] = true; return _wordBreak(s, 0, word_set, flag); } private: // DP method ...
ALGO
0.999849
6.364398
b482b822-d182-4afc-9f48-5cb44beaa927
showmanlee/HowCanISolveThisQuestion
BOJ/3000/3036.cpp
// 링 // https://www.acmicpc.net/problem/3036 #include <iostream> #include <string> #include <algorithm> using namespace std; int gcd(int a, int b) { if (a < b) swap(a, b); while (b != 0) { int t = b; b = a % b; a = t; } return a; } int main(void) { cin.tie(NULL); ios_base::sync_with_stdio(false); ...
ALGO
0.999978
5.144067
63ecb9db-a1ce-46d8-b3cb-0b6fc6387065
sandip9593/DSA_With_CPP
DSA-C++/remove_zero.cpp
#include<iostream> #include<vector> using namespace std; class Solution { public: void moveZeroes(vector<int>& nums) { int n = nums.size() ; vector<int> arr(n, 0); int j = 0 ; for (int i = 0 ; i < n ; i++){ if (nums [i] != 0 ) { arr[j] = nums[i] ; ...
ALGO
0.999814
5.880611
b6ca639e-199a-4f62-ba4e-e8772c33bd10
divesh-netizen/Love-Babbar-450-QA
07_Binary_Search_Tree/07_LCA-in-bst.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = right = NULL; } }; // Function to Build Tree Node* buildTree(string str) { // Corner Case if(str.length() == 0 || str[0] == 'N') ...
ALGO
0.999908
4.779521
e526c909-ada8-4914-bb1b-aa8e8ddd6468
rafid211/online-judge-solution
UVA/Simple division.cpp
#include <bits/stdc++.h> using namespace std; const int MOD = 1e9+7; const double EPS = 1e-11; const double PI = 2 * acos(0.0); const int INF = 0x7f7f7f7f; typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef vector<int> vi; typedef vector<ll> vl; typedef vec...
ALGO
0.999929
3.359489
23008d5c-a6e6-428e-bd67-61f44726f69e
Avninder99/LeetCode_GFG_Solutions
1732-find-the-highest-altitude/1732-find-the-highest-altitude.cpp
class Solution { public: int largestAltitude(vector<int>& gain) { int max_alt=0; int curr_alt=0; for(int i=0;i<gain.size();i++){ curr_alt+=gain[i]; max_alt=max(curr_alt, max_alt); } return max_alt; } };
ALGO
0.999789
6.07121
e7150e49-46ea-44a1-8291-76ad02e33600
PitRella/Chess
piece_bishop_abs.cpp
# include "piece_bishop_abs.h" BishopFigure::BishopFigure(const char team[], const int position_x, const int position_y) : MyOwnAbstractPiece("Bishop", team, ...
ALGO
0.998056
3.425726
4aa955c8-b81a-435f-b112-da7446d747ec
lijuni/allCPPTest
2018/test0315/test12.cpp
#include<iostream> #include<vector> #include<string> using namespace std; int main() { vector<string> vs={"Wang", "", "Old", "Lucky"}; /* for(auto i : vs) cout<<i<<"\t"; cout<<endl; */ vector<string>::iterator it=vs.begin(); //for(; it!=vs.end(); it++) // cout<<++*it<<endl; cout<<it++->empty()<<endl; c...
TOOL
0.859528
3.254504
5861a687-5209-46ee-9aca-9b61e8056399
odiubankov/AlgorithmicChallenges
cpp/hackerrank/tests/DPCoinChangeTest.cpp
#include "../DPCoinChange.h" #include <gtest/gtest.h> namespace hackerrank { TEST(DPCoinChange, test) { ASSERT_EQ(96190959, make_change(std::vector<int> {5, 37, 8, 39, 33, 17, 22, 32, 13, 7, 10, 35, 40, 2, 43, 49, 46, 19, 41, 1, 12, 11, 28}, 166)); } }//n...
TEST
0.950372
6.226455
baeba336-baf6-4f2d-9559-fcf756cac10a
hakeemsm/Model-Predictive-Control
src/Eigen-3.3/unsupported/doc/examples/MatrixSinh.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { MatrixXf A = MatrixXf::Random(3,3); std::cout << "A = \n" << A << "\n\n"; MatrixXf sinhA = A.sinh(); std::cout << "sinh(A) = \n" << sinhA << "\n\n"; MatrixXf coshA = A.cosh(); std::cout << "cosh(A) = \n"...
ALGO
0.975474
5.890235
6f5a5b88-c847-42ab-a454-4e0fd04054af
SteponasK/IT-12-klase
IT-VBE-2019/2-Uzduotis/main.cpp
#include <iostream> #include <fstream> #include <string> // 2019 metu 2 uzd Begimas struct Sportininkai{ std::string name{}; // vardas bool vaikinas; // lytis bool finished; // ar baige lenktynes int num{}; // numeris int start_h; // starto laikas int start_min; int start_sec; int end_h ...
ALGO
0.996194
3.63472
97092d04-bc93-4548-a0e9-65e2a30145c9
mrinaldi2/Codility
src/cyclicRotation.cpp
#include <vector> #include <iostream> using namespace std; // you can use includes, for example: // #include <algorithm> // you can write to stdout for debugging purposes, e.g. // cout << "this is a debug message" << endl; vector<int> solution(vector<int> &A, int K) { // write your code in C++14 (g++ 6.2.0) i...
ALGO
0.999376
5.144337
99ae3892-ea9a-43c5-adaf-058fbb1cda03
salimmia/Problem-Solving
Code_Template/Codes/Code Archive/MIST NCPC 2020/I.cpp
#include<bits/stdc++.h> using namespace std; ///typedef typedef long long ll; typedef pair<int, int> pii; ///define constant const ll mxn = 100005; const int mod = 1000000007;//1e9+7; ///faster io #define faster_io ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); ///debug #define watch(x) cout << __LINE__ << " ...
ALGO
0.999978
4.800869
4caa9a01-aeb2-46aa-bceb-56cc383d4941
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_8715_10.cpp
#include <bits/stdc++.h> using namespace std; const int N = 5 * 1e5 + 1; int ans[6]; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; map<string, int> a = {{"purple", 0}, {"green", 1}, {"blue", 2}, {"orange", 3}, {"red", 4}, {"yellow", 5}}; map<int, string> b ...
ALGO
0.997488
3.985837
1bd31268-4d96-4f56-83de-ea9011af2a56
ProgramTraveler/leetcode
Leetcode_Question/76.最小覆盖子串.cpp
/* * @lc app=leetcode.cn id=76 lang=cpp * * [76] 最小覆盖子串 */ // @lc code=start class Solution { public: unordered_map<char, int> ori, cnt; bool check() { for (const auto &p : ori) { if (cnt[p.first] < p.second) return false; } return true; } string minWindow(st...
ALGO
0.99994
7.073436
47de8092-328f-453b-aa0e-a3c223d5d4de
strejda/tegra
contrib/llvm-project/llvm/lib/CodeGen/LiveVariables.cpp
#include "llvm/CodeGen/LiveVariables.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallSet.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/Pas...
TOOL
0.969463
7.912313
0177a42c-0f03-4f13-a6cb-3d6c9c6fc41f
Michael-Q-Ly/Beginning_CPP
011_Functions/ArraysAndFunctions/src/main.cpp
// Section 11 // Arrays and Functions #include <iostream> void print_array( int const arr[], size_t size ) ; void set_array( int arr[], size_t size, int value ) ; int main() { int my_scores[] { 100, 98, 90, 86, 84 } ; print_array( my_scores, 5 ) ; set_array( my_scores, 5, 100 ) ; print_array( my_scores, 5 ) ; ...
TOOL
0.860516
5.523389
6c6e7b3a-8ad9-4f60-84ad-6efe55d6e39f
dmitrii-marin/adm-seg
deeplab/code/src/caffe/filterrgbxy.cpp
#include "caffe/filterrgbxy.hpp" void filterrgbxy(const float* image, const float* values, int img_w, int img_h, float sigmar, float sigmag, float sigmab, float sigmax, float sigmay, float* out){ float * pos; float * val; val = new float[img_w*img_h]; pos = new float[img_w*img_h*5]; //float pos_sum[5]={0,0,0,0,0}...
ALGO
0.991818
5.919478
e33dc6d0-ee61-4ecc-b2aa-70deea4b34b7
npriyanshu/Data-Structure
16_stack/problems/two_stack_in_arr.cpp
#include<iostream> using namespace std; // ***** two stack class #include <bits/stdc++.h> class TwoStack { int *arr; int top1; int top2; int size; public: // Initialize TwoStack. TwoStack(int s) { this->size = s; top1 = -1; top2 = s; arr = new int[s]; } ...
ALGO
0.995939
4.335809
d5312e6b-a0de-4bda-9b32-a08e7f8cc7e8
DNCHOW1/CompetitiveProgramming
430/week4_lab/g_keyser_method.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; typedef long long ll; typedef pair<int,int> p32; typedef pair<ll,ll> p64; typedef vector<ll> v64; typedef vector<int> v32; typedef vector<vector<int> > vv32; type...
ALGO
0.999999
4.090072
efab2e0b-b854-42ca-b492-d2340c5d24fa
xuanthu2002/DSA_PTIT_He_2023
DSA05001_xau con chung dai nhat.cpp
#include <iostream> #include <cstring> using namespace std; int qhd(string s1, string s2) { int n = s1.length(), m = s2.length(); int f[n + 1][m + 1]; memset(f, 0, sizeof(f)); for(int i = 1; i <= n; i++) { for(int j = 1; j <= m; j++) { if(s1[i - 1] == s2[j - 1]) { f[i][j] = f[i- 1][j - 1] + 1; } el...
ALGO
0.999853
5.00742
e44b5eab-2fe0-4849-9df5-e7d3652bc60b
nhkieu21/CPlusPlus
MAX3SO.cpp
#include<bits/stdc++.h> using namespace std; int main () { long long a,b,c,kq; cin>>a>>b>>c; kq=a; if (kq<b) { kq=b; } if (kq<c) { kq=c; } cout<<kq; }
ALGO
0.999932
3.597468
1b83c8ec-6581-44d0-bd59-a683177c3fa9
alexandrocw/CP-training
Codeforces/141A_AmusingJoke.cpp
#include <iostream> using namespace std; string solve(int arr1[26], int arr2[26], int arr3[26]) { for(int i = 0; i < 26; i++) { if(arr1[i] + arr2[i] != arr3[i]) { return "NO"; } } return "YES"; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); string a,...
ALGO
0.999954
4.797714
929dab25-06b3-40ae-b4a0-897da7c1ddc8
waitwalker/FlutterDemos
pluginTest/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.998362
6.76073
e988c739-f71a-4240-93b2-da6cba4a1773
manikanta2901/ubuntu
.history/random/trees/QuerySum_20200729145618.cpp
#include<iostream> using namespace std; #define m 10 int t[4 * m]; // building of segment tree in O(n) void build(int a[],int v,int tl,int tr){ if(tl == tr){ t[v] = a[tl]; }else{ int tm = (tl + tr)/2; build(a,2 *v,tl,tm); build(a,2 * v + 1,tm + 1,tr); t[v] = t[2 * v] + ...
ALGO
0.999978
4.930572
9cf1697d-e42a-4423-a85f-9a787887be08
manindhra1412/Data-Structures-and-Algorithms
Linked list/Detect-find-removeLoop.cpp
/* class Node { public : int data; Node *next; Node(int data) { this -> data = data; this -> next = NULL; } }; */ // Detect loop Node *floydetectloop(Node *head) { if (head == NULL) return NULL; Node *slow = head; Node *fast ...
ALGO
0.999942
5.200709
ff70b421-236a-4fb5-a984-76102a33ef0e
KatLab-MiyazakiUniv/learn-github-2021
hirayama/Direction.cpp
// hirayama のプログラム #include <stdio.h> using namespace std; enum class Direction { N,NE,E,SE,S,SW,W,NW }; struct Coodinate { int x; int y; }; Direction CalcNextDirection(Coodinate current_coodinate, Coodinate next_coodinate) { int diff_x = next_coodinate.x - current_coodinate.x; int diff_y = ne...
ALGO
0.999578
3.888085
2981434c-1a2f-481d-adaa-f359ffa62ea6
prakhar7017/DSA-CPP
1016-subarray-sums-divisible-by-k/subarray-sums-divisible-by-k.cpp
class Solution { public: int subarraysDivByK(vector<int>& nums, int k) { int n=nums.size(); unordered_map<int,int>mp; mp[0]=1; int result=0; int sum=0; for(int i=0;i<n;i++){ sum+=nums[i]; int rem=sum%k; if(rem<0){ ...
ALGO
0.999963
5.922981
fbd3ee53-e750-4594-8749-017c16ef624e
TuliDas/Problem_Solving-Source_Code
LightOJ Solutions/LOJ-1090-Trailing Zeroes (II).cpp
/* Number Theory Problem Name : LOJ-1090-Trailing Zeroes (II) Problem Link : https://lightoj.com/problem/trailing-zeroes-ii Language : C++ 11 Verdict : ACCEPTED Solved On : 2018-04-04 */ #include<bits/stdc++.h> using namespace std; #define M 1000000 #define ll long long ll nCr5[M+5]; ll nCr2[M+5]; void c...
ALGO
0.999861
4.772328
7b20b47e-b5db-40ed-ad43-e834f83960a3
AbdelruhmanSamy/competitive-programming
CF/Special Offer! Super Price 999 Bourles!_219B.cpp
// // Created by abdelruhman on 6/22/24. // #include<bits/stdc++.h> using namespace std; typedef long long ll; #define pii pair<int , int> #define lp(i, j, n) for (int i = j; i <= n; i++) #define vi vector<int> #define popcnt(a) __builtin_popcount(a) #define vvi vector<vector<int>> #define vll vector<ll> #define vch ...
ALGO
0.999881
5.521201
4c9c2e79-ccf3-4a7d-99d2-5136735c3158
MustagheesButt/Uni-shit
Compiler Construction/Assignment 3/assg3.cpp
/* output class tokens * Identifiers and numbers only + errors */ #include <iostream> #include <string> #include <vector> #include "Specification.h" using namespace std; /* CONSTS */ const int MAX_LOOKAHEAD_ALLOWED = 1; /* helpers */ template<typename T> std::vector<T> slice(std::vector<T> const &v, int m, int n) {...
ALGO
0.978795
5.61381
b862e017-e151-414d-b4e8-b8fb2c11d48c
Vaibhav10sept/DSA
RECURSION/get-keypad-combination.cpp
#include <bits/stdc++.h> using namespace std; vector<string> getKeypadCombination(string str, vector<string> codes) { if (str.size() == 0) { vector<string> baseResult; baseResult.push_back(""); return baseResult; } char code = str[0]; int IntCode = code - '0'; string pattern = codes[IntCode]; string restOf...
ALGO
0.999771
4.887476
4805a76a-f7e4-4ac4-9171-4ce73beee0b2
ishandutta2007/codeforces
realcomplex/normal/1661/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define fi first #define se second #define mp make_pair #define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); const int N = (int)5e5 + 10; int d[3][N]; pii par[3][N]; vector<pii> reset; pii fin(pii X){ ...
ALGO
0.999947
3.971639
4d1c434b-8251-4cbf-a55b-16dfa1c1e14d
mrkaban/FreeArc-0.67
Compression/REP/C_REP.cpp
extern "C" { #include "C_REP.h" } #define REP_LIBRARY #include "rep.cpp" /*-------------------------------------------------*/ /* REP_METHOD */ /*-------------------------------------------------*/ // , REP_METHOD::REP_METHOD() { BlockSize = 64*mb; MinCompression = 100; ChunkSi...
TOOL
0.97589
5.479328
e8776f48-763c-40e7-9657-795af340916a
hjiang13/LLMs-in-IR
POJ-104/25/476.cpp
#include <iostream> using namespace std; int main() { int N,num[110]={ 0} ,an[110]={ 0} ,i; num[0]=1; an[0]=1; cin>>N; while(N--) { memset(an,0,sizeof(an)); for(i=0; i<110; i++) an[i]=num[i]*2; for(i=0; i<110; i++) { if(an[i]>=10) { an[i+1]+=an[i]/10; an[i]=an[i]%10; } } for(i=0; i<110; i++) num[i]=an[i]; } if(an[0]==1...
ALGO
0.999975
3.721676
d9699943-7faa-4d16-8c4f-9c594e0804ae
Laguna1989/AdventOfCode_2020
day_01/main.cpp
#include "data.hpp" #include <iostream> #include <set> // Idea: // set<int> which contains the elements in an ordered way // three iterators on data. // * One starts from begin (left) // * One starts from begin+1 (center) // * One starts from rbegin (right) // // Steps in the algorithm: // * move (...
ALGO
0.998953
4.9563
9b7f5647-68a0-4ead-8097-fc029417b13a
realxinzhao/GCAM_aglu_parameter
cvs/objects/util/base/source/configuration.cpp
/*! * \file configuration.cpp * \ingroup Util * \brief Configuration class source file. * \author Josh Lurz * \date $Date: 2007/01/11 00:13:33 $ * \version $Revision: <IP_ADDRESS> $ */ #include "util/base/include/definitions.h" #include <string> #include <map> #include <iostream> #include "util/base/include/configurat...
CONFIG
0.931733
5.635353
e89a8197-f060-4098-b156-bea0abbf23d0
sarvex/leetcode-beef
solution/2300-2399/2321.Maximum Score Of Spliced Array/Solution.cpp
class Solution { public: int maximumsSplicedArray(vector<int>& nums1, vector<int>& nums2) { int s1 = 0, s2 = 0, n = nums1.size(); for (int i = 0; i < n; ++i) { s1 += nums1[i]; s2 += nums2[i]; } return max(s2 + f(nums1, nums2), s1 + f(nums2, nums1)); } ...
ALGO
0.999987
5.653466
e1a3799e-fe55-4bec-a719-180e994a4f54
urahara056/lp2-ai-corr.codes
AI6_Employee_performance_evaluation.cpp
#include <iostream> #include <string> using namespace std; // Structure to represent employee information struct Employee { string name; int attendanceScore; int productivityScore; int qualityScore; }; // Function to evaluate employee performance based on rules string evaluatePerformance(const Employ...
ALGO
0.926454
6.888824
d2c86913-3d71-4456-b030-67d824d355c1
sinian666/code_41_12
cpp_副本/chapter_sorting/radix_sort.cpp
/** * File: radix_sort.cpp * Created Time: 2023-03-26 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 获取元素 num 的第 k 位,其中 exp = 10^(k-1) */ int digit(int num, int exp) { // 传入 exp 而非 k 可以避免在此重复执行昂贵的次方计算 return (num / exp) % 10; } /* 计数排序(根据 nums 第 k 位排序) */ void countingSortDigit(vector<...
ALGO
0.999921
5.788882
dec0afbc-c2d9-4b4d-a91d-6b5ef0f75e4d
duttresearchgroup/Chauffeur
applications/structure_from_motion/open-mvg/src/dependencies/osi_clp/Osi/src/Osi/OsiRowCutDebugger.cpp
#include <cstdlib> #include <cstdio> #include <cassert> #include <cmath> #include <cfloat> #include <string> #include <iostream> #include "CoinPragma.hpp" #include "CoinHelperFunctions.hpp" #include "CoinPackedVector.hpp" #include "CoinPackedMatrix.hpp" #include "CoinWarmStartBasis.hpp" #include "OsiRowCutDebugger.hp...
ALGO
0.98953
6.73048
da8f097e-7126-4cd9-9e3d-8149ce2f9894
ishandutta2007/codeforces
burnedchicken/normal/1142/E.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2,fma,tune=native") #define ll long long #define int ll #define ull unsigned ll #define ld long double #define rep(a) rep1(i,a) #define rep1(i,a) rep2(i,0,a) #define rep2(i,b,a) ...
ALGO
0.999933
4.45403
458cf6cd-1c31-49a7-a4dd-9336f6d57750
sourabh59-coder/StriverA-Z_Sheet
Step 15: Graphs/Lec 4: Shortest Path Algorithms and Problems/03. Dijikstra/Approach1.cpp
vector <int> dijkstra(int V, vector<vector<int>> adj[], int S) { vector<int> ans(V+1,1e9); priority_queue <pair<int,int>, vector<pair<int,int>>, greater<pair<int,int>>> qe; ans[S] = 0; qe.push({ans[S],S}); while(!qe.empty()) { auto node =...
ALGO
0.999865
4.817898
67141e92-c6fc-4952-8138-6338ace9552a
gilsanguk/Algorithm
SWEA/D4/1232. [S/W 문제해결 기본] 9일차 - 사칙연산/[S/W 문제해결 기본] 9일차 - 사칙연산.cpp
#include <iostream> using namespace std; int N; struct Node { bool isLeaf; int data; char op; int left, right; Node() { isLeaf = false; data = 0; op = 0; left = 0; right = 0; } } tree[1001]; void init() { for (int i = 0; i < 1001; i++) { tr...
ALGO
0.999839
3.785218
1444052e-017f-475c-91ce-03d050c230c4
khan3575/LastPush
YouKnowWhoAcademyTasks/stringGame.cpp
#include<bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; #define ll long long #define FastIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) int main() { FastIO; string s,t; cin >> s >> t; int n = s.size(); vector<int>charArr(26); for(int i = 0; i < n; i++) { charArr[s[i]-'a']++; } vector...
ALGO
0.999974
3.475979
c7dde136-178a-4023-bd4e-568750838ce6
blockspacer/chrome-view
chrome/src/third_party/icu/source/i18n/utf16collationiterator.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_COLLATION #include "charstr.h" #include "cmemory.h" #include "collation.h" #include "collationdata.h" #include "collationfcd.h" #include "collationiterator.h" #include "normalizer2impl.h" #include "uassert.h" #include "utf16collationiterator.h" U_NAMESPACE_BEGIN UTF16Coll...
TOOL
0.905327
6.697597
0bc6c24e-76c4-4853-9c06-6231eb62b1cf
ishmeet-codes/c-program
c/8.1.cpp
#include <stdio.h> int main() { int m, n, i,j, first[10][10], second[10][10], sum[10][10]; printf("Enter the number of rows and columns of the matrices\n"); scanf("%d%d", &m, &n); printf("Enter the elements of first matrix\n"); for (i = 0; i < m; i++) for (j = 0; j < n; j++) scanf("%d", &first[i]...
ALGO
0.998641
3.922585
db84fe85-bce8-471d-a08d-c64389ff5d8f
feliciasutanto/NERS-590-hw3
Reaction.cpp
#include "Reaction.h" #include "Particle.h" #include "Distribution.h" #include <iostream> void capture_reaction::sample( particle* p, std::stack< particle >* bank, double A ) { p->kill(); } void scatter_reaction::sample( particle* p, std::stack< particle >* bank, double A ) { double mu0 = scatter_dist->samp...
ALGO
0.983144
5.278302
be4d8697-a760-42a6-b14a-d9a4a80be62a
ishandutta2007/codeforces
tute7627/normal/815/B.cpp
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> using namespace std; #define endl '\n' #define lfs cout<<fixed<<setprecision(10) #define ALL(a) (a).begin(),(a).end() #define ALLR(a) (a).rbegin(),(a).rend() #define spa << " " << #define fi first #define se second #define MP make_pair #define MT make_tuple #define P...
ALGO
0.999997
3.709028
2b0b0f80-e11a-4318-8793-c9de47309734
MojammelSojib/Codeforces-Solve
codeforces2.11.25/A_Pangram.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin>>t; string s; cin>>s; set<char>x; for(char ch:s) { x.insert(toupper(ch)); } if(x.size()==26) cout<<"YES"<<'\n'; else cout<<"NO"<<'\n'; ret...
ALGO
0.999941
4.467086
89c29b55-0761-49fc-82b9-0df7bf1b854f
raincross7/code-similarity
codes/train_code/problem342/problem342_36.cpp
#include<iostream> #include<algorithm> #include<math.h> #include<string> #include<tuple> #include<vector> #include<cstdlib> #include<cstdint> #include<stdio.h> #include<cmath> #include<limits> #include<iomanip> #include<ctime> #include<climits> #include<random> #include<queue> #include<map> using namespace std; temp...
ALGO
0.99988
3.649218
71205763-7864-464a-a447-22a6d022fd75
MoeinGhaniyoun/LLVM-SLH-RISCV
libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy_if.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14, c++17 // <algorithm> // template<input_iterator I, sentinel_for<I> S, class T, output_iterator<const T&> O, // class Proj = identity, indirect_unary_predicate<projected<I, Proj>> Pred> // requires indirectly_copyable<I, O> // constexpr replace_copy_if_result<I, O> // ...
TEST
0.946512
7.777751
499783d6-6ef1-4867-8bef-a7da7d6fec33
AlxndrKlbk/CS-course
C++/dummies/old_cpp/erase_remove_idiom/erase_remove_idiom.cpp
#include <algorithm> #include <vector> #include <iostream> namespace { constexpr int BORDER_VALUE_INDEX = 1; constexpr int VALUES_START_INDEX = 2; template<typename T> void vectorPrint(T const& toPrint) { const auto placeholder = "; "; for (const auto &i : toPrint) std::cout << i << placeholder; ...
ALGO
0.997592
5.468826
dfde00b0-1402-42d6-acc1-ad04a24884a2
eugene-doobu/knoucpp
Chapter.2/4.cpp
int main() { int inVal = 0, sum = 0; while (inVal >= 0) { sum += inVal; std::cin >> inVal; } std::cout << sum << std::endl; }
ALGO
0.998927
4.251044
b492fc37-d2fb-47f8-920b-9eac24e69963
SHREY247/didactic-umbrella
Arrays/Binary_Search/Search2DMatrixII(Leetcode240).cpp
/*Write an efficient algorithm that searches for a value target in an m x n integer matrix matrix. This matrix has the following properties: Integers in each row are sorted in ascending from left to right. Integers in each column are sorted in ascending from top to bottom.*/ /*Input: matrix = [[1,4,7,11,15],[2,5,8,12...
ALGO
0.999954
6.448225
abfad618-2b34-4e94-a470-e51a86ba9a32
WU-CVGL/MVControl
extern/sugar/gaussian_splatting/submodules/diff-gaussian-rasterization/third_party/glm/test/core/core_func_integer_find_msb.cpp
#include <glm/glm.hpp> #include <cstdio> #include <cstdlib> // To define "exit", req'd by XLC. #include <ctime> #define LE 1 // 1 for little-endian, 0 for big-endian. int pop(unsigned x) { x = x - ((x >> 1) & 0x55555555); x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0...
ALGO
0.998543
3.60046
df3a6565-0b88-49e1-a9d8-9ca76fc66c5f
Al-mizan/Competitive-Programming
codeforces/contests/990 (Div. 2)/C_Swap_Columns_and_Find_a_Path.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define endl '\n' #define ff first #define ss second #define pi acos(-1) #define mod 1000000007 #define newline cout << '\n' #define no ...
ALGO
0.999959
4.641076
29486edd-8d83-48bc-9b64-95752b4de189
lipsa22/LeetCode
0div-idbig-omega-company-tagsdiv-idbig-omega-topbardiv-classcompanytagscontainer-styleoverflow-x-scroll-flex-wrap-nowrap-div-classcompanytagscontainer-tagno-companies-found-for-this-problem-div-divdiv-classcompanytagscontainer-chevrondivsvg-version11-idicon-xmlnshttp-wwww3org-2000-svg-xmlns-xlinkhttp-wwww3org-1999-xlin...
/** * 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.999966
5.610755
fc08b2f6-2330-44eb-85c5-c3f3cca3df74
yaoxiyu/ue5
Engine/Source/ThirdParty/Alembic/alembic-1.8.2/lib/Alembic/Util/Murmur3.cpp
#include <Alembic/Util/Murmur3.h> #include <Alembic/Util/PlainOldDataType.h> namespace Alembic { namespace Util { namespace ALEMBIC_VERSION_NS { //-***************************************************************************** void MurmurHash3_x64_128 ( const void * key, const size_t len, co...
ALGO
0.95873
6.710493
37bd3e07-66d8-4e89-87f7-1f59e64d7716
rahulsrivastava1/DSA-BASKET
Backtracking/rat_in_a_maze_1.cpp
// Rat in a maze problem // Expected Time Complexity :- O((3N^2)) // Expected Auxiliary Space: O(L * X) // Where, L = length of the path, X = number of paths. // only function // utility function void solve(int row,int col,string str,vector<vector<int>> &m,vector<string> &ans){ int n=m.size(); if(row<0 || row>=n ...
ALGO
0.999897
6.199601
fb88134b-3eae-4fb2-ab43-a9b4f052db0d
nisha2109/APS-2020
onlydigitString.cpp
#include<bits/stdc++.h> using namespace std; bool Isdigit(string &str) { int i=0,n=str.length(); for(i=0;i<n;i++) { if(str[i]>='0'&& str[i]<='9') continue; else return false; } return true; } int main() { string str; cout<<"Enter the string:"; cin>>str; if(Isdigit(str)) cout<<"All digits"<<endl;...
ALGO
0.995584
3.741476