uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
87ab0ea0-3269-4f9c-ab72-4e335f3afedb
DJEscHGL/coding
CodeBlock/2nd_part/026/main.cpp
#include <iostream> #include <cstdio> #include <queue> #include <fstream> using namespace std; int n, a[30][30], i, j, l, x, y; queue <int> x1, y1; int main() { l = 0; setlocale(0, ""); freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout); cin >> n; for (i = 1; i <= n; i++) ...
ALGO
0.999762
3.400617
37b26ff3-13c0-453a-8f0f-4a1da7d68fb9
yynps737/yolo_fps_enhancement
src/processing/tracker.cpp
#include "tracker.h" #include <algorithm> #include "../detection/yolo_detector.h" Tracker::Tracker(int maxLostFrames) : m_nextId(0), m_maxLostFrames(maxLostFrames) { } std::vector<Entity> Tracker::update(const std::vector<Detection>& detections) { std::vector<Entity> trackedEntities; if (detections...
ALGO
0.960735
6.638231
da7e85a7-1e66-470d-85da-088dfca951f3
PriyobrotoKarmakar/Spreme-3.0
C++/love babbar dsa/Searching and Shorting/find_peak_number.cpp
#include<iostream> using namespace std; int peak_element(int arr[],int n){ int start=0; int end = n-1; int mid = (start+end)/2; int ans; while(start<end){ if(arr[mid]>arr[mid+1]){ end = mid; } else{ start = mid+1; } ans = arr[start]; ...
ALGO
0.999834
3.65225
73841e85-4cb3-4b8d-84d5-5ad08e2db529
SCI-ElVis/ElVis
src/Externals/boost/libs/graph/test/mas_test.cpp
#include <fstream> #include <iostream> #include <map> #include <vector> #include <string> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/connected_components.hpp> #include <boost/graph/exception.hpp> #include <boost/graph/graph_traits.hpp> #include <boost/graph/read_dimacs.hpp> #include <boost/graph/ma...
TEST
0.940218
6.829308
89042871-c0d6-48a1-82a9-d74baedfead5
gaoyuping/wke
wke/Source/WebCore/xml/XSLTUnicodeSort.cpp
#include "config.h" #include "XSLTUnicodeSort.h" #if ENABLE(XSLT) #include "PlatformString.h" #include <libxslt/templates.h> #include <libxslt/xsltutils.h> #include <wtf/unicode/Collator.h> #if PLATFORM(MAC) #include "SoftLinking.h" #endif #if PLATFORM(MAC) SOFT_LINK_LIBRARY(libxslt) SOFT_LINK(libxslt, xsltCompute...
TOOL
0.996851
7.28054
6e00d966-44c3-41a1-b978-cb027d8a8be6
DongmingShenDS/POMDP-RL
POMDP_LTLF-main/model_generation_decpomdp/mona-1.4/Front/st_dfa.cpp
#include <iostream> #include "st_dfa.h" #include "printline.h" #include "env.h" #include "offsets.h" #include "timer.h" #include "codetable.h" using std::cout; extern Offsets offsets; extern Options options; extern CodeTable *codeTable; Timer timer_restrict; Timer timer_negation; Timer timer_product; Timer timer_ri...
ALGO
0.999631
3.776349
c0ca629a-9e2a-4e77-b262-fc803a575f31
ignaciomarinreyes/AnalisisAlgoritmos
Iterators/IteratorOfCombinationCpp/IteratorOfCombination.cpp
#include "IteratorOfCombination.h" using namespace std; IteradorCombinaciones::IteradorCombinaciones(int N) { valorMaximo = 1; valorMinimo = 0; tamano = N; combinacion = new int[tamano]; for (int i = 0; i < N; i++) { combinacion[i] = 0; } } bool IteradorCombinaciones::ultimaCombinacio...
ALGO
0.980016
4.178069
18e9d921-3873-42ec-bf95-d09c4076ba6b
Prithuvin/to_do_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.998733
6.76775
c0aa7101-b32a-4380-a2da-9128c6b37097
Alexander-L-Li/Competitive-Programming
CodeForces/Miscellaneous/151/soft_drinking.cpp
#include <iostream> #include <vector> #include <tuple> #include <algorithm> #include <string> #include <set> #include <map> #include <cmath> #include <queue> #include <iomanip> using namespace std; typedef long double ld; typedef long long ll; typedef pair<int, int> pi; typedef pair<ll,ll> pll; typedef pair<char, cha...
ALGO
0.998959
3.546623
556bb9b0-52b4-4409-a88b-68a7098b66d3
lnishan/massif-cherrypick
src/cherrypick-core.cpp
#include <cherrypick-core.h> int cp_picker::parse_args(int argc, char* argv[]) { if (argc < 2) { fprintf(stderr, "* Please specify the massif output file!\n"); fprintf(stderr, "Usage: ./cherrypick {massif_output_file} {pattern}\n"); return 1; } if (argc < 3) { fprintf(stderr, "* Please specify pa...
TOOL
0.926464
3.905723
706bbe35-b378-49ee-a2ec-ca3731eee511
Teafox-Yang/GAMES202_HW_TEAFOX
2.Environment Lighting-PRT/prt/ext/eigen/doc/examples/TutorialLinAlgInverseDeterminant.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix3f A; A << 1, 2, 1, 2, 1, 0, -1, 1, 2; cout << "Here is the matrix A:\n" << A << endl; cout << "The determinant of A is " << A.determinant() << endl; cout << "The inverse of A is:\n...
ALGO
0.999734
4.186114
9ecaf432-c73c-4cc9-8c50-5ca1ed0f031c
raincross7/code-similarity
codes/train_code/problem482/problem482_281.cpp
#include<iostream> using namespace std; int main() { int h, w; while (1) { cin >> h >> w; if (h == 0 && w == 0) break; for (int i = 0; i < h; i++) { for (int k = 0; k < w; k++) { if (i == 0 || i == h - 1 || k == 0 || k == w - 1) { cout << '#'; } else cout << '.'; } cout << endl; }...
ALGO
0.999611
3.295682
f1390af5-044e-43b8-af14-758af87a1a64
F-0728/atcoder
ABC/B/364B.cpp
#include <atcoder/all> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <set> using namespace std; using namespace atcoder; // using mint = modint1000000007; using mint = modint998244353; using ll = long long; const ll inf = 1 << 30; const ll INF = 1LL << 60; #define rep(i, n) for (ll i ...
ALGO
0.999946
4.839939
910c3a61-5db0-488f-bba4-488b4db699a9
thegamer1907/Code_Analysis
DP/2185.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m; int a[100001]; int temp; cin >> n >> m; for (int i = 1; i <= n; i++) { cin >> a[i]; } int dp[100001], present[100001]; memset(present, 0, sizeof(present)); memset(dp,0,sizeof(dp)); for...
ALGO
0.999955
3.963155
8b2f6c29-1e8e-48a2-90b0-a0ad0dbea60e
MagicalSheep/Daily
pratice/ABC226A.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; const int MAXN = 1e5 + 10; double x; int main() { scanf("%lf", &x); double ans = round(x); printf("%.0f\n", ans); return 0; }
ALGO
0.998313
3.607934
f9e9e338-f21d-4fda-b383-a59e35c92eae
KomiMoe/Arkari
libc/src/math/generic/setpayloadsigf16.cpp
#include "src/math/setpayloadsigf16.h" #include "src/__support/FPUtil/BasicOperations.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(int, setpayloadsigf16, (float16 * res, float16 pl)) { return static_cast<int>(fputil::setpayload</*Is...
ALGO
0.973679
6.452893
6df5082e-1d54-44cd-b6c2-635cb8081976
nicolas-springer/programacionCompetitiva
beecrowd/1047.cpp
#include <bits/stdc++.h> #define forr(i,a,b) for(int i=(a);i<(b);i++) #define forn(i,n) forr(i,0,n) #define dforn(i,n) for(int i=n-1;i>=0;i--) #define forall(it,v) for(auto it=v.begin(); it!=v.end(); it++) #define sz(c) ((int)c.size()) #define rsz resize #define pb push_back #define mp make_pair #define lb lower_bound ...
ALGO
0.999608
3.283193
a8e30198-3079-47e2-b9c5-86df2305842f
akazad13/competitive-programming
Online Judges/LeetCode/485 - Max Consecutive Ones.cpp
class Solution { public: int findMaxConsecutiveOnes(vector<int> & nums) { int res = 0; int cur = 0; for (int i = 0; i < nums.size(); i++) { if (nums[i] == 1) { cur++; res = max...
ALGO
0.999904
6.053296
ac822153-93f0-4e74-8982-24d0904dafdd
tessarwork/cam_esp
managed_components/espressif__opencv/opencv_contrib/modules/rapid/src/histogram.cpp
#include "precomp.hpp" namespace cv { namespace rapid { static void compute1DCanny(const cv::Mat& src, cv::Mat& dst, uchar threshold) { compute1DSobel(src, dst); // step2: compute 1D non-maximum suppression + threshold for (int i = 0; i < dst.rows; i++) { for (int j = 1; j < dst.cols - 1; j++)...
ALGO
0.999001
6.578294
9bab325d-3129-431a-8744-64e1d69165fa
mddirga/flutter-jet-travel-apps
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998693
6.797273
afb83928-a4b0-438c-8429-500a8b1e9ae3
LittleYang0531/CQ-NOIP-2021
CQ-0091/sequence/sequence.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; const int M=110,N=40; const ll p=998244353; int n,m,k; ll f[M][N][N][N],v[M],g[N],inv[N]; bool mark[M][N][N][N]; int read() { int x=0,f=1;char s=getchar(); while(s<'0'||s>'9') { if(s=='-')f=-f; s=getchar(); } while(s>='0'&&s<='9'){ x=x*10+s-'0'...
ALGO
0.999961
3.778
74a76de9-2aa7-4521-b433-3c0ab4de61e0
09091998/test-
maxnum.cpp
#include <iostream> using namespace std; int main() { int n1, n2, n3; cout << "Enter three numbers: "; cin >> n1 >> n2 >> n3; if(n1 >= n2 && n1 >= n3) cout << "Largest number: " << n1; if(n2 >= n1 && n2 >= n3) cout << "Largest number: " << n2; if(n3 >= n1 && n3 >= n...
ALGO
0.998936
3.860717
1540fa54-0aef-472f-b955-596d1fc1311f
GoGradually/PS-Saved-Repository
24_MAR/240306/1742F.cpp
#include <bits/stdc++.h> #define ll long long #define INF (int)1e9 + 10 #define lINF (ll)1e18 + 10LL const ll MOD = 1000000007LL; // #include <atcoder/modint.hpp> // using mint = atcoder::modint998244353; using namespace std; void Solve() { int q; cin >> q; vector<vector<ll>> arr(2, vector<ll>(26, 0)); ...
ALGO
0.999934
4.867343
dc435195-a39f-4b33-a4f2-206466f1674e
Xan-ca/CF-Submissions
Practice-C/P1782.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define INF (ll)1e18 mt19937_64 RNG(chrono::steady_clock::now().time_since_epoch().count()); void Solve() { ll n; cin>>n; vector<ll>v(n); ll maxn=0; for(ll i=0;i<n;i++){ ll it; cin>>it; v[i]=it; max...
ALGO
0.999933
4.179199
736324d6-2789-4d4b-b9d2-a11739ef90b5
RhysWareham/Pathfinding-and-MD2-Loader
Pathfinder and MD2 Model Animator/CT4028 - Assignment 1/deps/glm/test/gtx/gtx_fast_trigonometry.cpp
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtc/type_precision.hpp> #include <glm/gtx/fast_trigonometry.hpp> #include <glm/gtx/integer.hpp> #include <glm/gtx/common.hpp> #include <glm/gtc/constants.hpp> #include <glm/gtc/ulp.hpp> #include <glm/gtc/vec1.hpp> #include <glm/trigonometric.hpp> #include <cmath> #include <...
TEST
0.975976
6.245223
a3719e8f-6663-410f-8e51-b394eb0ac370
horia-apostol/oop-2021
Laboratorul_3/Math.cpp
#include "Math.h" #include "cstdarg" #include "cstdlib" #include "cstring" int Math::Add(int a, int b) { return a + b; } int Math::Add(int a, int b , int c) { return a + b + c; } int Math::Add(double a, double b) { return a + b; } int Math::Add(double a, double b, double c) { return a + b + c; } int Math::Mul(int ...
TOOL
0.884678
4.996398
90659fa3-1b4b-4b13-94e1-44ff53284863
Amen-Munir/Data-Structures-Algo
BinarySearch/01.cpp
#include <iostream> #include <vector> using namespace std; vector<int> FindFirstAndLastIndex(vector<int> array, int key) { int startIndex = -1, endIndex = -1; int s = 0; int e = array.size() - 1; while (s <= e) { int mid = s + ((e - s) / 2); if (array[mid] == key) { startIn...
ALGO
0.999945
5.688435
953a4860-dde6-486b-a891-7459a5c2b1ae
Gon20000/my-cpp-journey
cp/vjudge/teamscode2/j.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; ll mod{998244353}; void solve() { ll l{}; ll r{}; cin >> l >> r; vector<ll> psum(r-l+2); for(ll i{l + 1}; i <= r + 1; ++i) { ll res{}; ll x{i}; while(x > 0) { res += static_cast<ll>(x % 10 == 3...
ALGO
0.999692
5.246316
1e296887-b5eb-4f84-8c79-a5b4e06624aa
Vivek1898/leetcode-practice
1114-binary-search-tree-to-greater-sum-tree/1114-binary-search-tree-to-greater-sum-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999783
5.35636
7485c69b-c58e-43ba-a5b1-b87c2981a7cd
ksb451/Cpp_DSA
Tree_advance/B.cpp
#include <bits/stdc++.h> #include <algorithm> using namespace std; #define fast \ ios_base::sync_with_stdio(false); \ cout.tie(NULL); \ cin.tie(NULL); #define IN cin >> #define OUT cout << #define nl "\n" #define all(a) (a).begin(), (a).end() #define pb push_back ...
ALGO
0.999744
4.49333
b3f24a05-ae0a-4db7-a370-b7b40fef807c
ekut-es/pulp-llvm
libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp
// <algorithm> // template<ForwardIterator Iter, Predicate<auto, Iter::value_type> Pred, class T> // requires OutputIterator<Iter, Iter::reference> // && OutputIterator<Iter, const T&> // && CopyConstructible<Pred> // constexpr void // constexpr after C++17 // replace_if(Iter first, Iter las...
TEST
0.976669
6.961407
d1c66c4e-b737-4385-b433-d276daf40841
ma-chengcheng/algorithm
Search/DFS.cpp
#include <iostream> #include <vector> #include <cstring> #include <string> using namespace std; int map[9][9]; struct node{ int x; int y; node(int y, int x):y(y), x(x){} }; bool state; vector<node> v; bool check(int index, int num){ // 判断行列是否用过 int x = v[index].x; int y = v[index].y; for (int i = 0; i...
ALGO
0.999956
3.848351
03701495-e64e-4e8e-ba1b-ad241af61a6f
anipatil72/My_Competitive_Programming
147.cpp
#include <bits/stdc++.h> using namespace std; int reverse(int A) { if (A > INT_MAX) { return 0; } if (A > 0) { string s = to_string(A); int n = s.length(); for (int i = 0; i < n / 2; i++) { swap(s[i],s[n - i - 1]); } while (s[...
ALGO
0.9997
4.128005
506c6bd8-c9eb-496e-8811-f8da954560f8
YashKumarYK/LeetCode
Check if Linked List is Palindrome - GFG/check-if-linked-list-is-palindrome.cpp
// { Driver Code Starts #include <stdio.h> #include <stdlib.h> #include <iostream> #include <stack> using namespace std; /* Link list Node */ struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; // } Driver Code Ends /* struct Node { int data; struct Node *next; N...
ALGO
0.999727
5.221238
85016d6a-6c86-4467-8647-555d3f1b52b4
kishorveer1997/Cpp--Programming
main58.cpp
/* Problem statement : Accept N number from user and return smmalest element from array Input: size 6 Elements : 15 66 3 70 10 88 Outpt: 3 */ #include<iostream> using namespace std; class Number { private: int *arr; int iSize; public: Number(int ptr[], int i) { arr = ptr; iSize = i; } ...
ALGO
0.998205
4.148767
efb22c02-fc30-463f-9336-a04147299009
Nullray/ICT
software/workload/firesim/host/firesim-lib/lib/boost/libs/compute/perf/perf_unique.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/unique.hpp> #include <boost/compute/container/vector.hpp> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0); } int ma...
ALGO
0.980797
5.821626
c794e733-7996-4100-bfdf-1e22f8a2cc8b
dragvs/Codeforces
Codeforces/Codeforces/474A.cpp
#include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <vector> #include <algorithm> #include <iterator> #include <cmath> #include <cstring> //#include <string> // 474A - Krot i lapki // Method: Implementation namespace { using namespace std; using ll = long long; using ii = std:...
ALGO
0.999593
4.211699
d82854b6-a52c-4c11-a38e-ca96871fec9a
Haribala-09/hyprdots
User/History/373190d8/2iqW.cpp
#include <bits/stdc++.h> using namespace std; #define rev(ans) reverse(ans.begin(), ans.end()) #define all(a) begin(a), end(a) #define mems(a, n) memset(a, n, sizeof(a)) #define pb push_back #define fst first #define scd second #define int long long using pii = pair<int, int>; using pci = pair<char, int>; void dbg_o...
ALGO
0.99981
5.678085
a8a80826-ab30-4950-8787-b8299dd8b64d
shivanshjoshi28/DSA
Codes/Tree/IntervalTree.cpp
#include <bits/stdc++.h> #include <iostream> using namespace std; #include <vector> typedef pair<int, int> pii; typedef vector<int> vi; #define pb push_back #define MP make_pair #define endl "\n" #define boost \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define F first #define S...
ALGO
0.99967
5.102253
075cb3d1-b04c-41dd-a5ae-4519b63c7123
Singh-along/Cplusplus
Check Sequence.cpp
#include <iostream> #include <conio.h> using namespace std; int main() { int n; cin>>n; int arr[n]; int i=0; while(i<n) { cin>>arr[i]; i++; } int comparray[n-1]; for(int j=0;j<n-1;j++) { comparray[j]=arr[j]-arr[j+1]; } int count=0; for(int k=0;k<n-2;k++)...
ALGO
0.999924
3.440781
772531cb-103d-49e1-aa8e-064ec93455b9
hameem008/Competitive_Programming
Codeforces_and_others/Hit_the_Lottery.cpp
/* "I would never fall in love again until I found her" I said, "I would never fall, unless it's you I fall into" I was lost within the darkness, but then I found her I found you ---Until I Found You lyrics from my favourite song */ #i...
ALGO
0.997929
4.54391
899205d1-7595-4b33-b7e7-eedf6630f262
Paucb7/FirstFlutterApp-UDGVirtual
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
f1df38f3-529f-4e72-ad41-ce9817ab8949
the2nake/foundry-high-stakes
src/subzerolib/api/control/boomerang.cpp
#include "subzerolib/api/control/boomerang.hpp" Boomerang::Boomerang(std::shared_ptr<TankChassis> ictrl, std::shared_ptr<Odometry> iodom, std::unique_ptr<Condition<double>> ipos_exit, std::unique_ptr<PIDF> id_pid, std::unique_ptr<PIDF>...
TOOL
0.98323
5.635203
1b43b296-0d48-4163-9563-e502f3586f40
FRC-Team-4143/RecycleRush2015
RecycleRushRobot/src/Commands/ScriptRotateByX.cpp
#include "ScriptRotateByX.h" #include "../Robot.h" #include <iostream> // ========================================================================== #define P 0.02 #define I (P/2.0) #define D (P/8.0) #define F 0.0 #define INPUT_MIN -180 #define INPUT_MAX 180 #define OUTPUT_MIN -0.75 #define OUTPUT_MAX 0.75 #defi...
TOOL
0.9676
6.260909
cb1bd3f9-e531-4512-9a2e-fb492b2dbecd
aastha64/60-Days-of-Code
nestedif.cpp
#include <iostream> using namespace std; int main(){ int b; cin>>b; if(b%2==0 && b%3==0){ cout<<"yes"<<endl; } else{ cout<<"no"<<endl; } return 0; }
ALGO
0.999876
3.755086
44b80209-46ed-4227-a0d3-3a8aac55aa88
AlaminPu1007/leet-code
Leet-Code/408. Insert Delete GetRandom O(1)/380_Insert_Delete_GetRandom_O(1).cpp
#include <bits/stdc++.h> using namespace std; class RandomizedSet { private: unordered_map<int, int> Map; vector<int> values; public: RandomizedSet() { } bool searchItem(int v) { if (Map.find(v) != Map.end()) return true; return false; } bool insert(in...
ALGO
0.999391
5.782908
f11f72a8-b734-4ec1-99f3-c7f692e0bf7b
vivCoding/practice
hammerwars2022/H.cpp
#include <bits/stdc++.h> using namespace std; template <typename... T> void see(T&... args) { ((cin >> args), ...); } template<typename... T> void put(T&&... args) { ((cout << args), ...);} template<typename... T> void puts(T&&... args) { ((cout << args << " "), ...);} template<typename... T> void putl(T&&... args) { (...
ALGO
0.999036
5.201909
4053d583-1803-4c6d-b438-c88be9511e66
JeonSH-Francesco/C-Plus-Plus-language
section2/no34/bubble_sort.cpp
#include <stdio.h> int main() { freopen("input.txt", "rt", stdin); int a[101], n, i, j, tmp; scanf("%d", &n); for(i=0; i<n; i++){ scanf("%d", &a[i]); } for(i=0;i<n-1;i++){ for(j=0;j<n-i-1;j++){ if(a[j]>a[j+1]){ tmp=a[j]; a[j]=a[j+1]; a[j+1]=tmp; } } } for(i=0; i<n; i++){ printf("%d ",...
ALGO
0.999994
3.581513
f65cbcd2-c275-4d66-8a22-b3e47afddd9c
ashishgautam01/Basic_Data_Structure_with_C
Stack_arr.cpp
//Stack with Arrays #include<iostream> using namespace std; #define MAX 4 int front = 0, size = 0; int ar[MAX]; void insrt(int elt){ if(size > MAX){ cout<<"OVERFLOW \n"; } else { front++; ar[front] = elt; size++; } } void delet(){ if(size > 0){ front--; size--; }else{ cout<<"Under Flow \n"; } ...
ALGO
0.998379
4.437232
87389045-9267-44ac-8a89-a604646d0461
AndanteKim/LeetCode_Practice
0123-best-time-to-buy-and-sell-stock-iii/0123-best-time-to-buy-and-sell-stock-iii.cpp
class Solution { public: int maxProfit(vector<int>& prices) { // Space-optimized dynamic programming int n = prices.size(); vector<int> prevDp(5); for (int i = n; i >= 0; --i){ vector<int> dp(5); for (int left = 0; left <= 4; ++left){ ...
ALGO
0.999913
6.207395
e283a875-080a-479a-9f81-d6e176e8da49
NabilaEusha/CSE_182
lab_exp_07/prac_04(1).cpp
#include <iostream> using namespace std; int main() { int n, i, j; cout << "Number of elements= "; cin >> n; cout << "Give " << n << " elements: "; int A[n]; for (i = 0; i < n; i++) { cin >> A[i]; } for (i = 0; i < n; i++) { int unique = 1; for (j = 0; j < n; j++) { if (i != j && A[i] == A[j]) ...
ALGO
0.999407
3.684417
4011cc80-91eb-44e2-a41b-4d6dbca06038
nashanas/tessa
src/main_functions.cpp
#include "main_functions.h" #include "main_externs.h" #include "timedata.h" bool IsFinalTx(const CTransaction& tx, int nBlockHeight, int64_t nBlockTime) { AssertLockHeld(cs_main); // Time based nLockTime implemented in 0.1.6 if (tx.nLockTime == 0) return true; if (nBlockHeight == 0) nBlockHeight = chainActive....
ALGO
0.948424
5.157351
8017597b-a1f2-4a6d-8e94-9bc5734924a4
ThePlehgroundProject/system_netd
resolv/res_stats.cpp
#define LOG_TAG "res_stats" #include <arpa/nameser.h> #include <stdbool.h> #include <string.h> #include <android-base/logging.h> #include "netd_resolv/stats.h" // Calculate the round-trip-time from start time t0 and end time t1. int _res_stats_calculate_rtt(const timespec* t1, const timespec* t0) { // Divide ns...
ALGO
0.962724
5.472292
f9f7f5d5-c953-4bf5-a782-2153d3a31205
denis-gubar/Leetcode
Depth-first Search/0112. Path Sum.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.999948
6.350581
414ffc16-9f30-4d04-818c-25775b03442f
yansputra/KODINGAN
smt3/bahasapemograman/pert10/n.cpp
#include <iostream> #include <string.h> #include <stdio.h> int main () { int i, muncul= 0 ; char Nama [100]; char cari ; printf("Masukan Nama= "); return (Nama) ; printf ("Masukan karakter yang dicari \n") ; scanf ("%c", &cari ); for (i=0; i<strlen(Nama); i++) { if(cari...
ALGO
0.998653
3.259434
5f94792d-6b04-4abb-95ea-0c0a14f6f083
SebastianGalanPK/JiPP2
Lab2/Zad3/main.cpp
#include <iostream> using namespace std; float srednia(int *a, int *b); void sortowanie(int *a,int *b,int *c, int *d, int *e); void wpisanie(int x, int *w); int main() { //Zad 1 //Do napisania jest program pobierający 2 liczby oraz ustawi wskaźniki //na ich adresach, a także obliczy ich średnią. Należy w...
ALGO
0.998815
3.232997
6f499224-3c34-4ee9-9c97-35d6fdb8dc63
cdesch/ECount
ECount/libs/Box2D/Dynamics/Contacts/b2TOISolver.cpp
#include <Box2D/Dynamics/Contacts/b2TOISolver.h> #include <Box2D/Dynamics/Contacts/b2Contact.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2Fixture.h> #include <Box2D/Common/b2StackAllocator.h> struct b2TOIConstraint { b2Vec2 localPoints[b2_maxManifoldPoints]; b2Vec2 localNormal; b2Vec2 localPoint...
ALGO
0.999827
6.739038
a19212b4-8615-4a5b-8d96-534ecc4ffb9d
petrhruby97/TBSfM
src/ext/PoissonRecon/SurfaceTrimmer.cpp
#include <stdio.h> #include <stdlib.h> #include <float.h> #ifdef _OPENMP #include <omp.h> #endif // _OPENMP #include <algorithm> #include "CmdLineParser.h" #include "Geometry.h" #include "Ply.h" #include "MAT.h" #include "MyTime.h" cmdLineString In( "in" ) , Out( "out" ); cmdLineInt Smooth( "smooth" , 5 ); cmdLineFloa...
ALGO
0.998824
6.324262
f5287493-69fa-491f-abd4-88bb37dd7587
OpenHUTB/engine_bak
Engine/Source/ThirdParty/ICU/icu4c-64_1/source/i18n/sortkey.cpp
//=============================================================================== // // File sortkey.cpp // // // // Created by: Helena Shih // // Modification History: // // Date Name Description // // 6/20/97 helena Java class name change. // 6/23/97 helena Added comments t...
TOOL
0.995306
6.212571
821017fd-ce94-498c-b2cd-63f84ecb2d2a
Sarang8/Leetcode_Problems
852-peak-index-in-a-mountain-array/852-peak-index-in-a-mountain-array.cpp
class Solution { public: int peakIndexInMountainArray(vector<int>& arr) { int n=arr.size(); int low=0; int high=n-1; while(low<=high){ int mid = low + (high-low)/2; if(mid>0 && mid<n-1){ if(a...
ALGO
0.999984
5.700578
9c99a4b3-747e-4410-b7ee-b93ba24aeebf
ishandutta2007/codeforces
greencis/normal/379/F.cpp
#pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("avx,avx2,fma,tune=native") #include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() using namespace std; using ll = int64_t; constexpr int DEPTH = 19; int up[1001001][DEPTH]; int h[1001001]; int n = 1; int diam = 0, diam_a = 0, diam_b = 0; inline in...
ALGO
0.999852
4.608194
71a2fe18-b73f-4267-81cc-4bdc501f2c6e
pvhoang27/c-plus
CPP0104 - tinh tong giai thua.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n ; cin >> n; long long sum = 0 ; long long gt = 1; for(int i = 1 ; i <= n; i++){ gt *= i; sum += gt; } cout << sum ; }
ALGO
0.999931
4.404256
8fe50fc8-d35f-4322-aab6-8d05f5a46597
mzl13/Lithium
Src/EB/AMReX_EB_LSCoreBase.cpp
#include <AMReX_Vector.H> #include <AMReX_AmrCore.H> #include <AMReX_ParallelDescriptor.H> #include <AMReX_ParmParse.H> #include <AMReX_MultiFabUtil.H> #include <AMReX_FillPatchUtil.H> #include <AMReX_PlotFileUtil.H> #include <AMReX_VisMF.H> #include <AMReX_PhysBCFunct.H> #include <AMReX_EB_utils.H> #include <AMReX_EB...
TOOL
0.975552
5.864697
73d2c32b-a121-43f6-aa53-32306d4a8944
YashikaSingh04/Aaps-Assignment
q34.cpp
#include<iostream> #include<unordered_map> #include<vector> using namespace std; int subarraySum(vector<int>& nums, int k) { unordered_map<int, int> mp; mp[0] = 1; int sum = 0, count = 0; for(int i = 0; i < nums.size(); i++) { sum += nums[i]; if(mp.find(sum - k) != mp.end()) ...
ALGO
0.99973
5.860806
416c0d87-1fdc-4e56-a261-df4fab169af4
manimaul/MXMapEngine
engine/src/main/cpp/mapbox/src/mbgl/util/tiny_sdf.cpp
#include <mbgl/util/tiny_sdf.hpp> #include <mbgl/util/math.hpp> #include <algorithm> namespace mbgl { namespace util { namespace tinysdf { static const double INF = 1e20; // 1D squared distance transform void edt1d(std::vector<double>& f, std::vector<double>& d, std::vector<int16_t>& v, ...
ALGO
0.998351
7.570408
ef1d26d5-39dd-4cfd-bf8d-d7938eca8e83
AdityaNivalkar1208/C-Tutorial
C++ Basic Solved Programs/20_Character_is_Vowel_or_Consonant.cpp
#include<iostream> using namespace std; int main() { char c; cout<<"Enter the character :: "; cin>>c; int isLowercase, isUppercase; isLowercase = (c=='a' || c=='e' || c=='i' || c=='o' || c=='u'); isUppercase = (c=='A' || c=='E' || c=='I' || c=='O' || c=='U'); ...
ALGO
0.997402
3.754249
0ffbe2b1-8b7f-4bad-845e-42e2c3a42212
tomkidd/VirtualBoyVR-iOS
Mednafen/mednafen/psx/notes/tristep.cpp
#include <stdio.h> #include <inttypes.h> #include <stdlib.h> typedef int8_t int8; typedef int16_t int16; typedef int32_t int32; typedef int64_t int64; typedef uint8_t uint8; typedef uint16_t uint16; typedef uint32_t uint32; typedef uint64_t uint64; #define INLINE inline static INLINE int64 MakePolyXFP(int32 x) { r...
TEST
0.94622
4.500062
d676220c-db11-44a9-933a-8f545d6d31a8
HyeonJuun/algorithm
프로그래머스/unrated/155651. 호텔 대실/호텔 대실.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; int checkTime[2000]; int solution(vector<vector<string>> book_time) { int answer = 0; for(int i=0; i<book_time.size(); i++) { int start_h = stoi(book_time[i][0].substr(0, 2)); int start_m = stoi(book_time[i][0]...
ALGO
0.999252
5.313652
bab30a2c-0015-4e25-863c-6a5e15ed719e
SOFTK2765/PS
BOJ/2225.cpp
#include <bits/stdc++.h> using namespace std; int dp[402][201]; int main() { int n, k; scanf("%d %d", &n, &k); for(int i=1;i<=n+k;i++) for(int j=1;j<=i;j++) if(j==1 || j==i) dp[i][j] = 1; else dp[i][j] = (dp[i-1][j-1]+dp[i-1][j])%1000000000; printf("%d", dp[n+k][k]); ...
ALGO
0.999918
3.80037
d79cef85-432b-4117-865c-967ffb7b65ef
ZihanYuanCN/C
0726-1004/0726-1004/main.cpp
#include <iostream> #include <string.h> #include <stdio.h> using namespace std; int m,n,T; int maze[55][55]; int sum; void red(int x,int y) { int i=x,j=y; sum++; if (x==n-1) { maze[x][y]--; return; } maze[x][y]--; while (i<n && j>=0 && j<m) { i++; j++; ...
ALGO
0.997961
3.671823
0c5a48dd-b346-4592-a8f5-01e90b9adfc6
Ziaeemehr/cpp_workshop
stroustrup/chapter08/chapter08_ex02.cpp
// Chapter 08, exercise 02: function that prints a vector<int> to cout // Exercise 03: create a vector of Fibonacci numbers, print them with function // from exercise 02 // Exercise 04: find approximation to maximum int value #include "../lib_files/std_lib_facilities.h" void print(const string& label, const vector<in...
ALGO
0.965009
4.700845
a6d5e743-94c4-4a01-98d4-c657d93a7477
MdShazidAlHasan/Template
Number Theory/gcdLcm.cpp
#include <bits/stdc++.h> #define ll long long #define all(x) x.begin(), x.end() using namespace std; // gcd using euclid's method int gcd(int a, int b){ if(a%b==0){ return b; } return gcd(b, a%b); } int main(){ cout<<gcd(18, 12)<<endl; cout<<12*18/(gcd(18, 12))<<endl; cout<<__gcd(12,1...
ALGO
0.999206
4.507071
6137d46e-a515-4d9c-899d-558bf4bd2071
anaselgarhy/Learning
CPP Projects/Barmej/Assignments/Q4/solution/Q_1.cpp
#include <iostream> using namespace std; int main() { int x1 = 3; int x2 = 5; int x3 = 1; int max = x1; if(x2 > max) max =x2; if(x3 > max) max = x3; cout << "Max value: " << max << "\n"; return 0; }
ALGO
0.999597
4.318929
8114ed60-c3ac-429f-91e4-387cee130146
mohammad-majoony/codeForces-submits
B. Ilya and Queries/main.cpp
#include<bits/stdc++.h> using namespace std ; int main(){ string text ; vector<int> count ; cin >> text ; int last = 0 , length ; count.push_back(last) ; for(int index = text.size() - 1 ; index >= 0 ; index--){ if(text[index] == text[index - 1]) last++ ; count.push_back(last) ; ...
ALGO
0.999481
4.137742
0b7488f5-d226-4eca-b245-259925c04e0b
ynonenull/Leetcode
Palindrome_Partitioning_AC_26ms_DP_DFS.cpp
#include <iostream> #include <vector> using namespace std; // https://oj.leetcode.com/problems/palindrome-partitioning/ class Solution { public: void print( vector<vector<string> > vv ) { for ( int i = 0; i < vv.size(); ++i ) { cout << "[ "; for ( int j = 0; j < vv[i].size(); ++j ) { // cout <<"\""<<vv[...
ALGO
0.999814
5.843102
c1c33a90-6bb9-46fe-8ac0-f1a5e5d3c0a3
llvm-pic/llvm-pic
mlir/lib/Transforms/CSE.cpp
#include "mlir/Transforms/CSE.h" #include "mlir/IR/Dominance.h" #include "mlir/IR/PatternMatch.h" #include "mlir/Interfaces/SideEffectInterfaces.h" #include "mlir/Pass/Pass.h" #include "mlir/Transforms/Passes.h" #include "llvm/ADT/DenseMapInfo.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/ScopedHashTable.h" #inc...
ALGO
0.976138
7.694883
caaf766e-f8c1-40dc-a36e-3a348c7ff405
qiaozishun4/CSP2024_BJ
BJ-Junior/answers/BJ-J00696/chain/chain.cpp
#include<bits/stdc++.h> using namespace std; int n,t,k,q; int main(){ freopen("chain.in","r",stdin); freopen("chain.out","w",stdout); cin>>t; while(t--){ cin>>n>>k>>q; for(int i=1;i<=q;i++) cout<<"1"<<endl; } return 0; }
ALGO
0.999115
3.031236
84b13164-f92a-4824-9eb5-730732425c97
abelkm99/competitive_programming
topics/sorting/merge-sort.cpp
#include <bits/stdc++.h> #define ll long long #define pb push_back using namespace std; void merge(vector<int> &arr, int p1, int p2, int p1_max, int p2_max) { vector<int> temp; int start = p1; // cout << "------------starting merge----------" << endl; // cout << p1 << " " << p1_max << " " << p2 << " " << p2_ma...
ALGO
0.999968
4.410017
ed945088-42cc-4793-ae66-d4ae2423513d
OrangBiasa29/Tugas-praktikum
Pertemuan 5/Tugas/5_no.1/5_no.1.cpp
#include <iostream> #include <vector> #include <string> using namespace std; int main() { vector<string> angka; for (int i=1; i<=100; i++) { if (i % 5 == 0 && i % 3 == 0) angka.push_back ("FizzBuzz"); else if (i % 5 == 0) { angka.push_back ("Buzz"); } else if (i % 3 == 0) { angka.push_back("Fizz")...
TOOL
0.993044
4.59585
5eb93111-e35c-46b2-a4f9-cf3f8844f9dd
muhammadhasan01/cp
Online Judge/Codeforces/Contests/DIV1+DIV2/pinely-round-3/D.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; long long k; cin >> n >> k; vector<long long> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); if (a[0] == a[n - 1]) { cout << 0 << '\n'; return; } long long ...
ALGO
0.999902
4.247902
e731783f-8164-42de-bb5f-a868230f7bc2
iamsank7/Codeforces-solutions
217A.cpp
#include<bits/stdc++.h> #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector<vi> #define vvl vector<vll> #define pb push_back #define mp make_pair #define pii pair<int,int> #define pll pair<ll,ll> #define vpii vector<pii > #define vpll vector<pll > #define ff first #define ss secon...
ALGO
0.999545
4.131429
90dfe48d-ea58-4193-8bde-5f3984be2262
120910383/mota
Classes/utils.cpp
/********************************************* Author: Zhang Hao GitHub: https://github.com/120910383/mota *********************************************/ #include "utils.h" using namespace std; string utils::replace_str(const string & origin, const string & old, const string & value) { auto result = origin; ...
TOOL
0.90714
4.847022
79984d44-fd7c-4779-a439-7f1fb568711e
kekke-gk/AtCoder
abc124/d.cpp
#include <bits/stdc++.h> #define INF (1e9) using namespace std; int main() { int N, K; char S[100000] = {0}; int L[200001] = {0}; cin >> N >> K; cin >> S; int idx = 1; int cnt = 1; char prev = S[0]; for (int i = 1; i < N; i++) { if(prev == S[i]){ cnt++; ...
ALGO
0.999844
4.207964
5c47fd46-4286-4bba-a66a-2095e1ebca36
yayangkim/BTC
src/wallet/rpc/util.cpp
#include <wallet/rpc/util.h> #include <common/url.h> #include <rpc/util.h> #include <util/system.h> #include <util/translation.h> #include <wallet/context.h> #include <wallet/wallet.h> #include <univalue.h> #include <boost/date_time/posix_time/posix_time.hpp> namespace wallet { static const std::string WALLET_ENDPO...
TOOL
0.879019
7.463172
0a844c55-a54f-4b24-b284-4270e471d2b6
bdsadeq/uva-problem-solutions
Accepted (386)/V-3 (22)/389.cpp
//Basically speaking (#389) //Sadeq #include<stdio.h> #include<string.h> #include<math.h> long to_dec(char in[],long b); int output(long dec,long b); int main() { char in[100]; long out,b, dec; while(scanf("%s %ld %ld",&in,&b,&out)==3) { //conert to decimal dec=to_dec(in,b); //call output function outp...
ALGO
0.998937
3.468123
2b8d62d7-6ae7-44b3-a165-7e94fe6eb72a
openucx/ODOS
clang-tools-extra/clang-tidy/ClangTidy.cpp
#include "ClangTidy.h" #include "ClangTidyCheck.h" #include "ClangTidyDiagnosticConsumer.h" #include "ClangTidyModuleRegistry.h" #include "ClangTidyProfiling.h" #include "ExpandModularHeadersPPCallbacks.h" #include "clang-tidy-config.h" #include "clang/AST/ASTConsumer.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #i...
TOOL
0.910087
3.51267
887b2b1a-7ded-46e8-919d-95387d90a7e6
holleland/VariabilityOnSvalbard
Cpp/t_GARCH_with_covariates.cpp
#include <TMB.hpp> #define _USE_MATH_DEFINES #include<cmath> template<class Type> Type objective_function<Type>::operator() () { DATA_VECTOR(x); //DATA_VECTOR(co2); DATA_MATRIX(M); DATA_SCALAR(init); //DATA_VECTOR(logadjust); // PARAMETER(kappa); PARAMETER(v); PARAMETER(omega); PARAMETER_VEC...
ALGO
0.999786
4.792946
8b95fa37-5084-48e9-89d3-f8053444ff57
kamimrcht/kMILL
src/readAndSortInputFile.cpp
#include <fstream> #include <cstring> #include <iostream> #include <vector> #include <algorithm> #include "readAndSortInputFile.h" #include "compaction.h" #include "utils.h" using namespace std; hash<string> readHash; uint64_t transformStringToHash(const string& read){ return readHash(read); } /* create buckets to...
DATA
0.974067
4.635029
ccab2078-bd9f-4b8f-9cb7-144f51d3e9aa
adrian-bl-hox-jb/android_frameworks_native
libs/utils/BasicHashtable.cpp
#define LOG_TAG "BasicHashtable" #include <math.h> #include <utils/Log.h> #include <utils/BasicHashtable.h> #include <utils/misc.h> namespace android { BasicHashtableImpl::BasicHashtableImpl(size_t entrySize, bool hasTrivialDestructor, size_t minimumInitialCapacity, float loadFactor) : mBucketSize(e...
ALGO
0.894439
6.567938
506f0c74-9144-48cb-acbf-37159e1150d2
ishandutta2007/codeforces
redant/normal/159/C.cpp
/*AnilKishore*India*/ #include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <iostream> #include <algorithm> #include <string> #include <vector> #include <set> #include <map> #include <queue> using namespace std; typedef long long LL; typedef vector<int> VI; typedef pair<int,int> PI; #d...
ALGO
0.999971
3.00702
a84fcc8b-6f12-4210-8f8d-b579ebb5d8b5
BelaPlatform/bela-online-course
code-examples/midi-pitchwheel/ExponentialSegment.cpp
/* ____ _____ _ _ | __ )| ____| | / \ | _ \| _| | | / _ \ | |_) | |___| |___ / ___ \ |____/|_____|_____/_/ \_\ http://bela.io C++ Real-Time Audio Programming with Bela - Lecture 16: MIDI part 2 */ // ExponentialSegment.cpp: an exponential segment generator #include <cmath> #include "...
ALGO
0.995516
5.857852
285ff248-70a5-4509-a705-d627c7a2ad66
cesarcortes12/cubit_bloc_formz
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
abaf647f-a9a5-4c8e-9da7-1ca4e8eec4ce
shinjbin/algorithm
programmers/카카오_캐시.cpp
#include <string> #include <vector> #include <deque> #include <iostream> #include <algorithm> using namespace std; bool find_cache(deque<string> &cache, int cacheSize, string city) { deque<string> deq; while (!cache.empty()) { string temp = cache.front(); cache.pop_front(); if (te...
ALGO
0.99958
5.033936
c34994e7-cff6-42c1-9e8a-a6251f556184
ProtonBlockchain/Proton
src/messagesigner.cpp
#include "base58.h" #include "hash.h" #include "messagesigner.h" #include "tinyformat.h" #include "util.h" #include "utilstrencodings.h" const std::string strMessageMagic = "DarkNet Signed Message:\n"; bool CMessageSigner::GetKeysFromSecret(const std::string& strSecret, CKey& keyRet, CPubKey& pubkeyRet) { keyRet ...
TOOL
0.925393
6.847014
8e762b2d-149e-47b1-aead-a23a12abe155
Yogesh9389/GFGAmazonSeries
K-th element of two sorted Arrays.cpp
class Solution{ public: int kthElement(int arr1[], int arr2[], int n, int m, int k) { int ans = 0; vector<int> v; for(int i=0;i<n; i++){ v.push_back(arr1[i]); } for(int i=0; i<m; i++) { v.push_back(arr2[i]); } sort(v.beg...
ALGO
0.999982
4.444899
a35024e1-121f-46b9-8d2f-dba5d383b775
shashank23088/dsa
array/pow_xn/brute.cpp
// T(N) = O(N) // S(N) = O(1) #include <bits/stdc++.h> using namespace std; double myPow(double& x, int n) { double result = 1.0; for (int i = 0; i < n; i++) { result *= x; } return result; } int main() { double x = 2.00000; int n = 10; cout << myPow(x, n) << endl; return 0;...
ALGO
0.999849
4.848816
94df4722-c5e3-4d06-8a54-9a5f9db142f5
kaus98/Coding-Practice
Leetcode/Arrays/Coin Change Problem.322.Medium.cpp
#include <iostream> #include <vector> #include <stack> #include <utility> using namespace std; class Solution { public: int coinChange(vector<int>& coins, int amount) { long arr[amount+1]; for (int i=0; i <= amount; i++){ arr[i] = INT_MAX-1; } arr[0] = 0; fo...
ALGO
0.999793
5.517767
c3773c53-4515-4602-9f3a-abcafe911738
ishandutta2007/codeforces
rubikun/normal/1580/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; } #define all(x) (x).begin(),(x).end() #define fi first #define ...
ALGO
0.999817
3.968944
09976d34-e504-40f8-bf67-a68389e4e734
Kantavit/flutter-quick-start
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
b1c054b3-f4d9-44f6-9b4f-ecc2e4e326dd
mgorbachyov/leetcode
438-all-anagrams-in-string.cpp
#include <cstdio> #include <string> #include <vector> #include <cstring> using namespace std; static vector<int> findAnagrams(string s, string p) { if (p.size() > s.size()) { return {}; } char p_freqs[26] = { 0 }; char freqs[26] = { 0 }; for (auto i = 0; i < p.size(); ++i) { p_fr...
ALGO
0.999821
5.065776