uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0f2e5b40-cfc9-4d6e-b710-33ee3edb3d35
ishandutta2007/codeforces
ronnie007/normal/626/B.cpp
#include<iostream> #include<stdio.h> #include<vector> #include<string> using namespace std ; #define MAXN 203 int n ; string a ; int used[ MAXN ][ MAXN ][ MAXN ] ; void dfs ( int x , int y , int z ) { if ( used[ x ][ y ][ z ] == 1 ) { return ; } used[ x ][ y ][ z ] = 1 ; if ( ( x + y + z ) == 1 ) { return ; } i...
ALGO
0.999895
4.175902
8bb2e4a7-040c-4ffa-97e6-6d4a8793ddd2
Rohan-Chinchwade/CppPrograms
swapalternateelementinarr.cpp
//#include<iostream> //void swapAlternateEle(int arr[],int size) //{ // for(int i=0;i<size;) // { // if(i+1<size) // { // std::swap(arr[i],arr[i+1]); // i+=2; // } // } //} //int main() //{ // int arr[6]={1,2,3,4,5,6}; // swapAlternateEle(arr,6); // for(int i=0;i<6;i++) // { // std::cout<<arr[i]<<" "; // } // s...
ALGO
0.986286
3.900378
2b16cdce-98e4-48cc-a995-8659c01c26cd
BriamTurmeque/Sripts_C--
ejerciciosFinalPractica/ejer7PARCIAL/main.cpp
#include <iostream> using namespace std; int main() { //escribir un programa que sume dos matrices bidimensionales. Las matrices para que puedan sumarse deben tener las mismas dimensiones. return 0; int matriz1[2][4], matriz2[2][4], matrizRes[2][4]; cout<<"Digite los valores de la matriz 1: "<<endl; for (int a=0;...
ALGO
0.993237
3.936617
f318ea30-c769-4d97-ab76-2cf11b254bbf
JustAG7/Competitive_Programming
Others/NgoaiLe/DCL2023_MeCung.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1005; char a[N][N]; void indef(){ #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif } void solve(){ int n; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < n; ...
ALGO
0.999323
4.663344
36b1d5fb-78bb-4251-8096-3f6096dca52f
thuang86714/LeetCodeCpp2024ver
Daily Challenge_131. Palindrome Partitioning.cpp
#include <vector> #include <string> class Solution { private: std::vector<std::vector<std::string>> res; bool isPalindrome(std::string& s, int left, int right){ while(left < right){ if(s[left++] != s[right--]){ return false; } } return true; }...
ALGO
0.999927
6.52371
43df2883-8c62-4b58-85b3-52b8666b35c9
anshyyy/CPP
Codeforces/1674A.cpp
#include <bits/stdc++.h> #define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define loop(i,a,n) for(int i=a;i<n;i++) #define all(v) (v).begin(),(v).end() #define all1(v) (v).begin()+1,(v).end() #define allr(v) (v).rbegin(),(v).rend() #define allr1(v) (v).rbegin()+1,(v).rend() #define ff first ...
ALGO
0.99984
4.973169
93a11569-8d88-4aba-99bc-b637e3619534
AryanRaj315/CompetitiveProgrammingSolutions
B-anatoly-and-cockroaches/main.cpp
#include <iostream> #include<algorithm> #include<vector> #include<string> #include<cmath> #include<cstring> #include<map> using namespace std; #define loop(i, start, end) for(int i = start; i <= end; i++) #define ll long long int #define arrayInput(arr, n) loop(i, 0, n-1){ cin >> arr[i];} #define arrayDisplay(arr, n) ...
ALGO
0.99922
4.611665
61dd9035-f060-4a27-9c1e-7bac812af8b6
kushaltiwari18/C-PW
Questions/Set/unordered_set.cpp
/* unordered_set :- - values are stored in unordered manner. - values are stored in hash table. - unique values are stored. - values cannot be modified. - Time complexity of insert, delete, search is O(1). - unordered_set is faster than set. */ #include<iostream> #include<unordered_set> using namesp...
ALGO
0.935985
4.162274
d87beeac-a828-41fe-8e0d-cefc6f4d0c09
soduco/directory-annotator-back
sources/src/DOMEntriesExtractor.cpp
#include "config.hpp" #include "DOMBuilder_helpers.hpp" #include <spdlog/spdlog.h> #include <algorithm> #include <span> #include "scribo.hpp" namespace { /* constexpr int kNFilter = 6; static constexpr float lw[3][kNFilter] = {-0.02755463, 4.5238338, -3.2384014, -1.030055, 0.50755626, -0.6941753, ...
ALGO
0.956532
5.12955
4b63c539-7d6c-451a-b138-ca124a4f9ff9
the-fall-of-icarus/dsacpp
recursion/printAllSubsets.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; void printSubsets(vector<int> &arr, vector<int> &ans, int i){ if(i == arr.size()){ for(int val : ans){ cout << val << " "; } cout << endl; return; } //choice of inclusion ans.push_...
ALGO
0.999767
4.910893
985c5c95-162f-43d9-b73f-1f2146468998
camil0palacios/Competitive-programming
solutions/vjudge/UNAL Training May 8th/A - Powerful array/solution.cpp
#include <bits/stdc++.h> #define endl '\n' #define ll long long using namespace std; const int MXN = 2000000; const int MXA = 1e6 + 5; const int sq = 450; int n, t; int a[MXN], cnt[MXA]; struct Query { int l, r, idx; Query() {} Query(int l, int r, int idx): l(l), r(r), idx(idx) {} bool operator<(const...
ALGO
0.999908
4.150536
af720b81-f919-488c-a53a-ac748448a545
gzgreg/ACM
2017-09-13-msft3c/setgame.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef vector<int> vi; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; for(int id = 1; id <= n; id++) { string a, b; cin >> a >> b; set<char> fill = {'E', ...
ALGO
0.999805
3.926898
03ab94ef-a26d-49cb-ba7a-5f76d6c9decb
Danielbook/TNG033_-_Programmering_i_C-
Lectures/Lecture12/vectors_tables.cpp
/*************************************************************************** * TNG033: F 12 * * A program to illustrate the use of vectors * * to represent tables with lines and columns * * A vector of...
TOOL
0.997367
3.922906
ff5f24c7-5a6d-4a05-8a5e-dcb8fcd8aa82
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_10263_9.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; long long int a[n], count = 0; for (long long int i = 0; i < n; i++) { cin >> a[i]; } if (n <= 2) cout << 0 << "\n"; else { sort(a, a + n); for (long long int i = 0; i < n; i++) { if ((a[i] != a[0])...
ALGO
0.999958
3.79218
e50dcd6e-0b59-4631-990a-5af25967304f
priyamsahoo/coding_practice
DSA_Rough_Practice/Binary_Search/10_searchInRotatedArray.cpp
// Given a sorted rotated array and a target, find the index of the target element #include<bits/stdc++.h> using namespace std; int findElement(vector<int> v, int target) { int l = 0, r = v.size() - 1; while(l <= r) { int m = l + (r - l) / 2; if(v[m] == target) { return m; ...
ALGO
0.999989
5.913357
08fdc7b3-0dba-4bca-952e-a8e6517864d8
waiwai444/oj
uva/514 - Rails/514.cpp
#include <stdio.h> #include <vector> int main() { int i, c, n; int target[1000]; std::vector<int> station; while(scanf("%d", &n), n) { while(scanf("%d", &target[0]), target[0]) { for(i = 1; i < n; i++) scanf("%d", &target[i]); station.clear(); c = 1; for(i = 0; i < n; i++) { if(!station...
ALGO
0.999863
3.48027
ff016c78-1379-415d-930a-37cbeff57ced
himanshuc3/problemo
src/category/recursion/sum_it_up.cpp
/** * Problem: Print all subsets having sum = t and unique. * */ #include<bits/stdc++.h> using namespace std; // Storing all subsets with sum = t ( includes repeating subsets). vector<vector<int> > v; void sumItUp(vector<int> arr, int index,int t,vector<int> temp){ //Past length of string if(index==arr.si...
ALGO
0.999958
4.452385
a4038d17-b774-4a27-b5e4-28e940643116
JJJIEYYDS/-
daimaqu/atcoder/abc/309/E.cpp
#include<iostream> #include<cstring> #include<algorithm> #include<iomanip> #include<vector> #include<map> #include<queue> #include<set> using namespace std; typedef pair<long long ,long long > PLL; typedef long long ll; const int N=5e5+10,INF=0x3f3f3f3f; int n,m,k; ll h[N],e[N*2],ne[N*2],idx,w[N]; bool st[N]; ll re...
ALGO
0.999917
3.77066
817b44f4-57ee-47ce-9e23-ec9bd5a17693
ngocquys/DSA-PTIT
DSA05027.cpp
#include<bits/stdc++.h> using namespace std; #define foru(i,a,b) for(int i=a;i<=b;++i) #define ford(i,b,a) for(int i=b;i>=a;--i) #define ii pair<int,int> #define ll long long #define fi first #define se second #define fill(a,b) memset(a,b,sizeof(a)) const int N=1005; const int S=1005; int t,n,s,a[N],b[N],c[N][S]; in...
ALGO
0.999848
3.454622
963edb20-607a-412b-bb7e-3069a4319eaa
vayer2005/acm
1700s/835G.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; #define pb push_back #define ppb pop_back #define mp make_pair #define int long long using vpi = vector<pair<int, int>>; using pi = pair<int, int>; using vi = vector<int>; using vvi = vector<v...
ALGO
0.999962
4.923601
cdcbb439-772d-4dbf-b025-00ba2b1f542a
gongruiyang/Algorithm_Template
中国剩余定理.cpp
#include <iostream> #include <algorithm> using namespace std; typedef long long LL; LL exgcd(LL a, LL b, LL &x, LL &y) { if (!b) { x = 1, y = 0; return a; } LL d = exgcd(b, a % b, y, x); y -= a / b * x; return d; } int main() { int n; cin >> n; LL x = 0, m1, a1;...
ALGO
0.999971
4.002837
2cfbfb73-c0d9-44bb-9f4e-11f9405b8970
MyckelChamorro/Estructuras_Grupo_5
Parcial I/Extras/ACHIG STEVEN/Extra 4/templateMultiplicacion.cpp
#include <iostream> using namespace std; /* UNIVERSIDAD DE LAS FUERZAS ARMADAS ESPE * PROGRAMA PARA MULTIPLICAR * Autor: Achig Toapanta Steven Jossue * Fecha de creacion: 01/11/2021 * Fecha de Modificacion: 01/11/2021 * Version: 1.0 * Estructura de Datos, NRC: 7166 */ template <class T> class Multiplicacion{ ...
ALGO
0.99406
3.815509
5fde9e81-a4fd-466b-a072-a844e18e0775
haoel/leetcode
algorithms/cpp/intersectionOfTwoLinkedLists/intersectionOfTwoLinkedLists.cpp
// Source : https://oj.leetcode.com/problems/intersection-of-two-linked-lists/ // Author : Hao Chen // Date : 2014-12-01 /********************************************************************************** * * Write a program to find the node at which the intersection of two singly linked lists begins. * * For...
ALGO
0.999885
5.020799
6a7f2d61-c4cf-4d75-b0e3-c997c5298f68
tirumalateja09/PPS-LAB
WEEK-4&5/5Q. SERIES-II.cpp
/*ii.sum=x-x3/3!+x5/5!........................., */ #include<stdio.h> #include<math.h> int main(){ int i,j,n,x,k=0,fact=1; float sum=0; printf("enter the value of x :"); scanf("%d",&x); printf("enter the number of terms :"); scanf("%d",&n); for(i=1;i<=2*n-1;i=i+2){ fact=1; for(j=1;j<=i;j++){ fact=fact*j; ...
ALGO
0.9998
3.279375
9afe5126-cf6c-4c17-a361-8fa249bf57ea
ssaabbii/stuff
task 3_5/enc_temp_folder/cae47f4296f66bf3a560ca97b4207740/Source.cpp
#include <stdio.h> #include <stdlib.h> struct Lamp { int m_voltage; }; //======================================== //======================================== struct Switcher { int* m_influenceToLamps; int m_isWork; }; void createSwitcher(struct Switcher* controller, char* buffer, int amountOfLamps) { controller->m...
ALGO
0.998899
3.289398
bd00704e-7c51-4b56-a72f-1baeb6f5a8f6
lu998996/C-Plus-Plus
backtracking/magic_sequence.cpp
/* * @brief [Magic sequence](https://www.csplib.org/Problems/prob019/) * implementation * * @details Solve the magic sequence problem with backtracking * * "A magic sequence of length $n$ is a sequence of integers $x_0 * \ldots x_{n-1}$ between $0$ and $n-1$, such that for all $i$ * in $0$ to $n-1$, the number ...
ALGO
0.999879
6.960248
c68bf864-4296-4d4b-a06b-6eaee2a65cea
sun1218/openjudge
ch0103/ch0103_08.cpp
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(void) { double c,f; scanf("%lf",&f); c = 5 * (f-32) / 9 ; printf("%0.5f",c); return 0; }
ALGO
0.999308
3.167144
532c4433-f2ea-41d0-90ea-e134285a7ce0
umaidansari12/CP_Backup
hackerrank/adding_ones.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { //code int t; cin>>t; while(t--) { int n,k; cin>>n>>k; vector <int> a(n); for(int i=0;i<k;i++) { int j; cin>>j; for(int c=j-1;c<n;c++) { a[c]++; } ...
ALGO
0.999655
3.100805
67d7de7f-f4a5-4a51-b613-4c28eaca36cf
DeepanshuNIT27/Leetcode
0105-construct-binary-tree-from-preorder-and-inorder-traversal/0105-construct-binary-tree-from-preorder-and-inorder-traversal.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.999975
6.542222
53044387-a9e5-4618-87a1-56be865427fe
paultb3/Programacion
primera practica.cpp/Ejercicio_15.cpp
#include <iostream> using namespace std; int main(){ int sum=0; for(int i=1;i<20;i = i+ 1){ sum = sum + i; } cout<<"La suma de los elementos es:"<<sum; return 0; }
ALGO
0.977536
3.02144
a94a9cdb-f59f-4968-b6f4-b9ca51281117
dy-shzhang/PATcode
src/PTA1093.cpp
#include<iostream> #include<vector> #include<string> using namespace std; //long int int main1093() { string record; int countp = 0; long allt = 0; int tmpsum = 0; cin >> record; for (int i = 0; i < record.size(); i++) { if (record[i] == 'P') countp++; else if (record[i] == 'A') { tmpsum += countp;...
ALGO
0.998839
3.662065
68c87236-b26d-49d5-889f-e977bb431199
Nautiyaladitya/Cpp
without functions/area of rect and perimeter.cpp
#include<iostream> using namespace std; int main(){ int l,b,area , peri; cout<<"\n enter values of length and breadth:"; cin>>l>>b; area=l*b; peri=2*(l+b); cout<<"\n area: "<<area; cout<<"\n perimeter: "<<peri; return 0; }
TOOL
0.990295
3.520995
2ca205fe-43bf-4537-83fa-3ab313e9f4da
ksaveljev/UVa-online-judge
12488.cpp
#include <iostream> #include <map> #include <vector> using namespace std; #define pow2(i) (1<<i) #define bit(i) (1<<i) #define isOdd(i) (i&1) #define isEven(i) (!(i&1)) #define sz(i) i.size() #define REP(i, b, n) for (int i = b; i < n; i++) #define REPI(i, b, n) for (int i = b; i <= n; i++) #define rep(i, n) REP(i, 0,...
ALGO
0.9992
3.500756
34c2b81c-7ef5-4b53-af90-e07205f90c30
Rishabh2743/-striver-DSA-sheet-arsh-goyal
0104-maximum-depth-of-binary-tree/0104-maximum-depth-of-binary-tree.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.999594
6.335456
2620b2b5-7e32-4bd6-a94c-5a426817196f
blackdreamer15/OOP-in-Bytes
Misc/final-exam.cpp
/** ----------------------------------------- *NAME : Baki Jessy Justice Julien *PROGRAM : Computer Engineering *INDEX No.: ******* *Ref. No. : ******** ----------------------------------------- */ #include <iostream> #include <string> #include <iomanip> //For setw() #include <typeinfo> //For typeid().name() #inc...
TOOL
0.895031
3.839917
ae6e1fbb-dfcb-4e5b-bb00-b34e83201f34
shuvokr/Solution_for_UVA_OnlineJudge_Problems
417.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <ctype.h> #include <string> #include <iostream> #include <sstream> #include <vector> #include <queue> #include <stack> #include <map> #include <list> #include <algorithm> using namespace std; #define sf scanf #define pf printf #defi...
ALGO
0.999819
3.042652
86653657-aa50-4702-8dbc-f90b3456f26a
MingyuKwon/LeetCode
0056-merge-intervals/0056-merge-intervals.cpp
//Comment and Upvote class Solution { public: vector<vector<int>> merge(vector<vector<int>>& interval) { vector<vector<int>> result; //base case when threr are no intervals if(interval.size()==0)return result; //sort takes O(nlogn) time // 벡터의 벡터를 sort하면, 첫번쨰 인자를 기준으로 마치 문자열...
ALGO
0.999996
5.88521
d1f93a57-f81e-46e6-87bb-024f1fdac6c4
Mirocidij/ACMP
cpp/ACMP907.cpp
#include <iostream> #include <math.h> using namespace std; int main() { int w, h, r; cin >> w >> h >> r; if (min(w, h) / 2 >= r) { cout << "YES" << endl; } else cout << "NO" << endl; return 0; }
ALGO
0.999663
4.01737
23697c27-1132-4eda-864a-3a7cee19939a
Ranger-ctrl/c-practice
时间差(if).cpp
#include<stdio.h> int main() { int h1,m1,h2,m2,h3,m3; printf("请输入两个时间,较大的时间在前,如10 40表示10时40分\n"); scanf("%d %d %d %d",&h1,&m1,&h2,&m2); h3=h1-h2; m3=m1-m2; if(m3<0){ m3=m3+60; h3--; } printf("时间差为%d时%d分",h3,m3); return 0; }
ALGO
0.999783
3.342063
75bb8d9e-74c2-4777-badf-0122cab7797f
ShyamGupta1/DSA-using-CPP
Linked List/06_Insert_Item_After_Given_Node.cpp
// In question 1, define a method to insert a data into the list after the specified node of the list. // In question 1, define a method to search a node with the given item. #include <iostream> using namespace std; class node { public: int data; node *next; node() : next(NULL) {} }; class SLL { private:...
ALGO
0.999883
4.153852
309c6a0e-7d39-49e9-bf76-7321a9834266
koosaga/olympiad
Library/icpc-book-master/xyz/codes/random_code2/Bernoulli_number.cpp
#include <cstdio> using namespace std; #define P 1000000007 typedef unsigned long long int64; int64 n, k, i, j, sum, ans, p, C[30][30], B[30], ss[110000]; int64 Pow(int64 x, int64 y) { int64 ans = 1; x %= P; for (int64 i = 1; i <= y; i *= 2, x = x * x % P) if (i & y) ans = ans * x % P; return ans; } int main() ...
ALGO
0.999958
3.65957
28128cb0-e846-48f5-940a-1ce9e2a2d61d
talhaf952/cpp
IS Ascending.cpp
#include<iostream> using namespace std; int main() { cout<<"Enter any whole number:"; int n;cin>>n; int arr[n]; for(int i=0;i<n;i++) { cin>>arr[i]; } for(int i=1;i<n;i++) { int current=arr[i]; int j=i-1; while(arr[j]>current&&j>=0) { ...
ALGO
0.999976
3.777344
7f5d005f-aa8b-424b-9468-c451ac2c6b84
paulmagadi/Learn_Flutter
practice_flutter/flutter_urls/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.998658
6.761023
93f87305-15fc-4f36-bcbe-af32899c95e3
embicoin/KDAB-Creator
src/libs/3rdparty/botan/src/engine/gnump/gmp_nr.cpp
#include <botan/eng_gmp.h> #include <botan/gmp_wrap.h> #include <gmp.h> namespace Botan { #if defined(BOTAN_HAS_NYBERG_RUEPPEL) namespace { /* * GMP NR Operation */ class GMP_NR_Op : public NR_Operation { public: SecureVector<byte> verify(const byte[], u32bit) const; SecureVector<byte> sign(const ...
TOOL
0.884487
7.390915
3d7bbe47-f015-4887-be41-cdbe05a34df2
gitliuhao/my-self-study
自考学习规划/C++_study/test5.cpp
#include<iostream> using namespace std; void func(){ int a = 1; int & c = a; int b = 1; int * ai = &a; cout<<"a的值为:"<<a<<"\ta的内存地址为:"<<ai<<"\t"<<endl; cout<<"c的值为:"<<c<<"\tc的内存地址为:"<<&c<<"\t"<<endl; cout<<"b的值为:"<<b<<"\tb的内存地址为:"<<&b<<"\t"<<endl; cout<<"ai指向的值为:"<<* ai<<"\tai指针的值为:"<<...
TOOL
0.907841
3.153379
50c6670d-326c-4037-85cd-6298f23697a8
Ziklon/algorithms
cfc/A. Football.cpp
#include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #define all(v) (v).begin(),...
ALGO
0.999483
3.24943
91103ed5-9cb3-448e-aa41-4f92164a19bb
ishiimehta/CPP-Data-Structures
Trees/Check for BST.cpp
/* * Check for BST.cpp * * Created on: 14-Oct-2021 * Author: mehta */ // Program to check if a given Binary tree is a BST or not. #include <bits/stdc++.h> using namespace std; class Node{ public: int data; Node *prev; Node *next; Node(int data){ this->data=data; this->prev=NULL; t...
ALGO
0.999929
5.812853
dd10a940-7545-475a-bd0d-cd314a73de04
Liusifei/FaceLabeling
src/caffe/layers/mvn_layer.cpp
#include <algorithm> #include <vector> #include "caffe/common_layers.hpp" #include "caffe/layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> void MVNLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { top[0]->Reshape(bottom...
DATA
0.863361
7.067105
720c89f7-ab6e-41cc-9151-1a145f2297e8
msquare1998/ReAn-DHM
src/main.cpp
/* ============================================================================================ * Re-An method for measuring lnZ of the 1D dimerzied Heisenberg model * Reference: https://arxiv.org/abs/2403.08642 * @Yiming_Ding, Westlake University * Last updated: Mar 19, 2024 * ================================...
ALGO
0.999069
3.432601
64eb6fa3-989a-4005-bdf8-d311bbae8e8d
njrafi/Competitive-Programming-Solutions
CodeForces/908C - New Year and Curling - 33792925.cpp
#include <bits/stdc++.h> #ifndef ONLINE_JUDGE #define gc getchar #define pc putchar #else #define gc getchar_unlocked #define pc putchar_unlocked #endif using namespace std; #define vi vector<int> #define si set<int> #define vs vector<string> #define pii pair<int, int> #define vpi vector<pii> #define pri priority_queue...
ALGO
0.999902
3.385172
7670dd62-371f-49a9-a98e-41f64d45b1ad
jimmychancc/leetcode_prcatice
sort_algorithm/top_k_frequent_elements.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { unordered_map<int,int> counts; int max_count = 0; for(const int &num : nums){ max_count = max(max_count, ++counts[num]); } ...
ALGO
0.99999
5.543594
8b188a13-40ed-4e6c-bb60-9018cd0bb403
trarck/trarck
codes/cpp/neural network neuron/AI游戏引擎程序设计 Chapter 21--Neural Net/StateAttack.cpp
#include "StateAttack.h" #include "Ship.h" #include "FSMAIControl.h" #include "utility.h" //--------------------------------------------------------- void StateAttack::Update(float dt) { //turn towards closest asteroid's future position, and then fire FSMAIControl* parent = (FSMAIControl*)m_parent; GameObj...
TOOL
0.929644
5.377111
3b07b70b-e1b4-4d63-b722-9e7fd3f61eb6
ishandutta2007/codeforces
sys/normal/750/H.cpp
#include <bits/stdc++.h> using namespace std; const int Maxn = 1005, Maxc = 2000005; const int dx[] = {0, -1, -1, -1, 0, 1, 1, 1, 0}, dy[] = {0, -1, 0, 1, 1, 1, 0, -1, -1}; int h, w, q, ct, dsu_ct, u[15], v[15], id[Maxn][Maxn], fa[Maxc], siz[Maxc], tmp_fa[Maxc], tmp_siz[Maxc]; char G[Maxn][Maxn]; set <int> Se[Maxc]; p...
ALGO
0.999972
3.982412
43de2b99-ca13-4134-83c6-9f757c45c51a
Sanketk55/GeeksForGeeks
Distance from the Source (Bellman-Ford Algorithm) - GFG/distance-from-the-source-bellman-ford-algorithm.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: /* Function to implement Bellman Ford * edges: vector of vectors which represents the graph * S: source vertex to start traversing graph with * ...
ALGO
0.999897
5.549441
fcf73984-5c96-43fa-bb23-dd1949ff3825
Henrik-Yao/NEUQ-ACM-Solution
week3/柯昌鹏/双周赛/week3/汉诺塔-me.cpp
#include <iostream> #include <string> using namespace std; int han(int n,string a,string b,string c) { if(n==1) cout<<a<<"->"<<c<<endl; else { han(n-1,a,c,b); cout<<a<<"->"<<c<<endl; han(n-1,b,a,c); } } int main () { int n; string a[3]; cin>>n; for(int i=0;i<3;i++) cin>>a[i]; han(n,a[0],a[1],a[2]...
ALGO
0.999934
3.865371
4703182e-15cf-4102-b6d6-65152b591a96
tiozo/Training
vnoj/bracket.cpp
#include<bits/stdc++.h> using namespace std; const int maxn = 66; long long f[maxn][maxn][maxn], g[maxn][maxn][2][maxn]; int main() { ios::sync_with_stdio(false); cin.tie(0); int N,d; cin >> N >> d; string s; cin >> s; g[N][0][0][0]=1; for (int i=N;i;--i) for (int j=0;j<=d;++j) { ...
ALGO
0.999928
3.730539
5c9d1408-fa80-4e67-9b4a-68241275e45e
quas-modo/Luogu
alg2-2/p1102.cpp
// // Created by QUAS on 2024/2/5. // // 需考虑诸如1 1 2 2的情况,也即出现重复数字的情况 // total需要开longlong #include <bits/stdc++.h> #define MAXN 200005 int arr[MAXN]; int main(){ //freopen("./P1102_3.in", "r", stdin); memset(arr, 0, sizeof(arr)); int n, c; std::cin >> n >> c; std::map<int, int> m; for(int i = ...
ALGO
0.999992
4.001117
13ddee9e-9e03-4f0c-b477-d55203f51c0d
SJD095/Algorithm
leetcode/Jews and Stones.cpp
class Solution { public: int numJewelsInStones(string J, string S) { int result = 0; for(int i = 0; i < J.size(); i++) { for(int j = 0; j < S.size(); j++) { if(J[i] == S[j]) { ++result; }...
ALGO
0.998767
5.56294
a4e15ada-d24d-41c1-a600-7dcf789d931c
jhthorpe/libj
C++/simd/simd_dot.cpp
/* simd_dot.cpp * JHT, December 8, 2021 : created * * .cpp file that implements simd dot-product operation * between two continuous sections of data * * If compiled with OpenMP, will use the OpenMP SIMD pragmas to * provide hints to the compiler * */ #include "simd.hpp" /*---------------------------------...
ALGO
0.999138
6.432348
f1a0bbb3-c77b-4a17-989c-1c0d4d68de7b
raincross7/code-similarity
codes/train_code/problem177/problem177_105.cpp
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using LL = long long; using P = pair<int,int>; int main(){ string S; cin >> S; bool ok = false; if(S[0]==S[1]&&S[2]==S[3]) ok = true; if(S[0]==S[2]&&S[1]==S[3]) ok = true; if(S[0]==S[3]&&S[2]==S[1]) ok = true; if(S...
ALGO
0.999985
3.257002
913f6d84-8fa1-4352-b8f2-1760d15ba255
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-cot-gpt35/Codenet/p01370/302816359/response_6.cpp
#include <queue> #include <iostream> #include <vector> using namespace std; #define rep(i, b) for (int i = 0; i < b; i++) #define m_t 60 #define max (3 * m_t * (m_t + 1) + 1) #define zero (max / 2) int dx[6] = {0, 1, -1, 1, -1, 0}; int dy[6] = {1, 1, 0, 0, -1, -1}; vector<int> field(max); int t, n; int cnt; int mai...
ALGO
0.999836
4.576526
590b43bd-f6a3-4a2d-85fa-213a6acebecd
CGAL/cgal-dev
Distance_3/test/Distance_3/test_distance_3.cpp
#include <CGAL/Simple_cartesian.h> #include <CGAL/Simple_homogeneous.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Exact_integer.h> #include <CGAL/Homogeneous.h> #include <CGAL/squared_distance_3.h> #include <CGAL/Random...
TEST
0.946751
7.204238
8a77e8d0-df14-4531-8eef-ef0e6e8253f8
vrushalingale/https-github.com-AkashSingh3031-The-Complete-FAANG-Preparation
1]. DSA/3]. 450 DSA by ( Love Babbar Bhaiya )/C++/04]. Searching & Sorting/_10)_Find_Pair_Given_Difference.cpp
//Link: https://practice.geeksforgeeks.org/problems/find-pair-given-difference1559/1 /* Given an array Arr[] of size L and a number N, you need to write a program to find if there exists a pair of elements in the array whose difference is N. Example 1: Input: L = 6, N = 78 arr[] = {5, 20, 3, 2, 5, 80} Output: 1 Expl...
ALGO
0.99982
5.604321
5e073272-7ee4-4ef1-a4ff-9f972a0bd0fb
Rakib-RS/Algorithm-Data-structure
code/Supermarket.cpp
#include<bits/stdc++.h> using namespace std; int main(){ long long int n,m1,a,b,s1,s2,j=1; double m,ma; ma=0; cin>>n>>m1; while(n--){ cin>>a>>b; if(j==1){ ma=(a*1.0)/b;s1=a;s2=b; j=0; } m=(a*1.0)/b; if(m<ma){ ma=m; ...
ALGO
0.999834
3.527322
4028928e-a5e1-41b2-834d-c43cb16b5643
iltdm/algorithm
stack/2493.cpp
/* 탑(골드 V) KOI 통신연구소는 레이저를 이용한 새로운 비밀 통신 시스템 개발을 위한 실험을 하고 있다. 실험을 위하여 일직선 위에 N개의 높이가 서로 다른 탑을 수평 직선의 왼쪽부터 오른쪽 방향으로 차례로 세우고, 각 탑의 꼭대기에 레이저 송신기를 설치하였다. 모든 탑의 레이저 송신기는 레이저 신호를 지표면과 평행하게 수평 직선의 왼쪽 방향으로 발사하고, 탑의 기둥 모두에는 레이저 신호를 수신하는 장치가 설치되어 있다. 하나의 탑에서 발사된 레이저 신호는 가장 먼저 만나는 단 하나의 탑에서만 수신이 가능하다. 예를 들어 높이가 6, 9, 5, 7, 4인...
ALGO
0.999977
4.512768
ad8928f1-cd89-4b74-8716-ddeebc597fd3
MJianM/LeggedRobotController
extern/qpoases/src/LAPACKReplacement.cpp
/** * \file src/LAPACKReplacement.cpp * \author Hans Joachim Ferreau, Andreas Potschka, Christian Kirches * \version 3.2 * \date 2007-2017 * * LAPACK replacement routines. */ #include <qpOASES/Utils.hpp> #include <qpOASES/LapackBlasReplacement.hpp> extern "C" void DPOTRF( const char* uplo, const la_uint_t* _n...
ALGO
0.995633
5.536937
412347f2-54df-4dfc-89d7-8eb57978865f
Bearsharks/dev-note
PS/codeforces/370C.cpp
#include <iostream> #include <vector> #include <tuple> #include <algorithm> using namespace std; typedef long long ll; int main() { cin.tie(NULL); ios::sync_with_stdio(false); int n, m; cin >> n >> m; vector<pair<int,int>> ans; // vector<pair<int,int>> v(m+1); // vector<vector<int>> childs_c(m + 1); for ...
ALGO
0.999979
3.156009
4e4eacd9-2ef1-4567-9584-0e23a539dcb6
ishandutta2007/codeforces
joeywheeler/normal/161/B.cpp
#include <cstdio> #include <algorithm> #include <vector> using namespace std; struct item { int val, id, type; }; double total; item price[1010]; int idPrice[1010]; int num, numC, numS, numP, remC, temp; item stools[1010]; int whichCart[1010]; int minCart[1010]; vector <int> carts[1010]; bool itemSort (item a, i...
ALGO
0.999885
3.144713
d297ae6e-5979-409a-ae7d-821a9acb6c76
salmaelbarbori/Problem-Solving-with-CPP
codeesi_preparation_cp/problm2.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int occurence (int tab[], int n) { if (n <= 2) return (-1); sort(tab, tab + n); for (auto i = 0; i < n - 2; i++) { if (tab[i] == tab[i+1] && tab[i + 1] == tab[i+2]) return(tab[i]); } return (-1); } ...
ALGO
0.999623
4.147884
e587bbc5-307c-4777-ac7d-eae856eae189
AnnoyingKarma/LearningEverything
cp/sieveoferotosthenes.cpp
#include <iostream> using namespace std; const int Nmax=100001; bool isPrime[Nmax]; void soe(int n) { for(int i=2; i<=n; i++) { isPrime[i] = true; for (int i=2; i<=n/2; i++) { if(isPrime[i] == true) { for(int j=i*2; j<=n; j+=i) {...
ALGO
0.997646
3.923493
0eb61f38-9dc1-44f1-9f66-606567293007
RRRGR/ICUApp
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.998859
6.785645
c9a1fc5c-041e-4847-bf26-7c4fc8e4e1f4
NeroSong/beautiful_desktop_data_ui
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
89bbd631-ea66-4649-a156-f58cdbbbbddf
ML-UCV/ML-CodeBert-DistinctSolutions
Raw Dataset/inversmodular/extended-euclid-algo/test/f853a1fc-10a0-4a93-a70d-b2fba8fc3d58.cpp
#include <bits/stdc++.h> using namespace std; ifstream in("inversmodular.in"); ofstream out("inversmodular.out"); inline void gcd(long long a, long long b, long long &x, long long &y) { if (!b) x = 1, y = 0; else { long long x0, y0; gcd(b, a % b, x0, y0); x ...
ALGO
0.999911
4.385831
62b17290-c88e-4840-94d3-6d1650d0212a
sixpense/CodingInterviews
offer023.cpp
// 023-从上到下打印二叉树 // #include <iostream> #include <vector> #include <deque> #include <queue> using namespace std; #define __tmain main #ifdef __tmain #define debug cout #else #define debug 0 && cout #endif #define undebug 0&& cout #ifdef __tmain struct TreeNode { int val; struct TreeNode *left; st...
ALGO
0.99999
5.528256
db59309a-1ff0-4c54-893c-f84c8dc5ea1e
leontalukdar/Codeforces
496/B.cpp
#include <iostream> #include <sstream> #include <math.h> #include <algorithm> #include <string> #include <map> #include <vector> #include <stdlib.h> #include <stdio.h> #include <queue> #include <cstring> #include <ctype.h> #define ll long long int #define pii pair<int,int> using namespace std; //Normal Gcd /*int gcd...
ALGO
0.999959
3.667524
1f576556-d18f-4096-b1b5-70c9da36b339
hello-saif/Google_Map
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
6de12f99-e4b7-468f-a562-5558d228202f
YiDeveloper/Yi
src/qt/guiutil.cpp
#include <QApplication> #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For Qt::escape #...
TOOL
0.859131
6.944093
9d38a084-303c-4510-8fa7-3752726dc851
freebsd/freebsd-src
contrib/llvm-project/llvm/lib/Support/SuffixTree.cpp
#include "llvm/Support/SuffixTree.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/Casting.h" #include "llvm/Support/SuffixTreeNode.h" using namespace llvm; /// \returns the number of elements in the substring associated with \p N. static size_t numElementsInSubstring(const SuffixTreeNode *N) { assert(...
ALGO
0.998253
7.725295
112d0e74-632a-4922-a9fe-7e59f6036d3d
TalhaIqbalCh/Assignment_2
Q18.cpp
#include <iostream> #include <math.h> using namespace std; int main() { //Average Rainfall int yrs = 0, month = 0,inch_rainfall_per_month = 0, count = 0, yrs_count = 0, month_count = 1, total_inch_per_Rainfall = 0; cout << "Enter the number of years\t"; cin >> yrs; if (yrs >= 1) { while (yrs_count < yrs) { ...
TOOL
0.952523
3.233876
7943cac6-324f-439e-a1cb-1c35dbd603bb
ishandutta2007/codeforces
emptysoulist/normal/1240/F.cpp
#include<bits/stdc++.h> using namespace std ; #define Next( i, x ) for( int i = head[x]; i; i = e[i].next ) #define rep( i, s, t ) for( int i = (s); i <= (t); ++ i ) #define drep( i, s, t ) for( int i = (t); i >= (s); -- i ) #define mp make_pair #define pi pair<int, int> #define pb push_back #define vi vector<int> int ...
ALGO
0.999983
3.844718
171e2fc9-4f16-4ace-978c-4ba6ca669f76
hello-habibi/Problem-solving
A_Anton_and_Polyhedrons.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; string test ; int tet = 0; int cub = 0; int oct = 0; int dod = 0; int ico = 0; while(t--){ cin>>test; if(test[0] =='T') tet++; else if(test[0] =='C') cub++; else if(test[0] =='O') oct++; else if(test[0] == 'I') ico++; el...
ALGO
0.991146
3.926466
62fa779e-a4d5-430f-95ec-1715f96c3f20
donbasta/leetcode-submissions
Medium/1701.cpp
class Solution { public: double averageWaitingTime(vector<vector<int>>& customers) { using ll = long long; ll last = 0; int n = customers.size(); ll tot = 0; for (int i = 0; i < n; i++) { if (last < 1ll * customers[i][0]) { last = 1ll * customers[i...
ALGO
0.99973
6.058639
34bb5acc-a2b4-48a2-99a4-8417548770e7
ashvin232002/StriverSDESheet
Arrays_Part_IIII/2_sum.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { unordered_map<int,int>mp; for(int i =0;i<nums.size();i++){ if(mp.find(target-nums[i]) != mp.end()){ return {i,mp[target-nums[i]]}; ...
ALGO
0.999829
5.791013
c0c3fc67-71c5-434d-afca-64a3d4a6682f
xrandx/Practice-Items
kuangbin/UVa 10935 b.cpp
#include<iostream> using namespace std; int s[1000]; //?????,?????? int n; int main() { while(cin>>n&&n) { int head=1; int tail=n; //head???,tail????n for(int i=1; i<=n; i++) { s[i]=i; } if(n==1) { cout<<"Discarded cards:"<<endl<<"Remaining card: 1"<<endl; } else { cou...
ALGO
0.99864
3.956156
3ee3fe17-4e02-417d-a654-c7f8d5c7a5bd
djtbcode/C-Learning
Circle Area Calc.cpp
#include <iostream> #include <cmath> using namespace std; int main() { cout << "Please Enter Radius:"; double radius; cin >> radius; double area = 3.14159 * (pow(radius,2) ); cout <<"Area of this circle is: " << area; return 0; }
ALGO
0.942085
3.116873
e5a06dae-b753-41b4-9472-7bb55fe357e4
mamun4122/My-Online-Judge-Submission
Codeforces/2015, VIII Samara Regional Intercollegiate Programming Contest - 100694/100694E-SuperHyperMarket.cpp
#include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <sstream> #include <iomanip> #include <string> #include <vector> #include <list> #include <set> #include <map> #include <stack> #include <queue> #include <algorit...
ALGO
0.999729
3.184296
076e151f-8c81-4039-b3b8-a73611b82041
rimol-chakma/CodeChef_Practice_Problems
Searching_Algorithm/Binary_search/Chef-jumping/cj.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define checkmate return 0 int main() { ll int a; cin>>a; ll int k =(a+6)/6; ll int l = 6*k-6; ll int diff = a-l; if(diff==0||diff==1||diff==3)cout<<"yes"<<endl; else cout<<"no"<<endl; checkmate; }
ALGO
0.999973
3.188044
383c73dc-3c20-404e-8f08-52de7fad6c69
GacinhoV33/Engineer_Thesis_Chess_Engine_With_Deep_Reinforcement_Learning
MyEngine/models/stockfish_15.1_win_x64_popcnt/src/evaluate.cpp
#include <algorithm> #include <cassert> #include <cstdlib> #include <cstring> // For std::memset #include <fstream> #include <iomanip> #include <sstream> #include <iostream> #include <streambuf> #include <vector> #include "bitboard.h" #include "evaluate.h" #include "material.h" #include "misc.h" #include "pawns.h" #...
ALGO
0.996827
6.136889
f33577f3-7302-436b-82d9-42759002bb80
hinataros/V6
src/controller/ext/controlMethod/momentumController/vrp_FrictionDistribution_zRNS.cpp
/** @author Ryotaro Hinata 2019 */ #include "_ext.hpp" void RLS::Ext::vrp_FrictionDistribution_zRNS(RlsDynamics *io) { if(debug) DEBUG; io->vrpMomentum(); SAM_FrictionDistribution_zRNS(io); io->cal_dLCRef << io->dpRef, io->dlCRef; }
ALGO
0.943849
3.567226
edaea31f-efc7-4670-9ca2-12181828a547
MRRazvi/competitive-programming
codechef/LEARNDSA/LRNDSA01/FLOW007.cpp
// Reverse The Number // https://www.codechef.com/LRNDSA01/problems/FLOW007 #include <iostream> #include <algorithm> typedef long long ll; using namespace std; int main() { freopen("output.txt", "w", stdout); int t; cin >> t; while (t--) { string s; cin >> s; reverse(s.begin...
ALGO
0.999923
5.673163
72fc3d6a-e7d0-4c5b-95b1-4d9bca6bacb3
Harshit1487/DSA
Day7/3string46m.cpp
class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& strs) { unordered_map<string, vector<string>> mp; vector<vector<string>> ans; for(int i=0;i<strs.size();i++){ string t = strs[i]; sort(strs[i].begin(), strs[i].end()); m...
ALGO
0.999995
6.656113
3891bfc1-56b1-42a6-9eba-9416640318cc
VenusHui/VenusHui
ACM-ICPC/LeetCode/P812.cpp
// 812. 最大三角形面积class Solution { private: inline double calc(vector<int> &a, vector<int> &b, vector<int> &c) { return abs((a[0] * b[1] + b[0] * c[1] + c[0] * a[1] - a[0] * c[1] - b[0] * a[1] - c[0] * b[1]) / 2.0); } public: double largestTriangleArea(vector<vector<int>> &points) { double ...
ALGO
0.999746
6.629539
b12da0ab-5cbb-451f-af63-03c794c8c91d
meomnzak/Problem-Solving
Codeforces-Solutions/1003_C.cpp
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> vec; int n; int k; cin>>n>>k; int num; for(int i = 0 ;i<n; i++){ cin>>num; vec.push_back(num); } double sum = 0; double calc =0; double sol = 0; for(int i= 0 ; i<n; i++){ for(i...
ALGO
0.999866
3.663334
07c405ba-4fae-45d5-96f1-f96653a9940b
Jorgepaiz/OpenCV_Library
OpenCV_231/opencv2_imgproc/sumpixels.cpp
#include "precomp.hpp" namespace cv { template<typename T, typename ST, typename QT> void integral_( const T* src, size_t _srcstep, ST* sum, size_t _sumstep, QT* sqsum, size_t _sqsumstep, ST* tilted, size_t _tiltedstep, Size size, int cn ) { int x, y, k; int srcstep = (int)(_s...
ALGO
0.99856
6.318286
cb019bea-91df-465f-a1fc-69a987fa69ef
mehrab-abir/Data-Structures-and-Algorithms_CPP
C++/Dynamic Memory Allocation/dynamic-array/increase-size-dynamic-array.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> using namespace std; int main() { int* nums = new int[5]; //dynamic memory allocation //input for nums array cout << "Input for nums array: " << endl; for (int i = 0; i < 5; i++) { cout << "Number " << i + 1 << ": "; cin >> nums[i]; } //display nums arr...
ALGO
0.985458
3.4351
10840aca-1b62-4747-a323-5575f30d41d0
AlexGliesch/competitive-programming
unsorted/Sera Que Indiana Jones Chega La.cpp
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <queue> #include <vector> #define mp make_pair #define EPS 1e-8 using namespace std; struct Point { Point(double x = 0, double y = 0) : x(x), y(y) {} double x, y; }; double dist(const Point &a, const Point &b) { return sqrt((...
ALGO
0.999838
4.293147
24ae81b0-a4df-4bb2-8030-e049c5d75015
rupal11/Codechef_beg
FLOW004.cpp
//Problem Name : First and Last Digit //Problem Code : FLOW004 //link : https://www.codechef.com/viewsolution/34687262 #include <iostream> using namespace std; int main() { int T,i,a,b,t; cin>>T; int n[T]; for(int i=0;i<T;++i) { cin>>n[i]; } for(i=0;i<T;++i) { t=n[i]; a=t%10; wh...
ALGO
0.99987
6.116284
87eebd41-e448-4ddb-924c-f095e6740a44
ayk-dev/CPP_Basics
NestedLoops/EqualSumsEvenOddPosition/EqualSumsEvenOddPosition.cpp
// EqualSumsEvenOddPosition.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <string> using namespace std; int main() { int firstNum, secondNum; cin >> firstNum >> secondNum; for (int n = firstNum; n <= secondNum; n++) { int s...
ALGO
0.998987
5.633392
f5638679-37c0-45e2-b3aa-062969230660
AhmadZaqiq/Problem-solving
Level 2/Problem 29: Copy Only Prime Numbers.cpp
//Ahmad JR #include <iostream> #include <cstdlib> #include <cmath> using namespace std; enum enPrimeNotprime { Prime = 0, NotPrime = 1 }; int RandomNumber(int From, int To) { int randNum = rand() % (To - From + 1) + From; return randNum; } void FillArrayWithRandomNumbers(int Arr[100], int& ArrLength) { ...
ALGO
0.99884
3.609511
d2f5c97d-0766-4310-8b89-500b6e9ca149
chirprush/solutions
codeforces/archive/1860C/main.cpp
#include <iostream> #include <vector> #include <string> #include <map> #include <set> #include <algorithm> #include <cmath> typedef long long ll; template<typename T> void read_some(std::vector<T> &v, int N) { for (int i = 0; i < N; i++) { T a; std::cin >> a; v.push_back(a); } } templ...
ALGO
0.999686
4.406056