uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0515717d-04d2-434a-8ae8-c77425af83d1
giosouzaa/Beginner_Exercises-Cpp
exercicios/vetores_strings_matrizes/001.cpp
/* 001 - Armazenando dados em um vetor Peça aousuário que insira os elementos de um vetor de números inteiros. Imprima o vetor na tela e indique quantos dos seus números são pares e quantos são ímpares. */ #include<stdio.h> #include<stdlib.h> main (){ int V[10],i,maior,par,impar; printf("\nInsira os 10 ...
ALGO
0.989837
3.758793
19ccc23d-ba0e-461a-967d-cbc3d6516130
dimicorn/algo
a2oj/div2a/27_devu_n_churu.cpp
#include <iostream> int main(int argc, char* argv[]) { int n, d, t; std::cin >> n >> d; int arr[n]; int summ = 0; int count = 0; for (int i = 0; i < n; ++i) { std::cin >> t; summ += t; if (i != n - 1) { summ += 10; count += 2; } } ...
ALGO
0.999504
4.246088
7a13f134-5b27-4950-b020-1c0616bb94ba
xdtianyu/android-4.3
ndk/sources/cxx-stl/llvm-libc++/test/algorithms/alg.sorting/alg.binary.search/lower.bound/lower_bound_comp.pass.cpp
// <algorithm> // template<ForwardIterator Iter, class T> // requires HasLess<Iter::value_type, T> // Iter // lower_bound(Iter first, Iter last, const T& value); #include <algorithm> #include <functional> #include <vector> #include <cassert> #include "test_iterators.h" template <class Iter, class T> void test...
TEST
0.997105
6.573119
96f848be-2b53-47ef-8079-a191f5eb9d7f
adithya-3141/Programs
42-trapping-rain-water/42-trapping-rain-water.cpp
class Solution { public: int trap(vector<int>& height) { int result = 0; int block = 0; int displacement = 0; int initial = height[0]; int n = height.size(); for (int i = 1 ; i<n; i++){ if (height[i] < initial){ b...
ALGO
0.999993
6.740924
ad392b36-61a7-4b5b-b95e-cc84e1ab05b5
RazorEnhanced/RazorEnhanced
Crypt/MemFinder.cpp
#include "StdAfx.h" #include "MemFinder.h" DWORD MemFinder::Find(const void *data, int length, DWORD addressHint, DWORD addressMax) { for (DWORD addr = addressHint; addr < addressMax; addr++) { if (IsBadReadPtr((void*)addr, length)) { continue; } __try { if (memcmp((const void*)addr, data, length) == ...
ALGO
0.990668
4.587608
5a2d6035-63d9-4305-9e97-9c68bfa73afc
Dongubak/BOJ-REMIND
DP/[2579]계단오르기.cpp
#include <bits/stdc++.h> using namespace std; int steps[301]; int cache[301]; int n; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> steps[i]; } cache[1] = steps[1]; cache[2] = steps[1] + steps[2]; for (int i = 3; i <= n; i++) { cache[i] = max( cache[i - 2] + ste...
ALGO
0.999983
4.282272
89ad3805-066b-4e48-ac4f-0f8666b7a9d8
timr1994/usim-jvm
src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp
#include "precompiled.hpp" #include "gc/shared/collectedHeap.hpp" #include "gc/shared/collectorPolicy.hpp" #include "gc/shared/gcConfig.hpp" #include "gc/shared/jvmFlagConstraintsGC.hpp" #include "gc/shared/plab.hpp" #include "gc/shared/threadLocalAllocBuffer.hpp" #include "runtime/arguments.hpp" #include "runtime/glob...
TOOL
0.908836
7.186084
a0532f90-5eaf-45eb-896c-743d2263639c
iashishsahu/LeetCode-Questions
1-two-sum/1-two-sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { vector<int> ans; unordered_map<int,int> mpp; for(int i=0; i< nums.size() ; i++){ if(mpp.find(target-nums[i])!=mpp.end()){ ans.push_back(mpp[target-nums[i]]); ans.push_back...
ALGO
0.999779
6.236665
13ac5e66-9f97-49ce-807f-76c66aa381dd
sujangJin/Baekjoon-judge
7569.cpp
#include<iostream> #include<queue> #include<cstring> #include<tuple> using namespace std; int map[101][101][101]; int dist[101][101][101]; bool chk[101][101][101]; int dx[] = { 0,0,1,-1,0,0 }; int dy[] = { 1,-1,0,0,0,0 }; int dz[] = { 0,0,0,0,1,-1 }; int main() { ios::sync_with_stdio(false); cin.tie(0); int m, n, h; ...
ALGO
0.999768
3.684602
c81297b5-1673-47ba-ae5c-6e41bc266e64
DataSweeper/Ritchie
Cello/benchmarks/Dict/dict_cpp.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <utility> #include <unordered_map> using namespace std; struct eqstr { inline bool operator()(const char *s1, const char *s2) const { return strcmp(s1, s2) == 0; } }; namespace std { template<> struct hash<const char *> : public std::unary_...
ALGO
0.996986
4.028426
61b1c4cf-bad4-4faa-a93a-d732a6b2471a
terrydeng666/Algotrithm
Algorithm/sort/insertionsort.cpp
#include <bits/stdc++.h> int main(void) { int a[]={30,5,3,7,4,8,10,20,11,25,13}; for(int i=1;i<11;i++) { int temp=a[i]; for(int j=i-1;j>=0;j--) { if(a[j]<temp) { break; } else if(temp<a[j]) { a[j+1]=a[j]; a[j]=te...
ALGO
0.999938
3.537697
e006520a-0f6e-4f57-92f2-a0e547ae6a9f
munzir/23-mpc-hardware-experiment
eigen/doc/snippets/EigenSolver_EigenSolver_MatrixType.cpp
MatrixXd A = MatrixXd::Random(6,6); cout << "Here is a random 6x6 matrix, A:" << endl << A << endl << endl; EigenSolver<MatrixXd> es(A); cout << "The eigenvalues of A are:" << endl << es.eigenvalues() << endl; cout << "The matrix of eigenvectors, V, is:" << endl << es.eigenvectors() << endl << endl; complex<double> l...
ALGO
0.999356
3.058228
887176f4-40d9-43e1-abbd-0d572063a449
ishefalichopra/CPP
575_zigZagTraversal.cpp
#include <bits/stdc++.h> using namespace std; struct Node { Node *left; Node *right; int data; Node(int val) { data = val; left = NULL; right = NULL; } }; vector<int> zigZagTraversal(Node* root) { queue<Node*>q1; vector<int>ans; if(!root...
ALGO
0.999998
4.617913
494403b6-d3fc-4595-bc0a-74c6e2804a2a
yutinghu20020202/BioXGem
課後練習/0712q3.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { int year; int yearf; int yearf2; int yearo; printf("Please input a year...."); scanf("%d", &year); yearf=year%400 ; yearf2=year%4 ; yearo=year%100 ; if (yearf==0) { cout << year << " is a leap year." ...
ALGO
0.999904
3.144951
3be4fca3-dcd9-4fd0-8a58-f4351bbd468d
keijak/comp-pub
atcoder/abc229/E/main_E.cpp
#include <bits/stdc++.h> #define REP_(i, a_, b_, a, b, ...) \ for (int i = (a), END_##i = (b); i < END_##i; ++i) #define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define ALL(x) std::begin(x), std::end(x) using Int = long long; using Uint = unsigned long long; using Real = long double; template<t...
ALGO
0.999968
4.736711
7690da8c-7f53-41d3-8d07-9b1ddb622040
Siabus/Problem-Solving
Math/Matrix Diagonal Sum.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int diagonalSum(vector<vector<int>>& mat) { int ans=0; for(int i=0;i<mat.size();i++) { ans+=mat[i][i]; if(i!=mat.size()-i-1) ans+=mat[i][mat.size()-i-1]; } return ans...
ALGO
0.999944
4.930277
ff7cb7ea-2c53-4e6b-9302-28ae2e20b456
Sreerajavk/coding
Divide and conqure/binary_search.cpp
#include <iostream> #include <cassert> #include <vector> using std::vector; using namespace std; /* Task. The goal in this code problem is to implement the binary search algorithm. Input Format. The first line of the input contains an integer n and a sequence a0 < a1 < . . . < an−1 of n pairwise distinct po...
ALGO
0.999956
5.066385
9b72545b-f5d3-4009-9db4-0dcf933b3fcf
coldEr66/online-judge
atcoder/ABC099 pA.cpp
#include <bits/stdc++.h> #pragma GCC optimize("Ofast,unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; typedef long long ll; typedef double lf; typedef pair<ll,ll> ii; #define REP(i,n) for(int i=0;i<n;i++) #define REP1(i,n) for(ll i=1;i<...
ALGO
0.999781
4.39047
6a6c2f31-8f36-417a-af1a-c0a833cf2236
knockcat/Leetcode
2370-longest-ideal-subsequence/2370-longest-ideal-subsequence.cpp
class Solution { public: int helper(int idx, int prev, int k, int n, string& s, vector<vector<int>>& dp) { if(idx == n) return 0; if(dp[idx][prev+1] != -1) return dp[idx][prev+1]; int notTake = helper(idx+1, prev, k, n, s, dp); ...
ALGO
0.999919
6.024086
01a82b99-ac81-4a47-b161-13a535cd3363
horn-ice/hice-dt
z3-4.7.1/src/solver/mus.cpp
#include "solver/solver.h" #include "solver/mus.h" #include "ast/ast_pp.h" #include "ast/ast_util.h" #include "model/model_evaluator.h" struct mus::imp { typedef obj_hashtable<expr> expr_set; solver& m_solver; ast_manager& m; expr_ref_vector m_lit2expr; expr_...
ALGO
0.999577
5.806514
e7476d26-8571-460c-8d6b-f3b751f57103
halkuponthegale/Detention
helloworld/include/Box2D/Collision/b2TimeOfImpact.cpp
#include <Box2D/Collision/b2Collision.h> #include <Box2D/Collision/b2Distance.h> #include <Box2D/Collision/b2TimeOfImpact.h> #include <Box2D/Collision/Shapes/b2CircleShape.h> #include <Box2D/Collision/Shapes/b2PolygonShape.h> #include <Box2D/Common/b2Timer.h> #include <stdio.h> float32 b2_toiTime, b2_toiMaxTime; int3...
ALGO
0.99974
6.502476
fc51a817-65b5-4016-9f0c-77304846e09c
johangardhage/retro-book-flightsfantasy
ORIGINAL/POLYGON/POLY.CPP
// POLY.CPP // A set of functions to create translation matrices for various // polygon transformation functions, to transform a polygon-fill // object using a matrix concatenated from those matrices, and to // draw a polygon-fill object on the mode 13h display #include <stdio.h> #include <math.h> #include "poly...
TOOL
0.987227
5.760865
4ed910d1-db24-4b7b-a3d9-2401d73f9796
NehaVerma825/cpp-all-code
recursion.cpp/subsequences.cpp
#include<iostream> #include<vector> using namespace std; void solve(string ans, string output, int index, vector<string>& nums) { // base case -> solving using recursion if (index >= ans.size()) { if(output.length()>0){ nums.push_back(output); } return; } // recursive c...
ALGO
0.99991
5.314093
29c31873-6554-4898-b379-f3664dc2a7d0
5ko99/FMI-Semester-6
check/homework2-fixed/45793-Kaloyan Iliev/HW-2/Homework/main.cpp
#include <sstream> #include <iostream> #include <fstream> #include <string> #include <vector> using std::string; using std::ostream; using std::ifstream; using std::vector; #include "Common.h" #include "Command.h" using std::cout; using std::cin; vector<string> readFileToVector(const string& fileName) { vector<st...
TOOL
0.850821
4.860956
1b6bcbb3-0676-47fe-b2d5-570773ecb6f0
marlonwc3/cp-codes
Spoj/Spoj42==Adding Reversed Numbers.cpp
#include <bits/stdc++.h> using namespace std; char strres[25], a[25], b[25]; int ires, minLen, maxLen; void f(){ int lenA = strlen(a); int lenB = strlen(b); minLen = min(lenA, lenB); maxLen = (minLen == lenA) ? lenB : lenA; if(minLen == lenA) for(int i=minLen; i < maxLen; i++) a[i]='0'; if(minLen == lenB) for(in...
ALGO
0.99995
4.581732
bcdd30f1-38f4-46c1-b095-4a995f6a1563
ZBQMATE/dct-and-jpeg-compression
dct.cpp
#include "dct.h" #include <math.h> using namespace std; //recommended size 8 //double* dct::transdct(double inpt[], int size) { double* dct::transdct(double inpt[]) { double pi = 3.1415926535897932; double ipt[size * size]; for (int i = 0; i < size * size; i++) { ipt[i] = inpt[i]; } double output[size * ...
ALGO
0.999624
4.315662
0235c39e-c62e-4069-90f4-639bf4798f34
ishandutta2007/codeforces
hir180/normal/1238/D.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; typedef long long ll; typedef pair<int,int> P; type...
ALGO
0.999989
4.122433
662bba6f-1202-4fe8-b264-d02addbb488d
uYanki/board-stm32f103rc-berial
7.Example/hal/gui/GuiLite/11_3d_wave/UICode/app.cpp
#define GUILITE_ON // Do not define this macro once more!!! #include "GuiLite.h" #include <stdlib.h> #include <string.h> #include <math.h> // 3D engine void multiply(int m, int n, int p, float* a, float* b, float* c) // a[m][n] * b[n][p] = c[m][p] { for (int i = 0; i < m; i++) { for (int j = 0; j < p; j+...
ALGO
0.899989
3.527651
c5a27cd5-1b0d-40d7-8a20-f8e03e9899e7
AntonioRodriguezUFAM/Image_Processing_2023
src/main.cpp
///* #include "Image.h" #include <iostream> int main(int argc, char** argv) { Image test("imgs/apple.jpg"); Image img("imgs/apple.jpg"); //test.ImageMirror(); //test.grayscale_avg_parallel(); //test.write("imgs/out/applePararell.jpg"); //// Measure the execution time of grayscale_avg_parallel() method //auto e...
TOOL
0.880549
4.82796
2a7c7590-715c-4d3e-a9e9-1412d798d1ff
adong001/C-DS-CPP
Boost库/boost_1_58_0/libs/graph/example/copy-example.cpp
int main() { using namespace boost; typedef int weight_t; typedef adjacency_list < vecS, vecS, directedS, property < vertex_name_t, char > > graph_t; enum { a, b, c, d, e, f, g, N }; graph_t G(N); property_map < graph_t, vertex_name_t >::type name_map = get(vertex_name, G); char name = 'a'; g...
ALGO
0.974317
4.117043
d7eef4fd-2e89-42e0-ac0b-54060b31bf06
Veljko28/cpp-data-algrtms
codeforces/InversionGraph.cpp
#include <iostream> #include <cmath> #include <vector> #include <algorithm> #include <iterator> #include <numeric> #include <string> #include <cstring> #include <ctime> #include <set> #include <unordered_set> #include <list> #include <sstream> #include <iomanip> #include <map> #include <stack> #include <unordered_map> ...
ALGO
0.999749
5.25867
05f8f671-40fb-4257-b862-a7623c8f943e
zahiryahya1/encryption-decryption
VigenereCipher.cpp
#include <stdio.h> #include "Cipher.hpp" using namespace std; void Cipher::vigenereCipher() { // ask for a key word // if capital: for each letter subtract 65 to get the shift val // if lower case: for each letter subtract 97 to get the shift val // for each char in the key word, use Ceaser Cipher to shift it ...
TOOL
0.944593
3.982571
9991856d-ad3f-4340-a200-e892f3fb3d09
Saurabhn16/CP-dsa
DSA/binaryTree/ksum.cpp
//{ Driver Code Starts //Initial template for C++ #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 ...
ALGO
0.999829
6.566458
4334a8fd-935f-4638-8796-5fbff81c9c44
daniela-becheanu/PA
Tema1/valley.cpp
#include <bits/stdc++.h> using namespace std; long long int solve(long long int N, long long int last_min_pos, vector<long long int> heights) { long long int last_max, hours = 0; /* Edge cases where the mountain with the minimum height is on the first * or last position, where it is needed to excavat...
ALGO
0.999946
4.518799
b03d9376-c7f9-4706-8d7e-a7378f48fd55
LeeYunSung/Algorithm
BOJ/1697_숨바꼭질.cpp
#include <iostream> #include <queue> using namespace std; int findSister(int, int); int main() { int subin, sister = 0; cin >> subin >> sister; cout << findSister(subin, sister); } int findSister(int subin, int sister) { queue<int> q; //BFS Ž Լ queue bool visited[100001] = { false, }; //湮ߴ θ ϴ 迭 int dist[10...
ALGO
0.999816
3.74098
46a9e3bc-ae81-4594-a5a6-a73318201887
lingd3/OJ-CODE
Lintcode/375_clone-binary-tree/clone-binary-tree.cpp
/* @Copyright:LintCode @Author: linqiao @Problem: http://www.lintcode.com/problem/clone-binary-tree @Language: C++ @Datetime: 17-03-11 07:33 */ /** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * ...
ALGO
0.998154
5.917421
95f4fb40-0edd-40d5-9d17-41d084fbbe96
iankit31/6Companies30days
Intuit/Q4.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find the largest number after k swaps. void findMaxUtil(string str,string &max,int k,int pos) { if(k == 0 ) return; char maxm = str[p...
ALGO
0.99997
6.003346
372354c7-e44f-40db-af2e-ce237ad907b8
safffrron/CSES-Solutions
Advanced-Techniques/Meet-in-the-middle.cpp
#include <bits/stdc++.h> #define ll long long #define endl '\n' using namespace std; const int mod = 1e9 +7; void print_arr(vector<int> arr) { for(auto i : arr) { cout<<i<<" "; } cout<<endl; } vector<ll> subset_sum(vector<ll> arr , ll a , ll b) { ll n = (b-a); vector<ll> ans ; for (...
ALGO
0.999895
5.072206
47b43eba-fc2c-4280-8b2d-4c26c0cfeee8
Vishal-S-Hayyal/Array
Wave_Print_Matrix.cpp
#include <bits/stdc++.h> using namespace std; void printwave(vector<vector<int>> v){ int row=v.size(); int col=v[0].size(); for(int j=0; j<col; j++){ //for even col if((j & 1)==0){ for(int i=0; i<row; i++){ cout<<v[i][j]<<" "; } } else...
ALGO
0.999972
3.869971
c7b02bb1-0319-4aaf-8965-a49f98613745
pavel-ryzhov/global_vars
runs/005530.cpp
#include <iostream> #include <vector> // DFT = depth-first traversal // ================= Edge ================= class Edge { private: unsigned _indexEndEdge; int _weight; public: Edge(unsigned _indexEndEdge, int weight); unsigned GetIndexEndEdge() const; int GetWeight() const; }; Edge::Edge(unsigned indexE...
ALGO
0.999806
4.684465
c63fd9a3-81a4-4f7c-836a-248361545854
Akhil-Gupta18/problem_solving
0540-single-element-in-a-sorted-array/0540-single-element-in-a-sorted-array.cpp
class Solution { public: int singleNonDuplicate(vector<int>& arr) { int n = arr.size(); if(n == 1) return arr[0]; if(arr[0] != arr[1]) return arr[0]; if(arr[n-1]!=arr[n-2]) return arr[n-1]; int l = 0; int h = n-1; while(l<=h) { int mid = (l+h)/2; if(arr[mid] == arr[mid-1]...
ALGO
0.999924
5.274741
9f47362e-5d34-4845-8fac-c0854899e0b1
aryanharitsh123/Competitive-Programming-
B_Weak_Password.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int lli; #define all(arr) arr.begin(),arr.end() #define f first #define s second #define debug1(x) cout<<x<<"\n" #define debug2(x,y) cout<<x<<" "<<y<<"\n" #define debug3(x,y,z) cout<<x<<" "<<y<<" "<<z<<"\n" #define nl cout<<"\n"; #define pq priority_queue...
ALGO
0.99974
3.079569
d6bf2589-3b0c-4d94-9fb0-6f01a2d6e354
Ravikisha/CodeArchive
GeeksForGeeks/SecondLargest.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: // Function returns the second // largest elements int print2largest(vector<int> &arr) { int second = INT_MIN, first = arr[0]; for (int ...
ALGO
0.999932
5.717332
c44470c3-78b1-4d59-a9ef-8f2029cac3a6
ShreyaPrasad1209/CodingNotes
MasteringCompetitiveProgrammingQuestions/DEFKIN.cpp
//DEFENSE OF A KINGDOM - Page 110 //https://www.spoj.com/problems/DEFKIN/ #include <bits/stdc++.h> using namespace std; int dx[40005], dy[40005]; int main() { int t; cin >> t; while(t--) { int x, y, z; cin >> x >> y >> z; for (int i = 0; i < z; ++i) cin >> dx[i] >> dy[i]; ...
ALGO
0.999804
3.797956
c1815cbe-85eb-4aea-91a1-4ed3667ca22e
FaraihNazar/PD-4
task8-re.cpp
#include <iostream> using namespace std; void pet(int holidays); main() { int holidays; cout << "Holidays: "; cin >> holidays; pet(holidays); } void pet(int holidays) { int workingDays, timeForGame, norm, difference, hours, minutes; workingDays = 365-holidays; timeForGame = ((workingDays * 63) + (holidays * 1...
ALGO
0.996096
3.737908
e29cc868-d36a-4d6c-ae1a-2ee5a9275cb0
aslupin/review-to-acm
data-structure/graph.cpp
#include <iostream> #include <vector> using namespace std; int main(){ int e,v; cin >> e >> v; int tbl[e][e]; for(int i=0;i<e;i++) { for (int j=0;j<e;j++) { tbl[i][j] = -1; } } for(int i=0;i<v;i++) { int s,f,w; cin >> s >> f >> w; ...
ALGO
0.999975
3.97946
53194036-000c-4534-b46f-584eeb4922cf
hujohn1/codingchallenges
buildyourownsorttool/sorting.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <set> #include <cstring> #include <cmath> using namespace std; //perform all sorting using reference #ifndef MERGESORT void merge(std::vector<string>& arr, int start, int midpoint, int end){ std::vector<string> tmp; int ptr1 ...
ALGO
0.999787
5.006223
69af331f-5865-448b-960c-32788224d132
ishandutta2007/codeforces
thebes/normal/79/B.cpp
#include <bits/stdc++.h> using namespace std; const int MN = 1e4+5; int n, m, k, t, i, x, y, arr[MN]; int main(){ scanf("%d%d%d%d",&n,&m,&k,&t); for(i=1;i<=k;i++){ scanf("%d%d",&x,&y); arr[i]=x*m+y; } sort(arr+1,arr+k+1); for(i=1;i<=t;i++){ scanf("%d%d",&x,&y); int p=lower_bound(arr+1,arr+k+1,x*m+y)-arr;...
ALGO
0.999906
3.625707
65c23aa4-f77b-4577-b9ca-8784c9ad3aa7
adhyansuri/SDE-Sheet
Stock Buy and Sell.cpp
class Solution { public: int maxProfit(vector<int>& prices) { int profit = 0, mini = prices[0], temp = 0; int n = prices.size(); for(int i=1; i<n; i++) { if(prices[i] < mini) mini = prices[i]; temp = prices[i] - mini; profit = max(t...
ALGO
0.999677
6.131203
0dca4e74-8685-4d39-8730-07709a92910d
m-varadhan/CPP
boost/boost-library/boost_1_60_0/libs/spirit/example/qi/num_list4.cpp
/////////////////////////////////////////////////////////////////////////////// // // This sample demontrates a parser for a comma separated list of numbers. // The numbers are inserted in a vector using phoenix. // // [ JDG May 10, 2002 ] spirit1 // [ JDG March 24, 2007 ] spirit2 // ///////////////////////////...
TOOL
0.959584
6.553629
7ef8474a-8864-4fc0-b06a-25cbdd766a8b
Adityamaurya123uma/LeetCode-DSA-Questions---Solved-
3Sum.cpp
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { sort(nums.begin(),nums.end()); int n=nums.size(); vector<vector<int>>ans; set<vector<int>>s; for(int i=0;i<n-2;i++) { int val=nums[i]; int l=i+1; int r=n-1;...
ALGO
0.999968
5.866998
f09b4eb8-8fd8-4299-b85f-c7b3298f7bde
JohannesDecker95/hm_hauptseminar_vcml
GlORIE-SLAM/thirdparty/eigen/doc/examples/Tutorial_BlockOperations_print_block.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::MatrixXf m(4,4); m << 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12, 13,14,15,16; cout << "Block in the middle" << endl; cout << m.block<2,2>(1,1) << endl << endl; for (int i = 1; i <= 3; ++i) { cout << "B...
ALGO
0.993422
3.6853
6779618d-836c-4719-b14f-daedc2ab1923
saumyap48/cpp
1toN_Recursion.cpp
#include<bits/stdc++.h> using namespace std; void print(int num,int n){ if(num==n){ cout<<num<<endl; return; } cout<<num<<endl; print(num+1,n); } int main(){ int n; cin>>n; print(1,n); } //Now By using only one argument #include<bits/stdc++.h> using namespa...
ALGO
0.999951
4.458217
bff9bdb3-b927-4349-953f-07f6f41cfc64
juraara/opencv-test
quicksort.cpp
/* Image Processing Module * (Quicksort Analysis) * 1. Performs well when there is a lot of data (more frames) * 2. Optimally this should be running for a couple of minutes to ensure reliable results according to Yan et. al. (Real-time Driver Drowsiness Detection System Based on PERCLOS and Grayscale Image Processi...
ALGO
0.997311
6.057518
7c1b1959-47f0-483c-abb6-6288b05387a6
msjae/VisualSeollem
Thirdparty/opencv/3rdparty/carotene/src/laplacian.cpp
#include "common.hpp" #include "saturate_cast.hpp" #include <vector> namespace CAROTENE_NS { bool isLaplacian3x3Supported(const Size2D &size, BORDER_MODE border) { return isSupportedConfiguration() && size.width >= 8 && (border == BORDER_MODE_CONSTANT || border == BORDER_MODE_REPLICATE); } v...
ALGO
0.995353
3.302226
584ca8dd-cef8-4ec6-a0a4-ca2781c5cebb
Saamaaanthaa/SamanthaFork
main/main_timer_sync.cpp
/**************************************************************************/ /* main_timer_sync.cpp */ /**************************************************************************/ /* This file is part of: */ /* ...
ALGO
0.937881
7.609361
78df2a09-c556-4dd5-8a2e-d3551c1ba4f9
noob-master-cell/Leetcode
1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/1334-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.cpp
class Solution { public: int findTheCity(int n, vector<vector<int>>& edges, int distanceThreshold) { vector<vector<int>> distance(n, vector<int>(n, INT_MAX)); for(auto it : edges) { int u = it[0]; int v = it[1]; int dist = it[2]; ...
ALGO
0.999991
6.255234
e1fc967d-181b-4c40-b1b5-73117aac2658
leonldy/Calabash
牛客网暑期ACM多校训练营(第二场)/H.cpp
/************************************************************************* > File Name: H.cpp > Author: Roundgod > Mail: <EMAIL> > Created Time: 2018-08-05 10:44:06 ************************************************************************/ #pragma GCC optimize(3) #include<bits/stdc++.h> #define MAXN 4...
ALGO
0.999924
3.860717
1c14602e-7500-4510-90e1-0383f3bbc782
work-fw/algorithms
Old/181002_odd.cpp
#include <iostream> using namespace std; int main(){ int n; cin >> n; for(int z = 0 ; z < n ; z++){ int curr = 0; for(int i = 0 ; i < 10 ; i++){ int x; cin >> x; if(x%2==1) curr+=x; } cout << "#" << (z+1) << " " << curr << endl; } }
ALGO
0.997467
3.037426
d97e9b94-88ae-4d9c-8451-bf4f0a619968
shelltdf/osgall
prebuild/boost_1_71_0/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Tool reporting Implementation Support Status in QBK or plain text format #include <iostream> #include <fstream> #include <sstream> #include <boost/mpl/for_each.hpp> #include <boost/mpl/vector.hpp> #include <boost/type_traits/is_base_of.hpp> #define BOOST_GEOME...
TEST
0.889975
7.743647
78abcc64-023c-4f80-aa9a-e1108086b80f
olegdatskiv/eolymp
8.cpp
#include <iostream> #include <math.h> using namespace std; int main() { long int l, v, k, r, n, i; cin >> n; i = floor(sqrt(n)); k = pow(i, 2); r = 4 + 6 * (i - 1) + pow(i - 1,2) * 2; if (k < n) { for (int j = 1; j <=i; j++) { if (j == 1) { v = 3; } else { v = 2; } r += v; k++; ...
ALGO
0.999853
3.194537
5bbe1089-9f79-4566-9e2a-86447d757fd9
kyeokabe/crackingCodingInterview
code/LeetCode/121_BestTimeToBuyAndSellStock.cpp
class Solution { public: int maxProfit(vector<int>& prices) { if (prices.size()==0) return 0; int dough=0; for (int i=0;i<prices.size()-1;i++){ for (int j=1;j<prices.size();j++) { //cout<<"price j: "<<prices[j]<<" price i: "<<price...
ALGO
0.999702
5.643637
5f7b41c7-d816-428e-a941-643a49642b4e
KanishAnand/CompetitiveCoding
CodeforcesContests/contest#639/2.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; #define lli long long int #define llu unsigned long long int #define fr(va, beg, end) for (lli va = beg; va < end; va++) #define pb push_back #define rt return...
ALGO
0.999736
3.689097
fb3de865-75f6-42c5-b9c6-48623ac451f4
jevrii/storm_black
Solutions/CF/1335/F.cpp
#include <bits/stdc++.h> #define pii pair<int, int> #define fi first #define se second #define mp make_pair #define pb push_back using namespace std; #define DEBUG 1 #define cerr if (DEBUG) cerr #define test cerr << "hi\n"; #define INF 0x3f3f3f3f3f3f3f3f #define MAXN 1000006 #define MOD 998244353LL int r, c; string...
ALGO
0.999875
4.681383
652756e4-258f-45e6-88d3-cb7c66527b33
jainsras/Leetcode-monthly-challenge-2021
February 2021/15.The K Weakest Rows in a Matrix.cpp
bool comp(pair<int, int>p1, pair<int, int>p2) { if(p1.first == p2.first) return p1.second < p2.second; return p1.first < p2.first; } class Solution { int search(int s, int e, vector<int>& mat) { int m =(s+e)/2; if(s>=e)return m; if(mat[m]==0 && ...
ALGO
0.999973
5.398742
31bd616f-4a52-4d43-a98a-836f30e00fa4
JaideepReddyP/competitive_coding
codeforces/round 909 div 3/C_Yarik_and_Array.cpp
#include<bits/stdc++.h> #define int long long using namespace std; void solve() { int n; cin >> n; vector<int> a(n); for(int i = 0; i < n; i++) cin >> a[i]; vector<int> prefix(n+1, 0); for(int i = 1; i <= n; i++) prefix[i] = prefix[i-1] + a[i-1]; int front = 0, end = 0; int sum = a[0]...
ALGO
0.998894
4.651926
c64b57cf-ec2d-4de1-b2f8-522fdff38a0a
JayantSharma777/6Companies30Days
Intuit/Q3/3.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; const int MAX_DIGITS = 5; int missingNumber(const string& str); int main() { int t; cin>>t; while(t--) { string str; cin>>str; cout << missingNumber(str)<<endl; } return 0; } // } Driver Code Ends /* You...
ALGO
0.998466
6.187766
f9afa91c-8b75-4657-89ca-523b74bea927
bioyoshoo/atcoder
Boot-camp/Easy/24.cpp
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template<class T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } else return false; } int main() { int a, b, m...
ALGO
0.99998
5.043909
1a26b570-bd4a-4b1d-81b3-0066aa60f30b
jhcha08/3DGS-Docker
SIBR_viewers/src/core/view/Orbit.cpp
#include "Orbit.hpp" #include <boost/filesystem.hpp> #include "core/graphics/Input.hpp" #include "core/graphics/Viewport.hpp" #include "core/raycaster/CameraRaycaster.hpp" #include "core/graphics/Window.hpp" #include "core/graphics/Mesh.hpp" #include "core/view/UIShortcuts.hpp" # define SIBR_ORBIT_INTERPOLATE_FRAMES ...
ALGO
0.889691
6.659568
b4dd283c-1dcd-4c13-adf4-f02fa96d7674
shivanshsanoria1/LeetcodeSolutions
CPP [1-500]/84.largest_rectangle_in_histogram [2].cpp
class Solution { public: // T.C.=O(n), S.C.=O(n) // Monotonic (increasing / non-decreasing) stack + 1 vector int largestRectangleArea(vector<int>& heights) { int n=heights.size(); vector<int> left(n); stack<int> st; // push the first index into stack st.push(0); ...
ALGO
0.999989
7.016797
a8896b8e-0dc7-4a51-a009-1e234502f5fe
lameesnd/world_time
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
b6feb744-f904-4a24-9972-a3a627a5a147
devdrx/cp-submissions
A_Forbidden_Integer.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while(t--){ int n,k,x; cin >>n>>k>>x; if (x!=1) { cout << "YES" << endl; cout << n << endl; for(int i = 1; i <=n; i++){cout << 1 << " ";} cout ...
ALGO
0.999772
3.48162
5f72987f-3bef-410f-8c9a-693f96d2f6e3
LahariReddyMuthyala/MRNDSummer_Systems
Problem Solving/Summer_day2/fiboMatrix.cpp
#include <stdio.h> #include <stdlib.h> int** matrixMul(int **mat1,int m1, int n1, int** mat2, int m2, int n2){ if (n1 != m2) return NULL; int **product = (int**)malloc(sizeof(int*)*m1); int i, j, k; for (i = 0; i < m1; i++){ product[i] = (int*)malloc(sizeof(int)*n2); } for (i = 0; i < m1; i++){ for (j = 0; j...
ALGO
0.999633
3.312938
225e84d6-3525-4bb9-b23c-69d3e7c3666f
hasib41/C-plus-plus
LinkListaddOwn.cpp
#include<iostream> using namespace std; class node{ public: int data; node* next; node(int val){ data=val; next=NULL; } }; void InsertNumber(node*&head,int value){ node *newNode= new node(value); if(head==NULL) { head = newNode; return; } ...
ALGO
0.999857
3.808675
9208d586-941e-497d-9011-4420f4fb8763
jackyh/qt210_ics_frameworks_base
media/libstagefright/codecs/aacdec/long_term_prediction.cpp
/* Pathname: long_term_prediction.c ------------------------------------------------------------------------------ REVISION HISTORY Description: Made changes based on comments and experiment results. Description: Passed in buffer sizes based on review comments and prototype agreements. Descripti...
ALGO
0.999349
6.411805
2ae8b635-68d3-4c8d-ab39-a06b34321df2
threalwinky/cp_notebook
from_other_people/YouKnowWho Lib/code-library-master/Number Theory/Stirling Number of the First Kind for Fixed k.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1 << 18; const int mod = 998244353; const int root = 3; int lim, rev[N], w[N], wn[N], inv_lim; void reduce(int &x) { x = (x + mod) % mod; } int POW(int x, int y, int ans = 1) { for (; y; y >>= 1, x = (long long) x * x % mod) if (y & 1) ans = (long long) ans ...
ALGO
0.999972
3.942945
090c8851-a1a3-4fdb-93d4-c59214fc65b3
primaryshazi/notes
cpp/cpp_primer_plus/chapter_08/08_06.cpp
#include <iostream> #include <cstring> using namespace std; template <typename T> T maxn(const T ar[], int n); const char* length(const char* ch[], int n); int main() { int iar[6] = { 1, 2 , 6, 5, 3, 4 }; double dar[4] = { 6.6, 4.4, 7.7, 3.3 }; const char* ch[5]; ch[0] = "Are you OK?"; ch[1] = "I'm Ok."; ch[...
TOOL
0.980412
3.963619
310051db-160f-4de4-a3ff-f9b4391e5de4
Mallhw/CompetitiveProgramming
Practice/Tardy.cpp
#include <bits/stdc++.h> using namespace std; #define max(a, b) (a < b ? b : a) #define min(a, b) ((a > b) ? b : a) #define dbg(x) cerr << __LINE__ << ": " << #x << "=" << x << endl; #define mod 1000000007 #define FOR(a, c) for (int(a) = 0; (a) < (c); (a)++) #define FORL(a, b, c) for (int(a) = (b); (a) <= (c); (a...
ALGO
0.999887
3.732115
7d4f67e4-e711-4258-a404-13859cf63c6d
ampl/coin
Couenne/CoinUtils/src/CoinPresolveEmpty.cpp
/* $Id: CoinPresolveEmpty.cpp 2083 2019-01-06 19:38:09Z unxusr $ */ #include <stdio.h> #include <math.h> #include "CoinFinite.hpp" #include "CoinHelperFunctions.hpp" #include "CoinPresolveMatrix.hpp" #include "CoinPresolveEmpty.hpp" #include "CoinMessage.hpp" #if PRESOLVE_DEBUG > 0 || PRESOLVE_CONSISTENCY > 0 #incl...
ALGO
0.963969
7.554743
4eec7e43-7e39-4f28-b94e-d00ffe141ec2
DhruvAhlawat/CSES-Codes
Introductory/Two_Knights.cpp
#include<iostream> #include<cmath> #include<algorithm> #include<vector> #include<string> #include<set> #include<map> #include<deque> #include<queue> #define ll long long #define pint pair<int,int> #define int long long // for huge inputs,outputs, can be removed for space using namespace std; const long long MOD = 1000...
ALGO
0.999881
3.580026
0ab29e6b-0f8f-458e-947b-1218ebacc7e3
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12646_2.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, arr[26]; string str; memset(arr, sizeof(arr), 0); cin >> n >> str; for (int i = 0; i < str.size(); i++) arr[tolower(str[i]) - 'a']++; for (int i = 0; i < 26; i++) if (!arr[i]) { puts("NO"); goto quit; } puts("YES"); quit...
ALGO
0.999992
4.614869
6578ae14-ac39-40a7-aaa4-e636a3f53cf8
mazin773/godot
thirdparty/meshoptimizer/vertexfilter.cpp
#include <math.h> #include <string.h> // The block below auto-detects SIMD ISA that can be used on the target platform #ifndef MESHOPTIMIZER_NO_SIMD // The SIMD implementation requires SSE2, which can be enabled unconditionally through compiler settings #if defined(__SSE2__) #define SIMD_SSE #endif // MSVC supports ...
ALGO
0.97759
5.310696
a2dc18ad-dc70-4aaf-ae5a-9ded8408a1ad
tim-vdm/pdfium_cmake_mingw
fxbarcode/qrcode/BC_QRCoderBitVector.cpp
#include "fxbarcode/qrcode/BC_QRCoderBitVector.h" #include "core/fxcrt/fx_system.h" #include "third_party/base/check.h" CBC_QRCoderBitVector::CBC_QRCoderBitVector() = default; CBC_QRCoderBitVector::~CBC_QRCoderBitVector() = default; int32_t CBC_QRCoderBitVector::At(size_t index) const { CHECK(index < m_sizeInBits...
ALGO
0.877437
6.576593
791461fc-7cfa-4cf8-be19-b18282bf4904
vidhi2002/Striver-sSheet
974-subarray-sums-divisible-by-k/974-subarray-sums-divisible-by-k.cpp
class Solution { public: int subarraysDivByK(vector<int>& nums, int k) { vector<int> pre(k+1,0); pre[0]=1; int sum=0; for(int i=0;i<nums.size();i++) { sum+=nums[i]; sum%=k; sum=(sum+k)%k; pre[sum]++; } int ans=0;...
ALGO
0.999955
5.846361
b9552977-1603-41e2-8697-0d028653b8cb
RaulitoGC/competitive-programming
algorithms/rmq/sparce-table.cpp
class SparceTable { public: static const int MAXN = 30000; static const int K = 25; int N = 0; int st[MAXN + 5][K + 1]; NumArray(vector<int>& nums) { N = nums.size(); for (int i = 0; i < N; i++){ st[i][0] = nums[i]; } computeSt(); } int f...
ALGO
0.999696
4.802237
d33ff458-ae5a-40f2-81cb-edf4b3dbb4c4
KekovD/ITMO_algorithms
First semester/Lab_5/5_C/5_C.cpp
#include <iostream> #include <vector> int number; void build_tree(std::vector <std::vector<int>> &heap, int i) { if (heap[i][1] > 0) { if (!heap[heap[i][1] - 1][0] && !heap[heap[i][1] - 1][1]) { heap[heap[i][1] - 1][2] = number--; } else { build_...
ALGO
0.999967
3.980543
718525e7-0bc7-4469-b779-bb346f22d791
raincross7/code-similarity
codes/train_code/problem283/problem283_355.cpp
// Created by ...Lusifer #include<bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define prior priority_queue #define MOD 1000000007 #define INF64 (long long)1e18 #define INF (int)1e9 #define PI 3.1415926535897932384626433832795 #define ll long long #define ld long dou...
ALGO
0.999759
3.55511
0c6e78e5-d6e4-4b86-a78c-547f7ba184d2
gahara086/AtCorderPromblems-BootCampForBeginners
Medium100/7.cpp
#include <bits/stdc++.h> #include <algorithm> #include <cmath> // abs() for float, and fabs() #include <cstdlib> // abs() for integer #include <iostream> #include <string> using namespace std; bool debug_flag = false; void logint1(int n) { if (debug_flag) cout << "arg_1 = " << n << endl; } void logint2(int ...
ALGO
0.999993
4.750688
78e7e9cf-6423-493f-973b-c64b841d2b2f
DincyJiang/Codes
LeetCode/LeetCode-Algorithm/LeetCode_682_棒球比赛.cpp
// 你现在是棒球比赛记录员。 // 给定一个字符串列表,每个字符串可以是以下四种类型之一: // 1.整数(一轮的得分):直接表示您在本轮中获得的积分数。 // 2. "+"(一轮的得分):表示本轮获得的得分是前两轮有效 回合得分的总和。 // 3. "D"(一轮的得分):表示本轮获得的得分是前一轮有效 回合得分的两倍。 // 4. "C"(一个操作,这不是一个回合的分数):表示您获得的最后一个有效 回合的分数是无效的,应该被移除。 // 每一轮的操作都是永久性的,可能会对前一轮和后一轮产生影响。 // 你需要返回你在所有回合中得分的总和。 // 示例 1: // 输入: ["5","2","C","D","+"] // 输...
ALGO
0.999856
7.083176
23947aa5-1324-469d-8866-c9988f6e2eba
kklll/StudyNode
c_code/未命名1.cpp
#include"stdio.h" #include"string.h" #include"stdlib.h" #define MAXSIZE 100 typedef int keytype; typedef struct{ keytype key; keytype ckey; char name[20]; }recordtype; typedef struct{ recordtype r[MAXSIZE+1]; int length; }table; void quicksort(table *tab,int left,int right) { int i,j; if(left<right) { i=lef...
ALGO
0.999408
3.074916
f39166e8-f304-471e-b441-aa4838ca3a8b
ishandutta2007/codeforces
aid/normal/392/A.cpp
#include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); long long n; cin >> n; long long ans = 0, up = n; for(long long i = 1; i <= n; i++) { int k = 0; while(i * i + up * up > n * n) { k++; up--; } if(!k) ...
ALGO
0.999814
3.28802
40cb4e48-83f1-44d2-9b52-8c5b59730af5
zwei-chen/slam_in_autonomous_driving_homework
thirdparty/g2o/g2o/examples/calibration_odom_laser/sclam_pure_calibration.cpp
#include <iostream> #include <map> #include <csignal> #include <fstream> #include "sclam_helpers.h" #include "gm2dl_io.h" #include "motion_information.h" #include "closed_form_calibration.h" #include "g2o/stuff/macros.h" #include "g2o/stuff/color_macros.h" #include "g2o/stuff/command_args.h" #include "g2o/stuff/files...
ALGO
0.978588
6.022811
1ceab2f8-af5b-4802-9f4e-854131d3d371
laurensiu5/flutter_basic
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
b4d11621-007a-4793-bf91-e396ba3ed1d6
HongEunho/OpenCV
HistogramEqualization/HistogramEqualization/HistogramEqualization4for.cpp
#include <opencv2/opencv.hpp> int main() { IplImage* src = cvLoadImage("c:\\temp\\lena.png"); CvSize size = cvGetSize(src); IplImage* dst = cvCreateImage(size, 8, 3); // 1. Compute Histogram //ȿ ڵ int histo[3][256]; //histo[0][128] : blue 128 for (int k = 0; k < 3; k++) //k=0 ,1 ׸, 2 for (int bri = 0...
ALGO
0.978674
4.196064
44796658-a9a4-4e75-b1ee-6299f0a73481
Peter1qaz2wsx/CCBS
simplex/matrix.cpp
#include "pilal.h" #include <utility> #include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> using std::pair; using std::make_pair; using std::swap; namespace pilal { /* Matrix */ Matrix::Matrix() : lu_up_to_date(false), determinant_up_to_date(false...
TOOL
0.988482
5.559402
07b5d146-64ce-45a0-a186-3a36cdaafc49
drio/egrl
src/count.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <pthread.h> #include <google/sparse_hash_map> #include <google/dense_hash_map> #include <getopt.h> #include "config.h" #include "count.h" #include "probe.h" #include "Util/Util.h" #include "Util/SeqReader.h" #include "Util/Timer.h"...
DATA
0.938282
5.683443
e29eb88c-5140-43fa-8b75-9ee0d949e29b
iamslash/learntocode
leetcode/LongestPalindromicSubsequence/a.cpp
#include <cstdio> #include <string> #include <vector> // // Brute force // // O(2^N) O(1) // class Solution { // private: // int solve(int l, int r, const std::string& s) { // // base // if (l == r) // return 1; // if (l > r) // return 0; // // recursion // // l < r // return s[...
ALGO
0.999967
6.334637
0b2c4366-e093-4cff-b2c9-fc3e04548d34
kreciorek/mesa-ps4patched
src/compiler/glsl/opt_dead_code.cpp
/** * \file opt_dead_code.cpp * * Eliminates dead assignments and variable declarations from the code. */ #include "ir.h" #include "ir_visitor.h" #include "ir_variable_refcount.h" #include "compiler/glsl_types.h" #include "util/hash_table.h" static bool debug = false; /** * Do a dead code pass over instructions...
ALGO
0.897525
7.919392
79ca5d4e-a433-425e-b6f3-6cce4c689736
victor-jordan/algoritmos_y_estructuras
archivos_sueltos/array_2d.cpp
#include <iostream> using namespace std; void sumar (int **ma, int **mb, int **mc, int fila, int columna) { for (int f=0; f<fila; f++){ for (int c=0; c<columna; c++){ //((int *)mc + columna*f)[c]=((int *)ma + columna*f)[c] + ((int *)mb + columna*f)[c]; mc[f][c]=ma[f][c]+mb[f][c]; ...
ALGO
0.996535
3.449141
e41e059a-d308-4dc8-8dae-08e3f394d138
goldcoin/goldcoin-0.7.5
BuildDeps/deps/boost/libs/numeric/ublas/doc/samples/matrix_vector_binary.cpp
#include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; matrix<double> m (3, 3); vector<double> v (3); for (unsigned i = 0; i < (std::min) (m.size1 (), v.size ()); ++ i) { for (unsigned j = 0; j < m.size2 (); ++ j) ...
ALGO
0.999549
3.986627