uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
54669528-27a6-4ea7-a5a8-08d74c48bf26
makio93/competitive-atcoder
abc279/abc279_d/main.cpp
// #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; #define rep(i, n) for (int i=0; i<(int)(n); ++(i)) #define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i)) #define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i)) #define rep3r(i, m, n) for (in...
ALGO
0.99876
3.652209
05a09798-bfcd-4a4b-8c44-51345b0f2d24
daucloudlab/CPlus_tasks
TwoDimArray2.cpp
#include <iostream> using namespace std ; int main(){ int mines[102][102] ; int n, m ; cin >> n >> m ; for (int i = 0; i <= n+1; i++) for (int j = 0; j <= m+1 ; j++) mines[i][j] = 0 ; int ans[102][102] ; for(int i = 1; i <= n; i++){ for(int j = 1; j <= m ; j++){ ...
ALGO
0.999943
3.403322
74860209-64f0-48c9-ae99-776c12e27ba1
drunkwater/leetcode
medium/cpp/c0128_261_graph-valid-tree/00_leetcode_0128.cpp
// DRUNKWATER TEMPLATE(add description and prototypes) // Question Title and Description on leetcode.com // Function Declaration and Function Prototypes on leetcode.com #include<iostream> #include<iomanip> #include<stdint.h> #include<time.h> #include<limits.h> #include"solution.hpp" /*using namespace std;*/ /** *...
ALGO
0.999275
5.374175
5a3a583d-7ed5-4978-9b1a-5ce483d3f607
toncenter/ton-indexer
ton-index-worker/ton-trace-emulator/src/TraceEmulator.cpp
#include <fstream> #include <sstream> #include <string> #include <emulator/transaction-emulator.h> #include "crypto/openssl/rand.hpp" #include "TraceEmulator.h" #include "Statistics.h" td::Result<block::StdAddress> fetch_msg_dest_address(td::Ref<vm::Cell> msg, int& type) { auto message_cs = vm::load_cell_slice(msg...
TOOL
0.933178
6.093844
679d59d4-caf2-4a61-a2fa-506a77b6e478
Avash027/Leetcode-solutions
765-couples-holding-hands/765-couples-holding-hands.cpp
class Solution { public: static const int N = 101; vector<int> graph[N]; bool vis[N]; int dfs(int v){ vis[v] = true; int cnt = 1; for(int e:graph[v]) if(!vis[e]) cnt+=dfs(e); return cnt; } ...
ALGO
0.99999
5.308831
1e9fb082-73c3-4c4f-a307-d5dfb22ae045
dianapaula19/data-structures-and-algorithms-course
teme/tema_4/tema_4_3/main.cpp
#include <iostream> using namespace std; struct node{ int value; int left_size; node* left; node* right; }; class binaryIndexedTree{ public: node *root; binaryIndexedTree(); void insert_node(int); static int calculateLeftSize(node*); static int searchIndex(node*, int); static...
ALGO
0.999887
3.974823
10c4f23d-be0d-45f7-82ea-355770bceff5
GabrielReira/CPP-Exercises
Organizar depois/24 - Contador de dias.cpp
#include <iostream> using namespace std; int main () { int dia, mes, sem, user, cont; dia = 0; mes = 0; sem = 3; // Começa do dia 31 de dezembro 2019 int meses [12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; cout << "Qual dia do ano você quer? Digite de 1 a 366." << endl; cin >> user; ...
ALGO
0.998586
3.769297
f91ac0ba-8ffd-42bf-abfb-87c00c0b5adc
vincent-tr/rpi-js-os
ext/libcxx-5.0/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp
// UNSUPPORTED: c++98, c++03 // <algorithm> // template<class T> // pair<T, T> // minmax(initializer_list<T> t); #include <algorithm> #include <cassert> #include "test_macros.h" int main() { assert((std::minmax({1, 2, 3}) == std::pair<int, int>(1, 3))); assert((std::minmax({1, 3, 2}) == std::pair<int, ...
TEST
0.949289
5.906502
7502beb5-8dfd-40e7-974a-7fb814341379
yitianhao/gpu_sched_new
gpu-sched-centralcontrol/minor/boost_1_61_0/libs/heap/tools/throughput_benchmarks.cpp
#include <iostream> #include <iomanip> #include "../../../boost/heap/d_ary_heap.hpp" #include "../../../boost/heap/pairing_heap.hpp" #include "../../../boost/heap/fibonacci_heap.hpp" #include "../../../boost/heap/binomial_heap.hpp" #include "../../../boost/heap/skew_heap.hpp" #include "heap_benchmarks.hpp" using nam...
TEST
0.875999
4.859771
6c3a7fc8-4685-4da5-ab53-56391db9a96f
ilnehc/ROB550_Fall2019
mobilebot/src/apps/utils/drawing_functions.cpp
#include <apps/utils/drawing_functions.hpp> #include <common/pose_trace.hpp> #include <lcmtypes/pose_xyt_t.hpp> #include <lcmtypes/lidar_t.hpp> #include <lcmtypes/robot_path_t.hpp> #include <lcmtypes/particle_t.hpp> #include <lcmtypes/particles_t.hpp> #include <planning/frontiers.hpp> #include <planning/obstacle_distan...
TOOL
0.898609
3.741903
a497deb2-8db7-4e0a-a8cc-4fe6f6067183
gulabchan/leetcode-c-challenges
0673-number-of-longest-increasing-subsequence/0673-number-of-longest-increasing-subsequence.cpp
class Solution { public: vector<int> dp; //dp[i]=length of the LIS ending at index i vector<int> count;// # of LIS with length=dp[i] void LIS_bottom_up(vector<int>& nums, int n){ dp.assign(n, 1); count.assign(n, 1); for (int i=0; i<n; i++){ for(int j=0; j<i; j++){ ...
ALGO
0.999998
6.14114
c48978b1-797d-40cf-bb8f-f9b7c61e2c92
valida-xyz/valida-compiler
clang/lib/Sema/SemaConcept.cpp
#include "TreeTransform.h" #include "clang/Sema/SemaConcept.h" #include "clang/Sema/Sema.h" #include "clang/Sema/SemaInternal.h" #include "clang/Sema/SemaDiagnostic.h" #include "clang/Sema/TemplateDeduction.h" #include "clang/Sema/Template.h" #include "clang/Sema/Overload.h" #include "clang/Sema/Initialization.h" #incl...
ALGO
0.997413
7.660281
96b4a93d-b2c6-42cc-baea-95bf0af0aee9
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5636_1.cpp
#include <bits/stdc++.h> using namespace std; int n; int num[15]; void init() { memset(num, 0, sizeof(num)); for (int i = 1; i <= n; i++) { int tmp = i % 9 != 0 ? i % 9 : 9; num[tmp]++; } } int main() { while (scanf("%d", &n) != EOF) { init(); long long ans = 0; for (int i = 1; i <= n; i++) ...
ALGO
0.999808
4.898135
ffbdcdaa-b73d-47f2-bff7-3a75932d319d
holyer05/guiji_ios
Cpp/include/eigen3/unsupported/doc/examples/MatrixPower.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); Matrix3d A; A << cos(1), -sin(1), 0, sin(1), cos(1), 0, 0 , 0 , 1; std::cout << "The matrix A is:\n" << A << "\n\n" "The matrix power A^(pi/4) is:\n"...
ALGO
0.999817
3.790203
9b071e66-d8df-4aa1-b9b9-cd4976c737aa
kry-p/Aigo-season-2
baekjoon/27000/27922/h1ghg3n/Pb27922.cpp
#include <iostream> #include <queue> #include <algorithm> using namespace std; int arr[100000][3]; priority_queue<int> A, B, C; int main() { int a, b, c,n; cin >> a >> n; for (int i = 0; i < a; i++) { // cin >> arr[i][0] >> arr[i][1] >> arr[i][2]; } for (int i = 0; i < a; i++) { // ΰ 켱 ť A.push(arr[i...
ALGO
0.999854
3.80564
626f2b13-a15b-44d3-b0e9-9a3e5c2dd7ff
amberolive/CISP1010
Chapter4_Exercise7/Chapter4_Exercise7.cpp
/* Name: Amber Rivera Chapter: 4 Exercise: 7 This program: 1) Acquires the percentage of the face of the moon that appears illuminated from the user. 2) Calculates the illuminated surface area. 3) Displays the result. */ #include <iomanip> #include <iostream> #include <string> using namespace std; const double PI =...
TOOL
0.921386
5.642826
9b3db61a-b07a-4e97-ae4f-4dd2670baaca
nagahamakoki-k021g1319/EngineDemo23April
Engine/COLLISION/CollisionPrimitive.cpp
#include "CollisionPrimitive.h" using namespace DirectX; void Triangle::ComputeNormal() { Vector3 p0_p1 = p1 - p0; Vector3 p0_p2 = p2 - p0; normal = p0_p1.cross(p0_p2); normal = normal.nomalize(); }
TOOL
0.982105
3.878065
2c970ffc-e1a6-471a-9beb-f6eaa3531681
greenpepper123/procon
codes/exhaustive_search.cpp
#include <iostream> #include <cmath> #include <vector> #include <string> #include <algorithm> int main() { int n, q, sum=0; int A[2001]={}, m[2001]={}; std::cin >> n; for (int i=0; i<n; i++) { std::cin >> A[i]; sum+=A[i]; } std::cin >> q; for (int i=0; i<q; i++) { st...
ALGO
0.99997
4.262826
e4a2d575-8a2e-4da1-aae1-58e6f3df0def
YaeSaraki/OI
Algorithms/AcWing/每日一题/2023春季每日一题/Week 1/3384. 二叉树遍历.cpp
#include <algorithm> #include <iostream> #include <string> using namespace std; int k; string str; void dfs() { if (str[k] == '#') { ++k; return; } char ch = str[k++]; // root treenode dfs(); // left child treenode cout << ch << " "; dfs(); // right child treenode } int main() { cin >> str; dfs(); ...
ALGO
0.999964
3.683935
c0dc045b-11a0-4c10-85ae-441df94058e3
VietHoangg03/DSA_UET
CodeTuan_UET_DSA/tuan6/main4.cpp
// Viết chương trình cài đặt thuật toán tô màu đồ thị: cho đồ thị N đỉnh (đánh số từ 0 -> N - 1) và M cạnh, tìm cách tô màu sử dụng ít màu nhất sao cho 2 đỉnh trên 1 cạnh không có màu giống nhau. // Input: Dòng đầu là 2 số nguyên N, M. M dòng tiếp theo là N cặp số (x, y) biểu thị các cạnh. // Output: N dòng chứa các ...
ALGO
0.999933
4.874014
f611d85e-c91d-4702-ac49-1a0ecb866bbc
akil0625/myEasyXLearning
test_01_19_01/test.cpp
#include <conio.h> #include <stdio.h> #include <graphics.h> #include <math.h> #include <ctime> #define PI 3.14159 #define k 1 #define matom 1800 #define melc 1 #define Ratom 20 #define Relc 7 #define atomnum 20 #define elcnum 20 typedef struct Atom { double x; double y; double v; double vd; double a; double a...
ALGO
0.989142
3.41956
c30b2f78-5be3-4fc1-9908-820425a26914
heysuhas/FeedForwardNN
src/NeuralNetwork.cpp
// NeuralNetwork.cpp #include "NeuralNetwork.hpp" #include <cmath> using namespace std; double sigmoid(double x) { return 1 / (1 + exp(-x)); } NeuralNetwork::NeuralNetwork(int input_nodes, int hidden_nodes, int output_nodes) : input_nodes(input_nodes), hidden_nodes(hidden_nodes), output_nodes(output_nodes), ...
ALGO
0.999246
4.618548
c77e8c00-dd6f-4c11-a066-f1d2a6194ea9
vu-luong/Algorithm
codewar/magic_numbers.cpp
#include <map> #include <set> #include <cmath> #include <cstdio> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> #define PB push_back #define MP make_pair #define SZ(a) a.size() #define DEBUG(x) cout << #x << " = " << x << endl; #define PR(A,n) { cou...
ALGO
0.999975
3.853863
da60acfa-1136-4078-a21b-21af8958f101
john4299/Ros_Delivery_Service
raspberry_pi/manipulator/src/robotis_manipulator/src/robotis_manipulator/robotis_manipulator_trajectory_generator.cpp
/* Authors: Darby Lim, Hye-Jong KIM, Ryan Shim, Yong-Ho Na */ #include "../../include/robotis_manipulator/robotis_manipulator_trajectory_generator.h" using namespace robotis_manipulator; MinimumJerk::MinimumJerk() { coefficient_ = Eigen::VectorXd::Zero(6); } MinimumJerk::~MinimumJerk() {} void MinimumJerk::calcC...
ALGO
0.999679
5.692891
11a03759-0a58-49eb-96b8-465c9514b261
andcov/SchoolStuff
PBInfo/1509/main.cpp
#include <iostream> #include <cmath> using namespace std; int nrmaxim(int a){ int x, nr, last, maxv = 0; x = a; nr = 0; while(x > 0){ x /= 10; nr++; } x = a; do{ last = x % 10; x /= 10; for(int i = 0; i < nr - 1; i++){ last *= 10; ...
ALGO
0.999755
4.324514
8bfa38f3-9682-4c1f-8ed2-1daab40569fd
ankitsinghal2003/LEARN-DSA
ARRAYS/QUESTIONS ARRAY/sort_0,1,2's.cpp
// Online C++ compiler to run C++ program online #include<iostream> using namespace std; void sortedArray(int arr[],int size){ int index=0; int left=0; int right= size-1; while(index<=right){ if(arr[index]==0){ swap(arr[index],arr[left]); left++; index++; ...
ALGO
0.999936
5.002523
88b7374d-3aa9-4bb4-af5a-8f35c669afab
Aldisti/AoC-2024
day16/part1.cpp
#include <algorithm> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <cmath> #include <set> #include <map> using String = std::string; template <typename T> using Vector = std::vector<T>; template <typename T> using Set = std::set<T>; template <typename T, typ...
ALGO
0.999762
4.390501
cf580fa7-b652-4f80-b591-09af6829c75d
sjmjys954646/Algorithm
boj11000-11999/boj11050.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <vector> #include <utility> #include <queue> #include <stdio.h> #include <string> #include <math.h> #include <map> #define Max(a,b) a < b ? b : a; #define Min(a,b) a < b ? a : b; using namespace std; int fac(int a) { if (a == 1) retu...
ALGO
0.999943
4.214539
32ba7b2e-0370-4363-88f7-5a7625f3015c
CHRINIMUE/Ballerburg
opencv/sources/samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp
/** * @function cornerDetector_Demo.cpp * @brief Demo code for detecting corners using OpenCV built-in functions * @author OpenCV team */ #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <iostream> using namespace cv; using namespace std; /// Global variables Mat src, src_gray; Mat myHarris...
ALGO
0.997958
7.024784
fa5b99d6-b89f-4848-a9f3-1cadecec664e
phamcaotri/homework
C++/DSA/P2/bai6_remake.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; void Sort(vector<long> &a, long max_value) { vector<long> b(max_value+1, 0); for (long i = 0; i < a.size(); i++) { b[a[i]] ++; } int j = 0; for (long i = 0; i < max_value+1; i++) { wh...
ALGO
0.999949
4.146236
c5dcdd68-1912-43f9-abb6-206d4ece7af9
rdstihz/Learning-and-Coding
src/2021多校/HDU/HDU7/1005 F/std.cpp
#include<bits/stdc++.h> using namespace std; const int P = 1000000007; int Num[2000005][2]; int Sum[2000005]; int work(int len,int type) { if (len<=0) return 0; if (Num[len][type]) return Num[len][type]; if (type==0) { return Num[len][type]=work(len-2,1)+1; }else{ int mid=(len+1)/2; return Num[len][type]=wo...
ALGO
0.99963
4.434277
75fafd9c-9055-43c2-a1df-c9dfe7429fbd
BraulioHzGz/Estructura-de-Datos
Queue.cpp
#include <stdio.h> #include <stdlib.h> #include <conio.h> #include <stdbool.h> #include "Queue.h" // CONDICIONES INICIALES struct casillaQ* inicial = NULL; // COMIENZO DE COLA VACO struct casillaQ* final = NULL; // FIN DE COLA VACO /* @brief Funcin que permite agregar nmeros a la cola @param numero: v...
ALGO
0.996434
4.204522
2ecb58ac-054b-415f-8c89-1470e90c5e08
Saytara2001/LeetCode
0547-number-of-provinces/0547-number-of-provinces.cpp
class Solution { public: void dfs(int node, vector<vector<int>>& isConnected, vector<bool>& visit) { visit[node] = true; for (int i = 0; i < isConnected.size(); i++) { if (isConnected[node][i] && !visit[i]) { dfs(i, isConnected, visit); } } } ...
ALGO
0.999959
6.621581
347c3f4f-8bf0-4eb4-a427-c7458e26075d
antOnioOnio/Algoritmica
n_trabajos_n_trabajadores/src/prueba_APermutacion.cpp
#include <iostream> #include "Apermutacion.h" #include <string> template <class T> ostream & operator<<(ostream &os, const vector<T> & d){ for (int i=0;i<d.size();i++) os<<d[i]<<" "; os<<endl; return os; } void MuestraSecuencia(const Apermutacion & P){ Apermutacion::const_iterator it; for (it=P....
ALGO
0.982534
3.821545
159a4d47-9f10-4595-9c78-09d44585fd30
linux4life798/llvm-project-ci-test
libc/src/math/generic/f16mulf128.cpp
#include "src/math/f16mulf128.h" #include "src/__support/FPUtil/generic/mul.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(float16, f16mulf128, (float128 x, float128 y)) { return fputil::generic::mul<float16>(x, y); } } // namespace ...
ALGO
0.957687
6.50735
0e2c3da2-598d-4d6f-86e9-403a52d4c6a7
axitkhurana/coding
websites/codechef/medium/byteiter.cpp
#include<iostream> #include<fstream> using namespace std; long total(int&); long s; int main() { int no; cin>>no; while(!feof(stdin)) { cout<<total(no)<<endl; cin>>no; } return 0; } long total(int& n) { int nby2=n/2; int nby3=n/3; int nby4=n/4; if(nby2+nby3+nby4<=n) return n; else { s=total(nby2)+total(nby...
ALGO
0.999307
3.082712
f20c8413-5ad3-4a07-a212-1e92dc854c10
HPC-AI-Team/lammps-fugaku-threadpool-sc23
src/KOKKOS/pair_meam_kokkos.cpp
// clang-format off /* ---------------------------------------------------------------------- Contributing authors: Naga Vydyanathan (NVIDIA), Stan Moore (SNL) ------------------------------------------------------------------------- */ #include "pair_meam_kokkos.h" #include "meam_kokkos.h" #include "atom_kokkos....
ALGO
0.997849
6.64677
79b99b25-1ea0-47dd-9217-f23113167e23
ayush-yadav-4/leetcode-solutions
0828-chalkboard-xor-game/0828-chalkboard-xor-game.cpp
class Solution { public: bool xorGame(vector<int>& nums) { int xorSum = 0; for (int num : nums) { xorSum ^= num; } // Case 1: XOR is 0 initially -> Alice wins immediately // Case 2: XOR is not 0, but length is even -> Alice can force a win return ...
ALGO
0.999982
6.139722
13412d20-1a6a-4eea-85a0-090dbb265716
stack-queue-coder/CP-DSA
largest number.cpp
#include<iostream> #include<algorithm> using namespace std; int largest(int arr[],int n){ return *max_element(arr,arr+n); } int main(){ int arr[10],n; cin>>n; for(int i=0;i<n;i++){ cin>>arr[i]; } cout<<largest(arr,n); return 0; }
ALGO
0.9998
3.663569
aeba9f3c-4446-4650-a333-e5780b3a44d3
black-shadows/LeetCode-Topicwise-Solutions
C++/linked-list-in-binary-tree.cpp
// Time: O(n + l) // Space: O(h + l) /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *rig...
ALGO
0.999951
6.621894
94ee04c9-3f10-46af-9123-a652111e6bd2
eashwaranRaghu/Data-Structures-and-Algorithms
3. Algorithmic Paradigms/Dynamic Programming/OBST.cpp
// Created on 08-09-2019 00:22:11 by necronomicon #include <bits/stdc++.h> using namespace std; #define MP make_pair #define PB push_back #define ARR_MAX (int)1e5 //Max array length #define INF (int)1e9 //10^9 #define EPS 1e-9 //10^-9 #define MOD 1000000007 //10^9+7 #define PI 3.1415926535897932384626433832795 typedef...
ALGO
0.99988
4.073107
aee60211-3127-42b3-b79a-25731c547b8b
anonymousguy198/swiftshader-compiled
third_party/SPIRV-Tools/source/opt/cfg.cpp
#include "source/opt/cfg.h" #include <memory> #include <utility> #include "source/cfa.h" #include "source/opt/ir_builder.h" #include "source/opt/ir_context.h" #include "source/opt/module.h" namespace spvtools { namespace opt { namespace { using cbb_ptr = const opt::BasicBlock*; // Universal Limit of ResultID + 1 c...
TOOL
0.857391
7.72329
1819df61-7f5a-43dd-a4ae-bc95d6531dab
devin-jhu/ICS3U-Unit2-04-CPP
pizza.cpp
#include <iostream> #include <iomanip> int main() { // This function calculates the cost of a pizza const float rent = 1; const float labor = 0.75; const float cost_per_inch = 0.5; const float HST = 0.13; float diameter; float sub_total; float total; // input std::cout << "ente...
ALGO
0.9889
5.086319
c1be4d9d-45e0-436a-8a49-7e486297ccfe
Thalisson-Alves/Competitive-Programming
submissions/Gym/104555/l.cpp
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG #include "debug.cpp" #else #define dbg(...) #endif #define all(x) x.begin(), x.end() using ll = long long; void solve() { string s; int k; cin >> s >> k; int n = (int)s.size(); vector<priority_queue<char, vector<char>, greater<>>> v(k); for (int...
ALGO
0.999996
4.025519
736e85d1-99f0-48d3-b705-351010c693fe
Magma0716/ZeroJudge-by-Magma
Zero Judge CPP/c382.cpp
#include <bits/stdc++.h> using namespace std; int main(){ string input; getline(cin,input); int num1=0; int num2=0; char symbol; istringstream iss(input); iss >> num1 >> symbol >> num2; switch(symbol){ case '+': cout << num1 + num2; break; case '-': cout << num1 - num2; break; case '*'...
ALGO
0.999781
3.950867
ccf86991-e2c4-4cce-8992-df5139261005
leesuyong4029/Algorithm
Programmers/알고리즘 입문/평행.cpp
#include <string> #include <vector> using namespace std; int solution(vector<vector<int>> dots) { int answer = 0; double a = dots[0][0] - dots[1][0]; double b = dots[0][1] - dots[1][1]; double c = dots[2][0] - dots[3][0]; double d = dots[2][1] - dots[3][1]; if (a / b == c / d) return 1; ...
ALGO
0.999592
4.358086
82f1b9d7-3478-4b88-ad58-295ce4530eac
Sahil888n/Programming-Library
C++ Programs/Program (21).cpp
#include<iostream> using namespace std; int CapitalI(char *Arr) { int iCnt=0; while(*Arr!='\0') { if((*Arr>='A') && (*Arr<='Z')) { iCnt++; } Arr++; } return iCnt; } int CapitalR(char *Arr) { static int iCnt=0; if(*Arr!='\0') { if((*Arr>='A') && (*Arr<='Z')) { iCnt++; } Arr++; ...
ALGO
0.999459
4.553041
c2883a5b-ce66-4638-b9e5-5f6d669636e2
sizhuo-zhang/boost_1_62_0
libs/sort/test/string_sort_test.cpp
// Boost Sort library string_sort_test.cpp file ----------------------------// // See http://www.boost.org/libs/sort for library home page. #include <boost/sort/spreadsort/detail/string_sort.hpp> #include <boost/sort/spreadsort/string_sort.hpp> #include <boost/sort/spreadsort/spreadsort.hpp> // Include unit test f...
TEST
0.951427
6.906444
abe06e6f-6ac2-4a50-9a0c-44d4d9bdd241
himanshumahajan138/Leetcode
920-uncommon-words-from-two-sentences/uncommon-words-from-two-sentences.cpp
class Solution { public: vector<string> uncommonFromSentences(string s1, string s2) { // we need to find unique occurences string s = s1 + " " + s2; cout<<s1.max_size(); // store all words from s unordered_map<string,int> um; string tmp=""; for(auto& val : s...
ALGO
0.999939
5.380751
dcf9e19c-47f9-4c8f-9f74-01670975c33e
WilliamX1/SJTU-SE
交大OJ/LG-P1094.cpp
#include <bits/stdc++.h> #include <stdio.h> using namespace std; int A[30010]; int main() { int w, n; scanf("%d%d", &w, &n); for (int i = 1; i <= n; i++) scanf("%d", &A[i]); sort(A + 1, A + n + 1); int l = 1, r = n; int sum = 0; while(r > l) { if (A[r] + A[l] <= w) l++; ...
ALGO
0.999992
3.939028
1b2740fb-3ef2-4e80-9ae2-747a220d00d6
Yh010/DSA
stacks/evaluation of postfix.cpp
int operation(char op, int x, int y){ if (op == '+'){ return x + y; } else if (op == '-'){ return x - y; } else if (op == '*'){ return x * y; } else if (op == '/'){ return x / y; } } int Evaluate(char* postfix){ Stack stk; int x; int y; int result; ...
ALGO
0.998703
4.916836
230091a8-e874-4a33-9760-50d142153973
Avdhesh-Varshney/CPMasterLog
CodeChef/Practice-Problem/ODDSEVENS.cpp
// Odds and Evens // Problem Code - ODDSEVENS // https://www.codechef.com/problems/ODDSEVENS // Solution: #include <iostream> using namespace std; int main() { // your code goes here int t; cin >> t; for(int i = 0; i < t; i++) { int a, b; cin >> a >> b; if((a+b)%2 == 0) cout << "Bob" << en...
ALGO
0.999989
5.004791
0f4ba149-125c-4280-9a9e-9823547e03e6
JJuOn/Algorithm-Study
9000~9999/9012.cpp
#include <iostream> #include <string> #include <stack> using namespace std; int main() { string line; int n; cin >> n; while (n--) { cin >> line; bool vps = true; stack<char> s; for (int i = 0; i < line.length(); i++) { if (line[i] == '(') { s.push('('); } else if (line[i] == ')') { if ...
ALGO
0.999949
4.875838
c5bc7533-f52d-46f2-8752-9a807506f5fd
RinCloud/TrickCatcher
Datasets/TrickyBugs/GenProgs/dpp_generated_progs_cpp/p04043/p04043_num4_parsed.cpp
#include <iostream> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; if (A == 5 && B == 7 && C == 5) { cout << "YES"; } else { cout << "NO"; } return 0; }
ALGO
0.999789
4.234233
74cbf42f-b8b7-4f86-8bb8-8480d1801122
ishandutta2007/codeforces
geothermal/normal/1466/G.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<l...
ALGO
0.999817
4.221216
e58d3d89-ea18-4a40-abe8-079b011711bf
sarvex/leetcode-d
lcof/面试题12. 矩阵中的路径/Solution.cpp
class Solution { public: bool exist(vector<vector<char>>& board, string word) { int m = board.size(), n = board[0].size(); int dirs[5] = {-1, 0, 1, 0, -1}; function<bool(int, int, int)> dfs = [&](int i, int j, int k) -> bool { if (k == word.size()) { return true; ...
ALGO
0.999672
6.401029
e047b0af-0d05-4421-bd68-16af3dccaa80
IMpcuong/toy-projects
codeforces/B_2091.cpp
#include <bits/stdc++.h> // clang++ -isystem . -std=c++20 -g -Wall -Wextra -O3 tmpl.cpp -o out using namespace std; template <typename A, typename B> ostream &operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; } template <typename T_container, typename T...
ALGO
0.999893
5.061981
8e12669e-9394-483d-a6a4-709ce9f0f4fb
olegrpavlenko/Interview-Prep
2024-cycle/1d_prog/placeholder.cpp
#define xDEBUG class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& strs) { //sorting each string approach if(strs.size() == 0) { std::vector <std::vector < std::string>> out; return out; } else if(strs.size() == 1) { std::vector ...
ALGO
0.999941
6.144656
7b6b8f1e-ba9a-4f03-a0cd-6c8808e3a9cc
TheStranger512/Competitive-Programming-Stuff
SPOJ/MECGROUP.cpp
/* Solved * 10377. project groups * File: MECGROUP.cpp * Author: Andy Y.F. Huang * Created on January 3, 2013, 3:36 PM */ #include <cstdio> #include <iostream> #include <cmath> #include <algorithm> #include <stack> #include <vector> #include <queue> #include <string> #include <cstring> #include <set> #include <...
ALGO
0.999843
4.598749
380e4dad-41a5-45b9-9750-455e6561397e
ishandutta2007/codeforces
0wuming0/normal/316/A1.cpp
#include"bits/stdc++.h" using namespace std; char s[100005]; int a[500]; int main() { long long ans=1; scanf("%s",s); int n=strlen(s); int qq=0; if(s[0]=='?')ans=9; int now=10; if(s[0]>='A'&&s[0]<='J') { a[s[0]]=9; now--; } for(int i=1;s[i];i++) { if(s...
ALGO
0.999982
3.131615
21fed88a-85cc-4d05-9d7c-f54bfbf21af9
taro-masuda/leetcode
0733_FloodFill.cpp
class Solution { public: vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int newColor) { int R = image.size(); int C = image[0].size(); stack<pair<int, int>> s; s.push(pair(sr, sc)); set<pair<int,int>> visited; visited.insert(pair(sr,sc)); in...
ALGO
0.995043
6.572184
d57c54e3-a5f6-4698-aea6-1493f09b8948
tungisdab/Code-C-Cpp
nam2ki2/th2/th/1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; //by KMA dil and man int main() { int t; cin>>t; while (t--) { int n; cin>>n; int a[n]; for (int i=0;i<n;i++) cin>>a[i]; sort(a,a+n); for (int i=0;i<n;i++) ...
ALGO
0.999659
3.756503
2c546e14-3180-4c50-a4a4-d79e9ddd28f0
ishandutta2007/codeforces
4et_llpuyhbljl/normal/1418/C.cpp
#pragma comment(linker, "/STACK:2759095000") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,abm,mmx,tune=native") #include<vector> #include<iostream> #include<stack> #include<cmath> #include<algorithm> #include<set> #include<map> #include<string> #include<tupl...
ALGO
0.999872
3.406719
5205fb35-ce4a-4f8a-b58f-03064b9684b7
minasenel/ilk_projem
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.998756
6.772262
dce61ab3-05ea-4cda-b589-16a8b4b9c8e7
jasonkclee/csc419-cubicstyle
libigl/include/igl/projection_constraint.cpp
#include "projection_constraint.h" template < typename DerivedUV, typename DerivedM, typename DerivedVP, typename DerivedA, typename DerivedB> void igl::projection_constraint( const Eigen::MatrixBase<DerivedUV> & UV, const Eigen::MatrixBase<DerivedM> & _M, const Eigen::MatrixBase<DerivedVP> & VP, Eig...
ALGO
0.998797
6.242023
3c1c0110-de4a-49a5-b0d6-59735ff7b070
litao91/gsampling
util.cpp
#include "util.h" #include <iostream> #include <cstdlib> #include<fstream> #include<sstream> using namespace std; int compare_set(const vector<int>& set1, const vector<int>& set2) { if(set1.size()!= set2.size()) { return set1.size()-set2.size(); } int size = set1.size(); for(int i = 0; ...
DATA
0.991178
4.16989
9362db59-1cc7-47fa-a411-333d14435d05
parakh94/Codechef---Spoj
marbles.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define sf scanf #define pf printf int main() { ll t; sf("%lld",&t); while(t--) { ll n,k,ans=1,i; sf("%lld%lld",&n,&k); n=n-1; k=k-1; if(k>n/2) k=n-k; for(i=1;i<=k;i++) { ans=ans*(n+1-i)/i; } pf("%lld\n",ans); } return 0;...
ALGO
0.999934
4.199577
04515f85-92d3-4843-8a88-a6397ce48fac
ishandutta2007/codeforces
fkguyx042/normal/489/B.cpp
#include<cstdio> #include<algorithm> #include<cstring> using namespace std; int i,j,p,k,a[105],b[105],n,m,vis[105],ans; int main() { scanf("%d",&n); for (i=1;i<=n;i++) scanf("%d",&a[i]); scanf("%d",&m); for (i=1;i<=m;i++) scanf("%d",&b[i]); sort(a+1,a+n+1); sort(b+1,b+m+1); for (i=n;i;i--) { for (j=m;j;j--...
ALGO
0.999938
3.17257
fd8f9ceb-67d8-447f-a5ee-5d1dadd5f4b8
GlaucoMasi/CompetitiveProgramming
Cses/Mathematics/1722-FibonacciNumbers.cpp
#include <bits/stdc++.h> using namespace std; ifstream fin("input.txt"); ofstream fout("output.txt"); int mod = 1e9+7; unordered_map<long long, long long> memo; long long f(long long n){ if(n <= 1) return n; if(memo.count(n)) return memo[n]; long long ans; if(n%2) ans = ((f((n+1)/2)*f((n+1)/2))%mod + (f((n+1)...
ALGO
0.999976
5.40865
62daaa8e-5407-457f-b646-0f8d596d2ccc
ArpitNalkande/Cpp_stl
Cpp_stl/Pair_Vector.cpp
#include<bits/stdc++.h> using namespace std; // int main(){ // // pair<1,2>p; "here 1 and 2 is datatype like int string float" // pair<int,string>p; // p={1,"arpit"}; // cout<<p.first<<endl; // cout<<p.second; // } int main() { vector<int>v; for(int i=0;i<5;i++){ v.push_back(i)...
ALGO
0.939344
3.459616
b735fb9a-0bba-420b-943e-bad48215e2b9
spacefarers/cp
problems/USACO/2021-feb/g-2.cpp
#include <iostream> #include <vector> #include <queue> #include <map> #include <set> using namespace std; int deg[305]; set<int> paths[305]; bool done[305]; int N; map<int, vector<int>> mp2; vector<int> target, current; set<int> key_pos; int ans=0; void solve(){ bool changed=false; for (int i=1;i<=N;i++){ if (de...
ALGO
0.999385
3.716797
3c5e5c08-9885-45f7-bbd3-9c990bf3fa2e
AbdulRehman7590/PF-Lab-tasks
pfweek5/task05.cpp
#include <iostream> using namespace std; main() { int hours, minutes, hrsinmins, timeafter, hh, mm; cout <<"Enter hours : "; cin >> hours; cout <<"Enter minutes : "; cin >> minutes; hrsinmins = hours*60; timeafter = (hrsinmins + minutes) + 15; hh = timeafter/60; if(hh > 23) { hh = 0; } mm = timeaft...
ALGO
0.987166
4.558042
8bd89f5b-7813-4f8b-9f81-0dd323b1a76d
raincross7/code-similarity
codes/train_code/problem265/problem265_47.cpp
#include <bits/stdc++.h> using namespace std; #define pi acos(-1) #define IOS ios_base::sync_with_stdio(0); cin.tie(); cout.tie(); #define ff first #define ss second #define pb push_back #define debug(val) cerr << "The Value Of " << #val << " is : " << val << '\n'; typedef long double ld; typedef long long ll; typedef ...
ALGO
0.99997
3.90963
50138fd6-8979-4873-8f0f-4bcdadc0b660
BrainKulas/kphp
common/tl/compiler/tl-parser-new.cpp
#include "common/tl/compiler/tl-parser-new.h" #include <cassert> #include <fcntl.h> #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <sys/stat.h> #include <sys/types.h> #include <ctime> #include <unistd.h> #include "common/c-tree.h" #include "common/crc32.h" #include "common/kprintf...
TOOL
0.875609
3.598235
726df5df-d337-4a05-8427-391f7d52cf88
Wild-Donkey/Code
Luogu/P1000-P1049/P1007_Bridge.cpp
#include <cstdio> #include <iostream> using namespace std; int l, n, a[5005], mi = 0, ma = 0; int main() { cin >> l >> n; for (int i = 1; i <= n; i++) cin >> a[i]; for (int i = 1; i <= n; i++) mi = max(min(a[i], l - a[i] + 1), mi); for (int i = 1; i <= n; i++) ma = max(max(a[i], l - a[i] + 1), ma); cout << mi...
ALGO
0.999981
4.575544
1e8c7733-e958-404b-8593-2884e7bb7878
xrLil-Batya/xray-oxygen
code/3rd-party/OPCODE/Ice/IceAABB.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains AABB-related code. * \file IceAABB.cpp * \author Pierre Terdiman * \date January, 29, 2000 */ ///...
ALGO
0.98868
5.16316
d6f5711e-8134-4b62-97bc-2dbeac54e92d
haven-protocol-org/haven-main
src/device_trezor/trezor/transport.cpp
#ifdef WITH_DEVICE_TREZOR_WEBUSB #include <libusb.h> #endif #include <algorithm> #include <functional> #include <boost/endian/conversion.hpp> #include <boost/asio/io_service.hpp> #include <boost/asio/ip/udp.hpp> #include <boost/date_time/posix_time/posix_time_types.hpp> #include <boost/format.hpp> #include <boost/algo...
TOOL
0.948856
5.607156
603f83b8-6f58-4de3-8198-be8934737b31
seraph27/competitve-programming
atcoder/tdpc/a.cpp
// Problem: A - コンテスト // Contest: Typical DP Contest // URL: https://atcoder.jp/contests/tdpc/tasks/tdpc_contest // Time Limit: 2000 // Start: Sat Jun 28 21:52:39 2025 // mintemplate #ifdef MISAKA #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> #define int long long #define sz(x) (int)x.size() #define ar array #...
ALGO
0.999618
5.095018
199ab598-038c-419e-87c9-987fd08e8ac6
jjminsuh/algorithm
Programmers/dp/땅따먹기/solution.cpp
#include <iostream> #include <vector> using namespace std; int solution(vector<vector<int>> land) { int answer = 0; int n = land.size(); // 각 칸에 도달할 수 있는 최댓값 계산 vector<vector<int>> memo(n, vector<int>(4, 0)); for (int i = 0; i < n; i++) { // 첫 행 초기화 if (i == 0) { for (int j = 0; j < 4; ...
ALGO
0.999911
5.065623
bad8a1ef-7e54-45c3-b885-a2141d0490cc
SoumyajitChowdhury/Arrays
Array/matrixRotation.cpp
#include<iostream> #include<vector> #include<algorithm>//given a squre matrix,turn it by 90 degrees in a clockwise direction without using any extra spaces using namespace std; void rotateArray(vector<vector<int>>&vec){ //transpose for(int i=0;i<vec.size();i++){ for(int j=0;j<i;j++){ swap...
ALGO
0.999735
4.762166
852cb6dc-9df2-4b9c-925b-3eb1bebeaeb4
nikhil-sjce/SDESheet
DAY 2/missingRepeatingNumbers.cpp
pair<int,int> missingAndRepeating(vector<int> &arr, int n){ long long int sum=0, sum0=0, sumSquare=0, sumSquare0=0; for(int i=0;i<n;i++){ sum0+=(long long int)arr[i]; sumSquare0+=(long long int)arr[i]*(long long int)arr[i]; } sum = ((long long int)((long long int)n*((long long int)n+1))/2);...
ALGO
0.999884
4.949814
d60f866a-a809-4d3c-baec-6a9f82b8a94d
AnjumAsif/clean_architecture_base_setup
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
3a5e0e4d-e99c-4ebb-9aa8-6a7acc45d552
lwcM/leetcode_solution
0010-regular-expression-matching.cpp
static const auto __=[]{ ios::sync_with_stdio(false); cin.tie(nullptr); return nullptr; }(); class Solution { public: bool isMatch(string s, string p) { bool **dp = new bool*[s.size()+1]; for(int i = 0; i < s.size()+1; ++i) dp[i] = new bool[p.size()+1](); dp[s.size()]...
ALGO
0.999925
5.47683
39fa6771-70ba-4e2a-981e-9d1544f48acb
Quan-NguyenMinh/45-thuattoan
câu4.cpp
#include<stdio.h> int main() { int A,B, C[1000],i,j; int dem_SNT=0; printf("Nhap A,B: "); scanf("%d %d",&A,&B); int p=2; for(i=A;i<=B;i++) { C[i]=1; } for( i=A;i<=B;i++) { for( j=2;j<B;j++) { C[j*p]=0; if(j*p>=B) { break; } } p++; } for(i=A;i<=B;i++) { if(C[i]==...
ALGO
0.998866
3.570009
4d663931-6cce-49f0-a91b-fe915a328d98
JinHoChoi0104/Coding_Test_Study
C++ Study/8.4_BAEKJOON 22970.cpp
#include <iostream> using namespace std; int main(void) { ios_base::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); int T, num, pre=0, max_len = 1, len = 0; bool upward = true; for (cin >> T; T-- > 0; ) { cin >> num; if (pre < num) { // if (upward) // ̿ len++; else { // ̿Ƿ max_len = ...
ALGO
0.999867
4.294717
25f28fc7-285d-489c-8bfa-ee643c9ed2cc
exverge-0/yuzu-EA4176
src/video_core/renderer_vulkan/renderer_vulkan.cpp
#include <algorithm> #include <array> #include <cstring> #include <memory> #include <optional> #include <string> #include <vector> #include <fmt/format.h> #include "common/logging/log.h" #include "common/polyfill_ranges.h" #include "common/scope_exit.h" #include "common/settings.h" #include "common/telemetry.h" #incl...
TOOL
0.910303
7.358455
709d56e5-12aa-4b90-9abe-ec5788b19d52
thearzuyilmaz/bmi_calculator
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
e46881b4-48d8-4688-a6ac-1d4fc31e2641
Justpenz233/ConformableMechanism
Engine/ThirdParty/libigl/include/igl/qslim.cpp
#include "collapse_edge.h" #include "connect_boundary_to_infinity.h" #include "decimate.h" #include "edge_flaps.h" #include "find.h" #include "is_edge_manifold.h" #include "max_faces_stopping_condition.h" #include "per_vertex_point_to_plane_quadrics.h" #include "qslim_optimal_collapse_edge_callbacks.h" #include "quadri...
ALGO
0.99848
6.462574
88bd1d2f-b2c9-4a31-ab3b-bb0ff17e8f2d
XXX-KOSMOSTARS-XXX/forClasses
Practice C++ Coding/discriminant.cpp
/* * * Напишите программу для решения квадратных уравнений вида ax^2 + bx + c = 0 (относительно x). * На вход программа получает три целых числа: a , b и c, соответственно. * При этом гарантируется, что a != 0. * На вывод программа должна вывести два вещественных корня уравнения, разделённые пробелом. * Если вещ...
ALGO
0.999696
4.571386
97b166d0-26e1-46aa-8e1d-e3241b76fbeb
itshak/genstats
src/engine.cpp
#include "types.h" #include <algorithm> #include <cassert> #include <cfloat> #include <cmath> #include <cstring> #include <iostream> #include <sstream> #include <iomanip> #include <map> #include "movegen.h" #include "notation.h" #include "search.h" #include "thread.h" #include "engine.h" #include "dataaccess.h" #incl...
ALGO
0.981681
4.528032
ecef98ad-ae13-4e65-b248-90ac73a71452
Justin-roy/DSA-COMPLETE-SERIES
Array/Finding Duplicate Elements In Unsorted Array 2.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; // 8 3 6 4 6 5 6 8 2 7 /* Time Complexity of this Code is O(n) */ int H[100]; void Find_Dup4(int A[],int n) { for(int i=0;i<n;i++) { H[A[i]]++; } for(int i=0;i<=100;i++) { if(H[i]>1) cout<<"Duplicate "<<i<<" Prese...
ALGO
0.999042
4.108428
ba8eb3ba-ac33-4b59-bc0c-323e1de2b358
chirag765-C/Leetcode
2259-remove-digit-from-number-to-maximize-result/2259-remove-digit-from-number-to-maximize-result.cpp
class Solution { public: string removeDigit(string number, char digit) { string str; for(int i=0;i<number.size();i++){ if(number[i]==digit){ if(i!=number.size()-1){ str=number.substr(0,i)+number.substr(i+1,number.size()); if(number[...
ALGO
0.999978
6.243187
493235a0-8a30-4a31-b47b-c43db934ec3a
tetris0k/Univercity-projects
Matrix_solve_orthogonalization_threaded/norms.cpp
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "functions.h" #include <pthread.h> static double nevv = 0.; static double threads_total_time = 0.; static pthread_mutex_t threads_total_time_mutex = PTHREAD_MUTEX_INITIALIZER; double nev(int n, double *A, double *x, int t, pthread_t* threads, Nevyaska...
ALGO
0.999231
3.475777
1fab4b4d-479f-4f10-b1c5-ce4dd5466d18
pekingdoncic/C-and-Cplusplus
c语言练习程序/三种结构加上最基本的知识(c语言前5章的内容)/寻找质数.cpp
#include <stdio.h> void main(int=1) { int i,n; for(n=100;n<201;n++) { for(i=2;i<=n-1;i++) if(n%i==0) break; if(i<n) printf("%d\n",n); else printf("%d\n",n); } }
ALGO
0.999459
3.252116
c7ea21c5-71e8-4da5-b8ea-1a0f60c85204
ashok-kumar-005/Cpp-Programs
Pointer1.cpp
#include<iostream> using namespace std; int main() { int a,*p,arr[5]={3,43,4,54,43},i; for(i=0;i<5;i++) { cout<<"\nValue of array "<<i+1<<" : "<<arr[i]<<endl; } cout<<"\nAddress of arr : "<<&arr; p=arr; for(i=0;i<5;i++) { cout<<"\nValue of array using pointer"<<i+1<<...
ALGO
0.989565
3.138755
cbd3073c-4071-4121-93a3-011fabc92de8
TanmayBansa1/DSA-NOTES
binarytree/bst2.cpp
#include <iostream> #include <queue> using namespace std; class node { public: int data; node *left; node *right; node(int data) { this->data = data; left = nullptr; right = nullptr; } }; void levelOrderTraversal(node *root) { queue<node *> q; q.push(root); ...
ALGO
0.999929
4.048243
33475a4d-e0a6-4c17-b731-3213172e6a56
SumnRanjan/CPP-Code
17Recursion/18SubSequence.cpp
#include <iostream> #include <string> #include<vector> using namespace std; void findSubSequence(string str, string output, int index , vector<string>&ans) { // base case if (index >= str.length()) { // ans jo hai wo output string mai bulid ho chuka hai // print kardo // cout << "->...
ALGO
0.999013
4.784456
eb15c469-e5f3-4cf7-a4e3-67e8f78172d0
coinmenace/ReefCoin
src/wallet/rpcdump.cpp
#include "base58.h" #include "chain.h" #include "rpcserver.h" #include "init.h" #include "main.h" #include "script/script.h" #include "script/standard.h" #include "sync.h" #include "util.h" #include "utiltime.h" #include "wallet.h" #include <fstream> #include <stdint.h> #include <boost/algorithm/string.hpp> #include ...
WEB
0.953597
6.197687
bb16e78a-ae1d-433d-943a-e6f87a8c69d4
vipinkarthic/My-Cp-journey
Algomania25C.cpp
#include<bits/stdc++.h> using namespace std; #define mod (1000000007) #define INF INT_MAX #define FOR(a, c) for (int(a) = 0; (a) < (c); (a)++) #define FORL(a, b, c) for (int(a) = (b); (a) <= (c); (a)++) #define FORR(a, b, c) for (int(a) = (b); (a) >= (c); (a)--) typedef long long int ll; typedef vector<int> vi; t...
ALGO
0.999984
4.709085
5c49ed30-4805-4d2d-9c30-2157bc3902bf
AIT-RAMI/Competitive-Programming
Codeforces/1095-B-ArrayStabilization.cpp
#include <bits/stdc++.h> #include <algorithm> #include <string.h> #include <math.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const ll mod = 1000000007; #define pf(n) cout << n << endl #define pfs(n) cout << n #define ps() cout <<" " #define sf(n) cin >> n #define in(i,n) for (int i = ...
ALGO
0.999806
3.646012