uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
7dedd340-bca8-4028-8211-264ccb2f20a5
SoumyadipOjha/LeetCode_Problems
162-find-peak-element/find-peak-element.cpp
class Solution { public: int findPeakElement(vector<int>& nums) { int max = INT_MIN; int idx = 0; for (int i = 0; i < nums.size(); i++) { if (max < nums[i]) { max = nums[i]; idx = i; } } return idx; } };
ALGO
0.999771
5.672599
573a34d8-c809-46f4-abf2-1fdd7e95dfad
sarvex/leetcode-holy-c
solution/1100-1199/1134.Armstrong Number/Solution.cpp
class Solution { public: bool isArmstrong(int n) { int k = to_string(n).size(); int s = 0; for (int x = n; x; x /= 10) { s += pow(x % 10, k); } return s == n; } };
ALGO
0.999706
6.316676
e44c821a-eca0-4886-b15c-314edff8d61f
yeeevip/yeee-momoo
learn-example/algorithm/coding/TwoPointersExample/problem-3.cpp
/* *快速排序 qsort [2*] * * 题目描述 输入n个整数,用快速排序的方法进行排序 Input 第一行数字n 代表接下来有n个整数 接下来n行,每行一个整数 Output Output 升序输出排序结果 每行一个数据 Sample Input 5 12 18 14 13 16 Sample Output 12 13 14 16 18 Hint n<=5000 每个数据<=5000 * * * * * * */
ALGO
0.996599
4.694244
9d1caafe-3da4-4833-a105-05beb81c3bc8
Bps9970/000
Cuda.cpp
/****************************************************************************** * Simple example of DeviceReduce::Sum(). * * Sums an array of int keys. * * To compile using the command line: * nvcc -arch=sm_XX example_device_reduce.cu -I../.. -lcudart -O3 * ********************************************...
ALGO
0.999029
5.367124
4e8d7f05-d38c-4f6a-a865-3f6389fb38fa
kyt9613/ALGORITHM_CLASS
3주차 실습(힙과힙정렬(1))_1.cpp
#include <stdio.h> #define swap(x,y) do{int t=x; x=y; y=t;}while(0) int n; int H[100]; void insertItem(int key); int removeMax(); void upHeap(int idx); void downHeap(int idx); void printHeap(); int main() { char op; int key; while ( (op = getchar()) != 'q') { switch (op) { case 'i' : scanf("%d",&key); ...
ALGO
0.998763
3.511663
4b890eb9-aec6-4a79-884a-ef4ba8bbae2b
ALK416/LeetCode
题解/两数之和/两数之和_Vector封装版_暴力.cpp
/* - Ŀ ֮ - Դ LeetCode - 漰֪ʶ - Ѷۺصһ */ #include<iostream> #include<stdio.h> #include<math.h> #include<stdlib.h> #include<time.h> #include<algorithm> #include<iostream> #include<queue> #include<stack> #include<vector> #include<string> using namespace std; vector<int> solution(vector<int> ...
ALGO
0.999991
4.53931
dd2e0968-5c7b-4596-bb82-0d705cbd52ec
liuqun/cpp_lessons
ch-8/ch8-lesson2/ch8-lesson2.cpp
#include <iostream> using namespace std; const double pi = 3.14; class Shape{ public: Shape(){} ~Shape(){} virtual double getArea() = 0; virtual double getPerim() = 0; }; class Circle: public Shape{ public: Circle(double rad):radius(rad){} ~Circle(){} /*补充这两个函数*/ double getArea() over...
ALGO
0.9754
4.497189
abe2d8e8-7a7a-4831-93aa-3221fe3c10a4
ExpertOfNil/rerun_cpp_mve
src/utils.cpp
#include "utils.hpp" #include <fstream> #include <sstream> void help() { printf( "Usage: measure [OPTIONS]\n" " -h, --help Show help text\n" " --enable_rerun {true, false}. Default is true.\n" " --viewer_addr IP:PORT for rerun viewer. Default is " "127.0.0....
TOOL
0.982149
5.838142
c6231492-23b6-4cd1-a416-333f9ab2dd2e
vedanty3/dsa-codeground
leetcode-gfg-solutions/leetcode-solutions/Insert into a Binary Search Tree.cpp
/* * https://leetcode.com/problems/insert-into-a-binary-search-tree/ * 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) {} ...
ALGO
0.999887
6.398707
63c45441-4daf-454e-a3a8-246c699cfe80
Octobug/notes
algorithms_and_data_structures/leetcode/tree/m_00429_n-ary_tree_level_order_traversal/main.cpp
#include <iostream> #include <queue> #include <vector> #include "array.h" using namespace std; class Node { public: int val; vector<Node *> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node *> _children) { val = _val; children = _c...
ALGO
0.999943
5.423481
b1116241-0db5-43e0-a7b2-23e413b521fd
marioyc/Online-Judge-Solutions
TJU/1153 - Word Reversal.cpp
#include <string> #include <algorithm> #include <sstream> #include <iostream> #define all(v) (v).begin(), (v).end() using namespace std; int main(){ freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); string s; getline(cin,s); string x; while(getline(cin,s)){ istrings...
ALGO
0.999806
4.087401
83f130c8-5751-4c7e-b80f-841427a23a0f
amangupta71/LinkedList
ques.cpp
#include<iostream> using namespace std; //new data type with value and adress class Node{ public: int val; Node * next; Node(int val){ this->val = val; this->next = NULL; } }; void display(Node* head){ Node* temp = head; while(temp!=NULL){ cout<<temp->val<<" "; temp ...
ALGO
0.999407
3.83754
84efcf0f-c92e-4771-9c93-47e50be1a1d8
IIIIIIIIIU/onlysky
2818.cpp
#include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> typedef long long ll; const int maxn=1e7+5; int n,prime[maxn],tot; bool vis[maxn]; ll ans,phi[maxn]; void getphi(int lit) { phi[1]=1; for(int i=2,v;i<=lit;i++) { if(!vis[i]) { prime[++tot]=i; phi[i]=i-1; } fo...
ALGO
0.999894
4.014967
01f2b6b1-a941-466a-be5d-dbf39cfdac5d
jane-j/GEM5_ECE56500_FALL23
src/systemc/tests/systemc/misc/user_guide/chpt4.2/stage2.cpp
/***************************************************************************** stage2.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /*****************************************************************************...
ALGO
0.997433
5.049311
06603999-33c4-4dfa-b360-555778f35c4a
ishandutta2007/codeforces
chasedeath/normal/1119/A.cpp
#include<cstdio> #include<cstring> #include<algorithm> #include<iostream> using namespace std; typedef long long ll; const int N=3e5+10,base=1e4; int n,m; int a[N]; int L[N],R[N],c[N],cnt; int main() { scanf("%d",&n); for(int i=1;i<=n;i++){ scanf("%d",&a[i]); if(i==1||a[i]!=a[i-1]){ R[cnt]=i-1; L[++cnt]=i,c...
ALGO
0.999884
3.712104
6812f5ae-3136-4f6e-a200-9a1be6aaee83
forg002-ctrl/semester_7
SI/DSA/main.cpp
#include <iostream> #include <random> #include <cmath> #include <vector> // DSA parameters (should be generated securely) // const uint64_t p = 982451653; // A prime number // const uint64_t q = 982449707; // A prime number (q | (p-1)) // const uint64_t g = 456789123; // A generator // A function to check if a num...
ALGO
0.998849
7.011879
d38d11bb-05af-4375-80e6-dd00bc682f90
feelpp/debian-gmsh
Geo/GEdgeLoop.cpp
#include <algorithm> #include <functional> #include "GEdgeLoop.h" #include "GmshMessage.h" void GEdgeSigned::print() const { Msg::Info("GEdgeSigned : Edge %d sign %d Ordered Vertices %d,%d", ge->tag(), _sign, getBeginVertex()->tag(), getEndVertex()->tag()); } int countInList(std::list<GEdge*> &wire, GEd...
ALGO
0.98251
4.077981
6ca6176d-94e1-46c3-bd83-28edd24e5e38
huynhtrung03/flutter
Magic_8ball/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.998569
6.76775
5a187cee-a218-4676-acb9-c35bbfc6f505
Aryan-Naveen/ContinuumRobotKinematics
include/continuum_robot/eigen/bench/sparse_trisolver.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL // -I /home/gael/Coding/LinearAlgebra/CSparse/...
ALGO
0.998242
4.874496
f72e7ff3-eac6-4ea9-a24f-01538e807c31
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_12351_21.cpp
#include <bits/stdc++.h> #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") using namespace std; long long power(long long a, long long b, long long md) { return (!b ? 1 : (b & 1 ? a * power(a * a % md, b / 2, md) % md : power(a * a % md, b / 2, md) % md)); } ...
ALGO
0.999979
4.127727
9836b00a-56ae-4ac4-a002-9a2f5d50e31e
Kripesh88/OOP
Lab/OverloadingUsingFriend.cpp
#include<iostream> #include<conio.h> using namespace std; class distances{ private: int feet, inch; public: distances(){ } distances(int f, int i){ feet=f; inch=i; } friend distances operator +(distances, distances); void getData(){ cout<<"Feets="<<feet<<endl<<"Inches="<<inch<<endl; } }; distances operator +(distances ...
TOOL
0.959569
3.541638
e8361996-0d62-4867-88fe-3620dc6eb7d9
ishandutta2007/codeforces
y25t/normal/1515/C.cpp
#include<cstdio> #include<algorithm> #define pii std::pair<int,int> #define fir first #define sec second #define inf 0x3f3f3f3f #define N 100005 int T; int n,m,x; pii a[N]; int b[N]; int p[N],ans[N]; int main(){ scanf("%d",&T); while(T--){ scanf("%d%d%d",&n,&m,&x); for(int i=1;i<=m;i++) b[i]=0; for(int...
ALGO
0.999968
3.38386
45f9b271-baba-4e53-aba2-46ca6ff13fc8
tajul-islam-refath/code-library-algo-ds
primeFactorisation.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> primesFactor; for(int i=2; i*i<=n; ++i){ while(n%i == 0){ primesFactor.push_back(i); n /= i; } } if(n > 1){ primesFactor.push_back(n); } for(auto val...
ALGO
0.999958
4.638064
3201bded-f818-46d3-9502-2ebe9ea8e413
Asfia-oishy/Basic-DSA
Dynamic Programming/Coin_change_TotalWays.cpp
#include <bits/stdc++.h> using namespace std; //here 1st row is filled with 0 int main() { vector<int> coins = {2, 3, 5, 10}; // Coin denominations int change = 15; // Total amount of change needed // 2D vector to store results, initialized to 0 vector<vector<int>> a(coins.size() + ...
ALGO
0.999955
5.998744
23a5ba94-63b4-47c8-ba41-664697df382d
Prajjwal-5432/Leetcode-Solutions
DP/Hard/54.Maximum Students Taking Exam.cpp
//Link: https://leetcode.com/problems/maximum-students-taking-exam/ class Solution { public: bool canPlace(int prev, int cur, vector<char> &v) { bool flag = 1; for(int i = 0; i < v.size(); ++i) { int lefbit = i - 1; int rigbit = i + 1; if(cur >> i & 1) { ...
ALGO
0.999982
5.878986
1d8be0d5-17bc-44d0-92e8-ac88086e59b0
ajaysoni12/Striver_AtoZ_DSA_Sheet
Step5 - Recursion & Backtracking/009-mergeSort.cpp
#include <bits/stdc++.h> using namespace std; void merge(vector<int> &arr, int low, int mid, int high) { vector<int> temp; int left = low; // [low...mid] int right = mid + 1; // [right...high] // merge two sorted array while (left <= mid && right <= high) { if (arr[left] <= arr[ri...
ALGO
0.999937
5.199622
cdc953c4-c4bd-4abb-97a7-9f2c5fbdddef
jonosquire/athena-cgl
src/pgen/gr_mhd_inflow.cpp
// C++ headers #include <cmath> // cos, sin, sqrt #include <fstream> // ifstream #include <iostream> // endl #include <sstream> // stringstream #include <stdexcept> // runtime_error #include <string> // string, c_str() // Athena++ headers #include "../mesh/mesh.hpp" #include "../athena.hpp" ...
ALGO
0.997737
5.386022
9bebf153-cab7-4d26-91dd-6fa4f21d7042
sonnt174/ORgb
libs/CImg-2.2.2/examples/use_cimgmatlab.cpp
#include <mex.h> #define cimg_plugin "plugins/cimgmatlab.h" #include <CImg.h> void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { if (nrhs < 2) mexErrMsgTxt("No enough input arguments."); if (nrhs > 4) mexErrMsgTxt("Too many input arguments."); cimg_library::CImg<> u(prhs[0],true); i...
TOOL
0.888911
5.664357
89ca8344-62fe-4280-9e86-a55423bed83f
brycewagner11/Lab-1-Wagner
Lab 1 Wagner/Laboratory.cpp
/* * Program: <Lab1Wagner> * Author: <Bryce Wagner> * Date:<1/23/2024> * */ #include <iostream> #include <string> using namespace std; int main(void) { float width; float length; float area; length = 4.5; width = 3.35; area = length * width; cout << "Rectangle Area = " << area << "\n"; cout << "Who's on Fi...
TOOL
0.993877
3.827431
5cffa69b-0980-4453-93b6-ed322f6102a1
Saber7X/DaiMaDaQuan
F - Lunar New Year and a Wander.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1e5 + 10; vector<int> g[N]; bool st[N]; void bfs() { priority_queue<int, vector<int>, greater<int> > q; int a; q.push(1); while(!q.empty()) { a = q.top(); q.pop(); if(!st[a]) { cout << a << " "; st[a] = true; for(int i = 0; i < g[a].size(...
ALGO
0.999992
4.201975
4009b3f5-1bfa-4927-ba1d-c7d055ca47d2
Coderkreet/DSA-With-Javaa
Qustion/DuplicateNumber.cpp
#include <bits/stdc++.h> using namespace ::std; void GetUniqueElement(int arr[] , int n){ // for (int i = 0; i < n; i++) // { // for (int j = i+1; j < n; j++) // { // if (arr[i] == arr[j]) // { // int actual = i+1; // cout<<actual<<endl; // } // } // } // map<int , int>hash; // for (int i = 0;...
ALGO
0.999699
3.898352
4e56d8c8-faf9-432d-b0bd-fb9caabb5ee8
5pilow/project-euler-cpp
src/Problem 46/main.cpp
#include <iostream> #include <math.h> #include <string> #include <sstream> #include <iostream> #include <gmp.h> #include <vector> #include <algorithm> #include <string.h> #include <bitset> #include <climits> using namespace std; bool isPrime(long long int n) { long long int root = sqrt(n); if (n == 2) return true...
ALGO
0.986337
4.090425
00317d90-c9b4-497e-867c-218a2d28f8a6
haiphamht2199/project_1
Tuần4-5/Bai11/Bai11.cpp
#include<iostream> #include<string> using namespace std; void TachTen(string s,string &str){ int i=0; int vt=0; while(s[i]!='\0'){ i++; if(s[i]==' '){ vt=i; } } while(s[vt]!='\0'){ if(s[vt]!=' '){ str.push_back(s[vt]); } vt++; } } int main(){ int n; int dem=0; string str; ci...
ALGO
0.99512
3.539521
4c0cd2cd-da43-4b72-a794-1b4918906c16
vbonnici/grafe-sim
analysis/data/p02271/s215448299.cpp
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<string> #include<set> #include<map> using namespace std; int main() { const int SIZE = 2001; bool dp[SIZE] = { false }; int n; int m; int ary[20]; vector<int> vec; cin >> n; for (int i = 0; i < n; i++) { cin >> ary[i]; } ...
ALGO
0.999977
4.70959
fcea2454-0a45-429e-baae-e82a84918b0c
DT-CPP/cpp-marlin
Marlin/src/feature/bedlevel/abl/bbl.cpp
#include "../../../inc/MarlinConfig.h" #if ENABLED(AUTO_BED_LEVELING_BILINEAR) #include "../bedlevel.h" #include "../../../module/motion.h" #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../../../core/debug_out.h" #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" #endif LevelingBili...
ALGO
0.98375
6.170385
c84d71e3-050a-4662-b113-6b6341b74b93
swalisoft/icpc
amusement_park.cpp
#include <iostream> #include <cstdio> using std::cin; using std::cout; int main() { std::ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int rides, count = 0, num, height; int allowed = 0; cin >> rides >> height; while (count < rides && cin >> num) { if(height >= num) { allowed++; } ...
ALGO
0.999837
4.22607
50cc981f-2e07-49e9-831e-03b9226e6bcc
Lchuxian/SLAM-Environment
OpenCV3_and_OpenCV4_coexist/opencv-3.4.6-build/modules/imgproc/src/bilateral_filter.dispatch.cpp
#include "precomp.hpp" #include <vector> #include "opencv2/core/hal/intrin.hpp" #include "opencl_kernels_imgproc.hpp" #include "bilateral_filter.simd.hpp" #include "bilateral_filter.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX2,...,BASELINE based on CMakeLists.txt content /***********************...
ALGO
0.99079
5.880822
73a08703-0641-47e3-8ac7-8b4889972e91
stefannastasa/ConvolutionAlgorithms
lab3/main.cpp
#include <iostream> #include <fstream> #include <mpi.h> #include <cstring> #include <chrono> using namespace std; int main(int argc, char** argv) { chrono::time_point<chrono::high_resolution_clock> start_timer; chrono::time_point<chrono::high_resolution_clock> end_timer; int myid, defined_procs, numprocs...
ALGO
0.997645
3.416477
a0f3b282-6d0e-458b-bfe7-f9bd8fbf6acc
Panics/Colosseum_Eigen
doc/examples/TemplateKeyword_flexible.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; template <typename Derived1, typename Derived2> void copyUpperTriangularPart(MatrixBase<Derived1>& dst, const MatrixBase<Derived2>& src) { /* Note the 'template' keywords in the following line! */ dst.template triangularView<Upper>() = src.template...
TOOL
0.995212
5.804369
5314adb5-e58a-480b-8342-4ae3b98339f3
mwalczyk/Watercolors-for-Yosuke
src/lineRenderer.cpp
#include "lineRenderer.h" LineRenderer::LineRenderer() { } void LineRenderer::setup() { calculateJointCentroid(); calculateAreaMinMax(); m_brush.loadImage("brush.png"); } void LineRenderer::update() { for (auto &lf: m_lineFollowers) lf.update(); } bool LineRenderer::isEmpty() { return m_lin...
TOOL
0.889024
4.519282
b62d10ee-0c6a-4f32-832e-bf9b0208efb8
miki-hermann/gyt
src/gyt-2d-gmp.cpp
// Compile with 'g++ -O4 -o young2d-gmp young2d-gmp.cpp -lgmpxx -lgmp' #include <iostream> #include <vector> #include <gmpxx.h> #include "gyt-common-gmp.hpp" using namespace std; const string header = "Young Tableaux 2D Multiprecision"; const string underline = "================================"; ///////////////...
ALGO
0.999511
4.569318
f06204cd-8e8c-4ec1-854a-5d04c68eb4de
LEETESH42/Leetcode
0074-search-a-2d-matrix/0074-search-a-2d-matrix.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int n=matrix.size(); int m=matrix[0].size(); int i=0,j=m-1; while(i<n && j>=0){ if(matrix[i][j]>target){ j--; } else if(matrix[i][j]<target){ ...
ALGO
0.999989
6.261898
1b69fb43-d04c-44d1-9d64-6ea2085c181d
Saleh7127/CPP-solution-by-Fellow_junior
UVA Judge/uva12086.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define test int t; cin>>t; for(int cs=1;cs<=t;cs++) ll a[200005]; ll tree[800005]; void treeconstruct(ll node,ll b,ll e) { if(b==e) { tree[node]=a[b]; return; } ll left = node*2; ll right = node*2 + 1ll; ll m...
ALGO
0.999313
3.863015
eb9fbdf7-4268-4358-af1c-5f96e4f3ad0e
bishweashwarsukla/hactoberfest2022
CPP Problems/PaintersPartition.cpp
#include <iostream> using namespace std; bool isPossible(int arr[], int n, int k, int mid) { int count = 1, distance = 0; for(int i=0; i<n; i++) { if(distance + arr[i] <= mid) { distance += arr[i]; } else { count++; if(count > k || arr[i] > mid) { ...
ALGO
0.999974
5.36133
9f659b0c-cf0e-40fc-8a06-62383b724961
yino482460/AtCoder
ABC/ABC031/ABC031_B.cpp
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { /* 入力 */ int Low, High, Week; cin >> Low>> High; cin >> Week; int time[Week]; for (size_t i = 0; i < Week; i++) { cin >> time[i]; } /* 判定 */ for (size_t i = 0; i < Week; i++) { if (time[i] < Low) { ...
ALGO
0.999957
3.83112
61a63917-b413-491d-94b3-9d841fecf178
laptrinhvui000/UIT-ICPC-CS97SI
String Algorithms/1936.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s, t; while (cin >> s >> t) { int n = s.size(), m = t.size(), i = 0, j = 0; for(; i < n && j < m; ++j) if (s...
ALGO
0.999969
5.016598
f4628d1c-1543-4f8c-a19c-814ff7231625
Sookmyung-Algos/2021algos
algos_assignment/2nd_grade/정영주_yeongjujeong1021/summer_1st_week/2468.cpp
// 2468.cpp (S1) #include <iostream> #include <vector> #include <queue> #include <cstring> using namespace std; int dx[4] = { -1, 1, 0, 0 }; int dy[4] = { 0, 0, -1, 1 }; int n; int arr[101][101], visit[101][101]; queue<pair<int, int>> q; void bfs(int i, int j, int h) { q.push({ i, j }); visit[i][j] = 1; pair<i...
ALGO
0.999864
4.501462
928177ea-42a4-48b6-8c1a-165c7b7cff9f
Pratham754/leetcode
2415-count-the-number-of-ideal-arrays/count-the-number-of-ideal-arrays.cpp
const int mod = 1e9 + 7; int factMemo[100000] = {}; int dp[100000][15]; using ll = long long; class Solution { public: ll power(ll a, ll b, ll m = mod) {ll res = 1;while (b > 0) {if (b & 1)res = (res * a) % m;a = (a * a) % m;b = b >> 1;}return res;} ll fact(ll n) { if (n == 0) return 1; if (factMemo...
ALGO
0.999961
5.410105
c2aaf7a5-8322-4f1d-8b65-d612438c5d56
ishandutta2007/codeforces
tzc_wk/normal/48/D.cpp
#include <bits/stdc++.h> #include <vector> using namespace std; const int MAXN=1e5+100; int n,num[MAXN],x[MAXN]; int max_num=0; vector<int> pos[MAXN]; int main(){ cin>>n; for(int i=0;i<n;i++){ cin>>x[i]; num[x[i]]++; max_num=max(max_num,x[i]); pos[x[i]].push_back(i); } int cur=0; while(num[1]!=0){ int i=...
ALGO
0.999976
3.884769
47ccbc03-5b28-4f6d-8b64-594ac179d380
joshuacroix/Programming_Exercises
HW1-1.cpp
#include <iostream> #include <vector> using namespace std; /*1. (10 points) Use the STL class vector to write a C++ function that takes two vectors, a and b, of the same size and returns a vector c such that c[i] = a[i] · b[i]. How many scalar multiplications are used to create elements of the vector c of size n? Pro...
ALGO
0.993422
4.371779
c70bc2ba-0d9d-4d45-a50b-0901b86e30dd
huangallen2008/cppcode
code/AAhomework/Level4/cf1555B.cpp
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") #define int long long #define REP(i,n) for(int i=0;i<n;i++) #define REP1(i,n) for(int i=1;i<=n;i++) #define RREP(i,n) for(int i=(n)-1;i>=0;i--) #define f first #define s second #define pb push_back #define ALL(x) x.begin(),x.end() #define SZ(x) (in...
ALGO
0.999603
3.699608
80e8697d-3c17-48bc-ab9e-3799081063e9
ymolliks/LeetCode-Solutions
916-word-subsets/916-word-subsets.cpp
class Solution { public: vector<string> wordSubsets(vector<string>& words1, vector<string>& words2) { int cnt_b[26] = {}; for(string &w: words2){ int c[26] = {}; for(char ch: w) c[ch - 'a']++; for(int i = 0; i < 26; i++) cnt_b[i] = ...
ALGO
0.999834
5.798977
31fb6d4f-2ed1-46d2-bab5-f293fbd30a91
Yogeshk4124/HacktoberFest-Data-Structure-and-algorithm
Competitive Programming/LeetCode/1047. Remove All Adjacent Duplicates In String.cpp
#include<iostream> #include<stack> #include<string> #include<algorithm> using namespace std; stack<char>st; // stack<char>s2; string removeDuplicates(string S) { int len=S.length(); for(auto i:S) { if(st.empty()) st.push(i); else ...
ALGO
0.999944
5.448129
f9d1cd15-f48a-4779-9598-b11c02e93f7a
kbnh101/senier_projet
Dijkstra/src/dijkstra_node.cpp
#include "dijkstra.h" int main(int argc, char * argv[]) { ros::init(argc, argv, "dijkstra"); dijkstra path; ifstream file_edge("/home/a/test_ws/src/Dijkstra/path/edge.csv"); ifstream file_node("/home/a/test_ws/src/Dijkstra/path/node.csv"); path.node_parse(file_node); path.edge_parse(file_edge...
ALGO
0.949568
3.659665
0e454144-d0e7-41d8-a83f-e206d0a46e4d
99-wood/OIcode
AtCoder/AT_dp_v Subtree.cpp
#include<iostream> #include<cstdio> #include<cmath> #include<string> #include<cstring> #include<algorithm> #include<stack> #include<vector> #include<queue> #include<map> #include<bitset> #define rep(i,a,b) for(int i=a;i<=(b);++i) #define frep(i,a,b) for(int i=a;i<(b);++i) #define drep(i,a,b) for(int i=a;i>=(b);--i) #d...
ALGO
0.999963
3.728269
e8f2f304-ce24-45b7-9a9f-531f68a77923
yaikobzeray/Brana_app
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
a31d8832-c62e-4890-89de-a91e2ccf7591
tuanloc-vocong/competitive_programming
cplusplus/000045_dr_phil_goes_to_the_ranch.cpp
// Title: Dr Phil goes to the ranch // Source: Codechef // Difficulty: // Time Complexity: // Topic: Stack & Queue /** * Dr. Phil has put you in charge of his new hospital while he is chilling at the ranch. N people have booked appointment with * the Doctor today numbered from 1 to N such that person X booked appoin...
ALGO
0.999993
5.917739
01aefac4-4231-4a6b-8c06-ccdcd65b38d9
naymur92/CompetitiveProgramming_or_DSA_CPP
codeforces/800_2125A.Difficult_Contest.cpp
/* https://codeforces.com/problemset/problem/2125/A */ #include <bits/stdc++.h> using namespace std; void solve() { string s; cin >> s; sort(s.rbegin(), s.rend()); cout << s << "\n"; } int main() { int t; cin >> t; while (t--) { solve(); } } /* 5 FFT ABFBANTTA FFTNTT FFTFFTFFTNNTNNT AFFTBFFNTTFTTZ */...
ALGO
0.99956
4.97256
155bcb63-6e27-48c4-8922-570dc45b3f60
wtomtom/projetoh
src/chain.cpp
#include "chain.h" using namespace std; /** * CChain implementation */ void CChain::SetTip(CBlockIndex* pindex) { if (pindex == NULL) { vChain.clear(); return; } vChain.resize(pindex->nHeight + 1); while (pindex && vChain[pindex->nHeight] != pindex) { vChain[pindex->nHeight] ...
ALGO
0.997457
5.512638
78a18cf3-7472-4947-b96d-6548882e8104
matsumoto2004/competitive_programming
archive/archive_other/puzzle/c.cpp
#include<bits/stdc++.h> #include<cassert> //#include<ext/pb_ds/assoc_container.hpp> //#include<ext/pb_ds/tree_policy.hpp> //#include<ext/pb_ds/tag_and_trait.hpp> #define overload4(_1, _2, _3, _4, name, ...) name #define rep1(i, n) for (ll i = 0; i < ll(n); ++i) #define rep2(i, s, n) for (ll i = ll(s); i < ll(n); ++i) #...
ALGO
0.999558
4.053084
c26ceea5-1459-49f9-b8d0-0f35c5df4f2f
RiyaadHossain/XPSC-Practice
Phitron Practice/week 18/Day 6/C_Circular_Local_MiniMax.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; // Utilities #define endl '\n' #define int long long ...
ALGO
0.999912
4.825314
430c98eb-1b47-4d80-b877-6fb1a868a600
jinhan814/solutions
ICPC/KOREA/korea21_e.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; auto f = [](i64 a, i64 b) { // \sum_{i = 1}^{a}{\min(a, b - i)} i64 ret = a * a; if (b - a < a) ret -= (2 * a - b) * (2 * a - b + 1) / 2; return ret; }; auto sol = [](i64 a, i64 b, i64 c) { if (a > b) swap(a, b); if (a > c) swap(a, c); if (b ...
ALGO
0.999881
4.829907
bd7b3925-859c-4a7a-853e-35e1de7fc7a9
VoCongLinh/VoCongLinh_monC
Chapter 04/Program Challenges/Challenges_14.cpp
// chương trình tính phí dịch vụ ngân hàng mổi tháng #include <iostream> using namespace std; int main() { double soDuBanDau, phiDichVu = 10.0; int soLuongCheque; // Yeu cau nguoi dung nhap so du ban dau cout << "Nhap so du ban dau: $"; cin >> soDuBanDau; // Kiem tra du lieu dau vao: Kiem tra...
TOOL
0.969072
4.21604
643f2115-a13f-497f-8e71-5966e645ebab
VajraAOSP/frameworks_av
media/libstagefright/codecs/m4v_h263/enc/src/sad_halfpel.cpp
/* contains Int HalfPel1_SAD_MB(UChar *ref,UChar *blk,Int dmin,Int width,Int ih,Int jh) Int HalfPel2_SAD_MB(UChar *ref,UChar *blk,Int dmin,Int width) Int HalfPel1_SAD_Blk(UChar *ref,UChar *blk,Int dmin,Int width,Int ih,Int jh) Int HalfPel2_SAD_Blk(UChar *ref,UChar *blk,Int dmin,Int width) Int SAD_MB_HalfPel_C(UChar *r...
ALGO
0.999688
4.611544
8f9568f1-939f-4355-aa29-0a2666ffe7c8
Vinay-Rastogi/CrackYourPlacement
Day6/Smallest_Positive_Missing.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; class Solution { public: // Function to find the smallest positive number missing from the array. int missingNumber(int arr[], int n) { sort(arr, arr + n); if (arr[0] > 0 && arr[0] != 1) return 1; for ...
ALGO
0.999872
4.446661
1b2b6fd9-8091-455f-bd63-1c65f41b9cea
sarvex/leetcode-mini-kanren
lcof/面试题56 - I. 数组中数字出现的次数/Solution.cpp
class Solution { public: vector<int> singleNumbers(vector<int>& nums) { int xs = 0; for (int& x : nums) { xs ^= x; } int lb = xs & -xs; int a = 0; for (int& x : nums) { if (x & lb) { a ^= x; } } int b...
ALGO
0.999865
5.455013
6f12d7f6-0e41-41c7-8b60-c986f250605e
Oppeazzy/30-days-of-code
Day20_sorting/day_twenty.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } int totalSwaps = 0; for (int i = 0; i < n; i++) { int numberOfSwaps = 0; for (int j = 0; j < n - 1; j++) { ...
ALGO
0.999955
4.950632
1bf7057a-e00e-4ee6-8183-53a1409bafe4
NisargPipaliya/leetcode
110_same_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.999987
6.027628
bdb9ad8f-77b6-4a77-9fa7-d2ce31287b07
swapnilsparsh/100DaysOfCode
Day09/SelectionSort.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"Enter the size of array: "; cin>>n; int array[n]; cout<<"Enter the elements of array: "; for(int i=0; i<n; i++){ cin>>array[i]; } for(int i=0; i<n-1; i++){ for(int j=i+1; j<n; j++){ if(array[i]>array[j]){ int temp...
ALGO
0.999962
3.584524
7dd4989d-4269-4590-afbc-da3d65444580
bhanu-100/DSA
linklist11.cpp
#include<iostream> using namespace std; class node { public: int data; node* next; }; int main() { node *head=NULL; node *second=NULL; node *third=NULL; head= new node; second=new node; third=new node; head->data=1; head->next=second; second->data=2; second->next=...
ALGO
0.997833
3.189949
1ab43ae7-f361-4cf4-94b3-f3e260659abb
MihaiAnghelin/CPP
Clasa a 11-a/#Scoala/Problema tricolorului/Problema tricolorului/Tricolor.cpp
// Programm care rezolva problema tricolorului /* * Se citesc n culori; * Sa se alcatuiasca toate steagurile tricolore posibile astfel incat in mijloc sa se afle doar una din ultimele doua culori citite. * Se va afisa pe friecare rand: "nr. drapelului: culoare1, culoare 2, culoare3". */ #include <iostream>...
ALGO
0.999476
5.248085
6ac41e87-ad70-419b-8e1b-748aa3c58d83
YenVu02/CTDL-GT
Tap_con_bang_nhau.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { // ios::sync_with_stdio(0); // cin.tie(0); cout.tie(0); int t; cin >> t;; while(t--) { int a[105],n, s = 0; cin >> n; for(int i = 0; i < n;i++ ) { cin >> a[i]; s+=a[i]; } if(s%2==1) { cout << "NO\n"; } else ...
ALGO
0.999739
4.166558
9c02d295-2c9d-4da9-baa5-ed2558c95091
GuiZ88/dilbert-cascade-classifier
opencv-3.4.19/modules/dnn/src/ocl4dnn/src/ocl4dnn_conv_spatial.cpp
#include "../../precomp.hpp" #include <opencv2/core/utils/configuration.private.hpp> #include <string> #include <vector> #include <fstream> #include <sys/stat.h> #include "../include/common.hpp" #include "../include/ocl4dnn.hpp" #include "opencl_kernels_dnn.hpp" #include "../include/math_functions.hpp" #include "../i...
TOOL
0.901351
5.68218
1130ecf2-bd83-4fd3-a6fa-112bc6f8cd87
MoiraVH/memoramaa
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
97349897-0364-4c56-b989-5a10e3dca29f
M680x0/M680x0-mono-repo
llvm/lib/CodeGen/LiveIntervals.cpp
#include "llvm/CodeGen/LiveIntervals.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/iterator_range.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/CodeGen/LiveInterval.h" #include "llvm/CodeGen/...
TOOL
0.986563
7.129862
92a01cde-2922-48fa-b358-94f4dfb30909
WuzzyLV/Cpp-SchoolTasks
easy/Reverse string/solution.cpp
class Solution { public: void reverseString(vector<char>& s) { reverse(s.begin(), s.end()); } };
ALGO
0.995736
5.487704
69786e4c-6fad-4d9a-a516-d7063889cdc1
ellynhan/challenge100-codingtest-study
splanky0314/DFS/13023_ABCDE.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; using ll = long long; bool flag = false; bool v[2000]; vector<int> g[2000]; void dfs(int x, int cnt) { if(flag) return; if(cnt>=5) { cout << 1; flag = true; return; } v[x] = 1; for(auto y:g[x]) { if(!v[y]) { dfs(y, cnt+1...
ALGO
0.999864
4.597108
63bde22c-d196-41c7-b319-e43b088bf85a
mosfetnik/DSA-CP
Codeforces/CP/CodeChef/Swish_Game.cpp
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here int t; cin >> t; while (t--) { int m, k; cin >> m >> k; string s; cin >> s; int count = 0; for (int i = 0; i < m; i++) { if (s[i] == 'S') ...
ALGO
0.999822
3.465581
fe046de6-5d58-4461-924f-6ee8fdcea2a6
jaloliddinmurodullaev/for_lesson
sps_tbl.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 2*1e5 + 7; const int Log = 21; int m[N][Log]; int log_2[N]; void solve() { int n, q; cin >> n >> q; int arr[n]; for(int i = 2; i <= n; i++) log_2[i] = log_2[i/2] + 1; for(int i = 0; i < n; i++){ cin ...
ALGO
0.999964
4.139616
6f97cd59-8bd7-4d6b-86c2-61e9597188a3
itsmepsk/Competitive
Codechef/Contests/Other/WPC1401/IITK1P05.cpp
#include <bits/stdc++.h> using namespace std; int arr[100005]; int main() { int t,n,i,maxi; cin >> t; while(t--) { cin >> n; maxi = -1; for(i=0;i<n;i++) { cin >> arr[i]; if(arr[i] > maxi) { maxi = arr[i]; } } cout <<...
ALGO
0.999906
3.918385
d8a36001-b72c-4c20-8dcc-35f7fa67820e
raincross7/code-similarity
codes/train_code/problem007/problem007_295.cpp
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <i...
ALGO
0.999989
3.63635
c21ef3e3-ed7c-43b7-a405-ea883da40560
blmarket/icpc
blmarket/TreeColoring.cpp
#include <iostream> #include <functional> #include <queue> #include <set> #include <sstream> #include <algorithm> #include <map> #include <vector> #define mp make_pair #define pb push_back #define sqr(x) ((x)*(x)) #define foreach(it,c) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it) using namespace s...
ALGO
0.999515
4.190372
79a86e2e-4c50-4ecf-a0d1-916da09bacf4
saikiranboga/Coding
Codeforces/Round#270/D.cpp
#include <bits/stdc++.h> using namespace std; #define LL long long int #define MX 100010 #define MOD 1000000007 int nrs(string s){ int sz = s.size(); int ret = 0; for(int i=0; i<sz; i++) if(s[i]=='r') ret++; return ret; } int main(){ int m,n; cin >> m; string ar[MX]; map<string,string> ess; for(int...
ALGO
0.999746
4.134913
0139d98d-e752-4a11-a22f-915b7eb1ed4f
superTangcc/toc-collaborate
Pochoir/RMQ/wordSA/RMQ/RMQ_nlogn_1.cpp
#include "RMQ_nlogn_1.hpp" const char RMQ_nlogn_1::LogTable256[256] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6...
ALGO
0.999822
4.499855
23122b77-4e2a-46c2-b815-45eb9ae7cb5c
Zui1506/Cpp_OOP
Practice/game_card/main.cpp
#include<iostream> #include"Card.h" #include "Deck.h" using namespace std; int main() { Deck a; int number = 0; cout<<"Truoc khi xao bai\n"; a.show_deck(); cout<<"----------------------------------------------------"; a.shuffle_card(); cout<<"\nSau khi xao bai\n"; a.show_deck(); re...
TOOL
0.891849
3.936583
bf8474de-16d3-4f47-984c-57a8841320ad
yh570/Concolic_klee
lib/Expr/ExprUtil.cpp
#include "klee/util/ExprUtil.h" #include "klee/util/ExprHashMap.h" #include "klee/Expr.h" #include "klee/util/ExprVisitor.h" #include <set> using namespace klee; void klee::findReads(ref<Expr> e, bool visitUpdates, std::vector< ref<ReadExpr> > &results) { // Invariant: ...
ALGO
0.988707
5.212895
dc09ff37-e95a-4eac-9c55-a4dc949fd4e2
jJayyyyyyy/OJ
LeetCode/001-100/P039_Combination_Sum_++.cpp
/* https://leetcode.com/problems/combination-sum/description/?goto=old 同类题目 P039 参考思路 https://leetcode.com/problems/combination-sum/discuss/16502/A-general-approach-to-backtracking-questions-in-Java-(Subsets-Permutations-Combination-Sum-Palindrome-Partitioning) 其实就是 PAT 里面常出现的DFS的套路 void dfs(...){ for(...){ tmp....
ALGO
0.999957
6.492074
d44f1b57-e91d-4ad9-bb49-a84cef357325
adobe/skia
gpu/GrPathUtils.cpp
#include "GrPathUtils.h" #include "GrPoint.h" #include "SkGeometry.h" GrScalar GrPathUtils::scaleToleranceToSrc(GrScalar devTol, const GrMatrix& viewM, const GrRect& pathBounds) { // In order to tesselate the path we get a bound on...
ALGO
0.952663
5.824474
0cea4794-dabe-4af8-aa44-580b2bd3da1e
ManuLazaro/padel_proyecto
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
3bbba546-6a4b-423a-8338-173bd133c3e5
PrajwalTambe/MyPrograms2
program228.cpp
#include<iostream> using namespace std; template<typename T> struct node { T data; struct node *next; }; template<class T> class SinglyLL { private: node<T>* first; int size; public: SinglyLL(); void InsertFirst(T); void InsertLast(T); void InsertAtPos(T,int); void DeleteFirst(); void Dele...
ALGO
0.992053
4.109771
15b918c2-f7be-493c-a0b2-376ee42ddb97
bighnesh0007/TOP
Arrays/L-1/RotatearraybyKelements.cpp
/* Rotate array by K elements Problem Statement: Given an array of integers, rotating array of elements by k elements either left or right. Examples: Example 1: Input: N = 7, array[] = {1,2,3,4,5,6,7} , k=2 , right Output: 6 7 1 2 3 4 5 Explanation: array is rotated to right by 2 position . Example 2: Input: N = 6,...
ALGO
0.999925
5.786852
61b2b2ce-7228-4cf7-bdca-763497c07ab5
lwhay/NCores
test/btree/FDTreeDbg.cpp
// // Created by Michael on 2018/12/13. // // // Created by Michael on 2018/12/8. // #include <iostream> #include <cassert> #include "fdtree.h" #include "buffer.h" #include "error.h" #include "utils.h" using namespace std; #define WARMUP (1 << 9) #define NUM (1 << 16) #define BSIZE 1024 * /*1024 * */128 #undef I...
TEST
0.955759
3.800561
5079c16f-2969-4959-8d31-95c0f114508b
Engse-PNU-CSE/Python
exercise.cpp
#include <iostream> using namespace std; int main() { int x, y, i, array[10000]; cin >> x >> y; for(i = 0; i < x; i++) { cin>>array[i]; if(array[i] < y) cout<<array[i]; if(i < x-1) cout<<" "; } return 0; }
ALGO
0.999978
3.082851
dded67e3-0492-4a50-a4e5-e508f45d1ee7
tad315/DSA-code.ptit
DSA08018 - SỐ LỘC PHÁT 2.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define fast ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define endl '\n' int main() { fast; int t; cin >> t; while (t--) { int n; cin >> n; queue<string> q; vector<string> res; q....
ALGO
0.999833
4.454996
21e87e22-22db-4e50-9542-edcc4e1c87f3
hfgong/trpl
sequence5/src/post_processing_plan_main.cpp
#include <boost/mpi.hpp> #define USE_MPI 1 #include "tracking_data_package.hpp" #include "tracking_detail.hpp" #include "misc_utils.hpp" #include <boost/math/constants/constants.hpp> #include "linprog_app.hpp" #include "post_processing.hpp" int main(int argc, char* argv[]) { directory_structure_t ds; vec...
DATA
0.996702
4.676014
fe684745-1e48-49fe-a4f1-ecc34af46f19
behradesg/LIGGGHTS-magnificationLens
src/USER-AWPMD/pair_awpmd_cut.cpp
/* ---------------------------------------------------------------------- Contributing author: Ilya Valuev (JIHT, Moscow, Russia) ------------------------------------------------------------------------- */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "pair_awpmd_cut.h" #inc...
ALGO
0.992173
5.195443
abe76b6c-faf6-4726-be04-d5ad3706fdf6
SharifdotG/SharifdotG-s-CodeVault
AIZU Online Judge/Course/Lesson/ITP1 - Introduction to Programming I/Topic # 3 - Repetitive Processing/3_C - Swapping Two Numbers/3_C_SwappingTwoNumbers.cpp
#include <bits/stdc++.h> using namespace std; int main() { int x, y; while (true) { cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) swap(x, y); cout << x << " " << y << endl; } return 0; }
ALGO
0.998385
3.881015
5ff39c31-c0d7-46c5-9333-869eaa208fb4
Diego0720/Practica01
Ejercicio01/Opciones.cpp
#include <iostream> #include <cstdlib> // Para rand() y srand() #include <ctime> #include <chrono> // Para medir el tiempo de ejecucion using namespace std; void menu() { cout << "=== MENU PRINCIPAL ===" << endl; cout << "1. Generar arreglo" << endl; cout << "2. Buscar un elemento del arreglo" << endl; cout << "3....
ALGO
0.956798
4.87145
59580e49-c493-4e54-813d-04859372971b
alexandraback/datacollection
solutions_2692487_0/C++/InnoVator/aa.cpp
#include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int mote[1100]; int dp[1100]; int a,n; int main() { int T; #ifdef OJ freopen("A-small-attempt2.in","r",stdin); freopen("a.txt","w",stdout); #endif scanf("%d",&T); int ca=0; while(T--) { scanf("%d",&...
ALGO
0.999791
3.146611
bc9f73d3-84b7-4147-bdf1-10a644d8705a
raincross7/code-similarity
codes/train_code/problem444/problem444_41.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; //10^19 < 9223372036854775807 typedef unsigned long long ull; //10^20 < 18446744073709551615 #define REP(i,n) for(ll i=0;i<ll(n);i++) #define REPD(i,n) for(ll i=n-1;i>=0;i--) #define FOR(i,a,b) for(ll i=a;i<=ll(b);i++) #define FORD(i,a,b) for(ll i=a;i...
ALGO
0.999904
4.103271