uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
85c7fe4f-45a8-4750-8b86-22311a3567ca
Jashimjnn/CppProject
phitron1.cpp/Algorithm/DSU/Dsu.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; typedef long long ll; #define Y cout << "YES" << endl; #define N cout << "NO" << endl; const int X=1e5+5; int par[X]; void dsu(int n) { for(int i=0;i<n;i++) { par[i]=-1; } par[1]=3; par[2]=1; } int find(int nd) { if(par[nd]=...
ALGO
0.999974
4.272788
bba79295-6bcb-44f1-91cc-43553588b05b
StefanVNikolov/OhloneCS102
Class_09/Lab_6B/StefanNikolov-Lab06B-2.cpp
// This program uses reference variables as function parameters. #include <iostream> using namespace std; // Function prototypes. Both functions use reference variables // as parameters. int getNum() { int userNum = 0; cout << "Enter a number: "; cin >> userNum; return userNum; } //*********************...
TOOL
0.988754
6.417762
b553b8d8-3a74-4429-8653-5e9263488942
Ajay-ee13/CSES-problems
Introductory Problems/2.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int ans = 0; for (int i = 1; i < n; i++) { int num; cin >> num; ans = ans ^ num ^ i; } cout << (ans ^ n); }
ALGO
0.999975
3.797898
7abef7fe-a075-4ddd-8a95-86f4215f2511
sarvex/leetcode-free-pascal
solution/0300-0399/0386.Lexicographical Numbers/Solution.cpp
class Solution { public: vector<int> lexicalOrder(int n) { vector<int> ans; int v = 1; for (int i = 0; i < n; ++i) { ans.push_back(v); if (v * 10 <= n) v *= 10; else { while (v % 10 == 9 || v + 1 > n) v /= 10; ...
ALGO
0.999939
6.914057
463d9ba6-3f66-4584-b54a-10aba4314144
BBBBchan/C_CPP_ACM
杂/20190705E.cpp
#include <cstdio> int a[305]; int main(int argc, char const *argv[]) { int n, k; scanf("%d %d", &n, &k); for(int i = 0; i < n; i++) scanf("%d", &a[i]); long long now = 0, now_pos = -1, now_min = 100000002, temp = k, ans = 0; for(int j = 0; j < n; j++){ for(int i = 0; i < temp; i++){ if(a[i] < now_min){ ...
ALGO
0.999958
3.332748
03537e7a-8e78-4c59-9ffc-1f110b26a0ae
Toyhom/tyh-learn-git
datastu/实验报告/树-前序-中序-后序-层序遍历.cpp
#define LIST_INIT_SIZE 100 #define LISTINCREMENT 10 #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define OVERFLOW -2 using namespace std; typedef int Status; typedef char ElemType; #include <algorithm> #include <iostream> #include <malloc.h> #include <stdio.h> typedef struct BiT...
ALGO
0.999924
3.686846
66793e16-5bb3-47a2-a9d6-9f4132745fa1
fujitsu/compiler-test-suite
C++/0000/0000_0040.cpp
#include <iostream> #include <vector> using namespace std; #define N 50 #define N2 30 #define Answer 435 #define ELEMENT_TYPE long long int void func2(vector<ELEMENT_TYPE> &vec1, vector<ELEMENT_TYPE> &vec2) { (vec1).swap(vec2); } void func1(vector<ELEMENT_TYPE> &vec1, vector<ELEMENT_TYPE> &vec2) { func2(vec1,vec...
ALGO
0.9993
3.204896
a3317551-990e-4f9a-abe1-776e9cb7269e
shcho-kr/Programming_Contest
baseGraph.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <vector> #include <queue> #include <set> #define ll long long using namespace std; // DFS, BFS with adjacent(linked) list : O(V+E) // with adjacent matrix : O(V^2) class Graph{ public: int N; // nodes vector<vector<int...
ALGO
0.999554
4.703755
7a2c2d46-b042-48a3-b11b-c2b7d5d5addc
SQRBEAN/2023aaib3
week12/week12-5.cpp
#include <iostream> using namespace std; int a[100][100]; int main(){ int T,N,now; char c,c2; cin>>T; for(int t=1;t<=T;t++){ cin>>c>>c2>>N; for(int i=0;i<N;i++){ for(int j=0;j<N;j++){ cin>>a[i][j]; } } int bad=0; for(int i=0;i<N;i++){ for(int j=0;j<N;j++){ if(a[i][j]<0)bad=1; if (a[i]...
ALGO
0.994922
3.86361
86606ae2-79df-4444-bfd9-e7358ffc9134
ehnryx/acm
xxi-samara-cf102916/e.cpp
#include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES //#define FILENAME sadcactus #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_u...
ALGO
0.999941
4.902763
47b7adc6-c543-4987-9f3f-6699fd33e1a8
ApolloMonasa/DS
Algorithm_AND_DataStructure/Class/25.lgB3629.cpp
/************************************************************************* > File Name: 25.lgB3629.cpp > Author: > Mail: > Created Time: Tue 11 Feb 2025 11:03:49 AM CST ************************************************************************/ #include<iostream> using namespace std; long long n; //1 2 3 4 5 6 7...
ALGO
0.999965
4.03627
9454bfc4-795e-48bb-8ee6-fee09478c1b2
Kawser-nerd/CLCDSA
Source Codes/AtCoder/abc019/C/4652272.cpp
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define rep(i, a, b) for (int i = (a); i < (b); +...
ALGO
0.99994
4.668309
cab052ec-3e31-4691-ab71-03962db36d25
JatinGarg19/Leetcode-Coding-Problems
0020-valid-parentheses/0020-valid-parentheses.cpp
class Solution { public: bool isValid(string s) { stack<char> st ; for (int i = 0 ; i< s.length() ; i++) { char ch = s[i]; // if opening bracket then push into the stack if (ch == '(' || ch == '{' || ch == '[') { st.push(ch) ; ...
ALGO
0.999488
6.264748
5f74ceb8-7a2d-4c1f-80ed-5e0eda8b18de
luhsra/melf-linker
src/libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp
// <algorithm> // template <class InputIterator, class Predicate> // constexpr bool // constexpr after C++17 // any_of(InputIterator first, InputIterator last, Predicate pred); #include <algorithm> #include <cassert> #include "test_macros.h" #include "test_iterators.h" struct test1 { TEST_CONSTEXPR ...
TEST
0.884871
7.202626
dcff04e1-ea3f-484d-9e2e-6ae028580be9
Rotzen823/Problemas-de-Programacion-Competitiva
ICPC SWERC/2018-2019 ICPC Southwestern European Regional Programming Contest (SWERC 2018)/H - Travel Guide.cpp
//Pura gente del coach moy #include <bits/stdc++.h> #define MOD 1000000007 #define MAX 1005 #define ENDL '\n' #define INF 1000000000 #define fi first #define se second using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector <int> vi; typedef vector<ii> vii; struct Grafo{ int V; ...
ALGO
0.99995
4.070384
7eb3a3c0-7249-42d9-9adb-0493be01b5d9
sonianuj287/CodingQuestions-leet-gfg-cc-cf-ib-
Kth row of pascal Triangle-Leetcode-AnujSoni.cpp
class Solution { public: vector<int> getRow(int n) { vector<vector<int>> dp(n+1,vector<int>(n+1,0)); for(int i=0;i<n+1;i++) dp[i][0] = 1; for(int i=0;i<n+1;i++) dp[i][i] = 1; for(int i=1;i<n+1;i++){ for(int j=1;j<n+1;j++){ if(i>=j)...
ALGO
0.999966
5.142872
048f7355-7ac2-4822-9715-ba0a9e4fa253
ishandutta2007/codeforces
vercingetorix/normal/1591/A.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <ctype.h> #include <queue> #include <cstring> #include <set> #include <bitset> #include <map> #include <chrono> #include <random> #include <unordered_map> #include <stdio.h> using namespace std; typedef long long ll; typedef long do...
ALGO
0.999767
4.291083
8571aea1-9aed-4403-9059-b1534a5ebc04
seantalts/cppperf
lib/eigen/unsupported/doc/examples/MatrixPower_optimal.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { Matrix4cd A = Matrix4cd::Random(); MatrixPower<Matrix4cd> Apow(A); std::cout << "The matrix A is:\n" << A << "\n\n" "A^3.1 is:\n" << Apow(3.1) << "\n\n" "A^3.3 is:\n" << Apow(3.3) << "\n\n" ...
ALGO
0.996981
3.396939
3c7f5478-688c-4324-b50e-43079f5153b2
busebd12/InterviewPreparation
LeetCode/C++/General/Medium/ShortestDistanceToTargetColor/solution.cpp
#include <algorithm> #include <set> #include <unordered_map> #include <vector> using namespace std; class Solution { public: vector<int> shortestDistanceColor(vector<int> & colors, vector<vector<int>> & queries) { vector<int> result; int c=colors.size(); ...
ALGO
0.999591
5.819834
f6021eab-a967-4699-b3da-3d497c3565c0
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12666_9.cpp
#include <bits/stdc++.h> using namespace std; const int MAX_P = 3200; bool primes[MAX_P + 1]; int gen_primes(int maxp, vector<int> &pnums) { memset(primes, true, sizeof(primes)); primes[0] = primes[1] = false; int p; for (p = 2; p * p <= maxp; p++) if (primes[p]) { pnums.push_back(p); for (int q...
ALGO
0.99984
3.673426
14e20d63-5a97-4b66-b976-6db49b609f1a
shweaye810/project_euler
divisor/divisor.cpp
#include "divisor.h" using namespace std; Divisor::Divisor() : has_mcbl(0), num(0), sm(0), mcbl_num(-1) { dvsr.push_back(0); } Divisor::Divisor(int n) : has_mcbl(0), num(n), sm(0), mcbl_num(-1) { for (int i = 1; i < num; i++) { if (num % i == 0) dvsr.push_back(i); } for (auto itr ...
TOOL
0.99238
4.262503
8efbcceb-bdd7-4c0d-a9af-e80e1d7b90ba
Web3Expert47/faceRecognition
src/main/resources/opencv/sources/samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
/** * @file MatchTemplate_Demo.cpp * @brief Sample code to use the function MatchTemplate * @author OpenCV team */ #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <iostream> using namespace std; using namespace cv; /// Global Variables bool use_mask; Mat im...
ALGO
0.95431
6.737647
c64b9f48-0bfd-45e7-a744-2549d8eed157
jonK341/MasterNoder2
src/crypto/hmac_sha512.cpp
#include "crypto/hmac_sha512.h" #include <string.h> CHMAC_SHA512::CHMAC_SHA512(const unsigned char* key, size_t keylen) { unsigned char rkey[128]; if (keylen <= 128) { memcpy(rkey, key, keylen); memset(rkey + keylen, 0, 128 - keylen); } else { CSHA512().Write(key, keylen).Finalize(...
ALGO
0.933557
5.684288
58df1325-b2ee-41ff-b230-0aabda6b8af4
ishandutta2007/codeforces
vepifanov/normal/337/D.cpp
#include <cstdio> #include <numeric> #include <iostream> #include <vector> #include <set> #include <cstring> #include <string> #include <map> #include <cmath> #include <ctime> #include <algorithm> #include <bitset> #include <queue> #include <sstream> #include <deque> using namespace std; #define mp make_pair #define ...
ALGO
0.999862
4.367168
08c62dce-caf3-445d-b315-0655299c06da
stamcenter/llvm-zeno
mlir/lib/Parser/TypeParser.cpp
#include "Parser.h" #include "mlir/IR/AffineMap.h" #include "mlir/IR/BuiltinTypes.h" #include "mlir/IR/TensorEncoding.h" using namespace mlir; using namespace mlir::detail; /// Optionally parse a type. OptionalParseResult Parser::parseOptionalType(Type &type) { // There are many different starting tokens for a type...
TOOL
0.921354
5.65723
4c4c21bf-4136-4b25-9086-bf3cb20105e9
Vis-2001/InterviewBit
easy/Strings/LengthOfLastWord.cpp
#include<stdio.h> #include<iostream> #include<bits/stdc++.h> using namespace std; int res(string A){ int ans=0; int cur=0; for(auto x:A){ if(x==' '){ if(cur!=0){ ans=cur; } cur=0; } else{ cur++; } } if(cu...
ALGO
0.999627
3.495329
c145200d-3e76-406f-b6f1-cb4cb1ac4b9d
tklenze/monosat-ctl
api/Monosat.cpp
#include "utils/ParseUtils.h" #include "utils/Options.h" #include "core/Solver.h" #include "core/Config.h" #include "simp/SimpSolver.h" #include "graph/GraphTheory.h" #include "geometry/GeometryTheory.h" #include "fsm/FSMTheory.h" #include "ctl/CTLTheory.h" #include "pb/PbTheory.h" #include "bv/BVTheorySolver.h" #incl...
ALGO
0.998973
6.195314
f8db6485-e1a1-43d9-a9c5-54abcb1e6eec
moevm/oop
7383/Khanova_Yulya/lab3/lr3_list.cpp
#include <assert.h> #include <algorithm> #include <stdexcept> #include <cstddef> namespace stepik { template <class Type> struct node { Type value; node* next; node* prev; node(const Type& value, node<Type>* next, node<Type>* prev) : value(value), next(next), prev(prev) { } }; templat...
TOOL
0.942196
4.115844
a671b2fd-5f33-453a-8b54-1863873f38d3
arunkp1986/Kindle
framework/gem5/src/systemc/tests/systemc/misc/v1.0/dash6/pulse.cpp
/***************************************************************************** pulse.cpp -- Implementation of the pulse generator. Original Author: Ali Dasdan, Synopsys, Inc. *****************************************************************************/ /*****************************************************...
TOOL
0.900191
6.291791
dedccd7c-8143-43b0-a101-7d8176fbd66b
shoaibrayeen/Programmers-Community
Data Structure/Linked List/Insertion and Deletion in Linked List/SolutionByYuvika.cpp
#include<iostream> using namespace std; template<class T> class SNode { public: T info; SNode *next; }; template<class T> class SList { private: SNode<T> *head; public: SList() { head=NULL; } void callMergeSort(); bool isEmpty(); int length(); SNode<T>* initialize(T); boo...
ALGO
0.999657
4.235725
ef75b068-16d0-469d-9b6d-a89bad3c1bfd
shubham-zsh/LB_Assignment
Assignment_24/24_2.cpp
#include<iostream> using namespace std; class Ascii { public: char Char1; public: Ascii(char X) { Char1 = X; } bool ChkCapital() { if(Char1 <= 'A' && Char1 >= 'Z') { return true; } else ...
TOOL
0.984056
4.753653
69b66201-889f-4e34-927f-407ea5a96279
jordandong/mylintcodes
LINT_00421_SimplifyPath.cpp
/* Given an absolute path for a file (Unix-style), simplify it. Have you met this question in a real interview? Yes Example "/home/", => "/home" "/a/./b/../../c/", => "/c" Challenge Did you consider the case where path = "/../"? In this case, you should return "/". Another corner case is the path might contain multi...
ALGO
0.999832
5.949841
cd5e98b2-aa28-4ef1-bd94-18f0e4246449
ogbuluhouse/CECS-130-Work
Lab10/OgbuluIsaiahCECS130Lab10.cpp
#include <stdio.h> #include <iostream> #include <stdlib.h> #include <time.h> // Isaiah Ogbulu, 4/12/2019, Lab 10, 3D Tic-Tac-Toe With Ai using namespace std; class Cell{ //creating class for each cell of tic-tac-toe board private: public: void changeCell(char); char cellChar; ...
ALGO
0.935993
4.689728
eac94be6-3773-40b4-808c-412e559f979f
SaiTp/LeetCode-Codes
1361-validate-binary-tree-nodes/1361-validate-binary-tree-nodes.cpp
#include <vector> #include <deque> #include <unordered_set> class Solution { public: bool validateBinaryTreeNodes(int n, std::vector<int>& leftChild, std::vector<int>& rightChild) { std::deque<int> queue; // Create a queue for BFS traversal. std::unordered_set<int> visited; // Create a set to track...
ALGO
0.999961
7.513343
d72f3728-2d3a-45a8-918a-0b4863b58f82
Neriston/Programming
3 Term (Only Algo)/1 Contest/A.cpp
#include <iostream> #include <vector> void PrefixSum(std::vector<int64_t>& values) { for (size_t i = 2; i < values.size(); ++i) { values[i] += values[i - 1]; } } std::istream& operator>>(std::istream& is, std::vector<int64_t>& vector) { for (size_t i = 1; i < vector.size(); ++i) { is >> vector[i]; } ...
ALGO
0.999969
4.731126
46e5c582-09f8-4c8e-89d5-143ed6540f3e
DMHLearning/dmhlearning.github.io
hworks/algo/home3/Task2_time_addition.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <chrono> #include <ctime> #include <iomanip> #include <string> #include <sstream> void main() { std::time_t currentTime = std::time(0); int p, q, r; std::cin >> p >> q >> r; std::ostringstream oss; currentTime += (r); currentTime += (60 * q); cur...
ALGO
0.938557
4.345104
8298418e-21b7-4d7f-be66-cbb803691b48
omggga/npapi-crypto-plugin
src/3rdParty/boost/libs/serialization/src/extended_type_info.cpp
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // extended_type_info.cpp: implementation for portable version of type_info // See http://www.boost.org for updates, documentation, and revision history. #if (defined _MSC_VER) && (_MSC_VER == 1200) # pragma warning (disable : 4786) //...
TOOL
0.917698
6.691643
99c14eaa-5028-4c4d-ae59-274ccf9ccf19
mikoval/Renderer
Examples/Pong/main.cpp
#include <iostream> #include <math.h> #include "core.h" #include <vector> #include "game_object.h" #include "game_rect.h" #include "game_circle.h" #include <algorithm> #include <stdlib.h> #include <sys/time.h> #include <stdio.h> #include "playerContactListener.h" #include "core_pong.h" #include <Renderer/text.h> ...
TOOL
0.9486
4.44158
d81f476a-6eea-45be-b802-18add70a5195
luteresa/my_cpp
cpp5/c++primer_5th_source_code_vs2012/11/erasemap.cpp
#include <map> using std::map; #include <string> using std::string; #include <iostream> using std::cin; using std::cout; using std::endl; int main() { map<string, size_t> word_count; // empty map from string to size_t string word; while (cin >> word) ++word_count[word]; string removal_word = "t...
ALGO
0.979821
5.10129
13b3f428-3f85-4ac4-be8d-bf06e05b824d
Satwikloka/todo_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.998762
6.786404
b59e93f6-38c0-4686-a149-ab60ef598621
rshankar1069/MinSurf_Source
Eigen/doc/examples/Tutorial_ArrayClass_cwise_other.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXf a = ArrayXf::Random(5); a *= 2; cout << "a =" << endl << a << endl; cout << "a.abs() =" << endl << a.abs() << endl; cout << "a.abs().sqrt() =" << endl << a.abs().sqrt() << endl...
ALGO
0.981799
3.130341
9c468835-5b1e-4590-a4ef-42f435e71e80
RouthieCoding/C-plus-plus
repos/Magic/Magic/Magic.cpp
//Ryan Routhier //05/22/2019 // MagicSquare.cpp week 2 assignment //CIS 1202 /*This program takes a input text file (inputText.txt) and uses that data to make magic squares. A magic square is a square that all rows, columns and diagonal lines equal the same total. All true and imposter magic squares will be marked acco...
ALGO
0.979146
4.707836
e6a9daf0-0d68-4343-b6ad-a494380735b9
PrajjvalD/Interview-QnA
Ashish/FindMinMaxFromArray.cpp
#include <iostream> using namespace std; int main() { int arr[] = {12, 121, 32, 43, 432}; int n = sizeof(arr) / sizeof(arr[0]); if (n == 0) { cout << "Array is empty." << endl; return 0; } int min = arr[0]; int max = arr[0]; for (int i = 1; i < n; i++) { if (a...
ALGO
0.999765
4.404042
a1a59fb2-f835-4e0a-ae85-ce5dace6b04d
PawanKmr470/DSA_Practice_Set
DSA_CPP/10_Problems/DP16_CoinChange1_Sol2.cpp
#include <iostream> #include <vector> #include <limits.h> using namespace std; // Simplified version of DP15_CoinChange1_Sol1.cpp // REF : https://leetcode.com/problems/coin-change/description/ // NOTES : // Question is - Return min number of coins to make up the given amount. // Based on Unbounded Kna...
ALGO
0.999859
5.918317
fcd5da58-ac0e-450b-a95a-9032d84a8754
bjpark0805/Problem_solvings
examples/programmers_캐시.cpp
#include <string> #include <vector> using namespace std; string to_lower_alphabet(string s){ string new_s = ""; for(int i = 0; i < s.size(); ++i){ if(s[i] >= 'A' and s[i] <= 'Z'){ new_s += s[i] + 32; } else{ new_s += s[i]; } } return new_s; } int...
ALGO
0.999929
4.976651
d1b9ed80-488a-4c03-b236-3265828e36f1
amanthaband/programming
c++/cses/movie festival.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> movies(n); for (int i = 0; i < n; ++i) { cin >> movies[i].first >> movies[i].second; } sort(movies.begin(), movies.end(), [](auto& a, auto& b) { ...
ALGO
0.99996
5.667192
39a17cb1-9987-46e8-8bc2-d32e71f8f262
maestron/botnets
VirusPack/Phatbot-stoney1/config.cpp
#include "main.h" #include "bot.h" #include "mainctrl.h" #include "smtp_logic.h" #include "utility.h" #include "config.h" char *g_szSectionName=SECTION_NAME; list<scriptcmd> g_lScriptCmds; bool ParseScript(const char *szScript) { CString sScript(szScript); bool bGetScript=false; unsigned long lScriptType; int iLi...
TOOL
0.852932
3.958306
d29390da-ff66-4ec1-8b32-c1b1f4e5afa1
jim-bug/school-coding
Cpp/esercizi classe/Esercizi compito classrom vettori e funzioni/esercizio9.cpp
#include <iostream> using namespace std; void mysorting(int[], int); void swapping(int*, int*); int main(){ // Scrivere una funzione che prende in input un vettore e lo ordina (usare la funzione dell’esercizio 8): int len; cout << "Inserisci la lunghezza del vettore: "; cin >> len; int vector[len]; ...
ALGO
0.999837
4.29748
b6180ca5-dca8-47f3-8a49-333f9af64865
navid-ebrahimi/IUST-CP-Assignments
HW8/Roham_and_friends.cpp
#include <bits/stdc++.h> using namespace std; #define fast_ext ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, m, s, t; int bfs(int start, vector<vector<int>>& adj) { queue<int> q; vector<bool> visited(adj.size(), false); vector<int> depth(adj.size(), 0); q.push(start); visi...
ALGO
0.999871
4.941295
49c9bc25-b0fc-4d77-a65f-8eed2b115f3b
Singh-Amarjot/learnYard_DSA
fundamental practice problems/Binary search/target in sorted rotated array.cpp
// https://leetcode.com/problems/search-in-rotated-sorted-array/ // class Solution { // public: // int bsHelper(vector<int>& nums, int target,int l ,int r){ // int last_Ele = nums[r]; // while(l<=r){ // int mid = (l+r)/2; // // selecting the right region for bs // if(target>l...
ALGO
0.99998
6.459895
e3199e25-4669-47ea-9224-3db19cc2e9e5
mesh-engine/meshengine
thirdparty/bullet/BulletSoftBody/btDeformableMultiBodyDynamicsWorld.cpp
/* ====== Overview of the Deformable Algorithm ====== */ /* A single step of the deformable body simulation contains the following main components: Call internalStepSimulation multiple times, to achieve 240Hz (4 steps of 60Hz). 1. Deformable maintaintenance of rest lengths and volume preservation. Forces only depend o...
ALGO
0.999791
7.095664
ec40c5f5-2a75-431c-af90-3b398a02cbb8
DysonHoang/Tin-Hoc
s1-s13/s3/main.cpp
#include <bits/stdc++.h> using namespace std; int a,b; int tonguoc(int x){ int t=0; for(int i=1;i<=x/2;i++) if(x%i==0) t=t+i; return t+x; } int main() { cout<<"A= "; cin>>a; cout<<"B= "; cin>>b; cout<<"tong cua tong uoc hai so la: "<<tonguoc(a)+ tonguoc(b)<<...
ALGO
0.999403
4.772881
d33e6369-6eeb-415b-8787-ac819ed760b3
moneyspb/1.aquamarine
main6.cpp
#include <iostream> #include<math.h> using namespace std; int main() { setlocale(LC_ALL, "Russian"); double a, b, c; cout << "Введите a" << endl; cin >> a; cout << "Введите b" << endl; cin >> b; cout << "Введите с" << endl; cin >> c; if (a == 0) // лин. ур. { ...
ALGO
0.999806
3.694589
8562a660-f983-4870-bfbd-9ad5cf4822a8
984727216/oj1
UVA/11428/11072778_AC_0ms_0kB.cpp
#include <iostream> #include <cstring> #include <cstdio> using namespace std; const int maxn = 10005; typedef long long ll; int search(int n, int y){ ll l = y + 1, r = y + maxn, x, k; while(l <= r){ x = (l + r)/2; k = (x - y)*(x*x + y*y +x*y); if(k == n) return x; else if(k < n) l = x + 1; else if(k > n)...
ALGO
0.999929
3.525312
29b23a1d-02d2-42eb-9c3d-32ffb684e964
MahinAshraful/CodeWatch_Data
sample-data/p00006/s822239120.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int,int> pii; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define all(a) (a).begin(),(a).end() #define pb emplace_back #define INF (1e9+1) int main(){ string s; cin>>s; reverse(all(s)); cout<<s<<endl; }
ALGO
0.999935
4.06286
a77cd4ce-8c07-4cf5-80d6-f82366aeca5f
verif/leetcode
insertIntervals/t.cpp
/* Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Example 1: Given intervals [1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9]. Example 2: Given...
ALGO
0.999827
6.337478
834546cd-0fed-42ce-a261-030956ee81ce
parik-shit/CPP
Array/ReverseAnArray.cpp
/* //SIMPLE REVERSE ARRAY #include <iostream> using namespace std; void reverse(int arr[] , int size){ int start = 0; int end = size - 1; while( start <= end){ swap(arr[start] , arr[end]); start++; end--; } } void printArray(int arr[] , int size){ for(int i = 0 ; i < size ; i++){ cout<<arr[i]<< " "; } } ...
ALGO
0.999513
4.632881
43d9e108-c2a0-4e18-8bee-7cdcbff85eac
vandreas19/POJ_sol
2211/9310238_AC_32MS_164K.cpp
#define _CRT_SECURE_NO_WARNINGS #include<cstdio> const int N_MAX=12; int main(){ int factorial[N_MAX]={1}; for(int i=1;i<N_MAX;i++) factorial[i]=factorial[i-1]*i; int caseNum; scanf("%d",&caseNum); for(int caseId=1;caseId<=caseNum;caseId++){ int n,k,array[N_MAX]; scanf("%d%d",&n,&k); for(int i=0;i<k;i++)...
ALGO
0.999463
3.12218
370bb473-0c61-48b6-8eb1-24924594d5aa
itzmeowww/cp-solution
Programming.in.th/0023.cpp
#include <bits/stdc++.h> using namespace std; map<int,string>ans; int main(){ ans[0] = "Sunday"; ans[1] = "Monday"; ans[2] = "Tuesday"; ans[3] = "Wednesday"; ans[4] = "Thursday"; ans[5] = "Friday"; ans[6] = "Saturday"; int d,m; scanf(" %d %d",&d,&m); m -= 2; int y = 9; if...
ALGO
0.999965
3.74637
8e3dfebb-ee06-4a3d-aa01-2e0ac874d230
Girumie/AlgorithmIndividualAssignment
stack_linked_list_main.cpp
// here we write the main executable for the stack linked list #include "stack_linked_list_interface.hpp" #include "stack_linked_list_implementation.hpp" #include <iostream> int main() { // Create a stack of integers StackLinkedList<int> stack; // Push elements onto the stack std::cout << "Pushing ele...
TOOL
0.945085
6.563191
172a2b89-f2e8-4e63-ab95-83d2b8ec582d
preetprajapatiiiii/cse205-ds
assignments/4.11.2023/347.cpp
class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { map<int,int> mp; for(auto& x:nums){ mp[x]++; } vector<pair<int,int>> v; for(auto& x:mp){ v.push_back(x); } sort(v.begin(),v.end(),[&](auto&a, auto&b){return b...
ALGO
0.999987
6.148222
b45dbde5-1c62-43ca-8928-9c5c3006eb86
danilo775/Residencia_Praticas
Pratica_11/atv12.cpp
#include <iostream> #include <string> #include <vector> using namespace std; string letrasEmComuns(string& a, string& b); int main() { string a, b, c; cout << "Digite a 1 palavra : "; cin >> a; cout << "Digite a 2 palavra: "; cin >> b; c = letrasEmComuns(a,b); if (!c.empty()) { ...
ALGO
0.997676
3.511025
bb32f585-616e-4566-a8d0-ab5293e4b6be
ankur-kayal/Contests
codeforces/1399/E1.cpp
#include <bits/stdc++.h> using namespace std; // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0200r0.html template<class Fun> class y_combinator_result { Fun fun_; public: template<class T> explicit y_combinator_result(T &&fun): fun_(std::forward<T>(fun)) {} template<class ...Args> decltype(aut...
ALGO
0.999919
4.439633
92897235-469f-4583-b89f-82b52054dc26
aseerintiser/CodeChef
URCALC (Program Your Own CALCULATOR).cpp
#include<bits/stdc++.h> using namespace std; int main(){ double a, b; cin >> a >> b; char c; cin >> c; if(c == '+') cout << setprecision(7) << fixed << a + b; else if(c == '-') cout << setprecision(7) << fixed << a - b; else if(c == '*') cout << setprecision(7) << fixed <<...
ALGO
0.99982
3.64844
fe667a66-b75f-447a-adfd-c27085ed5c0a
cache-roaster/myBusTub
tools/sqllogictest/parser.cpp
#include <iostream> #include <memory> #include <string> #include <string_view> #include <vector> #include "common/exception.h" #include "common/util/string_util.h" #include "fmt/ranges.h" #include "parser.h" namespace bustub { auto Tokenize(const std::string &str, char delimiter = ' ') -> std::vector<std::string> { ...
TOOL
0.927476
6.746367
91f5464d-a4e8-49d4-9615-667cd94fcc64
bigwwwttt/Parsec
pkgs/libs/tbblib/src/src/rml/perfor/tbb_simple.cpp
#include <cstddef> #include <cstdlib> #include <cstdio> #include <float.h> #include <math.h> #include <time.h> #include <omp.h> #include <assert.h> #include "thread_level.h" #include "tbb/task.h" #include "tbb/tick_count.h" #include "tbb/task_scheduler_init.h" #if _WIN32||_WIN64 #include <Windows.h> /* Need Sleep *...
TOOL
0.968291
4.508401
5d51e011-9212-47c1-bdfa-6a55386afd62
ILLGrenoble/magpie
tlibs2/tests/closest.cpp
/** * closest point test * @author Tobias Weber <<EMAIL>> * @date 3-aug-2025 * @license GPLv3, see 'LICENSE' file * * @note this file is from my following project: * - "mathlibs" (https://github.com/t-weber/mathlibs). * * ---------------------------------------------------------------------------- * tlibs ...
ALGO
0.999645
6.208077
c511fbe1-7dcb-452a-aacd-d3c96d45c661
Yashgabani845/hiring-portal
hiring-portal/Backend/temp/re1261jt.cpp
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; int sum = a + b; cout << sum << endl; return 0; }
ALGO
0.9808
4.219993
2fa88aee-0cb4-4b31-9efe-b0a443409538
biapacifico/aeds-1
criptografia.cpp
#include <iostream> #include <string> #include <cctype> using namespace std; char cifraDeCesar(char letra){ string letras = "abcdefghijklmnopqrstuvwxyz"; bool letraMaiuscula = isupper(letra); if(letraMaiuscula){ letra = tolower(letra); } char letraDecifrada; for(int i=0; i<letras.le...
ALGO
0.999872
4.26674
d3177ea7-c540-4663-9c35-fe27e1ca34a5
wsKim1992/code-tree-algorithm
241209/경로의 적합성 판단 2/determining-the-suitability-of-the-route-2.cpp
#include <iostream> #include <vector> #include <algorithm> #define MAX_N 100000 using namespace std; int uf[MAX_N+1]; int qarr[MAX_N+1]; int n=0; int m=0; int k=0; bool ans = true; int find(int x){ if(uf[x]==x){return x;} return uf[x]=find(uf[x]); } void uni(int a, int b){ int rootA = find(a); int ro...
ALGO
0.999986
4.817117
6ea9d02c-022d-437e-8f42-3565f2c70fce
abhishekraut1/DSA_Problems
remove_duplicates_from_sorted_array.cpp
#include<bits/stdc++.h> #define nl endl using namespace std; int remove(int arr[],int n){ int res=1; for(int i=1;i<n;i++){ if(arr[res-1]!=arr[i]){ arr[res]=arr[i]; res++; } } for(int i=0;i<n;i++){ cout<<arr[i]<<" "; }cout<<endl; return res; } int m...
ALGO
0.99976
4.056153
81feb932-3c3f-4d8f-80d9-e865c17d6fe1
ChettriBishal/CP
HackerEarth/Equal_elements.cpp
/* * https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-manipulation/practice-problems/algorithm/equal-elements-2-db70c1ae/ * 11-Apr-21 1:50:31 PM */ #include<bits/stdc++.h> using namespace std; typedef long long ll; void solve(){ int n; cin>>n; vector<ll>a(n); int ...
ALGO
0.999612
5.124941
de6b0748-e05c-4288-aa5b-c5da9b1f7e0e
NguyenXuanLamm/I-mBenginner
ChuRaSo.cpp
#include<iostream> #include<cmath> using namespace std; int main(){ int n; double x,A; cout<<" Chuong trinh tinh gia tri bieu thuc A= (x^2+x+1)^n+(x^2-x+1)^n"<<endl; cout<<" nhap x ";cin>>x; cout<<" \n nhap n ";cin>>n; A=pow(x*x+x+1,n)+pow(x*x-x+1,n); cout<<"Gia tri bieu thuc A la"<<A; }
ALGO
0.999697
3.90818
08051e05-dedf-4dcc-b2b9-1a8c63077c87
saa27/Data-Structures
Recursion/Recursion_JosephusProblem.cpp
#include <cmath> #include <cstdio> #include <vector> #include <stack> #include <iostream> #include <algorithm> #include <bits/stdc++.h> using namespace std; void solve(vector<int>v, int k, int index, int &ans){ if(v.size() == 1){ ans = v[0]; return; } index = (index ...
ALGO
0.99998
3.664655
0cd4e57f-1636-4ae7-8784-86758342f9dd
jl2337/Data-Structure-and-Algorithm
Max Subsequence Sum O(N).cpp
#include <iostream> #include <vector> using namespace std; int main(int argc, const char * argv[]) { int max_subseq_sum(const vector<int> &); vector<int> my_vec = {-1,3,-1,4,-4,1,-3,-2,4,-5}; // Max = 3+(-1)+4 = 6 cout << max_subseq_sum(my_vec) << endl; return 0; } // Time complexity of this algorit...
ALGO
0.99987
4.78382
d2c1df6c-cfa1-4173-a69d-d6807e45a722
dhairyashil09/sample
quizleer/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.998521
6.761023
6aa4daf7-2e73-40ed-8910-b5670a75d79d
jskyzero/Cplusplus.Playground
hardwork/sicily_datastructure/final/1004.cpp
#include <iostream> #include <cstring> typedef int data_type; class HashTable{ private: int mod_num; data_type *data; public: HashTable(int num) { mod_num = num; data = new data_type[num]; memset(data, -1, sizeof(data_type) * num); } void insert(int num) { int index = num % mod_num; i...
ALGO
0.999919
3.793838
a688f0ad-8859-4fec-a204-38648b1fd307
AhmedSlman/BooklyApp
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.998784
6.761023
58eff5a4-0a1b-4991-a709-53023f9377f6
ishandutta2007/codeforces
kal013/normal/1680/A.cpp
/*/ Author: kal013 /*/ // #pragma GCC optimize ("O3") #include "bits/stdc++.h" #include "ext/pb_ds/assoc_container.hpp" #include "ext/pb_ds/tree_policy.hpp" using namespace std; using namespace __gnu_pbds; template<class T> using ordered_set = tree<T, null_type,less<T>, rb_tree_tag, tree_order_statistics_node_update>...
ALGO
0.999927
4.318961
0275e069-6397-46bc-b51e-b9b6c0a4edc9
JorgeIba/Competitive-Programming-Problems
VJudge/Ranking/Z.cpp
#include <bits/stdc++.h> #define lli long long int using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); lli n; cin>>n; vector<lli> numeros(n); for(auto &x: numeros) { cin>>x; } lli k; cin>>k; deque< pair<lli,lli> > cola; fo...
ALGO
0.999987
3.345257
b4c497b4-d765-412b-93f7-9a08a79f96e2
jhospo/coins
main.cpp
#include <iostream> #include <vector> #include <string> #include <fstream> #include <cstdlib> //JAN HOSPODARYSKO using namespace std; int idCounter = 0; int evaluationCounter = 0; struct TreeNode { int id; int s; int v; int evalId; vector<TreeNode*> children; TreeNode(int state) : s(state), v(...
ALGO
0.998307
5.053648
175f5f69-ef67-4c64-853a-b99cfad0f3d0
dawid-bytys/university
term-6/objective-cpp/labs-11/exercise-1.1.cpp
#include <algorithm> #include <execution> #include <iostream> #include <vector> int main() { std::vector<int> data = {1, 2, 3, 4, 5}; std::sort(std::execution::seq, data.begin(), data.end()); for (const auto& elem : data) { std::cout << elem << " "; } std::cout << std::endl; return 0; }
ALGO
0.999722
5.625716
87009453-d69c-417b-8ed5-88872e65bee1
kou164nkn/tutorial-cpp
chapter_4/main.cpp
#include <iostream> int main() { int n; std::cout << "n: "; std::cin >> n; if (int mod = n % 10; mod > 5) { std::cout << "nは10で割り切れません (mod > 5)" << std::endl; std::cout << "mod = " << mod << std::endl; } else if (int mod = n % 10; 0 < mod) { std::cout << "nは10で割り切れません (0 < mod <= 5)" << std::e...
ALGO
0.994474
4.39274
c5395eb2-8314-4e67-a65e-30a095c68759
rikuTanide/atcoder_endeavor
tdpc/tdpc_dice.cpp
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> //namespace mp = boost::multiprecision; //#include "atcoder/all" using namespace std; const double PI = 3.14159265358979323846; typedef long long ll; const double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef pair<ll, ll> P; ...
ALGO
0.999922
3.623347
94e5de20-f587-4a0a-a0c6-d9df8609e203
debsaikia03/LeetCode-Solved-Problems
0958-sort-array-by-parity-ii/0958-sort-array-by-parity-ii.cpp
class Solution { public: void swap(int &a, int &b){ a = a + b; b = a - b; a = a - b; } vector<int> sortArrayByParityII(vector<int>& nums) { int i = 0, j = 1, n = nums.size(); while(i < n && j < n){ while(i < n && nums[i] % 2 == 0) i+=2; w...
ALGO
0.999987
5.427274
3620a43f-e392-4d69-b4e8-47a94e87265a
sarvex/leetcode-fortran
solution/1400-1499/1439.Find the Kth Smallest Sum of a Matrix With Sorted Rows/Solution.cpp
class Solution { public: int kthSmallest(vector<vector<int>>& mat, int k) { int pre[k]; int cur[mat[0].size() * k]; memset(pre, 0, sizeof pre); int size = 1; for (auto& row : mat) { int i = 0; for (int j = 0; j < size; ++j) { for (int& ...
ALGO
0.999995
5.868174
2a4b7641-c607-4a5b-b02b-194f1c7cca48
aicedeno1/Estructuras
Deberes/Parcial 3/Busqueda_muestral/bfs_visualizer.cpp
#include <graphics.h> #include <iostream> #include <queue> #include <vector> #include <cstdlib> #include <ctime> #include <cstring> #include <cmath> using namespace std; struct Point { int x, y; }; class BFSVisualizer { private: vector<vector<int>> adjacencyMatrix; vector<vector<int>> adjacencyList; v...
ALGO
0.914103
6.394281
8fe5626a-d357-41b2-a1d0-58d7bd2405e9
hmwang2002/Algorithm-Learning
leetcode/leetcode-2316.cpp
#include <bits/stdc++.h> using namespace std; auto _{ []() noexcept { std::ios::sync_with_stdio(false); std::cin.tie(nullptr), std::cout.tie(nullptr); return 0; }()}; class UnionFind { private: vector<int> parents; vector<int> sizes; public: UnionFind(int n) : parents...
ALGO
0.999853
5.619755
732bbc0d-f1de-4d0e-9696-ac51f3f7d613
kidclone3/CP
hamic_algo/greedy_and_math/Saving_the_City.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define vi vector<int> #define vb vector<bool> #define ll long long #define pii pair<int, int> #define all(x) x.begin(), x.end() #define FORIT(i, s) for (auto it=(s.begin()); it!=(s.end()); ++it) #define F_OR(i, a, b, s) for (int i=(a); (s)>0? i<(b) : ...
ALGO
0.998402
3.906142
8de649a7-5177-4c12-88b8-480d06dd254a
prerna120/6-companies-30-days-challenge
Goldman Sachs/10.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int>v; priority_queue<int>q; for(int i=0;i<n;i++){ cin>>v[i]; q.push(v[i]); } for(int i=0;i<10;i++){ cout<<i+1<<" Maximun element is"<<q.top()<<endl; q.pop(); } }
ALGO
0.99988
3.633793
fddbca5b-08a3-4da2-a254-401c5ffd985e
pr7prashant/dsa-practice
Array/MaxSubArray.cpp
/* **************** Problem Description **************** Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. A subarray is a contiguous part of an array. Example : 1 Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6...
ALGO
0.999925
6.250833
a9824935-8ad5-40de-8c33-e996395b86f2
Rohit-Dumka/Leetcode-Solutions
1480-running-sum-of-1d-array/1480-running-sum-of-1d-array.cpp
class Solution { public: vector<int> runningSum(vector<int>& nums) { vector<int>ans; int s=0; for(int i=0;i<nums.size();i++) { s+=nums[i]; ans.push_back(s); } return ans; } };
ALGO
0.99983
5.976027
e3991864-03b2-4d11-82c1-662acde19cd7
Ngochuyenn527/UDTT_Haui_2024
Week 10_tx2/Bai 5_Boyer.cpp
//tinh r la soluong LAPTOP co thong tin bo nho trong la "RAM 16GB" //tinh s va t la soluong va danhsach sd o cung loai "SSD" #include<bits/stdc++.h> using namespace std; struct Laptop{ string tenhsx; string cauhinh; double giaban; }; int char_in_string(char x, string p){ for(int i = p.length()-1; i>=0; i--){ i...
ALGO
0.98995
4.363612
e760575b-6dc0-47a8-a0dc-d591ea50e64d
worden-lee/salmon
population.cpp
//****************************************************************************** // population.cpp // 2004.12.27 // Lango, Trevor M. // //****************************************************************************** #include "population.h" #define BINOMIAL 0 #if BINOMIAL #include "random.h" #else #include "rand.h" #e...
ALGO
0.998033
5.707022
64441bc1-348c-49a1-8169-c95698a0c5fc
Hussain-Safwan/Codebin
controllers/bfs.cpp
// Program to print BFS traversal from a given // source vertex. BFS(int s) traverses vertices // reachable from s. #include<iostream> #include <list> using namespace std; // This class represents a directed graph using // adjacency list representation class Graph { int V; // No. of vertices // Pointer ...
ALGO
0.999956
4.413517
fa727664-e071-49a7-8d4a-723fbbeeb24c
aninda052/Computative_Programming-
UVA/uva10784.cpp
#include<bits/stdc++.h> using namespace std; int main (){ long long int a;int d=1; double y; int z; while(cin>>a &&a!=0) { y=(3+sqrt(9+8*a))/2; z=y; if(abs(y-z)!=0)z=z+1; printf("Case %d: %d\n",d,z); d++; } return 0;}
ALGO
0.999756
3.141799
dede5d00-281d-4aa4-bd62-c05ceb1d2957
alisha-gursahaney/Program-and-Data-Representation
Lab 9/Postlab/testBinarySearch.cpp
#include <iostream> #include <cstring> #include "timer.h" using namespace std; extern "C" int binarySearch(int * arr, int left, int right, int target); int main(int argc, char** argv) { // Check if silent cmd line param was passed in // This is used for autograding purposes but can be ignored otherwise b...
ALGO
0.996328
6.000516
676205a2-9987-4ee4-a23a-aa74c4d4e6ae
Keshav1707/Submissions
D_Place_of_the_Olympiad.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define di(x) \ ll x; \ cin >> x #define vecll vector<ll> #define sz(x) ((int)(x).size()) #define pb push_back #define po pop_back #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define endl "\n"...
ALGO
0.999831
4.034934
888d3978-39e8-4cc6-9526-e3c250b566ac
gprs1022/GFG-POTD
13-Oct-2023-Floor in BST.cpp
//Floor in BST //{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; Node *right; Node *left; Node(int x) { data = x; right = NULL; left = NULL; } }; // } Driver Code Ends // Function to search a node in BST. class Solution{ public...
ALGO
0.999965
5.77599
368c632a-0cb4-48f2-b2eb-ed701f00cc44
Devil-DL/Local-C-Code
my project/蚁群算法/main.cpp
#include <iostream> #include <cmath> #include <ctime> #define ANT_AMOUNT 50 #define CITY_AMOUNT 48 #define GENERATION_TIMES 500000 #define FIRST_PHER 0.1 ///////////////////////////////////////////////////////////////////////// int bre; using namespace std; int MinRoute=-1; int MinTour[CITY_AMOUNT+1]={0}; int distant[C...
ALGO
0.999946
3.731626