uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
182586bc-de3e-470d-8835-312b765d30df
minghui-liu/TensorMatching
ANN/src/bd_pr_search.cpp
#include "bd_tree.h" // bd-tree declarations #include "kd_pr_search.h" // kd priority search declarations //---------------------------------------------------------------------- // Approximate priority searching for bd-trees. // See the file kd_pr_search.cc for general information on the // approximate neare...
ALGO
0.999965
6.372151
da09d6ba-d2f9-4982-ba21-b06b3137839b
jessehartloff/biometrics
bingyzhang/zzn12a.cpp
/* * MIRACL C++ Implementation file ZZn12a.cpp * * AUTHOR : M. Scott * * PURPOSE : Implementation of class ZZn12 (Arithmetic over n^12) * * WARNING: This class has been cobbled together for a specific use with * the MIRACL library. It is not complete, and may not work in other * applications * ...
ALGO
0.998932
3.68761
10d010c9-1eb2-4ff9-b6f7-876f438a81b3
Pika-Pool/cpp-progs-3rd-sem
73-bubble sort templates.cpp
#include <iostream> #include <cstdlib> #include <ctime> #include <windows.h> using namespace std; // swap references of any type template <typename T> void swapVals(T &a, T &b) { T temp = b; b = a; a = temp; } // print array storing any type of data template <typename T> void printArray(T *arr, const int n, const ...
ALGO
0.992527
4.705602
9083a4a1-a25c-4747-9c98-4bc8cae6e95e
chgogos/oop
lab2020/lab03/overloading5.cpp
// Υπερφόρτωση του τελεστή << από τη C++ (ως αριστερή ολίσθηση σε ακεραίους και ως τελεστής εισαγωγής σε streams) #include <iostream> using namespace std; int main() { int x = 5; for (int i = 0; i < 5; i++) { int y = x << i; // οριστερή ολίσθηση (le...
ALGO
0.96795
3.033222
0a58d61a-dcf8-4d11-af66-1bca402e22c5
hritik2002/Leetcode-Problems
0055-jump-game/0055-jump-game.cpp
class Solution { public: bool canJump(vector<int>& nums) { int n = nums.size(); int lastIndex = n - 1; for(int i = n - 2; i >= 0; i--) { if(i + nums[i] >= lastIndex) { lastIndex = i; } } return lastIndex == 0; } };
ALGO
0.999988
6.44877
5f1c8010-54e5-4ef8-bdbd-81c952c6889d
raincross7/code-similarity
codes/train_code/problem157/problem157_451.cpp
#define _USE_MATH_DEFINES #include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <cfloat> #include <climits> #include <cstring> #include <cmath> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #include <vector> usi...
ALGO
0.999761
3.847816
d3960012-67a5-4795-a4d3-244254fbd3c5
qtcyy/LeetCode-Record-3.17
leetcode2/No2055/main.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> platesBetweenCandles(string s, vector<vector<int>> &queries) { int n = s.length(); vector<int> pre_pos(n), suf_pos(n); int left = -1; for (int i = 0; i < n; ++i) { if (s[i] == '|') { left = i...
ALGO
0.998953
5.024031
4a2160fb-1d8a-4ccd-8947-2d4fa6619c91
ishandutta2007/codeforces
krk/normal/1294/C.cpp
#include <bits/stdc++.h> using namespace std; int T; int n; void Solve() { for (int a = 2; a * (a + 1) * (a + 2) <= n; a++) if (n % a == 0) { int num = n / a; for (int b = a + 1; b * (b + 1) <= num; b++) if (num % b == 0) { int c = num / b; printf("YES\n"); prin...
ALGO
0.999844
4.030268
a5c3cf06-141a-4fd3-a7bd-e1daa5d01ca1
zerls/PAT
pat_advanced/1107.cpp
#include <cstdio> #include <vector> #include <algorithm> using namespace std; static vector<int> father, isRoot; static int cmp1(int a, int b){return a > b;} static int findFather(int x) { int a = x; while(x != father[x]) x = father[x]; while(a != father[a]) { int z = a; a = father[a...
ALGO
0.999947
3.744871
4d368212-a24c-4904-8fa7-332099a7ded1
ravigod22/CompetitiveProgrammingUNI
Codeforces/1957A.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<int> cnt(101, 0); for (int i = 0; i < n; ++i) { int x; cin >> x; cnt[x]++; } int ans = 0; for (int i = 0; i <= 100; ++i) { ans += cnt[i] / 3; } cout << ans << "\n"; } int main() ...
ALGO
0.999722
5.2035
ccc2fc96-de33-454e-9969-7ad9b27b1803
llluiop/cppleetcode
3Sum/main.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { if (nums.size() <3) return{}; vector<vector<int>> v; sort(nums.begin(), nums.end()); int i = 0; for (; i < nums.size(); i++) { if (i != 0 && num...
ALGO
0.999856
4.925381
31ca8d95-8bf9-457c-a383-f0b3efffa10b
BZBY/Code
有用的数据结构/树剖LCA+LA+换根.cpp
#include <cstdio> #include <vector> #include <iostream> using namespace std; typedef long long ll; const int MAXN = 300005; int n, dfs_clock; int fa[MAXN], deep[MAXN], size[MAXN], son[MAXN]; int dfn[MAXN], idfn[MAXN], low[MAXN], top[MAXN]; vector<int> G[MAXN]; namespace DS { void work(int l, int r) {} // 对区间 ...
ALGO
0.999892
4.241752
749c5a2b-f6bb-486b-ab51-9425954d363f
Arvind054/DSA
6_linear_search.cpp
#include<iostream> using namespace std; int main(){ int arr[50]= {1,2,5,4,7,89,6,2,7,6}; int key = 6; for(int i=0; i<10; i++){ if(arr[i]==key){ cout<<i<<endl; break; } } }
ALGO
0.999059
3.931657
05f69b8c-94b0-4931-9b3d-a512907924f9
aryaman895/xtended_frameworks_av
media/libstagefright/codecs/m4v_h263/dec/src/deringing_chroma.cpp
#include "mp4dec_lib.h" #include "post_proc.h" #ifdef PV_POSTPROC_ON void Deringing_Chroma( uint8 *Rec_C, int width, int height, int16 *QP_store, int, uint8 *pp_mod ) { /*---------------------------------------------------------------------------- ; Define all local variables ...
ALGO
0.998739
3.841888
1ac2c49d-a8a6-499c-8219-55b6e78c6c17
heathkh/iwct
snap/boost/libs/bimap/example/mighty_bimap.cpp
// VC++ 8.0 warns on usage of certain Standard Library and API functions that // can be cause buffer overruns or other possible security issues if misused. // See http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx // But the wording of the warning is misleading and unsettling, there are no // po...
TOOL
0.940576
6.132315
25c67d03-cac9-407c-940b-b6036dd410f3
PEC-CSS/Coding-contests
UCS_Finale/Mark's Puzzle.cpp
#include "bits/stdc++.h" #ifdef LOCAL #include "F:\CPP\Debug\debug.h" #else #define print(...) 1; #endif using i64 = long long; std::vector<std::string> legal; void solve() { int n; std::cin >> n; for (auto s : legal) { if (std::stoi(s) > n) break; std::cout << s << " "...
ALGO
0.999585
5.367076
316a351e-88c1-4ed0-ba93-5ed915003621
asrjy/dsa
smurf/codeforces/155A.cpp
#include<iostream> using namespace std; int main(){ int n, i, min(9999), max(-1), cnt(0), a; cin >> n; for(i =0 ; i < n; i++){ if(i==0){ cin >> a; min = a; max = a; } else{ cin >> a; if(a > max){ max = a; cnt++; } else if(a < min){ min = a; cnt++; } els...
ALGO
0.999958
3.513395
3ebf68fb-1897-4076-b8d2-7713ea98334f
ngthanhtrung23/CompetitiveProgramming
codeforces/100827/L.cpp
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; ++i) #define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; --i) #define REP(i,a) for(int i=0,_a=(a); i < _a; ++i) #define DEBUG(X) { cout << #X << " = " << X << endl; } #define PR(A,n) { cout << #A << " = "; FOR(_,1,n) cout << A[_] << ' '; cout << e...
ALGO
0.999796
4.067859
b955b157-b9fd-423e-a0ba-bd96938f40aa
Prem-Ray/codekar
1128-remove-all-adjacent-duplicates-in-string/1128-remove-all-adjacent-duplicates-in-string.cpp
class Solution { public: string removeDuplicates(string s) { string temp="" ; int i=0 ; while(i<s.size()){ if(temp.size() == 0){ temp.push_back(s[i]) ; }else{ if(temp.back() == s[i]){ temp.pop_back() ; ...
ALGO
0.999956
6.389969
64d1a23c-dae8-4522-affa-24025c4dce05
Venkatramanbehera/DSA-CPP
pattern/pattern21.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int row = 1; while (row <= n) { int col = n - row + 1; while (col >= 1) { cout << "*"; col = col - 1; } cout << endl; row = row + 1; } }
ALGO
0.999835
4.101835
3a068ffd-6e90-498c-b106-1ef3616b1f93
AhmedElHoffy/LeetCode-Grinding
0346-moving-average-from-data-stream/0346-moving-average-from-data-stream.cpp
class MovingAverage { public: queue<int>Q; double Curr_Sum=0; int Max_Size; MovingAverage(int Size) { Max_Size = Size; } double next(int Val) { if(Q.empty()){ Q.push(Val); }else{ if(Q.size() < Max_Size){ Q.push(Va...
ALGO
0.999879
6.734704
6fd6332c-e99d-457a-a1e4-9e8a70102d76
cscrz/BartoloRicardo_48102
Hmwk/Assignment_2/Savitch_9thEd_Chap2_ProgProj_Prob5_MeetingRoom/main.cpp
/* File: main Author: Ricardo Bartolo Jr. Created on October 3, 2016, 8:15 PM Purpose: "A program that determines whether a meeting room is in violation of fire law regulations regarding the maximum room capacity." */ //System Libraries #include <iostream> //Input/Output objects usin...
TOOL
0.948781
5.486388
83d28cf5-bc8f-498e-9e45-d28d0a17bc76
LukeRobbins2112/AlgorithmPractice
RansomNote.cpp
#include <iostream> #include <string> #include <vector> #include <sstream> using namespace std; int main() { char letters[256] = { 0 }; string magLetters = ""; string note; string numMagsStr; int numMags; string currentMag; getline(cin, note); getline(cin, numMagsStr); numMags = atoi(numMagsStr.c_str()); ...
ALGO
0.998641
4.293363
d87ef4da-7377-491f-8674-5ecc7372aaf2
ishandutta2007/codeforces
atreus/normal/228/A.cpp
#include <iostream> using namespace std; int main () { int m = 0; int a[4]; for (int i = 0; i < 4; i++){ cin >> a[i]; } for (int i = 0; i < 4; i++){ for (int j = i + 1; j < 4; j++){ if (i != j){ if (a[i] == a[j]) m++; } else ...
ALGO
0.999793
4.265209
be2ce6a9-ab7b-4e66-b9da-222a19cfbe5b
dimmkan/MSHP
lesson20/l20-12/l20-12/main.cpp
#include <iostream> using namespace std; int main() { const int sz = 50; int arr[sz] = {}; int n; cin >> n; for(int i = 0; i < n; i++){ cin >> arr[i]; } for(int i = 0; i < n-1; i++){ for(int j = 0; j < n-1; j++){ if(arr[j] > arr[j+1]){ int tmp = ...
ALGO
0.999988
4.046176
f20e259a-4bcf-4f7b-bf60-d289947d4d06
raincross7/code-similarity
codes/train_code/problem183/problem183_461.cpp
#include <bits/stdc++.h> #define M_PI 3.14159265358979323846 // pi using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<ll> VI; typedef pair<ll, ll> P; typedef tuple<ll, ll, ll> t3; typedef tuple<ll, ll, ll, ll> t4; typedef tuple<ll, ll, ll, ll, ll> t5; #define rep(a,n) f...
ALGO
0.999972
4.032912
256dadc5-a4a9-4f48-bb70-ed1cae0d3fdc
sajalkumar07/MY-DSA
qustions/strings/lenghtofstring.cpp
#include <iostream> using namespace std; int length(char name[]){ int count = 0; for(int i=0; name[i]!='\0'; i++){ count++; } return count; } int main(){ char name[20]; cout<<"enter a string : "; cin >> name; cout<<"length : "<<length(name)<<endl; return 0; }
TOOL
0.983727
3.720399
c915ee72-4868-4ead-9d6c-c58ed8eafa73
pinak22dhir/leetcodesolutions-bypinak
2942. wordscontaingcharacters.cpp
class Solution { public: vector<int> findWordsContaining(vector<string>& words, char x) { vector<int> indices; for (int i = 0; i < words.size(); i++) { if(find(words[i].begin(),words[i].end(),x)!=words[i].end()) { indices.push_back(i); } } return indices; } };
ALGO
0.998642
5.897382
c4af8339-7cd2-4af3-927b-e8e2478b7b05
kazi-nayeem/Programming-Problems-Solutions
uva/11857 - Driving Range.cpp
#include<cstdio> #include<iostream> #include<map> #include<vector> #include<queue> #include<algorithm> #include<cmath> using namespace std; #define MX 1000005 struct edge{int u, v; int w; bool operator < (const edge& p) const { return w < p.w; } }; vector<edge> vc; int parent[MX]; int fi...
ALGO
0.999773
4.097517
f7b19491-9aa3-4a2e-87b7-4088dba2df12
knedl1k/B4B33ALG
exam/practical/main.cpp
/* * input is as BFS would go through it * blues(num.2) are only on the leaves * find the largest path between 2 blues with a rule that you cannot cross 3 same colors */ struct node_t{ int pos=-1,color=-1; node_t *right=NULL,*left=NULL; }; struct path_t{ size_t size=0; int longest1=0,longest2=-1; }; path...
ALGO
0.9998
4.277528
5481168e-3a4b-4263-a659-4302c353348a
MetroclesTThedoreF/CPlusPlusBegins
Patterns.cpp/FloydTriangle.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"Enter a number : "; cin>>n; int a=1; for(int i=1; i <= n; i++){ for(int j=1; j<=i; j++){ cout<<a<<" "; a++; } cout<<endl; } }
ALGO
0.999888
3.763417
dfa4cb58-b4c2-45a3-8975-f952c294e186
ankitksh81/leetcode-challenges
March 2022/week3.cpp
/* Campus Bikes https://leetcode.com/problems/campus-bikes/ */ // Solution 1: Sorting struct Node { int distance, worker, bike; Node(int d, int w, int b) : distance(d), worker(w), bike(b) {} }; inline static bool comparator(Node a, Node b) { if (a.distance == b.distance) { if (a.worker == ...
ALGO
0.999995
5.839086
b815b919-dd59-44bf-b396-ce9ec1816438
sarvex/leetcode-chez
solution/0900-0999/0967.Numbers With Same Consecutive Differences/Solution.cpp
class Solution { public: vector<int> ans; vector<int> numsSameConsecDiff(int n, int k) { for (int i = 1; i < 10; ++i) dfs(n - 1, k, i); return ans; } void dfs(int n, int k, int t) { if (n == 0) { ans.push_back(t); return; } in...
ALGO
0.99988
7.006138
053c4bfb-9e0e-4a00-b41f-96ceb391cc55
Imrann-Khan/CP-Codes
ideone_6emI5O.cpp
//push_costly #include<bits/stdc++.h> using namespace std; class Queue_push_costly { stack<int>s1,s2; int len; public: Queue_push_costly() { this->len=0; } void push(int x) { while(!s1.empty()) s2.push(s1.top()), s1.pop(); s1.pus...
ALGO
0.999725
4.333955
afa3e437-904d-4ff5-b453-3a547c5d5a09
fosslight-oss/if-you-are-rich-then-do-not-solve-algorithm
myunghyunnero/programmers_주식가격.cpp
#include <string> #include <vector> #include <stack> using namespace std; stack<pair<int,int>> stk; int arr[100001]; vector<int> solution(vector<int> prices) { vector<int> answer; int len = prices.size(); stk.push({prices[0],0}); for(int i=1 ; i < prices.size() ; i++) { while(!stk.empty() && stk...
ALGO
0.999947
5.172515
024985c8-07d3-4025-a621-9aa5386282a0
liwanrun/QFDEM
fdemLQfilteredmeshsource.cpp
#include "fdemLQfilteredmeshsource.h" #include "constraineddelaunaytriangulation.h" #include "constrainedtriangulation.h" #include "groupcollection.h" #include <vtkInformation.h> #include <vtkInformationVector.h> vtkStandardNewMacro(FDEMGenerateLQFilteredMeshSource); void FDEMGenerateLQFilteredMeshSource::PrintSelf(...
TOOL
0.967171
5.394525
d90e22cd-2690-4637-a163-6019d624faf7
jackylee-ch/program_learning
c++/primer/chapter03/src/3_21.cpp
/************************************************************************* > File Name: 3_21.cpp > Author:stczwd > Mail: <EMAIL> > Created Time: 二 4/21 16:21:26 2015 > Explain: ************************************************************************/ #include<iostream> #include<vector> using namespace std; i...
ALGO
0.992785
3.668727
25968606-8828-43fc-b36b-cc96d6f3d5cc
JoaoFilho33/Estrutura-de-dados--ADS
atividade08/q8.5.cpp
#include <iostream> using namespace std; void insere(char item, int vetor[], int numItem) { while(numItem > 0 && item < vetor[numItem - 1]){ vetor[numItem] = vetor[numItem-1]; numItem--; } vetor[numItem] = item; } void insertionSort(int vetor[], int numItem, int i){ if(i == numItem)...
ALGO
0.999978
5.087367
8a4f3779-8d18-4c3a-9a04-1f31cdf82b73
rdstihz/Learning-and-Coding
src/AcWing/weekly1/C.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 200000 + 100; int p[maxn]; int d[maxn]; bool vis[maxn]; int dfs(int u, int dep) { vis[u] = true; if (vis[p[u]]) { d[u] = dep; return dep; } d[u] = dfs(p[u], dep + 1); } int main() { int T; cin >> T; while ...
ALGO
0.999898
4.576962
ae31c3d7-9819-4e75-a55d-d6864b881da5
ayushjha119/LeetCode
0081-search-in-rotated-sorted-array-ii/0081-search-in-rotated-sorted-array-ii.cpp
class Solution { public: int findpivot(vector<int> &nums,int n){ int l = 0, r = n-1; while(l<r && nums[l]==nums[l+1]) l++; while(l<r && nums[r]==nums[r-1]) r--; while(l<r){ int mid = l+(r-l)/2; ...
ALGO
0.999999
6.369783
0f2efecc-4d6c-41ee-bad7-b8088c25d69c
akeshari98/codeTallyv2
server/routes/test1/18/a.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int a, b; cin >> a >> b; cout << a + b << endl; } }
ALGO
0.998859
5.616874
9106c578-2ffa-40de-ba6f-904c0e760615
yusifaliyevpro/Competitive-Programming
LeetCode/Hard/25. Reverse Nodes in k-Group.cpp
// 25. Reverse Nodes in k-Group // https://leetcode.com/problems/reverse-nodes-in-k-group/ #include <iostream> using namespace std; /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(n...
ALGO
0.999991
5.842744
1001689b-a6da-4441-abdb-66526db4457b
Gnaroshi/practice-algorithm-solvedac
With_Levels/Bronze/Bronze_1/7477.cpp
// problem: Highways // id: 7477 // time taken: #include <bits/stdc++.h> using namespace std; int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); int n, nxt = 2; cin >> n; vector<int> v(n); v[0] = 0; for (int i = 1; i < n; i++) cin >> v[i]; if (n < 4) { c...
ALGO
0.999924
3.488159
de407a68-1865-49f4-bcf0-6f911bde07f2
rawadhossain/LeetCode
237-delete-node-in-a-linked-list/Striver_Approach.cpp
//Striver Way Node* removeNode(Node* node) { if (node == NULL || node->next == NULL) { return NULL; // List is empty or only has one node, can't remove anything } //e.g 4 5 1 9 node = 5, which we want to remove // Copy 1 to 5's position node->val = node->next->val; // 4 1 1 9 // wil...
ALGO
0.999786
3.814027
02f36a24-f1d4-4ed7-82c5-e2062268a791
Dimoyok/LabCG35_Project
Source/Lab35/GridManager.cpp
#include "GridManager.h" #include "Traveler.h" AGridManager::AGridManager() { PrimaryActorTick.bCanEverTick = true; NodeRX = 128.0; NodeRY = 128.0; NodeRZ = 128.0; GridW = 5; GridH = 5; TravelersCount = 5; AddEdges = 15; } void AGridManager::SetSettings() { FString dir = FPaths::ConvertRelativePathToFull("...
ALGO
0.978532
4.457946
52715a10-9a25-42d6-bc47-9876d9923b18
Jirachotsaonram/Structure-Programming-LAB
Lab4/Lab4_13.cpp
#include <iostream> using namespace std; int main() { int Number, Count; bool Flag = true; /* initialize and read value for number */ do { cout << "\nInput number factorial(0-20)? : "; cin >> Number; if ((Number >= 0) && (Number <= 20)) Flag = false; else ...
ALGO
0.997873
4.033177
8d2e7675-fdaa-4759-8305-8383af0e535a
sarvex/leetcode-typescript
solution/0700-0799/0796.Rotate String/Solution.cpp
class Solution { public: bool rotateString(string s, string goal) { return s.size() == goal.size() && strstr((s + s).data(), goal.data()); } };
ALGO
0.999946
5.897719
3221bab3-55dd-4e8a-86ff-fd23ca310f58
kundan181/Problem-On-Leetcode
485-max-consecutive-ones/485-max-consecutive-ones.cpp
class Solution { public: int findMaxConsecutiveOnes(vector<int>& nums) { int cnt =0; int maxi=0; for(int i=0;i<nums.size();i++){ if(nums[i]==1){ cnt++; }else{ cnt=0; } maxi=max(maxi,cnt); } return maxi; } };
ALGO
0.999973
6.102849
6ca1a08e-e45d-4ad2-a171-d08dd4fcba97
adityarathore063/striver-dsa
Greedy/fractional_knapscak.cpp
#include<bits/stdc++.h> using namespace std; struct Item { /* data */ int value; int weight; }; bool comparator(Item a, Item b){ double ratio1 = double(a.value)/double(a.weight); double ratio2 = double(b.value)/double(b.weight); return ratio1>ratio2; } double fractional_knap(int w, int n, Ite...
ALGO
0.999976
4.640004
95178fa5-8169-45f0-ae11-b5ffc595407b
AOSP-Porting/platform_frameworks_av
media/libstagefright/codecs/mp3dec/src/pvmp3_dct_9.cpp
/* ------------------------------------------------------------------------------ PacketVideo Corp. MP3 Decoder Library Filename: pvmp3_dct_9.cpp Date: 09/21/2007 ------------------------------------------------------------------------------ REVISION HISTORY Description: --------------------------...
ALGO
0.99981
6.242046
e32319f7-1490-4018-9b66-29ec714a803d
biswanaths/competition
cc/carlos.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999934
3.258616
311cd343-1b72-4473-861d-dcaf16930aaa
yashgaherwar/Leetcode_Codes
2063_Vowels of All Substrings.cpp
/* Given a string word, return the sum of the number of vowels ('a', 'e', 'i', 'o', and 'u') in every substring of word. A substring is a contiguous (non-empty) sequence of characters within a string. Note: Due to the large constraints, the answer may not fit in a signed 32-bit integer. Please be careful during the ...
ALGO
0.999911
6.974193
13ccd389-624b-4923-b66b-f8767bad5279
hoonisone/GIST_Evolutionary_AI
Homework2/FourProblem/FourProblem/main.cpp
#include <vector> #include <time.h> #include <algorithm> #include <iostream> #include <fstream> #include <string> #include <sstream> #include <tuple> #include <random> using namespace std; struct GenerationState { float maxFitness; float minFitness; float avgFitness; GenerationState(float maxFitness, float minFi...
ALGO
0.99828
4.024229
197c25e0-64d3-49ff-ad15-2801f61c90cc
CrypticFate/DSA
Lab 3/210041220_T01L01_2B.cpp
#include<iostream> #include<cstdlib> using namespace std; struct stack{ int size; int top; int *arr; }; bool isEmpty(struct stack *ptr){ if (ptr->top==-1){ return true;} else {return false;} } bool isFull(struct stack *ptr){ if(ptr->top==ptr->size-1){ return true; ...
ALGO
0.999818
3.854434
a1c605af-786c-4ec3-8470-5aebf2dbd859
sabeelkhan99/CBlocks
pairOfRoses.cpp
#include<iostream> #include<algorithm> #include<vector> using namespace std; vector<pair<int,int> >v; void solve(int *a,int s,int l,int money){ while(s<l){ if(a[s]+a[l]==money){ v.push_back(make_pair(s,l-s)); s++; l--; } else if(a[s]+a[l]>mo...
ALGO
0.999946
3.842039
fb5e27ba-4d32-430f-8239-e91251b3b270
Maulen0806/lab4
task2.cpp
#include <iostream> #include <algorithm> #include <set> using namespace std; int main(){ int n = 10; set <int> nums; for(int i = 0; i < n; i++){ int num; cin >> num; nums.insert(num); } int x; cin >> x; auto it = nums.find(x); if(it != nums.end()){ cout <...
ALGO
0.999689
3.634101
8f073662-0b1f-449f-a26b-b223a76a8ed7
aim97/AVL-tree
bst.cpp
// constructor template <class T1, class T2> bst<T1, T2>::bst(T1 k, T2 v):key(k), value(v){ lvl = 1; } // member funtions template <class T1, class T2> void bst<T1, T2>::display(){ /** * this method is used to recursively display the tree contents * parameters : none * returns : none * excepions : none ...
ALGO
0.996899
4.293818
728109c0-7ed9-4827-a45c-70972c27eb24
Deepak2712002/LeetCode-Solution
26-Minimum Number of Arrows to Burst Balloons.cpp
class Solution { public: int findMinArrowShots(vector<vector<int>>& points) { ranges::sort(points,[](const auto& a, const auto& b) { return a[1] < b[1]; }); int ans = 1; int arrowX = points[0][1]; for (int i = 1; i < points.size(); ++i) if (points[i][0] > arrowX) { arrowX = points[i][1...
ALGO
0.999959
6.300117
6c59f1fc-2f37-4708-be42-93967defbea1
prykdev/Test
Lecture 4 Pattern/pattern3.cpp
#include<iostream> using namespace std; int main(){ int n; cin>> n; int i = 1; while(i<=n){ //print spaces int space = i-1; while(space){ cout<<" "; space--; } //printing numbers int num = n - i + 1; int z = i; while(...
ALGO
0.999992
3.891874
a8bfb9fa-a42a-4c16-aab3-5b127b2c4f5a
JimeNayeli/Estructura_Datos_7167
ParcialN_1/Trabajo_Grupo6/main.cpp
#include <iostream> #include <algorithm> #include <vector> int main () { int primero[] = {5,10,15,20,25}; int segundo[] = {50,40,30,2,10}; std::vector<int> v(10); std::vector<int>::iterator it; std::sort (primero,primero+5); std::sort (segundo,segundo+5); it=std::set_union (...
ALGO
0.996789
4.194453
5d517ef8-e1aa-4d54-829d-c1754b976641
mohitagarwal0103/leetcode-sols
Power of 2 - GFG/power-of-2.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: // Function to check if given number n is a power of two. bool isPowerofTwo(long long n){ if(n==1) return true; ...
ALGO
0.999417
6.16233
d73c2bc5-1346-45e6-a990-eb3a937a7681
mateor/pdroid
android-2.3.4_r1/tags/1.26/frameworks/base/media/libstagefright/codecs/amrnb/dec/src/d1035pf.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/d1035pf.c Date: 04/14/2000 ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated template used to PV coding template. First attempt...
ALGO
0.999834
5.672946
2f5cd2aa-954d-4e53-aadf-e87963ce10c5
alibaba/nann
blaze-benchmark/thirdparty/boost_1_53_0/libs/math/src/tr1/cyl_bessel_jf.cpp
extern "C" float BOOST_MATH_TR1_DECL boost_cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) BOOST_MATH_C99_THROW_SPEC { return c_policies::cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x); }
TOOL
0.953445
3.438202
8cab2462-83f9-4d09-8634-de556a6c806a
SwatiRanjangit/CPP_DSA_PRACTICE
Love_Babbar_DSA_Supreme/Arrays/buy&SellStocks.cpp
#include <iostream> #include<unordered_map> using namespace std; int maxProfit(int arr[],int n){ int buy=arr[0], max_profit=0; for(int i=1;i<n;i++){ if(buy > arr[i]){ buy=arr[i]; }else if(arr[i]-buy > max_profit){ max_profit = arr[i]-buy; } } return max_profit; } int ...
ALGO
0.942647
5.177001
8916dc4a-17af-4725-ab7e-d76f9003d1a6
Lumen951/LeetCode-Classic150
AS/AS-15-candy.cpp
class Solution { public: int candy(vector<int>& ratings) { int n = ratings.size(); if( n == 0 ){ return 0; } vector<int> candy(n, 1); for( int i = 1; i < n; i++ ){ if( ratings[i] > ratings[i-1] ){ candy[i] = candy[i-1] + 1; ...
ALGO
0.999994
6.217228
970021df-f156-4ef7-a4f1-fe584e50ff93
ayushh089/BB
bfs.cpp
#include<bits/stdc++.h> using namespace std; class GRAPH { int no_of_vertices; vector<int> *myContainer; //Adjancency List to Store edges public: //Constructor GRAPH(int v) { no_of_vertices = v; myContainer = new vector < int>[no_of_vertices]; } //Function to add an edge void AddEdge(int i, int el)...
ALGO
0.999932
4.974651
54fbcb49-222f-4525-8bde-3b246bd6ad39
Shravankd12/first
new.cpp/countnotes.cpp
#include<iostream> using namespace std; int main(){ int n ; cin>>n; int RS100,RS50, RS20,RS1; switch(1) { case 1 : RS100=n/100; n=n%100; cout<< "100 notes " << RS100 << endl; case 2 : RS50=n/50; n=n%50; cout<< "50 notes " << RS50 << endl; case 3: RS20=n/10; ...
ALGO
0.999242
3.99209
9c0d8cfc-2673-4d7a-a77f-d83d856d0345
tejaswini212/100-Days-Of-Algo
100 Days of Algo - Day Wise/Day52/verticalOrderTravBT.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999993
5.869806
a250361a-4d09-4a54-9851-7003ef65ee4d
IMSLGGYU/OpenCV-with-CUDA
opencv-4.10.0/modules/features2d/src/kaze/nldiffusion_functions.cpp
/** * @file nldiffusion_functions.cpp * @brief Functions for non-linear diffusion applications: * 2D Gaussian Derivatives * Perona and Malik conductivity equations * Perona and Malik evolution * @date Dec 27, 2011 * @author Pablo F. Alcantarilla */ #include "../precomp.hpp" #include "nldiffusion_functions.h" #...
ALGO
0.999947
7.1115
5dd40651-12e2-4bb2-ba81-4a4cdd9f5f57
zyzisyz/OJ
acwing/0154_2.cpp
#include <iostream> #include <queue> using namespace std; int n, k; int nums[1000006]; int main(void) { cin>>n>>k; for(int i=0; i<n; i++) { cin>>nums[i]; } deque<int> q; //min q for(int i=0; i<n; i++) { if(q.size() && q.front()<i-k+1) { q.pop_front(); } while(q.size() && nums[q.back()]>=nums[i]) ...
ALGO
0.999997
3.470145
267ea67f-6765-4320-ac98-bfb160c1fe19
SuperBigFive/Charming_XCPC
Algorithm/Bear's template/templates/templates/prufer/sol.cpp
#include <bits/stdc++.h> using namespace std; vector<int> encode(const vector<vector<int>>& g) { const int n = g.size(); vector<int> res, deg(n); priority_queue<int, vector<int>, greater<int>> q; for (int i = 0; i < n; ++i) { deg[i] = g[i].size(); if (deg[i] == 1) q.push(i);...
ALGO
0.999347
3.738806
973ce809-a7f8-49d8-9be7-baf5a81d3c3b
dyktr06/kyopro_library
test/library_checker/polynomial/exp_of_formal_power_series.test.cpp
#define PROBLEM "https://judge.yosupo.jp/problem/exp_of_formal_power_series" #include <iostream> #include "../../../lib/math/modint.hpp" #include "../../../lib/polynomial/formal_power_series.hpp" using namespace std; using mint = ModInt<998244353>; using FPS = FormalPowerSeries<mint>; int main(){ cin.tie(nullpt...
ALGO
0.999726
3.886787
ccadba24-0291-4ab1-b3b0-437950d6ffa0
CG-F15-22-Rutgers/steer-A2
curveAI/src/CurveAgent.cpp
#include "SteerLib.h" #include "CurveAgent.h" #include "CurveAIModule.h" #include <cmath> #include <iostream> #include <algorithm> #include <vector> #include <random> /// @file CurveAgent.cpp /// @brief Implements the CurveAgent class. #define MAX_FORCE_MAGNITUDE 3.0f #define MAX_SPEED 1.3f #define AGENT_MASS 1.0f C...
ALGO
0.929066
6.952417
5192879c-ef4b-4b0e-96a1-9b1f2834b095
Isaac-Franklin/clarifynewapp
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
ae91b6cf-3c4f-42ae-95dd-026e3ba874a9
mehreen019/competitive_programming
cses/cses_nim_game_2.cpp
#include<bits/stdc++.h> #define int long long using namespace std; int32_t main(void){ int tst; cin>>tst; while(tst--){ int n,k; cin>>n; int r[n+6], xr; for(int i=0;i<n;i++){ cin>>r[i]; r[i]%=4; } xr=r[0]; for(int i=1;i<n;i++){ ...
ALGO
0.999967
3.853446
d8fc6f2c-0005-4fce-b0c5-9ac7b9ee351f
Sambhav-27/Leetcode
Restore_IP_Addresses_93.cpp
// good back tracking practice. // not mentioned in questions: whole input string should be consumed // time: 3^n; n = tree height #define pb push_back class Solution { public: string s; vector<string> ans; void add(vector<string> cur) { string curstr; for(auto x: cur) { ...
ALGO
0.99983
5.774752
c85237cf-e7d7-4976-ae67-ebc9c83abfb9
Jasleengujral01/LeetCode-quesions
0876-middle-of-the-linked-list/0876-middle-of-the-linked-list.cpp
/** * 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) {} * }; */ class Solution { public: ListNode* middleNode(...
ALGO
0.999878
5.791001
3c094ecb-434e-429d-91b9-e4b5c6abf15d
cookie-sid/LeetCode
1254-number-of-closed-islands/1254-number-of-closed-islands.cpp
class Solution { public: void helper(vector<vector<int>> &grid, int x, int y, int n, int m, vector<vector<bool>> &taken, int counter) { if(x < 0 or x >= n or y < 0 or y >= m) { return; } if(grid[x][y] == 1 or taken[x][y]) return; ...
ALGO
0.999973
6.252719
6450e72d-8ea0-4c86-b425-67dac4a95574
CGAL/cgal
Principal_component_analysis/examples/Principal_component_analysis/centroid.cpp
// Example program for the centroid() function for 2D points, 3D points and 3D triangles. #include <CGAL/Simple_cartesian.h> #include <CGAL/centroid.h> #include <vector> #include <iostream> typedef double FT; typedef CGAL::Simple_cartesian<FT> K; typedef K::Point_2 Point_2; typ...
ALGO
0.999454
7.699221
9b3e5535-de7f-413d-94e5-45f7677a2ef6
ftiasch/acm-icpc
project-euler/p593.cpp
#include <cstdio> #include <vector> std::vector<int> get_primes(int n) { std::vector<bool> is_prime(n + 1, true); std::vector<int> primes; for (int d = 2; d <= n; ++ d) { if (is_prime[d]) { primes.push_back(d); } for (auto&& p : primes) { if (d * p > n) { ...
ALGO
0.999442
4.419915
4f204025-491d-4f77-9ca0-c5c0a6785fa7
DylanD03/CLRS-Algorithms-Implementation
Graphs/dfs/dfs.cpp
#include <iostream> #include <unordered_map> // #include <unordered_set> #include <stack> #include <list> #include "digraph.h" using namespace std; void recursive_dfs(const Digraph& graph, const int u, const int prev, unordered_map<int, int> & reached) { if (reached.find(u) != reached.end()) return; // it was visit...
ALGO
0.999934
5.17521
80f1cd90-a47d-41ee-b6e0-b0ab4696300d
EimerQiu/PetHealthPro
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.99887
6.783439
4a47071a-1821-411e-93b7-892cabc6fbbb
ishandutta2007/codeforces
dmga44/normal/1187/C.cpp
#include <bits/stdc++.h> #define db(x) cout << (x) << '\n'; using namespace std; typedef long long ll; typedef pair<ll,ll> pii; typedef pair<ll,pii> pip; typedef pair<pii,pii> ppp; typedef long double ld; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef ...
ALGO
0.999995
3.255747
c092e08b-3f0e-41da-a0e2-54a7195d1bf2
konradha/nonlinear-solvers
nlse_driver.cpp
#include "nlse_solver.hpp" #include "util.hpp" template <typename Float, typename F> Eigen::VectorX<Float> apply_function(const Eigen::VectorX<Float> &x, const Eigen::VectorX<Float> &y, F f) { const uint32_t nx = x.size(); const uint32_t ny = y.size(); Eigen::VectorX<Float> u...
ALGO
0.999906
5.614695
4cc085fc-b5ae-41be-85b2-b8d9f21c63c0
RiccardoCeccon/Competitive-Programming
lezione 18/queue.cpp
//http://codeforces.com/problemset/problem/141/C?csrf_token=39d991d644b7676d7f8fa81f96eae06b /* We sort the elements with respect to the number of higher people in front of them. If this number is higher than the position in the sorted vector p, there is no solution. Otherwise, we put every person greedily in the p[i]...
ALGO
0.999888
4.429904
ca731ce7-6fb2-46d7-8a2c-c0295ad3dd2a
lhlephuocdao/Algorithm
Codeforces/Round 981 Div 3/B.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--) { int n; cin >> n; vector<vector<int>> a(n, vector<int>(n)); for (int i = 0; i < n; i++) ...
ALGO
0.999938
4.767032
3b878769-e891-4d75-8822-876080176dc4
js2678766/SeveriJasmine_CIS5_47948
Homework/Assignment3_JasmineSeveri/Gaddis_Edition8_Chapter4_Problem13_BookClubPoints/source.cpp
/* 13. Book Club Points Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased each month. The points are awarded as follows: • If a customer purchases 0 books, he or she earns 0 points. • If a customer purchases 1 book, he or she e...
TOOL
0.959957
5.251692
4f8b7fe6-66b4-4a22-bd87-2e1f3cf72771
Ayushluthra2001/DataStructurewithAyushluthra
Geek and Co Prime Number.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: long long sum(long long N, long long M){ // code here long long g=__gcd(N,M); return N/g + M/g; } };...
ALGO
0.999813
6.274578
bd313b67-28fb-40d7-b6c3-f23ba6ebcdd8
manishya1669/MyLeetcodeJourney
2231-largest-number-after-digit-swaps-by-parity/2231-largest-number-after-digit-swaps-by-parity.cpp
class Solution { public: int largestInteger(int num) { string s=to_string(num); priority_queue<int> odd, even; for(auto x: s){ int tmp=x-'0'; if(tmp%2==0) even.push(tmp); else odd.push(tmp); } for(auto& x: s){ int tmp=x-'0'; ...
ALGO
0.999944
6.036445
191aa301-744a-4e92-904f-e7bf739edbe5
draperlaboratory/hope-llvm-project
clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp
#include "IncludeOrderCheck.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Lex/PPCallbacks.h" #include "clang/Lex/Preprocessor.h" #include <map> namespace clang { namespace tidy { namespace llvm_check { namespace { class IncludeOrderPPCallbacks : public PPCallbacks { public: explicit IncludeOrderP...
TOOL
0.876086
7.846777
ade63a80-639a-42e2-8c08-925a12e9792f
Nasirali-Kovvuru/Practice-for-C-CPP
STR2D.CPP
#include<stdio.h> #include<conio.h> #include<string.h> void main() { char s[100][20],str[20]; int i; clrscr(); /*Serch a string*/ printf("Enter 5 strings"); for(i=0;i<5;i++) gets(s[i]); printf("Enter string to be searched"); gets(str); int c=0; for(i=0;i<5;i++) { if(strcmp(str,s[i])==0) { printf("%...
ALGO
0.994137
3.261379
b53550cd-82c9-4f06-8717-09a5711b126b
memcpy0/LeetCode-Conquest
Solutions/1071-1080/1073. Adding Two Negabinary Numbers[模拟] 中等.cpp
/* ** Problem: https://leetcode.cn/problems/adding-two-negabinary-numbers/ ** Article: https://memcpy0.blog.csdn.net/article/details/130774789 ** Author: memcpy0 */ class Solution { public: vector<int> addNegabinary(vector<int>& arr1, vector<int>& arr2) { int i = arr1.size() - 1, j = arr2.size() - 1; ...
ALGO
0.999979
5.62724
0232ec69-189d-4267-90b9-d6d59adaf0a2
steel101/Suyu1
src/shader_recompiler/frontend/maxwell/translate/impl/half_floating_point_add.cpp
#include "shader_recompiler/frontend/maxwell/translate/impl/half_floating_point_helper.h" namespace Shader::Maxwell { namespace { void HADD2(TranslatorVisitor& v, u64 insn, Merge merge, bool ftz, bool sat, bool abs_a, bool neg_a, Swizzle swizzle_a, bool abs_b, bool neg_b, Swizzle swizzle_b, const IR::U32& s...
TOOL
0.976689
7.012619
abbd77c1-46f8-40bf-b153-60309b0360ec
triffon/oop-2021-22
exercises/1/exercises/11-higher-order-functions/problems.cpp
#include <iostream> #include <string> #include <ios> #include <vector> #include <iterator> struct Student { std::string name; int number; }; std::ostream& operator<<(std::ostream& out, const Student& s) { return out << s.name << ' ' << s.number; } bool operator<(const Student& lhs, const Student& rhs) { ...
ALGO
0.998239
5.00112
539d031d-a26d-4f1f-8119-9da4415a2731
fcrispim/labmeqaDarop
src/main.cpp
#include <ilcplex/ilocplex.h> #include <cstdio> #include <iostream> #include <vector> #include <list> #include <cmath> #include "Graph.h" #include "globals.h" #define INF 10000 using namespace std; //Graph &g, VehiclesCapacity &v, int &requests_number void readInstance(char *filename) { FILE *input_file = fopen( f...
ALGO
0.997006
3.549471
69d44968-3cc9-48f3-be45-77344d6f34b6
sumeetbalwade/engineeringproject
SE/OOPL BY SUMEET BALWADE/assign7.cpp
#include<iostream> #include<fstream> #include<cstring> using namespace std; class telephone { int number; char name[20]; public: void accept() { cout<<"\n enter name and telephone number:"; cin>>name; cin>>number; } void display() { cout<<"\n"<<name<<"\n"<<...
TOOL
0.910493
3.270425
f274edd6-0029-467b-a055-38113ec842ed
phhusson/platform_external_skia
src/core/SkLineClipper.cpp
#include "SkLineClipper.h" #include "SkTo.h" #include <utility> template <typename T> T pin_unsorted(T value, T limit0, T limit1) { if (limit1 < limit0) { using std::swap; swap(limit0, limit1); } // now the limits are sorted SkASSERT(limit0 <= limit1); if (value < limit0) { ...
ALGO
0.999397
6.071033
76e1cd9b-814f-4da2-bbd2-e31f6f67b939
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_11799_6.cpp
#include <bits/stdc++.h> using namespace std; float z, n, k; float a, b; struct dom { float from; float to; dom(float a, float b) : from(a), to(b) {} }; bool operator<(dom a, dom b) { return a.from < b.from; } int main() { vector<dom> miasto; cin >> z >> k; for (int ii = 0; ii < z; ++ii) { cin >> a >> b...
ALGO
0.999852
3.883189
d82dbe39-4288-4d95-9b28-cc0f2ead199f
GaisaiYuno/OI-Record-exe-deleted
Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day1程序包/GD-Senior/answers/GD-0513/track/track.cpp
#include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<cmath> using namespace std; const int N=50005; int pp,lsy,yys,p,n,m,w[N],mn,last[N],cnt,du[N],root,ans,son[N][3],hjy[N][3]; int f[N][3],g[N][3]; struct data{int to,next,w;}e[N*2]; bool flag; bool cmp(int a,int b){ return a>b; } void ad...
ALGO
0.999965
4.146111
b1d37a69-dd99-4431-acfc-6b52c59e2eaf
ManuelLoaizaV/ine018-unmsm
ejercicios/2024-1_lista-2/antiheroe.cpp
#include <iostream> using namespace std; void Resolver(void) { int n; cin >> n; if (n == 3) { cout << "1 3 2" << endl; cout << "2 3 1" << endl; cout << "3 1 2" << endl; return; } for (int i = n; i >= 1; i--) { for (int j = i; j >= 1; j--) { cout...
ALGO
0.999948
4.375215