uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5946910d-2894-462c-829d-397474a55530
txgcwm/code_study
cplusplus/boost/boost_1_63_0/libs/graph_parallel/test/distributed_rmat_pagerank.cpp
// Authors: Brian Barrett // Nick Edmonds // Andrew Lumsdaine #include <boost/graph/use_mpi.hpp> #include <boost/config.hpp> #include <boost/throw_exception.hpp> #include <boost/graph/distributed/adjacency_list.hpp> #include <boost/graph/distributed/compressed_sparse_row_graph.hpp> #include <boost...
ALGO
0.991283
5.563242
dda6ba0b-d30a-4571-b5c9-bb6d637218ac
tangxiangru/NOIP
2.4/一元三次方程求解.cpp
#include<cstdio> #include<cmath> using namespace std; double a,b,c,d; double f(double x) { return a*x*x*x+b*x*x+c*x+d; } double search(double left,double right) { double mid=(left+right)/2; if (right-left<1e-4) return mid; else { if (f(mid)==0) return mid; else if (f(left)*f(mid)<...
ALGO
0.999762
3.258533
cebd0945-c2af-4587-a578-baadc0bbaae7
onkarrw/30_Days_of_DSA
subArray_with_given_sum.cpp
/* Given an array arr[] of non-negative integers and an integer sum, find a subarray that adds to a given sum. There may be more than one subarray with sum as the given sum, print first such subarray. */ #include <iostream> #include <vector> using namespace std; int main() { int arr[] = {1, 4, 7, 3, 9, 8, 4, 3, 8...
ALGO
0.999922
4.296617
222eaa0d-2376-4fe5-9d9c-fbbc82be0871
RishabhBhairvey/C-plus-plus
pattern matching/upper left pira.cpp
#include<iostream> using namespace std; int main(){ for(int i=1;i<=5;i++){ for(int s=4;s>=i;s--){ cout<<" "; } for(int j=1;j<=i;j++){ cout<<"*"; } cout<<"\n"; } }
ALGO
0.999699
3.303013
ed21de13-8e74-4901-be7d-2b2c40b8d030
Massi-Papi/CSCI-4530-Computer-Security
Project1/main.cpp
#include <cctype> #include <fstream> #include <iostream> #include <list> #include <map> #include <sstream> #include <string> #include <unordered_map> #include <utility> #include <vector> using namespace std; // Function that loops through the ciphertext and counts the frequency of each // character void characterFrequ...
ALGO
0.992628
3.595345
9af5bf61-c9ae-4561-a798-f6e7186ac3f7
Haribala-09/hyprdots
User/History/266f4428/WTE7.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class SegmentTree { // This is upto 5*1e4 int n; vector<T> tree[200001]; void build(int i, int st, int end, vector<T> &arr) { if (st == end) { tree[i].push_back(arr[st]); return; } ...
ALGO
0.999961
5.308707
898a19d2-664d-4cfb-9dbb-8cc155c61fb6
google/gfxstream
common/base/PathUtils.cpp
#include "gfxstream/files/PathUtils.h" #include <string.h> // for size_t, strncmp #include <iterator> // for reverse_iterator, operator!= #include <numeric> // for accumulate #include <type_traits> // for enable_if<>::type #ifndef _WIN3...
TOOL
0.90239
5.102599
3a8cf15a-da37-4554-b6a8-818ee6d6fec5
yuvrajsingh08/-6Companies30days
Goldman Sachs/2513. Minimize the Maximum of Two Arrays.cpp
class Solution { public: bool isPos(long long d1, long long d2, long long u1, long long u2, long long x) { long long A = x / d1; // A = # of numbers divisible by d1 long long A_ = x - A; // A' = # of numbers not divisible by d1 long long B = x / d2; // B = # of numbers divisible by d2 ...
ALGO
0.999932
5.696214
0009352a-2330-494f-9479-71767cb954fd
ishandutta2007/codeforces
dqa2021/normal/1464/B.cpp
#include<cstdio> #include<algorithm> #include<cctype> #include<cstring> #include<iostream> using namespace std; #define G getchar() int read() { int x=0; bool flg=false; char ch=G; for (;!isdigit(ch);ch=G) if (ch=='-') flg=true; for (;isdigit(ch);ch=G) x=(x<<3)+(x<<1)+(ch^48); return flg?-x:x; } #undef G typedef l...
ALGO
0.999992
3.364888
8177d6be-9244-4069-a213-71269222bb75
astraizer/algoFJ
Soal/Day 2/AZ.cpp
#include <stdio.h> int main(){ int t; scanf("%d",&t); for(int tc=0;tc<t;tc++){ int r,h; scanf("%d %d",&r,&h); double sum = (r*2*3.14)*(r+h); printf("Case #%d: %f\n",tc+1,sum); } return 0; }
ALGO
0.998679
3.733382
13cd0383-3e50-4349-8931-1584c7181cf6
Jokiva/Computational-Physics
lecture 3/Problem 1/Problem 1.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; double calcPi(unsigned long loops, char mode='f'); // double sumUp(int loops=5e5); // double sumDown(int loops=5e5); int main() { const unsigned long LOOPS = 5e5; // forward sum double s1 = calcPi(LOOPS, 'f'); double s2 ...
ALGO
0.999736
4.973914
1f04423f-88c6-46d0-8af2-865599e04045
NotTheRightGuy/Leetcode-Submissions
problems/number_of_substrings_containing_all_three_characters/solution.cpp
class Solution { public: int numberOfSubstrings(string s) { int cnt = 0; int idx_a{-1}, idx_b{-1}, idx_c{-1}; for (int i = 0; i < s.length(); i++) { if (s[i] == 'a') idx_a = i; else if (s[i] == 'b') idx_b = i; e...
ALGO
0.999741
5.208677
c9bc19b1-0724-4e98-b2da-216e68f799a1
SameerSinghal26/CodeForces
1956_B_Nene_and_the_Card_Game.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; vector<int> vec(n); for(int i=0;i<n;i++){ cin>>vec[i]; } unordered_map<int, int> mpp; int ans = 0; for (int i=0;i<n;i++){ ...
ALGO
0.999306
4.797279
0842b58d-68e8-4b06-aa1d-bb09e837892d
apikzorian/Path-Planning
src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); mat << 1, 2, 6, 9, 3, 1, 7, 2; std::cout << "Row's maximum: " << std::endl << mat.rowwise().maxCoeff() << std::endl; }
ALGO
0.999344
3.880165
9d61fb9c-6fc8-469c-9766-4be9d151d643
himanshu231204/DSA
Binary Search/BS Algorithm/upperBound.cpp
/* 🧠 Algorithm (Pseudo Code): function lowerBound(arr, x): low = 0 high = length(arr) - 1 ans = length(arr) // default if x is greater than all elements while low <= high: mid = low + (high - low) // 2 if arr[mid] > x: ans = mid // potential answer, but check le...
ALGO
0.999937
6.150288
7252a6ad-b8d5-4a8c-9ebc-a03e9276e5e9
fire-archive/godot-fire
thirdparty/bullet/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btCompoundShape.h" #include "BulletCollision/BroadphaseCollision/btDbvt.h" #include "LinearMath/btIDebugDraw.h" #include "LinearMath/btAa...
ALGO
0.999557
6.974378
39c08822-2d93-4e4a-b320-5d943682394f
Velovatik/Cpp-Second-course
1.First/Task1_VelovatiyKE 214B-20.cpp
#include <iostream> #include <Windows.h> #include <cmath> using namespace std; int variant(char a[30]) { int var = abs(static_cast<int>(a[0])) % 2 + 1; return var; } int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); cout << "Введите свою фамилию: "; char surname[30]; cin >> surname; cout << variant(s...
ALGO
0.991014
3.32079
9bbf6bc8-1f4f-4e0c-9389-c7d7a645ef36
mispipin/STD_Kelvin_Ferdinan_2311104009
11_Multi_Linked_List/UNGUIDED/1.cpp
#include <iostream> #include <string> using namespace std; struct ProjectNode { string name; int duration; ProjectNode* next; ProjectNode(string name, int duration) : name(name), duration(duration), next(nullptr) {} }; struct EmployeeNode { string name; string emp_id; ProjectNode* projec...
TOOL
0.864677
5.907103
ccac759e-fec5-4730-8d54-d16ee3ca958b
bushishanguu/CPP_coding
移除数组中的元素(双指针法) 力扣/移除数组中的元素(双指针法) 力扣/test.cpp
#define _CRT_SECURE_NO_WARNINGS 1 class Solution { public: int removeElement(vector<int>& nums, int val) {//ָ뷨 int i = 0; int j = 0; for (j = 0; j<nums.size(); j++) { if (nums[j] != val)//ҳǵ { nums[i] = nums[j]; i++; } } return i; } };
ALGO
0.999742
5.338417
d6f57b44-87a6-4241-9efc-6c626e3c26e4
A6ad/algorithm
module_2/path_printing.cpp
#include <bits/stdc++.h> using namespace std; vector<int> adj_list[1005]; bool vis[1005]; int level[1005]; int parent[1005]; void bfs(int src) { queue<int> q; q.push(src); vis[src] = true; level[src] = 0; while(!q.empty()) { int par = q.front(); q.pop(); for(int...
ALGO
0.999993
4.562825
923d3032-4795-445d-b951-a8e2a7199994
AdityaVerma-1708/LeetCode_solution
0260-single-number-iii/0260-single-number-iii.cpp
class Solution { public: vector<int> singleNumber(vector<int>& nums) { //appraoch 1: using map // map<int,int> map; // vector<int> ans; // for(int i = 0;i<nums.size();i++){ // map[nums[i]]++; // } // for(auto val : map){ // if(val.second == 1){ ...
ALGO
0.99999
5.284402
7284d444-a032-403d-87ba-6c46507aa536
hygoni/precise-leak-sanitizer
llvm/lib/CodeGen/BasicBlockSections.cpp
#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/CodeGen/BasicBlockSectionUtils.h" #include "llvm/CodeGen/BasicBlockSectionsProfileReader.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/Tar...
TOOL
0.941491
7.423098
d077a173-9517-469f-9c46-ef1d7cb010d5
kartikpachori/DSA-daily-practise
Difficulty: Easy/Delete without head pointer/delete-without-head-pointer.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; /* Link list node */ struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }*head; Node *findNode(Node* head, int search_for) { Node* current = head; while (current != NULL) { if (curren...
ALGO
0.999866
5.722136
7f2538e2-f03f-4672-8c77-7dc42856d646
sreejitadass/MyPrograms
Algorithms/DnC/countZeroes.cpp
#include <iostream> using namespace std; int search0(int arr[], int l, int h) { if (l == h) { return arr[l]; } else { int mid = l + (h - l) / 2; if (mid == 0 || arr[mid] == 0 && arr[mid - 1] == 1) { return mid; } else if (arr[mid] == 1) ...
ALGO
0.999866
5.672647
90963b4e-8cf5-43ca-a446-e44b8b03df39
kunal-umap/DSA_Sheet
Solutions_leetcode/Basics/1-Armstrong_number_between_two_given_number.cpp
#include <iostream> #include <cmath> using namespace std; bool isArmstrong(int num) { int originalNum = num; int sum = 0; int numDigits = static_cast<int>(log10(num)) + 1; while (num > 0) { int digit = num % 10; sum += pow(digit, numDigits); num /= 10; } return sum == ...
ALGO
0.999846
5.615208
9317d5af-735b-4ce9-a509-fadedeb76841
harchcode/test-cmake
justify.cpp
#include <iostream> #include <vector> using namespace std; vector<string> fullJustify(vector<string> &words, int maxWidth) { vector<string> r; int start = 0; int line_chars = 0; int i = 0; while (i < words.size()) { string word = words[i]; if (line_chars == 0) { // s...
ALGO
0.997686
6.003644
c581e0c8-9205-4a4d-9dfd-f321ec1b9743
irori-gthb/atcoder
abc0xx/abc083/abc083_b.cpp
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; using ll = long long; int main() { int N, A, B; cin >> N >> A >> B; int cnt = 0; int sum = 0; for (int i = 1; i <= N; i++) { int t = i; while (t > 0) { cnt = cnt + t % 10; t = t / 10; } if...
ALGO
0.999728
4.02678
efb952d3-a947-480a-9b08-274c45b87898
sage26Ayano/Data-Structures
Heap/implementation.cpp
// implementation of min heap and inserting an item in it #include <iostream> using namespace std; // internally binary heap is represented as an array struct Heap{ int *arr; int size, capacity; Heap (int c) { capacity = c; size = 0; arr = new int [capacity]; } int left(int...
ALGO
0.999697
4.84821
8006661c-1f16-4fef-a57c-87b1c56df645
south37/atcoder
abc146/c/c.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <unordered_map> #include <vector> #include <string.h> #include <set> using namespace std; #define COUT(x) cout << #x << " = " << (x) << " (L"...
ALGO
0.999425
3.868066
6a0e32f6-83fc-4644-a7d1-9426bedfa8c7
shubhamdev-code/LeetCode
0030-substring-with-concatenation-of-all-words/0030-substring-with-concatenation-of-all-words.cpp
class Solution { public: vector<int> findSubstring(string s, vector<string>& words) { vector<int> result; int n = s.size(), m = words.size(), k = words[0].size(); unordered_map<string, int> freqMap; // Calculate the frequency of each word in the words array for (string word : words) { ...
ALGO
0.999835
6.727761
c8a0a67e-e18c-415e-96e5-9d2c4bf1b847
ishmeet09/DSA
Dynamic Programming/6_PaintFence.cpp
#include<bits/stdc++.h> using namespace std; /* Ques is all about recursive soln watch the video here for n = 4 (eg),k=3 we look at last 2 places either both have same or different in case of same rest 2 recursion will handle and the number of combinations of last 2 will be 3(RR,BB,GG) but it will 2 out of 3 as there ...
ALGO
0.999947
4.733017
d95f9151-e9d9-4398-9cbc-0857a6b6ab52
BRIJESH6063/DataStructures
Graph January 2023/Floyd Warshal Algorithm/FloydWarshal.cpp
#include<bits/stdc++.h> #include<time.h> using namespace std; // Floyd Warshal Algorithm -> Multiple Source Node // Other Shortest path Algorithm single source node // for(via = 0; via<n; via++) { // for(i=0; i<n; i++) { // for(j=0; j<n; j++) { // cost[i][j] = min(cost[i][j], // cost[i...
ALGO
0.999808
4.233228
16f35566-4484-409b-b46e-5550abc46516
chan-hyeok-kim/Coding_Test_Algorithm_C
0x12/solutions/1456.cpp
// Authored by : haneulkimdev // Co-authored by : - // http://boj.kr/a2f78447b24e4d9c822110b818c32699 #include <bits/stdc++.h> using namespace std; vector<int> sieve(int n) { vector<int> primes; vector<bool> state(n + 1, true); state[1] = false; for (int i = 2; i * i <= n; i++) { if (!state[i]) continue; ...
ALGO
0.999829
4.780591
ab9ead63-8d55-42df-b3e6-380972615a3a
alevi29/leetcode
1436-destination-city/1436-destination-city.cpp
class Solution { public: string destCity(vector<vector<string>>& paths) { unordered_map <string, int> map; for (int i = 0; i < paths.size(); ++i) { map[paths[i][0]]++; map[paths[i][1]]++; } for (int i = 0; i < paths.size(); ++i) { if (map[paths[i][...
ALGO
0.999781
5.793075
0bae723d-523c-4de1-8074-d2cadca17cc3
avinashpathak06/Leetcode-Questions
0073-set-matrix-zeroes/0073-set-matrix-zeroes.cpp
class Solution { public: void setZeroes(vector<vector<int>>& matrix) { int rowsize=matrix.size(); int colsize=matrix[0].size(); vector<int> row(rowsize,0); vector<int> col(colsize,0); for(int i=0;i<rowsize;i++){ for(int j=0;j<colsize;j++){ ...
ALGO
0.999066
6.364791
1bbd6c2f-0c8c-411e-9348-f918bd123fa6
bhupendra-dew/Self
Python/OPENCV_learning and porjects/opencv-4.x/modules/photo/src/denoising.cpp
#include "precomp.hpp" #include "fast_nlmeans_denoising_invoker.hpp" #include "fast_nlmeans_multi_denoising_invoker.hpp" #include "fast_nlmeans_denoising_opencl.hpp" template<typename ST, typename IT, typename UIT, typename D> static void fastNlMeansDenoising_( const Mat& src, Mat& dst, const std::vector<float>& h, ...
ALGO
0.998857
5.660945
094f6552-4f79-4297-b040-bf1e6a9bc23e
spidycse16/My_Codeblocks_Codes
1846A.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define slen s.size() #define vlen v.size() #define pb push_back #define el endl ll tc,x,y,n,i,j,k,d,m,z,cnt,ans,res,flag,ma; char ch; ll mi=numeric_limits<ll>::max(); string s,str; vector <ll> v; map<ll,ll> mp; set <ll> st; int main() { cin>>tc; ...
ALGO
0.998601
3.888388
06e5540b-9927-47e2-9926-c92f9628c1e6
sandeul2/Baekjoon-problems
프로그래머스/lv1/12934. 정수 제곱근 판별/정수 제곱근 판별.cpp
#include <string> #include <vector> #include <math.h> using namespace std; long long solution(long long n) { long long answer = 0; long long a=0; a = sqrt(n); if(a*a ==n) answer = (a+1)*(a+1); else answer =-1; return answer; }
ALGO
0.999896
4.85063
fb86a413-9979-449f-9bb0-5625e6f298eb
parkje0927/today-I-learned
vscode/19_lv01.cpp
#include <algorithm> #include <string> #include <vector> using namespace std; vector<int> solution(vector<int> numbers) { vector<int> answer; for (int i=0;i<numbers.size()-1;i++) { for (int j=i+1;j<numbers.size();j++) { int sum = numbers[i] + numbers[j]; bool ...
ALGO
0.999926
5.533158
bff0277c-82de-4829-bb01-66e492ebaa48
wwylab/CliPP
eigen-3.4.0/doc/examples/tut_arithmetic_dot_cross 2.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { Vector3d v(1,2,3); Vector3d w(0,1,2); cout << "Dot product: " << v.dot(w) << endl; double dp = v.adjoint()*w; // automatic conversion of the inner product to a scalar cout << "Dot product via a matrix product...
ALGO
0.999112
4.042919
2ddd4b74-c98f-4ffc-9f62-b294bfb1effe
Denver44/CP-and-DSA-in-CPP
DSA/4Array/1DArrayProblems/16DuplicatesInArrayPart2.cpp
#include <iostream> using namespace std; int main() { int arr[10] = {3, 6, 8, 8, 12, 15, 15, 15, 18, 20}; int size = 10; int j = 0; for (int i = 0; i < size - 1; i++) { if (arr[i] == arr[i + 1]) { j = i + 1; while (arr[j] == arr[i]) { ...
ALGO
0.993907
3.608355
0c35e38c-f534-4cc4-929d-2b6399a70fc4
Jorgepaiz/OpenCV_Library
OpenCV_231/opencv2_objdetect/latentsvm.cpp
#include "precomp.hpp" #include "_latentsvm.h" #include "_lsvm_matching.h" /* // Transformation filter displacement from the block space // to the space of pixels at the initial image // // API // int convertPoints(int countLevel, CvPoint *points, int *levels, CvPoint **partsDisplacement, int kPoin...
ALGO
0.987896
5.02975
81eb9ca4-8e32-403d-bbdc-17e20cc66714
Alexis-S-M-R/Raytracer
rayTracer/generateImage.cpp
#include <fstream> #include "RayTracer.hpp" #include "qoi.h" #include <vector> #include <fstream> #include <algorithm> #include <thread> #include <mutex> #include <atomic> Math::Vector3D randomInUnitSphere() { while (true) { Math::Vector3D p = Math::Vector3D(drand48()*2 - 1, drand48()*2 - 1, drand48()*2 - ...
ALGO
0.956792
5.843366
94440d5c-3fcb-4434-8b4b-7eb6bfc72d6d
robinrullo/FPA-CUDA
main.cpp
#include "kernel.cuh" #include <ctime> #include <iomanip> #include <iostream> #include <string> /** * Programme principal qui exécute l'algorithme d'optimisation FPA sur GPU. * Il génère une population initiale, exécute l'optimisation, et affiche les résultats. */ int main(const int argc, char **argv) { for (i...
ALGO
0.999934
5.945905
29b45a0c-e939-48d0-8eda-7f620dd96758
catherinemabato/project3
libc/src/math/amdgpu/llrintf.cpp
#include "src/math/llrintf.h" #include "src/__support/common.h" #include "declarations.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(long long, llrintf, (float x)) { return static_cast<long long>(__builtin_rintf(x)); } } // namespace LIBC_NAMESPACE_DECL
ALGO
0.982882
5.620537
739e722c-5fe1-4210-b3c8-cd1baa1702ad
plugshqwty/Algorithms-and-data-structures
Binary Tree/Special task/Source.cpp
//................................... , 5 #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <fstream> #include <vector> #include <algorithm> using namespace std; class TNode { public: TNode(int key) { Key = key; Left = nullptr; Right = nullptr; Height = 0; } ...
ALGO
0.999946
4.685578
01a83ba6-a5f0-4b54-8118-56bd1eef55b1
ishandutta2007/codeforces
__math/normal/553/C.cpp
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_DEPRECATE #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <limits> #include <ctime> #include <cassert> #include <map> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include...
ALGO
0.99992
4.31339
ee834987-e8bb-4728-8405-e2f91f8fd65c
andyyang200/CP
Competitive Programming/Contests/USACO/Contests/2013 - 2014/March/Silver/Watering the Fields/ShortestPathAlgorithm/Test.cpp
#include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <deque> #include <queue> #include <stack> #include <set> #include <map> #include <algorithm> #include <functional> #include <utility> #include <bitset> #include <cmath> #include <cstdlib> #include <ctime> #include <cs...
ALGO
0.999958
3.811709
6987d20f-d3d0-4bc3-abca-9cc49d49a7d1
chichengcn/gici-open
third_party/rpg_svo/src/svo/initialization.cpp
#include <svo/initialization.h> #include <random> // std::mt19937 #include <vector> #include <svo/common/frame.h> #include <svo/common/point.h> #include <svo/common/camera.h> #include <svo/common/container_helpers.h> #include <svo/direct/feature_detection.h> #include <svo/direct/feature_detection_utils.h> #include <s...
ALGO
0.962599
6.812708
91faf2ae-ed3b-4d2c-8e48-364df844d4c4
afeijun/cplusplus-code
primerplus/chapter_seven/p1.cpp
//编写一个程序,不断要求用户输入两个数,直到其中的一个为0。对于每两个数,程序将使用一个函数来计算它们的调和平均数,并将结果返回给main(), //而后者将报告结果。调和平均数指的是倒数平均值的倒数,计算公式如下:调和平均数=2.0*x*y/(x+y) #include <iostream> using namespace std; double harmean(double x, double y); int main(void) { double x,y,result; cout << "Please enter x and y:"; cin >> x >> y; while (x&&y) { result ...
ALGO
0.997498
3.782358
8a697890-50bc-489f-b5ae-a818963c5fc0
ishandutta2007/codeforces
princebelkovetz/normal/189/A.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stack> #include <iomanip> #include <string> #include <cmath> #include <set> #include <map> #include <unordered_map> #include <queue> #define endl "\n" #define int long long #define debug(x) cout << #x << " is " << x << endl; using namespace std; int f...
ALGO
0.999637
3.595971
b7d268c1-9b87-4677-9576-497ed1994d6e
xrLil-Batya/X-Ray_1.6_Sources_VS2019
SDK/sources/MagicSoftware/FreeMagic/Source/Core/MgcEdgeMesh.cpp
#include "MgcEdgeMesh.h" #include "MgcRTLib.h" using namespace Mgc; #include <fstream> #include <stack> using namespace std; //---------------------------------------------------------------------------- EdgeMesh::EdgeMesh () { } //---------------------------------------------------------------------------- EdgeMesh:...
TOOL
0.978973
5.391011
9a56d320-8a18-4750-8561-0621dc05ec6b
heavenMOJANG/ICPC
.history/programmes_C_Cpp/Codeforces/CF2060/E_20250120161519.cpp
#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3, "Ofast", "inline") #include <bits/stdc++.h> #define int long long using namespace std; constexpr int INF = 0x7fffffff; class DSU { private: vector<int> f, siz; public: DSU (int len) : f(len + 1), siz(len + 1, 1) { iota(f.begin(), f.end(), 0...
ALGO
0.999836
4.919422
4abbf567-b826-4733-93aa-55b1b23a590e
icelostnfound/RehabilitationRobot
Src/Eigen3/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix3f A; Vector3f b; A << 1,2,3, 4,5,6, 7,8,10; b << 3, 3, 4; cout << "Here is the matrix A:\n" << A << endl; cout << "Here is the vector b:\n" << b << endl; Vector3f x = A.colPivHouseholderQr...
ALGO
0.999925
3.356631
82b24d7a-81f9-437c-9c25-4b60e3eaa805
derubm/flapxcoin
src/rpcmining.cpp
#include "chainparams.h" #include "main.h" #include "db.h" #include "txdb.h" #include "init.h" #include "miner.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace std; // Key used by getwork/getblocktemplate miners. // Allocated in InitRPCMining, free'd in ShutdownRPCMining static CReserveKey* pMi...
WEB
0.942516
5.556312
2cb97b8b-4b04-4f72-b763-3b4c27e0f7d0
DualSPHysics/DualSPHysics
src_mphase/DSPH_v5.0_NNewtonian/source/JNormalsMarrone.cpp
//HEAD_DSPH /// \file JNormalsMarrone.cpp \brief Implements the class \ref JNormalsMarrone. #include "JNormalsMarrone.h" #include "Functions.h" #include "FunGeo3d.h" #include "JPartDataBi4.h" #include "JPartNormalData.h" #include "JDataArrays.h" #include "JVtkLib.h" #include <cstring> #include <cfloat> #include <cli...
ALGO
0.990034
6.327971
1d35fba7-5c04-40bf-aaa2-115c4fbca32f
aliofye/hw
cse331/hw10/bell.cpp
// A C++ program for Bellman-Ford's single source // shortest path algorithm. #include <bits/stdc++.h> // a structure to represent a weighted edge in graph struct Edge { int src, dest, weight; }; // a structure to represent a connected, directed and // weighted graph struct Graph { // V-> Number of vertic...
ALGO
0.999875
4.946082
0bc90e72-16a4-4ad3-ba46-5c1f0f1b225c
Lincito-31/Preseleccion
Uva Online Judge/10541.cpp
#include <bits/stdc++.h> using namespace std; int t,n,k,a; string combi[201][201]; string sumar(string x,string y){ int tamx=x.size(); int tamy=y.size(); if(tamx>tamy){ swap(x,y); swap(tamx,tamy); } reverse(x.begin(),x.end()); reverse(y.begin(),y.end()); string res=""; bo...
ALGO
0.999818
3.638204
328b8439-19da-4527-99ea-7acbb9d81934
olimpiadi-informatica/oii
2017/nazionali/lungomare/sol/greedy_stupido.cpp
/* * Greedy scorretto. * * Autore: Giorgio Audrito * * Descrizione: come greedy, ma termina non appena una spiaggia non va. */ #include<algorithm> #include<set> #include<vector> using namespace std; typedef long long ll; vector<ll> DD, PP, Idx; set<ll> Sol; bool sort_by_p(const int& i, const int& j) { ...
ALGO
0.99991
3.828391
a5bfec75-ede4-46d1-926d-707b8e480f2c
thanoschild/Data_Structure_and_Algorithms
Greedy Algorithm/Max Meetings in a Room/ans.cpp
class meet{ public: int start, end, pos; meet(int x, int y, int z){ start = x; end = y; pos = z; } }; static bool mycompare(meet &a, meet &b){ if(a.end == b.end) return a.pos < b.pos; return a.end < b.end; } class Solution{ public: vector<int> maxMeetings(int N...
ALGO
0.999998
5.16678
d1c1965d-30c5-4747-b752-5f3882942374
carriez0705/leetcode
190-ReverseBits_3.cpp
class Solution { public: uint32_t reverseBits(uint32_t n) { uint32_t result = 0; //bit by bit for(int i = 0; i<32; i++) result = (result<<1)|(n>>i)&1; return result; } };
ALGO
0.999711
5.816089
17473602-d038-4133-b360-807b68a7ce9e
stevejhkang/algorithm-quiz
programmers/42840.cpp
#include <string> #include <vector> #include <algorithm> #include<iostream> using namespace std; vector<int> solution(vector<int> answers) { vector<int> answer; vector<int> who(4); vector<int> stu1(10001); vector<int> stu2(10001); vector<int> stu3(10001); int stuex1[10]={1,2,3,4,5,1,2,3,4,5}; ...
ALGO
0.999838
3.795897
293a4806-597d-473d-ad46-c682ece21d20
alexandraback/datacollection
solutions_1485490_0/C++/RexII/main.cpp
#include <cstdlib> #include <iostream> #include <stdio.h> #include <math.h> using namespace std; /* Global Variables*/ unsigned __int64 nP1[100]; int tP1[100]; unsigned __int64 nP2[100]; int tP2[100]; int totalP1; int totalP2; unsigned __int64 maxGenToy; /*---------*/ int genToy(int...
ALGO
0.99971
3.44669
15c41afd-0bcb-48a3-85b3-483e956c3fb8
huangjunhao2019/leetcode-tencent
mianshi/8.27/test1.cpp
#include<iostream> using namespace std; int main(){ double res=0; for(double x=-100;x<=100;x+=0.1){ for(double y=-100;y<=100;y+=0.1){ if(5*x+3*y<=1 && y<=x+1 && x-5*y<=3){ res=max(res,3*x+5*y); } } } cout<<res<<endl; return 0; }
ALGO
0.999838
3.780672
79f27dce-80dd-415d-b187-b2f98636abe5
Joanna-J4roszewska/laboratorium-1
1.3 Joanna.cpp
#include <iostream> using namespace std; int main() { int a; //przechowuje wartosci liczbowe calkowite z pewnego zakresu cout << "Podaj liczbe calkowita:"; //output wyswietla dane wyjsciowe na ekranie cin >> a; //input umozliwia odczyt danych wpisanych z klawiatury if (a % 2 != 0) { // != nie równ...
ALGO
0.997305
3.733947
9f0ec4fc-4dc1-453e-b776-29b94744b91c
jxng-min/Shooting-Survival
Shooting-Survival/cocos2d/cocos/base/ccUTF8.cpp
#include "base/ccUTF8.h" #include "platform/CCCommon.h" #include "base/CCConsole.h" #include "ConvertUTF.h" #include <limits> NS_CC_BEGIN namespace StringUtils { /*--- This a C++ universal sprintf in the future. ** @pitfall: The behavior of vsnprintf between VS2013 and VS2015/2017 is different ** VS2013 or Uni...
TOOL
0.94027
6.22743
7dc385a3-79fd-4200-b9bc-9c31fdf53856
c1uc/leetcode
daily/2071.maximum-number-of-tasks-you-can-assign.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; class Solution { public: int maxTaskAssign(vector<int>& tasks, vector<int>& workers, int pills, int strength) { sort(tasks.begin(), tasks.end()); sort(workers.begin(), workers.end...
ALGO
0.999991
4.792355
0fd53380-5589-4669-b830-98fe77765a44
GenXinvenits/kernel_compilers
llvm/lib/Option/OptTable.cpp
#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/Option/Arg.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" #include "llvm/Option/OptSpecifier.h" #include "llvm/Option/OptTable.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/...
TOOL
0.982193
5.083229
fe913cc1-9dd4-492f-9c4d-067725904e7c
QIDITECH/QIDISlicer
bundled_deps/libigl/igl/ray_sphere_intersect.cpp
template < typename Derivedo, typename Derivedd, typename Derivedc, typename r_type, typename t_type> IGL_INLINE int igl::ray_sphere_intersect( const Eigen::PlainObjectBase<Derivedo> & ao, const Eigen::PlainObjectBase<Derivedd> & d, const Eigen::PlainObjectBase<Derivedc> & ac, r_type r, t_type & ...
ALGO
0.999422
6.792349
15b15f0f-866d-4e31-b1b7-36b5fdd817fe
shriharshpatil23/Data-Structures-and-Algorithms
1642-furthest-building-you-can-reach/1642-furthest-building-you-can-reach.cpp
class Solution { public: int furthestBuilding(vector<int>& heights, int bricks, int ladders) { priority_queue<int,vector<int>, greater<int>> pq; for(int i=0;i<heights.size()-1;i++){ int gap = heights[i+1] - heights[i]; if(gap > 0) pq.push(gap); //lad...
ALGO
0.999921
6.392653
ec1aad87-2019-4641-95b3-9d696ec2180f
ceandrade/brkga_mip_feasibility
FP2/utils/args_parser.cpp
/** * @file args_parser.cpp * @brief Command line parsing utilities * * @author Domenico Salvagnin <EMAIL> * 2007-2012 */ #include <boost/tokenizer.hpp> #include "args_parser.h" #include "xmlconfig.h" #include "asserter.h" namespace dominiqs { ArgsParser::ArgsParser() {} void ArgsParser::reset() { input.clea...
TOOL
0.956686
6.590135
5bb375cf-4906-4cab-b2ae-e73cfc341b3e
Gahzi/HighwayChaser
HighwayChaser/libs/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp
#include <Box2D/Dynamics/Joints/b2RevoluteJoint.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2TimeStep.h> // Point-to-point constraint // C = p2 - p1 // Cdot = v2 - v1 // = v2 + cross(w2, r2) - v1 - cross(w1, r1) // J = [-I -r1_skew I r2_skew ] // Identity used: // w k % (rx i + ry j) = w * (-r...
ALGO
0.992011
7.741631
582c05cc-7807-4ad5-93ff-5d0ef9534242
ammarqaisar11a55/LeetCode-Solutions
1441. Build an Array With Stack Operations.cpp
class Solution { public: vector<string> buildArray(vector<int>& target, int n) { vector<string> res; unordered_set<int> st(target.begin(), target.end()); for (int i = 1; i <= target.back(); i++) { if (st.find(i) == st.end()) { res.push_back("Push"); ...
ALGO
0.999894
6.304843
8115a260-ab1b-4eb6-afe7-e67395cc3bbe
shudhanshu435/LeetCode
2891-maximum-beauty-of-an-array-after-applying-operation/2891-maximum-beauty-of-an-array-after-applying-operation.cpp
class Solution { public: int maximumBeauty(vector<int>& nums, int k) { // Find the minimum and maximum values int min = INT_MAX; int max = INT_MIN; for (int i = 0; i < nums.size(); i++) { // Add max and min as standard library min = std::min...
ALGO
0.999954
5.962681
32120f2c-81a7-4cb2-bf52-da58c93e0ac3
DywangIT/PTIT-Programing
PTIT-DSA/th2/1.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define faster() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); const int MAXN = 1e6 + 5; const int MOD = 1e9 + 7; string s; void input() { cin >> s; s += s.back(); ...
ALGO
0.999689
5.733053
b58c4aa3-5a27-4365-9775-3c3d06056edc
lukasz-kukulka/Small_homework_in_Coders_School
STL/hashConteneirs.cpp
#include <iostream> #include <unordered_map> #include <string> #include <set> #include <cmath> #include <algorithm> float radius(int x, int y); struct Point { int y; int x; bool operator<(const Point point) const { return radius(x, y) < radius(point.x, point.y); } bool operator==(const Po...
ALGO
0.997588
4.906624
a4596cb7-1886-4801-b6d8-0f636a08a898
icf/Code
C++ code/GpBCS_S.C.CPMC/SC_afqmcConstraintPathBP_4.1_pureicf/include/eigen/bench/sparse_randomsetter.cpp
#define NOGMM #define NOMTL #include <map> #include <ext/hash_map> #include <google/dense_hash_map> #include <google/sparse_hash_map> #ifndef SIZE #define SIZE 10000 #endif #ifndef DENSITY #define DENSITY 0.01 #endif #ifndef REPEAT #define REPEAT 1 #endif #include "BenchSparseUtil.h" #ifndef MINDENSITY #define M...
TOOL
0.925125
4.487392
27d0bb11-d979-4c56-95d6-27475c28cb6e
prakash-bisht/DSA
COURSE_2/code_starter/week2_priority_queues_and_disjoint_sets/1_make_heap/build_heap.cpp
#include <iostream> #include <vector> #include <algorithm> using std::vector; using std::cin; using std::cout; using std::swap; using std::pair; using std::make_pair; class HeapBuilder { private: vector<int> data_; vector< pair<int, int> > swaps_; void WriteResponse() const { cout << swaps_.size() << "\n"...
ALGO
0.999919
4.0521
9465c124-2f8c-4dcc-b8ea-bc15e94914c9
jxx-sx/BOJ_Study
solved/CLASS 7/13547.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; typedef pair<pair<int, int>, int> Q; int n, m; int arr[100001]; int ans[100000]; int cnt[1000001]; int cur; Q query[100000]; int sqr; int l = 1, r = 1; bool compare(Q a, Q b) { if (a.first.first / sqr == b.first.firs...
ALGO
0.99999
4.179324
f5738332-d959-4c3d-ae76-f4ece8b88866
GosVi-group/Matrice
Matrice/addin/gui/source/unicode_bidi.cpp
#include <nana/unicode_bidi.hpp> #include <nana/c++defines.hpp> namespace nana { namespace bidi_charmap { enum t{ L, LRE, LRO, R, AL, RLE, RLO, PDF, EN, ES, ET, AN, CS, NSM, BN, B, S, WS, ON}; static unsigned char charmap_0x0000_0x00C0[192] = { BN, BN, BN, BN, BN, BN, BN, BN, BN, S, B, S, WS, B, B...
CONFIG
0.951547
5.744676
169a73bd-9c9c-40ef-bc92-187f2caeed45
Abdul-Rahimm/LeetCode_2024
12. December/7. 1760. Minimum Limit of Balls in a Bag.cpp
// بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ #include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() typedef vector<int> vi; typedef vector<vi> vii; class Solution { public: bool isPossible(int mid, vector<int> &nums, int mx) { int operations = 0; for (int i : nums) ...
ALGO
0.999846
5.053453
49f961f7-d10c-4b80-98d9-6ac0b61fac15
Souranil007/DSA-Coding_Ninjas
Test 1/Split Array.cpp
// Given an integer array A of size N, check if the input array can be splitted in two parts such that - // - Sum of both parts is equal // - All elements in the input, which are divisible by 5 should be in same group. // - All elements in the input, which are divisible by 3 (but not divisible by 5) should be in other ...
ALGO
0.999875
5.324411
11c0c8d7-b606-407f-98cd-92d2cc5b276e
securesystemslab/llvm-project
libcxx/test/std/containers/sequences/vector.bool/find.pass.cpp
// <vector> // vector<bool> // std::find with vector<bool>::iterator // https://llvm.org/PR16816 #include <vector> #include <algorithm> #include <cassert> #include <cstddef> #include "test_macros.h" int main(int, char**) { { for (unsigned i = 1; i < 256; ++i) { std::vector<bool> b(i...
TEST
0.989446
5.313323
2d404c21-43d4-475e-9d11-6c39e8cd182f
dchang0524/ICPC-0
SetOfStrangers.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int T; cin >> T; while (T--) { int N, M; cin >> N >> M; ...
ALGO
0.999978
5.110579
6d054426-8982-49bc-939d-0414d2dc0f6f
D-DRM/DSA_LAB_SEM2
lab11quad.cpp
// PROGRAM TO IMPLEMENT HASH TABLE USING QUADRATIC PROBING #include <iostream> using namespace std; #define TABLE_SIZE 10 class HashTable { private: int table[TABLE_SIZE]; public: HashTable() { for (int i = 0; i < TABLE_SIZE; i++) { table[i] = -1; } } void insert(int key); ...
ALGO
0.999454
6.104663
5c41925d-8396-45a4-bae6-60a3e9c54ae9
mehrotra1990/adventOfCode2020
Day3.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <tuple> int main() { std::ifstream file("inputFileDay3.txt"); std::string line; std::vector<std::string> forest; int height = 0, width; while(getline(file, line)) { forest.push_back(line); height++; } width = forest[0].si...
ALGO
0.999832
5.365791
7409c0fe-0839-440b-9a7c-508b8962826f
manikanta2901/CCC
.history/Day 2/Answers/ReverseVowels_20210305151251.cpp
#include<bits/stdc++.h> using namespace std; bool isVowel(char a){ if(a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u'|| a == 'A' || a == 'E' || a == 'I' || a == 'O' || a == 'U'){ return true; } return false; } int main(){ string name; cin >> name; vector<int>vowels; for(in...
ALGO
0.999686
4.471264
a4393e15-d089-4706-8ade-e4d8d8966459
omarfarukof/CP_Contest
CodeChef/Starters_166_Div_4/Christmas_Gifts.cpp
#include <bits/stdc++.h> using namespace std; #define total_paper 1000 #define s_area(h, l, w) (2*(h*l + l*w + w*h)) int main() { // your code goes here int t; cin >> t; int h, l, w; while(t--) { cin >> h >> l >> w; cout << total_paper / s_area(h, l, w) << endl; } return ...
ALGO
0.9995
4.748357
069628ec-314c-471c-ae0a-9443eb3defb1
JiesenXia/UBC-CPSC-221
queue.cpp
/* * File: queue.cpp * Description: Implementation of the Queue class. * * Complete your implementation in this file */ /* * Adds the parameter object to the back of the Queue. * * NOTE: This fuction should have O(1) behavior over n operations! * * PARAM: item - object to be added to the Que...
ALGO
0.95806
6.26358
7cfedf35-e258-4fa8-b54e-0562ddfed725
manu-chroma/cp
learning/vector_graph.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int li; int main() { vector <int> a[10]; //essential to define size, otherwise would fail. a[0].push_back(1); a[0].push_back(2); a[1].push_back(5); for (int j = 0; j < 3; ++j) { for (int i = 0; i < a[j].size(); ++i) { cout << a[j][i]; }...
ALGO
0.999336
3.090393
7061489e-b1df-439d-9886-ba6ee16c51c5
poshithNandyala/cp-pratice
anonymous/TLE/1200/D_Friends_and_the_Restaurant.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); int main() { fastio int t; cin >> t; while (t--) { int n; cin >> n; vector<int> a(n), b(n),...
ALGO
0.999969
4.781494
9f4ec2c6-7fd6-44b3-ae8e-e745c7f43360
yzq2000/Tetris
box.cpp
#include "box.h" #include <QPainter> #include <QKeyEvent> #include <QTimer> //OneBox是从QGraphicsObject继承而来的 OneBox::OneBox(const QColor &color) : brushColor(color) { } //该函数为指定后面的绘图区域的外边框 QRectF OneBox::boundingRect() const { qreal pen_width = 1; //小方块的边长为20.5像素 return QRectF(-10-pen_width/2, -10-pen_wid...
TOOL
0.884256
5.083718
d74ed577-a488-497f-8d71-19d27a0e4539
MrGxsheng/MyProblem
cf1352-div4/E.cpp
#include <bits/stdc++.h> #define endl '\n' using namespace std; typedef long long LL; typedef pair<int,int> PII; const int N = 1000010; int n,m; void solve(){ cin >> n; vector<int> a(n); vector<int> cnt(n + 1); int ans = 0; for (auto &it : a) { cin >> it; ++cnt[it]; } for (int l = 0; l < n; ++l) { int sum...
ALGO
0.999851
5.476992
dfea999b-6cb9-4b79-987b-d7cf24764b30
JEEWAN31/Data_Structures_and_ALgorithm
Array And String/Sorting Algorithm/Selection_sort.cpp
#include<iostream> using namespace std; void SelectionSort(int arr[], int n){ for (int i=0; i<n-1; i++){ for (int j=i+1; j<n; j++){ if(arr[i] > arr[j]){ int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } } } ...
ALGO
0.999978
4.69869
5ef2a21f-6e73-4992-874c-bb972a5018b6
Sumanth-NR/CompetitiveProgramming
Platforms/CSES/SortingAndSearching/Collecting_Numbers_II.cpp
#include <bits/stdc++.h> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n, m; cin >> n >> m; vector<int> a(n), pos(n); for (int i = 0; i < n; ++i) { cin >> a[i]; pos[--a[i]] = i; } int ans = 1; for (int i = 0; i + 1 ...
ALGO
0.999976
4.62006
51bd6111-618f-4de3-9138-ae7e7aa51f56
ChuanzhouYao/zkSNARK-LLVM
libs/circifier/llvm/lib/CodeGen/MachineLoopInfo.cpp
#include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/CodeGen/TargetSubtargetInfo.h" #include "llvm/Config/llvm-config.h" #include "llvm/InitializePasses.h" #include "llvm/Pass.h" #incl...
TOOL
0.974285
7.95418
ec70d4ff-52e8-4d32-8b23-efcef78ad80a
puzzlecollector/hackerrank
warmup/mini_max_sum.cpp
#include <cmath> #include <cstdio> #include <climits> #include <vector> #include <iostream> #include <algorithm> using namespace std; const long long INF = 2e16; int main() { long long minval = INF, maxval = -INF; long long a[5]; for (int i = 0; i< 5; i++){ cin >> a[i]; } for (int sk...
ALGO
0.999954
3.600679
45161e46-1311-43a9-828b-86f3b28d0804
king-yyf/cpcode
atcoder/abc312/d.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.999866
4.252675
4bf6f03a-130d-4d6c-8310-94fb36595829
ishandutta2007/codeforces
shanquan2/normal/906/D.cpp
#include<bits/stdc++.h> using namespace std; int n,m,p[1005],k,a[100005],b[100005]; int fexp(int x,int t,int m){ if(!t)return 1; int tmp=fexp(x,t>>1,m); tmp=1ll*tmp*tmp%m; return (t&1)?1ll*tmp*x%m:tmp; } bool le(int l,int r,int m){ if(r-l>=7)return 1; long long now=1; for(int i=r;i>=l;i--){ if(now>=30)return ...
ALGO
0.999976
3.573573
592fb393-59ea-4c09-bd7b-2a1262c985c3
ishandutta2007/codeforces
meyi/normal/1349/A.cpp
#include<bits/stdc++.h> using namespace std; #define ri int typedef long long ll; const int maxn=2e5+10; template<class T>inline bool ckmin(T &x,const T &y){return x>y?x=y,1:0;} template<class T>inline bool ckmax(T &x,const T &y){return x<y?x=y,1:0;} template<class T>inline void clear(T *arr,int siz,int val=0){memset(a...
ALGO
0.999992
4.714245