uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
621d302d-e6de-45fc-9424-d70b3203dc19
harshshah96/Leetcode
3262-find-polygon-with-the-largest-perimeter/find-polygon-with-the-largest-perimeter.cpp
static int io_opt = []() { ios::sync_with_stdio(false); return 0; }(); class Solution { public: long long largestPerimeter(vector<int>& nums) { sort(nums.begin(),nums.end()); long long sum = 0; long long ans = -1; for(int i=0;i<nums.size();i++){ if(nums[i]<su...
ALGO
0.999745
4.735261
b52c957e-21b2-4104-bd9e-82931295caee
chuprakov/trilinos
packages/fei/support-Trilinos/fei_AztecDVBR_Matrix.cpp
#include <fei_trilinos_macros.hpp> #include <fei_iostream.hpp> #ifdef HAVE_FEI_AZTECOO #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <cstring> #include <fei_mpi.h> #ifndef FEI_SER #define AZTEC_MPI AZTEC_MPI #define AZ_MPI AZ_MPI #ifndef MPI #define MPI MPI #endif #endif #include <az_aztec....
TOOL
0.885994
4.443161
235f0f72-77f1-4243-9eae-f271535cce48
Arannamoy-Mondal/CP
Problems/B_Class_9_Task_1.cpp
#include<bits/stdc++.h> #define int long long #define nl "\n" #define blk " " #define rep(i,in,n) for(int i=in;i<n;i++) #define pb push_back #ifndef ONLINE_JUDGE #define debug(a) cout<<#a<<blk<<a<<nl; #define sep(a) cout<<#a<<#a<<#a<<#a<<#a<<#a<<#a<<endl; #else #define debug(a) #define sep(a) #endif const int N=1e7+5; ...
ALGO
0.999478
3.736607
cf599693-6254-464c-93db-230caa15bbca
carlosgalvezp/Udacity-Self-Driving-Car-Nanodegree
term3/projects/p1-path-planning/3rdparty/Eigen-3.3/doc/examples/TemplateKeyword_simple.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; void copyUpperTriangularPart(MatrixXf& dst, const MatrixXf& src) { dst.triangularView<Upper>() = src.triangularView<Upper>(); } int main() { MatrixXf m1 = MatrixXf::Ones(4,4); MatrixXf m2 = MatrixXf::Random(4,4); std::cout << "m2 before copy:"...
TOOL
0.977485
5.210898
06ab031e-f7e6-4c1e-bcef-7d5dc2fa2683
himanshuyadav492/dsa_cpp
recursiveLiner.cpp
#include<iostream> using namespace std; void print(int arr[],int n){ cout<<"Size of array is "<<endl; for(int i=0;i<n;i++){ cout<<arr[i]<<" "; }cout<<endl; } bool linearSearch(int arr[],int size,int k){ print(arr,size); if(size==0) return false; if(arr[0]==k){ return t...
ALGO
0.999901
4.21329
7e9e061a-1d95-49f5-8cf1-d88271aa944a
Henrik-Yao/NEUQ-ACM-Solution
week7/彭政达/week7-5.cpp
#include <bits/stdc++.h> using namespace std; int dp[405][1505]={0}; int v[405],w[405]; int n,c; void getdp(){ for(int i=1;i<=n;i++) for(int j=1;j<=c;j++) if(w[i]>j) dp[i][j]=dp[i-1][j]; else dp[i][j]=max(dp[i-1][j],dp[i-1][j-w[i]]+v[i]); } int main(){ ios::sync_with_stdio(false)...
ALGO
0.999997
3.836571
15c9edb0-2440-4b21-b3c8-7c754ba191f9
Jaskarii/CloudVisualizer
src/gridTreeDetector.cpp
#include "gridTreeDetector.h" #include <algorithm> GridTreeDetector::GridTreeDetector(float gridSize, float groundThreshold, int vegetrationThreshold): GridSize(gridSize), GroundThreshold(groundThreshold), vegetrationThreshold(vegetrationThreshold) { } GridTreeDetector::~GridTreeDetector() { } void GridTreeDetector:...
ALGO
0.991398
6.043509
ee695827-77c0-449b-9685-a0dff16ed67a
Inori/Games202HW
homework2/prt/ext/tbb/src/test/test_halt.cpp
#define HARNESS_DEFAULT_MIN_THREADS 4 #define HARNESS_DEFAULT_MAX_THREADS 8 #include "harness_defs.h" #include <cstdio> #include <cstdlib> #include <cassert> #include <utility> #include "tbb/task.h" #include "tbb/task_scheduler_init.h" #include "tbb/tick_count.h" #include "tbb/parallel_for.h" #include "tbb/blocked_ran...
TEST
0.972831
6.239474
e80109ff-d284-483d-93a4-228df48b21a0
yusifaliyevpro/Competitive-Programming
LeetCode/Medium/1171. Remove Zero Sum Consecutive Nodes from Linked List.cpp
// 1171. Remove Zero Sum Consecutive Nodes from Linked List // https://leetcode.com/problems/remove-zero-sum-consecutive-nodes-from-linked-list/ #include <iostream> using namespace std; /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), ne...
ALGO
0.997934
6.206083
65e02c0f-604f-460a-bab3-07d7e73a49f7
raj3000k/music-app-player
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
5d5e6346-c76c-49b7-9cbc-4139ddccdcdc
Rprop/wke-extend
wke/Source/JavaScriptCore/wtf/dtoa.cpp
/* Please send bug reports to David M. Gay (dmg at acm dot org, * with " at " changed at "@" and " dot " changed to "."). */ /* On a machine with IEEE extended-precision registers, it is * necessary to specify double-precision (53-bit) rounding precision * before invoking strtod or dtoa. If the machine uses (th...
TOOL
0.924818
7.490532
25cbd9a8-8e57-4559-a803-ae1647818c3c
vishal-nehal/Some_problems_in_c-
Angram_string.cpp
//METHOD - 1 this aproach is of O(n2) //#include<bits/stdc++.h> //using namespace std; //int main() //{ // string str1,str2; // cin>>str1>>str2; // int count=0; // if(str1.size() == str2.size()) // { // for(int i =0;i<str1.size();i++) // { // for(int j =0;j<str2.size();j++) // { // if(str1[i]==str2[j]) // ...
ALGO
0.999987
4.85307
6d141ebd-edf4-499f-a81a-2ed1b51d20da
cyrustabatab/C-
test_11.cpp
#include <vector> #include <string> #include <iostream> void display(const std::vector<std::string>& words) { for(std::string word: words) { word[0] = 'H'; std::cout << word << std::endl; } } int main() { std::vector<std::string> words{"Hello","there","cyrus"}; display(words); ...
TOOL
0.922175
3.941883
8eccfd9f-f23a-4479-9074-40c19437eb5d
raincross7/code-similarity
codes/train_code/problem305/problem305_66.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; vector<int64_t>a(N); vector<int64_t>b(N); for(int i=0;i<N;i++) cin >> a.at(i) >> b.at(i); int64_t ans=0; for(int i=N-1;i>=0;i--){ if((a.at(i)+ans)%b.at(i)!=0) ans+=b.at(i)-(a.at(i)+ans)%b.at(i); //cout << ans << e...
ALGO
0.999924
3.446396
3b5deb78-767d-45b0-8f0e-9d19d02abd84
sophgo/tpu_compiler
lib/Dialect/TPU/Backend/Kernel/TgBf16GruKernel.cpp
#include "TgBf16GruKernel.hpp" #include "tpuc/Interpreter/cpu/lut_func.hpp" #include "CviBackendContext.h" #include "backend/backend_tl_api.h" #include <cmath> #include <iostream> #include <llvm/Support/Debug.h> #include <llvm/Support/Format.h> #include <llvm/Support/raw_ostream.h> #define DEBUG_TYPE "cvi_backend_gru_...
ALGO
0.889501
6.518723
c9d574b0-26f1-4ead-904f-be80ef178c6d
Karan-Veer-Singh/Leetcode
Dynamic Programming/823. Binary Trees With Factors.cpp
class Solution { public: int numFactoredBinaryTrees(vector<int>& arr) { int mod = 1000000007; int n = arr.size(); unordered_map<long long, long long> mp; sort(arr.begin(), arr.end()); int ans = 0; for (int i = 0 ; i < n ; i++) { mp[arr[i]] += 1; ...
ALGO
0.999979
6.347824
76006f2a-2532-40af-bfe8-a9c435092da1
raincross7/code-similarity
codes/train_code/problem373/problem373_317.cpp
#include<bits/stdc++.h> #include<boost/variant.hpp> using namespace std; typedef long long ll; typedef vector<boost::variant<bool, ll, int, string, double>> any; template<typename T> inline void pr(const vector<T> &xs){ for(int i=0; i<xs.size()-1; i++) cout << xs[i] << " "; cout << xs[xs.size()-1] << endl; } template...
ALGO
0.999982
3.61935
7581f9ea-b6cd-4cff-9e59-079794019525
TheRakibJoy/Algorithms
Dynamic Programming/CF - 1195C - Basketball Exercise with dp.cpp
#include<bits/stdc++.h> #define Input freopen("in.txt","r",stdin) #define Output freopen("out.txt","w",stdout) #define ll long long int #define ull unsigned long long int #define pii pair<int,int> #define pll ...
ALGO
0.999949
3.384248
626b3e50-5ba7-4dfe-891e-f8a87d6cd1af
vaibhav-oo7/cpp
11.pigeonhole/1_subsets.cpp
#include <bits/stdc++.h> using namespace std; int main() { // #ifndef ONLINE_JUDGE // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); // #endif int t; cin >> t; while (t--) { long long int n; cin >> n; // no of elements in array long long int ar...
ALGO
0.999718
4.160435
b353644c-fc2a-4453-85ba-80a6eba4531e
Minipoloalex/comp_prog
codeforces/problems/1916/D/D.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; if (n == 1) { cout << "1\n"; } else { int cnt = (n - 3) / 2; vector<string> cur = {"169", "196", "961"}; for (int i = 0; i < cnt; i++) { vector<string> nxt; for (con...
ALGO
0.998754
4.867144
61084a72-5bc8-4fa9-a438-18d63b511d33
DeepakNayak0165/cs-LAB4b
lab4b Q8.cpp
#include<iostream> using namespace std; int sumDigits(int n) { if (n > 0){ return n%10 + sumDigits(n/10); } } int main(){ int n; cout << "Enter n = "; cin >> n; cout << "Sum of digits in " << n << " is " << sumDigits(n) << "." << endl; return 0; }
ALGO
0.999667
5.496326
801fedf2-d66e-4841-bc2d-7d07aca1c161
brown722/FHE-BGV
src/matching.cpp
#include "matching.h" #include <queue> static long augmenting_path(vector<long>& p, FlowGraph& g, long src, long sink); // Run BFS to find a shortest augmenting path void printFlow(FlowGraph& fg) { cout << "Flow graph in format from->to: flow(capacity):\n"; for (long i=0; i<(long)fg.size(); i++) for (FNeighbo...
ALGO
0.999312
4.521961
a0ba8b3b-865b-4d90-bcf7-39e50c8c5d17
Surajgupta001/DSA-CPP
Lecture 67(Binary Tree - 1)/Implementing_Tree_Node.cpp
/* Implementing Tree nodes */ #include <iostream> using namespace std; class node{ public: int value; node* left; node* right; // constructor node(int data){ value = data; left = NULL; right = NULL; } }; // Displaying the tree void display(node *root){ if(root...
ALGO
0.999956
5.449501
669b474d-4597-4fdd-ad6f-f8850d91e1db
Aarush-Shukla/IT
Linked List/Middle_Of_Linked_List.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; Node() { this->data = 0; next = NULL; } Node(int data) { this->data = data; this->next = NULL; } Node(int data, Node* next) { this->data = data; ...
ALGO
0.999914
5.170354
6bee3679-e99a-473a-b73f-615bff4332e2
vstineau/modules-cpp
cpp02/ex03/main.cpp
#include <iostream> #include "Point.hpp" //int main( void ) //{ // Point a(12.0f, 3.0f); // Point b(-12.0f, -3.0f); // Point c(1.0f, 2.0f); // Point d(1.0f, 2.0f); // if (bsp(a, b, c, d)) // std::cout << "d is in triangle abc" << std::endl; // else // std::cout << "d is not in triangle abc" << std::endl; //} //int ...
ALGO
0.919565
3.60391
2d63e8fa-bc85-4ed7-a1fc-e8ba86733cde
sontungexpt/UIT-Workspaces
C_C++/HocKi2_Nam1/UIT-Together/MangHaiChieu/Bai033/Bai033.cpp
#include <iostream> #include <fstream> #include <string> #include <iomanip> #include <cctype> #include <math.h> using namespace std; #define MAXR 500 #define MAXC 500 //initalize function void Nhap(string, int[][MAXC], int&, int&); void Xuat(int[][MAXC], int, int); int LeDau(int[][MAXC], int, int); int LeLonNhat(in...
ALGO
0.998593
3.270619
af68b17c-3cf0-460a-a5bb-fc89007cb79f
chaeonee/baekjoon
C++/15686_치킨배달.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; struct Pos{ int x, y; }; int Choice(int M, int s, int depth, int min_dist, vector<Pos> house, vector<Pos> chicken, vector<Pos> pick); int getChickenDist(vector<Pos> house, vector<Pos> pick); int getDist(int x1, int y1, int x2, int y2); int ...
ALGO
0.999797
4.695655
1386537d-a093-4c39-84b1-8ab947b33a99
YeongjeKim/CodeTree
250220/소수 판별기/prime-number-discriminator.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; bool test = true; for (int i = 2; i < n; i++) { if (n % i == 0) test = false; } if (test == true) { cout << 'P' << endl; } else { cout << 'C' << endl; } return 0; }
ALGO
0.99998
4.300696
6fdc9543-59b5-4726-a129-5f8340a7e9d7
USE-jx/leetcode-with-cpp-and-python
cpp_source_code/226.翻转二叉树.cpp
/* * @lc app=leetcode.cn id=226 lang=cpp * * [226] 翻转二叉树 */ // @lc code=start #include <queue> #include <stack> using namespace std; // struct TreeNode // { // int val; // TreeNode *left; // TreeNode *right; // TreeNode() : val(0), left(nullptr), right(nullptr) {} // }; /** * 方法一:递归, 前中后序皆可实现 *...
ALGO
0.999994
6.507502
c9acb548-fe29-4cc8-9923-e25e8a57dd6b
utisam/action_unit_architecture
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
fbe0dbce-4e91-4a6b-b956-a40941595eaf
Justinshao33/competitive_programming
done/AtCoder/058_Original_Calculator_4.cpp
#pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx,popcnt,sse4,abm") #include<bits/stdc++.h> using namespace std; #define ZTMYACANESOCUTE ios_base::sync_with_stdio(0), cin.tie(0) #define ll long long #define ull unsigned long long #define pb push_back #define all(a) (a).begin(), (a).end() #define debug(x) ...
ALGO
0.999991
4.423139
4ba998a3-6400-499c-a539-16a636ec2461
barjinderpaul/CSE-329-Prelude-to-competitve-coding-
euler totient function naive.cpp
#include<bits/stdc++.h> using namespace std; int eulerTotientFunction(int n){ int count=0; for(int i=1 ;i < n ;i++) if(__gcd(i,n) == 1) count++; return count; } int main(){ int n; cin>>n; cout<<eulerTotientFunction(n); }
ALGO
0.999549
5.007102
334a8f4c-fe2e-440e-8a67-14bb3be69913
lithric/CSIS
Lab 2/rectanglearea_ok.cpp
// This program will output the circumference and area // of the circle with a given radius. // Elion Oliver #include <iostream> using namespace std; const int LENGTH = 8; const int WIDTH = 3; int main() { int area; // definition of area of circle int perimeter; // definition of circumference perimet...
TOOL
0.883622
3.806099
5c17c46d-fb55-40ec-95ce-66ae759873df
LevBarash/PMRQMC
datasummary.cpp
// // This utility analyses "qmc_data_*.dat" files in the current directory // and outputs detailed summary of the completed calculations // #include<iostream> #include<filesystem> #include<vector> #include<string> #include<cctype> #include"mainQMC.hpp" namespace fs = std::filesystem; double mean_derived_O[N_derived...
DATA
0.982403
4.801354
5913e49e-a0c8-48dc-95cc-744b9b6d4dd3
AnselGitAccount/USERMESO-2.0-mdpd
src/MISC/fix_viscosity.cpp
/* ---------------------------------------------------------------------- Contributing author: Craig Tenney (UND) added support for swapping atoms of different masses ------------------------------------------------------------------------- */ #include "math.h" #include "mpi.h" #include "str...
ALGO
0.998415
5.250923
8fc3ad55-6a8c-427c-a228-30815dc7e53b
dhrdlxl/BOJ
10866.cpp
#include<iostream> #include<string> using namespace std; const int MAX=10001; template<typename T> class deque{ private: T array[MAX]; int begin; int end; public: deque():begin(0),end(0){} bool empty() { if(begin==end)return true; return false; } void push_fr...
ALGO
0.999416
4.059995
d0f84ee4-9022-433a-b8e7-208b89c3da85
piyushvermaa/Codeforces
A_Phone_Desktop.cpp
#include "bits/stdc++.h" using namespace std; #define INF 1000000000000000003 #define PI 3.1415926535897932384626433832795 #define mod 1e9 + 7 #define F first #define S second #define ll long long #define pii pair<int, int> #define pll pair<long long, long long> #define mkp make_pair #define vi vector<int> #define vl...
ALGO
0.999719
4.608129
8664649a-0753-40bd-b37f-dd884a410891
sergey-pashaev/sedgewick-cpp
src/chapter-1/program.1.1.cpp
// program.1.1 // en: Quick-find solution to connectivity problem // ru: Решение задачи связности методом быстрого поиска #include <array> #include <iostream> static const int N = 1000; int main() { std::array<int, N> id; for (int i = 0; i < N; ++i) id[i] = i; int p, q; while (std::cin >> p >> q) ...
ALGO
0.999738
5.080248
c0f0ba3c-dcf0-4642-b133-a0d58d32b3eb
soonsoo3595/To_Win_Code_Test
1063.cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 8; string dol, king; int dy[] = { 0, 0, -1, 1, 1, 1, -1, -1 }; int dx[] = { 1, -1, 0, 0, 1, -1, 1, -1 }; int Translate(string move) { if (move == "R") { return 0; } else if (move == "L") { return 1; } else if (move == "B") { return 2; } ...
ALGO
0.999815
5.165104
e990f705-8865-4857-a401-447a22a05337
Nishagupta14/competitive-code
connectedgraph.cpp
/* Time Complexity: O(N + M) Space Complexity: O(N + M) Where N is the total number of nodes and is total number of edges */ int makeGraphConnected(int n,vector<pair<int,int>>edges,int m){ if(m<n-1){ return -1; } //to store vertices that are directly connected to ith node vect...
ALGO
0.999821
5.498982
94c7e539-97f0-497f-bd9e-86c70974c433
duyenbit2212/The-NOOB
Wecode_GotTalent/Official/TimSo/SinhTest.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long ld; #define FOR(i,a,b)\ for (auto i = a; i != b; i++) #define fi first #define se second const ld Lim = 1e5;//Gioi Han 10^5 set <ld> P; void Gen(fstream &in,fstream &out,ld t){ ld n = Lim; ld x,y; if (t <= 3){ do n = rand()%10 +...
ALGO
0.99616
3.298646
96e87161-19e4-45a5-8056-7061aed5843f
MrAryan8728/DSA-100-days
Day14/Left_Rotate.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int>> rotateMatrix(int k, vector<vector<int>> mat){ // code here int n = mat.size(), m = mat[0].size(); k = k % m; for (int i = 0; i < n; i++) { rotate(mat[i].begin(), mat[i].begin() + k, mat[i].end()); } return mat; }
ALGO
0.999964
4.97889
32985fcd-c261-4e4d-b209-e1906f3f2495
PiseyYou/3399pro_carplate
c_test_pro/rtsp_recv_lpate_AITest/src/ourMD5.cpp
#include "ourMD5.hh" #include <NetCommon.h> // for u_int32_t, u_int64_t #include <string.h> #define DIGEST_SIZE_IN_BYTES 16 #define DIGEST_SIZE_IN_HEX_DIGITS (2*DIGEST_SIZE_IN_BYTES) #define DIGEST_SIZE_AS_STRING (DIGEST_SIZE_IN_HEX_DIGITS+1) // The state of a MD5 computation in progress: class MD5Context { public: ...
ALGO
0.98033
6.589256
98dfca29-4c30-45ab-874e-4b432c3b7af9
thegamer1907/Code_Analysis
Implementation/2455.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n , maxN = 0 , now = 0; cin >> n; for(int i = 1 ; i <= n ; i++){ int a , b; cin >> a >> b; now = now - a + b; maxN = max(maxN , now); } cout << maxN; return 0; }
ALGO
0.999785
3.50553
28e164b2-ee79-4b92-a4f8-7d1685a8180e
psuplus/CtChecker
lib/CodeGen/AggressiveAntiDepBreaker.cpp
#include "AggressiveAntiDepBreaker.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/RegisterClassInfo.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #i...
ALGO
0.96799
5.195546
41149778-7b63-45e3-8b4d-3995f6a72455
sahiljlolage/LB
program206.cpp
// accept 2 no,return largest number. #include<iostream> using namespace std; class Number { public: int iNo1; // as a characterstics int iNo2; int Maximum() { if(iNo1 > iNo2) { return iNo1; } else ...
ALGO
0.998751
4.270391
3f05509c-8154-4d4b-a04d-7845d5582510
VladimirBalun/LeetCode
Algorithms/Medium/LetterCombinationsOfAPhoneNumber.cpp
#include "../Helpers.hpp" // Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order. // A mapping of digits to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. // ...
ALGO
0.997839
7.147367
ec263215-3793-4708-b633-bbfefd3fdf28
alexandraback/datacollection
solutions_5648941810974720_1/C++/CodeGreg/A.cpp
#include <iostream> #include <fstream> #include <iomanip> #include <cmath> #include <algorithm> #include <functional> #include <vector> #include <map> #include <set> #include <tuple> #include <ctime> #include <cstdlib> #include <queue> using namespace std; #define D(x) x #define REP(i,a,b) for (int i = (a); i < (b); ...
ALGO
0.999498
3.841555
1f9e8ab8-172f-4090-8b75-ec3223af0b0d
cryptoquick/bitcoin-starius
src/pubkey.cpp
#include <pubkey.h> #include <hash.h> #include <secp256k1.h> #include <secp256k1_ellswift.h> #include <secp256k1_extrakeys.h> #include <secp256k1_recovery.h> #include <secp256k1_schnorrsig.h> #include <span.h> #include <uint256.h> #include <algorithm> #include <cassert> namespace { struct Secp256k1SelfTester { ...
TOOL
0.915901
7.83379
1d3a287f-66da-4f74-8ede-01eee97941e6
rjodon/coinor-ipopt-with-cmake
src/Algorithm/IpGenAugSystemSolver.cpp
#include "IpGenAugSystemSolver.hpp" #include "IpTripletHelper.hpp" #include "IpDenseVector.hpp" namespace Ipopt { #if COIN_IPOPT_VERBOSITY > 0 static const Index dbg_verbosity = 0; #endif GenAugSystemSolver::GenAugSystemSolver( GenKKTSolverInterface& SolverInterface ) : AugSystemSolver(), solver_interface_...
TOOL
0.998339
6.551234
8edc503c-ac1f-4386-9848-0c00726d78b8
Zhang-Each/pat-and-leetcode
LeetCode/0504.七进制数.cpp
/* * @lc app=leetcode.cn id=504 lang=cpp * * [504] 七进制数 */ // @lc code=start #include <string> #include <vector> using namespace std; class Solution { public: string convertToBase7(int num) { if (num == 0) { return "0"; } vector<int> nums; string res; if (num...
ALGO
0.998962
6.055553
74ce047a-1ad0-4556-b571-1d7110c2c171
TomorrowIppo/ROKA_BOJ
Just/BOJ_1402.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int a, b, t; cin >> t; while(t--) { cin >> a >> b; cout << "yes\n"; } return 0; }
ALGO
0.999793
4.553307
6ead65d6-f924-4a4e-b32d-ec773a18b132
Mrsrudra/CG
floodfilling.cpp
#include <iostream> #include <math.h> #include <GL/glut.h> using namespace std; void init() { glClearColor(0.0,0.0,0.0,0.0); gluOrtho2D(0,640,0,480); } void flood_it(int x, int y, float* fillColor, float* ic) { float color[3]; glReadPixels(x,y,1.0,1.0,GL_RGB,GL_FLOAT,color); if(color[0]==ic...
ALGO
0.907932
4.811433
20cffa42-a481-475c-8135-58ca921d9f6f
ourgames/MiniGames
minigame/cocos2d/tools/simulator/frameworks/runtime-src/Classes/ide-support/RuntimeLuaImpl.cpp
// // RuntimeLuaImpl.cpp // Simulator // // #include "RuntimeLuaImpl.h" #if (COCOS2D_DEBUG > 0) && (CC_CODE_IDE_DEBUG_SUPPORT > 0) #include <cstdio> #include <string> #include "lua_debugger.h" #include "CCLuaEngine.h" #include "LuaBasicConversions.h" #include "lua_module_register.h" #include "runtime/Runtime.h" ...
TOOL
0.967426
3.754795
58da9bfe-bedc-4d16-b5da-65f631d735cb
tanmayarya29/gfg_dsa_self_paced
Dynamic_programming/programs/subsetSum.cpp
#include<bits/stdc++.h> using namespace std; //2^n time int countSubsets(int arr[],int n,int sum){ if(n==0){ return sum==0?1:0; } return countSubsets(arr,n-1,sum-arr[n-1])+countSubsets(arr,n-1,sum); } //dp time n space nxsum int countSubsetsdp(int arr[],int n,int sum){ int dp[n+1][sum+1]; f...
ALGO
0.999833
4.301487
8be67ca8-993f-4af9-81f2-6d85eb0d497d
mahtab04/Cpp-Programs
Leetcode/averageSalary.cpp
// https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary #include <bits/stdc++.h> using namespace std; double average(vector<int> &salary) { double sum = 0; int min_element = INT_MAX; int max_element = INT_MIN; for (auto &sal : salary) { min_element = min(mi...
ALGO
0.999824
5.679921
78240405-de51-4045-ae08-ab1b96ec0c2d
ArrayCoreDevelopers/Array
src/chainparams.cpp
#include "chainparams.h" #include "consensus/merkle.h" #include "tinyformat.h" #include "util.h" #include "utilstrencodings.h" #include <assert.h> #include <boost/assign/list_of.hpp> #include "chainparamsseeds.h" #include "arith_uint256.h" using namespace std; static CBlock CreateGenesisBlock(const char* pszTimes...
CONFIG
0.925763
5.69123
81f761d8-d261-48ec-9313-651722b4b8fa
ishandutta2007/codeforces
generic_placeholder_name/normal/1495/C.cpp
#pragma GCC optimize("Ofast") #pragma GCC optimization("unroll-loops, no-stack-protector") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/trie_policy.hpp> #include <ext/rope> using namespace std; using namespace __gnu_pbds; using namespace __gn...
ALGO
0.999686
4.392593
8d63554d-5654-4092-8685-857a2b8d194a
giongto35/CompetitveProgramming
B273.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <que...
ALGO
0.999984
3.264557
d091ef17-3880-43a1-940f-bef5e3cda42a
rbuserr/linearAlgebraProject
Library/eigen-master/test/sparseLM.cpp
#include "main.h" #include <Eigen/LevenbergMarquardt> using namespace std; using namespace Eigen; template <typename Scalar> struct sparseGaussianTest : SparseFunctor<Scalar, int> { typedef Matrix<Scalar, Dynamic, 1> VectorType; typedef SparseFunctor<Scalar, int> Base; typedef typename Base::JacobianType Jacobi...
TEST
0.985753
6.455641
855b1672-1c7e-42ee-9a42-d6c33b2e0ca8
Elaine-DWL/Leetcode
leetcode_561_array partition 1.cpp
#include <iostream> using namespace std; // ùϣ λõ֮ class Solution { public: int arrayPairSum(vector<int>& nums) { int myhash[20001]={0}; // תɹϣ洢 for(int num:nums) myhash[num+10000]++; int flag=1;// жDzλ ʼλ int sum=0;// 洢ܺ int cnt =0;// 洢ǰѾۼӵĸ for(int i=0; i<...
ALGO
0.999431
5.035777
38528b8d-d9e8-4807-b757-1e67782350a1
devkev/bsonview
src/third_party/mozjs-60/extract/js/src/jit/ValueNumbering.cpp
#include "jit/ValueNumbering.h" #include "jit/AliasAnalysis.h" #include "jit/IonAnalysis.h" #include "jit/JitSpewer.h" #include "jit/MIRGenerator.h" using namespace js; using namespace js::jit; /* * Some notes on the main algorithm here: * - The SSA identifier id() is the value number. We do replaceAllUsesWith as...
ALGO
0.994839
6.251199
5356c88b-5fb8-41e2-b64a-a07b56314cb6
Satosh1A/competitiveprogramming2
Atcoder/Boot camp for Beginners/Easy/ABC079B.cpp
#include <iostream> #include <string> #include <algorithm> #include <cmath> #include <vector> #include <deque> #include <set> #include <unordered_map> using namespace std; using ll = long long; const int inf = 1e9; const int mod = 1e9+7; const ll linf = 1e18; #define rep(i,a,b) for(int i=(a);i<(b);++i) #define chmin(a,...
ALGO
0.999986
5.727468
1d1084f3-6eed-4d68-b18e-de1e00279493
lkoiescg2031/APSS
Baekjoon Online Judge/10817.cpp
#include <cstdio> #include <algorithm> using namespace std; int main() { int a[3];; scanf("%d %d %d", a, a + 1, a + 2); sort(a, a + 3); printf("%d", a[1]); return 0; }
ALGO
0.999596
3.357365
b723ef29-b927-4af3-8ef7-9da3649bc07e
vo-hong-thanh/stochfold
pseudoknot-based-simulation/src/analyzer/Analyzer.cpp
#include "Analyzer.hpp" #include <fstream> #include <omp.h> #include <cstdio> #include <cmath> #include <vector> #include <iostream> #include <unordered_map> #include <unordered_set> #include <queue> #include <functional> #include <cassert> void Analyzer::countAnalysis( double starttme, double interval,double maxt...
ALGO
0.985215
3.398736
49e514c2-ff9b-4385-814d-d6fa37f3b3fa
kazunetakahashi/atcoder
2020/0118_keyence2020/D.cpp
#define DEBUG 1 /** * File : D.cpp * Author : Kazune Takahashi * Created : 2020/1/18 21:28:34 * Powered by Visual Studio Code */ #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <chrono> #include <cmath> #include <complex> #include <cstdint> #include <cstdio> #include <cstdl...
ALGO
0.999969
4.632638
02538d6d-3a57-471b-8cf7-a0b23843c0d5
suman105/LeetCode-Top-100-Liked-Problems
Linked Lists/148 Sort List.cpp
class Solution { public: ListNode* sortList(ListNode* head) { if (!head || !head->next) { return head; } ListNode* mid = findMiddle(head); ListNode* left = head; ListNode* right = mid->next; mid->next = nul...
ALGO
0.999986
6.163226
72570bc1-cab2-4a00-a14c-afd42725655f
yilinguo121/cp
a337.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> v(n), dp(n); for (int i = 0;i < n;i++) { cin >> v[i]; } dp[0] = v[0]; dp[1] = v[1]; dp[2] = v[2] + min(dp[0], dp[1]); for (int i = 3;i < n;i++) { dp[i] = v[i] + min({dp[i - 1], dp[i - 2], dp[i - 3]}); } cout << min(dp[...
ALGO
0.99999
4.168636
ece10771-9af4-4626-aadf-3364285cb118
Kraanter/PeopleParty
backend/src/minigames/right_on_time/right_on_time_mini_game.cpp
#include "right_on_time_mini_game.h" #include "../../game.h" RightOnTime_Minigame::RightOnTime_Minigame(Game *game) : MiniGame(game) { std::vector<Client*> clients; for (auto client : game->get_clients()) { if (client->isHost) { host = client; } } target = new RightOnTime_M...
ALGO
0.971057
6.007459
829c3279-a6a0-429c-9d55-2332f11dd149
ngodangtan/Data_Structure_And_Algorithm
Code_Qua_Trinh/Buoi06_24_03/DemoHashtable.cpp
// // Created by Ngo Dang Tan on 21/2/25. // MSSV: <EMAIL> // #include <iostream> using namespace std; // Bước 1: Định nghĩa cấu trúc Node struct Node { int data; Node* pNext; }; // Bước 2: Cấp phát động, khởi tạo Node Node* initNode(int value) { //return new Node({value, NULL}); Node *p = new Node; //p->d...
ALGO
0.999701
5.21206
1bbb0c47-dcdb-4cb4-b046-b676e19cadc7
gaeun6883/2021.mentoring
0216.백준16234.인구 이동.cpp
//mentoring 216. 2022.4.28 //bfs #include <iostream> #include <queue> #include <utility> #include <cstring> #define MAX 53 using namespace std; int n, l, r, country[MAX][MAX], population[MAX][MAX], visited[MAX][MAX]; int m = 0, result = 0; int dx[4] = { 1, -1, 0, 0 }; int dy[4] = { 0, 0, 1, -1 }; void bfs(int a, int...
ALGO
0.999949
3.203993
18bb0ef9-174d-4d7d-9b75-2ff8ad5fe448
geekxByte/DSA-Solution
Best Time to Buy and Sell Stock II.cpp
class Solution { public: int solve(int idx,int buy,int n,vector<int>& prices,vector<vector<int>>&dp){ if(idx==n) return 0; int profit=0; if(dp[idx][buy]!=-1) return dp[idx][buy]; if(buy==1) profit=max(-prices[idx]+solve(idx+1,0,n,prices,dp),solve(...
ALGO
0.999969
6.027041
a8e40ad6-53d5-4297-9917-5907e77b3c15
fyrsta7/LLM_on_ASAC
result_api_backup/en_without_annotation_mzn/gpt-4o/Todays_Meal_at_Emiyas_House.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int MOD = 998244353; int n, m; vector<vector<int>> a; vector<vector<pair<int, int>>> plans; vector<int> methods; int num = 0; int result = 0; bool isValidPlan(const vector<pair<int, int>>& plan) { // Check if rows and columns ...
ALGO
0.999991
5.372179
16ec015e-be66-40d2-ba66-6cfbc804a11f
guoliqiang/coding
third_part/boost/boost_1_53_0/libs/graph/example/vf2_sub_graph_iso_example.cpp
#include <boost/graph/adjacency_list.hpp> #include <boost/graph/vf2_sub_graph_iso.hpp> using namespace boost; int main() { typedef adjacency_list<setS, vecS, bidirectionalS> graph_type; // Build graph1 int num_vertices1 = 8; graph_type graph1(num_vertices1); add_edge(0, 6, graph1); add_edge(0, 7, graph1); ...
ALGO
0.993989
5.961143
f08f233b-61ee-47cc-bdcf-b05d3292fd6f
ShaipLovchali/Sofia-University
Intro-To-Programming/Functions/SwapNumbers/SwapNumbers.cpp
#include <iostream> using namespace std; void swapNumbers(int &a, int &b) { a += b; b = a - b; a -= b; } int main() { int a = 11; int b = 6; swapNumbers(a, b); cout << a << " " << b << endl; }
ALGO
0.997251
5.213624
55850c34-b1e3-49c2-be60-f599cf33f92b
Sepehrman/Algorithms_Coursework
A3/src/UnorderedSet.cpp
/** * @author Sepehr Mansouri * @StudentNumber A01067581 */ #include "../include/UnorderedSet.h" using namespace std; /** * A constructor for our Unordered Red-Black-Tree Set. Responsible for initializing everything on our tree */ template<typename Key> UnorderedSet<Key>::UnorderedSet() { root = ...
ALGO
0.953262
5.546943
67b1514a-6d81-4ab0-8ebe-e9fa8b26d58f
dmkz/competitive-programming
codeforces.com/Codeforces Ladder 1700-1799 (extra)/0387C.cpp
/* Problem: 387C. George and Number Solution: greedy, strings, comparison, O(n) Author: Dmitry Kozyrev, github: dmkz, e-mail: <EMAIL> */ #include <iostream> #include <string> #include <cassert> #include <algorithm> int compare(const std::string& s, const std::string& t) { if (s.size() < t.si...
ALGO
0.999638
4.950097
0c3e7262-e08e-4713-9673-d26d0cf4eb12
coeing/cframework
framework/ext/boost/libs/intrusive/example/doc_bucket_traits.cpp
using namespace boost::intrusive; //A class to be inserted in an unordered_set class MyClass : public unordered_set_base_hook<> { int int_; public: MyClass(int i = 0) : int_(i) {} friend bool operator==(const MyClass &l, const MyClass &r) { return l.int_ == r.int_; } friend std::size_t has...
TOOL
0.948325
5.927308
d47f1133-536f-4896-b9b8-4171db7bceb4
KARMAKAR7/DailyLeetCode
945-snakes-and-ladders/snakes-and-ladders.cpp
class Solution { public: int n ; pair<int,int> getCordinates(int s){ int row = n-1-(s-1)/n; int col = (s-1)%n; if((n%2==1 && row%2==1)||(n%2==0 && row%2==0)) col = n-1-col; return make_pair(row, col); } int snakesAndLadders(vector<ve...
ALGO
0.999894
6.153518
741058ff-20ba-4dcc-a3e5-728427b9dc58
increedBull7/Cpp_city
Alogorithms/selection_sort_phirse.cpp
/* SELECTION SORT Working Logic----->> 1= Select the smallest value from the list. 2= Swap the smallest value for the first value of the list. 3= Again select the smallest value from the list, but this time exclude the first value. 4= Swap this value with the second value of the list. 5= Keep do...
ALGO
0.999988
4.284043
0c895a52-4bb2-4fc0-a056-2b4d9de1b8ba
Trung1234/AlgorithmExcercise
DataStruct2/queue.cpp
#include <iostream> #include <fstream> #include <math.h> #include <string.h> #include <stdio.h> #include <map> #include <stack> #include <queue> using namespace std; int n; void solve(){ queue<int> qu; for(int i;i<=n;i++) qu.push(i); // qu.front() tro den phan tu dau cua queue // qu.empty() check queue...
ALGO
0.999165
3.637384
21a03812-8242-45f7-b63e-b54497615220
Sumyeong-Jang/Coding
SDS특강/sds그래프2/#1753_최단경로_sample.cpp
#include <iostream> #include <queue> #include <vector> #include <cstring> #define INF 200001 using namespace std; struct Data { int n, w; Data() {}; Data(int n, int w) : n(n), w(w) {}; bool operator<(const Data d) const { return w > d.w; } }; int V, E, K; int u, v, w; vector<Data> road[...
ALGO
0.999986
4.232209
e481d97e-7fc5-4208-8f94-c70d399a8531
shreyans-sureja/Spoj_problems
ABA12C - Buying Apples!.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pii; typedef vector<ll> vll; #define ff first #define ss second #define pb(x) push_back(x) #define sl(x) scanf("%lld",&x) #define sll(x,y) scanf("%lld%lld",&x,&y) #define slll(x,y,z) scanf("%lld%lld%lld",&x,&y,&z) #define pl(x) prin...
ALGO
0.999963
3.633626
24d2de37-8d3d-46b1-a958-1d8b06f93888
plctlab/llvm-project
llvm/tools/llvm-cvtres/llvm-cvtres.cpp
#include "llvm/ADT/StringSwitch.h" #include "llvm/Object/Binary.h" #include "llvm/Object/WindowsMachineFlag.h" #include "llvm/Object/WindowsResource.h" #include "llvm/Option/Arg.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" #include "llvm/Support/BinaryStreamError.h" #include "llvm/Support/Error.h...
TOOL
0.865015
7.016566
1ca50875-1f81-4036-b83f-f8bcfc2772f1
ShivamK2002/gfgProblems
Medium/Prefix to Infix Conversion/prefix-to-infix-conversion.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: string preToInfix(string exp) { reverse(exp.begin(),exp.end()); stack<string>st; for(auto i:exp){ ...
ALGO
0.998261
6.427774
3044d240-d6d8-4f28-b2b9-14402a3e9e29
Hadeel-Abdeljalil/MyLeetCodeSolutions
0005-longest-palindromic-substring/0005-longest-palindromic-substring.cpp
class Solution { public: string ans = ""; void expand(string &s , int left ,int right) { while(left >= 0 && right < s.size()) { if(s[left] != s[right]) break; left--,right++; } if(ans.size() < right - left ) ans = s.substr(...
ALGO
0.999991
5.87571
e53c4703-e223-4aab-b4c9-19ce329cba56
rustbuggy/sharprust
firmware/kalman.cpp
// Idea from: http://pengu.student.utwente.nl/wordpress/?p=116 #include "kalman.h" static fixed VAL_1(1); // Single variable Kalman filter SingleKalmanVar::SingleKalmanVar(const fixed& x, const fixed& P, const fixed& Q, const fixed& R) { this->x = x; // variable estimate this->P = P; // error (variance) estimate...
ALGO
0.999365
6.026834
4005f89c-a912-4354-8112-a55e556c44a8
ziadwaelai/ProblemSolving
Gym/102397B/33031372_AC_31ms_3660kB.cpp
#include <iostream> using namespace std; int main() { int A; cin >> A; int x=0,y=0; for(int i=2;i*i<=A;i++){ x=i; y=A/i; break ; } if(x*y==A){ cout<<x<<" "<<y; }else{ cout<<1<<" "<<A; } }
ALGO
0.999925
4.31797
1ce09079-fe28-40ba-97ba-3de005c1ae45
kupian/monte-carlo
boost_1_82_0/libs/bimap/example/mi_to_b_path/mi_hashed_indices.cpp
/***************************************************************************** Boost.MultiIndex *****************************************************************************/ #include <boost/config.hpp> //[ code_mi_to_b_path_mi_hashed_indices #include <iostream> #include <iomanip> #include <boost/tokenizer.hpp> #i...
ALGO
0.902379
6.695371
ee87dd57-b3a9-4bfe-b96f-4eeae0793f58
arcogelderblom/AdventOfCode
2020/Day03/src/main.cpp
#include <iostream> #include "FileHandler.hpp" #include "StringParser.hpp" #include "TobogganRide.hpp" int main(void) { FileHandler fileHandler("input-files/2020/day03.txt"); std::vector<std::string> input = StringParser::toVector(fileHandler.getBuffer(), "\n"); TobogganRide ride; std::cout << "Puzzl...
ALGO
0.975934
5.881507
7698643e-9023-4bcc-94ab-63ca5646d9da
anfastech/Coding-Challenge
6 - Let's Review/Solution.cpp
#include <iostream> using namespace std; int main() { int N; cin >> N; for (int i = 0; i < N; i++) { string str; cin >> str; for (int j = 0; j < str.length(); j++) { if (j % 2 == 0) cout << str[j]; } cout << " "; for (int j = 0; j < str.lengt...
ALGO
0.999986
4.618581
a6322841-3ecd-426c-8f75-1ae06010fb77
xfrnk2/1d1cpp
src/boj/p13k/p13900/P13985.cpp
#include <iostream> #include <string> using namespace std; static char arr[10]; int main() { cin.getline(arr, 10); cout << (((arr[0] - '0') + (arr[4] - '0') == (arr[8] - '0')) ? "YES" : "NO"); }
ALGO
0.998591
3.289804
fc63fa3d-b58c-4c75-9a64-9a00c367d67e
stutimi/GFG1
Difficulty: Medium/Bottom View of Binary Tree/bottom-view-of-binary-tree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; #define MAX_HEIGHT 100000 // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; ...
ALGO
0.999448
6.579228
1f75dda1-09b5-4b88-aa4d-473d7d0c22f1
Amitrahar728/GFG-Journey-
Difficulty: Medium/Maximum Product Subarray/maximum-product-subarray.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: // Function to find maximum product subarray int maxProduct(vector<int> &arr) { int n = arr.size(); // -------------------BRUTE FORCE APPROACH--------...
ALGO
0.999292
6.34436
e3b09a2b-5b0e-4c8e-9f7a-58b69e0dcfbb
Carbon-Zero/CarbonZero
src/crypto/scrypt.cpp
#include "crypto/scrypt.h" #include "uint256.h" #include "utilstrencodings.h" #include <openssl/sha.h> #include <string> #include <string.h> #include <stdint.h> static inline void be32enc(void *pp, uint32_t x) { uint8_t *p = (uint8_t *)pp; p[3] = x & 0xff; p[2] = (x >> 8) & 0xff; p[1] = (x >> 16) & 0x...
ALGO
0.998799
5.312294
46dd4aae-effb-438b-ad50-2ed820d1f48b
shallx/problem_solving
leetcode/math/258.cpp
#include <iostream> #include <stdio.h> using namespace std; // Reccursive Approach class Solution { public: int addDigits(int num) { int sum = 0; while(num){ sum += num%10; num /= 10; } if(sum < 10) return sum; return addDigits(sum); } }; int ma...
ALGO
0.999817
5.651225
cb86835d-7ca7-4377-a6e9-d16a46e86864
Raj-Thombare/dsa
basics/keywords/inlineFunctions.cpp
#include <iostream> using namespace std; inline int func(int &a, int &b) { return a > b ? a : b; } int main() { int a = 3, b = 1; int result; result = func(a, b); cout << result << endl; b = b + 3; result = func(a, b); cout << result << endl; }
ALGO
0.998982
4.475789
953e0f00-de13-484a-8301-ac2aaa5ff814
hjiang13/LLMs-in-IR
POJ-104/5/842.cpp
#include <iostream> using namespace std; int main(){ double k,m,n,s=0; int i; char a[501],b[501]; cin >> "%lf",&k); cin >> "%s",a); cin >> "%s",b); m=strlen(a); n=strlen(b); if(m!=n){ cout << "error"); } else{ for(i=0; i<m; i++){ if(((a[i]=='A')||(a[i]=='G')||(a[i]=='C')||(a[i]=='T'))&&((b[i]=='A')||(b[i]=='G')||(b[i]=...
ALGO
0.999965
3.214599
2a02ac8c-c89d-4331-b873-c8291709616c
sju07144/algorithm
taskscheduling.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<pair<int, int>> v; int num; bool compare(const pair<int, int>& a, const pair<int, int>& b) { return a.second < b.second; } int taskScheduling(void) { int max = 0; int finish = 0; for (int i = 0; i < num; i++) { if (v[i].fir...
ALGO
0.999967
5.117183
09f1df26-ba88-493d-aa32-382508abd6fe
emperor-2001/DSA-
Binary_Tree/height_Of_Tree.cpp
#include<bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i,n) for(int i=0;i<n;i++) #define Fo(i,k,n) for(int i=k;k<n?i<n:i>n;k<n?i+=1:i-=1) #define ll long long #define si(x) scanf("%d",&x) #define sl(x) scanf("%lld",&x) #define ss(s) scanf("%s",s) #define pi(x) printf("%d\n",x) #define pl(x)...
ALGO
0.999458
3.324873