uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
5367ea89-b102-4a1c-982a-077825cfe561
sarvex/leetcode-idris
solution/0500-0599/0598.Range Addition II/Solution.cpp
class Solution { public: int maxCount(int m, int n, vector<vector<int>>& ops) { for (auto op : ops) { m = min(m, op[0]); n = min(n, op[1]); } return m * n; } };
ALGO
0.999686
6.455107
16172ef6-bf78-4fad-93fc-4b426e9bb2ed
Sirotenkov/Module_15.9_Mod_Chat
sha1.cpp
#include "sha1.h" #include <string.h> uint cycle_shift_left(uint val, int bit_count) { return (val << bit_count | val >> (32 - bit_count)); } uint bring_to_human_view(uint val) { return ((val & 0x000000FF) << 24) | ((val & 0x0000FF00) << 8) | ((val & 0x00FF0000) >> 8) | ((val & 0xFF00...
ALGO
0.992452
4.524941
a8a280dd-a85c-441c-b2cf-10a3bab0bdd3
fmsdwifull/c-plus
boost/src/boost_1_66_0/libs/compute/perf/perf_sort_by_key.cpp
#include <algorithm> #include <iostream> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/sort_by_key.hpp> #include <boost/compute/algorithm/is_sorted.hpp> #include <boost/compute/container/vector.hpp> #include <boost/compute/types/fundamental.hpp> #include "perf.hpp" int main(...
ALGO
0.998521
5.417242
d7439d9f-3670-497e-8c19-df4a3087d7a9
Bessawy/Algorithms-ToolBox
week6_dynamic_programming2/2_partitioning_souvenirs/partition3.cpp
#include <iostream> #include <vector> using std::vector; int partition3(vector<int> &A) { //write your code here return 0; } int main() { int n; std::cin >> n; vector<int> A(n); for (size_t i = 0; i < A.size(); ++i) { std::cin >> A[i]; } std::cout << partition3(A) << '\n'; }
ALGO
0.99997
4.41309
7a9af875-0dc9-40be-8e5b-7189186c732e
TDexterMorse/AnadrosPilotMD
Gromacs_Head/Gromacs_Base/gromacs-2024.1/src/gromacs/mdlib/tgroup.cpp
/* This file is completely threadsafe - keep it that way! */ #include "gmxpre.h" #include "tgroup.h" #include "gromacs/math/vec.h" #include "gromacs/mdlib/coupling.h" #include "gromacs/mdtypes/group.h" #include "gromacs/mdtypes/inputrec.h" real sum_ekin(const t_grpopts* opts, gmx_ekindata_t* ekind, real* dekindlambd...
ALGO
0.998799
5.935899
3c79b4dc-5442-4c4f-807a-d411e27fc674
weurany/OpenCv
Chapter4_StructureFromMotion/Common.cpp
#include "Common.h" #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <iostream> #ifndef WIN32 #include <dirent.h> #endif using namespace std; using namespace cv; std::vector<cv::DMatch> FlipMatches(const std::vector<cv::DMatch>& matches) { std::vector<cv::DMatch> flip; for(in...
TOOL
0.934124
4.489476
912889c5-0408-44f1-8734-73e369887c4f
BalakumarR02/CP
cf#758/A.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; ll mod = 1e9 + 7; void solve() { ll n, i, t = 2; cin >> n; for (i = 0; i < n; i++) { cout << t << " "; t++; } cout << endl; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll t; ...
ALGO
0.999611
4.298964
5761c9da-94c0-409c-a845-709d66ee6083
Sdaddy11/shpilot
selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_qpoases_interface.cpp
extern "C" { #include "acado_common.h" } #include "INCLUDE/QProblem.hpp" #if ACADO_COMPUTE_COVARIANCE_MATRIX == 1 #include "INCLUDE/EXTRAS/SolutionAnalysis.hpp" #endif /* ACADO_COMPUTE_COVARIANCE_MATRIX */ static int acado_nWSR; #if ACADO_COMPUTE_COVARIANCE_MATRIX == 1 static SolutionAnalysis acado_sa; #endif /* AC...
ALGO
0.99893
5.070384
d8453c69-fa5c-48e5-8b58-45e1893b6838
Ich-Melin/c-primerplus
c++plus/section_six/text/2.cpp
#include<iostream> #include<array> using namespace std; const int ArSize = 16; int main() { array<long double,ArSize> arr; arr[1] = arr[0] = 1LL; for(int i = 2; i <= 100; i++) arr[i] = i * arr[i-1]; for(int i = 0; i <= 100; i++) cout << i << "!= " << arr...
ALGO
0.99167
3.33802
524f5ef9-5051-4e73-bf5e-8c658393c5ee
MohamadAshrafSalama/User-Stories-generation
Code_Snippets/111-120/s811837000.cpp
#include <bits/stdc++.h> const double PI = 3.14159265358979323846; using namespace std; typedef long long ll; const double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) //#define rep(i, n) for (ll i = 0; i < (n); ++i) //typedef pair<ll, ll> P; typedef pair<ll, ll> P; const ll INF = 10e17; #define cmin(x,...
ALGO
0.999436
4.151526
f858e044-9940-49b8-b366-a7c107e5edee
raincross7/code-similarity
codes/train_code/problem456/problem456_102.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) typedef long long ll; typedef pair<int, int> pii; int main() { int n; cin >> n; vector<int> a(n); vector<int> vec(n); rep(i,n){ cin >> a.at(i); vec.at(a.at(i)-1) = i+1; } rep(i, n){ ...
ALGO
0.999924
3.899557
951db602-e77d-46b8-bd0a-f13d773dfa1b
sulmone/Irrlicht
examples/07.Collision/main.cpp
/** Example 007 Collision We will describe 2 methods: Automatic collision detection for moving through 3d worlds with stair climbing and sliding, and manual scene node and triangle picking using a ray. In this case, we will use a ray coming out from the camera, but you can use any ray. To start, we take the program ...
TOOL
0.950991
3.216288
acf6dcbb-8664-4efd-a7c3-1c010044650f
Gund100/Development-3
Program221.cpp
#include<iostream> using namespace std; void Swap(char *p , char *q) { char temp; temp = *p; *p = *q; *q = temp; } int main() { char x = '\0', y = '\0'; cout<<"Enter first number\n"; cin>>x; cout<<"Enter second number\n"; cin>>y; Swap(&x, &y); // Swap(100,...
ALGO
0.99467
3.847149
bf51c679-b1f7-42a7-a54c-989cc9e13b99
Saurabh-Tripathi11/habit_tracker_1
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
30dbd5eb-c464-4605-9f5e-93282e9e8c3f
Jyunpp/Algorithm
acmicpc.net February 2018/20180216/2644.cpp
//20180216 20:38 ~ 20:43 #include <iostream> #include <vector> #include <queue> using namespace std; #define xx first; #define yy second; int n, x, y, m; vector<int> arr[101]; int visited[101]; queue<pair<int, int>> q; int main(){ cin>>n>>x>>y>>m; for(int i=1, a, b; i<=m; i++){ cin>>a>>b; arr...
ALGO
0.999985
3.981226
460665c8-5915-420d-ba37-0024010c328e
odanado/Procon
AOJ/Volume23/AOJ2311.cpp
#include <algorithm> #include <functional> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <sstream> #include <iostream> #include <iomanip> #include <vector> #include <list> #include <stack> #include <queue> #include <map> #include <set> #include <bitset> #include <cl...
ALGO
0.999724
4.362648
c586fda2-8a0c-4528-bb1e-217d3ae8b864
MapleSystem/secure-c
libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/default.pass.cpp
// UNSUPPORTED: c++98, c++03, c++11, c++14 // XFAIL: c++17, c++2a // <functional> // boyer_moore_horspool searcher // template<class RandomAccessIterator1, // class Hash = hash<typename iterator_traits<RandomAccessIterator1>::value_type>, // class BinaryPredicate = equal_to<>> // class boyer_moore_h...
TEST
0.882017
6.56053
73ecf81f-3cb9-42de-898a-ad424dac0819
SongRb/OnlineJudge
SJTU/SJTU 1038.cpp
#include <iostream> using namespace std; struct Node { int num = 0; Node *next; Node(int n, Node *p) : num(n), next(p) { } }; int main() { int killNum[10000]; Node *head = new Node(0, NULL); int numMonkey = 0; cin >> numMonkey; head->next = new Node(1, NULL); Node *p...
ALGO
0.999931
3.209119
b4bc647e-36bb-49de-9d72-70c3857dcf10
httpe/simple-gcc
libsanitizer/tsan/tsan_md5.cpp
namespace __tsan { #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) #define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y)))) #define H(x, y, z) ((x) ^ (y) ^ (z)) #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define STEP(f, a, b, c, d, x, t, s) \ (a) += f((b), (c), (d)) + (x) + (t); \ (a) = (((a) << (s)) | (((a...
ALGO
0.996757
6.849437
7f2f9dab-9031-406d-a82b-41c28a983c94
orcun-gokbulut/ze-externals-sources
Source/libCryptopp/Source/eccrypto.cpp
// eccrypto.cpp - written and placed in the public domain by Wei Dai #include "pch.h" #ifndef CRYPTOPP_IMPORTS #include "eccrypto.h" #include "nbtheory.h" #include "oids.h" #include "hex.h" #include "argnames.h" #include "ec2n.h" NAMESPACE_BEGIN(CryptoPP) #if 0 static void ECDSA_TestInstantiations() { ECDSA<EC2N>...
TOOL
0.942219
6.362315
268007cc-0a48-477b-a2aa-8a49ee517f81
snehah7/Cpp-for-Game-Developers
Module 3/C++GameDevelopmentCookbook_Code/Chapter9/Source/bullet3-2.83.7/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
///btBox2dBox2dCollisionAlgorithm, with modified b2CollidePolygons routines from the Box2D library. ///The modifications include: switching from b2Vec to btVector3, redefinition of b2Dot, b2Cross #include "btBox2dBox2dCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "...
ALGO
0.999282
6.792475
fb977acd-98ef-40da-bddd-209f49b48e8f
ShantanuMapari17/DSA
STL/stud_marks.cpp
#include<bits/stdc++.h> using namespace std; int main() { map<int, multiset<string>> m; int n; cin>>n; for(int i=0;i<n;i++){ int marks; string name; cin>>name >> marks; m[marks].insert(name); } auto it=--m.end(); while(1){ for(auto &name:it->second){ cout<<name <<" "<< it->first<<endl; } if(it...
ALGO
0.998621
3.972872
21b8d96a-95f9-404a-9f06-8402fc75fcb1
astrophor/projects
algorithm/9du/1384_my.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <limits.h> #include <stdio.h> using namespace std; int a[1010][1010]; int n = 0; int m = 0; int num = 0; bool find_row(int row, int left, int right) { int mid = 0; while(left <= right) { mid = (left + right) / 2; ...
ALGO
0.999996
3.849042
9df43316-e957-4500-b9b1-ac499d87ff9f
radiolinkW/ArduPilot-RL
libraries/AP_CheckFirmware/monocypher.cpp
#include "monocypher.h" // we don't need Argon2 #define MONOCYPHER_ARGON2_ENABLE 0 // we want the bootloader to be as small as possible #define BLAKE2_NO_UNROLLING 1 ///////////////// /// Utilities /// ///////////////// #define FOR_T(type, i0, start, end) for (type i0 = (start); i0 < (end); i0++) #define FOR(i1, sta...
TOOL
0.906578
5.062368
dd6ccd73-bddd-4a06-ac02-e24968a320ea
DecimatorMind/Code-Chef-CPP-Answers
Code Chef C++ Answers/CHN09.cpp
#include <iostream> using namespace std; int chn09(){ int iter; cin >> iter; for(int i = 0; i<iter;i++){ string s; int a = 0,b = 0; cin >> s; for(char c : s){ if(c == 'a'){ a += 1; } else { b += 1; } ...
ALGO
0.999073
3.926569
ac79d45a-2402-491b-93a1-716d094baacc
PedroDev-sketch/Competitive_Programming
OBI-UnB/soma.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n; int k; cin >> n >> k; vector<int> x(n); for(int i = 0; i < n; i++) { cin >> x[i]; } map<int, int> prefixSum; int sum = 0; ll count = 0; prefixSum[0] = 1; for(int i = 0; i < n...
ALGO
0.999903
4.520187
6dd9a2a6-fc58-49d2-b241-c59f74c3b02e
ravibhushankumarsonu/Competitive-Programming
HackerRank/Algorithms/Bit-Manipulation/Lonely_Integer.cpp
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <assert.h> int lonelyinteger(int a_size, int* a) { int flag=1,i,k; for(i=0;i<a_size;i++) { flag=1; for(k=0;k<a_size;k++) { if(i != k && a[i] == a[k]) { flag=0; ...
ALGO
0.999316
3.538105
7739b9a8-0f60-4223-804d-04c01c0e1f07
skullquake/cppsamples
src/str_chr_for_each_lambda/src/a.cpp
/* * call lambda on each char */ #include<iostream> #include<algorithm> #include<algorithm> int main(int argc,char** argv){ std::string data="Lorem ipsum sit consecutar dolor amet"; std::cout<<data<<std::endl; char prv=data[0]; std::for_each(data.begin(),data.end(),[&](char&c){ if(c!=' '&&prv==' '){ std::c...
ALGO
0.938763
4.413546
0d782677-6e77-41e4-852b-ed632dba0501
geekyabhi/code-snippets
graph/connectedComponent.cpp
#include<iostream> #include<vector> #include<stack> #include<algorithm> #include<math.h> #include<unordered_map> using namespace std; void print(vector<vector<int>>a){ for(auto i:a){ for(auto j:i) cout<<j<<" "; cout<<"\n"; } cout<<"\n"; } void print(stack<int>st){ while(st.size()){ ...
ALGO
0.999996
4.953454
a2613d2a-4c7a-40eb-bb70-c5d86bc49b06
HouJun11220033/KingRoad
题目1441:人见人爱 A ^ B.cpp
#include<stdio.h> using namespace std; int main(){ int a,b; while(scanf("%d%d",&a,&b)!=EOF && a!=0 && b!=0) { int ans=1; while(b!=0) { //Ҳ˵ӦλΪ1 if(b%2==1) { ans*=a; ans%=1000; } a*=a; a%=1000; b/=2; } printf("%d\n",ans); } return 0; }
ALGO
0.999963
3.129472
77d3ec6e-fe1f-4a2b-a557-a55856de8d95
Kamna16/DSA-codes
searching/BinarySearch/ModifiedBS/SearchinRotatedSortedArray.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int findPivot(vector<int>& nums) { int start = 0; int end= nums.size()-1; while(start <= end) { int mid = start +(end - start)/2; // 4 cases if(mid < end && nums[mid] > nums...
ALGO
0.999999
5.923553
9bf3b671-f5f7-4ad2-bdd2-91479b353993
vedanty3/dsa-codeground
dsa/string/prefixes.cpp
#include <bits/stdc++.h> using namespace std; void prefixes(char array[]) { for (int e = 0; e < strlen(array); e++) // for (int e = 0; array[e] != '\0'; e++) { for (int s = 0; s <= e; s++) { cout << array[s]; } cout << endl; } } int main() { char array[100] ...
ALGO
0.999734
3.451893
f3887069-d296-4f83-a347-993e4420b706
jingyuan4ever/LeetCode
3Sum Closest.cpp
#include <vector> #include <algorithm> using namespace std; class Solution { public: int threeSumClosest(vector<int> &num, int target) { int ret=0; int gap=INT_MAX; sort(num.begin(), num.end()); for(int i=0;i<num.size()-2;){ int a=num[i]; int remain=target-a; ...
ALGO
0.999998
5.734026
38744c25-b7f3-4086-b33a-f9f8c87727b6
ishandutta2007/codeforces
burnoutag7/normal/1313/A.cpp
#include<bits/stdc++.h> using namespace std; int t,r[3],a,b,c,ans; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin>>t; while(t--){ cin>>r[0]>>r[1]>>r[2]; sort(r,r+3); a=r[2];b=r[1];c=r[0]; ans=0; if(a){a--;ans++;} if(b){b--;an...
ALGO
0.999956
4.671798
1570f425-d480-47f1-94fb-53d960a6014e
bolatov/leetcode
0209_minimum-size-subarray-sum.cpp
class Solution { public: int minSubArrayLen(int s, vector<int>& nums) { if (nums.empty()) return 0; int n = nums.size(); vector<long long> vll(n, nums[0]); for (int i = 1; i < n; i++) { vll[i] = vll[i - 1] + nums[i]; } if (vll[n - 1] < s) return 0; ...
ALGO
0.99997
6.048556
2a1be81f-8225-47ca-ac3e-2f018e9efc2c
ChaosExplorer/Machine-Net-Alg
Leetcode/LinkedList_palindrome.cpp
#include <iostream> #include <vector> #include "ctimer.h" using namespace std; using std::vector; 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) {} }; cl...
ALGO
0.999932
4.920063
6833f14f-78e6-4151-80b3-b035228d2ae0
DrZhang818/my-first-project
Problems/Codeforces/Contests/Round1006/B.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; typedef pair<int,int> PII; void solve() { ll n; cin >> n; string s; cin >> s; ll c0 = 0, c1 = 0; for(int i = 0; i < s.size(); i++) { if(s[i] == '_') { c1++; } else { c0...
ALGO
0.999899
3.676281
d0d598ac-dc87-42f7-9394-9978723ba27f
jash139/codechef-solutions
FALSNUM.cpp
#include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t; for (cin>>t; t--;) { string num; cin>>num; int n = num[0]; if (n == '1') { cout<<num[0]<<"0"<<num.substr(1, num.length())<<"\n"; } else { cout<<'1'<<num<<"\n"; } }...
ALGO
0.999943
4.030046
6e71c178-a6a5-40df-b944-ab2d52d9f5ad
windcry1/My-ACM-ICPC
CCF-CSP/201509-2.cpp
//Author:LanceYu #include<iostream> #include<string> #include<cstring> #include<cstdio> #include<fstream> #include<iosfwd> #include<vector> #include<cstdlib> #include<queue> #include<set> #include<ctime> #include<algorithm> #include<complex> #include<cmath> #include<array> #include<valarray> #include<bitset> #define ll...
ALGO
0.99976
3.546782
703361f5-26ed-4036-86a3-92bd87bbe5ec
Yash-Singh1/competitive-programming
geeksforgeeks/check-whether-k-th-bit-is-set-or-not-1587115620/main.cpp
class Solution { public: // Function to check if Kth bit is set or not. bool checkKthBit(int n, int k) { return ((n >> k) & 1) == 1; } };
ALGO
0.996755
5.746177
ccdad141-e6ea-49eb-94f8-f999f5ebfc2d
nervmor/pdf_hit_detector
code/third/boost_1_58_0/libs/graph/test/relaxed_heap_test.cpp
// Authors: Douglas Gregor // Andrew Lumsdaine #ifndef BOOST_RELAXED_HEAP_DEBUG # define BOOST_RELAXED_HEAP_DEBUG 0 #endif #include <boost/pending/relaxed_heap.hpp> #include <boost/test/minimal.hpp> #include <utility> #include <iostream> #include <vector> #include <boost/optional.hpp> #include <boost/rando...
TEST
0.930389
5.808639
8e882877-b203-4093-b1ca-dc5a0118b4b7
Kawser-nerd/CLCDSA
Source Codes/AtCoder/agc017/B/4717217.cpp
#include <iostream> #include <algorithm> #include <bitset> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <cstring> #include <utility> #include <vector> #include <complex> #include <valarray> #include <fstream> #include <cassert> #include <cmath> #include <functional> #includ...
ALGO
0.999964
3.609052
49b6ed42-4027-4b93-badb-95bc5c47a811
pranav-sivaraman/code-diff
benchmarks/xor_contains/xor_contains.cpp
#include <benchmark/benchmark.h> #include <algorithm> #include <random> #include <vector> bool xor_contains_native(const std::vector<int> &x, const std::vector<int> &y, int val) { bool found_in_x = false; bool found_in_y = false; for (const auto &num : x) { if (num == val) { ...
TEST
0.925042
7.260479
cbe06600-f166-402e-a27d-3770d8e79a35
mahajanyashtushar/Competitive-programming-c-programming-language
Program205.cpp
#include<iostream> using namespace std; class DigitX { public: int iNo; DigitX() { iNo = 0; } DigitX(int i) { iNo = i; } }; int main() { int iValue = 0; cout<<"Please enter number : "<<"\n"; cin>>iValue; DigitX o...
TOOL
0.986949
3.462233
1a59ca90-e8c8-4a48-b68d-a53827b604a1
burungiu/mps
views/cod.cpp
#include <iostream> #include <math.h> class Point { private: int x, y; public: Point(int a, int b) { this->x = a; this->y = b; } static float distance(Point first, Point second) { return sqrt(pow(first.x - second.x, 2) + pow(second.y - first.y, 2)); } }; class math { public: static int suma(int a, ...
ALGO
0.939403
4.05325
d45eba0e-0e68-4b38-a24a-0b61c760e085
hugo-maker/monkai-algorithm-and-data-structure
chapter14/code14_03.cpp
#include <iostream> #include <vector> using namespace std; const long long INF = 1LL << 60; struct Edge { int to; long long w; Edge(int to, long long w) : to(to), w(w) {} }; using Graph = vector<vector<Edge>>; template <class T> bool chmin(T & a, T b) { if (a > b) { a = b; return true; } retur...
ALGO
0.999959
4.058521
c2cf1650-2d81-4b85-bdb0-c3c04e02c42b
Jollu8/Yandex-tasks
yandex30/divisionA/a3.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { int n, k; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } cin >> k; vector<int> jollu(k); for (int i = 0; i < k; i++) { cin >> jollu[i]; } sort(a...
ALGO
0.999947
4.691107
732e3e60-cfd8-4765-96a2-1798ba210785
PoorvaBhalerao/Practice-Programs
program464.cpp
//Queue //Constructor, Count, Display, EnQueue, DeQueue // void EnQueue(T No); // Just like InsertLast() from SLL // int DeQueue(); // Just like DeleteFirst() from SLL //Generic Queue //node to nodeQ #include<iostream> using namespace std; template <class T> struct nodeQ { int data; struct nodeQ *ne...
ALGO
0.96951
4.204742
e80eb701-ba46-454f-a218-24b92990d928
AnurajKat/ME_Stuff
rsa.cpp
#include <iostream> #include <string> #include <cstdlib> #include <cstdint> #include <cmath> long gcd(long a, long h) { long temp; while (1) { temp = a%h; if (temp == 0) return h; a = h; h = temp; } } //find number which are relatively prime to number "no1" long find_co_prime(...
ALGO
0.999775
4.080174
05f58f95-c516-4317-aa5b-fa140fba7546
Hima0X2/codeforces
1047A.cpp
#include<bits/stdc++.h> using namespace std; int main() { long long int n; cin>>n; if((n-2)%3==0){ cout<<"1 2 "<<(n-3)<<endl; } else{ cout<<"1 1 "<<(n-2)<<endl; } }
ALGO
0.99986
3.226579
aec718e7-5fec-4e10-8698-e493ee7af160
ssk4988/Coding
UCFPT/230701/d.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); i++) #define all(x) begin(x), end(x) #define sz(x) (int) (x).size() using ll = long long; using pi = pair<int, int>; using vi = vector<int>; #define f first #define s second const ll MOD = 1e9 + 7; ll mod(ll k) { return k %...
ALGO
0.999847
4.312418
9b635765-606f-4d45-ac6b-e6a3ccf0f905
ishandutta2007/codeforces
bench0310/normal/4/A.cpp
#include <iostream> using namespace std; int main() { int w; cin>>w; if(w==2||w&1) cout<<"NO"<<endl; else cout<<"YES"<<endl; return 0; }
ALGO
0.998683
3.253606
585ccae2-fe6b-4989-b898-6cd38b4d30e0
sarvex/leetcode-swift
solution/0600-0699/0648.Replace Words/Solution.cpp
class Trie { public: vector<Trie*> children; string v; Trie() : children(26) , v("") {} void insert(string word) { Trie* node = this; for (char c : word) { c -= 'a'; if (!node->children[c]) node->children[c] = new Trie(); node = node->...
ALGO
0.999979
6.291574
7c97a558-12b4-4ca0-aca9-89ef75f19be4
Ryexocious/problemsolving
iutindividual24s(3)/katisextra.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vec; typedef map<string,int> mp; #define cy cout<<"YES"<<endl; #define cn cout<<"NO"<<endl; #define all(x) (x).begin(), (x).end() #define fast ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define pb push_back #define pob...
ALGO
0.998492
3.875995
7c3836b7-2853-4112-82e1-c4a0b24e38ea
n1ckfg/latk_ml_003
SynDraw/SynDraw/libigl/include/igl/cr_vector_mass.cpp
#include <vector> #include "orient_halfedges.h" #include "doublearea.h" #include "squared_edge_lengths.h" template <typename DerivedV, typename DerivedF, typename DerivedE, typename DerivedOE, typename ScalarM> IGL_INLINE void igl::cr_vector_mass( const Eigen::MatrixBase<DerivedV>& V, const Eigen::MatrixBase<Der...
ALGO
0.992251
6.608149
d5ddbc7a-9d8b-4fb5-a419-f8c039244211
kimsung9k/mayadev
maya_plugins/inLocus/chRig/sgLocusChRig_v2/sgLocusChRig_v2/multMatrixDecompose.cpp
#include "multMatrixDecompose.h" #include <maya/MPlug.h> #include <maya/MStatus.h> #include <maya/MDataBlock.h> #include <maya/MDataHandle.h> #include <maya/MArrayDataHandle.h> #include <maya/MVector.h> #include <maya/MObject.h> #include <maya/MMatrix.h> #include <maya/MPxTransformationMatrix.h> #include <maya/MGloba...
ALGO
0.947382
5.045985
7257ae59-eb9d-4be7-9d89-eb299fdcc6be
haiueom/tugas-petik
2022 06 - Tugas Bulan Juni/03 - Kalkulator C++/kode/pengurangan.cpp
// library C++ #include <iostream> using namespace std; // function main(utama) int main(){ // inisiasi variable int a, b, c; // meminta input variable a cout << "Inputkan nilai a: "; cin >> a; // meminta input variable b cout << "Inputkan nilai b: "; cin >> b; // menggunakan oper...
ALGO
0.98421
4.56719
7725a4dc-57c0-470e-829c-39878a3b2cc2
NichTSuki/LabPA1-Algo2-222310020
Pertemuan 14/No1.cpp
#include<iostream> #define maxstack 7 //merupakan inisialisasi bahwa variable maxstack dapat menapung antrian sebanyak 7// using namespace std; struct STACK{ //deklarasi struct yang berkode STACK// int s[7]; //[7] karena max data array nya 7 || s untuk rumus perulangan nantinya// int top; //tipe data untuk memasukkan ...
ALGO
0.9845
3.714341
c64ba8f5-fbf4-418e-ac27-301e37175707
maladetska/prog-cpp
Polynomial/polynomial.cpp
#include "polynomial.h" #include <utility> /* ПОЛИНОМ */ Polynomial::Polynomial(std::vector<PolynomialElement> a) : elements(std::move(a)) {} void Construct(std::vector<PolynomialElement> &elements) { if (!elements.empty()) { for (unsigned i = 0; i < elements.size(); i++) { for (unsigned j =...
TOOL
0.898521
4.536934
0ac56c8b-07d3-46aa-ac71-06746baf03c5
MatSciTools/HFCalc
eigen-3.4.0/doc/examples/Tutorial_BlockOperations_corner.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::Matrix4f m; m << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12, 13,14,15,16; cout << "m.leftCols(2) =" << endl << m.leftCols(2) << endl << endl; cout << "m.bottomRows<2>() =" << endl << m.bottomRows<2>() << endl << ...
ALGO
0.998567
4.092313
88b6f638-43da-4128-8d5d-4ef09fe08237
Esheta10/LeetCode-Solutions
0153-find-minimum-in-rotated-sorted-array/0153-find-minimum-in-rotated-sorted-array.cpp
class Solution { public: int findMin(vector<int>& nums) { int n=nums.size(); int l=0,r=n-1; while(l<r) { int mid=l+(r-l)/2; if(nums[mid]>nums[r]) { l=mid+1; } else r=mid; } ret...
ALGO
0.999989
5.853395
f25368f6-1641-4795-b88e-362d95822675
niloufar-kashefi/cpp
Code/9.Basic switch.cpp
#include <iostream> using namespace std; int main() { int day; cout << "Enter a number (1-7) to display the day of the week: "; cin >> day; switch (day) { case 1: cout << "Monday" << endl; break; case 2: cout << "Tuesday" << endl; break; ...
TOOL
0.948902
4.210579
cabd930a-efa6-4a3b-8c4a-dc1af5e02982
ROCm/flang
flang-classic/17.0-4/llvm-classic/clang/lib/Format/UsingDeclarationsSorter.cpp
#include "UsingDeclarationsSorter.h" #include "clang/Format/Format.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Regex.h" #include <algorithm> #define DEBUG_TYPE "using-declarations-sorter" namespace clang { namespace format { namespace { // The order of using declaration is defined as follows: // Spli...
TOOL
0.972692
5.356336
ae131cf0-321b-48c2-a3b7-e97f88642cad
jharkawat/cp-codes
algozenith/0_week/infix.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); /* 1 ≤ T ≤ 10^3 1 ≤ |S| ≤ 10^3 '+', '-', '*', '/', '^' (increasing left to right) */ void solve() { string str; cin >> str; stack<char> st; map<char,int> order; order['...
ALGO
0.999686
5.062098
1456d1ca-5ff1-4aab-a02c-cfea27fbf4df
Yeluorag/ACM-ICPC-Code-Library
CQU Summer/8-6 动态规划 III/B - The Tower of Babylon.cpp
#include <iostream> #include <sstream> #include <cstdio> #include <vector> #include <queue> #include <map> #include <set> #include <stack> #include <string> #include <cstring> #include <algorithm> using namespace std; typedef long long LL; #define mem(a,n) memset(a,n,sizeof(a)) #define rep(i,n) for(int i = 0; i < (n); ...
ALGO
0.999907
3.940729
3d58c220-b0b4-4f00-8aa8-d11551d4faa2
Pratikjha08/number-patterns
pattern4.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main(){ int n; cout << "Enter depth: "; cin >> n; for(int i = 1; i<=n; i++){ for(int space = 0; space<(n-i);space++){ cout << " "; } for(int j = 1; j<=i;j++){ cout << j; } ...
ALGO
0.999837
3.928657
7a35dc26-4aeb-43c6-a24c-256190a7e4f2
amitazadi/codesignal-codes
Intro/4. adjacentElementsProduct.cpp
int solution(vector<int> a) { int ans=INT_MIN; for(int i=0;i<a.size()-1;i++) { int temp=a[i]*a[i+1]; ans=max(ans,temp); } return ans; }
ALGO
0.999699
4.024668
f2238a54-d1b8-42ce-9e4d-548ed3a40082
mlesigues/CSE30
Lab_03/sortArray2.cpp
#include <iostream> using namespace std; int main() { int userSize; cout << "Enter the size of the array: "; cin >> userSize; if (userSize == 0) { //will check if the user enter a valid number cout << "ERROR: you entered an incorrect value for the array size! "; } else { int userArray[userSize]; //will decla...
ALGO
0.999825
3.51944
5275d92d-d378-46ed-a71e-e902945c7aa5
anshyyy/CPP
Codeforces/1454B.cpp
#include <bits/stdc++.h> #define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); #define loop(i,n) for(int i=0;i<n;i++) #define for1(i,n) for(int i=1;i<=n;i++) typedef long long ll; using namespace std; void solve(){ int n,mini=INT_MAX,ans; cin>>n; vector<int>arr(n); unordered_map<int,int>mp; ...
ALGO
0.999858
4.213504
69632407-3aa5-48bb-bd3a-2e0ad845f53a
Orca0917/Algorithm
BaekjoonOnlineJudge/2002.cpp
#include <bits/stdc++.h> #define ll long long #define pii pair<int, int> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n; cin >> n; map<string, int> m; queue<string> q; bool hasPassed[1001]; memset(hasPassed, false, s...
ALGO
0.999447
4.506235
47ae1bed-1c5a-4be3-bd48-8cbb9e11e869
ishandutta2007/codeforces
lycmd/normal/1657/E.cpp
#include<bits/stdc++.h> #define int long long using namespace std; int const N=255,MOD=998244353; int n,k,f[N][N],s[N][N],C[N][N],pw[N][N*N]; signed main(){ cin>>n>>k,n--; for(int i=0;i<=n;i++) for(int j=0;j<=i;j++) C[i][j]=!j||j==i?1:(C[i-1][j]+C[i-1][j-1])%MOD; for(int i=1;i<=k;i++) for(int j=0;j<=n*n;j++) ...
ALGO
0.999949
4.139849
ab193946-0e59-4ab2-8886-090d58a74f51
minuet-red/cpp
leetcode_another/stack/STL_priority_queue.cpp
#include <stdio.h> #include <queue> int main(){ std::priority_queue<int> big_heap; std::priority_queue<int, std::vector<int>, std::greater<int> > small_heap; std::priority_queue<int, std::vector<int>, std::less<int> > big_heap2; if (big_heap.empty()){ printf("big_heap is empty!\n"); } int test...
ALGO
0.963327
3.872971
512d5bed-74de-4607-be44-496557910057
LqhResearch/Basic-Programming-And-Algorithms
Chapter 03/Bai3_101.cpp
#include<stdio.h> /* Cho mang mot chieu cac so nguyen cac so nguyen va mot so nguyen M. Hay tim mang con sao cho cac phan tu trong mang con bang gia tri M. */ int row=0; //Xuat mang so nguyen void OutArray(int arr[], int n) { printf("\n===Xuat mang===\n"); for(int i=0; i<n; i++) printf("%5d", arr[i]); } //Nha...
ALGO
0.999631
3.290088
95d04386-f182-4508-84cb-8d2e337836e0
nileshwankhede03/basic-cpp-programs
.history/pattern13_20250219122340.cpp
#include "./stdc++.h" using namespace std; void print11(int n) { int space = 2 * (n-1); for(int i = 1; i <= n; i++) { // Number for(int j = 1; j <= i; j++) { cout << j; } // space for(int j = 1; j <= space; j++) { cout << " "...
ALGO
0.999912
5.103899
a18fd444-086b-4dc6-bd0c-9d3b22914f6e
raincross7/code-similarity
codes/train_code/problem099/problem099_251.cpp
#line 1 "/mnt/c/Users/leafc/dev/compro/lib/template.hpp" #include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(v) (v).begin(), (v).end() #define coutd(n) cout << fixed << setprecision(n) #define ll long long int #define vl vector<ll> #define...
ALGO
0.999881
3.732138
59288bc7-e5d8-4acb-9995-493ff946b4d2
ankitabadhe/SEM-1-MCA
SEM-1/PRACTICALS/DSA/selectionsort.cpp
#include <bits/stdc++.h> using namespace std; void printArray(int arr[], int n) { int i; for (i=0; i < n; i++) cout << arr[i] << " "; cout << endl; } void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; } void selectionSort(int arr[], int n) { int i, j, min_idx; ...
ALGO
0.999885
4.649657
b2c0232b-ac24-4a10-a504-07dbf3e5cc22
danyuanwang/XuanWuGame_C
boost/libs/msm/doc/HTML/examples/SimpleTimer.cpp
#include <vector> #include <iostream> #include <boost/msm/back/state_machine.hpp> #include <boost/msm/front/euml/euml.hpp> using namespace std; using namespace boost::msm::front::euml; namespace msm = boost::msm; // how long the timer will ring when countdown elapsed. #define RINGING_TIME 5 namespace // Concrete F...
TOOL
0.966645
6.781747
6a4df988-06cd-4334-9c3e-3fcdff38a3bd
charlesliOG/Refraction
Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.cpp
#include <Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.h> #include <Box2D/Common/b2BlockAllocator.h> #include <Box2D/Dynamics/b2Fixture.h> #include <Box2D/Collision/Shapes/b2ChainShape.h> #include <Box2D/Collision/Shapes/b2EdgeShape.h> #include <new> b2Contact* b2ChainAndPolygonContact::Create(b2Fixture* fixtureA...
ALGO
0.990838
6.405189
3e420677-2091-4361-9714-52bd4815e2b4
randbatch-md/gromacs-rbe
src/gromacs/taskassignment/taskassignment.cpp
/*! \internal \file * \brief * Defines helper and factory functionality for task assignment. * * Note that the GPU ID assignment could potentially match many * different kinds of simulation setups, including ranks from multiple * simulations, ranks from the same simulation, and/or ranks with duty * only for part...
ALGO
0.957363
7.924345
771158c9-7f37-46ee-a285-64130a0a80f7
sameernarang1234/DSA_Preparations
DP/LongestCommonSubsequence.cpp
#include <bits/stdc++.h> using namespace std; int lcsRecursive(string str1, string str2, int n, int m) { if (m == 0 || n == 0) { return 0; } if (str1[n-1] == str2[m-1]) { return 1 + lcsRecursive(str1, str2, n-1, m-1); } return max(lcsRecursive(str1, str2, n, m-1), lcsRecursive(st...
ALGO
0.999986
5.701456
1455ae12-2646-4cc3-ade9-10bf0689aebe
JCx64/ELEC391_self_balancing_robot
ESP32_main_v2/.history/src/main_20250310230052.cpp
#include <Arduino.h> #include "set_pwm.h" #include "pid_alg.h" #include "esp_timer.h" #include "HardwareSerial.h" #include "stdint.h" #include "encoder.h" #include "myiic.h" #include "IMU.h" #define TIMER1_INTERVAL_MS 1.f #define BALANCE_ANGLE -1.5f IMU imu; EncoderClass robot_encoder; PWMClass robot_pwm; myiic myi2c...
TOOL
0.905186
4.48222
c94f16e8-e1bd-460f-af6a-3fd504a66f7b
harsh70568/Daily_Problems_Solution
10-regular-expression-matching/10-regular-expression-matching.cpp
class Solution { public: bool solve(int i, int j, string s, string p, vector<vector<int>> &dp) { if(i < 0 && j < 0) return true; if(i >= 0 && j < 0) return false; if(i < 0 && j >= 0) { if(p[j] == '*') return solve(i,j-2,s,p,dp); else return false; ...
ALGO
0.999943
5.289226
04babddf-f028-4ee5-bf05-bcf4af6054df
AdityaVerma-1708/LeetCode_solution
0496-next-greater-element-i/0496-next-greater-element-i.cpp
class Solution { public: vector<int> nextGreaterElement(vector<int>& nums1, vector<int>& nums2) { //approch 1: tc ~ o(n3) // vector<int> ans; // for(int i = 0 ;i< nums1.size() ; i++){ // int a = nums1[i]; // for(int j = 0;j<nums2.size();j++){ // if(a == nu...
ALGO
0.999703
5.516636
0e3034a6-b245-4042-8d5b-cd54bf41f0c9
SgtApone117/leetcode_daily
812-rotate-string/rotate-string.cpp
class Solution { public: bool rotateString(string s, string goal) { int n = s.length(); int m = goal.length(); if(n != m) return false; int i = 0; while(i < n) { char first = s[0]; for(int j = 0; j < n; j++) { s[j] ...
ALGO
0.999986
5.825977
abb067a8-d9a1-47b5-8a55-081a78974681
zzangss/algorithm
2024/2615_오목.cpp
#include<iostream> #include<vector> #define BOARD_SIZE 19 using namespace std; // ̵ vector<vector<int>> board(BOARD_SIZE + 1, vector<int>(BOARD_SIZE + 1)); int x[4] = { -1,0,1,1 }; int y[4] = { 1,1,1,0 }; // (, , Ʒ, Ʒ) ̵ ε bool isInBoard(int x, int y) { // x,y Ȯ if (x >= 1 && x <= BOARD_SIZE && y >= 1 && y...
ALGO
0.999809
3.512348
55a1d049-7d4f-4822-85a9-323b7770d5fd
vvryw/2110104-COMPROG
grader/03_Loop/03_​Loop_​11_​Average.cpp
#include <iostream> #include <cmath> using namespace std; int main(){ double sum=0, i=0, n; while(cin >> n){ if(n == -1) break; else{ sum += n; i++; } } if(!i) cout << "No Data"; else { double avg = sum/i; cout << round(avg*100.0)/1...
ALGO
0.997924
3.725914
6100bd37-61c4-494a-bfce-e4719967b2a8
NangJohnBui3010/kattis-cpp
AvgSpeed/AvgSpeed.cpp
#include <iostream> #include <cstring> #include <cmath> #include <algorithm> #include <climits> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <list> #include <cassert> #include <unordered_map> #include <sstream> using namespace std; struct duration{ int...
ALGO
0.982372
4.734649
12c0fc83-9653-4baa-883a-8e8fec572796
DevAarushi22/Technical-Class
technical test 28th oct/q2.cpp
/* Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k. A subarray is a contiguous non-empty sequence of elements within an array. Input Format The first line contains an integer n, the number of elements in the array nums. The second line contains n space-s...
ALGO
0.999934
5.982382
8fc32b22-1de2-4f18-b7e0-da047f4e2f0e
thomasjames433/Leetcode
128.cpp
class Solution { public: int longestConsecutive(vector<int>& nums) { if(nums.size()==0) return 0; unordered_set<int>s; for(auto it:nums) s.insert(it); int maxno=1; int temp=1; for (auto it=s.begin();it!=s.end();it++){ auto prev= s.f...
ALGO
0.999959
5.541657
244ec20f-c13c-46a3-a93e-3b92ac017d91
Priyo002/DSA
Decode-DSA-C++/Classes/Week16_Stack&Queues/Class4/Prefix_to_Infix.cpp
#include<bits/stdc++.h> using namespace std; string solve(string val1, string val2, char ch) { string ans = ""; ans += val1; ans.push_back(ch); ans += val2; return ans; } int main() { #ifndef ONLINE_JUDGE freopen("inputf.in", "r", stdin); freopen("outputf.in", "w", stdout); #endif string s = "-/*+79483"; s...
ALGO
0.999991
5.060926
4e44ffb9-8a3d-4801-bc0e-6dd5803dbbb3
rofi93/Algorithms
Matrix Exponentiation.cpp
/* -------------------------------- */ /* Name: MD. Khairul Basar */ /* Institute: HSTU */ /* Dept: CSE */ /* Email: <EMAIL> */ /* -------------------------------- */ #include <bits/stdc++.h> /* all header files */ #define fs first #define sc seco...
ALGO
0.999611
3.136143
0af32037-a2c6-4d4b-8d0f-b979485064f0
JunHossain/Competitive-Programming
Beecrowd/1116.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; int x, y; double ans; while(t--){ cin >> x >> y; if(y==0){ cout << "divisao impossivel\n"; continue; } ans = (double)x/y; cout << fixed << setprecision(1) << an...
ALGO
0.998821
3.772103
ff83882c-698d-424e-a816-a9b6978ddc68
fajartd02/data-structures-algorithm-learn
divideAndConqueror/mergeSort.cpp
#include <bits/stdc++.h> using namespace std; void merge (vector<int> &array, int s, int e) { int left = s; int mid = (s+e)/2; int right = mid + 1; vector<int> temp; while(left <= mid and right <= e) { if(array[left] < array[right]) { temp.push_back(array[left]); left++; } else { temp.push_back(ar...
ALGO
0.999969
5.048835
da640f6b-e307-4ca3-9384-5341bcc2c22e
Cata-PPA/simpl3chat_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.998859
6.785645
c3169e2f-f49f-42f6-829e-d0490f631725
rve/critique-of-poor-wheel
usaco/spin3.cpp
/* ID: jiongrr1 LANG: C++ TASK: spin */ #define LOCAL //#define DEBUG #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 <iostr...
ALGO
0.999648
3.853235
29f5300d-c50e-4106-8e61-3ea680adbac0
Itaxo01/Competitive-Programming
vjudge/29082024/k.cpp
#include <bits/stdc++.h> using namespace std; char v[1000][1000]; int a, b; bool check_valid(pair<int, int> pos){ int i = pos.first, j = pos.second; if(i<0 or i>=a) return false; if(j<0 or j>=b) return false; if(v[i][j] == '#') return false; return true; } bool check_trap(vector<pair<int, int>> adj){ for(auto e...
ALGO
0.997903
3.685497
1bd8311e-d72f-421a-aa72-de810ebb2755
darthvaderrr-21/datastructure-and-algorithm
LINKED-LIST/linkedList.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; class node { public: int data; node* next; node(int val) { data = val; next = NULL; } }; void insertAtHead(node* &head, int val) { node* n = new node(val); n->next = head; head = n; }; void insertAtTail(n...
ALGO
0.999836
4.22704
006807d6-e92c-4d0b-bc44-5ac58b5f5ac7
UKbhatt/Tic-Tac-Toe
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
cd30d051-7076-4f9f-aa7c-b4c223e364f0
Ridham24/Leetcode-Potd
Jan10POTD.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.999982
5.970161
df399667-5f66-4b01-b964-6adf9cf5258e
Adityasaiboda/CSE331
Avltrees.cpp
// C++ program to insert a node in AVL tree #include<bits/stdc++.h> using namespace std; // An AVL tree node class Node { public: int key; Node *left; Node *right; int height; }; // A utility function to get the // height of the tree int height(Node *N) { if (N == NULL) return 0; return N->height; } // A ut...
ALGO
0.999972
6.222574