uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
fa31c874-6234-4cdf-ac97-70980b6f4760
SpeedCodeOrg/speedcode-problems-contrib
.sandbox_utils/include/parlaylib/examples/karatsuba.cpp
#include <iostream> #include <string> #include <random> #include <limits> #include <parlay/primitives.h> #include <parlay/random.h> #include "karatsuba.h" // ************************************************************** // Driver code // ************************************************************** int main(int ar...
ALGO
0.99959
5.469624
bbf56b82-8e81-4df7-945b-a2b4f5107324
rottoy/Algorithms
ACMICPC Problems/알고리즘 기초/11055가장큰증가하는부분수열.cpp
/*#include<iostream> //D[i] = A[1],..., A[i] , A[i] ϴ ϴ κм // ߴ d[i] ǰ Ʋ. A[i] Ե ־ . // κм A[?] , A[?]...,A[j] , A[i] غ. (j i, κ ̹Ƿ i-1 ƴ. ) //D[i] = MAX(D[j])+1 , j<i , A[j] < A[i] using namespace std; int D[1001]; int A[1001]; int max(int a, int b) { return a > b ? a : b; } int main() { int n; cin >>...
ALGO
0.999959
3.841282
e2a80b6a-7168-4504-9fa6-94bbe0902844
deamonsatwar/azerothclone
src/strategy/values/NearestGameObjects.cpp
#include "NearestGameObjects.h" #include "CellImpl.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "Playerbots.h" #include "SharedDefines.h" #include "SpellMgr.h" class AnyGameObjectInObjectRangeCheck { public: AnyGameObjectInObjectRangeCheck(WorldObject const* obj, float range) : i_obj(obj)...
ALGO
0.993859
5.68085
84b1373c-1423-4276-8e07-ed6b6b4cc2b5
AolinFeng/PMP-VVC-TIP2023
codec/vtm10.0-source-with-pmp-fast-alg/Lib/CommonLib/Buffer.cpp
/** \file Buffer.cpp * \brief Low-overhead class describing 2D memory layout */ #define DONT_UNDEF_SIZE_AWARE_PER_EL_OP // unit needs to come first due to a forward declaration #include "Unit.h" #include "Buffer.h" #include "InterpolationFilter.h" void applyPROFCore(Pel* dst, int dstStride, const Pel* src,...
TOOL
0.95771
6.60421
acb55cd3-46f6-41e9-af1f-1033766327ed
NishchayBhokare/DSA_Code_Files
13_Dynamic Programming/16 Array parition with min Diff.cpp
//code studio -> //We have to find array parition which has..minimum absolute diffrence in it. //Approach 1: using memorization. create all possible sum can be possible and store it in //dp array with their level index. //at the end..traverse last row..of dp. so that we will get all possbile sum which can be genreat...
ALGO
0.999959
5.615269
36ee4711-9de4-4a83-991a-88d0a73b3a94
Many2333/image_segmentation
boost_1_63_0/libs/graph/example/edmonds-karp-eg.cpp
// Use a DIMACS network flow file as stdin. // edmonds-karp-eg < max_flow.dat // // Sample output: // c The total flow: // s 13 // // c flow values: // f 0 6 3 // f 0 1 6 // f 0 2 4 // f 1 5 1 // f 1 0 0 // f 1 3 5 // f 2 4 4 // f 2 3 0 // f 2 0 0 // f 3 7 5 // f 3 2 0 // f 3 1 0 // f 4 5 4 // f 4 6 0...
ALGO
0.942293
5.697292
c4833f9d-6772-4a70-8bf5-bdcd5921d0f1
DJG945/CSE205-DS
assignments/23,30.08.23/1920.cpp
class Solution { public: vector<int> buildArray(vector<int>& nums) { vector<int>v; for(int i:nums){ v.push_back(nums[i]); } return v; } };
ALGO
0.999893
5.656274
d4616a49-0e4e-4915-ba78-4937b5da7ed1
samkitshah1262/CMCP
BS/C_Minimize_Distance.cpp
#include <bits/stdc++.h> using namespace std; /////////////////////// MACROS //////////////////////////////////////////// using ll = long long; using ld = long double; using db = double; using str = string; using pi = pair<int,int>; using pl = pair<ll,ll>; using vi = vector<int>; using vl = vector<ll>; using vs = v...
ALGO
0.999836
5.292905
ee07181c-14e9-4fd7-b309-e58847f04383
tada-zako/cpp-studying
DataStructure/W7/T1.cpp
#include <iostream> #include <string> #include <vector> #include <unordered_map> #include <unordered_set> #include <sstream> using namespace std; #define MAX_N 1000 int main() { int n = 0, m = 0; cin >> n >> m; //unordered_map<int, unordered_set<int>> follows; // ע¼ ////unordered_set<string> follows; //vector<i...
ALGO
0.999904
4.709482
15a05951-a34c-40bb-bd9b-b42c7a4802b0
MovingTowardsADream/Task83_Array_Medium_CombinationSumII
Task83_Array_Medium_CombinationSumII/Task83_Array_Medium_CombinationSumII.cpp
#include <vector> #include <algorithm> class Solution { public: std::vector<std::vector<int>> result; std::vector<std::vector<int>> combinationSum2(std::vector<int>& candidates, int target) { std::vector<int> tmp; sort(candidates.begin(), candidates.end()); combination(candidates, targe...
ALGO
0.999947
6.20477
f4ac65f1-e8e6-4d55-8a75-e4f1460f5ba6
cloudedbyte/boost_old
boost_1_57_0/libs/msm/doc/PDF/examples/ExampleCircularBuffer.cpp
#include <vector> #include <iostream> // back-end #include <boost/msm/back/state_machine.hpp> // header for support of circular_buffer #include <boost/msm/back/queue_container_circular.hpp> //front-end #include <boost/msm/front/state_machine_def.hpp> // functors #include <boost/msm/front/functor_row.hpp> #include <boos...
TOOL
0.869149
6.317823
d50ee5dd-62a6-448e-bc5c-ccc4609b77bf
eklavyaK/codeforces-solutions
ArrayMerging.cpp
#include<bits/stdc++.h> #define endl "\n" #define F first #define S second #define int long long typedef long long ll; typedef long double ld; using namespace std; void code(){ int n; cin>>n; map<int,int> a,b; int arr[n],brr[n]; set<int> st; for(int i=0;i<n;i++) cin>>arr[i]; for(int i=0;i<n;i++...
ALGO
0.999914
4.435625
06abbfa1-6872-4acd-8c6a-94157f3da901
gustavofadel/Exercises
Contests/OBI 2023/Terceira Fase/tesouro.cpp
# include <bits/stdc++.h> using namespace std; # define _ ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); # define MOD 1000000007 # define INF 0x3f3f3f3f # define INFLL 0x3f3f3f3f3f3f3f3f # define EPS 1e-9 # define PI 3.141592653589793238462643383279502884 # define pb push_back # define pf push_front...
ALGO
0.999981
4.055695
1e589551-a73a-4159-afc8-415c8b675835
99yufanduan/lidar_camera_perception
src/CalibrationTools/sensor/extrinsic_map_based_calibrator/src/grid_search_matching.cpp
#include "extrinsic_map_based_calibrator/grid_search_matching.hpp" #include "tier4_autoware_utils/math/unit_conversion.hpp" #include <omp.h> namespace extrinsic_map_base_calibrator { GridSearchMatching::GridSearchMatching() {} bool GridSearchMatching::executeGridSearchMatching( const PointCloudT::Ptr & map_pointc...
ALGO
0.99954
4.450458
abe32f8f-abf4-40f3-8e44-0d187bd42e01
orcun-gokbulut/ze-externals-sources
Source/libBullet/Source/Demos/HeightFieldFluidDemo/HfFluidDemo.cpp
#include "btBulletDynamicsCommon.h" #include "BulletHfFluid/btHfFluidRigidDynamicsWorld.h" #include "BulletHfFluid/btHfFluid.h" #include "BulletHfFluid/btHfFluidRigidCollisionConfiguration.h" #include "BulletHfFluid/btHfFluidBuoyantConvexShape.h" #include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgor...
ALGO
0.869174
4.805478
0a508134-0a1b-4d09-b43d-39afa8b90c27
RohieOS-CLO/external_libcxx
test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference_comp.pass.cpp
// <algorithm> // template<InputIterator InIter1, InputIterator InIter2, typename OutIter, // CopyConstructible Compare> // requires OutputIterator<OutIter, InIter1::reference> // && OutputIterator<OutIter, InIter2::reference> // && Predicate<Compare, InIter1::value_type, InIter2::value_type...
TEST
0.921434
6.450739
80cc89b1-48c8-440e-9996-304597f3e5ec
ishandutta2007/codeforces
omg_link/normal/1419/A.cpp
#include <stdio.h> #define MN 1000 int n,a[MN+5]; void solve(){ scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%1d",&a[i]); if(n&1){ for(int i=1;i<=n;i+=2){ if(a[i]&1){ puts("1"); return; } } puts("2"); return; }else{ for(int i=2;i<=n;i+=2){ if((a[i]&1)==0){ puts("2"); return; ...
ALGO
0.999851
4.014558
dd42737a-5ff6-43e6-9154-cb1775b026fe
clawinshadow/CPP_STL
algorithms/sorting.cpp
#include "sorting.h" #include "helper.h" using namespace std; namespace algorithms { namespace sorting { void sorting_all() { /* * void sort (RandomAccessIterator beg, RandomAccessIterator end) void sort (RandomAccessIterator beg, RandomAccessIterator end, BinaryPredicate op) ...
ALGO
0.999903
5.154549
cdae03da-cf1a-463b-a8a3-1a9479617771
MrNobody999/Day-To_Day-DSA-
Leetcode75_Sort_colors.cpp
/* Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. We will use the integers 0, 1, and 2 to represent the color red, white, and blue, respectively. You must solve this problem without u...
ALGO
0.999984
6.363235
7a5a1c0c-d1ff-4d25-86a2-86778c2e4eb0
FelixYuan-YF/step2_megasam
base/thirdparty/lietorch/eigen/bench/perf_monitoring/llt.cpp
#include "gemm_common.h" #include <Eigen/Cholesky> EIGEN_DONT_INLINE void llt(const Mat &A, const Mat &B, Mat &C) { C = A; C.diagonal().array() += 1000; Eigen::internal::llt_inplace<Mat::Scalar, Lower>::blocked(C); } int main(int argc, char **argv) { return main_gemm(argc, argv, llt); }
ALGO
0.998734
4.189281
85296e8c-3312-4d13-9a01-f69341165e50
songclei/leetcode
removeAllAdjacentDuplicatesInString.cpp
class Solution { public: string removeDuplicates(string S) { bool hasDup = true; while (hasDup) { hasDup = false; int l = S.length(); for (int i = 0; i < l - 1; ++i) { if (S[i] == S[i+1]) { S.erase(i, 2); has...
ALGO
0.999938
6.19333
b2be1316-2b78-465a-b734-727e0aec0c30
hrcarsan/problem-solving
uva/11547/main.cpp
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <bitset> #include <map> #include <set> #include <stack> #include <algorithm> #include <cmath> #include <sstream> #include <cstring> #include <utility> #include <climits> typedef long long ll; using namespace std; int main() { int t, n...
ALGO
0.998559
3.172741
3b57c20e-a950-4e37-ab1f-bd00bcb7a283
UmangBarbhaya/Competitive_Programming_DSA-_in_CPP
Graph/TopologicalSort/DetectCycleDirectedGraphBFS.cpp
#include<bits/stdc++.h> using namespace std; class DetectCycleDirectedGraphBFS { public: bool isCyclic(vector<vector<int>> &graph) { int V=graph.size(); vector<int> indegree(V,0); for(int i=0;i<V;i++) { for(auto it: graph[i]) { indegree[it]++; } } queue<int> q; for(int i=0;i<V;i++) { i...
ALGO
0.999969
5.668727
4335a93e-0d98-4b59-b959-63686c5b43e5
cortictechnology/eye_tracking_experiment
few_shot_gaze/eos/3rdparty/eigen/doc/examples/TutorialLinAlgRankRevealing.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix3f A; A << 1, 2, 5, 2, 1, 4, 3, 0, 3; cout << "Here is the matrix A:\n" << A << endl; FullPivLU<Matrix3f> lu_decomp(A); cout << "The rank of A is " << lu_decomp.rank() << endl; c...
ALGO
0.99976
3.720849
599366f9-be0e-4583-b440-a8d9ea8cfb8c
raincross7/code-similarity
codes/train_code/problem461/problem461_210.cpp
#include <iostream> #include <map> #include <vector> #include <algorithm> using namespace std; using llint = long long int; int n; vector<int> va; using vecitr = vector<int>::iterator; int nearest(vecitr begin, vecitr end, int x) { bool first = true; for (; begin != end; begin++) { if (*begin >= x) { ...
ALGO
0.999973
4.735829
b89f3dc0-1688-44a2-83d4-8e9f0bd9ee74
OliverLueken/AdventOfCode
2015/Day22/battleground.cpp
#include "battleground.h" #include "magician.h" #include "enemy.h" #include "spell.h" #include "effect.h" Battleground::Battleground(Enemy&& _tempEnemy, bool _hardDifficulty) : hardDifficulty{_hardDifficulty}, enemy{_tempEnemy}, magician{this}, activeEffects{}{ enemy.battlegroundPtr = this; } void Battlegrou...
TOOL
0.931683
5.953646
350752c1-a40a-4d7e-8793-193142d7f9f6
Roshansingh9/LeetCode
0402-remove-k-digits/0402-remove-k-digits.cpp
#include <stack> #include <string> #include <algorithm> using namespace std; class Solution { public: string removeKdigits(string num, int k) { stack<char> st; for (char digit : num) { while (!st.empty() && k > 0 && st.top() > digit) { st.pop(); k--; ...
ALGO
0.999992
6.708338
eb6d4b88-8594-4f96-b360-cd282db9cde9
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/july/aaa_20200712201525.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #include<unordered_map> #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 ...
ALGO
0.999945
3.952073
59dac1df-cc6a-411e-b973-441a2d144755
ishandutta2007/codeforces
ekzhang/normal/697/B.cpp
#include <bits/stdc++.h> using namespace std; #define error(args...) { vector<string> _v = split(#args, ','); err(_v.begin(), args); } vector<string> split(const string& s, char c) { vector<string> v; stringstream ss(s); string x; while (getline(ss, x, c)) v.push_back(move(x)); return v; } void err(vector<string>::ite...
ALGO
0.999912
4.121265
c88f1858-3d3f-4b2b-b5e9-23d299a581d1
uyjulian/hamigaki
hamigaki/tags/Version_0_40_1/libs/bjam/src/util_path.cpp
// util_path.cpp: path utilities // See http://hamigaki.sourceforge.jp/libs/bjam for library home page. #define HAMIGAKI_BJAM_SOURCE #define NOMINMAX #include <hamigaki/bjam/util/path.hpp> #include <hamigaki/detail/random.hpp> #include <boost/format.hpp> #include <boost/tokenizer.hpp> #if BOOST_VERSION < 103400 ...
TOOL
0.926303
7.170678
ee1c6233-e33e-466e-896c-5213441d50f4
Prateekk02/DSA
08_Hashing/_14_count_distinct_element_in_every_window.cpp
#include<iostream> #include<unordered_set> #include<vector> using namespace std; //Naive Solution --> O((n-k)*k*k) vector<int> solution(vector &arr, int k) { vector <int> v; int n = arr.size(); for(int i=0;i<n-k;i++) { int count = 0; for(int j = 0;j<...
ALGO
0.999907
3.667808
0c136a91-24b5-402c-b7f9-9ef866597ac2
VishalSingh-07/Geeks-for-Geeks
Hard/Count_Pairs_in_an_array.cpp
/* Count Pairs in an Array Given an array arr of n integers, count all pairs (arr[i], arr[j]) in it such that i*arr[i] > j*arr[j] and 0 ≤ i < j < n. Note: 0-based Indexing is followed. Example 1: Input : n = 4 arr[] = {8, 4, 2, 1} Output : 2 Explanation: If we see the array after operations [0*8, 1*4, 2*2, 3*1] => ...
ALGO
0.999952
4.951288
1e53231f-7224-4f6d-ab29-6ba602ff7878
CCantale/ECS
binary.cpp
#include <iostream> #include <string> #include <vector> #include <iterator> long binarySearch(std::vector<std::string> &vec, std::string name) { long low; long high; long ret; int place; place = 0; low = 0; high = vec.size() - 1; ret = 0; while (low <= high) { place = 0; ret = low + (high - low) / 2; ...
ALGO
0.998024
5.479763
a2114e8c-0fe5-4521-a5c8-92019dbf7d66
greenbeanpie/OI-training
Luogu/P3/P33/P3367/P3367.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int father[10000]; int find(int a) { if(father[a]==a){ return a; } return father[a]=find(father[a]); } void fusion(int a, int b) { int faa = find(a); int fab = find(b); father[faa] = fab; } signed main() { int n, ...
ALGO
0.999982
4.501337
6c0d7bc3-f118-4c6f-8351-9fd2ce374a60
micklevast/CrackMyPlacement-with-ArshSir
Day5/Q1.cpp
#include <iostream> #include <vector> #include <string> #include <unordered_map> #include <set> #include <math.h> #include <algorithm> #include <map> #define ll long long int using namespace std; int getPairsCount1(int arr[], int n, int k) { // code here int i = 0, j = n - 1; int ans = 0; sort(arr, arr ...
ALGO
0.999864
5.100471
1dcca170-611c-48d1-909c-2b31c9f821bf
TallerDeLenguajes1/tl1_tp1_2023-sueldoM
tp1_2.cpp
#include <iostream> using namespace std; int cuadrado(int numero) { return numero * numero; } void cuadrado2(int numero) { int resultado = numero * numero; cout << "El cuadrado de " << numero << " es " << resultado << endl; } void intercambiar(int& num1, int& num2) { int temp = num1; num1 = num2;...
ALGO
0.974852
3.8697
e3849b67-9d5c-4357-8715-5b56d265d93c
E-EE-E/Algorithm_Study
BJS/n2458/main.cpp
#include <iostream> #include <vector> using namespace std; int n, m; void floyd_warshall(vector<vector<bool>> &adj) { for(int k = 1; k <= n; ++k) { for(int i = 1; i <= n; ++i) { for(int j = 1; j <= n; ++j) { if(adj[i][k] && adj[k][j]) adj[i][j] = true; ...
ALGO
0.999822
4.57223
506dbeac-3055-43d2-ac07-15876efec620
moinulislamsajid/CodeForces_Group_Contest
GroubContest/Arrays/N.cpp
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; string s; cin>>s; if(s[a]!='-') { cout<<"No"<<endl; return 0; } for(int i=0; i<s.size(); i++) { if(i==a) { continue; } if(s[i]<'0' || s[i] > '9'...
ALGO
0.999849
3.266453
61f30362-8d61-46ea-bed2-b1c2c29daa76
ou3slati/competitive-programming
Codeforces/Contests/Div2/Round646/A.cpp
/* CF 646A - Odd Selection https://codeforces.com/contest/1363/problem/A Select x numbers with odd sum n ≤ 1000 Key: Need odd number of odds */ #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--) { in...
ALGO
0.999982
5.271789
7d9f6a45-25b1-49b4-a84b-250f078aade2
ksgeu0905/Practice_Questions
Medium Level/Swap_nodes_in_pairs.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: ListNode* swapPairs(ListN...
ALGO
0.999985
5.148288
fde39b9c-12de-433c-bd91-bc32571c62c6
LEECHHE/acmicpc
solved/11580.cpp
#include <cstdio> using namespace std; bool grid[2050][2050] = { false }; int main(){ int t; scanf("%d",&t); char op[1001]; scanf("%s", op); int x = 1000, y = 1000; int ret = 1; grid[x][y] = 1; for( int i = 0 ; i < t ; ++i ){ if( op[i] == 'E'){ ++y; } else if(...
ALGO
0.99995
3.70104
b12426ee-9046-468e-82ee-5ff51cf49f7c
iuyoy/basicCSKnowledge
leetcode/71. Simplify Path/SP.cpp
/* Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" click to show corner cases. Corner Cases: Did you consider the case where path = "/../"? In this case, you should return "/". Another corner case is the path might contain multip...
ALGO
0.999734
6.186968
e6b3bb6d-a8ba-4a0a-aa8d-07f286fab43f
IDA-TUBS/CC_LinkMonitor
thirdparty/boost_1_73_0/libs/graph/example/cc-internet.cpp
/* IMPORTANT!!! ~~~~~~~~~~~~ This example uses interfaces that have been deprecated and removed from Boost.Grpah. Someone needs to update it, as it does NOT compile. */ #include <boost/config.hpp> #include <fstream> #include <vector> #include <string> #include <boost/graph/connected_components.hpp> #includ...
ALGO
0.877759
7.36576
7e4a5adf-1eb1-4e9c-9904-4923716f39fb
zshellzhang1993-2025/algorithms
SwordToOffer/03_FindTargetInSorted2D-Array/main.cpp
#include <iostream> #include <vector> using namespace std; /** * @class Solution3 * @author Zhi * @date 14/07/2015 * @file main.cpp * @brief give you a sorted 2D-array(every row is sorted and every column is sorted too),judge * if the target number given is in this array */ class Solution_3 { public: /** ...
ALGO
0.999942
6.025356
cd7d4852-248b-40bc-bd5a-763eb89b783a
bzetcoin-project/bzetcoin-core
src/qt/transactionfilterproxy.cpp
#include <qt/transactionfilterproxy.h> #include <qt/transactiontablemodel.h> #include <wallet/txrecord.h> #include <cstdlib> // Earliest date that can be represented (far in the past) const QDateTime TransactionFilterProxy::MIN_DATE = QDateTime::fromTime_t(0); // Last date that can be represented (far in the future)...
TOOL
0.936734
6.7693
34666feb-a1bd-43e1-b8d2-b0143f7a09da
vsanna/atcoder
leetcode/744.cpp
#include <algorithm> #include <bitset> #include <cmath> #include <iostream> #include <limits> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; using ll = long lon...
ALGO
0.999936
3.733093
d9727fe7-6404-42ed-9635-c22eb40b7dd2
PacemakerX/codeForces-my-solutions
solutions_codForces/283284527_370_A.cpp
#include <bits/stdc++.h> using namespace std; // Type definitions typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<pii> vpii; typedef vector<pll> vpll; typedef vector<vi> vvi; typedef vector<vl> vvl; // M...
ALGO
0.999751
4.369672
c432fa7c-d19a-421b-98fa-f7dbd18a1257
ishandutta2007/codeforces
cmz/normal/1173/C.cpp
#include<bits/stdc++.h> using namespace std; const int N=20+2e5; int a[N*2]; set<int> st; int cur,n; bool judge(int x) { if (x < n) return 0; if (x >= 2 * n) return 1; set<int> qq = st; int xn = x- n,xns = 0; for (int i = 0; i < xn; i++) xns = a[n + i], qq.insert(a[n + i]); int tar = 0; for (int i = 0; xn + i ...
ALGO
0.999938
3.448386
15e62de0-1ce1-463d-996d-05c5fee474ea
Hima0X2/code
display prime number.cpp
#include<bits/stdc++.h> using namespace std; int prime(int n){ bool k=true; int j; for(j=2;j<=(n/2);j++){ if(n%j==0){ k=false; break; } } return k; } int main() { bool d; int n,i; cin>>n; for(i=2;i<=n;i++){ d=prime(i); if(d==true){ cout...
ALGO
0.999892
4.540376
26dd9646-5934-4da7-b607-0bb27caa6937
teseoch/CG-Spring-2022
ext/eigen/doc/examples/class_Block.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::Block<Derived> topLeftCorner(MatrixBase<Derived>& m, int rows, int cols) { return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols); } template<typename Derived> const Eigen::Block<const Derive...
TOOL
0.944092
5.865374
0e72aa80-8851-4faf-9752-34ca0839191a
ZhangYW18/ACM-Templates
Graphs/MaximumFlow.cpp
/*求有上下界、有源汇的可行流的方法:新添加新的源点和汇点,统计每个点流入和流出的量,流入多则连源点,流出多则连汇点,流量为多出的流。 原图当中的边,每条边的流量变为流量上界减去下界。对于原来的源点汇点,添加边(t,s,inf),以平衡流量。 最后跑最大流,如果新源点出发的所有边都满流,则存在可行流。 */ //dinic算法 //s为原点,n为汇点 int head[maxn],current[maxn],dist[maxn]; struct Edge { int from,to,flow,pre; }; Edge edge[maxk*2]; void addedge(int from,int...
ALGO
0.992505
3.057159
2e3ae4e7-1504-4c69-b6c4-e67c003329f1
Anurag-1BM21AI023/Anurag-1BM21AI023
searchingalgorithm.cpp
#include<iostream> #include<algorithm> using namespace std; class LinBin { public: int a[500],key,n; void Lsearch(int a[],int key,int n) { int i,flag=0; for(i=0;i<n;i++) { if(a[i]==key) { flag=1; break; } ...
ALGO
0.999778
4.186376
40a7bb3d-350e-4af4-91a0-354667c4687d
devedu-AI/Data-Structures-and-Algorithms-in-Cpp-Mayank-Arora
007 - Stack/nextGreaterElement(Optimized).cpp
// Next Greater Element Optimized o(n) // Learning From This Question We Use long long to Handle Larger Test Cases class Solution { public: //Function to find the next greater element for each element of the array. vector<long long> nextLargerElement(vector<long long> arr, int n){ vector<long long> ...
ALGO
0.999975
5.396022
b77d36d5-0a7b-4ade-9f1a-d706651c65e8
sakshieng/DSA-Sheet
STL in C++/20.cpp
#include <bits/stdc++.h> /* Sakshi */ using namespace std; // nesting in maps and sets /* we want to take input of: 3 a b 4 1 2 3 4 c d 3 1 2 5 d f 5 1 5 8 9 6 */ int main() { map<pair<string, string>, vector<int>> m; int n; cin >> n; for (int i = 0; i < n; ++i) { // fn-->first name,...
ALGO
0.998792
3.771403
9b706b01-e1c1-4076-96a4-d91a0fab385f
hasanmehedi9034/03_data_structure_and_algorithm
16_theory_exam/3.cpp
#include <bits/stdc++.h> using namespace std; void print_array(int a[], int n) { for (int i = 0; i < n; i++) { cout << a[i] << " "; } cout << endl; } int find_max(int a[], int n) { int max = a[0]; for (int i = 1; i < n; i++) { if (max < a[i]) { max = a[i]; } ...
ALGO
0.999946
5.183585
7c5b34d1-a10d-4ea6-adfa-1a3de12659d9
wocantudou/Opencv4.9.0
modules/video/src/bgfg_KNN.cpp
//#include <math.h> #include "precomp.hpp" #include "opencl_kernels_video.hpp" namespace cv { /*! The class implements the following algorithm: "Efficient Adaptive Density Estimation per Image Pixel for the Task of Background Subtraction" Z.Zivkovic, F. van der Heijden Pattern Recognition Letters, vol. 27, no. 7...
ALGO
0.99627
6.924412
69f97950-656c-4db1-b09d-1b5043980d70
bhukyavenkatamahesh/Mycaptain-cpp-codes
functions.cpp
#include<iostream> using namespace std; int checkprime(int number) { int i; int flag=1; for(i=2;i<=number/2;i++) { if(number%i==0) { flag=0; break; } } return flag; } int main(){ int i, number; cout << "Enter a Positive integer: "<<endl; cin >> number; ...
ALGO
0.999759
4.038143
16688be0-bf8e-44bc-b37d-17a9ae9b7d13
buiquochuy2508/DSA_SAMSUNG_PTIT
T1504-SAPDATXAUKITU.cpp
#include <bits/stdc++.h> using namespace std; 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<vi> vvi; typedef vector<pii> vii; typedef vector<pll> vll; typedef vector<ll> vl; typedef vector<vl> vvl; #define ms(s,n) memse...
ALGO
0.99994
3.950161
36fb6013-4f8d-4c75-b274-1ed199594052
ishandutta2007/codeforces
wangzhikun/normal/914/D.cpp
// Created by Zhikun on 2018/10/3. #include <cstdio> #include <vector> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; int a[500050],gv[2000020]; int gcd(int a,int b){ return b?gcd(b,a%b):a; } void build(int id,int l,int r){ int mid = ((l+r)/2); if(r==l){ gv[...
ALGO
0.999895
3.986537
dcc52275-ed29-4caf-9b4a-6de99f63ed44
HiChhotelal/GFG-160
18-01-2025.cpp
class Solution { public: Node* reverseList(struct Node* head) { Node* prev = NULL; Node* next = NULL; Node* curr = head; while(curr){ next = curr->next; curr->next = prev; prev = curr; curr = next; } ...
ALGO
0.999793
5.516253
37af290d-a2c0-4ab6-b913-79a9012c783c
premkjain/codeforces-EDU
Binary Search/Step 2/C_Very_Easy_Task.cpp
/* ____ _ __ _ _ _ | _ \ _ __ ___ _ __ ___ | |/ /__ _ _ __ ___ __ _| | | | __ _(_)_ __ | |_) | '__/ _ \ '_ ` _ \ | ' // _` | '_ ` _ \ / _` | | _ | |/ _` | | '_ \ | __/| | | __/ | | | | | | . \ (_| | | | | | | (_| | | | |_| | (_| | | | ...
ALGO
0.999967
3.5595
dde893d6-e200-4744-9f5e-5c1e5384656f
danyalmendigali/programming_scientific_codes
unordered_map_scientific_codes/unordered_map_checking_for_the_existence_of_a_key.cpp
#include <bits/stdc++.h> #include <windows.h> #include <iterator> using namespace std; #define ar array #define ll long long #define FOR(i, a, b) for(int i = a; i < b; i++) // Проверка наличия ключа в unordered_map: bool containsKey(const unordered_map <int, string>& map, int key) { return map.find(key) != map.e...
ALGO
0.989645
4.531398
5639073a-fdba-45bd-88a1-38c4d825dbeb
lbenc135/Cpp_codes
Karte/main.cpp
#include <iostream> using namespace std; int mat[27][14]; char sl[]={'p'-'a', 'k'-'a', 'h'-'a', 't'-'a'}; int main() { string s; cin >> s; int br=0; for(int i=s.length()-1;i>=0;i--) { switch(i%3) { case 0: mat[s[i]-'A'][br]++; if(mat[s[i]-'A'][br]>1)...
ALGO
0.999607
3.38679
ea19a422-da22-4021-b9df-6991f24a5c16
20RitikSingh/Leetcode_cpp
2448-count-number-of-bad-pairs/count-number-of-bad-pairs.cpp
class Solution { public: long long countBadPairs(vector<int>& nums) { unordered_map<int,int> mp; int n=nums.size(); for(int i=0;i<n;i++){ // cout<<nums[i]-i<<" "; mp[nums[i]-i]++; } long long res=0; for(auto [k,f]:mp){ res+=1LL*(n-f...
ALGO
0.999974
5.322117
50a92f6f-1936-4f33-8162-9abf49785eb2
Daltonhensley19/reu_summer_research
stonne/src/CompilerART.cpp
#include "CompilerART.h" #include "Tile.h" #include "utility.h" #include <math.h> #include "types.h" #include <assert.h> #include "cpptoml.h" void CompilerART::configureSignals(Tile* current_tile, DNNLayer* dnn_layer, unsigned int num_ms, unsigned int n_folding) { assert(ispowerof2(num_ms)); assert(current_til...
CONFIG
0.90553
3.610792
5426aa48-852e-41c6-97e6-bb186778d87c
BrandonNjosa4/C-DATASTRUCTURES-ALGORITHMS
CoutingSort.cpp
#include <iostream> using namespace std; //couting sort algorithm void CountingSort(int input_array[], int s, int r) { int output_array[s]; int count_array[r]; //initialize all elements to 0 for (int i = 0; i < r; i++) { count_array[i] = 0; } //take a count of all elements in the i...
ALGO
0.999962
4.637559
31e149df-b046-409a-8f1e-3fc12f0a23ea
david-archive/img-processing-edu-mfc
Opencv_04/Opencv_04/Opencv_04.cpp
// Opencv_05.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" #include <iostream> #include <opencv2\opencv.hpp> #define COUNT 3 using namespace std; using namespace cv; int main() { Mat image1 = imread("image1.jpg"); Mat image2 = imread("image2.jpg"); Mat...
ALGO
0.996672
3.023936
f071f692-e445-4fbf-94ca-b650b65d8af7
bobur554396/PPI2018FALL
week5/G2/7.cpp
#include <iostream> using namespace std; int main() { /* Eye input 3 output 0 0 1 0 1 0 1 0 0 */ int n; cin >> n; int a[n][n]; for (int i = 0; i < n; i++){ for (int j = 0; j < n; j++){ if(i + j == n - 1) a[i][j] = 1; else a[i][j] = 0; } } for (int i = 0; i < n; i++)...
ALGO
0.999906
3.181189
8601ba51-5536-4456-b450-3735885c250e
Joel-Huillca/Taller3-Estructura-de-Datos
Taller3 Estructura/ArbolAvl.cpp
#include "ArbolAvl.h" ArbolAvl::ArbolAvl() { this->raiz = nullptr; } ArbolAvl::~ArbolAvl() { } void ArbolAvl::insertNewNode(Cliente* cliente) { NodoAVL* newNode = new NodoAVL(cliente); insertNewNodeRec(this->raiz, *newNode); checkOrder(newNode, newNode->getCliente()->getRutNumero()); } void ArbolAvl::insertNe...
ALGO
0.998741
3.983481
d57e446b-f62e-4762-a964-5ffadd229ec9
satyaprakash-1729/backup
codeforces/q4.cpp
#include <iostream> #include <cstdlib> #include <vector> using namespace std; typedef struct piece{ char color; char type; } piece; piece* create(char color1,char type1){ piece* temp = (piece *)malloc(sizeof(piece)); temp->color=color1; temp->type = type1; return temp; } int main(int argc, c...
ALGO
0.944262
3.35213
eeb3cae1-46cc-4a49-bd06-0469d1d267cb
9640396636/DAA
linr search.cpp
#include <stdio.h> int main() { int array[100], search, c, n; printf("Enter number of elements in array\n"); scanf("%d", &n); printf("Enter %d integer(s)\n", n); for (c = 0; c < n; c++) scanf("%d", &array[c]); printf("Enter a number to search\n"); scanf("%d", &search); for (c = 0; c < n; c++) ...
ALGO
0.998791
3.514595
874a85d7-afc1-41bf-aa00-06985ff4793d
Account1-Anurag/TLE_ELEMINATOR_SHEET
900 Rating Question/Jellyfish_and_Undertale.cpp
#include <bits/stdc++.h> #include <complex> #include <queue> #include <set> #include <unordered_set> #include <list> #include <chrono> #include <random> #include <iostream> #include <algorithm> #include <cmath> #include <string> #include <vector> #include <map> #include <unordered_map> #include <stack> #include <ioman...
ALGO
0.998099
3.950453
f66b9bd2-a704-4e33-b0c5-6a6ed9ee515d
alexpizarroj/competitive-programming
src/codeforces/round-271-div-2/D.cpp
#include <iostream> #include <cstdio> using namespace std; const int inf = int(1e9) + 7; const int kMax = int(1e5); int dp[kMax+5], sum[kMax+5]; int main() { int tc, k; cin >> tc >> k; dp[0] = 1; for(int i = 1; i <= kMax; i++) { // Using a red flower dp[i] = dp[i-1]; // Using a white flower if ( i-k >= 0...
ALGO
0.999494
4.280632
9cd9a72e-4fd6-4939-8915-08b7a0269e3a
Patel7Manav/Leetcode-Solutions
45-jump-game-ii/45-jump-game-ii.cpp
class Solution { public: int jump(vector<int>& nums) { int n=nums.size(); vector<int>dp(n,100001); dp[0]=0; for(int i=0;i<n-1;i++) { for(int j=1;j<=nums[i] && (j+i)<n ;j++) { dp[i+j]=min(dp[i+j],1+dp[i]); } } ...
ALGO
0.99997
5.739067
3f3e9b03-c408-428a-a1c3-e9f4029cf273
youfoundmee/CP-Problems
A_Three_Indices.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define vti vector<int> #define vt vector #define MOD9 1000000009 #define MOD7 1000000007 #define fr(i, a, b) for (int i = a; i < b; i++) #define rf(i, a, b) for (int i = a - 1; i >= b; i--) #define each(a, x) \ fo...
ALGO
0.999777
3.447982
73f76f0b-8640-49c6-9fa3-e14a0265dc92
GunioRobot/scribe-dependencies
boost_1_41_0/libs/math/minimax/main.cpp
#define BOOST_UBLAS_TYPE_CHECK_EPSILON (type_traits<real_type>::type_sqrt (boost::math::tools::epsilon <real_type>())) #define BOOST_UBLAS_TYPE_CHECK_MIN (type_traits<real_type>::type_sqrt ( boost::math::tools::min_value<real_type>())) #define BOOST_UBLAS_NDEBUG #include <boost/math/bindings/rr.hpp> namespace std{ usi...
TEST
0.85734
5.914015
89620d18-966b-4aa5-98c2-82acfe710a95
jamarshon/Leetcode
490-499/498DiagonalTraverse.cpp
/* 498. Diagonal Traverse Given a matrix of M x N elements (M rows, N columns), return all elements of the matrix in diagonal order as shown in the below image. Example: Input: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] Output: [1,2,4,7,5,3,6,8,9] Explanation: Note: The total number of elements of the given matri...
ALGO
0.999928
6.718546
db4574f7-114a-4547-bf6e-072d0d4e8ddc
kash1sh/practice_ques_cp
C_Berpizza.cpp
#include <bits/stdc++.h> #define ll long long #define pb push_back #define vll vector<ll> #define vpll vector<pair<ll, ll>> #define fo(i, k, n) for (ll i = k; i < n; i++) #define fo1(i, k, n) for (ll i = k; i <= n; i++) #define rr return #define Endl endl #define ff first #define ss second #define all(X) (X).begin(), ...
ALGO
0.999949
4.156225
1853772f-1631-4bb1-859a-f6454bebf806
raincross7/code-similarity
codes/train_code/problem117/problem117_377.cpp
#include<iostream> #include<cstdio> using namespace std; int main(void){ int a,b,c; cin>>a; cin>>b; cin>>c; if(a<b){ if(b<c) cout<<"Yes"; else cout<<"No"; } else cout<<"No"; cout<<endl; }
ALGO
0.999981
3.452324
659b1b60-84e9-489b-9a15-1885736181e0
its-me-bauddha/hustle-leetcode
1013-fibonacci-number/fibonacci-number.cpp
class Solution { public: int fib(int n) { if(n == 0 ) return 0; if(n == 1 ) return 1; return fib(n-1) + fib(n-2); } };
ALGO
0.99999
5.797355
3c941b8f-a69a-4f5a-9171-06a523582f60
jonyroy/online-judge-problem-solutions
www.lightoj.com/Lightoj-1263.cpp
/* * Author: Jony Roy * Date: 05-07-2016 * Contact: <EMAIL> */ #include <bits/stdc++.h> #define PI 3.1415926535897932384 #define EulerConstant 0.5772156649015328606 #define CountBit(a) __builtin_popcount(a) #define pb(x) push_back(x) #define mp(x,y) make_pair(x,y) #define ft ...
ALGO
0.999887
3.652439
bbbd48c5-0bde-402a-8c76-7190b4d91880
bzz13/cplusplus
StivenPrata/11/vect1.cpp
#include <cmath> #include "vect1.h" using std::sqrt; using std::sin; using std::cos; using std::atan; using std::atan2; using std::cout; namespace VECTOR { // Вычисляет количество градусов в одном радиане const double Rad_to_deg = 45.0 / atan(1.0); // должно быть приблизительно равно 57.2957795130823 // Закрытые м...
TOOL
0.91064
3.578865
9773a1a0-d4a7-411d-aba3-0898eb1d6d3e
smith7800/spook
src/zerocoin/SerialNumberSignatureOfKnowledge.cpp
/** * @file SerialNumberSignatureOfKnowledge.cpp * * @brief SerialNumberSignatureOfKnowledge class for the Zerocoin library. * * @author Ian Miers, Christina Garman and Matthew Green * @date June 2013 * * @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green * @license This pr...
ALGO
0.967513
7.097405
42796c40-3a3e-4000-b839-ae30ebfaece4
horn-ice/hice-dt
z3-4.7.1/src/tactic/fpa/fpa2bv_tactic.cpp
#include "tactic/tactical.h" #include "ast/fpa/fpa2bv_rewriter.h" #include "tactic/core/simplify_tactic.h" #include "tactic/fpa/fpa2bv_tactic.h" #include "tactic/fpa/fpa2bv_model_converter.h" class fpa2bv_tactic : public tactic { struct imp { ast_manager & m; fpa2bv_converter m_conv; f...
ALGO
0.994603
7.570416
23dbc8be-d223-47ec-9553-e32e47ec265f
akifbayram/ros1_voronoi
src/openslam_gmapping/gridfastslam/gridslamprocessor_tree.cpp
#include <string> #include <deque> #include <list> #include <map> #include <set> #include <fstream> //#include <gsl/gsl_blas.h> #include <gmapping/utils/stat.h> #include "gmapping/gridfastslam/gridslamprocessor.h" namespace GMapping { using namespace std; GridSlamProcessor::TNode::TNode(const OrientedPoint& p, doub...
ALGO
0.978592
3.591615
346ec386-b454-4bb2-a4a4-23e6e7795120
Mohammad-Taizul-Islam/Programming-Problem-Solving
LinkList/basic_single_list.cpp
#include<iostream> #include<cstdlib> using namespace std; struct node { int data; struct node *next; }; int main() { struct node *head; struct node *one=NULL; struct node *two=NULL; struct node *three=NULL; one =(node *) malloc(sizeof(node)); two =(node *) malloc(sizeof(node)); thre...
ALGO
0.993397
3.020198
c7b00bc9-b1b5-4f5a-9919-ce83dc185ca3
IsratJahan09/PHASE-2-CLASS-4
D.OLOLO - Onotole needs your help.cpp
//https://www.spoj.com/problems/OLOLO/en/ #include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin>>n; int sum=0; while(n--) { int t; cin>>t; sum=sum^t; } cout<<sum<<'\n'; }
ALGO
0.999949
4.241296
4918fd5b-e87d-42af-9c95-54e807e08f77
anoobzg/qi
src/Eigen/src/doc/examples/matrixfree_cg.cpp
#include <iostream> #include <Eigen/Core> #include <Eigen/Dense> #include <Eigen/IterativeLinearSolvers> #include <unsupported/Eigen/IterativeSolvers> class MatrixReplacement; using Eigen::SparseMatrix; namespace Eigen { namespace internal { // MatrixReplacement looks-like a SparseMatrix, so let's inherits its trai...
ALGO
0.995956
6.060634
04ada992-08c7-4303-84e3-e53d2cefff44
JF-D/Compiler-LLVM
llvm-3.3/lib/CodeGen/ScheduleDAG.cpp
#define DEBUG_TYPE "pre-RA-sched" #include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/CodeGen/ScheduleHazardRecognizer.h" #include "llvm/CodeGen/SelectionDAGNodes.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetInstrInfo.h" #inc...
ALGO
0.974817
7.056606
8c48a3a2-b6f7-4152-90b6-0e3f3aa90a67
GiacomoLeoneMaria/multidimensional_Monte_Carlo_integration
multidimensional MC integrale/Integrale.cpp
#include "Integrale.h" #include "Random.h" #include <algorithm> #include <cmath> #include <iostream> using namespace std; MediaMC::MediaMC() {} MediaMC::~MediaMC(){} Funzione::Funzione() {} Funzione::~Funzione() {} double Funzione::Eval(const Vettore &x) const { return 5./pow(x.GetComponent(0),2)*cos(4.*x.GetCompo...
ALGO
0.998552
4.81156
1ec7988d-5ea3-468b-9315-bea1de57f45f
MaxSally/Competitive_Programming
UVA/luchu_heights.cpp
//https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=316&page=show_problem&problem=1552 #include<vector> #include<iostream> #include<stdio.h> #include<algorithm> #include<functional> using namespace std; int n,q; int cnt=0; vector<int> vec; bool compare(int a, int b){ return a<b; ...
ALGO
0.999983
3.522675
534487f8-7d9a-44f6-8d75-ba628273b6ec
vratant11/DSA
2500-delete-greatest-value-in-each-row/2500-delete-greatest-value-in-each-row.cpp
class Solution { public: int deleteGreatestValue(vector<vector<int>>& grid) { for(auto &it:grid) { sort(it.begin(), it.end()); } int ans=0; int j=0; while(j<grid[0].size()){ int m=0; for(int i=0;i<grid.size();i++){ m...
ALGO
0.999975
5.624499
db94d20c-14c5-4b9c-a960-992cc8fa5c2e
newcoderlife/leetcode
cpp/102/binaryTreeLevelOrderTraversal.cpp
#include <queue> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; class Solution { public: vector<vector<int>> levelOrder(TreeNode *root) { vector<vector<int>> results; if (root == nullp...
ALGO
0.999906
6.234786
e0351870-3767-4dcb-8fdd-776bac7a9198
FCayouette/Advent-of-Code-2020-Cpp-and-FSharp
Day18.cpp
#include <iostream> #include <fstream> #include <string_view> #include <array> #include <algorithm> using i64 = long long; i64 EvalParentheses(std::string_view& str, i64(*evaluator)(std::string_view)) { size_t count = 1, index = 0; while (count && ++index) switch (str[index]) { case '(...
ALGO
0.999574
5.148374
db14beab-0cf6-412e-9383-cbac7634fd08
JackGallo1/hello_sql
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.998799
6.776823
c478930f-48ba-4cff-88e9-f5a1f21dd198
youkaicountry/ProceduralTextureMaker
prochash.cpp
// Not thread safe (unless auto-initialization is avoided and each thread has // its own MTRand object) #include <iostream> #include <limits.h> #include <stdio.h> #include <time.h> #include <math.h> #include "prochash.h" MTRand::MTRand( const uint32& oneSeed ) { seed(oneSeed); } MTRand::MTRand( uint32 *const bigSee...
TOOL
0.981358
4.757141
7a2325c6-3fdd-41fd-94dc-8c162530a397
sandy9999/Old-MPSPDZ
Math/Square.cpp
/* * Square.cpp * */ #include "Square.h" #include "BitVec.h" #include "gf2n.h" #include "gfp.h" template<> void Square<gf2n_short>::to(gf2n_short& result, false_type) { int128 sum; for (int i = 0; i < gf2n_short::degree(); i++) sum ^= int128(rows[i].get()) << i; result = sum; } template<> void...
ALGO
0.987561
5.479232
d06e033a-0bc9-4c91-a9b2-c5cc01ceed52
marioyc/Online-Judge-Solutions
TJU/1136 - Humble Numbers.cpp
#include<cstdio> #include<algorithm> using namespace std; int main(){ int humble[5842]; int n; int pos2,pos3,pos5,pos7; pos2=0; pos3=0; pos5=0; pos7=0; humble[0]=1; for(int i=1;i<5842;i++){ humble[i]=min(min(2*humble[pos2],3*humble[pos3]),min(5*humble[...
ALGO
0.99742
3.352847
6daed125-85c9-46dc-b948-053c1241b99c
genchan-omega/Atcoder
ABC/401/c.cpp
// ((( ))) // ((( ))) // ((( ))) // (((( )))) // (((( (()) )))) // (((( (((( )))) )))) // (((( (((( )))) )))) // ((((( ))))) #include <bits/stdc++.h> // #include <ac...
ALGO
0.999994
3.963126
726afbd6-7bca-45d8-b09b-7c2260661d5c
thinkhy/LeetCode
trapping_4.cpp
#include <iostream> #include <string> #include <map> #include <vector> #include <algorithm> #include <utility> using namespace std; public class Solution { public int trap(int[] A) { int secHight = 0; int left = 0; int right = A.length - 1; int area = 0; while (left < right)...
ALGO
0.999925
5.523457