uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5c3feb68-653b-4592-9eac-97791421291a
ngochahh2005/PTIT-code
CodePTIT-C/C05016.cpp
#include <stdio.h> void trenPhai(int [][105], int, int, int, int); void duoiTrai(int [][105], int, int, int, int); int d = 1, a[105][105]; void trenPhai(int a[][105], int cd, int cc, int hd, int hc) { for (int j = cd; j <= cc; j++) { a[hd][j] = d++; } for (int i = hd + 1; i <= hc; i++) { a[i][cc] = d++; } i...
ALGO
0.999831
3.342979
d91d6ad1-50d3-48bd-a33b-8a115e6a05b3
NatanGarcias/Competitive-Programming
Codeforces/GYM/4 Estrelas/2020 ICPC Universidad Nacional de Colombia Programming Contest - 102700/G.cpp
#include<bits/stdc++.h> using namespace std; template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { os << "{"; for (typename vector<T>::const_iterator vi = v.begin(); vi != v.end(); ++vi) { if (vi != v.begin()) os << ", "; os << *vi; } os << "}"; return os; } template<typename A, typename B> ostre...
ALGO
0.99999
4.301457
913a733e-354b-411a-8434-2447f5780749
HshowMe/C
3rd Homework/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.cpp
#include <algorithm> #include <fstream> #include <math.h> #include <vector> #include <string> #include <iostream> #include <chrono> using namespace std; using namespace std::chrono; double PI = 3.141592653589793238462643383279; struct BMP { int width; int height; unsigned char header[54]; unsigned ch...
ALGO
0.974483
5.360115
01d183ec-2508-4aeb-9e75-cc2e6b561b58
Mennaasamir1/low-level-programming
0x03-more_functions_nested_loops~/practice/19-main.cpp
#include "practice.h" int main(void) { float side, base; ReadSideAndBaseOfTriangle(side, base); PrintCircleAreaInIsoscelesTriangle(CalculateCirCleAreaInIsoscelesTriangle(side, base)); return (0); }
TOOL
0.943905
4.625
42958a43-6cee-4e68-a343-67b72e75945a
hetbhagatji09/DSA
Hashing/dum2.cpp
#include <iostream> #include <map> #include <algorithm> int main() { std::map<int, int> frequencyMap; // Populate the map with frequencies (example data) frequencyMap[1] = 3; frequencyMap[2] = 1; frequencyMap[3] = 5; // Assume arr[i] is, for example, equal to 2 int i = 0; std::sort(fr...
ALGO
0.99992
4.854187
abdb6a24-4cfa-481e-b7d6-e10338b28d49
LijunZhang01/Fool_Minidecaf_Compiler
src/tac/dataflow.cpp
/***************************************************** * Variable Liveness Analysis. * * This file contains the implementation of the following 3 functions: * . BasicBlock::computeDefAndLiveUse1 * 2. FlowGraph::analyzeLiveness * 3. BasicBlock::analysisLiveness * * Of course, if you add some new Tacs, *...
ALGO
0.996581
6.311997
a2574e39-ab68-4fd4-8bd8-c8033df1358f
nikhilij/data-structure-apna-college
ds/populate_next_pointers.cpp
// write the cpp program to populate the next right pointers of given binary tree #include <iostream> #include <queue> using namespace std; // Definition for a Node class Node { public: int val; Node* left; Node* right; Node* next; Node(int _val) { val = _val; left = nullptr; ...
ALGO
0.999819
6.035744
a9a8129a-c08f-4bb6-a965-c817b28f264e
Mulab11/cntt2016-hw1
TC-SRM-548-div1-250/cjy.cpp
#include<bits/stdc++.h> using namespace std; int l,r=1e9,m,f,h[55],i; class KingdomAndTrees//二分,贪心 { public: int minLevel(vector<int> a) { for(;l<r;f?r=m:l=m+1)for(m=l+r>>1,f=i=1;i<=a.size();i++)h[i]=max(h[i-1]+1,a[i-1]-m),f&=abs(h[i]-a[i-1])<=m; return l; } };
ALGO
0.999916
4.138529
8ea437ae-0836-42a4-93f1-d3a3e070b245
ishandutta2007/codeforces
bohdanpastuschak/normal/1266/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef vector<int> VI; #define MP make_pair #define PB push_back #define X first #define Y second #define FOR(i, a, b) for(int i = (a); i < (b); ++i) #define RFOR(i, b, a) for(int i = (b) - 1; i >= (a); --i) #define ALL(a...
ALGO
0.999751
4.625613
0a930476-4d4f-4957-91b4-24fa129a76f3
loki-engr/CtrlHair
wrap_codes/wrap_triangle/useful_code/libigl/include/igl/project_to_line.cpp
template < typename DerivedP, typename DerivedS, typename DerivedD, typename Derivedt, typename DerivedsqrD> IGL_INLINE void igl::project_to_line( const Eigen::MatrixBase<DerivedP> & P, const Eigen::MatrixBase<DerivedS> & S, const Eigen::MatrixBase<DerivedD> & D, Eigen::PlainObjectBase<Derivedt> &...
ALGO
0.999456
5.332168
3d0a41d8-764a-4e3b-9172-d7dffbf5a014
chinmaya-sahoo/cpp
LOC/ques3.cpp
#include<iostream> using namespace std; int main(){ int n,sum=0; cout<<"enter a number"<<endl; cin>>n; do { int b=n%10; sum+=b; n/=10; } while (n!=0); cout<<"sum is "<<sum; return 0; }
ALGO
0.999699
3.807559
2e583462-b3ec-4178-ab14-97d991b0acd3
ishandutta2007/codeforces
nishant403/normal/1176/C.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define f(i,n) for(int i=0;i<n;i++) #define F first #define S second signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,x; cin >> n; map<int,int> mp; mp[4]=1; mp[8]=2; mp[15]=3; mp[16]=4; mp[...
ALGO
0.999664
3.749921
4c1748a3-b1fb-480e-8ce9-d691f7a4bb52
sayan112/Leetcode_Sayan
2739-total-distance-traveled/2739-total-distance-traveled.cpp
class Solution { public: int distanceTraveled(int mainTank, int additionalTank) { int travel=0; while(mainTank && additionalTank) { if(mainTank>=5) { travel+=(5*10); mainTank-=5; ...
ALGO
0.99929
5.347625
5f513446-90e1-4d26-bb35-b7b109366858
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_6319_4.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, k; cin >> n >> k; int a[n]; int c = 0; for (int i = 0; i < n; i++) cin >> a[i]; int l = 0, r = n - 1; while (l <= r) { if (a[l] <= k) c++, l++; else if (a[r] <= k) c++, r--; else break; } cout << c << endl;...
ALGO
0.999959
4.432983
22f07b58-f940-49bd-ae62-37431d1d9665
seanwarren/open-ebsd
newmat10/newmatnl.cpp
//$$ newmatnl.cpp Non-linear optimisation #define WANT_MATH #define WANT_STREAM #include "newmatap.h" #include "newmatnl.h" #ifdef use_namespace namespace NEWMAT { #endif void FindMaximum2::Fit(ColumnVector& Theta, int n_it) { Tracer tr("FindMaximum2::Fit"); enum State {Start, Restart, Continue, Inter...
ALGO
0.999873
6.228117
bf8dac79-ba36-4bdf-a121-669e5b37c760
He-Ze/SYSU-Parallel-and-Distributed-Computing
作业1/运行1000次取平均.cpp
#include <iostream> #include <cstdlib> #include <ctime> #include <windows.h> #include <xmmintrin.h> #include <immintrin.h> #include <emmintrin.h> #include <thread> using namespace std; int a[1000000],b[1000000],c[1000000]; void add(int a); //This is the function that the thread called. int main() { //Following i...
ALGO
0.998025
4.369416
287207f3-4c61-4422-8877-0817fbbda36b
emanueljuliano/Competitive_Programming
topics/suffix_array/substring.cpp
#include <bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define endl '\n' #define f first #define s second #define pb push_back typedef long long ll; typedef pair<int, int> ii; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3fll; void count_sort(vector<int> &p,...
ALGO
0.999421
4.005893
ff238630-5b93-4379-9e88-7ff3a0c35be9
kumarrohit2002/DSA_with_cpp
MATRIX_2dArray/mergesortedarray.cpp
#include<iostream> using namespace std; int main(){ int arr1[]={1,6,7,10}; int arr2[]={0,1,3,8,11,12,15,18}; int m=4; int n=8; // code to marge two sorted arrays int result[m+n]; int i=0; //will help us to inerate on arr1 int j=0; //will help us to inerate on arr2 int k=0; //will help us to inerate on re...
ALGO
0.999954
3.875321
271d5026-c09f-4970-8dc3-142ec8d0ff61
Melodiz/dailycode
leetcode/December_2024/2554-Maximum_Number_of_Integers_to_Choose_From_a_Range_I.cpp
class Solution { public: int maxCount(vector<int>& banned, int n, int maxSum) { // Create a set to mark banned numbers unordered_set<int> bannedSet(banned.begin(), banned.end()); long long sum = 0; // Track cumulative sum int count = 0; // Track count of valid numbers ...
ALGO
0.999973
7.159687
dbd7ea31-d0ca-4dda-b558-5b89a9066071
KingBean4903/C-20_Ranges
transform.cpp
#include <algorithm> #include <iostream> #include <vector> #include <ranges> #include <string> struct Product { std::string name_; double value_ {0.0}; }; int main() { std::vector<Product> prods{7, {"Box", 1.0}}; // standard version std::transform(begin(prods), end(prods), [v=0](const Product& p) mutable...
TOOL
0.973673
6.511315
cc6c13dc-dee3-463c-809a-43d6970146a7
WilliamX1/leetcode
AtCoder/Contest-259/A - Growth Record.cpp
#include <iostream> using namespace std; int main() { int N, M, X, T, D; cin >> N >> M >> X >> T >> D; cout << (M >= X ? T : T - (X - M) * D) << endl; return 0; }
ALGO
0.998405
3.791607
eccd7936-4822-4748-8bed-2eed446d023b
wiznetmaker/TCP_LCD
libraries/pico-sdk/lib/tinyusb/hw/mcu/nxp/mcux-sdk/devices/MKL17Z644/mcuxpresso/startup_mkl17z644.cpp
#if defined (DEBUG) #pragma GCC push_options #pragma GCC optimize ("Og") #endif // (DEBUG) #if defined (__cplusplus) #ifdef __REDLIB__ #error Redlib does not support C++ #else //***************************************************************************** // // The entry point for the C++ library startup // //********...
CONFIG
0.859291
7.610411
3076c589-862c-4289-8a2c-30f279dd7128
masonarchhsieh/Training_LeetC
reorder-list/Accepted/1-11-2022, 11_10_25 PM/Solution.cpp
// https://leetcode.com/problems/reorder-list /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ cla...
ALGO
0.999979
6.070426
b34bcb71-fe26-4d20-badf-475ed476d4c7
sgc109/algorithm_practice
back.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod = 1e9+7; const int INF = 0x3c3c3c3c; const long long INFL = 0x3c3c3c3c3c3c3c3c; int N; int A[103]; int main() { cin >> N; for(int i = 0 ; i < N; i++) cin >> A[i]; int found = -1; int l = INF, r = -1; for(int i = 1 ; i < N; i++){ ...
ALGO
0.999999
3.678795
ba71c49f-58eb-4fd0-9ec2-b677772bd61c
uier/online_judge_code
UVa/UVa10306 E-COIN.cpp
#include <iostream> #include <string.h> #include <math.h> using namespace std; int x[41], y[41], dp[301][301]; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, m, s; cin >> n; while ( n-- && cin >> m >> s ) { memset(dp,0x3f,sizeof(dp)); int inf = dp[0][0]; dp[0][0] = 0; for ( int i=1; i<=m; ++i ) c...
ALGO
0.99993
3.898082
d894634b-9011-43b5-908a-214ec8ec54ab
Maaz976/PF-and-OOP
PF-Lab Tasks and Quizzes/Week 12 Lab Task/task_02.cpp
#include<iostream> using namespace std; int main() { int rating[10], stars; for(int i=0;i<10;i++) { cout<<"Enter Rating from 1-5: "; cin>>rating[i]; if(rating[i]>=1 && rating[i]<=5) { continue; } //Applying Conditions so that only valid rating is entered. ...
TOOL
0.978452
3.749184
2c2951fe-6c35-4068-ab53-263f8282b9ae
papireddy903/leetcode-papireddy
567-permutation-in-string/permutation-in-string.cpp
class Solution { public: bool checkInclusion(string s1, string s2) { if (s1.size() > s2.size()) return false; vector<int> mp1(26,0), mp2(26,0); for (int i = 0;i<s1.size();i++){ mp1[s1[i]-'a']++; mp2[s2[i]-'a']++; } for (int i = s1.size();i<s2.size();i...
ALGO
0.999939
6.323299
8c89e904-860c-4b20-acde-05be0f716e17
Alaxe/noi2-ranking
2019/solutions/B/DNN-Varna/restruct.cpp
#include <bits/stdc++.h> #define MAXN 5001 #define endl '\n' using namespace std; int n; long long k; vector <int> v[MAXN]; void input() { cin >> n >> k; for (int i = 0; i < n; i++) { int x; cin >> x; for (int j = 0; j < x; j++) { int y; cin >> y; ...
ALGO
0.999929
3.713123
c1627a46-4c04-4b26-8f2b-5f90494c2ab1
EdwardLeeMacau/genetic_algorithm
sga-cpp/chromosome.cpp
#include <stdio.h> #include "global.h" #include "chromosome.h" /** * Create an empty gene container. * @brief Default constructor * @see Chromosome::Chromosome(int n_length) */ Chromosome::Chromosome() { length = 0; gene = NULL; evaluated = false; } /** * Create a chromosome with specified length * ...
ALGO
0.989461
4.736855
da691868-8e65-4176-b72b-07df33a2e9f8
BENDENG1/FourCppAlgorithmStudy
2023_07/WEEK3/김진섭_타겟 넘버.cpp
//문제풀이: https://githubseob.tistory.com/138 #include <string> #include <vector> using namespace std; vector<int>number; int answer, target_num; void DFS(int idx, int sum) { if (idx == number.size()) { if (sum == target_num) ++answer; return; } DFS(idx + 1, sum - number[idx]); DFS(idx...
ALGO
0.999974
5.653617
200a26fa-deab-4319-9c35-e3969c105ced
ishandutta2007/codeforces
cchao/normal/318/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long n, k; cin >> n >> k; long long ne = n / 2, no = n - n / 2; if(k <= no) cout << 1LL + 2LL * (k - 1) << endl; else { k -= no; cout << 2LL + 2LL * (k - 1) << endl; } return 0; }
ALGO
0.999878
3.563756
2e0537ee-0b12-4b97-bcf5-b4774a2448b4
ishandutta2007/codeforces
fallac/normal/1612/A.cpp
/* */ #include <bits/stdc++.h> #include <cassert> #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx,avx2,fma") using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define omode T=1 #define tmode cin>>T #define cmode(c) T=c #define...
ALGO
0.999687
5.130214
1e82f8f3-1707-45e4-9513-1fa5aec1ca1d
venessaliu1031/Data-structure-and-algorithm
1. algorithm toolbox/assignments/week4_divide_and_conquer/6_closest_points/closest.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <iomanip> #include <vector> #include <string> #include <cmath> using std::vector; using std::string; using std::pair; using std::min; double minimal_distance(vector<int> x, vector<int> y) { //write your code here return 0.; } int main() { siz...
ALGO
0.999833
3.942443
1f9be7ff-bec9-4337-92c6-d709c4d9cc2f
deepsamanta/Competitive-programming-solutions
A_There_Are_Two_Types_Of_Burgers.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll test; cin >> test; while (test--) { ll buns, patty, cutlets, h_price, c_price; cin >> buns >> patty >> cutlets >> h_price >> c_price; buns /= 2; ll total_profit = 0; if (h_price >=...
ALGO
0.998635
3.52301
0301c299-df72-4563-bb8e-6ebad83c8a17
postusername/post-chess
src/engine/base/moveGeneration/LegalMoveGen.cpp
#include "LegalMoveGen.hpp" MoveList LegalMoveGen::generate(const Position &position, uint8_t side, bool onlyCaptures) { MoveList moves; Bitboard pawnsLeftCaptures = PsLegalMoveMaskGen::generatePawnsLeftCapturesMask(position.getPieces(), side, false); Bitboard pawnsRightCaptures = PsLegalMoveMaskGen::gene...
ALGO
0.982071
5.988319
98bc079a-ebd3-4588-9a9b-5feb9c953b5f
subhrapaladhi/important-algorithms
Dynamic Programming/fibonacci_with_DP.cpp
#include<bits/stdc++.h> using namespace std; vector<int> fib; int Getfib(int n){ if(fib[n] != -1) return fib[n]; if(n<=1) return fib[n] = n; return fib[n] = Getfib(n-1) + Getfib(n-2); } int main(){ int n =9; fib = vector<int>(n+1,-1); cout<<Getfib(n); return 0; }
ALGO
0.999983
4.175021
90f8b06f-594f-44b0-96d8-ea2f041dfe89
Tanya347/Codes
Dynamic Programming/Striver/EditDistance.cpp
/******************************************************************* QUESTION *******************************************************************************/ /* Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations perm...
ALGO
0.999986
6.45559
9d3d75a8-f90e-48b8-966e-2938c3e7a55b
wangqianhan/px4_code
src/platforms/ros/geo.cpp
/** * @file geo.c * * Geo / math functions to perform geodesic calculations * * @author Thomas Gubler <<EMAIL>> * @author Julian Oes <<EMAIL>> * @author Lorenz Meier <<EMAIL>> * @author Anton Babushkin <<EMAIL>> */ #include <geo/geo.h> #include <px4.h> #include <unistd.h> #include <pthread.h> #include <stdio....
ALGO
0.995899
3.213487
43ad25cb-90d3-4ec8-b5b5-13208a3d5181
NLS-SP/SLAM_Basics
SLAM_Demo/Frontend/Pose_Estimation/OpenCV_poseEstimation_2d2d.cpp
// // Created by gatsby on 2019-02-13. // #include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/calib3d/calib3d.hpp> using namespace std; using namespace cv; /* ******************************* * 本程序演示2D-2D的特征匹配估计相机运动...
ALGO
0.992829
5.631095
07769178-bf69-43b3-bae8-de6d7b52c1e6
Apress/exploring-c-plus-plus
listings/list5306.cpp
/** @file list5306.cpp */ /** Listing 53-6. Demonstrating How Collation Order Depends on Locale */ #include <algorithm> #include <iostream> #include <iterator> #include <locale> #include <ostream> #include <string> #include <vector> void sort_words(std::vector<std::string> words, std::locale loc) { std::sort(words.b...
TOOL
0.994408
6.778743
129c21b8-3a8d-4d73-bf12-f069fef39a55
Yogesh-Patel01/Aaj_Ka_Sawal
Day_33.cpp
// :::: Question 1 :::: // 729. My Calendar I // problem statement::: // https://leetcode.com/problems/my-calendar-i/ // :::: Solution :::: class MyCalendar { public: map<int, int> cal; MyCalendar() { } bool book(int start, int end) { for(auto x: cal){ if (max(x.firs...
ALGO
0.999899
6.367069
0376b78d-613b-44a0-ae7b-4211228af9f0
googleguru/OpenROAD-GUI
src/dpo/src/Optdp.cpp
#include "dpo/Optdp.h" #include <odb/db.h> #include <boost/format.hpp> #include <cfloat> #include <cmath> #include <iostream> #include <limits> #include <map> #include "dpl/Opendp.h" #include "ord/OpenRoad.hh" // closestPtInRect #include "utl/Logger.h" // My stuff. #include "architecture.h" #include "detailed.h" #...
ALGO
0.997225
5.38308
b50919f2-518f-4d38-8f0e-957bd17e63d4
hek-git/problem_solving
boj/20231024_9742.cpp
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; string s, tmp; int n, cnt, flag, fact[11], check[11]; void solve(){ if(tmp.size() == s.size() && ++cnt == n){ cout << s << " " << n << " = " << tmp << endl; flag = 1; return; } for(in...
ALGO
0.999931
4.093335
6b6c16b9-64c5-4292-b8ab-14cd432967e9
vsricharan16/cp
practise/oddsum.cpp
/*I shall rise*/ #include<bits/stdc++.h> using namespace std; #define rep(i,n) f(i,0,n) #define charan int main() #define vi vector< int > #define vl vector< ll > #define vii vector<pii> #define vll vector<pll> #define viii vector<tri> #define tri pair<int,pii> #define mod (1000*1000*1000+7) #define moddd (1000*1000*10...
ALGO
0.999998
3.944812
eb928b8c-5139-4671-9a66-09ee563e584a
Mino521/ICPC_training
codeforces/Codeforces Round #368 (Div. 2)/B. Bakery.cpp
#include <iostream> #include <cstring> #include <cstdio> #include <algorithm> using namespace std; struct List { int u,v; long long l; }; int main() { //freopen("B.txt","r",stdin); int n,m,k; cin >> n >> m >> k; if(k == 0) { cout << -1; return 0; } struct List list[m]; int mark[n+1]; int a; memset(mark,...
ALGO
0.999862
3.551627
871314a3-a331-419a-a417-324d435b49a8
Kyogre223/Data-stuctures-and-algo
Arrays/1768. Merge String Alternatively.cpp
class Solution { public: string mergeAlternately(string word1, string word2) { int m = word1.size(); int n = word2.size(); string result = ""; int i = 0; int j = 0; while (i < m || j < n) { if (i < m) { result.push_back(word1[i++]); ...
ALGO
0.999927
6.016534
317a4286-3974-4410-8dd8-0cfeb2491959
ritikbanger/Hacktoberfest2022-DSA
17. Graph/BridgesInGraph.cpp
#include<iostream> #include<vector> using namespace std; void dfs(int node, int parent, vector<int> &vis, vector<int> &tin, vector<int> &low, int &timer, vector<int> adj[]) { tin[node] = low[node] = timer++; for(auto it : adj[node]) { if(it == parent) continue; if(!vis[it]){ ...
ALGO
0.999927
4.934875
80a89d00-ff5d-486c-b953-603261cc02ec
Zhang-Wen-chao/Computer-Systems
C++/代码随想录/Monotone_stack/739. Daily Temperatures.cpp
// 739. Daily Temperatures // https://leetcode.com/problems/daily-temperatures/ #include <iostream> #include <vector> #include <stack> std::vector<int> dailyTemperatures(std::vector<int>& temperatures) { int n = temperatures.size(); std::vector<int> result(n, 0); std::stack<int> stk; for (int i = 0; ...
ALGO
0.999857
6.74462
1b7ae412-3cbf-469a-bc4b-c3ae76e101e3
bgarrels/cxldemo
vcWorkSpace/test/jiecheng/jiecheng.cpp
// jiecheng.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "stdafx.h" #include "stdio.h" #include "iostream.h" int main(int argc, char* argv[]) { int carry,n,j; int a[2000]; int digit=1; int temp,i; cout<<"please enter n:"<<endl; cin>>n; a[0]=1; ...
ALGO
0.999797
3.134666
31fe6114-1ad6-42a0-8d20-3ee333b0affc
gdsc-ipsacademy/Competitive_Programming
algorithms/radix-sort/radix-sort.cpp
#include <iostream> #include <cmath> using namespace std; void radix_sort(int array[], int size) { // Find the maximum element in the array. int max_element = array[0]; for (int i = 1; i < size; i++) { if (array[i] > max_element) { max_element = array[i]; } } ...
ALGO
0.999983
6.08894
5c9a910a-2c1a-4035-a407-ff720e6ffef1
Saumya-Bhatt/sigh-leetcode
DSA/Trees/construct_binary_tree_from_preorder_and_inorder_traversal.cpp
// preorder: <root><left><right> // inorder: <left><root><right> #include<bits/stdc++.h> using namespace std; struct TreeNode{ int val; TreeNode *left; TreeNode *right; TreeNode(int x){ val=x; left=nullptr; right=nullptr; } }; int searchIndexInInorder(vector<int>&inorder,in...
ALGO
0.999996
5.614175
94f5915f-242b-468b-a966-e3b44b0cc842
clay4megtr/DeepIntoCpp
LearningCxxDay8/01-FunctionTemplate/FunctionTemplate.cpp
#include<iostream> using namespace std; /** * 01-泛型函数基础 */ void mySwapInt(int &a ,int &b) { int temp = a; a = b; b = temp; } void mySwapDouble(double &a, double &b) { double temp = a; a = b; b = temp; } //利用模板实现通用交换函数 template<typename T> //T代表一个通用的数据类型,告诉编译器如果下面紧跟着的函数或者类中出现T不要报错 void my...
TOOL
0.863853
4.250746
4db8fa3e-c887-48d1-a853-e599cbde0f1c
kalissi/qqq
gl11.cpp
#include <iostream> using namespace std; int main() { cout << "Entev an integer: " << "\n"; int x; cin >> x; int i = x; do { cout << i << std:: endl; i--; } while(i>0); if(x > 0) cout << "Apositive number" << "\n"; else if(x < 0) cout << "Negative number" << "\n"; else cout << "Equ...
ALGO
0.998075
3.519879
c9ddf5ce-2ea1-4e7a-8867-5fda48405fcf
Pengunix/cpp_learn
ET-Campus/7.单源最短路优化.cpp
#include <bitset> #include <cstring> #include <iostream> #include <queue> #include <vector> using namespace std; using ll = long long; const int N = 3e5 + 5; struct Edge { ll x, w; bool operator<(const Edge &v) const { // w小的优先 // return w > v.w; // 完备比较,也可用于set进行去重操作 return w == v.w ? x < v.x : w ...
ALGO
0.999978
4.59934
495ac720-2112-4b0f-99c4-7e4d54a96719
rathoddinesh14/Coding-Arena
HE/theparkingslot.cpp
// https://www.hackerearth.com/practice/algorithms/graphs/shortest-path-algorithms/practice-problems/algorithm/the-parking-slot-9fac40d6/ // https://www.youtube.com/watch?v=EFg3u_E6eHU #include <iostream> #include <vector> #include <algorithm> #include <limits> #include <queue> using namespace std; class Comparator ...
ALGO
0.999938
4.207999
545489f2-e05f-4b27-a5cd-f4b1912e56bd
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5876_34.cpp
#include <bits/stdc++.h> using namespace std; string s1, s2; int flag = 0; int main() { cin >> s1 >> s2; int i = s1.size() - 1; int j = 0; while (i > 0 && j < s2.size() - 1) { if (s1[i] != s2[j]) { flag = 1; break; } i--; j++; } if (flag) cout << "NO" << endl; else cout...
ALGO
0.99998
3.841964
e4244c76-bdd8-4c5e-ae44-7717f7c3fa46
wwwllm/C--
大一下/集训/2025常熟理工学院天梯选拔赛/J.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; const int mod = 1e9 + 7, N = 1e4 + 10; char a[N]; int b[N]; ll p[N], q[N]; ll expower(ll a, ll b) { a %= mod; ll ans = 1; while (b) { if (b & 1) ans = (ans * a) % mod; a = (a * a) % mod; b >>= 1; ...
ALGO
0.999919
4.031409
d53b9ba0-24d6-42ec-8743-79bb1085c533
Misaka-wsx/test
quiz/maximum-gap.cpp
class Solution { public: int maximumGap(vector<int>& nums) { if(nums.size()<2) { return 0; } sort(nums.begin(),nums.end()); int ret = 0; for (int i = 1; i < nums.size(); i++) { ret = max(ret, nums[i] - nums[i - 1]); } return ret; ...
ALGO
0.999957
5.31424
5f04a29a-f8bb-4218-8e94-43482857b508
clone2727/cabal
engines/sword25/util/lua/lgc.cpp
#define lgc_c #define LUA_CORE #include "lua.h" #include "ldebug.h" #include "ldo.h" #include "lfunc.h" #include "lgc.h" #include "lmem.h" #include "lobject.h" #include "lstate.h" #include "lstring.h" #include "ltable.h" #include "ltm.h" #define GCSTEPSIZE 1024u #define GCSWEEPMAX 40 #define GCSWEEPCOST 10 #define G...
TOOL
0.959642
6.786798
3258ec38-34b8-45b5-946a-e06c9c336c55
Virendrasinghharod/Basic-c-prohramming-question
21. Number of digiit in a number.cpp
#include<iostream> using namespace std; int main() { int n,no,a=0; cout<<"Enter any positive integer :: "; cin>>n; no=n; while(no>0) { no=no/10; a++; } cout<<"\nNumber of Digits in a number [ "<<n<<" ] is :: "<<a<<"\n"; /* --> another way for this import #include<s...
ALGO
0.987748
3.579032
13cabd13-15e3-4d50-8352-05cb2e2a78d2
ultranatum/ultranatum
src/script/interpreter.cpp
#include "interpreter.h" #include "primitives/transaction.h" #include "crypto/ripemd160.h" #include "crypto/sha1.h" #include "crypto/sha256.h" #include "pubkey.h" #include "script/script.h" #include "uint256.h" using namespace std; typedef vector<unsigned char> valtype; namespace { inline bool set_success(ScriptEr...
ALGO
0.869639
6.440912
63611436-8dab-4c03-a915-e4ff9d66a5e6
Srishtik16/Leetcode-Submissions
1706-where-will-the-ball-fall/1706-where-will-the-ball-fall.cpp
class Solution { public: vector<int> findBall(vector<vector<int>>& grid) { vector<int> result(grid[0].size(), 0); vector<vector<int>> memo(grid.size() + 1, vector<int>(grid[0].size(), 0)); for (int row = int(grid.size()); row >= 0; row--) { for (int col = 0; col < grid[0].size()...
ALGO
0.999959
6.298844
e972f29e-71b6-4a3a-bde4-66ebd6161209
INF112-Programacao2/20202-team-4
funcoesUteis.cpp
#include <iostream> #include <vector> #include "funcoesUteis.h" void imprimeMenuFixo(int rodadaAtual, int turnoAtual){ std::cout << "A ordem das cartas e'\nCartas especiais: 4 de paus, 7 de copas, As de espadas, 7 de ouros\n"; std::cout << "Cartas normais: 3, 2, A, K, J, Q, 7, 6, 5, 4\n" << std::endl; std::cout <<...
ALGO
0.992465
4.772534
36f623d3-33a2-4088-88c1-cf948974f50f
Trouvaille0198/DataStructure
Semester1ClassWork/Work3/T2/frequency.cpp
#include <bits/stdc++.h> using namespace std; void frequency(const string &str) { string difChar; int freq[str.length()]; for (int i = 0; i < str.length(); i++) //计数数组赋0值 { freq[i] = 0; } for (int i = 0; i < str.length(); i++) //i constrols str[i] { int j = 0; //j controls ...
ALGO
0.999942
4.254637
32886cb2-b8ab-41c5-bbf1-e27ce6e822f0
Crpot22/Practico-3-Intro-a-progra
Ejercicio 1.cpp
// Online C++ compiler to run C++ program online #include <iostream> #include <string> using namespace std; int main() { string line; getline(cin, line); int i = 0; while (line[i] != '\0') { if (line[i] == ' ' || line[i] == '\n') { cout << i << endl; } i++; ...
ALGO
0.994781
3.671417
dc22a7a1-d531-4ce4-94ea-01bd6a47d055
aarchijain1/DSA
lec-18searching.cpp
// linear search //time complexity= o(n) // #include<iostream> // using namespace std; // int linearSearch( int arr[], int n, int key){ // for (int i = 0; i < n; i++) // { // if (arr[i]==key) // { // return i; // } // } // return -1; // } // int main(){ // int n; // cin>>n; // int arr[n]; //...
ALGO
0.999949
5.916407
665f830a-0991-4ff1-82e8-c7415590bf01
kirill-ionkin/LeetCode_Cplusplus
01__problems__Array/EASY/1725__problem/source.cpp
// 1725. Number Of Rectangles That Can Form The Largest Square // https://leetcode.com/problems/number-of-rectangles-that-can-form-the-largest-square/description/ #include <iostream> #include <string> #include <vector> using namespace std; class Solution { public: int countGoodRectangles(vector<vector<int>>& rec...
ALGO
0.999397
6.146868
853cc168-5dec-48ed-81eb-0a3808b21ad7
myirci/3d_circle_estimation
gui/MyCanvas.cpp
#include "MyCanvas.hpp" #include "MyFrame.hpp" #include "../geometry/Segment3D.hpp" #include "../geometry/Circle3D.hpp" #include "../data/teapot.hpp" #include "../algorithm/algorithm.hpp" #include "../utility/utility.hpp" #include <sstream> BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) EVT_PAINT(MyCanvas::OnPaint)...
ALGO
0.906853
5.947159
a631b4b3-3e72-4dd4-b448-55fc4a071c51
lawnjelly/godot-llightmap
lraybank.cpp
#include "lraybank.h" #include "llightscene.h" #include "core/os/threaded_array_processor.h" namespace LM { void RayBank::RayBank_Data::Swap() { if (m_MapRead) { m_MapRead = 0; m_MapWrite = 1; } else { m_MapRead = 1; m_MapWrite = 0; } } void RayBank::RayBank_Reset(bool recreate) { m_Data_RB.m_Voxels[0...
ALGO
0.976579
4.684345
50c99946-25a3-439a-b49c-81a11e7c04ed
Ziaeemehr/cpp_workshop
functions/interpolation/01_example.cpp
#include <iostream> #include <cmath> // Precise method, which guarantees v = v1 when t = 1. // from wikipedia "linear interpolation" double lerp(double v0, double v1, double t) { return (1 - t) * v0 + t * v1; } float lerp(float v0, float v1, float t) { return (1 - t) * v0 + t * v1; } int main() { float a...
ALGO
0.998895
5.571674
983e53a7-f4cf-483a-aec3-5ac44f77c272
Daniyal551/ADS_22B030607
lab_1/Jlab1.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <deque> using namespace std; int main(){ deque <int> supNm; vector <vector <int>> stoe; char sign; int num; int intSign; while(true){ cin >> sign; if(sign == '!'){ break; ...
ALGO
0.999774
3.859902
83080205-ac69-4ccb-8eeb-3c643ca02b35
yogibala/leetcode
solutions/1013. Partition Array Into Three Parts With Equal Sum/1013.cpp
class Solution { public: bool canThreePartsEqualSum(vector<int>& arr) { const int sum = accumulate(arr.begin(), arr.end(), 0); if (sum % 3 != 0) return false; const int average = sum / 3; int partCount = 0; int partSum = 0; for (const int a : arr) { partSum += a; if (partS...
ALGO
0.998897
6.461145
6e63ffe8-fe30-4b39-9668-39a9dd578a09
JROB774DUMP/misc
minicpp/raycast_intersection.cpp
/*////////////////////////////////////////////////////////////////////////////*/ #define _USE_MATH_DEFINES #include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <float.h> #include <math.h> #include <SDL2/SDL.h> typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; typ...
ALGO
0.914309
5.548289
a6fa4a62-72a1-4af8-aced-175d9bee99b2
raincross7/code-similarity
codes/train_code/problem231/problem231_51.cpp
// AUTHOR: ROSHAN SRIVASTAVA // WEBSITE: https://www.youtube.com/channel/UC6uQdd7kLLOdlHSVklhV7Cw #include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 int k, r, g, b; int main(){ #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif...
ALGO
0.999939
3.982036
54c3e5ae-96bd-4a97-b842-729d1a6a7979
9967han/PS-Algorithm
BaekJoon/bfs/9376.cpp
#include<iostream> #include<cstring> #include<vector> #include<queue> #include<algorithm> #define DOOR 3 #define WALL 1 using namespace std; void getMinDoorNum(int sx, int sy, int type); int getMinNum(); void input(); int T, N, M; int map[102][102], visit[102][102][3]; int dx[] = {-1, 0, 0, 1}; int dy[] = {0, -1, 1, 0}...
ALGO
0.999856
4.066402
9183567d-434b-4fe0-9f0e-dfca5b45c599
cvonelm/scorep
test/instrumenter_checks/omp/src/adaptive_integration/cxx/main.cpp
#include <stdio.h> #include <math.h> #include <sys/time.h> #include <omp.h> #include "func1.h" #include "integral_tasking.h" #define PI 3.1415926535897932384626433832795028841972 int main( int argc, char** argv ) { double x_min, x_max; double answer = 0.0; double start, end; /*function to integrate*/ ...
ALGO
0.99944
4.988639
2be27674-522c-4a10-b750-702a30a15ae8
yashuhl/LeetCodeProblems
twoSum.cpp
/* 1. Two SUm Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Example 1: Input: nums = [2,7,1...
ALGO
0.999967
6.21986
d8ed9236-783b-41ce-a57f-4fe4b3cceb3a
ngocdaitran2003/Cau_truc_du_lieu_va_giai_thuat_VT_PTIT
bai_toan_cai_tui.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 101 int main() { int t; cin >> t; while(t--) { int N, V; int A[MAX], C[MAX]; // Nhap du lieu cin >> N >> V; for(int i = 1; i <= N; i++) cin >> A[i]; for(int i = 1; i <= N; i++) cin >> C[i]; // khoi tao int F[MAX] = {0}; // Tinh bang phuong ...
ALGO
0.999884
3.655856
5b0b0484-64bd-4f82-afa8-36119080d758
neilmmalu/CSE691
HW3/HW3.cpp
//HW3 //Name: Neil Malu //SU NetID: nemalu SUID: 635692900 /* In this implementation, once timeout occurs, check if its possible to COMPLETELY add/remove any parts If the entire order cannot be fulfilled, then discard the load/pickup order */ #include <iostream> #include <fstream> #include <thread> #include <mutex> #...
ALGO
0.96011
5.044575
7365e112-0a4a-45bc-abe1-d94499aee2db
papali1305/Wipro-DailyTAsk-Updates
2141019161/DAY3/sortingofprocess.cpp
//Dispaly CPU & memory usage per process //sort processes by CPU/memory usages // Total cputime = usertime+cputime(utime+ctime) //Total CPUTime = utime + stime; //Calculate process cpu usage //CPU usage = (utime+stime)/systemupdate - starttime*100; //g++ -std=c++17 activeprocess.cpp -o activeprocess //Memory info is i...
TOOL
0.997104
4.562724
7adf9a64-265a-4fea-a492-e0e30bf1b68b
ishandutta2007/codeforces
briansu/normal/999/D.cpp
//{ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double lf; typedef pair<ll,ll> ii; #define REP(i,n) for(ll i=0;i<n;i++) #define REP1(i,n) for(ll i=1;i<=n;i++) #define FILL(i,n) memset(i,n,sizeof i) #define X first #define Y second #define SZ(_a) (int)_a.size() #define ALL(_a) _a.begin(),_...
ALGO
0.999997
3.047148
0dc6ab13-467c-4d72-bbff-5bbfccfb7fdd
Kullsno2/C-Cpp-Programs
TurnOffBit.cpp
#include<iostream> #include<math.h> using namespace std; int numberOfBits(int n){ int no=0; int temp=n; while(n > pow(2,no)){ no++; } return (n && (n-1)) ? no : no+1; } int main(){ //cout<<(1<<3); //cout<<sizeof(unsigned int)*8; int n,k,i=0 ; while(i<5){ cout<<"ENter n:\n"; cin>>n; cout<<numberOf...
ALGO
0.986746
3.923194
b081960c-8ce0-4394-8421-708e40145edc
goncamateus/ddpg_sim2d
HFO_mgm/src/bhv_marlik_block.cpp
/* Z----------------------------------Z | | | File Created By: Amir Tavafi | | | | Date Created: 2009/11/30, | | 1388/08/09 | | | Z--------------------------------...
ALGO
0.935569
3.697574
6ce09b0c-132a-48dc-8273-a7aa01705744
marscoin/marscoin
src/test/fuzz/feeratediagram.cpp
#include <stdint.h> #include <vector> #include <util/feefrac.h> #include <policy/rbf.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> #include <assert.h> namespace { /** Takes the pre-computed and topologically-valid chunks and generates a fee diagram which starts at FeeFrac of (0, 0) */ std::vector<Fee...
TEST
0.86583
6.477083
1279352a-91fa-4683-98cf-d7ff387a99d0
carconper/BasicOCR
libraries/tess-two/jni/com_googlecode_tesseract_android/src/ccutil/indexmapbidi.cpp
#include "indexmapbidi.h" namespace tesseract { // SparseToCompact takes a sparse index to an index in the compact space. // Uses a binary search to find the result. For faster speed use // IndexMapBiDi, but that takes more memory. int IndexMap::SparseToCompact(int sparse_index) const { int result = compact_map_.bi...
ALGO
0.887779
7.795103
c4061694-fda5-470d-aa3d-fbf74100086d
ChanGil-1837/Flutter_Laern1
meals/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.998116
6.76073
68cdde88-51ff-4872-b8b6-32a80133b020
mldwg/lexit
NFA/NfaNode.cpp
// // Created by andreas on 08.04.21. // #include "NfaNode.h" #include <stdexcept> #include <algorithm> void NfaNode::insertTransition(Symbol symbol, bool escape, NfaNode *nfaNode) { if (symbol == '.') { escape = !escape; } if (!escape) { switch (symbol) { case 'w': ...
ALGO
0.992877
6.650445
6cc26d4c-775a-4ff9-b226-2b4225902c55
shivanisimran/Data-Structures-Algorithms
Dynamic Programming/Matrix-DP/Unique-paths.cpp
/* A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below). How many possible unique paths are there? Input...
ALGO
0.998945
5.348767
2060ad70-5f6e-4b79-91f3-92891c79898b
dianyunPCL/OpenSourceCode
pcl-master/pcl-master/filters/src/project_inliers.cpp
#include <pcl/filters/impl/project_inliers.hpp> /////////////////////////////////////////////////////////////////////////////////////////// void pcl::ProjectInliers<pcl::PCLPointCloud2>::applyFilter (PCLPointCloud2 &output) { if (indices_->empty ()) { PCL_WARN ("[pcl::%s::applyFilter] No indices given or empty...
ALGO
0.941875
6.924805
cc3fcca6-3b49-4e59-8666-aec49c5123c4
wojtekmal/escape-blocks
engine/board_generator/MEGA_RANDOM.cpp
#include <bits/stdc++.h> #define x first #define y second #define all(x) x.begin(), x.end() #define pii std::pair<int, int> #define now() std::chrono::high_resolution_clock::now() #define gettime(begin, end) (std::chrono::duration_cast<std::chrono::milliseconds>(end - begin).count()) #define svec std::vector<std::strin...
ALGO
0.998342
5.626858
aab9b536-b64c-4ca2-9456-c94d73aaa09f
Shitaibin/leetcode-2016
207.CourseSchedule.cpp
// 公司:Facebook // // 使用DFS判断有向图有没有环 // v2: 260ms. O(EV) // using less space than v1. class Solution { bool hasCycle(int n, vector<int>& visited, map<int, vector<int>>& graph) { if (visited[n] == 2) return false; if (visited[n] == 1) return true; /* add to current path, visited once */ ...
ALGO
0.999964
6.090822
c317325c-4ab7-4c66-9018-9522b5a16fb2
zimmemax/zimmemax
OOPpractice/assignments/program04/test.cpp
#include "linkedlist.h" int main() { Linked_List max_is_cool; max_is_cool.push_front(1); max_is_cool.push_front(3); max_is_cool.push_front(4); max_is_cool.push_middle(2,2); max_is_cool.print(max_is_cool.get_head()); Node* head = get_head(); max_is_cool.merge_sort(&head); ...
ALGO
0.980452
3.746455
8e6462d5-9785-4a67-9ac3-e45d6c08a799
Xelerezex/languages-playground
C++/Other/threads/threads-06.cpp
#include <iostream> #include <thread> #include <chrono> #include <mutex> using namespace std; mutex mtx; void Print(char ch) { mtx.lock(); for (int i = 0; i < 5; ++i) { for (int i = 0; i < 5; ++i) { cout << ch; this_thread::sleep_for(chrono::milliseconds(20)); ...
TOOL
0.878941
4.179442
2e3e2fa1-29aa-44c8-b6f3-fc3b61cdb5dc
MaxiderZocker/SWDM-Huether
ZaehlerArray/ZaehlerArray/ZaehlerArray.cpp
// ZaehlerArray.cpp : Diese Datei enthält die Funktion "main". Hier beginnt und endet die Ausführung des Programms. // #include <iostream> using namespace std; int main() { for (int i = 1; i <= 15; i++) { cout << i << "\t"; if (i%5 == 0) { cout << endl; } } int x = 3, ...
CONFIG
0.963582
3.069645
bfbcee3b-8ec7-4e72-9acb-48a39a02abf5
artneer/boost_1_65_0
libs/sort/example/double.cpp
// See http://www.boost.org/libs/sort for library home page. #include <boost/sort/spreadsort/spreadsort.hpp> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <vector> #include <string> #include <fstream> #include <iostream> using namespace boost::sort::spreadsort; #define DATA_T...
ALGO
0.997508
4.945207
a4898be3-27a7-4906-9ed7-1f85d57b4614
digitalfundcoin/digitalfund
src/bitcoin-tx.cpp
#include "base58.h" #include "clientversion.h" #include "primitives/block.h" // for MAX_BLOCK_SIZE #include "primitives/transaction.h" #include "core_io.h" #include "coins.h" #include "keystore.h" #include "script/script.h" #include "script/sign.h" #include "ui_interface.h" // for _(...) #include "univalue/univalue.h" ...
TOOL
0.927202
5.739766
f1973f6b-90ea-4c38-971e-d2f809c1223e
Coder02Aniket/C-Plus-Plus-Codes
Coding Minutes DSA/Strings/Assignments/NormalizeString.cpp
#include<bits/stdc++.h> using namespace std; string normalize(const string &sentence) { string copy1 = sentence; //Make the changes in copy, and return it for(int i = 0 ; i < copy1.size() ; i++){ if((copy1[i-1]== ' '|| i == 0) && (copy1[i] >= 65 || copy1[i] <= 90)){ copy1[i] = toupper(c...
ALGO
0.99947
4.697012
36be7d9a-72a1-4e94-b057-79b64276a3dc
gupta-manas6268/learning-C
TLE Eliminators/TLE Eliminators Level-2/Ch-002/0_22_01_pr.cpp
// Wrong. // Sum-string // https://www.geeksforgeeks.org/problems/sum-string3151/1 #include<bits/stdc++.h> using namespace std; int main(){ #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif return 0; } class Solution{ public: int values[500] =...
ALGO
0.999919
4.709872
6a5bce25-60af-4253-86cb-6b7045756a5f
syauqimujaddid/earthresistivity
esp/src/DataAnalysis.cpp
#include "DataAnalysis.h" #include <algorithm> #include <cmath> // Soil resistivity ranges and types const std::vector<std::pair<float, float>> DataAnalysis::soilRanges = { {0.1, 10}, // Clay {10, 50}, // Loam {50, 100}, // Sandy loam {100, 500}, // Sand {500, 1000}, // Gravel ...
ALGO
0.980458
6.053871
6ee96400-b62c-4a9c-a1f1-2ecf61d5cfb3
keatshackon/A2OJ-Ladder-Problem
DIV2-A/205A.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll t, q; map<int, int> m; vector<int>v; cin >> t; for (int i = 0; i < t; i++) { cin >> q; ++m[q]; v.push_back(q); } auto aa = m.begin(); if (aa -> second == 1) { for (int i = 0; i < v.size(); i++) { if (v[i] == aa->fi...
ALGO
0.999959
3.648033