uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
beba9c28-2a3b-4b96-94ac-4ca80be26f6b
todus26/HW_Object-Oriented-Programming_C
2-3.cpp
//실습 2-3 : 사용자로부터 2개의 정수를 입력 받아 큰 값을 출력하는 프로그램 작성하기. #include <iostream> using namespace std; bool bigger(int a, int b, int& big) { if (a == b) return true; else if (a > b) { big = a; return false; } else { big = b; return false; } } int main() { int x, y, big; bool b; cout << "두 정수를 입력하세요>> "; cin ...
ALGO
0.994848
3.903437
daf63f84-8d5c-400e-8b58-6e12fe71ef4e
45-Akash/LeetCode
2079-watering-plants/2079-watering-plants.cpp
class Solution { public: int wateringPlants(vector<int>& plants, int capacity) { int cap = capacity; int ans = 0; int n = plants.size(); for(int i=0; i<n; i++) { if(plants[i]<=cap) { cap -= plants[i]; ans++;...
ALGO
0.999974
6.120426
14d083ac-e5c6-4fba-ac7b-279035472d53
eren-aydemir/Path-Planning
src/Eigen-3.3/doc/examples/TutorialLinAlgExSolveLDLT.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2f A, b; A << 2, -1, -1, 3; b << 1, 2, 3, 1; cout << "Here is the matrix A:\n" << A << endl; cout << "Here is the right hand side b:\n" << b << endl; Matrix2f x = A.ldlt().solve(b); cout << "...
ALGO
0.999791
3.804243
64dea8e7-c960-450c-b696-e0a3f2b42bea
Uday-Berad22/GFG-questions
Medium/Course Schedule/course-schedule.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: bool isCycle(vector<bool> &visited,int i,unordered_map<int,int> &m,unordered_map<int,int> &m2){ if(m2[i]==0){ return false; } ...
ALGO
0.999903
6.970127
1a601785-b5b2-4c34-aaeb-177e1d2cb550
MdAsimKhan/Striver-SDE-2022-Solutions
LCS.cpp
//TABULATION DP O(N X M) S(N X M) int longestCommonSubsequence(string text1, string text2) { int n=text1.size(),m=text2.size(); vector<vector<int>> dp(n+1, vector<int>(m+1,-1)); for(int i=0;i<=n;i++) dp[i][0]=0; for(int i=0;i<=m;i++) dp[0][i]=0; for(int i=1;i<=n;i++){ ...
ALGO
0.999526
5.924703
0f9cb8ab-bbac-46db-af23-bcc6e15dab6b
nishtha981/leetcode
0231-power-of-two/0231-power-of-two.cpp
class Solution { public: bool isPowerOfTwo(int n) { if(n==1) return(true); if(n<=0) return(false); while(n>1) { if(n%2!=0) return(false); n=n/2; } return(true); } };
ALGO
0.998339
5.983146
f53f3578-1f12-4265-9fbc-cbaab565b5be
zcfyz/LABs
lab1/main.cpp
#include <iostream> #include "ShuntingYard.h" #include "DynamicArray.h" int main() { while (true) { std::cout << "1. List" << std::endl; std::cout << "2. Array" << std::endl; std::cout << "3. Stack" << std::endl; std::cout << "3. ShuntingYard" << std::endl; std::cout << "5. ...
TOOL
0.868975
4.272121
51f52366-d8b0-4bc5-b2b1-c2aa04630558
kpeel5839/LeetCode
2373-largest-local-values-in-a-matrix/2373-largest-local-values-in-a-matrix.cpp
class Solution { public: typedef vector<int> vi; typedef vector<vi> vii; vector<vector<int>> largestLocal(vector<vector<int>>& grid) { int h=grid.size(); int w=grid[0].size(); vii answer(h-2,vi(w-2,0)); for(int i=0;i<h-2;i++){ for(int j=0;j<w-2;j++){ ...
ALGO
0.999951
5.668584
ea5eb767-b494-4d29-b8bb-6960be34b03c
oscarlaaaa/fun-algo-stuff
LeetCode/Hard/2402_Meeting_Rooms_3/Solution.cpp
// 2023-01-24 (min-heaps) class Solution { public: #define ll long long int mostBooked(int n, vector<vector<int>>& meetings) { vector<pair<int, int>> updatedMeetings; for (vector<int>& m : meetings) { updatedMeetings.push_back({m[0], m[1]-m[0]}); } sort(upd...
ALGO
0.999998
6.329372
1ddc6811-4534-4f50-b156-e0e94ec0dabd
basar-yilmaz/METU-CENG
CENG334 OPERATING SYSTEMS/the1/main.cpp
#include <iostream> #include <unistd.h> #include <sys/wait.h> #include "parser.h" void exe_subshell(char *subshell); void exe_command(command *cmd); void exe_pipe_general(pipeline *pipe_); void execute_parallel(parsed_input *input); // int check_subshell(parsed_input *input); // Check if input is a subshell void...
TOOL
0.973299
4.143863
131e0a8c-7626-4f23-9e73-fc09cf6f5ed9
YoussefElkawaga/astor-acad-2
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
683ce951-a743-4652-9406-b8184581dc4e
Bei-Luo/zhbit
zhbit_19_最短路/POJ 3660.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <string.h> #include <vector> #include <set> #include <queue> #include <map> #include <stack> #include <sstream> #include <utility> using namespace std; const int INF = 0x3f3f3f3f; int id[150][150]; int N, M; int main() { int h = 1; ...
ALGO
0.999277
3.94859
26962636-e785-410c-9f98-0f634d1566ad
sinian666/codes_41_5
cpp_副本7/chapter_searching/hashing_search.cpp
/** * File: hashing_search.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 哈希查找(数组) */ int hashingSearchArray(unordered_map<int, int> map, int target) { // 哈希表的 key: 目标元素,value: 索引 // 若哈希表中无此 key ,返回 -1 if (map.find(target) == map.end()) return -...
ALGO
0.999778
5.437144
680243cd-cabf-4842-a50b-0d432463003e
AllenW1116/Cpp-algorithm
算法设计/作业1-5.cpp
#include<iostream> #include<vector> #include<algorithm> #include<stdio.h> using namespace std; //5. ģ¶ֲҹһֲ㷨ʱ临Ӷȡ int TriSearch(int a[], int low, int high, int k)//kҪҵԪ,a[]һ //㷨 { int lmid,hmid; if (low <= high) //ǰԪʱ { hmid = (high-low) *2/3+low; lmid = (high - low) * 1 / 3+low; if (a[lmid] == k || a[hmid]==...
ALGO
0.99985
4.397118
0da38baa-0c2e-4a63-9149-a6e6e2f0b7ea
akanksha984/Striver-SDE-Challenge-2023
Next Greater Element.cpp
#include <bits/stdc++.h> vector<int> nextGreater(vector<int> &arr, int n) { // Write your code here vector<int> nge(n,-1); stack<int> stk; for (int i=n-1; i>=0; i--){ if (!stk.empty()){ if (stk.top()> arr[i]){ nge[i]= stk.top(); stk.push(arr[i]); ...
ALGO
0.999985
4.767428
368d1039-a856-47aa-815f-6821ebacea54
12anjali39/DAA-Portfolio
Prim's Algorithm.cpp
#include <iostream> #include <vector> #include <climits> using namespace std; #define V 5 // Number of vertices int minKey(int key[], bool mstSet[]) { int min = INT_MAX, minIndex; for (int v = 0; v < V; v++) { if (!mstSet[v] && key[v] < min) { min = key[v]; minIndex = v; ...
ALGO
0.999941
4.978826
2842c4b8-6079-4862-9a26-fac6a45cc788
rifat-sk/Solved-Problems
Codeforces Problem/Implementation/118B - Present from Lena.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int row = (2 * n) + 1; int col = (2 * n) + 1 + (2 * n); int col2 = (2 * n) + 1; bool visit1 = false, visit2 = false; int st = (2 * n) + 1; int mid = col2; for (int i = 1; i <= row; i++) { int digit = 0; for (int j = 1; j <= col2;...
ALGO
0.999985
3.19156
c3926f91-4385-49f9-9053-e637515cff5f
dblock/msiext
externals/cryptopp/adler32.cpp
// adler32.cpp - written and placed in the public domain by Wei Dai #include "pch.h" #include "adler32.h" NAMESPACE_BEGIN(CryptoPP) void Adler32::Update(const byte *input, size_t length) { const unsigned long BASE = 65521; unsigned long s1 = m_s1; unsigned long s2 = m_s2; if (length % 8 != 0) { do { s1...
ALGO
0.98425
6.606503
72070fcf-6c25-4097-baee-71db77f9b7f0
HCH01/flutter-ui-component
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.9988
6.76073
39399909-ff91-49fd-b0c4-7abe099934e4
Pra-kas/TechDose-Assignment
BitManipulation/noOfSetBits.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; // O(1) approach cout << __builtin_popcount(n) << endl; // O(no of setbits) int ans = 0; while(n){ n = n & (n-1); ans++; } cout << ans << endl; }
ALGO
0.999975
5.087061
65dd6e93-cf6a-468e-861f-49c713deb65a
mzasa/LeetCode
859. Buddy Strings 78.34% 99.57%/Main.cpp
class Solution { public: bool buddyStrings(string s, string goal) { if(s.size() != goal.size()) return 0; if (s == goal) { set<char> t(s.begin(), s.end()); return t.size() < goal.size(); } int i = 0, j = s.size() - 1; while (s[i] == goal[i...
ALGO
0.999865
5.347603
ec205f50-84a6-43ec-bd50-b54c58fe0f41
windcry1/My-ACM-ICPC
CodeForces/1332 C.cpp
/************************************************************************* >>> Author: WindCry1 >>> Mail: <EMAIL> >>> Website: https://windcry1.com >>> Date: 12/30/2019 11:03:37 PM *************************************************************************/ //#pragma GCC optimize(2) //#pragma GCC diagnostic error "-std=c...
ALGO
0.999821
3.908476
06cba2be-2cd7-464a-b62c-f76e4ea2b688
dpidpalyi/lippman
ch10/ex_10_27.cpp
#include <iostream> #include <vector> #include <iterator> #include <algorithm> using std::cout; using std::cin; using std::endl; using std::vector; int main() { vector<int> src = {1, 2, 3, 3, 4, 5, 5, 6, 7, 8}; vector<int> dst; std::unique_copy(src.cbegin(), src.cend(), std::back_inserter(dst)); for (const auto ...
ALGO
0.999255
4.88718
8e91441d-c057-4725-b8f3-2f5c20ab727e
nishatfatima25/LeetCode-Problem-Solving
Easy/1128_No_of_Equivalent_Domino_Pairs.cpp
// LeetCode Problem : 1128. Number of Equivalent Domino Pairs // Link : https://leetcode.com/problems/number-of-equivalent-domino-pairs/description/ class Solution { public: int numEquivDominoPairs(vector<vector<int>>& dominoes) { map<pair<int, int>, int> mpp; int count = 0; ...
ALGO
0.999842
6.560553
177f9e88-a7c9-4881-867d-a29d90b9ef12
kohsheen1234/dynamic-programming
Q7-RheoAndPrimeProblems.cpp
//link - https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/practice-problems/algorithm/rhezo-and-prime-problems/ #include<bits/stdc++.h> #define MAXN 5005 using namespace std; vector<int> v; bool vis[5005]; int arr[5005]; int pre[5005] ; int dp[5005]; int n; voi...
ALGO
0.999907
3.459978
7851a4ba-961b-4cbc-87a1-9c6a6a5dce48
Buttiyeeppp/Code
Codeforces/GYM100500B.cpp
#include <bits/stdc++.h> using namespace std; #define clo 1000.*clock()/CLOCKS_PER_SEC #ifndef xxzx #define endl '\n' #endif using ll=long long; using PII=pair<int,int>; const int N=1e3+10; const ll P=131; const ll Mod=1e9+7; bool mem1; int n,cs; ll v[5],Pn,a[5][N]; unordered_set<ll> mp; void calc(int op,int i) { v...
ALGO
0.999882
4.158492
62955588-1501-4704-8e8f-be49d3a7275a
mkiuur/Knights-and-Monsters
kinematics/libigl/include/igl/mosek/bbw.cpp
template < typename DerivedV, typename DerivedEle, typename Derivedb, typename Derivedbc, typename DerivedW> IGL_INLINE bool igl::mosek::bbw( const Eigen::PlainObjectBase<DerivedV> & V, const Eigen::PlainObjectBase<DerivedEle> & Ele, const Eigen::PlainObjectBase<Derivedb> & b, const Eigen::PlainObject...
ALGO
0.9991
6.080972
982b4cc4-51f4-4198-a8a4-fddd87480daf
raincross7/code-similarity
codes/train_code/problem378/problem378_40.cpp
#include<iostream> using namespace std; int main(){ long long n,i,array[10000],max,min,total=0; cin >> n; for(i = 0; i < n; i++){ cin >> array[i]; } max = array[0]; min = array[0]; for(i = 0; i < n; i++){ if(max < array[i]) max = array[i]; if(min > array[i]) min...
ALGO
0.999881
3.51669
2d27b68d-95e7-4c09-9069-f4b3289abe57
yjfiejd/bilibli_notes3
邓俊辉算法训练营/代码/week1/成绩排序.cpp
#include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> #include <queue> #include <stack> #include <map> #include <set> #include <vector> #include <iostream> using namespace std; typedef unsigned char uc; template<typename value_type> struct __Item{ typedef uns...
ALGO
0.999891
3.952044
6b83f523-60f2-49c1-b78c-a49dc9bc8ad4
lus6-Jenny/RING
utils/fast_gicp/thirdparty/Eigen/failtest/jacobisvd_int.cpp
#include "../Eigen/SVD" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { JacobiSVD<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
ALGO
0.924551
3.33146
3bf69040-5edb-45c6-b79a-9023e8c63368
oxygen-hunter/Flashboom
data/leetcode_cpp/count-subarrays-with-score-less-than-k.cpp
// Time: O(n) // Space: O(1) // sliding window, two pointers class Solution { public: long long countSubarrays(vector<int>& nums, long long k) { int64_t result = 0, total = 0; int left = 0; for (int right = 0; right < size(nums); ++right) { total += nums[right]; whi...
ALGO
0.999942
6.397259
e44b9547-fd27-4ebe-a67c-6b0811d8c560
catieslaughts/tidal-disruption-sim
ext/eigen/doc/examples/tut_arithmetic_matrix_mul.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { Matrix2d mat; mat << 1, 2, 3, 4; Vector2d u(-1,1), v(2,0); std::cout << "Here is mat*mat:\n" << mat*mat << std::endl; std::cout << "Here is mat*u:\n" << mat*u << std::endl; std::cout << "Here is u^T*mat:\n" << u.transpo...
ALGO
0.999414
3.830239
c1658c32-4562-47ec-8c97-595868133bae
ottlseo/data-structure
Week9_김윤서/tree_pr4.cpp
/* 3- 레벨 순회 코드 -- pass * 4. 수식 트리 계산 */ #include <stdio.h> #include <stdlib.h> #define MAX 100 typedef struct TreeNode { int data; TreeNode* left, * right; }TreeNode; TreeNode n1 = { 1,NULL,NULL }; TreeNode n2 = { 4,NULL,NULL }; TreeNode n3 = { '*',&n1,&n2 }; TreeNode n4 = { 16,NULL,NULL }; TreeNode n5 = { 25,NULL...
ALGO
0.999952
3.695737
3031a50c-973c-4f9f-a859-2ad87ec24242
harshalzilpe/Marvellous-LogicBuilding
program380.cpp
#include<iostream> using namespace std; typedef struct node { int data; struct node *next; }NODE, *PNODE; class stack { public: PNODE head; int iCount; stack() { head = NULL; iCount = 0; } void push(int no) { PNO...
ALGO
0.998144
4.11672
cdb9183a-b211-426f-b9a3-8f6d3e93d35d
shinjbin/algorithm
BOJ/class5/12852.cpp
#include <iostream> #include <queue> using namespace std; int N; int DP[1000001]; vector<int> answer; void Input() { cin >> N; for (int i = 1; i <= N; i++) { DP[i] = i; } } void Solution() { for (int i = 1; i <= N; i++) { if (i % 2 == 0) { DP[i] = min(DP[i...
ALGO
0.999994
4.344749
941a3268-046f-49f0-b097-55d60a39e610
gauravssah/DSA-ALL-IN-ONE
07 Strivers A2Z DSA CourseSheet RESTART/01 Strivers A2Z DSA Sheet/Step 1 Learn the basics/Lec 2 Build-up Logical Thinking/Patterns 01/Pattern-2_Right-Angled_Triangle_Pattern.cpp
#include <bits/stdc++.h> using namespace std; void printPattern(int n) { for (int i = 0; i < n; i++) { for (int j = 0; j <= i; j++) { cout << "* "; } cout << endl; } } void printTriangleABC(int n) { for (int i = 0; i < n; i++) { for (int j = 0; ...
ALGO
0.999694
4.132814
ec9a57df-cf4c-4e69-98a5-439fdc56d6e5
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/Year2021/January/ChefAndAnts_20210112151215.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.999899
3.582284
213c573d-767b-44a3-af99-a6d35d5d8172
mdozairq/DSA-internship
Task5/Task5-15.cpp
//merge linkedlist alternatively #include <bits/stdc++.h> using namespace std; class node { public: int data; node* next; node(int val){ data=val; next=NULL; } }; void insert(node * &head, int val){ node *n=new node(val); if(head==NULL){ head=n; retur...
ALGO
0.999914
4.478307
a15f7a90-5dff-49c1-aeed-710e9ea7c2e2
kongyejun/Embedded_system_Lib
K210SLModuleDevelopment/LVGL_TEST/GUI/LVGL/src/libs/thorvg/tvgSwMath.cpp
#include "../../lv_conf_internal.h" #if LV_USE_THORVG_INTERNAL #include "tvgMath.h" #include "tvgSwCommon.h" /************************************************************************/ /* Internal Class Implementation */ /**********************************************************...
ALGO
0.997357
5.628997
3d14aeb4-a898-4e90-961c-9e7ff6fe9452
sinha-sahil/ProblemSolving
NewQuestions/LongestStrIWthoutRepeat.cpp
#include<iostream> using namespace std; int max_length(string input){ unordered_map<char, int> table; vector<int> lenarr(input.size(), 1); int last_match = 0; for(int i=0; i<input.size(); i++){ auto findex = table.find(vi[i]); if(findex == table.end()){ int prev = (i == 0 ? ...
ALGO
0.999889
5.057128
0fcea47c-3760-4d98-99ca-cf6209f7913b
OsmarSantana369/Programacion
Parcial 2/Clase/Programa 71/Programa_71.cpp
//Programa 71 //Programa que elimina espacios de una cadena con mas de una palabra #include<iostream> #include<string.h> #include<stdio.h> using namespace std; main() { setlocale(LC_ALL, "spanish"); char cadena[20]; int i, t, tam; cout<<"\t\tPrograma que elimina espacios de una cadena con mas de una ...
ALGO
0.999118
3.686766
574dd767-fefb-4864-918e-21d07845cdd5
SidGit195/Competitive-Programming
Math (Number Theory)/GCD and LCM using Euclid's Algorithm With Applications.cpp
/* Important Formula # number1 X number2 == LCM X GCD(HCF) */ #include<bits/stdc++.h> using namespace std; // a -> dividend, b -> divisor int gcd(int a, int b){ // if(a%b == 0) // return b; if(b == 0) return a; return gcd(b, a%b); } // Time Complexity : O(log(n)) --> in case of divi...
ALGO
0.999871
4.749925
4a3d36dd-e133-48ad-b30f-c8bc17de0fca
VaibhavPaliwal0007/learnGithub
Hello/4_2d array/1_matrix.cpp
#include<iostream> using namespace std; int main() { int row,col; cin>>row>>col; int **arr = new int*[row]; for(int idx=0;idx<row;idx++) arr[idx]= new int[col]; //inputting a matrix for(int rowelement=0;rowelement<row;rowelement++) { for(int colelement=0;colelement<col;cole...
ALGO
0.97817
3.076941
2c804689-c16f-4cff-a3e4-8081d90d663d
alexandraback/datacollection
solutions_2449486_1/C++/kleninz/2.cpp
#include <set> #include <map> #include <cmath> #include <stack> #include <queue> #include <string> #include <cstdio> #include <vector> #include <utility> #include <cstdlib> #include <iostream> #include <algorithm> #define INF 2e9 #define pb push_back #define mp make_pair #define forn(i,n) for (int i = 0; i < n; i++) #d...
ALGO
0.99988
3.122997
ae979fd6-57ee-4a32-96c4-1873e4d2163b
rilesc555/recreateSim
include/eigen-3.4.0/bench/perf_monitoring/trmv_upt.cpp
#include "gemv_common.h" EIGEN_DONT_INLINE void trmv(const Mat &A, Vec &B, const Vec &C) { B.noalias() += A.transpose().triangularView<Upper>() * C; } int main(int argc, char **argv) { return main_gemv(argc, argv, trmv); }
ALGO
0.984627
4.898617
0996ea08-c750-4578-822f-9280adddc32f
ishandutta2007/codeforces
deemo/normal/611/E.cpp
#include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<vector> #include<stack> #include<queue> #include<deque> #include<set> #include<map> #include<string> #include<utility> #include<iomanip> #include<fstream> #include<list> #include<sstream> #include<cstring> #include<bitset> #include<functi...
ALGO
0.999935
3.362484
af6e0432-4409-4079-89be-b3679b11eb0c
AluminumKen/hl2sb-src
src/game/server/physics_fx.cpp
// memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" static int BestAxisMatchingNormal( matrix3x4_t &matrix, const Vector &normal ) { float bestDot = -1; int best = 0; for ( int i = 0; i < 3; i++ ) { Vector tmp; MatrixGetColumn( matrix, i, tmp ); float dot = fabs(DotProduct...
ALGO
0.907109
6.822565
6fca9eda-37a2-4fb7-9962-2f4a149d4fee
aprieels/3D-watermarking-spectral-decomposition
dependencies/PyMesh/tools/ConvexHull/ConvexHullEngine.cpp
#include "ConvexHullEngine.h" #include <sstream> #include <string> #include <Core/Exception.h> #ifdef WITH_CGAL #include "CGAL/CGALConvexHull2D.h" #include "CGAL/CGALConvexHull3D.h" #endif #ifdef WITH_QHULL #include "Qhull/QhullEngine.h" #endif #ifdef WITH_TRIANGLE #include "Triangle/TriangleConvexHullEngine.h" #e...
ALGO
0.926307
7.509188
07fc124f-b9e7-4ed3-ad87-11e4c020cbea
vikashpatel07/KIET_PPP
429-n-ary-tree-level-order-traversal/429-n-ary-tree-level-order-traversal.cpp
/* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node*> _children) { val = _val; children = _children; } }; */ class Solution { public: vector<vector<int>> levelOr...
ALGO
0.999965
6.024947
5f75ca43-fe5d-452f-96cf-d8a8aa8922c0
hando95/CodingTest
lab.cpp
#define _CRT_SECURE_NO_WARNINGS #define MAX_MAP_LEN 8 #define MAX_QUEUE_SIZE 65 #include <stdio.h> int lab_map[MAX_MAP_LEN][MAX_MAP_LEN]; int virus_map[MAX_MAP_LEN][MAX_MAP_LEN]; int visited[MAX_MAP_LEN][MAX_MAP_LEN]; int dx[4] = { 0, 0, -1, 1 }; int dy[4] = { -1, 1, 0, 0 }; int pop_x, pop_y; int max_safezone = 0; ty...
ALGO
0.999756
4.852711
c91820ba-be1a-460b-bf8b-b02c0041201a
sejalrai23/DSA-Practise
994-rotting-oranges/994-rotting-oranges.cpp
class Solution { public: int orangesRotting(vector<vector<int>>& grid) { int n=grid.size(), m=grid[0].size(); queue<pair<int, int>> q; int cnt=0, total=0; for(int i=0;i<n ;i++){ for(int j=0;j<m ;j++){ if(grid[i][j]!=0){ total++; ...
ALGO
0.999982
5.914873
362cb29e-68cf-48da-8f42-42934858a58a
tixidi/ros_stent_graft
iiwa_vs_core/src/iiwaControl/iiwa/Eigen-3.3.3/failtest/colpivqr_int.cpp
#include "../Eigen/QR" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { ColPivHouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
TEST
0.949541
3.159166
bcb5589f-2191-442d-ae8a-0171d0985815
yyatsuo/atcoder
abc057/b.cpp
#include <bits/stdc++.h> #define rep(i, n) for(int i=0; i<n; ++i) using namespace std; using ll = long long; int main() { int N, M; cin >> N >> M; vector<int> a(N), b(N), c(M), d(M); rep(i, N) cin >> a[i] >> b[i]; rep(i, M) cin >> c[i] >> d[i]; vector<pair<int,int>> ans(N, make_pair(INT_MAX, INT_MAX)); ...
ALGO
0.999996
3.835208
5ae779f8-2a2e-4172-9ac6-244ee9fd48ed
navytuner/basic-algorithm
0x1B-MST /2887.cpp
#include <bits/stdc++.h> using namespace std; #define X first #define Y second typedef long long ll; int n; vector<tuple<int,int,int>> edge; pair<int,int> x[100001]; pair<int,int> y[100001]; pair<int,int> z[100001]; vector<int> p(100001,-1); int find(int x){ if (p[x] < 0) return x; return p[x] = find(p[x]); }...
ALGO
0.994542
4.209821
e5dd6f1f-b1ff-4d60-84fc-bc383b8cc051
mkmojo/aoapc-book
TrainingGuide/bookcodes/ch2/uva11021.cpp
// UVa11021 Tribbles // Rujia Liu #include<cstdio> #include<cmath> const int maxn = 1000 + 10; const int maxm = 1000 + 10; int n, k, m; double P[maxn], f[maxm]; int main() { int T; scanf("%d", &T); for(int kase = 1; kase <= T; kase++) { scanf("%d%d%d", &n, &k, &m); for(int i = 0; i < n; i++) scanf("%lf", ...
ALGO
0.99983
3.281094
ccae9577-cf80-4386-bb89-b970b46957bf
pexip/os-llvm-toolchain-19
libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp
// <algorithm> // template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter> // constexpr OutIter // constexpr after C++17 // copy_n(InIter first, InIter::difference_type n, OutIter result); #include <algorithm> #include <cassert> #include "test_macros.h" #include "test_iterators.h" #inclu...
TEST
0.938632
7.444864
7de189f6-1476-4af9-abba-d58cbe717552
jsenior326/flutter-nodered-todo
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
bec4b950-d5b6-4f17-aaeb-0f9412193693
ArutoriaWhite/Competitive-programming
toj26.cpp
#include <bits/stdc++.h> #define de(x) cout << #x << "=" << x << ", " #define dend cout << '\n' #define Eriri ios::sync_with_stdio(0), cin.tie(0); #define F first #define S second #define md(x) (x+3)%3 using namespace std; typedef pair<int,int> Pii; const int N = 3010; int dp[3][N], n, t, u, used[N][N]; string s; int...
ALGO
0.999853
4.084853
48238cfc-4a89-49b9-ae74-abb971fdb301
nashrahhasan/OOP-using-Python
dfs.cpp
#include <iostream> #include <queue> using namespace std; #define Max 110 //vector < int > graph[MX]; //bool vis[MX]; //int dist[MX]; class Node { public: int data; Node* next; }; /* * Adjacency List */ class AdjList { public: Node *head; }; /* * Class Graph */ class Graph { public: ...
ALGO
0.999815
4.395381
aca61c00-37bd-4139-8d01-81bc0e8a4cb4
amanBhawsar/Coding-Tree
CODECHEF/Problems/CHAPD.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t,flag; long long int a,b,g; cin>>t; while(t--){ cin>>a>>b; flag=1; if(b==1){ cout<<"Yes"<<endl; continue; } g=__gcd(a,b); while(g!=1){ g=__gcd(a,b); b=b/g;...
ALGO
0.999814
4.261482
6ba9b9d7-6e66-4d9b-9dff-2f39569737fb
rn7s2/LeetCode-BorlandC
CONCATMA.CPP
#include <conio.h> #include <stdlib.h> #include <iostream.h> typedef int bool; template<class T> T max(const T& a, const T& b) { return a > b ? a : b; } int* maxPart(int* nums, int len, int k, int* retSize) { *retSize = 0; if (k == 0 || k > len) return NULL; int* stack = (int*)malloc(k * sizeof(int)); ...
ALGO
0.999976
3.562195
8bbb24ac-b9de-4009-9ef9-1dabfed12260
xBigJhow/Estrutura-de-Dados
Tarefa 3/tarefa03ex05.cpp
#include <iostream> using namespace std; typedef struct Lista{ int valor; Lista* prox; } Lista; Lista* inicializa() { return NULL; } Lista* insere(Lista* lista, int valor) { Lista* novo = new Lista; novo->valor = valor; novo->prox = NULL; if(lista == NULL){ lista = novo; } el...
ALGO
0.998297
3.830411
2d3d73bf-894d-45f0-89b3-3f44d2e1cf3e
anantanagarajesh/Leetcode
0324-wiggle-sort-ii/0324-wiggle-sort-ii.cpp
class Solution { public: void wiggleSort(vector<int>& nums) { vector<int>arr=nums; int j=0,n=nums.size(); sort(arr.begin(),arr.end()); for(int i=0;i<n;i++){ if (i % 2 == 0) nums[i] = arr[(n - 1) / 2 - i / 2]; else nums[i] = arr[n - 1 - i / 2]; ...
ALGO
0.999997
5.549486
8c58c521-fdf9-4f7f-9c6c-96d2d7bfa24b
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/01/0110/personal_submission/cf340c_syf.cpp
// Problem: C. Tourist Problem // Contest: Codeforces - Codeforces Round 198 (Div. 2) // URL: https://codeforces.com/problemset/problem/340/C // Memory Limit: 256 MB // Time Limit: 1000 ms // DateTime : 2025-01-10 16:30:29 // Author : sunyafei // // Powered by CP Editor (https://cpeditor.org) #include <bits/stdc++.h>...
ALGO
0.999247
3.73216
41657304-e7f0-4699-9943-4d7772b0a015
debanjan-2002/crack-your-placement
Linked List/Q14_reverse_linked_list_II.cpp
// Given the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list from position left to position right, and return the reversed list. // Example 1: // Input: head = [1,2,3,4,5], left = 2, right = 4 // Output: [1,4,3,2,5] // Example 2: // Input: head = [5], le...
ALGO
0.999993
5.621024
c8d44c7b-c933-49e0-b269-8052e5efa728
ishandutta2007/codeforces
ivan100sic/normal/183/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; ll x[255], y[255]; int n, m; bool mozda[1000005]; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cerr.tie(nullptr); cin >> n >> m; for (int i=0; i<m...
ALGO
0.999952
4.290296
f1079b8c-8e90-415f-9fae-6e20745b8898
devenderpahadia/LeetcodeSolutions
234-palindrome-linked-list/234-palindrome-linked-list.cpp
/** * 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) {} * }; */ class Solution { public: bool isPalindrome(Lis...
ALGO
0.999682
5.748155
0425d6e0-2184-432d-a0c2-9e49b0bf332f
shyam-206/DSA-Love-babbar-Code
Array/addArray.cpp
#include<iostream> #include<vector> using namespace std; vector<int> reverse(vector<int> v) { int s = 0; int e = v.size()-1; while(s<e) { swap(v[s++], v[e--]); } return v; } vector<int> findArraySum(vector<int>&a, int n, vector<int>&b, int m) { int i = n-1; int j = ...
ALGO
0.999915
4.353463
20ebef76-891c-4bcb-9e71-d0b114b01f6a
DEVESHKUMAR97/Competitive-Practice
kickstart/D21/A.cpp
#include<bits/stdc++.h> #define ll long long int #define mod 1000000007 #define casenum cout << "Case " << ++tt << ": " #define endl '\n' using namespace std; bool isAP(int a, int b, int c) { return b - a == c - b; } int main() { // your code goes here ios_base::sync_with_stdio(false); cin.tie(NULL);...
ALGO
0.999796
4.372133
85682232-3b84-49c7-9d3a-80cb382cb301
Itsyashsharma/LEETCODE
0074-search-a-2d-matrix/0074-search-a-2d-matrix.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int row=matrix.size(); int col = matrix[0].size(); int s=0; int end= row*col-1; int mid = s + (end-s)/2; while(s<=end){ int element = matrix[mid/col][mid%col]; ...
ALGO
0.999968
6.036518
765a9302-f437-44ed-9ad2-39e84772315e
haxkixxxyy/CppPrimerPlus-question
12/4/main.cpp
#include"stack.h" #include<iostream> int main(){ Stack s1; Item x; for(int i=0;i<8;i++){ std::cin>>x; s1.push(x); } for(int i=0;i<8;i++){ s1.pop(x); std::cout<<x<<" "; } return 0; }
ALGO
0.994581
3.850837
00c6034d-e152-4e08-af3f-477e63435acd
RanchoCooper/Cpp-Primer
ch08/ex08_05.cpp
/* * author: rancho * email: <EMAIL> * created: 2015-10-21 21:57:02 * * status: solved * [main description] **/ #include <iostream> #include <string> #include <fstream> #include <vector> using namespace std; void ReadFileToVec(const string& fileName, vector<string>& svec) { ifstream ifs(fileName); if ...
TOOL
0.943416
4.40287
33e751f9-a8ec-444d-a844-2b373b1ce28b
luoshunchong/Cplusplus-Leetcode
Leetcode/104.maximum-depth-of-binary-tree.cpp
/* * @lc app=leetcode id=104 lang=cpp * * [104] Maximum Depth of Binary Tree */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x...
ALGO
0.999979
6.550368
d848c941-945d-45c3-87b0-3097e85c5848
iamarghamallick/GeeksforGeeks-Solutions
Difficulty: Easy/Total count/total-count.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: int totalCount(int k, vector<int>& arr) { int ans = 0; for(int num: arr) ans += num/k + (num % k == 0 ? 0...
ALGO
0.999396
5.982722
cfa5ce8e-8e0c-4389-8e10-a4beb65b00dc
DauirEZ/From-1st-semester
testtt.cpp
/*#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; string s; for(int i=0; i<n; i++){ cin>>s; } int k; cin>>k; map<string, string> m; for(int i=0; i<k; i++){ string h, g; cin>>h>>g; m.insert(make_pair(h,g)); } string j; cin>>j; for(auto it=m.begin(); it!=m.end(); it++){ if...
ALGO
0.999941
3.039262
8aff6c1f-a13a-4821-90bc-9d4839ecc775
sunil2010040/TREE
flatten the binary tree.cpp
#include<iostream> using namespace std; class node { public: int data; node*left; node*right; node(int value) { data=value; left=NULL; right=NULL; } }; void flatten(node*root) { if(root==NULL || root->left==NULL && root->right==NULL) { return ; ...
ALGO
0.999995
4.642982
5e0b3a40-2783-478c-b15b-c2a2f399e389
Fraunhofer-AISEC/hwasanio-llvm-project
llvm/tools/llvm-profgen/CSPreInliner.cpp
#include "CSPreInliner.h" #include "ProfiledBinary.h" #include "llvm/ADT/SCCIterator.h" #include "llvm/ADT/Statistic.h" #include <cstdint> #include <queue> #define DEBUG_TYPE "cs-preinliner" using namespace llvm; using namespace sampleprof; STATISTIC(PreInlNumCSInlined, "Number of functions inlined with co...
TOOL
0.965478
7.283776
a81248c9-cdfa-4576-a33e-e19b6038f892
Sadi-Hurayv/Competitive-Programming
Online Judge/GFG/DFS of Graph.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; // For Loop #define fi(i, a, c) for (ll i = (a); i < (c); i++) #define fd(i, a, c) for (ll i = (a); i > (c); i--) #define fe(it, a) for (auto it : a) // Pair #define pi pair<int, int> #define pll pair<ll, ll> #define ...
ALGO
0.999982
4.636908
bdad3221-739f-4590-ad2d-79a4627bf576
SJMA11723/Problem-solving
ICPC/GPMX/2022/primera-fecha/K.cpp
/** * Author: Jorge Raul Tzab Lopez * Github: https://github.com/SJMA11723 */ #include <bits/stdc++.h> #define MAXN 50001 using namespace std; int dp[MAXN]; int compute(int n, int rice[], int p){ if(n <= 0) return abs(n); if(dp[n] != -1) return dp[n]; dp[n] = INT_MAX; for(int i = 0; i < p; ++i) dp...
ALGO
0.999789
3.487145
b5882ea3-b440-4a3d-b6f1-7fdb66abf256
nc-77/algorithms
ACM/cf/R538/a.cpp
#include<bits/stdc++.h> #define ll long long #define debug(x) cout<<#x<<'='<<x<<endl #define set0(x) memset(x,0,sizeof(x)) using namespace std; const int inf=0x3f3f3f3f; const int maxn=2e6+10; int main() { int x,y,z,a,b,c; cin>>x>>y>>z>>a>>b>>c; int flag=1; if(a<x) flag=0; a=a-x; if(a+b<y) flag=0; ...
ALGO
0.999807
3.052438
23731ee4-65ee-471f-a5d1-6b5633526980
WJ-self/algorithm
.history/acwing/basic/basic/827_双链表_20230806114239.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; int e[N]; int ne[N]; // next node index int pr[N]; // prior node index int head = -1, end = -1, idx = 0; void L(int x) { e[idx] = x, ne[idx] = head, pr[head] = idx; if (head == end) { end = idx; } head = idx, idx++; } void R(int...
ALGO
0.999748
4.633045
d71cfb02-700e-48bf-8a22-7aaee5456048
Aadarsh-Negi/LeetCode
980-unique-paths-iii/980-unique-paths-iii.cpp
class Solution { public: int uniquePathsIII(vector<vector<int>>& gg) { int free=0; int n = gg.size(); int m = gg[0].size(); for(int i=0;i<n;i++) for(int j=0;j<m;j++) free+=(gg[i][j]==0); int ans=0; auto solve = [&]...
ALGO
0.999495
5.686491
0b69db97-9b3e-49c9-b588-418315f87189
dipu-bd/OJ-Codes
Contest/VJUDGE 110590/R.cpp
/*================================== Author : Sudipto Chandra (Dipu) Email : <EMAIL> University : SUST ===================================*/ #include <bits/stdc++.h> using namespace std; //typedefs typedef long long ll; /*------------------------------------------------------------------------------------*/ const...
ALGO
0.999895
4.157131
ef2fe17a-4fba-4a8a-bdb6-b762426bbbd1
sounishnath003/CPP-for-beginner
#Preparation/Placement-Overview/QPrep Problem Statements/solutions/sol.cpp
#include<bits/stdc++.h> using namespace std ; #define deb(x) {cout << #x << " " << x << endl ;} // Two Sum Target void _twoSum(vector<int>& v, int &target) { set<int> cache ; for (int i = 0; i < v.size(); i++) { int r = target - v[i] ; if (cache.find(v[i]) != cache.end() ) { cout <<...
ALGO
0.999839
4.511651
0ad14cdf-c2c3-4913-8942-e036f23392d6
ahmed-beruny/Problem_Solving
B_Lunatic_Never_Content.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define SetBit(x, k) (x |= (1LL << k)) #define ClearBit(x, k) (x &= ~(1LL << k)) #define CheckBit(x, k) (x & (1LL << k)) #define dbug(x) cout << #x << " = " << x << endl #define _print(x) for(auto it:x){cout << it << " ";}cout << en...
ALGO
0.999813
4.981765
d0a44e95-08be-4542-bb17-f28eb73471d0
microsoft/VCSamples
VC2008Samples/MFC/general/MMXSwarm/MMXSurface32.cpp
typedef CMMXUnsigned16Saturated CMMX; // Optimized for a 2-pixel processing 32 bit buffer void CMMXSurface32Intrinsic::AdjustWidth(int *pWidth) { ASSERT(pWidth != NULL); ASSERT(m_kDeltaX == 1); // increment if odd. If we are even, we stop // dead on correctly, reading the single black buffer // column. If we are...
TOOL
0.993489
4.349674
2c8521ef-fda5-427e-8aef-0cb4550488e3
MarufPulok/cp
Codechef/SNCKYEAR.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; if(n==2010||n==2015||n==2016||n==2017||n==2019) cout<<"HOSTED"<<endl; else cout<<"NOT HOSTED"<<endl; } return 0; }
ALGO
0.999252
4.03235
8545122f-c22a-4f0d-83d9-33061f46a956
ishandutta2007/codeforces
bluediamond/normal/760/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int cnt[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, d, a = 1; cin >> n >> d; d--; for (int i = 0; i < cnt[n]; i++) { a += (i && d == 0); ...
ALGO
0.999894
3.469905
b4e2cce4-70fb-48e0-b96a-296d215d5e4f
amolsatsangi/Leetcode
Easy/Path Sum/Path Sum.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.99986
6.248173
1014fcbf-4abc-4565-8ec1-8adb2e8948c9
FinancialEngineerLab/QuantLib-1.32-OIS-shine
ql/methods/finitedifferences/utilities/localvolrndcalculator.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! \file localvolendcalculator.cpp \brief local volatility risk neutral terminal density calculation */ #include <ql/math/distributions/normaldistribution.hpp> #include <ql/math/integrals/discreteintegrals.hpp> #include <ql/math/inte...
ALGO
0.999824
3.961607
960b1a08-35d9-48f6-8aa2-242973f9ac05
Tejas-Angadi-9/DSA-Love-Babbar-Supreme-Batch-Codes
Linked List/Lecture 1/insertAthead.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node *next; Node(int data){ this -> data = data; this -> next = NULL; } }; void insertAtHead(Node *&head, Node *&tail, int data){ //step 1: Create a newNode Node *newNode = new Node(data); n...
ALGO
0.9992
4.798909
c3a49e04-a5cc-433a-a4dd-2bf2d9283153
mn619/cf-practise
#566/d.cpp
#include<bits/stdc++.h> #define FLASH cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); #define pb push_back #define int long long #define fr(i,a,b) for(int i=a;i<b;i++) #define mod 1000000007 #define FILEIO freopen("/home/aman/Desktop/Kachda/input.txt", "r", stdin); freopen("/home/aman/Desktop/Kachda/output.t...
ALGO
0.999889
3.312266
7cfd01a8-f700-462b-8503-395d8ec8b751
kezhengjie/m3u8dc
thirdparty/include/cryptopp/md4.cpp
// md4.cpp - modified by Wei Dai from Andrew M. Kuchling's md4.c // The original code and all modifications are in the public domain. // This is the original introductory comment: /* * md4.c : MD4 hash algorithm. * * Part of the Python Cryptography Toolkit, version 1.1 * * Distribute and use freely; there are n...
ALGO
0.99981
6.482319
0e187fc8-00b1-4424-8a7c-031e962fe85d
dreal/probreach
src/eppr/PowellMethodApache.cpp
#include <string.h> #include <stdio.h> #include "PowellMethodApache.h" #include <gsl/gsl_test.h> #include "PointValue.h" #include "ObjectiveFunction.h" #include "MultivariateFunction.h" gsl_error_handler_t *PowellMethodApache::old_handler = NULL; void handler(const char *reason, const char *file, int line, int gsl_e...
ALGO
0.999855
6.143882
dd692a95-906e-4003-a79e-a25386ca6302
dawsunny/DNA_DCS
compressor/compressor.cpp
/*compressor main funtion*/ #include "amp.h" #include "dcs_const.h" #include "dcs_debug.h" #include "dcs_list.h" #include "dcs_msg.h" #include "dcs_type.h" #include "compressor_cache.h" #include "compressor_cnd.h" #include "compressor_con.h" #include "compressor_thread.h" #include "compressor_index.h" #include "bloom...
DATA
0.907417
3.421014
ef546b95-48b6-43f1-aa2b-466851ab18a1
Saurav1928/Hard75_Challenge
3Jan/q2.cpp
#include <bits/stdc++.h> using namespace std; #define n 1e6 vector<bool> is_prime(n + 1, true); int check_perfect_square(long long num) { double sqrt_n = sqrt(num); if (sqrt_n == int(sqrt_n)) { return 1; } else { return 0; } } void solve() { long long l; cin >> l; ...
ALGO
0.999216
4.835564
3b2a869f-bb0f-4625-8e3a-bc3f350f11ea
efornal/captura
esteban/gtp07/e03/p01.cpp
#include <CHImg.h> using namespace cimg_library; using namespace std; int main( int argc, char **argv ) { const char *filename = cimg_option( "-f", "../../imagenes/bone.tif", "ruta archivo imagen" ); int x_inicial = cimg_opti...
TOOL
0.953543
4.342365
12817689-c564-4372-bece-58ddacd0e50f
gwynbleidd415/algos-and-codes
Algos2/subsetSum.cpp
#include <iostream> using namespace std; int main() { cout << "Enter the number of items : "; int n; cin >> n; int arr[n]; cout << "Enter the items\n"; for (int i = 0; i < n; ++i) cin >> arr[i]; cout << "Enter the sum : "; int s; cin >> s; int dp[n + 1][s + 1]; for (int i = 0; i <= n; ++i) for (int j = ...
ALGO
0.999791
3.754411
5921f79e-92ca-470c-a545-b0afd4b6d52a
codingmomo-lab/NCHU-data-sturcture-hw
DS1-4.cpp
#include <iostream> #include <fstream> #include <algorithm> using namespace std; // 定義「雙向連結串列」節點 struct Node { int id; long long val; Node* prev; Node* next; }; int main() { ifstream fin("testcase4.txt"); ofstream fout("output4.txt"); int t; // 測試組數 fin...
ALGO
0.999955
5.167097
91ec3ecf-25b4-4f2f-9bd2-f99b15663f86
shiva92/Contests
UVA/UnionFind/10608_Friends.cpp
#include <bits/stdc++.h> using namespace std; class UFDS { private: vector<int> v, rank, stsize; int n1; public: UFDS(int n) { n1 = n; v.assign(n, 0); rank.assign(n, 0); stsize.assign(n, 1); for (int i = 0; i < n; i++) v[i] = i; } int findSet(int i) { return v[i] == i ? i : (v[i] = findSet(v[i]));} void uni...
ALGO
0.999863
5.502211