uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
51afdfae-71f7-465f-a6a1-3f7ab483dfd8
geekboxzone/mmallow_external_llvm
lib/Analysis/BranchProbabilityInfo.cpp
#include "llvm/Analysis/BranchProbabilityInfo.h" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/CFG.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Function.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Metadata.h" #include "ll...
ALGO
0.991939
7.848345
c54dc149-f752-4bb8-bbd6-cbb24f588879
ishandutta2007/codeforces
natsugiri/normal/350/C.cpp
#include<cstdio> #include<iostream> #include<vector> #include<algorithm> #include<string> #include<cstring> using namespace std; typedef long long LL; const char dir[] = "RULD"; int N; pair<int,int>Z[100010]; bool cmp(const pair<int,int>&a, const pair<int,int>&b) { return abs((LL)a.first)+abs((LL)a.second) < abs...
ALGO
0.999891
3.185595
d36762ed-eb33-47fb-899f-443cc0be7bdd
kendaltstarrettt0912/devtool-kit
src/openrct2/world/map_generator/SimplexNoise.cpp
#include "SimplexNoise.h" #include "../../util/Util.h" #include "HeightMap.hpp" #include "MapGen.h" #include "MapHelpers.h" #include <algorithm> namespace OpenRCT2::World::MapGenerator { /** * Simplex Noise Algorithm with Fractional Brownian Motion * Based on: * - https://code.google.com/p/simpl...
ALGO
0.998879
7.825983
26d6492d-692b-41e4-80a1-ab024f5da4ef
philma/uva_cpp
10474/10474.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int binary_search(const vector<int>& numbers, int query) { int begin = 0, end = numbers.size() - 1; int pos = 0; while(begin <= end) { int mid = (begin + end) / 2; if(numbers[mid] >= query) { ...
ALGO
0.998879
4.164514
997e11aa-c317-4bbf-88da-9408baf8e5d0
Sumendra2906/DS-ALGO
31-40/35 Heaps/merge_k_sorted.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; //vallue,x,y typedef pair<int, pair<int, int>> node; vector<int> merge_k_sorted(vector<vector<int>> arr) { vector<int> result; priority_queue<node, vector<node>, greater<node>> pq; //initialize the min heap with the first element ...
ALGO
0.999977
4.822258
1d363242-f2a6-487e-bb3d-fdf059fbb09a
Ynglylife/LeetCode
Problems/647. Palindromic Substrings.cpp
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; bool isFit(string s) { if(s.size() == 1) return true; int len = s.size(); string sub1,sub2; if(len % 2 == 0) { sub1 = s.substr(0, len/2); sub2 = s.substr(len/2,len/2); } els...
ALGO
0.999908
4.864149
43b4e3a8-9f9b-48da-8479-5a124f0e992a
TakalaWang/ZeroJudge
d356.cpp
#include <iostream> using namespace std; int main() { int i; double k,sum; while(cin>>k){ for(i=2,sum=1;sum<=k;i++){ sum+=(double)1/i; } cout<<(int)i-1<<endl; } return 0; }
ALGO
0.999856
3.20566
a8fa75d1-7ea3-450e-8c6d-7aac6eb9b71e
saurabh01032003/DSA-Coding-Blocks
Lecture 32/generic_array_implement.cpp
// // // Stack to store any type of value (using Template) using array // // #include <iostream> // // using namespace std; // // template <typename T> // // class stack // // { // // public: // // T *arr; // To store address of array(internally stack) created in heap // // int t; // To track array index of t...
ALGO
0.995924
4.148524
16e9de89-6904-43de-ba4f-75f9292f6e8b
zenaa544/Ashok
BinarySearch/SearchinRotatedSortedArray.cpp
int search(int* nums, int n, int target) { // Write your code here. int left = 0; int right = n - 1; while (left <= right) { int mid = (left + right) / 2; if (nums[mid] == target) return mid; if (nums[mid] >= nums[left]) { ...
ALGO
0.999967
6.184868
c44d553b-9f20-436c-9f43-737e1eae33be
Doannam2000/OOP
Bai4.6_DoanDuyNam_2018602283.cpp
#include<iostream> #include<string.h> #include<iomanip> using namespace std; class XeHoi { private: char NhanHieu[14]; char Hang[14]; char Dang[14]; char MauSon[14]; int Nam; char XX[14]; int Gia; public: void Nhap(); void Xuat(); friend void Tim(XeHoi a[], int n); friend vo...
ALGO
0.972098
3.839671
cee1498e-6594-4b14-9b6b-70833a89ec0a
wheath/protein-shop
src/ReadPredictionFile.cpp
/*********************************************************************** ReadPredictionFile - Functions to read prediction files and create their protein structures. ***********************************************************************/ #include <stdio.h> #include "Protein.h" #include "CreateProtein.h" #include "Gl...
TOOL
0.937944
5.08919
b2791db6-334c-4d86-a062-d213d68ae33e
Vikalp19041999/LeetCode-solutions
Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit.cpp
class Solution { public: int longestSubarray(vector<int>& nums, int limit) { int ans = 0; int start = 0; int end = 0; deque<int> minQueue; deque<int> maxQueue; while(end < nums.size()) { int x = nums[end]; while(!minQueue.empty() && nums[minQue...
ALGO
0.999997
5.921834
a054db3d-a6b5-4658-8c3f-81a44959359f
lokdestro/dimabsu
algo/algussy/Поисковые деревья/Является ли бинарное дерево поисковым?/solve.cpp
#include <iostream> #include <vector> #include <string> #include <utility> using namespace std; int main() { freopen("bst.in", "r", stdin); freopen("bst.out", "w", stdout); ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; int r; cin >> r; vector<int> number(n); vec...
ALGO
0.999989
3.891159
78e5a6e8-9d86-456e-80e3-1f81e88bc297
festla/My_CPP_exercise
Basic/036_const_array.cpp
#include <iostream> using namespace std; float array_sum(const float values[], size_t length) { float sum = 0.0f; for(int i=0;i<length;i++){ sum+=values[i]; } return sum; } int main() { float values[4]={1.1f,1.2f,1.3f,1.4f}; float sum = array_sum(values,4); cout<<"sum = "<<sum<<endl...
ALGO
0.983021
3.715482
e87e9ef5-bf09-4bd3-b833-07adec3576e3
Richerhooders/KvStorage
src/raftCore/raft.cpp
#include "raft.h" #include <boost/archive/text_iarchive.hpp> #include <boost/archive/text_oarchive.hpp> #include <memory> #include "config.h" #include "util.h" void Raft::AppendEntries1(const raftRpcProctoc::AppendEntriesArgs* args, raftRpcProctoc::AppendEntriesReply* reply) { std::lock_guard<std::mutex> locker(m_mt...
WEB
0.983092
4.371037
46481447-6cc8-4bc5-a366-fb16d4aa6ec8
PrashantMalla07/photoeditor1
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
d04c5f6f-e8b8-427b-9e1f-db43d4b39c62
hoangmanhkhiem/laptrinhonline.club
MuiGio.cpp
#include<stdio.h> int main(){ int a, b, c; scanf("%d%d%d", &a, &b, &c); if(a + b + c < 24 && a + b + c >= 0){ printf("%d", a + b + c); } else if(a + b + c < 0){ printf("%d", a + b + c + 24); } else { printf("%d", a + b + c - 24); } }
ALGO
0.999793
3.678961
7d71ea41-cc9b-4c4e-88c5-66a70f013616
antonov-andrey144/dzmm
Lab2/Task4/homework/Source.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <time.h> void swap(int& a, int& b) { int c = a; a = b; b = c; } int* initArray(int len) { int* result = new int[len]; for (int i = 0; i < len; ++i) { result[i] = rand() % 90 + 10; } return result; } void printArray(int* arr, int len) { for (int ...
ALGO
0.999123
4.459429
46ed827a-9e55-4e57-9a34-9a1de51d8ba7
HurayraIIT/competitive-programming
codeforces/random/1083_Factorials_.cpp
// Abu Hurayra (HurayraIIT) // IIT, Jahangirnagar University #include <iostream> #include <string> #include <vector> #include <algorithm> #include <queue> #include <deque> #include <bitset> #include <list> #include <stack> #include <map> #include <set> #include <math.h> #include <stdio.h> #include <string.h> using nam...
ALGO
0.999973
3.758872
d552939c-2e34-41d3-85db-35ef8111d6c9
abhishekbathena/Data-structures-and-Algorithms-Q-A
2485-find-the-pivot-integer/2485-find-the-pivot-integer.cpp
class Solution { public: int pivotInteger(int n) { int sumn=(n*(n+1))/2; int i=n; int suml=0; while(i>=0) { suml+=i; if(suml==sumn) return i; sumn-=i; i--; } return -1; } };
ALGO
0.999937
5.897893
770789c8-c6d7-40c2-99f9-1bb9fca09fe6
APEPEPOW/APEPEPOW
contrib/epee/src/int-util.cpp
#include <boost/multiprecision/cpp_int.hpp> void div128_64(uint64_t dividend_hi, uint64_t dividend_lo, uint64_t divisor, uint64_t* quotient_hi, uint64_t *quotient_lo, uint64_t *remainder_hi, uint64_t *remainder_lo) { typedef boost::multiprecision::uint128_t uint128_t; uint128_t dividend = dividend_hi; dividend ...
ALGO
0.952163
5.554385
04728ba8-abaa-48cd-bade-a0cde2c0188a
exnotime/Smug2D
src/Box2D/collision/b2_polygon_shape.cpp
#include "box2d/b2_polygon_shape.h" #include "box2d/b2_block_allocator.h" #include <new> b2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const { void* mem = allocator->Allocate(sizeof(b2PolygonShape)); b2PolygonShape* clone = new (mem) b2PolygonShape; *clone = *this; return clone; } void b2PolygonSha...
ALGO
0.983267
7.940159
32180b7a-f307-4898-a29f-77d69ae6bdd7
Mir-Ilham/GM2023-CPP-Series
IO_Operators_Datatypes/Solutions/problem4.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define endl '\n' int main() { optimize(); int a, b, d, r; double f; cin >> a >> b; d = a / b; r = a % b; // f = a / b; /// For input 3, 2 -> a / b ...
ALGO
0.999651
3.284394
ec8309aa-6e87-459f-b579-83230ad066c6
llvm-tilera/llvm
lib/CodeGen/VirtRegMap.cpp
#define DEBUG_TYPE "regalloc" #include "VirtRegMap.h" #include "LiveDebugVariables.h" #include "llvm/CodeGen/LiveIntervalAnalysis.h" #include "llvm/CodeGen/LiveStackAnalysis.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "ll...
TOOL
0.858556
6.957186
6d4de06e-d4c0-4f7c-8226-effedb52ea42
RS-codes/DataStructures_LinkedList
1.1b_Inserting_a_node_at_beginning_of_LinkedList_using_head_as_localVariable.cpp
//1.1-b Inserting a node at the beginning of a Linked List /* insert a node @ beginning using Head as local variable */ #include<iostream> using namespace std; struct Node{ int data; Node* next; }; Node* Insert(int x,Node* head){/*arg:num,head(Node*),return Node* */ Node* temp=new Node; temp->data=x; temp->next=...
ALGO
0.999391
4.228677
6b32d526-d136-43ee-8a4f-f892dd0ecf4a
baizhoufun/QuinticSpline
examples/01.cpp
#include <eigen3/Eigen/Core> #include <iostream> #include <fstream> #include <cmath> #include "quinticSpline.hpp" #ifndef M_PI #define M_PI 3.14159265358979323846 #endif // !M_PI Eigen::IOFormat fmt(Eigen::FullPrecision, 0, "\t", "\n", "", "", "", ""); int main() { Eigen::size_t N = 50; int dim = 3; Eigen::Matri...
ALGO
0.996566
5.344184
454fcbd9-0220-4ecd-a66d-c79676d32f01
KM-Chang/sotsugyou-seisaku
openyoureye/openyoureye/openyoureye.cpp
// openyoureye.cpp : wqDxε{iJIC // #include "stdafx.h" #using <mscorlib.dll> #using <System.Dll> #using <System.Data.Dll> #using <System.Xml.Dll> using namespace System; using namespace System::Data; using namespace System::Xml; using namespace System::Collections; using namespace System::Data::SqlClient; //---yŧi s...
TOOL
0.930926
3.672003
33afbcda-80ac-44f8-b015-7d202c6e5ae9
takkrish/datastructures-and-algorithms-cpp
Advance Maths/Apply Operations to Make Sum of Array Greater Than or Equal to k.cpp
// You are given a positive integer k. Initially, you have an array nums = [1]. // You can perform any of the following operations on the array any number of times (possibly zero): // Choose any element in the array and increase its value by 1. // Duplicate any element in the array and add it to the end of the array....
ALGO
0.999847
5.747736
856babe0-94b1-478a-abc4-a4dc760b45ed
exs0087/EMcNeil_Demo_Material
SatelliteSim/firmware/control_algorithm.cpp
// src/control_algorithm.cpp #include <cmath> #include <iostream> #include "control_algorithm.h" // for ControlMode, SensorReadings, ActuatorCommands // Default to proportional ω×B mode (no auto‐switch) static ControlMode g_mode = CTRL_MODE_WX_B; extern "C" void control_algorithm_set_mode(ControlMode mode) { g...
ALGO
0.999549
6.096965
59b472cd-e76c-4fc2-a261-ac8859b33417
haiyang1992/sniper-optical
common/config/config.cpp
/*! *\file */ // Config Class // Author: Charles Gruenwald III #include "config.hpp" #include <boost/algorithm/string.hpp> #include <cstdarg> #include <cstdio> namespace config { void Error(const char* format, ...) { fprintf(stderr, "\n*** Configuration error ***\n"); va_list args; va_start...
CONFIG
0.977861
5.96679
be17ed5f-dc5c-4e55-8eb7-a38867d7519e
LittleYang0531/CQ-NOIP-2021
CQ-0100/chess/chess.cpp
#include<bits/stdc++.h> #define mp make_pair #define pii pair<int,int> using namespace std; const int maxn=5000005; const int maxm=5000005; int n,m,q,ans; char s[maxn]; int first[maxm],nex[maxm],e[maxm],type[maxm],dir[maxm],tot=1; int vis[maxn],been[maxn],hasnode[maxn]; pii a[maxn];//col,lv int id(int x,int y){ retur...
ALGO
0.999546
3.92827
8933c215-d618-436d-9c56-30a84534daa9
Mohamad-Isam/Code-wars-solutions-cpp
level 7/Disarium Number (Special Numbers Series #3).cpp
#include <string> #include <cmath> using namespace std; string disariumNumber (int number ) { int n = to_string(number).length(), sum = 0, m = number; for(int i = n; i > 0; i--, m /= 10) sum += pow(m % 10, i); return number == sum ? "Disarium !!" : "Not !!"; }
ALGO
0.999423
5.032786
8930a785-2ac6-4cd9-a188-43a39b3d9e04
Nasif-Imtiaj/Judge-Solutions
UVa Solutions/11221.cpp
#include<bits/stdc++.h> using namespace std; ///Welcome to Nasif's Code #define p printf("bug\n"); #define sd(h) scanf("%d",&h); #define sl(h) scanf("%ld",&h); #define sll(h) scanf("%lld",&h); #define co(h) cout<<h<<endl; #define ci(h) cin>>h; typedef long long int ll; typedef unsigned long long int ull; const int MO...
ALGO
0.999932
3.844489
d93e68e3-d41c-4935-a91e-a2c67a2747b5
hjiang13/LLMs-in-IR
POJ-104/91/372.cpp
#include <iostream> using namespace std; int main() { int i,e,b,c,j; char a[1000]; b=0; gets(a); e=strlen(a); b=a[0]; for(i=0; a[i]; i++){ if(i==e-1){ c=a[i]+b-96; a[i]='a'+c-1; } else { j=i+1; c=a[i]+a[j]-96; a[i]='a'+c-1; } } puts(a); return 0; }
ALGO
0.999552
3.362085
5e9d94b0-fdd6-40de-8581-66c354988886
sulemanrai/GeeksforGeeks
Data Structures/Single Linked List/addLists_v1.cpp
#include <stdio.h> #include <stdlib.h> // A linked List Node struct Node { int data; struct Node* next; }; typedef struct Node node; /* A utility function to insert a node at the beginning of linked list */ void push(struct Node** head_ref, int new_data) { /* allocate node */ struct Node* new_node = (struct Node...
ALGO
0.999331
5.003972
094d6dcf-c585-46d6-a6b3-de42be9bc42d
Ad1th1/Daily-DSA
450-DSA/Arrays/3kth_min_and_max.cpp
// Find the "Kth" max and min element of an array #include <iostream> #include <algorithm> using namespace std; int main() { int arr[] = {5, 3, 9, 1, 7, 4}; int n = sizeof(arr) / sizeof(arr[0]); int k = 3; nth_element(arr, arr + k - 1, arr + n, greater<int>()); cout << k << "th maximum element ...
ALGO
0.999785
4.844786
8b1a3783-fbbd-4eaa-91c3-7891f1c6466e
swadheen01/CF-Solutions
fjiejf.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int T; // Number of test cases cin >> T; while (T--) { int N; // Length of the sequence cin >> N; if (N == 1) { cout << "1\n"; // Sing...
ALGO
0.999956
5.759508
37a25ed5-15e8-4cc9-8962-743c451b7170
Eeman1113/Leetcode
Problems/324.cpp
class Solution { public: int maxSubArrayLen(vector<int>& nums, int k) { int ans = 0; int prefix = 0; unordered_map<int, int> prefixToIndex{{0, -1}}; for (int i = 0; i < nums.size(); ++i) { prefix += nums[i]; const int target = prefix - k; if (const auto it = prefixToIndex.find(targ...
ALGO
0.99948
6.553939
a94d4671-cc95-459b-bac7-fc62bde7bec2
Lucien950/Contests
CodeForces/Round #1007/b.cpp
#include <cmath> #include <cstdint> #include <iostream> using namespace std; static bool is_perfect_square(const uint64_t n) { const auto root = static_cast<uint64_t>(sqrt(n)); return root * root == n; } int main() { int t; cin >> t; while (t--) { uint64_t n; cin >> n; if (n <= 1) { cout << -1 << end...
ALGO
0.999403
4.421872
faa91216-c65d-4d49-a35c-102f360249e3
tillerrr/Ender-3-Pro
Marlin/src/module/planner_bezier.cpp
/** * planner_bezier.cpp * * Compute and buffer movement commands for bezier curves */ #include "../inc/MarlinConfig.h" #if ENABLED(BEZIER_CURVE_SUPPORT) #include "planner.h" #include "motion.h" #include "temperature.h" #include "../MarlinCore.h" #include "../gcode/queue.h" // See the meaning in the documentat...
ALGO
0.999659
7.909719
895b4ceb-f031-4d82-a4d1-ddeadb9f6ae4
imirrori/Work_2023_2
Lec4_1/main.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> // Определить местоположение элементов массива А не встречающихся в массиве В int main() { constexpr int SIZE = 10; int A[SIZE]; int B[SIZE]; srand(time(NULL)); for(int i = 0; i < SIZE; ++i) { A[i] = rand() % 10; B[i] = ran...
ALGO
0.997063
4.219196
909b2ae8-2c06-4a72-8e27-1ca732173b28
SMiles02/CompetitiveProgramming
Codeforces/CF 1600 - 1699/CF1661/CF1661A.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; int a[n], b[n]; long long ans = 0; for (int i = 0; i < n; ++i) cin >> a[i]; for (int i = 0; i < n; ++i) cin >> b[i]; for (int i = 0; i < n; ++i) { if (a[i] > b[i]) swap(a[i], b[...
ALGO
0.999927
4.047456
ba5e2a3c-b7d5-4f48-b8d2-7d83da96077a
abhi6753/vs-code
Assignment 14/question_6.cpp
// 6. Write a program to sort elements of an array of size 10. Take array values from the user. #include<iostream> using namespace std; int main() { int size =5; int arr[size]; cout<<"Enter "<<size <<" numbers: "<<endl; for(int i =0;i<size;i++) { cin>>arr[i]; } cout<<"Numbers before ...
ALGO
0.999568
3.48603
85f99da5-b8cb-43cb-b7b9-491e276b22dd
sarvex/leetcode-powershell
lcci/05.06.Convert Integer/Solution.cpp
class Solution { public: int convertInteger(int A, int B) { unsigned int c = A ^ B; return __builtin_popcount(c); } };
ALGO
0.999917
5.520511
53c18e89-460c-46da-8bcf-3a931f3a8b65
vk-429/CP_Questions_From_CPP_Bootcamp
Que4a.cpp
#include<bits/stdc++.h> using namespace std; float median(int nums1[],int nums2[],int m,int n) { if(m>n) return median(nums2,nums1,n,m); int low=0,high=m,midpos=((m+n+1)/2); while(low<=high) { int cut1=(low+high)/2; int cut2=midpos-cut1; int l1=(cut1==0)?INT_MIN:nums...
ALGO
0.999994
4.48393
6536e81f-5ac3-445b-8f72-a4d322c4de14
Satar07/code
1.5编程基础之循环控制/05最高的分数.cpp
#include<iostream> #include<cmath> #include<stdio.h> using namespace std; int main(){ int n,in,res = 0; cin>>n; for (int i = 0;i < n;i++){ cin>>in; res = max(res,in); } cout<<res; }
ALGO
0.9996
3.63675
8fc2f18e-aeef-4d7c-9450-ee1a9069eec6
PawelMasluch/Programming-tasks-and-my-solutons
solve.edu.pl/Autostrady.cpp
#include<cstdio> // 100 pkt #include<new> #include<vector> #include<queue> #define REP(i,a,b) for(i=a; i<=b; ++i) #define PB push_back #define MP make_pair #define P push #define ND second #define ST first using namespace std; typedef pair < int, int > pII; typedef pair < pII, int > el; typedef vector < el > ...
ALGO
0.999998
4.066236
cefd6d80-98ec-43ae-ae17-42a469cb19b2
zhaowendao30/Cpp_primer_plus6
C++_primer_plus/ch16/ch16-exercise/16.9.cpp
#include <iostream> #include <algorithm> #include <vector> #include <random> #include <list> #include <ctime> using namespace std; int main() { const long n = 100000; vector<int> vi0; for (int i = 0; i < n; ++i) vi0.push_back(rand()); vector<int> vi1(vi0); list<int> li(vi0.cbegin(), vi0....
ALGO
0.998553
4.175072
10064981-5425-4879-8187-78a97e8aedfb
ProgramacionCompetitivaUTFSM/Handbook-USM
content/dynamic-programming/egg-drop.cpp
/* *Description:* Egg dropping problem with binary search optimization *Status:* Tested */ vector<vector<ll>> egg_drop(ll h,ll k){ vector<vector<ll>> dp(h + 1,vector<ll>(k + 1)); for(int i = 0; i < k + 1; i++) dp[0][i] = 0; for(int i = 1; i < h + 1; i++) dp[i][0] = INT_MAX; for(int j = 1; j < k + 1; j++) { ...
ALGO
0.999771
4.914136
b4f10f3a-152c-45de-88a9-a6bf6e2c0014
jaosnshen/playground
pat/1044.cpp
#include<iostream> #include<climits> #define MAXN 100000 using namespace std; int dia[MAXN]; struct node{ int x; int y; }ans[MAXN]; int main(){ int k,i,n,pri,l,sum,max=INT_MAX,jmp=0;//初始化 scanf("%d%d",&n,&pri); for(i=0;i<n;i++){ scanf("%d",&dia[i]); } k=0; for(i=0;i<n;i++){ sum=0; for(l...
ALGO
0.999961
3.207625
bbb1bc51-114c-487b-ab83-266cbeb3a442
projeshroy/Polymer_builder
include/openbabel/tools/obfitall.cpp
/* Require a fixed molecule, a set of molecules to move, a SMART pattern to match the fixed and the moving molecules If the SMART is not found in the fixed molecule the program exits If the SMART is not found in a moving molecule, the molecule is not moved example of command line: obfit "[nh]1c2c(=O)n(C)c...
ALGO
0.98999
4.923408
5adc2041-3ac9-4d17-9695-5047ba3ea612
XDEv11/Codeforces
CodeTON_Round_7/C.cpp
//#pragma GCC optimize ("O3") #include <iostream> #include <vector> #include <utility> #define fi first #define se second #include <algorithm> using namespace std; void solve() { int n, k; cin >> n >> k; vector<int> a(n), b(n); for (auto& x : a) cin >> x; for (auto& x : b) cin >> x; vector<pair<int, int>> ta(...
ALGO
0.999995
4.045757
19c5a45f-6bec-483c-891e-a71fbad482b3
Dacyz/ISG-CReports
android/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/mono/ThreadPool/threadpool-ms.cpp
#include "il2cpp-config.h" #include <stdlib.h> #define _USE_MATH_DEFINES // needed by MSVC to define math constants #include <algorithm> #include <cmath> #include <complex> #include "math.h" #include "il2cpp-api.h" #include "gc/GarbageCollector.h" #include "gc/GCHandle.h" #include "gc/WriteBarrier.h" #include "icalls...
TOOL
0.937076
6.026057
560cde7b-168e-4e7a-b365-278efee2464a
Lim-HyunSoo/Programmers
Level_1/inner_product.cpp
/* 문제 설명 길이가 같은 두 1차원 정수 배열 a, b가 매개변수로 주어집니다. a와 b의 내적을 return 하도록 solution 함수를 완성해주세요. 이때, a와 b의 내적은 a[0]*b[0] + a[1]*b[1] + ... + a[n-1]*b[n-1] 입니다. (n은 a, b의 길이) 제한사항 1. a, b의 길이는 1 이상 1,000 이하입니다. 2. a, b의 모든 수는 -1,000 이상 1,000 이하입니다. 입출력 예 a | b | result [1,2,3,4] | [-3,-1,0,2] | 3 [-1,0...
ALGO
0.999937
4.947824
020fd120-4b68-42d7-afa9-8c70bfa697ac
wdeyes/Sword_offer
27/mirror_BTree.cpp
#include<iostream> #include "BinaryTree.h" using namespace std; void MirrorRecursively(BinaryTreeNode* pNode){ if(pNode==nullptr) return; if(pNode->m_pLeft==nullptr && pNode->m_pRight==nullptr) return; BinaryTreeNode* pTemp=pNode->m_pLeft; pNode->m_pLeft=pNode->m_pRight; pNode->m_pRight=pTemp; MirrorRecurs...
TEST
0.999172
5.274774
72a91eee-54d8-45a7-9669-73a8aec085b6
Jichao-Peng/PL_SLAM
mrpt/libs/base/src/math/geometry.cpp
#include "base-precomp.h" // Precompiled headers #include <mrpt/math/geometry.h> #include <mrpt/math/CPolygon.h> #include <mrpt/math/CSparseMatrixTemplate.h> #include <mrpt/math/CMatrixTemplateNumeric.h> #include <mrpt/math/data_utils.h> #include <mrpt/math/ops_containers.h> #include <mrpt/poses/CPoint2D.h> #include ...
ALGO
0.999637
5.955403
7bb93745-9970-4753-9fc5-081aa9035e32
vktjoybr/Estudos-Diversas-Linguagens
cpp/coordenadas.cpp
#include <iostream> #include <iomanip> using namespace std; int main(){ double x, y; cout << "Valor de X: "; cin >> x; cout << "Valor de Y: "; cin >> y; if(x == 0 && y == 0){ cout << "Origem" << endl; } else if(x == 0){ cout << "Eixo Y" << endl; } else if(y =...
ALGO
0.999726
4.502896
8cc63a59-dbb4-4768-afa5-7d9c3157455b
ishandutta2007/codeforces
tokusakurai/normal/1550/D.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rep2(i, x, n) for (int i = x; i <= n; i++) #define rep3(i, x, n) for (int i = x; i >= n; i--) #define each(e, v) for (auto &e : v) #define pb push_back #define eb emplace_back #define all(x) x.begin(), x.end() #define ra...
ALGO
0.999924
4.397493
2d973013-8149-4a64-a32c-7f3fdfccdf0d
rizwanrockzz/rizwan
C++ by Rizwan/Sorting/DNFsort.cpp
#include <iostream> using namespace std; // DUTCH NATIONAL FLAG (DNF) SORT; void swap(int arr[], int i, int j) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } void dnfsort(int arr[], int n) { int low = 0; int mid = 0; int high = n - 1; while (mid <= high) { if (arr[mi...
ALGO
0.999747
4.808084
32031ed9-de91-4e2f-a83d-b7dbbc5c59f5
KanhaiyaKumar-tech/ineuronDSAAssignment2
Question8.cpp
#include <iostream> #include <vector> #include <algorithm> int minimumScore(std::vector<int>& nums, int k) { int minimum = *std::min_element(nums.begin(), nums.end()); int maximum = *std::max_element(nums.begin(), nums.end()); if (minimum == maximum) { return 0; } for (int num : nums) { ...
ALGO
0.999754
4.706791
1d72da22-ce12-431e-9c4b-d4d068083515
Pavarishko/CPLibrary
Graphs/DSU.cpp
#include <iostream> #include <algorithm> #include <vector> #include <random> #include <chrono> using namespace std; mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); struct DSU { vector<int> p; DSU(int n) { p.resize(n); for (int i = 0; i < n; ++i) { p[i] = i; ...
ALGO
0.997448
3.563342
04dd14fb-ec88-4b29-b01c-8d21ce245f24
alejandrogallo/bitis
tests/test_DataFlipFlop.cpp
#include <iostream> #include <vector> #include <cassert> #include <bitis.hpp> int main(int argc, char *argv[]) { Wire a, b; Clock clk; DataFlipFlop n(&a, &b, &clk); std::vector<std::vector<BIT>> sequence({ {H,H,H}, {H,L,H}, {H,H,H}, {H,L,H}, {L,H,L}, {L,L,L}, {L,H,L},...
TEST
0.955851
5.547988
d8f8acdf-0de9-409d-931d-cf633eb95b1f
Sk-Shubhasheesh/DSA_Question
Array/Problem18.cpp
/* Problem - Best Time to Buy and Sell Stock Problem link - https://www.codingninjas.com/studio/problems/stocks-are-profitable_893405?source=youtube&campaign=striver_dp_videos&utm_source=youtube&utm_medium=affiliate&utm_campaign=striver_dp_videos */ #include <bits/stdc++.h> int maximumProfit(vector<int> &prices)...
ALGO
0.999842
5.976688
c4028816-5740-4b29-a3b4-19e9dfd40d6b
anjalipathak13/Practice-Leetcode-Question
Minimum Spanning Tree - GFG/minimum-spanning-tree.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find sum of weights of edges of the Minimum Spanning Tree. int spanningTree(int V, vector<vector<int>> adj[]) { vector<int>vis(V,0); priority_queue<pair<int,int>...
ALGO
0.999982
5.791356
acfd6d32-723c-4b29-8103-9b556c37fbed
Ankush12217540/Data-Structure-And-Algiorithm-C-
14d.cpp
#include<iostream> using namespace std; bool isPossible(vector<int> &stalls,int k, int mid){ int cowCount=1; int lastPos=stalls[0]; for(int i=0; i<stalls.size(); i++){ if(stalls[i] - lastPos >= mid){ cowCount++; if(cowCount==k){ return true; } ...
ALGO
0.99998
4.906331
9f5e47ce-5c14-402e-ba77-0c3e13519e5c
MambaWoW/SnapGallery
app/windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998546
6.761023
0c5e5a03-81f0-4d9c-b96e-9998b547ee0b
AjayPratapSingh823/Data-Structure
Linked List/check palindrome or not.cpp
#include<bits/stdc++.h> using namespace std; class node{ public: int data; node* next; node(int d){ this->data=d; this->next=NULL; } }; void insert_at_head(node* &head,int d){ node* q=new node(d); q->next=head; head=q; } void reverse(node* &head){ node* prev=NULL; nod...
ALGO
0.999964
4.476831
a4e333a7-c9ef-46b2-be47-dce68662a876
kscheufe/PracticeProblems
TopInterview150/Strings&Arrays/JumpGame/solution.cpp
class Solution { public: bool canJump(vector<int>& nums) { //set distance to 1 to enter the array int distance = 1; //iterate through the array, except for the last element for (int i = 0; i < nums.size()-1; i++) { //decrement distance each step taken ...
ALGO
0.999997
6.371676
cfaa7b54-b3c9-412b-8b75-6827233fc648
centic9/digikam-ppa
extra/kipi-plugins/dngconverter/dngwriter/extra/dng_sdk/dng_xy_coord.cpp
/*****************************************************************************/ /*****************************************************************************/ /* $Id: //mondo/dng_sdk_1_3/dng_sdk/source/dng_xy_coord.cpp#1 $ */ /* $DateTime: 2009/06/22 05:04:49 $ */ /* $Change: 578634 $ */ /* $Author: tknoll $ */ /**...
TOOL
0.91589
6.168729
b0785788-372b-470c-b9ae-f234a40bb049
Readiz/ProblemSolving
arena/20230902/K.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { ll a1 = 0, a2 = 0, b1 = 0, b2 = 0; for(int i = 0; i < 4; ++i) { ll n, m; scanf("%lld %lld", &n, &m); a1 += n; b1 += m; } for(int i = 0; i < 4; ++i) { ll n,...
ALGO
0.999931
4.483023
3bed5edb-0e95-4497-8686-668be5094203
varunnitian/data-structures-and-algorithms
tail_recursion.cpp
//recursion-to-loop// // #include<iostream> // using namespace std; // void fun(int n) // { // while(n>0) // { // cout<<n<<" "; // n--; // } // } // int main() // { // int a=3; // fun(a); // return 0; // } //loop-to-recursion// // #include<iostream> // using namespace std; // void fun(int n) // { /...
ALGO
0.998526
3.737913
0cbb60c7-5652-4c9e-a11b-d83b8b1d65a1
Jatin-Shihora/LeetCode-Solutions
0229-majority-element-ii/0229-majority-element-ii.cpp
class Solution { public: vector<int> majorityElement(vector<int>& nums) { int sz = nums.size(); int num1=-1,num2=-1,count1=0,count2=0; for(int i=0;i<sz;i++){ if(nums[i]==num1) count1++; else if(nums[i]==num2) count2++; else if(count1 ==0){ ...
ALGO
0.999952
5.453586
b5f4980f-7c23-417d-8875-4afec07b0d73
SAYAN-DEV-NATH/Phitron_Course
C++ FOR DSA/W-1 Introduction to C++/M-1 Basic C++/Array.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) cin >> arr[i]; for (int i = 0; i < n; i++) cout << arr[i] << " "; return 0; }
ALGO
0.998559
3.249186
f9306906-5476-4a3e-89cd-9f3b4bb95ca9
Talibb555/codeforces
Most_Stones_Removed.cpp
#include <bits/stdc++.h> using namespace std; int main() { // vector<vector<int>> stones = {{0, 0}, // {0, 1}, // {1, 0}, // {1, 2}, // {2, 1}, // ...
ALGO
0.999687
3.237268
99e587ed-a38e-44c2-92b4-20eeee219eea
createandchoose/op
lab 2/1.cpp
#include <stdio.h> // Функция для сортировки трех вещественных чисел по указателям void sort3(float *a, float *b, float *c) { float temp; // Сравниваем и меняем местами значения, чтобы отсортировать их if (*a > *b) { temp = *a; *a = *b; *b = temp; } if (*a > *c) { t...
ALGO
0.999979
4.823432
9b661778-87ea-4b61-9dda-9b2043549d75
SWEG-2016EC-Batch/404
ETS1109-Nazrawit-Tewodros/printingPatterns/userInput/rightAngleTriangleWithNumbers.cpp
#include <iostream> using namespace std; int main(){ int number; cout<<"enter a number"; cin>>number; for (int i=1;i<=number;i++){ for (int j=1;j<=i;j++){ cout<<j<<" "; } cout<<endl; } }
ALGO
0.999726
3.723713
5deb9726-6196-4507-bde4-3914f89765df
Sanskar31/CodeForces-Solutions
AirConditioner.cpp
/* Author: Sanskar Agarwal Nick: sanskarag Birla Institute Of Technology, Mesra */ #include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" #define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define F(i,a,b) for(ll i = (ll)(a); i <= (ll)(b); i++) #define RF(i,a,b) for(ll i = (l...
ALGO
0.999927
3.47727
9d0e34c7-c7e5-446c-949c-a3008f48e370
activatedgeek/std_algos
SPOJ/DISUBSTR.cpp
#include <iostream> #include <iomanip> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sstream> #include <math.h> #include <limits.h> #include <time.h> #include <vector> #include <utility> #include <list> #include <stack> #include <queue> #include <map> #include <set> using nam...
ALGO
0.999664
4.189603
374a3ae7-8ed1-4d98-bf7b-62dc9406a7cd
katoumorisan/XBluetooth
bolt/training/src/compiler/training/base/optimizers/Ranger.cpp
#include "Ranger.h" #include <cmath> using namespace raul; namespace { constexpr raul::dtype LB = 0.0_dt; constexpr raul::dtype UB = 1.0_dt; enum buffFields : int { stepNumField, smaValField, stepSizeField }; } namespace raul::optimizers { Ranger::Ranger(const dtype lr, const dtype alpha, const size_t k,...
ALGO
0.964134
7.601365
35bd18a5-debb-499a-b360-83657ce2856d
Zogginator121/PowerUpJam-source
Kamek/src/bossBalboaWrench.cpp
#include <common.h> #include <game.h> #include <g3dhax.h> #include <sfx.h> #include <stage.h> #include "boss.h" extern "C" void dAcPy_vf3F8(void* player, dEn_c* monster, int t); class daBalboa_c : public daBoss { int onCreate(); int onDelete(); int onExecute(); int onDraw(); mHeapAllocator_c allocator; m3d::mdl...
ALGO
0.895046
3.415818
23a35d0a-f1b1-4a0d-a83d-42130eae4283
HongSon28/Training
CSP/21 6 2023/HOLIDAY.cpp
#include<bits/stdc++.h> using namespace std; const int N=5e3; int n; long long a[N+5]; long long dp[N+5]; long long sum[N+5]; long long cost(int l,int r) { if ((r-l+1)%2==0) { int left=l,right=l+(r-l)/2; return (sum[right]-sum[left-1])*2; } else { int mid=(r+l)/2; return sum[mid]...
ALGO
0.999672
3.603525
9774108a-48f7-444d-9a80-699daee716b1
Prakash3023/Cpp-basics
multiplication_table.cpp
#include<iostream> using namespace std; void mul_table(int a) { for (int i = 1; i <= 10; i++) { cout << a << " * " << i << " = " << a * i << endl; } } int main() { int a; cout << "Enter a number: "; cin >> a; cout << "The multiplication table of " << a << " is:" << endl; mul_table(a)...
TOOL
0.99109
3.732383
540eca16-c23b-4858-aa7c-382b6777a448
Titans-Project/BfaCore-Reforged
src/server/scripts/BrokenIsles/CathedralEternalNight/instance_cathedral_of_eternal_night.cpp
#include "cathedral_of_eternal_night.h" #include "Creature.h" #include "GameObject.h" #include "Map.h" #include "ScriptedCreature.h" #include "ScriptMgr.h" #include "InstanceScript.h" DoorData const doorData[] = { {GO_AGRONOX_DOOR, DATA_AGRONOX, DOOR_TYPE_PASSAGE}, {GO_THRASHBITE_DOOR, DATA...
TOOL
0.852065
4.531349
89dcddbc-3a1b-4f03-807d-b91b53e7428e
SparrowSurya/leetcode-blind-75
counting-bits.cpp
#include <vector> using namespace std; class Solution { public: vector<int> countBits(int n) { vector<int> counts(n+1, 0); for (int i=1; i<=n; ++i) { counts[i] = counts[i >> 1] + (i & 1); } return counts; } };
ALGO
0.999965
6.469456
0080a0e5-44cb-492f-a7eb-85c3e04f5a39
Shell-Wataru/AtCoder
Codeforces/588/A.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <iomanip> #include <cmath> using namespace std; using ll = long long; int main() { // 整数の入力 vector<ll> A; ll a, total; total = 0; for (int i = 0; i < 4; i++) { cin >> a;...
ALGO
0.999623
4.052422
276fcfd1-b369-4904-838d-4daaaf311577
wwwwanhonghuang/pcfg-cky-inside-outside
src/main.cpp
#ifndef USE_CUDA #include "main.h" #include <stdlib.h> #include <stdio.h> #include <assert.h> #include <string> #include <bits/stdc++.h> #include <vector> #include <iostream> #include <yaml-cpp/yaml.h> #include <cmath> #include "macros.def" #include "utils/tensor.hpp" #include "algorithms/alg_inside_outside_main.h" #i...
DATA
0.994763
6.058952
6dc45ba0-5d88-4e58-aa5a-dd05e66e0fc8
AdityaGattu/Leetcode
PayPal/15. 3Sum.cpp
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>>v; if(nums.size()<=2){return {};} sort(nums.begin(),nums.end()); for(int i=0;i<nums.size()-2;i++) { int x=nums[i]; if(i==0 || (i...
ALGO
0.999953
5.76474
b7cd70f7-052c-4882-8568-a07731039a41
oooppq/coding-tests
leetcode/1415.cpp
/* n과 k가 50이하이므로, 그냥 3 * 2^n 으로 모든 경우의수 다 돌리면 됐다. */ class Solution { vector<string> ss; string happy = "abc"; public: string getHappyString(int n, int k) { r("", 0, n); return k > ss.size() ? "" : ss[k - 1]; } void r(string s, int i, int n) { if (i >= n) ...
ALGO
0.999977
5.484057
802f0742-91dc-490d-affc-5e6e685b5eee
yatoz0r/TSP-AWS
TSP/TSP/main.cpp
#include <SFML/Graphics.hpp> #include <SFML/Window.hpp> #include <vector> #include <cmath> #include <algorithm> #include "Graph.h" template<typename T> void drawGraph(sf::RenderWindow& window, Graph<T>& graph, const std::vector<Vertex<T>>& vertices, const std::vector<Edge<T>>& edges) { for (const auto& edge : edge...
TOOL
0.908195
4.063122
a9de3976-51d1-4ec3-b654-6d50cc1fd1ff
dinurdo/DinurdoJK
codemp/qcommon/huffman.cpp
/* This is based on the Adaptive Huffman algorithm described in Sayood's Data * Compression book. The ranks are not actually stored, but implicitly defined * by the location of a node within a doubly-linked list */ #include "qcommon/qcommon.h" static int bloc = 0; void Huff_putBit( int bit, byte *fout, int *off...
ALGO
0.999148
4.597612
da71028a-1031-4b2d-9c0b-be9693be0535
tanvirtareq/programming
uva/1152 4 Values whose Sum is 0(2).cpp
#include<bits/stdc++.h> #define sci(a) scanf("%d", &a) #define v(a) vector<a> #define p(a, b) pair<a, b> using namespace std; typedef long long int li; typedef long long unsigned lu; typedef vector<int> vi; typedef pair<int, int> pii; typedef priority_queue<int> mxpqi; typedef priority_queue<int, vector<int> , great...
ALGO
0.999512
3.624358
ada9ae92-6fb5-41f8-a888-cee26e2e7a22
Saadmahmud-CSE/Competitive-Programming
Fancy Fense.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define lli long long int #define ull unsigned long long int #define fw(i,a,n) for(ll i=a;i<=n;i++) #define bw(i,n,a) for(ll i=n;i>=a;i--) #define fwd(i,a,n,k) for(ll i=a;i<=n;i+=k) #define bwd(i,n,a,k) for(ll i=n;i>=a;i-=k) #define pb push_back #define...
ALGO
0.999438
3.938377
cb053b04-7d4f-4e71-b3f8-f02e395bbcab
ishandutta2007/codeforces
muffinhead/normal/1039/A.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; 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>...
ALGO
0.999999
3.915812
bc106049-ee42-4b8a-a347-9c4ebfa8e8e7
shudhanshu435/LeetCode
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence/1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence.cpp
class Solution { public: int isPrefixOfWord(string sentence, string searchWord) { stringstream ss(sentence); string s; int size=searchWord.length(); int i=1; while(ss>>s){ if(s.size()>=size and s.substr(0,size)==searchWord)return i; i++; } ...
ALGO
0.999877
5.590848
31ba601a-ab18-430c-a574-566658c3c887
huynh-vch/code_c
chuong01/bai097.cpp
#include <iostream> #include <cmath> using namespace std; int main() { cout << "Bai 097: " << endl; int x, n; cout << "x = "; cin >> x; cout << "n = "; cin >> n; double S = 0; int T = 1; int i = 1; while (i <= n) { ...
ALGO
0.999978
4.030251
86fc3b7f-6856-4770-8b47-ee12309666aa
shogun-toolbox/shogun
src/shogun/evaluation/ClusteringMutualInformation.cpp
#include <shogun/lib/SGVector.h> #include <shogun/labels/MulticlassLabels.h> #include <shogun/evaluation/ClusteringMutualInformation.h> using namespace shogun; float64_t ClusteringMutualInformation::evaluate_impl(std::shared_ptr<Labels> predicted, std::shared_ptr<Labels> ground_truth) { ASSERT(predicted && ground_tr...
ALGO
0.989131
6.773962
b4a6e009-d41d-4c1f-bbbe-59983e45dc02
rifaiMuhamad7/cppCode-beginner
nilaiKelulusan.cpp
#include <iostream> using namespace std; int main(){ float nilaiLulus = 30; float nilaiMtk, nilaiIpa, nilaiEng, totalNilai; cout << "============== PROGRAM KELULUSAN SISWA\n"; cout << "Masukan nilai Matematika : "; cin >> nilaiMtk; cout << "Masukan nilai IPA : "; cin >> nilaiIpa; cout...
TOOL
0.879551
3.587756
726cc95c-f629-4d60-a7ad-392facff2fee
Wissiak/augmented-reality-with-3d-rendering-using-metal-shaders-and-opencv
src/built-libs/aapl/AAPLMathUtilities.cpp
#include "AAPLMathUtilities.h" #include <assert.h> #include <stdlib.h> uint32_t seed_lo, seed_hi; static float inline F16ToF32(const __fp16 *address) { return *address; } float AAPL_SIMD_OVERLOAD float32_from_float16(uint16_t i) { return F16ToF32((__fp16 *)&i); } static inline void F32ToF16(float F32, __fp1...
TOOL
0.984453
6.179896
699d881a-5cb4-444e-958a-befeb5693fb4
gaurlakshya/Leetcode_Submissions
160-intersection-of-two-linked-lists/160-intersection-of-two-linked-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { ListNode* temp1=headA; ListNode* temp2=headB; ...
ALGO
0.999836
5.24702
c0abc5f1-fa86-40a3-be5f-5ed953d1a18f
laosiaudi/leetcode
Unique_Paths_II.cpp
using namespace std; class Solution { public: struct grid { int x; int y; }; int uniquePathsWithObstacles(vector<vector<int> > &obstacleGrid) { int m = obstacleGrid.size(); int n = obstacleGrid[0].size(); if (m == 1 && n == 1) return obstacleG...
ALGO
0.999745
5.146378