uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
eb227710-2b3c-4487-a912-9d0fa6449a6a
cmg6991/Coding-Test
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/0/181846.โ€…๋‘โ€…์ˆ˜์˜โ€…ํ•ฉ/๋‘โ€…์ˆ˜์˜โ€…ํ•ฉ.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; string solution(string a, string b) { string answer; int i = a.size() - 1; int j = b.size() - 1; int up = 0; while (i >= 0 || j >= 0 || up > 0) { int sum = up; if (i >= 0) { sum += (a[...
ALGO
0.999827
5.173221
3d170bb1-6a07-4468-a7c3-d59c2b23932d
kangwang1988/iPdfParser
iPdfParser/tesseract/classify/fpoint.cpp
/**---------------------------------------------------------------------------- Include Files and Type Defines ----------------------------------------------------------------------------**/ #include "const.h" #include "fpoint.h" #include <stdio.h> #include <math.h> /**---------------------------------------...
TOOL
0.941112
5.708295
8ee02e5a-d07a-41ea-97f4-3767e5eb5da3
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_7652_9.cpp
#include <bits/stdc++.h> using namespace std; long long base[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; string romCh[] = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"}; string roman(long long n) { string ans = ""; for (int i = 0; i < 13; i++) for ...
ALGO
0.999814
4.42979
a8ebfef7-5ab4-4c93-9787-eb1cfe5a6daf
JaiAkashS/CodingChallenges
C++_Files(Axolotl)/bizzbazz.cpp
#include<iostream> using namespace std; int main() { int num[100]; for(int i=0;i<=100;i++) { num[i]=i; } for(int k=0;k<=100;k++) { if(num[k]%2==0||num[k]%5==0) {cout<<"BizzBazz"<<endl;} if(num[k]%2==0) {cout<<"Bizz"<<endl;} if(num[k]%5==0) {cout<<"bazz"<<endl;...
ALGO
0.999331
3.294564
ed2dbce0-db75-4346-a2fa-923016552e18
pi-rate14/C-codes
Coursera DSA Course/content/week3_greedy_algorithms/5_collecting_signatures/covering_segments.cpp
#include <algorithm> #include <iostream> #include <climits> #include <vector> using std::vector; struct Segment { int start, end; }; vector<int> optimal_points(vector<Segment> &segments) { vector<int> points; //write your code here for (size_t i = 0; i < segments.size(); ++i) { points.push_back(segments[...
ALGO
0.999938
4.70429
7a4d63e9-a97c-42e9-be59-97c9400cbc93
sourabh59-coder/CrackYourPlacement_Arsh_Goyal
14. Greedy/09. Min time to color rope/Approach1.cpp
class Solution { public: int minCost(string s, vector<int>& v) { int ans = 0; char prev = '1'; priority_queue<int,vector<int> ,greater<int>> qe; int n = s.length(); for(int i=0;i<n;i++) { if(prev!=s[i]) { while(qe.size()>1) ...
ALGO
0.999954
5.954606
34bbd5a1-4a91-42f1-ac4a-155feb67406b
arundeegutla/Programming-Team
Codeforces/D3/894/d.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<ll>; using vvi = vector<vi>; using vvvi = vector<vvi>; #define all(x) begin(x), end(x) void solve() { ll n; cin >> n; ll lo = 0; ll hi = 2648956421; ll ans = -1; while(lo <= hi){ ll mid = (lo+hi) >> 1; ...
ALGO
0.999718
4.073766
3861de59-59c7-46ee-a37a-1b56abb58fe8
Macesuted/Code
Codeforces/524F.cpp
/** * @file 524F.cpp * @author Macesuted (<EMAIL>) * @date 2022-06-07 * * @copyright Copyright (c) 2022 * */ #include <bits/stdc++.h> using namespace std; #ifndef LOCAL #define endl '\n' #endif bool mem1; #define maxn 2000005 int sa[maxn], rk[maxn], ork[maxn << 1], buc[maxn], id[maxn], val[maxn], sum[maxn],...
ALGO
0.999689
3.882354
55f4de01-9f12-4537-9aa8-6543752efb44
Lcbx/projet_air_hockey
Cadriciel/Sources/DLL/BoiteCollision.cpp
/////////////////////////////////////////////////////////////////////////////// /// @file BoiteCollision.cpp /// @author Carl-Vincent Landry-Duval /// @date 2016-09-28 /// @version 1.0 /// /// @addtogroup collision BoiteCollision /// @{ /////////////////////////////////////////////////////////////////////////////// #in...
TOOL
0.954014
4.767494
fffedb66-8329-48a0-9045-13bf5baca295
iamslash/learntocode
leetcode/InorderSuccessorinBSTII/a.cpp
#include <cstdio> class Node { public: int val; Node* left; Node* right; Node* parent; }; // // // 5 // / \ // 3 6 // / \ // 2 4 // / // 1 // // 1 2 // 2 3 // 3 4 // 4 5 // 5 6 // 6 N // 712ms 93.80% 84.5MB 100.00% class Solution { public: Node* i...
ALGO
0.999994
5.509339
b0b49cdb-5e80-41db-aa6d-e4b36b41da9c
jvargas714/data_structs_N_Algos
cpp/Algos/fib.cpp
#include <iostream> #include <chrono> #include "time.h" // time(NULL) #include <cstdlib> // rand() #include <vector> using namespace std::chrono; using namespace std; typedef unsigned int uint; typedef high_resolution_clock hrc; typedef hrc::time_point t_point; t_point t1_bub = hrc::now(); // b...
ALGO
0.998568
5.103333
b6e2cdff-7812-429f-b4bf-a2efd780497f
JellePiepenbrock/mlcvc5-LPAR
examples/api/cpp/strings.cpp
#include <cvc5/cvc5.h> #include <iostream> using namespace cvc5; int main() { Solver slv; // Set the logic slv.setLogic("QF_SLIA"); // Produce models slv.setOption("produce-models", "true"); // The option strings-exp is needed slv.setOption("strings-exp", "true"); // Set output language to SMTLIB2 ...
ALGO
0.97917
6.645566
ee9879d1-8dc7-43d4-b054-2cebf9b8eb12
druidream/competitive-programming
codeforces/1878/B/main.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define Rep(i, x, n) for (int i = x; i < n; i++) #define rev(i, n) for (int i = n - 1; i >= 0; i--) #define LSOne(S) ((S) & (-S)) #define roundUp(a, b) ((a + b - 1) / b) #define print(x) cout << x << '\n'; #define printBool(x) ...
ALGO
0.998575
4.702047
68b8f904-33eb-48c8-83d9-9567370a188e
ishandutta2007/codeforces
krk/normal/500/E.cpp
#include <cstdio> #include <algorithm> using namespace std; typedef pair <int, int> ii; typedef pair <ii, int> iii; const int Maxn = 200005; const int Maxm = 1048576; int n; int p[Maxn], l[Maxn]; int st[Maxm]; int R[Maxn]; int q; iii seq[Maxn]; int sum[Maxm]; int S[Maxn], slen; int res[Maxn]; void insertSum(int v, ...
ALGO
0.99993
3.865082
1c2a9235-9442-4ed3-acd1-1a2f69c056fd
Sovol3d/SV02-Source-Code-no-BL
Marlin/src/lcd/fontutils.cpp
/** * @file fontutils.cpp * @brief help functions for font and char * @author Yunhui Fu (<EMAIL>) * @version 1.0 * @date 2016-08-19 * @copyright GPL/BSD */ #include "../inc/MarlinConfig.h" #if HAS_SPI_LCD #include "ultralcd.h" #include "../Marlin.h" #endif #include "fontutils.h" uint8_t read_byt...
TOOL
0.86599
5.416433
b18c3b0f-e50b-45aa-970c-518e64563567
creativeYS/cimDevGroup_algorithm
yhj0122/16931.cpp
#include<iostream> #include<vector> class BoxGroup { private: std::vector<std::vector<int>> boxData; int surfaceWidth; int const sideWidthCalculator(int y, int x); bool isEdge(int y, int x) const; int getSideWidth(int y, int x, int my, int mx) const; int getEdgeSideWidth(int y, int x, bool targetFlag) const; ...
ALGO
0.99985
5.459326
7ce42f67-221a-445f-b627-d88b3f8f48f2
Badrmohamedragab/Final_Project_DEPI_HorizonX
HorizonX/horizonx/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.998702
6.76073
62d797fc-745e-4261-9b90-699ec810a2a9
HPC-AI-Team/lammps-fugaku-threadpool-sc23
src/BODY/fix_wall_body_polyhedron.cpp
// clang-format off /* ---------------------------------------------------------------------- Contributing author: Trung Dac Nguyen (<EMAIL>) ------------------------------------------------------------------------- */ #include "fix_wall_body_polyhedron.h" #include "atom.h" #include "atom_vec_body.h" #include "bo...
ALGO
0.973721
7.283692
cd432095-a65a-44e9-be3e-ddab617371b1
ronaldjuarez/garage
interview_questions/prog098_leetcode_273_number_to_english_word.cpp
#include <iostream> #include <string> #include <vector> #include <cmath> using namespace std; string threeDigitsToString(int num) { vector<string> tens{ "", "","Twenty","Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety" }; vector<string> unit_order{ "", "One", "Two", "Three", "Four", "Five", "Six", ...
ALGO
0.996948
6.033651
875aad16-2d04-4960-9543-85379975d121
usernameisavailablee/DigitalMediaProcessingAlgorithms
fourth_lab/canny/opencv/3rdparty/carotene/src/bitwise.cpp
#include "common.hpp" #include "vtransform.hpp" namespace CAROTENE_NS { #ifdef CAROTENE_NEON struct BitwiseAnd { typedef u8 type; void operator() (const uint8x16_t & v_src0, const uint8x16_t & v_src1, uint8x16_t & v_dst) const { v_dst = vandq_u8(v_src0, v_src1); } v...
TOOL
0.986528
6.675715
2540bf11-936e-4277-9731-336484ef3c1e
ishandutta2007/codeforces
sevlll777/normal/474/D.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <ctime> #include <cassert> #include <complex> #include <string> #include <cstring> #include <chrono> ...
ALGO
0.999928
4.898974
bdca6b81-ef20-4e83-81fa-3f057eb83530
aritra741/Competitive-Programming
Codeforces/Football.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; bool flag=0; cin>>s; int len=s.length(); int cnt=0; char point=s[0]; for(int i=0;i<len;i++) { if(s[i]==point) cnt++; else { point=s[i]; cnt=1; } ...
ALGO
0.999821
3.58867
5a37e693-3c6d-4f6e-a709-a477e8d5a2c7
TTTTao725/Randomized-Algorithm-project2
project2/.history/exercise4_20230411224813.cpp
#include <iostream> #include <vector> #include <random> using namespace std; //* key value pair structure struct key_value_pair { unsigned int key; int value; }; //* Hashing with chaining to maintain ||f||^2 exactly class HashTable { private: int TABLE_SIZE = pow(2,10); //* table size int hash_a; //*...
ALGO
0.997637
4.360492
0a5898ad-e1fd-4c97-9f17-84c9e675314e
nozhanb/temp_repository_for_codes
zingale/hm2e1pa.cpp
// I made a minor mistake but it took me quite some time figure my mistake out. The mistake was unit conversion from degree to radian. I figure // my mistake thanks to garcia's book! ... #include <iostream> #include <cmath> #include <string> #include <fstream> #include <cstdlib> using namespace std; // Global positi...
ALGO
0.995037
4.58521
19363969-15c8-4eeb-80c0-aa0671b77679
saamiyaahsan/LeetCode
0063-unique-paths-ii/0063-unique-paths-ii.cpp
class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) { vector<vector<int>>dp(obstacleGrid.size(),vector<int>(obstacleGrid[0].size(),0)); for(int i=0;i<obstacleGrid.size();i++) { for(int j=0;j<obstacleGrid[0].size();j++) ...
ALGO
0.999614
6.08177
8120316a-9183-42cc-ad06-7680dfdfe637
ilyagool/INF-LABS-PNRPU-IVT_22_1b_
2nd Semester/Difficult sorting methods/mergeSort/mergeSort.cpp
#include <iostream> #include <cstdlib> using namespace std; void merge(int arr[], int left, int mid, int right) { int leftRange = mid - left + 1; int rightRange = right - mid; int* leftArr = new int[leftRange]; int* rightArr = new int[rightRange]; for (int i = 0; i < leftRange; i++) { ...
ALGO
0.999923
4.550733
feb80535-84e1-4b14-b752-f152abd9f044
leeuihyun/baekjoon-gila-cpp
2667.cpp
#include<iostream> #include<algorithm> #include<vector> #include<queue> #define _CRT_SECURE_NO_WARNINGS using namespace std; int number; int arr[26][26]; bool visited[26][26]; int cnt; //รผ int dx[] = { -1,0,1,0 }; int dy[] = { 0,-1,0,1 }; vector <int> v; void bfs(int x, int y) { int res = 1; visited[x][y] = true; ...
ALGO
0.999913
3.00542
e0676643-1a9a-4cf8-8cd6-e84a309abe21
Shubham5213/30DaysOfFlutter
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
1672ebb2-f537-4fba-bf53-8ced2721aee3
HaiHell0/ase330_final_project
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
0d6e04be-23d7-40d2-8316-5614e3509c89
jaman24/Online-Contest
codechef/Starters 121 Division 2 (Rated)/Frequal.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; const ll N = 1000000; vector<ll> v; void SieveOfEratosthenes(int n) { bool prime[n + 1]; memset(prime, true, sizeof(prime)); for (int p = 2; p * p <= n; p++) { if (prime[p] == true) { for (int i = p * p; i <= n; i +...
ALGO
0.999945
4.682284
84c273c5-9076-4803-b4de-44de677e009e
day-dreams/algorithm-experiment
others/chapter3-rouse-matrix.cpp
/* ็Žซ็‘ฐ็Ÿฉ้˜ต,ไธ้œ€่ฆ้ขๅค–็ฉบ้—ด */ #include <iostream> int sum_i(const int &i, const int &n) { /* ่ฟ”ๅ›ž็ฌฌiๅœˆไน‹ๅ‰ไธ€ๅ…ฑๆœ‰ๅคšๅฐ‘ไธชๅ…ƒ็ด  */ return 4 * (i - 1) * (n - i + 1); } int loop_of(const int &i, const int &j, const int &n) { /* ่ฟ”ๅ›žๅฝ“ๅ‰ๅ…ƒ็ด ๅœจ็ฌฌๅ‡ ๅœˆ */ int x, y; if (i > n / 2) { x = n - i + 1; } else { x = i; } if (j > n...
ALGO
0.9997
3.991515
73fe88aa-023b-4de1-9068-7fee48483c6a
Akram878/DVFU
EX_C++/ะ’ั‚ะพั€ะพะน ัะตะผะตัั‚ั€/N3. Inner triangles/main.cpp
#include <iostream> using namespace std; long long computeCombination(long long n, long long k) { if (k > n) return 0; k = min(k, n - k); long long combination = 1; for (int i = 1; i <= k; ++i) { combination *= (n - k + i); combination /= i; } return combination; } int main() ...
ALGO
0.996081
5.191266
26031496-18e0-4677-9d6d-deb895f15a7d
thuang86714/leetCodeCpp3rd
1D_300_R_Longest_Increasing_Subsequence.cpp
/* Given an integer array nums, return the length of the longest strictly increasing subsequence . Example 1: Input: nums = [10,9,2,5,3,7,101,18] Output: 4 Explanation: The longest increasing subsequence is [2,3,7,101], therefore the length is 4. Example 2: Input: nums = [0,1,0,3,2,3] Output: 4 Example 3: Input: n...
ALGO
0.999974
5.974858
23144624-935f-4f0b-996c-8eaba4bcd319
hygoni/precise-leak-sanitizer
llvm/lib/Analysis/PHITransAddr.cpp
#include "llvm/Analysis/PHITransAddr.h" #include "llvm/Analysis/InstructionSimplify.h" #include "llvm/Analysis/ValueTracking.h" #include "llvm/Config/llvm-config.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Instructions.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Sup...
TOOL
0.944795
7.624691
23de80de-b4a4-4e86-8759-de7e67b5941e
hopo/hpCcpp
pmiz_exam-cpp/001_Introduction/06_swap-two-numbers/02/main.cpp
// without using temporary variables #include <iostream> using namespace std; int main() { int a = 5, b = 10; cout << "Before swapping." << endl; cout << "a = " << a << ", b = " << b << endl; /* a = a + b; // 15 = 5 + 10, a += b b = a - b; // 5 = 15 - 10, b = a-b a = a - b; // 10 = 15 - 5, a -= b */ a +...
ALGO
0.999794
4.24767
bf87234c-ac37-452b-b56c-abc3062a4e60
numan947/Curiously-Bored
cf459A.cpp
#include <bits/stdc++.h> using namespace std; /*Like set but has some more functionality: 1. Find kth smallest minimum 2. Find the index of an element Does these in O(log n) time How to use: ordered_set<type> ss; ss.insert(val); ss.insert(val); ss.insert(val); cout<<ss.ordere_of_key(val)<<endl; // number of...
ALGO
0.999779
3.53543
29dbcc3d-f5aa-4588-a2da-9e347755f1be
scott-eddy/libcxx
test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy.pass.cpp
// <algorithm> // template<InputIterator InIter, typename OutIter, class T> // requires OutputIterator<OutIter, InIter::reference> // && OutputIterator<OutIter, const T&> // && HasEqualTo<InIter::value_type, T> // OutIter // replace_copy(InIter first, InIter last, OutIter result, const T& old_val...
TEST
0.959211
6.089308
9ef01714-c3e5-4206-8d4f-958bf52e4464
mdkhyruzzaman/Phitron
2.XPSC/Week-1/Day-3/C_Word_Game.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n; cin >> n; map<string, vector<int>> persons; for (int p = 0; p < 3; p++) { for (int i = 0; i < n; i...
ALGO
0.998896
4.146451
47582132-2255-49bc-b103-ec051032e095
avocado8/Algorithm
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/2/12909.โ€…์˜ฌ๋ฐ”๋ฅธโ€…๊ด„ํ˜ธ/์˜ฌ๋ฐ”๋ฅธโ€…๊ด„ํ˜ธ.cpp
#include<string> #include <stack> using namespace std; bool solution(string s) { bool answer = true; stack<char>st; for(int i=0;i<s.length();i++){ if(s[i] == '('){ st.push(s[i]); //์™ผ์ชฝ ๊ด„ํ˜ธ๋ฉด push } else { // ์˜ค๋ฅธ์ชฝ ๊ด„ํ˜ธ๋ฉด if (st.empty()) { ...
ALGO
0.998931
5.293171
d5d5a5ac-a3cc-4b1a-9e6a-b7c1578a0f2a
bhavyawig/Competitive-Programming
Equal LIS codechef.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int lli; vector<lli> input(vector<lli> inputvector,lli endlimit) { for(lli i=0;i<endlimit;i++) { lli samplenumber; cin>>samplenumber; inputvector.push_back(samplenumber); } return inputvector; } int main() { lli ...
ALGO
0.999785
3.977108
2cdda053-1be5-42ac-9f57-ee14f95fb698
PrathamAsrani/GFG_POTD_CODES
Basic/Searching an element in a sorted array/searching-an-element-in-a-sorted-array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: // Function to find element in sorted array // arr: input array // N: size of array // K: element to be searche int searchInSorted(int arr[], int N, int k) { // Your ...
ALGO
0.999876
5.517109
a59334d9-f7df-4a1c-9adc-4f57277dc26d
Stepanda1/T-bank_AISD_decisions_2025
Graphs2/F_Transportation.cpp
#include <iostream> #include <vector> #include <queue> #include <limits> #include <tuple> using namespace std; const int INF = numeric_limits<int>::max(); const int64_t TRUCK_WEIGHT = 3000000; const int64_t CUP_WEIGHT = 100; const int MAX_TIME = 1440; struct Edge { int to; int time; int64_t max_weight; }...
ALGO
0.999953
5.426708
90865f37-b5ca-483a-9c72-2729202c1a2a
ashutoshvrm8/Codechef-Solutions-C-Cpp
Lighthouses.cpp
/* Ashutosh Verma - <EMAIL> Not sure, if this will work or not! */ #include<iostream> using namespace std; long long int MAX1=1000000000,MAX2=-1000000000; int main() { long long int t,n,i,x,y,b[4],min_x,max_x,min_y,max_y,temp1,temp2; cin>>t; while(t--) { for(i=0;i<4;i++) b[...
ALGO
0.999922
3.313211
160ab05c-f4dc-49a0-a2f5-dcbbb39d4d90
hyeongrokheo/baekjoon
solved/cpp/[4641] Doubles.cpp
#include <iostream> using namespace std; int main() { while (1) { int data[16]; int N = 0; while (1) { cin >> data[N]; if (data[N] == 0) break; if (data[N] == -1) return 0; N++; } int count = 0; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (data[i] * 2 == dat...
ALGO
0.999067
3.753039
17ed61f3-db31-4f7c-8502-91d498d021a1
VarunGovindB/NISER_Labworks_4b
07.cpp
#include <iostream> using namespace std; int reverse_function(int num) { static int rem, sum=0; if(num) { rem=num%10; sum=sum*10+rem; reverse_function(num/10); } else return 0; return sum; } int main() { int n; cout<<"PROGRAM TO PRINT REVERSE OF A NUMBER USING R...
ALGO
0.999697
4.569145
ab2462ed-b2f6-4883-bf05-9e96ae4824ed
Sachin5411/Algo-Practice-C-
buildbst.cpp
#include<iostream> using namespace std; #include<queue> class node{ public: int data; node* left; node*right; node(int d){ data=d; left=NULL; right=NULL; } }; node* buildtree(int *a,int s,int e){ if(s>e){ return NULL; } int mid=(s+e)/2; node*root=new node(a[mid...
ALGO
0.999931
4.782653
115b4dd4-4769-4d5f-b26b-3dc12fc89a0b
elyaishere/yandex_summer_algorithms_training_2
ะกะปะพะฒะฐั€ะธ ะธ ัะพั€ั‚ะธั€ะพะฒะบะฐ ะฟะพะดัั‡ั‘ั‚ะพะผ/B/B. ะ’ั‹ะฑะพั€ั‹ ะฒ ะกะจะ/solution.cpp
#include <iostream> #include <map> #include <string> #include <sstream> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); std::string input; std::map<std::string, int> res; while (std::getline(std::cin, input)) { std::string name; int count; std::is...
ALGO
0.998833
5.553535
d1849cea-a8c7-4086-9231-a1f9a3aa5f84
rhythmshandlya/450
Questions/pairSum/main.cpp
#include <iostream> #include <vector> #include <string> #include <unordered_map> #include <algorithm> using namespace std; typedef long long int lli; int getPairsCount(int arr[], int n, int k) { unordered_map<int, int> count; int ans = 0; for (int i = 0; i < n; i++) { int num = k - arr[i]; ...
ALGO
0.999453
4.985464
4afe880f-1659-47ea-95b7-98c044038701
SandeepKushwaha/CPP-Course-For-Absolute-Beginners
Introduction_to_programming/6_patterns/assignments/r.cpp
#include<iostream> using namespace std; // ================================================== // Complete the code for following pattern: // if n = 4 // // ABCDDCBA // BCDDCB // CDDC // DD // // constraints: 1 <= n <= 26 // // ================================================== int main() { int n; ...
ALGO
0.999916
5.48568
03a8159c-02bd-41eb-9817-2e6989c98278
ADITYAGABA1322/Daily-LeetCode-Challenge-Solution
2140-longest-subsequence-repeated-k-times/2140-longest-subsequence-repeated-k-times.cpp
class Solution { public: string longestSubsequenceRepeatedK(string s, int k) { // just simple approach for this lets tart with its about sibseq u knnow evry sub take it or not just simple like that we nned to check that if the string which is comes k times or not n sub seq if yea jsut return longest lexo s...
ALGO
0.999985
6.093007
c640a415-3ef5-4a7f-ba7e-98628917e3ae
CMaybe/BOJ
1182.cpp
#include <iostream> #include<algorithm> #include<string> using namespace std; int n,s,cnt=0; int arr[20]; void func(int idx,int sum){ if (sum==s)cnt++; for(int i = 1;i+idx<n;i++){ func(idx+i,sum+arr[i+idx]); } } int main() { std::cin.tie(NULL); std::ios::sync_with_stdio(0); cin >> n >>...
ALGO
0.999835
3.413359
3e79f3cc-30c7-498b-bca5-047e27b7cf72
Piyush289kumar/DSA
TCS/PYQ/OPTUS SHEET/2022/Q4.cpp
/* Q4: The Caesar cipher is a type of substitution cipher in which each alphabet in the plaintext or messages is shifted by a number of places down the alphabet. For example, with a shift of 1, P would be replaced by Q, Q would become R, and so on. To pass an encrypted message from one person to another, it is first ne...
ALGO
0.997924
5.897441
2336c86b-4159-44a3-94b4-6c4365cd59ed
linhanyu/ACM
NetFlow/3549.cpp
// // Created by Henry on 16/9/24. // #include <cstdio> #include <iostream> #include <vector> #include <algorithm> #include <memory> #include <queue> using namespace std; const int MAXV = 16; const int INF = 0x7FFFFFFF; int G[MAXV][MAXV]; int n,m; int level[MAXV]; //dicnic //struct edge { // int to, cap, rev; // ...
ALGO
0.999971
5.449813
501e1a3c-87d3-494b-af1c-17ecb025519f
thalyssonDEV/beecrowd
BeeCrowd C++/Iniciante/1073.cpp
#include <iostream> #include <math.h> using namespace std; int main(){ int N; cin >> N; for (int i = 1 ; i <= N ; i++){ if (i % 2 == 0){ int quadrado = pow(i,2); cout << i << "^" << "2" << " = " << quadrado << endl; } } }
ALGO
0.996817
3.893887
316750de-fd92-4867-9d5a-d838489eea44
theanshchaurasiya/PoTDcode
0992-subarrays-with-k-different-integers/0992-subarrays-with-k-different-integers.cpp
//}; //c class Solution { public: int subarraysWithKDistinct(vector<int>& nums, int k) { vector<int> f(nums.size() + 1, 0); int ans = 0; int l = 0; int r = 0; int cur = 0; while (r < nums.size()) { if (++f[nums[r++]] == 1) { k--; ...
ALGO
0.999926
6.338293
ebc53a2e-d51e-4f21-97da-86e603abea51
supermariogo/oa
vowel.cpp
#include <string> #include <iostream> #include <stdlib.h> #include <string.h> int inplace_remove(char *s){ int count=0; int insert=0; int len=strlen(s); int i=0; for(i=0; i<len; i++){ if(s[i] != 'a'){ s[insert] = s[i]; insert++; }else{ count++; /...
ALGO
0.987215
3.399552
ce3c8725-b655-4a44-9c35-88d524ceb84f
rafaelcunha02/DA2324_PRJ1_G15_4
src/System.cpp
#include "System.h" #include <string> #include <iomanip> using namespace std; /** * @brief Default constructor */ System::System() = default; void System::readAndParseNodes() { ifstream file("../data/Reservoir.csv"); string line; getline(file, line); while (getline(file, line)) { stringst...
ALGO
0.939851
3.530373
2be38b3a-5baf-4105-acb3-a017b04c9823
Striver-3110/Array
buy-sell.cpp
#include <iostream> #include <vector> #include <algorithm> // For min, max_element #include <climits> // For INT_MAX using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { int n = prices.size(); int mini = prices[0]; // Find the minimum price encountered so f...
ALGO
0.999936
6.420522
e9676a6f-db71-47c3-a205-a6354c1dfb48
ishandutta2007/codeforces
timsei/normal/1477/C.cpp
#include <bits/stdc++.h> using namespace std; const int N = 5e3 + 5; struct Po { int x, y; friend Po operator - (Po a, Po b) { return (Po){a.x - b.x, a.y - b.y}; } void input() { scanf("%d%d", &x, &y); } long long norm() { return 1LL * x * x + 1LL * y * y; } }P[N]; int n; bool vis[N]; long long mx; int ...
ALGO
0.999995
3.4216
34e69722-5a22-40ad-baa5-93826ef4b89f
dddsss3ddd/baekjoon_practice
boj4cpp/level_17/2981.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cmath> using namespace std; int fgcd(int a,int b){ return b? fgcd(b,a%b):a; } int main(){ int usrin ; cin>>usrin; int nums[100] = {0}; for(int i=0; i<usrin; ++i){ cin>>nums[i]; } sort(nums,nums+100,greater<int...
ALGO
0.999974
3.276218
cabce746-15f6-40db-801e-4f6db6c1e514
Nisha-Rana-16/ima-sdk
example/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.998905
6.785645
a88fdc46-32d3-4709-88eb-aa6a15ca746c
GartoxFR/pld-comp
compiler/main.cpp
#include <iostream> #include <fstream> #include <optional> #include <sstream> #include <cstdlib> #include <string_view> #include <variant> #include "BlockDependance.h" #include "BlockLivenessAnalysis.h" #include "BlockReordering.h" #include "ConstantFolding.h" #include "DeadCodeElimination.h" #include "EmptyBlockElimi...
ALGO
0.958375
6.185484
f4b091b8-ade9-4a18-be64-3661611daa73
ecell/ecell3
samples/Drosophila-cpp/FP21Process.cpp
#include "libecs.hpp" #include "ContinuousProcess.hpp" USE_LIBECS; LIBECS_DM_CLASS( FP21Process, ContinuousProcess ) { public: LIBECS_DM_OBJECT( FP21Process, Process ) { INHERIT_PROPERTIES( ContinuousProcess ); PROPERTYSLOT_SET_GET( Real, V3 ); PROPERTYSLOT_SET_GET( Real, K3 ); } FP...
ALGO
0.97033
5.568248
83fbc10f-aff7-465e-b02d-1637a1f10e52
sanjaysingh96/C_Documentation
Armstrong_number.cpp
//WAP to check given number is armstrong or not #include<stdio.h> #include<math.h> main() { int a,r,res=0,temp; printf("Enter Three Numbers : "); scanf("%d",&a); temp=a; while(a>0) { r=a%10; res=res+pow(r,3); a=a/10; } // printf("%d",res); if(res==temp) { printf("%d Number is Armstrong = %d",temp,res);...
ALGO
0.999923
3.237063
7ede7039-d9b2-4a5b-bf04-68cc8129aa50
sameer-19/Leetcode
2. Inorder Traversal - GFG/2.-inorder-traversal.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node* left; Node* right; Node(int val) { data = val; left = right = NULL; } }; // } Driver Code Ends /* A binary tree node has data, pointer to left child and a pointer t...
ALGO
0.999893
6.967903
8ba0f741-79da-4f74-a902-7383d3d8fe74
DungNguyenManh/Homework
Nhรกp/Add/find_in_array.cpp
#include <stdio.h> #define Max 100 #define Min 0 void Nhap_Kich_Thuoc_Mang(int &n); void Nhap_Mang(int a[], int n); void Xuat_Mang(int a[], int n); bool Check_Yeu_Cau(int a[], int n, int find); void Xuat_KQ(int a[], int n); int main() { int n, a[Max], find; Nhap_Kich_Thuoc_Mang(n); Nhap_Mang(a, n); Xu...
ALGO
0.999593
3.581289
b1d0e00b-2477-44a4-b8e9-0cc45297997b
ag19bhoomi/dsa
datastructuresandalgorithms/arraysquestions/unique.cpp
#include <iostream> using namespace std; //using XOR int findunique(int arr[],int size) { int ans=0; for(int i=0;i<size;i++) ans = ans^arr[i]; return ans; } int main() { int arr[9]={5,5,4,2,1,7,4,2,1}; cout<<"The unique NO. is: "<<findunique(arr,9)<<endl; return 0; }
ALGO
0.999707
4.318015
babee32c-ccf0-4790-a3aa-70d3b8fbd3a9
akmalns/cpp-oop
general/pointers-4.cpp
#include <iostream> int getMin(int numbers[],int size){ int temp=numbers[0]; if(size==1){ return temp; } for(int i=1;i<size;i++){ if(numbers[i]<temp){ temp=numbers[i]; } } return temp; } int getMax(int numbers[],int size){ int temp=numbers...
ALGO
0.999817
4.677528
1585a434-7762-4dc7-a774-cfbcc8e5f8c5
roytam1/gecko-kaios
intl/icu/source/i18n/collationrootelements.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_COLLATION #include "collation.h" #include "collationrootelements.h" #include "uassert.h" U_NAMESPACE_BEGIN int64_t CollationRootElements::lastCEWithPrimaryBefore(uint32_t p) const { if(p == 0) { return 0; } U_ASSERT(p > elements[elements[IX_FIRST_PRIMARY_INDEX]]);...
ALGO
0.982429
7.259431
e7529003-2f9a-4b68-8c97-5388d027af31
ShucunZhao/Leetcode
C++/08Stack&Queue/071SimplyPath/solwithStackStorePath.cpp
class Solution { public: string simplifyPath(string path) { stack<string> st; string str; stringstream ss(path); while(getline(ss, str, '/')){ if(str==".."){//KeyPoint: You must enter this if function when str is equal to ".." because we will add nothing ...
ALGO
0.999803
5.855354
96c787bf-5c8a-4ad2-ac5d-eef6927b6ceb
shubhamlokhande2147/CDAC-Buddy
C++/c++/Lab Session 10/Op_Overloading_sub.cpp
#include<iostream> using namespace std; class complex { int real,img; public: complex(); complex(int,int); void display(); complex operator+(complex&); complex operator-(complex&); complex operator-(); }; complex::complex() { real=img=0; } complex::complex(int real,int img) { this->real=real; this->img=img;...
ALGO
0.9629
3.831084
a7e940e1-85a2-4838-8e86-718f7bf9f546
avibega23/DATA-STRUCTURES-AND-ALGORITHMS
OLD PRACTICE/Daily DSA practice/January DSA Leetcode Problems/451. Sort_Characters_by_frequency.cpp
class Solution { public: string frequencySort(string s) { unordered_map<char,int> freq; for(auto it:s) freq[it]++; // map<char,int>freq; // for(auto it:s) freq[it]++; // vector<pair<char,int>> freqAns; // for(auto [ch,it]:freq) freqAns.push_back({ch,it}); /...
ALGO
0.999988
5.872347
c1d987f6-e8fb-465f-9915-3f9df02f5250
Kmalesh/QUEUE-DSA
Practice Question/linear_bool.cpp
#include<iostream> using namespace std; int main() { int arr[]={12,3,32,43,54,65,32,4}; int n=sizeof(arr)/sizeof(int); int search; cout<<"Enter the search Element:"; cin>>search; bool flag = false; for(int i=0;i<n;i++) { if(arr[i]==search) { flag=true; //tr...
ALGO
0.99767
3.301528
a04aa36c-dff0-483b-957c-7fb21640c09f
GrimFighter/leetcode
25-reverse-nodes-in-k-group/reverse-nodes-in-k-group.cpp
/** *Definition for singly-linked list. *struct ListNode { *int val; *ListNode * next; *ListNode() : val(0), next(nullptr) {} *ListNode(int x) : val(x), next(nullptr) {} *ListNode(int x, ListNode *next) : val(x), next(next) {} *}; */ class Solution { private: int getLength(ListNode *head) {...
ALGO
0.999989
5.495217
7c8a4ff0-a96d-4bb8-a115-87765f73583c
shunf4-assignment/shenjian-cpp-assignments
SJHomework5ArrayFirst/5-b4/5-b4.cpp
/* 1652270 2 หด */ #include <iostream> #include <iomanip> using namespace std; template <typename T> void printArrayInRank(T array[], int arrayLength) { int sameLevel = 0; for (int i = 0; i < arrayLength; i++) { if (i == 0 || array[i] != array[i - 1]) { sameLevel = i; } cout << array[i] << " " << sameLeve...
ALGO
0.999887
3.77855
19764c70-87f5-41ae-a927-e470901aac82
Oakware/Graph-Builder-2
DijkstraAlgo/dijkstraalgo.cpp
#include "dijkstraalgo.h" #include "AlgoPlugins/graphreset.h" #include <QBitArray> #include <vector> #include <queue> #include <limits> using namespace std; #define RIB_INF_WEIGHT 1000000 #define asleep() if(!sl->sleep(params.sleepTime)) return false; DijkstraAlgo::DijkstraAlgo(QObject *par): QObject(par) { sl = ne...
ALGO
0.987771
3.938855
37c67db4-2416-4f55-86ae-980de90d3e2b
rfuhrmann/CVProcessingChain
CVProcessingChain/DeblurAndrey94.cpp
#include "DeblurAndrey94.h" #include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <iostream> #include <math.h> using namespace cv; using namespace std; void computeDFT(const Mat &image, Mat *result); void computeIDFT(Mat *input, Mat &result); void wien...
ALGO
0.998036
4.040933
44db2c15-a51f-4ad1-98c5-bcbe0f912370
hasnat0006/CP_SOLUTION
YouKnowWhoAcademy/Phase 02/6. Basic String/15. Cyclic_Shifts.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include "D:\Documents\debug1.cpp" #else #define dbg(x...) #define dbgc(x...) #endif #define ll long long #define vf(v) (v).begin(), (v).end() #define vr(v) (v).rbegin(), (v).rend() const ll mod = 1e9 + 7; const ll inf = 1e18...
ALGO
0.999929
4.694011
0c4de85c-6dfd-40e5-9b40-4631323e1337
1234dtg/Course-Projects
CS 101/Lab02/fib_staircase.cpp
#include <simplecpp> main_program { int n = 1; int t0 = 0, t1 = 1; cin >> n; repeat(n) { repeat(t1) { cout << "*"; } cout << "\n"; t1 = t1 + t0; t0 = t1 - t0; } }
ALGO
0.999957
3.866272
93d9a95b-6dea-4dd3-ab4d-ffe2b70d5339
AlexanderDzhoganov/candy-js
fbx2obj2/dep/DetourCrowd/Source/DetourLocalBoundary.cpp
#include <float.h> #include <string.h> #include "DetourLocalBoundary.h" #include "DetourNavMeshQuery.h" #include "DetourCommon.h" #include "DetourAssert.h" dtLocalBoundary::dtLocalBoundary() : m_nsegs(0), m_npolys(0) { dtVset(m_center, FLT_MAX,FLT_MAX,FLT_MAX); } dtLocalBoundary::~dtLocalBoundary() { } void dtLoc...
ALGO
0.996738
6.605183
9515f4b4-e9b6-4dee-b69f-32de1ce2d152
Clement-Codes/Pratice
Algorithms/Sorting/Quick Sort/QuickSort.cpp
#include<iostream> using namespace std; int partition(int array[], int s, int l){ int current = s - 1; for(int i=s; i<l; i++){ if (array[i]<array[l]){ current++; int temp = array[i]; array[i] = array[current]; array[current] = temp; } } in...
ALGO
0.999996
4.699697
c2acf78c-567a-4f4b-a708-75fcc9357f5e
Just-a-dsb/Mess
c.cpp
#include<iostream> #include<cstring> #include<algorithm> #include<cstdlib> #include<vector> #include<ctime> #include<queue> using namespace std; const long long MOD = 998244353; string s; long long ans; struct stack{ int top; char c[10000008]; stack() { top = 0; memset(c,0,sizeof(c)); }...
ALGO
0.999975
4.592426
6fae69e8-645f-4012-80c4-839cce0c4b32
Nishant717/DSA
geekforgeeks/find_index.cpp
//{ Driver Code Starts #include <iostream> #include <bits/stdc++.h> #include <vector> using namespace std; // } Driver Code Ends class Solution { public: vector<int> findIndex(int a[], int n, int key) { int i; vector<int>b; for(i=0;i<n;i++) { if(a[i]==key) ...
ALGO
0.99991
6.051113
96281375-4b44-40e0-80d5-5153a0204eb0
lucic71/llvm-ub-free
libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy.pass.cpp
// <algorithm> // template<InputIterator InIter, OutputIterator<auto, InIter::reference> OutIter, class T> // requires HasEqualTo<InIter::value_type, T> // constexpr OutIter // constexpr after C++17 // remove_copy(InIter first, InIter last, OutIter result, const T& value); #include <algorithm> #include ...
TEST
0.972031
7.445424
83beff1f-5f1f-4961-bfdb-1608a1c5e0fd
minnce/codechef
sub1000/technex.cpp
#include <iostream> #include <bits/stdc++.h> #define ll long long #define pb push_back #define F first #define S second #define vt vector using namespace std; void solve() { int n; cin >> n; n*=1000; cout << ((n/2)/5) << endl; } int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); ll t...
ALGO
0.998964
4.126072
ca96f816-fe66-494d-a841-bb6758e678b8
willyPhelan/Programacion1-UTN
Unidad 3/Ejercicios/Ejercico Legajos.cpp
/* 25 Hacer un programa que permita ingresar el legajo y sueldo de 10 empleados y determine: - El legajo del empleado con mayor sueldo */#include <iostream> using namespace std ; int main() { int i, legajo, sueldo, sueldo_maximo, legajo_del_max ; for(i=1 ; i <= 10 ; i++){ cout << "Ingresar el nu...
ALGO
0.978058
3.396046
276b629e-d553-4367-931f-0abae4a0ba4e
oleg68/VirtualBox
src/VBox/Runtime/common/sort/shellsort.cpp
/* $Id$ */ /** @file * IPRT - RTSortShell and RTSortApvShell. */ /********************************************************************************************************************************* * Header Files ...
ALGO
0.999843
6.194414
00929ccf-4a0e-4525-a903-48b47b5516f0
sarvex/leetcode-fish
solution/0800-0899/0851.Loud and Rich/Solution.cpp
class Solution { public: vector<int> loudAndRich(vector<vector<int>>& richer, vector<int>& quiet) { int n = quiet.size(); vector<vector<int>> g(n); for (auto& r : richer) { g[r[1]].push_back(r[0]); } vector<int> ans(n, -1); function<void(int)> dfs = [&](in...
ALGO
0.999998
5.61165
fdf0ac57-ec8f-488d-9533-5fb69868f6ce
misaelmateus/problem-solving
WinterCamp/Day 6/G.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int T; cin >> T; while(T--){ int n, m, k; cin >> n >> m >> k; string s; priority_queue<int> pq; int ans = 0; for(int i = 0; i < n; i++){ cin >> s; int cont = 0; for(int j = 0; j < m; j++) cont += (s[j] == '*'); ans += cont; p...
ALGO
0.999908
3.575889
56f8de5d-1cf8-4105-88f2-65f8fbc3f80e
jenniferwx/LeetCode
N-QueensII.cpp
/* Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions. */ class Solution { public: bool check(int row, int* place) { for (int i = 0; i < row; ++i) { int diff = abs(place[i] - place[row]); if (diff =...
ALGO
0.999852
6.232646
9cad0173-4bfc-4e78-8fbc-85cd0114f66f
RitamPaul/Problem_Solving
1798-max-number-of-k-sum-pairs/max-number-of-k-sum-pairs.cpp
class Solution { public: int maxOperations(vector<int>& nums, int k) { unordered_map<int,int> mp; for(const auto &i : nums) ++mp[i]; int count=0; for(const auto &i : nums){ if(mp[i]){ --mp[i]; if(mp[k-i]){ ...
ALGO
0.99996
6.127373
9affd252-ab20-4939-b396-23d55abbc122
jonyroy/online-judge-problem-solutions
www.codeforces.com/165A.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; float n; map<float,int>a; for(int i=3;i<=400;i++) { float m=((float)(i-2)*180.0)/(float)i; a[m]=1; } scanf("%d",&t); while(t--){ cin>>n; if(a[n]==1) printf("YES\n"); else printf...
ALGO
0.999152
3.592831
fcb81bf3-e896-436d-8764-2c3458ad4c0c
lakshaykumar05/Data_Structures_and_Algorithms
Stack/Valid Parentheses.cpp
class Solution { public: bool isValid(string s) { stack <char> st ; unordered_map<char,char> hash = {{'{','}'},{'(',')'},{'[',']'}}; bool inser =false,exi = false; if(s.size()%2==0 && (s[0]=='{' || s[0]=='('|| s[0]== '[')) for(auto i : s) { bool t = tru...
ALGO
0.999764
6.177512
87cbebd5-0c84-40db-8769-ed9728c60e8c
GeekyPratham/ArrayCode
2dArray3/pascalsTriangle.cpp
// #include <iostream> // #include <vector> // using namespace std; // int main(){ // int numrows; // cout<<"enter the no of rows:"; // cin>>numrows; // vector<vector<int> > v; // for(int i=1;i<=numrows;i++){ // vector<int> a(i); // v.push_back(a); // } // for(int i=0;i<nu...
ALGO
0.997827
5.234881
9516552a-7ff4-486d-9cb7-1928c9b9a20d
LOVKUSH9888/LeetCode-Practice
LINKED-LIST/EASY/prob-1.cpp
// 206. Reverse Linked List /*Given the head of a singly linked list, reverse the list, and return the reversed list.*/ // NAive solution // TC= O(N) // SC= O(N) // Iterative - Way ==By using three Pointer approach === *prev, *curr, *temp // Reversively class Solution { public: ListNode *reverseList(ListNode *hea...
ALGO
0.999032
5.480781
10465d80-2e76-40cc-9460-69b1ccc1fa31
rashmi-thakurr/DSA-LeetCode
1137-n-th-tribonacci-number/1137-n-th-tribonacci-number.cpp
class Solution { public: int tribonacci(int n) { if (n==0) return 0; if (n==1) return 1; if (n==2) return 1; vector<int> dp(n+1); dp[0] = 0; dp[1] = 1; dp[2] = 1; for(int i=3;i<=n;i++){ dp[i] = dp[i-1] + dp[i-2] + dp[i-3];...
ALGO
0.999972
6.156882
b170d71b-4cb4-47ca-8ea1-f5a9b81f3f6e
waiwai444/oj
uva/11008 - Antimatter Ray Clearcutting/11008.cpp
#include <stdio.h> #include <string.h> #include <queue> int n, m; struct tree_t { int x, y; } trees[16]; struct line_t { int a, b, c; int flag; int nt; } lines[120]; int line_num; struct queue_elem_t { int flag; int nt; int nl; }; bool visited[65536]; void get_lines() { int i, j, k, l; int collinear[16],...
ALGO
0.999932
4.76147
37838d08-4d6b-44c6-9898-e4ff577fb178
keywet06/code
CF/CF1535D.cpp
#include <bits/stdc++.h> const int N = 1000005; int k, n, q, x, y, c; int a[N]; std::string s, s1; int main() { std::ios::sync_with_stdio(0); std::cin.tie(0), std::cout.tie(0); std::cin >> k; std::cin >> s; for (int i = 0; i < 1 << k - 1; ++i) a[i] = 1; x = 1 << k - 1; for (int i = k - 2...
ALGO
0.999967
4.091763
90a75816-146b-431a-b2e1-8d20893d7218
1dayac/cloudrnaSPAdes-release
assembler/ext/src/llvm/StringRef.cpp
#include "llvm/ADT/StringRef.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/edit_distance.h" #include <climits> #include <bitset> using namespace llvm; const size_t StringRef::npos; static char ascii_tolower(char x) { if (x >= 'A' && x <= 'Z') return x - 'A' + 'a'; return x; } static char ascii_toupper...
TOOL
0.954039
7.563683
9de1ff27-c074-49ce-8eb3-247c5b54d717
pezy/159201
forPezy/as1/assignment1_reading_pezy_version.cpp
//159201 assignment 1 skeleton //You need to add your own AddNode and PrintLL functions, as well as an AddMatrices function // #include <stdio.h> #include <stdlib.h> struct Node { //declaration int row; int column; int value; Node *next; }; Node *A, *B; //declaration int row = 0, col = 0; void add_node(Node* &...
ALGO
0.986835
3.707068