uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
555f8c52-58b6-4b3f-80eb-fda987addc70
metaxy/f-free
src/graph/boostgraph.cpp
#include "boostgraph.h" #include "src/iso/reducednodemapping.h" BoostGraph::BoostGraph() { } BoostGraph::BoostGraph(VGraph *graph) { m_input = graph->m_input; for(Edge e: graph->connectedEdges()) { addEdge(e); } } BoostGraph::BoostGraph(GGraph input) { m_input = input; for(Edge e: input.edge...
ALGO
0.976853
5.026154
13c77df6-8fc9-4063-954e-bfaa8433e6bf
alechuang98/NAPCodebook
codes/Data_Structure/LiChao.cpp
struct LiChao_min{ truct line{ LL m, c; line(LL _m=0, LL _c=0) { m = _m; c = _c; } LL eval(LL x) { return m * x + c; } }; struct node{ node *l, *r; line f; node(line v) { f = v; l = r = NULL; } }; typedef node* pnode; pnode root; int sz; #define mid ((l+r)>>1) void insert(line &v, int l, int r, pnode &...
ALGO
0.997871
3.971831
4198d3da-f0ce-408c-b589-5e409fd8767e
danieloliveira56/SantaStolenSleigh
SantaStolenSleigh.cpp
#include "prototypes.h" #ifdef WIN32 //#define TEST_INITIAL_SOL_CRITERIA #define NUM_THREADS 1 #endif //#define PRINT_TRIP_DETAILS //#define SAVE_JSON //#define PRINT_GAP_KARA //#define CROSSEXCHANGE_ARTUR #define SET_OLD_SOLUTION_CLEAR //#define SLOPPY_CROSS_EXCHANGE #define PARALLEL_CROSS_EXCHANGE //#define PARALL...
ALGO
0.999914
4.861354
84ffa454-84e7-458b-9850-d6b5a1276592
vinandra/Tugas-Daspro
tugas06/ke6.cpp
// Judul : perhitungan aritmatika // memo : vinandra fitriansnya 24 september #include <iostream> using namespace std; //kamus int a, b, hasil; char aritmatika; int main() { // deskripsi cout << "Selamat datrang di program aritmatika" << endl; cout << "masukan nilai pertama: "; cin >> a; cout <...
ALGO
0.996616
3.306837
e972febe-43b4-4c12-84fa-b31cdbe0c0fa
susheel-kumar-developer/CPP-Programming
palindromArray.cpp
#include<iostream> #include<vector> using namespace std; int minOperation(vector<int> &A) { } int main() { vector<int> A = {3,2,3,3,5}; return 0; }
ALGO
0.999896
5.143723
4867d531-a17a-4684-b546-0f7fb5ed4751
peacepiece7/algorithm
BOJ_2023/2309_일곱난쟁이/main.cpp
// https://www.acmicpc.net/problem/2309 #include <bits/stdc++.h> using namespace std; int arr[9]; vector<int> answer; void combi(int start, int n, int r, vector<int> v) { if (r == v.size()) { int sum = 0; for (auto i : v) sum += i; if (sum == 100) answer = v; return; } for (int i = start + 1; i...
ALGO
0.999595
4.091708
83a028d8-6c23-4728-8052-b276f39f5c99
Jay9874/LeetCode
1663-187-2272-substring-with-largest-variance/1663-187-2272-substring-with-largest-variance.cpp
class Solution { public: int largestVariance(string s) { int count1 = 0; int count2 = 0; int max_variance = 0; // Create a distinct set of character pairs unordered_set<char> distinct_chars(s.begin(), s.end()); // Run once for original string order, then again for r...
ALGO
0.999913
6.416604
26eba5ff-d4c9-4dcb-8e18-7b55a7630292
hsa1155/leetcodes
2503-longest-subarray-with-maximum-bitwise-and/longest-subarray-with-maximum-bitwise-and.cpp
#include "bits/stdc++.h" using namespace std; class Solution { public: int longestSubarray(vector<int>& nums) { int maximum=INT_MIN; int maxcount=0; int count=0; for(int x:nums) { if(x>maximum) { maximum=x; maxcount=1;...
ALGO
0.999855
5.230118
00c525f6-c184-492c-bb2d-b3a2bd24012f
ParasAnxi/LeetCode-CPP
Q1301-1400/1312.Minimum_Insertion_Steps_to_Make_a_String_Palindrome.cpp
class Solution { private: int lcs(string s1, string s2) { int n = s1.size(); int m = s2.size(); vector<int> prev(m + 1,0), cur(m + 1,0); for(int ind1 = 1;ind1 <= n; ind1++){ for(int ind2 = 1;ind2 <= m;ind2++){ if(s1[ind1 - 1] == s2[ind2 - 1]) cur[ind2] = 1 + prev[...
ALGO
0.999985
6.32879
f0b45f35-9318-465b-848a-6bfab539e9a8
ishandutta2007/codeforces
clovers/normal/1545/D.cpp
/* the vast starry sky, bright for those who chase the light. */ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define mk make_pair const int inf=(int)1e9; const ll INF=(ll)5e18; const int MOD=998244353; int _abs(int x){return x<0 ? -x : x;} int add(int x,int y){x+=y; ret...
ALGO
0.999972
3.306332
8879c6e8-c9de-432c-9a09-3215bd0d656f
leo-pss/algorithm
leetcode/916.cpp
#include <vector> #include <algorithm> #include <string> using namespace std; class Solution { public: vector<int> count_chr(string a){ vector<int> ret(26, 0); for(char x : a) ret[x-'a']++; return ret; } vector<string> wordSubsets(vector<string>& words1, vector<string>& words2) { ...
ALGO
0.999863
5.42401
427824d2-b883-456b-927b-60032cf330d2
allanwlz/SNO3LeetCode
Problemset/container-with-most-water/container-with-most-water.cpp
// @Title: 盛最多水的容器 (Container With Most Water) // @Author: user3919vu // @Date: 2020-06-03 20:59:51 // @Runtime: 16 ms // @Memory: 7.7 MB class Solution { public: int maxArea(vector<int>& height) { int a = 0, b = height.size() - 1, c, max_area = 0; while(a < b){ if (height[a] > height[...
ALGO
0.999948
6.451541
5ae603c0-a963-4d24-8248-fa27c104f555
raincross7/code-similarity
codes/train_code/problem419/problem419_2.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; int ans = 999; for(int i = 0 ; i <= s.size()-3; i++){ int num = (s[i] - '0') * 100 + (s[i+1] - '0') * 10 + (s[i+2] - '0'); ans = min(ans,abs(num-753)); } cout << ans << endl; }
ALGO
0.999796
3.872131
1d2b1a3a-bef1-4f15-a4cc-874ce013636a
KaySDellaCapa/Desafios_Cplusplus
desafios_Cplusplus/desafio06.cpp
#include <iostream> using namespace std; int main() { float gastofamilia[5]; // vetor de 5 familias for (int i = 0; i < 5; i++) { cout << "Digite os gastos da família " << i + 1 << endl; cin >> gastofamilia[i]; // vai para esta coordenada } float media = 0; for (int i = 0; i < 5; i++) { media +...
ALGO
0.999322
4.038995
f4594ab4-b29e-4d91-8d2d-0fe5dc537330
ishandutta2007/codeforces
voidmax/normal/780/G.cpp
#include <bits/stdc++.h> #define x first #define y second #define pb push_back #define mp push_back #define all(a) a.begin(), a.end() #define read(FILENAME) freopen((FILENAME + ".in").c_str(), "r", stdin) #define write(FILENAME) freopen((FILENAME + ".out").c_str(), "w", stdout) #define files(FILENAME) read(FILENAME), w...
ALGO
0.999858
3.950761
37d223fa-d55a-40fe-a0d8-6dc8b4936656
user992199/ISA_Practice
27-03/next_perm.cpp
class Solution { public: void reverse(vector<int> & arr, int i, int j){ for(;i < j;){ swap(arr[i++], arr[j--]); } } void nextPermutation(vector<int>& nums){ int n = nums.size(); int i, j; for(i = n-2; i >= 0; i--) if(nums[i] < nums[i+1]) ...
ALGO
0.999988
5.558365
2111cebc-6e7e-4815-b4a4-3a524dd55689
EmilVega/Concurrent_programming
project/prueba.cpp
#include <stdlib.h> #include <dos.h> #include <conio.h> #include <stdio.h> #include <iostream.h> #include <time.h> #include <windows.h> const int fl=11; const int cl=11; float M[fl][cl]; float f1[3][3]={{-1,0,1},{-1,0,1},{-1,0,1}}; int f2[3][3]={{-1,-1,-1},{0,0,0},{1,1,1}}; int f3[3][3]={{0,1,1},{-1,0,1},{-1,-1,0}};...
ALGO
0.999291
3.121992
343c729b-5002-4ce4-ad21-55daa7913fd8
ishandutta2007/codeforces
i_love_dasha_karpenko/normal/1725/B.cpp
//#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define endl '\n'; const int N = 1e5+7; int A[N]; void solve(){ int n,d; cin>>n>>d; d += 1; for(int i = 1;i<=n;i+=1){ cin>>A[i]; } sort(A+1,A+1+n); int ptr = 0; int res = 0; for(in...
ALGO
0.999937
3.84348
09660ef1-51b5-4d4c-96de-90619b663cf7
sumniy/algorithm_study
kakao test/2018 blind recruitment/cache.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; int solution(int cacheSize, vector<string> cities) { int answer = 0; vector<string> city; string input; if(cacheSize == 0 ) return answer = cities.size() * 5; for(int i=0;i<cities.size();i++) ...
ALGO
0.999862
5.282225
f1114cc0-c4af-446b-8629-804ad587dedd
SarthakGagapalliwar/LeetCode
209-minimum-size-subarray-sum/minimum-size-subarray-sum.cpp
class Solution { public: int minSubArrayLen(int target, vector<int>& nums) { int i = 0, j = 0; int n = nums.size(); int sum = 0; int mini = INT_MAX; while (j < n) { sum += nums[j]; while (sum >= target) { int len = j - i + 1; ...
ALGO
0.999995
6.594895
d420871a-d4fa-4106-b598-fec8cd941724
TapItNinja/Data-Structures-and-Algorithms
0792-binary-search/0792-binary-search.cpp
class Solution { public: int search(vector<int>& nums, int target) { int left=0, right=nums.size()-1; while(left<=right){ int mid=(left+right)/2; if(nums[mid]==target){return mid;} if(nums[mid]>target){ right=mid-1; } if(num...
ALGO
0.999867
6.227718
95b0c43c-4d58-4c59-ad8c-492c1af6231e
csookim/vortexupl
tests/regression/mstress/kernel.cpp
#include <stdint.h> #include <vx_intrinsics.h> #include <vx_spawn.h> #include "common.h" void kernel_body(int task_id, kernel_arg_t* __UNIFORM__ arg) { uint32_t stride = arg->stride; uint32_t* addr_ptr = (uint32_t*)arg->src0_addr; float* src_ptr = (float*)arg->src1_addr; float* dst_ptr = (float*)arg->d...
ALGO
0.996838
3.266409
9a2daf1e-b91d-43e1-ae45-bb886149720b
Vedantaz/Leetcode_solved_DSA_codes_
top 150 leetcode interview/array & strings.cpp/product except self.cpp
// 31 my code class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { int productall = 1; int n = nums.size(); vector<int> res(n,1); for(int i=0;i<n;i++){ res[i] = productall; productall *= nums[i]; } productal...
ALGO
0.999963
5.591452
f129c375-bf1d-4de4-8b1b-de2b87afa898
Adrian-Sciepura/Studies
Basics of programming/laboratory-6/Exercise-13.cpp
#include <iostream> using namespace std; void array_reverse(int numbers_array[], int current_index, int array_size) { if (current_index == array_size/2) { return; } int temp = numbers_array[current_index]; int second_index = array_size - 1 - current_index; numbers_array[current_index] = numbers_array[second_in...
ALGO
0.999539
5.404426
a882eec8-571b-4f1c-a01d-c5da63a1d3b6
Rui-cmd0/UFC---FUP
STRING 1/LP da Xura - Inverter String!/xuxa.cpp
#include <iostream> using namespace std; int main () { string frase; getline(cin, frase); for (int i = frase.size()-1; i >= 0; i--) cout << frase[i]; cout << endl; }
ALGO
0.996533
4.029607
d6d98483-505a-47af-aa8e-aa0dfd46ba51
sharmadeepak1999/leetcode-problems
Stickler Thief - GFG/stickler-thief.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; typedef long long int ll; // } Driver Code Ends class Solution { public: //Function to find the maximum money the thief can get. int FindMaxSum(int arr[], int n) { // Your code here vector<int> dp(n + 1, 0); dp...
ALGO
0.999457
6.29579
59915864-85f3-4f8b-8467-f02a7b06959d
TapItNinja/FAANG
0028-find-the-index-of-the-first-occurrence-in-a-string/0028-find-the-index-of-the-first-occurrence-in-a-string.cpp
class Solution { public: int strStr(string haystack, string needle) { int n=haystack.size(); int m=needle.size(); if(m==0)return 0; for(int i=0; i<=n-m; i++){ int j=0; while(j<m && haystack[i+j]==needle[j]){ j++; } if(j=...
ALGO
0.999932
5.898562
6dd37033-8e4f-4576-818b-831ade0562b2
moti9/iCode
dsa/DP/climbingStairs-SpaceOptimized.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 // TC- O(N) // SC- O(1) class Solution { public: int climbStairs(int n) { int prev2 = 1, prev = 1; for (int i = 2; i <= n; i++) { int curr = prev + prev2; prev2 = prev; ...
ALGO
0.999985
5.185699
58832d7c-c36c-47c1-8072-17202d55749e
Abhay-1301/DSA-Practice
rough/BM21BTECH11001_E3_Q5.CPP
#include <bits/stdc++.h> #include "tree.h" using namespace std; int main() { Node *root = NULL; // 45 21 34 65 89 12 97 2 6 1 65 22 11 77 44 22 99 -1 inputToInsert(root); levelOrderTraversal(root); cout << endl; inOrder(root); cout << endl; int i = 0; int j = 0; int k = 3; ...
ALGO
0.999954
3.891751
615fb9a4-f94d-4760-a230-0451fe7fa46e
ChandlerNgo/CP
CSCE430 Lab #1/D.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int w; int p; cin >> w >> p; vector<int> partitions; for(int i = 0; i < p; i++){ int num; cin >> num; partitions.push_back(num); } ...
ALGO
0.999927
3.233742
fbe1a585-507f-4cda-b0ef-073a0c52d1eb
ishandutta2007/codeforces
vercingetorix/normal/1672/D.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <ctype.h> #include <queue> #include <cstring> #include <set> #include <bitset> #include <map> #include <chrono> #include <random> #include <unordered_map> #include <stdio.h> using namespace std; typedef long long ll; typedef long do...
ALGO
0.999949
4.103042
1b1c39a2-0c18-4fd7-b42b-89eb90e6a8c4
CodyBuilder-dev/Algorithm-Coding-Test
problems/baekjoon/BOJ-1966-2-incorr.cpp
// : ť // : 켱 ¼ Ǵ ť ִ° /*̵ 2 :ִ 켱 Ѵ. ̳𸻰 ȳ 1. 2. տ cnt 3. ǥ ޽ cnt ȯ */ // : 켱 ִ ľ Ұ #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int T; int total_paper, paper_idx; int out_cnt = 0; int paper_num; vector<int> paper_array; scanf("%d", &T); for (int...
ALGO
0.999658
3.820126
0af61768-58f6-458e-9b78-b24cf93ae38b
Ivan-71-ua/Competitive-Programming
LeetCode/1497_2.cpp
#include <bits/stdc++.h> class SubrectangleQueries { public: std::vector<std::vector<int>>rect,mat; SubrectangleQueries(std::vector<std::vector<int>>& rectangle) { rect=rectangle; } void updateSubrectangle(int row1, int col1, int row2, int col2, int newValue) { mat.push_back({row1,col1,row2,col2,newValue}); ...
ALGO
0.996954
5.599808
5919e95d-dc1e-483b-9a56-3a9983f231a7
JayBansod/cpp-code
Assignment/Day 7/Assi7.cpp
#include <assert.h> int Odd() { static int n = -1; n += 2; return n; } int Natural() { static int n = 0; return ++n; } void generate(int a[], int size, int (*function)()) { for (int i = 0; i < size; i++) { a[i] = function(); } } int main() { int a[5] = {0}; generate(a, 5,...
ALGO
0.97263
4.887918
1faaa8e7-5fbe-4e28-911e-86d70034072c
AASHU7688/DSA_with_C_plus_plus
Loops/3_question.cpp
// Reverse for loop. Print n to 1. #include<iostream> using namespace std; int main(){ int n; cout<<"enter the number: "; cin>>n; for(int i=n;i>=1;i--){ cout<<i<<endl; } return 0; }
ALGO
0.996866
3.32964
f6de5b2f-7f60-49f7-b637-90f451eb88b1
IonaSantana/MaratonaCodes
UVa/Data Structures and Libraries/23517148 11917 Do Your Own Homework.cpp
#include <bits/stdc++.h> using namespace std; int main() { //freopen("in","r",stdin); //freopen("out","w",stdout); int t,n,dia,D; string mat; map<string,int>m; scanf("%d",&t); for (int j = 1; j <= t; j++) { scanf("%d",&n); for (int i = 0; i < n; i++) { cin>>mat>>dia; m[mat] = dia; } scanf(" %d...
ALGO
0.998454
3.481614
efd11d69-bc56-4d46-bb7e-887034cd90f1
Meherab151175/graph_tree_stack_que_linked_list
tree_revision/tree/postorder_traversal.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int val; Node* right; Node* left; Node(int val){ this->val = val; this->right = NULL; this->left = NULL; } }; void postorder_traversal(Node* root) { if(root == NULL) return; postorder_...
ALGO
0.999765
4.714801
afc2958a-408a-4291-ada6-93063687af6c
Gizmo212121/CompetitiveProgramming
kattis/halfacookie/main.cpp
#include <bits/stdc++.h> int main() { double r = 0, x = 0, y = 0; while (std::cin >> r) { std::cin >> x >> y; if (pow(x, 2) + pow(y, 2) > pow(r, 2)) { std::cout << "miss\n"; continue; } double r_prime = sqrt(pow(x, 2) + pow(y, 2)); d...
ALGO
0.999309
3.924707
a965907b-1231-458b-b6f5-74371dd301c1
ishandutta2007/codeforces
ronnie007/normal/1633/A.cpp
#include<bits/stdc++.h> using namespace std ; int n ; void input ( ) { cin >> n ; } void solve ( ) { if ( ( n % 7 ) == 0 ) { cout << n << "\n" ; } else { n /= 10 ; n *= 10 ; while ( ( n % 7 ) != 0 ) { ++ n ; } cout << n << "\n" ; } } i...
ALGO
0.999662
4.060662
504ae07e-458f-43e0-9de2-388c4cf50701
JohnJPalacios/VeryOld-CIS5Code
Early Assignments/Palacios_ch2_10.cpp
//Ten sum //Ten sum is a lightweight application that returns the sum of ten integers entered by the user. //John Palacios //03-06-2013 #include<iostream> using namespace std; int main() { int counter = 0; //Counter counts the number of itterations. int sumPos = 0; //sumPos accumulates t...
ALGO
0.996496
3.969621
7b3fcbba-0e04-4f36-a91d-85bde04b7f8f
Maksasj/megaboost
libs/phoenix/example/factorial.cpp
#include <vector> #include <algorithm> #include <iostream> #include <boost/phoenix/core.hpp> #include <boost/phoenix/function.hpp> struct factorial_impl { template <typename Sig> struct result; template <typename This, typename Arg> struct result<This(Arg)> : result<This(Arg const &)> ...
TOOL
0.960399
5.839092
8e4079b9-16a5-41f1-9f8c-c9967f07c033
HarryLong/CudaMiner
cpu/cpuminer.cpp
#include "cpuminer.h" #include "../common/timer.h" #include <iostream> #include <stdio.h> #include <cmath> CPUMiner::CPUMiner(MiningData * miningData, float stepSize) : Miner(miningData, stepSize), summary() { memset(grid.data, 0, grid.size); // set the grid to '0' } CPUMiner::~CPUMiner() { } void CPUMiner::pe...
ALGO
0.998847
5.427101
1f046354-57ea-4a13-843b-f909078e9832
pranav1812/DS_algo_with_cpp
Binary Search Trees/BST_from_Preorder.cpp
#include <iostream> #include <queue> #include <algorithm> using namespace std; class node { public: int data; node* right; node* left; node(int d) { data = d; left = right = NULL; } }; node* makeTreeFromPreorder(int preorder[],int inorder[],int s,int e) { if(s>e) return NULL; static int i=0; node *r...
ALGO
0.999991
4.983991
cbbbd917-19ce-47b7-acbe-ac22f21241c8
Anubhavpandey27/At_Coder
369/A.cpp
#include <iostream> using namespace std; #include <vector> #include <string> #include <algorithm> #include <math.h> #define ll long long void helper(){ } int main(){ ios::sync_with_stdio(0); cin.tie(NULL); ll a,b; cin>>a>>b; if(a==b){ cout<<1; } else if(abs(a-b)%2==0){ cout<<3; } else{ cout<<2; } }
ALGO
0.99997
3.740737
8dec34b3-832e-4f8c-91c9-7bb96e239c4f
wgrzesiak147/Symulator-Problem-Komiwojazera
bruteforcealgorithm.cpp
#include "bruteforcealgorithm.h" BruteForceAlgorithm::BruteForceAlgorithm() { } Route * BruteForceAlgorithm::calculateRoute(AdjacencyMatrix *adjacencyMatrix, unsigned int startNode) { emit started(); Route * sol = new Route(adjacencyMatrix->getSize(),adjacencyMatrix); sol->makeRandomRoute(s...
ALGO
0.999882
4.776945
c000a8b3-d429-43df-a7ce-b7bcc5d35a72
QianQNanami/JSOI-WC25
PJ/judger/source/WC25-194/add.cpp
#include<bits/stdc++.h> using namespace std; int n,m; int a[10010],l,r; unsigned long long s[10010]; int main() { cin>>n; for(int i=1; i<=n; i++) cin>>a[i]; cin>>m; for(int i=1; i<=m; i++) { cin>>l>>r; for(int j=l; j<=r; j++) s[i]+=a[j]; } for(int i=1; i<=m; i++) cout<<s[i]<<endl; return 0; }
ALGO
0.999868
3.457433
00c7b843-fb86-40ce-8444-f65d1db16d42
RomanCherovDmitrievich/Test
C++/AVLTree/AVLTree.cpp
#include <iostream> #include <vector> #include <list> #include <string> #include <iomanip> #include <cmath> #include <limits> #include <memory> #include <algorithm> using namespace std; /// @brief Определить, состоит ли переданная из целых целое /// @param str Проверяемая строка. /// @return Если строка содержит цел...
TOOL
0.978492
3.855551
fe4a7039-5d36-4629-968e-44d35530cec0
FrancisMT/Cpp_Calculator_Challenge
src/calculator/State.cpp
#include "State.hpp" #include <functional> #include "utils/Methods.hpp" namespace Calculator { void State::updateOperationOrder(const std::string& operand) { mOperandOrderStack.push(operand); } std::vector<std::pair<std::string, int>> State::storeExpressionValue(const std::string& operand, const int valu...
TOOL
0.939757
7.802172
b92e8b44-cd4e-4c20-8c4b-d09c0d49c0b8
lutaf/burndvd
FindFile.cpp
#include "stdafx.h" #include "FindFile.h" #include <string> using namespace std; // Constructor CFindFiles::CFindFiles (LPCSTR psPath) { // Make sure the path is not NULL. // _ASSERTE (psPath != NULL); // Store the path in std::string for ease of use. // const string sOriginalPath (psPath); string sPathBefo...
TOOL
0.880363
5.393293
eca03d7d-5bf7-4cec-bf68-a56b631c7052
Delthin/leetcode-solution
thu/202401擂台赛.cpp
// // Created by lisiyi on 25-8-2. // #include <bits/stdc++.h> using namespace std; using ll = long long; // 17:06 -> int main() { int n; cin >> n; vector<vector<int>> adj(n, vector<int>(n, 0)); for (int i = 0; i < n; i ++) { for (int j = 0; j < n; j ++) { cin >> adj[i][j]; }...
ALGO
0.999994
4.387687
8b207679-f89f-4f61-93e7-b25def61db7f
mytxzz/gama-assets-viewer
frameworks/cocos2d-x/cocos/platform/winrt/sha1.cpp
#include "sha1.h" /* * Define the SHA1 circular left shift macro */ #define SHA1CircularShift(bits,word) \ (((word) << (bits)) | ((word) >> (32-(bits)))) /* Local Function Prototyptes */ void SHA1PadMessage(SHA1Context *); void SHA1ProcessMessageBlock(SHA1Context *); /* * SHA1Reset * * Descri...
ALGO
0.986074
7.002469
b7bc5ad1-b5a1-4970-99dc-bb28c7c55350
piyush140104/Codeforces_Problems_Solutions
972Div2/simplePalindrome.cpp
// https://codeforces.com/contest/2005/problem/A #include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; for(int w=0;w<t;w++) { int n; cin>>n; string s; int per_count=n/5; if(n%5==0) { for(int j=1;j<=per_count;j++) ...
ALGO
0.999647
4.738622
d75f7565-fd1a-48cc-983c-1a176c257ade
SauravSharma05/SE_June1
c++ assignment/c++ 4.2 module assg/ques12_4.2.cpp
#include<iostream> using namespace std; int area(int r) { return 3.14 * r * r; } int area(int l, int b) { return l * b; } float area(float base, float height) { return 0.5 * base * height; } int main() { int r, l, b; float base, height; cout << "Enter radius : "; cin >> r; cout << "...
ALGO
0.98964
3.848395
b9c01f5a-a827-4ba6-8074-e923948707f1
vfolunin/archives-solutions
LeetCode/2828.cpp
class Solution { public: bool isAcronym(vector<string> &words, string &s) { string acronym; for (string &word : words) acronym += word[0]; return acronym == s; } };
ALGO
0.999343
5.370999
b4a349ea-0b37-4885-8546-13a82e8f23ba
KhaosResearch/MORPHY
src/core/Solution.cpp
#include <Solution.h> /** * Constructor. */ Solution::Solution () { problem_ = NULL; marked_ = false; overallConstraintViolation_ = 0.0; numberOfViolatedConstraints_ = 0; numberOfVariables_ = 0; numberOfObjectives_ = 0; type_ = NULL; variable_ = NULL; objective_ = NULL; } //Solution /** * Constru...
ALGO
0.998777
4.359423
4d888b15-a85e-45ca-8e31-3aa8ba20b342
FahimAbrar0112/CP-Codes
Codes/Syntax/MAP/map_diff_vals.cpp
#include <bits/stdc++.h> using namespace std; int main(void) { map<int, vector<string>> mp; mp[10].push_back("Ab"); mp[5].push_back("FF"); mp[12].push_back("Bac"); mp[10].push_back("pp"); mp[10].push_back("GWF"); for (auto &pair : mp) { cout << "key: " << pair.first << " ...
ALGO
0.979642
4.138505
eedf49f2-3278-4c01-9727-6db0bc9d5a4f
UMAKANT06/CSES
stick_lengths.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; vector<long long> p(n); // Change the type of the vector to long long for(int i = 0; i < n; i++) { cin >> p[i]; } sort(p.begin(), p.end()); long long median = p[n / 2]; // Change the type of ...
ALGO
0.999975
4.952424
46bfb6e8-9a56-43b3-bbab-4d9b0eae8110
red23495/UVa-solutions
11492_Babel.cpp
#include<bits/stdc++.h> using namespace std; using ic = pair<int,char>; int main(){ int n; while(cin >> n && n){ map<string,int> m; vector<vector<pair<ic,int>>> v; string s1,s2,s3; cin >> s1 >> s2; m[s1] = 0; m[s2] = 1; v.resize(2); while(n--){ ...
ALGO
0.999915
3.902165
7a4d11bf-6243-4075-bd51-c2db3efa8525
EERNINUO/School_project
C++/practice_report/q2/q2.cpp
#include <iostream> using namespace std; int n; void num_off(int index[]) { int sign = 1; // 计算每个人报的数 int stu_num = 0; // 存储还存活的人数 while (stu_num != 1) { // 当存活的人不等于1时 stu_num = 0; // 重置计数器 for (int i = 0; i < n; i++)// 遍历每一个人 { if (index[i] != 0)...
ALGO
0.99998
3.651657
9a4be263-9212-4276-a873-8eda3d9065f9
ScottYijun/CppPrimerV5
chapter06/chpater06/program06_12.cpp
#include <iostream> using namespace std; void mySWAP(int &i, int &j) { int temp = i; i = j; j = temp; } int main() { int a = 55, b = 99; cout << "交换前: a = " << a << ", b = " << b << endl; mySWAP(a, b); cout << "交换后: a = " << a << ", b = " << b << endl; return 0; }
ALGO
0.999789
4.031116
297a9682-0e85-404d-80ce-f67f6108d58b
hzding621/algorithms
leetcode/cpp/025_reverse_nodes_in_k_group.cpp
#include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* reverseKGroup(ListNode* head, int k) { if (!hasAtLeastkNodes(head, k)) return head; ListNode* tail = head; int n = ...
ALGO
0.999997
5.419789
6b986190-95dd-42e1-a5b1-65ac02be4e56
avialleguerin/Advent-of-Code
day2/part2.cpp
#include <stdio.h> #include <unistd.h> #include <iostream> #include <string> #include <fstream> #include <vector> int* rmlvl(int line[8], int index); int isSafe(int line[8]); int nb_line = 0; std::vector<std::string> ft_split(const std::string& str, char delimiter) { std::vector<std::string> result; std::string tmp;...
ALGO
0.991879
3.724797
111a03be-9051-4437-87d9-69cc597ede96
yyyuvvvraj/C_Plus
Assignments/Assignment-1/Q2.cpp
#include <iostream> using namespace std; int main(){ int a; cout << "Enter an integer: "; cin >> a; if(a==0){ cout <<"The number is neither even nor odd. It is '0'." << endl; }else if(a%2==0){ cout << "The number is even." <<endl; }else if(a%2!=0){ cout << "The number i...
ALGO
0.997166
4.02493
5ab05106-81c4-423b-9be9-e44b8dc57957
Huangyan0804/vjudge
HDU-1061/HDU-1061.cpp
#include <algorithm> #include <iostream> using namespace std; int qmi(long long a, long long b, int c) { long long t = a, res = 1; while (b) { if (b & 1) res = res * t % c; b >>= 1; t = t * t % c; } return res; } int main() { int t; cin >> t; while (t--) {...
ALGO
0.99977
4.548335
1a651dbf-2f41-4966-b35d-e68dcce86665
0owangjingo0/WZUOJ_Answer
数据结构(2022-2023-2)/ 实验四 图及其应用——AOE网/3171-查找边.cpp
ENode *findEdge(AOENetwork g, int i, int j) { ENode *p = g->vexs[i].firstEdge; while (p != NULL && p->adjVertex != j) p = p->nextEdge; return p; }
ALGO
0.998962
3.367452
f236f56b-d061-4b33-9942-7f8d4fd3ff06
ishandutta2007/codeforces
lgswdn/normal/516/D.cpp
// LUOGU_RID: 90784371 #include<bits/stdc++.h> #define int long long using namespace std; #define fi first #define se second #define rep(i,a,b) for(int i=(a);i<=(b);i++) #define per(i,a,b) for(int i=(a);i>=(b);i--) #define eb emplace_back #define y1 yylyylyylyyl typedef pair<int,int> pii; typedef vector<int> vi; typede...
ALGO
0.999956
4.118635
d040df6f-4b6e-43c7-b26e-d2a9bef504f3
ishandutta2007/codeforces
aid/normal/1091/B.cpp
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; typedef long double ld; #ifdef DEBUG #define eprintf(...) fprintf(stderr, __VA_ARGS__), fflush(stderr) #else #define eprintf(...) ; #endif #define sz(x) ((int) (x).size()) #define TASK "text" const int inf = (int) 1.01e9; con...
ALGO
0.999884
3.762597
239fa22a-a6a2-4bb8-877c-73bb37d965f4
yzqhao/JYEngine2
Engine/render/material/KeyWordUtil.cpp
#include "KeyWordUtil.h" #include "Core/Interface/ILogSystem.h" #include "Math/Math.h" #include <algorithm> #include <atomic> NS_JYE_BEGIN namespace KeyWordUtil { class SpinMutex { int mLock; public: SpinMutex() { mLock = 0; } void lock() { while (!tryLock()) { // spin } } void u...
TOOL
0.854282
5.591632
58335c4c-1206-4e30-a09a-5475095d55eb
Dongubak/DataStructureAndAlgorithm
dynamicProgramming/subsetSum.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; void getAllSubsets(vector<int> set, vector<int> subset, int index, vector<vector<vector<int>>>& allSubsets) { if(index == set.size()) { ///모든 부분집합을 생성하였음 allSubsets[subset.size()].push_back(subset); return; } getAllS...
ALGO
0.999754
5.48713
da4d6c2f-b69e-4148-bf18-1ce4da829721
Matbubble/Heaven-Knows-Im-Miserable-Now
Codeforces/Codeforces460.cpp/C.cpp
#include <iostream> #include <iomanip> #include <string> #include <math.h> #include <algorithm> #include <cstring> #include <numeric> #include <vector> #include <bitset> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <unordered_map> #include <unordered_set> using namespace st...
ALGO
0.999692
3.873216
3eb5d985-949b-4b41-9c34-dab3397f3970
HexHive/datashield
compiler/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
#include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/ADT/DenseMap.h" #include "llvm/Analysis/CFG.h" #include "llvm/IR/Function.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Type.h" #include "llvm/Transforms/Utils/Local.h" using namespace llvm; /// DemoteRegToStack - This function takes a virtual ...
TOOL
0.983489
7.565472
83c49a72-6fe0-4e42-b865-acc7f5a4cff5
ArielGarciaM/CompetitiveProgramming
OmegaUp/PU++3/E.cpp
#include <bits/stdc++.h> using namespace std; double m, g, v, eps = 1e9; double dist(double x) { return x*sqrt(v*v - x*x) - m*x*x; } double ts() { double low = 0, high = v; for(int i = 0; i < 300; i++) { double diff = (high - low)/3.0; double f1 = dist(low + diff), f2 = dist(high - di...
ALGO
0.999643
4.061061
f0c3a040-db81-4447-be88-1b7eeb46dab3
suchijain30/45daycode
PRACTICEPERF.cpp
#include <iostream> using namespace std; int main() { int t ; cin>> t ; while(t--) { int p1,p2,p3,p4 , count=0 ; cin>>p1>>p2>>p3>>p4; if(p1 >=10) { count++; } if( p2 >=10) { count++; } if( p3 >=10) { co...
ALGO
0.996605
3.667522
e2ba7ecb-7478-4f03-b567-41614e2c33da
Muhammad-Ibrar727/programming-fundamentals-sem1
programms for final/function call.cpp
#include<stdio.h> int add(int ,int ); int main() { add(23,2); } int add(int n1,int n2) { int sum; sum = n1+n2; return sum; }
TOOL
0.991705
3.730845
37d03428-1936-4cdb-981f-7bd63294c952
Halum/UVA-Codes
Common Permutation.cpp
#include<cstdio> #include<iostream> #include<cmath> #include<cstring> #include<cctype> #include<cstdlib> #include<utility> #include<functional> #include<bitset> #include<deque> #include<set> #include<algorithm> #include<ctime> #include<string> #include<list> #include<vector> #include<stack> #include<queue> #include<map...
ALGO
0.999953
3.421979
fdeae4eb-28c7-4108-9ad1-ad60ba3c7438
ishandutta2007/codeforces
cz_xuyixuan/normal/1336/B.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 3e5 + 5; typedef long long ll; template <typename T> void chkmax(T &x, T y) {x = max(x, y); } template <typename T> void chkmin(T &x, T y) {x = min(x, y); } template <typename T> void read(T &x) { x = 0; int f = 1; char c = getchar(); for (; !isdigit(c);...
ALGO
0.999986
4.108133
d2ab0ee9-7ce6-40cf-93e4-84d8aefaedaf
ghada233/OPSY
threadIDfunction.cpp
#include <iostream> #include <unistd.h> #include <stdlib.h> #include "pthread.h" using namespace std; #define NLOOP 10 int counter = 0; void * function1(void*); void * function2(void*); int main(){ pthread_t tidA, tidB; int status; pthread_create(&tidA, NULL, function1, NULL); pthread_create(&tidB, NULL, function...
ALGO
0.970574
4.225973
ed3b45b9-ab58-4d07-bae4-94b812a0b59a
ChristianJyL/cpp-s2
TP3/exo1/src/main.cpp
#include <vector> #include <algorithm> #include <iostream> #include <string> #include <sstream> #include <iterator> #include "utils.hpp" std::vector<std::string> split_string(std::string const &s) { std::istringstream in(s); // transforme une chaîne en flux de caractères, cela simule un flux comme l'est std::cin ...
TOOL
0.974744
5.050783
2a37f43e-5c60-470a-a1e5-3c6859d75149
kchu-z/arena
2022.12.18/progress.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, d; cin >> n >> d; unordered_map <int, int> m; for (int i = 0; i < n; i++) { int num; cin >> num; m[num - i * d]++; } int mx = 0; ...
ALGO
0.999863
3.399457
8314b29d-8b8f-4032-910c-0a356233d7d6
konstantinoscs/Curves-Project
Part_2/data_ops.cpp
#include <iostream> #include <string> #include <cstring> #include <fstream> #include <cstdlib> #include <utility> #include "curve.h" using namespace std; //data_ops contains all the functions for the intialization of the problem //e.g. parsing command line arguments, getting input from the user, //getting input from...
ALGO
0.987404
4.22022
504cc8af-21d9-4961-8237-64cf2fd4333e
ishandutta2007/codeforces
al13n/normal/1097/A.cpp
#define _CRT_SECURE_NO_DEPRECATE #define _USE_MATH_DEFINES #include <array> #include <iostream> #include <fstream> #include <cstdio> #include <cstdlib> #include <cassert> #include <climits> #include <ctime> #include <numeric> #include <vector> #include <algorithm> #include <bitset> #include <cmath> #include <cstring> #...
ALGO
0.999934
3.368476
d19d6e6a-1bb9-42e8-a77b-cef29994272f
TwentyFiveSeven/Algorithm
C-Code/LCA)No_3176.cpp
#include<iostream> #include<vector> #include<algorithm> #include<math.h> using namespace std; #define MAX ((int)log2(100001)) vector<pair<int,int>> V[100001]; vector<int> K(2,0); int check[100001],depth[100001],Min[100001][MAX+1],Max[100001][MAX+1],dp[100001][MAX+1]; void dfs(int now, int dep){ int size = V[now].siz...
ALGO
0.999996
4.264068
98a182f9-3f9c-4e26-b34f-9ba62a42cffe
junioralcant/flutter-clean-arch
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
9d015701-a965-4bf5-991a-12418431527c
sanstzu/competitive-programming
codeforces/1506B - Partial Replacement.cpp
#include <iostream> #include <algorithm> #include <cstring> using namespace std; const int INF = 1000; void solve(){ int n,k; cin >> n >> k; string str; cin >> str; int dp[55]; for(int i=0; i<55; i++)dp[i]=INF; bool first=true; int last=0; for(int i=0; i<n; i++){ if(str[i]=='.')continue; ...
ALGO
0.998785
3.261955
4cebb3d9-a2f3-4018-9393-5813e6fabaf3
nextgensultan/CP-Codeforces
1861_B.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <cmath> #include <list> #include <queue> #include <sstream> #include <bitset> #include <numeric> #include <functional> using namespace std; typedef long long ll; using name...
ALGO
0.999906
4.196378
83c2cb6a-c0b7-449d-b6a1-9554b92e2d23
dinhcanh303/learning_cpp
vector/ex10.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MOD = 1e9 + 7; // begin() + x : Tro iterator den chi so x nam trong vector int main() { vector<int>v(256); // 0 int n ; cin >> n; char a[n]; for(int i = 0 ; i < n ;i++) { cin >> a[i]; v[a[i]]++; } ...
ALGO
0.999645
3.646905
dccc77af-2e5e-4604-a735-dcb8e50cfab3
karthikjodangi/codeclub_qotd
day34-lv1.cpp
#include<bits/stdc++.h> using namespace std; bool isVowel(char ch){ ch = toupper(ch); return ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U' || ch == 'Y'; } int main(){ string s; cin >> s; string res; for(int i=0;i<s.length();i++){ if(!isVowel(s[i])){ res.pu...
ALGO
0.99987
4.389465
83eca6c2-652b-4667-8164-2a6f5805398b
akgarhwal/LeetCode-Solutions
Solutions/C++/Accepted/980-unique-paths-iii.cpp
/* Problem Title: 980 - Unique Paths III Lang: C++ Runtime: 6 ms Memory: 7.1 MB Problem Url: https://leetcode.com/problems/unique-paths-iii Submission Url: https://leetcode.com/problems/unique-paths-iii/submissions/868506086 */ class Solution { public: int R[4] = {-1, 0, 1, 0}; int C[4] = {0, 1, 0, -1}; ...
ALGO
0.999702
5.875259
4f64f4c0-5302-4bdc-951d-6825748a9cd0
seahorce-scidac/REMORA
Exec/BoundaryLayer/prob.cpp
#include "prob.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" #include "REMORA_IndexDefines.H" #include "REMORA_DepthStretchTransform.H" using namespace amrex; std::unique_ptr<ProblemBase> amrex_probinit(const amrex_real* problo, const amrex_real* probhi) { return std::make_unique<Problem>(problo, p...
ALGO
0.992994
5.660266
908ed0de-b680-4c19-aa70-ae94029b358f
kiranatmakuri516/LEETCODE
0011-container-with-most-water/0011-container-with-most-water.cpp
class Solution { public: int maxArea(vector<int>& a) { int i,j,k,l,m,n,p,q,r,s,t,u,v,x; n=a.size(); l=0; r=n-1; u=v=x=0; while(l<=r) { p=a[l]; q=a[r]; v=(r-l)*min(p,q); if(u<v) u=v; if(p<q) l++; else r-...
ALGO
0.999878
5.631318
a4793bfc-0deb-4cfb-988a-3bffacd584e5
devgoel186/Leetcode-Solutions
lowest-common-ancestor-of-a-binary-search-tree/Accepted/8-14-2021, 9_56_40 PM/Solution.cpp
// https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* low...
ALGO
0.999995
6.414506
7318a14f-1a18-4fc5-b839-ab2956383eda
ishtiyaque/Pantheon
SEAL_parallel/native/src/seal/util/numth.cpp
#include "seal/util/numth.h" #include "seal/util/uintarithsmallmod.h" #include "seal/util/uintcore.h" #include <random> using namespace std; namespace seal { namespace util { vector<uint64_t> conjugate_classes(uint64_t modulus, uint64_t subgroup_generator) { #ifdef SEAL_DEBUG if (!...
ALGO
0.999611
5.642944
11ad9f8b-c079-420c-ae8f-a315d3220615
tic40/atcoder
abc/abc382/f/main.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using namespace std; #define REP(i,n) for(int i=0;i<n;i++) #define endl '\n' using T = tuple<int,int,int>; const int INF = numeric_limits<int>::max(); using S = int; using F = int; S op(S a, S b) { return min(a,b); } S e() { return INF; } S mappi...
ALGO
0.999867
4.033391
f39a9b36-0ee7-44ab-a2b3-006b0a51282f
Coder-Vippro/Code
Archived/Thaytuong/muabanh/muabanh.cpp
#include <bits/stdc++.h> using namespace std; int x,a,b; int main() { cin>>x>>a>>b; int n=x-a; cout<<n-n/b*b; return 0; }
ALGO
0.999813
3.492329
285e07c7-aadd-4344-8a27-7eb7d9d9ab8d
Ich-Melin/c-primerplus
c++plus/10/text/8/main.cpp
#include<iostream> #include<cctype> #include"list.h" void traverse(Item & item); int main() { using namespace std; char ch; Item temp; List mylist; cout << "The list include following functions:" << endl; cout << "a to add an number." << endl; cout << "v to visit every number." << endl; ...
TOOL
0.951271
3.961693
9d2b89b9-2db5-4d06-b2e3-95b8eb3d8746
huguangAOA/Bilibili-Algorithm
6.第6章:排序算法/第六章代码/7.radix_sort.cpp
/************************************************************************* > File Name: 7.radix_sort.cpp > Author: huguang > Mail: <EMAIL> > Created Time: ************************************************************************/ #include <stdio.h> #include <stdlib.h> #include "0.sort_test.h" void radix_sort(int...
ALGO
0.999809
4.391448
51d11cb3-7f6c-4b2a-8bb4-6a6bc509a443
EslamFareed/group_55_apis
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
48f47ee3-5321-4eba-9c3b-2bcd04fa0fec
hiro-tacky/practice
ABC/165/C.cpp
// 154 B #include <iostream> #include <string> #include <vector> #include <algorithm> #include <numeric> #include <queue> #include <iomanip> #include <climits> #include <string> using namespace std; int main(){ int n, m, q; long long int sum=0, max=0; cin >> n >> m >> q; vector<long long int> a(n, 1...
ALGO
0.99994
4.171916
0b4bca40-697b-4dd8-8015-811d28a45cab
anuj758/cses-problemset-solution
introductory-problems/7_twoKnights.cpp
#include <iostream> #define int long long using namespace std; int32_t main(){ int k; cin >> k; for(int i = 1; i <= k; i++){ int total = (i * i) * (i * i - 1) / 2; int invalid = 2 * 2 * (i - 2) * (i - 1); cout << total - invalid << "\n"; } return 0; }
ALGO
0.999838
3.528093
c4ec027b-07b4-4078-a9ff-b114b5172232
sam234990/ArchRAG
HCHNSW/faiss/tutorial/cpp/4-GPU.cpp
#include <cassert> #include <cstdio> #include <cstdlib> #include <random> #include <faiss/IndexFlat.h> #include <faiss/gpu/GpuIndexFlat.h> #include <faiss/gpu/GpuIndexIVFFlat.h> #include <faiss/gpu/StandardGpuResources.h> int main() { int d = 64; // dimension int nb = 100000; // database size int nq ...
ALGO
0.991677
5.844962