uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
20062ff9-61ce-401a-aa7c-fdff7dec2b81
kanishkachaudhary-03/flight-management-system-
boost_1_88_0/libs/geometry/doc/doxy/doxygen_input/sourcecode/doxygen_3.cpp
OBSOLETE #include <boost/foreach.hpp> #include <boost/geometry/geometry.hpp> void example_distance() { int a[2] = {1,2}; int b[2] = {3,4}; double d = boost::geometry::distance(a, b); std::cout << d << std::endl; } void example_length1() { std::vector<boost::tuple<double, double, double> > line; ...
TOOL
0.893016
4.443663
7383e9ec-0cc5-49e2-a13e-5c051e8cbbe2
JuliaORNL/JACC-repro
7-point-stencil/CPU/laplacian-openmp.cpp
/* Problem statement: Compute the Laplacian of a grid function u on a equidistantly spaced grid using a finite difference approximation f = \delta u Input parameters: ./laplacian <nx> <ny> <nz> */ #include <cstdlib> #include <iostream> #include <stdio.h> #include <time.h> #include <vector> #ifde...
ALGO
0.999878
5.487138
ef399014-d4ea-4248-bd95-f7eeac1ddeb6
vivek-panchal/Leetcode-Daily-Challenge-2024-
5th Feb 2024 || 387. First Unique Character in a String.cpp
class Solution { public: int firstUniqChar(string s) { int n=s.size(); int ans=-1; unordered_map<char,int> mp; for(int i=0;i<n;i++){ mp[s[i]]++; } for(int i=0;i<n;i++){ if(mp[s[i]]==1){ ans=i; break; ...
ALGO
0.999859
5.816113
708c1ed9-7017-46fe-9aec-3dc407b6c4e5
jycoast/algorithm-wiki
source-code/cpp/148.sort-list.cpp
#include "node.h" #include <algorithm> #include <vector> using namespace std; /* * @lc app=leetcode.cn id=148 lang=cpp * * [148] Sort List */ // @lc code=start /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ...
ALGO
0.999971
5.9642
64f4e731-20aa-4839-a620-6e740fdf36f3
ku-ra/leetcode-solutions
leetcode-solutions/19_remove_nth_node_from_end_of_list.cpp
#include "template.h" class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) { ListNode dummy = ListNode(0, head); ListNode* left = &dummy; ListNode* right = head; while (n > 0 && right) { right = right->next; n--; } whil...
ALGO
0.999861
6.185889
647bf939-df3c-492c-8ad7-9a8bbaf33205
adityaRajGit/Leetcode_problems
Rod Cutting - GFG/rod-cutting.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 cutRod(int price[], int n) { int arr[n]; for(int i=0;i<n;i++){ arr[i]=i+1; } int t[n+1][n...
ALGO
0.999257
5.494074
5e93429e-1e32-4b5d-96cb-4cf8f9398818
Sheldon-Anderson/LeetCode
LeetCode_Cplusplus/376.cpp
#include <bits/stdc++.h> using namespace std; // dynamic programming class Solution { public: int wiggleMaxLength(vector<int>& nums) { int n = nums.size(); if(n <= 1){ return n; } // create and init vector<pair<int, int>> dp(n, make_pair(1, 1)); // DP and get answer int ans = 0; for(int i ...
ALGO
0.999838
5.052927
d996da8f-1992-4799-acb3-730e06165269
ishandutta2007/codeforces
kostroma/normal/855/F.cpp
// {{{ by shik #if !defined(YCM) && 1 #define _FORTIFY_SOURCE 0 #pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("avx,tune=native") #include <stdio.h> #endif #include <bits/stdc++.h> #include <unistd.h> #pragma GCC diagnostic ignored "-Wunused-result" #define SZ(x) ((int)(x).size()) #define ALL(x) be...
ALGO
0.999839
3.967726
b7672d61-f5d5-4370-b48e-3c3c93915f99
shivkumar-github/codes
dsa love babbar/Lecture10 leetcode problems/HW2findallduplicates.cpp
/* find duplicate elements in an array this code gives all duplicate elements in an array but in love babbars video it is said that to find only one element that has occured twice and array contains first n-1 integers */ #include <iostream> using namespace std; // function to print array void printarray(int *arr, int...
ALGO
0.998663
5.167285
83fffdbd-5ac2-4123-aadd-023114e963d0
dkumarjha999/extended-c-programs
pass_by_reference_swapping.cpp
#include<iostream> using namespace std; void swap(float &x, float &y) { float t; t=x; x=y; y=t; cout<<" value after swapping in swap fun = "<<x<<"\t"<<y<<"\n\n"; } int main() { float a,b; cout<<" enter two numbers\n"; cin>>a>>b; cout<<" entered values are = "<<a<<"\t"<<b<<"\n\n"; swap(a,b); cout<<" value after s...
ALGO
0.999338
3.941286
d2dab291-aa82-45f9-b2c6-57a6d59f9dc7
Aousulaprashant/DSA
cppp/DSA/postfixevalution.cpp
#include<iostream> using namespace std; #include<stack> #include<math.h> int postfixevalution(string s){ stack<int>st; for(int i=0;i<=s.length()-1;i++){ if(s[i]>='0'&&s[i]<='9'){ st.push(s[i]-'0'); }else{ int op2=st.top(); st.pop(); int op1=st.top(...
ALGO
0.999723
4.323565
f2ee2e14-701e-4916-8b0e-2a9c35daac33
jdearly/easy-challenges
arithmetic_progression.cpp
#include <iostream> int main(){ int a,d,n; std::cin>>a>>d>>n; std::cout << a+(n-1)*d; }
ALGO
0.999364
3.157845
0ae9b881-85fe-4407-90af-7c849c3ee18a
abeesh/llvm-wine-patched
clang/lib/Driver/SanitizerArgs.cpp
using namespace clang; using namespace clang::driver; using namespace llvm::opt; static const SanitizerMask NeedsUbsanRt = SanitizerKind::Undefined | SanitizerKind::Integer | SanitizerKind::ImplicitConversion | SanitizerKind::Nullability | SanitizerKind::CFI | SanitizerKind::FloatDivideByZero | Sanitiz...
TOOL
0.861167
7.714489
d56f6b75-8ca6-404c-8ddd-9860139725ca
wi-seong-cheol/Algorithm
Backjoon/BFS/16920.cpp
// // 16920.cpp // main // // Created by wi_seong on 2022/02/23. // #include <iostream> #include <queue> #include <tuple> using namespace std; int n, m, p; queue<tuple<int, int, int>> Q[10]; int canExtend[1001][1001]; int area[10]; int mov[10]; int dx[4] = {0,1,0,-1}; int dy[4] = {1,0,-1,0}; void bfs() { whil...
ALGO
0.99979
4.208683
0b67c54f-a29b-4bf1-af91-8a008c75d056
MohiOnirban/everythinginside
C++/practiced.cpp/AreaSwitch.cpp
#include <iostream> using namespace std; double RectArea (double lenght, double width){ return lenght * width; } double SqArea (double lenght){ return lenght * lenght; } double TriArea (double base, double height){ return (base * height) / 2; } double ParaArea (double base, d...
TOOL
0.984668
3.031933
1fd4e9dc-2329-4a7c-9bd7-e102b8da4ee5
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_6814_37.cpp
#include <bits/stdc++.h> int main() { long long P, L, R; scanf("%lld", &P); L = P - (long long)1e18 % P * 9 % P * 9 % P; R = (long long)1e18 + L + 1; printf("%lld %lld\n", L, R); return 0; }
ALGO
0.999206
3.76805
ce9d0949-7a18-4f5a-9725-2ce1477b3813
PietroGhg/tesi-archivio
libcxx/test/std/algorithms/alg.nonmodifying/alg.search/search.pass.cpp
// <algorithm> // template<ForwardIterator Iter1, ForwardIterator Iter2> // requires HasEqualTo<Iter1::value_type, Iter2::value_type> // constexpr Iter1 // constexpr after C++17 // search(Iter1 first1, Iter1 last1, Iter2 first2, Iter2 last2); // // template<class ForwardIterator, class Searcher> // Forwa...
TEST
0.914096
6.0419
0287db55-f586-4083-aea7-c6c24d02d451
ferreira-a/gupy
ex3/main.cpp
#include <bits/stdc++.h> using namespace std; /* 3) Dado um vetor que guarda o valor de faturamento dirio de uma distribuidora, faa um programa, na linguagem que desejar, que calcule e retorne: O menor valor de faturamento ocorrido em um dia do ms; O maior valor de faturamento ocorrido em um dia do ms; Nmero de dia...
DATA
0.996433
4.174488
d1f809d1-47bd-4ad6-abcd-572fa12d54f5
shishirkumar1996/cp
algos_and_data_structures/algo/n_queen.cpp
#include<bits/stdc++.h> #define vi vector< int > #define vii vector< vi > using namespace std; int N; void printSolution(vii board){ for(int i=0;i<N;i++){ for(int j=0;j<N;j++)cout<<board[i][j]<<" "; cout<<endl; } } bool isSafe(vii board,int row, int col){ int i,j; for(i=0;i<col;i++) if(board[row][i])...
ALGO
0.999743
4.679235
3d82dcd4-b70c-4a9b-a00d-c984f8b97e97
AbdullahZahra/problemsolving
codeforces/z-sort.cpp
// https://codeforces.com/problemset/problem/652/B #include <iostream> #include <map> #include <algorithm> #include <iomanip> #include <stdio.h> using namespace std; #define endl '\n' void fast() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); } int main() { fast(); map<int, int> mp; i...
ALGO
0.999987
3.916289
ee05c454-1ec5-43fa-8e7d-909c82cf474b
voidcs/RCC_ACM
Contest_Solutions/Code-e/02_Spring_2021_Contests/Contest_10/Tyler_And_Line/main.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = 1e9+7; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; ll ans = 1; for(int i = 2; i <= n; i++){ ans = (ans * i) % mod; } cout<<ans<<endl; } return 0; ...
ALGO
0.999943
5.067153
279f773a-7690-4ac8-847d-4a06e775253b
Abhinandankaushik/LEET-CODE-DAILY-CHALLENGE-2025
(LC : 2145)_count-the-hidden-sequences.cpp
class Solution { public: int numberOfArrays(vector<int>& diff, int lower, int upper) { long sum = 0, maxi = 0, mini = 0; for (int i : diff) { sum += i; maxi = max(maxi, sum); mini = min(mini, sum); } return max(0L, upper - lower - maxi + mini + 1);...
ALGO
0.999908
5.647756
5bbf78c6-5e16-4e0d-a9cf-e28d5b558019
ArijitWayne/Algorithms
Graph/TarganSCC/TarjansAlgorithm.cpp
#include<iostream> #include <list> #include <stack> #define NIL -1 using namespace std; class Graph { int V; list<int> *adj; void SCCUtil(int u, int disc[], int low[], stack<int> *st, bool stackMember[]); public: Graph(int V); void addEdge(int v, int w); void SCC(); ...
ALGO
0.99969
5.414774
eab1e5ab-2b9f-4d7c-ac50-5d4c8c5a3493
soaresgiovanna/Logica-de-Programacao
vetorOrdemDecrescente.cpp
#include <iostream> using namespace std; void leVetor(float v[8]); void inverteVetor(float [8]); int main() {setlocale(LC_ALL, "Portuguese"); float vet[8]; leVetor(vet); inverteVetor(vet); return 0; } void leVetor(float v[8]) { for (int indice=0; indice<8; indice++) { cout << "informe o v[" ...
ALGO
0.990561
3.219989
d6d06b9e-6800-4e6a-a6cd-83803985dbd0
sorinmircea/DSA-Y1S2
6-BinaryTree/main.cpp
#include <iostream> #include "Heap/Heap.h" #include "Iterators/InOrderRecursive.h" int main() { Heap<int> heap; heap.insert(1); heap.insert(2); heap.insert(3); heap.insert(4); heap.insert(5); heap.insert(6); heap.insert(7); heap.insert(8); heap.insert(9); InOrderRecursive<i...
ALGO
0.991864
4.682249
e9efd436-97dc-4178-a3ed-130faf3ead74
CookuBlack/AlgorithmStudy-Personal
Algorithm/Code/8.01背包/01背包问题.cpp
//01 #include<iostream> using namespace std; #define N 51 //ʾƷ #define M 210 //ʾ int f[N][M]; int w[N],c[N]; //ֱʾƷļֵ int DP(int n,int m){ int i = 1,j = 1; for(i = 1;i<=n;i++){ //ʾƷi for(j = 1;j<= m;j++){ //ʾj if(j < w[i]) f[i][j] = f[i -1][j]; else f[i][j] = max(f[i -1][j],f[i - 1][j -w[i]] + c[i])...
ALGO
0.99998
3.417853
4e5b5ffb-8dd5-4067-8190-976d026fc954
imharyohm/Dsa_Cplusplus
array/povitElement.cpp
//minimum element in array #include<iostream> using namespace std; int getPovit(int arr[],int n){ int s=0; int e=n-1; int mid = s + (e-s)/2; while(s<e){ if(arr[mid]>=arr[0]){ s=mid +1; } else{ e= mid; } mid=s + (e-s)/2; } return s;...
ALGO
0.999959
4.618431
0814d495-f50a-4579-ac15-7cbbe7b3f738
Jomias/ATBMTT
Cpp/MHCD/Caesar.cpp
#include <bits/stdc++.h> using namespace std; string caesar_cypher(string M, int K) { string C = ""; for (auto c : M) { C += (c - 65 + K) % 26 + 65; } return C; } // (decode thì lấy cypher cho 26 - K) int main() { string M = "AWOMANGIVESANDFO"; int K = 11; cout << caesar_cypher(M,...
ALGO
0.999982
5.310172
d8a2a3d2-dae0-4c15-95d3-aee725490ef7
PranshuArora07/MyDs
inclass/recursion/CutSegments.cpp
//this is the question of dp //Maximize the cut segments (GFG) #include<iostream> #include<limits.h> using namespace std; int maximizeTheCuts(int n, int x, int y, int z) { //base case if(n == 0) { return 0; } if(n < 0) { return INT_MIN; } //maine x len ka 1 segment cut krlia a...
ALGO
0.999535
4.676174
d2a33c0c-b4e8-43f1-9f51-60559e719048
Katsudon10/Competitive-programming
Atcoder/ABC/ABC369/c.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;++i) #define ALL(a) (a).begin(),(a).end() const int inf = INT_MAX; using ll = long long; const ll INF = 1e18; using P = pair<int,int>; struct Edge{ int to; ll cost; Edge(int to,ll cost):to(to),cost(cost){} }; using Graph = vecto...
ALGO
0.999901
4.044871
a17a23a3-2ca9-4b00-83b3-d25ac7b9ed74
pingchungchang/CP
apcsc124.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll,ll> #define pii pair<int,int> #define fs first #define sc second #define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ld long double #define _all(T) T.begin(),T.end() const int mxn = 1e5+10; vector<int> paths[mxn]; pa...
ALGO
0.999967
4.454433
8c0cfde1-f8e9-4d6d-9f7d-779818808716
VivaLaPanda/CS315
lab02/isMemberBinarySearch_main.cpp
#include "isMemberBinarySearch.hpp" int main() { std::cout << "Looking for 6 in [1, 2, 3]" << std::endl; int test[3] = {1, 2, 3}; std::cout << isMemberBinarySearchIterative(test, 3, 6) << std::endl; std::cout << isMemberBinarySearchRecursive(test, 3, 6) << std::endl; std::cout << std::endl; std::cout << "Lookin...
ALGO
0.998298
6.113386
5ecc13ba-66a1-4533-b5df-80756f181491
Sid230503/Leet-Code
1319-unique-number-of-occurrences/unique-number-of-occurrences.cpp
class Solution { public: bool uniqueOccurrences(vector<int>& arr) { map<int,int> mpp; for(int i =0; i<arr.size(); i++){ mpp[arr[i]]++; } vector<int> vec; for(auto it : mpp){ vec.push_back(it.second); } sort(vec.begin(), vec.end()); ...
ALGO
0.999973
6.028941
02a777a0-b727-44f6-9150-7d5a6bebf730
BynreForest/FaceDetection
backup/FaceDetection/opencv_simulator/share/opencv/samples/c/find_obj.cpp
/* * A Demo to OpenCV Implementation of SURF * Further Information Refer to "SURF: Speed-Up Robust Feature" * Author: Liu Liu * <EMAIL> */ #include <cv.h> #include <highgui.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <iostream> #include <vector> using namespace std; // define whether ...
ALGO
0.999553
5.459775
5a44a31e-8da3-4428-a896-763879760652
jkim1108/xresearch
eigen3/doc/examples/class_CwiseUnaryOp.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; // define a custom template unary functor template<typename Scalar> struct CwiseClampOp { CwiseClampOp(const Scalar& inf, const Scalar& sup) : m_inf(inf), m_sup(sup) {} const Scalar operator()(const Scalar& x) const { return x<m_...
ALGO
0.961697
6.417363
e4739d17-d859-45c7-bf94-a67c38bfc896
Saifu0/Competitive-Programming
CP/1500/515A.cpp
// ----- In the name of ALLAH, the Most Gracious, the Most Merciful ----- #include<bits/stdc++.h> using namespace std; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > stru...
ALGO
0.999643
3.620075
b0486693-09a8-4cbe-b21d-27a649d4f5c6
Haribala-09/hyprdots
User/History/6739f247/9ywW.cpp
#include <bits/stdc++.h> using namespace std; #define rev(ans) reverse(ans.begin(), ans.end()) #define mems(a, n) memset(a, n, sizeof(a)) #define pb push_back #define fst first #define scd second #define int long long using pii=pair<int,int>; using pci=pair<char,int>; void dbg_out() { cerr << endl; } template <typen...
ALGO
0.99325
3.779485
4c8b3408-b99a-4747-b60e-de971606b473
numbqq/opencv
contrib/modules/xobjdetect/src/lbpfeatures.cpp
#include "precomp.hpp" namespace cv { namespace xobjdetect { CvLBPFeatureParams::CvLBPFeatureParams() { maxCatCount = 256; name = LBPF_NAME; } void CvLBPEvaluator::init(const CvFeatureParams *_featureParams, int _maxSampleCount, Size _winSize) { CV_Assert( _maxSampleCount > 0); sum.create((int)_maxSa...
ALGO
0.86265
6.256345
9f848d4a-e5a2-490a-86e0-4e2f189ac9c7
longdo16/CS386DFP
newdetkdecomp-master/FractionalEdgeCover.cpp
#include <string> #include "Vertex.h" #include "Hyperedge.h" #include "FractionalEdgeCover.h" using namespace std; FractionalEdgeCover::FractionalEdgeCover(const VertexSet &bag, const HyperedgeVector &edges, const vector<double> &weights) { this->bag = bag; this->edges = edges; this->weights = weights; this->wei...
ALGO
0.963692
5.872942
f4730913-2bf5-4b72-b151-84301eba2d99
GopherTeen/OJ_Code
Problems/Codeforces/1901-2000/1927/1927C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; void solve() { int n, m; ll k; cin >> n >> m >> k; vector<int> a(n), b(m); map<int, int> cnt; for (int i = 0; i < n; ++i) { cin >> a[i]; if (a[i] <= k) { cnt[a[i]] |= 1; } } for (i...
ALGO
0.999969
5.341074
7319c883-fbd1-48f0-8eaa-bad510472172
lmlepin9/DarkTridentGen
BdNMC/src/Electron_Scatter.cpp
#include "Scatter.h" #include "DMscattering.h" #include <cmath> #include <stdlib.h> #include <iostream> #include "Random.h" #include "Kinematics.h" #include <algorithm> #include "constants.h" #include <list> using std::list; using std::cout; using std::endl; const double Me = MASS_ELECTRON; const double Pi = pi; const...
ALGO
0.977307
4.79716
ee51f948-5321-4050-9346-742e5d2118b2
Intiser/ProblemSolvingAndContest
UvaOnlineJudge/10589.cpp
#include<iostream> #include<stdio.h> #include<math.h> using namespace std; int main() { int n,m,i,j; double r,a,x,y,Area,A,R,d1,d2,d3,d4; while(cin>>n>>r) { if(n==0) break; a=r; A=r*r; for(i=0,m=0;i<n;i++) { cin>>x>>y; d1=sqrt(...
ALGO
0.999537
3.653429
fa83b1e3-5727-4859-9ed7-f697e7978441
Hashim017/Data-Structures-And-Algorithms
DSA-Weeks/DSAweek-7/2022-CS-18.cpp
#include <iostream> using namespace std; // --------------------------- PART-A --------------------------- // class Node { public: int val; Node* prev; Node* next; Node(int val) : val(val), prev(nullptr), next(nullptr) {} }; class DoublyLinkedList { public: Node* head; Node* tail; DoublyLinkedList(...
ALGO
0.994579
6.042671
497de50f-1133-4360-b2c1-a2fd4ce9af9c
Adarsh-kumar/Competitive_coding_practice
dice_sum.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int total_ways(int n,int m,int x) { int dp[n+1][(m*n)+1]; memset(dp,0,sizeof(dp)); for(int j=1;j<=m;j++) { dp[1][j]=1; } for(int i=2;i<=n;i++) { for(int j=1;j<=(m*n);j++) { for(int k=1;k<=m && k<=j;k++) { dp[i][j]+=dp[i-1][j-k]; } } } return dp[n][x];...
ALGO
0.999972
4.399417
41a8d016-4d8e-4672-a04d-b8e0c17d767b
mjwybrow/adaptagrams
cola/libcola/tests/containment2.cpp
/** \file * Interface between Inkscape code (SPItem) and graphlayout functions. * Authors: * Tim Dwyer <<EMAIL>> */ #include <iostream> #include <map> #include <vector> #include <algorithm> #include <float.h> #include <iomanip> #include <libcola/cola.h> #include <libcola/output_svg.h> #include "graphlayouttest.h...
ALGO
0.95029
6.087004
992f8437-2bda-48cb-96ac-19635abafeea
yeonggwangchoi/Inflearn_Algorithm
no_30.cpp
#include <iostream> using namespace std; int main() { int N; cin >> N; int lt = 1; int k = 1; int res = 0; while (lt!=0) { lt = N / (k * 10); int cur = N % (k * 10); int rt = N % k; if (cur == 3) { res += lt * k + rt + 1; } else if (cur > 3) { res += (lt + 1) * k; } else { res ...
ALGO
0.999469
3.742867
b52e4f98-b677-4310-9e96-cb8df783cf72
HaiZeizhouyuan/HZOJ
LG/1629.cpp
/************************************************************************* > File Name: 1629.cpp > Author: zhouyuan > Mail: <EMAIL> > Created Time: 2020年11月18日 星期三 15时43分31秒 ************************************************************************/ #include<iostream> #include<cstring> #include<algorithm> #include...
ALGO
0.999917
3.954732
0056abce-e424-412c-b9a6-706172c442fa
psj98/Baekjoon_Solve
C++/14. 정수론 및 조합론/9375.cpp
#include <iostream> #include <map> using namespace std; int main(){ string a, b; int t, n; cin >> t; for(int i=0; i<t; i++){ map<string, int> mp; int ans=1; cin >> n; for(int j=0; j<n; j++){ cin >> a >> b; if(!mp[b]) mp[b]=1; ...
ALGO
0.999519
3.851289
68adc321-86e8-4f40-8cb6-0e8f82a9fd45
loki-engr/CtrlHair
wrap_codes/wrap_triangle/useful_code/libigl/include/igl/cut_mesh.cpp
// wrapper for input/output style template <typename DerivedV, typename DerivedF, typename DerivedC> IGL_INLINE void igl::cut_mesh( const Eigen::MatrixBase<DerivedV>& V, const Eigen::MatrixBase<DerivedF>& F, const Eigen::MatrixBase<DerivedC>& C, Eigen::PlainObjectBase<DerivedV>& Vn, Eigen::PlainObjectBase<Der...
ALGO
0.995084
5.571088
f8eb2985-d7a7-43f9-a639-d4c14e286cae
ishandutta2007/codeforces
pavel.savchenkov/normal/558/C.cpp
#include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <set> #include <map> #include <utility> #include <cstdlib> #include <memory> #include <queue> #include <cassert> #include <cmath> #include <ctime> #include <complex> #include <bitset> #include <uno...
ALGO
0.999933
4.07773
1ed50d40-3eef-4fa7-b255-9e0b139dbdea
Nih1tGupta/Leetcode-GFG
Difficulty: Easy/Surround the 1's/surround-the-1s.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int Count(vector<vector<int> >& matrix) { // Code here int res=0; int n=matrix.size(); int m=matrix[0].size(); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){...
ALGO
0.999924
6.402203
4553a40b-7113-4af1-ab03-f9858b61a722
herrkrabbe/RegressionCompulsory
Libraries/eigen-3.4.0/doc/examples/tut_matrix_coefficient_accessors.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { MatrixXd m(2,2); m(0,0) = 3; m(1,0) = 2.5; m(0,1) = -1; m(1,1) = m(1,0) + m(0,1); std::cout << "Here is the matrix m:\n" << m << std::endl; VectorXd v(2); v(0) = 4; v(1) = v(0) - 1; std::cout << "Here is the vector v:\n...
ALGO
0.998612
3.687909
081bafa1-8bbe-48c2-be58-ffef3bef33a3
Shahraaz/CP_P_S5
ICPC_Mirrors/Nitc_15.0/e.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define mp make_pair #define deb(x) cout << #x << " " << x << "\n"; #define MAX 9223372036854775807 #define MIN -9223372036854775807 #define PI 3.141592653589 #define setbits(n) __builtin_popcountll(n) #define mkunique(a) a.resi...
ALGO
0.999849
3.563332
dc1e9a9b-fe49-4706-9870-44c26b328932
LosDelDGIIM/LosDelDGIIM.github.io
subjects/SCD/Prácticas/Práctica1/Código/prodcons-multi.cpp
/** * @file prodcons-multi.cpp * @brief Problema de los productores-consumidores con múltiples procesos (solución FIFO o LIFO). * @author Arturo Olivares Martos */ #include <iostream> #include <cassert> #include <thread> #include <mutex> #include <random> #include "scd.h" using namespace std ; using namespace scd ...
TEST
0.991167
5.700438
78cf0a18-3b55-43da-aaf7-b2245148e428
prabhatbajpai/DSA
cf2.cpp
#include<bits/stdc++.h> #define int long long using namespace std; int32_t main(){ int t; cin>>t; while(t--){ int n; cin>>n; vector<int> edge[n]; vector<bool> p(n); vector<bool> b(n); // for(int i=0;i<n;i++){ // int temp; // cin>>temp; // int book; // for(int j=0;j<...
ALGO
0.999632
3.760708
902a9017-a660-48ea-8cc3-38b17abe34bc
ambmax00/megalochem
src/fock/jkdf_robust.cpp
#include <Eigen/Core> #include <Eigen/SVD> #include "extern/lapack.hpp" #include "fock/jkbuilder.hpp" #include "ints/aofactory.hpp" #include "ints/screening.hpp" #include "math/linalg/SVD.hpp" namespace megalochem { namespace fock { void DFROBUST_K::init() { init_base(); auto b = m_mol->dims().b(); auto x = m...
ALGO
0.999411
6.296712
25efff79-8e60-40e8-a744-0bebb8bcfb1f
DaveParillo/cisc187-docker
examples/week06/06-jump-table.cpp
#include <iostream> #include <string> using std::cout; std::string prompt(); int jump(const char*); void a() { cout << "you chose a()\n"; } void b() { cout << "you chose b()\n"; } void c() { cout << "you chose c()\n"; } // this is our 'jump table' // it's just an array of function pointers void (*functions[])() = { ...
TOOL
0.966716
5.52431
ce0eeff1-9d5b-4390-bc49-ee943a7aaddd
cymbl/llvm-project
libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp
// <algorithm> // template<BidirectionalIterator Iter, Predicate<auto, Iter::value_type> Pred> // requires ShuffleIterator<Iter> // && CopyConstructible<Pred> // Iter // partition(Iter first, Iter last, Pred pred); #include <algorithm> #include <cassert> #include "test_macros.h" #include "test_iterator...
TEST
0.891184
6.416516
426f0a25-399b-46ab-90dc-4fa1781cc7b6
ojari/GHwIf
config.cpp
#include "config.h" #include <string.h> #include <fstream> /*#define MAX_STRING 80 typedef struct { char value[MAX_STRING]; bool priv; } configitem_t; configitem_t CfgData[] = { [CFG_FMI_API] = { FMI_API, true }, [CFG_STRAVA_API] = { STRAVA_API, true }, [CFG_SCHEME_INIT] = {...
CONFIG
0.884583
3.346423
0f5af54b-4db4-42a3-ab25-4d5a9aea8569
undefined2001/CPP
heapify.cpp
#include <iostream> void min_heapify(int arr[], int size, int index) { int smallest = index; int left_child = index * 2; int right_child = index * 2 + 1; if (arr[left_child] < arr[smallest] && left_child <= size) { smallest = left_child; } if (arr[right_child] < arr[smallest] && rig...
ALGO
0.99997
5.350338
39b2a82a-44d6-498d-aa78-9f8b4aadc135
harshjaiswalprgm/PracticeQuestions
H/CollegePractice/PlacementClass/yoo/avl.cpp
// #include <iostream> // using namespace std; // class Node { // public: // int data; // Node* left; // Node* right; // Node(int data) { // this->data = data; // left = right = nullptr; // } // }; // int main() { // Node* root = new Node(50); // root->left = new Node(30);...
ALGO
0.999856
5.851549
afc5a734-0f05-4d50-ac79-d6ceda9b910c
danishshariff/problem_solving
0543-diameter-of-binary-tree/0543-diameter-of-binary-tree.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.99985
6.482738
12cb56d7-f296-482e-aac4-f6abcb90a2af
achouro/DSA
lcs2s.cpp
#include <iostream> #include <vector> #include <algorithm> using std::vector; using std::max; int lcs2(vector<int> &a, vector<int> &b) { int seq[a.size()+1][b.size()+1]; int index=0; while(index<=a.size()) { seq[index][0]=0; index++;} index=1; while(index<=b.size()) { seq[0][index]=0; index++;} for(size_...
ALGO
0.999955
4.659142
8df463a5-358e-43d0-b141-32c016278681
Ritik2221999/DSA
Linked List/doublyLinkedList.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int data; Node* next; Node* prev; Node(int data) { this -> data = data; this -> prev = NULL; this -> next = NULL; } ~Node() { int val =...
ALGO
0.999453
4.756598
667ef904-8838-4b12-a83f-fa420aa40214
ISCASDataTeam1/PU-learning
achievement/based_code/dlib-master/examples/linear_manifold_regularizer_ex.cpp
/* This is an example illustrating the use of the linear_manifold_regularizer and empirical_kernel_map from the dlib C++ Library. This example program assumes you are familiar with some general elements of the library. In particular, you should have at least read the svm_ex.cpp and matrix_ex.c...
ALGO
0.935738
7.601058
257d6414-f0c0-4f95-b2c4-92dda8e60842
munhwas1140/algo-study
WEEK_01/BOJ_2961/hyungjun.cpp
#include <bits/stdc++.h> using namespace std; #define fastio cin.tie(0)->sync_with_stdio(0) using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; int main() { fastio; int n; cin >> n; vector<int> a(n), b(n); for(int i = 0; i < n; i++) { cin >> a[i] >> b[i]; } int ...
ALGO
0.99998
4.417556
92dfbd02-ee25-4830-abea-ba2d72e409fd
JahanzebNawaz/Introduction-to-C-plus-plus-CPP-Chapter-Exercises
chapter-1/Q13.cpp
/* Write a program to show following ouput using one cout statement 1 2 3 4 5 6 7 8 9 10 */ #include<iostream> #include<conio.h> using namespace std; main() { cout<<"\n1 2 3 4 5\n6 7 8 9 10"<<endl; getch(); }
ALGO
0.987039
3.319514
a031803c-4899-44d1-8371-58445a66337d
CodeDks/DATA_STRUCTURE_CODE
3. LinkedList/5deletingnode.cpp
// LINKED LIST // Deleting the node.. #include <iostream> using namespace std; class Node { public: int data; Node *next; Node(int data) // This is constructor which is called automatically when object is created and set the value of data.. { this->data = data; this->next = NULL; ...
ALGO
0.997338
3.688631
883a492d-3183-43aa-9f06-8ac4ff4b61ec
onepice0807/20240527-CPP
20240527-0900-Operator/main.cpp
#include <iostream> #include <math.h> using namespace std; class Point { private: int _x, _y; public: Point(int x, int y) : _x(x), _y(y) {} int GetX() { return _x; } int GetY() { return _y; } void Info() { cout << "x: " << _x << ", y: " << _y << endl; ...
TOOL
0.905031
3.649396
1c505121-81f2-4bfb-a1c9-22ec59bddd47
kishore-github1/Striver-A2Z-Sheet-Practice
2.Sorting/RecursiveBBSort.cpp
#include <bits/stdc++.h> using namespace std; void bubbleSort(vector<int> &arr, int n) { if(n==1) return; for (int j = 0; j < n-1; j++) { if (arr[j] > arr[j + 1]) swap(arr[j], arr[j + 1]); } bubbleSort(arr,n-1); } int main() { int n = 5; vector<int>...
ALGO
0.999954
4.982222
95658ed0-abf2-47e8-9a2b-38178a2d598b
Raihan-10/Problem-Solving
NSUPS/C - A Very Big Sum.cpp
#include<iostream> using namespace std; int main() { int n; cin>>n; long long int sum=0; long int arr[n]; for(int i=0; i<n; i++) { cin>>arr[i]; sum+=arr[i]; } cout<<sum; return 0; }
ALGO
0.999722
3.345021
598ef302-83fa-4b98-a17d-c3cc3ab91b2d
selfrender/Windows-Server-2003
windows/advcore/gdiplus/engine/render/aaline.cpp
#include "precomp.hpp" #pragma optimize("a", on) // Antialiased lines are usually drawn using aarasterizer.cpp // rather than aaline.cpp. If aaline.cpp is to be used, define // AAONEPIXELLINE_SUPPORT #ifdef AAONEPIXELLINE_SUPPORT //------------------------------------------------------------------------ // Glob...
TOOL
0.918065
5.898102
a9ec07ee-5c9f-43f3-bf89-5071460b4b49
alvinnardo/licode
leetcode/3330.cpp
#include "../template/head.h" #include <bits/stdc++.h> int possibleStringCount(string word) { // 思路:模拟 // 时间 O(n),空间 O(1) int res = 0; for (int i = 1; i < word.size(); i++) { res += word[i] == word[i - 1]; } return res + 1; } int main(int argc, char *argv[]) { // 5 cout << po...
ALGO
0.999955
4.746401
de556144-c526-4746-8ae8-3ff4ae62c766
ruddropust/Competitive-Programming
1172B.MatrixRotation.cpp
#include<bits/stdc++.h> #define ll long long #define pb push_back #define fr(a,b) for(int i = a; i < b; i++) #define rfr(a,b) for(int i = b-1; i>=0; i--) #define rep(i,a,b) for(int i = a; i < b; i++) #define mod 1000000007 #define inf (1LL<<60) #define all(x) (x).begin(), (x).end() #define prDouble(x) cout << fixed << ...
ALGO
0.998861
3.759184
92e80269-0ebc-4249-82af-79743c6e817f
akshitwaghmare/MKPITS_Java_March_2024_Akshit_Waghmare
C-Codes/while9.cpp
#include <stdio.h> int main() { { int n, factorial = 1, i = 1; printf("Enter number: "); scanf("%d", &n); while (i <= n) { factorial = factorial * i; i++; } printf("Factorial is: %d\n", factorial); } }
ALGO
0.999438
4.161824
be325c53-53e4-4356-bb1d-eb992b9a4fbc
Dimasrioardianto/Lingkungan-Pengembangan-Flutter
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
524d3256-7656-48b2-8db7-868b97e67041
rg-rupeee/competitive-programming
B_Fence.cpp
/* author : Mr Rupesh Garhwal id: rg_rupeee */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define MAX_N 1e5+1 #define INF 1e9 #define MOD 1e9+7 #define LINF 1e18 #define rep(...
ALGO
0.999984
4.374415
10d9554c-92e6-4e16-8913-c8796900fa6c
hkwww/gtsam
gtsam_unstable/nonlinear/ConcurrentFilteringAndSmoothing.cpp
/** * @file ConcurrentFilteringAndSmoothing.cpp * @brief Base classes for the 'filter' and 'smoother' portion of the Concurrent * Filtering and Smoothing architecture, as well as an external synchronization * function. These classes act as an interface only. * @author Stephen Williams */ ...
ALGO
0.994771
7.731308
0bc2c0db-02a6-4666-a45c-bcfbd7caa29a
usc-isi/llvm
libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound_comp.pass.cpp
// <algorithm> // template<ForwardIterator Iter, class T, Predicate<auto, T, Iter::value_type> Compare> // constexpr Iter // constexpr after c++17 // upper_bound(Iter first, Iter last, const T& value, Compare comp); #include <algorithm> #include <functional> #include <vector> #include <cassert> #include <cstdd...
TEST
0.993123
7.007707
559087bd-cb13-43c6-af16-7f474bebb78f
thegamer1907/Code_Analysis
Implementation/425.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <set> #include <math.h> using namespace std; int main() { int n, k; cin >> n >> k; vector<int> mas(n); map<int, int> res; for (int i = 0; i < n; i++) { cin >> mas[i]; res[mas[i]]++; } sort(mas.b...
ALGO
0.999977
3.929731
f35832aa-f944-4542-abb4-03eb13714c38
079035/cpp
atomic/lock_free_array.cpp
#include <array> #include <atomic> #include <iostream> #include <thread> struct MyInt { int n{0}; std::atomic<bool> flag{flase}; }; class Stack { public: std::optional<int> getNum(int idx) { if(!mNums[idx].flag.load()) { return std::nullopt; } return mNums[i...
ALGO
0.971742
4.357284
26a2d250-e068-4525-b605-93e2789aa09c
destiny718/THUCS_FOP
FOP/downstairs.cpp
#include<iostream> using namespace std; int down(int n){ switch(n){ case 1:return 1; case 2:return 2; case 3:return 4; default:return (down(n-1)+down(n-2)+down(n-3)); } } int main(){ int n; cin>>n; if(n<=3||n>20){ cout<<0<<endl; } else{ cout<<...
ALGO
0.999987
4.181725
9d7252ea-d9b4-4e50-bc4c-3675b0bfe675
fengbingchun/PyTorch_Test
src/audio/torchaudio/csrc/kaldi.cpp
#include <torch/script.h> #include "feat/pitch-functions.h" namespace torchaudio { namespace kaldi { namespace { torch::Tensor denormalize(const torch::Tensor& t) { auto ret = t; auto pos = t > 0, neg = t < 0; ret.index_put({pos}, t.index({pos}) * 32767); ret.index_put({neg}, t.index({neg}) * 32768); retur...
ALGO
0.966379
6.686327
453481f3-1d8d-4313-aab0-2c9334863cad
Akshay80015/Coding-Practice
arrayHomeworkweek3/commoneleinthreesortedarray.cpp
#include<iostream> #include<vector> using namespace std; //Geeks for Geeks void findCommon(int ar1[],int ar2[],int ar3[], int n1, int n2,int n3) { for(int i =0,j=0, k=0;i<n1&&j<n2&&k<n3;) { if(ar1[i]==ar2[j]&&ar2[j]==ar3[k]) { cout<<ar1[i]<<endl; i++,j++,k++; ...
ALGO
0.99528
3.681344
eaf3edfa-73f3-4a52-8aeb-724123c66b07
devartstar/Algorithms
contest/#725_D3/b.cpp
/* ------------------------------------- | | | Author - Devjit Choudhury | | Date - 11.06.2021 | | Time - 13:07:58 | | | ------------------------------------- Link - https://codeforces.com/contest/1538/problem/B */ #include <bits/stdc++.h> using namespace std; #define ar array #d...
ALGO
0.999731
5.008132
e8442e68-1348-4b18-91b9-1c2db728b929
heptacode-archives/naturalization
Framework/Collision.cpp
#include "stdafx.h" #include "Collision.h" #include "Collider.h" bool Collision::Intersected(const Collider::AABBBox& a, const Collider::AABBBox& b) { // 츦 , ȯ return !( (a.rightBottom.x < b.leftTop.x) || (b.rightBottom.x < a.leftTop.x) || (a.rightBottom.y < b.leftTop.y) || (b.rightBottom.y < a.leftTop...
ALGO
0.973494
5.469415
03693afe-7f7d-435b-816a-e839779108f5
Houzich/CUDA-GPU-Brute-Force-Mnemonic-Old-Electrum-V1
bitcoin/signet.cpp
#include <signet.h> #include <array> #include <cstdint> #include <vector> #include <consensus/merkle.h> #include <consensus/params.h> #include <consensus/validation.h> #include <core_io.h> #include <hash.h> #include <primitives/block.h> #include <primitives/transaction.h> #include <span.h> #include <script/interprete...
ALGO
0.998965
7.074407
15f58f37-c8be-496e-aab4-000587aee6fc
xiaojkql/Algorithm-Data-Structure
src/fibonacci/fib2.cpp
__int64 fib ( int n, __int64& prev ) { //FibonacciеnԵݹ棩ʽfib(n, prev) if ( 0 == n ) //ݹ { prev = 1; return 0; } //ֱȡֵfib(-1) = 1, fib(0) = 0 else { // __int64 prevPrev; prev = fib ( n - 1, prevPrev ); //ݹǰ return prevPrev + prev; //ͼΪ } } //ø¼ǰһеĵǰO(n)
ALGO
0.999947
4.7703
45aaf672-fe38-4a9d-9f0b-921338dd5e0e
SamIam9640/codetree-TILs
240227/2 또는 3의 배수/multiple-of-2-or-3.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int i=1;i<=n;i++){ if(i%2==0||i%3==0) { cout<<"1 "; } else cout<<"0 "; } return 0; }
ALGO
0.999977
3.654261
1b7bfe98-47f7-4586-b398-920e4f5bd943
ishandutta2007/codeforces
aid/normal/1037/C.cpp
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; typedef long double ld; #ifdef DEBUG #define eprintf(...) fprintf(stderr, __VA_ARGS__), fflush(stderr) #else #define eprintf(...) ; #endif #define sz(x) ((int) (x).size()) #define TASK "text" const int inf = (int) 1.01e9; con...
ALGO
0.999944
4.312887
d35601cd-3df0-4528-8318-8f1d3f3a6ade
libretro/mupen64plus-libretro-nx
mupen64plus-video-angrylion/parallel_al.cpp
#include "parallel_al.h" #include <stdlib.h> #include <atomic> #include <algorithm> #include <condition_variable> #include <cstdint> #include <functional> #include <mutex> #include <stdexcept> #include <thread> #include <vector> class Parallel { public: Parallel(std::uint32_t num_workers) : m_num_workers...
TOOL
0.941997
5.223171
756f74d1-8ed9-4df2-a3b7-5bd3274bb1e2
FreshTomato-Project/freshtomato-mips
release/src/router/mysql/extra/yassl/taocrypt/src/misc.cpp
/* based on Wei Dai's misc.cpp from CryptoPP */ #include "runtime.hpp" #include "misc.hpp" #ifdef __GNUC__ #include <signal.h> #include <setjmp.h> #endif #ifdef USE_SYS_STL #include <algorithm> #else #include "algorithm.hpp" #endif namespace STL = STL_NAMESPACE; #ifdef YASSL_PURE_C void* opera...
TOOL
0.880201
6.003424
8890aa21-b298-4cc0-a81d-60ff9fba3808
ANIME-AnimeCoin/Pastel
src/snark/libsnark/algebra/curves/alt_bn128/alt_bn128_init.cpp
/** @file ***************************************************************************** * @author This file is part of libsnark, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) ********************************************************************...
CONFIG
0.875993
5.528456
7ebe1510-b33b-489f-977a-9820fe3c1dd7
CarlosForriol/FP1y2
PractRUM/copiahgit/tablero.cpp
#include "tablero.h" void nuevaJugada(tTablero& tablero, tJugada jugada) { tablero.jugadas[tablero.contTablero] = jugada; } void mostrarIndices(int num) { cout << " " << 1 << " "; for (int i = 2; i < num + 1; i++) { cout << i << " "; } cout << endl; } bool jugar(tTablero& tablero, tSoporte& soporte...
ALGO
0.939995
4.409652
0a2f2691-784b-4837-ac35-8e8f281ea04f
lokeshmogulla/SOC-CP
contests/25may/a.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int x; cin >> x; vector<int> a; int i = 0; while (x > 0) { if (x & 1) { ...
ALGO
0.999986
5.152875
85aa6f21-7a97-4576-a760-1357c53618ac
ishandutta2007/codeforces
kirill22/normal/1364/C.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define pii pair<int, int> #define ld long double #define pb push_back signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; vector<int> a(n); for (int i...
ALGO
0.999949
3.768137
740d2299-2fee-4c5a-ad24-485f1af772a9
CpBruceMeena/Geeks_for_Geeks
Anagram.cpp
#include <iostream> #include<string.h> using namespace std; void checkAnagram(string a, string b){ int c = a.size(), d = b.size(); int arr[26]; memset(arr, 0, sizeof(arr)); for(int i = 0; i<c; i++){ arr[a[i] - 'a']++; } for(int i =0 ;i <d; i++){ arr[b[i] - 'a']--; } for...
ALGO
0.999977
5.526893
08fbc8a7-2b90-43ce-bcae-eb7183020ac7
Ashish-kumar7/6Companies30days
Amazon/Longest Mountain in Array.cpp
class Solution { public: int longestMountain(vector<int>& A) { int i = 0; int start = 0; int peak = 0; int end = 0; int answer = 0; while(i + 1 < A.size()) { // go to local min while(i + 1 < A.size() && A[i] > A[i + 1]) { ...
ALGO
0.999945
5.665936
33608a19-2f9e-4cb2-a9e9-462df0bc2111
ishandutta2007/codeforces
loveye/normal/1746/E1.cpp
#include<bits/stdc++.h> using namespace std; int read(); typedef long long ll; #define fr(i,l,r) for(int i=(l);i<=(r);++i) #define rf(i,l,r) for(int i=(l);i>=(r);--i) #define fo(i,l,r) for(int i=(l);i<(r);++i) #define foredge(i,u,v) for(int i=fir[u],v;v=to[i],i;i=nxt[i]) #define filein(file) freopen(file".in","r",stdi...
ALGO
0.999871
3.429843
a5ac40a5-d1e6-4087-8cd0-5292697a1d18
devcxx/SScap
zxing/zxing/common/BitMatrix.cpp
// -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- #include <zxing/common/BitMatrix.h> #include <zxing/common/IllegalArgumentException.h> #include <iostream> #include <sstream> #include <string> using std::ostream; using std::ostringstream; using zxing::BitMatrix; using zxing::BitArray; using ...
TOOL
0.883714
6.887934