uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
efbfb67d-7b5a-41ad-8041-62925287acfb
EPFL-LGG/CurvedWeaving
elastic_rods/3rdparty/libigl/tutorial/504_NRosyDesign/main.cpp
#include <igl/avg_edge_length.h> #include <igl/barycenter.h> #include <igl/local_basis.h> #include <igl/readOFF.h> #include <igl/copyleft/comiso/nrosy.h> #include <igl/opengl/glfw/Viewer.h> #include <igl/PI.h> #include "tutorial_shared_path.h" // Mesh Eigen::MatrixXd V; Eigen::MatrixXi F; // Constrained faces id Eig...
ALGO
0.974396
6.044792
94c73034-c8a6-46d0-8b53-c9271b04ccf3
devbharat/gtsam
gtsam/3rdparty/GeographicLib/dotnet/NETGeographicLib/AzimuthalEquidistant.cpp
#include "stdafx.h" #include "GeographicLib/AzimuthalEquidistant.hpp" #include "AzimuthalEquidistant.h" #include "NETGeographicLib.h" using namespace NETGeographicLib; const char BADALLOC[] = "Failed to allocate memory for a GeographicLib::AzimuthalEquidistant"; //****************************************************...
ALGO
0.983304
5.768221
856d85cb-f0c0-4f46-bd77-e6713d395650
nodale/Project-JE0
JE0/lib/ODE_solver/solver1.cpp
#include "solver1.h" #include <fstream> void solver1::initFile(char* file) { file_out.open(file); } void solver1::initFile(char* file, char* file2) { file_out.open(file); file_real_out.open(file); } void solver1::print_data(double x, double y, std::ofstream& target) { target << x << " " << y << "\n"; } void sol...
ALGO
0.994944
4.036182
4faa67a3-cad6-442d-b40e-e96f444fd17d
VldSann/201_331_Sannikov
Qt-Secret/src/Qt-RSA/qrsaencryption.cpp
#include "qrsaencryption.h" #include <QString> #include <iostream> #include <ctime> #include <chrono> #include <QTextStream> #define KEY_GEN_LIMIT 10 const QString SIGN_MARKER = "-SIGN-"; const int signMarkerLength = SIGN_MARKER.length(); QRSAEncryption::INT eulerFunc(const QRSAEncryption::INT &p, const QRSAEncrypt...
ALGO
0.938506
6.12439
1b6eaeae-8778-4850-ab4a-b9926a71f965
MilenaPellegrino/Programming_Problems
Omegaup/13769_Mayor_diversion.cpp
#include<bits/stdc++.h> using namespace std; #define fore(i,a,b) for(ll i=(a);i<(b);i++) #define rof(i, a, b) for(ll i=(b);i>(a);i--) #define forn(e,c) for(const auto &e : (c)) #define db(x) cout<<#x<< " = "<<(x)<<endl #define sz(x) ((int)x.size()) #define all(x) (x).begin(),(x).end() #define pb push_back #define pp po...
ALGO
0.999943
3.692119
e4b1bc1f-7f5c-4126-8c0a-b81e74458c79
Pewciu6/CSES-solutions
Introductory_Problems/Repetitions.cpp
#include <iostream> using namespace std; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); string s; cin>>s; int maks_suma=0, suma=1; for(int i=0; i<=s.length()-1; i++) { if(s[i]==s[i+1]) suma++; else suma=1; if(maks_suma<suma) maks_suma = suma; } cout<<maks_suma; return 0; }
ALGO
0.999836
3.608102
4a0e0dbf-70ae-43b3-a052-c801badbf02a
inshayaqoob/AI-Code-Summarize
transcoder/transcoder/data/evaluation/geeks_for_geeks_successful_test_scripts/cpp/FRIENDS_PAIRING_PROBLEM_2.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; int f_gold ( int n ) { int a = 1, b = 2, c = 0; if ( n <= 2 ) { return n; } for ( int i = 3; i <= n; i ++ ) { c = b + ( i - 1 ) * a; a = ...
ALGO
0.99946
5.21536
c5fd6242-ae18-4298-8fca-d8b99686fe5d
srishti-s2212/Data_Structures_Algorithms
1. LinkedList/delete_all_occurrences_of_x.cpp
#include <iostream> using namespace std; struct Node { int data; Node *next; Node(int x) { data = x; next = NULL; } }; class Solution { public: Node *deleteAllOccurrences(Node *head, int x) { while (head != NULL && head->data == x) { head = head->...
ALGO
0.999708
4.885234
37720752-5c8f-40c2-970c-0648de348aa7
AlexGeControl/Auto-Car-04-Planning-01-Trajectory-Planning-Robotics-Approach
src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; using namespace Eigen; int main() { ArrayXXf a(2,2); a << 1,2, 3,4; cout << "(a > 0).all() = " << (a > 0).all() << endl; cout << "(a > 0).any() = " << (a > 0).any() << endl; cout << "(a > 0).count() = " << (a > 0).count() << endl...
ALGO
0.925182
3.835741
fb720746-e617-4850-8784-6ae7c71d9ea3
itsrahulhere/DSA
Binary Tree/03. Inorder Traversal(Recursion).cpp
// Problem Link: https://leetcode.com/problems/binary-tree-inorder-traversal/ void in(TreeNode* root, vector<int>&ans) { if(root!=NULL) { in(root->left,ans); ans.push_back(root->val); in(root->right,ans); } // // or can do as below // if(!root) return; // in(root->left,...
ALGO
0.999971
6.651373
e2547301-2ca9-4f0b-9a33-2927cb141413
roy-subhojeet/leetcode
0141-linked-list-cycle/0141-linked-list-cycle.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool hasCycle(ListNode *head) { unordered_map<ListNode*, int> mp; bool hasCycle = false; while(head) ...
ALGO
0.99982
5.384394
5a398301-e612-41f6-9c2d-4af97bedb53d
suyashpatodi/Basic-C-Programs
program 15.cpp
#include<stdio.h> int linear(int a[],int size, int search); int main() { int a[10],i,search,n; printf("Enter Number of Array Elemnts:"); scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); printf("Enter Element you want to search:"); scanf("%d",&search); int pos=linear(a,n-1,search); if(pos==-1) printf("Not...
ALGO
0.99967
3.352117
38c5a46d-784a-4d0d-a8a1-c72d987eab27
Rahul-Shaikh/CP
Rahul/DS/Graph/primMST.cpp
#include <iostream> #include <list> #include <queue> #include <vector> #include <climits> using namespace std; class Graph { int V; list<pair<int, int> > *adj; public: Graph(int V) { this->V = V; adj = new list<pair<int, int> >[V]; } void addEdge(int u, int v, int val) { ...
ALGO
0.999972
4.885542
a4c4662c-c5a2-4aae-827d-258c5ae445b3
shakil113/Uva-onlineJudge-solve
UVA11917.cpp
#include <cstdio> #include <map> #include <string> using namespace std; #define MAX_LEN 30 #define NUM_DAY_LATE_ALLOWED 5 int main(void) { char subject[MAX_LEN + 1]; map<string, int> mapSubjectToDay; int duration, T, caseId, numSubject, numDayFin; map<string, int>::const_iterator it; scanf("%d", ...
ALGO
0.999226
3.8172
a75475e8-1a2b-4902-8f36-210a73830bc7
vanshg1729/competitive
Codechef/Substring Importance/import.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define fr first #define sc second int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); //freopen("input.txt","r", stdin); //freopen("output.txt","w",stdout); int T ;cin>>T ; while(T--) { int...
ALGO
0.99978
3.647197
9582a4b6-f19c-45d4-a959-958f23662266
expertsleepersltd/distingNT_API
airwindows/src/EdIsDim.cpp
#include <math.h> #include <new> #include <distingnt/api.h> #define AIRWINDOWS_NAME "EdIsDim" #define AIRWINDOWS_DESCRIPTION "Mid/side conversion utility plugins." #define AIRWINDOWS_GUID NT_MULTICHAR( 'A','E','d','I' ) enum { kParam_One =0, //Add your parameters here... kNumberOfParameters=1 }; enum { kParamInputL...
ALGO
0.97145
5.736278
ff8f669a-89fe-4ae4-911a-fff9d2a42459
RPComputer/Epidemiological-BioPEPA-Model
BioPEPA workbench/stochkit/test/SCHLOGL/ODM/singleSchlogl.cpp
//****************************************************************************** //* FILE: singleSchlogl.cpp //* //* AUTHOR: HongLi //* //* CREATED: Mar 06, 2005 //* //* LAST MODIFIED: //* BY: //* TO: //* SUMMARY: //* //* //* NOTES: //* //* //* //* TO DO: //* //* //********************...
ALGO
0.985512
4.354578
5514f9a1-54b1-4d2e-baf4-e665b9f8c80a
Z-I-K-Oo/Parcial-
Version_cpp/Parcial 1 Algoritmos.cpp
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
ALGO
0.905071
4.757107
b1cf5494-cc8e-41a5-ba57-3f8425ced773
KhaiJP/AtCoder
ABC/<400/345/C++/A.cpp
#include<iostream> using namespace std; int main(){ string S; cin >> S; bool f = S.front() == '<' && S.back() == '>'; int N = S.size(); for(int i = 1; i < N-1; ++i){ f = f && S[i] == '='; } cout << (f ? "Yes" : "No") << endl; return 0; }
ALGO
0.999968
3.452292
ae447615-7d04-4626-9da2-fb566e3bf5c5
AAKASH-YADAV-CODER/gfg-DSA
3Array/18_Encode_decode.cpp
#include <iostream> #include <vector> #include <string> using namespace std; // Function to encode a list of strings into a single string string encode(vector<string>& strs) { if (strs.empty()) return ""; vector<int> sizes; string res = ""; // Step 1: Store sizes of each string for (string& s : s...
ALGO
0.999876
6.511259
302bd218-0bf4-4e58-bb5d-a22a4a063a5a
whynesspower/leetcode
1202-smallest-string-with-swaps/1202-smallest-string-with-swaps.cpp
class Solution { public: int find(vector<int>& ds, int i) { return ds[i] < 0 ? i : ds[i] = find(ds, ds[i]); } string smallestStringWithSwaps(string s, vector<vector<int>>& pairs) { vector<int> ds(s.size(), -1); vector<vector<int>> m(s.size()); for (auto& p : pairs) { auto i = find(ds, p[0]), j = find(d...
ALGO
1
5.975819
9489abf9-08ea-411c-8859-802bac1544df
SMiles02/CompetitiveProgramming
Codeforces/CF 1800 - 1899/CF1846/CF1846E1.cpp
#include <bits/stdc++.h> #define ll long long #define sz(x) (int)(x).size() using namespace std; // mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); // uniform_int_distribution<int>(1000,10000)(rng) string to_upper(string a) { for (int i=0;i<(int)a.size();++i) if (a[i]>='a' && a[i]<='z') a[i]-=...
ALGO
0.99824
4.363446
8505ab1a-36c6-4737-b95b-36af18de5365
Asad-Bin/cf-ac-problems
codeforces/1440/C1..cpp
//...Bismillahir Rahmanir Rahim... // Code by Asad Bin Saber #include <bits/stdc++.h> using namespace std; // typedefs... typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<int, pii> piii; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<ll, ll> pll; // ...
ALGO
0.999945
3.204175
690faa9d-d4aa-4911-9252-5fcebe629c96
PratyayDhond/OOP-with-CPP-by-balagurusamy-solutions
4/4.8.cpp
#include<iostream> using namespace std; double power(double m, int n){ if(m == 0 ){ return 0; } if(n==0){ return 1; } while(n>0){ m = m *(power(m,n-1)); return m; } return 0; } int power(int m, int n){ if(m == 0 ){ return 0; } if(n==0){ return 1; } while(n>0){ m = m *(power(m,n-...
ALGO
0.999795
3.782367
6bcb9e05-1490-48a3-bd80-d1d8c2ef1ad9
Hansung-include/Coding-Test-Study
02์ฃผ์ฐจ/14501/์˜ค์œ ์ง„_14501.cpp
#include <iostream> using namespace std; int result[16]={0,}; int main(){ int N,T[16],P[16]; int sum=0; cin>>N; for(int i=1;i<=N;i++){ cin>>T[i]>>P[i]; } for(int i=N;i>0;i--){ if(i+T[i]<=N+1){ //๋‹น์ผ ํฌํ•จ ์ƒ๋‹ดํ•˜๋ฏ€๋กœ N+1 result[i]=max(result[i+1],P[i]+result[i+T[i]]);...
ALGO
0.999634
3.48475
4e85241f-56b4-415f-bfb9-1b57b514669f
AkshatAggarwal14/Competitive-Programming
CodeForces/1106/c.cpp
//**********************master._.mind********************** //-----------------Author: Akshat Aggarwal----------------- //If you don't understand the code below... dont worry, i didn't either #include "bits/stdc++.h" using namespace std; using namespace std::chrono; #define ll long long #define db long double #define ...
ALGO
0.999972
5.483346
8a15d98a-09e2-47ff-9d41-8d54b1118d12
plumonito/dtslam
3rdparty/opencv-git/modules/core/src/command_line_parser.cpp
#include "precomp.hpp" #include <sstream> namespace cv { struct CommandLineParserParams { public: String help_message; String def_value; std::vector<String> keys; int number; }; struct CommandLineParser::Impl { bool error; String error_message; String about_message; String path_to_ap...
TOOL
0.970216
6.371775
6a501985-bf44-4423-bd9e-93aeabf4f729
JeongEon8/AlgorithmStudyinGumi
2025 06์›”/06์›” 4์ฃผ์ฐจ/JeongEon/02/[๋ฐฑ์ค€ - S2] 10799.cpp
#include<iostream> #include<stack> #include<string.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); stack<int> s; string str; int cnt = 0; cin >> str; for (int i = 0; i < str.size(); i++) { if (str[i] == '(' && str[i+1] == ')') { cnt += s.siz...
ALGO
0.99868
3.911817
a89ce7cb-fa69-4610-8916-1ff054e6fbfd
PramodhTVK/Leetcode
1909-remove-one-element-to-make-the-array-strictly-increasing/1909-remove-one-element-to-make-the-array-strictly-increasing.cpp
class Solution { public: bool canBeIncreasing(vector<int>& nums) { int n=nums.size(); int count=0; for(int i=1;i<n;i++){ if(nums[i]<=nums[i-1]) count++; if(i>1 && nums[i]<=nums[i-2]) nums[i]=nums[i-1]; } return count<2; ...
ALGO
0.999968
5.848779
ebb3de41-4fa6-4076-a024-873a953ae86c
yijie21/Mitsuba3-eval_roughness
src/integrators/volpath.cpp
NAMESPACE_BEGIN(mitsuba) template <typename Float, typename Spectrum> class VolumetricPathIntegrator : public MonteCarloIntegrator<Float, Spectrum> { public: MI_IMPORT_BASE(MonteCarloIntegrator, m_max_depth, m_rr_depth, m_hide_emitters) MI_IMPORT_TYPES(Scene, Sampler, Emitter, EmitterPtr, BSDF, BSDFPtr, ...
ALGO
0.990279
6.572504
fbc4b542-bf47-4871-a949-7bd325f35957
shivani26-bot/DSA-questions
1631-path-with-minimum-effort/1631-path-with-minimum-effort.cpp
class Solution { public: bool isValid(int adjRow,int adjCol,int n,int m,vector<vector<int>>&heights){ return adjRow>=0 && adjRow<n && adjCol>=0 && adjCol<m; } int minimumEffortPath(vector<vector<int>>& heights) { // when source or destination is involved , use dijkstra algorithm // initial conf...
ALGO
0.999995
6.203832
bd508afd-d23b-4e28-9760-935f84d07ab9
VadimProkopovich/Prokop_Vad
PZ_2''.cpp
#include<iostream> using namespace std; int main() { int code; setlocale(LC_ALL, "RU"); cout << "ะ’ะฒะตะดะธั‚ะต ะฝะพะผะตั€ ะผะตััั†ะฐ" << endl; cin >> code; switch (code) { case 1: cout << "ะฏะฝะฒะฐั€ัŒ" << endl; break; case 2: cout << "ะคะตะฒั€ะฐะปัŒ" << endl; break; case 3: cout << "ะœะฐั€ั‚" << endl; break; case 4: cout << "ะะฟั€ะตะปัŒ" << e...
ALGO
0.994281
3.794173
026f1471-2c75-493c-a038-01db60ba5339
nikit829/CPP
even_odd.cpp
#include<iostream> using namespace std; void check(int n); int main(){ int n; cout<<"Enter no to check whether it's even or odd\n"; cin>>n; check(n); } void check(int n){ if (n==0) cout<<"Number is neither even nor odd"; else if(n%2==0) cout<<"Number is even"; else ...
ALGO
0.998164
3.912675
dbea8fc9-99b2-41b6-bf5c-9abdfcc14441
gulnazshaikh/HealthGuard
backend/venv/Lib/site-packages/sklearn/utils/src/MurmurHash3.cpp
// Note - The x86 and x64 versions do _not_ produce the same results, as the // algorithms are optimized for their respective platforms. You can still // compile and run any of them on any platform, but your performance with the // non-native version will be less than optimal. #include "MurmurHash3.h" //-------------...
ALGO
0.998173
7.198757
f8ccedba-f0ce-4062-8609-fb4bfb215503
Kiids/OJ_Practice
ไปŽไธŠๅˆฐไธ‹ๆ‰“ๅฐไบŒๅ‰ๆ ‘.cpp
/* ฯตยดำกรฟฺตใฃฌอฌาปฤฝฺตใฐดีดาตหณำก : :?[3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15 7 ุฃ [3,9,20,15,7] สพ ฺต <= 1000 */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ clas...
ALGO
0.999995
6.195118
90f368ba-eefa-4d34-a899-aa802bfe7a88
wheelcomplex/freebsd-arm64
contrib/llvm/tools/clang/lib/Edit/RewriteObjCFoundationAPI.cpp
#include "clang/Edit/Rewriters.h" #include "clang/AST/ASTContext.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/ExprObjC.h" #include "clang/AST/NSAPI.h" #include "clang/AST/ParentMap.h" #include "clang/Edit/Commit.h" #include "clang/Lex/Lexer.h" using namespace clang; using namespace edit; static bool checkFor...
TOOL
0.885101
6.937806
e6444d47-ab52-47b8-b90c-01471d77c199
ashmanmode/code-samples
GfG/LONGJULY_D.cpp
#include <bits/stdc++.h> using namespace std; #define maxsiz 1000000 #define F first #define S second #define fr(i,k,n) for(int i = k ; i < n ; i++ ) #define mp(a,b) make_pair(a,b) #define pb(a) push_back(a) #define printvect(a,n) fr(i,0,n) cout << a[i] << " " ; #define point pair<int,int> #define pii pair<int,int> #d...
ALGO
0.999626
3.89669
3355ebc2-0b96-46c2-b391-274ab02129b0
SehajparkashSingh/DSA_using_CPP
STACK/rm_adj_dup.cpp
#include <iostream> #include <cstring> using namespace std; void remove_adj_duplicates(char *a){ int i,j; i=-1; //works as stack pointer j=0; // to access every character of the string while(j<strlen(a)){ if(i==-1 || a[i]!=a[j]){ i++; a[i]=a[j]; j++...
ALGO
0.999848
4.539304
5a3b838d-e2ce-4ea5-8d7d-585405301ee9
rfabbri/trifocal-sample
src/software/SfM/main_MatchingRetrievalQuality.cpp
// This file is part of OpenMVG, an Open Multiple View Geometry C++ library. #include "openMVG/features/descriptor.hpp" #include "openMVG/features/feature.hpp" #include "openMVG/matching/indMatch.hpp" #include "openMVG/matching/indMatch_utils.hpp" #include "openMVG/matching/pairwiseAdjacencyDisplay.hpp" #include "open...
TOOL
0.939084
7.040953
c3534b6b-4324-4aeb-8d4c-8330e2785135
shub39/C-Cpp
Learning-C++/power.cpp
#include<iostream> using namespace std; int power(int a, int b){ if (b == 0) return 1; if (b == 1) return a; int ans = power(a, b/2); if (b % 2 == 0) return ans * ans; return a * ans * ans; } int main() { int a, b; cout << "Enter Number, power: "; cin >> a >> b; cout << endl; int ans = power(a, b)...
ALGO
0.999705
5.573372
1a396407-e0b6-45c9-bac6-aee4ccba095c
narang-madhur/CPP
11th/TERM 1 cpp/sum of factorial/sumoffac.cpp
#include<iostream.h> void main() { int a,b,n,f=1,s=0; cout<<"ENTER THE NUMBER OF TERMS"<<endl; cin>>n; for(a=1;a<=n;a++) { cout<<a<<"\! + "; for(b=1;b<=a;b++) { f*=b; } s+=f; f=1; } cout<<"\b\b = "<<s; }
ALGO
0.999202
3.331464
e268239f-a142-4ef3-af75-994c0ff923e7
GunioRobot/scribe-dependencies
boost_1_41_0/libs/graph/example/write_graphviz.cpp
// A simple example of using write_graphviz to output a BGL adjacency_list // graph in GraphViz Dot format. // Author: Doug Gregor #include <boost/graph/graphviz.hpp> enum files_e { dax_h, yow_h, boz_h, zow_h, foo_cpp, foo_o, bar_cpp, bar_o, libfoobar_a, zig_cpp, zig_o, zag_cpp, zag_o,...
ALGO
0.940216
6.492318
d87ddddc-3ae9-45b6-a9b2-3a5124118e70
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12723_15.cpp
#include <bits/stdc++.h> using namespace std; int m[100100]; int main() { int i, j, k, n; for (scanf("%d", &n), i = 0; i < n; scanf("%d", &m[i]), i++) ; if (n % 2) printf("NO\n"); else { sort(m, m + n); for (j = 0; j < n && m[j] == m[0]; j++) ; if (j == n) printf("NO\n"); els...
ALGO
0.999987
3.359174
cf615188-7767-4805-a5f7-47fbd5ae2d8a
atandritC/Competitive-Programming-Solutions
Striverโ€™s CP Sheet/A_Bit.cpp
#include <bits/stdc++.h> using namespace std; // Define common macros #define int long long #define all(x) (x).begin(), (x).end() #define endl '\n' #define pb push_back #define F first #define S second #define pii pair<int, int> #define vi vector<int> #define vvi vector<vector<int>> #define vpii vector<pair<int, int>>...
ALGO
0.99987
5.35532
a46756e3-9568-4c12-9fe2-34a51a862b9f
zfergus/heightfield-modeler
vec4.cpp
/* * vec4.cpp * Created by Zachary Ferguson * Source file for the vec4 class, a 4 dimensional vector. */ #include "vec4.h" /* Class and function prototypes. */ /****************/ /* Constructors */ /****************/ /* Constructor for the 4 dimensional zero vector. */ /* Creates a vector with zero...
TOOL
0.905701
4.816268
fca61dbb-295c-4657-8cc2-c76c71c491f1
warithr621/Comp-Programming
Leetcode/Medium/122.cpp
// https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/?envType=study-plan-v2&envId=top-interview-150 #include <bits/stdc++.h> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { // optimal to buy a stock only if you immediately sell it int ans = 0; ...
ALGO
0.998242
6.296476
32e713c9-4474-4b54-a226-adef6c15b487
Tanumcoin/Tanum
src/policy/policy.cpp
// NOTE: This file is intended to be customised by the end user, and includes only local node policy logic #include "policy/policy.h" #include "consensus/validation.h" #include "validation.h" #include "coins.h" #include "tinyformat.h" #include "util.h" #include "utilstrencodings.h" CAmount GetDustThreshold(const CTx...
TOOL
0.901266
6.962727
7d0f02d1-9ea3-4730-b8b2-af988d82d14c
kauschie/SOWCPP
ch3/program3-23.cpp
// This program successfully uses both // cin >> and cin.get() for keyboard input #include <iostream> using namespace std; int main() { char ch; int number; cout << "Enter a number: "; cin >> number; cin.ignore(); // skip the newline character cout << "Enter a character: "; ch = cin.get(); cout << "Thank yo...
ALGO
0.903433
3.298572
43961e84-993c-43d4-8d4a-5783fc0060c3
YoungCoderboy/CP_question
sumofsubarray.cpp
#include <bits/stdc++.h> #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <loc...
ALGO
0.999815
3.98823
412df4f7-e7eb-454b-824f-d60dd67fa6b0
feal-ca/Class-Code
ExercisesCpp/~/Documents/Code/ExercisesCpp/~/Documents/Code/ExercisesCpp/~/Documents/Code/ExercisesCpp/Campanar2.cpp
#include <iostream> #include <cmath> using namespace std; void mas_un_minuto(int& h, int& m){ m += 1; if (m==60) { m = 0; h += 1; if (h == 24) { h = 0; } } } int main(){ int h,m,t; while(cin >> h >> m >> t){ //11 veces cada vuelta entera int campanadas = 0; campanadas = c...
ALGO
0.999733
3.982297
11a346f0-f474-4ff2-a1e6-cca97c64dbe3
kikato2022/Cpp-Primer-Plus-exercise
ch12/12-3_usestock.cpp
// usestock.cpp -- using the Stock class // compile with stock.cpp #include<iostream> #include"12-3_stock.h" const int STKS = 4; int main(){ // create an array of initialized objects Stock stocks[STKS] = { Stock("NanoSmart", 12, 20.0), Stock("Boffo Objects", 200, 2.0), Stock("Monolithi...
ALGO
0.910703
3.760861
e22e1ec5-26d0-4bfc-bec5-3a181c41957c
Peachzxzx/ProbSolveLabCPE32
Elab/Lab5/04-First_linked_list_class/First_linked_list_class.cpp
#include <iostream> using namespace std; typedef int valueType; struct ListNode { valueType val; ListNode* next; ListNode(valueType val, ListNode* next=0) : val(val), next(next) {} }; class LinkedList { private: ListNode* header; void free_list(); public: LinkedList(); ~LinkedList(); void prin...
ALGO
0.99829
4.26973
7449085a-48a7-4998-8d97-4aaa9549414c
OBserver819/OBcompetition
deps/common/math/md5.cpp
// // Created by Longda on 2010 // #include "common/math/md5.h" #include <stdlib.h> #include <string.h> #include <unistd.h> namespace common { #define S11 7 #define S12 12 #define S13 17 #define S14 22 #define S21 5 #define S22 9 #define S23 14 #define S24 20 #define S31 4 #define S32 11 #define S33 16 #define S34 23...
ALGO
0.981627
5.945392
d8871763-2692-4ccc-ba28-41df2ed593d3
MalekIrsheid/login
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
ed291003-0873-42cb-afe8-8a2a8c0014d1
exceed96/Personal_42CppModule
cpp02/ex03/main.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: ...
ALGO
0.90756
5.426573
fb412c5c-e644-400e-a881-8443e0ca086f
soham-bhavsar/OOP244
w1p1.cpp
// Workshop 1: // Version: 1.0 // Author: Fardad Soleimanloo // Description: // w1p1.cpp // /////////////////////////////////////////////////// #define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <iostream> #include <cstdlib> // set to false when compling on Linux or Mac const bool APP_OS_WINDOWS = false; usin...
TOOL
0.889015
5.141667
7078eca5-7480-4fa4-af66-a5a7a00da9d5
OneDay-OneAlgorithm/ChoiSeohyeon
PS-boj/11899_๊ด„ํ˜ธ๋ผ์›Œ๋„ฃ๊ธฐ.cpp
// ๋ฐฑ์ค€ : ๊ด„ํ˜ธ ๋ผ์›Œ๋„ฃ๊ธฐ, ์‹ค๋ฒ„ 3 #include <iostream> using namespace std; int main() { return 0; }
ALGO
0.999702
4.406836
d36f751e-3d4d-469b-9adc-cb4380bb1ba7
akshin-kuvshin/smth
ะ—ะฐะดะฐั‡ะธ (ะฟะพ ะธัั‚ะพั‡ะฝะธะบะฐะผ)/USACO/friday/friday.cpp
/* ID: daksion2 TASK: friday LANG: C++ */ #include <fstream> using namespace std; // Variables int N, weekDays[7], day = 13, month = 0, year = 1900, dayOfWeek = 5, simpleYear[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, leapYear[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}...
ALGO
0.99995
3.161749
cc7ef848-13ef-42f9-97f4-75b2a057c937
ENGINEERJW/codetree-TILs
240318/๋ฌธ์ž์—ด์˜ ๊ธธ์ด ์ถœ๋ ฅํ•˜๊ธฐ/print-string's-range.cpp
#include <iostream> #include<string> using namespace std; int main() { string str1; string str2; cin>>str1; cin>>str2; cout<<str1.length()+str2.length(); return 0; }
ALGO
0.996789
3.613235
3e5beebe-8fce-4624-88e0-b9ec8237ad40
Prathamesh-Patil-GitHub/practice-programs
PRO Leetcode/combination-sum-ii/Accepted/5-7-2023, 11_01_43 AM/Solution.cpp
// https://leetcode.com/problems/combination-sum-ii class Solution { public: void findCombination(vector<vector<int>> &ans, vector<int> &candidates, int target, int index, vector<int> &ds){ if(target == 0){ ans.push_back(ds); return; } for(int i=index;i<candidates.s...
ALGO
0.999994
6.485878
9d8a70b6-0cb3-425e-93ad-50aaec060b8a
codesmith17/CODEFORCES
A_Minimums_and_Maximums.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; int t; cin >> t; while (t--) { int l1, l2, r1, r2; cin >> l1 >> r1 >> l2 >> r2; if (max(l1, l2) <= min(r1, r2)) cout << max(l1, l2) << endl; else ...
ALGO
0.999444
3.283162
7cd50c13-fc03-4d4a-9ec7-65cdb68612c4
gskleres/nqmod-vs2008
CvGameCoreDLL_Expansion2/Lua/CvLuaLeague.cpp
#include "CvGameCoreDLLPCH.h" #include "CvLuaSupport.h" #include "CvLuaLeague.h" //Utility macro for registering methods #define Method(Name) \ lua_pushcclosure(L, l##Name, 0); \ lua_setfield(L, t, #Name); // ================================================================================ // CvLuaLeague // ====...
TOOL
0.868044
6.767947
7cbfdb37-29ec-4814-bc4f-319aac3fee61
strands-project/strands_perception_people
visual_odometry/3rd_party/fovis/libfovis/normalize_image.cpp
#include "normalize_image.hpp" #include <math.h> #include "tictoc.hpp" namespace fovis { static void mean_stddev(const uint8_t * buf, int stride, int width, int height, float *mean, float *stddev) { float sum = 0; float sqr_sum = 0; for (int i = 0; i < height; ++i) { const uint8_t *...
TOOL
0.853883
4.668217
95be35bf-f79c-4283-9074-3bb8f2e2d35c
PaukIsUha/optimizing_formating_code
predictions/full_output_predicted_submissions/Codenet/p02402/376219072/9.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> int main() { ios::sync_with_stdio(false); int n; std::vector<long long> a; std::cin >> n; for (int i = 0; i < n; i++) { long long ii; std::cin >> ii; a.push_back(ii); } std::cout << *std::min_element(a.begin(), a.end...
ALGO
0.999527
4.680675
a911fd1c-be3e-4b20-98a2-558a53f52fd0
Bakhtiyarrrr/Pp1
9labL.cpp
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run a...
ALGO
0.999952
4.228355
7bd958f0-f500-437e-9bf1-53200b62579b
saikuNoCoda/DSA1
Tree/Heap_Sort.cpp
#include<bits/stdc++.h> using namespace std; //swap void swap(int *a,int *b){ int t = *a; *a = *b; *b = t; } // To add a new node to a heaped tree void Heapify(int i, int *array,int heapsize) { int l = 2*i+1; int r = 2*i+2; int largest = i; if(l< heapsize&&array[l]>array[i]){ lar...
ALGO
0.999893
4.926308
28b73df0-4728-4e14-9e93-0d27491f4423
alexandraback/datacollection
solutions_2645486_1/C++/aknow/B.cpp
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; #define clr(x) memset((x), 0, sizeof(x)) #define all(x) (x).be...
ALGO
0.999873
3.737883
82783acc-cf44-4347-b6dd-033d5360ef25
alexandraback/datacollection
solutions_2692487_1/C++/kurnevsky/main.cpp
#include <iostream> #include <algorithm> using namespace std; int a, n; int motes[100]; int curMin; int curAdd; void solve() { cin >> a >> n; for (int i = 0; i < n; i++) cin >> motes[i]; if (a == 1) { cout << n << endl; return; } sort(motes, motes + n); curMin = 100000; curAdd = 0; for (int i = 0; i <...
ALGO
0.999821
3.858717
d09ae5c2-d539-4c3e-aef2-55bdf82ef3e4
marlonzanardi/Hiringpaytv
movies.cpp
/******************************************************************************************************* ** Aplicaรงรฃo C++ para obter informaรงรตes sobre um determinado filme ou sรฉrie de TV. ** **--------------Informaรงรฃo do Arquivo ------------------------------------------------------------...
TOOL
0.882319
4.638153
3bbd4df9-53d2-4fc5-939c-50cfad6811cb
vigyannveshi/learn_CPP
learned_programs/71-2d_array_challenge_3.cpp
/* Matrix search such that both rows and columns are sorted Example: 1 4 7 11 2 5 8 12 3 6 9 16 10 13 14 17 Suppose Given Target is 5-->Return 1 Suppose Given Target is 20-->Return 0 for brute force approach refer:67-element_searching_in_2d_matrix.cpp Here we are given sorted arr optimising the...
ALGO
0.999702
5.004214
6fd3c0dd-c3d5-4035-9ff4-a685cedc2f7c
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4438_9.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 741100, MAXS = 10; struct Trie { int ch[MAXN][MAXS], sz, val[MAXN * 10]; int id(char c) { return c - '0'; } void init() { sz = 0, newnode(); } int newnode() { memset(ch[sz], 0, sizeof(ch[sz])), val[sz] = 0; return sz++; } void insert(cha...
ALGO
0.999944
4.031099
2d566596-25b5-463e-b1a7-6329982ae54e
yydaily/project-euler-solution
code/109/solution.cpp
#include "../template/bigint.cpp" #include "../template/china_reminder.cpp" #include "../template/euler.cpp" #include "../template/prime.cpp" #include "../template/prime_cnt.cpp" #include <iostream>/*{{{*/ #include <map> #include <math.h> #include <set> #include <vector> const long long e2 = 100; const long long e3 = e...
ALGO
0.995336
3.690956
b997346d-0de7-4365-b900-f51245f5c490
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_2668_3.cpp
#include <bits/stdc++.h> using namespace std; const long long INF = 1e18; int f, T, t0; int a1, t1, p1; int a2, t2, p2; long long ans = INF; bool pl; bool good(long long sz, long long t, long long mnt) { sz -= mnt * a2; t -= mnt * a2 * t2; if (t < 0) return false; if (sz * t0 <= t) return true; long long d = ...
ALGO
0.999893
3.636993
cd17f965-24d1-412b-82f8-08142e86e8e5
Mr-Jashan/Leetcode
2656/Code.cpp
class Solution { public: int maximizeSum(vector<int>& nums, int k) { sort(nums.rbegin(), nums.rend()); int ans=0; while(k!=0) { ans+= nums[0]; nums[0] +=1; k--; } return ans; } };
ALGO
0.999952
5.446306
a0af8e26-afd9-44df-8784-6ee6d8736d87
WJ-self/algorithm
.history/acwing/basic/ๅ›พ่ฎบ/850_Dijkstraๆฑ‚ๆœ€็Ÿญ่ทฏ_ๅ †ไผ˜ๅŒ–_20230903094329.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1.5e5+10; int n,m; int h[N],e[N],w[N],ne[N],idx; void add(int a, int b, int c){ e[idx]=b, w[idx]=c, ne[] }
ALGO
0.999243
3.332058
33283579-2a9f-44a4-8296-d55bf1b68836
ChettriBishal/CP
Coding Blocks/Recursion/Last_occurrence.cpp
/* *To find the last occurence of an element in the array */ #include<iostream> using namespace std; int locc(int* a,int key, int n) { // first make and then look at the current index if(n==0) return -1; int check=locc(a+1,key,n-1); if(check==-1){ if(a[0]==key) // check if ...
ALGO
0.999908
4.068196
3270d601-1998-4639-a6c4-86c3aa473033
shreejitverma/SDE-Interview-Prep
LeetCode/C++/minimum-moves-to-convert-string.cpp
// Time: O(n) // Space: O(1) class Solution { public: int minimumMoves(string s) { int result = 0; for (int i = 0; i < size(s); i += (s[i] == 'X') ? 3 : 1) { result += (s[i] == 'X'); } return result; } };
ALGO
0.9998
5.802096
2a9e15ac-586b-4e06-a3c9-79b6c3e6dc00
Yukariko/acm
problem/5524/test.cpp
#include <iostream> using namespace std; int main(void) { int N; cin >> N; while(N--) { string a; cin >> a; for(int i=0; a[i]; i++) cout << (char)(a[i] | 32); cout << '\n'; } return 0; }
ALGO
0.99619
3.947136
4e8c11c0-aece-4e8c-84af-c60990170d1e
emamhasan1804/XPSC
week -07/day -01/F_Two_Arrays.cpp
#include<bits/stdc++.h> #define int long long #define float double #define endl '\n' using namespace std; /* When I wrote this code , only Allah and I knew what I did. Now... only Allah knows */ int32_t main () { ios::sync_with_stdio(false); cin.tie(NULL); int t;cin>>t;while(t--) { int n...
ALGO
0.99984
3.691061
670d6164-2e41-42cb-b691-c98f51e60973
SanketMarathe2001/Cpp-Tutorial
Leetcode_SuperPow.cpp
#include<bits/stdc++.h> using namespace std; //leetcode superpow answer int binary_expo(int a,int b){ int ans=1; while(b){ if(b%2==1) { ans=(ans*a)%1337; } a=(a*a)%1337; b/=2; } return ans; } int superPow(int a, vector<int>& b) { int ans=1; ...
ALGO
0.999967
5.34845
304d9aef-5da8-4313-aec0-b945ded0fa32
muktaranidas/Phitron--C-with-DSA
Basic Data Structures/Module 1 - Time and Space Complexity/O_sqrtN.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; // for (int i = 1; i <= sqrt(n); i++) // O(sqrt(N)) // { // if (n % i == 0) // { // cout << i << " "; // if (n / i != i) // cout << n / i << endl; // } // } ...
ALGO
0.999877
4.597658
1a28c675-0d00-4056-84a7-dd0903a1c9a1
ForrestPi/FaceSolution
faceDetect/CenterFace/prj-ncnn/demo.cpp
#include <iostream> #include <opencv2/opencv.hpp> #include "ncnn_centerface.h" int main(int argc, char** argv) { if (argc !=3) { std::cout << " .exe mode_path image_file" << std::endl; return -1; } std::string model_path = argv[1]; std::string image_file = argv[2]; Centerface centerface; centerface.init(...
TOOL
0.898804
4.881927
03b274d8-9f6a-4857-ba33-236c337dc61e
shreyanshg2010/Data-Structures
GeeksforGeeks/Window_sliding_technique.CPP
// O(n) solution for finding maximum sum of // a subarray of size k #include <iostream> using namespace std; // Returns maximum sum in a subarray of size k. int maxSum(int arr[], int n, int k) { // n must be greater if (n < k) { cout << "Invalid"; return -1; } // Compute sum of first window of siz...
ALGO
0.999932
5.466546
423b353a-7f4e-4576-a4e6-08bc38cf40f5
XiaoboMa1/Radix-Trie-Dictionary
native-lib/src/main/cpp/src/radixTree.cpp
#include "RadixTree.h" #include <algorithm> #include <cstring> #include <queue> #include <stack> #include <cassert> #include <fstream> #include <sstream> namespace radix { DictNode::DictNode(const std::string& s) : label(s), label_len(static_cast<int>(s.length())), dwn{}, up(nullptr), terminal...
ALGO
0.970737
7.047922
9d685ed2-281d-45a5-989e-eefec1d49ddb
ashutosh1598/SPOJ
iopalin.cpp
#include"iostream" #include"cmath" #include"vector" #include"algorithm" #include"set" #include"map" #include"string" using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n;string x;cin>>n>>x; static int dp[5010][5010]; dp[n][n]=0; for(int i...
ALGO
0.999947
4.368219
22ddcfa9-a1b4-45cc-ac1e-a797c83629ee
jthai2/Chapter11
addingArrays/addingArrays/Source.cpp
//Adding Arrays //04/26/18 //Jimmy Thai #include <iostream> #include <iomanip> #include <string> using namespace std; string choice; void displayArray(double dollars[], int numElements) { double total = 0; cout << fixed << setprecision(2) << endl << endl; for (int sub = 0; sub < numElements; sub++) { cout << "...
TOOL
0.851691
4.59138
dafcee6a-cd74-4809-846e-b7f92c4ea91e
emotionless/Leetcode
885-spiral-matrix-iii/885-spiral-matrix-iii.cpp
class Solution { public: int dr[4] = {0, 1, 0, -1}; int dc[4] = {1, 0, -1, 0}; int hashVal(int a, int b) { return a*100000 + b; } void dfs(int r, int c, int d, vector<vector<int>> &ans) { if (ans.size() == n*m) return; int now = hashVal(r, c); if (r >= ...
ALGO
0.999957
4.810944
05eb5127-f186-4b30-9cbd-fa7465e166cf
Chatyusha/Siv3D-Actions
Siv3D/src/Siv3D/FFT/SivFFT.cpp
# include <Siv3D/Common.hpp> # include <Siv3D/FFT.hpp> # include <Siv3D/Audio.hpp> # include <Siv3D/FFT/IFFT.hpp> # include <Siv3D/Common/Siv3DEngine.hpp> namespace s3d { namespace FFT { void Analyze(FFTResult& result, const Audio& audio, const FFTSampleLength sampleLength, const double offsetTimeSec) { if (a...
ALGO
0.964602
6.40668
68942da1-421c-444e-965a-85b105800fca
sureshpodeti/codechef-problems
JOHNY.cpp
// Algorithm time complexity: O(N) #include<iostream> using namespace std; int main(){ int T, N, K; cin >> T; while(T--){ cin >> N; long long int A[N]; for(int i=0;i<N;++i) cin >> A[i]; // take position of johny song cin >> K; int counter = 0;...
ALGO
0.999877
3.756598
580845d8-7112-4e8e-9f3d-cc1e6684bcfd
LosReturn/AC_dream
leetcode/752.ๆ‰“ๅผ€่ฝฌ็›˜้”.cpp
/* * @lc app=leetcode.cn id=752 lang=cpp * * [752] ๆ‰“ๅผ€่ฝฌ็›˜้” */ #include <iostream> #include <vector> #include <queue> using namespace std; // @lc code=start const int base[] = {1,10,100,1000}; class Solution { public: //BFS int openLock(vector<string>& deadends, string target) { if( target...
ALGO
0.999857
6.385025
dad4c909-9272-40ff-ae10-40c25bfc3502
ericliuu/flux
FLUX/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/unique_copy_pred.pass.cpp
// <algorithm> // template<InputIterator InIter, class OutIter, // EquivalenceRelation<auto, InIter::value_type> Pred> // requires OutputIterator<OutIter, RvalueOf<InIter::value_type>::type> // && HasAssign<InIter::value_type, InIter::reference> // && Constructible<InIter::value_type, InIter...
TEST
0.97978
6.387039
bd927776-aa94-4319-a824-daecbda91d1a
itsmohiniii/100DaysOfCode
Graph/23_AlienDictionaryTopoSortBFS.cpp
//Alien Dictionary (Toposort using BFS) (Assuming the given dictionary can be wrong) // When is the order of alphabets not possible? // 1. If all the characters match and the larger string is before the shorter string, then order is not possible (Wrong dictionary) // eg, abcd comes before abc => not possible // 2....
ALGO
0.999934
5.130195
5aa632cd-0096-4511-8ee6-bf446b207290
caiojosef/appacademia
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
60954fc0-851a-4b80-836b-c275975a7c45
WadekarPrashant/LeetCode-Problems-2023
Problem1140.cpp
class Solution { public: int stoneGameII(vector<int>& piles) { const int n = piles.size(); // dp[i][j] := max # of stones Alice can get w/ piles[i:] and M = j dp.resize(n, vector<int>(n)); // suffixSum[i] := sum of piles[i:] suffixSum = piles; for (int i = n - 2; i >= 0; --i) suffixSum...
ALGO
0.999877
5.356995
c81b7f65-70ab-429a-9ff9-e6e2f6061d3e
leehayeong/Algorithm
BOJ_cpp/dfs, bfs/2234.cpp
#include <iostream> #include <queue> #include <algorithm> #include <cstring> #include <cmath> using namespace std; /* ์„ฑ๊ณฝ ๋ฐฉ์˜ ๊ฐœ์ˆ˜, ๊ฐ€์žฅ ๋„“์€ ๋ฐฉ์˜ ๋„“์ด, ํ•˜๋‚˜์˜ ๋ฒฝ์„ ์ œ๊ฑฐํ•˜์—ฌ ์–ป์„ ์ˆ˜ ์žˆ๋Š” ๊ฐ€์žฅ ๋„“์€ ๋ฐฉ์˜ ํฌ๊ธฐ 10์ง„์ˆ˜->2์ง„์ˆ˜, ๋น„ํŠธ์—ฐ์‚ฐ & ์œผ๋กœ ๋ฒฝ์ด ์žˆ๋Š”์ง€ ์—†๋Š”์ง€ ํ™•์ธ */ int N, M, cnt, area, max_area; int map[50][50], areas[2500]; bool visited[50][50]; int dx[4] = { 0, -1, 0,...
ALGO
0.99972
4.01208
2814e560-89bb-4ab4-a667-d763c3829d8d
eufymake/eufyMake-PrusaSlicer-Release
AnkerStudio/src/libigl/igl/point_mesh_squared_distance.cpp
template < typename DerivedP, typename DerivedV, typename DerivedsqrD, typename DerivedI, typename DerivedC> IGL_INLINE void igl::point_mesh_squared_distance( const Eigen::PlainObjectBase<DerivedP> & P, const Eigen::PlainObjectBase<DerivedV> & V, const Eigen::MatrixXi & Ele, Eigen::PlainObjectBase<Der...
ALGO
0.998556
6.486227
deabbed3-fb1c-453e-9711-47f99bba644f
Kaminyou/Competitive-Programming-Playground
kick/2022_H/B.cpp
#include <iostream> #include <vector> #include <climits> using namespace std; int main() { vector<int> dp(100001, INT_MAX); dp[0] = 0; dp[1] = 1; for (int i = 2; i < 100001; ++i) { dp[i] = min(dp[i], dp[i - 1] + 1); for (int j = 2; i * j < 100001; ++j) { dp[i * j] = min(dp[i...
ALGO
0.999491
4.799601
799cfb5e-4b94-4809-a486-65d71f87388f
raincross7/code-similarity
codes/train_code/problem188/problem188_134.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using u32 = uint32_t; using vi = vector<int>; using vvi = vector<vi>; using vb = vector<bool>; using vvb = vector<vb>; using vl = vector<ll>; using vvl = vector<vl>; using vd = vector<dou...
ALGO
0.999966
4.067721
999c016e-3562-406b-b1ba-d4208a1219f6
Armand42/LeetCodeProblems
_242_validAnagram.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <string> using namespace std; //s = "anagram", t = "nagaram", return true. //s = "rat", t = "car", return false. class Solution { public: bool isAnagram(string s, string t) { unordered_map<char,int> mymap; // map contains charact...
ALGO
0.999754
5.972898
82cee138-6940-46f9-bee2-8130aee50240
momomomoon/Algorithm
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/0/181950.โ€…๋ฌธ์ž์—ดโ€…๋ฐ˜๋ณตํ•ด์„œโ€…์ถœ๋ ฅํ•˜๊ธฐ/๋ฌธ์ž์—ดโ€…๋ฐ˜๋ณตํ•ด์„œโ€…์ถœ๋ ฅํ•˜๊ธฐ.cpp
#include <iostream> #include <string> using namespace std; int main(void) { string str; int n; cin >> str >> n; while(0 != n) { cout << str; n--; } return 0; }
ALGO
0.998836
3.455094