uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
9f1df139-671d-43ee-ba02-225386830840
bioexcel/bioexcel-code-releases
GROMACS/gromacs-2019-beta1/src/gromacs/mdlib/calcmu.cpp
/* This file is completely threadsafe - keep it that way! */ #include "gmxpre.h" #include "calcmu.h" #include <cstdio> #include <cstdlib> #include "gromacs/gmxlib/network.h" #include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "gromacs/mdlib/gmx_omp_nthreads.h" void calc_mu(int start, int homenr, ...
ALGO
0.99737
6.587731
94c5d9ce-e1d6-49a4-9b4a-8efe53d6fc41
judy5050/algorithmStudy
프로그래머스_[1차]프렌즈블록.cpp
// // 프로그래머스.cpp // algo // // Created by 박효정 on 2021/10/06. // #include <string> #include <vector> #include <algorithm> #define MAX 10000000 using namespace std; #include <string> #include <vector> using namespace std; int dx[]={1,0,1}; int dy[]={0,1,1}; int solution(int m, int n, vector<string> board) { in...
ALGO
0.999532
4.890643
b37dcb5d-7116-4f6f-99dd-29004fc8593a
a00012025/Online_Judge_Code
Zerojudge/b257.cpp
#define NDEBUG #ifdef NDEBUG #define debugf(...) ((void)0) #else #define debugf(...) printf(__VA_ARGS__) #endif // NDEBUG #include<bits/stdc++.h> using namespace std; const int maxn=1000,INF=100000000 ; struct P{int from,to,flow,cap,cost;}; vector<P> edge ; vector<int> G[maxn] ; int a[maxn],d[maxn],fa[maxn] ; void ini...
ALGO
0.999711
3.932523
15ef45ea-9f09-4f2f-9819-dfc45392bd78
junseok16/Baekjoon-Online-Judge
Baekjoon-Online-Judge/09. 이진 탐색(Binary Search)/10816번 숫자 카드 2.cpp
/* * @title : 10816번 숫자 카드 2(실버 4) * @content : 이진 탐색 * @author : 탁준석 * @date : 230206 * @time : 312ms * @memory : 3976KB * @state : 완료 */ #include <iostream> #include <vector> #include <algorithm> using namespace std; int N, M; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> N; ...
ALGO
0.999988
5.026584
d744cff8-d9c9-41a6-aa23-b8467f9ace2d
gust4vo/PDS2
VPL/Ambientacao/media_desviopadrao.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; float* seq = new float[t]; float media = 0.0; for(int i=0; i<t; i++){ cin >> seq[i]; media += seq[i]; } media /= t; float desvio=0; for(int i=0; i<t; i++){ desvio += pow(seq[i] - media, ...
ALGO
0.999726
3.854925
9502c602-b50c-4fc3-8cb5-6298e07de338
MOAIS2022Labs/LabsAndPractice
Лекции Каплиевой/!3 сем/14.10.23/ConsoleApplication1/main.cpp
#include "FormulaTree.h" /* Дерево-формула Формула - это либо терминал (в частности, цифры от 0 до 9), либо в скобках заключенная конструкция : трерминал - знак - терминал. Знаком могут быть: "+", "-", "*". По определнию: во внутренних узлах могут лежать только знаки (операции), в листьях лежат терминалы. */ int main(...
ALGO
0.999903
4.353524
3ddf38af-c83e-404b-abf5-3ba1b2906b31
sergeyrachev/khaotica
src/mpeg2_reader.cpp
// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com #include "mpeg2_reader.h" #include "mpeg2_types.h" #include "eval_logical.h" #include "eval_conditional.h" #include "eval_arithmetic.h" #include "eval_bitwise...
TOOL
0.928406
5.686058
3c62e8ea-7727-4823-ab18-bb012774054d
divyadhimaan/leetcoding
62-unique-paths/62-unique-paths.cpp
class Solution { public: int uniquePaths(int m, int n) { // vector<vector<int>> dp(m, vector<int>(n,0)); vector<int> prev(n,0); vector<int> curr(n,0); curr[0] = 1; for(int i=0;i<m;i++) { for(int j=0;j<n;j++) { if(i...
ALGO
0.99997
6.398909
6fab1b10-7515-4f70-89a7-f98fc87b1444
ZigorK/lab7
boost/libs/bimap/example/mi_to_b_path/mi_bidirectional_map.cpp
/****************************************************************************** Boost.MultiIndex ******************************************************************************/ #include <boost/config.hpp> //[ code_mi_to_b_path_mi_bidirectional_map #include <iostream> #include <boost/tokenizer.hpp> #include <boost/m...
ALGO
0.976615
6.431124
f6538589-839c-4066-b5d0-33a3ab5c8ad0
umaidansari12/CP_Backup
previous_codes/maxTrailingDifference.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int max_TrailingDifference(vector<int>s, int n) { vector<int> res; for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) { res.push_back(s[i] - s[j]); } } res.push_back(-1); return *max_element(res.begin(), res.end()); } int maxTr...
ALGO
0.999695
4.616265
81abf258-43df-4225-b5a1-78d60d02a93e
Azurelol/Algorithms
Algorithms/Algorithms/Probability.cpp
#include "Probability.h" namespace Algorithms { char FindMostFrequentLetter(const std::string & message, bool print) { char mostFrequent = 'a'; std::vector<int> frequencies; frequencies.reserve(26); for (int i = 0; i < 26; ++i) { frequencies.push_back(0); } for (char c : message)...
ALGO
0.999843
6.878204
03fa9e8f-4152-4868-86df-56d88162d0b7
saarang123/Competitive-Programming
inoi_mocks/mock1_q1.cpp
#include <bits/stdc++.h> using namespace std; //#define int long long std::mt19937 rng((int) std::chrono::steady_clock::now().time_since_epoch().count()); const int N = 5002; signed main() { std::ios::sync_with_stdio(0); std::cout.tie(0); std::cin.tie(0); #ifndef ONLINE_JUDGE freopen("C:/Users/shriy...
ALGO
0.999595
4.542916
6ab45669-b352-4894-a454-ddd4d9d1a861
dwdjjj/BOJ
completed/BAEKJOON_3028/BAEKJOON_3028/main.cpp
// // main.cpp // BAEKJOON_3028 // // Created by 권영재 on 2021/05/04. // #include <iostream> #include <string> using namespace std; int main(int argc, const char * argv[]) { int cup[3]={1, 0, 0}; string S; cin >> S; int tmp = 0, check=0; for(int i=0; i<S.size(); i++){ if(S[i]=='A'){ ...
ALGO
0.999936
3.955826
ac4f6a4e-ca07-4492-a760-919db3ab993f
jooo0922/cpp-study
TBCppStudy/Chapter6_19/Chapter6_19.cpp
#include <iostream> using namespace std; int main() { int* ptr = nullptr; // 포인터에 대한 포인터 > 이중 포인터를 만들 수도 있음! // 자료구조 알고리즘 구현 시 많이 사용해봤었지? int** ptrptr = nullptr; // 포인터에 대한 포인터인데, 원래 변수의 타입은 int 다! 라고 이해하면 됨. int value = 5; ptr = &value; ptrptr = &ptr; // 즉, <특정 포인터 변수(ptr)에 저장된 메모리 주소값...
TOOL
0.889316
3.694905
0eea0f7a-faaa-43fa-8a31-4e237df8338c
mukuldeep/cs
cp/CSES/cses_1666.cpp
// // Created by me on 03-03-2021. // #include <bits/stdc++.h> #define ll long long using namespace std; vector<ll> adj[100005]; bool v[100005]={false}; vector<ll> local; vector<vector<ll>> comps; void dfs(ll vn){ local.push_back(vn); v[vn]=true; for(auto ch:adj[vn]){ if(!v[ch]){ dfs(ch)...
ALGO
0.999933
4.645098
fe56ac2f-d2c0-44e0-af35-d291a373bbd8
KingCobra95/RedCodder
codeforse/315-C.cpp
#include <iostream> #include <cstdio> #include <vector> #include <map> #include <queue> #include <stack> #include <cstring> #include <algorithm> #include <cstdlib> #include <cmath> #include <set> #include <limits.h> #include <assert.h> //#include <unordered_map> using namespace std; #define mp make_pair #define pb p...
ALGO
0.999943
3.744739
27219d23-02ca-4247-9b87-226ae162b071
wayhong0928/Coding-Practice
C++/ZeroJudge/d511-小明的作業.cpp
#include<iostream> using namespace std; int main(void) { int a,b,c,ans=0; for(int i=0;i<5;i++) { while(cin>>a>>b>>c) { if(a+b>c and a+c>b and b+c>a) { ans++; } break; } } cout<<ans; return 0; }
ALGO
0.999797
4.159327
35b9cf9b-41d4-465e-b7f0-70e211818c17
AnishGuruvelli/miniature-fiesta
binarySearch/peakIndexMountainArray.cpp
// https://leetcode.com/problems/peak-index-in-a-mountain-array/ class Solution { public: int peakIndexInMountainArray(vector<int> &arr) { // O(N): TIME COMPLEXITY // int i = 0; // while (A[i] < A[i+1]) i++; // return i; int n = arr.size(); int low = 0; ...
ALGO
0.99997
5.835697
4889dc3c-29c2-4306-9ee1-80e2feddc2d9
cheapcoder007/competitve_programming_codes
watering_the_flowers.cpp
#include <bits/stdc++.h> using namespace std; int n, x1, x2, y2, a, b, x, y, i, r1, r2, Y1, r1prev, r2prev, tmp, flag, maximum; int cal(); int main() { cin >> n >> x1 >> Y1 >> x2 >> y2; tmp = n; vector < vector < int > > vec(n, vector < int > (2)); while(n--) { cin >> x >> y; ...
ALGO
0.999838
3.548786
aa24a4a4-6c0d-4f65-bf86-2fb0d6e348cc
satyaprakash-web/Week2-DSA-CipherSchools
Lecture 20/video20 Next-greater-Element.cpp
vector<int> nextGreaterElement(vector<int>& nums1, vector<int>& nums2) { unordered_map<int, int> nextGreater; stack<int> s; for (int num : nums2) { while (!s.empty() && s.top() < num) { nextGreater[s.top()] = num; s.pop(); } s.push(num); } vector<...
ALGO
0.999657
5.93617
62b4a94e-0cc8-4fa0-9fc9-788ed210bb03
mbieb/poke_app
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.998762
6.786404
449fef77-b52f-4899-8a24-e6744abf8592
karslioguzhan/Programming-Principles-and-Practice-Using-Cpp
09_Chapter/18_Exercise/18_Exercise.cpp
// 18_Exercise.cpp : Give an example of a calculation where a Rational gives a mathematically better result than double. #include <iostream> #include "RationalNumber.h" // Answer: The ratio subtraction doesn't have the floating point error unlike the double one int main() { RationalNumber ratio1{ 1,1000000000 },...
TOOL
0.977017
6.205994
29fbd13c-9b2a-4943-b83f-ed9eab8c444b
namhyeop/AlgorithmProblem
백준알고리즘/수학/14241번(슬라임합치기).cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string input; cin.ignore(); getline(cin, input); string tmp; stringstream stream; vector<int> v; stream.str(input); long long ret = 0; while (stream >> tmp) { if (v.size() == 2) { int tmp1 = v.back(); v.pop_back(); i...
ALGO
0.999855
4.270521
66cea83d-a88f-484d-a25a-a1f61e6787ab
vladisokay/oop
LW5/main.cpp
#include<iostream> #include<chrono> #include<map> #include<list> #include"allocator.hpp" #include"list.hpp" const int max_count = 20; template<typename T, typename U> using my_map_allocator = lab::Allocator<std::pair<const T, U>, max_count>; template<typename T, typename U> using my_map = std::map<T, U, std::less<T...
TOOL
0.918254
3.541156
a83da35e-c850-4535-a14a-31d708316a47
Ryb7532/AtCoder
submissions/abc365/c.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define GET_MACRO(_1,_2,_3,NAME,...) NAME #define rep3(i,s,e) for (int i=(int)s; i<(int)e; i++) #define rep2(i,n) rep3(i,0,n) #define rep1(n) rep2(_,n) #define rep(...) GET_MACRO(__VA_ARGS__,rep3,rep2,rep1)(__VA_ARGS__) #define ...
ALGO
0.999995
3.960129
bc27b824-9ec1-425d-b206-f8fe0b0ebb88
ShauryaTripathinitrr/LeetCode
0767-prime-number-of-set-bits-in-binary-representation/0767-prime-number-of-set-bits-in-binary-representation.cpp
class Solution { private: int countbits(int n) { int count=0; while(n!=0) { count+=1&n; n=n>>1; } return count; } bool prime(int n) { if(n==2) { return true; } if(n==1) return false; ...
ALGO
0.999988
4.664445
48a1d2b2-dd42-4003-96a4-447dc7a75da8
jackSparrow655/dsa_journey
binarySearch.cpp
#include<iostream> using namespace std; int binarySearch(int array[], int size, int key){ int start = 0; int end = size - 1; int mid = (start + end) / 2 ; while(start <= end){ if(array[mid] == key){ return mid; break; } if(key > array[mid]){ st...
ALGO
0.999965
5.120412
6dc105b3-fda2-48f6-8928-93fd82b7950f
callmepranavv/DSA
Stack/getMaxArea.cpp
#include <bits/stdc++.h> using namespace std; int getMaxArea(int arr[],int n){ stack <int> s; int res=0; int tp; int curr; for(int i=0;i<n;i++){ while(s.empty()==false && arr[s.top()]>=arr[i]){ tp=s.top();s.pop(); curr=arr[tp]* (s.empty() ? i : i - s.top() - 1);...
ALGO
0.999854
5.947652
3b6c4667-c40a-4907-8b55-907d392f721a
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/01/0109/personal_submission/cf360a_mrsuns.cpp
void Solve() { int n, m;cin >> n >> m; vector<array<int, 4>> a(m + 1); for (int i = 1;i <= m;i++) { int t, l, r, x;cin >> t >> l >> r >> x; a[i] = { t,l,r,x }; } vector<int> s(n + 1), res(n + 1, inf); for (int i = 1;i <= m;i++) { auto [t, l, r, x] = a[i]; if (t ==...
ALGO
0.99999
3.820127
e88ac82b-001e-4488-a370-20e95ccf3f79
Shiwangii/LEETCODE
maximum-count-of-positive-integer-and-negative-integer.cpp
class Solution { public int maximumCount(int[] nums) { int p=0, n=0; for(int num: nums){ if(num>0){ p++; }else if(num<0){ n++; } } return Math.max(p, n); } }
ALGO
0.999107
4.131424
33a37366-ff64-40e7-953b-b7691c301d5e
aya2003A/IEEE-ZSB-Technical-Rookies-23
task1/4.cpp
#include <iostream> #include<bits/stdc++.h> #include<string> #include<stdio.h> #include<math.h> #include<algorithm> #define ll long long #define FAST #define endd "\n" #define ll long long #define ld long double #define ull unsigned long long using namespace std; int main() { ios_base::sync_with_stdio(0); cin.t...
ALGO
0.999348
4.196213
7044c4a0-a687-43db-8050-d85cfa3c30bb
son-of-mountain/problem-solving
codeforces/icpc_mansoura/.history/contest#3/D - Odds Vs Evens_20240815194549.cpp
#include<bits/stdc++.h> using namespace std; #define sonic ios_base::sync_with_stdio(false) ; cin.tie(NULL) ; cout.tie(NULL); #define ll long long int main(){ sonic ; ll s1=0 , s2=0 ; int n ; cin >> n ; int arr[n] ; for(int i = 0 ; i < n ; i++) cin >> arr[i] ; for(int i = 0 ; i <...
ALGO
0.999924
3.622069
f4182dc5-9bd5-4161-85d9-db24661c07b0
MoriamAkterSwarna/phitron-practice
Data Structure/Week-03/Module-10/reverse_doubly.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node* next; Node* prev; Node( int val ) { this->val = val; this->next = NULL; this->prev = NULL; } }; // O(n) void print_normal( Node* head ) { Node* tmp = head; while ( tmp != ...
ALGO
0.999442
4.570061
f0071d32-d2fd-47b8-8cec-8c2ab813b2d8
ZainAmin/Advanced-Image-Processing-for-Medical-Imaging
previous years/2020/2020-04-22-Region-merging (incomplete)/main.cpp
// include aia and ucas utility functions #include "aiaConfig.h" #include "ucasConfig.h" #include "functions.h" namespace { cv::Mat img; int threshold = 50; std::string win_name = "Region splitting"; bool splitPredicate(const cv::Mat & img, cv::Rect & region) { double minV, maxV; cv::minMaxLoc(img(region), &...
ALGO
0.970466
5.720095
4a15d718-5292-41e2-9030-858ccc426dbf
deepdarshan21/leetcode-solutions
677. Map Sum Pairs/Trie.cpp
#include <bits/stdc++.h> using namespace std; /* Approach: Trie Edge Cases: Time Complexity: O(n) Space: O(n) Status: Accepted Runtime: 10 ms faster than: 17.37% Memory Usage: 8.2 MB less than: 34.62% Remarks: */ class MapSum { public: MapSum() { root = new TrieNode(); } ...
ALGO
0.999866
6.459105
37ecb595-77d3-483b-b464-9f567d151b6c
Kondr48/gz_team_engine
trunk/3rd party/MagicSoftware/FreeMagic/Source/Containment3D/MgcMinVolumeEllipsoidCR.cpp
#include "MgcMath.h" #include "MgcMinVolumeEllipsoidCR.h" using namespace Mgc; static const Real gs_fEpsilon = 1e-08f; // forward reference for recursive chain with FindEdgeMax static void FindFacetMax (int,Real*,Real*,Real*,int&,Real&,Real&,Real&); //-----------------------------------------------------------------...
ALGO
0.999205
3.46553
dfc99028-36ec-4200-8d18-d331b33be88b
caxi9064/CS-coursework
CSCI2270/MIDTERM1/midterm1/Q1/Q2/Q1.cpp
/* CSCI 2270 - Spring 2021 Midterm 1 Question 1 starter code. */ #include <iostream> using namespace std; /* * TODO your function header goes here */ void trim (int *array, int length, int value); void testPrint(int *p0, int length); int main(){ int a_test[] = {3, 2, 5 ,1, 0, 8, 4}; int test_lengt...
ALGO
0.996118
5.789045
06506b14-ff48-47ea-9a4c-a88644bf0724
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_8641_0.cpp
#include<cstdio> #define MAX 10000 #define NIL -1 struct Node {int parent, left, right;}; Node T[MAX]; int n,D[MAX],H[MAX]; void setDepth(int u, int d){ if(u==NIL) return; D[u]=d; setDepth(T[u].left, d+1); setDepth(T[u].right, d+1); } int setHeight(int u){ int h1=0,h2=0; if(T[u].left!=NIL) h1+=setHeight...
ALGO
0.999854
3.796755
53954ead-2b26-466e-9df9-0fcfe0fa4688
tusharbhardwaj0001/LeetCodes-Solution
Matrix/Richest_Customer_wealth.cpp
//link : https://leetcode.com/problems/richest-customer-wealth/ class Solution { public: int maximumWealth(vector<vector<int>>& accounts) { int maxSum = INT_MIN; for(int i =0;i<accounts.size();i++) { int sum = 0; for(int j = 0;j < accounts[i].size();j++) {...
ALGO
0.999511
5.870081
2e726774-f753-478d-bbeb-8dacf4cc782b
Rushikesh0107/DSA-Concepts-Questions
Easy Questions/watermelon.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int w; cin>>w; if(w < 3) cout<<"NO"; else { w%2 == 0 ? cout<<"YES" : cout<<"NO"; } return 0; }
ALGO
0.999612
3.709363
7481a16b-8a3d-4884-a268-0373346984d8
VadimITMO2022/ITMO.CourseCpp.2023
Lab3/Ex3.cpp
#include <iostream> #include <string> using namespace std; long double firBinSearch(double a, int n) { double L = 0; double R = a; while (R - L > 1e-10) { double M = (L + R) / 2; if (pow(M, n) < a) { L = M; } else { R = M; } } return R; } int main() { double a, R, T; int n; cout << "Input...
ALGO
0.999862
4.018631
26d27c98-b919-43f4-a22a-e0f660db0424
Eradax/cp-solutions
swedish-oi/2025/onlinekval/pingis/pingis.cpp
#include <bits/stdc++.h> #ifdef DBG #include "../../../../dbg.h" #else #define dbg(...) #endif using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define sz(c) ((int)c.size()) vector<pair<int, int>> w; vector<int> ans; vector<int> solve(int h, vector<pair<int, int>> v) { if (h == 0) { r...
ALGO
0.999987
3.90592
19dc6906-7123-41da-a887-f336a1fcfd5c
Prathamesh1407/LeetCode
0713-subarray-product-less-than-k/0713-subarray-product-less-than-k.cpp
class Solution { public: int numSubarrayProductLessThanK(vector<int>& nums, int k) { if(k<=1) return 0; int prod=1,result=0; int left=0,right=0; while(right<nums.size()) { prod*=nums[right]; while(prod>=k) { ...
ALGO
0.999932
5.386066
895968bb-661e-4c4c-88d2-f3e261d0cdfe
qiaozishun4/CSP2024_BJ
BJ-Senior/answers/BJ-S01354/detect/detect.cpp
#include <bits/stdc++.h> #define MAXN 100009 using namespace std; int T; int n,m,L,V; int d[MAXN],v[MAXN],a[MAXN],p[MAXN]; int mc; /* * d[i] : The distance between car and Start * v[i] : The speed * a[i] : The addspeed * p[i] : The distance between e-eye and Start * l[i] : The lastest e-eye can catch it */ //1...
ALGO
0.99971
3.888535
4860e7a6-5934-4621-a4d1-11b90bcbd8e4
sukrithanda/ece1747-Assign1
game_benchmark_1747/src/gamemonitor/Utils.cpp
/*************************************************************************************************** * * SUBJECT: * A monitoring application for the Massive Multiplayer Online Game benchmark * * AUTHOR: * Mihai Paslariu * Politehnica University of Bucharest, Bucharest, Romania * <EMAIL> * * TIME AND PLACE:...
ALGO
0.940466
4.376751
95c790dc-13a0-4e35-9d7e-0914163afb21
kkmk11/Codes_CPP
No_Of_GoldenBars.cpp
// There are M people ordered the gold, now Mr. Manohar has to distribute the gold // to M people. Mr. Manohar, the gold merchant has N number of gold-bars, given // as an array gold[], where gold[i] is the weight of i-th gold bar. // The process of distribution of gold is as follows: // - He can cut the gold ba...
ALGO
0.999991
4.706491
570b8e5f-66f7-4ba8-bc38-d8e463aad49a
cmangos/mangos-tbc
dep/recastnavigation/Detour/Source/DetourNavMeshQuery.cpp
#include <float.h> #include <string.h> #include "DetourNavMeshQuery.h" #include "DetourNavMesh.h" #include "DetourNode.h" #include "DetourCommon.h" #include "DetourMath.h" #include "DetourAlloc.h" #include "DetourAssert.h" #include <new> /// @class dtQueryFilter /// /// <b>The Default Implementation</b> /// /// At co...
ALGO
0.99074
5.865703
0a46cdd3-6566-432a-b20e-2204db05772c
TajwarSaiyeed/problem-solving-codechef-leetcode-codechef
12-05-2025/2828. Check if a String Is an Acronym of Words.cpp
/* Author: Tajwar Saiyeed Date: 2025-05-12 06:23:44 File: 2828. Check if a String Is an Acronym of Words.cpp */ #include <bits/stdc++.h> using namespace std; class Solution { public: bool isAcronym(vector<string> &words, string s) { if (words.size() != s.size()) return false; ...
ALGO
0.999207
5.531626
ab275bf4-872a-4e50-b6eb-32cf222db33f
rakesh1196/DSA
stringsToggleCase.cpp
#include <bits/stdc++.h> using namespace std; string toggleCase(string s) { for (int i = 0; i < s.length(); i++) { if (s[i] >= 'a' && s[i] <= 'z') { s[i] = toupper(s[i]); } else if (s[i] >= 'A' && s[i] <= 'Z') { s[i] = tolower(s[i]); } } return s; } int main...
ALGO
0.998896
5.990975
75f65d60-5be5-4412-895e-00e61decfd8c
w41ter/Demo
ACM/SCUTrains/DayThree/g.cpp
#include <iostream> using namespace std; const int N = 4001; int rounds[N]; int max_num, min_num, x, k; int main() { cin >> x >> k; while (--k >= 0) { int a, b, c; cin >> a >> b; rounds[b] = 1; if (a == 1) rounds[b + 1] = 1, cin >> c; } rounds[0] = 1; for (int i = 1; i < x; ++i) { int num = ...
ALGO
0.999905
3.53917
46c13e47-7f2a-4fde-ab86-cef3ae7399fa
pavelsimo/ProgrammingContest
spoj/135_MAWORK/P135.cpp
/* @BEGIN_OF_SOURCE_CODE */ /* @SPOJ MAWORK C++ "Graph Theory, BFS" */ #include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <list> #include <bitset> #include <deque> #include <numeric> #include <iterator>...
ALGO
0.999747
4.026131
743e61f7-98f8-4ed1-9394-0d617bf1ae2b
Hsinha11/Leetcode-solutions
81-Search-In-Rotated-Sorted-Array-II/rotated-sorted-array.cpp
class Solution { public: bool search(vector<int> &nums, int target) { int n = nums.size(); int l = 0, r = n - 1; while (l <= r) { int mid = (l + r) / 2; if (nums[mid] == target) return true; if (nums[l] == nums[mid] && nums[mid]...
ALGO
0.999976
5.839325
9dcd9fd3-0151-46e8-9c30-d9af663b4607
1SergiuF/12th-grade-computer-science
Probleme bac/pb_bac85.cpp
#include <iostream> #include <fstream> using namespace std; ifstream fin("bac.txt"); int main() { int x; int l = 2, lmax = 2; int r = 0, rmax = 0; fin >> x; int prev = x; fin >> x; r = x - prev; prev = x; while (fin >> x) { if (x - prev == r) { l++; prev = x; } else { if (l > lmax) {...
ALGO
0.999745
3.348155
1e7ef652-407c-4937-9e63-26a99239407c
nazar9318/taller-tpFinal-1c2021
libs/box2d/testbed/tests/collision_processing.cpp
#include "test.h" #include <algorithm> // This test shows collision processing and tests // deferred body destruction. class CollisionProcessing : public Test { public: CollisionProcessing() { // Ground body { b2EdgeShape shape; shape.SetTwoSided(b2Vec2(-50.0f, 0.0f), b2Vec2(50.0f, 0.0f)); b2FixtureDe...
TEST
0.934189
7.818936
a5e1deda-deb5-4f2b-ba5c-be43f7f3c2bf
alisarogers/huffmanTree
PA3_starter/compress.cpp
#include <iostream> #include <fstream> #include <vector> #include "HCTree.h" //#include "HCTree.cpp" #include "HCNode.h" //#include "HCNode.cpp" using namespace std; /* compress.cpp needs to create a Huffman tree, read in a text file, encode it, insert it into the tree, and then write to a new file the encoding. 1. ...
ALGO
0.936928
3.955961
4d3e4edd-645b-4a0f-923f-a8a987835a8b
chengyin30069/NYCU_hwh-codebook
code/number-theory/Mu + Phi.cpp
const int maxn = 1e6 + 5; ll f[maxn]; vector<int> lpf, prime; void build() { lpf.clear(); lpf.resize(maxn, 1); prime.clear(); f[1] = ...; /* mu[1] = 1, phi[1] = 1 */ for (int i = 2; i < maxn; i++) { if (lpf[i] == 1) { lpf[i] = i; prime.emplace_back(i); f[i...
ALGO
0.999469
3.486993
9f84256d-142f-49ca-93bc-884ead9a3afd
rilianx/ibex_ipopt
examples/lab1.cpp
#include "ibex.h" #include "vibes.cpp" using namespace std; using namespace ibex; int n=500; int main() { vibes::beginDrawing (); vibes::newFigure("lab1"); Variable x,y; Function f(x,y,Return(sin(x+y),cos(x+0.9*y))); IntervalVector box(2,Interval(0,6)); // size of the "slice" on each dimension (x and y) do...
ALGO
0.971096
5.415087
6812da84-bdcb-4220-9f14-233b6ef82f9c
rahdirs11/HackerRank
C++/arraySum.cpp
#include <numeric> #include <set> #include <iostream> using namespace std; int main(){ long long sum = 0; int n, x; cin >> n; set <int> numbers; for (int i = 0; i < n; ++i){ cin >> x; sum += x; numbers.insert(x); } cout << sum << endl; return 0; }
ALGO
0.999775
4.074919
1f90bed3-8d43-4f5d-92e9-d30fe391c8c9
ishandutta2007/codeforces
gediminas/normal/1468/F.cpp
/*input 3 2 0 0 0 1 1 0 2 0 3 0 0 1 1 1 1 0 0 1 0 2 0 6 0 0 0 1 1 0 1 2 2 0 2 3 3 0 3 -5 4 0 4 -5 5 0 5 -5 */ #pragma GCC optimize ("O3") #pragma GCC target ("avx2") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; template<typename T> using ordered_set...
ALGO
0.999959
5.091197
a870ca1b-2bc3-4a24-bb9a-f9c4e3e279cf
P79N6A/Codes-1
Template/src/最小生成树(Prim+heap).cpp
/* * Сעж޽ * ж޽primУ * жǷȫ㶼ʹ */ #define pii pair<int, int> #define pr(x) cout << #x << " = " << (x) << " ; "; #define prln(x) cout << #x << " = " << (x) << '\n'; using namespace std; const int INF = 0x7f7f7f7f; const int MAXN = 111; vector<pii> G[MAXN]; int cost[MAXN]; bool vis[MAXN]; int prim(int s) { priori...
ALGO
0.999801
4.192122
26343658-df49-4d70-8353-a7b3bd054dd9
pjswarnpath2709/Self-Learning
GFG DSA course/BinaryHeap/kthlargestSumSubArray.cpp
#include <bits/stdc++.h> using namespace std; int getKthLargest(vector<int> &arr, int k) { priority_queue<int, vector<int>, greater<int>> min_heap; for (int i = 0; i < arr.size(); i++) { int sum = 0; for (int j = i; j < arr.size(); j++) { sum += arr[j]; if (m...
ALGO
0.999855
4.005429
8aa560d6-332f-4331-800e-8a03812de17c
zainussami/CPplus
LinkedDataStructures/main.cpp
#include <iostream> class Node { private: int data; //data in the beginning node Node *next; //pointer to the next node public: Node(int initdata) { data = initdata; //the initialized data is set as the head next = NULL; //the next node is set as NULL, as there is no next node yet. } ...
ALGO
0.990377
4.133787
131465e2-fd4d-4347-9011-0796f7ee6b4a
ComputerProgrammerStorager/DataStructureAlgorithm
CLRS/Design/FindingMKAverage.cpp
/* You are given two integers, m and k, and a stream of integers. You are tasked to implement a data structure that calculates the MKAverage for the stream. The MKAverage can be calculated using these steps: If the number of the elements in the stream is less than m you should consider the MKAverage to be -1. Otherwi...
ALGO
0.999947
6.520777
d63c1abd-bce9-44d8-805c-ab424c0d4d3b
senli123/tensorrt-pythonv1
utils/config_operator.cpp
#include "config_operator.h" #include <fstream> #include <iostream> #include <algorithm> #ifdef _WIN32 #include <Windows.h> #else #endif // _WIN32 ConfigOperator::ConfigOperator() { } long ConfigOperator::init() { m_configInfo.clear(); return readfile(getRunningPath() + "/config.ini"); } std::string Con...
TOOL
0.955291
3.580024
4cfa1e3f-77f1-4dec-a9b4-4ba0f3ccc28a
tmuttaqueen/MyCodes
Online Judge Code/[Other] Online-Judge-Solutions-master_from github/UVA/Contest Volumes/11569 - Lovely Hint.cpp
#include <iostream> #include <string> #include <set> using namespace std; int main(){ int N; cin>>N; int dp1[250]; int dp2[250]; string s; getline(cin,s); int n; int ans,cont; for(int tc=1;tc<=N;tc++){ getline(cin,s); se...
ALGO
0.999858
3.815036
b7c1a9fb-0daa-4e16-ba6f-963e35ff7cc4
raincross7/code-similarity
codes/train_code/problem364/problem364_95.cpp
#include <iostream> #include <cstdio> using namespace std; int main(){ long long n, a, b; cin >> n >> a >> b; if((b-a) % 2== 0) printf("Alice\n"); else printf("Borys\n"); return 0; }
ALGO
0.999358
3.128177
839be56a-9636-4c6e-be08-f78fd0a2755b
iknowit1511/OOP
bai_tap_overload/bt2_dsps.cpp
#include <iostream> using namespace std; class PhanSo{ private: int iTuso; int iMauso; public: PhanSo (int t = 0, int m = 1){ iTuso = t; iMauso = m; } PhanSo (const PhanSo &d){ iTuso = d.iTuso; iMauso = d.iMauso; } int LayTu(){ return iTuso; } ...
ALGO
0.994436
3.574123
69b26b5a-28e3-40be-9e67-3637c34f94e6
ybai62868/BlackMa_Learning
P257/main.cpp
# include <cstdio> # include <iostream> # include <algorithm> # include <vector> using namespace std; class MyPrint { public: void operator()(int val) { cout << val << " "; } }; class Greater30 { public: bool operator()(int val){ return val >= 30; ...
TOOL
0.974452
4.036349
92bbd06a-d9c7-4fd4-abc4-8e7f5082385d
footoredo/Gungnir
Template of other teams/Dreadnought/SCL-collection/SuperNova/无向图最小割.cpp
const int V = 100; #define typec int const typec inf = 0x3f3f3f; // max of res const typec maxw = 1000; // maximum edge weight typec g[V][V], w[V]; //g[i][j] = g[j][i] int a[V], v[V], na[V]; typec mincut(int n) { int i, j, pv, zj; typec best = maxw * n * n; for (i = 0; i < n; i++) v[i] = i; // vertex: 0 ~ n-1 while...
ALGO
0.998863
3.81875
1c9b18c3-d9b8-4633-91f9-83ede175830f
itsKayumkhan/DSA-in-C-
BINARY TREE/count.cpp
int countBT(Node* root) { if(root == NULL) return 0; return countBT(root->left ) + countBT(root->right) +1; }
ALGO
0.998593
3.152938
25aedd8c-1a24-4add-b1be-f24753f5253b
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5708_5.cpp
#include <bits/stdc++.h> using namespace std; int main() { int r; cin>>r; if(r<1200) cout<<"ABC"; else if(1200<=r&&r<2800) cout<<"ARC"; else cout<<"AGC" return 0; }
ALGO
0.996236
3.560302
5e6cad2f-e778-489f-8f01-6d4c922951af
deepin-community/llvm-toolchain-16
llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp
#include "SerialSnippetGenerator.h" #include "CodeTemplate.h" #include "MCInstrDescView.h" #include "Target.h" #include <algorithm> #include <numeric> #include <vector> namespace llvm { namespace exegesis { struct ExecutionClass { ExecutionMode Mask; const char *Description; } static const kExecutionClasses[] = ...
ALGO
0.930628
7.932902
790d6e3d-61c4-4900-81b7-378642f76358
msr-peng/maskfusion_cpp
caffe_semanticfusion/src/caffe/solvers/rmsprop_solver.cpp
#include <vector> #include "caffe/sgd_solvers.hpp" namespace caffe { #ifndef CPU_ONLY template <typename Dtype> void rmsprop_update_gpu(int N, Dtype* g, Dtype* h, Dtype rms_decay, Dtype delta, Dtype local_rate); #endif template <typename Dtype> void RMSPropSolver<Dtype>::ComputeUpdateValue(int param_id, Dtype r...
ALGO
0.97824
7.295526
34fecb38-630d-401a-8817-c6a46f05ef52
DongheonKim/android_frameworks_base
media/libstagefright/codecs/amrnb/common/src/vad1.cpp
/* Pathname: ./audio/gsm-amr/c/src/vad1.c Functions: ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated template used to PV coding template. Changed to accept the pOverflow flag for EPOC compatibility. Description: Made changes per review commen...
ALGO
0.999326
5.667239
8b1ff8f3-cc96-4a7f-808e-5102590431df
lakshya2002/Data-Structures-and-Algorithms-using-Cpp
Recursion/Q_rat_in_a_maze.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{ private: bool issafe(int x,int y,int n,vector<vector<int>> visited,vector<vector<int>> m){ if((x>=0&&x<n)&&(y>=0&&y<n)&&visited[x][y...
ALGO
0.999935
6.583621
f55b447a-8d58-444c-b04e-dc0b7d837501
Erkaman/PoissonRecon
Src/SurfaceTrimmer.cpp
#undef ARRAY_DEBUG #define DIMENSION 3 #include <stdio.h> #include <stdlib.h> #include <float.h> #include <algorithm> #include "FEMTree.h" #include "MyMiscellany.h" #include "CmdLineParser.h" #include "MAT.h" #include "Geometry.h" #include "Ply.h" #include "PointStreamData.h" MessageWriter messageWriter; cmdLinePara...
ALGO
0.998595
6.883602
380e40fd-7978-474a-abd8-462d815ed8f7
makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware
Marlin/src/lcd/menu/menu_motion.cpp
// // Motion Menu // #include "../../inc/MarlinConfigPre.h" #if HAS_LCD_MENU #define LARGE_AREA_TEST ((X_BED_SIZE) >= 1000 || (Y_BED_SIZE) >= 1000 || (Z_MAX_POS) >= 1000) #include "menu_item.h" #include "menu_addon.h" #include "../../module/motion.h" #include "../../gcode/parser.h" // for inch support #if ENABLED...
TOOL
0.859186
6.654698
058e4fcb-16c9-4450-bbf9-c6faab9fba74
himanshu-redd/learn_recursion
string_reverse.cpp
#include <iostream> using namespace std; void reverse(string &s, int left, int right) { if (left >= right) return; swap(s[left], s[right]); reverse(s, left + 1, right - 1); } int main() { string s; cin >> s; reverse(s, 0, s.size() - 1); cout << s ; }
ALGO
0.999681
5.384339
20f48e65-a912-4070-b490-72b2f7089f42
Yestercafe/HDOJ_Solutions
oj1003/demo.cpp
#include <iostream> #include <limits> int main(void) { using namespace std; ios::sync_with_stdio(false); int t; cin >> t; for (int k = 1; k <= t; ++k) { int n; cin >> n; int maxsum = numeric_limits<int>::min(), downer = 1, upper = 1; int sum = 0, max = maxsum, max...
ALGO
0.999598
3.765611
a78f2d9f-b73f-4262-b9b0-2166c6c3e0fb
ADKaster/serenity-rust
AK/StringUtils.cpp
#include <AK/CharacterTypes.h> #include <AK/MemMem.h> #include <AK/Memory.h> #include <AK/Optional.h> #include <AK/StringBuilder.h> #include <AK/StringUtils.h> #include <AK/StringView.h> #include <AK/Vector.h> #ifndef KERNEL # include <AK/String.h> #endif namespace AK { namespace StringUtils { bool matches(Strin...
TOOL
0.945299
7.457863
24d31195-48e7-4252-abe1-644998028105
swapnil-tayal/DSA
3201-find-the-maximum-length-of-valid-subsequence-i/3201-find-the-maximum-length-of-valid-subsequence-i.cpp
class Solution { public: int maximumLength(vector<int>& nums) { int n = nums.size(); int maxi = 0; int cnt = 0; for(auto i: nums){ cnt += (i%2 == 1); } maxi = max(maxi, cnt); cnt = 0; for(auto i: nums){ cnt += (i%2 == 0...
ALGO
0.999936
5.45076
577c5ff4-bb09-4056-9c8b-e58a877fa107
vutuancong/C--Combination.
Chap 4-Linklist-Stack-Queue/DuyetString.cpp
#include <iostream> #include <string> #include <fstream> using namespace std; struct node { string word; int solan; struct node *next; }*start; node *create_node(string a, int x) { node *temp; temp = new node; if (temp == NULL) { cout << "Khong du khong gian nho: " << endl; return 0; } else { temp->w...
ALGO
0.999006
3.636221
74f741a8-3ad7-4a8d-b47f-29d6fed3e309
prathamsingh3213/CIBO
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
f4eefbea-3524-4b50-9709-2371bdd95c70
ishandutta2007/codeforces
a_g/normal/1491/F.cpp
#include <bits/stdc++.h> using namespace std; int query(int x, int l, int r) { cout << "? " << 1 << " " << r-l+1 << '\n'; cout << x << '\n'; for (int i = l; i <= r; i++) { cout << i << ' '; } cout << endl; int k; cin >> k; return k; } int main () { ios_base::sync_with_stdio(0); cin.tie(0); int...
ALGO
0.999807
3.959486
3cc49806-dd9d-4668-b507-faae3da1193f
tempurashrimp/Project-Euler
cpp/025.cpp
/* Problem 025: The Fibonacci sequence is defined by the recurrence relation: F_n = F_(n - 1) + F_(n - 2), where F_1 = 1 and F_2 = 2. Hence the first 12 terms will be 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 The 12th term, F_12, is the first term to contain three digits. What is the index of the...
ALGO
0.999924
6.240061
68bb4f35-bbbb-4f88-89d9-9583856c9b04
MKraienhorst/rnm_D
Eigen/unsupported/doc/examples/PolynomialSolver1.cpp
#include <unsupported/Eigen/Polynomials> #include <vector> #include <iostream> using namespace Eigen; using namespace std; int main() { typedef Matrix<double,5,1> Vector5d; Vector5d roots = Vector5d::Random(); cout << "Roots: " << roots.transpose() << endl; Eigen::Matrix<double,6,1> polynomial; roots_to_mo...
TEST
0.999186
4.69287
2e170f12-90dc-41c5-9a62-57768284e548
ciclab/autotool
src/lib/hash_.cpp
/* An entry in a hash table. */ #include <cstdlib> #include <cstring> #include <cstdio> #include<vector> #include<string> using std::vector; using namespace std; //表示Inst的ivec有效 #define type_is_vector 0 //表示Inst的name有效 //表示没有引号的string,可能是关键词,操作符等 #define type_is_string1 1 //表示有引号的string #define type_is_string2 2 cl...
TOOL
0.907689
3.947201
a73141e7-ff7a-41bb-8123-003ea1ff6a77
Y0sem1te/SmartClassSystem
dlib/examples/ffmpeg_webcam_face_pose_ex.cpp
/* This example program shows how to find frontal human faces in an image and estimate their pose. The pose takes the form of 68 landmarks. These are points on the face such as the corners of the mouth, along the eyebrows, on the eyes, and so forth. This example is essentially just a version of ...
ALGO
0.877743
6.492029
1dd28789-566a-4a37-aa4b-9d2c61b293ae
devparthgarg/Data-Structures-and-Algorithms
11. Linked List/27 Iterative Reverse of LL/27b Iterative Reverse of LL.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int data; Node* next; Node(int data_) { data=data_; next=NULL; } }; //Time: O(N) //Space: O(1) Node* reverse(Node* &head) { Node* curr=head; Node* prev=NULL; while(curr) { Node* nextNode=curr->next; curr->next=prev; prev=curr; cu...
ALGO
0.99948
5.075623
3a53cfd3-5262-4bcb-8a18-bdd59a8329f8
preetu391/Solved-leetcode-problems
49-group-anagrams/49-group-anagrams.cpp
class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& str) { map<string, vector<int>> m; int n=str.size(); for(int i=0;i<n;i++){ string s=str[i]; sort(s.begin(),s.end()); m[s].push_back(i); } vector<vector<string>> v...
ALGO
0.999999
6.291377
e0f2e2c3-29f4-4885-9ac0-c53371465e84
itnotesblog/AISimulator
accumulatingrandomai.cpp
#include "accumulatingrandomai.h" #include "aimodel.h" #include "bot.h" #include <cstdlib> static const int MAX_CHANCE = 100; static const int MIN_CHANCE = 5; void AccumulatingRandomAI::doStep( const AIModel& model, Bot* bot ) { bot->startMoving(); if( !m_memory.contains( bot->getID() ) ) { m_memor...
ALGO
0.996143
5.520145
54ae88c7-e112-4c2a-ab46-f3110be2fd05
HongSon28/Training
General training/quy hoach dong/tuyenphongve.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; for (int i=0;i<t;i++) { int n,res=0; cin>>n; int a[n]={}; for (int i=0;i<n;i++) cin>>a[i]; vector<int>f(n+1),b(n+1,INT_MAX); b[0]=INT_MIN; for (int i=0;i<n;i++) { int ...
ALGO
0.999853
4.625185
1e0a6af0-f158-46b5-b231-14a04fab00ca
shelltdf/osgall
prebuild/KTX-Software-master/lib/astc-encoder/Source/astcenc_color_quantize.cpp
#if !defined(ASTCENC_DECOMPRESS_ONLY) /** * @brief Functions for color quantization. * * The design of the color quantization functionality requires the caller to use higher level error * analysis to determine the base encoding that should be used. This earlier analysis will select * the basic type of the endpoin...
TOOL
0.927197
3.191418
682ce2e3-4597-462f-8cc4-5ef96c1257f3
HarshGupta02/Data-Structure-And-Algorithm
Stack_And_Queue/Maximum Frequency Stack.cpp
/* so basically we keep on pushing the current element into the stack of the current frequency of the element. so we put all the elements that belong to a certain frequency. */ class FreqStack { public: map<int, vector<int>> f1; map<int, int> f2; int max_f = 0; FreqStack() { } ...
ALGO
0.999487
6.273473
06a56a08-7f2d-4a28-afa0-7c8d9424e9f1
thebravoman/software_engineering_2014
vhodno_nivo/Kamena_Dacheva_11A/Kamena_Dacheva_4.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { int x, y, k, f=0, a=1, b=2; cout << "x= "; cin >> x; cout << "y= "; cin >> y; if (x > y) { cout << "Error! Bad input! \a\n"; return 1; } for (k = 1; k <= y; k++) { f = a + b; ...
ALGO
0.999513
3.311873
277a13aa-d5a3-4873-9dd2-c1b81cd6f2f1
raincross7/code-similarity
codes/train_code/problem245/problem245_479.cpp
#include <bits/stdc++.h> using namespace std; #define int long long using ll = long long; using ld = long double; using intpair = pair<int, int>; using intmap = map<int, int>; using vi = vector<int>; using vvi = vector<vector<int>>; const int MOD = 1e9 + 7; inline int mod (ll a, int m = MOD) { return (a % m + m) % m; ...
ALGO
0.999982
3.534685
c27ca7b2-e9f6-49bb-8cde-00381c4f9576
Pishgard/Helli-5
Haftom/Dore13/Tamarin/Seri-5/2/main.cpp
#include <iostream> using namespace std; int main() { int a; cin >> a; if (a * 2 >= 100) { cout << "Yes" << endl; cout << a * 2; } else cout << "No"; }
ALGO
0.998718
3.101874
dd6fc083-088a-415d-bebb-26c1b5595024
KamleshSirvi/DSA
Geometry/Leetcode/1232. Check If It Is a Straight Line.cpp
class Solution { public: bool checkStraightLine(vector<vector<int>>& coordinates) { int n = coordinates.size(); // base case does not required according to the question // if(n <= 2){ // return true; // } float slope1, slope2; float x1, x2; float...
ALGO
0.999858
5.364641
9bed7b20-5f6e-47c1-81b6-f9a70f716628
built-different-13/Cpp-Programming-Language-
Conditionals and Loops/pattern4.cpp
#include <iostream> using namespace std; int main() { int n; cout << "Enter the number of rows" << endl; cin >> n; int i=1, k; while(i<=n) { int j=1, k=i; while(j<=i) { cout << k << " "; k++; j++; } cout << endl; i++; } ...
ALGO
0.999328
4.345148
17e04201-f330-4bab-a14c-0f8c87cdc1a5
orangebyte256/ConvexCopier
fill-polygon-impl-cpp/src/fillpolygonimpl.cpp
#include "fillpolygonimpl.h" #include <vector> #include <thread> FillPolygonImpl::FillPolygonImpl(int *imagePixels, int imageWidth, int *patternPixels, int patternWidth) { this->imagePixels = imagePixels; this->patternPixels = patternPixels; this->imageWidth = imageWidth; this->patternWidth = patternW...
ALGO
0.997656
5.306172