uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
98f5ef4d-6d80-409b-ae13-f4c975ebe41b
susumantan/SOCS
Mingguan 11/quiz_17_Felix/quiz 17/ProbA.cpp
#include <stdio.h> #include <string.h> char table(char y) { int x = y - '0'; switch(x) { case 0: return 'O';break; case 1: return 'I';break; case 3: return 'E';break; case 4: return 'A';break; case 5: return '...
ALGO
0.99966
4.017764
6d3115c7-1dfd-4075-9b28-86ca63148a07
VipulChauhan89/CodeChef-Practice-Problems
Beginner/Alice and Marks-MARKSTW/marks.cpp
/* Alice has scored X marks in her test and Bob has scored Y marks in the same test. Alice is happy if she scored at least twice the marks of Bob’s score. Determine whether she is happy or not. */ #include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int X,Y;...
ALGO
0.999935
3.448608
fe114270-d7a6-4e64-b5ac-3321103223ee
stevenvo/Marlin-Mingda-D2
Marlin/src/libs/crc16.cpp
#include "crc16.h" void crc16(uint16_t *crc, const void * const data, uint16_t cnt) { uint8_t *ptr = (uint8_t *)data; while (cnt--) { *crc = (uint16_t)(*crc ^ (uint16_t)(((uint16_t)*ptr++) << 8)); for (uint8_t i = 0; i < 8; i++) *crc = (uint16_t)((*crc & 0x8000) ? ((uint16_t)(*crc << 1) ^ 0x1021) : (...
ALGO
0.997264
4.764662
0f068372-9e98-49b3-8ee5-7436e3037b8f
usernamegenerator/leetcode
171.excel-sheet-column-number.cpp
/* * @lc app=leetcode id=171 lang=cpp * * [171] Excel Sheet Column Number * * https://leetcode.com/problems/excel-sheet-column-number/description/ * * algorithms * Easy (53.59%) * Likes: 922 * Dislikes: 152 * Total Accepted: 283.1K * Total Submissions: 523.5K * Testcase Example: '"A"' * * Given a ...
ALGO
0.998896
6.549745
73df4a59-ad4a-4956-9d81-5308014b6d98
OussamaSALAHOUELHADJ/Traveling-sales-man
main.cpp
#include <iostream> #include <fstream> #include <filesystem> #include <vector> #include <thread> #include "./city/city.hpp" #include "./route/route.hpp" #include "./algorithms/brute_force/brute_force_solver.hpp" #include "./algorithms/greedy/greedy_solver.hpp" #include "./algorithms/two_opt/two_opt_solver.hpp" // Func...
ALGO
0.999854
5.455701
05ead45a-18c9-4c55-9a80-095c61415b68
uranix/hyperbolic
hopf.cpp
#include <iostream> #include "BaseProblem.h" #include "Limiters.h" #include "Methods.h" #include "Solver.h" struct Hopf : public BaseProblem<float, 1, Hopf> { vec F(const vec &U) const { vec ret; ret << 0.5 * U[0] * U[0]; return ret; } vec lambda(const vec &Umid) const { ve...
ALGO
0.999997
5.337365
7ebf5fee-619b-4de3-8690-552584cf3f9f
shivgupta198922/CodeForces-Master-in-cpp
1623B.cpp
/* ~ Author : @tridib_2003 */ #pragma GCC optimize("O3") // #pragma GCC optimize("Ofast") // #pragma GCC target("avx,avx2,fma") #include<bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_orde...
ALGO
0.999788
4.142019
09f6d522-b087-49b9-91cb-c7e5662a6fb6
sarvex/leetcode-powershell
lcci/10.09.Sorted Matrix Search/Solution.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { if (matrix.size() == 0 || matrix[0].size() == 0) return false; int m = matrix.size(), n = matrix[0].size(); int i = m - 1, j = 0; while (i >= 0 && j < n) { if (matrix[i][j] == target) re...
ALGO
0.999949
6.271087
0d881c59-80fc-420c-afc4-4a1f9e939810
iwiwi/programming-contests
gcj/2012/r2/D_small.cpp
#include <iostream> #include <sstream> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <cassert> #include <cstdarg> #include <sys/time.h> #ifdef _...
ALGO
0.998942
3.432539
94752420-39a3-4afd-ba50-ef1fe8ec5ec2
jxx-sx/BOJ_Study
solved/dijkstra/4485.cpp
#include <iostream> #include <memory.h> #include <queue> #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") using namespace std; struct Node { int x, y, d; Node(int x = 0, int y = 0, int d = 0) : x(x), y(y), d(d) {} bool operator<(const Node &t) const { return d...
ALGO
0.999891
4.282825
fedcd072-c9c6-4d64-bf0d-d3fb35bd2674
wowoto9772/Hungry-Algorithm
BOJ/2805/solution.cpp
#include <stdio.h> #include <limits.h> #include <algorithm> #define ll long long using namespace std; int t[1000003]; int main(){ int n, need; scanf("%d %d", &n, &need); for (int i = 0; i < n; i++){ scanf("%d", &t[i]); } sort(t, t + n); ll l = 1, r = INT_MAX, cut; ll ans = 0; while (l <= r){ cut = (l...
ALGO
0.99999
3.895533
16e5d6e2-f192-4902-a2ba-b01961108158
abuba8/Algorithms
Staircase.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; for(int i=1;i<=n;i++) { for(int k=n;k>i;k--) { cout<<(" "); } for(int j=1;j<=i;j++) { cout<<("#"); } ...
ALGO
0.999872
3.666856
cd4a94f2-9da1-467f-8736-3ed6cf2c9bc5
ormf/luftstrom
luftstrom-display/cl-boids-gpu/c/boids-bup.cpp
float4 vlimit(float4 v, float limit) { if (fast_length(v) == 0.0) return (v); else return(fast_normalize(v) * min (fast_length(v) , limit)); } float angle(float4 v1, float4 v2) { return (fmod(2+atan2pi(v2.y, v2.x)-atan2pi(v1.y,v1.x),2) - 1); } float randomangplusminus45deg(size_t tid, uint count) { return...
ALGO
0.999886
4.384181
07f96617-5888-4ad4-a44b-6421fbd065d4
siyuqtt/Leetcode-C-
UniquePaths.cpp
int uniquePaths(int m, int n) { vector< vector<int>> BF(n, vector<int>(m,0)); for(int j = 0 ;j < m; j++) {BF[n-1][j] = 1;} for(int i = 0 ;i < n; i++) {BF[i][0] = 1;} for (int j = 1 ;j < m; j++){ for(int i = n-2 ; i >= 0 ; i-- ){ BF[i][j] = BF[i+1][j]+...
ALGO
0.999896
5.072593
a8ab5e67-3cfd-45fa-a494-0a35fa12169b
drabuharuna/egpdGAM
src-i386/gaussC.cpp
// [[Rcpp::depends(RcppArmadillo)]] #include <RcppArmadillo.h> #include <Rcpp.h> // //' Gaussian negative log-likelihood // //' // //' @param pars a list of vectors of coefficients for each Gaussian distribution parameter // //' @param X1 a design matrix for the GEV log scale parameter // //' @param X2 a design matrix...
ALGO
0.999082
6.555766
45347172-3115-4b5f-bcfb-b7afc407317c
muschellij2/FSL6.0.0
extras/include/boost/libs/thread/example/parallel_quick_sort.cpp
#include <boost/config.hpp> #define BOOST_THREAD_VERSION 4 #define BOOST_THREAD_PROVIDES_EXECUTORS #define BOOST_THREAD_USES_LOG_THREAD_ID #define BOOST_THREAD_QUEUE_DEPRECATE_OLD #if ! defined BOOST_NO_CXX11_DECLTYPE #define BOOST_RESULT_OF_USE_DECLTYPE #endif #include <boost/thread/executors/basic_thread_pool.hpp>...
TOOL
0.952762
3.455076
13fba78b-a1cf-434e-8f82-60b8daffdbb2
AdiKulkarni/myFFmpegX264LatestLibAndroid
myFFmpegX264LatestLib/jni/mstorsjo-fdk-aac-97b382c/libSBRdec/src/sbrdec_drc.cpp
/* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Frderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION T...
ALGO
0.967176
4.623332
db39d4b3-efd7-479a-b7a4-6ab7301aa31f
MarcoHuber1/MCM
ex5.cpp
#include<iostream> #include<statistics.hpp> #include<grid.hpp> #include<ctime> int main() { //Set up random number generator //unsigned seed = std::chrono::system_clock::now().time_since_epoch().count(); unsigned seed = 1111121338; std::mt19937 gen; gen.seed(seed); //Set up Grid Grid_XY Gr...
ALGO
0.995006
3.529351
9542c404-8daa-4d24-9a19-e8191606d6cb
maksimrm/Coursera
С++/белый пояс/1 неделя/Расчет стоимости товара/main.cpp
#include <iostream> using namespace std; int main() { float N, A, B, X, Y; cin >> N >> A >> B >> X >> Y; if (N > B){ cout << (N*(1 - Y/100.)); } else if (N > A) { cout << (N*(1 - X/100.)); } else { cout << N; } return 0; }
ALGO
0.940647
3.023503
1a948cc7-4310-43cd-b1d0-8e9a476dc207
LenoVerde/pyrosim3
pyrosim/simulator/ode-0.12/GIMPACT/src/gim_math.cpp
#include "GIMPACT/gim_math.h" #include "stdlib.h" #include "time.h" GREAL gim_inv_sqrt(GREAL f) { GREAL r; GIM_INV_SQRT(f,r); return r; } GREAL gim_sqrt(GREAL f) { GREAL r; GIM_SQRT(f,r); return r; } //!Initializes mathematical functions void gim_init_math() { srand( static_cast< unsigned...
ALGO
0.990041
4.221071
ab152134-d1db-45c7-8426-0fc44afc9a36
Bjshah07/Recurssion
maze_path.cpp
#include <iostream> using namespace std; // SR - STARTING ROW // SC - STARTING CLOUMN // ER - ENDING ROW // EC - ENDING COLUMN int maze1(int r, int c) { // USING 2 PARAMETERS int rs = 0; int ds = 0; if (r == 1 && c == 1) { return 1; } if (r == 1) { rs += maze1(r, c - 1); ...
ALGO
0.999773
4.769734
7c8b531d-d181-4ca5-a42e-b4617223711c
PLSjie/hello-world
c/the_five_day/huiwenshupanduan.cpp
/* 202081719:20:58 ж */ # include <stdio.h> int main (void) { int val;//洢 int m; //val->sumм int sum = 0;//洢õ printf("Ҫжϵ:\n"); scanf("%d",&val); m = val; while(m) { sum = sum*10 + m%10; m /= 10; } if(sum == val) printf("YES\n"); else printf("NO\n"); return 0; } /* VC++6.0 121 YES 1234 NO 12321 ...
ALGO
0.99997
3.991533
171072f6-e290-4ece-935a-351c56dd3bc4
nmpogg/CodePTIT
c/demsonguyento.cpp
#include <stdio.h> #include <math.h> int check_prime(int n){ if(n < 2) return 0; for(int i = 2; i <= sqrt(n); i++){ if(n % i == 0){ return 0; break; } } return 1; } int check_digits(int n){ int digit; while(n > 0){ digit = n % 10; if(!check_prime(digit)) return 0; n /= 10; } return 1; } int ma...
ALGO
0.999801
4.881607
35ce0df5-a483-4f99-a379-0130326c17af
TahmidMuntaser/File
NumberTheory/ExtendedEuclideanAlgo/ExtendedEuclidenAlgo.cpp
#include<bits/stdc++.h> using namespace std; pair<int, int>check_gcd(int a, int b){ if(b == 0) return {1, 0}; auto [x2,y2] = check_gcd(b, a%b); int x = y2; int y = x2 - (a/b)*y2; return {x, y}; } int main(int argc, char const *argv[]) { // ax+by = gcd(a, b) int a, b; cin>>a>>b; a...
ALGO
0.999838
4.903092
1fea8a1d-e9ad-4fd1-a256-3a7d259d21b3
footoredo/Gungnir
Code/8-10/h.cpp
#include <bits/stdc++.h> #include <queue> #define stack STACK123 using namespace std; typedef long long LL; typedef long double LD; const int MAXN = 11111; const int MAXM = 11111; const LD eps = 1e-10; const LL INF = 1e18; int n, m, cnt, S[2], T, sum, top[2], x, y, id[2], adj[MAXN]; LL dist[MAXN][111], X[1111111]; boo...
ALGO
0.999846
3.829704
c6031562-4a0b-40b9-9eeb-2c42c8f1d3ba
abhisingh2244/codechef-September-Challenge-2021-Division-2
PALINT.cpp
#include <bits/stdc++.h> #include <iostream> using namespace std; typedef long long int ll; int main() { // your code goes here int t; cin>>t; while(t--){ ll n,x; cin>>n>>x; map<ll, int>m; vector<ll> v; for (int i = 0; i < n; i++) { int a; cin >> a; v.push_back(...
ALGO
0.999835
4.586572
adf873c3-d9bf-4252-8e4a-3bbf7beb761f
sarvex/leetcode-ksh
solution/0500-0599/0535.Encode and Decode TinyURL/Solution.cpp
class Solution { public: // Encodes a URL to a shortened URL. string encode(string longUrl) { string v = to_string(++idx); m[v] = longUrl; return domain + v; } // Decodes a shortened URL to its original URL. string decode(string shortUrl) { int i = shortUrl.rfind('/'...
ALGO
0.996955
6.425267
1f1ed977-dba9-490b-aa38-71295e4d6c07
sarvex/leetcode-checked-c
lcp/LCP 09. 最小跳跃次数/Solution.cpp
class Solution { public: int minJump(vector<int>& jump) { int n = jump.size(); vector<bool> vis(n + 1); queue<int> q{{0}}; vis[0] = true; int ans = 0, mx = 1; while (!q.empty()) { for (int t = q.size(); t; --t) { int i = q.front(); ...
ALGO
0.999996
5.610642
bcd24e3b-993c-4464-ad8e-7c96e93da2b3
cocoawithyou/Programmers_solutions
[1차] 비밀지도.cpp
//https://school.programmers.co.kr/learn/courses/30/lessons/17681 #include <string> #include <vector> #include <iostream> using namespace std; string rev_to_bin(int n, int count) { string s; while (count > 0) { if (n % 2 == 0) { s += "0"; } else { s += "1"; ...
ALGO
0.99991
4.955307
1f177e82-2c8a-4f47-a3ea-820cd74c1dda
Seann0425/LeetCode
finished/1184. Distance Between Bus Stops.cpp
#include <bits/stdc++.h> using namespace std; 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) { } }; struct TreeNode { int val; TreeNode *left; ...
ALGO
0.999952
5.135649
d30a07b2-5d5d-437d-96c7-80240455aaf5
SharifdotG/SharifdotG-s-CodeVault
Codechef/183 - 300/Second Max of Three Numbers/SNDMAX2.cpp
#include <bits/stdc++.h> using namespace std; int main() { int testCases; cin >> testCases; while (testCases--) { int a, b, c; cin >> a >> b >> c; // print the second max of a, b, c if (a > b) { if (b > c) cout << b << endl; else if (a > c) cout <<...
ALGO
0.999972
4.801501
8f9fee93-e6da-47c5-83a3-0ef4d7272976
virtyaluk/leetcode
problems/2385/solution.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.999929
6.209112
7b721560-22f0-4e13-a96f-c70520990d9f
AllirWasTaken/Psi
Lab5/ActivationFunctions.cpp
#include "ActivationFunctions.h" #include <cmath> void ActivationFunctions::RectifiedLinearUnit(ALib::Matrix & matrix) { for(int y=0;y<matrix.Height();y++){ for(int x=0;x<matrix.Width();x++){ if(matrix[y][x]<=0) { matrix[y][x] = 0; } } } } void Activatio...
TOOL
0.922878
5.156002
5f1d5b75-fe4e-40ce-857a-4ee55abbd576
ichdream/Not-Only-Leetcode
Topics/Union-Find/codes/union_find_main.cpp
#include<iostream> #include<vector> // #include "union_find_v1.h" #include "quick_union_v2.h" using namespace std; int main() { int N = 0; cout << "input the number of nodes: N" << "\n"; cin >> N; UF uf(N); int a = 0, b = 0; cout << "input the number of needed connected pairs: m" << "\n"; in...
ALGO
0.999736
4.838507
8101bdc1-691f-43c0-aea3-284672b9d8a0
ofZach/RTP_MIT_RECODED
local_addons/ofxTween/src/Easings/ofxEasingCubic.cpp
#include "ofxEasingCubic.h" float ofxEasingCubic::easeIn (float t,float b , float c, float d) { return c*(t/=d)*t*t + b; } float ofxEasingCubic::easeOut(float t,float b , float c, float d) { return c*((t=t/d-1)*t*t + 1) + b; } float ofxEasingCubic::easeInOut(float t,float b , float c, float d) { if ((t/=d/2) < 1) ...
ALGO
0.984649
4.914904
1a890809-2a7a-4605-b5a2-129eabee6fbd
filipeemweb/learningCPP
CS50Remake/marioMore.cpp
// Creates an pyramid like in mario with two columns. The height and spaces between are specified by the user #include <iostream> void stair(int, int); // Function prototype int main() { int height, space; std::cout << "Height: "; std::cin >> height; std::cout << "Spaces: "; std::cin >> space; ...
TOOL
0.928496
5.371908
4abe1005-0ed9-49b5-8aaa-c76bc6ae46f8
shivcodecf/leetcode-start-9-2-24
2691-count-vowel-strings-in-ranges/count-vowel-strings-in-ranges.cpp
class Solution { public: vector<int> vowelStrings(vector<string>& words, vector<vector<int>>& queries) { int n=words.size(); vector<int>pref(n); map<char,int>mp; mp['a']++; mp['e']++; mp['i']++; mp['o']++; mp['u']++; int sum=0;...
ALGO
0.999934
6.393258
898c69db-57e5-4c63-a378-26a120744759
psj98/Baekjoon_Solve
C++/14. 정수론 및 조합론/1010.cpp
#include <iostream> #define MAX 31 using namespace std; int arr[MAX][MAX]; int main(){ int t, n, m; scanf("%d", &t); for(int i=1; i<MAX; i++) arr[i][0]=arr[i][i]=1; for(int i=2; i<MAX; i++) for(int j=1; j<i; j++) arr[i][j]=arr[i-1][j]+arr[i-1][j-1]; for(int i=0; i<t...
ALGO
0.999874
3.846632
fe13a356-d830-4672-b4a7-67b7ba3341ad
caputdraconis050630/algorithm
baek/baek_1202.cpp
#include <bits/stdc++.h> #define Price first #define Weight second using namespace std; int main(void) { ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int N, K; cin >> N >> K; pair<int, int> jew[300005]; // 가격 무게 multiset<int> bag; for (int i = 0; i < N; i++) { ...
ALGO
0.999841
4.217213
a7c81592-6881-41d6-828c-69f3335edb8a
ishandutta2007/codeforces
eddy1021/normal/512/B.cpp
// eddy1021 #include <bits/stdc++.h> using namespace std; typedef double D; typedef long long ll; typedef int TYPE; typedef pair<int,int> PII; #define mod9 1000000009ll #define mod7 1000000007ll #define INF 1023456789 #define FI first #define SE second #define PB push_back #define MP make_pair #define eps 1e-7 int geti...
ALGO
0.999988
3.295016
a7ee2dbe-ce43-4770-87d8-adb9982ab300
HongTrang277/pbl1-
CTDL/polynomial.cpp
#include <bits/stdc++.h> #include <stdlib.h> using namespace std; #define MAX_DEGREE 100 typedef struct polynomial { unsigned int high_power; // số nguyên không dấu, bậc cao nhất của đa thức int coeff_array[MAX_DEGREE+1]; // mảng lưu các hệ số của thành phần đa thức } *POLYNOMIAL; void zero_polynomial ( POLYN...
ALGO
0.999329
3.642594
18b4e716-e224-4b3e-91ee-8509946f01ff
NestZ/competitive-programming
CodeForces/573A.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; int main(){ ios::sync_with_stdio(false); cin.tie(0); set<int> s; int n;cin >> n; for(int i = 0;i < n;i++){ int t;cin >> t; while(t % 2 == 0)t /= 2; while(t % 3 == 0)t /= 3; s.insert(t); } if(s.size() == 1)cout << "Yes"; else cout ...
ALGO
0.999949
4.087268
818e7874-fad1-4904-8763-3ad4244d98cd
idiotman-2212/BTCodePTITHCM
KieuDuLieu-VietVongLap-VietHam/CPP0103_tinhTongPhanThuc-1.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { int N; cin >> N; double S = 0.0; for (int i = 1; i <= N; i++) { S += 1.0 / i; } cout << fixed << setprecision(4) << S << endl; return 0; }
ALGO
0.999706
4.732338
24e59285-ea4c-4bdf-b3d5-a3fde1bca401
YuvanPrashanthG/chat-app-v1
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998784
6.761023
68b9465f-4566-4246-8bd2-7980b0530bb8
EtorArza/NestedOpt
other_repos/RoboGrammar/extern/eigen/doc/snippets/Tutorial_solve_triangular.cpp
Matrix3f A; Vector3f b; A << 1,2,3, 0,5,6, 0,0,10; b << 3, 3, 4; cout << "Here is the matrix A:" << endl << A << endl; cout << "Here is the vector b:" << endl << b << endl; Vector3f x = A.triangularView<Upper>().solve(b); cout << "The solution is:" << endl << x << endl;
ALGO
0.999826
3.045018
dc8eec33-9393-43ae-ab81-49f5625fc59e
Alishkoo/ADS
lab2/a.cpp
#include <bits/stdc++.h> using namespace std; // template <class T> // Need to solve problem with type of data class Node{ public: int data; Node* next; public: Node(int data){ this->data = data; this->next = NULL; } }; class OneLinkedList{ public: Node* head; // front Node...
ALGO
0.999844
4.11063
1655628a-13f6-494f-a0bc-3f2f5dd2dbf6
Seizzzz/DailyCodes
Course 201809/homework/7/E.cpp
#include <stdio.h> #include <math.h> int numConvert(long long num,long long m,long long n) { //תΪʮ int len=0; for(;num/(long long int)pow(10,len)!=0;len++); len--; long long sum=0; for(;len>=0;len--) { sum+=((num/(long long)pow(10,len))%10)*pow(m,len); } //printf("%lld\n",sum); //תΪn len=0; for(;sum/...
ALGO
0.99996
3.408715
18b5c2e0-f03a-474b-b734-c64e4b62e603
Tanvir-Azad-Mahir/DSA-01-codes
selection.cpp
#include <iostream> using namespace std; int main() { int arr[] = {64, 34, 25, 12, 22, 11, 90}; // Example array int n = sizeof(arr) / sizeof(arr[0]); // Size of the array // Selection Sort for (int i = 0; i < n - 1; i++) { int minIndex = i; // Assume the current position has the minimum valu...
ALGO
0.999948
5.329291
df23dea6-6a02-4d90-b692-e52558f5a591
kamyu104/LeetCode-Solutions
C++/count-number-of-rectangles-containing-each-point.cpp
// Time: O(nlogn + m * max_y * logn), n = len(rectangles), m = len(points) // Space: O(n) // bucket sort, binary search class Solution { public: vector<int> countRectangles(vector<vector<int>>& rectangles, vector<vector<int>>& points) { const auto max_y = (*max_element(cbegin(rectangles), cend(rectangles)...
ALGO
0.999966
6.187123
f97981e3-7b4b-45f3-a735-e4c1d0b7b6ee
sikuner/book-code
Professional C++, 3rd Edition/c17_code/NonModifyingAlgorithms/ComparisonAlgorithms.cpp
#include <algorithm> #include <vector> #include <list> #include <iostream> using namespace std; // Function template to populate a container of ints. // The container must support push_back(). template<typename Container> void populateContainer(Container& cont) { int num; while (true) { cout << "Enter...
TOOL
0.934909
5.364309
852bc820-64ed-4eb4-ac75-06e1203b3b76
shadowzgz/JK2SourceCode
jk2-1.04-src/code/jpeg-6/jctrans.cpp
// leave this as first line for PCH reasons... // #include "../server/exe_headers.h" #define JPEG_INTERNALS #include "jinclude.h" #include "jpeglib.h" /* Forward declarations */ LOCAL void transencode_master_selection JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); LOCAL void transencode_coef_controller...
TOOL
0.919361
6.674724
7e553b4b-d6bf-4556-ab3c-134e6348da5b
xiebaiyuan/paddle-mobile
mobile/src/operators/kernel/fpga/V2/conv_kernel.cpp
#ifdef CONV_OP #include "operators/kernel/conv_kernel.h" namespace paddle_mobile { namespace operators { template <> bool ConvKernel<FPGA, float>::Init(ConvParam<FPGA> *param) { paddle_mobile::fpga::ActivationType activation_enable = paddle_mobile::fpga::NONE; int16_t leaky_relu_negative_slope = 0; auto ...
TOOL
0.923984
7.176492
616b2eea-f912-43ed-8b4b-8c7605b6ebea
thuongbm/ctdl-gt
onthi/de2/cau2.cpp
#include <bits/stdc++.h> using namespace std; template <class T> class Node{ T ele; Node* next; // Con trỏ chỉ đến phần tử tiếp theo public: Node(T value) : ele(value), next(nullptr) {} // Constructor khởi tạo T getElement() { return ele; } Node* getNext() { return next; } void setNext(Node* n...
ALGO
0.999687
5.174749
163b3bda-8bed-4c9b-844c-c6c4153ab6fa
xodnjsqkr/Algorithm
codeup/Basic 3. if ~ else/1207.cpp
#include <iostream> #include <string> using namespace std; int main(void) { int Yutnori[4]={0},cnt=0; string result[5]={"도", "개", "걸", "윷", "모"}; for(int i=0;i<4;i++) { cin>>Yutnori[i]; if(Yutnori[i]==1)cnt++; } switch(cnt) { case 1: cout<<result[0]; ...
ALGO
0.999806
3.830683
95d9f906-7506-4c46-98b4-7bc56aae3c0b
evertheylen/MachinesEnBerekenbaarheid
code/libs/boost/libs/graph/example/planar_face_traversal.cpp
#include <boost/graph/planar_face_traversal.hpp> #include <boost/graph/boyer_myrvold_planar_test.hpp> using namespace boost; // Some planar face traversal visitors that will // print the vertices and edges on the faces struct output_visitor : public planar_face_traversal_visitor { void begin_face() { std::cout <<...
ALGO
0.999717
7.348744
287d7033-859a-4012-918c-0ade697be4a5
alejobaenam/Competitive-Programming
USACO/2. Bronze/Additional/IntroGraphs/LivestockLineup.cpp
/**************************************************************************************************************** ██████╗░░█████╗░██╗░░██╗██╗░░██╗██╗███╗░░██╗ ██╔══██╗██╔══██╗██║░░██║██║░██╔╝██║████╗░██║ █████...
ALGO
0.999891
4.367137
73442c86-e347-40d8-83cd-be5ef37da207
EmanuelTh/Programas-C-
2024/37.cpp
#include <stdio.h> int main() { int n_linhas; scanf("%d", &n_linhas); int l_atual = 1; int esp = n_linhas - 1; int ast = 1; int m = n_linhas; while (l_atual <= n_linhas * 2 - 1) { int i = 1; while (i <= esp) { printf(" "); i++; } ...
ALGO
0.999915
3.786855
b0ce0ece-92c6-4219-bb2f-55fa5e3a7fee
RandomDeveloperM/UE4_Hairworks
Engine/Source/ThirdParty/CryptoPP/5.6.2/include/cmac.cpp
// cmac.cpp - written and placed in the public domain by Wei Dai #include "pch.h" #ifndef CRYPTOPP_IMPORTS #include "cmac.h" NAMESPACE_BEGIN(CryptoPP) static void MulU(byte *k, unsigned int length) { byte carry = 0; for (int i=length-1; i>=1; i-=2) { byte carry2 = k[i] >> 7; k[i] += k[i] + carry; carry =...
ALGO
0.969951
7.689905
4666a3e5-8296-49b3-9f05-6288a3bec03b
lucky5656/Data-Structure
02线性结构/04应用实例:多项式加法运算/多项式加法运算.cpp
#include<iostream> using namespace std; struct PolyNode { int coef; //ϵ int expon; //ָ struct PolyNode *link; //ָһڵָ }; typedef struct PolyNode *Polynomial; Polynomial P1, P2; Polynomial PolyAdd(Polynomial P1, Polynomial P2); void Attach(int c, int e, Polynomial *pRear); int Compare(int a, int b); void PrintPol...
ALGO
0.999102
3.444117
c100667c-2aad-4035-a900-8e21a1c68eba
ThomasBisson/DreamInEngine_2.0
libs/Box2D/Box2D/Collision/b2CollidePolygon.cpp
#include <Box2D/Collision/b2Collision.h> #include <Box2D/Collision/Shapes/b2PolygonShape.h> // Find the max separation between poly1 and poly2 using edge normals from poly1. static float32 b2FindMaxSeparation(int32* edgeIndex, const b2PolygonShape* poly1, const b2Transform& xf1, const b2PolygonShape*...
ALGO
0.999844
6.85203
79cabc82-37cb-4169-b91b-7b1123526d96
ajedd077/cpp_tutorial
set_cover/set_difference.cpp
#include <algorithm> #include <vector> #include <iostream> template <class T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) { for (const auto& vi: v) { os << vi << " " ; } return os; } template <class Iterator> Iterator set_difference_unsorted_v1(Iterator first, Iterator last, Ite...
ALGO
0.995052
4.976705
2836fdfa-09da-4b87-9313-dab0a4be446a
Kozaar/Neural-network
MLP/Model/GNN.cpp
#include "GNN.h" #include <cmath> // -------------------------------------------- // Neuron // -------------------------------------------- namespace s21 { GNN::Neuron::Neuron() { error_ = 0; value_ = 0; inputValue_ = 0; bios_ = 0; weights_.clear(); } GNN::Neuron::Neuron(const int sizeNextLayout) : Neuron...
ALGO
0.999181
5.385646
06a5c93b-4c4f-4c65-91ce-cd9dc7dd5572
Winter0016/thuat-toan-c-
luyen tap/get new number(no recursion)/main.cpp
#include <iostream> #include <vector> #include<string> using namespace std; class number { private: vector<int>digits; int x; public: number() { } void input(auto a){ x = a - '0'; digits.push_back(x); } void output(){ for(int i = 0 ; i < digits.size();i++){ ...
ALGO
0.999907
4.179067
4737d987-5ad2-4756-b77f-df01e3c7a16f
ishandutta2007/codeforces
geniucos/normal/932/E.cpp
#include<bits/stdc++.h> using namespace std; int N, K, ways[5009], c[5009][5009]; const int mod = 1e9 + 7; int add (int x, int y) {int ans = x + y; if (ans >= mod) ans -= mod; return ans;} int subtract (int x, int y) {if (x >= y) return x - y; return x - y + mod;} int mul (int x, int y) {return 1LL * x * y % mod;} v...
ALGO
0.999952
4.468622
91c55a34-46b4-4bdd-9451-fcb78ae0a3ec
ishandutta2007/codeforces
kmjp/normal/1296/E1.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999994
3.275134
9a3b893d-cb26-4f92-9f93-19ccd3001682
FedericoBrusadin/Laboratorio
lab01/es06.cpp
#include <iostream> using namespace std; int main() { cout << "0 && 0 | 0" << endl; cout << "0 && 1 | 0" << endl; cout << "1 && 0 | 0" << endl; cout << "1 && 1 | 1" << endl; cout << endl; cout << "0 || 0 | 0" << endl; cout << "0 || 1 | 1" << endl; cout << "1 || 0 | 1" << endl; c...
TEST
0.985
3.723938
6cee0cc2-0d84-4cf3-87a0-a4520838108b
imtahirabatool/Leetcode
2217-step-by-step-directions-from-a-binary-tree-node-to-another/step-by-step-directions-from-a-binary-tree-node-to-another.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.999966
6.598002
807da607-776e-4c6f-900a-bf3a7392bd65
vbonnici/grafe-sim
analysis/data/p02255/s980150899.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N; int A[100]; int key; int j; cin >> N; if (N <= 0 || N > 100)return 0; for (int i = 0; i<N; i++) { cin >> A[i]; } for (int i = 1; i <= N - 1; i++) { for (int m = 0; m<N-1; m++) { cout << A[m] << " "; } cout<<A[N-1]<< endl; key = A[...
ALGO
0.999986
3.267848
d3444372-f8e6-4afa-a299-154fa29777d6
Tokesh/ADS
stack,queue,deque/test(not working)/dequeue.cpp
#include <iostream> using namespace std; struct Nodes{ int data; Nodes *next; Nodes(int data){ this->data=data; this->next=NULL; } }; struct deque{ Nodes *first; Nodes *second; int cnt; deque(){ cnt = 0; first =NULL; second = NULL; } int ...
ALGO
0.997565
4.492955
84146edf-0d06-4095-bf78-fa8d54570dac
WilliamJokuS/mywebsite
idek/ttttt.cpp
#include <bits/stdc++.h> using namespace std; int main() { vector< int >arr; string input; getline(cin, input); istringstream is(input); int num; while(is>>num) arr.push_back(num); for(int x: arr) cout<< x <<" "; }
ALGO
0.994069
3.598551
cc7fe94f-c054-44f6-8cec-aae9481d203d
jishnucr07/driveguard
flutter-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.998716
6.772262
39556ecc-1fa8-404c-ab2a-37c1569d804c
StudyingFather/my-code
Codeforces/776B.cpp
#include <cstdio> int a[100005]; int main() { int n; scanf("%d",&n); for(int i=2;i<=n+1;i++) if(!a[i]) for(int j=i;(long long)i*j<=n+1;j++) a[i*j]=1; if(n>=3)puts("2"); else puts("1"); for(int i=2;i<=n+1;i++) printf("%d ",a[i]+1); return 0; }
ALGO
0.999415
3.238965
d2912253-60e0-4807-b262-5c422908183b
EmpireCryptoNetwork/emp
src/script/sign.cpp
#include "script/sign.h" #include "primitives/transaction.h" #include "key.h" #include "keystore.h" #include "script/standard.h" #include "uint256.h" #include "util.h" #include <boost/foreach.hpp> using namespace std; typedef vector<unsigned char> valtype; bool Sign1(const CKeyID& address, const CKeyStore& keystor...
ALGO
0.918162
6.522789
5b95d5e0-fbc6-45ca-a360-22a19a81030e
ishandutta2007/codeforces
data_h/normal/331/C3.cpp
#include <cstdio> #include <cstdlib> #include <algorithm> #include <map> using namespace std; const int MAXN = 1100000; long long n; int a[20]; long long ans = 0, mi[30]; map<long long, long long> cnt[10]; map<long long, int> decr[10]; long long dfs(int Max, long long n) { if (cnt[Max].count(n)) return cnt[Max][n...
ALGO
0.99998
4.328882
d6312f91-4ddf-4402-9b48-f726957f9784
jw38176/CTour
src/systemc/tests/systemc/misc/communication/channel/hwsw/hwsw.cpp
/***************************************************************************** hwsw.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /***************************************************************************** ...
TOOL
0.903621
5.593068
feb4ab61-6d41-4900-8597-d5650f92cdee
MVoz/vcpkg-template
toolsrc/src/vcpkg/base/hash.cpp
#include "pch.h" #include <vcpkg/base/checks.h> #include <vcpkg/base/hash.h> #include <vcpkg/base/strings.h> #include <vcpkg/base/system.process.h> #include <vcpkg/base/uint128.h> #include <vcpkg/base/util.h> #if defined(_WIN32) #include <bcrypt.h> #pragma comment(lib, "bcrypt") #ifndef NT_SUCCESS #define NT_SUCCESS...
TOOL
0.962988
7.613329
b134f526-5b5a-495e-9328-6985e67dd376
OpenDigitalTwin-Dev/FENGSim
toolkit/Geometry/cgal/examples/Surface_mesh_topology/path_homotopy.cpp
#include <CGAL/Linear_cell_complex_for_combinatorial_map.h> #include <CGAL/Linear_cell_complex_constructors.h> #include <CGAL/Curves_on_surface_topology.h> #include <CGAL/Path_on_surface.h> /* If you want to use a viewer, you can use qglviewer. */ #ifdef CGAL_USE_BASIC_VIEWER #include <CGAL/draw_face_graph_with_paths....
ALGO
0.990773
5.394217
d2516553-a10d-4b53-9d4d-0948f87af2df
Mayuri13/My_Leetcode_Solution
2519-find-the-original-array-of-prefix-xor/2519-find-the-original-array-of-prefix-xor.cpp
class Solution { public: vector<int> findArray(vector<int>& pref) { vector<int>v1; int x=pref[0]; v1.push_back(pref[0]); for(int i=1; i<pref.size(); i++){ x=x^pref[i]; v1.push_back(x); x=pref[i]; } return v1; } };
ALGO
0.999989
5.308042
da12d350-9fb2-4e75-bbac-dc03e7fbb50e
cunbidun/competitive_programming
archive/Codeforces - VK Cup 2016 - Qualification Round 2/C. Road Improvement/solution.cpp
#include <iostream> #include <vector> #include <utility> #include <algorithm> using namespace std; typedef pair<int,int> ii; typedef vector<int> vi; typedef vector<ii> vii; const int MAXN = 2e5+5; int n, result = 0, lab[MAXN]; vii adj_list[MAXN]; vector<vi> ans; void dfs(int u, int last, int skip){ int curr; if...
ALGO
0.999919
4.095919
526e2e32-bdcc-452d-9f31-55fc0f75e3c0
20-with-Java/Part4_FastCampus
ch6/clip5/boj15906/main.cpp
#include <iostream> #include <queue> #define MAX_VALUE (1000) struct point_t { int r; int c; int changed; int cost; point_t operator+(point_t rhs) { return {r + rhs.r, c + rhs.c, changed + rhs.changed, cost + rhs.cost}; } bool operator()(point_t a, point_t b) { retu...
ALGO
0.999937
3.961441
338c28e1-8ed0-42c5-8b46-f9300a5c68bc
xyzyzl/compprog
probs/cf/round612/d1a.cpp
// Time: // Algorithms: #include <bits/stdc++.h> #pragma GCC optimize("O3") using namespace std; #define MAXN 105 #define FOR(i, n) for (int i = 0; i < n; i++) #define FORR(j, i, n) for (int i = j; i < n; i++) #define FORD(i, n) for (int i = n - 1; i >= 0; i--) #define FOBIR(i, n) for (int i = 1; i <= n; i++) #de...
ALGO
0.999977
4.247602
abfd2ec6-c6fb-46b3-92e6-a6bfce7fbe2a
YujianLiu/GoogleCodeJam
GoogleCodeJam/325. Maximum Size Subarray Sum Equals k.cpp
#include "Header.h" int maxSubArrayLen(vector<int>& nums, int k) { unordered_map<int, int> Sums_Untill; int result = 0, Size_Of_Array = (int) nums.size(), Current_Sum = 0; for (int index = 0; index < Size_Of_Array; ++index) { Current_Sum += nums[index]; if(Curren...
ALGO
0.999334
5.685295
3f9ddc41-2509-4123-a692-5f0d377b473c
myc0603/CodingTestStudy
week7/V14863_bottomup_ing.cpp
#include <iostream> using namespace std; int n, k, wt[101], wv[101], bt[101], bv[101], dp[101][100003]; int main() { cin >> n >> k; for (int i = 0; i < n; ++i) { cin >> wt[i] >> wv[i] >> bt[i] >> bv[i]; } }
ALGO
0.999934
3.452397
447523d4-a0b8-4192-ac6e-918e0ad5b1a2
ishandutta2007/codeforces
alfnov/normal/1466/A.cpp
#include<bits/stdc++.h> using namespace std; int a[10005],t[1000005]; int main() { int tt; cin>>tt; while(tt--) { int n,tot=0; cin>>n; for(int i=1;i<=n;i++)scanf("%d",&a[i]); for(int i=1;i<=n;i++)for(int j=1;j<=n;j++)if(a[i]!=a[j]) t[++tot]=max(a[i],a[j])-min(a[i],a[j]); sort(t+1,t+tot+1); tot=unique...
ALGO
0.999627
3.998646
9629b98c-07e9-409f-b79d-2ae6c790d10b
GeorgianBadita/University
Semester2/Algorithms and Data Structures/ContainersC&C++/implementari_C++/double_linked_lst_table_link/main.cpp
#include <iostream> #include "DLinkedList.h" void create_lst(DLinkedList& lst){ lst.add_elem_front(1); lst.add_elem_front(2); lst.add_elem_front(3); lst.add_elem_front(4); lst.add_elem_front(5); } void print_lst(const DLinkedList& lst){ auto it = lst.iterator(); while(it.valid()){ ...
TOOL
0.99338
4.774646
c9ff7440-4370-4584-9aea-8f3faff9338c
putdata/algorithm-problem-solving
NOJAM/13174.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; tuple<ll, ll, ll> euclid(ll a, ll b) { if (b == 0) return {a, 1, 0}; auto [gcd, x, y] = euclid(b, a % b); return {gcd, y, x - (a / b) * y}; } int main() { ios::sync_with_stdio(0); cin.tie(0); ll n, k; cin >> n >> k; ...
ALGO
0.999986
4.630626
f01977dc-f6f1-421e-93b1-d89a86a94215
gatordan82/Cpp-for-C-Programmers
Ch7/stl_cont.cpp
/********************************************************************** Filename: stl_cont.cpp Chapter: 7 Templates Generic Programming and STL Compiler: Borland C++ Version 5.01 Summer 1998 C++ for C Programmers, Edition 3 By Ira Pohl *************************************************...
ALGO
0.999427
5.068929
8c765228-78e4-4854-92a0-fcd9d188f71b
wyfwawwa/PAT-Basic-Level-Practice-
1007.cpp
#include<iostream> #include<cmath> using namespace std; int main() { int count = 0, n, a[10000], k = 1; cin >> n; for (int i = 2; i <= n; i++) { bool flag = true; for (int j = 2; j <= sqrt(i); j++) { if (i % j == 0) { flag = false; break; } } if (flag) { a[k] = i; k++; } } fo...
ALGO
0.99994
4.007638
a2e064d4-b1d8-42ba-aec2-d65e7d9a1854
ishandutta2007/codeforces
elegia/normal/1000/G.cpp
#include <cstdio> #include <algorithm> #include <numeric> #include <vector> using namespace std; typedef long long ll; struct Edge { int v, w; Edge* next; }; const int N = 400010; int n, q; ll sub[N], lk[N], spec[N], asum[N], wsum[N]; int a[N], f[N], prt[N], prtw[N], qu[N], qv[N], lca[N], ord[N]; Edge* g[N]; ve...
ALGO
0.999843
4.306216
6fe5cfe5-5276-4e64-be34-64d0a2974a9f
Shubham-Choudhury/GeeksforGeeks-Problems
2024/07 July/Count Smaller elements/main.cpp
// Link: https://www.geeksforgeeks.org/problems/count-smaller-elements2214/1 #include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; class Solution { public: vector<int> constructLowerArray(vector<int> &arr) { vector<int> ans; int n = arr.size(); ...
ALGO
0.999949
5.866792
c5e51d3e-8afc-4969-bee2-3cade4d3302e
joncampbell123/openwatcom-hackipedia
bld/plustest/regress/stl.94/examples/minelem1.cpp
// This example compiles using the new STL<ToolKit> from ObjectSpace, Inc. // STL<ToolKit> is the EASIEST to use STL that works on most platform/compiler // combinations, including cfront, Borland, Visual C++, C Set++, ObjectCenter, // and the latest Sun & HP compilers. Read the README.STL file in this // directory ...
ALGO
0.999105
4.238711
6d56623c-4b0a-4f8b-b38a-584766e25917
tech-in-tech/codeforcesQuestion
squarePool.cpp
#include <iostream> using namespace std; void solve() { int n, s; cin >> n >> s; int cnt = 0; for (int i = 0; i < n; i++) { int d1, d2, x, y; cin >> d1 >> d2 >> x >> y; if (x == y && d1 == d2) cnt++; if (x + y == s && d1 != d2) cnt++; } cout << cnt << "\n"; } int main() { int...
ALGO
0.999024
3.993352
6a44933e-ec1a-4627-a37d-fda21baf459e
isaaclo97/programacion-competitiva
Problemas/UVA/750.cpp
#include <bits/stdc++.h> using namespace std; int col[9], cases, a, b, cnt; bool place(int Q, int row){ for(int ant = 1; ant < Q ; ant++) if(col[ant] == row || (abs(col[ant] - row) == abs(ant - Q))) return false; return true; } void solve(int Q) { for(int row = 1; row <= 8; row++) ...
ALGO
0.999875
3.717641
836c355c-8fac-4ce7-91e5-b814f0b41273
ldacruz1/C-Exercises
Exercises/exponentialModel.cpp
#include <iostream> #include <cmath> using namespace std; int main() { // declare and initialize variables to hold user information int userAge = 0, userHours = 0; double userPayRate = 0.0; // prompt the user for their age cout << "How old are you? " << endl; // write cin statement below cin >...
ALGO
0.962239
3.200792
b35bd0b6-63ff-431e-be87-e27c94bcc6bd
YellowWang/UVa
uva 532/uva 532.cpp
// uva 532 // 3Dͼbfs㷨 #include <stdio.h> #include <stdlib.h> #include <iostream> #include <fstream> #include <memory.h> #include <deque> using namespace std; #define len 31 char d[len][len][len]; int g[len][len][len]; int bfs(int x1, int y1, int z1, int x2, int y2, int z2); int main() { //freopen("1.txt", "r", s...
ALGO
0.999877
3.131462
d52f8060-96de-4406-91a7-e8a8d4ea378f
pawandev200/Leetcode_Dsa
2965-find-missing-and-repeated-values/2965-find-missing-and-repeated-values.cpp
class Solution { public: vector<int> findMissingAndRepeatedValues(vector<vector<int>>& grid) { int n = grid.size(); unordered_set<int>st; int a, b; for(int i=0; i<n; i++){ for(int j =0; j<n; j++){ if(st.find(grid[i][j])!=st.end()) a = grid[i][j]; ...
ALGO
0.999692
5.760358
b7db63e4-ddca-4bac-bf4e-1fb9ec2a3457
Vitoom/Cplusplus-code
atoi/atoi_2.cpp
#include <cstdio> #include <string> long long StrToIntCore(const char* digit, bool minus); enum Status {Valid = 0, Invalid}; int g_nStatus = Invalid; int StrToInt(const char* str) { g_nStatus = Invalid; long long num = 0; if(str != NULL && *str != '\0') { bool minus = false; if(*str ...
ALGO
0.998769
4.072736
95bbb6fb-97db-4791-9b22-61eab30ff80b
mvancompernolle/ai_project
data/triggeredswapexercise.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <ql/models/marketmodels/callability/triggeredswapexercise.hpp> #include <ql/models/marketmodels/curvestate.hpp> #include <ql/models/marketmodels/utilities.hpp> namespace QuantLib { TriggeredSwapExercise::TriggeredSwapExercis...
TOOL
0.984404
7.504571
cc3b21c0-6c4f-48e4-8c22-227de14024cc
ishandutta2007/codeforces
zhylj/normal/1336/C.cpp
#include <bits/stdc++.h> template <typename T> inline void rd(T& x) { int si = 1; char c = getchar(); x = 0; while(!isdigit(c)) si = c == '-' ? -1 : si, c = getchar(); while(isdigit(c)) x = x * 10 + c - 48, c = getchar(); x *= si; } template <typename T, typename... Args> inline void rd(T& x, Args&... args) { rd(x...
ALGO
0.999996
4.922964
8f2747c3-9b2a-4954-bb9d-7c8d4aa7075b
shadaashraf/ITI_Automotive_-Andriod
Cpp/tasks/task3/DesignParking_LeetCode.cpp
class ParkingSystem { private: int Big; int Meduim; int Small ; public: ParkingSystem(int big, int medium, int small) : Big(big),Meduim(medium),Small(small){ } bool addCar(int carType) { bool flag; switch(carType){ case 1: if(Big==0){ ...
ALGO
0.989478
5.810446