uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
27f5164c-73cd-4825-925d-08c76468634e
geoLAMMPS/geoLAMMPS
src/random_mars.cpp
// clang-format off // Marsaglia random number generator // see RANMAR in F James, Comp Phys Comm, 60, 329 (1990) #include "random_mars.h" #include <cmath> #include <cstring> #include "error.h" #include "math_const.h" using namespace LAMMPS_NS; enum{ADD,SUBTRACT}; /* -----------------------------------------------...
ALGO
0.998376
6.972191
556b094f-e61a-4db8-af72-7d5ae4af921c
SHalawi-Dev/Data-Structures-And-Algorithms
Algorithmic Toolbox/week4_divide_and_conquer/6_closest_points/closest.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <iomanip> #include <vector> #include <string> #include <cmath> using std::vector; using std::string; using std::pair; using std::min; double minimal_distance(vector<int> x, vector<int> y) { //write your code here return 0.; } int main() { siz...
ALGO
0.999875
3.942443
a3774673-9e3c-4cea-9905-5b3ab3da20b6
Somnath-Chattaraj/Cpp
2May2024(CF-DIV-993)/Problem_D.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int main() { int t; cin >> t; while (t--) { int n,k,Pb,Ps; cin >> n>> k>> Pb>> Ps; vector <int> p(n,0); vector <int> a(n,0); for (int i=0; i<n; i++) { cin >...
ALGO
0.999794
3.615436
feb479f1-bfed-4911-88ba-0e0b4f049640
jadhavhninad/Cpp_AI
hackerrank_ai_bot_two_locate_princess.cpp
#include <iostream> #include <vector> using namespace std; /* * Since only one move cal be made at a time, select a single move, remove loop. The program calls the function in a loop. * */ void nextMove(int n, int r, int c, vector <string> grid){ int me_x = r, me_y=c, princess_x, princess_y; for(i...
ALGO
0.999938
3.397747
08613b56-7bb3-48ca-a1a3-dca9dd58e3de
Mohith8861/Leetcode-Solutions
Valid Parenthesis String/Valid Parenthesis String.cpp
// https://leetcode.com/problems/valid-parenthesis-string class Solution { public: bool solve(string& s, int i, int l, vector<vector<int>>& dp) { if(i == s.length()) { if(l == 0) return true; return false; } if(l<0) { retu...
ALGO
0.999788
6.1032
4b1453ff-7308-488b-83b6-dc4bd218919f
LazuliJ/SSAFY_practice
BAEKJOON/BAEKJOON_11052.cpp
#include <iostream> #include <algorithm> using namespace std; typedef long long ll; // 백준 11052번 카드 구매하기 - DP int N; ll P[1001] = { 0, }; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cin >> N; for (int n = 1; n <= N; n++) { cin >> P[n]; for (int i = 0; i <= n; i++) { int j = n - i; P[n...
ALGO
0.999898
4.099317
69b23c6b-d44b-428e-911b-aad1651f3911
ashokabairwaideology/Leet-code-problem
solution/0400-0499/0499.The Maze III/Solution.cpp
class Solution { public: string findShortestWay(vector<vector<int>>& maze, vector<int>& ball, vector<int>& hole) { int m = maze.size(); int n = maze[0].size(); int r = ball[0], c = ball[1]; int rh = hole[0], ch = hole[1]; queue<pair<int, int>> q; q.push({r, c}); ...
ALGO
0.999997
5.840218
7ac110b2-1971-409a-9621-44a3f5a19074
vfolunin/archives-solutions
SPOJ/kvar.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; void solve() { int size; cin >> size; vector<int> a(size); for (int &value : a) cin >> value; int inversionCount = 0; for (int i = 0; i < a.size(); i++) ...
ALGO
0.999983
3.960845
8877f14b-23d5-45ed-bec5-2dff17d54337
ParasAnxi/DSA-Practice
Lec073 Binary Search Tree 5/Largest_BST.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class TreeNode { public : T data; TreeNode<T> *left; TreeNode<T> *right; TreeNode(T data) { this -> data = data; left = NULL; right = NULL; } ~TreeNo...
ALGO
0.999906
6.250191
7d84b2e2-40c0-4c5a-8573-12f5a19a55cf
facebookarchive/clangir
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
#include "llvm/ADT/APInt.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/ISDOpcodes.h" #include "llvm/CodeGen/MachineMemOperand.h" #include "llvm/CodeGen/SelectionDAG.h" #include "llvm/CodeGen/SelectionDAGNodes.h" #include "llvm/CodeGen/TargetLowering.h" #include "llvm/CodeGen...
ALGO
0.952273
7.693847
8d75d007-5f0d-4b2c-859e-c4e02325bb9d
yuanyunzhe/PCFG-Parser
include/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); m << 1,-2, -3,4; cout << "1-norm(m) = " << m.cwiseAbs().colwise().sum().maxCoeff() << " == " << m.colwise().lpNorm<1>().maxCoeff() << endl; cout << "infty-norm(m...
ALGO
0.999812
4.092055
8b118a5a-5f68-475f-a4aa-76081dac890b
mattoverby/admm-elastic
deps/Eigen3/doc/examples/QuickStart_example2_fixed.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { Matrix3d m = Matrix3d::Random(); m = (m + Matrix3d::Constant(1.2)) * 50; cout << "m =" << endl << m << endl; Vector3d v(1,2,3); cout << "m * v =" << endl << m * v << endl; }
ALGO
0.998262
3.387763
efe5f4a2-4a83-4ab8-869c-a9c0263602b7
yingziyu-llt/program_in_univ
intro_of_comp/9.27/15.cpp
#include<stdio.h> #include<algorithm> #include<string.h> #include<math.h> using namespace std; int a[2][13] = {{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}}; char s[7][100] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" , "Saturday"}; int gety(int &t) { int y400...
ALGO
0.999677
3.311379
5b65a6ed-5834-495e-85f4-eba90010c950
tongzhou80/LLVM-helloworld
llvm/lib/CodeGen/MachineInstrBundle.cpp
#include "llvm/CodeGen/MachineInstrBundle.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/Passes.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #incl...
TOOL
0.865993
7.926308
60dbc420-a1f7-4895-80a8-311c0830644a
zou-song/leetcode
src/lc832/lc832.cpp
#include "lc.h" class Solution { public: vector<vector<int>> flipAndInvertImage(vector<vector<int>>& A) { for (auto &vec : A) { size_t len = A.size(); size_t i = 0; for ( ; i < len / 2; ++i) { int left = vec[i]; int rig...
ALGO
0.999825
5.665242
e5751348-d713-41b9-bcb9-29a7f153a74c
1358snowywolf/Coding4
IEHOVA/src/IEHOVA.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<char>> stones; pair<int, int> start; set<char> use; bool clear = false; void DFS(vector<string> path, set<pair<int, int>> visited, int i, int j){ if(clear) return; if(i < 0 || i >= (int) stones.size()) return; if(j < 0 || j >= (int) stones[0].size()) retu...
ALGO
0.999699
3.959118
742fd198-b7d3-4660-a29e-3121e4c7ae9b
ningning772669569/algorithm
HDU1071.cpp
#include "cstdio" #include "cstring" #include "iostream" #include "algorithm" using namespace std; double x1,y1,x2,y2,x3,y3; double geta() { return (y2-y1)/((x2-x1)*(x2-x1)); } int main () { int T; scanf("%d",&T); for(int t=1;t<=T;t++){ scanf("%lf%lf%lf%lf%lf%lf",&x1,&y1,&x2,&y2,&x3,&y3); ...
ALGO
0.9991
3.916574
3332bfab-9e49-4dea-b00a-17e2da9c75bb
shivdevop/Coding-questions
number-of-enclaves/number-of-enclaves.cpp
class Solution { public: void dfs(int row,int col,vector<vector<int>> &visited,vector<vector<int>> &grid,int dr[], int dc[], int m ,int n ) { visited[row][col]=1; for(int i=0;i<4;i++) { int nrow =row+dr[i]; int ncol= col+dc[i]; if(nrow>=0 && nrow<m && ncol>=0 && ncol<...
ALGO
0.999992
6.233935
f14ae37c-1a92-4bbb-b679-5ae01d13256c
Kojiro-Obayahsi/ardupilot_altholdrate
libraries/AP_HAL_SITL/DSP.cpp
#include <AP_HAL/AP_HAL.h> #include "AP_HAL_SITL.h" #include <AP_Math/AP_Math.h> #include <GCS_MAVLink/GCS.h> #include "DSP.h" #include <cmath> #include <assert.h> using namespace HALSITL; extern const AP_HAL::HAL& hal; // The algorithms originally came from betaflight but are now substantially modified based on th...
ALGO
0.998093
5.978951
0759a3bb-ca50-4e62-9da3-83f28df47465
Talk2dilshad/c-code
linklist/daigonal_Matrix.cpp
#include <iostream> using namespace std; class daigonal_Matrix { private: int *A; int n; public: daigonal_Matrix() { n=2; A=new int[2]; } daigonal_Matrix(int n) { this->n=n; A=new int[2]; } ~daigonal_Matrix() { delete []A; } void S...
ALGO
0.998594
3.487401
337ff691-dde0-4f8c-bc42-d90c02f6b653
idontsmileinpublic/kpilabs2
CHM/Lab3/Lab3/functions.cpp
#include <iostream> #include <iomanip> #include "functions.h" using namespace std; double** createMatrix(int size) { double** matrix = new double* [size]; for (int i = 0; i < size; i++) { matrix[i] = new double[size]; } return matrix; } double* createVec(int size) { double* vector = n...
ALGO
0.999908
3.110783
9b7d5f0b-90bc-4886-ba51-52b1ee258407
Oviquitor/ProjetosDiversos-FlutterApps
secao13/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.998191
6.783439
04899542-ae32-4561-afdf-7ee55c5bc38c
latonis/adventofcode2024
day14/solution.cpp
#include "../utils/utils.h" struct Robot { int x; int y; int v_x; int v_y; int max_x = 101; int max_y = 103; void advance() { x = (((x + v_x) % max_x) + max_x) % max_x; y = (((y + v_y) % max_y) + max_y) % max_y; } void print_loc() { std::cout << std::format("{}, ...
ALGO
0.999838
5.295339
3d478176-a446-4b57-bfb8-d2c121bbe55a
Hour-123/THUEE-OS
ex_3/multiProcess_quickSort.cpp
#include <windows.h> #include <iostream> #include <fstream> #include <vector> #include <cstdlib> #include <ctime> #include <string> #include <algorithm> #include <thread> #include <mutex> #include <condition_variable> using namespace std; const int DATA_SIZE = 100000; // 可调整 const int THRESHOLD = 1000; const int MAX_B...
ALGO
0.998297
4.153442
4d350b9f-ee15-4684-acfd-8acf8d276a70
demon90s/CppStudy
codes/CppPrimer/ch10_Generic_Algorithms/exercise_10_25.cpp
// 练习10.25:在10.3.2节(第349页)的练习中,编写了一个使用partition的biggies // 版本。使用check_size和bind重写此函数。 #include <iostream> #include <vector> #include <string> #include <algorithm> #include <functional> using namespace std; using namespace std::placeholders; bool check_size(const string &s, string::size_type sz) { return s.size() >=...
ALGO
0.995268
5.21169
05e75df3-3454-4348-9282-2ef5cd7d0b09
ohinhyuk/2023_Winter_PPS_Project
Week4/A060_오인혁_20230119.cpp
class Solution { public: int calPoints(vector<string>& ops) { vector<int> v; for(int i = 0 ; i <ops.size() ; ++i){ if(ops[i] == "C"){ v.pop_back(); } else if(ops[i] == "D"){ v.push_back(v.back() * 2); ...
ALGO
0.999882
6.311469
e8a8b529-a62d-411c-a2fd-452bb20c710b
ishandutta2007/codeforces
akulyat/normal/1133/D.cpp
#include <bits/stdc++.h> using namespace std; #define F first #define S second typedef long long ll; typedef long double ld; typedef pair <ll, ll> pll; ifstream in; ofstream out; const long long kk=1000; const long long ml=kk*kk; const long long mod=ml*kk+7; const long long inf=ml*ml*ml+7; const ld eps=1e-12; ll...
ALGO
0.999956
3.299939
5025b723-a0fb-47a5-9301-b5e2452521c3
schwadri/granular
information/physics engines/bullet/bullet-2.80-rev2531/Extras/sph/common/vector.cpp
#include "vector.h" #include "matrix.h" Vector3DF &Vector3DF::operator*= (const MatrixF &op) { double *m = op.GetDataF (); double xa, ya, za; xa = x * (*m++); ya = x * (*m++); za = x * (*m++); m++; xa += y * (*m++); ya += y * (*m++); za += y * (*m++); m++; xa += z * (*m++); ya += z * (*m++); za += z * (*m++); m++...
TOOL
0.864994
4.709966
0032de49-abd6-447b-be45-3d561e86c29b
quandquang1312/red_training_exercise
dp/UVA-12955.cpp
// https://vjudge.net/problem/UVA-12955 #include <bits/stdc++.h> using namespace std; #define int long long #define INF 1e9 const int MAXN = 2*1e4+5; int factorial[9]; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); #ifdef LOCAL freopen("in.txt", "r", std...
ALGO
0.999807
4.054354
68ea561a-9d41-4ec8-be65-4f0045b07d8e
mahfuz1703/Competitive-Programming-Beginner-To-Advanced
two pointer/problem2.cpp
/// Find the pair in Array Whose sum is closest to X #include <bits/stdc++.h> using namespace std; int main(){ int n; cin>> n; vector <int> v(n); for(int i = 0; i < n; i++) cin >> v[i]; int x; cin >> x; int idx1 = 0, idx2 = 0; int i = 0, j = n-1, diff = INT_MAX; while(i < j){ int ...
ALGO
0.999993
4.828698
2a3f3d70-8de8-4e90-bd20-5a65471a6a14
softwareclub/DeerCoders
DeerCoders Season 1/Session 1/RishavBhurtel_0307.cpp
#include<stdio.h> int main() { int num,num1,num2,sum; //num is the required number where num1 and num2 are the part of num for(num=0;num<99;num++) { num1=num/10; num2=num%10; sum=num1+num2; if(num2+4 == num1 && (float)num/(float)sum == 7) { printf(" The number is %d ",num); } } ...
ALGO
0.999028
3.28558
045261e6-1054-45ba-b9b1-af623b20ae98
CodeWilliamT/MyAlgorithms
C++_Algorithm/LeetCodeDemo/LeetCodeDemo/0019.cpp
struct ListNode { int val; ListNode* next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode* next) : val(x), next(next) {} }; //双指针 class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) { ListNode* cur=head,*pretarget=cur; int id...
ALGO
0.999993
5.416681
c526f706-2c5e-40e2-bbdb-801b53d7a771
CodeBySushant/SolvedLeetcode
leetcode-main/leetcode-main/solution/2300-2399/2338.Count the Number of Ideal Arrays/Solution2.cpp
using ll = long long; class Solution { public: const int mod = 1e9 + 7; int idealArrays(int n, int maxValue) { vector<vector<int>> c(n, vector<int>(16)); for (int i = 0; i < n; ++i) for (int j = 0; j <= i && j < 16; ++j) c[i][j] = j == 0 ? 1 : (c[i - 1][j] + c[i - 1...
ALGO
0.999959
5.433929
3910f9e3-6a9d-4525-8a73-10cd93973458
AAYUSHAIRAN/LeetCode
best-team-with-no-conflicts.cpp
vector<pair<int, int>> vect; vector<int> vect1; int n; vector<vector<int>> dp; bool sortcol(pair<int, int> &a, pair<int, int> &b){ if(a.second < b.second) return true; else if(a.second == b.second) return (a.first < b.first); return false; } int rec(int level, int index){ if(level == n) ...
ALGO
0.999952
5.698592
452c9915-d30c-4f9b-a2ca-162832b8237e
jun23314/Baekjoon
SWEA/D3/1208. [S/W 문제해결 기본] 1일차 - Flatten/[S/W 문제해결 기본] 1일차 - Flatten.cpp
#include<iostream> #include <algorithm> #include <vector> using namespace std; int main(int argc, char** argv) { int test_case; for(test_case = 1; test_case <= 10; ++test_case) { int dump; cin >> dump; vector<int> arr; for(int i = 0; i < 100; ++i){ int num; ...
ALGO
0.998012
3.313041
edfbbda9-ca07-4b35-9bf0-1ea31a02888e
raincross7/code-similarity
codes/train_code/problem145/problem145_87.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using vi = vector<int>; #define _GLIBCXX_DEBUG #define acc_io cin.tie(0);ios::sync_with_stdio(false) #define all(x) x.begin(),x.end() #define rep(i,sta,end) for(ll i=sta;i<end;++i) #define lcm(a,b) (a)/__gcd((a),(b))*(b) #defin...
ALGO
0.999811
4.479946
b312c751-139b-4b4d-b8e4-2ca83c71bd03
trinhminhtriet/leetcode
solutions/2200-2299/2259.remove-digit-from-number-to-maximize-result/Solution2.cpp
class Solution { public: string removeDigit(string number, char digit) { int n = number.size(); int last = -1; for (int i = 0; i < n; ++i) { char d = number[i]; if (d == digit) { last = i; if (i + 1 < n && number[i] < number[i + 1]) { ...
ALGO
0.999939
6.599213
657b8380-ff54-42c6-a8dc-b9faafe034dc
anikruhan7/Algorithm-LabWork
LabWork-1/deleteindex.cpp
#include<iostream> using namespace std; int *addBegining(int *a,int n,int num){ int *b=new int[n+1]; b[0]=num; for(int i=0;i<n;i++){ b[i+1]=a[i]; } return b; } int searchindex(int *a,int n,int num){ for(int i=0;i<n;i++){ if(num==a[i]){ return i; }} return -1; } int *d...
ALGO
0.999643
3.52449
da8232b0-9492-4e57-bc89-d887445d9998
alexandraback/datacollection
solutions_5648941810974720_1/C++/Reskip/源.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> #include<map> #include<set> #include<queue> #include<vector> #include<cstdio> #include<cmath> #include<cstring> using namespace std; int ans[10]; int data[30]; void get() { if (data['Z' - 'A']) { int temp = data['Z' - 'A']; ans[0] += temp;...
ALGO
0.99956
3.544441
93c2d13d-1e29-419c-8d82-7841abc38ef7
yad/easy-scriptdev2
scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp
/* ScriptData SDName: Boss_Chromaggus SD%Complete: 95 SDComment: Chromatic Mutation disabled due to lack of core support SDCategory: Blackwing Lair EndScriptData */ #include "precompiled.h" #include "blackwing_lair.h" enum { EMOTE_GENERIC_FRENZY_KILL = -1000001, EMOTE_SHIMMER = -1469003, ...
TOOL
0.879289
6.456297
4e4f914b-21c4-49b8-bfa8-8300370700b7
Edechkin/ohjelmointi-2
student/03/lotto/main.cpp
#include <iostream> using namespace std; unsigned long int kertoma(unsigned long int luku){ unsigned long int summa = 1; unsigned long int luku2 = luku; while (luku2 > 1){ summa *= luku2; --luku2; } return summa; } int main() { unsigned long int odd; int total; int dra...
ALGO
0.998587
4.896658
a7cf8c90-327e-4bb5-88fc-76c76a117eab
uchajk/imageProcessing
hw2/HW_convolve.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // HW_convolve: // // Convolve I1 with filter kernel in Ikernel. // Output is in I2. // void HW_convolve(ImagePtr I1, ImagePtr Ikernel, ImagePtr I2) { IP_copyImageHeader(I1,I2); //create vars for kernel int wk = Ikernel->width(); int ...
ALGO
0.956498
4.309651
8a36e220-7e53-477c-bd5e-af25d0cc2274
peiart99/graph-coloring
GraphColoring.cpp
// // Created by Artur on 27.04.2022. // #include "GraphColoring.h" int countUniqueColors(const Graph &graph) { std::unordered_set<int> unique_colors; for(const auto &vx : graph.vertices) { if(vx.getColor() != 0) unique_colors.insert(vx.getColor()); } return unique_colors.size(...
ALGO
0.98991
6.462413
dca20014-9dfa-469a-a9d6-b2e71a0f666b
mahtab04/Cpp-Programs
CodeChef/TWOVSTEN.cpp
//Problem Link -> https://www.codechef.com/problems/TWOVSTEN #include <iostream> using namespace std; int main() { // your code goes here int t; cin >> t; while (t--) { long long int a; cin >> a; if (a % 10 == 0) { cout << "0" << endl; } else if (a % 5 == 0) { cout <<...
ALGO
0.999811
4.909771
9fb2856c-e8be-435f-b103-73dd3ada4a5c
KEY60228/paiza_learning
src/b_rank_level_up/tic_tac_toe_1/main.cpp
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; char flg = 'D'; for (int i = 0; i < s.length(); i++) { if (s[i] == 'O') { if (find(s.begin(), s.end(), 'X') == s.end() && find(s.begin(), s.end(), '.') == s.end()) { flg = '...
ALGO
0.999545
3.781692
98e68af2-2d0f-43f4-8f6b-66d13f83d0a4
bansal-samarth/Daily-Dose-Of-DSA
Difficulty: Medium/Sum of nodes on the longest path/sum-of-nodes-on-the-longest-path.cpp
/* class Node { public: int data; Node *left; Node *right; Node(int x) { data = x; left = NULL; right = NULL; } }; */ class Solution { public: void solve(Node* root, unordered_map<int,int>& map, int sum, int lvl) { if(!root) return; sum += r...
ALGO
0.999951
5.548177
e5fb332b-9754-41ed-ba56-981f9c486af1
TayabAmir/LeetCode_Problems
0653-two-sum-iv-input-is-a-bst/0653-two-sum-iv-input-is-a-bst.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.999976
6.155631
98f6adeb-263d-4d20-abf0-a5e5bcc1acc2
kinetiknz/gecko
ipc/mscom/Registration.cpp
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ // COM registration data structures are built with C code, so we need to // simulate that in our C++ code by defining CINTERFACE before including // anything else that could possibly pull in Windows...
TOOL
0.884585
5.702821
e1f69fd6-be4a-45ad-9fcf-49a87929a000
Aty-0/S2DE
Libs/boost_1_76_0/libs/polygon/benchmark/voronoi_benchmark.cpp
// Boost.Polygon library voronoi_benchmark.cpp file // See http://www.boost.org for updates, documentation, and revision history. #include <algorithm> #include <iomanip> #include <iostream> #include <fstream> #include <list> #include <numeric> #include <vector> #define BOOST_TEST_MODULE benchmark_test #include <boos...
TEST
0.914094
7.067715
ba74bf5d-d4bc-4022-92dd-f6c12ee99604
sharon-wang/omr-eb2018
compiler/il/OMRTreeTop.cpp
#include "compiler/il/OMRTreeTop.hpp" #include <stddef.h> // for NULL, size_t #include <stdint.h> // for int32_t #include "codegen/CodeGenerator.hpp" // for CodeGenerator #include "compile/Compilation.hpp" // for Compilation #include "compile/...
ALGO
0.854218
5.19652
026efe9e-f607-441b-9ecc-32f25a9b691e
Mohamedkhaled15/Zahra_GP
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.99887
6.783439
6131fd67-18f2-445f-897f-3aa19715c6cc
nikita-1910/DSA-450
sum_of_nodes_on_longest_path_from_root_to_leaf_node.cpp
//Sum of node on the longest path from root to leaf node #include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node *left, *right; }; Node *newNode(int x){ Node* temp=new Node; temp->data=x; temp->left=NULL; temp->right=NULL; return temp; } void sum(Node* root, in...
ALGO
0.999971
4.854671
8df79daa-ad09-4f8b-bd0d-ad34c397b7b3
ishandutta2007/codeforces
daas/normal/1141/E.cpp
#include<iostream> #include<cstdlib> #include<cstdio> #include<cmath> #include<iomanip> #include<cstring> #include<algorithm> #include<ctime> #define ll long long using namespace std; inline ll read() { ll kkk=0,x=1; char c=getchar(); while((c<'0' || c>'9') && c!='-') c=getchar(); if(c=='-') ...
ALGO
0.999989
3.259379
0de80c7f-b42c-40b9-82ff-fbd435f1f9e0
ashishpandey2600/Lab9
QA1.cpp
//1. Write a program to find K’th smallest and K’th largest element in unsorted array. // Sample Test case1: Input: // A[]=4, 5, 60, 70, 33, 44 K=2 // Output: 2nd smallest number is 5 and 2nd largest number is 60 // Sample Test case2: Input: // A[]=2, 46, 56, 68, 3, 34, 489, 457, 4545, 100 K=5 // Output: 5th smallest n...
ALGO
0.999614
3.502871
61c4990d-e51c-4a59-be54-26e6ef9b4547
NikitaNikson/soc_engine_fixed
SDK/boost_1_30_0/libs/graph/example/sloan_ordering.cpp
#include <boost/config.hpp> #include <vector> #include <iostream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/sloan_ordering.hpp> #include <boost/graph/properties.hpp> #include <boost/graph/bandwidth.hpp> #include <boost/graph/profile.hpp> #include <boost/graph/wavefront.hpp> using std::cout; using...
ALGO
0.999946
6.216643
032e1c63-1153-435c-850b-680643c0e871
vstevanoska/rand_search
source/Schwefel.cpp
#define _USE_MATH_DEFINES #include "../header/Schwefel.h" #include <vector> #include <cstdlib> #include <math.h> Schwefel::Schwefel() { lowerCon = -500.0; upperCon = 500.0; } double Schwefel::findSolution(int dimension) { //generate vector of random float values within the constrained space vector<...
ALGO
0.999944
4.256016
2fcb42e4-5e48-46dc-a1b4-457a35939dbb
StyNW7/Algorena_TECHNO2024
Solutions/Solution Elimination Round/1_D_kokomelon.cpp
#include <stdio.h> #include <string.h> int main(){ char str[101]; scanf("%s", str); for(int i = 0; i < strlen(str); i++){ if(str[i] == 'k') str[i] = 'c'; } printf("%s\n", str); return 0; }
ALGO
0.999508
3.13022
2db12410-c6e9-461f-b479-c23925cca3d9
nolan0801/Competitive-Programming
VNOJ/chuyenNguyenHue/cdiv.cpp
/* link problem: https://oj.vnoi.info/problem/cdiv/rank/ Author : vidut_206_CNH */ #include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define pb push_back #define fast_cin() ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define INF 2e18 typedef pair<int,int> pi...
ALGO
0.999474
3.53558
fbd656e5-251c-4e64-a6b0-73b01de4763a
will-bei/NBodyCUDA
Host-Side Implementation/HostSideNBody3.cpp
#include <cstdlib> #include <fstream> #include <iostream> #include <chrono> #include <cmath> #include <ctime> #include <random> #include <time.h> #include "HelperFunctions.h" const unsigned int SEED_VALUE = 2024; const bool DRY_RUN = false; //number of cycles done for the simulation const int NUMBEROFCYCLES = 1000; ...
ALGO
0.964315
4.868407
3833958e-4bf7-4e30-826c-02023ff28cc5
moinulislamsajid/Advance-C-Plus-Plus
exance.cpp
#include<iostream> using namespace std; void permutation(string s,string ans) { if(s.length()==0) { cout<<ans<<endl; return; } for(int i=0;i<s.length();i++) { char ch = s[i]; string ros = s.substr(0,i)+s.substr(i+1); permutation(ros,ans+ch); } } //string r...
ALGO
0.999966
4.418323
d41bc5fa-779f-491a-b917-0d0a1ba5c475
yinyang417/cpp
vector/vector.cpp
#include"vector.h" #include<iostream> #include<cmath> using namespace std; #define SIZE 16 template<class T> Vector<T>::Vector(int n) :dimension(n), size(n + SIZE), data(NULL)//캯 { if (size > 0) { data = new T[size]; } } template<class T> Vector<T>::Vector(const Vector<T>& v) :data(NULL), size(0)//ƹ캯 { data = ...
ALGO
0.998598
3.013522
277c3e1e-320d-4da0-b869-2f83c32b1872
AhmedKhaledAK/problem-solving-training
leetcode/Find All Groups of Farmland.cpp
class Solution { vector<vector<int>> ans; pair<int, int> rightMost; public: vector<vector<int>> findFarmland(vector<vector<int>>& land) { int H = land.size(); int W = land[0].size(); for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { if (land[i][j...
ALGO
0.999887
5.89109
e03e86b9-7b74-40db-9fdc-c4ef66477ef7
Ritax2003/Placement-Code-Practice
EY/17.Top K Frequent in Array.cpp
/* Given a non-empty array arr[] of integers, find the top k elements which have the highest frequency in the array. If two numbers have the same frequencies, then the larger number should be given more preference. Examples: Input: arr[] = [3, 1, 4, 4, 5, 2, 6, 1], k = 2 Output: [4, 1] Explanation: Frequency of 4 = 2...
ALGO
0.999974
5.986442
a28e7520-77a9-4507-b787-0d8a0ee397eb
wu-qing-157/Aerial-Ace
Training/0907/F.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <vector> #define maxn 1000010 char _S[1 << 25], *_T = _S; inline int F() { int cnt = 0; char ch; while (ch = *_T++, ch < '0' || ch > '9') ; cnt = ch - '0'; while (ch = *_T++, ch >= '0' && ch <= '9') cnt = cnt * 10 + ch - '0'; return cnt; } typedef...
ALGO
0.999564
3.550731
614c0301-1018-46ef-8f99-e83aacdda86b
hjiang13/LLMs-in-IR
POJ-104/99/2756.cpp
#include <iostream> using namespace std; int main(){ int n,a[100]={ 0} ,i; double x1=0.0,x2=0.0,x3=0.0,x4=0.0; double c1,c2,c3,c4; cin >> "%d",&n); for(i=0; i<n; i++){ cin >> "%d",&a[i]); } for(i=0; i<n; i++){ if(a[i]>60) x4++; else if(a[i]>35) x3++; else if(a[i]>18) x2++; else x1++; } c1=(x1/n)*100; c2=(x2/n)*100; c3=...
ALGO
0.996534
3.059243
af39fe11-58e1-4ad7-bc11-fa7170761f77
ssavi-ict/UVa-Online-Judge
UVa - 10044 - Erdos Number.cpp
#include<bits/stdc++.h> using namespace std; int main() { int test; scanf("%d",&test); for(int caseno = 1; caseno<=test; caseno++) { map<string, int>mymap; mymap.clear(); string s, now; int n, p; for(int i=0; i<n; i++) { getline(cin,s); ...
ALGO
0.970226
3.637696
8174a95b-871a-4099-8c51-17db0de4b6a1
csis2020/leetcode-study-2022
HansolYang/2022-07-29-Rotate-Image.cpp
class Solution { public: void rotate(vector<vector<int>>& matrix) { if (matrix.size() <= 1) { return; } int n = matrix.size() - 1; vector<vector<int>> temp = matrix; for (int i = 0; i <= n; i++) { for (int j = 0; j <= n; j++)...
ALGO
0.999962
6.883553
b2721727-7ff7-456a-8e1a-ee7a3006f33f
h4midf/NU-ZSIM
zsim-ramulator/pin/extras/xed-intel64/examples/xed-enc-lang.cpp
/// @file xed-enc-lang.cpp // This is an example of how to use the encoder from scratch in the context // of parsing a string from the command line. #include <iostream> #include <iomanip> #include <vector> #include <sstream> #include <cassert> #include <cstring> #include <cstdlib> extern "C" { #include "xed-interface...
TOOL
0.94188
5.618738
048f7746-5611-47d9-a7c4-67832f9a496c
XoDeR/AlgoRecapCpp11
04.Trees.Graphs/04-05-ValidateBst/04-05-ValidateBst.cpp
#include <string> #include <iostream> #include <vector> #include <algorithm> #include <limits> using std::string; using std::vector; using std::cout; using std::cin; class TreeNode { public: TreeNode* left = nullptr; TreeNode* right = nullptr; int val = -1; TreeNode(int val) { this->val = val; } }; bool valid...
ALGO
0.999843
4.895109
ab888526-6daa-4824-810f-60a0e89c98a6
SiddharthJoy/Leetcode-Practice
19-remove-nth-node-from-end-of-list/19-remove-nth-node-from-end-of-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { int k; void remove(ListNo...
ALGO
0.999949
5.893405
6c3d3021-47b3-4274-ba2e-32f6c5050b49
sahib-pratap-singh/Love-babbar-DSA-sheet-solution
1. Array/2. find-minimum-and-maximum-element-in-an-array/find-minimum-and-maximum-element-in-an-array.cpp
//Sorting //Time complexity: O(Nlog(n)) //Space complexity: O(1) pair<long long, long long> getMinMax(long long a[], int n) { sort(a,a+n); return {a[0],a[n-1]}; } //Simple Iteration with two variable //Time complexity: O(N) //Space complexity: O(1) pair<long long, long long> getMinMax(long long a[], int n) { ...
ALGO
0.999793
4.928746
0444def0-f456-4674-b254-ac96533f0eb9
Ujjwal92425/C-and-DSA
QuickSORT.cpp
#include <iostream> using namespace std; int partation(int A[],int lb,int ub) { int pivot = A[lb]; int start= lb; int end= ub; while (start <end) { while (A[start]<= pivot) { start++; } while (A[end] > pivot) { end--; } ...
ALGO
0.999952
5.024193
4a881aaa-f4c3-4bfb-a32a-1a189ae6a2c4
deviant7/SoC-CP
subsets_recursive.cpp
#include<iostream> #include<vector> using namespace std; vector<vector<int> >v; vector<int> dummy; int n; void gen_subsets(int k){ if(k==n){ v.push_back(dummy); return; } else{ gen_subsets(k+1); dummy.push_back(k); gen_subsets(k+1); dummy.pop_back(); } }...
ALGO
0.998879
4.400158
2a3dc766-aadb-4a14-917e-6b1bd1111de4
eJosR-Coding/Data-Structures-and-Algorithms-Practice
LinkedList/Single-LinkedList Excercises/Exercise2.cpp
#include <iostream> using namespace std; struct Node { int data; struct Node* next; }; struct Node* head; void Print(struct Node* head) { struct Node* temp = head; cout << "List:" << endl; while (temp != NULL) { cout << " " << temp->data; temp = temp->next; } cout << endl;...
ALGO
0.999741
4.911699
daf12f1a-9ad2-4170-8b6f-b3edac50036f
Redleaf23477/ojcodes
uva/10107.cpp
#include <bits/stdc++.h> using namespace std; using LL = long long int; int main() { ios::sync_with_stdio(false); cin.tie(); priority_queue<int, vector<int>, less<int>> lhs; priority_queue<int, vector<int>, greater<int>> rhs; int x; while (cin >> x) { lhs.emplace(x); while (lhs.siz...
ALGO
0.999923
4.190979
7d756fe1-58ce-4488-add0-937aa2f39d23
shahidul-brur/OnlineJudge-Solution
Codeforces/877_B - Nikita and string.cpp
/*=================================*\ Md. Shahidul Islam CSE, BRUR Rangpur, Bangladesh mail: <EMAIL> FB : fb.com/shahidul.brur Blog: shahidul-brur.blogspot.com \*=================================*/ #include<bits...
ALGO
0.999992
3.640316
d13dcdc3-fedd-4cf5-a73f-4ebc6062597c
Sabarish-2/Cpp_Assignment_Programs
2-QE.cpp
#include <iostream> #include <math.h> using namespace std; int main() { cout << "\nEnter the Value of X Squared : "; int a; cin >> a; cout << "Enter the Value of X : "; int b; cin >> b; cout << "Enter the Value of Number : "; int c; cin >> c; float determinant = (b *...
ALGO
0.999738
3.74488
5d2eb935-0223-494d-af36-ed1b36bacfa3
o-zhongchong/leetcode
Leetcode/2178.cpp
class Solution { public: vector<long long> maximumEvenSplit(long long finalSum) { if(finalSum & 1) return {}; vector<long long> ans; long long num = 2; while(finalSum > 0) { if(finalSum >= num) { ans.push_back(num); finalSum -= num; ...
ALGO
0.99993
5.088907
7ef31876-d320-4b29-af8f-ffa3ba1a8926
ruds18/DSA-Practice
Remove loop in Linked List - GFG/remove-loop-in-linked-list.cpp
//{ Driver Code Starts // driver code #include <iostream> using namespace std; struct Node { int data; Node* next; Node(int val) { data = val; next = NULL; } }; void loopHere(Node* head, Node* tail, int position) { if(position==0) return; Node* walk = head; f...
ALGO
0.99997
3.999513
1aa939c9-94d6-47a8-b3fc-47f5e51f9c6e
AV2409/DSA_Codes
DP/1D/3_max_sum_no_adj.cpp
#include <bits/stdc++.h> using namespace std; int f_rec(int i, vector<int> &arr) { if (i == 0) { return arr[0]; } int np = f_rec(i - 1, arr); int p = -1e9; if (i > 1) { p = arr[i] + f_rec(i - 2, arr); } return max(p, np); } int f(int i, vector<int> &arr, vector<int> ...
ALGO
0.999968
5.207505
4477d6d1-9ed4-40b0-9d6c-14c1d1acbe2b
tianbot/yy_drone
sim_drone/include/odeint-v2/libs/numeric/odeint/examples/generation_functions.cpp
#include <boost/array.hpp> #include <boost/numeric/odeint.hpp> typedef boost::array< double , 1 > state_type; using namespace boost::numeric::odeint; //[ generation_functions_own_steppers class custom_stepper { public: typedef double value_type; // ... }; class custom_controller { // ... }; class cus...
TOOL
0.867874
6.066683
5eea44f9-b90c-447a-8f57-2580b304c605
Amritapandey22/Daily-codes
134-gas-station/134-gas-station.cpp
class Solution { public: int canCompleteCircuit(vector<int> &gas, vector<int> &cost) { int start = gas.size()-1; int end = 0; int sum = gas[start] - cost[start]; while (start > end) { if (sum >= 0) { sum += gas[end] - cost[end]; ++end; } ...
ALGO
0.999996
5.930067
72349b6c-de8e-4977-ba3c-b7fafb5be7fc
Nguyen-Hoang-Thuan-OU/ky-thuat-lap-trinh-voi-cpp
bai-tap/bai-tap-thuc-hanh/BTH02/legacy-code/BTH02_BT11 (Tong cac gia tri cua 1 mang 1 chieu).cpp
// Tổng các giá trị của 1 mảng 1 chiều #include<iostream> using namespace std; const int MAX = 10; void nhapMang ( int a[], int n ) { for ( int i = 0; i < n; i++ ) { cout << "Phan tu thu a[" << i << "]= "; cin >> a[i]; } } void xuatMang ( int a[], int n ) { for ( int i = 0; i < n; i++...
ALGO
0.99823
3.670228
e806f523-0397-440e-98dd-aaac4dfb9334
Lch3181/String-Pairs
Strings Distance 1/Source.cpp
//Chin Ho Mitchell Lam //11/4/2019 #include<iostream> #include<fstream> #include<vector> #include<string> #include<map> #include<chrono> using namespace std; vector<string> ReadFile(string FileName); int main() { //check run time //auto start = std::chrono::high_resolution_clock::now(); //source data vector<stri...
ALGO
0.99928
4.381505
2ff2a337-cc1c-45c2-9bee-1037adabdd28
tak-ka3/rvv-llvm-project
llvm/lib/IR/InlineAsm.cpp
#include "llvm/IR/InlineAsm.h" #include "ConstantsContext.h" #include "LLVMContextImpl.h" #include "llvm/ADT/StringRef.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Value.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Compiler.h" #include <algorithm> #include <cass...
TOOL
0.894814
7.563084
238a1dcc-e64a-45e5-a961-942a2207a101
ComicAddict/blender
source/blender/freestyle/intern/view_map/OccluderSource.cpp
/** \file * \ingroup freestyle * \brief Class to define a cell grid surrounding the projected image of a scene */ #include <algorithm> #include "OccluderSource.h" #include "BLI_sys_types.h" #include "BKE_global.hh" namespace Freestyle { OccluderSource::OccluderSource(const GridHelpers::Transform &t, WingedEdge...
ALGO
0.953539
6.929182
652a7f27-2440-406e-a726-33ac488b4227
yonsei-hpcp/gcom
third-party/boost_1_86_0/libs/numeric/ublas/doc/samples/vector_binary_redux.cpp
#include <boost/numeric/ublas/vector.hpp> int main () { using namespace boost::numeric::ublas; vector<double> v1 (3), v2 (3); for (unsigned i = 0; i < (std::min) (v1.size (), v2.size ()); ++ i) v1 (i) = v2 (i) = i; std::cout << inner_prod (v1, v2) << std::endl; }
ALGO
0.997803
3.986133
e0ee73b6-0e4c-496f-bc54-e4cc49af6cc0
arnavbansal172/Programs
c/freecodecamp/19.GettingThingsOutOfFuntions/19.3ReturningFromFunctionsByValue/main.cpp
#include <iostream> int sum ( int a , int b){ int result = a + b; std::cout << "In : &result(int) : " << &result << std::endl; return result; } std::string add_strings(std::string str1, std::string str2){ std::string result = str1 + str2; std::cout << "In : &result(std::string) : " << &result << ...
ALGO
0.941738
5.048606
9c8f66ca-e35a-4acd-81ee-839ad0e74a63
soltani-ard/ui_challange
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
5aac6e7c-7576-4285-b0c3-f67605241a80
naimishvarsani/e_book_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.998733
6.76775
103d5093-8ab6-4fbd-8881-4a25581ad26e
boingboomtschak/cpsc-projects
cpsc1430/triangleTest/triangle.cpp
// triangle.cpp - Determines the type of triangle based on the three sides. // Returns the triangle type based on the length of the three sides: // 'e' : Equilateral triangle // 'i' : Isosceles triangle // 's' : Scalene triangle // 'n' : Not a triangle char triangleType(int side1, int side2, int side3) { // Check fo...
ALGO
0.942229
5.816388
882251b7-7393-454b-88c1-12eabf4eb606
HttoHu/cpp_acm_practice
紫书/第七章/The RotationGame.cpp
//抄一抄 #include <cstdio> #include <algorithm> using namespace std; int line[8][7] = { {0, 2, 6, 11, 15, 20, 22}, // A {1, 3, 8, 12, 17, 21, 23}, //B {10, 9, 8, 7, 6, 5, 4}, //C {19, 18, 17, 16, 15, 14, 13}, //D }; const int rev[8]={5,4,7,6,1,0,3,2}; const int center[8]={6,7,8,11,12,15,16,17}; int a[...
ALGO
0.999964
3.745841
3b6b9d59-4b56-44d8-99f3-292f315864a6
rturrado/the_modern_cpp_challenge
src/chapter_06_algorithms_and_data_structures/problem_048_most_frequent_element_in_a_range.cpp
#include "chapter_06_algorithms_and_data_structures/problem_048_most_frequent_element_in_a_range.h" #include <fmt/ostream.h> #include <fmt/ranges.h> #include <ostream> #include <vector> // The most frequent element in a range // // Write a function that, given a range, returns the most frequent element and the number...
ALGO
0.997805
5.946481
7b472124-a762-4afb-a290-221cc2803f27
martysai/source-code-summarization
transcoder/transcoder/data/evaluation/geeks_for_geeks_successful_test_scripts/cpp/PROGRAM_TO_FIND_REMAINDER_WITHOUT_USING_MODULO_OR_OPERATOR_2.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; int f_gold ( int num, int divisor ) { while ( num >= divisor ) num -= divisor; return num; } //TOFILL int main() { int n_success = 0; vector<int> p...
ALGO
0.990625
4.859864
34961db9-678d-47ed-b3b4-2761a31bab65
SarahLMelo/SeletivaMaratona2022
HomeworkSemana2/C.cpp
#include <bits/stdc++.h> using namespace std; #define ii pair<int, int> int binarySearch(int x, vector <ii> *v){ int l = 0, r = (*v).size() - 1; while(r-l>1){ int m = (l+r)/2; if((*v)[m].first <= x){ l = m; } else r = m; } return l; } int main(...
ALGO
0.999977
4.112091
8b891cf3-8276-48bd-97db-390293f5be0a
BotSlayer21/Flutter-Supabase
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
220787fc-1bde-48e8-84d7-e735586cc51d
jpdotcom/comp_prog-archive
Auto_Upload_Codeforces/Codeforces_Round_836_Div_2/A_SSeeeeiinngg_DDoouubbllee.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define pb push_back #define FOR(a) for(int i=0;i<a;i++) #define mp(a,b) make_pair(a,b) #define all(a) a.begin(),a.end() typedef std::vector<long long> vi; typedef std::pair<int,int> pi; typedef long long ll; #defin...
ALGO
0.999875
4.319905
0ba63033-dba4-42ba-8f26-e665910dfc2e
AadityaShukla01/Interview-Preparation
0923-3sum-with-multiplicity/0923-3sum-with-multiplicity.cpp
class Solution { public: int threeSumMulti(vector<int>& nums, int target) { int c=0; int i=0; sort(nums.begin(),nums.end()); int mod=1e9+7; unordered_map<int,int>map; for(int i=0;i<nums.size();i++){ c = c%mod + map[target-nums[i]]%mod; for(int...
ALGO
0.999931
6.0513
9f999c7f-b3bd-4851-b159-199881b9a393
jvrmaia/coding4fun
uri/iniciante/p1061.cpp
#include <cstdio> using namespace std; int main() { int d1, h1, m1, s1, d2, h2, m2, s2; scanf ("Dia %d %d : %d : %d ", &d1, &h1, &m1, &s1); scanf ("Dia %d %d : %d : %d ", &d2, &h2, &m2, &s2); if (h1 == h2 && m1 == m2 && s1 == s2) { printf ("%d dia(s)\n0 hora(s)\n0 minuto(s)\n0 segundo(s)\n", d...
ALGO
0.999352
3.850971
a833b821-e440-4a64-9805-dbd3f2632ba7
JayjeetAtGithub/faiss_sve2
c_api/impl/AuxIndexStructures_c.cpp
// -*- c++ -*- #include "AuxIndexStructures_c.h" #include <faiss/impl/AuxIndexStructures.h> #include <faiss/impl/DistanceComputer.h> #include <faiss/impl/IDSelector.h> #include <iostream> #include "../macros_impl.h" using faiss::BufferList; using faiss::DistanceComputer; using faiss::IDSelector; using faiss::IDSelect...
TOOL
0.861847
5.704901