uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
cded2e39-7402-4ea2-b7e1-e5401d11e756
chonai-flora/ABC-cpp
abc252/c.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int main() { cin.tie(0)->ios::sync_with_stdio(0); int n, ans = 1000; cin >> n; int cnt[10][10] = {{0}}; vector<string> s(100); for (auto& t : s) cin >> t; for (int i = 0; i < n; i++) { for (int ...
ALGO
0.999801
3.969357
7e3f7d8f-cad2-4628-9016-f7eb8c12da2c
Atharvakawale/test1
bfs_dfs.cpp
#include <iostream> #include <vector> #include <stack> #include <queue> using namespace std; vector<bool>visit; void edge(vector<int>adj[],int u,int v) { adj[u].push_back(v); } void bfs(int s,vector<int>adj[]) { queue<int>q; q.push(s); visit[s]=true; while(!q.empty()) { int u=q.front();...
ALGO
0.999859
4.751705
3d5de9d6-2603-410b-8852-a8d6e1c53bc5
faizan346/Ds-Algo-Cplusplus
dynamicProgramming/45printAllPathMaze.cpp
#include<bits/stdc++.h> using namespace std; class Pair { public: int i; int j; string psf; Pair(int i, int j, string psf) { this->i = i, this->j = j, this->psf = psf; } }; void minimumCost(vector<vector<int>>& maze, int n, int m) { vector<vector<int>> dp(n, vector<int>(m, 0)); ...
ALGO
0.999977
4.971633
f92bd1a9-030c-499a-bfc9-82fc88deff5b
jr26271/Finding-
src/util/cmdline.cpp
#include <cassert> #include <cstdlib> #include <sstream> #include <util/cmdline.h> #include <util/message.h> /* Parses 's' according to a simple interpretation of shell rules, taking only * whitespace and the characters ', " and \ into account. */ static std::vector<std::string> simple_shell_unescape(const char *s, ...
TOOL
0.892318
5.850636
708a0d6c-9b87-451c-8408-1031624c74f4
ishandutta2007/codeforces
cucl2/normal/NA/514.cpp
/* _/ _/ _/_/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/_/ _/_/ _/ _/ _/ _/ _/ _/_/ _/ _/_/_/_/_/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/ ...
ALGO
0.999931
3.872136
1896c705-91d4-481d-9124-74da2d5ce1c5
namhai0510/C--
C--/tomauday.cpp
#include <bits/stdc++.h> using namespace std; #define nothing ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); #define endl "\n" #define ll long long #define ull unsigned long long #define fi first #define se second #define pb push_back const ll oo = 1e13; const ll modd = 1e9 + 7; const int maxn = 1e6 + 5...
ALGO
0.999865
3.539137
e043b2b0-6f22-4637-9e17-28f0d8071703
chiwei0828/2023_ICCAD_contest_problemA
2023_ICCAD_problemA/lib/sequential-solvers/SeqFROST/seqfrost/src/forward.cpp
#include "solve.hpp" #include "sort.hpp" #include "histogram.hpp" using namespace SeqFROST; struct SUBSUME_RANK { inline uint32 operator () (const CSIZE& a) const { return a.size; } }; inline void Solver::strengthen(CLAUSE& c, const uint32& self) { CHECKLIT(self); assert(c.size() > 2); assert(unassigned(self));...
ALGO
0.999582
5.073549
1771beac-4969-4040-bcea-7b7577152d21
Harshit9670/CPP
zpstest994c.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; string s; } }
ALGO
0.99268
3.488368
3f098f20-3658-4e79-bf25-39e787ec4a03
vskrishna1082/CompPhy-Assignment
module_6/Q4.cpp
#include <iostream> #include <fstream> #include <iomanip> #include <iterator> const int n=1200, dim = 3; #include "moldyn.h" int main() { vector<int> neighbor_max_list; SimulationBox mybox; mybox.init_3dLattice(); mybox.init_vel_with_temp(1); mybox.update_neighbor_list(); // create first neighbor...
ALGO
0.999296
3.590092
6988bfc8-9873-42a1-a444-78609b8813ff
Lchuxian/SLAM-Environment
OpenCV3_and_OpenCV4_coexist/opencv-4.5.5-build/opencv_contrib-4.5.5/modules/ximgproc/src/edgepreserving_filter.cpp
#include "precomp.hpp" namespace cv { namespace ximgproc { using namespace std; void edgePreservingFilter(InputArray _src, OutputArray _dst, int d, double threshold) { CV_Assert(_src.type() == CV_8UC3); Mat src = _src.getMat(); // [re]create the output array so that it has the ...
ALGO
0.998413
7.080608
22e70f7e-53f4-4ce9-94ab-c457a1d610aa
AdyaAnwesa/lab5.5
lab5.5_8.cpp
#include<iostream> using namespace std; int main() { //Print Right Triangle Star Pattern //Ask user for Required size Triangle int n; cout << "What is size of the Right Triangle star pattern that you want?"<<endl; cin >> n; //Printing Rows for(int i=0; i<n; i++){ //Printing Columns for(int j=0; j<i+1; ...
ALGO
0.986148
4.093725
a77aa81e-8cc9-4cb8-ab5a-2e5072de9fa8
gaoxiaojun/AutoTrader
AutoTrader/AutoTrader/RunningData15.cpp
#include "StdAfx.h" #include "RunningData15.h" //int BOLLDAY = 20; // CRunningData15::CRunningData15(void) // { // //BOOLDAY = 20; // //M3_Std = 3; // } CRunningData15::~CRunningData15(void) { } void CRunningData15::_init_( vector<CMinuteData> inputData ) { m_Data_Vec = inputData; vector<CMinuteData> tempVec; ...
DATA
0.928274
3.748258
0fee7d8e-bec6-49f8-8498-0fafcd3e9648
lintalve/quickPractice
algorithms/buble_sort.cpp
#include <iostream> using namespace std; void bubbleSort(int arr[], int n) { for (int i = 0; i < n - 1; i++) { // Last i elements are already sorted, so we don't need to check them for (int j = 0; j < n - i - 1; j++) { // Swap if the element found is greater than the next element ...
ALGO
0.999919
5.134849
6e66cb88-b17a-4b5d-80ab-5574d310186c
selva1632/Data-Structure-and-algorithm
Tree/114. Flatten Binary Tree to Linked List/114. Flatten Binary Tree to Linked List (iterative).cpp
// problem link: https://leetcode.com/problems/flatten-binary-tree-to-linked-list/ #include<iostream> #include<queue> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr)...
ALGO
0.999922
6.202965
ca7a3f91-61cd-4dc1-bdb9-d039cebd0128
felipefoschiera/programacaocompetitiva2019
Contest1/guarda.cpp
#include <iostream> #include <math.h> using namespace std; int main(){ int d, vf, vg; while(cin >> d >> vf >> vg){ double hipotenusa = sqrt(d*d + 12*12); double tempoF = 12.0/vf; double tempoG = hipotenusa/vg; if(tempoF < tempoG){ cout << "N\n"; }else{ ...
ALGO
0.999515
3.032243
d24b61a7-4a73-40f6-9798-ca156b08b8e5
sarvex/leetcode-chez
solution/2300-2399/2358.Maximum Number of Groups Entering a Competition/Solution.cpp
class Solution { public: int maximumGroups(vector<int>& grades) { int n = grades.size(); int l = 0, r = n; while (l < r) { int mid = (l + r + 1) >> 1; if (1LL * mid * mid + mid > n * 2LL) { r = mid - 1; } else { l = mid; ...
ALGO
0.99977
5.885343
a5900ddf-01c9-40f6-9948-ffae789ed42e
Shivam2501/MSI-GEM5
src/systemc/tests/systemc/misc/unit/data/general/promote_add/datawidth.cpp
/***************************************************************************** datawidth.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.872678
5.236585
afd3ded1-70b7-43c1-98d3-7fd0f3e5a612
poyiray/CCC-solutions
Project1/CCC '07 S2 - Boxes.cpp
#include <bits/stdc++.h> using namespace std; struct BOX { int l, w, h, v, id; bool operator<(const BOX& b) const { return v < b.v; } }; const int N = 1010; BOX a[N], b[N]; int res[N]; int n, m; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> n; for (int i = 0; i < n; i++) { int l, w, ...
ALGO
0.99994
4.31621
6f07f3eb-3088-4749-859d-6a6983c55791
Uvacoder/col-algorithms-collect
cpp/Sorting Algorithms/merge-sort-using-c++.cpp
#include<stdlib.h> #include<stdio.h> void merge(int arr[], int l, int m, int r) { int i, j, k; int n1 = m - l + 1; int n2 = r - m; /* create temp arrays */ int L[n1], R[n2]; /* Copy data to temp arrays L[] and R[] */ for (i = 0; i < n1; i++) L[i] = arr[l + i]; for (j = 0; j < n2; j++) R[j] = a...
ALGO
0.999997
5.465129
22488bf3-16f3-4940-b989-6eba82627cb7
heemang2001/-2_0
월간 코드 챌린지 시즌2/약수의 개수와 덧셈.cpp
#include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; int YacSoo(int num) { int value = 1; for (int i = 1; i <= num/2; i++) { if ((num % i) == 0) { value++; } } return value; } int solution(int left, int right) { int answer = 0; for (int i = left; i <= r...
ALGO
0.999943
4.79493
78a3482d-017d-457d-8e64-7e27058de0d0
forked-llvm/Polaris-Obfuscator
libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14, c++17 // template<forward_iterator I, sentinel_for<I> S, weakly_incrementable O> // requires indirectly_copyable<I, O> // constexpr ranges::rotate_copy_result<I, O> // ranges::rotate_copy(I first, I middle, S last, O result); // template<forward_range R, weakly_incrementabl...
TEST
0.9119
7.766811
c0a02782-ae3e-49bd-854f-d7f744ca8f7b
devomaity/programming
c codes/loops/DecimalToHexadecimal.cpp
/* * C program to Convert Decimal to Hexadecimal */ #include <stdio.h> int main() { long decimalnum, quotient, remainder; int i, j = 0; char hexadecimalnum[100]; printf("Enter decimal number: "); scanf("%ld", &decimalnum); quotient = decimalnum; while (quotient != 0) { ...
ALGO
0.965657
3.949162
4ace360a-5985-4efe-ac88-f0ed1082f8c9
FirasBDarwish/Practicing-Data-Structures-Algorithms-in-C-
Algorithm Design Implementations/Linked List.cpp
/* Section 2.4 (Arrays and Lists) of Algorithm Design Answer key: https://www.geeksforgeeks.org/program-to-implement-singly-linked-list-in-c-using-class/ */ #include <cstddef> //for 'NULL' pointer value, instead of using 'nullptr' #include <iostream> using namespace std; class Node { public: int data; ...
ALGO
0.996981
5.314581
9397c6bd-e55a-4336-8da8-54e09914675f
ufidon/ds
mod4/demos/krmx.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <algorithm> #include <limits> #include <utility> #include <tuple> template <typename T> class Graph { public: Graph(int vertices); void addEdge(const T &src, const T &dest, double weight); std::vector<std::tuple<T, T, double>> kruskalMST(); ...
ALGO
0.999989
6.386302
b9e59493-3dfc-4c60-8c55-01f581757dfb
MohamedTaher2/Flutter-project
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
22c4bdb3-6545-46ca-a0fd-565859a9313d
ishandutta2007/codeforces
tute7627/normal/1574/C.cpp
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> using namespace std; #define endl '\n' #define lfs cout<<fixed<<setprecision(10) #define ALL(a) (a).begin(),(a).end() #define ALLR(a) (a).rbegin(),(a).rend() #define UNIQUE(a) (a).erase(unique((a).begin(),(a).end()),(a).end()) #define spa << " " << #define fi first #...
ALGO
0.999991
4.010306
0f943923-3932-4e0d-8e94-90fb254d7561
xi-guo-0/leetcode-solutions
cpp/0941-valid-mountain-array.cpp
#include <vector> using namespace std; class Solution { public: bool validMountainArray(const vector<int> &arr) { if (arr.size() < 3) { return false; } auto it = next(arr.cbegin()); while (it != arr.cend() && *prev(it) < *it) it++; if (it == next(arr.cbegin()) || it == arr.cend()) {...
ALGO
0.999801
6.068757
27cd69c1-a739-4b28-a26d-66f7dcb09f74
hjkim15/Algorithm-sorting
정보시스템공학과 20181020 김희조 정렬알고리즘 과제/makeHeap.cpp
#include "sort_class.h" void SortClass::makeHeap(int n, heap& H) { int i; H.S = data; H.heapsize = n; for (i = n/ 2;i >= 1; i--) siftDown(H,i); }
ALGO
0.993328
3.958081
ba9cedb6-0394-4fef-99ca-c8f5d7a5f0b3
9759176595/LeetCodeQuestion
Integer Replacement.cpp
class Solution { unordered_map<int, int> dp; int helper(long long n) { if(n == 1) return 0; if(dp[n]) return dp[n]; if(n%2) return dp[n] = 1 + min(helper(n-1), helper(n+1)); else return dp[n] = 1 + helper(n/2); } public: ...
ALGO
0.999979
6.065278
41279ed6-4f61-48f6-83b2-20816a2326ad
fuad021/CSE-2102-Discrete-Mathematics-Lab
Lab 6/3.15.cpp
#include <iostream> #include <cmath> using namespace std; int main() { unsigned long long p, i; cin >> p; int flag = 1; for(i = 2; i * i <= p; i++) { if(p % i == 0) { flag = 0; break; } } if(1 == flag) { cout << "P = " << p << " is Prime" << endl...
ALGO
0.999832
4.360543
6395f70e-1396-4ac4-bf9c-e966757991e7
masudranam/dsa_problems
Codeforces/A_Array_Divisibility.cpp
#include<bits/stdc++.h> using namespace std; #define print(a) for(auto x:a)cout<<x<<' ';cout<<'\n'; #define debug(x) cout<<#x<<" "<<x<<'\n' #define int long long int const int M = 1e9 + 7; const int N = 2e5 + 10; void solve(){ int n; cin >> n; for(int i = 1; i <= n; i++){ cout << i <<' '; } ...
ALGO
0.99919
4.35304
3ed86225-5a57-400f-b9df-276264e70f2c
zhangxueyangjuxie/ALIZE
alize-core/src/DoubleSquareMatrix.cpp
#if !defined(ALIZE_DoubleSquareMatrix_cpp) #define ALIZE_DoubleSquareMatrix_cpp #include <new> #include <math.h> #include <memory.h> #include <cstdlib> #include "DoubleSquareMatrix.h" #include "alizeString.h" #include "Exception.h" using namespace alize; typedef DoubleSquareMatrix M; //------------------------------...
TOOL
0.978726
5.450932
9b557be4-911b-4217-b5e4-b37d3dafa6ee
Maffy-0/kyopro
abc337/abc337c.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; void fast_io() { cin.tie(nullptr); ios_base::sync_with_stdio(false); } signed main(void) { fast_io(); int N; cin >> N; vector<int> A(N + 1); for (int i = 1; i <= N; i++) { cin >> A[i]; ...
ALGO
0.999994
4.514009
f17c2f88-19e8-49de-8837-3cf055a6c133
MSP07/LeetCode-Solutions-CPLUSPLUS
ReverseVowelsOfAString.cpp
/*approach two pointers we start from left at 0 index and right at last index then till we find a vowel we incr and decr them then we swap the vowels and finally return the string*/ class Solution{ private: bool isVowel(char c){ return c=='a' || c=='e' || c=='i' || c=='o' || c=='u' || c=='A' || c=='E'...
ALGO
0.999983
6.536945
4486f964-4db6-4932-a3e4-6570721671b1
FengJiong-123/gem5_fj
src/systemc/tests/systemc/misc/sim_tests/biquad/biquad2/biquad.cpp
/***************************************************************************** biquad.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /*****************************************************************************...
ALGO
0.99902
5.243628
8b4ad77c-89bb-41e3-8460-cc13084133e2
ishandutta2007/codeforces
bredor/normal/31/A.cpp
// 228 //Never care About Rating,if u are a newbie............. //Primary focus should be on learning different algorithms as much as u can........... #include<bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //using namespace __gnu_pbds; using namespace std; #define ff first #define ss ...
ALGO
0.99988
3.485539
95ea2f55-7ae6-4c67-95b9-cc0c8602026a
rv1a/sistem-informasi-assignment
src/lib/Datetime.cpp
#include "Datetime.hpp" #include <chrono> #include <ctime> #include <exception> #include <regex> #include <unordered_map> namespace Datetime { system_clock::time_point ParseDateTimeString(std::string datetime_string) { // Ubah menjadi lowercase for (char &karakter : datetime_string) { // TODO: calling std::tol...
TOOL
0.971366
5.983195
26cf7914-d418-44fc-9494-dd561a68bf15
Skull-crusher44/gfg_practice
Difficulty: Medium/Replace O's with X's/replace-os-with-xs.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: void dfs(int i,int j, int n, int m, vector<vector<char>>&mat) { mat[i][j]='T'; // traverse through neighbour in four...
ALGO
0.999598
6.27465
666bc2ba-5ca2-497d-a01e-d8bf91545655
dbc2k5/MD02_Css7
THSS7.1.cpp
#include<stdio.h> int main(){ int i=1; for(;i<=100;i++){ if(i%3==0&&i%5==0){ printf("FizzBuzz"); } else if(i%3==0){ printf("Fizz"); } else if(i%5==0){ printf("Buzz"); } printf("%d \n",i); } }
ALGO
0.999335
3.608613
649a9d06-ed7d-4b31-81b0-7bb1b7dec29d
ojusvini/Coding-Practice
devbday2.cpp
#include <iostream> #include <algorithm> #include <string.h> using namespace std; int main() { // your code goes here int t,i; cin>>t; while(t--) { int a[26]; int sum=0,len; memset(a,0,sizeof(a)); string s; cin>>s; len=s.length(); int b[26]; memset(b,0,sizeof(b)); for(i=0;i<len;i++) { a[...
ALGO
0.999961
4.267789
cff21199-e3bf-4856-891d-6a14ef7ba4c5
nysanier/cf
lc/176/lc_C.cpp
#include <bits/stdc++.h> // #include <bits/extc++.h> #include "lc.h" // 每个时间点,选择符合条件,且截止时间最早的哪个event // 用一个heap保存当前符合条件的所有event // c++还是比python效率高很多!! // 0 分钟 最多可以参加的会议数目 通过 372 ms cpp // 2 小时,49 分钟 最多可以参加的会议数目 通过 1356 ms python3 // ------------------------------------------------- namespace { using namespace std;...
ALGO
0.999968
6.039057
aca42bbe-3764-4df8-9bca-aa6022cc454f
khhitish/Leetcode-GFG
462-minimum-moves-to-equal-array-elements-ii/462-minimum-moves-to-equal-array-elements-ii.cpp
class Solution { public: // https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/discuss/1217473/C++PythonJava-2-Solutions-(w-and-wo-Median)-Explained-with-Example-implementation int minMoves2(vector<int>& nums) { int left=0, right=nums.size()-1; int ans=0; sort(nums.be...
ALGO
0.999951
5.797188
76e19587-85fc-4cc7-82d2-7c1e1a8f1dad
EmilBP/MPS_Bose_Hubbard
main/BoseHubbardCondensateFraction.cpp
#include "itensor/all.h" #include "boson.h" #include "correlations.hpp" #include <vector> #include <fstream> using namespace itensor; using std::vector; int main(){ // vector<int> NArray = {10,20,30,40,50}; vector<int> NArray = {50}; int Nnumber = NArray.size(); // // Set sweep settinngs // auto sweep...
ALGO
0.99659
4.256957
5495b019-e715-46ae-ba1a-9b363ef8acf8
STORMPEGASUS/TIK-TAK-TOE
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
6f1662f3-95b3-4fe2-92d0-6224b1c53782
dante329/Cpp_develop
区间dp/P1435 [IOI 2000] 回文字串.cpp
#include <iostream> using namespace std; const int N = 1010; int f[N][N]; int main() { string s; cin >> s; int n = s.size(); s = " " + s; for(int len=1;len<=n;len++) { for(int i=1;len+i-1<=n;i++) //j=len+i-1jǴڵiģjΪ߽ { int j = len + i - 1; if(s[i] == s[j]) f[i][j] = f[i+1][j-1]; else f[i...
ALGO
0.999841
3.593397
05696f8d-96de-4f4e-a8aa-3633d0647fd3
4fris/-
third_party/src/opencv/modules/features2d/src/gftt.cpp
#include "precomp.hpp" namespace cv { class GFTTDetector_Impl CV_FINAL : public GFTTDetector { public: GFTTDetector_Impl( int _nfeatures, double _qualityLevel, double _minDistance, int _blockSize, int _gradientSize, bool _useHarrisDetector, double _k ) : nfeatur...
TOOL
0.857048
6.365405
46c5fbf3-202c-42eb-83be-12bbbef8953a
KUDOX8/TouristGuide
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.998693
6.797273
1bc3a280-1017-4820-bc9f-e3c0b676ed47
lesor9/spo-labs
lab_5.cpp
#include <iostream> #include <tchar.h> #include <windows.h> #include <time.h> #include <iomanip> using namespace std; LONG mass[10]; int length = sizeof(mass) / sizeof(mass[0]); void thread_1() { srand(time(NULL)); LONG random; for (int j = 0; j < 3; j++) { HANDLE hMutex_1 = OpenMutex(SYNCHRONIZE, FALSE, _T("MyM...
ALGO
0.994859
3.247059
3aac50d8-c8d1-4be5-b368-55c0343ac0a8
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/july/lis_20200710171027.cpp
#include<bits/stdc++.h> using namespace std; int main() { // scanf("%d", &n); // for (int i = 0; i < n; i++) { // int x; // scanf("%d", &x); // vector<int>::iterator it = lower_bound(d.begin(), d.end(), x); // if (it == d.end()){ d.push_back(x) ;cout << x;} // else *it ...
ALGO
0.999994
4.035952
5e1dcae7-d86a-4361-9a46-35bf146da464
Saifu0/Competitive-Programming
CP/1500/marvolo_gaunt_ring.cpp
#include<bits/stdc++.h> using namespace std; #define NINJA ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define fo(i,n) for(int i=0;i<n;i++) #define Fo(i,k,n) for(int i=k;i<n;i++) #define iii tuple<int,int,int> #define vi vector<int> #define ii pair<int,int> #define vii vector<ii> #define int long long #defin...
ALGO
0.999665
3.173274
82206970-5ea4-4704-a8a7-4f93817790e2
DISASTER-RUMBLING/CODE
算法/洛谷题单/洛谷 P1551 亲戚.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<vector> using namespace std; class Union { public: Union(int n) :fa(n + 1) { for (int i = 0; i < n; i++) { fa[i] = i; } } int find(int i) { return fa[i] = (fa[i] == i ? i : find(fa[i])); } void merge(int x, int y) { if (find(x) == ...
ALGO
0.99998
3.864296
5107a01f-bbf6-415b-afd6-31c4b715f6cd
sc21samg/GraphicAlgorithms_2D_Rendering
code/lines-benchmark/main.cpp
#include <benchmark/benchmark.h> #include "../draw2d/draw.hpp" #include "../draw2d/surface.hpp" namespace { // DDA (Digital Differential Analyzer) line drawing algorithm with floats void draw_line_dda_floats_(Surface& aSurface, Vec2f aBegin, Vec2f aEnd, ColorU8_sRGB aColor) { //initialisation of endpoints of th...
TEST
0.906815
7.058442
a11cb49d-1804-45a3-832b-351f41d924eb
zhouxuguang/Jyamithika
Jyamithika/Triangulation.cpp
#include "Triangulation.h" #include <algorithm> #include <stack> #include <map> #include <list> #include "Core/GeoUtils.h" using namespace jmk; static bool is_in_same_chain(Vertex2dDCEL* a, Vertex2dDCEL* b) { if (a->incident_edge->prev->origin == b || a->incident_edge->next->origin == b) return true; return false...
ALGO
0.999846
4.871346
ba0f1118-086f-48fb-89c2-a59b3c2f3f6d
iwiwi/programming-contests
topcoder/tco13r1a/TheFrog.cpp
#include <iostream> #include <sstream> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <cassert> #include <climits> #include <numeric> using namesp...
ALGO
0.999807
4.562804
b0a748d8-2d3f-4ca1-9214-66e5f6344222
kabuto64425/Atcoder
ABC/ABC101_200/ABC187/A.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; typedef long long ll; #define REP(i,n) for(ll i=0;i<ll(n);i++) #define REPD(i,n) for(ll i=n-1;i>=0;i--) #define FOR(i,a,b) for(ll i=a;i<=ll(b);i++) #define FORD(i,a,b) for(ll i=a;i>=ll(b);i--) const ll INF = 1000000000000; /...
ALGO
0.999775
5.081597
1daf58e5-a2f3-4c95-bfe8-37aef3ad4ec3
DenizIsikli/LeetCode-CPP
Problemsets/Problems/PalindromePartitioning.cpp
#include <string> #include <vector> class Solution { public: std::vector<std::vector<std::string>> partition(std::string s) { std::vector<std::vector<std::string>> ans; std::vector<std::string> path; backtrack(path, 0, s, ans); return ans; } private: void backtrack(std::vec...
ALGO
0.999829
6.597541
d4d3535b-83b6-4a0a-ae57-d5a8a73d0da6
LordRonz/cp-solutions
codeforces/1399C.cpp
#include <bits/stdc++.h> using namespace std; //0xACCE97ED; int main() { int t, n, w, cnt[55]; scanf("%d", &t); while(t--) { scanf("%d", &n); memset(cnt, 0, sizeof(cnt)); for(int i = 0; i < n; ++i) { scanf("%d", &w); ++cnt[w]; } int ans = 0; for (int s = 2; s <= 2 * n; ++s) { int cur = 0...
ALGO
0.999822
3.960535
aca64bf1-1f76-4465-9908-909153718c62
zorro2017zdc/cvCode
mdlt/eigen3/test/eigen2/eigen2_determinant.cpp
#include "main.h" #include <Eigen/LU> template<typename MatrixType> void determinant(const MatrixType& m) { /* this test covers the following files: Determinant.h */ int size = m.rows(); MatrixType m1(size, size), m2(size, size); m1.setRandom(); m2.setRandom(); typedef typename MatrixType::Scalar S...
TEST
0.935441
6.899129
fdde48bc-35b3-4d3c-bb72-b6be1fd333d7
lattalab/slove-problem
Star 1/uva12019.cpp
// accepted # include <iostream> using namespace std; // 2011 1/1 = 星期六 // 算距離星期六差幾天%7 就好 int main() { int t; cin >> t; string Day[]={"Saturday","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday"}; int Month[]={0,31,28,31,30,31,30,31,31,30,31,30,31}; while(t--) { int m,d, days=...
ALGO
0.999909
3.734386
23921026-0887-4cbf-8a70-12af7c6877c1
AkashdeepGarg/DSA-and-SQL
0130-surrounded-regions/0130-surrounded-regions.cpp
class Solution { public: void solve(vector<vector<char>>& board) { int n=board.size(); int m=board[0].size(); queue<pair<int,int>> q; vector<vector<int>> visited(n,vector<int>(m,0)); int di[]={-1,1,0,0}; int dj[]={0,0,1,-1}; for(int i=0;i<n;i++){ ...
ALGO
0.999882
6.292512
fcb86105-a113-4eaf-ba7a-75ebeda0f87b
nenuon/CompetitiveProgramming
Atcoder/ABC057/C2.cpp
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <cmath> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <stdio.h> using namespace std; #define ll long long #define PI acos(-1.0) #defi...
ALGO
0.999883
3.933193
98c2d417-1149-41f8-b5ea-19d392c9c7f6
bhanuvikas/Kirk_Patrick_Seidel_Convex_Hull_API
testing.cpp
#include <bits/stdc++.h> #include"input_reader.hpp" #include"kirkpatrick_seidel.hpp" using namespace std; int main(){ #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); #endif //! main function which calls the required classes to generate convex hull using kirk patrick seidel algorithm vector<pair...
ALGO
0.999881
4.06637
f7fa6b0d-e428-4d0e-8185-356531a0cea8
ekut-es/pulp-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
4e64c290-fc25-4f8e-8827-188bfc484424
nanase-ja/AOJ
16a.cpp
#include <iostream> #include <vector> using namespace std; int main(void){ int n; vector<bool> s(13),h(13),c(13),d(13); cin >> n; string st; int num; for(int i=0; i<n; i++){ cin >> st >> num; if(st == "S") s[num] = true; if(st == "H") h[num] = true; if(st == "C") c[num] = true; ...
ALGO
0.989449
3.027559
4351cefd-ce70-43ca-8e67-3d299bd077ea
paulosabayomi/studio-lite-audio
JUCE/modules/juce_box2d/box2d/Dynamics/Joints/b2PulleyJoint.cpp
#include "b2PulleyJoint.h" #include "../b2Body.h" #include "../b2TimeStep.h" // Pulley: // length1 = norm(p1 - s1) // length2 = norm(p2 - s2) // C0 = (length1 + ratio * length2)_initial // C = C0 - (length1 + ratio * length2) // u1 = (p1 - s1) / norm(p1 - s1) // u2 = (p2 - s2) / norm(p2 - s2) // Cdot = -dot(u1, v1 + c...
ALGO
0.994546
7.051435
0cdf54b0-363c-4d35-9749-df434c3c85c9
KrissApost/C_Group
alt.cpp
#include<bits/stdc++.h> using namespace std; long long arr[50][50]; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int k, m, n; cin >> k >> m >> n; for(int i = 1; i < m; i++){ arr[1][i] = 1; } for(int i = 2; i <= n; i++){ for(int y = 1; y <= m; y++...
ALGO
0.999991
3.330995
b723f058-1128-4f54-823d-61521ec85783
quanganh208/DSA-CodePTIT
DSA03006 - SẮP XẾP THAM LAM.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int N; cin >> N; vector<int> A(N); for (auto &x : A) cin >> x; vector<int> B(A); sort(B.begin(), B.end()); for (int i = 0; i < N / 2; i++) if (B[i] != A[i] and B[i] != A[N - i - 1]) { cout << "No...
ALGO
0.999959
4.509339
dfd6855c-907c-4521-a805-5427446f0b43
sourcesync/NYU
SquidBall/WallEProxy/squidball/3rdparty/opencv/everything/opencv/cvaux/src/vs/blobtrackingmsfgs.cpp
#include "_cvaux.h" #define SCALE_BASE 1.1 #define SCALE_RANGE 2 #define SCALE_NUM (2*SCALE_RANGE+1) typedef float DefHistType; #define DefHistTypeMat CV_32F #define HIST_INDEX(_pData) (((_pData)[0]>>m_ByteShift) + (((_pData)[1]>>(m_ByteShift))<<m_BinBit)+((pImgData[2]>>m_ByteShift)<<(m_BinBit*2))) void calcKernelEpa...
ALGO
0.99428
5.420683
c82aacb9-1f97-4111-abc1-b87d33ff4daa
ggyull/IOT-Class
2021-03-18/exercise2-1.cpp
#include <stdio.h> int sum(int a, int b){ return a+b; } int main(){ int num1,num2; scanf("%d %d", &num1, &num2); printf("%d", sum(num1,num2)); return 0; }
ALGO
0.982111
3.08631
e25914ce-d39a-4631-84d6-b4a4f5a76f40
sushil-gits/gfg
day1.cpp
class Solution { public: // function to find the second largest element int getSecondLargest(vector<int> &arr) { int n = arr.size(); int largest = -1, secondLargest = -1; // finding the second largest element for (int i = 0; i < n; i++) { // If arr[i] > largest, update second largest with...
ALGO
0.999901
4.778482
d4014394-828c-4939-953a-dc7fb8454427
lns/HFO_exp
src/bhv_goalie_free_kick.cpp
// -*-c++-*- ///////////////////////////////////////////////////////////////////// #ifdef HAVE_CONFIG_H #include <config.h> #endif #include "bhv_goalie_free_kick.h" #include "bhv_goalie_basic_move.h" #include <rcsc/action/body_clear_ball.h> #include <rcsc/action/body_pass.h> #include <rcsc/action/basic_actions.h>...
ALGO
0.928735
5.673225
c62355b0-76b1-4e7e-967c-23aa40e72050
simCecca/Big-Graph-Drawing
BC_SPQR_analysis/TaskManager.cpp
//ogdf #include <ogdf/basic/Graph.h> #include <ogdf/layered/DfsAcyclicSubgraph.h> //connected component #include <ogdf/fileformats/GraphIO.h> //biconnected component #include <ogdf/decomposition/BCTree.h> #include <ogdf/decomposition/DynamicBCTree.h> //triconnected component #include <ogdf/decomposition/SPQRTree.h> #in...
ALGO
0.960945
3.045766
537e92ea-8596-44f7-a231-f17d3fbf6c54
yplusplus/aabbyy
20140612/f.cpp
#include <bits/stdc++.h> using namespace std; const int N = 210; vector<int> v[N]; int mod(int x,int y) { x %= y; if(x <= 0) x += y; return x; } int main() { freopen("factor.in","r",stdin); freopen("factor.out","w",stdout); int n; cin >> n; for(int i = 1; i <= 2 * n - 1; i ++) { ...
ALGO
0.999919
3.621274
ef96b59b-7a13-48ae-861e-29afede2e7f4
sarvex/leetcode-jai
solution/1900-1999/1968.Array With Elements Not Equal to Average of Neighbors/Solution.cpp
class Solution { public: vector<int> rearrangeArray(vector<int>& nums) { sort(nums.begin(), nums.end()); vector<int> ans; int n = nums.size(); int m = (n + 1) >> 1; for (int i = 0; i < m; ++i) { ans.push_back(nums[i]); if (i + m < n) ans.push_back(nums...
ALGO
0.999995
5.616268
8a30de0f-c228-40f2-9b1e-54e923f325a7
NIRMAL-S-12/Coding
1380-lucky-numbers-in-a-matrix/1380-lucky-numbers-in-a-matrix.cpp
class Solution { public: int fun(int ii, int jj, int ele, vector<vector<int>>& matrix) { int row = matrix.size(); int col = matrix[0].size(); for(int i = 0 ; i < col ; i++) { if(ele > matrix[ii][i]) return 0; } for(int i = 0 ; i < ...
ALGO
0.999981
5.54278
ef20000c-0bc5-44a3-8e7e-f2362adf4e94
kevinlb1/CATS
polyModel.cpp
#include "polyModel.h" #include <fstream> #include <stdio.h> #include <assert.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <ctype.h> // #ifdef LINUX // #include <values.h> // #else // #include <limits.h> // #endif #include "Param.h" const int PolyModel::EMPTY = -1; PolyModel::PolyModel(con...
ALGO
0.958857
4.217612
b46eec48-1f15-4ded-8a4b-dcd2efe34a37
atharvabhakane/Leetcode_Journey
1986-largest-color-value-in-a-directed-graph/1986-largest-color-value-in-a-directed-graph.cpp
const int N=100000; vector<int> adj[N]; int q[N], front=0, back=0;// for queue int freq[N][26]; class Solution { public: static int largestPathValue(string colors, vector<vector<int>>& edges) { const int n=colors.size(); for(int i=0; i<n; i++) adj[i].clear();// reset vector<int> ...
ALGO
0.999746
5.074639
341be14d-3f66-4e1c-a27b-0f8988f7b6f5
Aman-Meenia/DsaProblems
temp.cpp
/* Author: Aman Meenia Created: */ #include<bits/stdc++.h> #define ll long long // #define mod 1000000007 using namespace std; int mod = 1e9 + 7; long long binexp(int a, int b, int m) { long long ans = 1; while (b > 0) { if (b & 1) { ans = (ans * 1ll * a) % m; } a = (a * ...
ALGO
0.999888
4.660554
c0596a6c-ae04-4f6b-a885-0a01027382b0
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_47_1.cpp
#include <bits/stdc++.h> using namespace std; const long long int mod = 1e9; long long int fun() { long long int n, i, j, x, h; cin >> n; long long int a[n], b[n]; for (long long int i = 0; i < n; i++) { cin >> a[i] >> b[i]; } long long int p = a[0]; long long int cnt = 1; for (long long int i = 1; ...
ALGO
0.999841
3.986323
0101be47-dfd2-482f-b6cd-38a6802f16cf
ValentineKornel/OAiP_1_semestr
Lab10/Lab10_dop2/lab10_dop2_manual.cpp
#include <iostream> #include <ctime> void main() { setlocale(LC_CTYPE, "Russian"); using namespace std; const int N = 100; int i, size, A[N], count = 0; int rmn = 0, rmx = 99; cout << " "; cin >> size; cout << " : "; srand((unsigned)time(NULL)); for (i = 0; i < size; i++) { cin >> A[i]; } for (i = 0;...
ALGO
0.999586
3.401697
3e2492e3-005c-4e19-949f-4e069fb004a2
susantabiswas/Software-Interview-Essentials
Leetcode/String/reorganize-string.cpp
/* https://leetcode.com/problems/reorganize-string/submissions/ TC: O(N) + O(26log26) */ class Solution { public: struct Comp { // min comp for max heap const bool operator()(const pair<char, int>& a, const pair<char, int>& b) const { return a.second < b.second; } ...
ALGO
0.999996
5.934815
545ecd48-c40d-43d3-b24b-c9ebf2684c96
leiverandres/implementations
codes/graphs/dijkstra.cpp
/* * Tested with http://www.spoj.com/problems/EZDIJKST/ */ #include <bits/stdc++.h> #define D(x) cout << #x " = " << x << endl #define INF INT_MAX using namespace std; struct Edge { int to, dist; Edge() {} Edge(int t,int d): to(t), dist(d) {} bool operator < (const Edge &e) const { return dist > e.dist; ...
ALGO
0.999939
4.494595
8907db5c-6d19-4697-8e19-c1eda04de8c3
gahara086/AtCorderPromblems-BootCampForBeginners
Hard100/52.cpp
#include <bits/stdc++.h> #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cassert> #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include...
ALGO
0.999969
3.507739
109360f4-1af5-4044-b298-9651e0e1bd62
bengheng/Expose
src/stp/src/simplifier/constantBitP/ConstantBitP_Shifting.cpp
#include "ConstantBitP_TransferFunctions.h" #include "ConstantBitP_Utility.h" #include "../../extlib-constbv/constantbv.h" // smtlib & x86 semantics differ for what happens when a value is shifted by greater // than the bitWidth. On x86, in 64-bit mode, only the bottom 6 bits of the shift are // used. In SMTLIB the to...
ALGO
0.99974
6.115983
16f8ac77-1d16-4cd1-b17f-e9c24bf8385c
Valerion052/codeforces
training/Codeforces_Round/ДП/180C/main.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; int n=s.size(); int dp_1[n+2]{}, dp_2[n+2]{}; dp_1[1] = s[0]-'a'>=0; dp_2[n] = s[n-1]-'a'<0; for (int i=2; i<=n; ++i) {dp_1[i]=dp_1[i-...
ALGO
0.999946
4.02914
a0eaeb0d-af17-433c-9379-b3bb49c2d14d
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/couples-holding-hands-Solution.minSwapsCouples/177874_Exec_Code_Overflow.cpp
void aes_crypt_ecb( aes_context *ctx, int mode, const unsigned char input[16], unsigned char output[16] ) { int i; unsigned long *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3; #if defined(XYSSL_PADLOCK_C) && defined(XYSSL_HAVE_X86) if( padlock_supports( PAD...
ALGO
0.999845
5.141378
cea5faef-bc24-49da-9a63-5af768686a37
delta4d/AlgoSolution
zoj/17/2613.cpp
#include<stdio.h> #include<memory.h> #include<stdlib.h> #define MaxL 6 #define MaxN 10001 char price[MaxN][MaxL]; int visit[MaxN]; int main(void) { int i; int k; int test_case; int cur; int u; int m; int min; int index; int unique; char buff[MaxL]; scanf("%d", &test_case); for (k=1; k<=test_case; ++k...
ALGO
0.999724
3.468235
82ae2544-e229-4cf8-acf7-12b26d67327a
HekpoMaH/Olimpiads
ALGO ACADEMY/octoberfest2013/f.cpp
#include<bits/stdc++.h> using namespace std; struct el { int val,pos; }; el a[50009]; int eln; int n,c; int solve(int number) { int l=0,r=eln,md,ans=0; while(l<=r) { md=(l+r)/2;//cout<<number<<" "<<md<<" "<<a[md].val<<" "<<a[md+1].val<<endl; if(number>=a[md].val&&number<=a[md+1].val) ...
ALGO
0.999998
3.547302
ccb12b3c-31b4-4944-9d0f-d867780b5cdc
Megan0704-1/CUDA
llvm/lib/Support/MD5.cpp
#include "llvm/Support/MD5.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Endian.h" #include <array> #include <cstdint> #include <cstring> // The basic MD5 functions. // F and G are optimized compared to the...
ALGO
0.998707
7.555989
e6c34ba3-b853-4a29-b7f2-15de03c27d4f
satyampandeygit/solved-problems
first-bad-version/first-bad-version.cpp
// The API isBadVersion is defined for you. // bool isBadVersion(int version); class Solution { public: int firstBadVersion(int n) { long long i=0,j=n; while(i<j){ long long m= (i+j)/2; bool isBad = isBadVersion(m); if(!isBad){ ...
ALGO
0.999917
6.545106
01ad1ed5-0167-4f75-88e9-683362aca7e6
AyushGupta11442/competative_coading
leetcode/easy/contain duplicates.cpp
// https://leetcode.com/problems/contains-duplicate/ #include<iostream> #include<vector> #include<algorithm> using namespace std; class Solution { public: bool containsDuplicate(vector<int>& nums) { sort(nums.begin() , nums.end()); for(int i = 0 ; i < nums.size() ; i++){ if((i != nums....
ALGO
0.999834
5.418612
b8ccbc70-ecbd-4df4-b3d4-392f6422e350
wangfengjs/codeforwork
leetcode/tips/2/src/sortColors/sortColors.cpp
// Source : https://oj.leetcode.com/problems/sort-colors/ // Author : Hao Chen // Date : 2014-06-25 /********************************************************************************** * * Given an array with n objects colored red, white or blue, sort them so that objects of * the same color are adjacent, with the...
ALGO
0.999703
5.406033
6bbdcc57-4eff-4fa3-96c0-29bec855400d
Jingxiang-Zhang/CS_Course_in_CAU
1 大一/c语言/day5/homework9-Cpp1.cpp
#include<stdio.h> int main() { int a,b,c,k[4][3],max,row,colum; for (a=0;a<4;a++) { for(b=0;b<3;b++) { scanf("%d",&k[a][b]); } getchar(); } max=k[1][1]; for(a=0;a<4;a++) for(b=0;b<3;b++) { if(k[a][b]>max) { max=k[a][b]; row=a; colum=b; } } printf("max=%d\nrow=%d\ncolum=%d\n...
ALGO
0.999333
3.094013
68ec1a2a-0027-4a3a-a5e0-d04a0a9ff342
stephanus2137/gacek
przecinanie.cpp
//gacek #include <iostream> using namespace std; struct punkt{ int x; int y; }; int wyznacznik(int a, int b, int c, int d, int e, int f){ return a * d + c * f + e * b - e * d - c * b - a * f; } int main(){ int ile, wzn; bool pc = false, pd = false; cin >> ile; punkt A, B, C, D; for(...
ALGO
0.999773
4.481592
60efa5fc-e019-4d48-b648-479c962062f2
tazkhan24/Coding-Questions
Alternate positive and negative numbers - GFG/alternate-positive-and-negative-numbers.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: void rearrange(int arr[], int n) { // code here vector<int> v1,v2; for(int i =0;i<n;i++){ if(arr[i]>=0) v1.push_back(arr[i]); ...
ALGO
0.999883
5.777389
8d44283d-0864-4763-b66c-17b2ee7fa13c
a1k2-c3/Leetcode
3151-special-array-i/3151-special-array-i.cpp
class Solution { public: bool isArraySpecial(vector<int>& nums) { if(nums.size()==1)return true; if(nums.size()==3){ if((nums[0]+nums[1])%2==1 && (nums[1]+nums[2])%2==1)return true; else return false; } for(int i=0;i<nums.size()-1;i++){ if((nums[i]...
ALGO
0.999807
5.600127
72206ce1-3b99-4544-aea2-90fb7998f8e6
lonelam/SolveSet
stackoverflow/main.cpp
#include<bits/stdc++.h> using namespace std; int test(int x) { if(x == 0) { return 1; } int a[100]; return 1 + test(x - 1); } int main() { cout<<test(100000); }
ALGO
0.999698
3.694901
84b6cc08-c9f2-4cd2-9bea-ef694b5bb70f
mariachiaramonti/mesh_alignment
eigen-eigen-5a0156e40feb/unsupported/doc/examples/MatrixSquareRoot.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); MatrixXd A(2,2); A << cos(pi/3), -sin(pi/3), sin(pi/3), cos(pi/3); std::cout << "The matrix A is:\n" << A << "\n\n"; std::cout << "The matrix square root of A is:...
ALGO
0.999453
3.930508
b57bb6c5-2ae0-4b17-9575-7004ca4d53e3
alexkoltun/wkhtmltopdf-qt-batch
src/3rdparty/clucene/src/CLucene/search/DateFilter.cpp
#include "CLucene/StdHeader.h" #include "DateFilter.h" CL_NS_USE(index) CL_NS_USE(util) CL_NS_USE(document) CL_NS_DEF(search) DateFilter::~DateFilter(){ _CLDECDELETE( start ); _CLDECDELETE( end ); } DateFilter::DateFilter(const DateFilter& copy): start( _CL_POINTER(copy.start) ), end ( _CL_PO...
TOOL
0.86224
5.933051
dde2c4bd-8e22-4192-aac5-7be574bca70f
Iftekhar-Ahamed/Code
B_Binary_Cafe.cpp
/*** ** Bismillahir Rahmanir Rahim ** ALLAHU AKBAR ** ** Author: Iftekhar Ahamed Siddiquee ** Bangladesh University of Business and Technology, ** Dept. of CSE. ***/ #include <bits/stdc++.h> using namespace std; #define read freopen("0_input.txt", "r", stdin) #define write freopen("0_outp...
ALGO
0.999898
3.599015