uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
1709f5df-c749-4684-9948-685248061c65
apru02/LeetCode-ACs
118-pascals-triangle/pascals-triangle.cpp
class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector<int>> ans; ans.push_back({1}); for (int i = 2;i<= numRows;i++){ vector<int> temp(i); temp[0] = 1; temp[i-1] = 1; for (int j = 1;j<i-1;j++){ temp[...
ALGO
0.999984
5.597401
150222c4-e264-4f90-9cf7-9d7cabcb0c4e
mohamed179/compititive-programing-template
problems/uva/10000_13399/10600_10699/10698/sol.cpp
#include <cstdio> #include <iostream> #include <iomanip> #include <vector> #include <map> #include <algorithm> #include <sstream> using namespace std; // data needed: pts gd gs ga team teamIdx // data represeted: (pos) team pts mp gs ga gd (per) typedef vector<int> vi; typedef pair<int, int> ii; typedef pair<int,...
ALGO
0.994137
5.320675
3ed86f3b-e754-4e56-9d91-3b0bc73f3230
Shreyansh4Ai/OOPS
conditional statements/insurance.cpp
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here int t ; cin >> t ; while(t--){ int x , y ; cin >> x >> y ; if ( y <= x ) cout << y << endl ; else cout << x <<endl ; } return 0; }
ALGO
0.999896
4.583464
6f4e5e69-e0cb-4c57-8f45-8b565a921508
anubansal17/Coding-Career-Journey
Uber/Practice/DSA/LeftMostColumnWithAtleastAOne.cpp
/** * // This is the BinaryMatrix's API interface. * // You should not implement it, or speculate about its implementation * class BinaryMatrix { * public: * int get(int row, int col); * vector<int> dimensions(); * }; */ class Solution { public: int leftMostColumnWithOne(BinaryMatrix &binaryMatri...
ALGO
0.999542
6.223289
6a196a8e-e8ca-4346-93e8-ab42f14b000d
sid-abc/Myleetcode
Check if two arrays are equal or not - GFG/check-if-two-arrays-are-equal-or-not.cpp
//{ Driver Code Starts //Initial function template for C++ #include<bits/stdc++.h> using namespace std; #define ll long long // } Driver Code Ends //User function template for C++ class Solution{ public: bool check(vector<ll> A, vector<ll> B, int N) { unordered_map<int,int> mp; for(int i=0; ...
ALGO
0.999807
5.316762
0a491247-fae5-4354-9d09-81b2380e4acd
ymatevva/FMI-UP
IS/HW1IS/2.cpp
#include<iostream> int occurences(int num, int digit) { int count = 0; while (num != 0) { int lastDigit = num % 10; if (lastDigit == digit) count++; num /= 10; } return count; } bool containsTheSameDigitsSameTimes(int num1, int num2) { int copyNum2 = num2; while (copyNum2 != 0) { int lastDigit...
ALGO
0.999229
5.525809
5f235987-7fa9-4df7-9ddd-ab0890112950
MaysaaAbuRahma/Id
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
31bc4037-7782-49b6-9976-c2f95aedd54c
henry20160826/CppWorkspace
54. Spiral Matrix/src/54. Spiral Matrix.cpp
//Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. // //For example, //Given the following matrix: // //[ // [ 1, 2, 3 ], // [ 4, 5, 6 ], // [ 7, 8, 9 ] //] // //You should return [1,2,3,6,9,8,7,4,5]. #include <iostream> #include <vector> using namespace std; cl...
ALGO
0.999891
6.519534
0f49d305-59e1-42c2-b68e-3a7d6854f414
dev-usama/boost
libs/compute/test/test_merge_sort_gpu.cpp
#define BOOST_TEST_MODULE TestMergeSortOnGPU #include <boost/test/unit_test.hpp> #include <iostream> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/is_sorted.hpp> #include <boost/compute/algorithm/detail/merge_sort_on_gpu.hpp> #include <boost/compute/container/vector.hpp> #include "quirks.hpp"...
TEST
0.867138
7.548458
e4cf75fd-91a9-4888-81c7-8b22486b7f14
salessandri/programming-contests
spoj/03442-LASTDIG.cpp
#include <iostream> #include <cmath> using namespace std; int main() { unsigned tc; cin >> tc; while (tc--) { unsigned a, b; cin >> a >> b; a %= 10; if (b > 0) { unsigned new_b = b % 4; b = new_b? new_b : 4; } cout << (int)pow(a, b) %...
ALGO
0.999587
4.813899
aaf835a4-d9c6-41e2-8ef6-3816a4850939
RinCloud/TrickCatcher
Datasets/TrickyBugs/GenProgs/dpp_generated_progs_cpp/p02766/p02766_num4_parsed.cpp
#include <iostream> using namespace std; int main() { int N, K; cin >> N >> K; int count = 0; while (N > 0) { N /= K; count++; } cout << count << endl; return 0; }
ALGO
0.999489
4.337101
8502180c-1c69-4d6b-bf55-ca24efaec5ef
lavenderca/scipion-docker
scipion/software/em/xmipp/libraries/classification/svm_classifier.cpp
#include "svm_classifier.h" bool findElementIn1DArray(MultidimArray<double> &inputArray,double element) { FOR_ALL_DIRECT_ELEMENTS_IN_ARRAY1D(inputArray) if (DIRECT_A1D_ELEM(inputArray,i)==element) return true; return false; } void SVMClassifier::setParameters(double c,double gamma) { param.svm...
DATA
0.925117
5.692673
f21fff59-3e17-4dbf-aa11-b844a7945754
NguyenDucguyen/sliding-window-
minium window.cpp
Cho 2 xâu kí tự S và T, nhiệm vụ của bạn là tìm xâu con ngắn nhất của S chứa đầy đủ mọi kí tự của xâu T. Ví dụ S = ADOBECODEBANCC, T = CABC thì xâu con BANCC là xâu con ngắn nhất của S chứa đầy đủ mọi kí tự của T Đầu vào • Dòng 1 là xâu S • Dòng 2 là xâu T Giới hạn • 1<=len(T),len(S)<=10^6 • S, T chỉ chứa các kí tự...
ALGO
0.999997
4.676989
216ed768-1433-4e3e-9bf5-e02c42cd5e96
ishandutta2007/codeforces
sorting/normal/258/E.cpp
#include <bits/stdc++.h> //using namespace std; using std::vector, std::cout, std::cin, std::endl; template<size_t t_Size> class Segment_Tree{ private: struct Node{ int min, count; Node(){} Node(int value){ min = value; count = 1; } friend Node mer...
ALGO
0.999971
4.721785
3cbb2d89-84fd-4396-afec-8de902099041
Anggaysm/algo-perkuliahan
fungsi-array/minMax.cpp
#include <iostream> using namespace std; //ini buat inputan user void inputan(int inputA[], int N){ for (int i=0; i<N; i++){ cout << "Masukan angka ke-"<<i+1<<":"; cin>>inputA[i]; } } //ini buat mencari nilai terbesar dari array int findMax(int inputA[], int N){ int max = 0; for (int i...
ALGO
0.996431
4.221565
b31bf8bf-918f-4447-b298-fb98ca6436e0
whiteout2/sort
backup/mergesort_OKOK.cpp
// C program for Merge Sort #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/ioctl.h> int arr_size = 0; void printArray(int A[], int size); // print bar void bar(int value); // Merges two subarrays of arr[]. // First subarray is arr[l..m] // Second subarray is arr[m+1..r] void merge(int arr[],...
ALGO
0.999687
4.048518
a5e4d175-0b3f-4d73-9237-81e2e4d14ad3
tonoysheikh/comparative-programming-cpp-
codechef/contest per week/contest 100/4.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; #define nl '\n' #define pb push_back #define ppb pop_back #define mp make_pair #define mod 1000000007 #define pi 3.1415926535897932384626433832795 #define lpz(i, a, b) for (int i=a; i<b; i++) #define lp(i, a, b) for (int i=a; i<=b; i++) #define t...
ALGO
0.999966
3.911744
0590d5ca-b68a-4aa4-a1bf-4130e8b839b5
yunbinni/BAEKJOON
14501-동적계획법.cpp
#include<bits/stdc++.h> using namespace std; int DP[20]; int T[20], P[20]; int main() { int N; cin>>N; for(int i=1; i<=N; i++) cin>>T[i]>>P[i]; for(int i=N; i>=1; i--) { if(i+T[i]<=N+1) DP[i]=max(DP[i+1], P[i]+DP[i+T[i]]); else DP[i]=DP[i+1]; } cout<<DP[1]<<"\n"; return 0; }
ALGO
0.999911
3.415696
fdd11265-8ae7-4f1f-9877-f299d6f7f430
Dorvid/AdventOfCode2024
8/day8.cpp
#include <iostream> #include <vector> #include <algorithm> #include <fstream> #include <cmath> #include <map> #include <sstream> #include <bitset> #include <limits> const unsigned Width = 50; const unsigned Height = 50; struct Coordinate { Coordinate(char Frequency, bool Is_Antinode, unsigned X, unsigned Y) : Fre...
ALGO
0.999504
4.545031
6da2aa97-0701-4251-a0ee-9a6058eb5b72
Hyunmin-jasper-Cho/AlgorithmSolving_LeetCode
Array/520E_Detect Capital.cpp
class Solution { public: bool detectCapitalUse(string word) { int N = (int) word.length(); if (N == 1) return true; bool is_first_letter_capital = false; int cnt = 0; if (word[0] <= 90) { is_first_letter_capital = true; cnt++; ...
ALGO
0.99984
6.302991
9eb9e139-2596-40e1-b763-b4ec5ac700c5
Shivk123/Leetcode-problems
239-sliding-window-maximum/sliding-window-maximum.cpp
class Solution { public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { int n = nums.size(); deque<int> q; vector<int> res(n - k + 1); for (int i = 0; i < n; i++) { if (!q.empty() && q.front() < i - k + 1) q.pop_front(); while (!q.em...
ALGO
0.999994
6.408929
0c94777b-41a2-44d1-a8c4-5557e72c5a61
akfr/dspatch_user
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.998693
6.797273
6acaa578-1881-414a-a069-e799ffeb018b
eigengravy/leetcode
0235-lowest-common-ancestor-of-a-binary-search-tree/0235-lowest-common-ancestor-of-a-binary-search-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* lowestCommonAncestor(TreeNode* root, TreeNode* p, TreeNode* q) { if(root->va...
ALGO
0.999994
6.347037
0ca813b8-5cea-42a0-9799-fbff4a95057e
lizhuomao/Llxy_AlgorithmDesign_programming_test
YangZeBin/1068.cpp
#include <stdio.h> #include <math.h> int main(){ int row,col; int threshold; scanf("%d%d%d",&row,&col,&threshold); int data[col * row]; int count[col * row]; int i,j,q = 0; for(i = 0; i < col * row ; i++){ scanf("%d",&data[i]); count[i] = 0; } for(i = 0; i < col * row ; i++){ for(j = 0; j < col * row ; j...
ALGO
0.999802
3.305135
7962aff5-40a5-4e5a-b814-f5d869cc4e14
nikarun/LeetCode-DSA-June
230-kth-smallest-element-in-a-bst/kth-smallest-element-in-a-bst.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99999
5.5533
ea6a4e4c-ccaa-40dc-b30c-5ec35fd413ee
LSH3333/PS
baekjoon/2178.cpp
#include <iostream> #include <queue> using namespace std; #include <utility> int arr[101][101]; int mark[101][101]; int H,W; int index = 1; int dr[4] = {-1, 0, 1, 0}; int dc[4] = {0, 1, 0, -1}; void bfs(int r, int c) { queue<pair<int,int>> q; mark[r][c] = index; q.push(make_pair(r,c)); while(!q.emp...
ALGO
0.999923
4.385423
7a9fba17-0968-4776-aa06-74423589b103
m-Affan55/leetcode1
Leetcode1/PracticeLeetcode/Leetcode136.cpp
#include <iostream> #include <vector> using namespace std; main() { vector <int> nums = {4,1,1,2,2}; int count = 0 , flag = 0 , c = nums.size()-1; if(nums.size() == 1) { flag = nums.back(); } if(flag == 0) { for(int i=0; i<=nums.size() - 1; i++) ...
ALGO
0.999951
3.683744
cd1200cc-86f4-45d9-a083-fa2ac1673da4
FabioVL/Treinamento---Maratona
Codeforces/304div2/c.cpp
#include <bits/stdc++.h> using namespace std; #define st first #define nd second #define mp make_pair #define pb push_back #define db(x) cerr << #x << " == " << x << endl; #define _ << " " << typedef long long ll; typedef vector<int> vi; typedef pair<int,int> ii; const long double EPS = 1e-9; const int N=1e5+5; cons...
ALGO
0.999922
3.366138
e75da7d4-8b5c-47b2-9838-bf191b7b9fdc
SalsabilaZaman/IITPC
TOC/lab12.cpp
#include<bits/stdc++.h> using namespace std; /*void pda(string input){ stack<char> stack; for(int i=0;i<input.size();i++){ if(i<(input.size()/2)) stack.push(input[i]); } } */ void PrintStack(stack<string> s){ if (s.empty()) return; string x = s.top(); s.pop(); PrintStack...
ALGO
0.999661
3.919986
4c3ff01f-e893-4a69-bbb6-94f97563cda5
ec209/Kookmin_Algorithm
HappyNum.cpp
// // HappyNum.cpp // // // Created by TAEGIKIM on 15/11/2017. // // #include <stdio.h> #include <iostream> #include <cmath> using namespace std; int happy(int,int); int main() { int TestNum; int a,b; cin >> TestNum; while(TestNum--) { cin >> a; b = happy(a,0); ...
ALGO
0.999909
3.884691
703d46d2-bdc7-42ec-9b2b-5ead64c517a2
rukhsana09771/leetcode
0066-plus-one/0066-plus-one.cpp
class Solution { public: vector<int> plusOne(vector<int>& digits) { int n = digits.size(); int carry = 1; for(int i=n-1; i>=0; i--){ if(carry+digits[i]<10){ digits[i] += 1; return digits; } else{ // carry + digits[i] = 1...
ALGO
0.99984
6.691637
de2d1966-7c60-45ad-abc9-eaa604b37bd0
VR22124/31_Days_Of_Code_November
Array_Problems/3. Container With Most Water.cpp
/* 3. Container With Most Water You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]). Find two lines that together with the x-axis form a container, such that the container contains the most water. Return the max...
ALGO
0.997921
7.139239
46a609fd-1d08-4b77-9e93-02f15e2add22
phitronio/Batch-6-Basic-Data-Structures
Module 19/node_level.cpp
// Problem link: https://www.codingninjas.com/studio/problems/node-level_920383 #include <bits/stdc++.h> int nodeLevel(TreeNode<int>* root, int searchedValue) { queue<pair<TreeNode<int>*,int>> q; if(root) q.push({root,1}); while(!q.empty()) { pair<TreeNode<int>*,int> parent = q.front(...
ALGO
0.999982
5.08063
bd20793a-b503-4f2f-9817-e630a9433e2d
Sujal-prajapati07/College_programs
sem 4/Data Structure/UNIT3/Queue_using_array.cpp
#include<iostream> #define max 10 using namespace std; int Queue[max]; int front=-1,rear=-1; void enqueue() { int num; cout<<"Enter the number : "; cin>>num; if(rear==max-1) { cout<<"QUEUE IS OVERFLOW"<<endl; } else { if(front==-1 && rear==-1) { fro...
ALGO
0.953142
3.584247
0b529951-c399-4eb2-96c1-54025a9c4485
lalaa0130/game
heap_sort/heap_sort.cpp
#include <iostream> #include"heap.h" int main() { C_HEAP cHeap{}; cHeap.init(9); cHeap.addData(4); cHeap.addData(7); cHeap.addData(6); cHeap.addData(3); cHeap.addData(8); cHeap.addData(1); cHeap.addData(2); cHeap.addData(5); cHeap.addData(9); cHeap.printData(); cHeap.Pop(); cHeap.printData(); cHeap...
ALGO
0.851898
3.978756
3b6b9114-9b0e-43ad-8289-4538c7a20039
sngvahmed/Problem
solving problem/TC/Substrings.cpp
//Mar 4, 2014 :: Substrings.cpp #include <cstring> #include <string.h> #include <map> #include <deque> #include <queue> #include <stack> #include <sstream> #include <bitset> #include <iostream> #include <iomanip> #include <cstdio> #include <fstream> #include <cmath> #include <cstdlib> #include <ctime> #include <algorit...
ALGO
0.999935
4.16497
b4b630a1-d238-4c69-bad4-d91bd7be9bd5
PooyaAlamirpour/PathPlanning
src/Eigen-3.3/doc/examples/Tutorial_BlockOperations_vector.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::ArrayXf v(6); v << 1, 2, 3, 4, 5, 6; cout << "v.head(3) =" << endl << v.head(3) << endl << endl; cout << "v.tail<3>() = " << endl << v.tail<3>() << endl << endl; v.segment(1,4) *= 2; cout << "after 'v.segment(1,4) *= 2', v...
ALGO
0.991648
3.093805
fabad2c2-5996-481a-9f9b-9e7d6156b4b4
zhangwengame/Lab_All
30009.cpp
#include <stdio.h> int main(void) { int i, mark, n; int na, nb, nc, nd, ne; scanf("%d",&n); na = nb = nc = nd = ne = 0; for(i = 1; i <= n; i++){ scanf("%d", &mark); if (mark>=90&&mark<=100) na++; if (mark>=80&&mark<=89) nb++; if (mark>=70&&mark<=79) nc++; if...
ALGO
0.994662
3.108517
0c6db19c-6294-4747-b509-413c8153933d
ThallesVicenzo/spot_finder
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.99887
6.783439
2ecad81c-fff1-4f88-9e2d-6ee794c88608
manikanta2901/ubuntu
.history/practice/cpp/codeforces/RequiredRemainder_20200629111420.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printVect(vect,dataStruc...
ALGO
0.999977
3.542484
279ce4c6-8aa5-46f2-b464-b0ce566898a5
krishna4040/DSA
gfg_practice/Maths_advanced/07_prime_fact_divisors/05_kth_factor.cpp
# include "bits/stdc++.h" using namespace std; // printing kth prime factor of n int kthPrimeFactor(int n , int k) { int count = 0; for (int i = 2; i <= n; i++) { while (n % i == 0) { n /= i; count++; if (count == k) return i; } ...
ALGO
0.999974
4.289095
85356b3d-e6d6-42b0-a8a4-fdb6383a75d7
prathampithalia/CP
Codeforces/C_Increase_and_Copy.cpp
#include<bits/stdc++.h> using namespace std; #define all(a) a.begin(), a.end() #define fi first #define se second #define pb push_back #define pyes cout << "YES" << endl #define pno cout << "NO" << endl #define ce cout << endl #define forr(i, n) for (int i = 0; i < n; i++) #define e...
ALGO
0.996123
4.060958
54f50331-e6d8-4ea7-b900-1261a7414bac
shasuri/AlgorithmStudy
cxrt/bootcamp/road_block.cpp
#include <iostream> #include <queue> #include <algorithm> using namespace std; #define MAXN 100 #define MAXL 1000001 int N, M; int pathMap[MAXN + 1][MAXN + 1]; int visited[MAXN + 1]; int originalPath[MAXN + 1]; const int HOME = 1; int BARN; struct Block { int id; int walked; }; queue<Block> roadBlock; v...
ALGO
0.999925
4.450131
f80ea960-84bc-43b5-9f84-87d7a5945d6c
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_valid_44_5.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int c, d; cin >> c >> d; if (c == d) if (d == 0) cout << "0" << endl; else cout << "1" << endl; else if (abs(c - d) == 1) cout << "-1" << endl; else cout << "2" << ...
ALGO
0.999961
3.88216
910bc94a-dfc4-433b-b2aa-9daf06635835
Exadios/boost
libs/graph/test/relaxed_heap_test.cpp
// Authors: Douglas Gregor // Andrew Lumsdaine #ifndef BOOST_RELAXED_HEAP_DEBUG # define BOOST_RELAXED_HEAP_DEBUG 0 #endif #include <boost/pending/relaxed_heap.hpp> #include <boost/test/minimal.hpp> #include <utility> #include <iostream> #include <vector> #include <boost/optional.hpp> #include <boost/rando...
TEST
0.970813
5.818222
abb4439d-2927-4da1-9f7b-a8414419973a
ishandutta2007/codeforces
generic_placeholder_name/normal/1497/D.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.999971
4.616352
88dde260-c43d-4a01-b2bf-71d7815bebf1
Rafiul29/programming-journey
leetcode/C++/Linked List/14-7 Implement Stack using Queue (Leetcode).cpp
class MyStack { public: queue<int> q; MyStack() { } void push(int x) { q.push(x); } int pop() { queue<int> newq; int last; while(!q.empty()){ int k=q.front(); q.pop(); if(q.empty()){ last=k; ...
ALGO
0.999203
5.608162
44b74bad-7bb9-4765-81f0-20b46ff39884
sami-colon/end_game
arrays/median of sorted array.cpp
#include<iostream> #include<math.h> #include<algorithm> using namespace std; int main(){ int n; cin >> n; int arr[n+n]; for(int i=0; i<2*n; i++){ cin >> arr[i]; } sort(arr, arr+n+n); cout << (arr[(int)floor(2*n + 1 - 1) / 2] + arr[(int)ceil(2*n + 1 - 1) / 2]) / 2<< endl; return 0; }
ALGO
0.999895
3.866257
689f6e15-0dca-4117-9df2-6f00613a8a53
aanda-stcloudstate-edu/WebSpace
cs201/Gaddis/9e/Labs/SourceCode/Lab1/logicprob.cpp
// This program takes two values from the user and then swaps them // before printing the values. The user will be prompted to enter // both numbers. // Place your name here #include <iostream> using namespace std; int main() { float firstNumber; float secondNumber; // Prompt user to enter the first number. co...
ALGO
0.902843
4.097235
fbf1627d-36e6-461b-a2f6-47b967d8f061
ISOLDE-Project/riscv-llvm
libc/src/math/generic/fmaxf128.cpp
#include "src/math/fmaxf128.h" #include "src/__support/FPUtil/BasicOperations.h" #include "src/__support/common.h" namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(float128, fmaxf128, (float128 x, float128 y)) { return fputil::fmax(x, y); } } // namespace LIBC_NAMESPACE
ALGO
0.867995
6.258453
715c9c6e-e305-4244-a7fe-8d45502a2382
Sabarno-15102002/Leetcode-Solutions
Mirror Tree - GFG/mirror-tree.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; /* A binary tree node has data, pointer to left child and a pointer to right child */ struct Node { int data; struct Node *left; struct Node *right; Node(int x) { data = x; left = right...
ALGO
0.999794
6.911039
fb19a09e-7b41-4748-a4d9-cf247a35c7e4
Pramath-N/Basics
Data Structures and Algo/Lvl1/Tree/HeightofTree.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ int key; Node* left; Node* right; Node(int k){ key = k; left = right = NULL; } }; int HeightofTree(Node* root){ if(root == NULL) return 0; return 1 + max(HeightofTree(root -> left) , HeightofTree(root -> right)); } ...
ALGO
0.999871
5.222087
cbd035f9-4c8c-45a4-9851-0db4020f3845
phoenixx1/Competitive-Programming-Solutions
LeetCode/Top_Interview_Questions/Easy_Collection/Strings/Reverse Integer.cpp
class Solution { public: int reverse(int x) { long result = 0; while (x != 0) { result = result * 10 + x % 10; if (result > INT_MAX || result < INT_MIN) { return 0; } x = x / 10; } return (int) result; } };
ALGO
0.999969
6.116853
051d3ffa-dd31-479c-bf44-2fe956d23d81
HubiDev/planecontrol
src/core/src/graphics/polyline.cpp
// ------------------------------------------------------------------------ // This file is part of planecontrol. #include "core/graphics/polyline.hpp" #include "core/graphics/geometry.hpp" #include <cassert> #include <cmath> #include <iostream> namespace core { namespace graphics { Polyline::Polyline(float f_thick...
TOOL
0.932609
5.909639
f7ea6a8e-2084-45b3-b877-cbb04e16816d
esengie/Semester1
1/task7/task7.cpp
// start time: 17:30 // //expected: 60 minutes // //actually: shitload of minutes // #include "stdafx.h" #include <stdio.h> const int arraylength=1000; int main( ) { bool arrayA[arraylength]; int num = 0; int cnt = 0; int i = 0; printf("this is a program which prints all the primes until the entered her...
ALGO
0.997638
3.948798
20a43158-42c8-4535-bc1a-fefdf2b6a900
daiwb/Algorithm
ZOJ/1061Web Navigation.cpp
#include <iostream> #include <string> using namespace std; int main(void){ int t,i,count1,count2; char op[10]; char cur[75]; char ba[105][75],fo[105][75]; cin>>t; for(i=0;i<t;i++){ if(i) cout<<endl; count1=count2=0; strcpy(cur,"http://www.acm.org/"); while(cin>>...
ALGO
0.996738
3.464341
ca186e92-10d8-4e8e-a73a-09ac17cc0329
nkb02/dsa
SLIDING WINDOW ALGO/max substring with all unique char.cpp
#include <bits/stdc++.h> #define ll long long #define lld long double #define el "\n" #define F first #define S second #define rep(i, m, n) for (ll i = m; i < n; i++) #define rev(i, n, m) for(ll i=n-1; i>=m; i--) #define pb push_back #define mp make_pair #define fl(i, n) for (long long i = 0; i < n; i++) #define rl(i, ...
ALGO
0.998831
4.464203
cdc4caa3-34cf-4179-9fc4-b11221b82789
CptJack2/icpc-challenge
2020/C-Domes/main.cpp
/*计算几何题,如果要dome di出现在dj左边,那么只有向量didj右侧的区域是可行的. * 初始设区域为整个广场,对每一对didj直线分别更新区域(一定是一个凸多边形),最后算面积*/ #include "bits/stdc++.h" using namespace std; struct Point{ double x,y; Point operator+(const Point& b){return Point{x + b.x,y+b.y};} Point operator-(const Point& b){return Point{x -b.x,y-b.y};} bool operator==(const P...
ALGO
0.998781
4.161773
18bf970a-9779-4772-beda-73704db1a3e4
pallavi1901/Hactoberfest2022
Basic cpp/Pivot_In_Array.cpp
#include <iostream> using namespace std; int getPivot (int *nums, int n) { int s, e; s = 0; e = n - 1; while (s < e) { int mid = s + (e - s) / 2; if (nums[mid] >= nums[0]) { s = mid + 1; } else { e = mid; } } return s; } int main () { int nums[5] = {3,4,5,1...
ALGO
0.999977
5.396091
2adc01ed-a264-4b82-9a14-3ed6ea61c62f
LonglongSang/Life_of_XDU
OiWiki_Learning/背包问题/3. 完全背包问题.cpp
//https://www.acwing.com/problem/content/3/ #include <stdio.h> #include <stdlib.h> #include <iostream> #include <algorithm> using namespace std; int n,v,a,b; int dp[1001]; int main(){ scanf("%d%d",&n,&v); for(int i=0;i<n;i++){ scanf("%d%d",&a,&b); for(int i=a;i<=v;i++) dp[i]=max(dp[i],dp[i-...
ALGO
0.99981
3.439861
4aabb1a0-8d08-4eec-9b37-d73d645c867d
Singhdhiru/DSA-with-c-plus
Dp/1D-Dp/Lec01/fiboonacci.cpp
// recursion to memoization conversion // ? recursion code // #include <iostream> // using namespace std; // int fib(int n){ // base case // if(n<=1){ // return n; // } // return fib(n-1)+fib(n-2); // } // int main() { // int n = 5; // cout<<fib(n)<<endl; // return 0; // } // ? dy...
ALGO
0.999985
5.507384
50f8c645-98d8-45ab-8d9e-73536758dd48
starvader13/CPP-Practice
Codechef_Solution/ZCOSCH/ZCOSCH.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int r; cin>>r; if(r>=1 && r<=50){ cout<<100<<endl; } else if(r>=51 && r<=100){ cout<<50<<endl; } else cout<<0<<endl; }
ALGO
0.999188
3.237456
0eb51238-6b52-451a-ba08-6546dd84380f
TriMickTri/elements-of-programming-interviews
Shortest_path_fewest_edges.cpp
#include <cassert> #include <deque> #include <iostream> #include <limits> #include <queue> #include <random> #include <set> #include <tuple> #include <utility> #include <vector> using std::cout; using std::default_random_engine; using std::deque; using std::endl; using std::numeric_limits; using std::pair; using std::...
ALGO
0.999914
5.295974
5481bd7c-4803-4aef-bd90-1a29b5da3b56
saikiranboga/Coding
SPOJ/DCOWS.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef pair<int, int> PII; #define PI 3.1415926 #define pb push_back #define mp make_pair #define ff first #define ss second #define sz size() #define ln length() #define rep(i,n) for(int i=0;i<n;i++) #define fu(i,a,...
ALGO
0.99999
3.459677
0bd78c9f-6a95-41bd-9723-365f0ac384f0
ParasAnxi/LeetCode-CPP
Q2701-2800/2785. Sort Vowels in a String.cpp
class Solution { public: bool Vowel(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; } string sortVowels(string s) { vector<int>l(26,0); vector<int>u(26,0); for(auto it:s){ if(it=='a' || it==...
ALGO
0.999956
6.158251
c8c67652-76e4-4c80-92bf-ba841a9b9c8d
Murad501/Phitron
Semester 2/Course 1/Module 18/input_binary_tree.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int value; Node *left; Node *right; Node(int value) { this->value = value; this->left = NULL; this->right = NULL; } }; void level_order(Node *root) { if (root == NULL){ return; } q...
ALGO
0.999922
4.725718
0b7ec78a-0b41-4979-8efd-d89bb52e802e
AdarshNandanwar/DSA-and-Competitive-Programming
LeetCode/226.cpp
// https://leetcode.com/problems/invert-binary-tree/ // Method 1 (Recursion, O(n)): /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr),...
ALGO
0.999991
7.07847
0c069900-c203-4328-b2b1-76c88891ace4
Programmmer-X/Basic-C-From-sctrach-to-Pointers
3_1_Variable_scops.cpp
#include <iostream> using namespace std; int glo_1 = 5; // GlOBAL VARIABLE-1 int glo_2 = 8; // GlOBAL VARIABLE-2 void sum(){ cout<<"\nGOBAL VARIABLE-2 (DECLARED IN A Function)="<<glo_2; } void sum2(){ glo_2=99; cout<<"\nGOBAL VARIABLE-2 (MODIFIED inside a function)="<<glo_2; } int main() { cout <<...
ALGO
0.917271
4.858486
38a07595-5073-4855-af14-4db6550bf741
akshin-kuvshin/smth
Задачи (по источникам)/Сириус/Введение в динамическое программирование/8. Покупка билетов/buyer.cpp
// author: Danila "akshin_" Axyonov #include <iostream> using namespace std; typedef long long int lli; const lli MAX_SIZE = (lli)5e3 + 5LL, INF = (lli)1e18 + 1LL; class Buyer { public: lli A; lli B; lli C; }; lli N; Buyer q[MAX_SIZE]; lli dp[MAX_SIZE][4]; // dp[i][0] - // dp[i][1] - , i- , ...
ALGO
0.999846
4.264002
da5555e9-d144-416f-9e60-97453ab33f2f
martonistvan/CarND-Path-Planning-Project-master
src/Eigen-3.3/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); MatrixXf n(2,2); MatrixXf result(2,2); m << 1,2, 3,4; n << 5,6, 7,8; result = m * n; cout << "-- Matrix m*n: --" << endl << result << endl << endl; result = m.array() * ...
ALGO
0.996707
4.30885
fe6fa8a3-c435-49c2-b6be-27288bc55875
leyalutik/leya
terapy/emotions/parse_line.cpp
#include "parse_line.h" //-------------------------definitions--modify string in grid---------------------------------- void parse_line(const std::string given_line, std::vector<std::string>& grid_rows, const int32_t GRID_ROW_SIZE) { //Если в строка без пробелов превысила лимит размера ячейки обрубаем слово, /...
TOOL
0.975995
3.926517
09e6cf41-b6b9-4532-9220-c9eaa368faae
ishandutta2007/codeforces
pacu/normal/548/A.cpp
#include <iostream> #include <string> using namespace std; string s; int k,n; int main() { cin >> s >> k; n = s.size(); if(n%k) { cout << "NO\n"; return 0; } k = n/k; for(int i=0;i<n;i++) { if(s[k*(i/k)+(i%k)] != s[k*(i/k)+k-1-(i%k)]) { cout << "NO\n"; return 0; } } cout << "YES\n"; return ...
ALGO
0.999995
3.925395
e0ebc304-0363-4807-80b1-ac7f253c3c05
PolinaLoginova/HOMEWORK
Цепные структуры данных/02 март.cpp
#include <iostream> #include <string> using namespace std; struct Node { string data; Node* next = NULL; }; class string_queue { Node* head; public: string_queue(): head(NULL){} void push (string x) { if(head = NULL) { head = new Node; head -> data = x;...
ALGO
0.91424
3.619236
36056068-6260-48d0-b39d-e26169afecb6
t0whid/Solved-Problem
Codeforces/1720B. Interesting Sum.cpp
/* Allah, increase me in knowledge. Towhid Hasan */ #include<bits/stdc++.h> using namespace std; #define fast_io ios_base::sync_with_stdio(0); cin.tie(0) #define ll long long #define pi acos(-1.0) #define pii pair<ll,ll> #define mp make_pair #define cln(x) me...
ALGO
0.999855
3.585926
d004f199-094b-4f46-9407-d81f57fd8bdf
hikjik/leetcode
solutions/distribute-candies-among-children-ii/test.cpp
#include <catch.hpp> #include <solution.hpp> TEST_CASE("Simple") { struct TestCase { int n; int limit; long long expected; }; std::vector<TestCase> test_cases{ { .n = 5, .limit = 2, .expected = 3, }, { .n = 3, .limit = 3, ...
TEST
0.991753
6.767352
7940ea6f-337a-4926-a52f-b1715cfe0c58
hsaeidi1363/icra19_suture_rtt
src/stitch_contact.cpp
#include <icra19_suture_rtt/stitch_contact.hpp> #include <tf_conversions/tf_kdl.h> //! Constructor for a simple stitch with contact forces StitchContact::StitchContact( const KDL::Frame& Rts, double cf, double cd, double tf, double td ) : StitchBase( Rts, tf, td ), contact_f( cf...
ALGO
0.962393
4.357039
70df4aa3-e180-4a96-be42-87dcceb352da
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_9425_7.cpp
#include <bits/stdc++.h> using namespace std; const int inf = 1e9; const int MOD = 1e9 + 7; const int N = 1e5 + 10; int n, k, unk[N], a[N]; string s; void prepare() { cin >> n >> k; for (auto i = (0); i <= (n); i++) { cin >> s; if (s[0] == '?') unk[i] = 1; else { int sign = 1; for (aut...
ALGO
0.999969
3.629027
87a6e924-0410-4036-bb4e-a6fe00b90615
kks227/BOJ
3000/3033.cpp
#include <cstdio> #include <vector> using namespace std; const int MOD = 100003; const int P = 2; inline int mod(long long n){ if(n >= 0) return n % MOD; return ((-n/MOD+1)*MOD + n) % MOD; } int main(){ int L; char W[200001]; scanf("%d %s", &L, W); int lo = 0, hi = L; while(lo+1 < hi){ int mid = (lo+hi)/2; ...
ALGO
0.999943
3.343335
80606d32-f20b-41ff-9d2f-156263366b68
LaimOr127/TON-Smart-Contract
Receiver.cpp
#include <iostream> #include <cstring> #include <openssl/sha.h> #include <arpa/inet.h> #include <unistd.h> #define MAX_DATA_SIZE 127 #define MAX_REFS 4 struct Cell { uint8_t data[MAX_DATA_SIZE]; size_t data_size; Cell* refs[MAX_REFS]; uint8_t refs_count; Cell() : data_size(0), refs_count(0) { ...
WEB
0.942098
6.178833
2f0c159c-46b9-4642-8e82-c9e993f99f80
DangCuuDuong/nhapmonlaptrinh
bai16level6.cpp
#include <iostream> using namespace std; void nhap(int A[],int &n); float tong(int A[],int n); void xuat(float kq,int n); int main() { int A[100],n; nhap(A,n); float kq=tong(A,n); xuat(kq,n); return 0; } void nhap(int A[],int &n) { cin>>n; for (int i=n-1;i>=0;i--) cin>>A[i]; } float tong(int A[],int n) { int...
ALGO
0.999979
3.518302
04f43eaa-bcd0-4492-88bb-12c06117f4af
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_623_1.cpp
#include <bits/stdc++.h> using namespace std; #define int long long typedef long long ll; typedef unsigned long long ull; typedef unsigned __int128 HASH; typedef pair<int,int> pii; typedef pair<ll, ll> pll; typedef pair<ull, ull> pullull; typedef pair<ll,int> plli; typedef pair<double, int> pdbi; typedef pair<int,pii>...
ALGO
0.999817
4.352947
170428cc-a504-42c6-94b7-0aa96202325e
minisparrow/acm
step1/leetcode/cpp/tree_set.cpp
//#include "treenode.hpp" #include <iostream> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; void TraversalVectorOfVector(vector< vector<int> > levels){ for(int i=0; i< levels.size(); i++){...
ALGO
0.999957
5.936741
370f468f-919c-487c-a4e7-d41d73a689fd
1shi-xiao/CV-Infer
third_parties/opencv-4.10.0/3rdparty/carotene/src/count_nonzero.cpp
#include "common.hpp" #include <limits> namespace CAROTENE_NS { s32 countNonZero(const Size2D &_size, const u8 * srcBase, ptrdiff_t srcStride) { internal::assertSupportedConfiguration(); #ifdef CAROTENE_NEON Size2D size(_size); if (srcStride == (ptrdiff_t)(size.width)) { size...
ALGO
0.96157
6.505074
3c9f8e35-0c72-435f-b591-a4703303da29
USTC-CS-Course-Resource/USTC-CS-Resources
CS/计算机系统概论/Lab04/OrigC/OrigC/OrigC.cpp
// OrigC.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> using namespace std; typedef int i16; typedef unsigned int u16; int counter = 0; i16 func(i16 n, i16 a, i16 b, i16 c, i16 d, i16 e, i16 f) { i16 t = getchar() - '0' + a + b + c + d + e + f; counter++; if (n > 1) { i16 x = func(n - 1, a, b, c...
ALGO
0.99954
3.550112
8332a934-8b64-4d60-b029-20767ac023df
TuDouuuuu/Swan-Habataki
整体二分/子矩阵第k大.cpp
/* [input] [output] 2 2 2 1 3 4 1 2 1 2 1 1 1 1 2 2 3 3 */ class BIT { public: int val[MAXN][MAXN]; int n, m; void init(int _n, int _m) { n = _n, m = _m; for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) val[i...
ALGO
0.999917
3.493004
b54ac4a4-7b0c-467c-8d4c-132e164e12f6
Tanishq0505/String
6_ReverseWordsinString.cpp
// Reverse Words in a String [Leet code 151] // Given an input string s, reverse the order of the words. \ // A word is defined as a sequence of non-space characters. The words in s will be separated by at least one space. // Return a string of the words in reverse order concatenated by a single space. // Note that ...
ALGO
0.999827
5.616683
d6e950bd-2945-4f5e-8a07-ee66d0b8574f
keyehzy/Kattis-problems
cpp/canonical/coinflip.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector <int> vi; typedef vector <string> vs; typedef pair <int, int> pii; typedef vector<pii > vpii; #define pb push_back constexpr ll INF = 1e18; constexpr int MAXN = 103; constexpr int MAXV = 2000006; int n; int a[MAXN]; ll dp[MAXV]; ll...
ALGO
0.999884
4.483383
7bf9f3b3-adf4-45a4-b660-b06086f9a950
SiddheshKukade/leetcode-solutions
258-Move Zeros/sol.cpp
class Solution { public: void moveZeroes(vector<int>& nums) { int n= nums.size(); if(n==0 || n==1 ) return ; int left =0, right=0; int temp; while(right<n){ if(nums[right]==0){ ++right; }else{ temp = nums[right]; ...
ALGO
0.999943
6.287209
0a10d74e-7a2d-48eb-ac2a-6bd31f28de36
zzzdeb/asrlab
src/NeuralNetwork.cpp
/*****************************************************************************/ /* */ /* */ /*****************************************************************************/...
DATA
0.965963
7.27312
a0fbbfc2-f7f6-4840-9424-2d797a938315
JaeHyoNi/BackJoon
DFS_BFS/DFS/1103.cpp
#include <bits/stdc++.h> #include <windows.h> using namespace std; #define point pair<int,int> #define range(x,y) (x>=0 && x<N && y>=0 && y<M &&arr[x][y] != 2100000000 && is) int N,M,ans; bool VISIT[50][50],is = true; int arr[50][50]; int DYN[50][50]; void DFS(point p,int dep){ int jump = arr[p.first][p.second];...
ALGO
0.999898
3.755194
107e98f4-1d3a-42de-aafe-dbbc7faada49
dilishp/Algo-DSSolutions
Practice/Encrypt.cpp
#include "pch.h" #include <iostream> #include <fstream> #include <string> #include <bitset> using namespace std; class encrypt_decrypt { public: encrypt_decrypt() { } int getascii(char c) { return (int)c; } void convert_binary_flip(int num) { bin_num = bitset<8>(num); complement = bin_num.to_string('...
ALGO
0.9995
4.592705
fa86e45c-ebbd-4d03-bb61-0d7e2f2be4c1
Priyans1727C/LPU_Colab
DSA/lecutre_16/Nithish_infix-to-postfix.cpp
// You are using GCC #include <iostream> #include <stack> #include <string> bool isOperator(char c) { return (c == '+' || c == '-' || c == '*' || c == '/'); } int getPrecedence(char op) { if (op == '+' || op == '-') return 1; if (op == '*' || op == '/') return 2; return 0; } std::str...
ALGO
0.99968
6.299428
5bc50917-fc5d-44f4-85f6-bc07b1b20443
Bhanupriya-art/DSA-Coding-Practice
Stack/Stack_Using_Array.cpp
#include <iostream> using namespace std; class Stack{ private: int size; int top; int* S; public: Stack(int size); ~Stack(); void push(int x); int pop(); int peek(int index); int isFull(); int isEmpty(); void display(); int stackTop(); }; Stack::Stack(int size) { ...
ALGO
0.993879
4.707287
12868d2b-9bca-4dca-85b0-a4a822bd679a
MD-Jafor-Sadek-Khan/Problem-Solving-in-C-Cpp-Python
C++/8.5 test.cpp
#include<bits/stdc++.h> using namespace std; vector<int> merg(vector<int> a1,string* x,int k,int* comp) { if(a1.size()<=1) { *comp=*comp+1; return a1; } int mid=a1.size()/2; vector<int>a,b,fa,fb,r; for(int i=0;i<mid;i++) { *comp=*comp+1; a.push_back(a1[i])...
ALGO
0.999984
3.840747
e9ff0fd5-128c-4c64-b1ef-b12fa0b1c040
ChipsAKoi/Comp_Sci_1
Comp Sci/Midterm 2 Practice/hypotenuse function.cpp
#include <iostream> #include <cmath> using namespace std; double hyp(double, double); int main_done1() { double a = 6.0; double c, b = 7.0; c = hyp(a, b); cout << "C = " << c << endl; return 0; } /* Should print 5 for c */ double hyp(double side1, double side2) { double hypotenuse; hypotenuse = sqrt(pow(sid...
ALGO
0.999428
3.832926
0d1a73dc-88c2-497a-9d2a-b1f367a95761
berneylin/LeetCode2019Spring
104/maximum_depth_of_binary_tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int maxDepth(TreeNode* root) { if(!root) return 0; return max(maxDepth(root->le...
ALGO
0.99965
6.405771
2c1e7d8d-aa80-4119-8014-49467b3b2ad8
PKU-SDS-lab/POQD-ICML25
Decompose_retrieval/Dessert-main-v4/deps/eigen/bench/benchmarkSlice.cpp
// g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX #include <iostream> #include <Eigen/Core> using namespace std; using namespace Eigen; #ifndef REPEAT #define REPEAT 10000 #endif #ifndef SCALAR #define SCALAR float #endif int main(int argc, char *argv[]) { typedef Matrix<SCALAR, Eigen::Dynam...
TOOL
0.902482
3.688043
56b1fbea-d980-406e-a7a5-76b1e71ebc0c
ishandutta2007/codeforces
heart_blue/normal/1696/A.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.999466
4.297649
cef0b9b0-a4d6-4af3-909a-840c72dbdbc6
HaKkaz/Competitive-Programming
ZeroJudge/a695.cpp
#include"bits/stdc++.h" #define pb push_back #define mp make_pair #define int long long #define pii pair<int,int> #define all(x) (x).begin(),(x).end() #define rz(x) resize(x) #define sz(x) (int)(x).size() #define F first #define S second #define endl cout<<'\n'; #define LINE cout<<"--------------------------\n"; #defin...
ALGO
0.999919
3.99084
fe5d314c-54e7-49a2-a134-1e836dec41f8
Gggguns/programmingLearning
c++/text_2024_3_3_dp_20.cpp
#define _CRT_SECURE_NO_WARNINGS #include<bits/stdc++.h> using namespace std; class Solution { public: int maxSubarraySumCircular(vector<int>& nums) { //dp //ʼ // //ؽ int n = nums.size(); vector<int> f(n); auto g = f; int sum = nums[0]; f[0] = n...
ALGO
0.999721
4.371156