uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5171d724-b450-4a4c-878c-bd2ac33310e2
mdvenka/FTHcoin
litecoin-master/src/timedata.cpp
#if defined(HAVE_CONFIG_H) #include <config/bitcoin-config.h> #endif #include <timedata.h> #include <netaddress.h> #include <sync.h> #include <ui_interface.h> #include <util.h> #include <utilstrencodings.h> #include <warnings.h> static CCriticalSection cs_nTimeOffset; static int64_t nTimeOffset GUARDED_BY(cs_nTimeOf...
TOOL
0.87302
6.58726
e72b9ef1-74da-465b-aacb-77332b9ee668
TD2106/Competitive-Programming
C++ Basics/Bai tap/27.cpp
#include <iostream> #include <cmath> using namespace std; int check(int a) { int check=3; while(a>0) { if(a%10==3) { break; check=1; } a=a/10; } return check; } int dem(int n) { int i=0; while(n>0) { i++; n=n/10; } return i; } int dao(int n,int i) { int j=i-1,s=0; while(n>0) { s=s+n%10*...
ALGO
0.999655
3.505327
8345d625-59dd-4d19-a092-1e0b84a186fa
malaika1122/DSA
9 Write a program to find factorial of a number.cpp
#include<iostream> using namespace std; int main() { int n,i,fact=1; cout<<"Enter a number : "; cin>>n; for(i=1;i<=n;i++) { fact*=i; } cout<<"Factorial of "<<n<<"="<<fact; }
ALGO
0.999788
3.454365
74c1f869-3a51-4949-930c-b7c80403b36a
hubertmucyo/Cpp
sum_of _digits.cpp
//porgram to add digits of a number #include<iostream> using namespace std; int main(){ int integer,num,sum=0; cout<<"Enter an integer: \n"; cin>>integer; num=integer; while(integer!=0){ int digit=integer%10;//extract the last digit sum=sum+digit;//add digits to sum integer/=10; } cout<<"The number entered...
ALGO
0.999294
3.845222
73e40067-ff4a-4af0-9b6f-824886548ae8
ishandutta2007/codeforces
jjang36524/normal/1287/A.cpp
#include <iostream> #include <algorithm> using namespace std; int T, N; int main() { cin >> T; while (T--) { cin >> N; int i; int lasta = -1; int ans = 0; for (i = 0; i < N; i++) { char a; cin >> a; if (a == 'A') { lasta = i; } else { if (lasta != -1) ans = max(i - lasta...
ALGO
0.999797
3.789026
1ffe3ae9-32eb-4448-aedb-9b092a8acc50
binstarr/flutter_git
air_bnb/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.999046
6.785645
f2eec13d-93a2-425c-abc8-4c307d1ee920
komori-n/KomoringHeights
source/eval/evaluate.cpp
#include "../types.h" #include "../position.h" #include "../evaluate.h" #include "../misc.h" #include <map> namespace Eval { #if !defined(USE_EVAL) // 評価関数を用いない時用に、ここでダミーの評価関数を定義しておく。 void init() {} Value compute_eval(const Position& pos) { return VALUE_ZERO; } void evaluate_with_no_return(const Position& pos) {}...
ALGO
0.99293
5.049348
46ddcc3b-7f05-4ce6-a13a-6f312efb29b5
Amirhosein-Ashrafi/todo_app_hive
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
e231b72a-5d30-4816-9ee2-de49053cca1b
bijayrauniyar90/GeeksForGeek
Difficulty: Medium/Not a subset sum/not-a-subset-sum.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 findSmallest(const vector<int> &arr) { long long curr = 1; for (int i = 0; i < arr.size(); i++) { ...
ALGO
0.999706
6.45064
e7b9e09a-6393-4ecd-a008-12ebe0a68765
jakcron/libtoolchain
src/crypto/Aes256EcbEncryptor.cpp
#include <tc/crypto/Aes256EcbEncryptor.h> void tc::crypto::EncryptAes256Ecb(byte_t* dst, const byte_t* src, size_t size, const byte_t* key, size_t key_size) { tc::crypto::Aes256EcbEncryptor crypt; crypt.initialize(key, key_size); crypt.encrypt(dst, src, size); } void tc::crypto::DecryptAes256Ecb(byte_t* dst, const...
ALGO
0.858172
6.945683
21613c6d-3a6a-45fa-8c31-74089e33e3ab
zqy1018/my_leetcode
code/207.cpp
#include <bits/stdc++.h> #define INF 2000000000 using namespace std; typedef long long ll; int read(){ int f = 1, x = 0; char c = getchar(); while(c < '0' || c > '9'){if(c == '-') f = -f; c = getchar();} while(c >= '0' && c <= '9')x = x * 10 + c - '0', c = getchar(); return f * x; } struct TreeNod...
ALGO
0.999864
5.51877
9bfc37fd-83f5-4d6d-a698-b1e7b4776069
sayan-dey/Source-Binary
IR2Vec/src/test-suite/PE-benchmarks/hamiltonian-cycle-backtracking.cpp
/* C++ program for solution of Hamiltonian Cycle problem using backtracking */ #include <bits/stdc++.h> using namespace std; // Number of vertices in the graph #define V 5 void printSolution(int path[]); /* A utility function to check if the vertex v can be added at index 'pos' in the Hamiltonian Cycle constructed s...
ALGO
0.99998
6.71028
c33bf3d8-856d-4b31-a7ae-bc56d82e6a43
krohit98/DSA-GFG-Practice
Phase I (School + Basic + Easy)/Array/Alternate positive and negative numbers .cpp
// Link: https://practice.geeksforgeeks.org/problems/array-of-alternate-ve-and-ve-nos1401/1 // Problem Statement: // Given an unsorted array Arr of N positive and negative numbers. Your task is to create an // array of alternate positive and negative numbers without changing the relative order of // positive and ne...
ALGO
0.999978
4.843685
a8453dfd-19a4-4611-9a08-a383237e6d62
Simon-ster/advent-2019-Cpp
day3.cpp
#include <stdio.h> #include <climits> #include <cmath> #include <iostream> #include <map> #include <sstream> #include <string> int main() { freopen("wires.txt", "r", stdin); //std::map<std::pair<int, int>, bool> visitedPath; std::map<std::pair<int, int>, int> visitedPath; std::string wirePath; int ...
ALGO
0.999476
4.437505
4c7705f5-7753-4f3f-b9d3-48e779d3bbae
manikanta2901/ubuntu
.history/SRM/DAA/Final_20210424115448.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int row,column; cout << "Enter row and column respectively\n"; cin >> row >> column; vector<vector<int>> grid(row,vector<int>(colu,0)),cost[row][column]; cout << "Enter the positions of each cell in the grid\n"; // Taking grid matrix as ...
ALGO
0.99966
3.557638
3e28d7dc-3d02-4dd6-9a76-17b70a8da07e
ligang305/LeetCode
001_030/14_二叉树的中序遍历.cpp
// constructing stacks #include <iostream> #include "stack" #include "unistd.h" #include "vector" using namespace std; struct TreeNode{ int val; TreeNode *next; TreeNode *left; TreeNode *right; TreeNode() : val(0), next(nullptr), left(nullptr), right(nullptr){}; TreeNode(int x) : val(x), next(n...
ALGO
0.999829
4.820373
8b65a80e-cc1e-414b-9ff2-56aeb4054cec
Bhavin2502/All_HTML_Files
practice of pattern.cc++.cpp
#include <stdio.h> int main() { int rows = 5; // Number of rows in the pattern int i, j; for (i = 1; i <= rows; i++) { int num = i % 2; // Start with 1 or 0 based on row number for (j = 1; j <= i; j++) { printf("%d ", num); num = !num; // Flip between 0 and 1 ...
ALGO
0.999354
5.488849
f69c0a7e-a31d-4708-89f7-4e8744d841d8
AFattahYS/RTJ_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.9988
6.76073
894f1e1a-a402-4956-836f-ce976790c107
EmonMajumder/All-Code
C++/HumanVsZombie/HumanVsZombie/Human.cpp
#include "pch.h" #include "Human.h" #include "GameSpecs.h" #include "City.h" #include <algorithm> #include <chrono> #include <random> using namespace std; //Default constructor Human::Human() { this->x = 0; this->y = 0; this->moved = false; this->movecount = 0; this->symbol = HUMAN_CH; } //Constructor Human::Hu...
ALGO
0.927482
4.34933
a8a98033-8311-40bf-9238-306f0e9c1f64
GouravShDev/Leetcode-Solutions
Smallest Positive missing number - GFG/smallest-positive-missing-number.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find the smallest positive number missing from the array. int missingNumber(int arr[], int n) { int ans = n; for(int i= 0;i < n; i++){ if...
ALGO
0.999933
5.655057
3d216571-849d-41bb-8490-415c4f3cc80e
nishq2/c-
smallestPointer.cpp
//Write a function Smallest to find the smallest element in an array using pointer. #include<iostream> using namespace std; int main() { int n, *p,i,min; cout<<"Enter the size of the array"<<endl; cin>>n; cout<<"Enter elements"<<endl; for(i=0;i<n;i++) { cin>>*(p+i); } ...
ALGO
0.99961
3.660764
83ee8436-4d0e-4fd7-a211-9232505cb0b8
franfill1/training.olinfo.it-solutions
src/ois_dna.cpp
#include <bits/stdc++.h> using namespace std; ifstream fin ("input.txt"); ofstream fout ("output.txt"); int dist(bitset < 100 > a, bitset < 100 > b) { return (a^b).count(); } int main() { int N, M; fin >> N >> M; vector < bitset < 100 > > s(N, 0); for (int i = 0; i < N; i++) { fin >> s[i]; } vector < in...
ALGO
0.99993
4.19587
62678a90-4534-4ff0-a3ec-18dd5b54ddd8
ColdWilloWind/algorithm
sub.cpp
#include<iostream> #include<vector> using namespace std; bool compare(string &a, string &b){ if(a.size() == b.size()) { for(int i = 0; i < a.size(); i++){ if(a[i] != b[i]) return a[i] > b[i]; } return true; } else return a.size() > b.size(); } vector<int> sub(vector<int> &...
ALGO
0.999978
3.63406
900017c6-5d00-4155-8efa-6d6359af1f76
nam-Space/DSA_PTIT
Sắp xếp - Tìm kiếm/DSA06003_ĐỔI CHỖ ÍT NHẤT.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; const int mod = 1e9 + 7; int selection_sort(int a[], int n) { int cnt = 0; for (int i = 0; i < n - 1; i++) { int min_pos = i; for (int j = i + 1; j < n; j++) { if (a[j] < a[min_pos]) min_pos = j; } if (i != min_pos) { swap(a[i], a[min_...
ALGO
0.999825
4.847815
d076e8bc-3b3a-43ad-a039-7a5b2b476b64
Rakib-Mondal-One8/CP-31
1300/Alyona_and_a_Narrow_Fridge.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> /*Problem Link -> https://codeforces.com/contest/1119/problem/B*/ typedef long long ll; typedef unsigned long long ull; typedef long double lld; #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie...
ALGO
0.999955
4.600782
117bcaae-03c9-4d5b-89f4-eea6784f4d3b
raincross7/code-similarity
codes/train_code/problem246/problem246_9.cpp
#include <bits/stdc++.h> using namespace std; int main(){ long long N,T; cin>>N>>T; vector<long long> vec(N); for(int i=0;i<N;i++){ cin>>vec.at(i); } long long sum=0; long long tmp=0; for(int i=0;i<N;i++){ sum+=T-max(0LL,tmp-vec.at(i)); tmp=vec.at(i)+T; } cout<<sum<<endl; }
ALGO
0.999888
3.632124
43e96ed3-565c-4ae2-8587-e6bbcff5f749
raincross7/code-similarity
codes/train_code/problem059/problem059_222.cpp
#include<bits/stdc++.h> #define sio(); ios_base::sync_with_stdio(false); cin.tie(NULL); #define fio(); freopen("input","r",stdin); freopen("output","w",stdout); using namespace std; int main() { double n,x,t; int k; cin>>n>>x>>t; k = n/x; if((n/x)>k)k = (n/x)+1; printf("%d\n",int(k*t)); retu...
ALGO
0.999875
3.775877
ac6817a5-c887-4e3a-b729-55512b5fc806
rahulgarg55/LeetCode-GeeskforGeeks-Hustle
1365-how-many-numbers-are-smaller-than-the-current-number/1365-how-many-numbers-are-smaller-than-the-current-number.cpp
class Solution { public: vector<int> smallerNumbersThanCurrent(vector<int>& nums) { vector<int> ans(nums.size()); int temp[101] ={0}; //storing the frequency of each element for(auto it : nums){ temp[it]++; } // storing the running sum for(int i=1; i<101; i++){ temp[i] += temp[i-1]; } /...
ALGO
0.999992
5.985634
aaa328f8-311f-4d3a-ba82-f8f4f078ade4
chols8195/Green-Guardian-Simulation
Rat.cpp
#include <cstdlib> #include <random> #include <vector> using std::vector; #include "Rat.h" #include "Cell.h" #include "Predator.h" Rat::Rat() { } Rat::Rat(int aRat) { rat = aRat; } //getter int Rat::getRat() { return rat; } //setter void Rat::setRat(int aRat) { rat = aRat; } //functions void Rat::m...
ALGO
0.998902
4.47073
3721ad0d-84bc-4c01-b20e-19b08d8fe086
neilpradhan/Leet_code_monthly_challenge
May_challenge/Single_Element_in_a_Sorted_Array.cpp
class Solution { public: int singleNonDuplicate(vector<int>& nums) { int start = 0; int end = nums.size()-1; while(start<end){ int mid = start + (end-start)/2; if (nums[mid] == nums[mid^1]){ start = mid+1; }else{ ...
ALGO
0.999778
5.802209
f1a67678-9741-4e88-9fc1-6436a349a229
Piyush13-ambure/DSA
stock buy and sell.cpp
//Given an array are denoting the cost of stock on each day, the task is to find the maximum total profit if we can buy and sell the stocks any number of times. //Note: We can only sell a stock which we have bought earlier and we cannot hold multiple stocks on any day. #include <iostream> #include <vector> using name...
ALGO
0.999946
6.608362
c8dd04c6-f222-467f-bc8e-533901e8a93f
justin0u0/LeetCode
problems/1415-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n/solution.cpp
/** * Author: justin0u0<<EMAIL>> * Problem: https://leetcode.com/problems/the-k-th-lexicographical-string-of-all-happy-strings-of-length-n/ * Runtime: 0ms (100.00%) */ class Solution { public: string getHappyString(int n, int k) { if (n == 0) { return ""; } int m = 1 << (n - 1); if (3 * m ...
ALGO
0.999886
6.259281
b078535e-0cb4-4cc0-84b7-999b0de2c946
Leapense/problems
24999번: Prom/Testmain.cpp
#include <bits/stdc++.h> #include <gtest/gtest.h> using namespace std; long long countPairs(const vector<int> &girls, const vector<int> &boys, long long k) { vector<int> sorted_girls = girls; vector<int> sorted_boys = boys; sort(sorted_girls.begin(), sorted_girls.end()); sort(sorted_boys.begin(), sor...
ALGO
0.999811
5.634637
61bf5dd7-b10a-4ede-9d88-f679330b8048
gommy15/codetree-TILs
240625/아름다운 수/beautiful-number.cpp
#include <iostream> #include <vector> using namespace std; int n; int ans = 0; vector<int> nums; void Simulate(int cur_num) { if(cur_num == n+1) { ans++; return; } for(int i=1; i<=4; i++) { if(cur_num+i <= n+1) { for(int j=0; j<i; j++) { nums.push_back(...
ALGO
0.999908
4.652111
efd12132-9797-43db-a403-cd1523de2735
pritthiprokashsarkar/problem-set
codeforces/B_Xenia_and_Ringroad.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; unsigned long long dis=0; int a[m]; for(int i=0; i<m; i++) cin>>a[i]; dis+= a[0]-1; for(int i=1; i<m; i++) { if(a[i]>=a[i-1]) dis+=a[i]-a[i-1]; else dis += (n-a[i-1]) + a[i]; } cout<<dis<<en...
ALGO
0.999835
3.209616
fe024afe-aff8-466d-b688-5889dcab965e
AlterFritz88/intro_to_prog_c_plus_plus
task_1_5_15.cpp
#include <iostream> #include <vector> using namespace std; int main() { int maxs = 0, n; vector<int> array; cin >> n; while (n != 0){ array.push_back(n); cin >> n;} for (int i=1; i < array.size() - 1; i++){ if ((array[i-1] < array[i]) and (array[i] > array[i+1])){ ...
ALGO
0.999824
3.934541
371bc858-7adb-4cde-a2f3-9f150504d7e2
codingfuture/orig-energi2
src/hash.cpp
#include "hash.h" #include "crypto/common.h" #include "crypto/hmac_sha512.h" #include "pubkey.h" inline uint32_t ROTL32(uint32_t x, int8_t r) { return (x << r) | (x >> (32 - r)); } unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash) { // The following is MurmurHash3...
ALGO
0.999424
7.157897
62c15431-8256-4ae7-bd18-71ec2e194eb2
Calinou/godot-ci-temp-test
thirdparty/basis_universal/encoder/basisu_comp.cpp
// basisu_transcoder.cpp is where basisu_miniz lives now, we just need the declarations here. #define MINIZ_NO_ZLIB_COMPATIBLE_NAMES #include "basisu_miniz.h" #include "basisu_opencl.h" #if !BASISD_SUPPORT_KTX2 #error BASISD_SUPPORT_KTX2 must be enabled (set to 1). #endif #if BASISD_SUPPORT_KTX2_ZSTD #include <zstd....
TOOL
0.875523
4.743105
8aac8797-adfc-4d43-8062-9e09383193e3
domzhaosh/blog-file
Programmers_Computational_Geometry-master/ComputationalGeometry/LineIntersectConvex/LineIntersectPolygon.cpp
/************************************************************************ \link www.twinklingstar.cn \author Twinkling Star \date 2014/11/02 ****************************************************************************/ #include "SrGeometricTools.h" #include "SrDataType.h" #include <stdio.h> #include <math.h> #defin...
ALGO
0.999937
5.612492
da568a7f-ce6d-453a-902c-95552b009cbb
soyyuz/opencv-contrib-ARM64
opencv/opencv-master/modules/photo/src/calibrate.cpp
#include "precomp.hpp" #include "opencv2/photo.hpp" #include "opencv2/imgproc.hpp" #include "hdr_common.hpp" namespace cv { class CalibrateDebevecImpl CV_FINAL : public CalibrateDebevec { public: CalibrateDebevecImpl(int _samples, float _lambda, bool _random) : name("CalibrateDebevec"), samples(_s...
ALGO
0.99866
6.254205
f433979f-20ec-44dc-9ffb-fe3733ea3366
jhett12321/Forgelight-LZHAM
lzhamdecomp/lzham_checksum.cpp
// File: lzham_checksum.cpp #include "lzham_core.h" #include "lzham_checksum.h" namespace lzham { // Originally from the public domain stb.h header. uint adler32(const void* pBuf, size_t buflen, uint adler32) { if (!pBuf) return cInitAdler32; const uint8* buffer = static_cast<const uint8...
TOOL
0.924167
6.767262
f78885b0-04af-45e1-9298-7f8d8f70782f
bijoybiswas21/GFG-160-Day-s
GeeksforGeeks-POTD-main/GeeksforGeeks-POTD-main/June 2024 GFG SOLUTION/June-30.cpp
//{ Driver Code Starts #include <stdio.h> #include <stdlib.h> /* a Node of the doubly linked list */ struct Node { int data; struct Node *next; struct Node *prev; Node(int x) { data = x; next = NULL; prev = NULL; } }; // } Driver Code Ends /* Structure of Node struct Node ...
ALGO
0.999921
6.291774
d142ed47-0105-4854-8fd6-f8869c2befbb
ArsMasiuk/DPSE
dpse2/src/3rdParty/ogdf/test/src/basic/graph.cpp
#include <ogdf/basic/Graph.h> #include <ogdf/basic/graph_generators.h> #include <resources.h> /** * Returns an arbitrary edge where both nodes have at least \c minDegree incident edges. * Requires the graph to contain at least one such edge. * * @param graph graph to investigate * @param minDegree minimal number ...
TEST
0.937962
7.697545
44c8e385-7c0a-4f6b-a7ae-0eb33366821d
Mxrider420z/KORE-master
src/pow.cpp
#include "pow.h" #include "arith_uint256.h" #include "chain.h" #include "chainparams.h" #include "main.h" #include "primitives/block.h" #include "uint256.h" #include "util.h" #include <math.h> static arith_uint256 GetTargetLimit_Legacy(int64_t nTime, bool fProofOfStake) { uint256 nLimit = fProofOfStake ? Params(...
ALGO
0.999018
7.183153
b9693ca5-5bfe-4277-b1b1-fcca51ad2837
securesystemslab/llvm-project
compiler-rt/lib/gwp_asan/stack_trace_compressor.cpp
#include "gwp_asan/stack_trace_compressor.h" namespace gwp_asan { namespace compression { namespace { // Encodes `Value` as a variable-length integer to `Out`. Returns zero if there // was not enough space in the output buffer to write the complete varInt. // Otherwise returns the length of the encoded integer. size_t...
ALGO
0.886788
7.818335
d36602d8-f735-4fe8-adb9-eb389deac828
eliweissler/HPSC_Lab4
esPIC/src/esPIC.cpp
#include "mpi.h" #include "esPIC.h" #include "particles.h" #include "mpiInfo.h" #include "LaplacianOnGrid.h" // == // || // || // || Main Program // || // || // == int main(int argc, char *argv[]) { mpiInfo myMPI; MPI_Init (&argc , &argv ); MPI_Comm_size(MPI_COMM_WORLD, &myMPI.nu...
ALGO
0.998997
3.970248
db0f41f4-07d4-4c47-80d5-b8193c252e3f
valderyaya/Competitive-Programming
Luogu/P3366.cpp
#include<bits/stdc++.h> using namespace std; #define Rosario ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); int n,m,fa[5005],cnt; struct edge{ int u,v,w; // bool operator<(const edge &tmp)const{ // return w<tmp.w; // } }e[200005]; long long ans; int getfa(int x){return x==fa[x]?x:fa[x]=getfa(fa[x]...
ALGO
0.999975
4.063705
16548764-8fa6-4501-934c-520bd0ffc00b
Manvendra2109/CPP-Course
Functions/even.cpp
#include <iostream> using namespace std; int even (int n) { if(n%2==0) return 1; else return 0; } int main () { int n,r; cout << "Enter the number: " << endl; cin >> n; r = even(n); cout << r << endl; }
ALGO
0.999668
3.37327
06f0844e-8a6f-4426-8d45-08eb000f8621
ishandutta2007/codeforces
timur_sitdikov/normal/1434/B.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef double DOUBLE; typedef complex<double> point; #define xx real() #define yy imag() #define REP(i, a, b) for(int i = (a); i < (int)(b); i++) #define R...
ALGO
0.999929
3.123838
018ea31d-147e-4fed-9fb2-d27827a113ee
vanshikash/contests
codeforces div2/#796/bitmask.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t = 1; cin >> t; while(t --) { int x; cin>>x; int y; for(y = 0; y< INT_MAX; y++) { if(((x & y) > 0) && ((x ^ y) > 0)) { cout<<y; break; ...
ALGO
0.999981
4.345112
050ed951-c018-4d25-b428-27c2c588a650
Shesh3799/DS
Arrays/p14_find_min_in_sorted_rotated_array.cpp
#include <bits/stdc++.h> using namespace std; /* */ int findMin(vector<int>& arr) { int low = 0; int high = arr.size()-1; int min_so_far = INT_MAX; while(low<=high){ int mid = low + (high-low)/2; //Left sorted if(arr[low]<=arr[mid]){ min_so_far = min(min_so_far, ar...
ALGO
0.999972
4.914608
87ea87ae-a31d-4672-9d92-ebaa9fc21e2e
piyush2011257/GFG
General Interview Questions/topological_sorting_ordering.cpp
/* http://www.geeksforgeeks.org/topological-sorting/ Refer noes in NK */ #include<cstdio> #include<queue> using namespace std; struct head { struct node *lnext, *end; head() { lnext=end=NULL; } }; struct node { int data; struct node *lnext; node() { lnext=NULL; } }; void topological ( head h[], int i, int *vis...
ALGO
0.99998
4.264336
d39b0f0a-7a1b-4f72-9019-ece551a5d5d2
hyxinchou/VOI2023
CSES/1652.cpp
#include <bits/stdc++.h> template<typename T> struct FenwickTree2D { const int n, m; std::vector<std::vector<T>> info; FenwickTree2D(int n, int m) : n(n), m(m), info(n, std::vector<T> (m)) {} void add(int x, int y, T v) { for (int i = x + 1; i <= n; i += i & -i) { for (int j = y + 1; j <= m; j += j & -j) { ...
ALGO
0.999598
4.465703
0adeeec6-9ed7-4b11-b938-4e3f6582ef18
Neel772/DSA
DP/2D/minFallingPathSum.cpp
#include <bits/stdc++.h> using namespace std; int minFallingPathSum(vector<vector<int>> &matrix){ int n = matrix.size(); if(n == 1) return matrix[0][0]; vector<pair<int, int>> directions = {{-1, -1}, {-1, 0}, {-1, 1}}; int ans = INT_MAX; for (int i = 1; i < n; i++) { for (int j ...
ALGO
0.999998
4.976583
b27e0634-cf58-4163-8d5a-53fc5f761842
hex8541/ic210
homework/hw20.cpp
//Nicholas Heil 242628 //Print out reverse journey of a series of flights #include <string> #include <iostream> using namespace std; int main() { //Initialize/setup program cout << "How many legs? "; int n; cin >> n; //number of legs determines amount of space in array string* AP = new string[n+1]; //Arra...
ALGO
0.996621
3.712502
08c13e21-be32-410c-aeb6-ad188bc74349
Hdbcoding/cpp_scratchpad
src/dynamic_programming/25_longest_increasing_subsequence/bottomup.cpp
#include <vector> #include "bottomup.hpp" using namespace std; int bottomup::lis(const vector<int> &nums) { vector<int> dp(nums.size(), 1); int maxLength; for (int i = 1; i < nums.size(); ++i) { for (int j = 0; j < i; ++j) { if (nums[j] < nums[i] && dp[i] <= dp[j]) ...
ALGO
0.999896
5.726579
26a1959c-b344-4854-8061-9a99382c4fcf
OmarHassouna-PS/LeetCode
Medium/LongestPalindromicSubstring-5.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: bool IsPalindrome (string str1) { string str2 = str1; int LengthStr = str1.length(); for (size_t k = 0; k < LengthStr / 2; k++) { if (str1[k] != str2[LengthStr - k - 1]) { ...
ALGO
0.999982
4.931173
96184690-93f3-471b-9e7a-a89526d63acf
samgongju/dataStructure
week1~7 실습/Week4_2_12234069_DodamKim.cpp
// linked list queue #include<iostream> using namespace std; struct node { int data; node* next; }; class listQueue { private: node* frontNode; node* rearNode; int n; public: listQueue(); bool empty(); int size(); void enqueue(int data); int dequeue(); }; listQueue::listQueue() { // frontNode = rearNo...
ALGO
0.999938
3.813665
d9a782ca-6d3c-49fa-b811-16e1311eed77
muhammedrameesrami/flutter_task_totalx
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
4a7d0d8a-26b2-4b71-b2a7-ce898cb7f3e6
ankitladva11/Leetcode-GeeksforGeeks
Medium/Fractional Knapsack/fractional-knapsack.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Item{ int value; int weight; }; // } Driver Code Ends //class implemented /* struct Item{ int value; int weight; }; */ class Solution { public: static bool myComp(Item a , Item b){ double r1 = (double)a.value / (d...
ALGO
0.999979
5.792828
832f025d-2e55-42af-a085-83128c88ae74
Codesmith28/cpp_practice
vectors/vector_demo.cpp
#include<bits/stdc++.h> using namespace std; int main() { vector<int> v; v.push_back(1); v.push_back(2); v.push_back(3); // printing vector using for loop: for(int i=0; i<v.size(); i++) { cout<<v[i]<<" "; } cout<<endl; // printing vector using pointer/iterator ...
ALGO
0.948784
3.816302
f781e7bb-b33a-4992-93b4-e884bf469481
sisi0808/atcoder-env
abc/222/b.cpp
#include <bits/stdc++.h> /* ACLのライブラリを追加*/ #include<atcoder/all> using namespace atcoder; #define fio() \ cin.tie(nullptr); \ ios::sync_with_stdio(false); using namespace std; #define rep(i, n) for(int i = 0; i < int(n); ++i) #define rrep(i, n) for(int i = n; i > 0; --i) #define repp(i, n, m) for(int i...
ALGO
0.999916
3.525354
05422123-09e6-4a93-8da7-813d197f3209
iagozag/programmingSubjects
ED/codes/TP3/tpexec/src/main.cpp
#include "../include/segtree.h" #include <iostream> using namespace std; int main(){ int n, m, mod = 1e8; cin >> n >> m; Segtree* segt = new Segtree(n); for(int i = 0; i < m; i++){ char op; int idx, a, b, c, d; cin >> op; if(op == 'u'){ cin >> idx >> a >> b >> c >> d; ...
ALGO
0.999174
5.987842
4d934867-65b5-4f7a-8309-1add44d1aa0c
headmyshoulder/odeint-v2
examples/quadmath/black_hole.cpp
#include <cstdlib> #include <cmath> #include <iostream> #include <iterator> #include <utility> #include <algorithm> #include <cassert> #include <vector> #include <complex> extern "C" { #include <quadmath.h> } const __float128 zero =strtoflt128 ("0.0", NULL); namespace std { inline __float128 abs( __float128 x )...
ALGO
0.999971
4.643134
8d75c644-2d84-4502-b75c-f9dbde58e970
allwellll/cf_code_jiangly
1539/1539E-E-GamewithCards.cpp
// url:https://codeforces.com/contest/1539/problem/E // time:2021-06-20 13:59:51 // name:E-GamewithCards #include <bits/stdc++.h> using i64 = long long; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n, m; std::cin >> n >> m; std::vector<int> k(n), al(n), bl(n), ar(n), br...
ALGO
0.999998
3.951904
e565c0ac-dec9-4b98-beab-6c899028557b
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_12294_4.cpp
#include <bits/stdc++.h> using namespace std; long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); } const int MOD = 998244353; const int PRIMROOT = 3; int pw(int x, int n) { int ret = 1; while (true) { if (n & 1) ret = (long long)ret * x % MOD; if ((n >>= 1) == 0) return ret; x ...
ALGO
0.999898
4.213832
2318da5e-ad8c-491f-b986-74b19c5feeec
gizmo98/GLupeN64
GLideN64/src/GLideNHQ/TextureFilters_hq2x.cpp
/* 2007 Mudlord - Added hq2xS lq2xS filters */ #include "TextureFilters.h" /************************************************************************/ /* hq2x filters */ /************************************************************************/ /****************...
ALGO
0.986217
5.494403
da5b5883-170f-4932-a134-49eb1c1421ee
hummingg/LeetCode
1502.判断能否形成等差数列.cpp
/* * @lc app=leetcode.cn id=1502 lang=cpp * * [1502] 判断能否形成等差数列 */ // @lc code=start class Solution { public: // 100 52; 100 52; bool canMakeArithmeticProgression(vector<int>& arr) { int size = arr.size(); if(size < 3){ return true; } sort(arr.begin(), arr.end())...
ALGO
0.999897
5.916963
18aba6d2-0f9f-4602-94ee-40ef4ae5c651
tybmar/cpp-learning
Pointers/pointers3.cpp
//Implement the following functions using pointer arguments only //void swap(int *ptr1, int *ptr2); //Swap the value of two integers #include <iostream> using namespace std; void swap(int *ptr1, int *ptr2) { int temp = 0; //tymczasowa zmienna do podmiany temp=*ptr1; *ptr1 = *ptr2; *ptr2 = temp; cout << "Odwrac...
ALGO
0.998976
4.153214
b52212d1-c622-4308-b42e-2d371037afb6
ishandutta2007/codeforces
tsukiko_tsutsukakushi/normal/1389/D.cpp
/** * author: otera **/ #include<iostream> #include<string> #include<cstdio> #include<cstring> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<deque> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<...
ALGO
0.999887
3.180357
82ca98a9-a2f7-4ca1-9267-63ae65fb5bb5
graindb/graindb
src/execution/index/art/node48.cpp
#include "duckdb/execution/index/art/node16.hpp" #include "duckdb/execution/index/art/node48.hpp" #include "duckdb/execution/index/art/node256.hpp" using namespace duckdb; Node48::Node48(ART &art, size_t compressionLength) : Node(art, NodeType::N48, compressionLength) { for (idx_t i = 0; i < 256; i++) { childIndex...
ALGO
0.943684
6.033458
2fb766df-3b26-4dcb-ba10-3d2de5a40010
sevenalarm/Codeforces
A_Tir1403/1987C.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define rpt(a) for (int i=0; i<(a); i++) #define range(a, b) for (int j=(a); j<(b); j++) #define ft first #define sd second #define pb push_back #define fori(a, b) for (int i=(a); i<(b); i++) const int mxn = 2e5 + 10; int a[mxn]; ll mnd(int n) { ...
ALGO
0.998207
3.715446
bffc9a45-5bec-4aeb-9dce-e81b456ffb43
rashig-13/DSA
Graphs/shortest_distance_in_undirected_graph_with_unit_weights_.using_bfs.cpp
souce node=src vector<int> Solution::solve(int n, vector<vector<int> > &v,int src) { vector<int> ad[n+1]; vector<int> dist(n+1,INT_MAX); for(int i=0;i<v.size();i++){ int x=v[i][0],y=v[i][1]; ad[x].push_back(y); ad[y].push_back(x); } queue<int> q; dist[src]=0; q.push(src); while(...
ALGO
0.999943
5.021554
a9df34b4-7d40-4db0-bf4a-cce2d01c1754
ishandutta2007/codeforces
coderanshu/normal/1220/D.cpp
#include<bits/stdc++.h> using namespace std ; #define ll long long #define pb push_back #define all(v) v.begin(),v.end() #define sz(a) (ll)a.size() #define F first #define S second #define INF 2000000000000000000 #define popcount(x) ...
ALGO
0.999913
3.942548
53b6f579-32c8-423f-b3de-54447f9c0e2e
champmaniac/LeetCode
297-serialize-and-deserialize-binary-tree/297-serialize-and-deserialize-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Codec { public: // Encodes a tree to a single string. string serialize(TreeNode* root) { string res="...
ALGO
0.999728
6.121759
56eede61-b4a6-45a0-93f2-b816864abd06
codingksj/Baekjoon-Solution
백준/30000~30999/30800~30899/30805.cpp
#include<bits/stdc++.h> #include<unordered_set> // ---------- 사용자 정의 자료형 ---------- using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef long double LD; typedef pair<char, char> Pcc; typedef pair<char, int> Pci; typedef pair<char, string> PcS; typedef pair<int, bool> Pib; typedef pair<i...
ALGO
0.999996
4.048833
92d682cb-e689-46dd-8760-e0a91135593f
PythonSmall-Q/OI-Codes
3076.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=2e5+100; string s; ll n,m,minn[maxn],p[maxn],num[maxn]; template <typename T> void read(T &a){ a=0; int f=1;char ch=getchar(); while(ch<'0'||ch>'9'){ if (ch=='-') f=-1; ch=getchar(); } do{ a=a*10+ch-'0'; ch=getchar(); } while(...
ALGO
0.999926
3.565796
0253d236-1018-41a0-84ae-0c77c74a122e
JoelxD12O/C-PLUSPLUS-PROGRAMACION-III
SEMANA_8/SEM_8_LABB_EJER3.cpp
#include <iostream> #include <fstream> using namespace std; // Función que cuenta palabras en la primera línea de un archivo void contador_palabras(string ruta, int& cont) { ifstream file(ruta); string linea; getline(file, linea); // Lee la primera línea completa for (char c : linea) { if (c =...
ALGO
0.989338
5.206301
f52eba3c-3fb3-47c1-a346-011df2a5df60
samurdhilbk/Programming
Code Jam/2014_Q_A/2014_Q_A.cpp
#include <stdio.h> #include <iostream> #include <sstream> #include <cstring> #include <climits> #include <algorithm> #include <vector> #include <map> #include <cmath> #include <memory> #include <string> #include <set> using namespace std; int main(){ ios_base::sync_with_stdio(false); int t; cin>>t; ...
ALGO
0.998834
3.626344
19cc4f1e-2eed-4cf5-8d4e-27a5ab40cb87
adung1703/Project-1
Code/Tuan 8/CITIZEN v3.cpp
#include <bits/stdc++.h> using namespace std; string code, birth, father, mother, region; char alive; int NUMBER_PEOPLE = 0; //for NUMBER_PEOPLE vector<int> BORN_AT(1116000, 0); //for NUMBER_PEOPLE_BORN_AT map<string, pair<string, string>> family; //for MOST_ALIVE_ANCESTOR and MAX_UNRELATED_PEOPLE map<string, bool> Al...
ALGO
0.998526
3.818443
bf396b1b-6393-4c32-a548-dcc515f0ac40
adobrich/CppPrimer
Chapter_05/exercise_05.cpp
// Using an `if-else` statement, write your own version of the program // to generate the letter grade from a numeric grade. #include <iostream> #include <vector> using std::cout; using std::cin; using std::endl; using std::string; using std::vector; int main() { vector<string> scores = { "F", "D", "C", "B", "A"...
TOOL
0.923886
7.164859
b06e6aa9-97eb-40b4-b85b-b7df1cb64f53
183aryan/LeetCode-Solutions
1657-determine-if-two-strings-are-close/1657-determine-if-two-strings-are-close.cpp
class Solution { public: bool closeStrings(string word1, string word2) { if(word1.size() != word2.size()) return false; // unordered_map<char, int> um1, um2; vector<int> s1(26,0), s2(26, 0), s3(26, 0), s4(26, 0); for(int i=0;i<word1.size();i++){ s1[word1...
ALGO
0.999986
5.919079
0558eb71-f160-42fb-99c6-5921a518a3fb
RinCloud/TrickCatcher
Datasets/TrickyBugs/GenProgs/dpp_generated_progs_cpp/p03360/p03360_num0_parsed.cpp
#include <iostream> #include <algorithm> int main() { int A, B, C, K; std::cin >> A >> B >> C >> K; std::cout << (A + B + C + std::max({A, B, C}) * (1 << K) - std::max({A, B, C})) << std::endl; return 0; }
ALGO
0.996127
3.764597
dde691de-43ff-4f21-a79a-b242f046cffe
enuguru/algorithms_and_datastructures
algorithms/classproblems/numberofways.cpp
// this program tells the number of ways you can go to any index of a matrix // this program can be done by dynamic programming also #include <iostream> #include <vector> using namespace std; int number_of_ways(const int &n, const int &m) { vector<vector<int> > A(n,vector<int>(m,0)); A[0][0] = 1; // 1 to st...
ALGO
0.999771
4.656434
c32ee5bb-2ec0-42f8-afc6-08378f624922
almishra/llvm-test
libcxx/test/std/utilities/function.objects/func.search/func.search.bm/default.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14 // XFAIL: libc++ // <functional> // boyer_moore searcher // template<class RandomAccessIterator1, // class Hash = hash<typename iterator_traits<RandomAccessIterator1>::value_type>, // class BinaryPredicate = equal_to<>> // class boyer_moore_searcher { // public: /...
TEST
0.941953
6.950196
cdcdb510-4b77-4e5b-a2de-b0cb93e27766
anurag04me/CODSOFT
Tic-Tac-Toe.cpp
#include <iostream> #include <vector> // Function to display the Tic-Tac-Toe board void displayBoard(const std::vector<std::vector<char>>& board) { for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { std::cout << board[i][j]; if (j < 2) { std::cout << " | "; ...
ALGO
0.998676
7.22233
1b392e2b-0a65-4593-bb26-7af4c114becc
ishandutta2007/codeforces
interestinglsy/normal/1326/D1.cpp
// InterestingLSY // codeforces&github: interestingLSY, qq: 2659723130 // #ifdef intLSY #include <intlsy/stdc++.h> #else #include <bits/stdc++.h> #endif #include <bits/c++0x_warning.h> using namespace std; #define il inline #define elif else if // Type #define ld double #define ll long long #define ull unsigned ll /...
ALGO
0.999987
4.334487
9340c46b-ac3e-4d83-8099-f33c53f8c504
Escoozme/cpp-fundamentals-1
Programming Fundamentals I/Chapter 5/Farrell Exercises/exercise 11a.cpp
#include <iostream> using namespace std; int main() { int tuition = 15000; double rate; int counter; cin >> rate; for(counter = 1; counter <= 10; ++counter) { cout << "Year " << counter << " tuition: $" << tuition; tuition = tuition + (tuition * rate); cout << endl << e...
ALGO
0.994545
3.960006
b9404a0c-6710-4e1a-b3f4-ccaed417848a
tangjz/Three-Investigators
2017-11-15/J.cpp
#include <bits/stdc++.h> using namespace std; typedef long long i64; const int maxn = (int)1e3 + 1; const double pi = acos(-1), eps = 1e-9; int n; struct Circle { int x, y, r, sgn; } c[maxn]; inline int dcmp(double x) { return (x > eps) - (x < -eps); } inline bool lessComp(double const &u, double const &v)...
ALGO
0.999797
4.315704
ec508417-4e51-47a6-8da6-c4c7b8160148
Hossamadel822/search_details
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
c7a68507-615d-4581-b5c2-2c35fc2b4e4a
LetsOffBrains/LIT_Task3
LIT_Task3.cpp
#include <iostream> #include <map> #include <string> class StringRepresentation { private: std::string str = ""; int num = 0; std::string getHundreds(int); void toString(); std::map<int, std::string> ranks{ {0, "Ноль"}, {1, "Один"}, {2, "Два"}, {3, "Три"}, {4, "Четыре"}, {5, "Пять"}, {6, "Шесть"}...
TOOL
0.993376
4.618083
76bccfb3-94cc-4655-850a-c0025aac2aa2
7yooooo/2022c
week12/week12-3.cpp
char * frequencySort(char * s){ int N=strlen(s); int H[62]={}; char alphabet[62]; for(int i=0;i<26;i++)alphabet[i]='A'+i; for(int i=0;i<26;i++)alphabet[i+26]='a'+i; for(int i=0;i<10;i++)alphabet[i+26+26]='0'+i; for(int i=0;i<N;i++){ char c=s[i]; if(c>='A'&&c<='Z')H[c-'A']++; if(c>='a'&&c<='z')H[c-'a'+26]++;...
ALGO
0.999654
3.943482
db19db58-7153-4601-baee-9c757ca8d9f4
danadrianmirea/serenity
Userland/Games/Hearts/Player.cpp
#include "Player.h" #include "Helpers.h" #include <AK/Debug.h> #include <AK/QuickSort.h> namespace Hearts { static bool compare_card_value(CardWithIndex& cwi1, CardWithIndex& cwi2) { return hearts_card_value(*cwi2.card) < hearts_card_value(*cwi1.card); } static bool compare_card_points_and_value(CardWithIndex& c...
ALGO
0.960132
6.843154
f37cccf8-ffcf-4171-92ad-3882060f45ce
Infinity-Voice-Synthesis/Infinity-Studio
JUCE_Windows/juce_box2d/box2d/Collision/b2CollideEdge.cpp
#include "b2Collision.h" #include "Shapes/b2CircleShape.h" #include "Shapes/b2EdgeShape.h" #include "Shapes/b2PolygonShape.h" // Compute contact points for edge versus circle. // This accounts for edge connectivity. void b2CollideEdgeAndCircle(b2Manifold* manifold, const b2EdgeShape* edgeA, const b2Transform& x...
ALGO
0.999769
7.537803
bee2e6c4-a046-46bf-9d28-9f825d1b87a8
byungsujeong/Foreigner
venv/Lib/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/libs/multiprecision/performance/delaunay_test.cpp
#include <boost/multiprecision/cpp_int.hpp> #include "arithmetic_backend.hpp" #include <boost/chrono.hpp> #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int_distribution.hpp> #include <fstream> #include <iomanip> template <class Clock> struct stopwatch { typedef typename Clock::duratio...
ALGO
0.988056
6.514606
bfdb9c4f-a07f-4386-8e48-7d513406c10a
CorujasBR/C--
c++/output/E2.cpp
#include<iostream> #include<cstdlib> using namespace std; int main() { int C, F; cout << "Entre com o valor de Fahrenheit"; cin >> F; C = (F - 32) / 1.8; cout << "Valor em celcius: "; cout << C; return 0; }
TOOL
0.949449
3.589057
bc92c752-81c9-404b-82c4-7b7e41ac829e
jnoor/BouchardLab
pid.cpp
/*----------------------------------------------------------------- ------- pid_init DESCRIPTION This function initializes the pointers in the _pid structure to the process variable and the setpoint. *pv and *sp are integer pointers. ------------------------------------------------------...
ALGO
0.998938
5.722685
1a4e11ff-316f-417a-9e91-f62305364777
Karim-Zaf/Competitive-Programming-Solutions
Tunisian Contests/Genesis 1.0/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; using namespace __gnu_pbds; #ifndef ONLINE_JUDGE #include "debug.cpp" #else #define dbg(...) #endif #define endl "\n" #define FAST ios...
ALGO
0.999914
4.435219
e2841203-b181-4a74-b393-f3e528a608f2
Harshal-Dongare/codehelp-supremeBatch
Searching-and-Sorting/6-LeetcodeQues852.cpp
/* Leetcode problem 852: Peak index in a Mountain array Input: nums = [1,2,3,1] Output: 2 Explanation: 3 is a peak element and your function should return the index number 2. */ #include<iostream> #include<vector> using namespace std; int main(){ vector<int> arr = {0, 10, 5, 2}; int start = 0; int end...
ALGO
0.99998
5.048286
60593695-7a2e-42c3-9877-03df13e9e05a
chikison/dsdp
DAY4/7_visitor4.cpp
#include <iostream> #include <string> #include <vector> #include <conio.h> // list : 선형 구조이고, 모든 요소의 타입이 동일 합니다. // Menu : Tree 구조이고, 요소의 타입이 다를수 있습니다. class MenuItem; class PopupMenu; struct IMenuVisitor { // 아래 처럼 하면 모든 메뉴 객체를 받을수 있지만 // => 같은 동작을 하게 됩니다. // virtual void visit(BaseMenu* m) = 0; // 아래 처럼해야 다른 ...
TOOL
0.916892
4.061709