uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
d1726b36-437a-4f70-a768-ca1ad8f333aa
mannuscript/kattis-solutions
different.cpp
#include<iostream> using namespace std; int main(void) { unsigned long long int a, b; while(cin>>a) { cin>>b; if(a > b) cout<<a-b<<endl; else cout<<b-a<<endl; } }
ALGO
0.999655
3.029521
4750a6ab-e049-437a-a6fd-eb658ddd8d7d
taekyom/StudyCPP
Chpt04/StaticConst.cpp
#include<Stdio.h> class MathCalc { private: static const double pie; public: MathCalc(){} void DoCalc(double r) { printf(" %.2f ѷ = %.2f\n", r, r * 2 * pie); } }; const double MathCalc::pie = 3.1416; int main() { MathCalc m; m.DoCalc(5); return 0; }
ALGO
0.9354
4.185275
a1485795-88a4-47bd-aaab-99126abd8582
devararendy/tcp_proxy
sdk/boost_1_77_0/libs/graph/test/bron_kerbosch_all_cliques.cpp
#include <iostream> #include <iterator> #include <algorithm> #include <vector> #include <map> #include <boost/graph/graph_utility.hpp> #include <boost/graph/undirected_graph.hpp> #include <boost/graph/directed_graph.hpp> #include <boost/graph/bron_kerbosch_all_cliques.hpp> #include <boost/graph/erdos_renyi_generator.h...
TEST
0.875571
6.895566
89ed97ea-7a38-47ea-97d9-916725220fb2
Komal7209/YouTube-Komal-Pal
Dynamic_Programming/Edit_Distance/Sol_memoised.cpp
class Solution { private: int dfs(string &word1, int n, string &word2, int m, vector<vector<int>>&dp){ if(n< 0) return m+1; // i.e one word ends thus using other word under insertion operation if(m < 0) return n+1; if(dp[n][m] != -1) return dp[n][m]; ...
ALGO
0.999998
5.975787
01945b0c-41c9-4b2e-8b65-febb64339cf4
aplqo/exercises
loj/1bentong/5-DP/4-Binary/10173-ArtilleryPosition.cpp
#ifdef APTEST #include "debug_tools/program.h" #endif #include <algorithm> #include <iostream> using namespace std; #define lowbit(x) ((x) & -(x)) const unsigned int maxn = 100, maxm = 10; constexpr unsigned int maxs = 500; unsigned int valid[maxs + 1], cnt[maxs + 1], cur; unsigned int f[maxn + 1][maxs + 1][maxs + 1];...
ALGO
0.999873
4.039337
efcd0934-287d-42ac-894f-8203eea0a15e
Eastplanet/Problem-Solving
11780.cpp
#include<iostream> #include<algorithm> #include<unordered_map> #include<cstring> #include<math.h> #include<queue> #include<vector> using namespace std; struct P{ int y, x; }; const int INF = 12345678; int N, M; int arr[101][101]; int visit[101][101]; vector<int> pathFind(int start, int end) { vector<int> path; i...
ALGO
0.999982
3.674947
a6b21f8f-e1b8-4dcd-bba2-b6028fa69952
Shaila-richi/simba
bfsMatrix.cpp
#include<bits/stdc++.h> using namespace std; # define m 100 int **g=new int *[m]; int visited[m]; int dis[m]; void bfs(int n,int v) { queue<int>Q; Q.push(v); visited[v]=1; dis[v]=0; while(!Q.empty()) { int p=Q.front(); Q.pop(); cout<<p<<" ...
ALGO
0.999973
4.25923
03311a07-24f3-4608-a154-766b1301dea6
ejaffe1/CollegeCourseWork
OfficeHourSimulation/OfficeHourSimulation.cpp
#include <iostream> #include <string> #include<queue> #include<map> #include<fstream> using namespace std; struct Student{ int servicetime; int priority; string topic; }; bool operator <(Student lhs,Student rhs); void OfficeHour(int& avrgwait, int& avrgserv, int& overtime, multimap<int,string>& stutopics, int& ...
ALGO
0.881615
4.268667
c880876a-bb89-44b8-adeb-744a3f503449
ElenaSmirnova/1c2013
Voronetckii Egor/Task 3/9.cpp
#include <cstdio> #include <iostream> #include <cmath> #include <ctime> using namespace std; int n; char str[1000]; int leftCnt = 0; void write(int i) { if (leftCnt * 2 > n || (i - leftCnt) * 2 > n) return; if (i == n) { printf("%s\n", str); } else { str[i] = 'A'; leftCnt++; write(i + 1);...
ALGO
0.999667
3.592619
5c216f4f-7045-4a8c-b592-445ddbdbde12
nmfisher/flutter_ffi_asset_helper
example/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.998905
6.785645
f016e07f-8d38-454b-a6b8-45c7cb6698c6
fgwu/leetcode-cpp
p038-count-and-say.cpp
class Solution { public: /*20170608 1421*/ /*AC 1438*/ string countAndSay(int n) { string s = "1"; while(--n){ string tmp = ""; s += "s"; // sentinel int cnt = 0, j = 0; for (int j = 0; j < s.size(); j++) { if (!j || s[j] == s[j - 1]) { cnt++; continue; } tmp += to_string(cnt); cnt = 1; ...
ALGO
0.999966
5.456985
933316f7-6ea3-4b1f-a785-86de4040c645
suqiang0313/leetcodeByChapter
Tree/leetcode235. Lowest Common Ancestor of a Binary Search Tree.cpp
""" title: 235. Lowest Common Ancestor of a Binary Search Tree url :https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ """ // solution1 : recursive /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(i...
ALGO
0.999997
6.601858
9e50169b-3f1b-4a49-bde5-12ae83496963
marcoag-ros2gbp/rt_manipulators_cpp-release
src/config_file_parser.cpp
#include <yaml-cpp/yaml.h> #include <fstream> #include <iostream> #include "config_file_parser.hpp" #include "joint.hpp" namespace config_file_parser { bool parse(const std::string& config_yaml, hardware_joints::Joints & parsed_joints) { std::ifstream fs(config_yaml); if (!fs.is_open()) { std::cerr << "コンフィグ...
TOOL
0.912624
6.064202
626a50c0-23de-48d8-9a25-4736aceac7d7
wisecashew/suite
Explicit_Solvation/implementations/HAMILTONIAN_GRAVEYARD/appropriately_biased/unit_tests/newer_tests/detailed_balance/tail_rotation/biased/TwoBead_C5/T_2/hr_bmain_o_n.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <array> #include <map> #include <utility> #include <array> #include <random> #include <numeric> #include <chrono> #include <getopt.h> #include <stdlib.h> #include "classes.h" #include "misc.h" // obtained all necessary libraries. ...
TOOL
0.962763
5.104673
bdab4185-9691-4447-8e55-3408d8a3919d
durgeshkk/Codeforces-Contests
2024_03_06_Practice/Contest_946_DIV_3/F_Cutting_Game.cpp
/* Once in a LifeTime, Will never let you Down!! */ #include <bits/stdc++.h> #include<iomanip> #include <deque> #include <bitset> #include <cstdint> //#include <ext/pb_ds/assoc_container.hpp> // Common file //#include <ext/pb_ds/tree_policy.hpp> //using namespace __gnu_pbds; //#define ordered_set tree<int, null_type,le...
ALGO
0.999385
3.494159
1081265e-9a84-4fbf-b61f-46457e44149e
huisedenanhai/aries-renderer
src/third_party/shaderc/third_party/glslang/glslang/MachineIndependent/reflection.cpp
#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) #include "../Include/Common.h" #include "reflection.h" #include "LiveTraverser.h" #include "localintermediate.h" #include "gl_types.h" // // Grow the reflection database through a friend traverser class of TReflection and a // collection of functions to do a liven...
TOOL
0.859666
8.045489
830d441d-3d1b-43f6-9d2e-5d4eb22e7596
sdsr/coding_test
main/2630.cpp
#include <iostream> using namespace std; void division(int, int, int); int paper[128][128]; int white = 0, blue = 0; int main() { int num; cin >> num; string temp; for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { cin >> paper[i][j]; } } division(0, 0, num); cout << white...
ALGO
0.999282
4.035717
6dde6fde-1361-48e0-a6b8-5c06868cfe8d
hareOuO/NK_openGauss
src/gausskernel/storage/access/hbstore/hbindex_am.cpp
#include "access/hbucket_am.h" #include "access/tableam.h" #include "nodes/execnodes.h" #include "nodes/plannodes.h" #include "utils/memutils.h" #include "workload/workload.h" #include "catalog/pg_hashbucket_fn.h" #include "optimizer/bucketpruning.h" static IndexScanDesc hbkt_idx_beginscan(Relation heapRelation, R...
ALGO
0.886049
3.905243
e956b8ce-ee96-4807-9f3b-50215700e720
aurelw/beholder
src/core/focustracker_interpolate.cpp
#include "focustracker_interpolate.h" void FocusTrackerInterpolate::init() { FocusTrackerMulti::init(); } float FocusTrackerInterpolate::getDistance() { Eigen::Affine3f dslrPose = poseTracker->getPose(); messure.setPose(dslrPose); trackedPointVisible = false; /* find first and second nearest tra...
ALGO
0.999649
5.723102
820f8468-6f80-4b9d-ac06-e48a5a004357
kielsonzinn/beecrowd
cxx/1047/main.cpp
#include <iostream> int main() { int horaInicial, minutoInicial, horaFinal, minutoFinal; std::cin >> horaInicial >> minutoInicial >> horaFinal >> minutoFinal; int horas; int minutos; if ( horaInicial < horaFinal || ( horaInicial == horaFinal && minutoFinal > minutoInicial ) ) { horas = h...
ALGO
0.997302
4.64409
c76a7a62-f8eb-46fa-bed0-25ae8a85781e
sdkl/LeetCode
088. Merge Sorted Array/main.cpp
#include<iostream> #include<vector> using namespace std; class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int last = m + n,cm = m - 1,cn = n - 1; while (last-- > 0 && (cm >= 0 || cn >= 0)) { if (cm < 0) nums1[last] = nums2[cn--]; else if (cn < 0) nums1[la...
ALGO
0.999952
4.628303
5715d954-9f84-4031-8e93-4b2746f53ff6
nitroamos/QMcBeaver
qmc-gpu/playtime.cpp
#include <iostream> #include <stdlib.h> #include <windows.h> #include <gl/glew.h> #include <gl/glut.h> #include <cg/cgGL.h> #include <time.h> #include "Array2D.h" #include "Stopwatch.h" #include "playtime.h" #include "matrix.h" #include "dgemm.h" #include "cppblas.h" #include "basisfunction.h" #include "GPUMatrixMult...
TOOL
0.93367
4.348361
5099a84f-4418-4a52-b305-49ad5407e791
aki-13627/cracking-the-coding-interview
chapter4/4-9.cpp
#include <bits/stdc++.h> #include "./treeNode.hpp" using namespace std; class Solution { public: vector<vector<int>> allSequences(TreeNode* root) { vector<vector<int>> result; if(!root) { result.push_back({}); return result; } ...
ALGO
0.999977
6.097933
bb026b9e-bccf-4f3f-a06c-2eb60a462709
chtang-hmc/cs149-hw
asst1/prog3_mandelbrot_ispc/main.cpp
#include <stdio.h> #include <algorithm> #include <getopt.h> #include "CycleTimer.h" #include "mandelbrot_ispc.h" extern void mandelbrotSerial( float x0, float y0, float x1, float y1, int width, int height, int startRow, int numRows, int maxIterations, int output[]); extern void mandelbrotThread( ...
ALGO
0.941966
5.611246
14cfbe04-bbd4-4a01-87a6-1eb88ac7301a
schowdhury671/Client-Server-chat-room-with-socket-programming
functionalities.cpp
#include <stdlib.h> #include <bits/stdc++.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/ip.h> #include <errno.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <string.h> #include <iostream> #include <fstream> using namespace std; #define dummy...
WEB
0.850153
4.020579
d58cdcff-7dcf-4018-bd84-371edce55410
resel143/algorithmByReshul
BSTsearchinCPP.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ int data; Node *right; Node *left; }; Node *head = NULL; Node* makeNode(int n){ Node *temp = new Node(); temp->data = n; temp->left = NULL; temp->right = NULL; return temp; } Node* AddEle(Node *newNode, int n){ if(newNode == NULL) newNode = makeNode...
ALGO
0.999847
4.100351
024ce142-e2ab-4e66-a3b7-380beff59ecd
ishandutta2007/codeforces
tsukiko_tsutsukakushi/normal/1453/E.cpp
/** * author: otera **/ #include<bits/stdc++.h> using namespace std; #define int long long typedef long long ll; typedef long double ld; const int inf=1e9+7; const ll INF=1LL<<60; #define rep(i, n) for(int i = 0; i < n; ++ i) #define per(i,n) for(int i=n-1;i>=0;i--) #define Rep(i,sta,n) for(int i=sta;i<n;i++)...
ALGO
0.99984
4.848938
3276b40d-8cfb-436d-a1f8-0b9ab8fdd5cc
Dhrubajyoti07/GFG-Solutins-of-daily--POTD
Easy/Max Sum Subarray of size K/max-sum-subarray-of-size-k.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: long maximumSumSubarray(int K, vector<int> &Arr , int N){ long maxi = 0; long sum = 0; int i=0; int j=0; while(j<N){ sum += Arr[j]; ...
ALGO
0.999912
6.074666
6ec80dc0-9857-4f52-9c08-3e7ecbff082c
LSH3333/PS
baekjoon/11728.cpp
#include <iostream> #include <vector> using namespace std; // merge sort int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n, m; cin >> n >> m; vector<int> N, M, ans; for(int i = 0; i < n; i++) { int num; cin >> num; N.push_back(num); } for(int i = 0; i < m; i++)...
ALGO
0.999998
4.433611
79a756ad-5753-404f-9bcd-02ef1c768fa5
par4m/dsa
Recursion/numbers.cpp
#include <iostream> using namespace std; void print1(int n); void print2(int n); void print3(int n); void print4(int n); void print5(int n); void print1(int n) { cout << n << " \n"; print2(2); } void print2(int n) { cout << n << " \n"; print3(3); } void print3(int n) { cout << n << " \n"; print4(4); } vo...
ALGO
0.998981
4.374614
f6c7ec58-2108-427b-ba16-e37eb3fe3aed
Adi1222/Coding-Interview-Preparation
Hash-Map/Longest subarray with sum divisible by k.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { vector<int> vt = {2, 7, 6, 1, 4, 5}; int k = 3; int n = vt.size(); unordered_map<int, int> mp; int ans = 0; int cur = 0; mp[0] = -1; for (int i = 0; i < n; i++) { cur += vt[i]; int r =...
ALGO
0.999906
4.288848
b179902a-b7b4-46eb-b80f-5dfaa1abfd52
ManishT174/Hybrid-GPU-Simulator
src/simulator/sim_engine.cpp
// sim_engine.cpp // Implementation of simulation engine #include "sim_engine.h" #include <iostream> #include <fstream> #include <cassert> #include <cstring> #include <algorithm> #include <iomanip> namespace gpu_simulator { SimulationEngine::SimulationEngine(const SimConfig& config) : config_(config) , runni...
ALGO
0.976197
7.323868
6f504fef-d451-420a-9997-997388da95f3
kmjp/procon
atcoder/abc001-040/abc005/c.cpp
#include <cstdlib> #include <cstring> #include <memory> #include <cstdio> #include <fstream> #include <iostream> #include <cmath> #include <string> #include <sstream> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <algorithm> using namespace std; typedef signed long long ll;...
ALGO
0.99998
3.689299
d2543b19-cb48-4e15-8336-a7d6233e73f9
ra2003/Plagiarism
dataset/test/modification/1620_rename/27/transformation_1.cpp
#include <bits/stdc++.h> #define ll unsigned long long #define ar array; using namespace std; const int utx = 1e3; ll gcd(ll a, ll b) { while (a > 0 && b > 0) if(a > b) a %= b; else b %= a; return a + b; } void n() { int ey = 0; string aop; cin >> aop...
ALGO
0.999788
3.495434
c74f023d-7b83-4cb2-82b6-2ffc0a9d8ace
1092772959/My-ACM-code
POJ/3013最短路.cpp
#include<iostream> #include<stdio.h> #include<cstring> #include<queue> #include<cmath> #include<algorithm> #include<vector> using namespace std; typedef long long LL; const int maxn =5e4+5; const LL INF =(1ll<<60); struct Edge{ int to,next; LL val; }; struct HeapNode{ LL d; //费用或路径 int u; ...
ALGO
0.999988
3.965999
13618fad-ef73-4385-b569-ad3a849c5f90
Shubham-Pochhali/DSA
0229-majority-element-ii/0229-majority-element-ii.cpp
class Solution { public: vector<int> majorityElement(vector<int>& nums) { int cnt1= 0; int cnt2= 0; int el1=INT_MIN; int el2=INT_MIN; int n=nums.size(); for(int i=0;i<nums.size();i++){ if(cnt1==0 && nums[i]!=el2){ cnt1=1; el...
ALGO
0.999982
5.573263
061533c4-af18-43fc-9500-b3af5e64825f
Gaurav-08-dev/Pepcoding
Level -2/4) Array & string/other lc questions/max sum subarray (kadane algo).cpp
int maxSubArray(vector<int>& nums) { int curr_max=nums[0],ans=nums[0]; for(int i=1;i<nums.size();i++) { curr_max=max(nums[i],nums[i]+curr_max); ans=max(ans,curr_max); } return ans; } /* implementation -> 2*/ int curr_max=0...
ALGO
0.999926
5.867073
c288c987-fb9a-401f-b595-5a1e448cc48e
CarlosAbolis/TPA
Exercicio29.cpp
/* Funo: Ler a mdia de um aluno e exibir se o mesmo foi aprovado. Autor: Carlos Alberto Gonalves da Silva Neto Data de criao: 2019/12/01 Data de finalizao: 2019/12/01 */ #include<locale.h> #include<iostream> int main(){ setlocale(LC_ALL,""); int media = 0; char aluno[40]; printf("Insira o nome do aluno: \n"); ge...
TOOL
0.894393
3.89775
340abdbf-062b-4b13-8e14-9a08786009ae
PaarasDev/LeetCode
200-number-of-islands/number-of-islands.cpp
class Solution { public: void dfs(vector<vector<char>>& grid, int i, int j) { int m = grid.size(), n = grid[0].size(); if (i < 0 || j < 0 || i >= m || j >= n || grid[i][j] == '0') return; grid[i][j] = '0'; // mark as visited dfs(grid, i + 1, j); // down dfs(grid, i - 1, j...
ALGO
0.99999
7.006345
6e92be33-6f86-4e54-beb6-58bd693df108
iamdin/leetcode
depth-first-search-medium/109.有序链表转换二叉搜索树.cpp
/* * @lc app=leetcode.cn id=109 lang=cpp * * [109] 有序链表转换二叉搜索树 */ #include <bits/stdc++.h> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; s...
ALGO
0.999997
6.395032
a927d1ce-33f3-46ad-ac0b-d13ef96aebb0
build3r/CompetitiveProgramming
CODES/JulyLunch14/reverse.cpp
#include <bits/stdc++.h> #include<cstdlib> using namespace std; int ans=1000000; // Graph class represents a directed graph using adjacency list representation class Graph { int V; // No. of vertices list<int> *adj; // Pointer to an array containing adjacency lists void DFSUtil(int v, int endd, bool visite...
ALGO
0.999491
3.826408
174a7058-77b7-472b-81c3-a55b624ce62d
LeeDongHyeuk/Algorithm
Baekjoon/8958.cpp
#include <iostream> #include <string> int OX(std::string& s) { int cnt = 0; int sum = 0; for (char& v : s) { if (v == 'O') { cnt++; sum += cnt; } else { cnt = 0; } } return sum; } int main() { std::cin.tie(NULL); std::ios::sync_with_stdio(false); int n; std::cin >> n; for (int i = 0; i < ...
ALGO
0.999869
5.533728
35cd4faf-1f02-4807-a197-e58006bf43b2
badhon1512/Algorithms
CW/More/selectionSort2.cpp
#include <bits/stdc++.h> using namespace std; void SelectionSort(int A[], int n) { int min_i,i,j,temp; for(i=0;i<n;i++) { min_i=i; for(j=i+1;j<n;j++) { if(A[j]<A[min_i]) min_i=j; } temp=A[i]; A[i]=A[min_i]; A[min_i]=temp; ...
ALGO
0.999949
4.481555
62782f38-4f13-4807-96ad-686f2d817db4
maruf-hossain74/Codechef-Problem-Solve
Rating_1401-1500/Confusing Concatenations.cpp
#include <bits/stdc++.h> using namespace std; #define int int64_t int32_t main() { // your code goes here int t; cin>> t; while(t--) { int n; cin>>n; vector<int> v(n); for(int i=0;i<n;i++) cin>>v[i]; int i; for(i=1;i<n;i++){ if(v[i]>v[0]) break; } if(i==0 || (n-i)==0...
ALGO
0.999703
3.605952
4796f275-f33a-4e15-8062-019d633e904e
mpawank/PW_Data_structure_Assignment_solutions
Week 5 C++ Arrays -1 Assignment/question2.cpp
// 2. Find the second largest element in the given Array in one pass #include <iostream> using namespace std; int main() { int arr[] = {12, 35, 1, 10, 34, 1}; // Example array int n = sizeof(arr) / sizeof(arr[0]); int first = INT_MIN, second = INT_MIN; for (int i = 0; i < n; i++) { if (arr[i...
ALGO
0.999926
5.159892
3d12aa32-17e5-47af-b66a-80c644295ab0
ishandutta2007/codeforces
jovanb/normal/146/A.cpp
#include <iostream> using namespace std; char ch[100]; int main() { long long n,i,br1=0,br2=0; cin>>n; cin>>ch; for(i=0;i<n/2;i++){br1+=(ch[i]-'0');if(ch[i]!='4' && ch[i]!='7'){cout<<"NO";return 0;}} for(i=n/2;i<n;i++){br2+=(ch[i]-'0');if(ch[i]!='4' && ch[i]!='7'){cout<<"NO";return 0;}} if(br1=...
ALGO
0.999962
3.804035
718b9c7a-e973-45e1-a085-7dff470e429a
ayushi-8102/PowerRouter---SDE-Assignment
Question-3/sol.cpp
#include <bits/stdc++.h> using namespace std; // Creating Generic Node class for singly linked list class Node { public: int data; Node* next; Node(int val) { data = val; next = NULL; } }; // Function to find the middle element in a singly linked list int getMiddle(Node *head) {//passi...
ALGO
0.999573
6.025729
702aa83a-77f6-4bc6-b795-ffb0bfa8b284
sswrlpw/zms-learning
homework/08/08_02.cpp
#include <iostream> #include <deque> #include <sstream> #include <string> using namespace std; int main() { deque<int> myQueue; string input; cout << "请输入命令 ('push <value>', 'pop', 'print', 'exit'):" << endl; while (true) { getline(cin, input); istringstream iss(input); stri...
TOOL
0.886734
5.339517
c0ca5429-b62f-40dc-8cff-295cc65f3506
katoumorisan/XBluetooth
bolt/compute/tensor/src/cpu/arm/fp16/convolution_transform.cpp
#include "cpu/arm/fp16/tensor_computing_fp16.h" #include "cpu/arm/transform_functions.h" static EE convolution_transform_filter_kernel_fp16(TensorDesc filterDesc, const F16 *filterArray, TensorDesc *ftmDesc, F16 *ftmArray, DataFormat ftmDataFormat) { if (nullptr == filterArray || nullptr == ftmDesc...
TOOL
0.978873
6.524254
13c04424-c110-4be5-82cb-1f85dba235ef
nucleargezi/acm-icpc
codeforces/div3/2074 cf1009 -ak/2074G.cpp
#include "MeIoN_Lib/MeIoN_all.hpp" void before() {} #define tests NAME MeIoN_is_UMP45() { INT(n); VEC(ll, a, n); a.insert(a.end(), a.begin(), a.end()); vector dp(n << 1, vector<ll>(n << 1)); FOR_R(l, n + n) { FOR(r, l, n + n) { if (r - l + 1 > n) break; FOR_R(m, l, ...
ALGO
0.999665
4.206779
7e5dd51d-2b6c-4da0-9674-415d8df9767b
COPEL-BigData/opencv
modules/features2d/src/kaze/nldiffusion_functions.cpp
/** * @file nldiffusion_functions.cpp * @brief Functions for non-linear diffusion applications: * 2D Gaussian Derivatives * Perona and Malik conductivity equations * Perona and Malik evolution * @date Dec 27, 2011 * @author Pablo F. Alcantarilla */ #include "../precomp.hpp" #include "nldiffusion_functions.h" #...
ALGO
0.999928
7.032291
93bfb07e-ebb8-4e08-98e8-10da9a645b46
pabloescoder/dsa
Dsa Questions/Cpp/Arrays/RemoveDuplicatesFromSortedArrayII.cpp
// https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/description/ class Solution { public: // Can be generalised for k duplicates by replacing 2 with k int removeDuplicates(vector<int> &nums) { int i = 0; for (int n : nums) { if (i < 2 || n > nums[i - ...
ALGO
0.999477
6.443361
7f65a939-1f7b-43eb-83b0-535686a4fa1c
sdm6410/codetree-TILs
240912/중앙값 계산 2/get-median-2.cpp
#include <iostream> #include <algorithm> using namespace std; void PrintArray(int *arr, int n) { for(int i = 1; i <= n; i++) { if(i % 2 == 1) { int temp[i]; for(int j = 0; j < i; j++) { temp[j] = arr[j]; } sort(temp , ...
ALGO
0.999819
4.493659
79bda6e0-0ec1-4064-a3ab-8ad03c2d3f55
king-yyf/cpcode
acwing/acw114/a.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ar2 = array<int, 2>; using ar3 = array<int, 3>; using ar4 = array<int, 4>; #define all(c) (c).begin(), (c).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() #define f0(e) for(int i = 0; i < (e); ++i) #define f1(e) for...
ALGO
0.998723
4.204218
ca8df34a-1fe2-4e51-8ec9-e2af44b4a5a1
muhammadsubhan408/oop-lab
A2-24k-0784/A2 - Q1[ 24K-0784 ].cpp
#include <iostream> #include <vector> using namespace std; class Person { protected: string name; int id; public: Person(string n,int i) :name(n),id(i){} virtual void display() const{ cout<<"Name: "<< name <<", ID: "<<id<<endl; } virtual ~Person(){} }; class Student :public Perso...
TOOL
0.866813
6.601879
619c47f6-aa0f-4d84-8ef8-11b77c8ae4fc
JesminNipu/Some-of-UVA-source-code
12149.cpp
#include <bits/stdc++.h> using namespace std; int main() { int a,i,n,j,s; while(scanf("%d",&a)==1 && a>0) { s=0; for(i=1;i<=a;i++) s+=(i*i); cout<<s<<endl; } return 0; }
ALGO
0.998052
3.634752
aebcfdb2-16b3-4784-9241-91f199cb9661
panam1916/DSA
DSA/dfs.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; //using recursion for chekc visited in adjancy list void dfs(int node, vector<ll> adj[], vector<bool> &visited) { cout<<node<<endl; visited[node] = true; for(ll adj_node: adj[node]) { if (!visited[adj_node]) { dfs(adj_node, adj, visited); ...
ALGO
0.999937
5.200556
26c780b4-b7e1-4444-9c8f-6a8449c0d97b
SuperToad/SystS3
OpenMP.cpp
//RRAFFIN //Compilation : //g++ -Wall -fopenmp OpenMP.cpp -o OpenMP //execution : //export OMP_NUM_THREADS=4 ; ./OpenMP #include <omp.h> #include <iostream> #include <cmath> #include <cstdlib> #include <time.h> #define MAXSIZE 2000 // Retourne la valeur de x double f(double x, double tableau[], int degre) { int pu...
ALGO
0.999914
4.078561
04ca9f82-2476-4aff-81be-b47a0f1cca16
sparsh2002/Placement-Course-cpp
DynamicA2OJ/Div2_B/18_Petya_and_staircase.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<ll> vl; typedef vector<vl> vvl; #define rep(i,a,b) for(int i=a ; i<b ; i++) #d...
ALGO
0.999998
3.633114
46b778b2-277c-4d2c-b857-88e282ec7c6c
herverson/globaltech
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
5b0570d7-8648-435a-8b7a-c457503abfae
someblue/ACM
ScauOJ/flesh competition/2010/射了多少/main.cpp
#include <iostream> #include <cmath> #include <cstdio> using namespace std; struct xy{ double x,y; }; bool isinit(double k) { double f; f=floor(k+0.5); if((k-f)<0.0001&&(k-f)>-0.0001) return 1; return 0; } int main() { xy left,right,temp; cin>>left.x>>left.y>>right.x>>right.y; if(lef...
ALGO
0.999025
3.358328
c4dadd91-0c8d-4e4c-94c2-b574afd8262b
RahulScripted/CodeChef
Linked List/Circular And Doubly Linked List/DeletionInCircularLinkedList.cpp
// Deletion in Circular Linked List #include <iostream> using namespace std; // Node structure definition class Node { public: int value; Node* next; Node(int val) : value(val), next(nullptr) {} }; // Global pointers Node* head = nullptr; Node* tail = nullptr; // Insert a node at the end of the circula...
ALGO
0.99993
6.202785
2d50f584-1a62-4de6-8447-82f996feb6a2
Mdmunnasardar/C-plus-plus
M_Lucky_Numbers.cpp
#include <iostream> using namespace std; bool isLucky(int num) { while (num > 0) { int digit = num % 10; if (digit != 4 && digit != 7) { return false; } num /= 10; } return true; } int main() { int A, B; cin >> A >> B; bool found = false; for (i...
ALGO
0.999843
5.385864
1e58cc98-7bee-4030-bd38-900ed86457ea
shivam2146/Data_Structures
lastOccurence.cpp
#include<iostream> using namespace std; void fastscan(int &number) { register int c; //directs compiler to use register for storing c number = 0; // extract current character from buffer c = getchar_unlocked(); //getchar_unlocked faster than getchar but it is thread unsafe // Keep on extr...
ALGO
0.999753
4.263797
8951dd32-1721-43ce-a7d5-9edad9745b9f
lam-ntt/practice-at-ptit
cpp/CPP0106_so_thuan_nghich.cpp
#include<iostream> #include<math.h> using namespace std; int check(long long n){ int arr[20], cnt=0; while(n>0){ arr[cnt++]=n%10; n/=10; } for(int i=0; i<cnt/2; i++){ if(arr[i]!=arr[cnt-i-1]){ return 0; } } return 1; } int main(){ int test; cin>...
ALGO
0.999757
5.259532
b091aa22-18eb-4337-9556-e6dc9b2485d7
rogerlucena/Exercises
Problems/_linked_list_cycle_detection.cpp
#include <iostream> #include <vector> #include "tools.cpp" using namespace std; // https://neetcode.io/problems/linked-list-cycle-detection // https://leetcode.com/problems/linked-list-cycle // Review: Fast And Slow Pointers to find cycle in LinkedList. // Given the beginning of a linked list head, return true if th...
ALGO
0.999341
5.429482
5ed66314-fa1d-4f9c-bf02-8f037e1167aa
notdevblue/GamePrograming
GamePrograming 3 16/3 16 5.cpp
#include <iostream> #include <ctime> int answer[3] = { 0, }; int input[3] = { 0, }; enum STATUS { GameEnd, Strike, Ball, Out }; void InitAnswer(); void PlayerInput(); int StrkieCheck(); int BallCheck(); int OutCheck(); int main() { srand(unsigned(time(NULL))); InitAnswer(); PlayerInput(); std::cout << "" <<...
ALGO
0.999136
4.067028
f292a3c3-a541-4dce-8cbb-49476d62c47a
currant77/interview-preparation
problems/cracking-the-coding-interview/cci_1-5.cpp
/** * @file cci_1-5.cpp * @author Taylor Curran * @brief Solution to problem 1.5 from Cracking the Coding Interview * @version 0.1 * @date 2020-07-07 * * @note McDowell, Gayle Lakkmann. Cracking the Coding Interview. * 6th ed. Palo Alto, CA: CareerCup, 2016. * * @copyright Copyright (c) 2020 */ /* Proble...
ALGO
0.990454
6.64189
2a5760c5-9f9e-4868-a916-448115917c12
BigRomanov/beam
utility/options.cpp
#include "options.h" #include "core/block_crypt.h" #include "utility/string_helpers.h" using namespace std; namespace beam { namespace cli { const char* HELP = "help"; const char* HELP_FULL = "help,h"; const char* PORT = "port"; const char* PORT_FULL = "port,p"; const c...
CONFIG
0.900518
7.196682
d53a2709-9c4b-4831-8c9b-5ff046c2b32f
jscelle/Practice
practice3.cpp
#include <iostream> #include <vector> void vectorSolution() { int n; std::cout << "Size of first array:"; std::cin >> n; std::vector<int> a; std::vector<int> b; for (int i = 0; i < n; ++i) { int val; std::cout << "Element:"; std::cin >> val; a.push_back(val); ...
ALGO
0.999843
4.403023
27c44681-4c8a-492e-8e16-9c0079b46a52
Nobles3689/practice
20240227_#2623_TopologySort.cpp
//Beakjoon Online Judge #2623 #include <bits/stdc++.h> using namespace std; int n, m; vector<vector<int>> graph; vector<int> inDegree; queue<int> ans; int TopologySort(){ queue<int> q; for(int i = 1; i<=n; i++){ if(inDegree[i] == 0) q.push(i); } for(int i = 0; i<n; i++){ if(q.empty()) ...
ALGO
0.99999
4.786366
6231e574-bc2c-47bd-9e98-b3f724dfc529
PoczciwyPatryk/zeszycik-informatyczny-patryka-
lekcja nr 2/main.cpp
#include <iostream> #include <fstream> #include <vector> #include <cmath> using namespace std; vector <double> d_weX; vector <double> d_weY; vector<float> d_we; struct punkt{ double x, y; }; int main() { ifstream we ("wuz2-zad-1-punktytxt.txt"); punkt p; while (!we.eof()){ we >> p.x >>p.y;...
ALGO
0.965199
3.983491
1f9b6218-bce4-4ae6-b7b2-f8648a1c2f2c
Cytnx-dev/Cytnx
src/backend/linalg_internal_cpu/Sub_internal.cpp
#include "Sub_internal.hpp" #include "../utils_internal_interface.hpp" #include "utils/utils.hpp" namespace cytnx { namespace linalg_internal { /// Sub void Sub_internal_cdtcd(boost::intrusive_ptr<Storage_base> &out, boost::intrusive_ptr<Storage_base> &Lin, ...
ALGO
0.982536
6.17251
a53d4eb3-a3ce-41e2-80ce-d343a1cfb4b3
Harsh-21-Vaghasiya/CodingQuestionsForPlacement
snake_pattren.cpp
#include <iostream> using namespace std; int main() { int start = 1; int n = 5; for (int i = 1; i <= n; i++) { int end; if (i % 2 == 1) { end = start + n - 1; for (int j = start; j <= end; j++) { cout << j<<" "; } ...
ALGO
0.999892
3.796406
129c4d60-47b0-46ca-b3bd-82e5308329f0
vk-kushwaha/CPP_practice
practice/Buy_and_Sell_Stock-III.cpp
#include <iostream> #include <vector> #include <climits> using namespace std; int maxProfit(vector<int>& prices) { int n = prices.size(); if (n <= 1) { return 0; } // Create arrays to store the maximum profit with at most two transactions vector<int> profitFirst(n, 0); vector<int...
ALGO
0.999941
6.618769
191e65a7-9372-4375-ab00-d244ff066f2d
ishandutta2007/codeforces
hollwoq_pelw/normal/1379/B.cpp
/* /+==================================================+\ //+--------------------------------------------------+\\ |.|\\...>>>>>>> Hollwo_Pelw(ass) 's code <<<<<<<...//|.| \\+--------------------------------------------------+// \+==================================================+/ */ #include <bits/stdc++.h> using ...
ALGO
0.999805
4.12249
3d5d5ee3-f6b4-4af9-a807-a38204fbd5a0
ricrpi/mupen64plus-rpi
source/mupen64plus-video-gles2glide64/src/GlideHQ/TextureFilters_hq2x.cpp
/* 2007 Mudlord - Added hq2xS lq2xS filters */ #include "TextureFilters.h" /************************************************************************/ /* hq2x filters */ /************************************************************************/ /****************...
ALGO
0.996166
5.452934
70d81373-bab3-4599-bb35-70a446661966
ishandutta2007/codeforces
klimoza/normal/383/A.cpp
/*#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native") #pragma GCC target("avx2") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math")*/ #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <math.h> #inclu...
ALGO
0.99996
3.824248
7463a0f7-039b-4719-bb95-c7f7b76c6a7d
Mengman/leetcode-solution
167.两数之和-ii-输入有序数组.cpp
/* * @lc app=leetcode.cn id=167 lang=cpp * * [167] 两数之和 II - 输入有序数组 */ // @lc code=start class Solution { public: vector<int> twoSum(vector<int>& numbers, int target) { int l = 0, r = numbers.size() - 1, sum = 0; while (l < r) { sum = numbers[l] + numbers[r]; if (sum == ...
ALGO
0.99994
6.664202
41d5937f-b9be-43a2-b654-eb9ef5453da6
alexanderpehlivanov/uni_introduction_programming_course_2020
Code/Code_Ex_13_14/Code_Ex_13_14_Task_5.cpp
#include <iostream> void swap(int&, int&); int main() { int firstNumber, secondNumber; std::cin >> firstNumber >> secondNumber; swap(firstNumber, secondNumber); std::cout << firstNumber << " " << secondNumber << "\n"; return 0; } void swap(int& firstNumber, int& secondNumber) { int temp; temp = firstNumb...
ALGO
0.999494
5.485237
23d512ae-df69-46c7-b904-98746acdfb62
ravikumar8292/50ArrayProblemforInterview
Mcountpairwithsum.cpp
#include<bits/stdc++.h> using namespace std; void countPairForsum(int *arr, int n, int k){ int count = 0; for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ if(arr[i] + arr[j] == k){ count++; } } } cout<<count<<" "; } int main(){ int k; int ar...
ALGO
0.99992
4.89341
ee379f56-9281-4358-9a7d-fa6f25900c59
saurav806/DSA
Linked List/Add 1 to a number represented as linked list.cpp
//Link:- https://practice.geeksforgeeks.org/problems/add-1-to-a-number-represented-as-linked-list/1 class Solution { public: Node *reverse(Node *head){ Node *nextNode=head; Node *temp=NULL; Node *ans=NULL; while(nextNode!=NULL){ temp=nextNode->next; ...
ALGO
0.999767
5.981869
7154f234-e2bd-4934-ace9-fde625532df1
aroullet/ffp_tum
src/Model.cpp
#include "Model.hpp" #include "Virus.hpp" #include <algorithm> constexpr float DEFAULT_RECOVERY_PROB = 0.0002; constexpr unsigned CRITICAL_TIME_STEPS = 1; constexpr double DEFAULT_SPEED = 10; constexpr double DEFAULT_SIZE = 30; Model::Model(unsigned N, unsigned iN,unsigned width, unsigned height, float prob, float r...
ALGO
0.991624
5.778988
10121214-d25f-4bec-b921-a37b5e02612a
ShivamKD/Coding
Codeforces/Round 475/D.cpp
/*input 21 18 0 18 2 21 2 9 15 3 5 8 2 8 21 6 10 21 13 9 1 13 */ // author : ShivamKD #include <bits/stdc++.h> using namespace std; #define FIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define ll long long #define in(x) scanf("%lld",&x); const ll MOD = 1e9 + 7; const int sz = 2e5 + 10; set<int>...
ALGO
0.999985
3.636371
b64e97c1-64a8-4889-9c97-9c0a70ba08cb
Mritunjay021/codeforcescpp
500A.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,p; cin>>n>>p; int ar[n]; for(int i=0;i<n-1;i++) cin>>ar[i]; int s=1; for(int i=0;i<=n-1 && s<p;) { if(i==0) s+=ar[i]; else s+=ar[i-1]; if(s==p) { cout<<"YES"; return 0; ...
ALGO
0.999993
3.499452
35cddac8-f3d3-4a2f-8aef-203e42e76ffb
caihuayi/leetcode
5239.cpp
#include <vector> #include <iostream> using namespace std; class Solution { public: vector<int> circularPermutation(int n, int start) { } }; int main() { return 0; }
ALGO
0.999687
4.484309
e134641f-5ce5-449a-a398-2c4aa9934d85
GJAY3072000/Way-To-DSA
Leetcode/79. Word Search.cpp
class Solution { public: bool search(int r, int c, size_t i, const string &word, vector <vector <char>> &board) { if(i == word.size()){ return true; } else if(r < 0 || r >= (int) board.size() || c < 0 || c >= (int) board[0].size()){ return false; } els...
ALGO
0.999914
6.134932
121b3857-c90d-4410-8bf4-0dccf3ac065d
adi-shelke/DSA
selectionSort2.cpp
#include<iostream> using namespace std; int main() { int count; cin>>count; int arr[count]; for (size_t i = 0; i < count; i++) cin>>arr[i]; for(int i=0;i<count-1;i++) for(int j=i+1;j<count;j++) if(arr[i]>arr[j]) swap(arr[i],arr[j]); for (int i = 0; i <...
ALGO
0.999954
3.807159
5694ab38-6a2d-4237-9e87-bd72f716c695
Sunny5130/leetCode_practice
315-count-of-smaller-numbers-after-self/count-of-smaller-numbers-after-self.cpp
class Solution { public: vector<int> countSmaller(vector<int>& nums) { vector<int> sorted=nums; sort(sorted.begin(),sorted.end()); unordered_map<int,int> mp; for(int i=0;i<sorted.size();i++) if(!mp.count(sorted[i])) mp[sorted[i]]=i+1; int n=nums.size(); v...
ALGO
0.999994
5.822263
5f2834b4-0cc5-4fc5-94f3-3abed60f43a6
SSAFY12th/ssafyAlgostudy
Haesoo/Week3/BOJ_토마토_7576.cpp
#include <iostream> #include <queue> #include <algorithm> using namespace std; int N, M; int day = 0; vector <vector <int> > map; int dy[4] = {0, 0, -1, 1}; int dx[4] = {-1, 1, 0, 0}; bool range (int y, int x) { return y >= 0 && x >= 0 && y < M && x < N; } void bfs (vector <pair <int, int> > tomato, vector <vecto...
ALGO
0.999961
3.94386
69f07490-1966-4b32-80dd-3c541544c136
mirthfulLee/AlgorithmExecise
算法设计与分析/期末课程报告/递归-最长完美数列.cpp
#include<iostream> #include<vector> using namespace std; int max(int a, int b) { return a > b ? a : b; } int partition(vector<int>& nums, int l, int r) { int pivot = nums[l]; int i = l + 1, j = r; while (true) { while (i <= j && nums[i] <= pivot) i++; while (i <= j && nums[j] >= pivot) j--; if (i > j) brea...
ALGO
0.999991
3.745478
513e90e4-8ef5-4507-a38d-f48ddf4f6631
PancrasPan/Compiler
lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
#include "llvm/CodeGen/SchedulerRegistry.h" #include "InstrEmitter.h" #include "ScheduleDAGSDNodes.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/InlineAsm.h" #include "llvm/Su...
ALGO
0.918216
6.943991
f8ca99ba-0dd3-494f-99cc-4da40f4ccd08
JuanPabloRN30/Competitive_Programming
RPC/RPC-2016-6/K.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; int acum = 0; int casos = 1; while(scanf("%d",&n) && n) { acum += n; if(acum >= 50 && acum <= 99) { printf("Input #%d: Sweet!\n",casos); acum -= 50; } else if(acum >= 100) { printf("Input #%d: Totally...
ALGO
0.993493
4.442219
8079cf65-b438-41ff-ae19-e4e39fcacaef
revbayes/revbayes.archive
src/core/datatypes/phylogenetics/ratematrix/RateMatrix_Kimura81.cpp
#include "EigenSystem.h" #include "MatrixComplex.h" #include "MatrixReal.h" #include "RateMatrix_Kimura81.h" #include "RbException.h" #include "RbMathMatrix.h" #include "TransitionProbabilityMatrix.h" #include <cmath> #include <string> #include <iomanip> using namespace RevBayesCore; /** Construct rate matrix with n...
ALGO
0.997153
5.933119
afb614ce-ecc8-4105-a97e-6ac68194c2be
vadym-kl/sqct
appr/cup.cpp
#include "cup.h" #include "topt-bfs.h" #include "rcup.h" #include "matrix2x2.h" #include "es/exactdecomposer.h" #include <iostream> #include <fstream> using namespace std; cup::cup(const hprr &phi, int max_layer, int max_lookup) : R(max_layer) { const bfs_results& br = bfs_results::instance(); auto r = br....
ALGO
0.997698
3.693657
ef3229ef-edd4-4458-9a24-01f7216ce837
satyamdash/DSA-daily
Detect-cycle-in-an-undirected-Graph.cpp
using namespace std; #include<vector> #include<queue> class Solution { public: //BFS APPROACH bool detect(int src, vector<vector<int>>& adj, vector<int>&vis) { vis[src] = 1; // store <source node, parent node> queue<pair<int,int>> q; q.push({src, -1}); // traverse until queue is ...
ALGO
0.999935
5.911242
2567d251-230b-4375-81f0-43b7d8f078b6
qqzwc/Test
数列中有多少递增中心/数列中有多少递增中心.cpp
//#include<iostream> //using namespace std; //int main() //{ // long long n; // cin>>n; // long long a[n+1],b[n+1]; // for(long long i=1;i<n+1;i++) // { // cin>>a[i]; // b[i]=0; // } // int num=0; // for(long long i=1;i<n-1;i++) // {//cout<<a[i]<<"+"; // int flag=0; // for(long long j=(i+1);j<n;j++) // {//cout<<a[...
ALGO
0.999963
3.323143
34b20486-fb24-4509-983c-c80a92ac35d1
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_1730_6.cpp
#include <bits/stdc++.h> using namespace std; const long long INF = 1e15; const int N = 500100; const int M = 2000100; int isp[M], prime[M], ptop = 0; int a[M]; long long p[M]; long long s[M]; long long range(long long s[], int l, int r) { return l <= r ? s[r] - s[l - 1] : 0; } int main() { memset(isp, true, sizeof...
ALGO
0.999891
3.599709
b85e0471-4e3c-4187-a716-f2e559df3ae1
shashank8173/cpp
array_find_duplicatNumber.cpp
#include<bits/stdc++.h> using namespace std; int findDublicat(int arr1[],int size) { int ans=0; for(int i=0;i<size;i++) { ans=ans^arr1[i]; } for(int i=1;i<size;i++) { ans=ans^i; } return ans; } int main() { int arr[4]={7,55,5,7}; int t=findDublicat(arr,4); cout<<t; return 0;...
ALGO
0.999865
3.840683
8f42c125-3390-4b80-9a8d-66bdf1592c1b
singhkuldeep01/YouKnowWhoAcademy_Sheet
BASIC/Map/05_TWOSum.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int #define MOD 1000000007 #define INF 1e18 #define fast_io ios::sync_with_stdio(0);cin.tie(0); int power(int b , int p , int m){if(p == 0) return 1;if(p == 1) return b;int res = power(b, p/2, m);if(p % 2 == 0) return (res * res) % m;else return (((re...
ALGO
0.9998
4.006467