uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
975043f8-9b9f-4ba1-a70b-7f2750c7d537
scp020/cp-template
TEST/oj/luogu_t103481.cpp
#include "GRAPH/Tarjan_bridge.h" #include "IO/FastIO.h" /* [T103481 【模板】割边](https://www.luogu.com.cn/problem/T103481) */ /** * 本题为桥边模板题 */ static constexpr uint32_t N = 50000, M = 300000; int main() { uint32_t n, m; cin >> n >> m; OY::EBCC::Graph<N, M> G(n, m); for (uint32_t i = 0; i < m; i++) { ...
ALGO
0.999252
5.133058
a9e5cbf9-e22d-44ba-8173-1f12a14854b7
ishandutta2007/codeforces
rednextcentury/normal/1209/B.cpp
#include<bits/stdc++.h> using namespace std; int a[101][10001]; int sum[10001]; int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n; cin>>n; string s; cin>>s; for (int i=0;i<n;i++) { a[i][0]=s[i]-'0'; sum[0]+=a[i][0]; int x,y; cin>>y>>x; ...
ALGO
0.999901
3.640142
db97e281-c1ba-4ac7-b41b-b0236cdb5544
Holjchrist/Cpp
Mini problems/Cubo Narcisita.cpp
#include <iostream> using namespace std; int main() { int max = 999; int min = 100; for (min; min <= max; min++) { int prim = min % 10; int num = prim * prim * prim; int sec = (min % 100 - prim) / 10; int numd = sec*sec*sec; int ter = (min - prim - sec) / 100;...
ALGO
0.999883
4.335014
a292ebbf-67ad-4046-b394-d19cee268421
ishandutta2007/codeforces
ronnie007/normal/1444/A.cpp
#include<bits/stdc++.h> using namespace std ; long long p , q ; void input ( ) { cin >> p >> q ; } long long proc ( long long i ) { long long sr = p ; int cnt = 0 ; while ( ( q % i ) == 0 ) { q /= i ; ++ cnt ; } while ( ( sr % i ) == 0 ) { sr /= i ; } for ( int j = 0 ; j <...
ALGO
0.999977
4.844707
308ab62a-db19-4ee9-b5cd-5f9e02708408
Azson/machineLearning
py3/leetcodeCN/16.最接近的三数之和.cpp
# include <cstdio> # include <vector> # include <algorithm> using namespace std; /* * @lc app=leetcode.cn id=16 lang=cpp * * [16] 最接近的三数之和 */ // @lc code=start class Solution { public: void update_ans(int& ans, int tmp, int& target) { if (abs(ans - target) > abs(tmp - target)) ans = tmp; ...
ALGO
0.999987
5.994536
65f51263-70e0-4247-92ee-7dd4ab8c2611
20231024/my_home
7.charpter7/binary_search.cpp
/************************************************************************* > File Name: binary_search.cpp > Author:XUYIFENG > Mail: <EMAIL> > Created Time: Mon 23 Sep 2024 12:32:02 AM CST ************************************************************************/ #include<iostream> #include<map> #include<string> #...
ALGO
0.99917
3.729205
99c9b79b-bf29-4904-b1e3-574cff1a2086
VipulChauhan89/Leetcode-solutions
Array/1877-Minimize_Maximum_Pair_Sum_in_Array.cpp
class Solution { public: int minPairSum(vector<int> &nums) { int mx=INT_MIN,n=nums.size(); sort(nums.begin(),nums.end()); for(int i=0;i<n/2;i++) { mx=max(mx,nums[i]+nums[n-i-1]); } return mx; } };
ALGO
0.999965
5.788196
5a2d6b78-7f3a-4451-8662-cca7efa71779
StevenL2017/Codeforces
problem/archive/372/372C.cpp
#include <iostream> #include <cstdio> #include <climits> #include <cmath> #include <cstring> #include <string> #include <array> #include <vector> #include <stack> #include <queue> #include <deque> #include <set> #include <map> #include <bitset> #include <numeric> #include <algorithm> #include <functional> using namesp...
ALGO
0.999904
5.410256
52293894-3219-48e5-9f16-403e9ed9c10f
xia-qing-feng/UE5_GEOplugin
Plugins/Geo/Source/ThirdParty/libigl/tests/include/igl/bbw.cpp
#include <test_common.h> #include <igl/boundary_conditions.h> #include <igl/readMESH.h> #include <igl/writeDMAT.h> #include <igl/readTGF.h> #include <igl/bbw.h> TEST_CASE("bbw: decimated_knight", "[igl]" "[slow]") { Eigen::MatrixXd V,C; Eigen::MatrixXi T,F,E; igl::readMESH(test_common::data_path("decimated-knigh...
TEST
0.928884
5.812701
dd6e7e11-14c4-4fd4-a611-070efee024bf
RajDharkar/competitive-programming
Contests/USACO/Usaco Guide Gold/rangequerries/bitfenwick.cpp
#include<bits/stdc++.h> //#include "C:\Users\rajve\Documents\GitHub\competitive-programming\debugging.h" using namespace std; typedef long long ll; ll n; vector<ll> tree; vector<ll> arr; ll lsb(ll val){ return val & -val; } void update(ll index, ll val){ while(index <= n){ tree[index] += val; ...
ALGO
0.99994
4.284901
8997a952-e3b7-46d8-9895-8a4acf0da232
alpha74/iCF
M/Multiply_by_2_divide_by6.cpp
// Multiply by 2, divide by 6 // https://codeforces.com/problemset/problem/1374/B // Aman Kumar /* INSIGHT: - Count number of times n is divisible by 2 and 3 - If divisible by any other, return -1 - If count2 > count3, return -1 - Else return (count3-count2) + count3 */ #include <bits/stdc++.h> using namesp...
ALGO
0.999955
4.977224
c7222e43-5dd4-4b6d-9d43-93c8b6d9841c
lazy-chess-player/daily_problem
Problem_CodeForces/2024/07/22/Bicolorings.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> #include <vector> #include <algorithm> #include <set> #include <unordered_map> #include <cstring> #include <cstdio> #include <string> #include <queue> #include <stack> #include <map> #include <list> #include <bitset> #include <cmath> #include <numeric> #include <cs...
ALGO
0.999964
3.995158
6474a5ea-0ceb-482c-b805-c08e87b862a6
Mantu001/DSA-Cpp-ApnaCollege
08Array.cpp
// #include <iostream> // using namespace std; // int main() { // int roll_no[3]; // cout << "Enter the number: "<<endl; // for (int i=0; i<3; i++){ // cin>> roll_no[i]; // } // cout << "you have entered :-" << endl; // for (int i=0; i<3; i++){ // cout<< roll_no[i]<< endl; // ...
TOOL
0.983989
3.440776
1d85db83-8cf0-4559-a5c9-88e5b3ab747d
siddharth-kumar182002/DSA
D_Secret_Passwords.cpp
#include <bits/stdc++.h> using namespace std; void dfs(long long node,vector<long long > &vis,vector<long long> graph[] ){ vis[node]=1; // cout<<node<<endl; for(auto x: graph[node]){ // cout<<node<<endl; if(!vis[x]){ //cout<<node<<endl; dfs(x,vis,graph); ...
ALGO
0.999895
4.265499
8f1001a0-4262-4fa6-9d2a-3ee51767e4a5
ishandutta2007/codeforces
smax/normal/1257/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); int t; cin >> t; while (t--) { int n, x, a, b; cin >> n >> x >> a >> b; if (a > b) ...
ALGO
0.999388
4.289656
2eb01352-d94f-49d4-9271-77f068247829
ishandutta2007/codeforces
flashmt/normal/474/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); int n, x, Q, a[100100]; cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; a[i] += a[i - 1]; } cin >> Q; while (Q--) { cin >> x; cout << lower_bound(a + 1, a + n + 1, x) - a << '\n'; } }
ALGO
0.999907
3.872687
ec39573b-b109-4864-9b8d-0d0ff5e69720
stdstring/leetcode
Algorithms/Tasks.1001.1500/1400.ConstructKPalindromeStrings/solution.cpp
#include <array> #include <string> #include "gtest/gtest.h" namespace { class Solution { public: [[nodiscard]] bool canConstruct(std::string const &s, int k) const { const size_t palindromeCount = k; if (s.size() < palindromeCount) return false; if (s.size() == palindromeC...
TEST
0.911109
6.907942
95d67c45-ae7f-409b-aacd-692a7b8daa6e
Stolen-king/-CrackYourInternship
089_kth_smallest_element_in_a_tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999991
6.276841
f84f9ddf-cc19-4359-a4fd-cc87682aa802
Metrolina-Regional-Model-Team/MRM22v2.0
pgm/ModeChoice/Transims60/Transims60/ArcRider/Write_Riders.cpp
//********************************************************* // Write_Riders - draw the transit ridership polygons //********************************************************* #include "ArcRider.hpp" //--------------------------------------------------------- // Write_Riders //------------------------------------------...
DATA
0.85737
4.730537
a55da2cf-0dc9-4f30-864b-3dbb9dd008d3
bansalmukul-cse/LeetCode-Codes
1359. Count All Valid Pickup and Delivery Options.cpp
class Solution { public: int countOrders(int n) { vector<long long> dp(n+1,0); dp[0]=1; int mod = pow(10,9)+7; for(long long i =1;i<=n;i++){ dp[i]= i *dp[i-1]*(2*i-1); dp[i]= dp[i]%mod; } return dp[n]; } };
ALGO
0.999979
5.67416
e57ce6f6-ab9e-4bf2-af07-b660775c8583
an4s/bitcoin_tx_analyzer_v0.18.1
src/bloom.cpp
#include <bloom.h> #include <primitives/transaction.h> #include <hash.h> #include <script/script.h> #include <script/standard.h> #include <random.h> #include <streams.h> #include <math.h> #include <stdlib.h> #define LN2SQUARED 0.4804530139182014246671025263266649717305529515945455 #define LN2 0.693147180559945309417...
ALGO
0.944604
7.157103
e46c84c4-5681-4261-9710-b0f402e9313e
thecreatorsir/DailyDSA
Array/missing_number.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ int n,i,j; cin>>n; int a[n-1]; for(i = 0;i<n-1;i++){ cin>>a[i]; } sort(a,a+n-1); int flag; for(i = 1,j=0;i<=n&&j<n-1;i++,j++){ flag = true; if(i!=a[j]){ ...
ALGO
0.999763
3.593819
1616fbe1-0ab1-4f1c-b647-dca97243b2cb
upendrayadav1611/Spoj-Solutions
TRGRID - Traversing Grid.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int int main() { ll t,n,m; cin>>t; while(t--) { cin>>n>>m; if(n==1||(n==1&&m==1)) cout<<"R\n"; else if(m==1) cout<<"D\n"; else if(n%2==0&m%2==0) { if(n<=m) cout<<"L\n"; else cout<<"U\n"; } else if(n%2!=0&&m%...
ALGO
0.999872
3.502982
2c11199d-f8d1-49bc-841a-52e34ca3cd60
SauravPati08/FacePrep-CPP
Recursion/Number of digits.cpp
#include <bits/stdc++.h> using namespace std; int NumberOfDigits(int n) { if (n/10 == 0) return 1; return 1 + NumberOfDigits(n / 10); } int main() { int n; cout<<"Enter the value of n"<<endl; cin>>n; cout<<"The number of digits in "<<n<<" is "<<NumberOfDigits(n); return 0; }
ALGO
0.999541
4.462705
8b5562ec-dff4-4a94-bf9f-d83cb33e4c0f
ykc0131/Algorithm
BOJ/1463.cpp
#include <iostream> #include <vector> using namespace std; int min(int m, int n) { return m < n ? m : n; } int main() { int X; cin >> X; vector<int> N(1000001); for (int i = 2; i < X+1; i++) { N[i] = i; if (i % 3 == 0) { N[i] = min(N[i],N[i / 3] + 1); } if (i % 2 == 0) { N[i] = min(N[i], N[i ...
ALGO
0.999964
3.922506
3ef288c1-56c7-4b2e-8d13-c8494be4b024
MingYanWoo/Leetcode
面试题28. 对称的二叉树.cpp
// 面试题28. 对称的二叉树 // 请实现一个函数,用来判断一棵二叉树是不是对称的。如果一棵二叉树和它的镜像一样,那么它是对称的。 // 例如,二叉树 [1,2,2,3,4,4,3] 是对称的。 // 1 // / \ // 2 2 // / \ / \ // 3 4 4 3 // 但是下面这个 [1,2,2,null,3,null,3] 则不是镜像对称的: // 1 // / \ // 2 2 // \ \ // 3 3 // 示例 1: // 输入:root = [1,2,2,3,4,4,3] // 输出:true // 示例 2: // 输...
ALGO
0.9999
6.414449
b6737545-eb89-4c0e-9bed-e8c5306c5d45
surya3214/coding
Codeforces/FoolsAndRoads.cpp
// AC LCA Easy #include <bits/stdc++.h> #define BUFFER 5 #define BUFF(x) x + BUFFER #define N_MAX (int) 1e5 #define H_MAX 17 // #pragma GCC optimize "O4" using namespace std; typedef long long int ll; typedef unsigned long long int ull; typedef pair<int, int> pii; int n, ans[BUFF(N_MAX)]; struct { int reps, sum, dept...
ALGO
0.99986
4.247549
6267d34e-efad-45ae-a8a0-e331089d1e23
TheIslland/Code_learn
7.代码练习/1.noip入门组/178对称字符串1.cpp
/************************************************************ File Name : 178对称字符串1.cpp Author: TheIslland Mail: <EMAIL>, <EMAIL> Created Time: 2019-11-16 星期六 20:07:31 ************************************************************/ #include <iostream> #include <algorithm> #include <iomanip> #include <stri...
ALGO
0.999938
3.509695
6524e6fb-7673-4957-903e-e2bb50432b06
Nycto-c05/DSALabCodes
4. BST/code.cpp
/*Beginning with an empty binary search tree, Construct binary search tree by inserting the values in the order given. After constructing a binary tree - i. Insert new node, ii. Find number of nodes in longest path from root, iii. Minimum data value found in the tree, iv. Change a tree so that the roles of the left and...
ALGO
0.999978
4.268833
6f26a208-e78f-48d0-8dbf-be216235d85a
binh120702/ICPC2020
ICPCNational/M.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { int t; ll x1,x2,y1,y2,ans,tx1,tans; cin >> t; while (t--) { cin >> x1 >> y1 >> x2 >> y2; if (y1 > y2) { swap(y1,y2); } if (x1>x2) { swap(x1,x2); ...
ALGO
0.999687
3.797685
84e8a838-c492-423d-9452-995973775433
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_1806_10.cpp
#include <bits/stdc++.h> using namespace std; int K, P; int po(int v, long long t, int P) { int ans = 1; for (; t; t >>= 1) { if (t & 1) ans = ((long long)ans * v) % P; v = ((long long)v * v) % P; } return ans; } int calc(const long long v) { int t = po(2, v, P - 1); if (t == 0) t = P - 1; cerr <<...
ALGO
0.999812
3.708718
b83ebdd8-52fb-48f0-8cd5-4733e5862e54
TSJim0711/TSJim_UniHomework
实验 11 基础程序设计/实验3数组、结构体及指针/A1题.cpp
/* 1、某班期末考试科目为数学(MT)、英语(EN)和物理(PH),有最多不超过30人参加考试。考试后要求: (1)计算每个学生的总分和平均分; (2)按总分成绩由高到低排出成绩的名次; (3)打印出名次表,表格内包括学生编号、各科分数、总分和平均分; (4)任意输入一个学号,能够查找出该学生在班级中的排名及其考试分数。 */ #include <iostream> using namespace std; typedef struct ANode { int adjvex; struct ANode* nextarc; int weight; }ArcNode; typedef struct V...
ALGO
0.995999
4.013841
2a9d914d-d95c-4e8a-8edf-e3d38e02ddf8
K0nnyaku/Code
Data/CSP-JS2021二轮提高组数据/SD-00124/palin/palin.cpp
/* ޸С freopen ̬ 浵 ɾļ !! */ #include<bits/stdc++.h> //#include<iostream> //#include<utility> //#include<cmath> //#include<cstdio> //#include<cmath> //#include<queue> //#include<map> //#include<stack> //#include<list> //#include<string> using namespace std; typedef long long ll; ll n; ll w[50005],dic[100005]; ll p=1,p...
ALGO
0.999834
3.485395
afbbaa11-e349-4f3f-8bd7-2f08f9244d84
imran1995/tiktok
most_repated_substring.cpp
#include<bits/stdc++.h> using namespace std; int k; struct pot { int rept,len; }point,mx; struct node { int ct,rept; node *next[27+2]; node() { ct=0; rept=0; for(k=0;k<26;k++){ next[k]=NULL; } } }*root; //void del(node *cur) /*{ for(i=0;i<26;i++){ ...
ALGO
0.999933
3.707237
4331564d-55bb-4bfc-be58-86d6cc82b153
SHIVA-GARG/dsa-codes
Bit_masking/memo_recursion.cpp
#include<iostream> #include<vector> #define ll long long using namespace std; ll fib(int n,ll *memo){ if(n<=1){ memo[n] = n; return n; } if(memo[n] != -1) return memo[n]; else{ memo[n] = fib(n-1,memo)+fib(n-2,memo); return memo[n]; } } int main(){ long long memo[101]; for(int i=0;i<101;i++) memo[i...
ALGO
0.999971
4.508717
67ae8ec4-ffda-4093-b596-f5a742139647
noahleft/concurrency_programming
parallel_sum/main.cpp
#include <iostream> #include <vector> #include "calParallelSum.hpp" using namespace std; int main() { vector<int> data(1000, 1); cout<<"sumup:"<<calParallelSum(data)<<endl; return 0; }
ALGO
0.998773
3.731498
4273f69d-ba1d-43a7-aedb-cbc56f75abe7
NitichaiSawangsai/BUU-Y1
31 = 888144/GGG/ex04.cpp
using namespace std; #include <iostream> // Language C++ // #include <string.h> // Input Letter // #include <iomanip> class Product { protected : string name; int numOfProduct; public : Product(){ ...
ALGO
0.994083
4.576065
7d2bc8a6-3358-41d0-9b21-5cac2cbfcdde
Mag-strom/cp-
cicularTour.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; struct petrolPump { int petrol; int distance; }; // } Driver Code Ends /* The structure of petrolPump is struct petrolPump { int petrol; int distance; };*/ /*You are required to complete this method*/ class Solution{ public: ...
ALGO
0.999883
5.379397
6290ae92-c592-4029-ba74-d4d8a1c6584c
nikonikolov/mbed-rtos
mbed-os/features/unsupported/tests/dsp/mbed/fir_f32/main.cpp
#include "mbed.h" #include "dsp.h" #define BLOCK_SIZE (32) #define NUM_BLOCKS (10) #define TEST_LENGTH_SAMPLES (BLOCK_SIZE * NUM_BLOCKS) #define SAMPLE_RATE (48000) #define SNR_THRESHOLD_F32 (50.0f) float32_t expected_output[TEST_LENGTH_SAMPLES]; float32_t ou...
TEST
0.981756
5.273691
454e3fa3-011b-4dd4-9ab1-8033ff9bf5ba
palilo815/ps
baekjoon/17000/17216.cpp
#include <bits/stdc++.h> using namespace std; const int mxX = 1001; int dp[mxX + 1]; int main() { cin.tie(0), cout.tie(0); ios::sync_with_stdio(0); int N; cin >> N; for (int x; N--;) { cin >> x; dp[x] = max(dp[x], x + *max_element(dp + x + 1, dp + mxX)); } cout << *max_elemen...
ALGO
0.999921
4.441611
92c16bbe-3e44-433e-8528-62177796178f
AntoninaNayden/Algorithms
bim_heap.cpp
#include <iostream> #include<vector> using namespace std; int main() { /* freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);*/ int n; cin >> n; bool res = true; vector<int> bin_heap(n); for (int i = 0; i < n; i++) { cin >> bin_heap[i]; } for (int i = 0; i <...
ALGO
0.999994
4.098704
b6d8b752-ee98-442e-bc34-bc4f7f134ad1
habiburrahmantalha/DevSkill
DCP-169.cpp
#include <iostream> using namespace std; int main(int argc, char *argv[]) { int t,tc=1,i,j,m,n,c; char G[110][110]; cin>>t; while(t--){ cin>>n>>m; for(i=0;i<n;i++){ cin>>G[i]; } cout<<"Case "<<tc++<<":"<<endl; c=0; for(i=0;i<n;i++){ for(j=0;j<m;j++){ if(G[i][j]=='$') { cout<<i+1<<","...
ALGO
0.990758
3.705213
0dab35b7-0878-479f-ae7c-a96f2f6356f0
Poojaambati9154/Striver-SDE-Challenge
151-184/155.cpp
#include <bits/stdc++.h> int kthLargest(vector<int>& arr, int size, int k) { // Write your code here. priority_queue<int,vector<int>,greater<int>>pq; for(int i=0;i<size;i++){ pq.push(arr[i]); if (pq.size() > k) { pq.pop(); } } return pq.top(); }
ALGO
0.999898
4.768933
78d8a581-42e4-4696-afbd-445fc2b68b93
Kowloongs/Nautilus
contrib/kyua/utils/config/nodes.cpp
#include "utils/config/nodes.ipp" #include <memory> #include <lutok/state.ipp> #include "utils/config/exceptions.hpp" #include "utils/config/keys.hpp" #include "utils/format/macros.hpp" namespace config = utils::config; /// Destructor. config::detail::base_node::~base_node(void) { } /// Constructor. /// /// \para...
TOOL
0.891706
5.60623
7dc22613-d1c3-42bc-b0fc-8fb7f21eb233
esl000/CustomUE4VolumeRaymarching
Engine/Source/ThirdParty/IntelTBB/IntelTBB-4.4u3/src/perf/time_fibonacci_cutoff.cpp
#include <cstdio> #include <cstdlib> #include "tbb/task_scheduler_init.h" #include "tbb/task.h" #include "tbb/tick_count.h" #include "fibonacci_impl_tbb.cpp" long CutOff = 1; long SerialFib( const long n ); long ParallelFib( const long n ); inline void dump_title() { printf(" Mode, P, repeat, N, =fib va...
ALGO
0.99985
5.431416
e0351f4a-0e7d-4724-974b-9e60e70ca025
BANKONPYTHAI/testnet-contracts
BTCqoraclecommittee.cpp
#include <cstdint> #include <array> #include <string> #include <cstring> // Constants constexpr size_t ORACLE_COMMITTEE_SIZE = 5; constexpr size_t ORACLE_THRESHOLD = 4; constexpr size_t MAX_PRICE_DECIMALS = 8; // for satoshis // Hardcoded public keys of 5 committee members (quantum-resistant pubkeys should be used in...
ALGO
0.914475
6.996624
212fe13f-f97e-4f29-b3b4-da176f1d3207
jerryzhao173985/vsg_ode_robot
mathutils.cpp
#include <cmath> #include "mathutils.h" #include "axis.h" using namespace matrix; namespace lpzrobots { matrix::Matrix odeRto3x3RotationMatrixT ( const double R[12] ) { matrix::Matrix matrix(3,3); matrix.val(0,0)=R[0]; matrix.val(0,1)=R[4]; matrix.val(0,2)=R[8]; matrix.val(1,0)=R[1]; matrix...
ALGO
0.996222
6.337228
25cc3fd4-8cb7-415d-b72a-db96cdc79aac
jacobeverist/opaque
src/modules/alphashape/boost_1_53_0/libs/math/example/root_finding_example.cpp
// root_finding_example.cpp // Example of finding roots using Newton-Raphson, Halley // Note that this file contains Quickbook mark-up as well as code // and comments, don't change any of the special comment mark-ups! //#ifdef _MSC_VER //# pragma warning(disable: 4180) // qualifier has no effect (in Fusion). //#en...
ALGO
0.999894
5.083551
badfeaa6-a95e-495c-8422-8c7664703d1e
rafzai/C
prog198.cpp
// Вычисление значения арифметического выражения #include <stdio.h> #include <conio.h> #include "stdlib.h" void main() { char st[40]; // строка char buf[10]; // изображение очередного числа char op; // оператор int rez; // значение выражения int n; // очередное число int i,j; pr...
ALGO
0.999723
3.557043
12901474-b7bd-45de-9bab-ee6338f15860
ishandutta2007/codeforces
pranjal.ssh/normal/611/C.cpp
#include <bits/stdc++.h> using namespace std; #define INF 1000000007 typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vector<int> > vvi; typedef pair<int,int> ii; typedef vector<pair<int,int> > vii; typedef vector<vector<pair<int,int> > > vvii; #def...
ALGO
0.999831
4.104645
73cf211b-516e-48fa-ae33-3680c5a40e3a
emilymryan/LAMMPS-SPH-Source-Code
src/KOKKOS/angle_class2_kokkos.cpp
/* ---------------------------------------------------------------------- Contributing author: Ray Shan (Materials Design) ------------------------------------------------------------------------- */ #include "angle_class2_kokkos.h" #include "atom_kokkos.h" #include "atom_masks.h" #include "comm.h" #include "force...
ALGO
0.986066
4.993109
66aa1e47-b2e1-4e0c-ad02-0faa9927b207
leducphuclong/code
Competitive Programming/all/23hsg9dna3.cpp
/*If you don't think twice, you have to code twice.*/ // Include #include <bits/stdc++.h> // NOLINT // #include <conio.h> // Namespace using namespace std; // NOLINT // Define #define nln '\n' // Typedef and Struct typedef int64_t ll; // Constant // Declare global variables. vector<pair<ll, ll>> dir4 = {{0, 1},...
ALGO
0.999408
5.211213
445504e6-769a-4721-b523-241e34097299
Compotes/robocup-2018
main.cpp
#include <stdio.h> #include "xiApiPlusOcv.hpp" #include <time.h> #include <unistd.h> #include <iostream> #include <ctime> #include "Compass.hpp" #include "Serial.hpp" #include "Camera.hpp" #include "Server.hpp" #include "GPIO.hpp" #include "bluetooth_client.hpp" #include "who_am_I.hpp" #include "bluetooth_server.hpp"...
TOOL
0.884249
3.469069
d33d598c-c81f-4a50-9572-67b4c2fa6d2d
xaaria/CPP
jaccardMain.cpp
#include <iostream> #include <algorithm> #include <sstream> #include "jaccard.h" using namespace otecpp_jaccard; const int K = 2; const std::string A = "no senator or representative shall during the time for which he was elected be appointed to any civil office under the authority of the united states which shall ha...
ALGO
0.972793
5.150596
80912186-f1a8-4442-aa60-fbc45aae7809
happycode-2010/ACM
2up/ACM训练三/G(八数码)/slove.cpp
//A*+hash #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> #include <iostream> #include <queue> #include <map> #include <vector> using namespace std; const int maxn=4e5+10;// 400010 ಻ô״̬ int ha[9]={1,1,2,6,24,120,720,5040,40320}; //hash ha[i]=ha[i-1]*i int dir[4][2]={{-1,...
ALGO
0.999967
4.3563
10ecb5e2-ec59-49f4-99dd-5d14e5d14f9b
yellowHatpro/Codes-Practice
Leetcode/2597_TheNumberOfBeautifulSubsets.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int beautifulSubsets(vector<int> &nums, int k) { int n = nums.size(); vector<int> subsets; int cnt = 0; function<void(int)> backtract = [&](int st) { for (int i = st; i < n; i++) { bool isBeautiful = true; fo...
ALGO
0.999887
5.497758
11315e76-0a20-4122-8d83-6f993a683a3b
Cgfyufsygsm/OI-Codes
SPOJ/SP11470.cpp
#include <bits/stdc++.h> #define il inline #define FOR(i, a, b) for (int i = (a); i <= (b); ++i) #define DEC(i, a, b) for (int i = (a); i >= (b); --i) using namespace std; namespace YangTY { namespace fastIO { const int maxc = 1 << 23; char ibuf[maxc], *__p1 = ibuf, *__p2 = ibuf; il char getchar() {return __p1 == __p...
ALGO
0.999138
3.730952
49951a8c-35d3-4208-be0a-3bd6d8db90b5
achalpandeyy/Hikari
src/Core/BSDF.cpp
#include "Interaction.h" #include "Math/Utility.h" #include <algorithm> namespace Hikari { BSDF::BSDF(const Interaction& interaction) : m_Normal(interaction.m_Normal) { OrthonormalBasis(m_Normal, m_Tangent, m_BiTangent); } BSDF::~BSDF() { for (unsigned int i = 0u; i < m_NumBxDFs; ++i) delete m_BxDFs[i]; ...
ALGO
0.982114
6.255061
bc0a5395-d561-48db-8054-403df65e25f3
gkichaev/PAINTOR_V3.0
eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_maxnorm.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { MatrixXf mat(2,4); mat << 1, 2, 6, 9, 3, 1, 7, 2; MatrixXf::Index maxIndex; float maxNorm = mat.colwise().sum().maxCoeff(&maxIndex); std::cout << "Maximum sum at position " << maxIndex << std:...
ALGO
0.999907
4.220459
e2576128-4944-4dc9-908f-0b5305f53cd9
michalsiudut/CodeForces
Football.cpp
#include <iostream> #include <vector> #include <string> int main() { int n; std::cin >> n; std::vector<std::string> goals; std::string tmp, st1, st2; for (int i = 0; i < n; i++) { std::cin >> tmp; goals.push_back(tmp); } int first = 0, second = 0; std::string firstTe...
ALGO
0.999946
4.091362
21543e43-511f-47eb-b923-4bd62bf33335
asclines/CPPS
hacker-rank/algorithms/graph-theory/journey-to-the-moon/solution.cpp
#include <iostream> #include <vector> int main() { int N, I; std::cin >> N >> I; std::vector<std::vector<int> > adj_list; std::vector<bool> visited; // Initialize data for (int n = 0; n < N; n++) { std::vector<int> new_vec; adj_list.push_back(new_vec); visited.push_back(false); } // Read...
ALGO
0.999922
3.861379
7ea2f727-ea87-4728-9ddc-c4ce8f4066c0
mridul8920/Leetcode-Problems
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 { public: ListNode* reverseKGro...
ALGO
0.999995
5.821809
44c004e5-7400-4a33-9091-c187cc4d4a38
bjh5098/2019_CSE4007_12852
assignment4/z3-master/z3-master/src/tactic/arith/probe_arith.cpp
#include "tactic/probe.h" #include "ast/expr2polynomial.h" #include "ast/for_each_expr.h" #include "ast/arith_decl_plugin.h" #include "tactic/goal_util.h" class arith_degree_probe : public probe { struct proc { ast_manager & m; unsynch_mpq_manager m_qm; polynomial::manager ...
ALGO
0.997611
6.274502
3f2aec4e-b776-4343-a205-63e65c165233
ishandutta2007/codeforces
hitman623/normal/1286/B.cpp
#include <bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int,int> #define vi vector<int> #define vii vector<pii> #define mi map<int,int> #define mii map<pii,int> #define all(a) (a).begin(),(a).end() #define x first #d...
ALGO
0.999989
3.631544
4f5c0351-eaf6-470a-bf3e-d4dcf8db5a92
floreaadrian/AlgCodes
CodeForces/498A/main.cpp
#include <iostream> #include <algorithm> #include <stdio.h> using namespace std; int main() { int n,m,boys[105],girls[105],ans=0; scanf("%d",&n); for(int i=0;i<n;++i) scanf("%d",&boys[i]); scanf("%d",&m); for(int i=0;i<m;++i) scanf("%d",&girls[i]); sort(boys,boys+n); sort(g...
ALGO
0.999829
3.21725
d94f8fdb-ae34-4f98-b1c2-69fc8ee21c00
DSAAlgo987/Data-Structures-Algorithms
String/longest_common_prefix/main.cpp
#include <bits/stdc++.h> using namespace std; // nlgn string longestCommonPrefix(vector<string>& strs) { // base case if(strs.size() == 0){ return ""; } string ans = ""; // sort ip string sort(strs.begin(), strs.end()); // nlgn string first = strs[0]; string last = strs[strs...
ALGO
0.999319
4.378118
dbf2a81c-7f88-424b-a280-8643e1b9fb01
BlackLotus454/Strivers-SDE-sheet
0199-binary-tree-right-side-view/0199-binary-tree-right-side-view.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999926
6.019861
f13200a5-9cfe-42cb-9152-13a15f76e4cc
nothene/UVa-Solutions
10140.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef vector<ll> vll; #define INF 1000000000 #define forn(i, n) for(int (i) = 0; (i) < (n); (i)++) #define for1(i, n) for(int (i) = 1; (i) <= (n); (i)++) #define BUG(x) cout...
ALGO
0.999936
4.616949
84754e03-b8a7-41df-83ed-c674706207fa
raincross7/code-similarity
codes/train_code/problem141/problem141_318.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef tuple<int, int> duo; #define TT template<typename T> #define ET(T) typename T::value_type TT inline T sq(T x){return x*x;} TT inline T In(){T x;cin>>x;return x;} TT inline int ubnd(T&v,ET(T) x){return upper_bound(begin...
ALGO
0.999178
3.84775
1e3b7855-4d44-4f18-ae93-54076565d614
samuelt005/Learning-Flutter
aula_02_03/app_notify_me/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.996375
6.76775
339f4326-34a7-4d59-9384-ce857906cc72
ganzorigu/algorithms
heap/findKthLargest.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stack> #include <string> #include <unordered_map> #include <queue> using namespace std; class Solution { public: int findKthLargest(vector<int>& nums, int k) { // O(nlogn) // sort(nums.begin(), nums.end()); // ret...
ALGO
0.999793
4.87442
a8535572-69dd-40cb-8f43-17195e3b5d3d
allan-simon/Tatodetect
src/models/Detects.cpp
/** * Tatoeba Project, free collaborative creation of multilingual corpuses project * Copyright (C) 2011 Allan SIMON <<EMAIL>> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, eith...
ALGO
0.898595
5.96265
ce7a8041-7714-408e-b39b-2a90483a7aae
TAEMBO/cplusplus-assignments
Semester 2 (165)/3.55.cpp
#include <iostream> using namespace std; int main() { int int0; int int1; int int2; int int3; int oddOnes = 0; cin >> int0; cin >> int1; cin >> int2; cin >> int3; if ((int0 % 2) == 1) oddOnes++; if ((int1 % 2) == 1) oddOnes++; if ((int2 % 2) == 1) oddOnes++; if ((int3 % 2...
ALGO
0.999627
4.318816
741b8047-7868-43b3-96bf-e8468cc8161d
jayakrishnamarisetty/LeetCode
2634-minimum-common-value/minimum-common-value.cpp
class Solution { public: int getCommon(vector<int>& nums1, vector<int>& nums2) { //sort(nums1.begin(),nums1.end()); //int c=INT_MAX; int i=0; int j=0; while(i<nums1.size() && j<nums2.size() ){ if(nums1[i]<nums2[j]) i++; else if(nums1[i]>nu...
ALGO
0.999984
5.444316
f963cd94-352c-442e-9059-72c1587eb1ed
OpenHUTB/engine_bak
Engine/Source/ThirdParty/Intel/TBB/IntelTBB-2019u8/examples/parallel_reduce/primes/primes.cpp
// Example program that computes number of prime numbers up to n, // where n is a command line argument. The algorithm here is a // fairly efficient version of the sieve of Eratosthenes. // The parallel version demonstrates how to use parallel_reduce, // and in particular how to exploit lazy splitting. #include "p...
ALGO
0.999889
5.992275
ade02aeb-23c3-49c6-8d15-32287d0bd866
ano-ny-mous/A2Z-DSA-Sheet
Step 15 - Graphs [Concepts & Problems]/Step 15.2 - Problems on BFS,DFS/Number of Provinces.cpp
// Time Complexity: O(n) + O(v+2e) // Space Complexity: O(n) + O(n) class Solution { public: unordered_map<int, vector<int>> adj; void dfs(int u, vector<bool> &visited) { visited[u] = true; for (int &i : adj[u]) { if (visited[i] == false) { df...
ALGO
0.999752
6.063262
540161bf-8d72-4fbd-83cc-151b54691063
Howardkhs/coding_test_study
khs/tree/중위순회.cpp
#include <iostream> #include <unordered_map> #include <string> #include <sstream> using namespace std; class Node{ public: string alpha; int node_num; Node* lft_child = nullptr; Node* rgt_child = nullptr; Node(string _alpha, int _node_num){ alpha = _alpha; ...
ALGO
0.998868
3.796868
24d7c34a-03a1-4cb6-bd31-6b97570c5cb5
faheemmuhammed1133/cpp_program_101
81_pattern.cpp
#include <iostream> using namespace std; int main() { for (int i=0;i<4;i++){ for(int j=0;j<=i;++j) { cout<<"*"; } cout<<endl; } return 0; }
ALGO
0.999366
3.245579
1048e089-3632-4bf1-86d4-bba90b2fd2ac
ravisharma-16/All-_Codes2
recursion/printanum.cpp
// #include <iostream> // using namespace std; // int printnum(int n) // { // if (n >= 1) // { // cout << n << " "; // printnum(n - 1); // } // } // int main() // { // int n; // cout << "enter the number -> "; // cin >> n; // printnum(n); // } // print 1 to n; // #include ...
ALGO
0.999408
4.255528
d25c379a-d16e-454e-be04-14d0a63f8678
wassimalharaki/Codeforces
1900/KuroniandtheCelebration.cpp
#include <bits/stdc++.h> using namespace std; // #define int long long #define nl '\n' #define v vector int ask(int a, int b) { cout << "? " << a + 1 << " " << b + 1 << endl; int c; cin >> c; return c - 1; } void ans(int c) { cout << "! " << c + 1 << endl; exit(0); } void solve() { int n; cin...
ALGO
0.999906
4.15923
e4425a08-10fe-4a39-b9df-25ef93c1b807
Yunyang29/AlgorithmJourney_CPP
27. Remove Elements.cpp
// Date: 15/05/25 // LeetCode: https://leetcode.cn/problems/remove-element/ // Keywords: Array, Two Pointers // Idea: // - Only move slow pointer when the current element is not equal to the value to be removed. #include "Array.h" int Array::_27_remove_element::main(vector<int>& nums, int val) { int slow = 0; for (...
ALGO
0.999844
6.283124
50ace57f-7452-4756-b414-ca150ea14fc8
vster/OOP_CPP
Ch08/Ch08-Exercises/ex05-1/ex05-main.cpp
#include <iostream> #include <iomanip> using namespace std; #include "ex05.h" int main() { time t1(10, 43, 59); time t2(20, 35, 25); time t3, t4; t3 = t1 + t2; cout << "\nt1 = "; t1.displaytime(); cout << "\nt2 = "; t2.displaytime(); cout << "\nt3 = "; t3.displaytime(); ++t1; cout << "\nt1 = "; t1.display...
TOOL
0.973496
4.268467
1b6be534-caf3-485b-a36d-c5784149ed40
rahulil23/STRUKTUR-DATA-PRAK2-SMTR2
prak 10- no 2.cpp
#include <iostream> #include <conio.h> #include <string.h> using namespace std; main () { int jd,no,kiri,kanan,center; char data[20][50],cari[20]; cout<<"\n\t\t *************************************** \n"; cout<<"\t\t | \t\t\t\t | \n"; cout<<"\t\t | \t Proses Pencarian \t | \n"; cou...
ALGO
0.999483
3.401219
f80e45d3-32b3-43ab-99d9-d14334746a19
Kristoff-starling/OJ-Programmes
Codeforces/[Codeforces-30E]Tricky and Clever Password(O(n)).cpp
#include <cstdio> #include <iostream> #include <cstring> #include <string> #include <cstdlib> #include <utility> #include <cctype> #include <algorithm> #include <bitset> #include <set> #include <map> #include <vector> #include <queue> #include <deque> #include <stack> #include <cmath> #define LL long long #define LB lo...
ALGO
0.999715
3.134168
e45804cf-ebe7-4807-b467-1d20ec4250af
dnbk3/Code_PTIT
vscode/ki1nam2/RangeQuery1.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while(t--){ int n,q; cin >> n >> q; int m[n]; for (int i = 0; i < n; i++) { cin >> m[i]; } for (int i = 0; i < q; i++) { int a,b; cin >> a >...
ALGO
0.999449
4.077096
4f707e25-ea03-4249-a789-fa5f10fabebb
areong/CornerMacroPlacer
src/cornerstitching/HorizontalTilePlane.cpp
#include "cornerstitching/HorizontalTilePlane.h" #include "cornerstitching/Tile.h" // Temporary #include "cornerstitching/SortedTiles.h" HorizontalTilePlane::HorizontalTilePlane(int xStart, int yStart, int xEnd, int yEnd) : TilePlane(xStart, yStart, xEnd, yEnd) { currentlyRemovedTiles = new std::vector<Tile *>();...
ALGO
0.951386
4.584701
2c3c5f92-57af-45bd-aa19-f0e7629f6da8
Anandjeechoubey/cf_solutions_cpp
cf_1611b.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC optimize("O3") #pragma GCC target("avx,avx2,sse,sse2,sse3,sse4,popcnt,fma") #pragma GCC optimize("unroll-loops") using namespace std; #define vll vector<long long> #define vi vector<int> #define vstr vecto...
ALGO
0.999924
4.815695
83357aaa-902b-4c2d-ae53-dc43c4b35166
himanshujainsanghai/DSA
0583-delete-operation-for-two-strings/0583-delete-operation-for-two-strings.cpp
class Solution { public: int longestCommonSubsequence(string s1, string s2) { int n = s1.size(); int m = s2.size(); // vector<vector<int>> dp(n+1 , vector<int>(m+1 , 0)); // return func(n, m , s1 , s2 , dp); vector<int> prev(m + 1, 0), curr(m + 1, 0); for (int ind2 =...
ALGO
0.999963
6.029929
7fca43ff-86fa-4a54-89c2-551e7d4174f4
jianminchen/leetcode-14
src/test.cpp
#include <deque> #include <iostream> using namespace std; int main() { deque<int> dq; dq.push(1); dq.push(2); dq.push(4); for (auto i = dq.begin(); i != dq.end(); ++i) { cout << *i << endl; } return 0; }
ALGO
0.912788
3.922304
c93343dd-1ca7-413b-9cc4-de31d63b1e3a
GameDevSajib/Problem-Solving
Structure.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; class Student{ public: int roll; string name; string hobby; }; int main() { ll n; cin>>n; Student s[100005]; for(int i=0;i<n;i++) { cin>>s[i].roll; cin>>s[i].name; cin>>s[i].hobby; } cout<<"ro...
ALGO
0.97801
3.597012
0aa52513-4ec4-4f51-854c-2f608114c394
kinako0626-ota/connect_car_map_sample
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
74fc22ad-8af4-4011-bcfd-15f1949e688e
ruesga-99/icpc_solutions
2024_1/problem_K/K.cpp
#include <bits/stdc++.h> using namespace std; struct Caballo{ int X, Y; int Incidentes = 0; vector <int> Atacantes; }; int main(){ int N, M; cin >> N >> M; Caballo Piezas[M]; for (int i = 0; i < M; i++){ int x, y; cin >> x >> y; Piezas[i].X = x; Pie...
ALGO
0.999914
4.253872
d08facb9-8bfe-4230-98f8-e8100e17b8c4
Bashar12345/P_S_practice
C_problem_old/tt.cpp
#include <bits/stdc++.h> #include "first.c" int main() { int x,y; scanf("%d%d",&x,&y); sum(x,y); sub(x,y); mul(x,y); //div(x,y); return 0; }
ALGO
0.999166
3.497403
6fcc2538-0f59-4139-8dcd-ad572afbe768
Chaitalykundu/LeetCode
1106-parsing-a-boolean-expression/1106-parsing-a-boolean-expression.cpp
class Solution { public: bool parseBoolExpr(string expression) { stack<char> charStack; vector<bool> boolResults; bool currentResult; for (int i = 0; i < expression.size(); i++) { if (expression[i] == ')') { // Clear the temporary boolean result list ...
ALGO
0.99981
6.588643
3a35593e-72b7-4a33-832e-9962f54435cf
bunnycodec/HackerRankEasy
EqualizeTheArray.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n, i, temp, max; int arr[101] = {0}; cin >> n; for(i=0; i<n; i++) { cin >> temp; arr[temp]++; } max = *max_element(arr, arr+101); cout << n-max; return 0; }
ALGO
0.99983
3.404513
c87d1471-be27-4985-9cbf-be83e281f84f
ishandutta2007/codeforces
77o/normal/1561/E.cpp
// #pragma GCC optimize("O3") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx") #include <bits/stdc++.h> using namespace std; #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define sz(x) (int)(x).size() using ll = long long; template <typename T> class DebugIntStream; template <ty...
ALGO
0.999406
4.463939
2e10bb1f-f99c-445e-86af-99ad52e9c7f8
Abuenameh/CTDG-Python
casadimath.cpp
#include "casadimath.hpp" #include "gutzwiller.hpp" namespace casadi { inline bool isnan(SX& sx) { return sx.at(0).isNan(); } inline bool isinf(SX sx) { return sx.at(0).isInf(); } } complex<SX> operator*(double x, complex<SX> sx) { return complex<SX>(x,0) * sx; } complex<SX> ope...
ALGO
0.996337
4.878275
8064f43f-7f2a-45f2-a9e2-eb8d9151545a
RosaDamascena/Algorithm_cpp
BOJ/18111_Minecraft/main.cpp
// 18111 - 마인크래프트 #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N, M, B; cin >> N >> M >> B; vector<vector<int>> land(N, vector<int>(M)); int minHeight = 256, maxHeight = 0; for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { ...
ALGO
0.999938
5.047488
ce48e9eb-6387-4581-b15c-b7c05feec337
deepakiiitkota/Competitive
C++/Leetcode Premium/lowest_common_ancestor_of_a_binary_tree_iv.cpp
/* https://leetcode.ca/2020-07-02-1676-Lowest-Common-Ancestor-of-a-Binary-Tree-IV/ Given the root of a binary tree and an array of TreeNode objects nodes, return the lowest common ancestor (LCA) of all the nodes in nodes. All the nodes will exist in the tree, and all values of the tree's nodes are unique. The number o...
ALGO
0.999996
6.242647
ea9d99bb-207f-4758-a195-279dd221feeb
bhardwajjitin/C-and-Cpp
random.cpp
#include<bits/stdc++.h> using namespace std; //1 approach bool check(int n){ if(n==1){ return 0; } for(int i=2;i<=sqrt(n);i++){ if(n%i==0){ return 0; } } return 1; } //2 approach bool check1(int n){ if(n==1){ return 0; } for(int i=2;i<n;i++){ ...
ALGO
0.999965
4.562647