uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
55ebb84e-23bd-4025-ab21-a10bde936255
ishandutta2007/codeforces
maxwellzen/normal/1696/D.cpp
#include <bits/stdc++.h> using namespace std; // #include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; // typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> iset; typedef long long ll; typedef long double db; typedef string str; typedef vector<int> vi; typedef vector...
ALGO
0.999878
4.563019
0c9de5ca-af32-44c9-b789-ac706a00e114
martonantoni/compolib
aoc/2023/day_13.cpp
#include "aoc.h" #include "bmp.h" const char* main_delimeters = " ,"; bool main_allow_empty_fields = false; void print_vll(vector<ll>& nums) { for (auto x : nums) P("%lld ", x); } bool tryReflectHoriz(cImage<char>& img, vector<cPosition>& positions, int afterRow) { return none_of(ALL(positions), ...
ALGO
0.999298
4.852414
ac7cfe75-5f27-4a83-8ea0-1b6ebd27330d
FelixJnthn/iuran_rt_web
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
b1ec9c22-dbf6-430f-b40a-4a70614867c3
vmfomin/Examples
Person/main.cpp
#include <algorithm> #include <iostream> #include <memory> #include <string> #include <vector> class Person { public: Person() = delete; template <typename T, typename = std::enable_if_t< !std::is_base_of_v<Person, std::decay_t<T>> && !std::is_integral_v<std...
ALGO
0.99776
5.776439
69c1b037-0b02-4167-8811-d460412ef861
jeajin/Coding_Test
python-for-coding-test-master/6/1.cpp
#include <bits/stdc++.h> using namespace std; int n = 10; int arr[10] = {7, 5, 9, 0, 3, 1, 6, 2, 4, 8}; int main(void) { for (int i = 0; i < n; i++) { int min_index = i; // 가장 작은 원소의 인덱스 for (int j = i + 1; j < n; j++) { if (arr[min_index] > arr[j]) { min_index = j; ...
ALGO
0.999959
4.295593
43dc459a-c888-4e34-8617-3af1929459ce
ManasTiwari69/dsa
array and recursion/series.cpp
#include<iostream> using namespace std; int factorial(int n1,int n2) { int m1=1; for(int i=1;i<=n2;i++) { m1=m1*n1; } return m1; } int main() { int n,b; cout<<"put the value of n"; cin>>n; cout<<"enter b"; cin>>b; int s=factorial(n,b); cout<<"a to the power b i...
ALGO
0.999787
3.598759
dcc4da6e-bbe1-43c0-816e-50f603cdc409
Sai-Ganesh123/CSA0387
frequently repeated element.DS.cpp
#include <stdio.h> int main() { int arr[] = {1, 2, 3, 4, 2, 7, 8, 8, 3}; int length = sizeof(arr)/sizeof(arr[0]); printf("Duplicate elements in given array: \n"); for(int i = 0; i < length; i++) { for(int j = i + 1; j < length; j++) { if(arr[i] == arr[j]) ...
ALGO
0.991813
3.192881
36cc688e-0385-4f5f-b940-570dc1f921a8
brunoNevess/LeetCode
Algorithms/112. Path Sum.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: bool aux(TreeNode* root,int sum,int sumTilNow){ if (root == NULL) return false; ...
ALGO
0.999965
5.936061
459f5ad8-7895-428e-b88a-4609e053fa21
grraghav120/Algorithms
1663. Smallest String With A Given Numeric Value.cpp
class Solution { public: string getSmallestString(int n, int k) { string ans=""; if(n==1){ ans=(96+k); return ans; } for(int i=0;i<n;i++){ ans+='a'; } k-=(n-1); if(k<=0) return ans; n--; cout<<k<<'\n'; ...
ALGO
0.999881
4.525473
e3eebc8a-a359-4742-8182-3ea7335c3765
orangain/opencv
modules/imgproc/src/geometry.cpp
#include "precomp.hpp" CV_IMPL CvRect cvMaxRect( const CvRect* rect1, const CvRect* rect2 ) { if( rect1 && rect2 ) { CvRect max_rect; int a, b; max_rect.x = a = rect1->x; b = rect2->x; if( max_rect.x > b ) max_rect.x = b; max_rect.width = a += rect1...
ALGO
0.999756
5.939713
4e5b62d9-b972-4a36-b46e-c9905e172cb0
yongduek/EulerProject
euler-26.cpp
#include <stdio.h> #include <vector> #include <set> using namespace std; int cycleLength (int d) { set<int> rs; vector<int> a; int n = 1; int q, r; while (1) { q = n/d; r = n%d; a.push_back (q); if (!rs.empty() && (rs.find(r) != rs.end())) { break...
ALGO
0.999416
3.495497
3643722d-c8bc-42f9-b58d-9054913bdaaf
maliksalem1/ICS3U-Unit2-01-CPP
AreaPerimeter.cpp
#include <cmath> #include <iostream> int main() { // this function calculates the area and perimeter std::cout << "If a circle has a radius of 15mm: " << std::endl; std::cout << std::endl; std::cout << "Area is " << (M_PI * pow(15, 2)) << " mm²." << std::endl; std::cout << "Perimeter is " << (2 * ...
TOOL
0.975456
5.1218
e785724d-bc93-4cb0-a192-2e9d8cba80b6
ASHISH-GITHUB2495/My-CPP-STL-programms
STL_set.cpp
#include<bits/stdc++.h> using namespace std; int main() { set <int> s; s.insert(100); s.insert(10); s.insert(30); s.insert(15); s.insert(10); s.insert(100); s.insert(40); s.insert(32); set <int> :: iterator it=s.begin(); while(it!=s.end()) { cout<<*it<<" ";it++; } cout<<endl; cout<<"erasing 30"<<endl...
TOOL
0.970285
3.554348
63cfafbd-dc32-4dbd-870d-ebf43f5f1e3e
WonderlandWar/portalcoop-src
src/game/shared/querycache.cpp
// memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" #define QUERYCACHE_SIZE 1024 static QueryCacheEntry_t s_QCache[QUERYCACHE_SIZE]; #define QUERYCACHE_HASH_SIZE ( QUERYCACHE_SIZE * 2 ) // elements available for cache reuse static CUtlIntrusiveDList<QueryCacheEntry_t> s_VictimLi...
TOOL
0.959501
5.607456
15d5b428-15e1-4619-9295-4fda02b0e54f
vantuan0128/DSA_PTIT
DSA06015.cpp
/* Cho mảng A[] gồm N phần tử chưa được sắp xếp. Nhiệm vụ của bạn là sắp xếp các phần tử của mảng A[] theo thứ tự tăng dần bằng thuật toán Merge Sort. Input: 2 5 4 1 3 9 7 10 10 9 8 7 6 5 4 3 2 1 Output: 1 3 4 7 9 1 2 3 4 5 6 7 8 9 10 */ #include<bits/stdc++.h> using namespace std; void merge(int a[], int l, int r, ...
ALGO
0.99998
5.285764
a052910c-da26-4a89-bbdf-a5f518f743a1
ishandutta2007/codeforces
dlalswp25/normal/1418/B.cpp
#include <bits/stdc++.h> using namespace std; int N; int A[105]; int B[105]; int main() { int tc; scanf("%d", &tc); while(tc--) { scanf("%d", &N); for(int i = 1; i <= N; i++) scanf("%d", &A[i]); for(int i = 1; i <= N; i++) scanf("%d", &B[i]); vector<int> v; for(int i = 1; i <= N; i++) if(!B[i]) v.push_ba...
ALGO
0.99997
3.004686
f8e8acdb-cb9e-4740-9534-26e478ab5d1d
erixalv/Compressor-Huffman-Adaptativo-Contextual
LinkedList.cpp
#include "LinkedList.h" #include <cmath> #include <iostream> using namespace std; LinkedList::LinkedList() { head = nullptr; size = 0; } bool LinkedList::isEmpty() { return (size == 0); } int LinkedList::getSize() { return size; } void LinkedList::insereOrdenado(char l, int f) { // Aloca o novo...
ALGO
0.999669
5.092964
e4703158-cd93-4539-8762-b05b6f7932a2
creydit/cd-assignment
libc/src/stdfix/countlslr.cpp
#include "countlslr.h" #include "src/__support/common.h" #include "src/__support/fixed_point/fx_bits.h" #include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(int, countlslr, (long fract f)) { return fixed_point::countls(f); } } // namespace LIBC_NAMESPAC...
ALGO
0.984278
4.356153
7e783212-4bc6-494f-bafb-bfc0d3b3d24f
keywet06/code
CF/CF1609C.cpp
#include <bits/stdc++.h> using int64 = long long; const int N = 1000005; int T, n, e; int a[N], p[N], nxt[N], lst[N]; int64 ans; int main() { std::ios::sync_with_stdio(0); std::cin.tie(0), std::cout.tie(0); for (int i = (p[1] = 1, 2); i < N; ++i) { if (p[i]) continue; for (int j = i << ...
ALGO
0.999914
3.764239
19ee0c39-b704-4ea8-804e-79f950ed6d42
DSIsakov/BMSTU-Discrete-Maths
module3/vismealy.cpp
#include <iostream> #include <string> #include <vector> using namespace std; int main(){ int n, m, q; vector<vector<int> > d; vector<vector<string> > f; cin >> n >> m >> q; for (int i = 0; i < n; i++){ vector<int> vd; for (int j = 0; j < m; j++){ int x; cin >> x; vd.push_back(x); } d.push_back...
ALGO
0.977034
3.742745
1915ba66-d04f-4871-9594-02cfc347147c
KatsuyaKikuchi/ProgrammingContest
AtCoder/Virtual/20200623/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pll; #define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i)) #define REP(i, n) FOR(i,n,0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll) 1e15; ll calc(ll R, ll C, ll a, ll b) { if (a == 0)...
ALGO
0.999902
3.890116
8209b082-e701-4b60-a83b-8c05525ffb31
neeji/codechef_solution
codechef/beginner/puppy_and_sum.cpp
#include <iostream> #define ll long long #define ull unsigned long long #define ui unsigned int using namespace std; int sum_n(int n) { if (n == 0) { return 0; } else { return n + sum_n(n - 1); } } int sum(int d, int n) { if (d == 0) { return n; } return...
ALGO
0.999912
4.530331
6fcd7506-2b44-40e4-a5ea-74d7411e337a
SHAIMA-HAQUE/LeetCode-Solve
0031-next-permutation/0031-next-permutation.cpp
class Solution { public: void nextPermutation(vector<int>& nums) { next_permutation(nums.begin(),nums.end()); } };
ALGO
0.999898
5.548016
b318de91-12d6-4e75-b6fe-035bbe480057
RaunakK22UB/Daily-DSA
greedy/2870_leetocde.cpp
class Solution { public: // simple logic hai kisi bhi number ko 3 se devide karo aur uska ceil lelo number of oprations you will get // 2/3 = 0.6 ceil = 1 (means 2 devided by 2) example 4 is there 2 times so we can remove them by 2 because frequancy must be 2 or 3 //4/3 = 1.9 ceil will be 2 (example 5,5,5,5) we can r...
ALGO
0.999855
5.966209
6b764c61-c5c8-4651-a55d-b6a9adb873d8
FrozenBuffalo1406/leet_code
3289.the-two-sneaky-numbers-of-digitville.cpp
/* * @lc app=leetcode id=3289 lang=cpp * * [3289] The Two Sneaky Numbers of Digitville */ // @lc code=start class Solution { public: vector<int> getSneakyNumbers(vector<int>& nums) { vector <int> result; for (int i = 0; i < nums.size(); i++) { nums[i] = nums[i] + 1; ...
ALGO
0.999935
5.467083
db288fe0-d9d3-49c1-b291-2c452e1c6f94
blogdefotsec/Unitree_SDK_Extended
original_SDK/unitree_slam/20250410/module/Odometer_service/src/rpg_svo_pro_open/vikit/vikit_common/src/homography.cpp
/* * homography.cpp * * Created on: Sep 2, 2012 * by: cforster */ #include <glog/logging.h> #include <vikit/homography.h> #include <vikit/math_utils.h> #include <vikit/homography_decomp.h> // copy of homography decomposition in opencv3 #include <opencv2/core/core.hpp> #include <opencv2/calib3d/calib3d.hpp> ...
ALGO
0.999674
6.498187
39cdc787-8282-425c-9189-51abafc8925c
roytam1/gecko28a1-vc8
gfx/skia/src/utils/SkCullPoints.cpp
#include "SkCullPoints.h" #include "Sk64.h" static bool cross_product_is_neg(const SkIPoint& v, int dx, int dy) { #if 0 return v.fX * dy - v.fY * dx < 0; #else Sk64 tmp0, tmp1; tmp0.setMul(v.fX, dy); tmp1.setMul(dx, v.fY); tmp0.sub(tmp1); return tmp0.isNeg() != 0; #endif } bool SkCullPoints...
ALGO
0.864262
6.957697
335f32c5-d1c5-4bd0-a910-ca0f69cefe00
mmxd/leetcode
cpp/451.sort-characters-by-frequency.bucket_sort.cpp
class Solution { public: string frequencySort(string s) { unordered_map<char, int> freq; vector<string> freqToStr(s.size() + 1, ""); string ans; for (int i = 0; i < s.size(); i++) { freq[s[i]]++; } for (auto &it : freq) { char c = it.first; ...
ALGO
0.999977
6.225069
9f96722d-7f59-4d30-a893-1970aeb9cf87
NAREK111/cplusplus-lessons
lesson42/lesson42.cpp
// Урок 42 // Броуновское движение #include <GL/glut.h> #include <vector> #include <cstdlib> #include <cmath> using namespace std; const float DT = 0.01; struct P { float x; float y; float vx; float vy; float m; }; vector<P> p; void display() { glClear(GL_COLOR_BUFFER_BIT); for (vector<P...
ALGO
0.998935
4.158878
257fbd4c-0788-416b-8d26-32af963f28a9
suravijha/DSA
Day51/rotate-string.cpp
// LeetCode 796 // Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. // A shift on s consists of moving the leftmost character of s to the rightmost position. class Solution { public: bool rotateString(string s, string goal) { if (s.size() != g...
ALGO
0.999304
6.120357
09e7594d-4822-46e6-a9c8-9f9278b9fd24
EmonSpeedy/Algorithms
LCS-memorization.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1001; string s, t; int n, m; int dp[N][N]; int LCS(int i, int j) { if(i == n || j == m){ return 0; } if(dp[i][j] != -1){ return dp[i][j]; } if(s[i] == t[j]){ int ans = 1 + LCS(i+1, j+1); dp[i][j] = ans; ...
ALGO
0.999992
5.280181
f3afae34-2e01-49c1-8b34-068dee671d85
kriti-002/Coding-Solutions
Course Schedule - GFG/course-schedule.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: vector<int> findOrder(int n, int m, vector<vector<int>> pre) { //code here vector<int>adj[n]; for(auto x: pre){ adj[x[1]]....
ALGO
0.999912
6.74619
db3895f8-70ed-4c0c-9a83-0e89a33f886e
prithviraj324/interview-prep
Day24/count_subsets_with_sum_x.cpp
#include<bits/stdc++.h> using namespace std; class Solution{ public: int perfectSum(int arr[], int n, int sum) { // Your code goes here const int k=1e9+7; int count=0; vector<vector<int>> dp(n+1, vector<int>(sum+1,0)); // for(int i=0;i<n+1;i++) // dp[i][0]=1; //s...
ALGO
0.999851
5.142103
298ea3af-622f-4448-89aa-827f23a42880
sucheolshin/LAMMPS_active_polymer
fix_bd_active_polymer.cpp
/* ---------------------------------------------------------------------- Modified from fix_bd_baoab.cpp (Guang Shi, https://github.com/anyuzx/Lammps_brownian) by Sucheol Shin, Sep. 2020 ------------------------------------------------------------------------- */ /* ---------------------------------------------...
ALGO
0.994776
6.913151
9be8ea5b-a4a1-4c47-b093-92d7856e1a56
carl-221b/mds3d
ray_tracing/mds3d_td2/ext/nanogui/ext/eigen/bench/product_threshold.cpp
#include <iostream> #include <Eigen/Core> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; #define END 9 template<int S> struct map_size { enum { ret = S }; }; template<> struct map_size<10> { enum { ret = 20 }; }; template<> struct map_size<11> { enum { ret = 50 }; }; template<> struct ...
TOOL
0.962905
5.102006
f96f54d9-e239-45f3-82ae-bb1c66f0e58e
jconsidi/dfa-games
src/Flashsort.cpp
// Flashsort.cpp #include "Flashsort.h" #include <cassert> #include <vector> #include "Profile.h" // flashsort in-situ permutation // https://en.m.wikipedia.org/wiki/Flashsort template<class T, class K> std::vector<size_t> _flashsort_count_cumulative(T *begin, T *end, std::function<K(const T&)> key_func) { std::...
ALGO
0.999528
6.327283
335bafd3-8931-4c1e-8e84-585646e2fb80
aad1442/iitDailyPractice
dailyPractice/28_17sep23NA/lab_11_1442.cpp
#include <bits/stdc++.h> using namespace std; int found = 0; string path, path2; void cfg(vector<string> &base, string output, string target, string currpath) { if (found == 2) return; if (output.size() > target.size() + 2) return; if (output.find('S') == string::npos && output != " ") ...
ALGO
0.99998
3.306194
37aff4aa-3bfa-4c71-b27d-e709b708d406
Haroon-64/VS-Code
py/Algoritms/cpp/subsetsum.cpp
#include <iostream> #include <vector> using namespace std; bool subsetSumExists(const vector<int>& nums, int targetSum) { int n = nums.size(); vector<vector<bool>> dp(n + 1, vector<bool>(targetSum + 1, false)); for (int i = 0; i <= n; i++) { dp[i][0] = true; } for (int i = 1; i <= n; i++)...
ALGO
0.999989
7.053929
7d88f0f5-32de-41b0-85d7-06e08848dec5
trojsten/proboj-2017-jesen
klienti/misko/main.cpp
#include <cstdio> #include<queue> #include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include <unistd.h> using namespace std; #include "common.h" #include "marshal.h" #include "update.h" struct Point{ int x; int y; Point(){ x=y=0; } Point(int a, int b){ x=a;...
ALGO
0.980312
3.691635
7f375243-f9dc-484a-b8af-233ae2a18f80
ArmandoRosasB/Metodos-computacionales
Paralelismo/piLeibniz.cpp
#include <iostream> #include <math.h> #include <iomanip> #include "utils.h" #include <pthread.h> using namespace std; const int TERMS = 100000000; const int THREADS = 8; typedef struct { int start, end; double result; } Block; double Leibniz(); void* leibnizThread(void*); int main(int argc, char* argv[]){ ...
ALGO
0.999938
4.402901
5f7deabf-3509-4102-b6b6-dca9eee8fff5
Arpit-AD/CrackYourPlacement
Day_38/minimum_number_of_refeuling_stops.cpp
class Solution { public: int minRefuelStops(int target, int startFuel, vector<vector<int>>& stations) { if(startFuel >= target) return 0; priority_queue<int> max_heap; int i = 0, n = stations.size(), stops = 0; int max_distance = startFuel; while(max_distance < target){ ...
ALGO
0.999912
5.817454
47e17dab-7398-4ff8-b813-d720fd1bbc31
SnehaKumari3/codeforces_practice_problems
A_Watchmen.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef double db; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vl; typedef vector<vl> vvl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<pii> vpii; typedef vector<pll> vpll; typedef...
ALGO
0.999943
4.02457
6f3e75b7-1d08-4170-bfb5-1998388b5f14
sameer-kumar-jain/RNPokerStoveLib
ios/pokerstove/peval/PokerHand.cpp
#include "PokerHand.h" #include "CardSet.h" #include "Holdem.h" #include "PokerEvaluation.h" #include "PokerEvaluationTables.h" #include <algorithm> #include <cassert> #include <stdexcept> using namespace std; using namespace pokerstove; PokerHand::PokerHand() { clear(); } CardSet PokerHand::cardSet() const { Ca...
ALGO
0.941956
7.227259
9acf42ab-1ce1-46d1-b41a-28560e990de3
jackyzcq/av
media/codecs/amrnb/common/src/lsfwt.cpp
/* Pathname: ./audio/gsm-amr/c/src/lsfwt.c Functions: Lsf_wt ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated to accept new parameter, Flag *pOverflow. Placed file in the proper PV Software template. Description: 1. Eliminated u...
ALGO
0.999818
6.617649
d289bc7d-01bb-4bc9-9e9b-475e6f092ec7
565353780/structured-3d
structured_td/Lib/PyMesh/third_party/cgal/Mesh_2/test/Mesh_2/test_mesh_terrain.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Projection_traits_xy_3.h> #include <CGAL/Constrained_Delaunay_triangulation_2.h> #include <CGAL/Delaunay_mesh_face_base_2.h> #include <CGAL/Delaunay_mesher_2.h> #include <CGAL/Delaunay_mesh_size_criteria_2.h> #include <fstream> typedef CGA...
ALGO
0.993249
6.595281
5d6cecd9-e5a8-4cde-813e-b866a1541992
BLBT1/MyLeetcodeSolution
378.kth-smallest-element-in-a-sorted-matrix.cpp
/* * @lc app=leetcode id=378 lang=cpp * * [378] Kth Smallest Element in a Sorted Matrix */ // @lc code=start class Solution { public: struct myCmp { bool operator()(const pair<int, int> &v1, const pair<int, int> &v2) const { return v1.first > v2.first; } }; int ...
ALGO
0.999985
6.025759
d02a5a05-db02-42cf-a74b-e308265aba22
bhsphd/FilterReg
ransac/hypothesis_evaluate.cpp
// // Created by wei on 12/2/18. // #include <limits> #include "ransac/hypothesis_evaluate.h" void poser::refineAndEvaluateHypothesis( const poser::FitnessEvaluator &evaluator, poser::FeatureMap &model, poser::RigidKinematicModel &kinematic, const poser::TensorView<poser::mat34> &pose_hypothesis, const poser::Rig...
ALGO
0.997914
6.008935
46721f38-0179-46aa-a96d-ff2014aa7a2d
sarvex/leetcode-scopes
solution/0700-0799/0745.Prefix and Suffix Search/Solution.cpp
class WordFilter { public: unordered_map<string, int> d; WordFilter(vector<string>& words) { for (int k = 0; k < words.size(); ++k) { string w = words[k]; int n = w.size(); for (int i = 0; i <= n; ++i) { string a = w.substr(0, i); for ...
ALGO
0.99955
5.82581
61368524-4e38-4e3d-917a-8892f5d0a392
markmisener/udacity-self-driving-car-engineer
p7-path-planning/src/Eigen-3.3/unsupported/doc/examples/BVH_Example.cpp
#include <Eigen/StdVector> #include <unsupported/Eigen/BVH> #include <iostream> using namespace Eigen; typedef AlignedBox<double, 2> Box2d; namespace Eigen { Box2d bounding_box(const Vector2d &v) { return Box2d(v, v); } //compute the bounding box of a single point } struct PointPointMinimizer //how to compute squa...
ALGO
0.999796
6.502348
a2ee5ab9-7e69-44b4-8d62-7075ad2bd91c
shinchu-itachi/SDE-CP-SHEET
ConstructiveProblems/CODEFORCES(C-50).CPP
/* ContestName = Shinchu_itachi " Walking on the road not taken with my own gutts.. " */ // problem link : https://codeforces.com/problemset/problem/486/B #include <bits/stdc++.h> using namespace std ; using namespace chrono; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp>...
ALGO
0.999714
3.485693
07936791-0de4-4106-9d1e-944bc395e656
CybulskiB/BoltzmanSamplers
generators.cpp
#include "generators.h" // PROBABILITIES: bool generateBernoulli(double x){ std::random_device rd; std::mt19937 engine(rd()); std::bernoulli_distribution dist(x); return dist(engine); } // Generators for Boltzmann Samplers // BS (C(x)) = (ProbabilityGen(A(x)) -> BS (Ax)) // Geometric generator int g...
ALGO
0.980374
5.551647
3f2f5ce1-efd5-4aae-ad5b-82b593b6af12
Nightmare020/SpaceLoreExploration
tertut01/Engine/bullet3-master/Extras/ConvexDecomposition/fitsphere.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> #include "fitsphere.h" // http://codesuppository.blogspot.com // // mailto: <EMAIL> // // http://www.amillionpixels.us // /* An Efficient Bounding Sphere by Jack Ritter from "Graphics Gems", Academic Press, 1990 */ /* Ro...
ALGO
0.999956
6.990395
73536a2e-6f31-4f91-9552-c8433e0b325a
Ayush-Anshuli/LEETcode-and-GFG
0704-binary-search/0704-binary-search.cpp
class Solution { public: int search(vector<int>& nums, int target) { for(int i = 0;i<nums.size();i++){ if(nums[i]==target){ return i; } } return -1; } };
ALGO
0.999852
6.048414
b280ab72-3e2d-4a76-b148-e621b0896667
ramanrawatgla/assignment
43. All Operations of String.cpp
#include<stdio.h> #include<conio.h> Void main(){ Char string1[25],string2[25]; int l; Clrscr(); Printf(***** performing string length ******\n); Printf(enter only one string \n); Scanf(%s,string1); l = strlen(string1); printf(the string length is %d\n\n,l); printf(**** performing string concatenation...
TOOL
0.875909
3.000407
b27a3f40-1173-407e-8e1f-4e9f4d4fad99
Lotuses-robot/Codes
Contest/zsyz/20220815/C.cpp
#include <cstdio> #include <cstring> #include <queue> #include <vector> struct Edge { int from, to; }; std::vector<Edge> G[300005]; void ins(int from, int to) { G[from].push_back({from, to}); G[to].push_back({to, from}); } #define mp(a, b) std::make_pair(a, b) #define pi std::pair<int, int> std::queue<pi...
ALGO
0.997366
4.683294
415b1b8b-d2c2-4c89-a0e2-50aeefe6e01e
umangja/CompetitiveProgrammingSolution
atcoder/dp/J.cpp
/*input 2 0 0 2 3 3 2 3 2 1 3 */ #include<bits/stdc++.h> using namespace std; const int N = 305; double dp[N][N][N]; int main() { int n;cin>>n; vector<int> cnt(4,0); for(int i=1;i<=n;i++) { int x;cin>>x; cnt[x]++; } dp[0][0][0] = 0; for(int c=0;c<=n;c++) { for(int b=0;b<=n;b++) { for(int a=0;a<=n;...
ALGO
0.999927
3.720514
efa0c7f0-8fb7-4f22-a811-1971b4ba033d
zhangxiaohu057/SensorsCalibration
online_calib/vins_camera2imu/eigen3/unsupported/doc/examples/FFT.cpp
// To use the simple FFT implementation // g++ -o demofft -I.. -Wall -O3 FFT.cpp // To use the FFTW implementation // g++ -o demofft -I.. -DUSE_FFTW -Wall -O3 FFT.cpp -lfftw3 -lfftw3f -lfftw3l #ifdef USE_FFTW #include <fftw3.h> #endif #include <vector> #include <complex> #include <algorithm> #include <iterator>...
ALGO
0.989949
6.129515
6b6f39c0-8a4c-4b96-9f50-c7669c8a61a6
gnevercodes/CSCE_UNT_Subjects
Algorithm_Design/asignment02/insertionSort.cpp
#include <stdio.h> #include <iostream> #include <vector> using namespace std; int main(int argc, char*argv[]) { //insertionsort numbers in a file vector<int> A; if(argc!=2) { cout<<"Provide an input file as argument"; } else { FILE *file = fopen(argv[1], "r"); if(file == 0){ cout << "ERROR: ...
ALGO
0.999534
4.476871
6e83b2fa-c0b7-4bf5-8995-527856645790
Mercy2Green/m2g_racing
Fast-Planner/uav_simulator/so3_quadrotor_simulator/include/ode/libs/numeric/odeint/examples/lorenz_point.cpp
#include <iostream> #include <cmath> #include <boost/operators.hpp> #include <boost/numeric/odeint.hpp> //[point3D class point3D : boost::additive1< point3D , boost::additive2< point3D , double , boost::multiplicative2< point3D , double > > > { public: double x , y , z; point3D() : x( 0...
ALGO
0.999844
5.042205
08c25a8a-de78-4609-9f2f-53ca37707ad4
prateekpatil711/CODE-LIBRARY
BITmanipulationTOfindsumoftwoNumbers.cpp
#include <bits/stdc++.h> using namespace std; int getSum(int a, int b) { return b==0? a:getSum(a^b, (a&b)<<1); } int main(){ int a,b; cin >> a >> b; cout << getSum(a,b); }
ALGO
0.999943
4.041805
f29726c0-6dcc-4231-817d-01ba112f41b6
Huchangzhi/oi-wiki
geometry/code/scanning/scanning_1.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; struct node { ll data; ll num; } f[5000001]; ll n, c[5000001], ans, a[5000001]; bool cmp(node a, node b) { if (a.data == b.data) { return a.num < b.num; } return a.data < b.data; } ll lowbit(ll i) { return i & (-i); } ll sum(ll x) { ...
ALGO
0.999839
3.465543
24abf3d2-cb5d-4e09-99a7-a24880941073
Palmkonde/CompetitiveProgramming
OTOG/otog876/otog876.cpp
#include <bits/stdc++.h> #define lsb(x) x & -x using namespace std; const int N = 100005; int n, m; int fwk[N]; void upd(int k) { for (; k <= N; k += lsb(k)) { fwk[k]++; } } int sum(int k) { int res = 0; for (; k > 0; k -= lsb(k)) { res += fwk[k]; } return res; } in...
ALGO
0.99995
3.498083
ab674314-35b6-4232-aaa5-7ee301be0e22
ialhashim/extend-mesh
TextureSynthesis/Synthesizer.cpp
#include "Synthesizer.h" int BlockSize = 15; int BandSize = 5; int synthesisWidth = 0; int cur_x = 0; int cur_y = 0; namespace Synth { Synthesizer::Synthesizer(int BottomPadding) { this->bottomPadding = BottomPadding; } void Synthesizer::init(const MatrixXf & source, int synthWidth, int blockSize, int bandSize) ...
ALGO
0.963718
4.235105
d034f6ca-1188-4b7a-9306-1fa810ad2533
CoderRaushan/CPP_programs_by_raushan_kumar
Data Structure/string/reverse_half_string.cpp
#include<bits/stdc++.h> using namespace std; int main() { string s; getline(cin,s); int n=s.length(); reverse(s.begin(),s.begin()+n/2); cout<<s; return 0; }
ALGO
0.996143
4.07299
f4768fae-3528-4a66-9337-9e2193800feb
ishandutta2007/codeforces
xlk/normal/1669/F.cpp
#include <bits/stdc++.h> using namespace std; int t, n; int a[200020]; int main() { scanf("%d", &t); for (int tt = 0; tt < t; tt++) { scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &a[i]); } int l = 0, r = n - 1, d = 0, z = 0; while (l <= r) { if (d < 0) { d += a[l++]; } ...
ALGO
0.999704
4.494548
e436376b-fdbb-42c7-abb8-ec5a4d1f3ee8
Tushar1441/Striver_A2Z_DSA
3.1 Array Basic/Longest_Subarray_with_given_Sum_K.cpp
#include <bits/stdc++.h> using namespace std; // Brute force approach --> Generate all the subarrays using three nested for loops int longestSubarray1(vector<int>& arr, int n, int k) { int maxlength = 0; for (int i = 0; i < n; i++) { // starting index for (int j = i; j < n; j++) { // ending index // add all th...
ALGO
0.999908
5.563838
27bd772e-d0b0-4231-a40c-891ec2f53c20
nishgpt/competitive_programming
codechef/practice/PERCAPTA.cpp
/* Author : Nishant Gupta 2.0 */ #include<bits/stdc++.h> using namespace std; #define LL long long int #define getcx getchar_unlocked #define X first #define Y second #define PB push_back #define MP make_pair #define MAX 200005 #define LOG_MAX 20 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFL (LL(1e18)...
ALGO
0.999944
4.005142
77d24c61-209c-47dd-90a1-980fd21b391b
RinCloud/TrickCatcher
Datasets/TrickyBugs/GenProgs/dpp_generated_progs_cpp/p03684/p03684_num8_parsed.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N; cin >> N; vector<pair<int, int>> towns(N); for (int i = 0; i < N; i++) { cin >> towns[i].first >> towns[i].second; } sort(towns.begin(), towns.end()); int minCost = 1e9...
ALGO
0.999885
4.779848
e8b52846-ffc3-4271-b162-98f640af5521
daehee87/fuzzcoin-llvm-wasm
lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
#include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" #include "lldb/Core/ValueObject.h" #include "lldb/Host/HostInfo.h" #include "lldb/Host/StringConvert.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Scalar.h" #include "lldb/Utility/UriParser.h" #include "AdbClien...
TOOL
0.852889
6.406822
ee8dbb0c-95ae-4b3e-b9c8-c5c140d95790
Prathyusha68/Leet-Code-and-GFG
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.999772
6.663537
540091b3-ea81-4388-83f7-1617e404260c
hamx05/DSA-and-LeetCode
data-structures/searching/linearSearch.cpp
#include <iostream> using namespace std; int linearSearch(int arr[], int size, int target) { for (int i=0; i<size; i++) { if (arr[i] == target) { return i; } } return -1; } int main () { int arr[7] = {1, 2, 3, 4, 5, 6, 7}; int n = sizeof(arr)/sizeof(int); int targe...
ALGO
0.999605
5.749832
a8268b40-9350-4015-98e7-72940c2456c8
Gabrri/Algoritmos
Code_Class_Busqueda/selection_sort.cpp
#include <iostream> #include <vector> #include "functions.hpp" using namespace std; void swap(int i, int j, vector<int>& v){ int temp = v[i]; v[i] = v[j]; v[j] = temp; } void selection_sort(vector<int>& v){ for(int i =0; i < int(v.size()-1); i++){ int min_id = i; for(int j = i+1; j < int(v.size()); ++...
ALGO
0.99872
4.56161
d13c3a6b-1826-48ad-8f9c-8d9752f7cfe9
thearpitanand/Data-Structures-and-Algorithms-in-cpp
Linked List/04_Search_in_Linked_List.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; Node(int value) { this->data = value; this->next = NULL; } }; // Finding data in LL bool findData(Node *head, int data) { Node *temp = head; while (temp != NULL) { if (temp-...
ALGO
0.999972
5.192845
997c0cd6-1f8f-4d4c-9126-a64dcb491491
cbjhong/bundler_sfm_modified
src/FisheyeUndistort.cpp
/* FisheyeUndistort.cpp */ #include <string> #include <vector> #include <float.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "defines.h" #include "image.h" #include "matrix.h" #include "resample.h" #include "util.h" #include "LoadJPEG.h" #include "BundleUtil.h" typedef s...
TOOL
0.942198
5.937828
35e33f9e-7aed-45bc-b65e-fe6b9df184f5
Cgfyufsygsm/OI-Codes
Luogu/P2434.cpp
#include <cstdio> #include <cctype> #define ind(x) inline int read() { char c = getchar(); int s = 0, x = 0; while (!isdigit(c)) { if(c == '-') x = 1; c = getchar(); } while (isdigit(c)) s = 10 * s + c - '0', c = getchar(); return x ? -s : s; } inline ...
ALGO
0.999933
3.33556
8eb027c7-0c16-48bc-b4f7-c00512b9cd49
CSprograms/C-Plus-Plus-Code-for-Beginers
05.cpp
#include <iostream> using namespace std; int main() { int ip1=10; //Declaring and Initializing a variable. int ip2{20}; //Value Initialization. int ip3{}; //ip3 is initialized to default value, 0. int ip4(40); //Initializing a variable using parenthesis, Constructor type. int ip5(...
TOOL
0.890663
4.462203
7967b77a-9265-4dfc-8e1e-425cb8aea808
Wainon/KFU
Структуры и алгоритмы обработки данных/Практика 4/1.ж.cpp
#include <iostream> #include <cmath> #include <stdio.h> #include <stdlib.h> #include <time.h> using namespace std; long double fac(int x) { while (x>0) { return x * fac(x - 1); } return 1; } int main() { setlocale(LC_ALL, "Russian"); int x; double e; cout << "Введите х и е: "; ...
ALGO
0.999958
3.493921
366fac3b-81ad-4b1f-a581-53901e3565c7
ashmit0920/DAA-Lab-Assignments
Assignment 1/MaxSubarraySum.cpp
#include <bits/stdc++.h> using namespace std; int max(int a, int b) { return (a > b) ? a : b; } int max(int a, int b, int c) { return max(max(a, b), c); } int maxCrossingSum(int arr[], int l, int m, int h) { int sum = 0; int left_sum = INT_MIN; for (int i = m; i >= l; i--) { sum = sum + arr[i]; ...
ALGO
0.99996
5.364166
4fbada52-6fa3-4a19-a563-2eea374b8926
pradyumn07/LeetCode
2409-number-of-increasing-paths-in-a-grid/2409-number-of-increasing-paths-in-a-grid.cpp
class Solution { public: int m,n; int dp[1001][1001]; const int mod=1e9+7; vector<vector<int>> direc={{-1,0},{0,-1},{0,1},{1,0}}; int solve(vector<vector<int>>& grid,int i,int j){ int result=1; if(dp[i][j]!=-1) return dp[i][j]; for(auto &dir:direc){ int new_i=i+di...
ALGO
0.999994
6.069724
f0eb080e-3e04-4d42-b276-c42ceec0041a
knucklebal1/ACM-Day1
4.cpp
#include <iostream> #include <string> #include <unordered_map> #include <vector> using namespace std; int main() { int N, Q; char c, d; string S; cin >> N; cin >> S; cin >> Q; // 读取所有的操作并存储 vector<pair<char, char>> operations(Q); for (int i = 0; i < Q; i++) { cin >> c >> d; operations[i] = {c, d}; } ...
ALGO
0.999974
4.688835
03f09485-d419-4de8-864c-22e82ca9d6b2
Jengdeuk/Algorithm
Baekjoon/98.Arena/0_Contest/240519/31844.cpp
#include <iostream> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); string S; cin >> S; int R = 0, B = 0, G = 0; for (int i = 0; i < S.size(); ++i) { if (S[i] == '@') { R = i; } else if (S[i] == '#') { B = i; } else if (...
ALGO
0.999426
3.997008
5d4e76fd-b82a-433b-ac50-3d9bf064b0b0
RitikTiwary519/Data-Structure-Algorithms-and-Competitive-Programming
codeforces_practice/B_Deja_Vu.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int t; cin>>t; while (t--) { int n,q; cin>>n>>q; vector<pair<ll,ll>> v(n); for (int i = 0; i < n; i++) { int x; cin>>x; v[i]={x,log2(x)}; } ...
ALGO
0.999381
3.40794
4d1ff45f-4d6c-4898-977f-d69649bf39e0
slllldka/Algorithm_PS
Baekjoon/14002 가장 긴 증가하는 부분 수열 4.cpp
#include <iostream> #include <utility> #define max(a, b) (((a) > (b)) ? (a) : (b)) using namespace std; typedef pair<int, int> i2; int N, arr[1000]; i2 lengthArr[1000]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> N; for (int i = 0; i < N; i++) { cin >> arr[i]; } lengthArr[0] = i2...
ALGO
0.999998
4.187634
57d8dff0-5f49-44d2-b0b2-3e2587fbd1ad
ku-dml/SDsystem
OGDF/src/ogdf/planarlayout/BiconnectedShellingOrder.cpp
#include <ogdf/basic/CombinatorialEmbedding.h> #include <ogdf/basic/FaceArray.h> #include <ogdf/basic/SList.h> #include <ogdf/basic/extended_graph_alg.h> #include <ogdf/basic/simple_graph_alg.h> #include <ogdf/planarlayout/BiconnectedShellingOrder.h> //#define OGDF_BSO_OUTPUT namespace ogdf { // pair of node v and l...
ALGO
0.999804
6.73434
5cd316e1-fb36-4009-9fd6-a888e9402ea4
fernanada-souza1508/Projeto-Food-is-Marketing-
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
a95ddfa6-9ec0-4e5d-95f3-af3daae2fd84
isaaclkh/SchoolStudy
2022/Mobile App/flutter-codelabs/tfrs-flutter/step3/frontend/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.997567
6.797273
0a1df29b-1905-4518-997f-20ab59ad0de7
EliahKagan/old-practice-snapshot
main/search-pattern/search-pattern.cpp
#include <iostream> #include <string> namespace { void print_indices(const std::string& text, const std::string& pattern) { using std::string; using Index = string::size_type; auto found = false; for (Index i {0u}; (i = text.find(pattern, i)) != string::npos; ) { ...
ALGO
0.998009
5.444236
74406e9e-5dea-432b-aebf-a89d23f87879
Sameerjha236/Leetcode
Maximum Meetings in One Room - GFG/maximum-meetings-in-one-room.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: static bool comp(pair<int,pair<int,int>> &a, pair<int,pair<int,int>> &b) { if(a.first<b.first) return 1; return 0...
ALGO
0.999961
5.259365
8f00af28-1c5b-4025-9e91-822d9f8ea88e
Xia0Dou/LeetCode
268_num/main.cpp
#include <iostream> #include <vector> #include<algorithm> using namespace std; class Solution { public: int missingNumber(vector<int>& nums) { sort(nums.begin(),nums.end()); for(int i=0;i<nums.size()-1;++i) if(nums[i]!=nums[i+1]-1) return nums[i]+1; if(nums[num...
ALGO
0.999579
5.451082
d66f6493-48d9-42ee-a016-18a06f3a83a0
5455945/cpp_demo
C++ConcurrencyInAction/Concurrency04.12.cpp
#include "Concurrency04.h" #include <algorithm> #include <list> // 4.3.4 ܳʱĺ // 4.4 ʹòͬ򻯴 // 4.4.1 futureĺʽ // 1 FPĿ namespace { // ˳ʵ template<typename T> std::list<T> sequential_quick_sort(std::list<T> input) { if (input.empty()) { return input; } std::list<...
ALGO
0.999721
5.241889
e531afd7-2145-4438-8db1-c5f63856226b
sumandeka223037/LeetCode
1013-fibonacci-number/1013-fibonacci-number.cpp
class Solution { public: int fib(int n) { if(n<=1){ return n; } else{ return fib(n-1)+fib(n-2); } } };
ALGO
0.999926
5.759202
31767632-4922-48f8-a188-a0d802c5e9d0
ndevelder/amr-wind-channel-les
submods/amrex/Tests/Particles/NeighborParticles/MDParticleContainer.cpp
#include "MDParticleContainer.H" #include "Constants.H" #include "CheckPair.H" using namespace amrex; namespace { void get_position_unit_cell(Real* r, const IntVect& nppc, int i_part) { int nx = nppc[0]; int ny = nppc[1]; int nz = nppc[2]; int ix_part = i_part/(ny * nz); ...
TOOL
0.943023
5.66996
b4525fbd-5517-4308-863e-758826b91433
chauhan0707/Coding
change_case_of_characater.cpp
//Program to change of a character function #include <iostream> using namespace std; char lowerToUpper(char c) { return (c & '_'); } char upperToLower(char c) { return (c | ' '); } main() { char c; cout << "Enter a Character(Lower Case) :"<<endl; cin >> c; cout << "Result : " << lowerToUpper(c); cout << "En...
ALGO
0.978659
4.408744
b3c198a7-b4a4-4d87-a545-09b4431c92fb
SyncfusionExamples/difference_between_two_dates_flutter_charts
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
4544bc56-f47b-496c-8c7d-4736868736d6
asdfgsfe/nowcder_offer_Algorithm
p_offer_17判断树的子结构.cpp
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class Solution { public: bool doTreeHaveTree2(TreeNode *pRoot1, TreeNode *pRoot2) { if(pRoot2==NULL ) return true; if(pRoot1==NULL) ...
ALGO
0.999972
5.294636
fec19d27-61d3-4b13-a259-b00ee256fb9b
BITRY/PRUX-Wallet_OLD
src/qt/guiutil.cpp
#include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include "base58.h" #include <QString> #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For ...
TOOL
0.93052
7.079134
8b5157bf-5864-421b-8e93-f4f21d739e65
Issac-Kondreddy/cpp
operators.cpp
#include <iostream> using namespace std; int main() { // Arithmetic Operators int a = 10, b = 20; cout << "Addition of a and b is " << a + b << endl; cout << "Subtraction of a and b is " << a - b << endl; cout << "Multiplication of a and b is " << a * b << endl; cout << "Division of a and b is ...
TOOL
0.881532
3.518652
f13a6a30-3ace-4a0a-b8d2-d8cab1ab5a2a
ishandutta2007/codeforces
aqt/normal/679/C.cpp
#include <bits/stdc++.h> using namespace std; int N, K; int grid[505][505]; int fre[300000]; int sz[300000], cnt = 0; int m[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}}; void dfs(int x, int y){ grid[x][y] = cnt; sz[cnt]++; for(int k = 0; k<4; k++){ if(grid[x+m[k][0]][y+m[k][1]] == 0){ d...
ALGO
0.999927
4.098289
262d6316-87bf-4f0a-a71f-ff1ab79aaff7
actium/codeforces
2000/90/2090a.cpp
#include <iostream> void answer(bool v) { constexpr const char* s[2] = { "NO", "YES" }; std::cout << s[v] << '\n'; } void solve(unsigned x, unsigned y, unsigned a) { answer(x <= a % (x + y)); } void test_case() { unsigned x, y, a; std::cin >> x >> y >> a; solve(x, y, a); } int main() { ...
ALGO
0.999204
4.822767
ec7f403e-3291-4061-bee6-ed39bb8da6ea
jugshaurya/flutter_app_fn
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