uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0d298136-d579-4f56-92c0-85612428e079
Leczez/TDIU08
C++/Lab2/main.cpp
#include <iostream> #include <iomanip> using namespace std; int N_faculty(int const n) { if(n == 1) { return n; }else { return n * N_faculty(n-1); } } void Clear_Trash(); double Add_Int_Double(int Number1, double Number2); double Add_Double_Int(double Number1, int Number2); void swap(double &number...
TOOL
0.971406
3.540349
dae695a9-95ca-4fc0-81df-ebaa5b0448f1
rkritika1508/ITM-Mentorship-Program
Contest - 1 - October 18 2020/C++ Codes/MakingAnagrams.cpp
#include <bits/stdc++.h> using namespace std; int makingAnagrams(string s1, string s2) { int a1[26] = {0}, a2[26] = {0}; int len1 = s1.size(); int len2 = s2.size(); // getting the counter of each character in two strings for(int i = 0; i < len1; i++) a1[s1[i]-'a']++; for(int i = 0;...
ALGO
0.99997
4.537989
0b09f861-82eb-4b6e-90fd-6368e50e7918
applebuddy/BJAlgorithmStudy
BaekJoonPS/BaekjoonAlgorithmPS/TwoPointer/CD_4158.cpp
// MARK: - CD 4158 C++ 문제풀이 #if 0 #include <iostream> using namespace std; int main() { ios_base :: sync_with_stdio(0); cin.tie(0); while(1) { int N, M; cin>>N>>M; if(N==0 && M==0) break; int A[N], B[M]; int Ans = 0; for(int i=0; i<N; i++) cin>>A...
ALGO
0.999904
3.800666
a5535cce-9b2f-4c48-94df-75a0cf6063cf
manojborugadda/Leetcode-questions
2187. Minimum Time to Complete Trips/main.cpp
class Solution { //TC:O(NLOGN) SC:O(1) public: long long minimumTime(vector<int>& time, int totalTrips) { long left = 0 ; long right = time[0] * (long long )totalTrips; while(left < right) { long mid = (right+left)>>1; //how many trips can we do long long...
ALGO
0.999919
5.996058
7536fc05-df76-4c76-bc0d-755c5496ae38
fLeXnotOP/My-LeetCode-Solutions-Using-C-
0075-sort-colors/0075-sort-colors.cpp
class Solution { public: void sortColors(vector<int>& nums) { int low=0; int mid=0; int high=nums.size()-1; while(mid<=high){ if(nums[mid]==0){ swap(nums[low],nums[mid]); low=low+1; mid=mid+1; } ...
ALGO
0.999901
6.16097
ecd8f285-c3c2-49c0-b246-c9f96374d5d6
Himanshusinghaiml/DESKTOP_CODING
pattern/pyramid_tele.cpp
#include <iostream> using namespace std; void printPyramid(int n) { for (int i = 1; i <= n; i++) { // Print spaces for (int j = 1; j <= n - i; j++) { cout << " "; } // Print stars for (int k = 1; k <= i; k++) { cout << "* "; } cout <...
TOOL
0.98898
5.554127
a6eafbee-98f2-4a9f-a323-25c3b905c596
xuzhaocheng/PAT
src/1068.Find More Coins.cpp
/* ** 背包问题 ** dp[i][j]表示从前i个硬币中能挑选出的总值不超过j的最大总面值 ** dp[i][j] = max(dp[i-1][j], dp[i-1][j-coins[i-1]]+coins[i-1]) ** 最后dp[n][m]如果等于m则有解,否则无解。 ** 用choice数组来记录选取的硬币 ** choice[i][j]表示第i个硬币是否在dp[i][j]中被选入,1表示前i个硬币中选出的一组面值最大且不超过j ** 的硬币中包含了第i个硬币,0表示不包含。 */ #include <iostream> #include <vector> #include <string> #include <alg...
ALGO
0.999999
3.948878
bddb0d4e-192a-486f-9749-0c7d34cc6845
Maniac198/Competitve-Programming
B_Long_Long.cpp
#include <bits/stdc++.h> using namespace std; #define yes {cout<<"YES"<<endl;} #define no {cout<<"NO"<<endl;} #define int long long #define endl '\n'; #define all(x) x.begin(),x.end() #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (...
ALGO
0.999707
4.429029
1d5a4b18-c192-4dc9-a5a5-70946480fdd3
NirjharSingha/Algorithm_1
printEulerCircuitDirected.cpp
#include <bits/stdc++.h> using namespace std; void dfs(vector<vector<int>> &adj, stack<int> &toposort, vector<bool> &visited, int node) { visited[node] = true; for (auto i : adj[node]) { if (!visited[i]) { dfs(adj, toposort, visited, i); } } toposort.push(node); ...
ALGO
0.999997
5.073285
15da88f1-4545-4b56-92bd-d2e01af0a8c9
sarvex/leetcode-skip
solution/0500-0599/0523.Continuous Subarray Sum/Solution.cpp
class Solution { public: bool checkSubarraySum(vector<int>& nums, int k) { unordered_map<int, int> mp; mp[0] = -1; int s = 0; for (int i = 0; i < nums.size(); ++i) { s += nums[i]; int r = s % k; if (mp.count(r) && i - mp[r] >= 2) return true; ...
ALGO
0.999943
5.921008
57f251f4-96de-48a6-a673-8323acad6ec6
GmashaN/tic_tac_toe
PlayerTurn.cpp
#include <iostream> using namespace std; int PlayerTurn(char *gF, int str_, int col_){ int index=-1; if (0 < str_) { if (str_ < 4) { if (0 < col_){ if (col_ < 4){ if (str_ == 1){ index = 0; } ...
ALGO
0.994388
4.163516
116a2d72-fd9e-461c-9d45-dec6ef968eb0
gauravrana05/ProblemsDaily
gaurav/Coding/2024/Codeforces/Educational Codeforces Round 154/B_Two_Binary_Strings.cpp
#include<iostream> using namespace std; int main(){ int t; cin>>t; while(t--){ string a, b; cin>>a>>b; int l = 0, r = a.size() - 1 ; while(l < r){ if(a[l] != a[r]){ r--; } else{ for() } } ...
ALGO
0.999726
4.181644
1add1b32-bbee-4766-8a81-c134c5515571
davepandit/Data-Structures-And-Algo
Heaps/Problems/Is_binary_tree_a_heap.cpp
class Solution { public: // Check if the tree is complete using level order traversal bool isCompleteTree(Node* root) { if (!root) return true; queue<Node*> q; q.push(root); bool nullSeen = false; while (!q.empty()) { Node* current = q.front(); ...
ALGO
0.997938
6.81411
bb3c3e8f-b4f8-496e-90e6-be5428a5566e
Nakib-Arman/CSE318---ArtificialIntelligence
3.ChainReaction/.history/a_20250610141654.cpp
#include <bits/stdc++.h> using namespace std; #define DEPTH 2 class Cell { int orb_num; int critical_mass; char color; public: Cell() { this->orb_num = 0; this->color = 'W'; this->critical_mass = 4; } // Cell(int orb_num, char color) { // this->orb_num = orb_...
ALGO
0.999699
4.98132
ef636432-0e72-43d7-96a5-36d4a27fae34
claner2804/Algorithms-and-Datastructures-HW01-02
main_singlyLinkedList.cpp
#include "singlyLinkedList.h" #include <iostream> using namespace std; int main() { SinglyLinkedList list; // Adding nodes cout << "Adding elements!" << endl << "-----------" << endl; list.printList(); list.insertAtLast(17); list.printList(); list.insertAtLast(28); list.printList(); list.insertAtFirst(1); ...
TOOL
0.894847
4.890151
469949ee-9c84-43a6-b41b-5eacfad436eb
Diogotb/CursoFlutterA
exemplo_persistencia_json/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.999064
6.76073
6292e9f4-b439-4364-9521-26efbf365fab
maurice-schuppe/my-sync
C_CPP_sync/TICPP_2ed/TICPP_2nd_Solution_Guide/code/S05/StackOfIntTest.cpp
int main() { using namespace std; StackOfInt stk; stk.init(); for (int i = 0; i < 5; ++i) stk.push(i); while (stk.size() > 0) cout << stk.pop() << endl; } ///:~
ALGO
0.999058
4.313711
1937c800-689c-4f85-94eb-a9cc9afca59e
cyruscyliu/videzzo-llvm-project
libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp
// <algorithm> // template<InputIterator InIter, RandomAccessIterator RAIter, class Compare> // requires ShuffleIterator<RAIter> // && OutputIterator<RAIter, InIter::reference> // && Predicate<Compare, InIter::value_type, RAIter::value_type> // && StrictWeakOrder<Compare, RAIter::value_type>}...
TEST
0.998692
6.935617
529f5faf-78a3-40ba-aca9-847382b7207e
josegabrielzevallos/Matematica-discreta-3
cripto/src/Afin.cpp
#include <iostream> #include<cstdlib> #include<ctime> #include "Afin.h" #include "funciones.h" int Cripto::random(int n){ srand(time(NULL)); int r = mod(rand(), n-1) + 1; return r; } int Cripto::GenerarA(int n){ int a = random(n); while(mcd(a,n) != 1) a = random(n); return a; } ...
ALGO
0.994295
3.363991
956534b7-6d98-4b70-8820-c6e05b4be68a
aaman007/codeforces
Is your horseshoe on the other hoof.cpp
#include<bits/stdc++.h> using namespace std; int main() { int a,cnt=0; map < int,int > mp; for(int i=0;i<4;i++) { cin >> a; mp[a]++; if(mp[a]>1) cnt++; } cout << cnt << endl; return 0; }
ALGO
0.999759
3.976716
b4167dfe-1401-411e-baab-b599e78d1314
Chenjh-dev/C-exercises
C++练习题/元素查找(函数模板).cpp
/* Ԫزңģ壩 Ŀ дһнвҵĺģ壬ΪnԪأΪTҪҵԪΪkey ע⣺ʹģ庯 һtʾtʵ ڶһдĸʾͣIʾͣDʾ˫ͣ CʾַͣSʾַͣȻnʾ鳤ȡ n key tʵ ÿһҵkeyеĵڼԪأ1ʼҲ0 4 I 5 5 3 51 27 9 27 D 3 -11.3 25.42 13.2 2.7 C 6 a b g e u q a S 4 sandy david eason cindy cindy 4 0 1 4 ĿҪһģ(ܶغ)ʵͲ֮ */ #include<iostream> using namespace std; template <class T> int find(T *a,int n,T c) { int i...
ALGO
0.998655
3.16824
edad8163-d47a-4126-90ac-9ec6006e0d8a
WhyPoq/advent-of-code-2024
2/1.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <cmath> int get_sign(int val) { return val < 0 ? -1 : 1; } int main() { std::ifstream fin("input.txt"); int safe_count = 0; std::string line; while (std::getline(fin, line)) { std::...
ALGO
0.999308
4.426327
6d9b3aea-ee23-45a0-816f-acc4628843dc
bigmommajumpin/CalcJSawa
apps/shared/continuous_function_properties.cpp
#include "continuous_function_properties.h" #include <apps/shared/expression_display_permissions.h> #include <poincare/addition.h> #include <poincare/constant.h> #include <poincare/division.h> #include <poincare/matrix.h> #include <poincare/multiplication.h> #include <poincare/trigonometry.h> #include "continuous_fun...
TOOL
0.877535
7.401431
e56fa8fc-c540-4535-ace6-0663b32b93df
ishandutta2007/codeforces
brunovsky/normal/1305/G.cpp
#include <bits/stdc++.h> #ifdef LOCAL #include "code/formatting.hpp" #else #define debug(...) (void)0 #endif using namespace std; // For each i, we have a[i], we want to know who will invite us // Must be j such that a[j]>a[i] and a[i]&a[j]=0 // Invert it, we just visited j // Which a[i] with a[i]<a[j] are going to b...
ALGO
0.999963
4.060766
77e98f9c-1e81-4a95-8f10-566671ecf7a7
RafaD0507/RafaelSanabria_Ejercicio23
prince.cpp
#include <iostream> #include <cmath> using namespace std; double u_inicial(double x); int main(){ double x_down = 0; double x_up = 1; double c = 0.1; double dx = 0.01; double dt = 0.00001; double k = c*dt/dx; int nx = x_up/dx+1; double *u = new double[nx]; double *temp = new double[nx]; double *vi...
ALGO
0.999975
3.670661
d53132b6-da0a-442b-ab0e-68a459e9fc8d
abhisheksingh24/random_codes_i_ever_wrote
Chef on a trip 2.cpp
#include<iostream> #include<string> #include<vector> #include<map> using namespace std; map<string, string> nxt,prv; string findFirst(){ for(auto& kv:nxt){ if(prv.find(kv.first)==prv.end()) return kv.first; } } int main(){ int t, n; string src, tgt, cur; cin >> t; while(t--){ ...
ALGO
0.999944
4.358788
25961813-6ceb-4442-b4a2-9ec19a5e4eaa
Klimas1k/lab4
Operations.cpp
//Operations.cpp #include "Header.h" long double** MulMatrixes(int size_row, int size_column, long double** matrix1, long double** matrix2) { long double tmp = 0; long double size = 248; long double** result; InitMatrix(result, size_row, size_column); for (int k = 0; k < size_row; k++) { for (int l = 0; l < ...
ALGO
0.998411
3.742327
1b215804-3dd5-4a7e-9ceb-89d230720ca2
Kondr48/gz_team_engine
trunk/xray/xrLC/xrHierrarhy.cpp
#include "stdafx.h" #include "build.h" #include "OGF_Face.h" void CBuild::BuildHierrarhy() { Fvector scene_size; float delimiter; scene_bb.getsize(scene_size); delimiter = _MAX(scene_size.x,_MAX(scene_size.y,scene_size.z)); delimiter *= 2; int iLevel = 1; float SizeLimit = g_params.m_maxsize/8; if (SizeL...
ALGO
0.990772
3.873622
151d7de9-6ebf-428c-bd37-43536f6977bf
sudha2186/Cpp-Program-Learning
sorting/majorityAlgo2.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Time complexity O(nlogn) = sort -> O(nlogn) + loop -> O(n) int majorityEle(vector<int> nums) { int n = nums.size(); sort(nums.begin(), nums.end()); int freq = 1, ans = nums[0]; for(int i = 1; i < n; i++) { ...
ALGO
0.999947
4.989586
62a8a994-1957-48be-a2cf-77d64c2db43d
juliolugo96/competitive-programming
codeforces/implementation/good_numbers_hard.cpp
# include <bits/stdc++.h> using namespace std; using ull = long long; # define io_boost ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); int main() { io_boost short q; cin >> q; while(q--) { ull n; cin >> n; ull result{1}, pow_curr{3}; while(result < n) { resul...
ALGO
0.99998
3.981089
7e213d02-f43f-44b3-a52e-4115f7296fc8
mohamedGamalAbuGalala/Practice
Study Material/CP/04.ch4/ch4_02_UVa469.cpp
/* Wetlands of Florida */ // classic DFS flood fill #include <cstdio> #include <cstring> using namespace std; #define REP(i, a, b) \ for (int i = int(a); i <= int(b); i++) char line[150], grid[150][150]; int TC, R, C, row, col; int dr[] = {1,1,0,-1,-1,-1, 0, 1}; // S,SE,E,NE,N,NW,W,SW int dc[] = {0,1,1, 1, 0,-1,...
ALGO
0.999423
3.657161
f5aaded0-97fe-4bf8-916c-bf01ae723668
YanfeiORNL/EP10x
third_party/Windows-CalcEngine/src/SingleLayerOptics/src/BSDFDirections.cpp
#include <cassert> #include <algorithm> #include <stdexcept> using namespace FenestrationCommon; namespace SingleLayerOptics { CBSDFDefinition::CBSDFDefinition( const double t_Theta, const size_t t_NumOfPhis ) : m_Theta( t_Theta ), m_NumOfPhis( t_NumOfPhis ) { } double CBSDFDefinition::theta() const { return...
ALGO
0.988754
6.069818
5d61aebc-ba72-4bc6-ba5d-37942eb069bb
Arvy1998/Calculus-and-Play-with-New-Syntax
Clever Number Reversion.cpp
#include <iostream> #include <cmath> using namespace std; int reversion(int i, int number, int count, int result); int main (){ int i, number, count; float result; cout << "Hello! :) This program reverses any number, just answer the questions and get your number reversed! :) Have fun!" << endl; ...
ALGO
0.998319
3.965357
8421c79d-aa29-4cc6-a5aa-dc6332c03560
manpreetnub23/iS_codes
monoalphabeticCipher.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; // Function to generate a random permutation of the alphabet string generateRandomKey() { string alphabet = "abcdefghijklmnopqrstuvwxyz"; random_shuffle(alphabet.begin(), alphabet.end()); // std::cout<<"shuffled alphabet key i...
ALGO
0.999872
4.930007
84a4b00b-cf33-49a4-a266-2bfbbb684e78
jhui/driving
path_planning/src/Eigen-3.3/unsupported/doc/examples/BVH_Example.cpp
#include <Eigen/StdVector> #include <unsupported/Eigen/BVH> #include <iostream> using namespace Eigen; typedef AlignedBox<double, 2> Box2d; namespace Eigen { Box2d bounding_box(const Vector2d &v) { return Box2d(v, v); } //compute the bounding box of a single point } struct PointPointMinimizer //how to compute squa...
ALGO
0.999804
6.502348
84118fb7-c526-4e2d-ab47-18d052da4068
im2781975/solved-cpp
Array/Execution/Lower | upper.cpp
// working of lower_bound() & upper_bound() #include <bits/stdc++.h> using namespace std; int main() { vector<int> arr1 = { 10, 15, 20, 25, 30, 35 }; vector<int> arr2 = { 10, 15, 20, 20, 25, 30, 35 }; vector<int> arr3 = { 10, 15, 25, 30, 35 }; // using lower_bound() to check if 20 exists singl...
ALGO
0.999496
5.488347
bd0f4bac-21df-49a5-adf5-fd3fce267dfb
lasithagt/admm
plant-models/RobCodGen/RobCodGenModel.cpp
#include "RobCodGenModel.h" #include <mutex> RobCodGenModel::RobCodGenModel() : robot_state(joint_state.toImplementation()) { // initRobot(); } RobCodGenModel::~RobCodGenModel() = default; // RobCodGenModel::RobCodGenModel(const RobCodGenModel& other) // { // } // RobCodGenModel& RobCodGenModel::operator=(const...
ALGO
0.902592
5.083572
f24bdd3b-8810-4c67-b03a-44abac3aa987
dilshadparambil/CPP-tutorials
2)Mars_weight_conversion.cpp
#include <iostream> int main() { float weight_earth=0,weight_mars=0; std::cout<<"Enter the weight of an item in Kg: "; std::cin>>weight_earth; weight_mars=0.38*weight_earth; //The surface gravity of Mars is about 38% of Earth's gravity, std::cout<<"The weight in Mars is "<<weight_mars<<" Kg\n"; }
TOOL
0.992652
3.333474
54241c56-d85c-470b-9fc0-c4ced1257559
RainbowZerg/X-Ray_Engine_1.5.1.0
src/Layers/xrRender/r__dsgraph_render_lods.cpp
#include "stdafx.h" #include "flod.h" #ifdef _EDITOR #include "igame_persistent.h" #include "environment.h" #else #include "../../xrEngine/igame_persistent.h" #include "../../xrEngine/environment.h" #endif extern float r_ssaLOD_A; extern float r_ssaLOD_B; ICF bool pred_dot (const std::pair<float,u32>& _1, const st...
ALGO
0.949067
3.855092
513d4178-75b2-43b2-ab81-3f0252a76ede
anishakd4/ds
BinaryTree/Traversals/24PostorderTraversalOfBinaryTreeWithoutRecursionAndWithoutStack1.cpp
#include<iostream> #include<unordered_set> using namespace std; struct Node{ int data; struct Node *left, *right; }; struct Node* newNode(int data){ struct Node *new_node = (struct Node*)malloc(sizeof(struct Node)); new_node->data = data; new_node->left = new_node->right = NULL; return new_no...
ALGO
0.999981
5.292511
00785ad9-22f4-4b5b-984a-4c3039ce1ec5
nis/Numerical-Methods--RB-NUM6-U2-1-F12-
Code/Tools/NR_C301/legacy/nr2/CPP_211/examples/xf1dim.cpp
#include <iostream> #include <iomanip> #include "nr.h" using namespace std; // Driver for routine f1dim int ncom; // defining declarations DP (*nrfunc)(Vec_I_DP &); Vec_DP *pcom_p,*xicom_p; DP func(Vec_I_DP &x) { int i; DP f=0.0; for (i=0;i<3;i++) f += (x[i]-1.0)*(x[i]-1.0); ...
TOOL
0.998061
3.969431
b8470714-4b7f-4cfe-b04e-76b380526d24
wanzhiwen/DatastructureExprement
Dijkstra/Dijkstra.cpp
// // Created by aSUSS on 2018/11/2. // #include <limits.h> #include "iostream" using namespace std; typedef struct node { int **matrix; //存储图的邻接矩阵 int n; //顶点数 int e; //边数 } Graph; /* * dijkstra算法 * g表示存储图的邻接矩阵 dist存储最短路径长度 path存储到源节点最短路中前一个节点 source表示源节点 * */ void Dijkstra(Graph g...
ALGO
0.998553
4.484555
c4c3a6d7-4fdf-486a-932e-c7f40a7ecc35
roczekm/3Rok
VI_Semestr/OchronaDanych/hashFunction/Project1/Project1/Źródło.cpp
#include <iostream> #include<string> #include <random> #include<vector> unsigned int DJB(const std::string& s); unsigned int adler32(const std::string& s); std::string randomString(int n); void checkCollision(int D,int N,int o); int main() { checkCollision(8, 100000, 0); checkCollision(100, 100000, 0); checkColli...
ALGO
0.994324
5.069549
b6ff7164-6444-42a5-ab37-4bb2b054362d
ninatu/cpp_course
task4/main.cpp
#include<string> #include<vector> #include<algorithm> template<typename Func> auto Compose(Func f) { return f; } template<typename Fhead, typename...Ftails> auto Compose(Fhead fhead, Ftails ...ftails) { return [=](auto x){ return fhead(Compose(ftails ...)(x));}; } const char* f2(const std::string& str) { return ...
TOOL
0.975687
4.480868
95a1992c-83e6-46aa-8c23-d734d466310b
DylanEStone/C-Guide
Flow of Control/sample.cpp
#include <iostream> int main() { int sum = 0; for (int i = -100; i<= 100; ++i) sum+=i; std::cout << "answer is: " << sum << std::endl; return 0; }
ALGO
0.995839
3.771628
7d6a8758-cf3d-4277-babb-219a42730bca
csienslab/icLibFuzzer
llvm/lib/Support/Process.cpp
#include "llvm/Support/Process.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Config/config.h" #include "llvm/Config/llvm-config.h" #include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/Program.h" ...
TOOL
0.963381
7.693461
aeb60a9f-b606-4621-83be-fb271b829e8e
cls1277/OnlineJudge-Codes
luogu/luogu1149.cpp
//By cls1277 #include<iostream> #include<cstdio> #include<queue> #include<cstring> #include<string> #include<algorithm> #include<cmath> #include<vector> #include<map> #include<stack> #include<sstream> #include<set> #include<cassert> #include<bitset> using namespace std; typedef long long LL; #define PI acos(-1) #define...
ALGO
0.999783
3.698488
14d514e4-bf1b-43ee-84b0-71f22ed6389a
raw-h/LeetCode
3LongestSubStrWithoutRepeatingCharacters.cpp
#include<bits/stdc++.h> using namespace std; int lengthOfLongestSubstring(string s) { // int count = 0; // int maxi = INT_MIN; // map<char, int> freq; // for(int i = 0; i < s.length(); i++){ // if(freq[s[i]] == 1){ // freq.clear(); // maxi = max(count, maxi); // ...
ALGO
0.999842
4.832791
f546ce26-c193-467c-8d23-151494f08336
SyntaxSaran/Garden_of_Algorithms
stack/parenthesis balance check.cpp
#include <iostream> using namespace std; class Node { public: char data; Node* next; }; class Stack { private: Node* top; public: Stack() { top=NULL; } void push(char x); char pop(); void Display(); int Isbalanced(char *exp); }; void Stack::push(char x) { Node* t = new Node; if(t==NULL) cout<...
ALGO
0.999691
5.16938
51c17e92-3e6f-45a2-8f2f-a23c248ce798
ishandutta2007/codeforces
orzdevinwang/normal/498/C.cpp
#include<bits/stdc++.h> using namespace std; #define L(i, j, k) for(int i = (j), i##E = (k); i <= i##E; i++) #define R(i, j, k) for(int i = (j), i##E = (k); i >= i##E; i--) #define ll long long #define ull unsigned long long #define db long double #define mp make_pair const int N = 105; const int fN = N * 20; const...
ALGO
0.999829
3.707008
704eb2aa-ca78-42ef-aa18-2b1635ecfbd4
raincross7/code-similarity
codes/train_code/problem312/problem312_26.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2020; const int Mod = 1e9 + 7; int a[N]; int b[N]; int Dp[N][N]; void add_self(int& x, int y) { if((x += y) >= Mod) x -= Mod; } int add(int x, int y) { return add_self(x, y), x; } void sub_self(int& x, int y) { if((x -= y) < 0) x += Mod; }...
ALGO
0.999996
4.167005
a578ba73-1de0-4c70-bdc0-689065dd2279
ishandutta2007/codeforces
fastmath/normal/1373/A.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define ii pair <int, int> #define app push_back #define all(a) a.begin(), a.end() #define bp __builtin_popcountll #define ll long long #define mp make_pair #define f first #define s second #define Time (double)clock()/CLOCKS_PER_SEC signed main() { ...
ALGO
0.999911
4.303271
63a08f61-028a-4bc4-984f-31b74e292675
HananiJia/bit
剑指offer--数组中出现次数超过一半的数字/剑指offer--数组中出现次数超过一半的数字/源.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include<iostream> #include<vector> class Solution { public: int MoreThanHalfNum_Solution(vector<int> numbers) { int length = numbers.size();//ij int i = 0; int j = 0; for (i = 0; i < length-1; i++) { for (j = 0; j < length - i - 1; j++) { if (numbers[j]>numbers[j...
ALGO
0.999993
4.563828
1dc2d07a-1459-432d-b37b-9f96dc64ff2c
fkgkdfgy/BASALT_NOTED
thirdparty/basalt-headers/thirdparty/eigen/doc/examples/QuickStart_example2_dynamic.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { MatrixXd m = MatrixXd::Random(3,3); m = (m + MatrixXd::Constant(3,3,1.2)) * 50; cout << "m =" << endl << m << endl; VectorXd v(3); v << 1, 2, 3; cout << "m * v =" << endl << m * v << endl; }
ALGO
0.998982
3.497552
88b3658a-48e0-41b7-8b64-a6d51c6765c8
TheAmbiaFund/new-bela
src/rpcnet.cpp
#include "net.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace std; Value getconnectioncount(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getconnectioncount\n" "Returns the number of connections to other nodes."); ...
WEB
0.919887
6.694599
dd1dd1cf-9173-411d-acf2-8fdf33460be3
masonreynolds/Algorithm-Visualization
backend/src/Simulated-Annealing/simulated-annealing.cpp
#include "../../include/simulated-annealing.hpp" using namespace SimulatedAnnealing; SimulatedAnnealingGraph::SimulatedAnnealingGraph(nlohmann::basic_json<>::value_type& positions, int size, int maxTemp, double decrement, double threshold) { this->start = new Graph(positions, size); this->threshold = threshol...
ALGO
0.999257
4.807276
9c03fd9b-f04d-4846-bf3b-93c48614e11c
ishandutta2007/codeforces
emilan/normal/1324/A.cpp
#include <bits/stdc++.h> using namespace std; inline void ioThings() { ios::sync_with_stdio(0); cin.tie(0); #ifdef LOCAL freopen("io\\in.txt", "r", stdin); freopen("io\\out.txt", "w", stdout); #define debug(x) cerr << #x << ": <" << (x) << ">\n" #else #define debug(x) #endif } #define rep(i, n) for (int i = 0...
ALGO
0.999944
4.845423
816ad1f6-1a5a-49e1-be88-5777239d0bce
arafathosense/Codeforces-Problems-Solution
1272E.cpp
#include<bits/stdc++.h> #include<stdio.h> #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") using namespace std; #define ll long long #define scl(n) scanf("%lld",&n) #define scll(n, m) scanf("%lld%lld",&n, &m) #define scc(c) scanf("%c",&c) #define ...
ALGO
0.99999
3.383807
7c947cea-39f3-4406-bf62-c2938c283649
LOSP/frameworks_av
media/libstagefright/codecs/amrwb/src/median5.cpp
/* ------------------------------------------------------------------------------ Filename: median5.cpp Date: 05/08/2007 ------------------------------------------------------------------------------ REVISION HISTORY Description: -----------------------------------------------------------------------------...
ALGO
0.999993
6.083277
ae7b756e-adae-41dd-8f6e-faa9e0015a3d
ishandutta2007/codeforces
dreamoon_love_aa/normal/1305/F.cpp
/*{{{*/ #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<string> #include<iostream> #include<sstream> #include<set> #include<map> #include<queue> #include<bitset> #include<vector> #include<limits.h> #include<assert.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).be...
ALGO
0.999935
3.218184
19c6b01b-9e5c-465c-ab1a-e7424a60437e
ariefouren/HIT_OOP_Summer_2025
01 - Lessons/Lesson 10. STL/ex_03_vector_sort_and_merge/ex_03_vector_sort_and_merge.cpp
// File: ex_03_vector_sort_and_merge.cpp // Demonstrates sorting and merging two vectors using // <algorithm> functions #include <iostream> #include <vector> #include <algorithm> // for std::merge, std::sort using namespace std; int main() { vector<int> v1 = {1, -2, 3, - 4, 5, -6, 7}; vector<int> v2 = {-5, 6,...
ALGO
0.999953
5.913164
1cd74be1-941a-469d-81e6-3a965ea767ab
zSh3rl0cK/Algoritmos-1.
Códigos de práticas/Prática 2 (médias).cpp
#include <iostream> #include <iomanip> using namespace std; int main() { float P11; float P21; float PGB1; float PGA1; float P12; float P22; float PGB2; float PGA2; float P13; float P23; float PGB3; float PGA3; float P14; float P24; float PGB4; float PGA4; float peso1; float peso2; float peso3; flo...
ALGO
0.997532
3.470572
d6646ded-5f80-4625-b2d3-886bae3b215f
KiritanTakechi/Study
Code_cpp/OJ.Luogu/P1563.cpp
#include<cstdio> char get(){ unsigned char c=getchar(); while(c<=32)c=getchar(); return c; } void getl(char*a){ char c;int i=-1; while((c=getchar())<33); while(c>32)a[++i]=c,c=getchar(); } int read(){ int a=0;char c; while((c=getchar())<'0'); while(c>='0')a=a*10+(c^48),c=getchar(); return a; } char f[100005],...
ALGO
0.999954
3.555473
9a6364a3-c909-4e17-8055-20663f8f514d
NANAnoo/RTClothVR
Plugins/RTClothMesh/Source/RTClothMesh/Private/FRTStretchCondition.cpp
#include "FRTStretchCondition.h" void FRTStretchCondition::UpdateCondition( TArray<FVector> const& X, TArray<FVector> const& V, TArray<FVector2D> const& UV ) { // Update triangle properties Update(X[V_Inx[0]], X[V_Inx[1]], X[V_Inx[2]], V[V_Inx[0]], V[V_Inx[1]], V[V_Inx[2]]); } void FRTStretchCondition::ComputeFo...
ALGO
0.999556
4.684426
c9c3dcb0-5775-4fc5-b8c5-09fc3a40b12e
otavioon/COLA-2022-Tools
datasets/src/algo/codenet/4/s461224920.cpp
#include <iostream> #include <set> using namespace std; set<int> f(int x) { set<int> s; if (x == 0) s.insert(0); while (x > 0) { s.insert(x % 10); x /= 10; } return s; } bool has_common(const set<int> &a, const set<int> &b) { auto ai = a.begin(), bi = b.begin(); while (ai != a.end() && bi != b....
ALGO
0.999689
4.531738
4b542819-54eb-4723-89bd-7a24909320c3
ProjectInfinity-X/frameworks_av
media/libeffects/testlibs/AudioCoefInterpolator.cpp
#include <string.h> #include <cutils/compiler.h> #include "AudioCoefInterpolator.h" namespace android { AudioCoefInterpolator::AudioCoefInterpolator(size_t nInDims, const size_t inDims[], size_t nOutDims, ...
ALGO
0.947341
6.436342
c9c711fd-a17f-4fdb-ac2b-552637fd9035
SarvT/codetra
cpp841.cpp
class Solution { public: bool canVisitAllRooms(vector<vector<int>>& rooms) { vector<bool> vis(rooms.size()); vis[0] = true; stack<int> s; s.push(0); while(!s.empty()){ int nd = s.top(); s.pop(); for(int i:rooms[nd]) if(!vis...
ALGO
0.999889
6.248614
941ce756-da48-4f40-bfd4-c8eba3776ef3
sheriby/LeetCode
Leetcode100/Graph/04_208.cpp
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; /** * @brief Trie is a data structure used for efficient prefix searching in a * collection of strings. */ class Trie { // Members /** * @brief A vector of pointers to Trie objects representing the ...
ALGO
0.999634
6.457598
c3b7af82-b517-4eae-bbbb-1fd67f72dfde
Gurpreet3131/competitiveProgramming
hackerrank/stl/vectorsort.cpp
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> v; int n; scanf("%d",&n); for(int i=0;i<n;i++) { int val; scanf("%d",&val); v.push_back(val); } sort(v.begin(),v.end()); for(int i=0;i<n;i++) { printf("%d ",v[i]); } return 0; }
ALGO
0.999798
3.92977
e72f580d-63c8-4581-811b-3df1120439a7
TheFenrisLycaon/DSA-C--
cp/HackerRank/CPP/Classes/BoxIt.cpp
#include <bits/stdc++.h> using namespace std; class Box { int l, b, h; public: Box() { l = 0; b = 0; h = 0; } Box(int length, int breadth, int height) { l = length; b = breadth; h = height; } Box(Box &B) { l = B.l; b = B.b; h = B.h; } int getLength() { ret...
ALGO
0.993319
3.925452
3acfc901-3ec3-4e9d-94cc-74dfa8f2d8fe
MauricioCM5/Lab1_Parallel
exercise_2.cpp
//Mauricio Colque Morales //Comparison of matrices multiplication methods //All matrices of square size for facility purposes #include <stdio.h> #include <stdlib.h> #include <time.h> #include <vector> #include <utility> typedef int** matrix; using std::vector; using std::pair; using std::min; void reset_matrix(matri...
ALGO
0.99867
4.004854
37ff93f5-e44d-4693-aee2-bf32d0f84c37
AST-TheCoder/CP-Solutions
CodeForces/GNU C++14/1646B | Quality vs Quantity/148447942.cpp
#include<bits/stdc++.h> #include<stdio.h> using namespace std; int main() { long long int t; scanf("%lli",&t); while(t--){ int a[200005]; long long int n,k,x,y,flag; scanf("%lli",&n); for(int i=0;i<n;i++) { scanf("%lli",&a[i]); } sort(a,a+n); x=a[0]; y=0; flag...
ALGO
0.99997
3.799189
52c2d2ce-bbe0-43d6-9565-79dccb3df9ad
ABHI-ATG/CP
cf/practice/tempCodeRunnerFile.cpp
#include<bits/stdc++.h> using namespace std; /* Abhi-Atg */ #define ll long long #define mod 1000000007 int main(){ ios_base::sync_with_stdio(false);cin.tie(nullptr); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ll t=1; cin >> t...
ALGO
0.999961
4.070018
6440d4b6-2a16-4a28-a0e1-0896cb770750
njrafi/Competitive-Programming-Solutions
HackerEarth/Shil and Palindrome Research.cpp
#include <bits/stdc++.h> #ifndef ONLINE_JUDGE #define gc getchar #define pc putchar #else #define gc getchar_unlocked #define pc putchar_unlocked #endif using namespace std; #define vi vector<int> #define si set<int> #define vs vector<string> #define pii pair<int,int> #define vpi vector<pii> #defi...
ALGO
0.999686
4.335265
f4a23740-2bcf-4347-a193-6adb693fd14d
yzcmf/Interview
LeetCode-Solutions/C++/sliding-puzzle.cpp
// Time: O((m * n) * (m * n)!) // Space: O((m * n) * (m * n)!) // A* Search Algorithm class Solution { public: int slidingPuzzle(vector<vector<int>>& board) { const auto& R = board.size(), &C = board[0].size(); vector<int> begin, end; unordered_map<int, pair<int, int>> expected; in...
ALGO
0.999875
6.688683
ad865f78-196d-4af9-9565-1573669b3ee0
raincross7/code-similarity
codes/train_code/problem098/problem098_325.cpp
#include <cstdio> #include <algorithm> #define SIZE 33554432 char Key[128]; int Hash; char* c; #define HASH(A) c = A; Hash = 1; while(*c){ Hash <<= 2; Hash += Key[*c]; ++c;} using namespace std; int main() { //freopen("in.txt", "r", stdin); //freopen("out.txt", "w", stdout); Key['A'] = 0; Key['C'] = 1; Key['G'] = ...
ALGO
0.999041
3.806726
052a24cd-7e7a-4b2c-9821-f86f9b10764c
queid7/mmh
PyCommon/external_libraries/BaseLib/math/nr/cpp/recipes/sphoot.cpp
#include <iostream> #include <iomanip> #include "nr.h" using namespace std; int m,n; DP c2,dx,gmma; int nvar; DP x1,x2; int main(void) // Program sphoot { const int N2=1; bool check; int i; DP q1; Vec_DP v(N2); dx=1.0e-8; nvar=3; for (;;) { cout << endl << "input m,n,c-squared (999 to end)" << endl; cin...
ALGO
0.99986
3.789933
124266e3-2fed-4e27-bb83-e9adf19f6823
dxtvzw/Templates
Data Structures/Fenwick Tree.cpp
#include <bits/stdc++.h> using namespace std; struct fenwick1d { static const int N = 1e6 + 5; int t[N]; void update(int pos, int val) { for (int i = pos; i < N; i = i | (i + 1)) { t[i] += val; } } int get_pref_sum(int pref) { int res = 0; for (int i = p...
ALGO
0.999362
3.463823
e7247e0a-7101-4e0b-9f49-93462ecde0b0
Mahmoud-Ameen/Problem_Solving
Codeforces Div3/D.1955 Inaccurate Subsequence Search (1955D).cpp
/* * Problem link: https://codeforces.com/contest/1955/problem/D * */ #include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define cin(vec) for(auto& ____ : vec) cin >> ____ #define cout(vec) for(auto& ____ : vec) cout << ____ <<" " #define V vector #define VI vector<int> #define VLL vector<...
ALGO
0.999945
4.390593
6ae5a0dc-74df-4fd9-bd8a-a8e09929789d
Beatrix-0/Competitive-Programming
Online Judge/cf/Div 2/1858C - Yet Another Permutation Problem.cpp
#include <bits/stdc++.h> // Logic + Code using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<int> permutation; vector<bool> used(n + 1, false); int x = 1; for (int i = 2; i <= n; i++) { if (!used[...
ALGO
0.999981
5.482645
3ecc799a-418f-4f6c-9523-774a01c3f193
ishandutta2007/codeforces
tmwilliamlin168/normal/1085/E.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 1e6 + 5; typedef long long ll; typedef long double ld; typedef unsigned long long ull; template <typename T> void chkmax(T &x, T y) {x = max(x, y); } template <typename T> void chkmin(T &x, T y) {x = min(x, y); } template <typename T> void read(T &x) { x =...
ALGO
0.999989
3.785116
e9f6f260-33cb-4adb-b210-0c396c669738
satyamshahi31/BPIT_DSA
BPIT/Day2/callbyvalue.cpp
#include<iostream> using namespace std; void func(int x){ x = x+5; cout<<x<<endl; } int main() { int x = 10; // original cout<<"Before passing"<<x<<endl; func(x); cout<<"After passing"<<x<<endl; }
TOOL
0.982007
4.357405
2856a9fd-aed7-476b-9d3e-4c60bbde852f
dgeo96/src
src/uClinux/user/appWeb/http/utils/httpComp.cpp
/// /// @file httpComp.cpp /// @brief Compile files and web pages and documents into C++ source. /// /// Usage: httpComp -p prefix -r romName filelist >webrom.c /// /// Prefix is a string to be removed from the front of all file names. /// RomName is the name of data structure to hold the compiled files. /// ////////...
WEB
0.877881
4.21048
00fad26a-a3f8-43ea-adae-81088a45a2f6
Nagar203/Leetcode
1704. Determine if String Halves Are Alike/Approach02.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: bool halvesAreAlike(string s) { int n = s.size(); if(n%2 != 0){ return -1; } string vowel = "aeiouAEIOU"; int cnt_1=0, cnt_2 =0; for(int i=0; i<n/2; i++){ if(vowel.find(...
ALGO
0.999847
5.749624
7e2e3940-34a2-4b4a-943a-08e3352c1efd
gwyrwch/security_basics_labs
lab3_sem7/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <cmath> #include <set> #include <numeric> #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") using namespace std; int binpow (int a, int n, int mod) { if (n == 0) return 1; if (n % 2 == 1) return...
ALGO
0.999982
4.863279
8347a060-7ec7-4bbc-9ca7-cbe253a4fe0c
Nawrin14/Numerical-Methods
Bisection Method.cpp
#include<iostream> #include<iomanip> #include<math.h> using namespace std; double error, maximum_abs_root; double a0,a1,a2,a3; //returns the value of the polynomial for a certain x double func(double x) { return a3*pow(x,3)+a2*pow(x,2)+a1*x+a0; } //The Bisection Method implementation double bisection() { d...
ALGO
0.999884
3.956855
a088ef64-e30d-4130-a9b7-50a50b78b687
chisophugis/lbd
lib/CodeGen/PHIEliminationUtils.cpp
#include "PHIEliminationUtils.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineRegisterInfo.h" using namespace llvm; // findCopyInsertPoint - Find a safe place in MBB to insert a copy from SrcReg // when following t...
ALGO
0.995547
7.636831
b19aa826-d074-44ff-87ee-0f86eaafb639
Deepak-png981/Data_Structures_And_Algorithms
0102-binary-tree-level-order-traversal/0102-binary-tree-level-order-traversal.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.999954
6.053363
ae18c6bf-b911-4190-b347-1914d2603523
lanl/kitsune-old
llvm/lib/Transforms/IPO/ConstantMerge.cpp
#include "llvm/Transforms/IPO/ConstantMerge.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Module.h" #include "llvm...
TOOL
0.995164
7.832352
b1c56a47-70f3-4df2-8a8b-219162f01e46
kummandas/400DSA
4.cpp
// C++ implementation of the approach #include <bits/stdc++.h> using namespace std; // Utility function to print the contents of an array void printArr(int arr[], int n) { for (int i = 0; i < n; i++) cout << arr[i] << " "; } // Function to sort the array of 0s, 1s and 2s void sortArr(int arr[], int n) { ...
ALGO
0.999979
5.913357
55e1a06a-db7e-4142-b120-1a861fc482b9
hjiang13/LLMs-in-IR
POJ-104/74/1035.cpp
#include <iostream> using namespace std; int tran(long x) { long t=0,y=x; while(y>0) { t=10*t+y%10; y/=10; tran(y); } if (x==t) return(1); } void main() { int tran(long x); long m,n,i,j,s,t; cin >> "%d%d",&m,&n); t=0; for (i=m; i<=n; i++) { s=0; for (j=2; j<i; j++) { if (i%j==0) s++; } if ((s==0)&&(tran(i)==1)) { if (t...
ALGO
0.999945
3.423886
48bc2275-25a4-47be-8bee-1888d98d9a46
yfuka86/pc
codeforces/16xx/1657/e/eup.cpp
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define rep_r(i,n) for(ll i=(ll)(n)-1;i>=0;i--) #define rep2(i,sta,n) for(ll i=sta;i<(ll)(n);i++) #define rep2_r(i,sta,n) for(ll i=(ll)(n)-1;i>=sta;i--) #define all(v) (v).begin(),(v).end() #define pb push_back #define mp ...
ALGO
0.999965
4.366914
cf547755-ae41-4ecd-adb4-70fa4eb55c92
carltraveler/ont.dtcC
src/lib/libc++/libcxx/test/std/containers/sequences/vector/vector.modifiers/push_back_exception_safety.pass.cpp
// <vector> // void push_back(const value_type& x); #include <vector> #include <cassert> #include "asan_testing.h" #include "test_macros.h" // Flag that makes the copy constructor for CMyClass throw an exception static bool gCopyConstructorShouldThrow = false; class CMyClass { public: CMyClass(int tag); pu...
TEST
0.905443
6.426175
9dd2ce56-62df-4927-882f-9cd160566bbb
RushikeshTayade18/OOP
Binary Add for All Inputs.cpp
#include<iostream> #include<stack> using namespace std; class Binary { stack<int >s1,s2,s3; int bits,count1=0,count2=0,b1,b2; public: void Accept(); void Add(); void Display(); }; void Binary::Accept() { char ch1,ch2; do { cout<<"Enter first bits\n"; cin>>bits; s1.push(bits); count1++; cout<<"do y...
ALGO
0.999906
3.619266
23ecf796-2d75-4e45-92e3-85c54a02b064
bhok/xcoin
src/qt/transactionfilterproxy.cpp
#include "transactionfilterproxy.h" #include "transactiontablemodel.h" #include "transactionrecord.h" #include <QDateTime> #include <cstdlib> // Earliest date that can be represented (far in the past) const QDateTime TransactionFilterProxy::MIN_DATE = QDateTime::fromTime_t(0); // Last date that can be represented (...
TOOL
0.855786
6.668473
7e5446b5-092f-40ac-874e-c2601396575c
tayyba678/Cplusplus
500.cpp
#include<iostream> using namespace std; string removeString(string arr[]); int main() { cout<<"Enter a string: "; string arr[]; cin>> arr[]; removeString (arr); } string removeString(string arr[]){ for (int x=0;arr[x]!='\0';x++) { if(arr[x]=='a'||arr[x]=='A'||arr[x]=='e'||arr[x]=='E'||arr[x]=='i'||arr[x]=='I'||arr[x]==...
ALGO
0.994929
3.476779
74e5f000-f3fd-4726-9860-35a19a9bc329
s0metimes/aligothm
week4/1072_game/1072_game_youngwoo.cpp
#include <stdio.h> #define MAX 1000000000 int main(int argc, char const *argv[]) { long long int X, Y; scanf("%lld %lld", &X, &Y); int Z = (100*Y)/X; if(Z >= 99) { printf("-1\n"); return 0; } int lower = 0, upper = MAX; int mid; int tempZ; while(lower <= upper) {...
ALGO
0.999949
3.720156
cdd7099c-1fc4-498f-81d1-04024bf744d2
AlgoZenithNITC/GFG_POTD_Solutions_AlgoZenithNITC
23-07-2025_Sum_of_Subarrays.cpp
class Solution { public: int subarraySum(vector<int>& arr) { // code here int n = arr.size(); int ans=0; /*for(int i=0; i<n; i++){ int sum = 0; for(int j =i; j<n; j++){ sum+=arr[j]; ans+=sum; } }*/...
ALGO
0.999965
5.059466
e26301ee-e0d1-4663-81b3-8a9c8b00a773
jeffriesd/competitive-programming
usaco/ch3/camelot-bfs.cpp
/* ID: jeffrie1 LANG: C++ TASK: camelot */ #include<bits/stdc++.h> using namespace std; using pi = pair<int, int>; using vi = vector<int>; using vvi = vector<vi>; using vb = vector<bool>; using si = set<int>; #define MAXR 30 #define MAXC 30 #define MAXIND 900 #define INF 999999 int R, C; // king coordinates int kc, ...
ALGO
0.999875
3.779827
0a3c3684-a8e5-4083-b19b-d7c51b11e280
fawkesrobotics/fawkes
src/libs/config/sqlite.cpp
#include <config/sqlite.h> #include <core/exceptions/software.h> #include <core/exceptions/system.h> #include <core/threading/mutex.h> #include <sqlite3.h> #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif #include <cerrno> #include <cstdio> #include <cstdlib> #include <cstring> #include <fnmatch.h> #include <unistd.h>...
TOOL
0.950795
7.210874