uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
3417ee54-8291-41f9-afd0-8c85af6034f9
eldridgeS/LearnHLS
matrix_multiplication_project/matrix_mult_tb.cpp
#include <iostream> // For standard input/output #include <iomanip> // For setting output precision #include "matrix_mult.h" // Include the header for your HLS function // Main function for the test bench int main() { // Declare matrices for input and output fixed_digit A[X][Y]; fixed_digit B[Y][Z]; ...
TEST
0.947771
5.755092
0c50f083-79e3-4a4e-aca1-fec1907df929
lzyrapx/Competitive-Programming
FZU/2230(博弈).cpp
//#include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <iostream> using namespace std; char mp[12][12]; int main() { int t; cin>>t; while(t--) { int s_x,s_y,e_x,e_y; for(int i=0;i<4;i++) for(int j=0;j<8;j++) { cin>>mp[i][j]; } for(int ...
ALGO
0.999867
3.457944
3b63a8d9-2d44-4a16-8973-95f4a347cb38
Harshkaushik04/striverA2Z
DP/29_num_insertion_palindrome.cpp
#include<bits/stdc++.h> using namespace std; //greedy 2 pointer doesnt work // int minInsertions(string s) { // int n=s.size(); // int p1=0,p2=n-1; // bool flag=false; // int ans=0; // while(p1<p2){ // if(s[p1]==s[p2]){ // p1++; // p2--; // } // else...
ALGO
0.999992
5.528702
f6870413-6c9e-44da-a58a-ccf44be239d1
Rambonuaa/BoundCheck4
test/mul_array_pointer/Sy09/SY0906.CPP
/******************************************* ʵ 6 ĿάֵСֵƽֵ Ҫ ж鲢ʼ βдͬ άָʽ: int p[4][4] int p[][4] int (*p)[4] ********************************************/ #include <iostream.h> // 1 // άָʽ float Aver(int p[][4],int n) //n ƽֵ { int i,j, sum=0; for( i=0 ;i<n;i++) ...
ALGO
0.995382
3.403365
efd42371-edd5-4880-b5a0-e71583175394
Shreyyy76/DATA-STRUCTURES
kruskal.cpp
#include <stdio.h> #define MAX 30 typedef struct edge { int u, v, w; } edge; typedef struct edge_list { edge data[MAX]; int n; } edge_list; edge_list elist; int Graph[MAX][MAX], n; edge_list spanlist; void kruskalAlgo(); int find(int belongs[], int vertexno); void applyUnion(int belongs[], int c1, int c2); ...
ALGO
0.999947
4.349421
84b9fb6e-4e4d-4a02-a8e8-8f09becc3dc5
kazi-nayeem/Programming-Problems-Solutions
lightoj/1194 - Colored T-Shirts.cpp
//#include <bits/stdc++.h> #include<cstdio> #include<cstring> #include<cctype> #include<cmath> #include<cstdlib> #include<iostream> #include<string> #include<algorithm> #include<vector> #include<stack> #include<queue> #include<set> #include<map> using namespace std; #define MX 100005 #define inf 1000000000000ll typ...
ALGO
0.999966
3.468966
ef00baa8-9b7a-454b-95e1-b3d6d9cb3d01
alejandropch/preatuh-challenge
game01/game01.cpp
#include <stdio.h> #include <vector> #include <unordered_map> using namespace std; vector<int> game01(vector<int> &M, int N) { unordered_map<int, int> hashmap; // creating a hashmap to store unique instances of M for (int i = 0; i < M.size(); i++) // iterating over the array (vector) { if (hashmap.find(N - ...
ALGO
0.999981
4.965085
cd2bc04f-cbae-4909-bfa8-f389766d9f25
LHopitalOne/Cpp_course
Homeworks/HW37/main.cpp
#include <map> #include <string> #include <iostream> #include <initializer_list> std::string digitToLiteral(int digit) { std::map<int, std::string> digitMap = { {0, "zero"}, {1, "one"}, {2, "two"}, {3, "three"}, {4, "four"}, {5, "five"}, {6, "six"}, ...
TOOL
0.954992
6.344657
7d077479-3ff4-479b-a113-27f25a3a0cd4
ultimate-disturbing-element/DSA
Arrays/Binary_Search/Square_Root/Square_root.cpp
#include <iostream> using namespace std; int squareRoot(int n){ int s = 1; int e = n; long long int mid = s+(e-s)/2; long long int ans; while(s<=e){ long long int square = mid * mid; if(square == n){ return mid; } else if(square > n){ e = mid -...
ALGO
0.999345
4.525079
29668ad9-95e9-4218-990f-622a30401945
StudyingFather/my-code
luogu/2865.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <queue> #define INF 0x3f3f3f3f using namespace std; struct edge { int v,w,next; }e[200005]; int head[5005],d1[5005],d2[5005],vis[5005],cnt; queue<int> q; void addedge(int u,int v,int w) { e[++cnt].v=v; e[cnt].w=w; e[cnt].next=head[u]; head[u]=cnt; ...
ALGO
0.999908
3.652582
b400e36c-b7c5-4436-9fa0-86a82cdb9dfe
rehassachdeva/coding-practice
leet/dp/decode-ways.cpp
class Solution { public: int recur(string s, unordered_map<string, int>& memo) { if (s.empty()) return 1; if (s[0]=='0') return 0; if (s.size()==1) return 1; if (memo.find(s) != memo.end()) return memo[s]; int ret = recur(s....
ALGO
0.999853
6.029397
51a37e5a-2f8f-4dfe-bca8-1233a8e5236a
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12960_12.cpp
#include <bits/stdc++.h> inline int read() { int data = 0, w = 1; char ch = getchar(); while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar(); if (ch == '-') w = -1, ch = getchar(); while (ch >= '0' && ch <= '9') data = data * 10 + (ch ^ 48), ch = getchar(); return data * w; } const int N(505); struct n...
ALGO
0.999879
3.644145
893a9964-380f-4200-a3f7-0e34aa67a7a0
ishandutta2007/codeforces
vml/normal/329/B.cpp
#include <cstdio> #include <iostream> #include <vector> #include <set> #include <map> #include <cmath> #include <algorithm> #include <queue> #include <string> #include <cstring> #include <cstdlib> using namespace std; const int MAXN = 1010; char v[MAXN][MAXN]; int ans[MAXN][MAXN]; struct pos { int x; int y; int d...
ALGO
0.999794
3.342591
17433607-24b7-415d-ae69-4734d1855f00
GauravN0910/codeforces-cpc
CountingPairs.cpp
#include<bits/stdc++.h> using namespace std; const long long mod = 1e9 + 7; void solve(){ long long n, x, y; cin>>n>>x>>y; if(x>y){ cout<<0<<endl; return; } vector<long long> nums(n); long long sum = 0; for(long long i=0;i<n;i++){ cin>>nums[i]; sum += nums...
ALGO
0.999865
4.148246
0ccdc546-6ca1-4ede-8773-559075167184
DavidMzNeto/C
C/atv53.cpp
#include <stdio.h> #include <locale.h> int main (){ setlocale(LC_ALL, "Portuguese"); int cnt, numsoma=10, vetnum1[10], vetnum2[10], vetsoma[10]; for(cnt=0; cnt<10; cnt++){ printf("Digite o primeiro nmero da soma N%i\n", numsoma); scanf("%i", &vetnum1[cnt]); printf("Digite o segundo nmero da soma N%i...
ALGO
0.982717
3.818603
fe0a6049-1c2d-4039-af89-5ae51b196cbd
iammohit1311/C-Internship
Paper-1.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int arr[n]; for(int i=0; i<n; i++) cin>>arr[i]; sort(arr,arr+n); cout<<"The smallest element is "<<arr[0]<<" and Second smallest element is "<<arr[1]; return 0; }
ALGO
0.999947
3.57811
c8fb1838-967d-4bee-ac46-aad34a1d84eb
nischaldutt/problem-solving
linked_lists/14_reverse_linked_list_iterative.cpp
// problem: https://leetcode.com/problems/reverse-linked-list/ /* Given the head of a singly linked list, reverse list & return Ex. head = [1,2,3,4,5] -> [5,4,3,2,1], head = [1,2] -> [2,1] Maintain prev, curr pointers, iterate thru & reverse Time: O(n) Space: O(1) */ #include <bits/stdc++.h> #i...
ALGO
0.999987
6.07177
1410d778-8898-40e8-ae7e-9917aae36e2f
vermakriti/Leetcode
Binary Tree/Check Completeness of a Binary Tree/program.cpp
/* Given the root of a binary tree, determine if it is a complete binary tree. In a complete binary tree, every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive at the last level h. Example 1: Input: root...
ALGO
0.998511
6.8297
8bc3c511-9a38-43ed-8cdc-75c7b05fd249
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-gpt4/Codenet/p01087/382599378/response_3.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < int(n); ++i) #define all(a) a.begin(), a.end() vector<vector<int>> cache; int solve(vector<string> &s, int n, int &y, int x) { if (cache[y][x] != -1) return cache[y][x]; if (isdigit(s[y][x])) return cache[y][x] = s[y++][x] -...
ALGO
0.999844
4.431452
2291d308-4923-47db-9af5-65bab17945b3
hellocomrade/happycoding
leetcode/RestoreIPAddresses.cpp
#include <cassert> #include <vector> #include <string> using namespace std; //https://leetcode.com/problems/restore-ip-addresses /* 93. Restore IP Addresses Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example: Input: "25525511135" Output: ["<IP_ADDRES...
ALGO
0.999586
6.222607
02b3f2b0-dd17-4099-8345-7b1910909869
CGAL/cgal-dev
Interpolation/examples/Interpolation/nn_coordinates_3.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Delaunay_triangulation_3.h> #include <CGAL/natural_neighbor_coordinates_3.h> #include <fstream> #include <iostream> #include <iterator> #include <utility> #include <vector> typedef double NT; //Number Type typedef CGAL::Exact_predicates_...
ALGO
0.998192
5.397579
e27ba1d6-c409-47a6-b9e0-3d8095808b55
fishy15/competitive_programming
online/cf/nebius_welcome/vaccination.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <algorithm> #include <utility> #include <map> #include <queue> #include <set> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <numeric> #define ll long long #define ld long double ...
ALGO
0.999785
3.920229
ad3717df-9d88-4ac2-b1e9-9ebe566e9d71
Shivmasaurr/DsaSolutions
73-set-matrix-zeroes/set-matrix-zeroes.cpp
class Solution { public: void setZeroes(vector<vector<int>>& matrix) { // m->rows ; n -> columns int m=matrix.size(); int n=matrix[0].size(); vector<bool>colZero(n,false); vector<bool>rowZero(n,false); for(int i=0;i<m;i++){ for(int j=0;j<n;j++){ ...
ALGO
0.999276
6.380322
0abc7c6f-bebb-4b37-af16-c73eb7e8e450
wangguibao/algorithms
leetcode209_minimum_size_subarray_sum.cpp
/** * @file leetcode209_minimum_size_subarray_sum.cpp * @author wangguibao(https://github.com/wangguibao) * @date 2023/06/15 16:57 * @brief https://leetcode.com/problems/minimum-size-subarray-sum * **/ #include <iostream> #include <vector> #include <stack> using namespace std; class Solution { public: int m...
ALGO
0.999846
6.430437
f11f04f5-dfbc-42ec-89fd-7e96b171d755
ProgramTraveler/leetcode
Leetcode_Question/263.丑数.cpp
/* * @lc app=leetcode.cn id=263 lang=cpp * * [263] 丑数 */ // @lc code=start class Solution { public: bool isUgly(int num) { if (num <= 0) return false; //如果这个数除以质因数可以除到1,说明这个数是由质因数构成的 while (num != 1) { if (num % 2 == 0) num = num / 2; else if (num % 3 == 0) num =...
ALGO
0.999636
5.95866
4b625a8b-4a6e-4334-9a68-fe46be8ce65b
solareenlo/atcoder
13_Other-Contests/024_Tenka1-PC-2013-quelA/B_001.cpp
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { cin.tie(0)->sync_with_stdio(false); int n; cin >> n; vector<vector<int> > a(n, vector<int>(5)); REP(i, n) REP(j, 5) cin >> a[i][j]; int cnt = 0; REP(i, n) { int sum = 0; ...
ALGO
0.999488
4.514469
1581c476-170a-4741-b114-88ac2ce3a6a1
bsu2019gr9/Filinkova
1-1.cpp
#include <iostream> #include <iomanip> #include<ctime> #include "FunctionsWithArrays.h" using namespace std; void quickSort(int*, int*); void printArray(int*, int*); int Task1(int*, int*); //В массиве размера N, заполненного случ.числами от - 10 до 10, //подсчитать количество элементов, встречающихся более одного раза ...
ALGO
0.998372
4.613684
a6432bf1-f387-4c85-a27a-5e7c2abe370f
javachaos/cpp_datastructs
src/AOC2.cpp
#include <vector> #include <iostream> #include <string> #include <fstream> using namespace std; int main() { unsigned long int x = 0; unsigned long int y = 0; unsigned long int aim = 0; string direction; string magnitude; std::ifstream infile("input.txt"); while (infile >> direction >> m...
ALGO
0.999392
5.929799
673b9cc0-fd05-49f2-9420-96205f5f5c04
nikhil767raj/Codeforces-solutions
CF-926A.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int int main() { ll l, r, count = 0; cin >> l >> r; for (ll i = 0; i <= 35; i++) { for (ll j = 0; j <= 35; j++) { if (pow(2, i) * (pow(3, j)) >= l && pow(2, i) * (pow(3, j)) <= r) { count++;} } } cout << count << endl; }
ALGO
0.999862
3.908278
4b2eac26-face-4d4f-bf52-bc70d06744b1
ishandutta2007/codeforces
qiuzx/normal/39/C.cpp
#include <bits/stdc++.h> #define INF 1000000000 #define LINF 1000000000000000000 #define MOD 1000000007 #define mod 1000007 #define INF63 1061109567 #define INF127 9187201950435737471 #define UINF 18446744073709551615 #define F first #define S second #define ll long long #define N 2010 using namespace std; int n,in[N],...
ALGO
0.999987
3.401357
e1fe7f85-266c-429f-ac95-16a57568b02c
gaborpapp/Nibbal
tests/BallTest/src/bullet/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
#include "btConvexConcaveCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btMultiSphereShape.h" #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" #include "BulletCollision/CollisionShapes/btConcaveShape.h" #include "BulletC...
ALGO
0.999443
7.13673
30ea1be0-ae86-4855-9fd9-779f5ceca4d3
dK2856/crack-your-internship
Strings/valid-parentheses.cpp
class Solution { public: // TC-O(N) || SC-O(N) for stack bool isValid(string s) { int n=s.size(); stack<char> st; for(int i=0;i<n;i++) { char ch=s[i]; if(ch=='(' || ch=='{' || ch=='[') ...
ALGO
0.999879
6.658822
7c3bedc0-4225-48ef-8a6e-9e42e47b34c9
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_490_6.cpp
#include <bits/stdc++.h> using namespace std; struct DSU { vector<int> p; vector<int> rnk; DSU() {} DSU(int n) { p.resize(n); rnk.resize(n); fill_n(rnk.begin(), n, 1); int k = 0; generate_n(p.begin(), n, [&k]() { return k++; }); } void make_set(int x) { while (p.size() <= x) { ...
ALGO
0.99999
4.191223
67fe9ac3-c7ea-4318-9280-03a6bac18134
Kartikay-Mehrotra/Leetcode
0029-divide-two-integers/0029-divide-two-integers.cpp
class Solution { public: int divide(int dividend, int divisor) { if(dividend==INT_MIN && divisor==-1) return INT_MAX; long dvd=labs(dividend); long dvs=labs(divisor); long ans=0; int sign = dividend > 0 ^ divisor > 0 ? -1 : 1; while(dvd>=dvs) { ...
ALGO
0.999824
5.993401
91997bb8-eb0c-4be9-8214-624b9feee5e9
ulitoo/HPC583
Basics/CUDA/4.cudavsCPUsingle_f.cpp
#include <cblas.h> #include <iostream> #include <fstream> #include <lapacke.h> using namespace std; ///////////////////////////// General Purpose FUNCTIONS int Read_Matrix_file(float *matrix, int size, char *filename) { // Open the binary file for reading and handle error std::ifstream input(filename, std:...
ALGO
0.999658
4.20201
a2051cbf-51bf-46b2-8eb7-015aba226315
Shafaet/Programming-Contest-Algorithms
SPOJ/SNAKYNUM.cpp
/* Author: Shafaet Spoj SNAKYNUM Matrix Expo */ #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #in...
ALGO
0.999781
3.834525
756a8a9b-4d83-40a1-9483-b8655e6a3355
iamrahman/DataStructure
Tree/HeightOfTree.cpp
#include <iostream> using namespace std; struct node { int data; node* left; node* right; }; int maxDepth(node* node) { if (node == NULL) return 0; else { int lDepth = maxDepth(node->left); int rDepth = maxDepth(node->right); if (l...
ALGO
0.999937
5.542191
b471f15c-cf9d-4ae1-a42e-a916801bd93a
anagorko/algorytmika
home/jannec/PAL.cpp
#include<iostream> #include<string> using namespace std; int main () { string palindrom, palindrom2; cin >> palindrom; int t= palindrom.size(), w=t-1, r=w; /* for(int e=-1; e < r ; e++){ palindrom2[e]=palindrom[w]; w=w-1; } */ int e=0; bool czy_palindrom = true; do{ palindrom2[e]=palindrom[w]; w=w-1; e=e+1; }wh...
ALGO
0.99997
4.817102
18f1b76b-0fb5-4922-818a-59f1b1d67836
amangupta017/DSA_CPP_code_paractice
Recursion /Recursion with Strings/reverseString.cpp
#include <iostream> using namespace std; void reverse(int i, int j, string& s){ //base case if(i>j) return ; swap(s[i],s[j]); i++; j--; reverse(i,j,s); } int main(){ string s="Aman Gupta"; reverse(0,s.length()-1,s); cout<<s<<endl; }
ALGO
0.999736
4.451816
f2e5cc14-3a02-47e0-96e0-da3cdaae103f
dungdinh26/btaptuan9
btap2.cpp
/* Bài 2: Một câu tiếng việt cấu thành từ nhiều từ khác nhau. Mỗi từ được lưu thành một node trong một danh sách liên kết đơn 1.Khai báo cấu trúc danh sách liên kết. Các thông tin chứa ở mỗi node sinh viên tự đưa vào để đảm bảo các nội dung sau được thực hiện. 2.Xác định từ xuất hiện nhiều nhất trong câu 3.Nếu x...
ALGO
0.999736
4.574137
9a4ba3fd-044d-484a-8f35-34da985cf495
Yuki-Toyoda/KEngine
Externals/DirectXTex/DirectXTexMisc.cpp
#include "DirectXTexP.h" using namespace DirectX; using namespace DirectX::Internal; #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wignored-attributes" #endif namespace { const XMVECTORF32 g_Gamma22 = { { { 2.2f, 2.2f, 2.2f, 1.f } } }; //---------------------------------------...
TOOL
0.962399
6.882344
29a2af6a-a6ef-434f-8e06-60c8dd4e5686
dubey22rohit/CPP-DSA
InterviewPrep/ArraysHashing/TwoSum.cpp
#include <iostream> #include <unordered_map> #include <vector> using namespace std; /** * Function to find two numbers in an array whose sum is equal to a given * target. * * @param nums vector of integers representing the array * @param target integer representing the target sum * @return vector of integers rep...
ALGO
0.999738
6.985865
4befec3d-82ad-43fd-8171-007a552985ab
BangKartavya/Graph-Theory
Minimum Number of Vertices to Reach All Nodes/main.cpp
class Solution { public: vector<int> findSmallestSetOfVertices(int n, vector<vector<int>>& edges) { vector<int> inDegree(n,0); for(vector<int>& edge : edges) { inDegree[edge[1]]++; } vector<int> res; for(int i = 0;i<n;i++) if(inDegree[i] == 0) res.push_back(i);...
ALGO
0.999928
6.264928
12f6b498-517e-4bbb-b996-71acc801da2e
Jh-jaehyuk/BOJ
BOJ/30000++/30000~/30972.cpp
// // 30972.cpp // BOJ // // Created by J213h on 12/30/23. // #include <bits/stdc++.h> using namespace std; int board[5001][5001]; int prefix[5001][5001]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N; cin >> N; for (int i = 1; i <= N; i++) { for (int j = ...
ALGO
0.999636
4.926124
066cf84e-e529-479e-9e16-c01e6e7976d6
greenbeanpie/OI-training
NOIP2023-ZJ/ZJ-0299/dict/dict.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const int N=3005; int n,m,p[N]; char c[N]; struct node{ char minn[N],maxn[N]; int hsminn[N],hsmaxn[N]; }a[N]; bool cmp(char l,char r){ return l<r; } int Hashmaxn(int x,int l,int r){ return a[x].hsmaxn[r]-a[x].hsmaxn[l-1]*(r-l+1); } int Hashminn(int ...
ALGO
0.99999
3.705465
41125387-8469-4c81-a118-fd169682c2b8
danunaise/ccminer-verus-autostart
ccminer-verus/verus/verus_clhash.cpp
#include "verus_clhash.h" #include <assert.h> #include <string.h> //#include <intrin.h> //#include "cpu_verushash.hpp" #ifdef _WIN32 #define posix_memalign(p, a, s) (((*(p)) = _aligned_malloc((s), (a))), *(p) ?0 :errno) #endif int __cpuverusoptimized = 0x80; // multiply the length and the some key, no modulo __m128...
ALGO
0.969975
4.686642
86452f21-8947-45e2-8bbd-7c8f75f96c6c
weixingzhang1/Project-2
main_avlt.cpp
/* * main_avlt.cpp * * Main driver for testing the AVLTree class */ #include <iostream> #include "AVLTree.h" using namespace std; void print_tree_details(AVLTree &t) { t.print_tree(); cout << "\n"; cout << "min: " << t.minimum_value() << "\n"; cout << "max: " << t.maximum_value()...
TEST
0.928158
5.936964
d2da8090-fdcc-4f23-b69a-24f29991cf2b
abcivashritt/codechef
Too Many Oranges.cpp
#include <iostream> using namespace std; int main() { int t; cin>>t; while(t--) { int n,k; cin>>n>>k; cout<<((n*10 <= k && k <= n*12) ? "YES" : "NO")<<"\n"; } return 0; }
ALGO
0.998888
3.87971
51255c66-53af-4481-80c4-fce24c97316f
mmxd/leetcode
cpp/69.sqrtx.cpp
class Solution { public: int mySqrt(int x) { int left = 1; int right = x; while (left <= right) { int mid = left + (right - left) / 2; int val = mid * mid; // avoid overflow issue if (mid <= x / mid) { left = mid + 1; ...
ALGO
0.99995
5.902811
c239eebc-c22a-4e7a-afe2-77a447d4ca69
asachkahitari/6Companies30Days
Goldman Sachs/Q11.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <complex> #include <queue> #include <set> #include <unordered_set> #include <list> #include <chrono> #include <random> #include <iostream> #in...
ALGO
0.999859
4.936407
871f0713-0dea-45c7-82b3-09fe22d76774
Traeyee/leetcode
cpp/P387.cpp
/** * @author <EMAIL> * @time 2022-01-03 18:30 * @brief */ #include <algorithm> #include <climits> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include ...
ALGO
0.996373
5.62955
27c2f83f-9109-4b74-aa82-b6c0771b365a
ProdriveTechnologies/pd_cpu_compiler
libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5 // <vector> // reference operator[](size_type n); #include <vector> #include <cassert> #include <cstdlib> #include "asan_testing.h" #include "min_allocator.h" #include "test_iterators.h" #include "test_macros.h" #ifndef _LIBCPP_HAS_NO_ASAN extern "C" void __sanitizer...
TEST
0.937827
6.087971
88621d11-139d-41aa-970d-0d9999af09ec
tpn/cuda-samples
v11.0/4_Finance/binomialOptions_nvrtc/binomialOptions_gpu.cpp
//////////////////////////////////////////////////////////////////////////////// // Global types and parameters //////////////////////////////////////////////////////////////////////////////// #include <stdio.h> #include <stdlib.h> #include <cmath> #include <helper_cuda.h> #include <nvrtc_helper.h> #include <cuda_run...
ALGO
0.999355
7.444403
f72aa8cb-45f8-475a-a536-42af90f63a05
trungdangtapcode/Competitive-Programming-Notebook
archived/firstyear_laptop/icpc23mt_d.cpp
#include<bits/stdc++.h> using namespace std; const int maxN = 2e5+5; int n, a[maxN]; void solve(){ cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; long long res = 0; map<int,int> s; for (int i = 1, j = 0; i <= n; i++){ while (j<n&&!s[a[j+1]]) s[a[++j]] = 1; // for (int x: s) cout...
ALGO
0.999694
4.840606
8b697c70-4231-4c67-8d8a-cd872f46216b
adi0801-ux/DSA
Tree/BT_buildFromLevelOrder.cpp
// // Created by Aditya Chauhan on 15/08/23. // #include<bits/stdc++.h> using namespace std; class node{ public: int data; node *left; node *right; node (int d){ this->data=d; this->left=NULL; this->right=NULL; } }; node *buildTree(node *root){ cout<<"Enter the data:"<<e...
ALGO
0.99904
5.104872
2d262907-7ea1-4818-aa4e-c7859f321fda
Aierhaimian/LeetCode
Tree/0654_MaximumBinaryTree/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <cassert> using namespace std; // Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; // https://en.wikipedia.org/wik...
ALGO
0.999974
6.507643
166aaba2-05bb-4134-bb5c-1cf6d12e4f5b
Joviisaus/GAMES101_HW
assignment8/CGL/src/matrix4x4.cpp
#include "matrix4x4.h" #include <iostream> #include <cmath> using namespace std; namespace CGL { double& Matrix4x4::operator()( int i, int j ) { return entries[j][i]; } const double& Matrix4x4::operator()( int i, int j ) const { return entries[j][i]; } Vector4D& Matrix4x4::operator[]( int j ) { ...
ALGO
0.989101
6.143035
11a9626e-0dc3-46cd-ab5e-6730d772e96a
dinesh-gaire/Data-Structures-and-Algorithm
Queue/05ImplementCircularQueueUsingArray.cpp
#include <iostream> using namespace std; class CircularQueue { int *arr; int front; int rear; int size; public: CircularQueue(int size) { this->size = size; arr = new int[size]; front = rear = -1; } ~CircularQueue() { delete[] arr; } bool i...
ALGO
0.989048
5.490597
d812f3eb-930a-4a13-a4b6-0b3096f6e9e1
JosephDriedger/CPlusOneMiniGames
cpp/blackjack.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> #include <ostream> #include "../h/cPlusOneMiniGames.h" using namespace std; class Card { public: enum rank {ACE = 1, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING}; ...
ALGO
0.901407
6.067322
44346a1a-a022-462a-b9b7-09dc44ff4461
dinhcanh303/Cpp_Basic
C++_Basic/CT3B6C2.cpp
#include <bits/stdc++.h> using namespace std; bool checkfibo (long long n){ long long p[93]; p[0] =0 ,p[1]=1 ; p[2] =1; if(n==1 || n==0) return 1; for(int i =3 ; i<= 92;i++){ p[i] = p[i-1] + p[i-2]; if(p[i]==n) return 1; } return 0; } int main(){ long long n ; cin>>n; if(checkfibo(n)) cout<<"YES...
ALGO
0.999977
4.62125
8139f3b1-e12d-449e-91d9-6232bec56e96
Azarenok-cpp/lesson41Solution
task02/main.cpp
#include <iostream> #include <string> #include "logic.h" using namespace std; #define N 5 #define M 5 int main() { int matrix[N][M]{}; /*for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { cout << matrix[i][j] << " "; } cout << "\n"; }*/ for (int i = 0; i < N; i++) { for (int j = 0; j < M; j...
ALGO
0.937433
4.162093
e85e5337-6162-4d5f-b1ec-1c428a1a26c2
riya231203/flutter
Class_App/Stateful/aspect_ratio/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.99774
6.776823
7962ecc0-8ed1-45a6-9032-6d4267448abe
xairry/PAT-Basic
1037/S1037_0.cpp
#include <iostream> using namespace std; int main() { long p_g, p_s, p_k, a_g, a_s, a_k, r_g, r_s, r_k; scanf("%ld.%ld.%ld %ld.%ld.%ld", &p_g, &p_s, &p_k, &a_g, &a_s, &a_k); p_k = p_g * 17 * 29 + p_s * 29 + p_k; a_k = a_g * 17 * 29 + a_s * 29 + a_k; r_k = a_k - p_k; strin...
ALGO
0.998628
3.371686
feb73d40-3afc-494a-91d9-22cd3dd02bea
vikashkumr/Competitive-Programming
practice/Data structures/Linked list/reverse_linked_list.cpp
//iterative program to reverse a singly linked list #include<iostream> #include<cstdlib> using namespace std; struct node { int data; struct node *next; }; struct node *head=NULL; void insert(int x) { //creating node dynamically struct node *temp=(struct node *)malloc(sizeof(struct node)); //initiliasing value t...
ALGO
0.999926
4.964292
142089e8-8ceb-49e1-888c-8de1fcb81045
kaloronahuang/KaloronaCodebase
Practices/Luogu/P2050.cpp
// P2050.cpp #include <bits/stdc++.h> using namespace std; const int MAX_N = 100005, MAX_E = 1e7 + 2000; int head[MAX_N], cur[MAX_N], current, dist[MAX_N], s, t, n, m, sum; int pi[MAX_N], timCst[110][50], cook[MAX_N], order[MAX_N], upward[MAX_N]; int flow[MAX_N], answer; bool inqu[MAX_N]; struct edge { int to, nxt,...
ALGO
0.999949
3.429199
9d92ad0d-7789-4f40-a3e0-c831588c5af8
SergioGranadosUAD/Programacion1
ListaLigada/Source.cpp
#include <iostream> #include <chrono> #include <vector> #include <algorithm> #include "ListaLigada.h" #include "Sorting.h" using namespace std::chrono; using namespace ListaLigada; using namespace Sorting; using std::vector; using std::cout; using std::endl; using std::cerr; using std::generate; using std::out_of_rang...
ALGO
0.974358
4.551673
6265167d-4a02-457c-bea9-5cd99854146d
ia2407-114/112-1-junior-college-C-plus-plus-program
1111134034/計算/計算/計算.cpp
#include <stdio.h> #include <iostream> #include <math.h> int main(void) { double aim = 0; double amount = 0; double principal = 0.0; double rate = 0.00; int year = 0; std::cout << "輸入目標的錢"; std::cin >> aim; std::cout << "輸入本金"; std::cin >> principal; std::cout << "輸入利率"; ...
ALGO
0.991504
3.242764
0c53191f-6eaf-4e22-82c8-76f911713d4e
peterclemenko/Forque3D-FPSTutorial
Engine/lib/bullet/src/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.998856
6.829802
3eaf29bd-d4e2-4eee-9357-3116e6c6036e
Seungchan0325/baekjoon
solutions/17474_0.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MAXN = 1000005; struct node { ll sum; int mx; int mx2; int cntmx; }; int n, m, arr[MAXN]; node tree[4*MAXN]; node f(node a, node b) { if(a.mx == b.mx) return {a.sum + b.sum, a.mx, max(a.mx2, b.mx2), a.cntmx + b.cntmx...
ALGO
0.999921
5.065992
f4d66240-0310-4451-ada8-ce5a9a46d667
ishabhray/Competitive-Programming
codeforces/1391B.cpp
#include <bits/stdc++.h> using namespace std; #define PI 3.141592653589 #define ll long long int #define ld long double #define vi vector<int> #define vl vector<ll> #define ii pair<int,int> #define pb push_back #define mp make_pair #define ff first #define ss second #define pll pair<ll,ll> #define vv vector int MOD=1e...
ALGO
0.999786
4.765531
4c006081-6666-46e2-a1f5-2fb0dde1c44c
youshu3008/LeetCode_C_Plus_Plus
2#M#Add-Two-Numbers.cpp
#include <iostream> using namespace std; // 定义链表节点 struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; // class Solution { // public: // ListNode* addTwoNumbers(L...
ALGO
0.999908
5.771738
c82e9fa0-c64d-43ab-8fa8-0c3f5536f85f
Nishant-Pall/C-practice
function_quadratic_roots.cpp
#include<iostream> #include<math.h> using namespace std; int main() { float a,b,c,delta; float root(int x,int y,int z); cout<<"enter value of a,b,c for the equation"<<endl<<"ax^2+bx+c=0"<<endl; cin>>a>>b>>c; root(a,b,c); return 0; } float root(int x,int y,int z) { float r1,r2; float delta = y*y-4*x*z; if(delta...
ALGO
0.999518
3.443242
13fd0b7c-3a5d-406a-b170-c87d0003c824
caiomuniz/codcadSolutions
088-medals.cpp
#include <iostream> using namespace std; int main() { int t1, t2, t3; cin >> t1 >> t2 >> t3; if(t1 < t2 && t1 < t3) { cout << "1\n"; if (t2 < t3) cout << "2\n3\n"; else cout << "3\n2\n"; } else if (t1 > t2 && t2 < t3) { cout << "2\n"; if (t1 < t3) cout << "1\n3\n"...
ALGO
0.999936
3.776399
daeef461-f9cc-4547-b581-fa6812f75dce
saurabhbhise16/algorithmTest
src/random_select_demo.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #include "generic.h" #include "random_select.h" int main() { RANDOM_INIT(); using namespace alg; const int MAX_ELEMENTS = 10; int list[MAX_ELEMENTS]; int i = 0; // generate numbers and fill them to the list for(i = 0; i < MAX_ELEMENTS; i++ ){ list...
ALGO
0.994164
4.017934
6cb33595-812c-474c-8411-4d2520ab6add
Rikon07/XPSC
Week 1/Day 2/B_Not_Found.cpp
#include<bits/stdc++.h> using namespace std; int main() { string str; cin >> str; //string alpha = "abcdefghijklmnopqrstuvwxyz"; map<char, int> mp; int n = str.size(); sort(str.begin(), str.end()); char ans; bool found = false; for(char ch='a'; ch<='z'; ch++) { mp[ch] = ...
ALGO
0.999977
4.537422
b0d31a08-d653-499d-858d-7a366326221b
ayushraina2028/CppAdvanced
Binary Search/Leetcode1539.cpp
#include <iostream> #include <vector> using namespace std; int findKthPositive(vector<int> arr, int k) { int n = arr.size(); if(arr[n-1] == n) return n+k; // corner cases else if(arr[0] > 1 and k <= arr[0]-1) { int misses = arr[0]-1; if (k <= misses) return k; } else if(arr[n...
ALGO
0.999927
4.30758
277c1d3f-482d-40df-9020-398b3dac6f2c
udacity/CarND-MPC-Project
src/Eigen-3.3/doc/examples/tut_arithmetic_scalar_mul_div.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { Matrix2d a; a << 1, 2, 3, 4; Vector3d v(1,2,3); std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl; std::cout << "0.1 * v =\n" << 0.1 * v << std::endl; std::cout << "Doing v *= 2;" << std::endl; v *= 2; std::cout << ...
ALGO
0.964679
3.652563
8bd3e6ee-3b12-4023-a0a4-20c694e698e7
chandola/squad
src/ar/ARTrain.cpp
#include <vector> #include <iostream> #include <fstream> #include <stdlib.h> #include <string.h> #include "tools.h" #include "AR.h" #define MAXCOEFF 1000 using namespace std; char *inputfilename=0; char *modelfilename=0; unsigned int order = 0; int method = 0; #define usage(msg, args...) \ { \ fprintf(std...
ALGO
0.982929
4.561357
b096796d-4bdf-490c-ac81-d3fa92ee6158
o-zhongchong/leetcode
Leetcode/1133.cpp
class Solution { public: int largestUniqueNumber(vector<int>& A) { if (A.size() <= 0) return -1; unordered_map<int, int> unique; int ret = -1; for (auto &i : A) { auto search = unique.find(i); if ( search == unique.end() ) ...
ALGO
0.999866
5.558296
a847222c-b60b-4f21-b957-690bc05b7e7d
Lee-Duck-03/template_cp
vnoi/olp_ct22/tempCodeRunnerFile.cpp
#include<bits/stdc++.h> #define pb push_back #define ff first #define ss second #define vt vector #define ins insert #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin()) #define debug(...) " [" << #__VA_ARGS__ ": " << (__V...
ALGO
0.999479
3.982104
f3da4dfe-aa55-48c1-9691-62428db2c513
JKWrist/CodePlayground
test_cpp/C++Programming/类和对象/静态成员变量.cpp
//1.父类的static变量和函数在派生类中依然可用,但是受访问性控制(比如,父类的private域中的就不可访问),而且对static变量来说,派生类和父类中的static变量是共用空间的,这点在利用static变量进行引用计数的时候要特别注意。 //2.static函数没有“虚函数”一说。因为static函数实际上是“加上了访问控制的全局函数”,全局函数哪来的什么虚函数? //3.派生类的friend函数可以访问派生类本身的一切变量,包括从父类继承下来的protected域中的变量。但是对父类来说,他并不是friend的。 #include<iostream> using namespace std; c...
TEST
0.905022
4.330798
c3068059-e350-4401-81e9-1c401e641cb7
EPFL-LGG/CurvedWeaving
elastic_rods/3rdparty/libigl/include/igl/AABB.cpp
template <typename DerivedV, int DIM> template <typename DerivedEle, typename Derivedbb_mins, typename Derivedbb_maxs, typename Derivedelements> IGL_INLINE void igl::AABB<DerivedV,DIM>::init( const Eigen::MatrixBase<DerivedV> & V, const Eigen::MatrixBase<DerivedEle> & Ele, const Eigen::MatrixBase<Derivedbb_...
ALGO
0.99859
5.13483
78c16b51-6446-406b-95db-a1900cc6664f
CIBC-Internal/boost
libs/graph/example/edge_connectivity.cpp
#include <boost/config.hpp> #include <set> #include <iostream> #include <iterator> #include <algorithm> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/edge_connectivity.hpp> using namespace boost; int main() { const int N = 8; typedef adjacency_list<vecS, vecS, undirectedS> UndirectedGraph; Und...
ALGO
0.996242
6.439106
c7382368-0c46-4f3a-bdd7-370e3411ed7c
astanin/mirror-alvar
src/Bitset.cpp
#include "Bitset.h" using namespace std; namespace alvar { using namespace std; int Bitset::Length() { return bits.size(); } ostream &Bitset::Output(ostream &os) const { deque<bool>::const_iterator iter=bits.begin(); while (iter != bits.end()) { if (*iter) os<<"1"; else os<<"0"; iter++; } return os; } voi...
TOOL
0.972447
5.70634
8698854a-41c3-4c28-bffe-480f18729f3a
Kullsno2/C-Cpp-Programs
NodesAtDistanceK.cpp
#include<iostream> using namespace std ; struct TreeNode { int val ; TreeNode * left ; TreeNode * right ; TreeNode(int x) : val(x) , left(NULL) , right(NULL) {} }; void printDown(TreeNode * root,int k) { if(root== NULL || k<0) return ; if(k==0) cout<<root->val<<" "; printDown(root->left , k-1) ; printD...
ALGO
0.999981
3.856895
d63753b3-0910-43bd-9d94-58286362e4a3
RudranshPandey/Leetcode-
plus one .cpp
class Solution { public: vector<int> plusOne(vector<int>& digits) { int ind = digits.size()-1; while(ind >= 0){ if(digits[ind] >=9){ digits[ind] =0; } else{ digits[ind]+=1; return digits; } in...
ALGO
0.999844
6.680923
adeed8b8-c1ca-433a-b650-b52609998aa4
kushagra414/100-Days-of-Code
KushagraShekhawat/Programs/Day 14/53. Check for BST..cpp
// { Driver Code Starts #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; Node* right; Node* left; Node(int x){ data = x; right = NULL; left = NULL; } }; /* Ret...
ALGO
0.999677
5.398071
f397ef42-d37a-437e-b437-42e7f7f7a3a4
ifteheralom/coding-practice
srbd/nodes-at-k.cpp
#include <iostream> int node[101][3]; int ans[101], vis[101]; int cnt, dis, k; void dfs(int u, int d){ vis[u] = 1; if(d == dis){ ans[cnt++] = u; return; } for(int i=0; i<3; i++){ int v = node[u][i]; if(!vis[v] && v != -1){ dfs(v, d+1); } } } int main() { cnt = 0; for(int i=0; ...
ALGO
0.999979
3.29903
b0463165-2db8-4179-9174-826731795081
PacemakerX/codeForces-my-solutions
solutions_codForces/329935131_1904_B.cpp
#include <algorithm> #include <bits/stdc++.h> using namespace std; // Type definitions typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<pii> vpii; typedef vector<pll> vpll; typedef vector<vi> vvi; typedef vector<vl> vvl; // Macro...
ALGO
0.999923
4.813509
c4db6ce9-301d-45f2-806c-10c67719f6d2
rabelhmd/LeetCode
0645-set-mismatch/0645-set-mismatch.cpp
class Solution { public: vector<int> findErrorNums(vector<int>& nums) { int len = nums.size(); for(int i = 0; i < len; i++) { while(nums[i] != nums[nums[i]-1]) { swap(nums[i], nums[nums[i]-1]); } } for(int i = 0; i < len; i++) { ...
ALGO
0.999819
5.879628
52f28cb9-5147-4477-85be-5d46a2774c5e
77Arafat383/Previous-contest-problem
A_Boredom.cpp
//**************BISMILLAHIR RAHMANIR RAHIM**************** //*******************Md Yeasin Arafat**************** #include<bits/stdc++.h> using namespace std; #define check cout<<'?'<<endl; #define ll long long #define Judge(x) x==0 ? cout<<"NO\n" : cout<<"YES\n"; #define judge(x) x==0 ? cout<<"No\n" : ...
ALGO
0.999872
3.4677
5cf08598-e8bd-4b13-9692-d49259cd57cb
cxyfer/OJ
CSES/2. Sorting and Searching/CSES-1621_Distinct Numbers.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' void solve1() { int n; cin >> n; vector<int> nums(n); for (int i = 0; i < n; i++) cin >> nums[i]; sort(nums.begin(), nums.end()); int ans = 1; for (int i = 1; i < n; i++) { if (nums[i] != nums[i - 1]) ans++; } cout ...
ALGO
0.999834
4.750655
4ae0618c-7ec3-4a0d-b9bc-fd69156ab7c2
98clearlove/cg_work
1_7.cpp
#include <iostream> using namespace std; class Rectangle { public: Rectangle(void); Rectangle(float length, float width); ~Rectangle(void); float getArea(); float getGirth(); private: float mLength; float mWidth; }; // float Rectangle::getArea() { return mLength * mWidth; } //ܳ f...
ALGO
0.963789
3.717893
342629ff-6890-4b1b-8ae7-478afae03320
ytsaurus/ytsaurus-cpp-sdk
yt/yt/client/driver/proxy_discovery_cache.cpp
#include "proxy_discovery_cache.h" #include "private.h" #include <iterator> #include <yt/yt/client/api/client.h> #include <yt/yt/client/api/public.h> #include <yt/yt/client/api/rpc_proxy/address_helpers.h> #include <yt/yt/core/misc/async_expiring_cache.h> #include <util/digest/multi.h> namespace NYT::NDriver { u...
TOOL
0.899711
7.895064
11c0fbf8-33e8-4f73-8b7e-9d61404d4a94
Dev1634/CodeBreaker
lcs.cpp
#include<algorithm> #include<iostream> using namespace std; int main() { string a, b; cin >> a >> b; int n = a.size(), m = b.size(); int dp[n + 2][m + 2]; for (int i = 0; i <= n; i++) { for (int j = 0; j <= m; j++) { if (i == 0 || j == 0) dp[i][j] = 0; else if (a[i - 1]...
ALGO
0.999978
4.342438
d3e19815-aef0-4b61-8544-47417f39103c
Abu-Kaisar/CSE_EXAM_CODE
2017_2_a/2017_2_a/Source.cpp
#include <iostream> using namespace std; bool is_prime(int n) { if (n == 1) { return false; } // This will loop from 2 to int(sqrt(x)) for (int i = 2; i * i <= n; i++) { if (n % i == 0) { return false; } } // If we did not find any factor in the above loop, ...
ALGO
0.999382
3.850849
bc89c384-e972-4218-92e8-241d007b1ef6
fithisux/FSL
extras/include/boost/libs/geometry/doc/src/examples/algorithms/num_interior_rings.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // QuickBook Example //[num_interior_rings //` Get the number of interior rings in a multi-polygon #include <iostream> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hpp> #include <boost/geometry/geometries/polygon.hpp> #include <boost...
ALGO
0.97302
6.835728
cb8dc7bb-9f67-43f4-9228-f53cc534a54a
rotat1ck/cpp-assignments
random/percent.cpp
#include <iostream> #include <cmath> using namespace std; void getvalue(double *x, double* y, double* p ) { double a = (*x/100)**p; double b = ((*y/100)**p) + ((a-(int)a)* 100); cout << a << " " << b << " проценты" << endl; if (b >= 100) { a += 1; b -= 100; } *x += (int)a; ...
ALGO
0.994402
3.237212
1352d5b9-4a93-4566-886a-4ebb06d0391e
TKirovAl/complete
papki.cpp
#include <iostream> #include <cstring> // Функция для проверки, является ли символ уникальным bool isUnique(char* str, int index) { for (int i = 0; i < index; i++) { if (str[i] == str[index]) { return false; } } return true; } // Функция для генерации правильного на...
TOOL
0.949128
5.511144
ae46304d-517a-47b0-b85d-44ceba492462
oldlick/CompetitiveProgramming
atcoder/5 other/2019_0127 全国統一プログラミング王決定戦予選/C.cpp
/*ver 7*/ #include <bits/stdc++.h> using namespace std; void init() {cin.tie(0);ios::sync_with_stdio(false);cout << fixed << setprecision(15);} using ll = long long; using ld = long double; using vl = vector<ll>; using vd = vector<ld>; using vs = vector<string>; using vb = vector<bool>; using vvl = vector<vector<ll>>; ...
ALGO
0.999993
3.245417